/* 화면별 스타일 */
.page-title { font-size: 30px; 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; }
.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; }

/* ---------------------------------------------------------------- 홈 */
.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, #d9772b 14%, transparent); color: #c4651d; } /* 연속 학습 불꽃은 주황 */
.stat-icon.review { background: color-mix(in srgb, var(--gold-2) 18%, transparent); color: var(--brand-ink); }
.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: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.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; }
.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(--bad); --v-ink: var(--bad); --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; } }

/* ---------------------------------------------------------------- 복습 / 설정 */
.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: linear-gradient(180deg, #e9c477, #b8862f); }
.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(--gold-2); 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; }
.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; }
/* ---------------------------------------------------------------- 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: #2a1a08; 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 개선 */
.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: auto 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: #2a1a08; }
.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: #2a1a08; 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(--gold-2), var(--gold)); color: #2a1a08; }
.blank.empty { min-width: 74px; text-align: center; color: color-mix(in srgb, var(--accent-ink) 55%, transparent); }
/* ---------------------------------------------------------------- 음성 대화 (프리토킹): 가운데 원이 듣기·생각·말하기 상태를 보여 준다 */
.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(--gold-2), var(--gold));
  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(--gold)); }
.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; } }

/* ---------------------------------------------------------------- 대화 화면 */
/* 대화 화면 위쪽 막대: 좁은 화면에서도 한 줄 (자막·턴 표시가 두 줄로 쌓이면 음성 원을 가린다) */
.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; overflow: hidden; text-overflow: ellipsis; }
.today-item > div { display: grid; min-width: 0; }
.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); }
.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); }
/* 마지막으로 학습한 Day */
.deck-tile { position: relative; }
.deck-tile.last {
  border-color: var(--gold); background: linear-gradient(160deg, color-mix(in srgb, var(--gold-2) 22%, var(--surface)), var(--surface) 70%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-2) 30%, transparent), 0 8px 24px -10px var(--glow);
}
.last-badge {
  position: absolute; top: -10px; left: 12px; display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; color: #2a1a08;
  background: linear-gradient(180deg, #f3d792, #c99a45); box-shadow: 0 2px 8px var(--glow);
}
.sense-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sense-ko { font-weight: 700; font-size: 14px; color: var(--brand-ink); margin-bottom: 2px; }
.senses-loading { display: flex; align-items: center; gap: 8px; }
.senses-loading .spinner { width: 16px; height: 16px; border-width: 2px; }
.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); }
.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; }
@media (max-width: 480px) { .rate-row { grid-template-columns: repeat(2, 1fr); } }
/* 카드 학습: 단어장에 추가 · Pass */
.rate-row.two { grid-template-columns: 1fr 1fr; margin-top: 10px; }
.rate-btn.r-add b, .rate-btn.r-pass b { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 16px; }
.rate-btn.r-add b { color: var(--brand-ink); }
.rate-btn.r-add.on { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); background: color-mix(in srgb, var(--gold-2) 12%, var(--surface)); }
.rate-btn.r-pass { background: linear-gradient(180deg, #f3d792, #c99a45); border-color: transparent; color: #2a1a08; }
.rate-btn.r-pass small { color: rgba(42, 26, 8, 0.7); }
/* Day 단어 목록: 단어장에 있는 단어 표시 · 바로 담기 */
.deck-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.mine-filter { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 12px; flex-wrap: wrap; }
.mine-filter .field-chips { margin: 0; }
.mine-hide-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 7px 13px; border-radius: 99px; font-size: 13px; font-weight: 700;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); white-space: nowrap;
}
.mine-hide-btn:hover, .mine-hide-btn.on { border-color: var(--gold); color: var(--brand-ink); }
.deck-word { display: grid; grid-template-columns: minmax(120px, 34%) 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; cursor: default; transition: background 0.25s, border-color 0.25s; }
.deck-word .word { font-size: 17px; }
.deck-word-ko { color: var(--ink-2); transition: filter 0.2s, opacity 0.2s; }
.hide-ko .deck-word-ko { filter: blur(6px); opacity: 0.55; user-select: none; }
.hide-ko .deck-word { cursor: pointer; }
.hide-ko .deck-word.peek .deck-word-ko { filter: none; opacity: 1; }
.deck-word.in-mine { background: color-mix(in srgb, var(--gold-2) 20%, var(--surface)); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.star-btn { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); display: inline-grid; place-items: center; }
.star-btn:hover { border-color: var(--gold); color: var(--gold); }
.star-btn.on { color: var(--gold-2); border-color: var(--gold); background: color-mix(in srgb, var(--gold-2) 14%, var(--surface)); }
.star-btn.on svg path { fill: currentColor; }
@media (max-width: 480px) { .deck-word { grid-template-columns: 1fr auto; } .deck-word-ko { grid-column: 1 / 2; grid-row: 2; } .deck-word .word-tools { grid-row: 1 / 3; grid-column: 2; } }
.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; }
.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) {  .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; }
}

