:root {
  --ink: #18332c;
  --muted: #73817a;
  --paper: #f4f0e8;
  --card: #fffdfa;
  --line: #dddcd3;
  --green: #176b4d;
  --green-dark: #10523b;
  --mint: #dcecdf;
  --lime: #ddeb7a;
  --orange: #e46c45;
  --shadow: 0 20px 60px rgba(36, 54, 47, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 4%, rgba(221, 235, 122, .18), transparent 25rem),
    var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  min-height: 100vh;
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid rgba(23, 107, 77, .3);
  outline-offset: 3px;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 34px 24px 24px;
  border-right: 1px solid rgba(24, 51, 44, .12);
  display: flex;
  flex-direction: column;
  background: rgba(244, 240, 232, .88);
  backdrop-filter: blur(16px);
  z-index: 5;
}

.sidebar-scrim { display: none; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.5px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 11px;
  background: var(--green);
}

.brand-mark span {
  display: block;
  width: 3px;
  border-radius: 4px;
  background: #fff;
}

.brand-mark span:nth-child(1) { height: 9px; }
.brand-mark span:nth-child(2) { height: 17px; }
.brand-mark span:nth-child(3) { height: 23px; }
.brand-mark span:nth-child(4) { height: 13px; }

.main-nav {
  display: grid;
  gap: 7px;
  margin-top: 56px;
}

.nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 13px 15px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.nav-item:hover, .nav-item.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(33, 51, 45, .05);
}

.nav-icon {
  font-size: 22px;
  width: 22px;
  text-align: center;
}

.sidebar-card {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
  background: var(--ink);
  border-radius: 17px;
  color: #fff;
}

.mini-orbit {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--lime);
  font-weight: 700;
}

.sidebar-card strong, .sidebar-card span { display: block; }
.sidebar-card strong { font-size: 15px; }
.sidebar-card span { color: rgba(255,255,255,.62); font-size: 12px; margin-top: 2px; }

.sidebar-footer {
  margin-top: 20px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #55a87c;
  margin-right: 5px;
}

main {
  width: 100%;
  max-width: 1450px;
  margin: 0 auto;
  padding: 38px 48px 64px;
}

.quick-start {
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 1px solid rgba(23, 107, 77, .14);
  border-radius: 14px;
  background: rgba(255, 253, 250, .82);
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(350px, 1.5fr) auto;
  align-items: center;
  gap: 22px;
  box-shadow: 0 8px 30px rgba(36, 54, 47, .04);
}
.quick-start strong { display: block; margin-top: 4px; font-size: 13px; }
.quick-start ol { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; }
.quick-start li { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.quick-start li b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--green); font-size: 11px; }
.quick-start-actions { text-align: right; }
.quick-start-actions small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.quick-start-actions button {
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
}

