/* 화면별 스타일 */
.page-title { font-size: 28px; letter-spacing: -0.02em; margin-bottom: 4px; }
.page-head { margin-bottom: 20px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.sub { font-size: 17px; margin: 22px 0 10px; }
.card .sub:first-child { margin-top: 0; }
.center { text-align: center; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 600; margin-bottom: 14px; }
.empty { text-align: center; padding: 40px 20px; display: grid; gap: 10px; justify-items: center; }
.notice { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-bg); color: var(--ink); padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-top: 18px; }

/* ---------------------------------------------------------------- 온보딩 */
.onboard { min-height: 100vh; display: flex; justify-content: center; }
.onboard-inner { width: 100%; max-width: 520px; padding: 20px 20px 28px; display: flex; flex-direction: column; min-height: 100vh; }
.focus-top-plain { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.onboard-body { flex: 1; display: flex; flex-direction: column; gap: 14px; animation: slideup 0.3s ease; }
.onboard-body h2 { font-size: 24px; letter-spacing: -0.02em; }
.onboard-hero { text-align: center; display: grid; justify-items: center; gap: 12px; margin-bottom: 10px; }
.onboard-hero h1 { font-size: 28px; line-height: 1.3; letter-spacing: -0.03em; }
.brand-mark.big { width: 64px; height: 64px; font-size: 30px; border-radius: 18px; }
.loop-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.loop-row { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.loop-row .tag { min-width: 56px; text-align: center; }
.text-input.big { font-size: 20px; padding: 16px 18px; }
.choice-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-chip { border: 1.5px solid var(--line); background: var(--surface); padding: 10px 16px; border-radius: 99px; font-weight: 600; }
.choice-chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent-ink); }
.choice-list { display: grid; gap: 10px; }
.choice-list.three { grid-template-columns: repeat(3, 1fr); }
.choice { text-align: left; border: 1.5px solid var(--line); background: var(--surface); padding: 14px 16px; border-radius: 14px; font-weight: 600; }
.choice.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.choice-list.three .choice { text-align: center; display: grid; gap: 2px; }
.choice-list.three .choice small { display: block; }

/* ---------------------------------------------------------------- 홈 */
.home-head { margin-bottom: 18px; }
.home-head h1 { font-size: 26px; letter-spacing: -0.02em; }
.resume { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; margin-bottom: 16px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface) 70%); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.resume h2 { font-size: 22px; margin: 8px 0 2px; letter-spacing: -0.02em; }
.resume .chip { background: var(--accent-strong); color: var(--on-accent); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 32px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px; text-decoration: none; }
.stat b { font-size: 17px; }
.stat-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.stat-icon.flame { background: color-mix(in srgb, var(--review) 14%, transparent); color: var(--review); }
.stat-icon.review { background: color-mix(in srgb, var(--shadow) 14%, transparent); color: var(--shadow); }
.week { flex-direction: column; align-items: stretch; gap: 6px; }
.bars { display: flex; justify-content: space-between; align-items: flex-end; height: 62px; gap: 4px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); flex: 1; }
.bar { width: 100%; max-width: 18px; border-radius: 5px; background: var(--line); }
.bar.on { background: var(--speak); }
.chapter { margin-bottom: 34px; }
.chapter-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.chapter-head h2 { font-size: 20px; letter-spacing: -0.02em; }
.part-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.part-tile { display: grid; gap: 6px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); text-decoration: none; transition: transform 0.1s, border-color 0.15s; }
.part-tile:hover { transform: translateY(-2px); border-color: var(--speak); }
.part-tile.current { border-color: var(--speak); box-shadow: 0 0 0 3px color-mix(in srgb, var(--speak) 20%, transparent); }
.part-tile.complete { background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.part-no { font-weight: 800; color: var(--speak-ink); font-size: 13px; }
.part-title { font-weight: 700; font-size: 15px; line-height: 1.35; min-height: 2.7em; }
.step-dots { display: flex; gap: 5px; }
.step-dots i { width: 100%; height: 6px; border-radius: 99px; background: var(--line); }
.step-dots i.on { background: var(--accent); }

@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .resume { flex-direction: column; align-items: stretch; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 12px; gap: 10px; }
  .part-grid { grid-template-columns: 1fr 1fr; }
  .choice-list.three { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- PART 개요 */
.part-head { margin-bottom: 22px; }
.part-head h1 { font-size: 26px; letter-spacing: -0.02em; margin: 4px 0; }
.c-speak { color: var(--speak-ink); }
.path { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; position: relative; }
.path::before { content: ""; position: absolute; left: 21px; top: 24px; bottom: 24px; width: 3px; background: var(--line); border-radius: 3px; }
.path-step { display: flex; align-items: center; gap: 14px; position: relative; }
.path-node { width: 45px; height: 45px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-weight: 800; background: var(--surface); border: 3px solid var(--line); color: var(--muted); z-index: 1; }
.path-step.done .path-node { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.path-step.next .path-node { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-ink); }
.path-card { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; padding: 16px 18px; }
.path-step.next .path-card { border-color: var(--accent); }
.preview h2 { font-size: 18px; margin-bottom: 12px; }
.preview-list { display: grid; gap: 10px; }
.preview-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; }
.preview-line { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; }
.preview-line .listen-btns .icon-btn { width: 34px; height: 34px; }
.spk { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--surface-2); color: var(--ink-2); }
.spk.me { background: var(--accent-strong); color: var(--on-accent); }

