:root {
  --ink: #111827; --sub: #4b5563; --mute: #6b7280; --line: #e5e7eb; --bg: #ffffff; --soft: #f7f8fa;
  --brand: #1d4ed8; --brand-ink: #fff; --ok: #047857; --ok-bg: #ecfdf5; --weak: #b45309; --weak-bg: #fffbeb; --miss: #b91c1c; --miss-bg: #fef2f2;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.65; word-break: keep-all; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: -0.02em; }
p { margin: 0 0 .8em; }
.top { border-bottom: 1px solid var(--line); padding: 14px 20px; }
.logo { font-weight: 800; color: var(--ink); text-decoration: none; }
.wrap { max-width: 980px; margin: 0 auto; padding: 32px 20px 60px; }
.wrap.narrow { max-width: 680px; }
.foot { border-top: 1px solid var(--line); padding: 20px; text-align: center; color: var(--mute); font-size: 13px; }

.hero { text-align: center; padding: 40px 0 48px; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.7rem); }
.lead { color: var(--sub); font-size: 1.08rem; margin-bottom: 1.6em; }
.eyebrow { color: var(--brand); font-weight: 700; font-size: .9rem; margin-bottom: .4em; }
.page-title { font-size: 1.6rem; margin-bottom: .2em; }
.muted { color: var(--mute); }
.fine { color: var(--mute); font-size: .85rem; margin-top: .8em; }
.note { background: var(--weak-bg); color: var(--weak); padding: 10px 12px; border-radius: 10px; font-size: .92rem; }
.error { color: var(--miss); }

.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--r); padding: 22px; background: #fff; margin-bottom: 16px; }
.card.soft { background: var(--soft); border-color: transparent; }
.card.center, .center { text-align: center; }
.card h3 { font-size: 1.08rem; }
.card p:last-child { margin-bottom: 0; }
ul.plain { padding-left: 1.1em; margin: 0 0 .6em; }
ol.steps { padding-left: 1.2em; margin: 0 0 1.2em; }
ol.steps li { margin-bottom: .4em; }