.exam-strip {
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(24, 51, 44, .12);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 8px 30px rgba(36, 54, 47, .04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.exam-strip.active {
  border-color: rgba(23, 107, 77, .34);
  background: linear-gradient(135deg, #fffdfa, #eef4df);
}
.exam-strip strong { display: block; margin-top: 4px; font-size: 17px; }
.exam-strip p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.exam-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.exam-actions button {
  padding: 10px 14px;
  border: 0;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.exam-actions button:last-child { background: transparent; border: 1px solid var(--line); color: var(--ink); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.eyebrow, .section-label {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 36px);
  letter-spacing: -1.2px;
  font-weight: 600;
}

.daily-goal {
  width: 160px;
}

.daily-goal > span {
  color: var(--muted);
  font-size: 11px;
}

.daily-goal strong {
  float: right;
  font-size: 13px;
}

.goal-bar {
  clear: both;
  height: 5px;
  margin-top: 9px;
  background: #dbded7;
  border-radius: 5px;
  overflow: hidden;
}

.goal-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
  transition: width .3s;
}

.mobile-menu { display: none; }
.view { display: none; }
.view.active { display: block; animation: fade-in .3s ease both; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(5px); }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .8fr);
  gap: 24px;
  align-items: start;
}

.practice-card, .coach-card, .guide-grid article {
  background: var(--card);
  border: 1px solid rgba(24, 51, 44, .1);
  box-shadow: var(--shadow);
}

.practice-card {
  border-radius: 25px;
  overflow: hidden;
}

.part-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.part-tab {
  position: relative;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 18px 20px 17px;
  background: #f7f4ee;
  cursor: pointer;
  font-weight: 600;
  text-align: left;
}

.part-tab:last-child { border-right: 0; }
.part-tab span {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  margin-right: 8px;
  border-radius: 50%;
  border: 1px solid #c9cdc5;
  color: var(--muted);
  font-size: 11px;
}

.part-tab small {
  display: block;
  margin: 3px 0 0 40px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.part-tab.active { background: var(--card); color: var(--green); }
.part-tab.active::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px;
  background: var(--green);
}
.part-tab.active span { border-color: var(--green); color: var(--green); }

.question-area { padding: 42px 45px 39px; min-height: 305px; }
.question-meta { display: flex; align-items: center; justify-content: space-between; }

.topic-pill {
  padding: 6px 10px;
  color: var(--green-dark);
  background: var(--mint);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
}

.question-index {
  color: #9a9f99;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.question-kicker {
  margin: 32px 0 8px;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 14px;
  font-style: italic;
}

.question-area h2 {
  max-width: 660px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 3vw, 43px);
  line-height: 1.12;
  letter-spacing: -1.4px;
  font-weight: 500;
}

.listen-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.speaker-icon { margin-right: 7px; font-size: 14px; }
.question-actions { display: flex; align-items: center; gap: 20px; margin-top: 31px; }
.random-button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f5;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}
.random-button:hover { border-color: var(--green); color: var(--green); }
.random-button:disabled, .reveal-answer:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.cue-points {
  margin: 24px 0 0;
  padding: 15px 18px;
  border-left: 3px solid var(--lime);
  background: #f5f5e9;
  font-family: Georgia, serif;
  font-size: 14px;
  line-height: 1.8;
}
.cue-points p { margin: 0; }
.hidden { display: none !important; }

.recording-panel {
  min-height: 107px;
  padding: 22px 33px;
  border-top: 1px solid var(--line);
  background: #faf8f3;
  display: flex;
  align-items: center;
  gap: 25px;
}