/* ---------------------------------------------------------------- 블록 이해 */
.lesson-hero { text-align: center; padding: 14px 0 6px; display: grid; gap: 10px; justify-items: center; }
.lesson-hero h1 { font-size: 26px; letter-spacing: -0.02em; }
.lesson-core { font-size: 18px; font-weight: 600; }
.formula { display: inline-block; padding: 12px 20px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent-ink); font-weight: 800; font-size: 19px; border: 2px dashed color-mix(in srgb, var(--accent) 40%, transparent); }
.lesson-explain { margin: 18px 0 10px; color: var(--ink-2); }
.key-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.key-points li { display: flex; gap: 8px; align-items: flex-start; }
.key-points .icon { color: var(--ok); margin-top: 4px; }
.examples, .mistakes { display: grid; gap: 10px; }
.example { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; }
.example .en { font-weight: 700; font-size: 17px; }
.note { font-size: 13px; color: var(--accent-ink); display: flex; gap: 4px; align-items: center; margin-top: 4px; }
.mistake { padding: 14px 16px; display: grid; gap: 4px; }
.wrong { color: var(--bad); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.right { color: var(--ok-ink); font-weight: 700; }
.sound-tip { margin-top: 18px; background: color-mix(in srgb, var(--shadow) 8%, var(--surface)); display: grid; gap: 6px; }
.sound-tip b { display: flex; gap: 6px; align-items: center; color: var(--shadow); }

/* ---------------------------------------------------------------- 드릴 */
.progress-wrap { flex: 1; display: flex; }
.counter { min-width: 48px; text-align: right; }
.prompt { display: grid; gap: 18px; padding-top: 10px; animation: pop 0.25s ease; }
.guide { font-size: 15px; font-weight: 700; color: var(--accent-ink); }
.dialog { display: grid; gap: 12px; }
.bubble { display: flex; gap: 10px; align-items: flex-start; }
.bubble-text { flex: 1; padding: 14px 16px; border-radius: 4px 18px 18px 18px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 4px; }
.bubble.partner .bubble-text { background: var(--surface-2); border-color: transparent; }
.bubble.partner .listen-btns .icon-btn { width: 36px; height: 36px; }
.bubble.mine .bubble-text { border: 2px solid var(--accent); box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 14%, transparent); padding: 20px; }
.bubble.mine .listen-btns { margin-top: 6px; }
.cloze { font-size: 21px; font-weight: 600; line-height: 1.9; }
.blank { display: inline-block; padding: 0 10px; margin: 0 2px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); font-weight: 800; border-bottom: 3px solid var(--accent); line-height: 1.6; }
.big { font-size: 22px; font-weight: 700; line-height: 1.45; }
.ipa { font-family: "Charis SIL", "Doulos SIL", "Lucida Sans Unicode", "Segoe UI", sans-serif; color: var(--shadow); letter-spacing: 0.01em; }
.skip-link { display: block; margin: 8px auto 0; background: none; border: 0; color: var(--muted); font-size: 13px; text-decoration: underline; }