/* ---------------------------------------------------------------- 보카: 난이도 · 학술 전공 */
.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; }
@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; }
}

/* ---------------------------------------------------------------- 보카 객관식 퀴즈 (views/quiz.js) */
.quiz-setup { display: grid; gap: 14px; }
.quiz-setup .chip { justify-self: start; }
.quiz-setting { display: grid; gap: 8px; }
.quiz-setting > b { font-size: 14px; }
.quiz-setting .segmented { flex-wrap: wrap; }
.quiz-card { display: grid; gap: 16px; padding: 22px 20px; }
.quiz-prompt { display: grid; gap: 6px; justify-items: center; text-align: center; }
.quiz-prompt .flash-word { margin-top: 6px; }
.quiz-prompt .flash-example { text-align: left; }
.quiz-prompt .flash-example .en { font-size: 19px; line-height: 1.55; }
.quiz-hint { display: grid; gap: 4px; justify-items: center; }
.quiz-timer { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.quiz-timer i { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: 99px; transition: width 0.1s linear, background 0.2s; }
.quiz-timer.low i { background: var(--bad); }
.quiz-clock { font-variant-numeric: tabular-nums; }
.quiz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quiz-opt {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 12px 14px; text-align: left;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.quiz-opts.n8 .quiz-opt { min-height: 48px; font-size: 15px; padding: 10px 12px; }
.quiz-opt:hover:not(:disabled) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.quiz-opt:active:not(:disabled) { transform: scale(0.98); }
.quiz-opt:disabled { cursor: default; opacity: 0.55; }
.quiz-opt.right { opacity: 1; border-color: var(--ok); background: var(--ok-bg); color: var(--ok-ink); }
.quiz-opt.wrong { opacity: 1; border-color: var(--bad); background: var(--bad-bg); }
.quiz-num {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px;
  background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 800;
}
.quiz-opt.right .quiz-num { background: var(--ok); color: #fff; }
.quiz-opt.wrong .quiz-num { background: var(--bad); color: #fff; }
.quiz-text { min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.quiz-feedback { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); animation: slideup 0.2s ease; }
.quiz-feedback .answer { font-size: 16px; }
.quiz-verdict { display: flex; align-items: center; gap: 6px; font-size: 17px; }
.quiz-verdict.ok { color: var(--ok-ink); }
.quiz-verdict.bad { color: var(--bad); }
.quiz-verdict.warn { color: var(--warn-ink); }
.vocab-quiz .focus-foot:empty { display: none; }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.quiz-missed { width: 100%; text-align: left; }
.quiz-miss-list { display: grid; gap: 6px; max-height: 360px; overflow-y: auto; }
.quiz-miss { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; }
.quiz-miss.mine { cursor: default; }
.quiz-miss input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.quiz-miss .icon-slot { color: var(--warn); flex: none; display: inline-flex; }
.quiz-miss-main { display: grid; min-width: 0; flex: 1; }
.quiz-miss-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiz-added { display: flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ok-ink); }
@media (max-width: 520px) {
  .quiz-opts.n4 { grid-template-columns: minmax(0, 1fr); }
  .quiz-opt { min-height: 50px; }
}

/* ---------------------------------------------------------------- 스피킹 첫 화면: 밤의 학당 테마 */
.home.step-speak { --accent: var(--brand); --accent-ink: var(--brand-ink); --accent-strong: #b8862f; --on-accent: #2a1a08; }
.home .btn-accent { background: linear-gradient(180deg, #f3d792, #c99a45); color: #2a1a08; box-shadow: 0 0 0 1px rgba(255, 235, 180, 0.55) inset, 0 6px 20px var(--glow); border-radius: 999px; padding-inline: 26px; }
.home .resume {
  position: relative; overflow: hidden; padding: 28px 28px; border-radius: 22px;
  border-color: color-mix(in srgb, var(--gold) 40%, var(--line));
  background: radial-gradient(ellipse 80% 120% at 100% 0%, color-mix(in srgb, var(--gold-2) 22%, transparent), transparent 60%),
    color-mix(in srgb, var(--surface) 94%, transparent);
}
.home .resume::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); box-shadow: 0 0 0 18px color-mix(in srgb, var(--gold) 6%, transparent); pointer-events: none;
}
.home .resume h2 { font-size: 26px; }
.home .resume .chip { background: color-mix(in srgb, var(--gold-2) 22%, var(--surface)); color: var(--brand-ink); border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.home .track-tab { border-radius: 18px; border-color: color-mix(in srgb, var(--gold) 20%, var(--line)); background: color-mix(in srgb, var(--surface) 92%, transparent); }
.home .track-tab b { font-family: var(--serif); }
.home .track-tab:hover { border-color: var(--gold); }
.home .track-tab.on { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-2) 22%, transparent); }
.home .track-step { border-radius: 50%; }
.home .chapter-head h2 { font-size: 22px; }
.home .chapter-head .muted.small:first-child { color: var(--brand-ink); letter-spacing: 0.08em; font-weight: 700; }
.home .part-tile {
  border-radius: 18px; padding: 16px; border: 1px solid color-mix(in srgb, var(--gold) 20%, var(--line));
  background: color-mix(in srgb, var(--surface) 92%, transparent); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.home .part-tile:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 12px 28px -16px var(--glow); }
.home .part-tile.current { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-2) 25%, transparent), 0 12px 28px -16px var(--glow); animation: none; }
.home .part-tile.complete { background: linear-gradient(160deg, color-mix(in srgb, var(--gold-2) 12%, var(--surface)), var(--surface) 70%); }
.home .part-no { color: var(--brand-ink); font-family: var(--serif); font-size: 15px; }
.home .part-title { font-family: var(--serif); font-weight: 700; }
.home .now-badge { background: linear-gradient(180deg, #f3d792, #c99a45); color: #2a1a08; font-weight: 800; }
.home .done-badge { background: var(--gold); }
.home .step-dots i { height: 5px; }

/* ---------------------------------------------------------------- 학습 캘린더 */
.calendar-page { --k-vocab: #c99a45; --k-quiz: #8a9a3c; --k-speak: #b5643a; --k-talk: #7a5a9a; } /* 금빛 · 올리브 · 테라코타 · 자두 */
.cal-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cal-nav h2 { font-size: 24px; min-width: 150px; text-align: center; }
.cal-nav .icon-btn { width: 38px; height: 38px; }
.cal-nav .icon-btn:disabled { opacity: 0.35; }
.cal-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
.cal-stat { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.cal-stat > div { display: grid; line-height: 1.25; }
.cal-stat b { font-size: 18px; font-family: var(--serif); }
.cal-stat .stat-icon { width: 34px; height: 34px; border-radius: 50%; color: var(--brand-ink); background: color-mix(in srgb, var(--gold-2) 16%, var(--surface)); }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 14px; }
.cal-wd { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0 6px; }
.cal-wd.sun { color: var(--review-ink); }
.cal-wd.sat { color: var(--speak-ink); }
.cal-cell {
  position: relative; aspect-ratio: 1 / 1; min-height: 58px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: inherit; padding: 6px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  text-align: left; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.cal-cell.empty { border: 0; background: none; }
.cal-cell:not(.empty):not(:disabled):hover { transform: translateY(-2px); border-color: var(--gold); }
.cal-cell.future { opacity: 0.45; }
.cal-notice { margin: -6px 0 12px; }
.cal-cell.lv1 { background: color-mix(in srgb, var(--gold-2) 12%, var(--surface)); }
.cal-cell.lv2 { background: color-mix(in srgb, var(--gold-2) 24%, var(--surface)); }
.cal-cell.lv3 { background: color-mix(in srgb, var(--gold-2) 38%, var(--surface)); }
.cal-cell.lv4 { background: color-mix(in srgb, var(--gold-2) 55%, var(--surface)); border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
.cal-cell.today .cal-day { background: linear-gradient(180deg, #f3d792, #c99a45); color: #2a1a08; }
.cal-cell.on { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-2) 30%, transparent); }
.cal-day { font-size: 13px; font-weight: 700; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; display: inline-grid; place-items: center; }
.cal-marks { display: flex; flex-wrap: wrap; gap: 3px; }
.cal-marks i { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; }
.cal-xp { position: absolute; top: 7px; right: 7px; font-size: 10px; font-weight: 700; color: var(--muted); }
.k-vocab { --k: var(--k-vocab); }
.k-quiz { --k: var(--k-quiz); }
.k-speak { --k: var(--k-speak); }
.k-talk { --k: var(--k-talk); }
.cal-marks i { background: var(--k); }
.cal-detail { display: grid; gap: 14px; position: sticky; top: 16px; }
.cal-detail h2 { font-size: 20px; }
.cal-empty { padding: 18px 0; }
.cal-sec h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 6px; }
.cal-sec-ic { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; background: var(--k); }
.cal-sec ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cal-sec li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--k) 8%, var(--surface)); border-left: 3px solid var(--k); }
.cal-sec li a { text-decoration: none; color: inherit; }
.cal-sec li a:hover b { color: var(--brand-ink); }
.cal-n { font-size: 13px; color: var(--muted); white-space: nowrap; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.cal-tag { display: inline-flex; align-items: center; gap: 5px; }
.cal-tag .icon { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; background: var(--k); }
.cal-heat { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.cal-heat i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); }
.cal-heat i.lv1 { background: color-mix(in srgb, var(--gold-2) 12%, var(--surface)); }
.cal-heat i.lv2 { background: color-mix(in srgb, var(--gold-2) 24%, var(--surface)); }
.cal-heat i.lv3 { background: color-mix(in srgb, var(--gold-2) 38%, var(--surface)); }
.cal-heat i.lv4 { background: color-mix(in srgb, var(--gold-2) 55%, var(--surface)); }
@media (max-width: 900px) {
  .cal-layout { grid-template-columns: 1fr; }
  .cal-detail { position: static; }
  .cal-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
  .cal-grid { gap: 3px; padding: 8px; }
  .cal-cell { min-height: 44px; padding: 3px; border-radius: 9px; }
  .cal-marks i { width: 7px; height: 7px; }
  .cal-marks i .icon { display: none; }
  .cal-xp { display: none; }
  .cal-stats { grid-template-columns: repeat(2, 1fr); }
  .cal-stat:first-child { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- Vocabulary 첫 화면 대시보드 */
.vdash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.vdash-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.vdash > *, .vdash-2 > *, .vtodo-row > * { min-width: 0; } /* 긴 글자가 카드를 화면 밖으로 밀지 않게 */
.vdash-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; }
.vdash-card > * { min-width: 0; }
.vdash-card h2.sub { margin: 0; font-size: 18px; }
.vtodo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vtodo { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; text-decoration: none; color: inherit;
  border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--gold-2) 16%, var(--surface)), var(--surface) 75%);
  transition: transform 0.2s, box-shadow 0.2s; }
