:root {
  color-scheme: light;
  --paper: #f4f3ee;
  --surface: #fffefa;
  --ink: #1c3039;
  --muted: #60747a;
  --line: #dbe4df;
  --brand: #146b68;
  --brand-deep: #0d4f50;
  --brand-soft: #e4f0ec;
  --gold: #c28b48;
  --radius-card: 18px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 86% 0%, rgba(211, 225, 216, .36), transparent 34rem),
    var(--paper);
  font-size: 15px;
  line-height: 1.65;
}
::selection { color: #fff; background: var(--brand); }

header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 15px max(24px, calc((100vw - 1240px) / 2));
  color: #f6f4ec;
  background: var(--brand-deep);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 5px 22px rgba(18, 50, 50, .11);
}
header h1 {
  margin: 0;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.25;
  letter-spacing: -.035em;
}
header h1 span:first-child { color: #d9e4df; }
header .row { flex: 0 0 auto; }
header #who { color: #d6e5df; }
header #logout { color: var(--ink); background: #f4f3ee; }

#voiceBar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px 12px;
  padding: 11px max(24px, calc((100vw - 1240px) / 2)) !important;
  color: var(--muted);
  background: #e7efeb !important;
  border-bottom: 1px solid #d6e2db;
}
#voiceBar strong { color: var(--brand-deep); }
#voiceBar label { color: var(--muted); }
#voiceBar select { min-width: 120px; }

main { max-width: 1280px; margin: 26px auto; padding: 0 22px; }
h1, h2, h3, h4, p { overflow-wrap: anywhere; }
h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Songti SC", Georgia, serif;
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 650;
  line-height: 1.26;
  letter-spacing: -.035em;
}
h3 { margin: 22px 0 10px; font-size: 20px; line-height: 1.35; letter-spacing: -.02em; }
h4 { margin: 22px 0 8px; font-size: 16px; line-height: 1.4; }
p { margin: 10px 0 14px; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-deep); }
.muted, .zh { color: var(--muted); }
.tiny { font-size: 12px; line-height: 1.6; }

.panel {
  margin-bottom: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 28px rgba(27, 56, 48, .045);
}
#workspace > .panel { margin-top: 16px !important; padding: 26px; }
.cols { gap: 18px; }
.stats { gap: 14px; }
.stat {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  background: linear-gradient(120deg, #e8f0eb, #eff4ef);
  border: 1px solid #dce8df;
  border-radius: 15px;
}
.stat::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--brand); content: ""; }
.stat strong { margin-top: 2px; color: var(--brand-deep); font-size: 25px; line-height: 1.25; letter-spacing: -.03em; }