.sheet { border-radius: 20px; padding: 18px 18px 16px; display: grid; gap: 10px; animation: slideup 0.25s ease; border: 2px solid; background: var(--surface); box-shadow: var(--shadow-2); }
.sheet.v-perfect { border-color: var(--ok); --v: var(--ok); --v-strong: #08875a; --v-ink: var(--ok-ink); --on-v: #fff; background: var(--ok-bg); }
.sheet.v-good { border-color: var(--warn); --v: var(--warn); --v-strong: var(--warn); --v-ink: var(--warn-ink); --on-v: #1a1300; background: var(--warn-bg); }
.sheet.v-retry { border-color: var(--bad); --v: var(--bad); --v-strong: var(--review-strong); --v-ink: var(--review-ink); --on-v: #fff; background: var(--bad-bg); }
.sheet-head { display: flex; align-items: center; gap: 10px; color: var(--v-ink); font-size: 19px; }
.verdict-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--v); color: #fff; display: grid; place-items: center; }
.score { margin-left: auto; font-weight: 800; }
.sheet-row .label, .fb-detail .label { font-size: 12px; font-weight: 700; color: var(--muted); display: block; }
.sheet-row .answer { font-weight: 700; font-size: 17px; }
.said { color: var(--ink-2); }
.corrected { font-weight: 600; }
.feedback { font-size: 15px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; margin-top: 4px; }
.sheet .btn-accent { background: var(--v-strong); color: var(--on-v); box-shadow: 0 3px 0 color-mix(in srgb, var(--v-strong) 70%, #000); }

.finish { display: grid; justify-items: center; text-align: center; gap: 12px; padding-top: 30px; animation: pop 0.3s ease; }
.finish h1 { font-size: 26px; letter-spacing: -0.02em; }
.finish-ring .ring-label { font-size: 34px; }
.missed { text-align: left; width: 100%; }
.missed ul { padding: 0; margin: 10px 0 0; list-style: none; display: grid; gap: 8px; }
.missed li { display: grid; }
.finish-actions { width: 100%; display: grid; gap: 10px; margin-top: 10px; }

/* ---------------------------------------------------------------- 내맛 대화 */
.talk-top-info { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.talk-top-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.briefing { display: grid; gap: 14px; padding-top: 6px; animation: pop 0.3s ease; }
.briefing h1 { font-size: 24px; letter-spacing: -0.02em; }
.scene-art { display: flex; align-items: center; gap: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }
.avatar.big { width: 64px; height: 64px; font-size: 26px; }
.roles { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; padding: 16px 18px; }
.roles dt { font-weight: 800; color: var(--accent-ink); }
.roles dd { margin: 0; }
.mission { display: grid; gap: 6px; background: color-mix(in srgb, var(--talk) 8%, var(--surface)); }
.mission > b { display: flex; align-items: center; gap: 6px; color: var(--accent-ink); }
.targets { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; }
.targets li, .hint-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.targets li p:first-child, .hint-item p:first-child { font-weight: 700; }

.mission-bar { position: sticky; top: 70px; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; background: var(--bg); scrollbar-width: none; }
.target-pill { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1.5px dashed var(--line); }
.target-pill.on { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok-ink); border: 1.5px solid var(--ok); }
.chat-log { display: grid; gap: 14px; padding-bottom: 12px; }
.msg { display: flex; gap: 10px; align-items: flex-start; animation: slideup 0.2s ease; }
.msg.me { justify-content: flex-end; }
.msg-body { max-width: 82%; display: grid; gap: 6px; }
.msg.me .msg-body { justify-items: end; }
.msg-bubble { padding: 12px 15px; border-radius: 4px 18px 18px 18px; background: var(--surface); border: 1px solid var(--line); font-size: 16.5px; display: grid; gap: 6px; }
.msg.me .msg-bubble { border-radius: 18px 4px 18px 18px; background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.msg-tools { display: flex; gap: 6px; align-items: center; }
.msg-tools .icon-btn { width: 34px; height: 34px; }
.small-btn { width: 30px !important; height: 30px !important; vertical-align: middle; }
.ko-trans { border-top: 1px dashed var(--line); padding-top: 6px; }
.typing-dots::after { content: "• • •"; letter-spacing: 2px; color: var(--muted); animation: pulse 1s infinite; }
.fb-slot { display: grid; gap: 6px; justify-items: end; }
.fb-chip { border: 0; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 99px; }
.fb-loading { background: var(--surface-2); color: var(--muted); animation: pulse 1.2s infinite; }
.fb-great { background: var(--ok-bg); color: var(--ok-ink); }
.fb-good { background: var(--warn-bg); color: var(--warn-ink); }
.fb-fix { background: var(--bad-bg); color: var(--bad); }
.fb-detail { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; display: grid; gap: 4px; text-align: left; font-size: 15px; max-width: 100%; }
.hint-panel { display: grid; gap: 8px; background: color-mix(in srgb, var(--talk) 8%, var(--surface)); }
.hint-panel > b { display: flex; gap: 6px; align-items: center; color: var(--accent-ink); }
.talk-tools { display: flex; justify-content: space-between; margin-bottom: 10px; }

.report { display: grid; gap: 14px; padding-top: 8px; animation: pop 0.3s ease; }
.report-head { display: flex; gap: 20px; align-items: center; }
.report-head h1 { font-size: 22px; letter-spacing: -0.02em; }
.report-head .ring-label { font-size: 30px; }
.score-bar { display: grid; grid-template-columns: 72px 1fr 36px; align-items: center; gap: 10px; font-size: 14px; }
.score-bar .progress { height: 10px; }
.score-bar b { text-align: right; }
.report-summary { font-size: 16px; }
.fix { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.fix:last-child { border-bottom: 0; }
.fix-better { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.next-tip { background: color-mix(in srgb, var(--lesson) 8%, var(--surface)); }
@media (max-width: 560px) { .report-head { flex-direction: column; text-align: center; } }

/* ---------------------------------------------------------------- 복습 / 설정 */
.review-list { display: grid; gap: 12px; }
.review-item { display: grid; gap: 8px; }
.review-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.review-item .ko { font-weight: 700; font-size: 17px; }
.review-answer { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.blurred { filter: blur(6px); cursor: pointer; user-select: none; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; }
.switch { appearance: none; width: 48px; height: 28px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; flex-shrink: 0; transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch:checked { background: var(--speak); }
.switch:checked::after { transform: translateX(20px); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.settings .card { margin-bottom: 14px; }
input[type="range"] { accent-color: var(--speak); width: 100%; }

/* ---------------------------------------------------------------- Round 1 개선: 드릴 */
.self-start { justify-self: start; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.prompt-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.bubble.mine { flex-direction: row-reverse; }
.bubble.mine .bubble-text { border-radius: 18px 4px 18px 18px; }
.turn-label { font-size: 12px; font-weight: 800; color: var(--accent-ink); letter-spacing: 0.02em; }
.hint-box { display: flex; align-items: center; gap: 4px; padding: 12px 16px; border-radius: 14px; background: var(--warn-bg); font-size: 18px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink); animation: pop 0.2s ease; }
.hint-box .icon { color: var(--warn); }
.help-row { display: flex; justify-content: center; margin-top: 8px; }
.shadow-text { position: relative; cursor: default; display: grid; gap: 4px; }
.shadow-text .veil-label { display: none; }
.shadow-text.veiled { cursor: pointer; }
.shadow-text.veiled > p { filter: blur(8px); user-select: none; }
.shadow-text.veiled .veil-label { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; gap: 4px; font-weight: 700; color: var(--accent-ink); font-size: 14px; }
.chip-btn { border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 700; }
.chip-btn.on { border-color: var(--accent); color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
.badge.ok { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok-ink); }
.badge.no { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.answer-block { display: grid; gap: 6px; border-top: 1px dashed color-mix(in srgb, var(--v) 40%, transparent); padding-top: 10px; }

/* ---------------------------------------------------------------- Round 1 개선: 대화 */
.type-row.show { display: flex; }
.tool-group { display: flex; gap: 8px; flex-wrap: wrap; }
.talk-tools { align-items: center; gap: 8px; }
.system-note { text-align: center; font-size: 14px; font-weight: 700; color: var(--ok-ink); background: var(--ok-bg); border-radius: 12px; padding: 10px 14px; animation: pop 0.25s ease; }
.fb-detail .label { display: inline-block; margin-right: 6px; }
.practice { display: grid; gap: 6px; margin-top: 4px; justify-items: start; }
.practice-out { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; }
.practice-out .diff { font-size: 15px; margin: 0; }
.howto-panel .type-row { margin: 4px 0; }
.howto-result { display: grid; gap: 8px; }
.said-before { color: var(--bad); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 45%, transparent); }

/* ---------------------------------------------------------------- Round 1 개선: 홈 / 온보딩 */
details.chapter > summary { list-style: none; cursor: pointer; border-radius: 14px; padding: 6px 4px; }
details.chapter > summary::-webkit-details-marker { display: none; }
details.chapter > summary:hover { background: var(--surface-2); }
.chapter-meta { display: flex; align-items: center; gap: 8px; }
.chev { color: var(--muted); transition: transform 0.2s; }
details.chapter[open] .chev { transform: rotate(90deg); }
details.chapter:not([open]) { margin-bottom: 14px; }
.part-no { display: flex; align-items: center; gap: 6px; }
.now-badge { background: var(--speak-strong); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 99px; }
.done-badge { background: var(--ok); color: #fff; border-radius: 50%; width: 16px; height: 16px; display: inline-grid; place-items: center; }
.part-tile.current { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--speak) 12%, transparent); } }
.field-error { color: var(--bad); font-size: 14px; font-weight: 600; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sheet { --v-ink: var(--v); } }
:root[data-theme="dark"] .sheet { --v-ink: var(--v); }

/* ---------------------------------------------------------------- Round 2 개선 */
.karaoke .kw { border-radius: 6px; transition: background 0.12s, color 0.12s; padding: 0 1px; }
.karaoke .kw.on { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-ink); }
.karaoke .kw.past { color: var(--accent-ink); }
.sheet-actions { grid-template-columns: auto 1fr; }
.sheet-actions .btn { white-space: nowrap; }
.chapter-meta .chip { white-space: nowrap; }
.mission-bar { flex-wrap: wrap; align-items: center; }
.mission-count { font-size: 13px; font-weight: 800; color: var(--accent-ink); white-space: nowrap; }
.talk-tools .btn { white-space: nowrap; }
@media (max-width: 560px) {
  .tool-label-long { display: none; }
  .mission-bar { flex-wrap: nowrap; }
  .talk-tools { margin-bottom: 8px; }
  .talk-tools .btn-sm { padding: 7px 11px; font-size: 13px; }
}
.no-captions .msg.ai .msg-bubble > p:first-child:not(.revealed) { filter: blur(6px); cursor: pointer; user-select: none; }
.cc-btn.on { border-color: var(--accent); color: var(--accent-ink); }
.takeaway { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); display: grid; gap: 8px; }
.takeaway .label { font-size: 12px; font-weight: 800; color: var(--accent-ink); }
.mission-result { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.mission-result li { display: flex; gap: 8px; align-items: center; }
.mission-result li.on { color: var(--ok-ink); font-weight: 700; }
.mission-result li:not(.on) { color: var(--muted); }
.mark-del { text-decoration: underline wavy var(--bad); text-underline-offset: 5px; color: var(--bad); font-weight: 700; }
.mastery { display: grid; gap: 10px; }
.mastery-row { display: grid; grid-template-columns: 64px 1fr 44px; gap: 10px; align-items: center; font-size: 14px; }
.mastery-row .progress { height: 10px; }
.ladder { display: inline-flex; gap: 3px; }
.ladder i { width: 10px; height: 10px; border-radius: 3px; background: var(--line); }
.ladder i.on { background: var(--accent); }
.mastery-wrap { margin-bottom: 28px; }

/* ---------------------------------------------------------------- Round 3 개선 */
.mic-test { display: grid; gap: 8px; }
.level { flex: 1; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin-left: 12px; }
.level-fill { height: 100%; width: 0; background: var(--ok); transition: width 0.08s linear; }
.history-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; text-decoration: none; padding: 10px 4px; border-top: 1px solid var(--line); }
.history-row:hover b { color: var(--speak-ink); }
.transcript summary { cursor: pointer; list-style: none; }
.transcript summary::-webkit-details-marker { display: none; }
.transcript .chat-log { margin-top: 14px; }

/* ---------------------------------------------------------------- 커리큘럼 트랙 (기본 · 심화 · 자유) */
.track-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 8px; }
.track-tab { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); text-decoration: none; }
.track-tab b { display: block; font-size: 17px; }
.track-tab:hover { border-color: var(--ink-2); }
.track-tab { cursor: pointer; text-align: left; color: inherit; font: inherit; }
.track-tab.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.track-step { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); color: var(--ink-2); flex-shrink: 0; }
.track-tab.on .track-step { background: var(--accent-strong); color: var(--on-accent); }
.track-desc { margin: 0 0 18px; font-size: 14px; }
.part-sub { line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.block-exprs { color: var(--ink-2); font-weight: 600; font-size: 15px; }
@media (max-width: 560px) {
  .track-tabs { gap: 6px; }
  .track-tab { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px; }
}

/* ---------------------------------------------------------------- 자유: 프리토킹 */
.row-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.news-hero { display: grid; gap: 14px; margin-bottom: 8px; background: linear-gradient(120deg, color-mix(in srgb, var(--free) 12%, var(--surface)), var(--surface) 75%); border-color: color-mix(in srgb, var(--free) 30%, var(--line)); }
.news-hero h2 { font-size: 21px; margin: 8px 0 2px; letter-spacing: -0.02em; }
.news-hero .chip { background: var(--free-strong); color: #fff; }
.news-top { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.news-top a { text-decoration: none; font-weight: 600; }
.news-top a:hover { color: var(--free-ink); }
.cat { display: inline-block; font-size: 12px; font-weight: 800; color: var(--free-ink); margin-right: 8px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.theme-card { display: grid; gap: 6px; align-content: start; text-decoration: none; transition: transform 0.1s, border-color 0.15s; }
.theme-card:hover { transform: translateY(-2px); border-color: var(--free); }
.theme-card .chip { justify-self: start; }
.theme-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--free) 14%, var(--surface)); color: var(--free-ink); }
.theme-icon.small { width: 32px; height: 32px; border-radius: 10px; }
.theme-icon.big { width: 56px; height: 56px; border-radius: 16px; }
.theme-head { display: flex; gap: 14px; align-items: center; }
.topic-list { display: grid; gap: 8px; }
.topic-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.topic-row:hover { border-color: var(--free); }
.recent-topics { margin-top: 26px; }

.news-list { display: grid; gap: 14px; }
.issue { display: grid; gap: 8px; }
.issue h2 { font-size: 19px; line-height: 1.35; letter-spacing: -0.01em; }
.issue-meta { display: flex; align-items: center; gap: 8px; }
.rank { width: 28px; height: 28px; border-radius: 50%; background: var(--free-strong); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.importance { display: inline-flex; gap: 3px; margin-left: auto; }
.importance i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.importance i.on { background: var(--free); }
.issue-summary { font-size: 16px; }
.issue-ko { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.issue-q summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--free-ink); }
.issue-foot { border-top: 1px solid var(--line); padding-top: 10px; flex-wrap: wrap; }
.issue-foot .btn { white-space: nowrap; margin-left: auto; }
.sources a { color: var(--ink-2); }
.vocab-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vocab-chip { display: inline-flex; gap: 6px; align-items: baseline; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 11px; font-weight: 700; font-size: 14px; }
.vocab-chip small { color: var(--muted); font-weight: 500; }
.vocab-chip:hover { border-color: var(--free); }
.q-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.q-list li { display: flex; gap: 10px; align-items: flex-start; }
.stage { flex-shrink: 0; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; margin-top: 3px; }
.stage-warmup { background: var(--ok-bg); color: var(--ok-ink); }
.stage-core { background: color-mix(in srgb, var(--free) 14%, var(--surface)); color: var(--free-ink); }
.stage-deep { background: var(--warn-bg); color: var(--warn-ink); }

.create-topic > b { font-size: 17px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; justify-self: start; }
.seg-btn { border: 0; background: none; padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.seg-btn.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.dropzone { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; border: 2px dashed var(--line); border-radius: 16px; cursor: pointer; text-align: center; color: var(--ink-2); }
.dropzone:hover, .dropzone.over { border-color: var(--free); background: color-mix(in srgb, var(--free) 6%, var(--surface)); }
.dropzone.has-file { border-style: solid; border-color: var(--free); }
.dropzone.has-file .muted { color: var(--free-ink); font-weight: 700; }
textarea.text-input { resize: vertical; line-height: 1.5; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.quick .choice-chip { padding: 7px 13px; font-size: 14px; }
.spinner.inline { width: 18px; height: 18px; border-width: 3px; border-top-color: #fff; display: inline-block; vertical-align: middle; }

.topic-page header { display: grid; gap: 4px; }
.vocab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.vocab-item { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.vocab-item:hover { border-color: var(--free); }
.block-links { display: grid; gap: 8px; }
.block-link { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; background: color-mix(in srgb, var(--speak) 6%, var(--surface)); }
.block-link:hover { border-color: var(--speak); }
.notes-panel p { font-size: 15px; }
.step-free .avatar { background: linear-gradient(135deg, var(--free), var(--lesson)); }
.blank.empty { min-width: 74px; text-align: center; color: color-mix(in srgb, var(--accent-ink) 55%, transparent); }
.cloze-hint { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; color: var(--warn-ink); background: var(--warn-bg); border-radius: 99px; padding: 3px 12px; justify-self: start; }

/* ---------------------------------------------------------------- 음성 대화 (프리토킹): 가운데 원이 듣기·생각·말하기 상태를 보여 준다 */
.voice-stage { position: sticky; top: 62px; z-index: 6; display: grid; justify-items: center; gap: 2px; padding: 6px 0 12px; background: var(--bg); text-align: center; }
.voice-stage ~ .mission-bar { position: static; }
.voice-orb { --level: 0; position: relative; width: 96px; height: 96px; display: grid; place-items: center; margin-bottom: 4px; }
.orb-core {
  position: relative; z-index: 1; width: 72px; height: 72px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.55) 0, transparent 42%), linear-gradient(135deg, var(--free), var(--speak));
  box-shadow: 0 8px 28px color-mix(in srgb, var(--free) 38%, transparent); transition: transform 0.12s linear, background 0.3s;
}
.orb-ring { position: absolute; inset: 12px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--free) 50%, transparent); opacity: 0; }
.voice-orb[data-state="idle"] .orb-core { animation: orb-breathe 3.2s ease-in-out infinite; }
.voice-orb[data-state="listening"] .orb-core { transform: scale(calc(1 + var(--level) * 0.35)); background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.5) 0, transparent 42%), linear-gradient(135deg, var(--bad), var(--speak)); }
.voice-orb[data-state="listening"] .orb-ring { border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.voice-orb[data-state="thinking"] .orb-core { animation: orb-think 1.1s ease-in-out infinite; }
.voice-orb[data-state="speaking"] .orb-core { animation: orb-speak 0.9s ease-in-out infinite; }
.voice-orb:is([data-state="listening"], [data-state="speaking"]) .orb-ring { animation: orb-ripple 1.6s ease-out infinite; }
.voice-orb .orb-ring.r2 { animation-delay: 0.55s; }
@keyframes orb-breathe { 50% { transform: scale(1.05); } }
@keyframes orb-speak { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.13); } 60% { transform: scale(0.97); } }
@keyframes orb-think { 50% { transform: scale(0.88); filter: saturate(0.6); } }
@keyframes orb-ripple { from { transform: scale(1); opacity: 0.8; } to { transform: scale(1.7); opacity: 0; } }
.orb-name { font-size: 15px; }
.orb-status { font-size: 13px; color: var(--muted); font-weight: 600; }
.orb-caption {
  max-width: 560px; margin-top: 4px; font-size: 17px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.orb-caption:empty { display: none; }
@media (max-width: 560px) {
  .voice-stage { top: 56px; padding-bottom: 8px; }
  .voice-orb { width: 78px; height: 78px; }
  .orb-core { width: 58px; height: 58px; }
  .orb-caption { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .voice-orb * { animation: none !important; } }

/* ---------------------------------------------------------------- 학습 원리 (교육학 연구) */
.research { display: grid; gap: 16px; }
.research-head { display: grid; gap: 8px; max-width: 660px; }
.research-head .chip { justify-self: start; }
.research h2 { font-size: clamp(22px, 4vw, 28px); letter-spacing: -0.02em; line-height: 1.3; }
.study-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.study { display: grid; gap: 6px; align-content: start; }
.study-tag { justify-self: start; font-size: 12px; font-weight: 800; color: var(--free-ink); background: color-mix(in srgb, var(--free) 12%, var(--surface)); padding: 3px 9px; border-radius: 99px; }
.study-cite { font-size: 12px; color: var(--muted); font-style: italic; }
.applied { display: grid; gap: 12px; }
.applied h3 { font-size: 17px; }
.applied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.applied li { display: flex; gap: 12px; align-items: flex-start; }
.applied .stat-icon { width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--speak) 14%, var(--surface)); color: var(--speak-ink); }
.why-page { display: grid; gap: 18px; }
.refs ul { display: grid; gap: 6px; padding-left: 18px; margin: 10px 0 0; }
.why-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; margin-bottom: 16px; }
.why-card > div { flex: 1; }
.why-card .stat-icon { width: 40px; height: 40px; background: color-mix(in srgb, var(--free) 14%, var(--surface)); color: var(--free-ink); }
/* 대화 화면 위쪽 막대: 좁은 화면에서도 한 줄 (자막·턴 표시가 두 줄로 쌓이면 음성 원을 가린다) */
.talk-top-info .tool-group { flex-wrap: nowrap; flex-shrink: 0; }
.voice-stage { top: var(--top-h, 62px); }
/* 아래 도구 줄이 대화 글자 위에 겹쳐 보이지 않게 배경을 채운다 */
.talk .focus-foot { background: linear-gradient(to top, var(--bg) calc(100% - 14px), transparent); }

