:root {
  --page: #f3f5f2;
  --paper: #ffffff;
  --ink: #171b1a;
  --ink-soft: #434b48;
  --muted: #737d79;
  --line: #dce1de;
  --line-strong: #c5ccc8;
  --sidebar: #151918;
  --sidebar-soft: #242a28;
  --green: #087b63;
  --green-soft: #e2f2ec;
  --amber: #ad7008;
  --amber-soft: #fff1d5;
  --red: #b94435;
  --red-soft: #fbe7e3;
  --blue: #315fbd;
  --blue-soft: #e7edfb;
  --shadow: 0 12px 32px rgba(19, 33, 27, 0.08);
  --sidebar-width: 236px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}
button, input, textarea { font: inherit; letter-spacing: 0; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(49, 95, 189, 0.24);
  outline-offset: 2px;
}
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  color: #f5f7f6;
  padding: 24px 16px 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  background: #f2c35e;
  color: #171b1a;
  border-radius: 7px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 18px;
  font-weight: 600;
}
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-copy strong { font-size: 15px; white-space: nowrap; }
.brand-copy small { margin-top: 1px; color: #98a39f; font-family: "IBM Plex Mono", monospace; font-size: 9px; }
.nav-list { display: grid; gap: 5px; margin-top: 34px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #aeb8b4;
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
}
.nav-item svg { width: 18px; height: 18px; stroke-width: 1.8; }
.nav-item:hover { background: #202624; color: #ffffff; }
.nav-item.active { background: #29312e; color: #ffffff; border-color: #35403c; }
.nav-count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f2c35e;
  color: #171b1a;
  font: 600 11px "IBM Plex Mono", monospace;
}
.sidebar-bottom { margin-top: auto; }
.plan-button {
  width: 100%;
  padding: 13px;
  border: 1px solid #48524e;
  border-radius: 7px;
  background: #202624;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.plan-button > span { display: flex; align-items: center; gap: 7px; font-weight: 700; }
.plan-button svg { width: 16px; }
.plan-button small { display: block; margin-top: 3px; color: #aab4b0; }
.profile-row { display: flex; align-items: center; gap: 9px; margin-top: 16px; padding: 14px 7px 0; border-top: 1px solid #303734; }
.profile-row > span:nth-child(2) { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.profile-row strong { font-size: 13px; }
.profile-row small { color: #98a39f; font-size: 11px; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #315fbd; font-weight: 700; }
.icon-button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
}
.icon-button svg { width: 17px; height: 17px; }
.profile-row .icon-button { width: 30px; height: 30px; flex-basis: 30px; border-color: transparent; background: transparent; color: #98a39f; }
.main-content { margin-left: var(--sidebar-width); padding: 38px 42px 80px; }
.view { display: none; width: min(1120px, 100%); margin: 0 auto; }
.view.active { display: block; animation: enter 180ms ease; }
@keyframes enter { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.mobile-header, .mobile-nav { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-head h1 { margin: 0; font-size: 27px; line-height: 1.25; }
.page-head p { margin: 7px 0 0; color: var(--muted); }
.head-actions { display: flex; align-items: center; gap: 9px; }
.eyebrow { margin-bottom: 7px; color: var(--green); font: 600 11px "IBM Plex Mono", monospace; text-transform: uppercase; }
.mono { font-family: "IBM Plex Mono", monospace; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}
.button:hover { transform: translateY(-1px); }
.button svg { width: 17px; height: 17px; }
.button.primary { background: var(--green); }
.button.secondary { background: var(--paper); border-color: var(--line-strong); color: var(--ink); }
.button.danger { background: var(--red); }
.button.amber { background: var(--amber); }
.button.text { min-height: 34px; padding: 6px 8px; background: transparent; color: var(--green); }
.button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr); gap: 18px; }
.hero-action {
  min-height: 230px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 30px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.hero-action h2 { max-width: 620px; margin: 0 0 10px; font-size: 29px; line-height: 1.35; }
.hero-action p { max-width: 620px; margin: 0; color: #b9c2be; line-height: 1.7; }
.hero-action .button { background: #f2c35e; color: var(--ink); white-space: nowrap; }
.due-line { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 23px; color: #dfe5e2; font-size: 12px; }
.due-line span { display: inline-flex; align-items: center; gap: 6px; }
.due-line svg { width: 15px; }
.score-panel { padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.score-panel-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.score-big { font: 600 46px/1 "IBM Plex Mono", monospace; }
.score-target { color: var(--muted); font-size: 12px; }
.gap-badge { padding: 5px 8px; border-radius: 4px; background: var(--amber-soft); color: var(--amber); font-size: 11px; font-weight: 700; }
.progress-track { height: 7px; margin: 21px 0 9px; overflow: hidden; border-radius: 4px; background: #e8ece9; }
.progress-fill { height: 100%; background: var(--green); border-radius: inherit; }
.score-panel footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.loop-section { grid-column: 1 / -1; padding: 25px 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading h2, .section-heading h3 { margin: 0; font-size: 17px; }
.loop-steps { display: grid; grid-template-columns: repeat(5, 1fr); }
.loop-step { position: relative; padding-right: 24px; }
.loop-step:not(:last-child)::after { content: ""; position: absolute; top: 16px; left: 37px; right: 4px; height: 2px; background: var(--line); }
.loop-dot { position: relative; z-index: 1; width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--paper); color: var(--muted); font: 600 12px "IBM Plex Mono", monospace; }
.loop-step.done .loop-dot { border-color: var(--green); background: var(--green); color: #fff; }
.loop-step.current .loop-dot { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.loop-step.done:not(:last-child)::after { background: var(--green); }
.loop-copy { margin-top: 9px; }
.loop-copy strong { display: block; font-size: 13px; }
.loop-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.insight-grid { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.plain-section { min-width: 0; padding: 23px 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.win-strip { display: flex; align-items: flex-start; gap: 12px; padding: 14px; background: var(--green-soft); border-left: 3px solid var(--green); border-radius: 4px; }
.win-strip svg { width: 19px; flex: 0 0 19px; color: var(--green); }
.win-strip strong { display: block; }
.win-strip p { margin: 4px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.skill-row { display: grid; grid-template-columns: 124px 1fr 34px; align-items: center; gap: 10px; margin-top: 14px; }
.skill-row:first-of-type { margin-top: 4px; }
.skill-name { overflow: hidden; color: var(--ink-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.skill-track { height: 6px; border-radius: 4px; background: #e7ebe8; overflow: hidden; }
.skill-fill { height: 100%; border-radius: inherit; background: var(--blue); }
.skill-value { font: 600 12px "IBM Plex Mono", monospace; text-align: right; }

.setup-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.setup-main, .setup-summary { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.setup-main { padding: 26px; }
.setup-summary { position: sticky; top: 28px; padding: 24px; }
.field-label { display: block; margin-bottom: 10px; font-weight: 700; }
.segment { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--page); }
.segment button { min-height: 36px; padding: 7px 13px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; }
.segment button.active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(20, 30, 25, .1); font-weight: 700; }
.topic-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 23px; }
.topic-option { min-height: 82px; display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; text-align: left; cursor: pointer; }
.topic-option:hover { border-color: var(--line-strong); }
.topic-option.selected { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.topic-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 7px; background: var(--blue-soft); color: var(--blue); }
.topic-icon svg { width: 19px; }
.topic-option strong, .topic-option small { display: block; }
.topic-option small { margin-top: 3px; color: var(--muted); }
.setup-summary h3 { margin: 0 0 18px; font-size: 17px; }
.summary-list { display: grid; gap: 14px; margin: 0 0 22px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.summary-row span:first-child { color: var(--muted); }
.voice-summary { display: flex; align-items: center; justify-content: flex-end; gap: 6px; text-align: right; }
.voice-summary .icon-button { width: 30px; height: 30px; flex: 0 0 30px; color: var(--green); }
.setup-summary .button { width: 100%; }
.quota-note { margin: 11px 0 0; color: var(--muted); font-size: 11px; text-align: center; }

.runtime-status { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--muted); font-size: 11px; font-weight: 700; }
.runtime-status > span { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.runtime-status.ready > span { background: var(--green); }
.coach-setup-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 22px; align-items: start; }
.coach-side { display: grid; gap: 16px; }
.coach-start-panel, .session-archive { padding: 23px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.coach-start-panel h3 { margin: 0; font-size: 19px; }
.coach-start-panel > .button { width: 100%; margin-top: 20px; }
.coach-voice-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 36px; align-items: center; gap: 10px; margin-top: 18px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.coach-voice-row strong, .coach-voice-row small { display: block; }
.coach-voice-row small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.examiner-avatar { width: 40px; height: 40px; background: var(--ink); color: #fff; }
.session-archive .section-heading { margin-bottom: 5px; }
.archive-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.archive-row:last-child { border-bottom: 0; }
.archive-row strong, .archive-row span { display: block; }
.archive-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.archive-row span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.archive-row > div { min-width: 0; }
.archive-row .icon-button { width: 32px; height: 32px; flex-basis: 32px; color: var(--green); }
.archive-empty { padding: 24px 0 6px; color: var(--muted); font-size: 12px; text-align: center; }
.coach-live-shell { max-width: 1040px; margin: 0 auto; }
.coach-live-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.coach-live-head h1 { margin: 0; font-size: 25px; }
.saved-counter { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.saved-counter svg { width: 16px; }
.coach-live-layout { min-height: 620px; display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 20px; }
.conversation-stream { min-width: 0; max-height: 660px; overflow-y: auto; padding: 3px 22px 28px 0; border-right: 1px solid var(--line); }
.conversation-turn { max-width: 680px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.conversation-turn.user { margin-left: 44px; }
.conversation-turn header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 8px; }
.conversation-turn header strong { font-size: 12px; }
.conversation-turn header time { color: var(--muted); font: 500 10px "IBM Plex Mono", monospace; }
.conversation-turn p { margin: 0; font-size: 17px; line-height: 1.7; }
.conversation-turn.user > .user-turn-state { padding: 13px 15px; border-left: 3px solid var(--green); background: var(--green-soft); }
.user-turn-state span { color: var(--green); font-size: 11px; font-weight: 700; }
.user-turn-state small { display: block; margin-top: 5px; color: var(--muted); }
.conversation-turn audio { width: 100%; height: 36px; margin-top: 10px; }
.coach-control-panel { min-height: 360px; align-self: start; display: flex; flex-direction: column; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.examiner-presence { width: 100%; display: flex; align-items: center; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.examiner-presence strong, .examiner-presence small { display: block; }
.examiner-presence small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.voice-meter { width: 100%; height: 5px; margin: 34px 0 30px; overflow: hidden; border-radius: 3px; background: #e6eae7; }
.voice-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width 80ms linear; }
.coach-mic-button { width: 82px; height: 82px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--green); color: #fff; cursor: pointer; box-shadow: 0 0 0 8px var(--green-soft); }
.coach-mic-button svg { width: 28px; height: 28px; }
.coach-mic-button.recording { background: var(--red); box-shadow: 0 0 0 8px var(--red-soft); }
.coach-mic-button:disabled { opacity: .45; cursor: not-allowed; }
.coach-state-label { margin-top: 18px; font-size: 13px; }
.turn-meta { width: 100%; display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 20px; color: var(--muted); font: 500 10px "IBM Plex Mono", monospace; }
.session-id { max-width: 100%; overflow: hidden; margin: -8px auto 22px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.exam-shell { max-width: 880px; margin: 0 auto; }
.exam-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.exam-parts { display: flex; gap: 7px; }
.exam-part { min-width: 72px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font: 600 11px "IBM Plex Mono", monospace; text-align: center; }
.exam-part.active { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.exam-part.done { border-color: var(--green); color: var(--green); }
.exam-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.record-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1.2s infinite; }
.record-dot.speaking { background: var(--amber); animation: none; }
@keyframes blink { 50% { opacity: .35; } }
.exam-stage { min-height: 570px; display: grid; grid-template-rows: auto 1fr auto; padding: 30px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.exam-stage-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.timer { position: relative; width: 116px; height: 116px; flex: 0 0 116px; }
.timer svg { width: 116px; height: 116px; transform: rotate(-90deg); }
.timer-bg, .timer-fg { fill: none; stroke-width: 7; }
.timer-bg { stroke: #e6eae7; }
.timer-fg { stroke: var(--amber); stroke-linecap: round; transition: stroke-dashoffset 800ms linear; }
.timer-fg.low { stroke: var(--red); }
.timer-copy { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.timer-copy strong { font: 600 22px "IBM Plex Mono", monospace; }
.timer-copy small { color: var(--muted); font-size: 9px; }
.question-index { color: var(--green); font: 600 11px "IBM Plex Mono", monospace; }
.exam-question { align-self: center; max-width: 660px; margin: 24px auto; text-align: center; }
.exam-question h2 { margin: 0; font-size: 25px; line-height: 1.55; }
.cue-points { max-width: 520px; margin: 18px auto 0; padding: 16px 20px; border-left: 3px solid var(--amber); background: #faf8f2; color: var(--ink-soft); text-align: left; line-height: 1.75; }
.notes { width: 100%; min-height: 92px; margin-top: 18px; resize: vertical; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfb; color: var(--ink); }
.wave-wrap { height: 64px; display: grid; align-items: center; margin-bottom: 14px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#waveCanvas { width: 100%; height: 54px; }
.exam-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.exam-footer-copy { color: var(--muted); font-size: 12px; }
.exam-footer-actions { display: flex; gap: 9px; }
.scoring-state { min-height: 520px; display: grid; place-content: center; padding: 30px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.scoring-spinner { width: 58px; height: 58px; margin: 0 auto 20px; border: 5px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scoring-state h2 { margin: 0; font-size: 22px; }
.scoring-state p { margin: 9px 0 0; color: var(--muted); }
.scoring-steps { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.scoring-steps span { padding: 5px 8px; border-radius: 4px; background: var(--page); color: var(--muted); font-size: 11px; }

.report-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 22px; align-items: start; }
.session-list { display: grid; gap: 8px; }
.session-item { padding: 13px 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); text-align: left; cursor: pointer; }
.session-item.active { border-color: var(--green); box-shadow: inset 3px 0 0 var(--green); }
.session-item time { color: var(--muted); font: 500 10px "IBM Plex Mono", monospace; }
.session-item strong { display: block; margin-top: 4px; font-size: 12px; }
.session-item span { display: block; margin-top: 3px; color: var(--green); font: 600 11px "IBM Plex Mono", monospace; }
.report-main { min-width: 0; }
.report-score-head { display: flex; align-items: center; gap: 17px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.report-score { font: 600 52px/1 "IBM Plex Mono", monospace; }
.report-score-meta h2 { margin: 0; font-size: 18px; }
.report-score-meta p { margin: 5px 0 0; color: var(--muted); }
.demo-badge { display: inline-block; margin-top: 7px; padding: 3px 6px; border-radius: 3px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 700; }
.priority-band { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 20px 0; padding: 16px 18px; border-left: 3px solid var(--amber); background: var(--amber-soft); }
.priority-band strong { display: block; }
.priority-band p { margin: 3px 0 0; color: var(--ink-soft); font-size: 12px; }
.criteria-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.criteria-item { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.criteria-top { display: flex; justify-content: space-between; gap: 10px; }
.criteria-top strong { font-size: 12px; }
.criteria-top span { color: var(--green); font: 600 18px "IBM Plex Mono", monospace; }
.criteria-item p { margin: 9px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.evidence { margin-top: 10px; padding: 9px; border-left: 2px solid var(--line-strong); background: #f7f8f7; color: var(--muted); font-size: 11px; font-style: italic; line-height: 1.55; }
.timeline { margin-top: 27px; }
.timeline-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.play-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--green); cursor: pointer; }
.play-button svg { width: 15px; }
.timeline-time { color: var(--muted); font: 500 10px "IBM Plex Mono", monospace; }
.timeline-sentence { margin-top: 4px; line-height: 1.65; }
.original { color: var(--red); text-decoration: line-through; }
.correction { color: var(--green); font-weight: 700; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border-radius: 4px; background: var(--page); color: var(--muted); font-size: 10px; font-weight: 700; }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }

.notebook-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.notebook-stats { display: flex; gap: 22px; }
.notebook-stat strong { display: block; font: 600 22px "IBM Plex Mono", monospace; }
.notebook-stat span { color: var(--muted); font-size: 11px; }
.subnav { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.subnav button { padding: 10px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.subnav button.active { border-bottom-color: var(--green); color: var(--ink); font-weight: 700; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.filter-chip { min-height: 32px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--muted); cursor: pointer; }
.filter-chip.active { border-color: var(--ink); color: var(--ink); font-weight: 700; }
.mistake-list { display: grid; gap: 10px; }
.mistake-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.mistake-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.repeat-count { color: var(--red); font-size: 11px; font-weight: 700; }
.mistake-lines { margin-top: 13px; }
.mistake-lines p { margin: 6px 0 0; line-height: 1.65; }
.mistake-lines .original { font-size: 13px; }
.mistake-explain { margin-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.mistake-side { min-width: 128px; text-align: right; }
.mastery-label { display: inline-flex; align-items: center; gap: 6px; color: var(--amber); font-size: 11px; font-weight: 700; }
.mastery-label.mastered { color: var(--green); }
.mastery-label.awaiting { color: var(--blue); }
.mastery-dots { display: flex; justify-content: flex-end; gap: 4px; margin-top: 9px; }
.mastery-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.mastery-dot.on { background: var(--green); }
.next-review { margin-top: 9px; color: var(--muted); font-size: 10px; }
.empty-state { padding: 50px 20px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); text-align: center; }
.vocab-list { display: grid; gap: 8px; }
.vocab-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.vocab-word { font-size: 16px; font-weight: 700; }
.vocab-phonetic { margin-left: 8px; color: var(--muted); font: 500 11px "IBM Plex Mono", monospace; }
.vocab-row p { margin: 4px 0 0; color: var(--ink-soft); font-size: 12px; }
.vocab-row small { display: block; margin-top: 4px; color: var(--muted); }

.review-shell { max-width: 760px; margin: 0 auto; }
.review-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.review-progress .progress-track { flex: 1; margin: 0; }
.review-card { min-height: 460px; display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.review-card h2 { margin: 14px 0 7px; font-size: 22px; line-height: 1.5; }
.review-scene { color: var(--muted); line-height: 1.6; }
.answer-area { margin-top: auto; padding-top: 28px; }
.answer-input { width: 100%; min-height: 76px; resize: vertical; padding: 13px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); }
.answer-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 11px; }
.answer-reveal { margin-top: 18px; padding: 16px; background: var(--green-soft); border-left: 3px solid var(--green); }
.answer-reveal strong { display: block; color: var(--green); }
.answer-reveal p { margin: 5px 0 0; line-height: 1.65; }
.rating-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 15px; }
.rating-button { min-height: 54px; padding: 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); cursor: pointer; }
.rating-button strong, .rating-button small { display: block; }
.rating-button small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.rating-button.again { border-color: #e3aaa2; color: var(--red); }
.rating-button.hard { border-color: #e5c985; color: var(--amber); }
.rating-button.good { border-color: #8bbbac; color: var(--green); }
.rating-button.easy { border-color: #9cb2dc; color: var(--blue); }
.review-complete { padding: 58px 25px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-align: center; }
.review-complete-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.review-complete-icon svg { width: 26px; }
.review-complete h2 { margin: 0; }
.review-complete p { max-width: 520px; margin: 9px auto 22px; color: var(--muted); line-height: 1.7; }
.review-complete .head-actions { justify-content: center; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.metric { padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.metric strong { display: block; font: 600 24px "IBM Plex Mono", monospace; }
.metric span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.progress-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 18px; margin-top: 18px; }
.chart-section { padding: 23px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.chart-wrap { width: 100%; height: 250px; margin-top: 18px; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-gridline { stroke: #e4e8e5; stroke-width: 1; }
.chart-line { fill: none; stroke: var(--green); stroke-width: 3; }
.chart-area { fill: rgba(8, 123, 99, 0.08); }
.chart-dot { fill: var(--paper); stroke: var(--green); stroke-width: 3; }
.chart-label { fill: var(--muted); font: 10px "IBM Plex Mono", monospace; }
.target-line { stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 5 5; }
.heatmap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 18px; }
.heat-day { aspect-ratio: 1; border-radius: 3px; background: #e9ecea; }
.heat-day.l1 { background: #bae0d4; }
.heat-day.l2 { background: #69b29f; }
.heat-day.l3 { background: var(--green); }
.category-list { display: grid; gap: 13px; margin-top: 17px; }
.category-row { display: grid; grid-template-columns: 90px 1fr 28px; gap: 9px; align-items: center; font-size: 11px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 18px; background: rgba(12, 16, 14, .66); }
.modal-backdrop.show { display: grid; }
.modal { width: min(530px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 26px; border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; gap: 18px; }
.modal-head h2 { margin: 0; font-size: 22px; }
.modal-head p { margin: 7px 0 0; color: var(--muted); line-height: 1.6; }
.modal-close { border: 0; background: transparent; cursor: pointer; }
.modal-close svg { width: 20px; }
.value-proof { display: flex; gap: 12px; margin: 20px 0; padding: 14px; background: var(--amber-soft); }
.value-proof svg { width: 20px; flex: 0 0 20px; color: var(--amber); }
.value-proof strong { display: block; }
.value-proof span { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 12px; }
.benefit-list { display: grid; gap: 11px; margin: 18px 0; }
.benefit { display: flex; gap: 10px; color: var(--ink-soft); }
.benefit svg { width: 18px; flex: 0 0 18px; color: var(--green); }
.price-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.price-option { padding: 13px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.price-option.selected { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.price-option strong, .price-option small { display: block; }
.price-option strong { margin-top: 5px; font: 600 18px "IBM Plex Mono", monospace; }
.price-option small { color: var(--muted); }
.modal .button.primary { width: 100%; margin-top: 14px; }
.fine-print { margin: 9px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.access-gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; overflow: hidden; padding: 18px; background: var(--page); }
.access-gate[hidden] { display: none; }
.access-panel { width: min(390px, 100%); display: grid; gap: 15px; padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.access-panel .brand-mark { width: 42px; height: 42px; }
.access-panel h1 { margin: 5px 0 0; font-size: 24px; }
.access-panel p { margin: 7px 0 0; color: var(--muted); }
.access-input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); font: inherit; }
.access-input:focus { outline: 2px solid var(--green-soft); border-color: var(--green); }
.access-panel .access-error { min-height: 17px; margin: -7px 0 0; color: var(--red); font-size: 11px; }
.access-panel .button { width: 100%; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 130; max-width: min(390px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 6px; background: var(--ink); color: #fff; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); pointer-events: none; transition: 180ms ease; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 980px) {
  :root { --sidebar-width: 204px; }
  .main-content { padding: 32px 24px 70px; }
  .home-grid, .setup-layout, .progress-layout { grid-template-columns: 1fr; }
  .setup-summary { position: static; }
  .insight-grid { grid-template-columns: 1fr; }
  .hero-action { min-height: 210px; }
}

@media (max-width: 720px) {
  .sidebar { display: none; }
  .mobile-header { position: sticky; top: 0; z-index: 30; height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 9px 15px; border-bottom: 1px solid var(--line); background: rgba(243, 245, 242, .96); }
  .brand.compact { padding: 0; }
  .brand.compact .brand-mark { width: 31px; height: 31px; flex-basis: 31px; font-size: 16px; }
  .brand.compact strong { font-size: 14px; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 40; height: 66px; display: grid; grid-template-columns: repeat(6, 1fr); padding: 5px max(4px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: #fff; }
  .mobile-nav-item { position: relative; display: grid; place-items: center; align-content: center; gap: 2px; border: 0; background: transparent; color: var(--muted); font-size: 9px; cursor: pointer; }
  .mobile-nav-item svg { width: 19px; height: 19px; }
  .mobile-nav-item.active { color: var(--green); font-weight: 700; }
  .mobile-count { position: absolute; top: 1px; left: calc(50% + 5px); min-width: 16px; height: 16px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 8px; background: var(--red); color: #fff; font: 600 8px "IBM Plex Mono", monospace; }
  .main-content { margin-left: 0; padding: 22px 14px 92px; }
  .page-head { align-items: flex-start; margin-bottom: 20px; }
  .page-head h1 { font-size: 23px; }
  .page-head p { font-size: 12px; }
  .page-head .head-actions { align-self: flex-end; }
  .home-grid { gap: 12px; }
  .hero-action { min-height: 0; grid-template-columns: 1fr; align-items: start; padding: 23px 20px; }
  .hero-action h2 { font-size: 23px; }
  .hero-action .button { width: 100%; }
  .score-panel, .plain-section, .loop-section { padding: 19px; }
  .loop-section { overflow-x: auto; }
  .loop-steps { min-width: 590px; }
  .topic-list { grid-template-columns: 1fr; }
  .coach-setup-layout, .coach-live-layout { grid-template-columns: 1fr; }
  .coach-live-head { align-items: stretch; flex-direction: column; }
  .coach-live-head .head-actions { justify-content: space-between; }
  .conversation-stream { min-height: 420px; max-height: none; padding-right: 0; border-right: 0; }
  .conversation-turn.user { margin-left: 20px; }
  .conversation-turn p { font-size: 15px; }
  .coach-control-panel { position: sticky; bottom: 72px; z-index: 5; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 14px; padding: 14px; box-shadow: var(--shadow); }
  .examiner-presence { border-bottom: 0; padding: 0; }
  .voice-meter { grid-column: 1 / -1; order: 3; margin: 0; }
  .coach-mic-button { width: 58px; height: 58px; grid-column: 2; grid-row: 1 / span 2; box-shadow: 0 0 0 5px var(--green-soft); }
  .coach-mic-button.recording { box-shadow: 0 0 0 5px var(--red-soft); }
  .coach-state-label { align-self: start; margin: -13px 0 0 50px; color: var(--muted); font-size: 10px; }
  .turn-meta { display: none; }
  .setup-main, .setup-summary { padding: 19px; }
  .exam-shell { width: 100%; }
  .exam-bar { align-items: flex-start; }
  .exam-parts { gap: 4px; }
  .exam-part { min-width: 58px; padding: 6px; font-size: 9px; }
  .exam-status { font-size: 10px; }
  .exam-stage { min-height: calc(100vh - 185px); padding: 20px 16px; }
  .timer { width: 94px; height: 94px; flex-basis: 94px; }
  .timer svg { width: 94px; height: 94px; }
  .exam-question h2 { font-size: 20px; }
  .exam-footer { align-items: stretch; flex-direction: column; }
  .exam-footer-actions .button { flex: 1; }
  .report-layout { grid-template-columns: 1fr; }
  .session-list { display: flex; overflow-x: auto; padding-bottom: 5px; }
  .session-item { min-width: 175px; }
  .criteria-grid { grid-template-columns: 1fr; }
  .priority-band { align-items: flex-start; flex-direction: column; }
  .timeline-row { grid-template-columns: 38px minmax(0, 1fr); }
  .timeline-row > .button { grid-column: 2; justify-self: start; }
  .notebook-toolbar { align-items: flex-start; flex-direction: column; }
  .notebook-toolbar .button { width: 100%; }
  .mistake-card { grid-template-columns: 1fr; }
  .mistake-side { min-width: 0; text-align: left; }
  .mastery-dots { justify-content: flex-start; }
  .rating-row { grid-template-columns: 1fr 1fr; }
  .review-card { min-height: calc(100vh - 190px); padding: 21px 17px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .chart-section { padding: 18px; }
  .modal { padding: 21px 18px; }
  .toast { right: 16px; bottom: 80px; }
}

@media (max-width: 400px) {
  .page-head { flex-direction: column; }
  .page-head .head-actions { align-self: stretch; }
  .page-head .head-actions .button { flex: 1; }
  .skill-row { grid-template-columns: 102px 1fr 30px; }
  .notebook-stats { width: 100%; justify-content: space-between; gap: 10px; }
  .price-options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
