:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #17231d;
  --muted: #65736c;
  --paper: #f4f6f2;
  --surface: #ffffff;
  --line: #dbe2dc;
  --forest: #17392a;
  --green: #2b7551;
  --lime: #dcea72;
  --coral: #df725d;
  --blue: #3f6d84;
  --yellow: #d5a942;
  --shadow: 0 10px 28px rgba(24, 54, 41, 0.08);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.52; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 34px; line-height: 1.15; letter-spacing: 0; }
h2 { margin-bottom: 16px; font-size: 20px; line-height: 1.25; letter-spacing: 0; }
h3 { margin-bottom: 8px; font-size: 16px; line-height: 1.3; letter-spacing: 0; }
p { line-height: 1.55; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.eyebrow { margin-bottom: 6px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
.page-copy { max-width: 620px; margin-bottom: 24px; color: var(--muted); }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); }
.login-brand { position: relative; display: flex; min-height: 100vh; padding: 64px; overflow: hidden; background: var(--forest); color: #fff; }
.login-brand::after { content: ""; position: absolute; inset: auto 7% 9% 43%; height: 38%; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); transform: rotate(-5deg); }
.brand-copy { position: relative; z-index: 1; align-self: flex-end; max-width: 650px; }
.brand-mark { display: inline-grid; place-items: center; width: 54px; height: 54px; margin-bottom: 34px; border: 1px solid rgba(255,255,255,.36); background: var(--lime); color: var(--forest); font-size: 25px; font-weight: 900; }
.brand-copy h1 { max-width: 590px; font-size: 68px; line-height: 1.02; }
.brand-copy p { max-width: 520px; margin: 24px 0 0; color: #cddbd2; font-size: 17px; }
.login-panel { display: grid; place-items: center; min-height: 100vh; padding: 36px; background: var(--surface); }
.login-form { width: min(100%, 390px); }
.login-form h2 { font-size: 28px; }
.login-note { margin-top: 20px; padding: 14px 16px; border-left: 3px solid var(--lime); background: #f1f5e6; color: #506057; font-size: 13px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: 242px; padding: 24px 16px; background: var(--forest); color: #fff; }
.logo { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; font-size: 19px; font-weight: 850; }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--lime); color: var(--forest); font-size: 16px; }
.nav-list { display: grid; gap: 6px; }
.nav-item { display: flex; align-items: center; min-height: 46px; gap: 12px; padding: 0 13px; border: 0; background: transparent; color: #b9c9c0; text-align: left; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.09); color: #fff; }
.nav-symbol { width: 22px; color: var(--lime); font-weight: 850; text-align: center; }
.sidebar-foot { position: absolute; inset: auto 16px 22px; }
.sidebar-foot button { width: 100%; }
.main { min-height: 100vh; margin-left: 242px; padding: 42px clamp(24px, 5vw, 74px) 72px; }
.page { max-width: 1120px; margin: 0 auto; }
.page-header { margin-bottom: 28px; }
.mobile-top { display: none; }

.btn { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid transparent; border-radius: 6px; background: var(--forest); color: #fff; font-weight: 750; }
.btn:hover:not(:disabled) { background: #214b38; }
.btn-secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-secondary:hover:not(:disabled) { background: #edf1ed; }
.btn-ghost { background: transparent; color: inherit; }
.btn-ghost:hover:not(:disabled) { background: rgba(100,120,108,.1); }
.btn-danger { background: var(--coral); }
.btn-lime { background: var(--lime); color: var(--forest); }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font-weight: 850; }

.field { display: grid; gap: 7px; }
.field label, .label { color: #44524b; font-size: 13px; font-weight: 750; }
.input, .textarea, .select { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #cbd4cd; border-radius: 6px; outline: none; background: var(--surface); color: var(--ink); }
.textarea { min-height: 180px; resize: vertical; line-height: 1.55; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(43,117,81,.12); }
.field-error { color: #a43f31; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.segmented { display: inline-grid; width: fit-content; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid var(--line); background: #edf1ed; }
.segmented-three { grid-template-columns: repeat(3, 1fr); }
.segment { min-height: 40px; padding: 0 18px; border: 0; background: transparent; color: var(--muted); font-weight: 780; }
.segment.active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(19,37,29,.08); }
.mode-panel[hidden] { display: none; }
.file-box { display: grid; min-height: 156px; place-items: center; align-content: center; gap: 8px; padding: 24px; border: 1px dashed #9caf9f; background: #f8faf7; color: var(--muted); text-align: center; cursor: pointer; }
.file-box strong { color: var(--green); font-size: 17px; }
.url-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.web-preview { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.web-preview[hidden] { display: none; }
.web-preview .spread > div { display: grid; gap: 3px; }
.web-preview .textarea { min-height: 260px; }
.consent-row { display: flex; min-height: 48px; align-items: center; gap: 10px; margin-top: 12px; padding: 12px; border-left: 3px solid var(--yellow); background: #fbf3df; font-size: 13px; }
.consent-row input { width: 20px; height: 20px; accent-color: var(--green); }

.panel { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.panel-body { padding: 22px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.stat { min-height: 126px; padding: 19px; border: 1px solid var(--line); background: var(--surface); }
.stat-accent { background: var(--forest); color: #fff; }
.stat-accent .stat-label { color: #bcd0c4; }
.stat-number { margin-top: 14px; font-size: 34px; font-weight: 850; line-height: 1; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.quick-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.access-strip { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 15px 18px; border: 1px solid var(--line); background: var(--surface); }
.access-strip div { display: grid; gap: 4px; }
.access-strip strong, .access-value strong { overflow-wrap: anywhere; }
.access-value { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.review-cta { display: flex; min-height: 230px; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 28px; background: var(--lime); color: var(--forest); }
.review-cta h2 { max-width: 440px; font-size: 28px; }
.steps { display: grid; gap: 1px; overflow: hidden; background: var(--line); }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 17px; background: var(--surface); }
.step-num { display: grid; place-items: center; width: 28px; height: 28px; background: var(--forest); color: #fff; font-size: 12px; font-weight: 800; }
.step p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

.toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.search { flex: 1; max-width: 440px; }
.list { display: grid; gap: 10px; }
.list-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; min-height: 82px; padding: 16px 18px; border: 1px solid var(--line); background: var(--surface); }
.list-item:hover { border-color: #9eb0a4; }
.material-list-item { padding: 0; }
.material-list-link { min-width: 0; padding: 16px 18px; }
.material-list-actions { display: flex; align-items: center; gap: 10px; padding-right: 14px; }
.material-list-actions .icon-btn { width: 40px; height: 40px; color: #923f32; font-size: 22px; }
.list-title { margin-bottom: 5px; font-size: 16px; font-weight: 790; }
.list-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 12px; }
.badge { display: inline-flex; min-height: 26px; align-items: center; padding: 0 9px; border-radius: 999px; background: #edf1ed; color: #4d5e54; font-size: 11px; font-weight: 800; }
.badge-green { background: #e2f0e7; color: #216843; }
.badge-yellow { background: #f8edcf; color: #745817; }
.badge-red { background: #f8dfda; color: #933b2e; }

.empty { display: grid; min-height: 290px; place-items: center; padding: 44px 20px; border: 1px dashed #bac6be; background: rgba(255,255,255,.5); text-align: center; }
.empty-symbol { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 16px; background: var(--mist, #e6ece8); color: var(--green); font-size: 24px; font-weight: 900; }
.empty p { max-width: 380px; color: var(--muted); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.learning-path { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; border-block: 1px solid var(--line); background: rgba(255,255,255,.55); }
.learning-path span { display: flex; min-height: 52px; align-items: center; gap: 9px; padding: 8px 14px; color: var(--muted); font-size: 13px; font-weight: 750; }
.learning-path span + span { border-left: 1px solid var(--line); }
.learning-path span.active { color: var(--forest); background: #eff5e6; }
.learning-path strong { display: grid; width: 24px; height: 24px; flex: none; place-items: center; background: var(--surface); color: var(--green); font-size: 11px; }
.source-text { max-height: 410px; overflow: auto; padding: 20px; white-space: pre-wrap; line-height: 1.72; }
.reader-cta { display: grid; gap: 5px; min-height: 128px; align-content: center; padding: 20px; background: var(--forest); color: #fff; }
.reader-cta .eyebrow { margin: 0; color: var(--lime); }
.reader-cta strong { font-size: 20px; }
.reader-cta span:last-child { color: #bdd0c4; font-size: 12px; }
.info-list { display: grid; gap: 14px; }
.info-row { display: grid; gap: 4px; }
.info-row span:first-child { color: var(--muted); font-size: 12px; }
.source-url { overflow-wrap: anywhere; color: var(--green); font-size: 13px; line-height: 1.45; }
.extract-box { padding: 20px; border-left: 4px solid var(--lime); background: #f0f4e6; }
.extract-box p { margin-bottom: 14px; color: #526056; font-size: 13px; }
.candidate-group { margin-top: 24px; }
.candidate { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.candidate:last-child { border-bottom: 0; }
.candidate input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--green); }
.candidate-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.candidate-source { margin: 10px 0 0; padding: 10px 12px; border-left: 2px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.55; }
.import-bar { position: sticky; z-index: 5; bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: var(--shadow); }

.card-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vocab-card { min-height: 174px; padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.vocab-card h3 { margin: 12px 0 6px; font-size: 22px; }
.vocab-card p { margin-bottom: 16px; color: var(--muted); }
.card-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.review-shell { max-width: 780px; margin: 0 auto; }
.review-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.progress-native { width: 100%; height: 7px; flex: 1; border: 0; border-radius: 0; background: #dfe5e0; appearance: none; }
.progress-native::-webkit-progress-bar { background: #dfe5e0; }
.progress-native::-webkit-progress-value { background: var(--green); }
.progress-native::-moz-progress-bar { background: var(--green); }
.study-card { display: grid; min-height: 390px; align-content: center; padding: clamp(28px, 7vw, 56px); border-top: 6px solid var(--lime); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.study-card .type { color: var(--green); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.study-expression { margin: 24px auto 16px; max-width: 650px; font-size: 46px; font-weight: 850; line-height: 1.18; overflow-wrap: anywhere; }
.daily-study-card { min-height: 330px; padding: clamp(24px, 5vw, 42px); }
.daily-study-card .study-expression { max-width: 820px; margin-block: 18px 10px; font-size: clamp(25px, 3vw, 34px); font-weight: 720; line-height: 1.55; text-align: left; }
.daily-study-card .study-expression .word-chip { line-height: inherit; }
.daily-study-card .study-answer { max-width: 820px; text-align: left; }
.study-answer { margin: 20px auto 0; max-width: 600px; padding-top: 20px; border-top: 1px solid var(--line); }
.study-answer strong { display: block; margin-bottom: 10px; font-size: 20px; }
.study-answer p { color: var(--muted); }
.study-controls { margin-top: 18px; }
.rating-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rating { min-height: 58px; border: 0; border-radius: 6px; color: #fff; font-weight: 800; }
.rating-again { background: #b24f3f; }
.rating-hard { background: #a37a28; }
.rating-good { background: var(--green); }
.rating-easy { background: var(--blue); }

mark.core { padding: 0 2px; background: #fff3b8; color: #1f3d2c; font-weight: 800; border-radius: 3px; }
.sentence-candidate { align-items: start; }
.sentence-en { font-size: 16px; line-height: 1.65; font-weight: 600; }
.sentence-zh { margin: 6px 0 10px; color: var(--muted); line-height: 1.6; }
.sentence-candidate .row-wrap { margin-top: 4px; }
.limit-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0 16px; }
.limit-row .input { min-height: 40px; padding: 8px 10px; }
.translation-panel { margin-top: 24px; }
.translation-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.translation-row:last-child { border-bottom: 0; }
.translation-en { font-size: 16px; line-height: 1.65; }
.translation-zh { color: var(--muted); line-height: 1.6; }
.translation-row .row-wrap { margin-top: 6px; }

.reader-loading { display: grid; max-width: 680px; gap: 10px; padding: 28px 0; color: var(--muted); }
.reader-loading .skeleton { min-height: 8px; }
.reader-loading strong { color: var(--ink); font-size: 18px; }
.reader-toolbar { position: sticky; z-index: 8; top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.reader-toolbar > div:first-child { display: grid; gap: 3px; }
.reader-list { border-top: 1px solid var(--line); }
.reader-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; padding: 24px 10px; border-bottom: 1px solid var(--line); scroll-margin-block: 120px; }
.reader-row.active { background: #eff5e9; box-shadow: inset 4px 0 var(--lime); }
.reader-number { padding-top: 3px; color: #87948d; font-size: 12px; font-weight: 800; text-align: center; }
.reader-copy { min-width: 0; }
.reader-en { max-width: 880px; color: var(--ink); font-size: 20px; font-weight: 650; line-height: 1.65; overflow-wrap: anywhere; }
.reader-zh { max-width: 880px; margin: 8px 0 14px; color: var(--muted); font-size: 15px; line-height: 1.7; }

.pron-tabs { display: flex; gap: 4px; margin-bottom: 22px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.pron-tab { min-width: max-content; min-height: 46px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-weight: 780; }
.pron-tab.active { border-bottom-color: var(--green); color: var(--forest); }
.lesson-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.lesson-summary { position: sticky; top: 24px; display: grid; gap: 14px; padding: 22px; background: var(--forest); color: #fff; }
.lesson-summary .eyebrow { margin: 0; color: var(--lime); }
.lesson-summary .badge { width: fit-content; background: rgba(255,255,255,.12); color: #fff; }
.lesson-summary p { margin: 4px 0 0; color: #bed0c5; font-size: 13px; }
.lesson-summary .btn-ghost { color: #fff; }
.lesson-symbol { font-family: Georgia, "Times New Roman", serif; font-size: 52px; line-height: 1; }
.lesson-phoneme-play, .phoneme-play-main { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 6px; background: var(--lime); color: var(--forest); font-weight: 820; }
.lesson-phoneme-play { width: 100%; background: #fff; color: var(--forest); }
.lesson-phoneme-play:hover, .phoneme-play-main:hover { filter: brightness(.97); }
.lesson-phoneme-play.playing, .phoneme-play-main.playing { opacity: .7; }
.phoneme-audio-hero { display: grid; max-width: 430px; width: 100%; margin-inline: auto; }
.audio-attribution { padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.55; }
.lesson-work { min-width: 0; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.lesson-steps { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--line); }
.lesson-step { display: grid; min-width: 0; min-height: 70px; place-items: center; align-content: center; gap: 5px; padding: 8px 4px; border: 0; border-right: 1px solid var(--line); background: #f7f9f6; color: var(--muted); }
.lesson-step:last-child { border-right: 0; }
.lesson-step span { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid #b9c5bd; border-radius: 50%; font-size: 11px; }
.lesson-step strong { font-size: 11px; }
.lesson-step.active { background: #edf4ef; color: var(--forest); }
.lesson-step.active span, .lesson-step.done span { border-color: var(--green); background: var(--green); color: #fff; }
.lesson-stage { display: grid; min-height: 430px; align-content: start; gap: 22px; padding: 30px; }
.stage-copy { max-width: 680px; }
.stage-copy h2 { margin-bottom: 8px; font-size: 24px; }
.stage-copy p { margin: 0; color: var(--muted); }
.sound-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sound-word { display: grid; min-height: 132px; place-items: center; align-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; background: #f8faf7; color: var(--ink); }
.sound-word span { color: var(--green); font-size: 20px; }
.sound-word strong { font-size: 24px; }
.sound-word:hover { border-color: var(--green); background: #edf4ef; }
.articulation-card { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; align-items: center; padding: 22px; background: #f2f5f1; }
.mouth-visual { display: grid; width: 154px; height: 122px; place-items: center; align-content: center; margin: auto; }
.upper-lip, .lower-lip { width: 112px; height: 16px; border: 4px solid #b55d58; background: #e99a8f; }
.upper-lip { border-radius: 70% 70% 24% 24%; border-bottom: 0; }
.lower-lip { border-radius: 24% 24% 70% 70%; border-top: 0; }
.mouth-opening { position: relative; width: 106px; height: 34px; overflow: hidden; border-inline: 4px solid #b55d58; background: #3d2626; transition: none; }
.mouth-opening .tongue { position: absolute; inset: auto 12px 0; height: 12px; border-radius: 50% 50% 0 0; background: #d47873; }
.mouth-visual.rounded .upper-lip, .mouth-visual.rounded .lower-lip { width: 74px; }
.mouth-visual.rounded .mouth-opening { width: 68px; height: 46px; border-radius: 45%; }
.mouth-visual.spread .upper-lip, .mouth-visual.spread .lower-lip { width: 132px; }
.mouth-visual.spread .mouth-opening { width: 126px; height: 24px; }
.mouth-visual.open .mouth-opening { height: 58px; border-radius: 38%; }
.articulation-cues { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.articulation-cues span { min-height: 48px; padding: 12px; border-left: 3px solid var(--lime); background: var(--surface); font-size: 13px; }
.contrast-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contrast-card { display: grid; min-height: 150px; place-items: center; align-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; background: #f8faf7; }
.contrast-card span { color: var(--green); font-family: Georgia, "Times New Roman", serif; font-size: 24px; }
.contrast-card strong { font-size: 26px; }
.contrast-card small { color: var(--muted); }
.practice-word-list { display: grid; gap: 1px; background: var(--line); }
.practice-word { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 13px; background: var(--surface); }
.practice-word strong { font-size: 19px; }
.source-practice { padding: 18px; border-left: 4px solid var(--lime); background: #f3f6ed; }
.source-practice p { margin: 8px 0 14px; font-size: 18px; line-height: 1.6; }
.lesson-decision { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.decision-card { display: grid; min-height: 150px; align-content: center; gap: 7px; padding: 20px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); text-align: left; }
.decision-card strong { font-size: 20px; }
.decision-card span { color: var(--muted); font-size: 13px; }
.decision-card.needs-work { border-left: 5px solid var(--yellow); }
.decision-card.confident { border-left: 5px solid var(--green); }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--line); }
.lesson-finished { display: grid; min-height: 500px; place-items: center; align-content: center; gap: 12px; padding: 32px; text-align: center; }
.lesson-finished p { max-width: 560px; color: var(--muted); }
.lesson-check { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-size: 28px; }
.confusion-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.confusion-list { display: grid; gap: 6px; }
.confusion-list-item { display: grid; min-height: 64px; gap: 4px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); text-align: left; }
.confusion-list-item span { color: var(--muted); font-size: 12px; }
.confusion-list-item.active { border-color: var(--green); background: #edf4ef; }
.confusion-practice { padding: 26px; background: var(--surface); box-shadow: var(--shadow); }
.confusion-practice > p { color: var(--muted); }
.minimal-pairs { display: grid; gap: 8px; margin: 20px 0; }
.minimal-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.minimal-pair button { display: grid; min-height: 86px; place-items: center; align-content: center; gap: 3px; border: 1px solid var(--line); border-radius: 6px; background: #f8faf7; }
.minimal-pair span { color: var(--green); font-size: 12px; }
.minimal-pair strong { font-size: 19px; }
.minimal-pair small { color: var(--muted); }
.listening-quiz { display: grid; gap: 12px; margin-top: 24px; padding: 18px; border-top: 1px solid var(--line); background: #f4f7f3; }
.listening-quiz p { margin: 4px 0 0; color: var(--muted); }
.quiz-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quiz-result { padding: 10px 12px; border-left: 3px solid var(--green); background: #e2f0e7; }
.quiz-result.incorrect { border-color: var(--yellow); background: #f8edcf; }
.mistake-list { display: grid; gap: 8px; }
.mistake-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; min-height: 82px; align-items: center; gap: 16px; padding: 12px 16px; border: 1px solid var(--line); background: var(--surface); }
.mistake-symbol { font-family: Georgia, "Times New Roman", serif; font-size: 28px; text-align: center; }
.mistake-row > div:nth-child(2) { display: grid; gap: 5px; }
.mistake-row span { color: var(--muted); font-size: 12px; }

.ipa-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 22px; align-items: start; }
.ipa-browser { min-width: 0; }
.ipa-grid { display: grid; grid-template-columns: repeat(5, minmax(76px, 1fr)); gap: 8px; margin-top: 18px; }
.ipa-key { display: grid; min-width: 0; min-height: 82px; place-items: center; align-content: center; gap: 5px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.ipa-key:hover, .ipa-key.active { border-color: var(--green); background: #edf4ef; box-shadow: inset 0 -3px var(--green); }
.ipa-key strong { font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 600; overflow-wrap: anywhere; }
.ipa-key span { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ipa-detail { display: grid; gap: 22px; padding: 24px; border-top: 5px solid var(--lime); background: var(--surface); box-shadow: var(--shadow); }
.ipa-hero { display: grid; min-height: 118px; place-items: center; background: var(--forest); color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 52px; }
.ipa-detail h2 { margin: 14px 0 8px; font-size: 18px; }
.ipa-detail p { margin: 0; color: var(--muted); }
.ipa-examples { display: grid; gap: 8px; }
.ipa-examples h3 { margin-bottom: 4px; }
.ipa-example { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.ipa-example > div:first-child { display: grid; gap: 2px; }
.ipa-example span { color: var(--muted); font-size: 12px; }
.ipa-example .icon-btn { width: 40px; height: 40px; }

.pronounce-panel { display: grid; gap: 14px; }
.pronounce-text { padding: 14px 16px; border-left: 3px solid var(--lime); background: #f4f8ee; font-size: 17px; line-height: 1.6; }
.pronounce-result { min-height: 60px; padding-top: 6px; font-size: 14px; line-height: 1.6; }
.practice-main-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.practice-progress { color: var(--muted); font-size: 12px; font-weight: 750; }
.practice-rating { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.practice-nav { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.asr-privacy { margin: 0; color: var(--muted); font-size: 12px; }
.btn.recording { background: var(--coral); }
.score-row { display: flex; align-items: center; gap: 18px; }
.recognition-label { display: grid; min-width: 146px; gap: 5px; padding: 13px; border-left: 4px solid var(--yellow); background: #f8edcf; }
.recognition-label.matched { border-color: var(--green); background: #e2f0e7; }
.recognition-label span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.score-ring { display: grid; flex: none; width: 86px; height: 86px; place-items: center; align-content: center; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--pct) * 1%), #e4eae5 0); }
.score-ring::before { content: ""; grid-area: 1 / 1; width: 66px; height: 66px; border-radius: 50%; background: var(--surface); }
.score-ring strong, .score-ring span { grid-area: 1 / 1; z-index: 1; }
.score-ring strong { font-size: 24px; }
.score-ring span { margin-top: 34px; font-size: 11px; color: var(--muted); }
.score-lines { display: grid; gap: 8px; }
.score-lines del { color: #b24f3f; text-decoration: none; background: #f8dfda; padding: 0 2px; border-radius: 2px; }
.score-lines ins { color: #216843; text-decoration: none; background: #e2f0e7; padding: 0 2px; border-radius: 2px; }
.label { color: #44524b; font-size: 12px; font-weight: 800; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.privacy-note { padding: 16px; border-left: 3px solid var(--green); background: #edf4ef; color: #43544a; font-size: 13px; }
.toast-region { position: fixed; z-index: 100; inset: 18px 18px auto auto; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.toast { padding: 13px 16px; border: 1px solid #b9c9c0; background: var(--forest); color: #fff; box-shadow: var(--shadow); }
.toast.error { background: #923f32; }
.skeleton { min-height: 80px; overflow: hidden; background: #e8ede9; }
.offline { position: fixed; z-index: 99; inset: auto 12px calc(76px + env(safe-area-inset-bottom)) 12px; padding: 10px; background: #6e521c; color: #fff; text-align: center; font-size: 13px; }

dialog { width: min(560px, calc(100vw - 28px)); max-height: calc(100vh - 48px); padding: 0; overflow: auto; border: 0; border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(12,24,18,.48); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 18px; }
.dialog-close-form { margin: 0; }
.dialog-close { flex: none; font-size: 26px; line-height: 1; }
.dialog-close:hover { background: #edf1ed; }
.dialog-close:focus-visible { outline: 3px solid rgba(43,117,81,.22); outline-offset: 2px; }
.dialog-body { padding: 20px; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: 36vh; padding: 34px 24px; }
  .brand-copy { align-self: center; }
  .brand-copy h1 { font-size: 48px; }
  .brand-mark { margin-bottom: 22px; }
  .login-panel { min-height: 64vh; padding: 32px 22px; }
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 78px 18px calc(88px + env(safe-area-inset-bottom)); }
  .mobile-top { position: fixed; z-index: 20; inset: 0 0 auto; display: flex; height: 62px; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); background: rgba(244,246,242,.96); }
  .mobile-nav { position: fixed; z-index: 20; inset: auto 0 0; display: grid; grid-template-columns: repeat(6, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.98); }
  .mobile-nav .nav-item { min-height: 54px; flex-direction: column; justify-content: center; gap: 2px; padding: 0 4px; color: var(--muted); font-size: 10px; text-align: center; }
  .mobile-nav .nav-item.active { background: transparent; color: var(--green); }
  .nav-symbol { width: auto; color: currentColor; font-size: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .quick-grid, .detail-grid, .settings-grid, .ipa-layout, .lesson-shell, .confusion-layout { grid-template-columns: 1fr; }
  .card-list { grid-template-columns: 1fr; }
  .lesson-summary { position: static; grid-template-columns: auto 1fr auto; align-items: center; }
  .lesson-summary .eyebrow, .lesson-summary p { grid-column: 1 / -1; }
  .lesson-summary .btn { grid-column: 3; grid-row: 2; }
  .lesson-symbol { font-size: 42px; }
  .confusion-list { grid-template-columns: repeat(3, 1fr); }
  .ipa-detail { grid-template-columns: 150px minmax(0, 1fr); }
  .ipa-examples { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  h1 { font-size: 28px; }
  .main { padding-inline: 14px; }
  .page-header { margin-bottom: 22px; }
  .page-copy { margin-bottom: 18px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .segmented-three { width: 100%; }
  .segment { padding-inline: 10px; }
  .url-input-row { grid-template-columns: 1fr; }
  .search { max-width: none; }
  .form-grid, .candidate-fields { grid-template-columns: 1fr; }
  .limit-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .learning-path span { min-height: 46px; justify-content: center; padding: 7px 4px; font-size: 11px; }
  .learning-path strong { width: 20px; height: 20px; }
  .score-row { flex-direction: column; align-items: flex-start; }
  .stats-grid { gap: 8px; }
  .stat { min-height: 108px; padding: 14px; }
  .stat-number { font-size: 29px; }
  .list-item { align-items: start; padding: 14px; }
  .material-list-item { grid-template-columns: minmax(0, 1fr) auto; padding: 0; }
  .material-list-link { padding: 14px 8px 14px 14px; }
  .material-list-actions { display: grid; justify-items: end; padding: 10px 10px 10px 0; }
  .material-list-actions .badge { display: none; }
  .candidate { padding: 14px; }
  .candidate-source { overflow-wrap: anywhere; }
  .import-bar { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .study-card { min-height: 350px; padding: 28px 20px; }
  .study-expression { font-size: 34px; }
  .daily-study-card { min-height: 280px; padding: 20px 16px; }
  .daily-study-card .study-expression { margin-block: 12px 6px; font-size: 22px; font-weight: 680; line-height: 1.6; }
  .daily-study-card .practice-nav { display: grid; grid-template-columns: 1fr 1fr; }
  .daily-study-card .practice-nav .btn { min-width: 0; padding-inline: 10px; }
  .daily-study-card .study-answer strong { font-size: 17px; line-height: 1.65; }
  .rating-grid { grid-template-columns: 1fr 1fr; }
  .rating { min-height: 52px; }
  .practice-main-actions { grid-template-columns: 1fr; }
  .reader-toolbar { top: 70px; align-items: stretch; flex-direction: column; }
  .reader-toolbar .row-wrap { display: grid; grid-template-columns: 1fr 1fr; }
  .reader-row { grid-template-columns: 32px minmax(0, 1fr); gap: 6px; padding: 20px 4px; }
  .reader-en { font-size: 18px; }
  .ipa-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .ipa-key { min-height: 74px; padding: 5px; }
  .ipa-key strong { font-size: 20px; }
  .ipa-detail { grid-template-columns: 1fr; padding: 18px; }
  .ipa-examples { grid-column: auto; }
  .pron-tabs { margin-inline: -14px; padding-inline: 10px; }
  .lesson-summary { grid-template-columns: 1fr auto; padding: 18px; }
  .lesson-summary .badge { justify-self: end; }
  .lesson-summary .btn { grid-column: 1 / -1; grid-row: auto; justify-self: start; }
  .lesson-steps { overflow-x: auto; grid-template-columns: repeat(5, minmax(72px, 1fr)); }
  .lesson-stage { min-height: 420px; padding: 22px 16px; }
  .stage-copy h2 { font-size: 21px; }
  .sound-list { grid-template-columns: 1fr; }
  .sound-word { min-height: 82px; grid-template-columns: auto 1fr; padding: 12px 18px; }
  .articulation-card { grid-template-columns: 1fr; padding: 16px; }
  .articulation-cues { grid-template-columns: 1fr; }
  .contrast-grid, .lesson-decision { grid-template-columns: 1fr; }
  .contrast-card, .decision-card { min-height: 108px; }
  .lesson-nav .btn { flex: 1; }
  .confusion-list { display: flex; overflow-x: auto; }
  .confusion-list-item { min-width: 160px; }
  .confusion-practice { padding: 20px 14px; }
  .mistake-row { grid-template-columns: 62px minmax(0, 1fr); gap: 10px; }
  .mistake-row .btn { grid-column: 1 / -1; }
  .toast-region { inset: 12px 12px auto; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* 单词点查（逐句精读 / 材料阅读） */
.word-chip {
  display: inline;
  padding: 0 1px;
  border-bottom: 1px dashed rgba(96, 112, 140, 0.45);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.word-chip:hover,
.word-chip:focus-visible {
  background: rgba(70, 120, 255, 0.12);
  outline: none;
}
.word-chip.core-word {
  font-weight: 700;
  border-bottom-style: solid;
}
.study-expression .word-chip {
  font-size: inherit;
  line-height: 1.9;
}

.word-popover {
  position: fixed;
  z-index: 1200;
  min-width: 180px;
  max-width: 300px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #dde4e0);
  box-shadow: 0 8px 28px rgba(19, 37, 29, 0.16);
  display: none;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink, #16251d);
}
.word-popover.open { display: block; }
.word-pop-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.word-pop-head strong { font-size: 15px; }
.word-pop-mean { color: var(--ink-soft, #55655c); margin-bottom: 8px; }

