/* KADCC 2026 — "zirconia blank" identity
   The hero is the KADCC mark scaled up into a milling disc; everything else stays quiet. */
:root {
  --paper: #F4F6FA;      /* zirconia white, cool */
  --white: #FFFFFF;
  --ink: #0E1F4D;        /* poster navy */
  --ink-2: #4A5673;
  --blue: #1B5FD0;       /* signal blue — actions only */
  --blue-deep: #134AA8;
  --lilac: #A983C4;
  --teal: #3E9E99;
  --rule: #D6DCE8;
  --rule-2: #E7EBF2;
  --danger: #C2334A;
  --ok: #17805A;

  --kr: 'IBM Plex Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --cond: 'IBM Plex Sans Condensed', 'IBM Plex Sans KR', 'Malgun Gothic', sans-serif;
  --nav-h: 64px;
  --r-sm: 8px;
  --r-md: 12px;

  /* legacy aliases used by admin.html */
  --navy: var(--ink); --muted: var(--ink-2); --line: var(--rule); --tint: var(--paper);
  --shadow: 0 1px 0 var(--rule); --font: var(--kr);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { margin: 0; font: 400 16px/1.75 var(--kr); color: var(--ink); background: var(--white); word-break: keep-all; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ─── Buttons ─── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: var(--r-sm); background: var(--blue); color: #fff; font: 600 15px/1.2 var(--kr); text-decoration: none; border: 1.5px solid var(--blue); cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 14px; }
.btn-line, .btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover, .btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ─── Nav ─── */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--rule); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 18px/1 var(--cond); letter-spacing: .02em; color: var(--ink); }
.brand em { font: 500 14px/1 var(--kr); font-style: normal; color: var(--ink-2); letter-spacing: 0; margin-left: 4px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.nav-links a:not(.btn):hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; flex-direction: column; justify-content: center; gap: 7px; padding: 0 10px; }
.nav-toggle span { height: 2px; background: var(--ink); transition: transform .2s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ─── Hero: the milling disc ─── */
.hero { position: relative; overflow: hidden; background: var(--paper); border-bottom: 1px solid var(--rule); }
.hero-disc { position: absolute; top: 50%; right: max(-14vw, -220px); width: min(64vw, 860px); aspect-ratio: 1; transform: translateY(-50%); }
.disc { width: 100%; height: 100%; overflow: visible; }
.disc-flange { fill: none; stroke: var(--ink); stroke-opacity: .16; stroke-width: 1.5; }
.toolpath path { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; }
.nodes circle { fill: #fff; }
.tooth { fill: #fff; }
.hero-inner { position: relative; padding: clamp(48px, 6vw, 88px) 0 clamp(56px, 7vw, 96px); }
.hero-org { font-size: clamp(15px, 1.6vw, 18px); font-weight: 600; color: var(--ink-2); }
.hero-title { margin-top: 14px; font: 700 clamp(56px, 8.6vw, 124px)/.9 var(--cond); letter-spacing: -.035em; color: var(--ink); }
.titleblock { margin: clamp(32px, 4vw, 48px) 0 0; display: grid; grid-template-columns: repeat(3, max-content); width: fit-content; max-width: 100%; background: var(--white); border: 1.5px solid var(--ink); }
.titleblock > div { padding: 12px 22px 14px 16px; border-left: 1px solid var(--rule); min-width: 0; }
.titleblock > div:first-child { border-left: 0; }
.titleblock dt { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.titleblock dd { margin: 2px 0 0; font-size: 15px; }
.titleblock b { font: 700 22px/1.25 var(--cond); letter-spacing: -.005em; margin-right: 4px; }
.titleblock small { display: block; font-size: 13px; color: var(--ink-2); }
.tb-dday b { color: var(--blue); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* one orchestrated load moment: toolpaths mill outward from the tooth */
@media (prefers-reduced-motion: no-preference) {
  .toolpath path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: mill .9s cubic-bezier(.5, 0, .2, 1) forwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
  .nodes circle { opacity: 0; animation: node .3s ease-out forwards; animation-delay: calc(var(--i) * 70ms + 850ms); }
  .tooth { opacity: 0; animation: node .5s ease-out .1s forwards; }
}
@keyframes mill { to { stroke-dashoffset: 0; } }
@keyframes node { to { opacity: 1; } }

/* ─── Sections ─── */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-paper { background: var(--paper); }
.section-ink { background: var(--ink); color: #fff; }
.sec-head { margin-bottom: 40px; max-width: 62ch; }
.sec-title { font: 700 clamp(30px, 3.6vw, 44px)/1.15 var(--kr); letter-spacing: -.03em; color: inherit; }
.sec-desc { margin-top: 12px; color: var(--ink-2); font-size: 17px; }

/* Info */
.info-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 56px; align-items: start; }
.info-grid .sec-title { grid-column: 1 / -1; margin-bottom: 40px; }
.info-grid h3 { font-size: 15px; font-weight: 600; color: var(--ink-2); padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); }
.fees table { width: 100%; border-collapse: collapse; }
.fees th, .fees td { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.fees th { text-align: left; font-weight: 500; font-size: 16px; }
.fees td { text-align: right; font: 700 28px/1 var(--cond); font-variant-numeric: tabular-nums; }
.fees td span { font: 500 15px var(--kr); margin-left: 2px; color: var(--ink-2); }
.acct-no { margin-top: 16px; font: 700 26px/1.2 var(--cond); font-variant-numeric: tabular-nums; }
.acct-owner { margin-top: 2px; color: var(--ink-2); }
.acct-tip { margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.acct-tip b { color: var(--ink); }
.copy-btn { margin-top: 14px; min-height: 36px; padding: 6px 14px; border-radius: var(--r-sm); border: 1.5px solid var(--ink); background: var(--white); color: var(--ink); font: 600 14px var(--kr); cursor: pointer; }
.copy-btn:hover { background: var(--ink); color: #fff; }
.rules { margin: 0; }
.rules > div { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.rules dt { font-weight: 700; font-size: 15px; }
.rules dd { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.7; }
.rules-tight { border-top: 1px solid var(--rule); }

/* Program — one timeline, speakers inline */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.timeline li { display: grid; grid-template-columns: 180px 1fr 150px; gap: 28px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.timeline time { font: 600 20px/1.2 var(--cond); font-variant-numeric: tabular-nums; color: var(--ink); }
.timeline time i { font-style: normal; color: var(--ink-2); margin: 0 4px; }
.tl-body h3 { font-size: clamp(18px, 1.9vw, 22px); font-weight: 700; letter-spacing: -.02em; }
.tl-body p { color: var(--ink-2); }
.tl-body h3 + p { margin-top: 2px; }
.tl-no { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 700; color: var(--blue); }
.tl-muted time, .tl-muted .tl-body p { color: var(--ink-2); font-size: 16px; }
.tl-muted time { font-size: 17px; }
.tl-lecture { padding: 28px 0 !important; }
.tl-speaker { margin: 0; display: flex; align-items: center; gap: 12px; justify-self: end; }
.tl-speaker img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--rule-2); }
.tl-speaker figcaption { font-weight: 700; font-size: 17px; white-space: nowrap; }
.tl-break { background: linear-gradient(90deg, rgba(169, 131, 196, .1), rgba(62, 158, 153, .08)); padding-inline: 16px !important; margin-inline: -16px; }

/* Register (ink section) */
.reg-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 64px; align-items: start; }
.reg-lead { margin-top: 16px; font-size: 17px; color: #C9D3EA; max-width: 34ch; }
.acct-mini { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .25); }
.acct-mini span { display: block; font-size: 13px; color: #9FB0D6; }
.acct-mini b { display: block; margin-top: 4px; font: 700 28px/1.2 var(--cond); font-variant-numeric: tabular-nums; }
.acct-mini small { display: block; margin-top: 2px; color: #C9D3EA; font-size: 14px; }
.copy-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.copy-light:hover { background: #fff; color: var(--ink); }

/* Forms */
.card { background: var(--white); color: var(--ink); border-radius: var(--r-md); padding: clamp(22px, 3vw, 36px); border: 1px solid var(--rule); }
.section-ink .card { border: 0; }
.form { display: grid; gap: 18px; }
.form-title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; min-height: 46px; padding: 11px 13px; font: 400 16px var(--kr); color: var(--ink); background: var(--white); border: 1.5px solid var(--rule); border-radius: var(--r-sm); transition: border-color .15s; }
.field textarea { resize: vertical; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: #AEB9CF; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27, 95, 208, .15); }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--danger); }
.field-hint { font-weight: 400; color: var(--ink-2); font-size: 13px; margin-left: 4px; }
sup { color: var(--danger); font-size: .8em; }
.seg { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg-2 { grid-template-columns: repeat(2, 1fr); }
.seg legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; gap: 2px; padding: 12px 6px; border-radius: var(--r-sm); border: 1.5px solid var(--rule); font-weight: 700; text-align: center; line-height: 1.3; transition: border-color .15s, background-color .15s; }
.seg small { font-weight: 500; font-size: 13px; color: var(--ink-2); }
.seg label:hover span { border-color: #AEB9CF; }
.seg input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.seg input:checked + span small { color: #C9D3EA; }
.seg input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; line-height: 1.6; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.check small { color: var(--ink-2); }
.check.invalid span { color: var(--danger); }
.form-foot { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; padding-top: 18px; border-top: 1px solid var(--rule); }
.total { color: var(--ink-2); font-size: 15px; }
.total b { margin-left: 8px; font: 700 30px/1 var(--cond); color: var(--ink); font-variant-numeric: tabular-nums; }
.form-msg { font-size: 14px; }
.form-msg:empty { display: none; }
.form-msg.ok { color: var(--ok); font-weight: 600; }
.form-msg.err { color: var(--danger); font-weight: 600; }

/* Location */
.loc-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: start; }
.loc-place { margin-top: 28px; font-size: 22px; font-weight: 500; line-height: 1.45; }
.loc-addr { margin: 6px 0 24px; color: var(--ink-2); }
.loc-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.map-frame { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--rule); aspect-ratio: 4 / 3; background: var(--paper); }
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* Contact + board */
.contact-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; margin-bottom: 40px; }
.contact-top .sec-head { margin-bottom: 0; }
.kakao { display: inline-flex; align-items: center; gap: 16px; padding: 12px 20px 12px 12px; background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-md); text-decoration: none; }
.kakao:hover { border-color: var(--ink); }
.kakao span { display: grid; font-size: 14px; color: var(--ink-2); }
.kakao b { font-size: 17px; color: var(--ink); }
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); }
.board-count { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.board-list { list-style: none; margin: 0; padding: 0; }
.board-list > li { border-bottom: 1px solid var(--rule); }
.board-empty { padding: 44px 0; text-align: center; color: var(--ink-2); font-size: 15px; }
.board-row { width: 100%; display: grid; grid-template-columns: 36px 1fr auto auto; gap: 14px; align-items: center; min-height: 56px; padding: 12px 8px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.board-row:hover { background: rgba(14, 31, 77, .04); }
.board-row[aria-expanded="true"] { background: var(--white); }
.b-no { font: 500 14px var(--cond); color: var(--ink-2); text-align: center; font-variant-numeric: tabular-nums; }
.b-title { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-title.is-secret { color: var(--ink-2); font-weight: 500; }
.b-meta { display: flex; gap: 10px; font-size: 13px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge { padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; background: #FBE9EC; color: var(--danger); }
.badge.done { background: #E2F3EC; color: var(--ok); }
.board-detail { padding: 20px 20px 22px 58px; background: var(--white); }
.q-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); }
.q-topic { padding: 2px 8px; border-radius: 6px; background: var(--paper); border: 1px solid var(--rule); color: var(--ink); font-size: 12px; font-weight: 600; }
.q-title { margin-top: 8px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.q-body { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.75; }
.q-answer { margin-top: 18px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--paper); border-left: 3px solid var(--blue); }
.q-answer-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); }
.q-answer-head b { color: var(--blue); font-size: 14px; }
.q-wait { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.q-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.link-btn { background: none; border: 0; padding: 6px; font: 500 13px var(--kr); color: var(--ink-2); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--danger); }
.pin-form { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 8px; font-size: 14px; }
.pin-form > span { flex-basis: 100%; font-weight: 600; }
.pin-form input { width: 150px; min-height: 40px; padding: 8px 12px; font: 500 16px var(--kr); letter-spacing: .25em; border: 1.5px solid var(--rule); border-radius: var(--r-sm); background: #fff; }
.pin-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27, 95, 208, .15); }
.pin-err { flex-basis: 100%; font-size: 13px; color: var(--danger); font-weight: 600; }
.pin-err:empty { display: none; }
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.pager button { min-width: 36px; height: 36px; padding: 0 8px; border-radius: var(--r-sm); border: 1px solid var(--rule); background: #fff; font: 600 15px var(--cond); color: var(--ink-2); cursor: pointer; }
.pager button.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Footer */
.footer { background: var(--white); border-top: 1px solid var(--rule); padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px)); font-size: 14px; color: var(--ink-2); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; }
.footer-logo { width: 150px; }
.footer-text { display: grid; gap: 4px; }
.footer-text b { color: var(--ink); margin-right: 6px; }
.footer-admin { margin-left: 8px; color: var(--ink-2); }

/* Floating CTA + toast */
.fab { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 40; padding: 14px 22px; border-radius: var(--r-sm); background: var(--blue); color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 10px 24px -10px rgba(14, 31, 77, .55); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .25s, transform .25s; }
.fab.show { opacity: 1; transform: none; pointer-events: auto; }
.toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); z-index: 60; transform: translate(-50%, 16px); padding: 12px 20px; border-radius: var(--r-sm); background: var(--ink); color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .fab, .toast { transition: none; } }

/* ─── Responsive ─── */
@media (max-width: 1080px) {
  .info-grid { grid-template-columns: 1fr 1fr; gap: 40px 48px; }
  .info-grid .sec-title { margin-bottom: 0; }
  .notes { grid-column: 1 / -1; }
  .reg-grid, .loc-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-disc { right: -30vw; width: 80vw; opacity: .9; }
}
@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .brand em { display: none; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; background: #fff; border-bottom: 1px solid var(--rule); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--rule-2); }
  .nav-links .btn { margin-top: 14px; }
  .hero-disc { position: relative; top: auto; right: auto; transform: none; width: 118vw; margin: -40vw -46vw -18vw auto; opacity: 1; }
  .hero-inner { padding-top: 0; }
  .timeline li { grid-template-columns: 1fr auto; gap: 6px 16px; padding: 20px 0; }
  .timeline time { grid-column: 1 / -1; font-size: 17px; }
  .tl-lecture { padding: 22px 0 !important; }
  .tl-speaker { flex-direction: column; gap: 4px; }
  .tl-speaker figcaption { font-size: 14px; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .titleblock { grid-template-columns: 1fr; width: 100%; }
  .titleblock > div { border-left: 0; border-top: 1px solid var(--rule); }
  .titleblock > div:first-child { border-top: 0; }
  .hero-cta .btn { flex: 1; }
  .info-grid { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; }
  .board-row { grid-template-columns: 1fr auto; gap: 4px 10px; padding: 14px 4px; }
  .b-no { display: none; }
  .b-meta { grid-row: 2; }
  .badge { grid-row: 1 / 3; grid-column: 2; }
  .board-detail { padding: 16px 14px; }
  .tl-speaker img { width: 48px; height: 48px; }
}