.btn { display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: #cbd5e1; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: #1e40af; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-small { padding: 6px 12px; font-size: .9rem; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

.clock { font-size: 3rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: 6px 0 10px; }
.rec-dot { color: var(--miss); font-weight: 700; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.level { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: 0 auto 16px; max-width: 320px; }
.level-bar { height: 100%; width: 0; background: var(--ok); transition: width .08s; }
.pulse { font-size: 2.4rem; animation: blink 1.6s infinite; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; margin: 6px auto 14px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.band { display: inline-block; font-weight: 800; font-size: 1.2rem; background: var(--soft); padding: 6px 12px; border-radius: 10px; }
.summary { font-size: 1.02rem; margin-top: .6em; }
ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
ul.checks li:first-child { border-top: 0; }
ul.checks p { margin: .2em 0 0; color: var(--sub); }
.badge { flex: none; font-size: .8rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; min-width: 68px; text-align: center; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-weak { background: var(--weak-bg); color: var(--weak); }
.badge-miss { background: var(--miss-bg); color: var(--miss); }
.fix { padding: 12px 0; border-top: 1px solid var(--line); }
.fix:first-of-type { border-top: 0; }
.said { text-decoration: line-through; color: var(--mute); margin-bottom: .2em; }
.better-line { font-weight: 600; color: var(--ok); margin-bottom: .2em; }
.why { color: var(--sub); font-size: .92rem; }
.en { font-size: 1.02rem; line-height: 1.75; }
.transcript { color: var(--sub); }
audio { width: 100%; margin-bottom: 10px; }
details summary { cursor: pointer; color: var(--brand); }
.next { background: #eff6ff; border-color: transparent; }

.toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 50; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 10px; font-size: .95rem; }
.toast-error { background: var(--miss); }
.fix .badge { display: inline-block; margin-bottom: 6px; }
ul.exprs { list-style: none; padding: 0; margin: 0; }
ul.exprs li { padding: 12px 0; border-top: 1px solid var(--line); position: relative; padding-right: 44px; }
ul.exprs li:first-child { border-top: 0; }
ul.exprs .phrase { margin-bottom: .2em; }
ul.exprs .example { color: var(--sub); margin: 0; }
ul.exprs .btn { position: absolute; right: 0; top: 12px; }
.top { display: flex; align-items: center; justify-content: space-between; }
.nav { display: flex; gap: 16px; }
.nav a { color: var(--sub); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a[aria-current] { color: var(--brand); }
.saved { color: var(--ok); font-weight: 600; margin: .6em 0 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 8px 0 16px; overflow-x: auto; }
.tab { border: 0; background: none; font: inherit; font-weight: 600; color: var(--mute); padding: 10px 12px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.bar { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.check { font-size: .9rem; color: var(--sub); cursor: pointer; }
.chips { display: flex; gap: 6px; margin: 4px 0 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 12px; font: inherit; font-size: .88rem; cursor: pointer; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.learn { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 2px 10px; font: inherit; font-size: .8rem; color: var(--mute); cursor: pointer; margin-top: 6px; }
.learn.on { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.meta { font-size: .82rem; color: var(--mute); margin: 4px 0 0; }
.btn-icon { border: 0; background: none; color: var(--brand); cursor: pointer; font-size: .85rem; padding: 0 2px; }
ul.weak { list-style: none; padding: 0; margin: 0; }
ul.weak li { padding: 10px 0; border-top: 1px solid var(--line); }
ul.weak li:first-child { border-top: 0; }
.stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--soft); margin: 6px 0 4px; }
.seg.miss { background: #ef4444; } .seg.weak { background: #f59e0b; } .seg.ok { background: #10b981; }
.small { font-size: .85rem; }
ul.log { list-style: none; padding: 0; margin: 0; }
ul.log li { border-top: 1px solid var(--line); }
ul.log li:first-child { border-top: 0; }
ul.log a { display: block; padding: 12px 0; color: var(--ink); text-decoration: none; }
ul.log p { margin: 4px 0 0; color: var(--sub); font-size: .92rem; }
.band-sm { font-weight: 700; color: var(--ink); }

/* 모의고사 */
.exam-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; background: #0f172a; color: #fff; font-weight: 700; }
.exam-bar .btn { background: transparent; color: #cbd5e1; border-color: #334155; }
.clock-sm { font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.clock-sm.late { color: #f87171; }
.orient-head { margin-bottom: 14px; }
.orient-steps { list-style: none; padding: 0; margin: 0 0 10px; display: flex; gap: 6px; flex-wrap: wrap; font-size: .82rem; }
.orient-steps li { padding: 4px 10px; border-radius: 99px; background: var(--soft); color: var(--mute); }
.orient-steps li.on { background: var(--brand); color: #fff; font-weight: 700; }
.orient-steps li.done { color: var(--ok); }
.orient-skip { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.survey-sec { border: 0; border-top: 1px solid var(--line); padding: 14px 0 6px; margin: 0; }
.survey-sec legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.opt { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .95rem; }
.opt:has(input:checked) { border-color: var(--brand); background: #eff6ff; }
.sticky-count { position: sticky; top: 0; background: #fff; padding: 8px 0; margin: 0; z-index: 5; }
.ok-text { color: var(--ok); } .warn-text { color: var(--miss); }
.levels { display: grid; gap: 10px; margin-top: 12px; }
.level-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.level-card.focus { border-color: #bfdbfe; background: #f8fbff; }
.level-card.picked { border-color: var(--brand); box-shadow: 0 0 0 2px #bfdbfe; }
.level-card p { margin: 6px 0 10px; color: var(--sub); }
.tag { display: inline-block; margin-left: 8px; font-size: .75rem; font-weight: 700; color: var(--brand); background: #dbeafe; padding: 2px 8px; border-radius: 99px; }
.row-left { display: flex; gap: 8px; flex-wrap: wrap; }
.q-card { text-align: center; }
.q-label { color: var(--mute); font-size: .85rem; font-weight: 700; margin-bottom: 6px; }
.interviewer { display: flex; justify-content: center; margin: 6px 0 10px; }
.rec-time { font-variant-numeric: tabular-nums; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.choice { display: grid; gap: 4px; padding: 18px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; }
.choice:hover { border-color: var(--brand); background: #eff6ff; }
.choice span { color: var(--mute); font-size: .9rem; }

/* 결과 */
.overall-level { font-size: 2.6rem; font-weight: 800; color: var(--brand); line-height: 1.1; margin: 4px 0 8px; }
.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.area { background: var(--soft); border-radius: 10px; padding: 12px; }
.area strong { display: block; margin-bottom: 4px; }
.area p { margin: 0; color: var(--sub); font-size: .93rem; }
ol.prio { padding-left: 1.2em; margin: 0; }
ol.prio li { margin-bottom: 10px; }
ol.prio p { margin: 2px 0 0; color: var(--sub); }
.progress { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.progress > span { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.qitem { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.qitem > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px; cursor: pointer; color: var(--ink); }
.qitem > summary::-webkit-details-marker { display: none; }
.qitem .qno { font-weight: 800; color: var(--brand); min-width: 32px; }
.qitem .qmeta { flex: 1; }
.qitem .qmeta small { color: var(--mute); }
.qitem .qband { font-weight: 700; font-size: .9rem; }
.qitem .result { padding: 0 12px 4px; }
.qitem .result .card { border-color: var(--line); }
.exam-bar[hidden] { display: none; }
.choices { grid-template-columns: repeat(3, 1fr); }
.choice { padding: 16px 6px; }
.next-gap { background: #eff6ff; border-radius: 10px; padding: 12px; margin-top: 12px; }

/* 학습 자료 */
.lead-sm { color: var(--sub); margin-bottom: 1.2em; }
.toc { background: var(--soft); border-radius: var(--r); padding: 14px 18px; margin-bottom: 16px; font-size: .95rem; }
.toc ol { margin: 6px 0 0; padding-left: 1.2em; columns: 2; column-gap: 24px; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--brand); }
@media (max-width: 560px) { .toc ol { columns: 1; } }
.guide section.card { scroll-margin-top: 12px; }
.guide h2 { font-size: 1.3rem; }
.table-wrap { overflow-x: auto; }
table.cmp, table.pairs { width: 100%; border-collapse: collapse; font-size: .94rem; }
table.cmp th, table.cmp td, table.pairs th, table.pairs td { border-top: 1px solid var(--line); padding: 10px 8px; vertical-align: top; text-align: left; }
table.cmp thead th { border-top: 0; color: var(--mute); font-size: .85rem; }
table.cmp tbody th, table.pairs th { white-space: nowrap; font-weight: 700; color: var(--brand); }
ul.ex { list-style: none; padding: 0; margin: 6px 0 0; }
ul.ex li { padding: 7px 0; border-top: 1px dashed var(--line); }
ul.ex li:first-child { border-top: 0; }
[data-say] { cursor: pointer; }
[data-say]:hover { color: var(--brand); }
[data-say]::after { content: ' 🔈'; font-size: .75em; opacity: .5; }
[data-say].playing { color: var(--brand); }
.en { font-weight: 600; }
.ko { display: block; color: var(--sub); font-size: .9rem; }
.prep { padding: 12px 0; border-top: 1px solid var(--line); }
.prep:first-of-type { border-top: 0; }
.prep h3 { margin-bottom: 4px; }
.p-en { color: var(--brand); }
.p-ko { color: var(--sub); font-weight: 600; font-size: .95rem; }
.prep .pnote { color: var(--sub); font-size: .93rem; margin-bottom: 4px; }
.wr { padding: 10px 0; border-top: 1px solid var(--line); }
.wr:first-of-type { border-top: 0; }
.wr p { margin: 0 0 2px; }
.wr .bad { color: var(--miss); text-decoration: line-through; text-decoration-thickness: 1px; }
.wr .good { color: var(--ok); font-weight: 600; }
.wr .good::before { content: '✓ '; }
.wr .why { color: var(--sub); font-size: .9rem; }
.frame { padding: 10px 0; border-top: 1px solid var(--line); }
.frame:first-of-type { border-top: 0; }
.frame p { margin: 0 0 4px; }
ol.tips { padding-left: 1.3em; margin: 0; }
ol.tips li { margin-bottom: 10px; }
ol.tips p { margin: 2px 0 0; color: var(--sub); }
.guide-list { display: grid; gap: 12px; }
.guide-card { display: block; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.guide-card:hover { border-color: var(--brand); }
.guide-card p { color: var(--sub); margin: 0; }
.cta { margin-top: 24px; }

/* 말하기 훈련 */
.nav { gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 480px) { .top { flex-wrap: wrap; gap: 6px; } .nav { gap: 12px; } .nav a { font-size: .88rem; } }
.drill-card { display: block; text-decoration: none; color: var(--ink); }
.drill-card:hover { border-color: var(--brand); }
.drill-card p { color: var(--sub); }
.weak-list { display: grid; gap: 4px; }
.weak-item { padding: 12px 0; border-top: 1px solid var(--line); }
.weak-item:first-child { border-top: 0; }
.weak-item h3 { margin-bottom: 4px; }
.weak-item p { color: var(--sub); margin-bottom: 6px; }
.ko-big { font-size: 1.5rem; font-weight: 700; margin: 10px 0 18px; line-height: 1.45; }
.koen-fb { text-align: left; }
.verdict { display: inline-block; font-weight: 800; padding: 4px 12px; border-radius: 99px; }
.said-line { color: var(--sub); }
.alts .alt { margin: 2px 0; color: var(--sub); }
.frame-parts { padding-left: 1.3em; margin: 12px 0 16px; }
.frame-parts li { margin-bottom: 8px; }
.frame-parts .starter { margin: 0; color: var(--brand); font-size: .95rem; }
.frame-fb .quote { color: var(--sub); font-weight: 500; margin: 2px 0; }
.shadow-text { font-size: 1.35rem; line-height: 1.6; margin: 8px 0; transition: filter .2s; }
.shadow-text.blur { filter: blur(7px); }
.score { font-size: 2.2rem; font-weight: 800; color: var(--brand); margin: 6px 0; }
.shadow-diff { font-size: 1.15rem; font-weight: 600; }
.shadow-diff .hit { color: var(--ok); }
.shadow-diff .miss { color: var(--miss); text-decoration: underline wavy; }
.nat { padding: 12px 0; border-top: 1px solid var(--line); }
.nat:first-of-type { border-top: 0; }
.nat h3 { margin-bottom: 4px; }
ul.nat-list { list-style: none; padding: 0; margin: 4px 0 0; }
ul.nat-list li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
ul.nat-list li > span:first-child { flex: none; margin-top: 3px; }
.tag-c, .tag-n, .tag-p, .tag-s { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; min-width: 50px; text-align: center; }
.tag-c { background: #ecfdf5; color: #047857; }
.tag-n { background: #eff6ff; color: #1d4ed8; }
.tag-p { background: #f5f3ff; color: #6d28d9; }
.tag-s { background: #fff7ed; color: #c2410c; }
.tags-legend { font-size: .9rem; line-height: 2; }
.tags-legend span { margin-right: 4px; }

/* 복습 카드 · 매일 목표 */
.habit-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; }
.habit-top > div:first-child { flex: 1; }
.habit-num { font-size: 1.1rem; margin: 0; }
.habit-num strong { font-size: 1.7rem; }
.streak { text-align: right; }
.week { display: flex; gap: 6px; margin: 12px 0 6px; }
.wday { flex: 1; text-align: center; }
.wbar { height: 44px; background: var(--soft); border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; }
.wbar span { display: block; width: 100%; background: #93c5fd; }
.wbar span.full { background: var(--brand); }
.wday small { color: var(--mute); font-size: .75rem; }
.big-num { font-size: 1.1rem; margin: 0 0 4px; }
.big-num strong { font-size: 2.4rem; color: var(--brand); }
.decks { display: grid; gap: 8px; margin-bottom: 12px; }
.deck { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; }
.deck:has(input:checked) { border-color: var(--brand); background: #f8fbff; }
.deck p { margin: 2px 0 0; color: var(--sub); }
.deck input { margin-top: 5px; }
.flash { text-align: center; min-height: 320px; }
.flash .front { font-size: 1.45rem; font-weight: 700; line-height: 1.5; margin: 14px 0 6px; }
.flash .wrongline { color: var(--miss); }
.answer { text-align: left; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.answer .back { font-size: 1.25rem; color: var(--ok); }
.said-cmp { background: var(--soft); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.said-cmp p { margin: 0; }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.grade { display: grid; gap: 2px; padding: 10px 4px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: inherit; cursor: pointer; }
.grade span { font-size: .78rem; color: var(--mute); }
.g-again strong { color: var(--miss); } .g-hard strong { color: var(--weak); } .g-good strong { color: var(--ok); } .g-easy strong { color: var(--brand); }
.grade.sug { border-color: var(--brand); box-shadow: 0 0 0 2px #bfdbfe; }
.review-cta { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); background: #eff6ff; border-color: transparent; flex-wrap: wrap; }
.review-cta span { color: var(--brand); font-weight: 600; font-size: .95rem; }
.choices2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.choices2 .choice strong { font-size: 1.3rem; }
.scene { font-size: 1.15rem; font-weight: 600; line-height: 1.6; margin: 12px 0 6px; }
.link-btn { border: 0; background: none; color: var(--brand); font: inherit; font-size: .9rem; cursor: pointer; padding: 0; margin-bottom: 8px; }
.hint { margin: 4px 0 8px; }
.tag-f { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; min-width: 50px; text-align: center; background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
table.nat-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
table.nat-table th { text-align: left; color: var(--mute); font-size: .8rem; font-weight: 600; padding: 4px 8px; }
table.nat-table td { border-top: 1px solid var(--line); padding: 8px; vertical-align: top; }
table.nat-table td:first-child { width: 58%; }
table.nat-table .use { color: var(--sub); font-size: .85rem; }

/* 로그인 · 계정 */
.nav-account { color: var(--brand) !important; }
.nav-account.sync-error::after { content: ' ⚠️'; }
.login-card { max-width: 440px; margin: 16px auto; padding: 28px 24px; }
.login-socials { display: grid; gap: 8px; margin: 18px 0 10px; }
.login-social { text-align: center; }
.login-kakao { background: #fee500; border-color: #fee500; color: #191919; }
.login-agree { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; margin: 8px 0; }
.login-agree input { margin-top: 4px; }
.login-msg { min-height: 1.4em; margin: 8px 0 0; color: #b45309; font-size: .9rem; }
.sync-line { font-size: .92rem; }
.sync-line.synced { color: var(--ok); } .sync-line.error { color: var(--miss); }
details.danger { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
details.danger summary { color: var(--mute); cursor: pointer; font-size: .9rem; }
.legal h2 { font-size: 1.1rem; margin-top: 1.6em; }
.foot a { color: var(--mute); }