/* ---------------------------------------------------------------- 오늘 요약 막대 (모든 학습 메뉴 위) */
.today-strip { display: grid; grid-template-columns: repeat(3, 1fr) 1.2fr; gap: 10px; margin: 4px 0 22px; }
.today-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; min-width: 0; }
.today-item > div { display: grid; line-height: 1.3; min-width: 0; }
.today-item b { font-size: 15px; white-space: nowrap; }
.today-item .stat-icon { width: 40px; height: 40px; border-radius: 12px; }
.today-item.week { flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 14px; }
.today-item.week .bars { height: 40px; display: flex; }
.today-item.week > p { display: block; }
.c-brand { color: var(--accent); display: inline-flex; }
@media (max-width: 820px) {
  .today-strip { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .today-item.week { display: none; }
  .today-item { padding: 10px; gap: 8px; }
}
@media (max-width: 560px) {
  .today-item { flex-direction: column; align-items: flex-start; }
  .today-item b { font-size: 14px; }
  .today-item .stat-icon, .today-item .ring { width: 32px !important; height: 32px !important; }
}

/* ---------------------------------------------------------------- 화면 모드 선택 */
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--surface-2); align-self: flex-start; }
.segmented .seg { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 8px 14px; border-radius: 10px; font-weight: 700; color: var(--ink-2); }
.segmented .seg.on { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-1); }