.vtodo:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -14px var(--glow); }
.vtodo > div { flex: 1; display: grid; line-height: 1.35; min-width: 0; }
.vtodo b { font-family: var(--serif); font-size: 17px; }
.vtodo .stat-icon { width: 44px; height: 44px; border-radius: 50%; color: #2a1a08; background: linear-gradient(180deg, #f3d792, #c99a45); }
.vtodo.off { opacity: 0.6; background: var(--surface); }
.vtodo.off .stat-icon { background: var(--surface-2); color: var(--muted); }
.vbook { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.vbook:first-of-type { border-top: 0; padding-top: 0; }
.vbar { position: relative; height: 10px; }
.vbar .progress-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.vbar .progress-fill.seen { background: color-mix(in srgb, var(--gold-2) 35%, var(--surface-2)); }
.vup { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; height: 140px; }
.vup-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.vup-n { font-size: 12px; font-weight: 700; color: var(--brand-ink); min-height: 16px; }
.vup-bar { width: 100%; max-width: 30px; border-radius: 8px 8px 4px 4px; background: var(--line); }
.vup-bar.on { background: linear-gradient(180deg, var(--gold-2), var(--gold)); box-shadow: 0 4px 14px -6px var(--glow); }
.vstage-bar { display: flex; height: 16px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.vstage-bar i, .vstage-legend i { display: block; }
.st-learning { background: color-mix(in srgb, var(--gold-2) 40%, var(--surface-2)); }
.st-learned { background: var(--gold-2); }
.st-mastered { background: var(--gold); }
.st-none { background: var(--surface-2); }
.vstage-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vstage-legend li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.vstage-legend li i { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--line); }
.vstage-legend li b { margin-left: auto; font-family: var(--serif); }
.vweak, .vrecent { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.vweak li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.vweak li.in-mine { background: color-mix(in srgb, var(--gold-2) 16%, var(--surface)); border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.vweak li > div { flex: 1; display: grid; min-width: 0; line-height: 1.3; }
.vweak li > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vweak .star-btn { width: 32px; height: 32px; }
.vrank { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--brand-ink); background: color-mix(in srgb, var(--gold-2) 20%, var(--surface)); }
.vrecent li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--gold-2) 10%, var(--surface)); }
.vrecent li b { flex: none; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrecent li span { flex: 1; min-width: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .vdash-2, .vtodo-row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- Speaking 탭 (구조 학습 · 실전 연습) */
.speak-tabs {
  display: inline-flex; gap: 4px; padding: 4px; margin: 4px 0 18px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line)); background: color-mix(in srgb, var(--surface) 90%, transparent);
}
.speak-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 20px; border-radius: 999px; text-decoration: none;
  font-family: var(--serif); font-weight: 700; color: var(--ink-2); transition: background 0.15s, color 0.15s;
}
.speak-tab:hover { color: var(--brand-ink); }
.speak-tab.on { background: linear-gradient(180deg, #f3d792, #c99a45); color: #2a1a08; box-shadow: 0 6px 16px -10px var(--glow); }

/* 실전 연습 (OPIc 형식 인터뷰) */
.opic-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap;
  border-color: color-mix(in srgb, var(--gold) 35%, var(--line));
  background: linear-gradient(150deg, color-mix(in srgb, var(--gold-2) 14%, var(--surface)), var(--surface) 70%); }
.opic-hero b { font-family: var(--serif); font-size: 18px; }
.opic-steps { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.opic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.opic-card {
  display: grid; gap: 6px; align-content: start; text-align: left; cursor: pointer; font: inherit; color: inherit;
  border-radius: 18px; border: 1px solid color-mix(in srgb, var(--gold) 20%, var(--line));
  background: color-mix(in srgb, var(--surface) 92%, transparent); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.opic-card:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 12px 28px -16px var(--glow); }
.opic-card b { font-family: var(--serif); font-size: 16px; }
.opic-card p { margin: 0; }
.opic-card .theme-icon { color: var(--brand-ink); background: color-mix(in srgb, var(--gold-2) 20%, var(--surface)); }
.opic-custom { display: grid; gap: 10px; margin-bottom: 22px; }
.opic-custom b { font-family: var(--serif); }
.opic-custom-row { display: flex; gap: 8px; }
.opic-custom-row .btn { flex: none; }
.opic-custom-row .text-input { flex: 1; min-width: 0; } /* 좁은 폰에서 입력칸 + 버튼이 카드 밖으로 나가지 않게 */
.opic-level, .opic-result .opic-grade { font-family: var(--serif); color: var(--brand-ink); }
.opic-result { display: grid; gap: 4px; justify-items: start; border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); }
.opic-result .opic-grade { font-size: 36px; line-height: 1.1; }
.opic-result p { margin: 0; }
@media (max-width: 600px) {
  .speak-tabs { display: flex; }
  .speak-tab { flex: 1; justify-content: center; padding: 9px 10px; }
  .opic-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .opic-hero .btn { width: 100%; }
}

/* Speaking 홈 */
.vtodo-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vbook-link { text-decoration: none; color: inherit; }
.vbook-link:hover b { color: var(--brand-ink); }
.vup-stack { width: 100%; max-width: 30px; display: flex; flex-direction: column; gap: 2px; border-radius: 8px 8px 4px 4px; overflow: hidden; background: var(--line); }
.vup-stack i, .vup-legend i { display: block; }
.vup-stack .drill, .vup-legend .drill { background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.vup-stack .talk, .vup-legend .talk { background: color-mix(in srgb, var(--gold-2) 45%, var(--surface)); }
.vup-legend { display: flex; gap: 14px; justify-content: center; }
.vup-legend span { display: inline-flex; align-items: center; gap: 6px; }
.vup-legend i { width: 10px; height: 10px; border-radius: 3px; }
.opic-latest { display: grid; justify-items: start; gap: 2px; padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--gold-2) 16%, var(--surface)), var(--surface) 80%); border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line)); }
.opic-latest .opic-grade { font-family: var(--serif); font-size: 34px; line-height: 1.1; color: var(--brand-ink); }
.vrecent li a { flex: none; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: inherit; text-decoration: none; }
.vrecent li a:hover { color: var(--brand-ink); }
@media (max-width: 760px) {
  .vtodo-row.three { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- Study in English (금빛 테마) */
.study-how { display: grid; gap: 12px; margin-bottom: 20px; border-color: color-mix(in srgb, var(--gold) 35%, var(--line));
  background: linear-gradient(150deg, color-mix(in srgb, var(--gold-2) 14%, var(--surface)), var(--surface) 70%); }
.study-how > b { font-family: var(--serif); font-size: 18px; }
.study-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.study-steps li { display: flex; gap: 10px; align-items: flex-start; }
.study-steps li > div { display: grid; gap: 2px; min-width: 0; }
.study-steps li b { font-family: var(--serif); }
.study-step-ic { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #2a1a08; background: linear-gradient(180deg, #f3d792, #c99a45); box-shadow: 0 6px 16px -10px var(--glow); }
.study-page .page-title, .study-page h2.sub, .study-page .theme-head h1 { font-family: var(--serif); }
.study-page .theme-card {
  border-radius: 18px; border: 1px solid color-mix(in srgb, var(--gold) 20%, var(--line));
  background: color-mix(in srgb, var(--surface) 92%, transparent); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.study-page .theme-card:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 12px 28px -16px var(--glow); }
.study-page .theme-card b { font-family: var(--serif); font-size: 17px; }
.study-page .theme-icon { color: var(--brand-ink); background: color-mix(in srgb, var(--gold-2) 22%, var(--surface)); }
.study-page .theme-card .chip, .study-page .topic-row .chip { background: color-mix(in srgb, var(--gold-2) 20%, var(--surface)); color: var(--brand-ink); border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.study-page .topic-row { border-radius: 16px; border-color: color-mix(in srgb, var(--gold) 20%, var(--line)); }
.study-page .topic-row:hover { border-color: var(--gold); box-shadow: 0 10px 24px -16px var(--glow); }
.study-page .card { border-color: color-mix(in srgb, var(--gold) 22%, var(--line)); }
.study-page .seg { background: color-mix(in srgb, var(--gold-2) 14%, var(--surface-2)); }
.study-page .seg-btn.on { color: var(--brand-ink); }
.study-page .dropzone { border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.study-page .btn-accent { background: linear-gradient(180deg, #f3d792, #c99a45); color: #2a1a08; border-color: transparent; box-shadow: 0 8px 20px -12px var(--glow); }
@media (max-width: 760px) {
  .study-steps { grid-template-columns: minmax(0, 1fr); }
}

/* 카드 학습: 뜻별 ★ (이 뜻만 내 단어장에) */
.sense-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sense-head .sense-ko { margin: 0; }
.star-btn.small { width: 30px; height: 30px; flex: none; }

/* 학습하기 카드: 처음엔 단어 · 예문만, 뜻 보기 뒤에 뜻 · 해석 */
.flash:not(.flipped) .reveal-only { display: none !important; }
.flash.flipped .reveal-only { animation: slideup 0.2s ease; }
.flash-meaning { display: grid; gap: 6px; justify-items: center; width: 100%; padding-top: 12px; margin-top: 4px; border-top: 1px dashed var(--line); }
.flash-meaning .flash-ko { margin: 0; }
.flash-examples { width: 100%; }