.timer-wrap { display: flex; align-items: center; gap: 14px; min-width: 150px; }
.timer-ring {
  width: 57px;
  height: 57px;
  padding: 4px;
  border-radius: 50%;
  background: conic-gradient(var(--orange) 0%, #e8e6df 0);
  display: grid;
  place-items: center;
}

.record-button {
  width: 49px;
  height: 49px;
  border-radius: 50%;
  border: 4px solid var(--card);
  background: var(--orange);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(228, 108, 69, .25);
}

.record-button span {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: white;
  transition: border-radius .2s, transform .2s;
}

.record-button.recording span { border-radius: 3px; transform: scale(.85); }
.record-button.preparing { background: var(--green); }
.record-button.preparing span { border-radius: 3px; transform: rotate(45deg) scale(.75); }
.record-button:disabled { cursor: wait; opacity: .65; }
.timer-wrap p { margin: 0 0 2px; color: var(--muted); font-size: 11px; }
.timer-wrap strong { font-variant-numeric: tabular-nums; font-size: 17px; }

.waveform {
  flex: 1;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: .28;
}

.waveform i {
  width: 3px;
  height: 8px;
  border-radius: 5px;
  background: var(--green);
}

.waveform i:nth-child(3n) { height: 24px; }
.waveform i:nth-child(4n) { height: 15px; }
.waveform i:nth-child(7n) { height: 33px; }

.waveform.active { opacity: 1; }
.waveform.active i { animation: wave .65s ease-in-out infinite alternate; }
.waveform.active i:nth-child(2n) { animation-delay: -.25s; }
.waveform.active i:nth-child(3n) { animation-delay: -.45s; }
.waveform.live i { animation: none; transition: height .08s linear; }

@keyframes wave {
  to { height: 34px; }
}

.next-button {
  border: 1px solid #c9cec8;
  background: transparent;
  padding: 11px 16px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.next-button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.next-button span { margin-left: 12px; }

.transcription-option {
  padding: 12px 33px;
  border-top: 1px solid var(--line);
  background: #faf8f3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.transcription-option label {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.transcription-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
}

.transcription-option small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}

.practice-alert {
  margin: 0 32px 22px;
  padding: 14px 16px;
  border: 1px solid #f0c2b3;
  border-radius: 11px;
  background: #fff3ed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.practice-alert strong { font-size: 12px; }
.practice-alert p { margin: 3px 0 0; color: #7f6257; font-size: 11px; line-height: 1.55; }
.practice-alert button {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 0;
  border-radius: 7px;
  background: var(--orange);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.transcript-panel {
  padding: 29px 36px 33px;
  border-top: 1px solid var(--line);
}

.panel-heading { display: flex; align-items: center; justify-content: space-between; }
.panel-heading h3 { margin: 0; font-size: 18px; }
.transcript-actions { display: flex; align-items: center; gap: 8px; }
.saved-badge { color: var(--green); background: var(--mint); padding: 6px 9px; border-radius: 6px; font-size: 11px; }
.download-recording {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--green);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
#audioPlayback { width: 100%; height: 36px; margin: 19px 0 12px; }
#transcriptText { color: #475851; font-size: 14px; line-height: 1.7; }

.answer-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 20px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.answer-metrics div { padding: 12px; text-align: center; background: #faf9f5; }
.answer-metrics strong, .answer-metrics span { display: block; }
.answer-metrics strong { font-size: 16px; }
.answer-metrics span { margin-top: 2px; color: var(--muted); font-size: 11px; }

.recording-quality {
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: 9px;
  background: #eef4eb;
  display: grid;
  grid-template-columns: 9px 1fr auto;
  align-items: center;
  gap: 10px;
}
.quality-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.recording-quality strong { display: block; font-size: 11px; }
.recording-quality p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.recording-quality button {
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.recording-quality.warning { background: #fff3df; }
.recording-quality.warning .quality-dot { background: #d7912d; }
.recording-quality.bad { background: #fff0ea; }
.recording-quality.bad .quality-dot { background: var(--orange); }

.analysis-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.analysis-modes legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.analysis-modes label {
  position: relative;
  display: flex;
  min-height: 60px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf9f5;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}

.analysis-modes label:hover { transform: translateY(-1px); border-color: #b8c9bf; }
.analysis-modes label:has(input:focus-visible) {
  outline: 3px solid rgba(23, 107, 77, .3);
  outline-offset: 3px;
}
.analysis-modes label:has(input:checked) { border-color: var(--green); background: var(--mint); }
.analysis-modes label:has(input:disabled) { cursor: not-allowed; opacity: .45; transform: none; }
.analysis-modes input { position: absolute; opacity: 0; pointer-events: none; }
.analysis-modes strong, .analysis-modes small { display: block; }
.analysis-modes strong { font-size: 11px; }
.analysis-modes small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }

.analysis-action {
  margin-top: 21px;
  padding: 17px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.analysis-action strong, .analysis-action span { display: block; }
.analysis-action strong { font-size: 13px; }
.analysis-action div > span { margin-top: 3px; color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.45; }

.analyze-button {
  flex: 0 0 auto;
  padding: 11px 15px;
  border: 0;
  border-radius: 8px;
  background: var(--lime);
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.analyze-button:hover { background: #e9f292; }
.analyze-button:disabled { cursor: wait; opacity: .7; }
.button-spark { margin-right: 6px; }

.privacy-note {
  margin: 0;
  color: #929a95;
  font-size: 11px;
  line-height: 1.55;
}

.analysis-meta {
  margin: 10px 2px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.service-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #75817a;
  font-size: 11px;
  white-space: nowrap;
}

.service-meta span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #eceee8;
}

.service-meta span[data-status="ready"] {
  color: var(--green);
  background: var(--mint);
}

.service-meta span[data-status="warning"] {
  color: #9a5b3d;
  background: #f9e7dc;
}

.ai-feedback {
  padding: 36px;
  border-top: 1px solid var(--line);
  background: #f7f5ef;
}

.feedback-loading {
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.feedback-loading strong { font-size: 15px; }
.feedback-loading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.cancel-analysis {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.cancel-analysis:hover { border-color: var(--orange); color: var(--orange); }

.feedback-error {
  min-height: 150px;
  padding: 30px;
  border: 1px solid #efc7b9;
  border-radius: 13px;
  background: #fff5ef;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 16px;
}
.feedback-error > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
}
.feedback-error strong { font-size: 14px; }
.feedback-error p { margin: 5px 0 0; color: #715f57; font-size: 11px; line-height: 1.55; }
.feedback-error button {
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.loading-orbit {
  width: 40px;
  height: 40px;
  border: 3px solid #d9ddd5;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.feedback-hero {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 25px;
  align-items: center;
}

.band-score {
  width: 96px;
  height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 9px 25px rgba(23, 107, 77, .2);
}

.band-score span, .band-score small { font-size: 11px; color: rgba(255,255,255,.74); }
.band-score strong { margin: -1px 0; font-family: Georgia, serif; font-size: 35px; font-weight: 500; }
.feedback-hero h3 { margin: 0; font-size: 22px; }
.feedback-hero p { margin: 7px 0 0; color: #52625b; font-size: 12px; line-height: 1.6; }

.score-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 27px 0;
}

.score-grid > div {
  position: relative;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
}

.score-grid span, .score-grid strong { display: block; }
.score-grid span { color: var(--muted); font-size: 11px; }
.score-grid strong { margin-top: 3px; font-size: 18px; }
.score-grid i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--green);
  transition: width .5s ease;
}

.azure-assessment {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: -8px 0 27px;
  padding: 17px 19px;
  border: 1px solid #bed8ca;
  border-radius: 12px;
  background: #edf7f1;
}

.azure-assessment h4 { margin: 3px 0 0; font-size: 14px; }
.azure-metrics { display: flex; gap: 8px; }
.azure-metrics div {
  min-width: 74px;
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  text-align: center;
}
.azure-metrics span, .azure-metrics strong { display: block; }
.azure-metrics span { color: var(--muted); font-size: 11px; }
.azure-metrics strong { margin-top: 2px; font-size: 16px; }
.weak-words { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.weak-words:empty { display: none; }
.weak-words span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
  color: #53635b;
  font-size: 11px;
}

.feedback-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.feedback-columns > article {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.feedback-section-title { display: flex; align-items: center; gap: 9px; }
.feedback-section-title span { color: var(--orange); font-size: 11px; font-weight: 700; }
.feedback-section-title h4 { margin: 0; font-size: 14px; }
.feedback-list { display: grid; gap: 9px; margin-top: 15px; }

.feedback-item {
  padding: 11px 12px;
  border-radius: 8px;
  background: #f2f1eb;
}

.feedback-item strong { display: block; font-size: 11px; }
.feedback-item p { margin: 4px 0 0; color: #5e6b65; font-size: 11px; line-height: 1.55; }

.corrected-answer {
  margin-top: 14px;
  padding: 22px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
}

.corrected-answer .section-label { color: var(--lime); }
.corrected-answer h3 { margin: 0; font-size: 17px; }
.corrected-answer > p { margin: 17px 0; font-family: Georgia, serif; font-size: 16px; line-height: 1.7; color: rgba(255,255,255,.88); }
.corrected-answer .round-play { background: var(--lime); color: var(--ink); }
.corrected-actions, .model-card-actions { display: flex; align-items: center; gap: 8px; }
.retry-answer, .reveal-answer {
  padding: 7px 9px;
  border: 1px solid currentColor;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.retry-answer { color: var(--lime); }
.reveal-answer { color: var(--green); }
.next-drill { padding-top: 13px; border-top: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.74); font-size: 11px; line-height: 1.55; }
.next-drill::before { content: "下一步练习  "; color: var(--lime); font-weight: 700; }
.feedback-disclaimer { margin: 13px 0 0; color: #7f8984; font-size: 11px; text-align: center; }

.coach-column { display: grid; gap: 18px; }
.coach-card { padding: 27px; border-radius: 20px; }
.coach-title { display: flex; align-items: center; gap: 12px; }
.coach-title h3 { margin: 0; font-size: 17px; }
.coach-avatar {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--lime);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.sound-focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 25px;
  padding: 13px 14px;
  border-radius: 10px;
  background: #f1f0e9;
  font-family: Georgia, serif;
  font-size: 19px;
}

.mini-play, .round-play {
  border: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  cursor: pointer;
}
.mini-play { width: 29px; height: 29px; font-size: 9px; padding-left: 3px; }
.accent-card > p, .model-content > p {
  color: #52625b;
  font-size: 13px;
  line-height: 1.65;
}

.intonation-demo { margin-top: 19px; }
.intonation-demo span { display: block; font-size: 12px; }
.intonation-demo svg { width: 100%; height: 32px; }
.intonation-demo path { fill: none; stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 4 3; }

.round-play { width: 34px; height: 34px; font-size: 10px; padding-left: 3px; }
.round-play:disabled { cursor: not-allowed; opacity: .35; }
.model-hidden-note {
  margin-top: 20px;
  padding: 18px;
  border: 1px dashed #cbd2cb;
  border-radius: 10px;
  color: var(--muted);
  background: #f7f6f1;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}
.model-content > p { margin: 20px 0 0; }
.phrase-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.phrase-list span { padding: 6px 9px; background: #edf2e9; border-radius: 5px; color: var(--green-dark); font-size: 11px; font-weight: 600; }
.speech-rate {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 6px;
}
.speech-rate > span { margin-right: auto; color: var(--muted); font-size: 11px; }
.speech-rate button {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}
.speech-rate button.active { border-color: var(--green); background: var(--mint); color: var(--green); font-weight: 700; }

.tip-card {
  display: flex;
  gap: 13px;
  padding: 18px 21px;
  border-radius: 14px;
  background: var(--lime);
}
.tip-card span { font-size: 11px; font-weight: 700; margin-top: 3px; }
.tip-card p { margin: 0; font-size: 12px; line-height: 1.55; }

.section-header { display: flex; justify-content: space-between; align-items: end; margin-bottom: 26px; }
.section-header h2 { margin: 0; font-size: 32px; }
.section-note { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.text-button { border: 0; background: transparent; color: var(--orange); cursor: pointer; font-size: 12px; }
.text-button:disabled { cursor: wait; opacity: .55; }
.text-button.danger { color: #9a4b35; }
.history-toolbar { display: flex; gap: 16px; }
.history-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.history-stat {
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
}
.history-stat span, .history-stat strong { display: block; }
.history-stat span { color: var(--muted); font-size: 11px; }
.history-stat strong { margin-top: 5px; font-size: 19px; }
.history-trend {
  grid-column: 1 / -1;
  min-height: 145px;
  padding: 20px 22px;
  border-radius: 15px;
  background: var(--ink);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(170px, .7fr) 1.8fr;
  align-items: center;
  gap: 24px;
}
.history-trend .section-label { color: var(--lime); }
.history-trend h3 { margin: 6px 0 0; font-size: 16px; }
.trend-bars {
  min-height: 90px;
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}
.trend-point {
  width: min(48px, 12%);
  min-width: 26px;
  display: grid;
  justify-items: center;
  gap: 5px;
}
.trend-point strong { font-size: 11px; font-variant-numeric: tabular-nums; }
.trend-point i {
  width: 100%;
  min-height: 4px;
  border-radius: 5px 5px 2px 2px;
  background: var(--lime);
  opacity: .9;
}
.trend-point small { color: rgba(255,255,255,.68); font-size: 11px; }
.trend-empty { align-self: center; color: rgba(255,255,255,.68); font-size: 11px; }
.history-filters { display: flex; gap: 7px; margin-bottom: 12px; }
.history-filters button {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}
.history-filters button.active { border-color: var(--green); background: var(--mint); color: var(--green); font-weight: 700; }
.history-list { display: grid; gap: 11px; }

.history-item, .empty-state {
  padding: 20px 23px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.history-summary { display: grid; grid-template-columns: 70px minmax(0, 1fr) 80px 55px 74px; gap: 16px; align-items: center; }
.history-part { color: var(--green); font-size: 11px; font-weight: 700; }
.history-item h3 { margin: 0 0 5px; font-family: Georgia, serif; font-size: 17px; font-weight: 500; }
.history-item p, .empty-state { margin: 0; color: var(--muted); font-size: 12px; }
.history-duration { font-size: 14px; font-variant-numeric: tabular-nums; }
.history-score { color: var(--green); font-size: 12px; font-weight: 700; text-align: right; }
.history-toggle {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f3ed;
  cursor: pointer;
  font-size: 11px;
}
.history-toggle:disabled { cursor: default; opacity: .55; }
.history-detail { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.history-report-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.history-report-head h4 { margin: 5px 0 0; font-size: 18px; }
.history-report-head > strong { color: var(--green); font-size: 18px; }
.history-detail > p { margin: 12px 0; }
.history-scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.history-scores span { padding: 10px; border-radius: 8px; background: #f2f1eb; }
.history-scores small, .history-scores strong { display: block; }
.history-scores small { color: var(--muted); font-size: 11px; }
.history-scores strong { margin-top: 3px; font-size: 14px; }
.history-block { margin-top: 10px; padding: 13px 14px; border-radius: 9px; background: #f7f5ef; }
.history-block > strong { display: block; margin-bottom: 6px; font-size: 11px; }
.history-block p { line-height: 1.65; }
.history-block ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.history-block li strong { color: var(--ink); margin-right: 5px; }
.history-block.improved { background: var(--ink); }
.history-block.improved strong { color: var(--lime); }
.history-block.improved p { color: rgba(255,255,255,.78); font-family: Georgia, serif; font-size: 14px; }
.history-privacy { display: block; margin-top: 12px; color: #7f8984; font-size: 11px; }

.library-grid {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: start;
}
.library-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.library-card h3 { margin: 5px 0 0; font-size: 21px; }
.question-bank-stats {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.question-bank-stats div {
  display: grid;
  grid-template-columns: 70px 50px 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 10px;
  background: #f4f2ec;
}
.question-bank-stats span { color: var(--green); font-size: 11px; font-weight: 800; }
.question-bank-stats strong { font-size: 22px; }
.question-bank-stats small { color: var(--muted); font-size: 11px; }
.library-card textarea {
  width: 100%;
  min-height: 260px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.55;
  resize: vertical;
}
.library-card textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23,107,77,.1);
  outline: none;
}
.library-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 13px;
}
.library-actions button {
  padding: 10px 13px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.library-actions button:first-of-type { border: 1px solid var(--line); background: transparent; }
.library-actions button:last-of-type { border: 0; background: var(--lime); color: var(--ink); }
.library-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }

.deployment-check {
  margin-bottom: 18px;
  padding: 24px 28px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.deployment-check h3 { margin: 5px 0; font-size: 18px; }
.deployment-check p { margin: 0; color: rgba(255,255,255,.6); font-size: 11px; }
.deployment-items { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.deployment-items span { padding: 8px 10px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 11px; }
.deployment-items span[data-status="ready"] { background: var(--lime); color: var(--ink); }
.deployment-items span[data-status="warning"] { background: rgba(228,108,69,.25); color: #ffd6c8; }

.access-dialog {
  width: min(430px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 30px 90px rgba(10, 35, 27, .28);
}
.access-dialog::backdrop { background: rgba(12, 30, 24, .48); backdrop-filter: blur(3px); }
.access-dialog form { padding: 28px; }
.access-dialog h2 { margin: 6px 0 8px; font-size: 24px; }
.access-dialog form > p { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.access-dialog label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 700; }
.access-dialog input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  outline: none;
}
.access-dialog input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,107,77,.1); }
.access-dialog .form-error { margin: 6px 0 0; color: var(--orange); font-size: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.dialog-actions button { padding: 9px 14px; border-radius: 8px; cursor: pointer; font-weight: 700; }
.dialog-cancel { border: 1px solid var(--line); background: transparent; }
.dialog-submit { border: 0; background: var(--lime); }

.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.guide-grid article { padding: 30px; border-radius: 18px; }
.guide-grid article > span { color: var(--orange); font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.guide-grid h3 { font-size: 20px; margin: 12px 0 8px; }
.guide-grid p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.example { margin-top: 20px; padding: 14px; background: #f2f1ea; border-radius: 8px; font-family: Georgia, serif; font-size: 14px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  transform: translate(-50%, 20px);
  padding: 11px 16px;
  border-radius: 9px;
  background: var(--ink);
  color: white;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1040px) {
  .app-shell { grid-template-columns: 82px minmax(0, 1fr); }
  .sidebar { padding: 28px 15px; align-items: center; }
  .brand > span:last-child, .nav-item:not(.active)::after, .nav-item { font-size: 0; }
  .main-nav { width: 100%; }
  .nav-item { justify-content: center; padding: 12px; }
  .nav-icon { font-size: 22px; }
  .sidebar-card { padding: 9px; }
  .sidebar-card > div:last-child, .sidebar-footer { display: none; }
  main { padding: 34px 28px 55px; }
  .hero-grid { grid-template-columns: 1fr; }
  .coach-column { grid-template-columns: repeat(2, 1fr); }
  .tip-card { grid-column: 1 / -1; }
  .quick-start { grid-template-columns: 1fr auto; }
  .quick-start ol { grid-column: 1 / -1; grid-row: 2; }
  .library-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  body.menu-open { overflow: hidden; }
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100dvh;
    max-height: 100dvh;
    padding-top: max(28px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-105%);
    transition: transform .25s;
    align-items: stretch;
    box-shadow: 20px 0 50px rgba(0,0,0,.15);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 4;
    padding: 0;
    border: 0;
    background: rgba(12, 30, 24, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }
  body.menu-open .sidebar-scrim,
  .sidebar.open + .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }
  .brand > span:last-child { display: inline; }
  .nav-item { min-height: 44px; justify-content: flex-start; font-size: 14px; }
  .sidebar-card > div:last-child, .sidebar-footer { display: block; }
  main { padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(45px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .mobile-menu {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin-right: 13px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-size: 21px;
    cursor: pointer;
  }
  .mobile-menu:hover { background: rgba(23, 107, 77, .08); }
  .topbar { justify-content: flex-start; margin-bottom: 25px; }
  .topbar h1 { font-size: 23px; }
  .daily-goal { display: none; }
  .quick-start { grid-template-columns: 1fr; gap: 12px; }
  .quick-start ol { grid-column: auto; grid-row: auto; flex-direction: column; gap: 7px; }
  .quick-start-actions { text-align: left; }
  .exam-strip { align-items: flex-start; flex-direction: column; }
  .exam-actions { width: 100%; }
  .exam-actions button { flex: 1; }
  .part-tab { padding: 14px 9px; font-size: 12px; }
  .part-tab span { display: none; }
  .part-tab small { margin-left: 0; }
  .question-area { padding: 31px 24px; min-height: 300px; }
  .question-area h2 { font-size: 30px; }
  .recording-panel { padding: 18px; flex-wrap: wrap; }
  .transcription-option { padding: 13px 18px; align-items: flex-start; flex-direction: column; gap: 4px; }
  .transcription-option label { min-height: 44px; }
  .transcription-option small { text-align: left; }
  .practice-alert { margin: 0 18px 18px; align-items: flex-start; flex-direction: column; }
  .waveform { order: 3; flex-basis: 100%; }
  .next-button { margin-left: auto; }
  .analysis-action { align-items: stretch; flex-direction: column; }
  .analysis-meta { align-items: flex-start; flex-direction: column; }
  .service-meta { flex-wrap: wrap; white-space: normal; }
  .analysis-modes { grid-template-columns: 1fr; }
  .panel-heading { flex-wrap: wrap; gap: 12px; }
  .transcript-actions { margin-left: auto; }
  .feedback-loading { justify-content: flex-start; flex-wrap: wrap; }
  .feedback-loading > div { flex: 1 1 170px; }
  .cancel-analysis { margin-left: 58px; }
  .feedback-hero { grid-template-columns: 82px 1fr; gap: 16px; }
  .band-score { width: 78px; height: 78px; }
  .band-score strong { font-size: 29px; }
  .score-grid { grid-template-columns: repeat(2, 1fr); }
  .feedback-columns { grid-template-columns: 1fr; }
  .azure-assessment { grid-template-columns: 1fr; }
  .azure-metrics { display: grid; grid-template-columns: repeat(3, 1fr); }
  .azure-metrics div { min-width: 0; }
  .ai-feedback { padding: 27px 20px; }
  .feedback-error { grid-template-columns: 34px 1fr; padding: 22px; }
  .feedback-error button { grid-column: 2; justify-self: start; }
  .coach-column, .guide-grid { grid-template-columns: 1fr; }
  .section-header { align-items: flex-start; gap: 15px; }
  .history-summary { grid-template-columns: 55px minmax(0, 1fr) 68px; gap: 10px; }
  .history-overview { grid-template-columns: repeat(2, 1fr); }
  .history-trend { grid-template-columns: 1fr; gap: 15px; }
  .trend-bars { justify-content: flex-start; }
  .history-filters { overflow-x: auto; padding-bottom: 3px; }
  .history-filters button { flex: 0 0 auto; }
  .history-score { text-align: right; }
  .history-duration { display: none; }
  .history-toggle { grid-column: 2 / -1; justify-self: end; }
  .history-scores { grid-template-columns: repeat(2, 1fr); }
  .library-card { padding: 20px; }
  .question-bank-stats div { grid-template-columns: 1fr auto; }
  .question-bank-stats small { grid-column: 1 / -1; }
  .library-actions { flex-direction: column; }
  .deployment-check { align-items: flex-start; flex-direction: column; }
  .deployment-items { justify-content: flex-start; }
  .exam-actions button,
  .next-button,
  .analyze-button,
  .random-button,
  .listen-button,
  .text-button,
  .history-filters button,
  .history-toggle,
  .library-actions button,
  .download-recording,
  .cancel-analysis,
  .retry-answer,
  .reveal-answer,
  .speech-rate button,
  .mini-play,
  .round-play {
    min-height: 44px;
  }
  .mini-play, .round-play { min-width: 44px; }
}

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