button, select, input, textarea { font: inherit; }
button {
  min-height: 42px;
  padding: 9px 15px;
  color: #fff;
  background: var(--brand);
  border: 1px solid transparent;
  border-radius: 11px;
  box-shadow: 0 2px 5px rgba(12, 74, 71, .1);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 130ms var(--ease-out);
}
button:hover:not(:disabled) { background: var(--brand-deep); box-shadow: 0 4px 11px rgba(12, 74, 71, .14); }
button:active:not(:disabled) { transform: scale(.975); }
button.secondary {
  color: #21434a;
  background: #eaf0ed;
  border-color: #e1eae5;
  box-shadow: none;
}
button.secondary:hover:not(:disabled) { color: var(--brand-deep); background: #dce9e3; }
button:disabled { opacity: .48; box-shadow: none; cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(194, 139, 72, .65);
  outline-offset: 2px;
}
input, select, textarea {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cad8d1;
  border-radius: 10px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
input:hover, select:hover, textarea:hover { border-color: #93b0a7; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 107, 104, .11); outline: 0; }
input[type="radio"], input[type="checkbox"] { width: auto; min-height: 0; accent-color: var(--brand); }
input[type="file"] { min-height: auto; padding: 8px; }
textarea { min-height: 120px; line-height: 1.7; resize: vertical; }
label { margin: 14px 0 6px; color: #354d53; font-weight: 560; }
label:has(> select), label:has(> input[type="file"]) { min-width: min(210px, 100%); }
.row { gap: 9px; }
.row > select, .row > input { width: auto; min-width: min(210px, 100%); }
.day { width: auto; min-width: 115px; }

.tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}
.tabbar button { min-height: 40px; padding: 8px 14px; }
.tabbar .selected, .study-steps a.active { color: white; background: var(--brand-deep); border-color: var(--brand-deep); }
.study-nav { justify-content: flex-start; gap: 12px; margin-bottom: 22px; }
.study-nav > a { color: var(--brand); font-weight: 620; }
.study-steps { gap: 8px; }
.study-steps a {
  padding: 8px 13px;
  color: #21434a;
  background: #eaf0ed;
  border: 1px solid #e0e8e3;
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}
.study-steps a:hover { background: #dce9e3; }
.study-steps a.active { color: white; }
.study-hero { margin-bottom: 22px; }
.study-hero h2 { margin-bottom: 7px; }
.study-hero p { max-width: 76ch; color: var(--muted); font-size: 16px; }
.study-entry-grid { gap: 14px; margin: 22px 0 28px; }
.study-entry {
  min-height: 150px;
  padding: 22px;
  color: var(--ink);
  background: linear-gradient(145deg, #edf4f0, #f8faf6);
  border: 1px solid #d8e5dd;
  border-radius: 16px;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.study-entry:hover { color: var(--ink); background: #e7f1eb; border-color: #b7cec1; box-shadow: 0 8px 20px rgba(31, 70, 59, .08); }
.study-entry strong { font-size: 18px; line-height: 1.4; }
.study-entry small { color: var(--muted); font-size: 13px; line-height: 1.65; }

.notice {
  padding: 13px 16px;
  color: #493d2d;
  background: #fbf4e6;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
}
.pill { padding: 4px 10px; color: var(--brand-deep); background: var(--brand-soft); font-size: 12px; font-weight: 620; }
.prompt { padding: 17px 19px; color: #344950; background: #f2f5f2; border: 1px solid #e4ebe6; border-radius: 12px; line-height: 1.8; }
.sentence { padding: 16px 0; border-bottom-color: #e2e9e5; }
.en { color: #20383e; font-size: 18px; line-height: 1.65; }
.timer { color: var(--brand-deep); font-size: 30px; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.audio { display: block; width: 100%; min-width: 220px; margin: 8px 0; }
.audio[hidden] { display: none; }
audio { max-width: 100%; accent-color: var(--brand); }
details { margin: 14px 0; padding: 13px 15px; background: #f8f9f6; border: 1px solid #e3e9e4; border-radius: 11px; }
summary { color: #27464c; font-weight: 650; cursor: pointer; }
details[open] > summary { margin-bottom: 12px; }
.line { height: 1px; margin: 22px 0; background: var(--line); }
#translationPanel { border: 1px solid #cbded4 !important; background: #fbfdf9; }
#translationPanel h3 { margin-top: 0; }
#auth { box-shadow: 0 16px 42px rgba(29, 54, 46, .09); }

.tb-workspace { max-width: 1120px; }
.tb-top { align-items: center; }
.tb-eyebrow { color: #697e68; font-size: 11px; letter-spacing: .16em; }
.tb-tabs { gap: 7px; margin: 18px 0; }
.tb-sheet {
  margin-top: 14px;
  padding: clamp(18px, 3vw, 30px);
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 17px;
}
.tb-sheet h3 { margin-top: 14px; }
.tb-vocab-grid { display: grid; grid-template-columns: 1fr; gap: 8px; overflow-x: auto; }
.tb-vocab-card { display: grid; grid-template-columns: minmax(90px, .8fr) auto minmax(110px, 2fr) auto; align-items: center; gap: 12px; min-width: min(100%, 580px); padding: 11px 14px; background: #f7faf7; border: 1px solid var(--line); border-radius: 12px; }
.tb-vocab-term { overflow-wrap: anywhere; }
.tb-vocab-meaning { min-width: 0; margin: 0; }
.tb-vocab-phrase { grid-template-columns: minmax(140px, 1fr) 2fr; }
.tb-reader-line { gap: 18px; padding: 14px 0; }
.tb-question { font-size: 20px; line-height: 1.55; }
.tb-speak { padding: 12px 0; border-bottom-color: var(--line); }
.leo-classroom {
  padding: clamp(17px, 3vw, 25px);
  background: linear-gradient(145deg, #edf5f4, #f8faf7 70%);
  border: 1px solid #d5e4df;
  border-radius: 17px;
}
.leo-heading h3 { margin: 7px 0; }
.leo-frame { background: #12282c; border-radius: 12px; box-shadow: 0 12px 28px rgba(16, 40, 43, .14); }
.leo-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; }
.leo-actions { margin-top: 14px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: #405b5e; background: #f1f5f1; font-size: 13px; }
iframe, img, video { max-width: 100%; }
#content { min-width: 0; }
#content > h2:first-child { margin-top: 2px; }
#content > p:first-of-type:not(.notice) { max-width: 80ch; }

@media (max-width: 780px) {
  main { margin: 16px auto; padding: 0 14px; }
  header { min-height: 68px; padding: 13px 16px; }
  header h1 span:first-child { display: none; }
  #voiceBar { gap: 8px; padding: 10px 14px !important; }
  #voiceBar label { margin-left: 4px !important; }
  #voiceBar select { min-width: 110px; }
  .panel, #workspace > .panel { padding: 18px; }
  .cols { grid-template-columns: 1fr; }
  .study-entry-grid { grid-template-columns: 1fr; }
  .study-entry { min-height: auto; }
  .tb-reader-line { align-items: flex-start; }
  .tb-line-actions { flex-direction: row; }
}
@media (max-width: 560px) {
  body { font-size: 14px; }
  main { padding: 0 10px; }
  header { align-items: flex-start; }
  header h1 { font-size: 18px; }
  #who { max-width: 110px; text-align: right; }
  #voiceBar { display: grid !important; grid-template-columns: auto 1fr; align-items: center; }
  #voiceBar > strong { grid-column: 1 / -1; }
  #voiceBar label { margin: 0 !important; }
  #voiceBar select { width: 100% !important; min-width: 0; }
  #voiceBar button { grid-column: 1 / -1; }
  #voiceBar #speechMessage { grid-column: 1 / -1; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 14px 12px; }
  .stat strong { font-size: 19px; }
  .panel, #workspace > .panel { padding: 15px; border-radius: 15px; }
  .tabbar { flex-wrap: nowrap; overflow-x: auto; margin: 14px -3px 20px; padding: 0 3px 11px; scrollbar-width: thin; }
  .tabbar button { flex: 0 0 auto; }
  .study-nav { align-items: flex-start; }
  .study-steps { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; padding-bottom: 5px; }
  .study-steps a { flex: 0 0 auto; }
  .row { align-items: stretch; }
  .row > button { max-width: 100%; }
  .row > select, .row > input { width: 100%; min-width: 0; }
  .tb-selectors, .leo-selectors { grid-template-columns: 1fr; }
  .tb-reader-line { display: block; }
  .tb-line-actions { justify-content: flex-start; margin-top: 10px; }
  .sentence { padding: 13px 0; }
  .en { font-size: 16px; }
  textarea { min-height: 150px; }
  th, td { padding: 8px; }
}
@media (max-width: 360px) {
  .stats { grid-template-columns: 1fr; }
  header .row { gap: 4px; }
}
@media (hover: none) {
  button:hover:not(:disabled) { color: #fff; background: var(--brand); box-shadow: none; }
  button.secondary:hover:not(:disabled) { color: #21434a; background: #eaf0ed; }
  .study-entry:hover { color: var(--ink); background: linear-gradient(145deg, #edf4f0, #f8faf6); border-color: #d8e5dd; box-shadow: none; }
  .study-steps a:hover { background: #eaf0ed; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Compact workspace layout: make the daily action obvious and keep secondary controls quiet. */
#workspace > .stats { max-width: 1380px; margin: 0 auto 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.app-shell { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 18px; align-items: start; max-width: 1380px; margin: 0 auto; }
.app-sidebar { position: sticky; top: 14px; min-width: 0; padding: 16px 12px; background: rgba(255, 254, 250, .9); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 20px rgba(27, 56, 48, .035); }
#globalCourseSelector { display: grid; gap: 3px; padding: 6px 8px 14px; border-bottom: 1px solid var(--line); }
.sidebar-label { color: var(--muted); font-size: 12px; }
#currentDayLabel { color: var(--brand-deep); font-size: 25px; letter-spacing: -.04em; }
#reviewDayWrap:not(.hidden) { display: grid; gap: 5px; margin-top: 9px; }
#reviewDayWrap label { margin: 0; font-size: 12px; }
#reviewDay { width: 100% !important; min-width: 0; padding: 8px; font-size: 13px; }
.app-sidebar .tabbar { display: grid; gap: 4px; margin: 12px 0; padding: 0; border: 0; }
.app-sidebar .tabbar button { justify-content: flex-start; min-height: 42px; padding: 9px 11px; text-align: left; color: #425b5d; background: transparent; border: 0; box-shadow: none; }
.app-sidebar .tabbar button:hover:not(:disabled) { color: var(--brand-deep); background: #eef3ef; }
.app-sidebar .tabbar button.selected { color: #fff; background: var(--brand-deep); }
.sidebar-course-group { display: grid; gap: 3px; }
.sidebar-course-links { display: grid; gap: 2px; margin: 0 0 7px 12px; padding-left: 10px; border-left: 1px solid var(--line); }
.sidebar-course-links a { display: block; padding: 8px 10px; border-radius: 8px; color: #526b6c; font-size: 13px; text-decoration: none; }
.sidebar-course-links a:hover, .sidebar-course-links a.active { color: var(--brand-deep); background: #eef3ef; }

.voice-settings { margin: 12px 0 0; padding: 9px 10px; background: #f4f6f1; border-color: #e5e9e1; }
.voice-settings > summary { font-size: 13px; }
.voice-controls { display: grid; gap: 5px; padding-top: 8px; }
.voice-controls label { margin: 3px 0 0; font-size: 12px; }
.voice-controls select { width: 100%; min-width: 0; padding: 8px; font-size: 13px; }
.voice-controls button { min-height: 36px; }
.app-main { min-width: 0; min-height: 65vh; padding: clamp(20px, 3vw, 34px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 28px rgba(27, 56, 48, .045); }
.app-main #content > h2:first-child { margin-top: 0; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 0 0 20px; }
.page-heading h2 { margin: 2px 0 4px; }
.page-heading p { margin: 0; color: var(--muted); }
.eyebrow { color: #738577; font-size: 11px; font-weight: 700; letter-spacing: .15em; }
.daily-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 16px; align-items: center; margin: 0 0 20px; padding: 14px 16px; background: #f0f5f0; border: 1px solid #e0e9df; border-radius: 13px; }
.daily-progress-copy { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.daily-progress-copy strong { color: var(--ink); }
.daily-progress progress { grid-column: 1; width: 100%; height: 7px; accent-color: var(--brand); }
.daily-progress button { grid-column: 2; grid-row: 1 / span 2; }
.daily-lock { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.review-mode { grid-template-columns: 1fr auto; }
.study-entry-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; }
.study-entry { display: grid; min-height: auto; gap: 2px; padding: 16px 18px; }
.study-entry span { color: var(--muted); font-size: 12px; }
.study-entry strong { font-size: 17px; }
.study-entry small { font-size: 12px; }
.timer-card { display: grid; gap: 10px; padding: 16px; background: #f7f8f3; border: 1px solid var(--line); border-radius: 15px; }
.timer-card .row { align-items: center; }
.timer-card h3 { margin: 0; font-size: 16px; }
.timer-card .timer { margin-left: auto; font-size: 23px; }
.timer-card .row button { flex: 1; min-width: 0; padding-inline: 9px; }
.global-timer { margin: 14px 0; }
.global-timer .row:first-child { justify-content: space-between; }
.global-timer .row:first-child b { display: block; }
.global-timer .timer { margin-left: auto; }
.global-timer .row:nth-child(2) button { flex: 0 1 auto; }
.global-timer #timerSummary { display: block; }
#timerPauseNotice { width: min(420px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 18px; padding: 22px; color: var(--ink); box-shadow: 0 18px 60px #102b3550; }
#timerPauseNotice::backdrop { background: #102b3599; }
#timerPauseNotice h2 { margin: 0 0 10px; }
#timerPauseNotice p { color: var(--muted); line-height: 1.6; }
.bbc-source, .recordings-card, .translation-panel, .family-section { margin: 14px 0; padding: 20px; background: #fffefa; border: 1px solid var(--line); border-radius: 16px; }
.bbc-source h3, .recordings-card h3 { margin: 0; }
.bbc-source > .row:first-child h3 { flex: 1; }
.bbc-source .audio { margin: 15px 0 8px; }
.audio-actions { align-items: center; }
.translation-panel { margin-top: 22px; }
.translation-panel > h3 { margin-top: 0; }
.translation-result { padding: 18px; background: #f1f6f1; border: 1px solid #e0e9df; border-radius: 13px; }
.translation-result h3 { margin: 0; }
.translation-result .row > div { display: flex; gap: 6px; }
.english-result { margin-top: 12px; white-space: pre-wrap; font-size: 18px; line-height: 1.8; }
.translation-line { padding: 14px 4px; border-bottom: 1px solid var(--line); }
.translation-line p { margin: 4px 0 9px; }
.translation-line > p:nth-of-type(2) { font-size: 17px; line-height: 1.65; }
.back-translation { display: inline-block; margin-left: 8px; padding: 6px 9px; vertical-align: middle; }
.back-translation > summary { font-size: 12px; }
.phrase-notes, .quality-details, .supporting-work, .admin-section { margin: 16px 0; }
.phrase-line { padding: 12px 0; border-bottom: 1px solid var(--line); }
.phrase-line p { margin: 3px 0; }
.diary-actions { align-items: end; margin: 8px 0 18px; }
.diary-actions #diaryCount { margin-right: auto; }
.diary-actions label { margin: 0; }
.diary-actions select { width: auto; min-width: 175px; }
.admin-section { padding: 15px 17px; }
.admin-section > summary { font-size: 15px; }
.family-section > h3 { margin-top: 0; }
.progress-stats { grid-template-columns: minmax(0, 1fr); margin: 12px 0 20px; }
.progress-stats .stat { display: grid; gap: 3px; }
.progress-stats .stat strong { font-size: 20px; }
.supporting-work .sentence { display: flex; justify-content: space-between; gap: 12px; }
.study-page #workspace > .stats { display: none; }
.study-page .app-shell { display: grid; max-width: 1380px; }
.study-page .app-sidebar { display: block; }
.study-page .app-sidebar .tabbar, .study-page #globalCourseSelector { display: grid; }
.study-page .app-main { min-height: 0; padding: clamp(16px, 2.4vw, 30px); }
.study-page .study-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 16px; }
.study-page .back-link { font-weight: 650; text-decoration: none; }
.study-page .study-hero { margin: 0 0 18px; }
.study-page .study-hero h2 { margin: 0; }
.study-page .tb-top p { margin: 0; }
.study-page .tb-workspace > .row:last-of-type { margin-top: 14px; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 190px minmax(0, 1fr); gap: 12px; }
  .app-main { padding: 20px; }
}
@media (max-width: 720px) {
  .app-shell { display: block; }
  .app-sidebar { position: static; margin-bottom: 12px; padding: 10px; }
  #globalCourseSelector { display: flex; flex-wrap: wrap; align-items: center; padding: 4px 5px 9px; }
  #currentDayLabel { font-size: 20px; }
  #reviewDayWrap:not(.hidden) { display: flex; flex: 1 1 100%; align-items: center; }
  #reviewDay { width: auto !important; flex: 1; }
  .app-sidebar .tabbar { display: flex; gap: 5px; margin: 8px 0 0; overflow-x: auto; scrollbar-width: thin; }
  .app-sidebar .tabbar button { flex: 0 0 auto; min-height: 38px; padding: 7px 10px; white-space: nowrap; }
  .voice-settings { margin: 8px 0 0; }
  .voice-controls { grid-template-columns: auto 1fr; align-items: center; }
  .voice-controls label { margin-top: 0; }
  .app-main { min-height: 0; }
  .study-entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .study-entry { padding: 13px; }
  .study-entry strong { font-size: 15px; }
}
@media (max-width: 560px) {
  #workspace > .stats { gap: 8px; }
  .app-main { padding: 15px; }
  .page-heading { align-items: flex-start; }
  .daily-progress { grid-template-columns: minmax(0, 1fr); }
  .daily-progress button { grid-column: 1; grid-row: auto; }
  .daily-progress-copy { align-items: flex-start; }
  .study-entry-grid { grid-template-columns: 1fr; }
  .study-entry { padding: 15px; }
  .timer-card .row:first-child { flex-wrap: wrap; }
  .diary-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .diary-actions #diaryCount { grid-column: 1 / -1; }
  .diary-actions label { grid-column: 1 / -1; }
  .diary-actions select, .diary-actions button { width: 100%; min-width: 0; }
  .progress-stats { grid-template-columns: 1fr 1fr; }
  .study-page .study-nav { align-items: flex-start; flex-direction: column; }
  .study-page .study-steps { width: 100%; }
  .bbc-source, .recordings-card, .translation-panel, .family-section { padding: 15px; }
}
#voiceBar { position: static; display: block !important; padding: 9px 10px !important; color: var(--muted); background: #f4f6f1 !important; border: 1px solid #e5e9e1; box-shadow: none; }

.reading-assignment{max-width:900px;margin-inline:auto}.reading-passage{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--paper,#fbfcfa);border:1px solid var(--line,#d9e3df);border-left:4px solid var(--teal,#176d7d);border-radius:12px;padding:clamp(18px,3vw,30px);font-size:1.08rem;line-height:1.9;color:var(--ink,#163342)}.reading-summary{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 16px;margin:12px 0;border-radius:12px;background:#edf5f3;border:1px solid #c4ded8;color:#145663}.reading-question{min-width:0;border:1px solid var(--line,#d9e3df);border-radius:12px;padding:14px 16px;margin:12px 0}.reading-question legend{font-weight:650;padding:0 6px}.reading-option{display:flex;align-items:flex-start;gap:10px;padding:9px 8px;border-radius:8px;cursor:pointer}.reading-option:hover{background:#edf5f3}.reading-option.is-answer{background:#eef7f2;border:1px solid #b9dec8}.reading-option.is-correct{background:#e3f4ea;border:1px solid #72b891}.reading-option.is-wrong{background:#fdf0ef;border:1px solid #e2a49f}.reading-option input{flex:0 0 auto;width:18px;height:18px;margin:2px 0 0}.reading-feedback{margin:8px 8px 4px;color:#1b6e44;font-weight:600}.reading-feedback.is-wrong{color:#b03a2e}.reading-explanation{margin:2px 8px 4px;line-height:1.55}.reading-credit{font-size:.92rem}
.bbc-transcript { margin: 14px 0; padding: 0 18px 6px; background: #f7faf7; border: 1px solid var(--line); border-radius: 14px; }
.bbc-transcript > summary { display: flex; align-items: center; gap: 9px; padding: 14px 0; color: var(--brand-deep); font-weight: 600; cursor: pointer; }
.bbc-transcript > summary::before { content: '▸'; color: var(--brand); font-size: 12px; transition: transform .18s var(--ease-out); }
.bbc-transcript[open] > summary::before { transform: rotate(90deg); }
.tr-badge { padding: 1px 9px; color: var(--muted); font-size: 12px; font-weight: 500; background: #eef3ee; border: 1px solid var(--line); border-radius: 999px; }
.tr-body { padding: 2px 2px 14px; }
.tr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid #e8eee8; }
.tr-hint { margin-left: auto; color: var(--muted); }
.tr-turn { display: flex; gap: 12px; padding: 7px 0; border-top: 1px dashed #e4ebe4; }
.tr-turn:first-of-type { border-top: 0; }
.tr-speaker { flex: 0 0 88px; padding-top: 2px; color: var(--brand-deep); font-size: 13px; font-weight: 600; }
.tr-text { flex: 1; margin: 0; padding: 2px 6px; line-height: 1.95; border-radius: 8px; cursor: pointer; }
.tr-text:hover { background: #f1f6f1; }
.tr-sentence { border-radius: 4px; cursor: pointer; }
.tr-sentence.selected { background: var(--brand-soft); box-shadow: inset 0 0 0 1px #b9d8cd; }
.tr-empty { margin: 0 0 10px; }
@media (max-width: 640px) {
  .bbc-transcript { padding: 0 12px 6px; }
  .tr-turn { flex-direction: column; gap: 2px; }
  .tr-speaker { flex: none; }
}

/* 划词翻译浮层：选中逐字稿任意片段后出现在选区旁边，避免遮挡正文。 */

/* 设为目标句的就地提示：不再把页面拽走，用户想录音时自己点 */
.tr-toast { position: fixed; left: 50%; bottom: 26px; z-index: 95; display: inline-flex; align-items: center; gap: 10px; min-height: 0; padding: 9px 15px; color: #eef7f3; background: #102b35f2; border: 1px solid #1d4a52; border-radius: 999px; box-shadow: 0 10px 26px rgba(16, 43, 53, .26); font-size: 13px; line-height: 1.5; opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: opacity .18s var(--ease-out), transform .18s var(--ease-out); }
.tr-toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; cursor: pointer; }
.tr-toast.on:hover { background: #16404a; }
.tr-toast-act { color: #9fd8c8; font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) { .tr-toast { bottom: 16px; font-size: 12.5px; } }

/* 手机录音二维码弹层 */
.qr-mask { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(13, 27, 31, .72); }
.qr-mask.on { display: flex; }
.qr-card { width: 100%; max-width: 320px; padding: 20px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.qr-card h3 { margin: 0 0 6px; font-size: 16px; }
.qr-card p { margin: 0 0 8px; }
.qr-img { display: block; width: 200px; height: 200px; margin: 12px auto; background: #fff; border-radius: 8px; }
.qr-url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); word-break: break-all; }
.qr-card button { margin-top: 6px; }
@media (max-width: 640px) { .qr-card { max-width: 300px; padding: 16px; } .qr-img { width: 180px; height: 180px; } }

/* 录音管理：每行 = 标题 + 播放器 + 删除 */
.recording-row, .supporting-work .sentence.recording-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: flex-start;
}
.recording-row > span { flex: 0 1 auto; }
.recording-row > b { flex: 0 0 auto; }
.recording-row .audio { flex: 1 1 220px; min-width: 170px; margin: 0; }
.recording-row button { flex: 0 0 auto; padding: 8px 13px; font-size: 13px; }
.recordings-card > .row { align-items: center; justify-content: space-between; margin-bottom: 4px; }
.recordings-card > .row h3 { margin: 0; }
button.danger { color: #a53f34; background: #fbeeec; border-color: #f0d9d5; box-shadow: none; }
button.danger:hover:not(:disabled) { color: #fff; background: #b4443a; border-color: #b4443a; box-shadow: 0 4px 11px rgba(180, 68, 58, .18); }

/* ==========================================================================
   8.63.7 · 手机端（≤720px）首屏直达跟读
   全部规则都在 media query 内，桌面端零影响。
   目标：打开就跟读 —— 录音按钮必须出现在第一屏（390×844 内）。
   ========================================================================== */

@media (max-width: 720px) {
  /* --- 侧边栏：312px → 约 125px，导航压成一行可横滑 --- */
  .app-sidebar { margin-bottom: 10px; padding: 8px 8px 6px; }
  #globalCourseSelector { padding: 2px 4px 8px; gap: 2px; }
  #currentDayLabel { font-size: 19px; }
  .app-sidebar .tabbar {
    display: flex; flex-wrap: nowrap; gap: 5px;
    margin: 0; padding: 0 0 2px;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .app-sidebar .tabbar::-webkit-scrollbar { display: none; }
  .sidebar-course-group { display: flex; flex: 0 0 auto; gap: 5px; }
  .sidebar-course-links { display: flex; flex: 0 0 auto; gap: 5px; margin: 0; padding: 0; border: 0; }
  .sidebar-course-links a {
    display: flex; align-items: center; white-space: nowrap;
    padding: 8px 12px; font-size: 13px; border-radius: 9px; background: #eef3ef;
  }
  .app-sidebar .tabbar button { flex: 0 0 auto; min-height: 40px; padding: 8px 12px; white-space: nowrap; border-radius: 9px; }
  .voice-settings { margin: 8px 0 0; }

  /* --- 计时器：234px → 约 115px --- */
  .global-timer { margin: 10px 0; padding: 12px; gap: 8px; }
  .global-timer .row:first-child { align-items: baseline; gap: 6px; }
  .global-timer .row:first-child b { font-size: 13px; }
  .global-timer #timerContext { display: none; }
  .global-timer .timer { font-size: 19px; }
  .global-timer .row:nth-child(2) {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  }
  .global-timer .row:nth-child(2) > button { min-height: 36px; padding: 0 5px; font-size: 12.5px; }
  .global-timer #timerSummary { display: none; }
}

@media (max-width: 720px) {
  /* --- 跟读页：让出首屏 --- */
  body[data-tab="listen"] #workspace > .stats { display: none; }
  body[data-tab="listen"] .app-main { padding: 12px; border-radius: 15px; }
  body[data-tab="listen"] .page-heading { margin-bottom: 12px; align-items: flex-start; }
  body[data-tab="listen"] .page-heading h2 { font-size: 19px; }
  body[data-tab="listen"] .page-heading .pill { margin-top: 2px; }
  body[data-tab="listen"] .bbc-source,
  body[data-tab="listen"] .recordings-card { margin: 0 0 12px; padding: 14px; }
  body[data-tab="listen"] .bbc-source .audio { margin: 10px 0 6px; }
  body[data-tab="listen"] .bbc-transcript { margin: 0 0 12px; }
  body[data-tab="listen"] .bbc-transcript > summary { padding: 13px 0; }
  body[data-tab="listen"] #voiceBar { display: none !important; }
}

@media (max-width: 560px) {
  /* Echo 跟读目标句需适配窄屏。 */
  #bbcTargetSentence { font-size: 16px; }

  /* 逐字稿收起时保持一眼可见的入口 */
  .bbc-transcript > summary { font-size: 14px; }
}

@media (max-width: 720px) {
  /* --- 跟读页继续收紧：把「开始录音」推进第一屏（390×844） --- */
  body[data-tab="listen"] .page-heading { margin: 0 0 10px; align-items: center; gap: 8px; }
  body[data-tab="listen"] .page-heading > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  body[data-tab="listen"] .page-heading .eyebrow { display: none; }
  body[data-tab="listen"] .page-heading h2 { margin: 0; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body[data-tab="listen"] .page-heading .pill { flex: 0 0 auto; margin: 0; }

  /* 计时器：跟读页只留「开始 / 暂停 / 保存」，补记与清除回到其它页签 */
  body[data-tab="listen"] .global-timer .row:nth-child(2) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-tab="listen"] .global-timer .row:nth-child(2) > button:nth-child(4),
  body[data-tab="listen"] .global-timer .row:nth-child(2) > button:nth-child(5) { display: none; }

  /* 音源卡片：标题与周次同一行，原文链接紧跟 */
  body[data-tab="listen"] .bbc-source h3 { font-size: 16px; line-height: 1.35; }
  body[data-tab="listen"] .bbc-source .audio-actions { gap: 6px; }
  body[data-tab="listen"] .bbc-source .audio-actions > button { min-height: 36px; font-size: 13px; }
}

@media (max-width: 560px) {
  body[data-tab="listen"] #bbcTargetSentence { height: 86px; min-height: 86px; }
}

@media (max-width: 720px) {
  /* --- 顶栏瘦身：版本号不再换行 --- */
  header { padding: 9px 14px; min-height: 0; }
  header h1 { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; font-size: 17px; line-height: 1.2; }
  header h1 > span:first-child { display: none; }          /* 「我的私人英语工作台」手机不显示 */
  #appVersion { flex: 0 0 auto; padding: 2px 6px !important; font-size: 10.5px !important; }
  #who { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #logout { padding: 8px 12px; }

  /* --- 侧边栏再瘦 14px --- */
  #globalCourseSelector { display: flex; align-items: baseline; gap: 7px; padding: 0 2px 6px; }
  .sidebar-label { font-size: 12px; }
  #currentDayLabel { font-size: 17px; }

  /* --- 计时器再瘦 30px --- */
  .global-timer { padding: 9px 10px; gap: 6px; margin: 8px 0; }
  .global-timer .row:first-child b { font-size: 12.5px; }
  .global-timer .timer { font-size: 17px; }
  .global-timer .row:nth-child(2) > button { min-height: 32px; font-size: 12px; }
}

@media (max-width: 560px) {
  body[data-tab="listen"] .app-main { padding: 11px; }
  body[data-tab="listen"] .bbc-source { padding: 12px; }
  body[data-tab="listen"] .bbc-source .audio { margin: 8px 0 4px; }
}

@media (max-width: 720px) {
  /* --- 跟读页：计时器下移到跟读区之后，首屏优先给录音 --- */
  body[data-tab="listen"] #workspace { display: flex; flex-direction: column; }
  body[data-tab="listen"] .app-shell { order: 1; }
  body[data-tab="listen"] .global-timer { order: 2; margin: 12px 0 0; }
  body[data-tab="listen"] header { padding: 8px 14px; }
  body[data-tab="listen"] header h1 { font-size: 16px; }
}

@media (max-width: 720px) {
  /* 修正：flex 列布局会让子项按 min-content 撑宽，必须显式归零 */
  body[data-tab="listen"] #workspace > * { min-width: 0; }
  body[data-tab="listen"] .app-shell { width: 100%; min-width: 0; }
  body[data-tab="listen"] .global-timer { width: auto; }
  body[data-tab="listen"] .bbc-source .row > h3 { min-width: 0; overflow-wrap: anywhere; }
}

@media (max-width: 560px) {
  /* 顶栏只留「退出」，避免 "tester · 管…" 被截断 */
  #who { display: none; }
  /* 导航可横滑的视觉提示 */
  .app-sidebar { position: relative; }
  .app-sidebar::after {
    content: ''; position: absolute; top: 38px; right: 6px; bottom: 8px; width: 26px;
    background: linear-gradient(to right, rgba(255,254,250,0), rgba(255,254,250,.96));
    pointer-events: none; border-radius: 0 9px 9px 0;
  }
}

/* 小屏（≤380px，如 iPhone SE / 多数安卓机）：再挤一档，保证录音键在首屏 */
@media (max-width: 380px) {
  body[data-tab="listen"] header { padding: 6px 12px; }
  body[data-tab="listen"] .app-sidebar { padding: 6px 6px 4px; }
  body[data-tab="listen"] #globalCourseSelector { padding-bottom: 4px; }
  body[data-tab="listen"] .app-main { padding: 9px; }
  body[data-tab="listen"] .page-heading { margin-bottom: 8px; }
  body[data-tab="listen"] .bbc-source { padding: 10px; }
  body[data-tab="listen"] .bbc-source .audio { height: 44px; }
  body[data-tab="listen"] #bbcTargetSentence { height: 68px; min-height: 68px; }
}

/* 矮屏（≤700px 高，如 iPhone SE 667）：最后一档压缩，仍然保证录音键首屏可见 */
@media (max-width: 420px) and (max-height: 700px) {
  body[data-tab="listen"] header { padding: 5px 12px; }
  body[data-tab="listen"] .app-sidebar { padding: 5px 6px 3px; }
  body[data-tab="listen"] .page-heading { margin-bottom: 6px; }
  body[data-tab="listen"] .bbc-source .audio { height: 40px; }
  body[data-tab="listen"] #bbcTargetSentence { height: 58px; min-height: 58px; }
}
@media (max-width: 420px) and (max-height: 700px) {
}
@media (max-width: 420px) and (max-height: 700px) {
  body[data-tab="listen"] .page-heading { margin-bottom: 3px; }
}

/* 横滑渐隐提示会盖住「发音设置」一行，去掉 */
@media (max-width: 560px) { .app-sidebar::after { content: none; } }

/* ==========================================================================
   8.81.0 · 自动逐句精听 + 7 轮复习
   ========================================================================== */

/* 跟读卡标题行：8 个圆点 + 阶段标签，不额外占行高 */
.stage-row { flex-wrap: nowrap; gap: 8px; }
.stage-row h3 { flex: 1; min-width: 0; }
.stage-dots { display: inline-flex; flex: 0 0 auto; gap: 3px; align-items: center; }
.stage-dots i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #d5e2e3; }
.stage-dots i.done { background: #176d7d; }
.stage-dots i.now { background: #fff; box-shadow: inset 0 0 0 2px #176d7d; }

/* 难度选择弹窗 */
#stageDone {
  width: min(430px, calc(100% - 32px));
  padding: 22px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 60px #102b3550;
}
#stageDone::backdrop { background: #102b3599; }
#stageDone h2 { margin: 0 0 8px; font-size: 19px; }
#stageDone p { margin: 0; }
.stage-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.stage-diff button {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  min-height: 54px; padding: 9px 13px; text-align: left;
}
.stage-diff button small { font-size: 11.5px; font-weight: 400; opacity: .78; }
.stage-diff button[data-diff="very_hard"] { grid-column: 1 / -1; }

/* 课程页「今日待复习」 */
.due-card {
  margin: 16px 0;
  padding: 18px;
  background: #fffefa;
  border: 1px solid var(--line);
  border-left: 4px solid #d7a450;
  border-radius: 16px;
}
.due-card h3 { margin: 0; }
.due-card > p { margin: 4px 0 6px; }
.due-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 2px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid #eef2ef;
}
.due-row:last-child { border-bottom: 0; }
.due-row b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 600; }
.due-row span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.due-row:hover b { color: var(--brand-deep); }

@media (max-width: 560px) {
  .due-card { padding: 14px; }
  .due-row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .stage-row { gap: 6px; }
  .stage-dots i { width: 6px; height: 6px; }
  .stage-diff { gap: 6px; }
  .stage-diff button { min-height: 50px; padding: 8px 11px; }
}

/* 难度按钮按「轻松→吃力」渐变，一眼能扫 */
.stage-diff button[data-diff="very_easy"] { color: #14594a; background: #e6f4ed; }
.stage-diff button[data-diff="easy"]      { color: #1c5a4c; background: #eff6f1; }
.stage-diff button[data-diff="ok"]        { color: #fff;    background: #176d7d; }
.stage-diff button[data-diff="hard"]      { color: #8a5a1c; background: #fbf1e2; }
.stage-diff button[data-diff="very_hard"] { color: #9c3d32; background: #fbeae7; }
.stage-diff button[data-diff="very_easy"] small,
.stage-diff button[data-diff="easy"] small,
.stage-diff button[data-diff="hard"] small,
.stage-diff button[data-diff="very_hard"] small { opacity: .72; }

/* 跟读页顶部的待复习入口（不占额外行高，替代挑战数徽标） */
.due-pill { color: #8a5a1c !important; background: #fbf1e2 !important; text-decoration: none; white-space: nowrap; }
.due-pill:hover { background: #f7e7cf !important; }

/* Echo-Loop style BBC sentence practice: media first, one active target, then transcript. */
.echo-practice { margin: 14px 0; padding: clamp(16px, 2.5vw, 24px); background: #fffefa; border: 1px solid var(--line); border-radius: 18px; }
.echo-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.echo-heading .eyebrow { color: #64836b; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.echo-heading h3 { margin: 3px 0 0; }
.echo-target { padding: 16px; background: #f1f6f3; border: 1px solid #dce9e1; border-radius: 14px; }
.echo-target label { display: block; margin: 0 0 6px; font-weight: 650; }
.echo-target textarea[readonly] { min-height: 72px; background: #fff; }
.echo-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.echo-controls label { margin: 0 2px 0 0; }
.echo-controls select { width: auto; min-width: 100px; }
.echo-controls #recordButton { background: var(--brand); }
.echo-controls #bbcCompleteButton { display: none; }
.echo-target #recordStatus { margin: 9px 0 0; }
.echo-target #playback { margin-top: 8px; }
.echo-hint { margin: 10px 0 0; font-size: 13px; }
@media (max-width: 560px) {
  .echo-practice { padding: 12px; }
  .echo-target { padding: 12px; }
  .echo-controls { display: grid; grid-template-columns: auto minmax(80px, 1fr) 1fr 1fr; }
  .echo-controls #playTarget { grid-column: 1 / -1; }
  .echo-controls #saveRec, .echo-controls #micQrBtn, .echo-controls #bbcCompleteButton { grid-column: span 2; }
  .echo-target #recordStatus, .echo-target #playback { grid-column: 1 / -1; }
}

/* Echo Loop's first-study and seven-review-round workflow. */
.bbc-learning-loop { margin: 14px 0; padding: clamp(16px,2.5vw,24px); border: 1px solid var(--line); border-radius: 18px; background: #f8fbf8; }
.loop-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.loop-head .eyebrow { color:#64836b; font-size:11px; font-weight:700; letter-spacing:.14em; }
.loop-head h3 { margin:3px 0 12px; }
.loop-steps { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0 14px; }
.loop-steps button.current { background:var(--brand); color:#fff; }
.loop-steps button.done { background:#e2f1eb; color:#176354; }
.loop-task { padding:15px; border:1px solid #dce9e1; border-radius:14px; background:#fff; }
.loop-task p { margin:5px 0 12px; }
.loop-task textarea { margin:6px 0 10px; }
.loop-overview { display:grid; gap:10px; margin:16px 0; }
.loop-overview-row { display:flex; align-items:stretch; gap:8px; }
.loop-overview-step { display:flex; align-items:center; gap:14px; text-align:left; background:#fff; color:#163342; border:1px solid #dce9e1; padding:15px; }
.loop-overview-row .loop-overview-step { flex:1; min-width:0; }
.loop-reset { align-self:center; white-space:nowrap; }
.loop-overview-step:disabled { opacity:.55; }
.loop-number { display:grid; place-items:center; flex:0 0 38px; width:38px; height:38px; border-radius:50%; background:#e7eff8; color:#416b97; font-weight:700; }
.loop-overview-step small { display:block; margin-top:3px; color:var(--muted); }
.loop-progress { display:flex; gap:10px; align-items:center; margin-top:14px; }
.loop-progress span { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:#e8edf1; color:#526773; }
.loop-progress span.current { background:#416b97; color:#fff; }
.loop-progress span.done { background:#dff1e7; color:#176354; }
.echo-stage-plan { margin:18px 0; padding:14px; border:1px solid var(--line,#dce9e1); border-radius:14px; background:var(--surface-soft,#f6f9f7); }
.echo-review-plan { margin-top:12px; }
.echo-review-rounds { display:grid; gap:8px; margin-top:10px; }
.echo-review-round { border:1px solid var(--line,#dce9e1); border-radius:11px; background:#fff; padding:10px 12px; }
.echo-review-round.current { border-color:#9bb6d4; background:#f5f8fc; }
.echo-review-round.done { border-color:#c5e0d0; background:#f4faf6; }
.echo-review-round.locked { opacity:.72; }
.echo-review-round summary { display:flex; justify-content:space-between; gap:12px; }
.echo-review-round summary span,.echo-review-round li small { color:var(--muted,#647986); }
.echo-review-round ol { margin:10px 0 0; padding-left:24px; }
.echo-review-round li { padding:4px 0; }
.echo-review-round li small { display:block; }
.echo-spaced-steps { display:flex; gap:7px; overflow-x:auto; padding:10px 0 4px; }
.echo-spaced-step { flex:1 0 70px; padding:9px 6px; text-align:center; border:1px solid var(--line,#dce9e1); border-radius:10px; background:#fff; }
.echo-spaced-step b,.echo-spaced-step small { display:block; white-space:nowrap; }
.echo-spaced-step small { margin-top:3px; color:var(--muted,#647986); font-size:11px; }
.echo-spaced-step.done { background:#e7f3ec; border-color:#c5e0d0; }
.echo-spaced-step.current { background:#eaf1fa; border-color:#9bb6d4; }
.bbc-source .audio-actions select { width:auto; min-width:92px; }
.bbc-warmup-controls[hidden] { display:none; }
.bbc-warmup-controls { position:sticky; top:0; z-index:3; display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:12px; margin:8px 0; background:#f2f7f4; border:1px solid var(--line); border-radius:12px; }
body.bbc-warmup-active { padding-bottom:82px; }
body.bbc-warmup-active .bbc-source audio { position:fixed; z-index:20; left:50%; bottom:10px; transform:translateX(-50%); width:min(1000px,calc(100vw - 28px)); padding:8px; background:#f4f7f8; border:1px solid var(--line); border-radius:18px; box-shadow:0 8px 30px #102b3528; }
@media(max-width:560px){.bbc-learning-loop{padding:12px}.loop-steps{display:grid;grid-template-columns:1fr 1fr}.loop-steps button{padding-inline:8px}}

.bbc-il-dialog{width:min(560px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:0;border:0;border-radius:30px;background:#f4f5fc;color:#18202d;box-shadow:0 22px 80px #101b3d40}.bbc-il-dialog::backdrop,.bbc-il-player::backdrop{background:#10152380;backdrop-filter:blur(4px)}.bbc-il-sheet{position:relative;padding:22px clamp(22px,6vw,46px) 28px}.bbc-il-grip{width:64px;height:5px;margin:0 auto 24px;border-radius:5px;background:#c9cbd6}.bbc-il-close{position:absolute;right:20px;top:18px;font-size:22px}.bbc-il-icon{font-size:56px;text-align:center;color:#435fae}.bbc-il-sheet h2{text-align:center;font-size:30px;margin:12px 0 18px}.bbc-il-tip{padding:16px;border-radius:16px;background:#e8edfb;line-height:1.6}.bbc-il-sheet label{font-weight:650;margin-top:14px}.bbc-il-sheet select{margin-top:5px}.bbc-il-summary{text-align:center;margin:22px 0;color:#4e5d71;font-weight:650}.bbc-il-start{display:block;width:100%;border-radius:18px;padding:16px;font-size:19px;background:#41679d}.bbc-il-player{position:fixed;inset:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;padding:0;border:0;border-radius:0;background:#f4f5fc;color:#17202e;grid-template-rows:auto auto 1fr auto;overflow:hidden}.bbc-il-player[open]{display:grid}.bbc-il-player-head{display:grid;grid-template-columns:48px 1fr 48px;align-items:center;padding:calc(env(safe-area-inset-top) + 10px) 18px 12px;background:#f4f5fc}.bbc-il-player-head h2{margin:0;text-align:center;font-size:21px}.bbc-il-player-head button{padding:7px 10px;font-size:22px}.bbc-il-player-progress{padding:8px 20px 14px}.bbc-il-player-progress .row{justify-content:space-between}.bbc-il-player-progress input[type=range]{padding:0;height:24px;accent-color:#41679d}.bbc-il-player-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;min-height:0;padding:24px clamp(24px,8vw,84px);overflow:auto}.bbc-il-sentence{width:100%;font-size:clamp(22px,4vw,32px);line-height:1.8;letter-spacing:.02em;text-align:left}.bbc-il-explanation{width:100%;padding:14px;border-radius:14px;background:#fff;line-height:1.55}.bbc-il-player-footer{padding:12px 20px calc(env(safe-area-inset-bottom) + 16px);background:#f4f5fc}.bbc-il-player-footer>p{text-align:center;min-height:1.5em;color:#526378}.bbc-il-transport{display:flex;justify-content:center;align-items:center;gap:30px;margin:12px 0}.bbc-il-transport button{width:58px;height:58px;border-radius:50%;font-size:19px}.bbc-il-transport #bbcILPlay{width:86px;height:86px;border-radius:50%;font-size:28px;background:#41679d}.bbc-il-player-footer>.row{justify-content:space-between}.bbc-il-settings-inline{display:flex;gap:14px;padding:4px 20px 14px}.bbc-il-settings-inline label{flex:1;margin:0;font-size:13px}.bbc-il-settings-inline select{display:block;margin-top:4px;padding:7px}.bbc-il-player button,.bbc-il-dialog button{touch-action:manipulation}@media(max-width:600px){.bbc-il-player-progress{padding-inline:14px}.bbc-il-player-content{padding:18px 24px}.bbc-il-player-footer{padding-inline:16px}.bbc-il-transport{gap:24px}}

.bbc-ai-analysis { margin: 12px 0; }
.bbc-ai-analysis h3,.bbc-ai-analysis h4 { margin: 0; }
.sense-groups { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:10px 0; }
.sense-groups span { padding:6px 10px; border-radius:10px; background:#edf4f1; }
.sense-groups b { color:var(--muted); }

.bbc-favorite-review { margin-top:16px; }
.bbc-favorite-card { border-top:1px solid var(--line); padding:12px 0; }
.favorite-grade { flex-wrap:wrap; margin-top:10px; }
.bbc-il-word.is-active { background:#bce8cd; border-radius:3px; box-shadow:0 0 0 2px #bce8cd; }

/* PC BBC Echo Loop: clear course overview, current step and warm-up hierarchy. */
.echo-loop-home,.echo-loop-practice { margin:14px 0; padding:clamp(18px,2.6vw,28px); border:1px solid var(--line); border-radius:20px; background:#fffefa; }
.echo-loop-top { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.echo-loop-top .eyebrow,.echo-loop-practice > .eyebrow { color:#64836b; font-size:11px; font-weight:750; letter-spacing:.14em; text-transform:uppercase; }
.echo-loop-top h3 { margin:5px 0 4px; }
.echo-loop-top p { margin:0; color:var(--muted); }
.echo-loop-score { display:grid; place-items:center; align-content:center; flex:0 0 82px; width:82px; height:82px; border:6px solid #e5edf8; border-radius:50%; color:#416b97; }
.echo-loop-score b { font-size:22px; }
.echo-loop-score small { color:var(--muted); font-size:11px; }
.echo-loop-meta { display:flex; gap:18px; flex-wrap:wrap; margin:14px 0 18px; color:var(--muted); font-size:14px; }
.echo-warmup-cta { display:flex; align-items:center; gap:14px; width:100%; margin:14px 0 22px; padding:16px 18px; text-align:left; color:#624d1e; background:#fff5dc; border:1px solid #f0dfb7; border-radius:16px; }
.echo-warmup-cta > span:first-child { font-size:22px; }
.echo-warmup-cta > span:nth-child(2) { display:grid; gap:3px; flex:1; }
.echo-warmup-cta small { color:#7a6b4c; }
.echo-warmup-cta > span:last-child { font-size:26px; }
.echo-section-title { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.echo-section-title h4 { margin:0; font-size:18px; }
.echo-section-title > span { color:var(--muted); font-size:13px; }
.echo-flow-list { display:grid; gap:9px; margin:12px 0 18px; padding:0; list-style:none; }
.echo-flow-list li { display:flex; align-items:center; gap:12px; min-width:0; padding:13px 14px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.echo-flow-list li.current { border-color:#9bb6d4; background:#f5f8fc; }
.echo-flow-list li.done { border-color:#c5e0d0; background:#f4faf6; }
.echo-flow-copy { display:grid; gap:3px; flex:1; min-width:0; }
.echo-flow-copy small { color:var(--muted); }
.echo-flow-list .loop-reset { padding:6px 9px; }
.echo-start-cta { width:100%; margin-top:4px; padding:14px 18px; font-size:17px; }
.echo-loop-foot { margin:10px 0 0; color:var(--muted); font-size:13px; }
.echo-loop-practice .loop-head { margin-bottom:12px; }
.echo-loop-practice > h3 { margin:4px 0 14px; }
.echo-practice-inline { margin:12px 0; padding:14px; background:#f8fbf8; }
.echo-practice-inline .echo-heading { margin-bottom:8px; }
.echo-practice-inline h4 { margin:3px 0 0; }
.echo-practice-inline .echo-target { padding:12px; }
.echo-practice-inline #bbcTargetSentence { min-height:64px; }
.echo-loop-warmup { background:#fffaf0; }
@media(max-width:640px) {
 .echo-loop-home,.echo-loop-practice { padding:14px; }
 .echo-loop-score { flex-basis:68px; width:68px; height:68px; }
 .echo-loop-meta { gap:8px 14px; font-size:12px; }
 .echo-flow-list li { padding:11px; }
}

.bbc-il-player-head{grid-template-columns:48px 1fr 48px 48px}.bbc-il-player-head button[aria-label="句子解析"]{font-size:16px;background:#e8edfb;color:#375a9b}.bbc-il-explanation{max-height:35vh;overflow:auto}.bbc-il-explanation[hidden]{display:none}.bbc-il-explanation .bbc-annotation-toolbar{display:flex;gap:8px;flex-wrap:wrap}.bbc-il-explanation .bbc-annotation-toolbar button.selected{background:#41679d;color:white}.bbc-il-explanation .bbc-annotation-result{margin-top:10px;padding-top:8px;border-top:1px solid #e4e8f1}.bbc-il-explanation .bbc-annotation-groups{display:flex;gap:5px;flex-wrap:wrap;align-items:center}.bbc-il-explanation .bbc-annotation-groups span{background:#e8edfb;padding:3px 7px;border-radius:6px}

/* Warm-up AI annotations: tappable sense groups play their aligned BBC audio range. */
.bbc-annotation-groups .bbc-sense-group{border:0;border-radius:6px;padding:3px 7px;background:#e8eef9;color:inherit;font:inherit;cursor:pointer}.bbc-annotation-groups .bbc-sense-group:hover,.bbc-annotation-groups .bbc-sense-group:focus-visible{background:#d8e5fa;outline:2px solid #6e91c8;outline-offset:1px}.bbc-annotation-groups .bbc-sense-group.is-playing{background:#bfe8cf;color:#123b2a}.bbc-annotation-groups .bbc-sense-group.is-played{box-shadow:inset 0 0 0 1px #76a688}.bbc-sense-status{min-height:1em}

/* Warm-up transcript selection must not let the annotation panel squeeze the sentence to a character-wide column. */
.tr-turn.has-annotation{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:start;gap:12px}.tr-turn.has-annotation>.tr-speaker{grid-column:1;flex:none;min-width:0}.tr-turn.has-annotation>.tr-text{grid-column:2;min-width:0;width:100%;flex:none;box-sizing:border-box}.tr-turn.has-annotation>.bbc-sentence-annotation{grid-column:2;min-width:0;width:100%;box-sizing:border-box;margin:8px 0 14px}
.tr-selected-range{background:#bfe8cf;color:inherit;border-radius:3px;box-shadow:0 0 0 2px #bfe8cf}
@media(max-width:640px){.tr-turn.has-annotation{grid-template-columns:minmax(0,1fr);gap:2px}.tr-turn.has-annotation>.tr-speaker,.tr-turn.has-annotation>.tr-text,.tr-turn.has-annotation>.bbc-sentence-annotation{grid-column:1}}

.tr-text .bbc-annotation-groups{display:inline;line-height:2.2}.tr-text .bbc-sense-group{display:inline;padding:3px 6px;margin:3px;border:1px solid #b8c7da;border-radius:4px;background:transparent;font:inherit;line-height:1.6;white-space:normal}.tr-text .bbc-sense-group.is-playing{border-color:#41679d;background:#dce9fb}.tr-text .bbc-sense-group.is-saved{background:#fff1cc}.bbc-group-actions{position:fixed;z-index:10000;max-width:min(420px,calc(100vw - 16px));padding:8px;background:white;border:1px solid #ccd5df;border-radius:10px;box-shadow:0 6px 24px #0002;display:flex;gap:6px;flex-wrap:wrap}.bbc-group-actions button{padding:7px 12px}.bbc-group-actions p{width:100%;max-height:220px;overflow:auto}.bbc-inline-translation{border:0;color:#667887;font-size:.95em}

/* ENGLISH 1000H — The Reading Atelier. A new editorial workspace, not a restyle of the previous teal dashboard. */
:root{
  color-scheme:light;
  --paper:#f4f1ec;--surface:#fffefa;--surface-raised:#fff;--ink:#252136;--muted:#726e7d;--line:#e5e0e9;
  --brand:#6155d9;--brand-deep:#463da9;--brand-soft:#eeeafd;--gold:#ef9d69;--nav:#211d34;--nav-soft:#2d2844;
  --success:#2d8f77;--warning:#a66832;--danger:#b74555;--radius-card:16px;--ease-out:cubic-bezier(.2,.8,.2,1);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none;-webkit-font-smoothing:antialiased
}
html{background:var(--paper)}
body{min-width:320px;background:linear-gradient(135deg,#f8f6f2 0%,var(--paper) 48%,#f0eef6 100%);color:var(--ink);font-size:15px;line-height:1.65}
::selection{background:#d9d3ff;color:#211d34}
body>header{position:sticky;top:0;z-index:50;min-height:68px;padding:12px clamp(20px,4vw,60px);background:var(--nav);color:#fff;border:0;border-bottom:1px solid #49445f;box-shadow:0 8px 28px #211d3418}
body>header h1{font-size:19px;font-weight:750;letter-spacing:-.04em;color:#fff}body>header h1 span:first-child{color:#c8c3d7!important}body>header #appVersion{background:#35304b;color:#e4dfff!important;border:1px solid #69627f!important}body>header #who{color:#d2cede!important}body>header #logout{background:#f2efff;color:#342c72;border:0;border-radius:9px}
main{max-width:1660px;margin:22px auto;padding:0 clamp(18px,3vw,42px)}
#workspace{display:grid;grid-template-columns:242px minmax(0,1fr);grid-template-rows:auto auto minmax(60vh,1fr);grid-template-areas:"nav stats" "nav timer" "nav content";gap:14px 22px;align-items:start}
#workspace>.stats{grid-area:stats;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0;max-width:none}
#workspace>.global-timer{grid-area:timer;margin:0;min-width:0}
#workspace>.app-shell{display:contents}
#workspace>.app-shell>.app-sidebar{grid-area:nav;position:sticky;top:84px;align-self:stretch;min-width:0;max-height:calc(100dvh - 100px);overflow:auto;padding:20px 15px;background:var(--nav);color:#f1eef7;border:1px solid #3a3450;border-radius:18px;box-shadow:0 18px 42px #211d3422}
#workspace>.app-shell>.app-main{grid-area:content;min-width:0;min-height:68vh;padding:clamp(26px,3.2vw,48px);background:var(--surface);border:1px solid #e5e0e9;border-radius:20px;box-shadow:0 16px 46px #3027460b}
#globalCourseSelector{display:grid;gap:4px;padding:4px 9px 17px;margin-bottom:12px;border-bottom:1px solid #4a455c}
.sidebar-label{color:#aaa4bb;font-size:11px;font-weight:650;letter-spacing:.12em;text-transform:uppercase}#currentDayLabel{color:#fff;font-size:29px;font-weight:750;letter-spacing:-.05em}
.app-sidebar .tabbar{display:grid;gap:5px;margin:12px 0;padding:0;border:0}.app-sidebar .tabbar button{width:100%;min-height:43px;justify-content:flex-start;padding:9px 12px;text-align:left;color:#d2cedd;background:transparent;border:1px solid transparent;border-radius:9px;box-shadow:none;font-size:14px;font-weight:550}.app-sidebar .tabbar button:hover:not(:disabled){background:var(--nav-soft);color:#fff}.app-sidebar .tabbar button.selected{color:#211d34;background:#e1dcff;border-color:#e1dcff;font-weight:750}
.sidebar-course-group{display:grid;gap:4px}.sidebar-course-links{display:grid;gap:3px;margin:0 0 9px 13px;padding-left:10px;border-left:1px solid #676078}.sidebar-course-links a{display:block;padding:8px 10px;color:#c2bdcf;border-radius:7px;font-size:13px;text-decoration:none}.sidebar-course-links a:hover,.sidebar-course-links a.active{color:#fff;background:#3c3655}.sidebar-course-links a.active{box-shadow:inset 3px 0 var(--gold)}
#voiceBar{display:block;margin:20px 0 0;padding:11px 10px!important;background:#2a253f!important;border:1px solid #47415d!important;border-radius:10px;color:#ded9e7}.voice-settings>summary{color:#e6e2ed;font-size:13px;font-weight:650}.voice-controls{display:grid;gap:6px;padding-top:10px}.voice-controls label{margin:2px 0 0;color:#c2bdcf;font-size:12px}.voice-controls select{width:100%;min-width:0;padding:8px;background:#fffefa;border-color:#56516b;font-size:13px}.voice-controls button{min-height:38px}
.stat{position:relative;min-width:0;padding:17px 20px 16px 23px;background:var(--surface-raised);border:1px solid var(--line);border-radius:14px;box-shadow:0 4px 14px #30274608;overflow:hidden}.stat:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--brand)}.stat:nth-child(2):before{background:var(--gold)}.stat .muted{color:var(--muted);font-size:12px;font-weight:650;letter-spacing:.02em}.stat strong{display:block;margin-top:3px;color:#322c59;font-size:26px;line-height:1.2;font-weight:750;letter-spacing:-.045em;font-variant-numeric:tabular-nums}
.global-timer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 20px;align-items:center;padding:17px 21px;background:linear-gradient(118deg,#2a2442,#453d70);border:1px solid #453d70;border-radius:14px;color:#f8f6ff;box-shadow:0 10px 26px #3027461c}.global-timer .row:first-child{justify-content:space-between;gap:16px}.global-timer .row:first-child b{display:block;color:#e6e0ff;font-size:14px}.global-timer #timerContext{color:#c7c1da}.global-timer .timer{margin-left:auto;color:#fff;font-size:27px;font-weight:700;letter-spacing:.02em;font-variant-numeric:tabular-nums}.global-timer .row:nth-child(2){display:flex;justify-content:flex-end;gap:7px;flex-wrap:wrap}.global-timer .row:nth-child(2)>button{min-height:36px;padding:7px 11px;border:1px solid #655c8e;border-radius:8px;background:#3d365e;color:#efecfa;box-shadow:none;font-size:12px}.global-timer .row:nth-child(2)>button:first-child{background:var(--gold);border-color:var(--gold);color:#2c2030;font-weight:750}.global-timer .row:nth-child(2)>button:hover:not(:disabled){filter:brightness(1.08)}.global-timer #timerSummary{grid-column:1/-1;display:block;color:#c7c1da;font-size:11px}.global-timer button:disabled{opacity:.42}
#content>h2:first-child,.page-heading h2,.study-hero h2{margin-top:0;color:#28233c;font-family:"Iowan Old Style","Palatino Linotype","Book Antiqua","Songti SC",Georgia,serif;font-size:clamp(30px,3.3vw,44px);font-weight:650;line-height:1.13;letter-spacing:-.045em}.page-heading{display:flex;align-items:end;justify-content:space-between;gap:18px;margin:0 0 26px;padding-bottom:20px;border-bottom:1px solid var(--line)}.page-heading h2{margin:4px 0 6px}.page-heading p{margin:0;color:var(--muted)}.eyebrow,.tb-eyebrow{color:#756b9e;font-size:10px;font-weight:750;letter-spacing:.18em;text-transform:uppercase}
#auth.panel.auth{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,.82fr);gap:12px 0;align-items:start;width:min(100%,1080px);max-width:1080px;margin:clamp(32px,8vh,92px) auto;padding:clamp(28px,4vw,56px);background:var(--surface);border:1px solid var(--line);border-radius:22px;box-shadow:0 26px 90px #30274614;overflow:hidden}
#auth.panel.auth::before{content:"ENGLISH 1000H\A\A让英语成为\A每天都在发生的事。\A\ALISTEN · READ · SPEAK";white-space:pre;grid-column:1;grid-row:1 / span 9;align-self:stretch;display:flex;align-items:center;padding:clamp(28px,4vw,60px);color:#f6f3ff;background:radial-gradient(ellipse at 12% 20%,#7668e1 0,transparent 38%),linear-gradient(145deg,#292340,#484071 62%,#6256a3);border-radius:15px;font-family:"Iowan Old Style","Palatino Linotype","Songti SC",Georgia,serif;font-size:clamp(23px,2.7vw,37px);line-height:1.55;letter-spacing:-.025em}
#auth.panel.auth>*{grid-column:2;margin-left:clamp(24px,4vw,56px)}#auth.panel.auth h2{margin-top:0;margin-bottom:12px;color:#28233c;font-family:"Iowan Old Style","Palatino Linotype","Songti SC",Georgia,serif;font-size:34px;font-weight:650;letter-spacing:-.04em}#auth.panel.auth label{margin-top:4px;color:#474255;font-size:13px;font-weight:650}#auth.panel.auth input{width:100%}#auth.panel.auth .tiny{color:var(--muted)}#auth.panel.auth #authSubmit{justify-self:start;min-width:120px}#auth.panel.auth #authError{color:var(--danger)!important}#auth.panel.auth details{width:calc(100% - clamp(24px,4vw,56px));margin-top:4px;padding:17px;background:#f8f6fb;border:1px solid var(--line);border-radius:12px}#auth.panel.auth details summary{color:#36314f;font-weight:700;cursor:pointer}#auth.panel.auth details button{margin-top:6px}
.panel,.bbc-source,.bbc-transcript,.recordings-card,.translation-panel,.family-section,.tb-sheet,.leo-classroom,.echo-loop-home,.echo-loop-practice{background:var(--surface-raised);border:1px solid var(--line);border-radius:14px;box-shadow:0 6px 20px #30274608}
.daily-progress{background:#f3f0ff;border:1px solid #e3defa;border-radius:12px}.daily-progress progress{accent-color:var(--brand)}.daily-progress-copy strong{color:#302b4a}
.study-entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.study-entry{min-height:120px;padding:18px 20px;background:#fbfaff;border:1px solid #e6e2f2;border-radius:13px;text-decoration:none;transition:border-color .18s ease,background-color .18s ease,transform .18s var(--ease-out)}.study-entry:hover{background:#f4f1ff;border-color:#bcb3ea;transform:translateY(-2px)}.study-entry span{color:#837b98;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.study-entry strong{color:#302b4a;font-size:18px}.study-entry small{color:var(--muted)}
button,select,input,textarea{font:inherit}button{min-height:42px;padding:9px 15px;color:#fff;background:var(--brand);border:1px solid transparent;border-radius:9px;box-shadow:0 3px 9px #6155d91f;cursor:pointer;transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,transform .14s var(--ease-out)}button:hover:not(:disabled){background:var(--brand-deep);box-shadow:0 5px 14px #6155d92a}button:active:not(:disabled){transform:scale(.98)}button.secondary{color:#443c68;background:#f0edfa;border-color:#e4e0f1;box-shadow:none}button.secondary:hover:not(:disabled){color:#30295d;background:#e6e1f5}button:disabled{opacity:.48;box-shadow:none;cursor:not-allowed}
button:focus-visible,a:focus-visible,summary:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #ee9d69;outline-offset:3px}
input,select,textarea{min-height:44px;padding:10px 12px;color:var(--ink);background:#fff;border:1px solid #d9d4e2;border-radius:9px;transition:border-color .16s ease,box-shadow .16s ease}input:focus,select:focus,textarea:focus{border-color:#8175de;box-shadow:0 0 0 3px #8175de25}
.bbc-source,.recordings-card,.translation-panel,.family-section{padding:22px}.bbc-source{background:#f8f7fc}.bbc-source h3,.recordings-card h3{margin:0;color:#302b4a}.bbc-source .audio{margin:15px 0 8px}.bbc-transcript{padding:0 22px 8px;background:#fcfbff}.bbc-transcript>summary{color:#55499f}.tr-turn{border-bottom:1px solid #ece8f1}.tr-speaker{color:#756b9e;font-weight:650}.tr-text{color:#26243a;font-size:17px;line-height:1.85}.bbc-sentence-annotation{background:#f2efff;border-left-color:#8175de;border-radius:0 10px 10px 0}.bbc-annotation-toolbar button{min-height:38px}.bbc-annotation-groups .bbc-sense-group{background:#ece8ff}.bbc-annotation-groups .bbc-sense-group.is-playing{background:#d7d0ff;color:#27204e}.tr-selected-range{background:#d4cdfd;box-shadow:0 0 0 2px #d4cdfd}
.echo-loop-home,.echo-loop-practice{padding:clamp(20px,2.4vw,34px);background:#fffefa;border-radius:16px}.echo-loop-top .eyebrow,.echo-loop-practice>.eyebrow{color:#8274ca}.echo-loop-top h3{color:#28233c;font-size:25px}.echo-loop-score{border-color:#e2def8;color:#6255d5}.echo-warmup-cta{color:#67432c;background:#fff3e9;border:1px solid #f4d6c4;border-radius:12px}.echo-warmup-cta:hover:not(:disabled){background:#ffeadb}.echo-flow-list li{background:#fbfaff;border:1px solid #e6e2f2;border-radius:12px}.echo-flow-list li.current{background:#f0edff;border-color:#bcb3ea;box-shadow:inset 4px 0 #6155d9}.echo-flow-list li.done{background:#f0f7f4;border-color:#cde3d9}.loop-number{background:#e9e5fb!important;color:#5246bd!important}.echo-stage-plan{background:#f8f7fc;border-color:#e6e2f0}.echo-review-round.current{background:#f2efff;border-color:#bcb3ea}.echo-review-round.done,.echo-spaced-step.done{background:#edf7f2;border-color:#cae3d7}.echo-spaced-step.current{background:#f0edff;border-color:#bcb3ea}
.tb-tabs{gap:6px;padding:5px;background:#f0edf7;border:1px solid #e6e1f0;border-radius:10px}.tb-tabs button,.tb-tabs button.secondary{background:transparent;border:0;color:#69627d;box-shadow:none}.tb-tabs button:not(.secondary){background:#6155d9;color:#fff;box-shadow:0 3px 8px #6155d926}.tb-sheet{padding:clamp(20px,2.4vw,34px);background:#fffefa}.tb-sheet h3{color:#302b4a}.leo-classroom{background:#f7f6fb;padding:clamp(20px,2.2vw,32px)}.tb-vocab-card{background:#faf9fd;border-color:#e6e2ed;border-radius:10px}.study-entry-grid .study-entry{background:linear-gradient(145deg,#fffefa,#f8f6fd)}.notice{background:#fff4e7;border-color:#f1ddc4;border-left-color:#e99d66;border-radius:10px}
.timer-card{background:#f4f1fb;border-color:#e3def1;border-radius:13px}.timer-card .timer{font-variant-numeric:tabular-nums}
.translation-panel,.translation-result{background:#f8f7fc;border-color:#e6e2f0}.translation-result{border-radius:12px}.english-result{color:#302b4a}
#timerPauseNotice{border:1px solid var(--line);border-radius:16px;box-shadow:0 24px 80px #211d3440}
dialog{border-color:var(--line);border-radius:18px;box-shadow:0 24px 80px #211d3440}dialog::backdrop{background:#211d3475;backdrop-filter:blur(3px)}
@media(min-width:1200px){.study-entry-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.app-main #content{max-width:1160px}.bbc-transcript{max-width:1100px}}
@media(max-width:1050px){main{padding:0 18px}#workspace{grid-template-columns:1fr;grid-template-rows:auto auto auto auto;grid-template-areas:"stats" "timer" "nav" "content";gap:12px}.app-sidebar{position:static!important;max-height:none!important;overflow:visible!important;padding:13px 14px!important}.app-sidebar .tabbar{display:flex;flex-wrap:wrap;gap:6px}.app-sidebar .tabbar button{width:auto;flex:0 1 auto;min-height:40px}.sidebar-course-links{display:flex;flex-wrap:wrap;margin:2px 0 7px 8px}.sidebar-course-links a{padding:7px 10px}.app-main{padding:24px}.global-timer{grid-template-columns:1fr auto}}
@media(max-width:680px){body{font-size:16px}body>header{min-height:60px;padding:10px 15px}body>header h1{font-size:17px}body>header h1>span:first-child{display:none}main{margin:13px auto;padding:0 11px}#workspace>.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.stat{padding:13px 14px 12px 17px}.stat strong{font-size:21px}.global-timer{grid-template-columns:1fr;padding:14px}.global-timer .row:first-child{align-items:center}.global-timer .timer{font-size:23px}.global-timer .row:nth-child(2){justify-content:stretch}.global-timer .row:nth-child(2)>button{flex:1 1 28%;min-height:40px}.global-timer #timerSummary{font-size:10px}.app-main{padding:20px 15px;border-radius:15px}.page-heading{align-items:start;flex-direction:column;gap:6px;margin-bottom:19px;padding-bottom:14px}.page-heading h2,.study-hero h2,#content>h2:first-child{font-size:32px}.study-entry-grid{grid-template-columns:1fr}.study-entry{min-height:92px}.bbc-source,.bbc-transcript,.tb-sheet,.leo-classroom,.echo-loop-home,.echo-loop-practice{padding:16px}.tr-turn{grid-template-columns:48px minmax(0,1fr);gap:10px}.tr-text{font-size:16px}.echo-flow-list li{padding:12px}.echo-loop-score{width:68px;height:68px;flex-basis:68px}.tb-tabs{overflow-x:auto;flex-wrap:nowrap}.tb-tabs button{white-space:nowrap}}
@media(max-width:380px){#workspace>.stats{grid-template-columns:1fr}.app-sidebar .tabbar button{font-size:13px;padding:7px 9px}.global-timer .row:nth-child(2)>button{font-size:12px}}
@media(hover:none){button:hover:not(:disabled){background:var(--brand);box-shadow:none}button.secondary:hover:not(:disabled){color:#443c68;background:#f0edfa}.study-entry:hover{transform:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
@media(max-width:680px){#auth.panel.auth{grid-template-columns:minmax(0,1fr);gap:8px;margin:14px auto;padding:20px;border-radius:16px}#auth.panel.auth::before{display:none}#auth.panel.auth>*{grid-column:1;margin-left:0}#auth.panel.auth details{width:100%}}
