:root {
  color-scheme: dark;
  --bg: #070b12; --surface: #0e1623; --surface-2: #131f30; --surface-hover: #19283a;
  --ink: #e6eef7; --ink-2: #a6b6c9; --muted: #8497ad; --line: #263548;
  --accent: #56d8e8; --accent-soft: #163640; --violet: #ac9aff;
  --success: #80dfae; --warning: #f4c579; --danger: #ff9a9f;
  --good-bg: #133429; --warn-bg: #382e1d; --bad-bg: #39212c;
  --grid: #122030; --shadow: #02060ba6; --focus: #9beaf3;
  --body: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --display: "Bahnschrift", "Segoe UI", "Microsoft YaHei UI", sans-serif;
  --mono: "Cascadia Code", Consolas, "Courier New", monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.7 var(--body); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { line-height: 1.35; text-wrap: balance; }
h1 { font-size: clamp(27px, 3vw, 38px); font-weight: 650; letter-spacing: -.03em; }
h2 { font-size: 20px; font-weight: 600; } h3 { font-size: 17px; font-weight: 600; }
p + p { margin-top: 10px; }
svg { max-width: 100%; } img { max-width: 100%; }
small { font-size: 12px; } code, kbd, .mono { font-family: var(--mono); }
kbd { border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font-size: 11px; color: var(--muted); }
.skip-link { position: fixed; top: -70px; left: 20px; z-index: 100; background: var(--accent); color: var(--bg); padding: 10px 20px; }
.skip-link:focus { top: 10px; }
.shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: env(safe-area-inset-top, 0px); height: 100vh; padding: 32px 18px 25px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 42px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--accent); color: var(--accent); font: 700 27px var(--display); position: relative; border-radius: 8px 2px 8px 2px; }
.brand-mark span { position: absolute; right: 4px; bottom: -1px; font-size: 18px; }
.brand strong { display: block; font: 650 22px var(--display); letter-spacing: .07em; }
.brand small { display: block; font: 10px var(--mono); letter-spacing: .25em; color: var(--ink-2); }
.brand-accent { color: var(--accent); }
.sidebar-label { padding: 0 14px 13px; color: var(--muted); font-size: 11px; letter-spacing: .15em; }
#nav { display: grid; gap: 6px; }
#nav a { min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid transparent; border-radius: 6px; color: var(--ink-2); font-size: 13px; transition: background .15s, color .15s; }
#nav a:hover { color: var(--ink); background: var(--surface-hover); }
#nav a.active, #nav a[aria-current="page"] { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }
.nav-symbol { width: 19px; font: 22px var(--mono); text-align: center; }
.nav-en { margin-left: auto; font: 8px var(--mono); opacity: .75; letter-spacing: .04em; }
.sidebar-foot { margin-top: auto; padding: 36px 12px 0; color: var(--muted); font-size: 11px; }
.sidebar-foot p { margin-block: 12px 16px; line-height: 1.7; }
.version { font-size: 8px; letter-spacing: .03em; }
.system-dot, .status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 7px; box-shadow: 0 0 8px #56d8e84d; }
.workspace { min-width: 0; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 58px 58px; background-position: center top; }
.topbar { height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-inline: clamp(16px, 3.3vw, 52px); border-bottom: 1px solid var(--line); }
.topbar-path, .topbar-meta { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 11px; }
.topbar-path .mono { font-size: 9px; letter-spacing: .15em; }
.topbar-meta { font-family: var(--mono); } .topbar-meta .status-dot { margin-right: -6px; }
#app { max-width: 1560px; margin: 0 auto; padding-inline: clamp(16px, 3.3vw, 52px); padding-block: 32px 52px; min-height: calc(100vh - 128px); outline: none; }
.workspace-foot { margin-inline: clamp(16px, 3.3vw, 52px); padding-block: 17px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font: 9px var(--mono); letter-spacing: .1em; }
.page-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 26px; flex-wrap: wrap; }
.eyebrow { display: block; font: 10px var(--mono); letter-spacing: .16em; color: var(--accent); text-transform: uppercase; margin-bottom: 10px; }
.page-head p, .page-title + p { margin-top: 9px; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); } .good { color: var(--success); } .warn { color: var(--warning); } .bad { color: var(--danger); }
.grid { display: grid; gap: 18px; } .grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stack { display: grid; gap: 20px; } .stack > * { min-width: 0; }
.actions, .toolbar, .tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.toolbar { margin-bottom: 20px; padding-block: 10px; }
.tabs { margin-bottom: 22px; }
.panel { min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 24px; }
.panel + .panel, .panel + .grid, .grid + .panel, .grid-2 + .panel, .grid-3 + .panel, .grid-4 + .panel { margin-top: 22px; }
.panel-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.panel-head p { color: var(--muted); font-size: 12px; }
.section-title { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-block: 30px 17px; }
.section-title span, .section-title a { font-size: 12px; color: var(--muted); }
.stat { min-width: 0; padding: 20px 22px; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; }
.stat-label { color: var(--ink-2); font-size: 12px; display: block; }
.stat-value { display: block; font: 600 32px/1.35 var(--display); margin-block: 9px 5px; letter-spacing: -.03em; }
.stat small { color: var(--muted); } .stat-value small { font-size: 13px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 41px; padding: 9px 17px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 5px; line-height: 1.4; text-align: center; font-size: 13px; font-weight: 500; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { background: var(--surface-hover); border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #06232a; font-weight: 650; box-shadow: 0 3px 16px #56d8e814; }
.btn.primary:hover { background: #92e8f0; transform: translateY(-1px); }
.btn.secondary { background: transparent; }
.btn.danger { background: var(--bad-bg); color: var(--danger); border-color: #623845; }
.btn.small { font-size: 11px; padding: 6px 11px; min-height: 31px; }
.chip, .badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 4px; padding: 3px 9px; color: var(--ink-2); background: var(--surface-2); font-size: 11px; line-height: 1.7; }
.chip.active, .chip[aria-pressed="true"], .tabs .active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.badge.good { background: var(--good-bg); color: var(--success); border-color: #285c43; }
.badge.warn { background: var(--warn-bg); color: var(--warning); border-color: #5c492d; }
.badge.bad { background: var(--bad-bg); color: var(--danger); border-color: #623845; }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 24px; overflow: hidden; border: 1px solid #315868; background: linear-gradient(115deg, #132938 0%, #10202f 65%, #152638 100%); border-radius: 10px; padding: 32px; margin-bottom: 24px; }
.hero::after { content: ""; position: absolute; width: 240px; height: 240px; border: 1px solid #56d8e814; border-radius: 50%; right: -80px; top: -100px; pointer-events: none; }
.hero-copy { position: relative; z-index: 1; display: grid; align-content: center; justify-items: start; gap: 15px; }
.hero-copy h2 { font-size: clamp(24px, 3vw, 34px); font-family: var(--display); }
.hero-copy p { font-size: 13px; color: var(--ink-2); max-width: 62ch; }
.hero-copy .actions { margin-top: 9px; }
.hero-metric { align-self: center; justify-self: center; text-align: center; position: relative; }
.hero-metric .stat-value { font-size: 52px; }
.hero-metric svg { width: 160px; height: 160px; }
.hero-metric strong { font-size: 35px; }
.progress-track { height: 5px; border-radius: 2px; background: var(--accent-soft); overflow: hidden; margin-block: 9px; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 0 3px 3px 0; max-width: 100%; transition: width .15s; }
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 13px; }
.day-card { min-width: 0; display: grid; align-content: start; gap: 10px; padding: 19px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); transition: border-color .15s; }
.day-card:hover { border-color: #47717f; } .day-card h3 { font-size: 14px; min-height: 38px; line-height: 1.5; }
.day-card .mono { font-size: 11px; color: var(--accent); letter-spacing: .1em; }
.day-card p { font-size: 12px; color: var(--muted); } .day-card .actions { gap: 7px; }
.day-card .rate { font-size: 11px; color: var(--ink-2); }
.mode-card { padding: 23px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.mode-card h3 { font-size: 17px; } .mode-card p { color: var(--muted); font-size: 12px; flex: 1; } .mode-card .btn { align-self: start; }
.mode-icon { font: 26px var(--mono); color: var(--accent); }
.mode-card:nth-child(2) .mode-icon { color: var(--violet); }
.field { display: grid; gap: 7px; min-width: 0; } .field-label, label { color: var(--ink-2); font-size: 12px; }
.input, .select, .textarea, input[type="text"], input[type="number"], input[type="search"], select, textarea { width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 5px; padding: 10px 12px; min-height: 42px; outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; vertical-align: middle; }
input[type="range"] { accent-color: var(--accent); max-width: 100%; }
.toolbar .field { flex: 1 1 160px; } .toolbar input[type="search"] { flex: 2 1 220px; }
.toolbar select { width: auto; max-width: 100%; }
textarea { resize: vertical; line-height: 1.7; }
.session-card { max-width: 900px; margin-inline: auto; padding: clamp(20px, 4vw, 42px); background: var(--surface); border: 1px solid #344e66; border-radius: 10px; }
.session-card .prompt { font-size: clamp(21px, 2.8vw, 29px); line-height: 1.65; padding-block: 20px 26px; overflow-wrap: anywhere; }
.session-card .answer-form { display: grid; gap: 15px; }
.session-card textarea { font-size: 18px; min-height: 112px; }
.session-card .listen-button, .speaker-button { width: 90px; height: 90px; border-radius: 50%; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-size: 31px; display: inline-grid; place-items: center; margin-block: 10px; box-shadow: 0 0 0 9px #56d8e807; }
.session-head { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 15px; }
#session-root:focus { outline: none; }
.feedback { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 16px; overflow-wrap: anywhere; }
.feedback ul, .feedback ol { padding-left: 20px; margin: 0; color: var(--ink-2); font-size: 13px; }
.feedback .item-en { font-size: 20px; }
.diff-add { background: var(--good-bg); color: var(--success); padding: 1px 3px; border-radius: 2px; }
.diff-remove { color: var(--danger); background: var(--bad-bg); padding: 1px 3px; }
.item-row { min-width: 0; display: flex; gap: 15px; padding-block: 18px; border-bottom: 1px solid var(--line); align-items: start; }
.item-row:last-child { border-bottom: 0; } .item-row > div { min-width: 0; flex: 1; }
.item-en { font: 500 17px/1.7 var(--body); overflow-wrap: anywhere; }
.item-zh { color: var(--ink-2); font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; margin-top: 5px; }
.item-row .actions { flex: 0 0 auto; }
.item-notes { font-size: 12px; color: var(--muted); padding-top: 8px; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.data-table { border-collapse: collapse; width: 100%; text-align: left; font-size: 12px; }
.data-table th { font-weight: 500; color: var(--muted); padding: 11px 13px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 14px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td .mono, .data-table .rate { font-variant-numeric: tabular-nums; }
.chart { position: relative; min-width: 0; color: var(--ink-2); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font: 11px var(--mono); }
.chart .chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .chart-area { fill: var(--accent); opacity: .1; }
.chart .chart-grid { stroke: var(--line); stroke-width: 1; }
.chart .chart-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .chart-hit { fill: transparent; cursor: crosshair; }
.chart .crosshair { stroke: var(--muted); stroke-width: 1; }
.chart-tooltip { background: var(--surface-2); color: var(--ink); font-size: 12px; border: 1px solid var(--line); border-radius: 5px; padding: 9px 13px; min-height: 38px; margin-top: 12px; }
details { margin-top: 14px; } summary { color: var(--ink-2); cursor: pointer; font-size: 12px; }
.empty { text-align: center; padding: 45px 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.empty h2 { margin-bottom: 12px; } .empty p { color: var(--muted); max-width: 62ch; margin-inline: auto; font-size: 13px; }
.empty .actions { justify-content: center; margin-top: 20px; }
audio { display: block; width: 100%; height: 40px; margin-top: 14px; }
.storage-warning { padding: 12px 20px; background: var(--warn-bg); border: 1px solid #5c492d; color: var(--warning); font-size: 13px; margin: 16px; border-radius: 4px; }
.toast { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 50; max-width: calc(100% - 32px); padding: 12px 22px; background: var(--surface-hover); border: 1px solid var(--accent); color: var(--ink); border-radius: 6px; box-shadow: 0 12px 40px var(--shadow); font-size: 13px; }
.confirm-panel { margin-block: 15px; padding: 20px; border: 1px solid #623845; border-radius: 5px; background: var(--bad-bg); display: grid; gap: 12px; }
.print-sheet { background: #fff; color: #192332; padding: 35px; max-width: 950px; margin-inline: auto; border-radius: 4px; }
.print-sheet h1 { font-size: 25px; } .print-sheet h2 { font-size: 19px; margin-block: 20px 14px; }
.print-sheet p { font-size: 12px; } .print-sheet ol { padding-left: 22px; }
.print-sheet li { break-inside: avoid; padding: 12px 7px; border-bottom: 1px solid #d4dbe4; font-size: 13px; }
.print-sheet .muted { color: #58677a; } .print-sheet .answer-space { min-height: 45px; border-bottom: 1px dotted #a0abba; }
.answer-key { break-before: page; }
@media (min-width: 1500px) { .shell { grid-template-columns: 248px minmax(0, 1fr); } }
@media (max-width: 1100px) { .shell { grid-template-columns: 195px minmax(0, 1fr); } .nav-en { display: none; } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero { grid-template-columns: minmax(0, 1fr) 160px; padding: 25px; } }
@media (max-width: 800px) {
  .shell { display: block; } .sidebar { position: static; height: auto; padding: 17px 16px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 0 15px; } .brand-mark { width: 35px; height: 35px; font-size: 23px; } .brand strong { font-size: 20px; }
  .sidebar-label, .sidebar-foot { display: none; } #nav { display: flex; gap: 5px; justify-content: space-between; flex-wrap: wrap; }
  #nav a { padding: 7px 9px; min-height: 37px; gap: 6px; font-size: 12px; } .nav-symbol { font-size: 17px; width: 17px; }
  .topbar { height: 51px; } .topbar-path .mono, .topbar-path > span:nth-child(2) { display: none; }
  #app { padding-block: 26px 35px; } .grid-2 { grid-template-columns: 1fr; }
  .hero-metric { display: none; } .hero { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; } .mode-card { gap: 10px; }
  /* iOS Safari 聚焦小于 16px 的输入框会自动放大整页：手机宽度下输入控件一律 16px */
  .input, .select, .textarea, input[type="text"], input[type="number"], input[type="search"], select, textarea { font-size: 16px; }
}
@media (display-mode: standalone) {
  /* 主屏 App（black-translucent 状态栏）：顶部让出安全区 */
  .sidebar { padding-top: calc(32px + env(safe-area-inset-top, 0px)); }
}
@media (display-mode: standalone) and (max-width: 800px) {
  .sidebar { padding-top: calc(17px + env(safe-area-inset-top, 0px)); }
}
@media (max-width: 480px) {
  #nav .nav-symbol { display: none; } #nav a { font-size: 11px; padding-inline: 7px; }
  .topbar-meta { gap: 7px; font-size: 9px; } .topbar-path { font-size: 11px; }
  .page-head { align-items: start; gap: 15px; } .page-head .actions { width: 100%; }
  .hero { padding: 23px 20px; } .hero-copy .actions { display: grid; width: 100%; }
  .grid-4 { gap: 10px; } .stat { padding: 17px 15px; } .stat-value { font-size: 27px; }
  .panel { padding: 19px 16px; } .day-grid { grid-template-columns: 1fr; }
  .item-row { flex-wrap: wrap; } .item-row .actions { flex-basis: 100%; }
  .workspace-foot { font-size: 8px; letter-spacing: 0; } .print-sheet { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .progress-fill { background: Highlight; } .panel, .stat, .day-card { border: 1px solid CanvasText; } }
@page { size: A4; margin: 12mm; }
@media print {
  :root { color-scheme: light; } body { background: #fff; color: #17212c; font-size: 11pt; }
  .sidebar, .topbar, .workspace-foot, .toast, .no-print, .storage-warning { display: none !important; }
  .shell { display: block; } .workspace { background: #fff; } #app { margin: 0; padding: 0; min-height: 0; max-width: none; }
  .print-sheet { max-width: none; padding: 0; border: 0; box-shadow: none; border-radius: 0; }
  .print-sheet ol { columns: 2; column-gap: 10mm; } .print-sheet li { padding: 10px 5px; }
  .print-sheet h1 { font-size: 20pt; } .print-sheet .answer-key { break-before: page; }
  a { text-decoration: none; color: inherit; } .btn { display: none; }
}