/* ---------------------------------------------------------------- 보카 */
.vocab-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, color-mix(in srgb, var(--vocab) 14%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--vocab) 35%, var(--line)); margin-bottom: 14px; }
.vocab-hero h2 { font-size: 22px; margin: 8px 0 2px; letter-spacing: -0.02em; }
.vocab-hero .chip { background: var(--accent-strong); color: var(--on-accent); }
.vocab-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.vocab-stat { display: grid; gap: 2px; padding: 14px 16px; }
.vocab-stat b { font-size: 24px; letter-spacing: -0.02em; color: var(--accent-ink); }
.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 24px; }
.deck-tile { display: grid; gap: 8px; text-decoration: none; color: inherit; padding: 16px; }
.deck-tile:hover { border-color: var(--accent); }
.deck-tile.current { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.deck-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-progress { display: flex; align-items: center; gap: 8px; }
.deck-progress .progress { height: 8px; }
.deck-progress .progress { position: relative; }
.deck-progress .progress-fill { background: var(--accent); position: absolute; inset: 0 auto 0 0; }
.deck-progress .progress-fill.seen { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.mine-card h2 { display: flex; align-items: center; gap: 6px; }
.stack-sm { display: grid; gap: 6px; }
.type-row.show { display: flex; }
.add-word .btn { white-space: nowrap; }
.add-word .spinner-wrap { padding: 0; }
.add-word .spinner { width: 18px; height: 18px; border-width: 3px; }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink); }

