/* 합격역 — "first-class ticket · assessment sheet" editorial theme.
   Mobile first (390px), works at 320px. Hairlines and whitespace instead of cards; one accent (brass), used sparingly. */
:root {
  /* ink & paper */
  --navy: #0E1A2B;        /* deep navy ink: bars, primary buttons, headings */
  --navy-2: #24364F;      /* hover / pressed navy */
  --paper: #F7F4EE;       /* ivory page */
  --paper-2: #EFEAE1;     /* quiet fill: bar tracks, hovers */
  --sheet: #FFFDF9;       /* inputs, the ticket plate, score sheet */
  --ink: #1A1A1A;         /* body text */
  --ink-2: #57534B;       /* secondary text */
  --ink-3: #6E695F;       /* tertiary text (still AA) */
  --rule: #DCD5C8;        /* 1px hairline */
  --rule-2: #C9C0B0;      /* stronger hairline */
  --field: #857E71;       /* input borders (non-text contrast, WCAG 1.4.11) */
  /* the one accent */
  --brass: #9C7A43;       /* rules, marks, bars — never small text on paper */
  --brass-ink: #74592D;   /* brass for small text on paper */
  --brass-soft: #D9C59E;  /* brass on navy */
  /* states */
  --red: #B4402A;         /* vermilion: errors and warnings only */
  --red-soft: #F6E6E0;
  --green: #2F5B45;       /* muted deep green: pass */
  --green-soft: #E3ECE5;
  --focus: #1F5FBF;
  --radius: 4px;
  --font: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "맑은 고딕", "Noto Sans KR", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
main { display: block; max-width: 560px; margin: 0 auto; padding: 0 20px 56px; outline: none; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 8px; letter-spacing: -0.01em; font-weight: 700; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 8px; }
strong { font-weight: 650; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1:focus, h2:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sheet); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.center { text-align: center; }
.block { display: block; }
.pre { white-space: pre-wrap; }
.noscript { padding: 24px; text-align: center; }

/* eyebrow: small, tracked label — the "ticket field name" */
.eyebrow, .item-kicker, .fix-label {
  display: block; font-size: .75rem; font-weight: 600; letter-spacing: .12em; color: var(--ink-2); margin: 0 0 4px;
}

/* boot */
.boot { min-height: 70vh; display: grid; place-content: center; text-align: center; color: var(--ink-2); }
.boot-sign { margin: 0 auto 14px; padding: 10px 28px 12px; border-top: 1px solid var(--navy); border-bottom: 6px solid var(--navy); }
.boot-sign span { font-size: 1.5rem; font-weight: 700; color: var(--navy); letter-spacing: .3em; margin-right: -.3em; }

/* ---------- station sign (역명판) ---------- */
.hero { padding: 20px 0 4px; }
.sign { background: var(--sheet); border: 1px solid var(--rule-2); border-radius: var(--radius); overflow: hidden; }
.sign-plate { text-align: center; padding: 12px 16px 12px; }
.sign-kicker { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .2em; margin-right: -.2em; color: var(--brass-ink); margin-bottom: 4px; }
.sign-name { display: block; font-size: 2rem; font-weight: 750; letter-spacing: .32em; margin-right: -.32em; color: var(--navy); line-height: 1.1; }
.sign-band { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; background: var(--navy); color: #fff; padding: 8px 14px 9px; font-size: .875rem; border-top: 2px solid var(--brass); }
.sign-band > span:first-child { text-align: left; }
.sign-band > span:last-child { text-align: right; }
.sign-band small { display: block; font-size: .75rem; letter-spacing: .08em; color: var(--brass-soft); line-height: 1.3; }
.sign-band b { font-weight: 600; letter-spacing: .06em; }
.sign-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brass-soft); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; margin: 0 -20px 16px; padding: 4px 12px; background: var(--navy); color: #fff; border-bottom: 2px solid var(--brass); }
.topbar .back { color: #fff; text-decoration: none; min-height: 44px; min-width: 64px; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: .9375rem; padding: 0 6px; }
.topbar a:focus-visible { outline-color: var(--brass-soft); }
.back-spacer { width: 64px; }
.topbar-title { flex: 1; text-align: center; font-size: 1.0625rem; font-weight: 650; letter-spacing: .04em; margin: 0; color: #fff; }

/* ---------- sections (hairlines, not cards) ---------- */
.topbar + .card { border-top: 0; padding-top: 4px; }
.card { background: transparent; border: 0; border-top: 1px solid var(--rule); border-radius: 0; padding: 18px 0 6px; margin: 0; }
.section-title { margin-top: 28px; color: var(--navy); }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .04em; line-height: 1.5; padding: 0 6px; border: 1px solid var(--rule-2); border-radius: 2px; color: var(--ink-2); background: var(--sheet); vertical-align: 1px; }
.tag-std { margin-left: 6px; }
.source .tag-std { margin-left: 0; }
.tag-warn { border-color: #D7B98E; color: var(--brass-ink); background: #FBF5EA; }
.badge { display: inline-block; font-size: .75rem; font-weight: 650; letter-spacing: .08em; line-height: 1.5; padding: 0 7px; border: 1px solid currentColor; border-radius: 2px; }
.badge-beta { color: var(--brass-ink); }
.badge-follow { color: var(--navy); margin-right: 2px; }
.source { font-size: .8125rem; color: var(--ink-2); margin-top: 10px; }
details.source summary { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; list-style: none; color: var(--ink-2); }
details.source summary::-webkit-details-marker { display: none; }
details.source summary::before { content: "+"; display: inline-block; width: 12px; color: var(--ink-3); }
details.source[open] summary::before { content: "\2212"; }
details.source p { margin: 2px 0 4px 18px; font-size: .8125rem; line-height: 1.6; }
.disclaimer { font-size: .8125rem; line-height: 1.6; color: var(--ink-2); border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 28px; }
.legal-links { text-align: center; font-size: .875rem; margin-top: 28px; color: var(--ink-3); }
.legal-links a { display: inline-block; padding: 10px 4px; color: var(--ink-2); }

/* ---------- notices: thin left rule + text label (never color alone) ---------- */
.notice { display: flex; gap: 10px; align-items: baseline; padding: 8px 0 8px 14px; margin: 16px 0; font-size: .9375rem; line-height: 1.6; border-left: 2px solid; background: transparent; }
.notice-label { flex: none; font-size: .75rem; font-weight: 700; letter-spacing: .1em; }
.notice-info { border-color: var(--navy); }
.notice-info .notice-label { color: var(--navy); }
.notice-warn { border-color: var(--brass); }
.notice-warn .notice-label { color: var(--brass-ink); }
.notice-danger { border-color: var(--red); background: var(--red-soft); padding-right: 12px; }
.notice-danger .notice-label { color: var(--red); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: var(--radius); border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 1rem; letter-spacing: .02em; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-primary:disabled { background: #D3CCBF; color: #4A463F; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-ghost:disabled { opacity: .5; }
.btn-block { width: 100%; min-height: 52px; margin: 18px 0 4px; }
.btn-small { min-height: 44px; padding: 6px 12px; font-size: .875rem; margin: 6px 0 10px; }

/* ---------- forms ---------- */
.form { border-top: 0; padding-top: 8px; }
.form-title { color: var(--navy); font-size: 1.375rem; margin-top: 20px; }
.field { margin: 18px 0; }
.field label, .editor-label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
input[type=text], input[type=tel], input[type=email], input[type=password], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 12px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--sheet); border: 1px solid var(--field); border-radius: var(--radius);
}
input:hover, select:hover:not(:disabled), textarea:hover { border-color: var(--ink-2); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
input::placeholder, textarea::placeholder { color: #716B60; }
textarea { line-height: 1.75; resize: vertical; min-height: 220px; }
select:disabled { background: transparent; color: var(--ink); opacity: 1; border-color: var(--rule-2); }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--red); box-shadow: inset 3px 0 0 var(--red); }
.field-hint { font-size: .8125rem; line-height: 1.55; color: var(--ink-2); margin: 6px 0 0; }
.field-err { font-size: .875rem; color: var(--red); font-weight: 600; margin: 6px 0 0; }
.field-err:empty { display: none; }
.field-err:not(:empty)::before { content: "! "; }
.form-err:not(:empty) { border-left: 2px solid var(--red); background: var(--red-soft); color: #8E2E1C; padding: 10px 12px; font-weight: 600; margin: 12px 0; }
.consents { border: 0; border-top: 1px solid var(--navy); border-bottom: 1px solid var(--rule); padding: 10px 0 8px; margin: 28px 0 8px; min-width: 0; }
.consents legend { float: left; width: 100%; font-size: .75rem; font-weight: 600; letter-spacing: .12em; color: var(--ink-2); padding: 0; margin-bottom: 2px; }
.consent { clear: both; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.consent:last-of-type { border-bottom: 0; }
.consent-row { display: flex; gap: 12px; align-items: center; min-height: 44px; font-weight: 600; font-size: .9375rem; cursor: pointer; }
.consent-row input { width: 22px; height: 22px; flex: none; accent-color: var(--navy); margin: 0; }
.consent-extra { font-size: .8125rem; line-height: 1.55; color: var(--ink-2); margin: 0 0 4px 34px; }
.consent-link { display: inline-block; font-size: .8125rem; margin: 2px 0 0 34px; padding: 8px 0; }
.consent-links { font-size: .8125rem; margin: 8px 0 0; }
.consent-links a { display: inline-block; padding: 8px 2px; }
.form .center { margin-top: 10px; }

/* ---------- home: the ticket ---------- */
.ticket { margin: 12px 0 0; background: var(--sheet); border: 1px solid var(--rule-2); border-radius: var(--radius); }
.ticket-body { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 12px 16px 10px; align-items: start; }
.ticket-who strong { display: block; font-size: 1.125rem; font-weight: 700; color: var(--navy); line-height: 1.35; }
.ticket-who .greet-sub { display: block; font-size: .8125rem; color: var(--ink-2); margin-top: 2px; line-height: 1.5; }
.ticket-credit { text-align: right; }
.ticket-credit .eyebrow { margin: 0; }
.credit-num { margin: 0; font-size: 1.5rem; font-weight: 600; line-height: 1.2; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.credit-num small { font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.credit-num.is-text { font-size: 1rem; white-space: normal; }
.ticket-cost { grid-column: 1 / -1; margin: 0; font-size: .8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ticket-inst { display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 10px 16px 0; border-top: 1px dashed var(--rule-2); }
.ticket-inst .eyebrow { margin: 0; flex: none; }
.inst-name { flex: 1; min-width: 0; font-weight: 650; color: var(--navy); font-size: .9375rem; }
.ticket-inst .badge { flex: none; }
.ticket-hint { margin: 0; padding: 2px 16px 10px; font-size: .75rem; color: var(--ink-2); }
/* professor only: the way into /admin (navy outline, quiet; full width under the ticket) */
.admin-link { display: flex; width: 100%; margin: 12px 0 0; min-height: 44px; font-size: .9375rem; }
/* "교수 로그인": a small, quiet link under the student login card */
.prof-link { text-align: center; margin: 4px 0 0; }
.prof-link a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: .8125rem; color: var(--ink-2); }

/* ---------- home: route (menu) with hierarchy ---------- */
.menu { display: block; margin-top: 22px; }
.menu-h { font-size: .75rem; font-weight: 600; letter-spacing: .12em; color: var(--ink-2); margin: 0 0 10px; }
.menu-card { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.menu-no { flex: none; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: var(--brass-ink); }
.menu-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.menu-text strong { font-size: 1.0625rem; font-weight: 650; }
.menu-text span { font-size: .875rem; color: var(--ink-2); line-height: 1.5; margin-top: 2px; }
.menu-go { flex: none; font-size: 1.125rem; color: var(--navy); }
/* 01 — the main thing to do: a solid navy ticket */
.menu-feature { display: block; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 16px 18px 14px; }
.menu-feature .menu-no { color: var(--brass-soft); display: block; margin-bottom: 12px; }
.menu-feature .menu-text strong { font-size: 1.5rem; font-weight: 700; letter-spacing: .01em; }
.menu-feature .menu-text span { color: #C9D0DA; font-size: .9375rem; margin-top: 4px; }
.menu-cta { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(217, 197, 158, .4); font-size: .9375rem; font-weight: 600; color: #fff; }
.menu-cta b { color: var(--brass-soft); font-weight: 500; }
.menu-feature:hover { background: var(--navy-2); }
/* 02 — second stop: outlined */
.menu-main { margin-top: 10px; padding: 16px 18px; border: 1px solid var(--navy); border-radius: var(--radius); }
.menu-main .menu-text strong { font-size: 1.1875rem; font-weight: 700; color: var(--navy); }
.menu-main:hover { background: var(--paper-2); }
/* 03, 04 — timetable rows */
.menu-rows { margin-top: 18px; border-top: 1px solid var(--rule); }
.menu-row { min-height: 60px; padding: 10px 2px; border-bottom: 1px solid var(--rule); }
.menu-row:hover .menu-text strong { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.menu-soon { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; margin: 12px 2px 0; font-size: .8125rem; color: var(--ink-3); }
.menu-soon .eyebrow { margin: 0; color: var(--ink-3); }
.menu-soon .is-soon { white-space: nowrap; }
.home > .notice { margin-top: 22px; }

/* ---------- segmented + tabs + chips ---------- */
.seg { border: 0; padding: 0; margin: 4px 0 8px; display: flex; flex-wrap: wrap; gap: 0; align-items: center; min-width: 0; }
.seg legend { font-size: .75rem; font-weight: 600; letter-spacing: .12em; color: var(--ink-2); margin-bottom: 6px; width: 100%; float: left; }
.seg-opt { flex: 1; position: relative; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg-opt span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--navy); font-weight: 600; font-size: .9375rem; color: var(--navy); background: transparent; }
.seg-opt:first-of-type span { border-radius: var(--radius) 0 0 var(--radius); }
.seg-opt:last-of-type span { border-radius: 0 var(--radius) var(--radius) 0; border-left: 0; }
.seg-opt input:checked + span { background: var(--navy); color: #fff; }
.seg-opt input:checked + span::before { content: "✓"; margin-right: 6px; font-size: .8125rem; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.seg .field-hint { width: 100%; margin: 8px 0 0; }
.tabs { display: flex; gap: 0; margin: 18px 0 0; border-bottom: 1px solid var(--rule-2); }
.tab { flex: 1 1 0; min-width: 0; white-space: nowrap; min-height: 46px; padding: 8px 2px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-weight: 500; font-size: .9375rem; color: var(--ink-2); cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab[aria-selected=true] { color: var(--navy); font-weight: 700; border-bottom-color: var(--navy); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 4px; margin: 0; }
.chip { flex: none; min-height: 44px; min-width: 44px; padding: 6px 12px; border-radius: 2px; border: 1px solid var(--rule-2); background: transparent; font: inherit; font-weight: 500; font-size: .875rem; color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.chip[aria-pressed=true]::before { content: "✓ "; }

/* ---------- essay editor ---------- */
.remaining { font-size: .8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; margin: 0 0 14px; }
.item { border-top: 0; padding-top: 20px; }
.item-kicker { color: var(--brass-ink); font-variant-numeric: tabular-nums; }
.item-title { color: var(--navy); font-size: 1.375rem; }
.item-prompt { font-size: .9375rem; line-height: 1.7; color: var(--ink); border-left: 2px solid var(--rule-2); padding: 2px 0 2px 12px; margin: 10px 0 0; }
.item-prompt .tag { margin-right: 4px; }
.editor { border-top: 0; padding-top: 10px; }
.count { margin: 12px 0 8px; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.lenbar { position: relative; height: 4px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--rule); overflow: visible; }
.lenbar-fill { display: block; height: 100%; width: 0; background: var(--red); transition: width .15s; }
.lenbar.lv-mid .lenbar-fill { background: var(--brass); }
.lenbar.lv-ok .lenbar-fill { background: var(--green); }
.lenbar-tick { position: absolute; top: -5px; width: 1px; height: 14px; background: var(--navy); }
.lenbar-legend { position: relative; height: 40px; font-size: .75rem; color: var(--ink-2); margin-top: 6px; font-variant-numeric: tabular-nums; }
.lenbar-legend span { position: absolute; white-space: nowrap; transform: translateX(-50%); }
.lenbar-legend span:last-child { top: 18px; transform: translateX(-100%); }
.len-state { font-size: .875rem; font-weight: 600; margin: 6px 0 0; }
.len-state.lv-low, .len-state.lv-over { color: var(--red); }
.len-state.lv-mid { color: var(--brass-ink); }
.len-state.lv-ok { color: var(--green); }
.len-state.lv-low::before, .len-state.lv-over::before { content: "● "; }
.len-state.lv-mid::before { content: "▲ "; }
.len-state.lv-ok::before { content: "✓ "; }
/* phones: the two column wrappers dissolve and order restores the single-column sequence */
.essay .tab-panel { display: flex; flex-direction: column; }
.essay-write, .essay-side { display: contents; }
.essay .item { order: 1; }
.essay .editor { order: 2; }
.len-guide { order: 3; }
.essay-write > .btn { order: 4; }
.essay-write > .status { order: 5; }
.essay .result-box { order: 6; }
.saved { display: block; font-size: .75rem; color: var(--ink-2); min-height: 1.2em; margin-top: 4px; }

/* ---------- progress ---------- */
.status:empty { display: none; }
.progress { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 12px 2px; margin: 12px 0; color: var(--navy); font-weight: 500; font-size: .9375rem; }
.train { display: inline-flex; gap: 3px; }
.train i { width: 12px; height: 6px; background: var(--navy); animation: hop 1.2s infinite ease-in-out; }
.train i:nth-child(2) { animation-delay: .15s; }
.train i:nth-child(3) { animation-delay: .3s; background: var(--brass); }
@keyframes hop { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .train i { animation: none; opacity: 1; }
  .lenbar-fill, .btn, .switch, .switch::after { transition: none; }
}

/* ---------- results: the assessment sheet ---------- */
.result { margin-top: 32px; padding-top: 4px; border-top: 2px solid var(--navy); }
.result-kicker { margin: 14px 0 2px; color: var(--brass-ink); }
.result-title { color: var(--navy); font-size: 1.25rem; }
.total { background: var(--sheet); border: 1px solid var(--rule-2); border-radius: var(--radius); padding: 14px 18px 12px; margin: 14px 0 8px; }
.total-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 6px; }
.total-head .eyebrow { margin: 0; }
.total-num { margin: 0; display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.total-num strong { font-size: 4rem; font-weight: 320; line-height: 1; letter-spacing: -0.04em; color: var(--navy); }
.total-num span { font-size: 1rem; color: var(--ink-2); font-weight: 500; }
.total-sub { font-size: .8125rem; color: var(--ink-2); margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--rule-2); font-variant-numeric: tabular-nums; }
.total-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.cap-note { margin: 0; font-size: .875rem; font-weight: 600; color: var(--red); }
.subs { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--rule-2); display: grid; gap: 10px; }
.sub-head { display: flex; justify-content: space-between; gap: 12px; font-size: .875rem; }
.sub-label { color: var(--ink-2); }
.sub-val { font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.sub .bar { margin-top: 5px; }
.total-next { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--rule-2); }
.total-verdict { margin: 0 0 4px; font-size: .9375rem; line-height: 1.6; color: var(--ink); }
.link-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-size: .9375rem; font-weight: 600; color: var(--navy); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; cursor: pointer; }
.fixes:focus { outline: none; }
.rewrite { margin-top: 24px; }
.verdict-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.verdict { margin: 0 0 6px; }
.stamp { display: inline-block; font-size: .9375rem; font-weight: 700; letter-spacing: .2em; padding: 3px 6px 3px 10px; border: 1.5px solid currentColor; border-radius: 2px; }
.is-pass .stamp { color: var(--green); }
.is-fail .stamp { color: var(--brass-ink); }
/* 0–100 scale with the 70-point line */
.scale { position: relative; height: 3px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--rule); margin: 16px 0 0; }
.scale-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--navy); }
.is-pass .scale-fill { background: var(--green); }
.scale-mark { position: absolute; top: -6px; width: 1px; height: 15px; background: var(--brass); }
.scale-legend { position: relative; height: 20px; margin-top: 6px; font-size: .75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.scale-legend span { position: absolute; top: 0; white-space: nowrap; }
.scale-legend .at-0 { left: 0; }
.scale-legend .at-100 { right: 0; }
.scale-legend .at-pass { transform: translateX(-50%); color: var(--brass-ink); font-weight: 600; font-size: .8125rem; }
.warn-list { border-top: 0; border-left: 2px solid var(--red); padding: 4px 0 4px 14px; margin: 16px 0; }
.result .warn-list > h3 { color: var(--red); }
.warn-list ul { margin: 0; padding-left: 18px; font-size: .9375rem; }
.warn-list li { margin: 4px 0; }
.result .card > h3 { font-size: .8125rem; font-weight: 650; letter-spacing: .1em; color: var(--ink-2); margin-bottom: 4px; }
.result .card { padding-top: 16px; }
.part-list, .spell-list, .bank-list { list-style: none; margin: 0; padding: 0; }
.part { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.part:last-child { border-bottom: 0; }
.part-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.part-label { font-weight: 600; }
.part-score { white-space: nowrap; color: var(--navy); font-weight: 600; font-variant-numeric: tabular-nums; }
.part-note { font-size: .875rem; line-height: 1.65; color: var(--ink); margin: 8px 0 0; }
.part-note.muted { color: var(--ink-2); }
.bar { display: block; height: 3px; background: var(--paper-2); margin-top: 8px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--navy); }
.bar-ok .bar-fill { background: var(--green); }
.bar-mid .bar-fill { background: var(--brass); }
.bar-low .bar-fill { background: var(--red); }
.quote { margin: 10px 0 0; padding: 2px 0 2px 12px; border-left: 2px solid var(--brass); color: var(--ink-2); font-size: .875rem; line-height: 1.7; }
.quote::before { content: "“"; color: var(--brass-ink); margin-right: 1px; }
.quote::after { content: "”"; color: var(--brass-ink); margin-left: 1px; }
.spell-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.spell-list li:last-child { border-bottom: 0; }
.spell-list del { color: var(--red); text-decoration-thickness: 1px; }
.spell-list ins { color: var(--green); text-decoration: none; font-weight: 650; }
.spell-list .arrow { color: var(--ink-3); }
.spell-list .wrong::before { content: "틀림 "; font-size: .8125rem; letter-spacing: .06em; color: var(--ink-2); }
.spell-list .right::before { content: "맞음 "; font-size: .8125rem; letter-spacing: .06em; color: var(--ink-2); }
.fix-list { margin: 0; padding-left: 0; list-style: none; counter-reset: fix; }
.fix-list li { position: relative; padding: 12px 0 16px 30px; border-bottom: 1px solid var(--rule); counter-increment: fix; }
.fix-list li:last-child { border-bottom: 0; }
.fix-list li::before { content: counter(fix, decimal-leading-zero); position: absolute; left: 0; top: 13px; font-size: .8125rem; font-weight: 600; color: var(--brass-ink); font-variant-numeric: tabular-nums; }
.fix-label { margin: 10px 0 0; }
.fix-list li > .fix-label:first-child { margin-top: 0; }
.fix-better { background: var(--green-soft); border-left: 2px solid var(--green); padding: 8px 12px; margin: 6px 0 0; font-size: .9375rem; line-height: 1.7; }
.fix-why { font-size: .875rem; margin-top: 10px; color: var(--ink-2); }
.result-foot { margin-top: 24px; }
.ai-notice { font-size: .8125rem; font-weight: 500; color: var(--navy); border-top: 1px solid var(--rule); padding: 12px 0 0; margin: 0; }
.ai-notice .tag { color: var(--navy); border-color: var(--navy); }
.ended { border-top: 2px solid var(--red); }
.ended h2 { color: var(--red); }
.plain { margin: 0; padding-left: 18px; }
.plain li { margin: 2px 0; font-variant-numeric: tabular-nums; }

/* ---------- interview ---------- */
.qcard { border-top: 1px solid var(--navy); margin-top: 12px; padding-top: 18px; }
.q-text { font-size: 1.375rem; line-height: 1.45; font-weight: 700; color: var(--navy); letter-spacing: -0.015em; }
.small-q { font-size: 1.125rem; }
.frame { font-size: .9375rem; line-height: 1.65; border-left: 2px solid var(--rule-2); padding: 2px 0 2px 12px; margin: 12px 0 0; }
.frame .tag { margin-right: 4px; }
.qnav { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; margin: 14px 0 6px; }
.qnav .btn { padding: 8px 6px; border-radius: 0; font-weight: 500; font-size: .9375rem; }
.qnav .btn + .btn { border-left: 0; }
.qnav .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.qnav .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.result .followup { border: 1px solid var(--rule-2); border-top: 2px solid var(--navy); background: var(--sheet); padding: 16px 16px 6px; margin-top: 18px; }
.result .followup > h3 { color: var(--navy); }

/* ---------- tips ---------- */
.tip { padding-top: 18px; }
.tip h3 { color: var(--navy); font-size: 1.0625rem; }
.tip p { font-size: .9375rem; line-height: 1.75; }
.tip-no { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .1em; color: var(--brass-ink); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.bank { border-top: 1px solid var(--navy); margin-top: 8px; }
.bank h3 { color: var(--navy); font-size: .9375rem; letter-spacing: .04em; padding-bottom: 2px; }
.tip .source, .bank .source { margin-top: 2px; }
.bank-list li { padding: 8px 0 10px; border-bottom: 1px solid var(--rule); }
.bank-list li:last-child { border-bottom: 0; }
.bank-q { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; padding: 6px 0; min-height: 44px; text-decoration: none; color: var(--ink); }
.bank-q::after { content: "→"; flex: none; color: var(--navy); font-weight: 400; }
.bank-q:hover { text-decoration: underline; }
.bank-list .source { margin-top: 0; }

/* ---------- me ---------- */
.me-name { margin-top: 0; }
.kvs { margin: 8px 0 12px; }
.kv { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.kv:first-child { border-top: 1px solid var(--rule); }
.kv dt { width: 64px; color: var(--ink-2); flex: none; font-size: .875rem; letter-spacing: .06em; }
.kv dd { margin: 0; font-weight: 600; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.switch-row label { cursor: pointer; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 30px; border-radius: 999px; background: #8A8478; position: relative; cursor: pointer; margin: 6px 0; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--navy); }
.switch:checked::after { transform: translateX(22px); }

/* ---------- legal pages ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: 0 20px 56px; font-size: .9375rem; line-height: 1.75; }
.legal h1 { font-size: 1.5rem; color: var(--navy); margin-top: 28px; padding-bottom: 12px; border-bottom: 2px solid var(--navy); }
.legal h2 { font-size: 1.0625rem; margin-top: 32px; color: var(--navy); padding-top: 12px; border-top: 1px solid var(--rule); }
.legal ol, .legal ul { padding-left: 20px; }
.legal li { margin: 4px 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: .875rem; margin: 8px 0; background: var(--sheet); }
.legal th, .legal td { border: 1px solid var(--rule-2); padding: 8px; text-align: left; vertical-align: top; }
.legal th { background: var(--paper-2); font-weight: 650; }
.legal .table-wrap { overflow-x: auto; }
.legal .notice { margin: 20px 0; }
.legal-top { margin: 0 -20px; padding: 4px 20px; background: var(--navy); border-bottom: 2px solid var(--brass); }
.legal-top a { color: #fff; font-weight: 500; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.legal-top a:focus-visible { outline-color: var(--brass-soft); }

/* ---------- tablet (600–1023px): one calm column, full-bleed bars ---------- */
@media (min-width: 600px) {
  main { max-width: 640px; padding: 0 24px 64px; }
  /* full-bleed navy bar without horizontal overflow: border-image outset paints outside the box */
  .topbar, .legal-top { margin: 0 0 20px; border-bottom: 0; border-image: linear-gradient(var(--navy) 0 0) fill 0 / / 0 100vmax; }
  .topbar::after, .legal-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-image: linear-gradient(var(--brass) 0 0) fill 0 / / 0 100vmax; }
  .legal-top { position: relative; }
  .legal { padding: 0 24px 64px; }
}

/* ---------- desktop (1024px+): PC essay writing ---------- */
@media (min-width: 1024px) {
  main { max-width: 1160px; padding: 0 40px 72px; }
  .topbar { padding: 6px 0; }
  .topbar-title { font-size: 1.125rem; }

  /* home: sign + ticket on the left, the route on the right */
  .home { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0 56px; align-items: start; padding-top: 32px; }
  .home .hero { padding-top: 0; }
  .home-side { grid-column: 1; grid-row: 1; }
  .home-main { grid-column: 2; grid-row: 1 / span 2; }
  .home > .notice { grid-column: 1; grid-row: 2; margin-top: 20px; }
  .home .menu { margin-top: 0; }
  .home .legal-links, .home .disclaimer { grid-column: 1 / -1; }
  .menu-feature { padding: 22px 24px 18px; }
  .menu-feature .menu-text strong { font-size: 1.875rem; }
  .menu-main { padding: 18px 24px; }
  .menu-rows { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }

  /* essay: write on the left, length guide + result sheet on the right (sticky, scrolls on its own) */
  /* the type switch and the credit line share one row so the editor and its button fit the first screen */
  .essay { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); column-gap: 32px; align-items: end; }
  .essay > .topbar, .essay > .tabs, .essay > .tab-panel, .essay > .notice { grid-column: 1 / -1; }
  .essay > .seg { grid-row: 2; grid-column: 1; margin: 0; }
  .essay > .remaining { grid-row: 2; grid-column: 2; justify-self: end; margin: 0 0 30px; }
  .essay > .tabs { margin-top: 6px; }
  .essay .tab { flex: none; padding: 8px 22px; }
  .essay .tab-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 48px; align-items: start; }
  /* left: the writing desk stays put (sticky) and fits one screen; right: the result scrolls with the page */
  .essay-write { display: block; position: sticky; top: 76px; }
  .essay .item { padding-top: 8px; }
  .essay .item-title { font-size: 1.25rem; margin-bottom: 4px; }
  .essay .item-prompt { margin-top: 6px; font-size: .875rem; line-height: 1.6; }
  .essay .editor { padding-top: 10px; }
  .essay textarea { height: calc(100vh - 560px); min-height: 220px; }
  .essay .count { margin: 8px 0 6px; }
  .essay .lenbar-legend { height: 34px; }
  .essay .len-state { margin-top: 2px; }
  .essay .saved { min-height: 0; }
  .essay-write > .btn-block { margin-top: 10px; }
  .essay-side { display: block; }
  .essay .result { margin-top: 14px; }

  /* interview: question and answer in a reading column, the result sheet wide and split */
  .interview > :not(.topbar) { max-width: 880px; margin-left: auto; margin-right: auto; }
  .interview > .btn-block { display: flex; }
  .interview .remaining { margin-bottom: 14px; }
  .iv-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 40px; align-items: start; }
  .interview .result > .total { margin-bottom: 20px; }

  /* tips, me: a readable column */
  .tips > :not(.topbar), .me > :not(.topbar) { max-width: 720px; margin-left: auto; margin-right: auto; }
  /* question bank: a row-aligned 2-column grid (CSS columns left ragged gaps) */
  .tips .bank-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .tips .bank-list li, .tips .bank-list li:last-child { border-bottom: 1px solid var(--rule); }

  /* auth: centred form column */
  .auth { max-width: 480px; margin: 0 auto; }
}
/* short desktop windows: a sticky essay column taller than the viewport would hide its own button */
@media (min-width:1024px) and (max-height:640px) { .essay-write { position: static; } }

@media (max-width: 359px) {
  main { padding: 0 16px 48px; }
  .topbar { margin: 0 -16px 14px; }
  .legal { padding: 0 16px 48px; }
  .legal-top { margin: 0 -16px; padding: 4px 16px; }
  .sign-name { font-size: 1.75rem; letter-spacing: .26em; margin-right: -.26em; }
  .total-num strong { font-size: 3.25rem; }
  .menu-feature .menu-text strong { font-size: 1.3125rem; }
  .q-text { font-size: 1.25rem; }
  .qnav .btn { font-size: .875rem; }
  .tab { font-size: .875rem; }
}

.consent-all { font-size: 1rem; background: var(--paper-2); padding-left: 8px; padding-right: 8px; }
.consent-detail { margin: 2px 0 4px 34px; font-size: .8125rem; line-height: 1.55; color: var(--ink-2); }
.consent-detail summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; text-decoration: underline; }
.consent-detail dl { margin: 0; }
.consent-detail dt { font-weight: 600; margin-top: 6px; }
.consent-detail dd { margin: 0; }
.consent-detail .consent-extra { margin-left: 0; margin-top: 8px; }

.file-box { margin: 10px 0 14px; }
.file-btn { cursor: pointer; }
.file-box input:focus-visible + .file-btn { outline: 2px solid var(--focus); outline-offset: 2px; }
.tip-link { display: inline-block; padding: 10px 0; }
