:root {
  color-scheme: light;
  --paper: #f8f6f0;
  --ink: #1c201c;
  --muted: #575d56;
  --line: #e1e0d7;
  --white: #fffefb;
  --green: #224c36;
  --soft: #e9efdf;
  --purple: #eae5f6;
  font-family: "Aptos", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid #446d50; outline-offset: 3px; }
.shell { width: min(1100px, calc(100% - 52px)); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); background: #fbf9f3; }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 800; white-space: nowrap; }
.brand-en { color: var(--muted); font-size: 9px; letter-spacing: .17em; margin-left: 2px; }
.logo { display: flex; align-items: center; justify-content: center; gap: 2px; width: 34px; height: 34px; border-radius: 9px; background: var(--green); color: #e8f2c1; }
.logo i { display: block; width: 2px; border-radius: 2px; height: 8px; background: currentColor; }
.logo i:nth-child(2), .logo i:nth-child(4) { height: 13px; }
.logo i:nth-child(3) { height: 19px; }
.nav nav { display: flex; gap: 7px; }
.nav nav a { font-size: 13px; font-weight: 650; text-decoration: none; color: var(--muted); padding: 7px 10px; white-space: nowrap; border-radius: 7px; }
.nav nav a[aria-current="page"] { color: var(--green); background: var(--soft); }
#nav-count { font-size: 10px; margin-left: 4px; }
main { padding-block: 28px 32px; min-height: 73vh; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(34px, 5vw, 66px); line-height: 1.06; letter-spacing: -.065em; }
h2 { font-size: 19px; }
h3 { font-size: 15px; }
.overline { font-size: 12px; font-weight: 750; letter-spacing: .15em; margin-bottom: 9px; color: #4c6549; }
.hero { min-height: 301px; isolation: isolate; position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 30%; align-items: center; gap: 15px; padding: 36px; border: 1px solid #dbe0ca; background: #ebefd9; border-radius: 23px; }
.hero p:not(.overline) { margin: 14px 0 20px; color: #455243; font-size: 14px; line-height: 1.6; }
.hero h1 em { white-space: nowrap; font-style: normal; color: var(--green); }
.hero-art { height: 220px; display: grid; place-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; border: 1px solid #d9ddd4; border-radius: 8px; padding: 7px 11px; background: #fffefb; color: var(--green); font-weight: 720; text-decoration: none; font-size: 13px; white-space: nowrap; }
.button:hover, .button[aria-pressed="true"] { border-color: #b0c5ab; background: #edf2e8; }
.button.primary { color: #fff; background: var(--green); border-color: var(--green); }
.button.primary:hover { background: #316246; }
.button.small { min-height: 30px; padding: 4px 8px; font-size: 12px; }
.section-head, .card-head, .card-foot, .exercise-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-head { margin: 23px 0 13px; flex-wrap: wrap; }
.section-head h2 { font-size: 23px; }
.section-head p, .card-head p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.filters, .actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.courses { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.course, .card { padding: 16px; border: 1px solid var(--line); background: var(--white); border-radius: 13px; min-width: 0; }
.official-resources { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.official-resources h2 { font-size: 16px; }
.official-resources .hint { margin-top: 4px; }
.course { display: flex; flex-direction: column; gap: 8px; min-height: 177px; }
.course::before { content: ""; background: #dce9cf; display: block; width: 35px; height: 4px; border-radius: 3px; }
.course[data-theme="旅行英语"]::before { background: #ffdcb0; }
.course[data-theme="电影台词"]::before { background: #d8c9f2; }
.course small, .course p { color: var(--muted); font-size: 12px; }
.course p { line-height: 1.55; margin-bottom: 3px; }
.course .button { align-self: start; margin-top: auto; }
.back-link { color: var(--green); text-decoration: none; font-weight: 700; font-size: 13px; }
.practice-title { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 15px 0 11px; }
.practice-title h1, .page-head h1 { font-size: clamp(30px, 4.3vw, 50px); }
.position { font-size: 13px; font-weight: 750; color: var(--green); white-space: nowrap; }
.lesson-bar { height: 5px; background: #e7e6dd; margin-bottom: 17px; border-radius: 5px; overflow: hidden; }
.lesson-bar span { display: block; height: 100%; background: #649066; border-radius: inherit; }
.study-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,305px); align-items: start; gap: 14px; }
.study-main, .study-side { display: grid; gap: 12px; min-width: 0; }
.player { background: #f2f5e9; border-color: #dce4d5; }
.speed select { font-size: 12px; border: 1px solid #cfdacb; border-radius: 7px; padding: 6px; color: var(--green); background: #fffefb; }
.timeline { --left: 0%; --right: 100%; --play: 0%; position: relative; height: 15px; border-radius: 5px; margin-top: 16px; background: #e1e8d7; }
.timeline span { position: absolute; inset: 0 calc(100% - var(--right)) 0 var(--left); border-radius: 5px; background: #abcca7; }
.timeline i { position: absolute; left: min(var(--play), calc(100% - 2px)); top: -2px; bottom: -2px; width: 2px; background: var(--green); }
.time-row { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 11px; margin: 5px 0 11px; }
.range-control { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 11px 0 8px; }
.range-control label { min-width: 0; border-radius: 7px; padding: 5px 8px; background: #e7eee0; }
.range-control label > span { display: flex; justify-content: space-between; gap: 4px; color: #434c40; font-size: 11px; }
.range-control output { color: var(--green); font-variant-numeric: tabular-nums; white-space: nowrap; }
.range-control input { display: block; width: 100%; margin: 3px 0 0; accent-color: var(--green); }
.hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.error { color: #8a3927; margin-top: 8px; }
.answer-card > label { font-size: 18px; font-weight: 750; }
.answer-card textarea { display: block; margin: 8px 0; width: 100%; min-height: 86px; resize: vertical; background: #fbfaf6; border: 1px solid #d8dad0; border-radius: 8px; padding: 10px; }
.text-button { color: var(--green); text-decoration: underline; text-underline-offset: 3px; border: 0; background: none; padding: 3px 0; font-size: 12px; }
.score { color: var(--green); font-size: 24px; font-variant-numeric: tabular-nums; }
.diff { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.answer-selection { background: #f0f3e9; border: 1px solid #dce4d5; border-radius: 8px; padding: 10px; margin: 9px 0; }
.answer-selection h3 { margin-top: 0; }
.answer-text { user-select: text; font-size: 17px; line-height: 1.75; margin: 5px 0 8px; overflow-wrap: anywhere; }
.answer-word { cursor: pointer; border-radius: 3px; }
.answer-word:hover { background: #e1ebd7; }
.answer-word.is-selected { color: #183a28; background: #c4dfb9; box-shadow: 0 0 0 2px #c4dfb9; }
.answer-word::selection { color: #183a28; background: #c4dfb9; }
#choice-note:not(:empty) { margin-top: 6px; }
.cloud-tools { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.cloud-form { display: grid; gap: 8px; margin-block: 12px; }
.cloud-form label { color: var(--muted); font-size: 13px; }
.cloud-form input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 7px; padding: 8px; }
.cloud-form .remember-local { display: flex; align-items: center; gap: 8px; }
.cloud-form .remember-local input { width: auto; }
.cloud-form .button { justify-self: start; }
.token { padding: 2px 5px; border-radius: 4px; background: var(--soft); color: #294d36; }
.token.wrong, .token.missing { background: #fae4db; color: #8d3f28; }
.token.extra { background: var(--purple); color: #5c367a; text-decoration: line-through; }
.translation { font-size: 13px; margin-bottom: 5px; }
.result-card h3 { margin: 10px 0 6px; }
.misses { display: grid; gap: 5px; }
.miss, .saved-item { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; border: 1px solid var(--line); padding: 7px 8px; border-radius: 7px; background: #faf9f5; }
.miss strong, .saved-item strong { overflow-wrap: anywhere; }
.miss[aria-current="true"] { border-color: #8eb090; background: #eff3eb; }
.context-form { display: flex; gap: 5px; margin-block: 8px; }
.context-form input { flex: 1; min-width: 0; padding: 5px 8px; border: 1px solid var(--line); background: #fbfaf6; border-radius: 7px; }
.context h3 { margin: 9px 0 4px; }
.context-list { margin: 0; padding-left: 20px; }
.context-list li { padding: 3px 0; overflow-wrap: anywhere; }
.context-list small { display: block; color: var(--muted); }
.context video { display: block; margin: 6px 0; width: min(100%, 400px); border-radius: 8px; background: #1e211e; }
.metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 8px 0; }
.metrics div { padding: 7px; border-radius: 6px; background: #eef2e9; }
.metrics strong { display: block; color: var(--green); font-size: 23px; }
.metrics span { color: var(--muted); font-size: 11px; }
#sentence-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
#sentence-list .button[aria-current="step"] { color: #fff; background: var(--green); border-color: var(--green); }
#sentence-list .done:not([aria-current="step"]) { background: var(--soft); }
.page-head { margin-bottom: 13px; }
.page-head > p:last-child { color: var(--muted); margin-top: 7px; }
#saved-list { display: grid; gap: 6px; margin: 7px 0; }
.saved-item p { margin-top: 2px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 7px; padding: 10px 0 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.toast { position: fixed; z-index: 3; bottom: 18px; left: 50%; transform: translateX(-50%); border-radius: 7px; padding: 7px 12px; background: var(--green); color: #fff; font-size: 13px; width: max-content; max-width: calc(100% - 22px); }
dialog { width: min(500px,calc(100% - 24px)); border-radius: 12px; border: 1px solid var(--line); background: var(--white); color: var(--ink); }
dialog::backdrop { background: #13251599; }
dialog p { color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 7px; }
dialog a { color: var(--green); }
#coach-progress { width: 68px; height: 8px; flex: 0 0 68px; accent-color: var(--green); }
.coach-card .actions:has(button:not([hidden])) { margin-top: 8px; }
#coach-body { display: grid; gap: 10px; margin-top: 10px; }
#coach-body h3, #coach-body p { margin: 0; }
#coach-body > .button { justify-self: start; }
.coach-question { display: grid; gap: 8px; }
.coach-question input { width: 100%; min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .shell { width: calc(100% - 30px); }
  .courses { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .study-layout { grid-template-columns: minmax(0,1fr); }
  .study-side { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .hero { min-height: 220px; padding: 21px; }
  .hero-art { height: auto; }
}
@media (max-width: 470px) {
  .nav { min-height: 55px; }
  .brand-en { display: none; }
  .nav nav { gap: 3px; }
  .nav nav a { padding: 6px; }
  main { padding-top: 16px; }
  .hero { grid-template-columns: minmax(0,1fr); min-height: auto; padding: 16px; }
  .hero-art { display: none; }
  .hero h1 { font-size: clamp(33px, 9vw, 43px); }
  .courses { grid-template-columns: minmax(0,1fr); }
  .course { min-height: 135px; }
  .card { padding: 11px; }
  .study-side { grid-template-columns: minmax(0,1fr); }
}

:root { --paper: #f5f4ef; --white: #fffefa; --green: #174f41; --ink: #172d28; --line: #d6dcd4; --amber: #f6cc75; }
.top { background: var(--white); }
.brand { letter-spacing: -.04em; }
.logo { border-radius: 50%; }
.button, .text-button, .nav a, .answer-word { transition: background-color .15s, border-color .15s, transform .15s; }
.button:not(:disabled):active { transform: translateY(1px); }
.button { min-height: 40px; }
.button.primary { box-shadow: inset 0 -2px 0 #0002; }
h1, h2, h3 { text-wrap: balance; }
.hero { color: #fff9eb; padding: clamp(26px,4vw,52px); grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); border: 0; background: radial-gradient(ellipse at 89% 18%,#376d5c 0,transparent 54%),#173e35; }
.hero h1 { font-family: Georgia, "Songti SC", SimSun, serif; font-weight: 700; letter-spacing: -.055em; }
.hero h1 em, .hero .overline { color: var(--amber); }
.hero h1 > span { display: block; }
.hero p:not(.overline) { color: #e1e9e0; max-width: 31em; font-size: 15px; }
.hero .primary, .player .primary { background: var(--amber); color: #293529; border-color: var(--amber); }
.hero .primary:hover, .player .primary:hover { background: #ffde98; }
.hero .button:not(.primary) { color: #fff8e8; border-color: #95afa2; background: transparent; }
.hero .button:not(.primary):hover { background: #36594c; }
.cassette { width: min(92%,280px); aspect-ratio: 1.58; transform: rotate(-9deg); position: relative; border-radius: 12px; border: 3px solid #bbb59e; background: radial-gradient(circle at 4% 7%,#56564a 2px,transparent 3px),radial-gradient(circle at 96% 7%,#56564a 2px,transparent 3px),linear-gradient(150deg,#f2ecd8,#c7c5b3); box-shadow: 2px 5px 0 #737f70,9px 14px 20px #102d2880; }
.tape-label { position: absolute; inset: 10% 5% 26%; border-radius: 7px; border: 1px solid #a6a58d; background: linear-gradient(to bottom,#eae4ce 0 21%,#d59e4d 21% 27%,#c38343 27% 33%,#2f5649 33%); display: grid; place-items: end center; padding-bottom: 5%; }
.spools { width: 82%; height: 73%; background: #263831; border-radius: 24px; display: flex; align-items: center; justify-content: space-around; }
.spools i { height: 78%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle,#35443b 0 23%,transparent 24% 53%,#ece8d6 54%),repeating-conic-gradient(#c6c5b3 0deg 28deg,#f9f4e0 28deg 60deg); }
.spools b { width: 24%; height: 38%; border-radius: 3px; background: linear-gradient(#a09374 45%,#8a6346 45%); }
.tape-base { position: absolute; inset: 79% 18% 0; background: #b1b4a0; clip-path: polygon(10% 0,90% 0,100% 100%,0 100%); }
.section-head { margin-top: 30px; }
#course-search { font-size: 15px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 13px; color: var(--ink); background: var(--white); max-width: 100%; }
.filters { margin: 0 0 16px; }
.filters [aria-pressed=true] { background: var(--green); border-color: var(--green); color: white; }
.course { padding: 20px; gap: 10px; }
.course h3 { font-size: 21px; }
.course small { font-variant-numeric: tabular-nums; font-weight: 650; }
.course::before { width: 44px; height: 3px; background: #578a72; }
.course p { font-size: 14px; }
#course-empty { padding: 24px; border: 1px dashed var(--line); border-radius: 10px; }
.practice-title h1 { font-size: clamp(25px,3.6vw,42px); line-height: 1.18; letter-spacing: -.04em; }
.position { font-variant-numeric: tabular-nums; }
.player { background: #193f35; color: #fff9ec; padding: clamp(16px,2.6vw,30px); border: 0; border-radius: 18px; }
.player .hint, .player .card-head p, .player .time-row { color: #d2e0d6; }
.player .error { color: #ffd4ba; }
.timeline { height: 21px; background: #2e5146; margin-top: 22px; }
.timeline span { background: repeating-linear-gradient(90deg,transparent 0 11px,#24443770 11px 12px),#95b9a0; }
.timeline i { width: 3px; background: #ffda83; box-shadow: 0 0 0 1px #2b4033; }
.player-actions .button { min-height: 42px; }
.player-actions .button:not(.primary) { background: #294f43; border-color: #749180; color: #fff9e9; }
.player-actions .button[aria-pressed=true] { background: #e3edda; color: #19392e; }
#range-details { border-top: 1px solid #547566; margin-top: 18px; padding-top: 8px; }
summary { cursor: pointer; font-weight: 650; padding-block: 7px; }
.range-control label { padding: 8px 10px; }
.time-row { font-size: 12px; }
.answer-card { padding: clamp(15px,2vw,24px); }
.answer-card label { font-weight: 740; font-size: 19px; }
.answer-card textarea { font-size: 17px; line-height: 1.55; margin-block: 12px; }
.answer-card textarea:focus { outline: 2px solid #598970; outline-offset: 1px; background: white; }
.coach-card { border-left: 4px solid #c59b47; background: #fbf7eb; }
#coach-progress { width: 85px; flex-basis: 85px; }
.study-side .metrics strong { font-size: 28px; font-variant-numeric: tabular-nums; }
#sentence-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(34px,1fr)); gap: 5px; }
#sentence-list .button { min-height: 34px; font-variant-numeric: tabular-nums; }
.context > summary { font-size: 16px; color: var(--green); }
.answer-text { font-size: 19px; line-height: 1.95; }
dialog { padding: 22px; box-shadow: 0 18px 65px #172d2833; }
@media (max-width: 600px) {
  .hero { grid-template-columns: minmax(0,1fr); }
  .hero-art { display: none; }
  .practice-title { align-items: start; flex-wrap: wrap; }
  .answer-card .card-foot { flex-wrap: wrap; }
  .section-head { align-items: start; }
  .section-head input { width: 100%; }
  .context-form, .range-control { gap: 6px; }
  .button, .text-button, .speed select, summary, #sentence-list .button { min-height: 44px; }
  #sentence-list { grid-template-columns: repeat(auto-fit,minmax(44px,1fr)); }
  .text-button { padding-inline: 3px; }
  .study-side { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .button, .text-button, .nav a, .answer-word { transition: none; }
}