.word-list { display: grid; gap: 8px; margin-top: 14px; }
.word-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px; }
.word-main { display: grid; gap: 4px; min-width: 0; }
.word-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.word-line .word { font-size: 18px; }
.word-line .chip { font-size: 11px; padding: 2px 8px; }
.pos { font-size: 12px; color: var(--muted); font-style: italic; }
.word-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
mark.hl { background: color-mix(in srgb, var(--lime) 55%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; font-weight: 700; }
.blank-slot { display: inline-block; min-width: 4.5em; border-bottom: 2px solid var(--accent); color: transparent; margin: 0 2px; line-height: 1.1; }

.flash { display: grid; gap: 14px; padding: 28px 24px; text-align: center; cursor: pointer; min-height: 300px; align-content: start; }
.flash.flipped { cursor: default; }
.flash-front { display: grid; gap: 8px; justify-items: center; }
.flash-front .row-between { width: 100%; }
.flash-word { font-size: clamp(34px, 7vw, 48px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin-top: 18px; }
.flash-back { display: grid; gap: 10px; justify-items: center; padding-top: 16px; border-top: 1px dashed var(--line); animation: slideup 0.2s ease; }
.flash-ko { font-size: 24px; font-weight: 800; color: var(--accent-ink); }
.flash-example { display: grid; gap: 4px; width: 100%; text-align: left; background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.flash-example .en { font-size: 17px; }
.rate-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rate-btn.r-easy b { color: var(--ok-ink); }
.srs-note { display: flex; gap: 6px; align-items: flex-start; margin: 2px 0 14px; }
@media (max-width: 480px) { .rate-row { grid-template-columns: repeat(2, 1fr); } }
.rate-btn { display: grid; gap: 2px; padding: 12px 8px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); }
.rate-btn small { font-size: 12px; color: var(--muted); font-weight: 600; }
.rate-btn.r-again b { color: var(--review-ink); }
.rate-btn.r-hard b { color: var(--warn-ink); }
.rate-btn.r-good { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.rate-btn.r-good small { color: color-mix(in srgb, var(--on-accent) 80%, transparent); }
.quiz { display: grid; gap: 12px; padding: 24px; }
.quiz .flash-ko { text-align: center; font-size: 26px; }
.quiz > .muted { text-align: center; }
.vocab-session .sheet .answer { font-size: 22px; }

/* Study in English 주제 어휘 → 내 단어장 담기 */
.vocab-chip-wrap, .vocab-item-wrap { display: inline-flex; align-items: center; gap: 2px; }
.vocab-item-wrap { display: flex; align-items: stretch; }
.vocab-item-wrap .vocab-item { flex: 1; }
.save-word { width: 32px; height: 32px; color: var(--accent-ink); }
.save-word:disabled { opacity: 1; color: var(--ok-ink); }

@media (max-width: 560px) {
  .vocab-stats { gap: 6px; }
  .vocab-stat { padding: 10px 12px; }
  .vocab-stat b { font-size: 20px; }
  .flash { padding: 22px 16px; min-height: 260px; }
  .word-row { padding: 12px; }
}
/* 좁은 화면: 단어 담기 입력이 카드 밖으로 밀리지 않게, 수준 탭은 한 줄에 */
.stack-sm { grid-template-columns: minmax(0, 1fr); }
.add-word { min-width: 0; }
@media (max-width: 560px) {
  .track-tabs { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .track-tab b { font-size: 15px; }
}

/* ---------------------------------------------------------------- 보카: 난이도 · 학술 전공 */
.vocab-section { margin: 26px 0 8px; }
.section-head { align-items: flex-end; margin-bottom: 12px; gap: 12px; }
.section-head .sub { margin: 0 0 2px; display: flex; align-items: center; gap: 6px; }
.level-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.level-btn { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: inherit; }
.level-btn b { font-size: 16px; }
.level-btn:hover { border-color: var(--ink-2); }
.level-btn.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.level-dots { display: flex; gap: 3px; }
.level-dots i { width: 14px; height: 5px; border-radius: 3px; background: var(--line); }
.level-dots i.on { background: var(--accent); }
.field-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.field-chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 99px; padding: 7px 14px; font-weight: 700; font-size: 14px; }
.field-chip small { color: var(--accent-ink); font-weight: 800; }
.field-chip:hover { border-color: var(--accent); }
.field-chip.on { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.field-chip.on small { color: inherit; }
.field-desc { margin: 0 0 12px; }
.book-desc { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.book-desc .field-desc { margin: 0; }
.vocab-section .vocab-hero { margin: 4px 0 14px; }
/* 보카 첫 화면 맨 아래: 기본 단어장(난이도별 · 학술 용어)으로 */
.more-decks { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; text-decoration: none; color: inherit; }
.more-decks p { margin: 2px 0 0; }
.book-decks .deck-grid { margin-bottom: 10px; }
.book-all { margin-bottom: 22px; }
.more-decks:hover { border-color: var(--accent); }
.cefr { font-size: 11px; font-weight: 800; color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 6px; padding: 1px 6px; }
.finder-row { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: start; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.finder-level { font-weight: 800; font-size: 13px; color: var(--ink-2); padding-top: 6px; }
.finder-words { display: flex; flex-wrap: wrap; gap: 6px; }
.finder-words .choice-chip { padding: 5px 11px; font-size: 14px; }
.finder-result { margin-top: 6px; font-size: 15px; }
@media (max-width: 720px) {
  .level-picker { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .level-btn { padding: 10px 8px; }
  .level-btn .muted { font-size: 11px; }
  .level-dots i { width: 8px; }
}
@media (max-width: 560px) {
  .section-head { flex-direction: column; align-items: flex-start; }
  .finder-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* 주제 타일은 두 줄로 (세로로 길어지지 않게) */
  .deck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .deck-tile { padding: 12px; gap: 6px; }
  .deck-tile b { font-size: 14px; }
  .deck-progress .small { font-size: 11px; }
}
