:root {
  --bg: #ffffff;
  --ink: #172033;
  --muted: #5e6b7c;
  --line: #d9e2ef;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --blue: #2563eb;
  --green: #2563eb;
  --gold: #f59e0b;
  --coral: #f59e0b;
  --red: #dc2626;
  --shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 16px;
  letter-spacing: 0;
}

.date-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.date-controls label,
.note-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

input[type="date"] {
  min-height: 42px;
  padding: 0 12px;
}

button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  font-weight: 800;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) minmax(220px, 2fr);
  gap: 12px;
  margin-bottom: 18px;
}

.metric,
.progress-wrap,
.calendar-panel,
.today-panel,
.notes-panel,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric,
.progress-wrap {
  min-height: 88px;
  padding: 16px;
}

.metric-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.metric strong {
  font-size: 24px;
  line-height: 1;
}

.progress-wrap {
  display: grid;
  align-content: center;
  gap: 10px;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e9e4;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 180ms ease;
}

#overall-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.main-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

body.focus-mode .app-shell {
  width: 100%;
  padding: 0;
}

body.focus-mode .topbar,
body.focus-mode .dashboard,
body.focus-mode .calendar-panel,
body.focus-mode .notes-panel,
body.focus-mode .phase-strip,
body.focus-mode .lesson-tabs {
  display: none;
}

body.focus-mode .main-grid {
  display: block;
}

body.focus-mode .today-panel {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--bg);
}

body.focus-mode .lesson-page {
  min-height: 100vh;
  padding: 24px;
}

body.focus-mode .learning-card {
  width: min(1080px, 100%);
  min-height: calc(100vh - 48px);
  margin: 0 auto;
  align-content: start;
}

.calendar-panel,
.notes-panel {
  padding: 16px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

#week-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  max-height: 650px;
  overflow: auto;
  padding-right: 2px;
}

.day-button {
  display: grid;
  place-items: center;
  gap: 1px;
  aspect-ratio: 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
  padding: 2px;
  font-size: 11px;
  font-weight: 850;
}

.day-button strong,
.day-button span {
  display: block;
  line-height: 1;
}

.day-button span {
  font-size: 8px;
  font-weight: 750;
}

.day-button.current {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: inset 0 0 0 2px rgba(40, 95, 159, 0.18);
}

.day-button.complete {
  background: #e3f3ee;
  border-color: #a9d6c8;
  color: var(--green);
}

.day-button.partial {
  background: #fff4dc;
  border-color: #e7c273;
  color: var(--gold);
}

.phase-strip {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  min-height: 166px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(40, 95, 159, 0.12), transparent 45%),
    var(--surface-2);
}

.phase-copy {
  display: grid;
  align-content: center;
  gap: 10px;
}

#phase-badge {
  width: fit-content;
  border-radius: 999px;
  background: rgba(31, 128, 104, 0.12);
  color: var(--green);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 850;
}

#focus-title {
  max-width: 620px;
  font-size: clamp(26px, 4vw, 42px);
}

.study-scene {
  position: relative;
  flex: 0 0 170px;
  min-height: 120px;
}

.card-stack,
.timer-mark,
.graph-mark {
  position: absolute;
  border-radius: 8px;
}

.card-stack {
  right: 28px;
  bottom: 20px;
  width: 105px;
  height: 76px;
  background: #fff;
  border: 2px solid rgba(29, 41, 53, 0.15);
  box-shadow:
    -12px -10px 0 #dceef8,
    -24px -20px 0 #e7f2ea;
  transform: rotate(-4deg);
}

.timer-mark {
  right: 12px;
  top: 16px;
  width: 50px;
  height: 50px;
  border: 7px solid rgba(183, 121, 31, 0.34);
  border-top-color: var(--gold);
  border-radius: 999px;
}

.graph-mark {
  left: 10px;
  bottom: 22px;
  width: 70px;
  height: 54px;
  background:
    linear-gradient(to top, var(--green) 0 36%, transparent 36%),
    linear-gradient(to top, rgba(40, 95, 159, 0.8) 0 62%, transparent 62%),
    linear-gradient(to top, rgba(183, 121, 31, 0.75) 0 82%, transparent 82%);
  background-size: 18px 100%, 18px 100%, 18px 100%;
  background-position: 0 0, 26px 0, 52px 0;
  background-repeat: no-repeat;
}

.content-stack {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.content-stack + .content-stack {
  padding-top: 0;
}

.lesson-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 16px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.lesson-tab {
  flex: 0 0 auto;
  min-height: 38px;
  border-color: #cbd7df;
  background: #f7fafb;
  color: #35536a;
}

.lesson-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.lesson-tab.complete::after {
  content: "✓";
  margin-left: 6px;
  font-weight: 900;
}

.lesson-page {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.focus-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.card {
  padding: 16px;
}

.page-card {
  display: grid;
  gap: 16px;
}

.page-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  border-radius: 8px;
  background: #f2f7f9;
  padding: 16px;
}

.page-kicker,
.question-type {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mission-meter {
  display: grid;
  place-items: center;
  min-width: 118px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px;
  text-align: center;
}

.mission-meter strong {
  color: var(--green);
  font-size: 34px;
  line-height: 1;
}

.mission-meter span,
.mission-grid span,
.recall-steps span,
.strategy-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.mission-grid,
.recall-steps,
.writing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.round-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.round-track button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
  padding: 9px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.round-track button.active {
  border-color: var(--blue);
  background: #e8f1f8;
  color: var(--blue);
}

.round-track button.done {
  border-color: #a9d6c8;
  background: #e3f3ee;
  color: var(--green);
}

.round-track button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.mission-grid div,
.recall-steps div,
.strategy-card,
.cloze-box {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.mission-grid strong,
.recall-steps strong {
  color: var(--ink);
  font-size: 20px;
}

.section-head {
  margin-top: 4px;
}

.page-jumps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.card-head,
.trainer-actions,
.score-head,
.material-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tag-row,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.pill {
  border-radius: 999px;
  background: #edf4f7;
  color: #244964;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 850;
}

.pill.green {
  background: #e3f3ee;
  color: var(--green);
}

.pill.gold {
  background: #fff4dc;
  color: var(--gold);
}

.schedule-list,
.task-list,
.resource-list {
  display: grid;
  gap: 8px;
}

.schedule-list div,
.task-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  border-radius: 8px;
  background: #fbfcfb;
  padding: 8px 10px;
}

.schedule-list time {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.task-row {
  grid-template-columns: 34px 1fr auto;
  border: 1px solid var(--line);
}

.task-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--green);
}

.task-row.done {
  border-color: #a9d6c8;
  background: #f0faf6;
}

.task-title {
  margin: 0 0 3px;
  font-weight: 850;
}

.task-detail {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.minutes {
  border-radius: 999px;
  background: #e9eef2;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 850;
}

.flashcard {
  display: grid;
  gap: 12px;
  min-height: 210px;
  border: 1px solid #cbd8e4;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 18px;
}

.flashcard.vivid {
  background:
    linear-gradient(135deg, rgba(31, 128, 104, 0.1), transparent 48%),
    #f8fbfd;
}

.flashword {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 900;
  line-height: 1;
}

.flash-zh {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
}

.auto-flash {
  align-content: center;
  min-height: 320px;
}

.auto-flash:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  padding: min(5vh, 48px);
  background: #f8fbfd;
  overflow: auto;
}

.auto-flash:fullscreen .scene-card {
  width: min(88vw, 960px);
}

.auto-flash:fullscreen .flashword {
  font-size: clamp(72px, 13vw, 150px);
}

.auto-flash:fullscreen .flash-zh,
.auto-flash:fullscreen .definition,
.auto-flash:fullscreen .example-line {
  font-size: clamp(18px, 2.2vw, 32px);
}

.scene-card {
  margin: 0;
  display: grid;
  gap: 8px;
  justify-items: center;
  justify-self: center;
  width: min(100%, 420px);
  aspect-ratio: 8 / 5;
}

.scene-card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 8 / 5;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: #e9eef2;
}

.photo-example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.photo-example-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.photo-example-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: cover;
}

.photo-example-grid figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: var(--ink);
}

.photo-example-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.scene-card figcaption {
  display: none;
  max-width: 680px;
  border: 1px dashed #bcc9d6;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.scene-card.missing figcaption {
  display: block;
}

.scene-card.placeholder figcaption {
  display: block;
}

.auto-flash.word-mode {
  text-align: center;
}

.auto-flash.word-mode .flashword {
  font-size: clamp(54px, 10vw, 104px);
}

.auto-flash.sentence-mode .flashword {
  font-size: clamp(34px, 6vw, 62px);
}

.auto-sentence {
  font-size: 22px;
  line-height: 1.45;
}

.auto-progress {
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #e9eef2;
}

.auto-progress div {
  height: 100%;
  background: var(--green);
  transition: width 180ms linear;
}

.definition {
  color: var(--ink);
  line-height: 1.5;
}

.word-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.word-facts div {
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px;
}

.word-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.word-facts dd {
  margin: 3px 0 0;
  font-weight: 850;
}

.example-line {
  margin: 0;
  border-left: 4px solid var(--green);
  background: #fff;
  padding: 10px 12px;
  font-weight: 750;
}

.practice-box {
  display: grid;
  gap: 12px;
}

.mastery-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.word-bank button {
  min-height: 34px;
  padding: 0 9px;
  color: var(--muted);
  font-size: 12px;
}

.passive-bank button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.passive-bank button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.word-bank button.active {
  border-color: var(--blue);
  color: var(--blue);
}

.passive-bank button.active {
  border-color: var(--blue);
  background: #eaf3ff;
  color: var(--blue);
}

.word-bank button.known {
  border-color: #a9d6c8;
  background: #e3f3ee;
  color: var(--green);
}

.passive-bank button.known {
  border-color: #a9d6c8;
  background: #e3f3ee;
  color: var(--green);
}

.muted {
  color: var(--muted);
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.audio-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #f0c36d;
  border-radius: 8px;
  background: #fff8e6;
  color: #795400;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 800;
}

.audio-warning button {
  flex: 0 0 auto;
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.word-audio-element {
  display: none;
}

.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.good {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.warn {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.sentence-box {
  border: 1px solid #d8e1d8;
  border-radius: 8px;
  background: #fbfcfb;
  padding: 16px;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 750;
}

.sentence-box.hidden {
  color: transparent;
  text-shadow: 0 0 12px rgba(29, 41, 53, 0.24);
  user-select: none;
}

.sentence-stage {
  display: grid;
  gap: 10px;
}

.cloze-box span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.question-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.vivid-question {
  border-left: 5px solid var(--blue);
}

.material-card {
  display: grid;
  gap: 12px;
  border: 1px solid #cbd8e4;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 14px;
}

.material-ref {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.material-ref span,
.material-note span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.material-ref strong {
  font-size: 14px;
}

.material-ref code {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.material-note {
  display: grid;
  gap: 8px;
}

.material-note textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 11px 12px;
  line-height: 1.45;
}

.material-check {
  margin: 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 12px;
}

.passage-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 16px;
}

.passage-card p {
  margin: 0 0 12px;
  line-height: 1.65;
}

.passage-card p:last-child {
  margin-bottom: 0;
}

.strategy-card {
  align-content: start;
}

.writing-prompt {
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  background: #fffaf0;
  padding: 16px;
  font-size: 20px;
  font-weight: 850;
  line-height: 1.4;
}

.writing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.writing-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.writing-grid textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 12px;
  text-transform: none;
  line-height: 1.45;
}

.writing-done {
  margin-top: 0;
}

.choice.correct {
  border-color: #99cbbd;
  background: #e3f3ee;
}

.choice.wrong {
  border-color: #ddb2af;
  background: #fff0ef;
}

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

.score-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.score-grid input {
  min-width: 0;
  min-height: 40px;
  padding: 0 9px;
}

.score-head strong {
  color: var(--green);
  font-size: 30px;
}

.notes-panel textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  padding: 12px;
  line-height: 1.45;
}

.mini-plan,
.source-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.mini-plan ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.4;
}

.source-list {
  display: grid;
  gap: 8px;
}

.source-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  padding: 9px 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
}

.source-link span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.source-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.materials-shell {
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.materials-hero,
.pdf-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.materials-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 22px;
}

.materials-hero p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.primary-link {
  display: inline-grid;
  min-height: 42px;
  align-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 850;
}

.pdf-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.pdf-stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 16px;
}

.pdf-stats strong {
  display: block;
  color: var(--green);
  font-size: 32px;
  line-height: 1;
}

.pdf-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.pdf-section {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 18px;
}

.pdf-toolbar {
  display: grid;
  gap: 10px;
}

.pdf-toolbar input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
}

.initial-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.initial-tabs button {
  min-width: 38px;
  min-height: 34px;
  padding: 0 8px;
}

.initial-tabs button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.pdf-vocab-grid,
.pdf-doc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pdf-vocab-card,
.pdf-doc-card {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.pdf-word-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.pdf-word-head h3,
.pdf-doc-card h3 {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.pdf-word-head span,
.pdf-doc-card span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pdf-vocab-card p {
  margin-bottom: 0;
  color: var(--ink);
  line-height: 1.45;
}

.sense-list {
  display: grid;
  gap: 5px;
}

.sense-list span,
.pdf-vocab-card small,
.pdf-doc-card code {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.pdf-doc-card.needs-ocr {
  border-color: #e7c273;
  background: #fffaf0;
}

.pdf-doc-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.pdf-doc-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pdf-doc-card dd {
  margin: 2px 0 0;
  font-weight: 850;
}

.pdf-doc-card code {
  overflow-wrap: anywhere;
}

.pdf-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pdf-pager span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.test-page-list {
  display: grid;
  gap: 12px;
}

.answer-summary {
  display: grid;
  gap: 12px;
}

.answer-key-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
}

.answer-grid span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 850;
}

.answer-grid strong {
  color: var(--muted);
  font-size: 11px;
}

.test-evaluator {
  display: grid;
  gap: 12px;
  border: 1px solid #cbd8e4;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 14px;
}

.test-evaluator.finished {
  border-color: #a9d6c8;
  background: #f0faf6;
}

.converted-test-card {
  overflow: hidden;
}

.converted-practice-panel,
.converted-source-details {
  display: grid;
  gap: 12px;
}

.converted-practice-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.converted-practice-steps div,
.converted-question-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.converted-practice-steps strong {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
}

.converted-practice-steps span {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.converted-question-list {
  display: grid;
  gap: 8px;
}

.converted-question-list article {
  display: grid;
  gap: 5px;
}

.converted-question-list span,
.converted-answer-grid span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.converted-question-list p {
  margin: 0;
  line-height: 1.45;
}

.converted-answer-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 7px;
}

.converted-answer-grid label {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.converted-answer-grid select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 8px;
  font: inherit;
}

.converted-catalog {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.converted-catalog div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.converted-catalog strong {
  color: var(--blue);
  font-size: 22px;
}

.converted-catalog span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.converted-catalog small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.converted-source-details summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ocr-snapshot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.ocr-snapshot img {
  display: block;
  width: 100%;
  max-height: 720px;
  object-fit: contain;
}

.converted-test-text {
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 14px;
  font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.evaluation-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.evaluation-controls label {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.evaluation-controls select,
.answer-sheet-grid select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 9px;
  font: inherit;
}

.answer-sheet-grid,
.answer-review-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 7px;
}

.answer-sheet-grid label {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.answer-sheet-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.evaluation-result {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.evaluation-result div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.evaluation-result strong {
  display: block;
  color: var(--green);
  font-size: 28px;
  line-height: 1;
}

.evaluation-result span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.answer-review-grid span {
  display: grid;
  grid-template-columns: 28px 1fr 1fr;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 850;
}

.answer-review-grid span.correct {
  border-color: #a9d6c8;
  background: #e3f3ee;
}

.answer-review-grid span.wrong {
  border-color: #ddb2af;
  background: #fff0ef;
}

.answer-review-grid strong {
  color: var(--muted);
  font-size: 11px;
}

.answer-review-grid em {
  font-style: normal;
}

.answer-review-grid b {
  color: var(--green);
}

.test-page-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.test-page-card pre {
  max-height: 520px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  white-space: pre-wrap;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
}

.word-source-card {
  gap: 12px;
}

.source-sense-list {
  display: grid;
  gap: 8px;
}

.source-sense-list div {
  display: grid;
  grid-template-columns: minmax(72px, 0.2fr) minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.source-sense-list span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.source-sense-list strong {
  overflow-wrap: anywhere;
}

.source-raw {
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  white-space: pre-wrap;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.auth-panel {
  align-self: stretch;
  min-width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.standalone-shell > .auth-panel {
  margin-top: 12px;
}

body.standalone-mode .auth-panel {
  display: none;
}

.auth-form {
  display: grid;
  gap: 8px;
}

.auth-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.auth-form input {
  width: 100%;
}

.auth-user {
  display: grid;
  gap: 2px;
}

.auth-user span,
.auth-message {
  color: var(--muted);
  font-size: 0.78rem;
}

.auth-user strong {
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.auth-message {
  margin: 8px 0 0;
}

.landing-body,
.profile-body {
  min-height: 100vh;
  background: #f7f5ef;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
}

.landing-nav nav,
.landing-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.landing-nav button,
.landing-actions button {
  min-height: 38px;
}

.landing-login-button,
.landing-register-button {
  min-width: 92px;
  box-shadow: 0 6px 16px rgba(20, 35, 48, 0.08);
}

.landing-login-button {
  border-color: var(--blue);
  background: #fff;
  color: var(--blue);
}

.landing-register-button {
  border-color: var(--blue);
}

.brand-mark {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.landing-hero,
.landing-band,
.pricing-band,
.profile-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 36px;
  align-items: center;
  min-height: calc(100vh - 92px);
  padding: 28px 0 48px;
}

.landing-copy {
  display: grid;
  gap: 18px;
}

.landing-copy h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.landing-copy p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.landing-actions a,
.landing-nav a,
.pricing-card a {
  text-decoration: none;
}

.product-preview,
.pricing-card,
.profile-card,
.feature-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.product-preview {
  display: grid;
  gap: 16px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(20, 35, 48, 0.1);
}

.preview-top,
.preview-row,
.pricing-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-top span,
.preview-row span,
.price-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.preview-word {
  display: grid;
  gap: 4px;
  border: 1px solid #d9e2df;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
}

.preview-word span {
  font-size: 2rem;
  font-weight: 900;
}

.preview-word small {
  color: var(--muted);
}

.preview-scene {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #dce8eb 0 48%, #d8e4da 48% 100%);
}

.preview-person {
  position: absolute;
  left: 34%;
  bottom: 36px;
  width: 76px;
  height: 132px;
  border-radius: 44px 44px 18px 18px;
  background: #29566f;
}

.preview-person::before {
  content: "";
  position: absolute;
  top: -44px;
  left: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #d7a578;
}

.preview-card {
  position: absolute;
  right: 22%;
  bottom: 92px;
  width: 118px;
  height: 78px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(20, 35, 48, 0.16);
}

.preview-book {
  position: absolute;
  right: 18%;
  bottom: 44px;
  width: 146px;
  height: 18px;
  border-radius: 4px;
  background: #bd5d4f;
}

.landing-band {
  padding: 48px 0;
}

.landing-auth-panel {
  width: min(520px, calc(100% - 32px));
  margin: -24px auto 38px;
}

.landing-section-head {
  max-width: 720px;
  margin-bottom: 18px;
}

.landing-section-head h2,
.pricing-band h2,
.profile-head h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: 0;
}

.feature-grid,
.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-grid article,
.profile-card {
  padding: 18px;
}

.feature-grid h3,
.profile-card h2 {
  margin: 0 0 8px;
}

.feature-grid p,
.pricing-band p,
.profile-head p,
.profile-card p {
  color: var(--muted);
  line-height: 1.55;
}

.pricing-band {
  margin-bottom: 56px;
  border-top: 1px solid var(--line);
  padding: 34px 0 0;
}

.pricing-card {
  display: grid;
  gap: 12px;
  min-width: min(320px, 100%);
  padding: 18px;
}

.pricing-card strong {
  font-size: 1.2rem;
}

.profile-shell {
  padding: 28px 0 56px;
}

.profile-head {
  margin-bottom: 18px;
}

.profile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-list {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.profile-list div {
  display: grid;
  gap: 2px;
}

.profile-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 850;
}

.profile-form {
  display: grid;
  gap: 12px;
}

.profile-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.profile-form input,
.profile-form textarea,
.profile-form select {
  width: 100%;
}

.review-word-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.review-test-card .question-card {
  align-content: start;
}

.review-test-card .question-card.review-pass {
  border-color: #99cbbd;
  background: #e3f3ee;
}

.review-test-card .question-card.review-fail {
  border-color: #ddb2af;
  background: #fff0ef;
}

.payment-card {
  align-content: start;
}

.auth-checking .app-shell {
  visibility: hidden;
}

.qa-shell {
  gap: 18px;
}

.qa-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.qa-list {
  display: grid;
  gap: 14px;
}

.qa-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.qa-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  align-items: start;
}

.qa-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.qa-card h2 span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  margin-left: 8px;
}

.qa-card p {
  margin: 0 0 12px;
}

.qa-card dl {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
}

.qa-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.qa-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.qa-card img {
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  border-radius: 6px;
  background: #edf1f5;
}

.qa-card audio {
  width: 100%;
  margin-top: 12px;
}

@media (max-width: 1160px) {
  .dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .pdf-vocab-grid,
  .pdf-doc-grid,
  .answer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .answer-sheet-grid,
  .answer-review-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .landing-hero,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .qa-summary,
  .qa-card-main {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-panel {
    order: 2;
  }

  .notes-panel {
    order: 3;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 14px;
  }

  .topbar,
  .phase-strip,
  .card-head,
  .score-head,
  .material-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .date-controls {
    width: 100%;
    justify-content: flex-start;
  }

  input[type="date"] {
    flex: 1 1 160px;
  }

  .dashboard,
  .photo-example-grid,
  .score-grid,
  .pdf-stats,
  .pdf-vocab-grid,
  .pdf-doc-grid,
  .answer-grid,
  .answer-sheet-grid,
  .answer-review-grid,
  .converted-catalog,
  .converted-answer-grid,
  .converted-practice-steps,
  .evaluation-result,
  .choice-grid,
  .mission-grid,
  .recall-steps,
  .round-track,
  .page-jumps,
  .reading-layout,
  .writing-grid,
  .word-facts {
    grid-template-columns: 1fr;
  }

  .landing-nav,
  .pricing-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-hero {
    min-height: auto;
  }

  .landing-copy h1 {
    font-size: 2.45rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    flex-direction: column;
  }

  .mission-meter {
    width: 100%;
    min-height: 92px;
  }

  .study-scene {
    display: none;
  }

  .schedule-list div,
  .task-row {
    grid-template-columns: 1fr;
  }

  .task-row {
    grid-template-columns: 34px 1fr;
  }

  .minutes {
    grid-column: 2;
    justify-self: start;
  }
}

/* Simple content-aware vocabulary UI */
:root {
  --bg: #ffffff;
  --ink: #172033;
  --muted: #5e6b7c;
  --line: #d9e2ef;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --blue: #2563eb;
  --green: #2563eb;
  --gold: #f59e0b;
  --red: #dc2626;
  --coral: #f59e0b;
  --shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
}

body {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.78), rgba(246, 242, 234, 0.96)),
    var(--bg);
}

button,
.primary-link {
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease;
}

button:hover,
.primary-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(21, 26, 33, 0.1);
}

input,
textarea,
select {
  min-height: 42px;
  border-color: #d8d1c4;
  background: #fffdf8;
}

select {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  padding: 0 11px;
}

.primary,
.primary-link {
  background: #151a21;
  border-color: #151a21;
  color: #fff;
}

.good {
  background: var(--green);
  border-color: var(--green);
}

.danger {
  background: var(--coral);
  border-color: var(--coral);
}

.landing-body {
  background: #151a21;
  color: #fffdf8;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  width: 100%;
  border-bottom: 1px solid rgba(255, 253, 248, 0.12);
  background: rgba(21, 26, 33, 0.9);
  backdrop-filter: blur(14px);
}

.landing-nav a,
.landing-nav .brand-mark {
  color: #fffdf8;
}

.landing-login-button {
  border-color: rgba(255, 253, 248, 0.35);
  background: rgba(255, 253, 248, 0.08);
  color: #fffdf8;
}

.landing-hero {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 74px);
  padding: clamp(48px, 8vh, 96px) max(24px, calc((100vw - 1120px) / 2)) 92px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(21, 26, 33, 0.92) 0%, rgba(21, 26, 33, 0.72) 46%, rgba(21, 26, 33, 0.18) 100%),
    url("./images/words-photo-v3-jpg/by-word/accumulate.jpg") center right / cover no-repeat;
}

.landing-hero::after {
  content: "";
  position: absolute;
  left: max(24px, calc((100vw - 1120px) / 2));
  right: max(24px, calc((100vw - 1120px) / 2));
  bottom: 22px;
  height: 1px;
  background: rgba(255, 253, 248, 0.24);
}

.landing-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
  align-content: center;
}

.landing-copy .eyebrow,
.landing-section-head .eyebrow,
.pricing-band .eyebrow {
  color: #f0bb6a;
}

.landing-copy h1 {
  color: #fffdf8;
  font-size: clamp(48px, 7vw, 92px);
}

.landing-copy p {
  color: rgba(255, 253, 248, 0.82);
  font-size: 1.12rem;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-actions button {
  min-height: 46px;
  border-color: rgba(255, 253, 248, 0.22);
  background: rgba(255, 253, 248, 0.1);
  color: #fffdf8;
}

.landing-actions .primary {
  background: #fffdf8;
  border-color: #fffdf8;
  color: #151a21;
}

.product-preview {
  position: absolute;
  z-index: 1;
  right: max(24px, calc((100vw - 1120px) / 2));
  bottom: 54px;
  width: min(360px, calc(100% - 48px));
  border-color: rgba(255, 253, 248, 0.22);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.preview-scene {
  background: url("./images/words-photo-v3-jpg/by-word/accumulate.jpg") center / cover no-repeat;
}

.preview-person,
.preview-card,
.preview-book {
  display: none;
}

.landing-band,
.pricing-band,
.profile-shell {
  width: min(1120px, calc(100% - 32px));
}

.landing-band,
.pricing-band {
  color: var(--ink);
}

.landing-band {
  margin-top: -42px;
  padding-top: 72px;
}

.feature-grid article,
.pricing-card,
.profile-card,
.metric,
.progress-wrap,
.calendar-panel,
.today-panel,
.notes-panel,
.card {
  border-color: rgba(91, 75, 48, 0.16);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.feature-grid article {
  min-height: 168px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(246, 242, 234, 0.9));
}

.app-shell {
  width: min(1540px, 100%);
  padding: 22px;
}

.topbar {
  margin-bottom: 16px;
  border: 1px solid rgba(91, 75, 48, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.96), rgba(237, 245, 241, 0.9)),
    var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.topbar h1 {
  font-size: clamp(34px, 4vw, 58px);
}

.dashboard {
  grid-template-columns: repeat(3, minmax(140px, 1fr)) minmax(260px, 1.6fr);
}

.metric,
.progress-wrap {
  min-height: 98px;
  border-top: 4px solid rgba(37, 109, 133, 0.32);
}

.metric strong {
  font-size: 28px;
}

.progress-track,
.auto-progress {
  background: #e8dfcf;
}

.progress-fill,
.auto-progress div {
  background: linear-gradient(90deg, var(--coral), var(--gold), var(--green));
}

.main-grid {
  grid-template-columns: 286px minmax(0, 1fr) 318px;
}

.phase-strip {
  min-height: 190px;
  border-bottom-color: rgba(91, 75, 48, 0.16);
  background:
    linear-gradient(90deg, rgba(21, 26, 33, 0.78), rgba(21, 26, 33, 0.08)),
    url("./images/words-photo-v3-jpg/by-word/adverse.jpg") center / cover no-repeat;
  color: #fffdf8;
}

#phase-badge {
  background: rgba(255, 253, 248, 0.16);
  color: #f0bb6a;
}

#focus-title {
  color: #fffdf8;
}

.study-scene {
  display: none;
}

.lesson-tabs {
  border-top: 0;
  background: rgba(255, 253, 248, 0.72);
}

.lesson-tab.active {
  background: #151a21;
  border-color: #151a21;
}

.page-hero {
  background:
    linear-gradient(135deg, rgba(237, 245, 241, 0.95), rgba(255, 253, 248, 0.94));
}

.page-kicker,
.question-type,
.material-ref span,
.material-note span,
.cloze-box span {
  color: var(--coral);
}

.mission-meter {
  background: #151a21;
  border-color: #151a21;
  color: #fffdf8;
}

.mission-meter strong,
.mission-meter span {
  color: #fffdf8;
}

.flashcard {
  border-color: rgba(91, 75, 48, 0.16);
  background: #151a21;
  color: #fffdf8;
  overflow: hidden;
}

.flashcard.vivid {
  background: #151a21;
}

.auto-flash {
  grid-template-columns: minmax(280px, 0.95fr) minmax(260px, 1fr);
  align-items: center;
  min-height: 470px;
  padding: 0;
}

.auto-flash .scene-card {
  width: 100%;
  height: 100%;
  min-height: 470px;
  aspect-ratio: auto;
  justify-self: stretch;
}

.auto-flash .scene-card img {
  height: 100%;
  min-height: 470px;
  border: 0;
  border-radius: 0;
  object-fit: cover;
}

.auto-flash > div {
  padding: clamp(22px, 4vw, 54px);
}

.auto-flash.word-mode,
.auto-flash.sentence-mode {
  text-align: left;
}

.cinematic-flash {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  isolation: isolate;
  min-height: min(76vh, 760px);
}

.cinematic-flash::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(12, 16, 21, 0.86), rgba(12, 16, 21, 0.42) 46%, rgba(12, 16, 21, 0.18)),
    linear-gradient(0deg, rgba(12, 16, 21, 0.72), transparent 48%);
  pointer-events: none;
}

.cinematic-flash .scene-card {
  grid-area: 1 / 1;
  min-height: min(76vh, 760px);
}

.cinematic-flash .scene-card img {
  min-height: min(76vh, 760px);
}

.cinematic-panel {
  grid-area: 1 / 1;
  align-self: end;
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 48px));
  margin: 0 0 clamp(22px, 5vw, 64px) clamp(18px, 5vw, 72px);
  padding: 0;
}

.scene-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.scene-meta span {
  border: 1px solid rgba(255, 253, 248, 0.28);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.1);
  padding: 6px 10px;
  color: rgba(255, 253, 248, 0.82);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.cinematic-script {
  max-width: 780px;
  margin: 18px 0 0;
  color: rgba(255, 253, 248, 0.86);
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 760;
  line-height: 1.35;
}

.knowledge-fact {
  max-width: 720px;
  margin: 16px 0 0;
  border-left: 3px solid #f0bb6a;
  background: rgba(255, 253, 248, 0.12);
  padding: 10px 12px;
  color: rgba(255, 253, 248, 0.9);
  font-size: clamp(15px, 1.6vw, 20px);
  font-weight: 780;
  line-height: 1.4;
}

.cinematic-flash .example-line {
  grid-area: 1 / 1;
  align-self: end;
  justify-self: end;
  position: relative;
  z-index: 3;
  width: min(560px, calc(100% - 48px));
  margin: 0 clamp(18px, 4vw, 54px) clamp(18px, 4vw, 48px) 0;
  backdrop-filter: blur(14px);
}

.cinematic-flash .word-facts {
  grid-area: 1 / 1;
  align-self: start;
  justify-self: end;
  position: relative;
  z-index: 3;
  width: min(520px, calc(100% - 48px));
  margin: clamp(18px, 4vw, 48px) clamp(18px, 4vw, 54px) 0 0;
}

.auto-flash.word-mode .flashword {
  font-size: clamp(58px, 8vw, 108px);
}

.flash-zh {
  color: rgba(255, 253, 248, 0.72);
}

.definition.muted {
  color: rgba(255, 253, 248, 0.72);
}

.example-line {
  border-left-color: #f0bb6a;
  background: rgba(255, 253, 248, 0.1);
  color: #fffdf8;
}

.word-facts div,
.sentence-box,
.question-card,
.material-ref,
.mission-grid div,
.recall-steps div,
.strategy-card,
.cloze-box,
.task-row,
.source-link {
  background: rgba(255, 253, 248, 0.78);
}

.word-source-card,
.material-card {
  border-color: rgba(37, 109, 133, 0.22);
  background: rgba(237, 245, 241, 0.78);
}

body.focus-mode .today-panel {
  background: #151a21;
}

body.focus-mode .lesson-page {
  padding: 0;
}

body.focus-mode .learning-card {
  width: 100%;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.focus-mode .learning-card:not(.review-test-card) {
  background: #151a21;
  color: #fffdf8;
}

body.focus-mode .page-hero,
body.focus-mode .round-track,
body.focus-mode .source-note,
body.focus-mode .material-card,
body.focus-mode .word-bank,
body.focus-mode .auto-progress,
body.focus-mode .audio-warning,
body.focus-mode .focus-nav,
body.focus-mode .button-group.auto-actions {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

body.focus-mode .auto-flash {
  min-height: min(74vh, 760px);
  border-radius: 0;
}

body.focus-mode .auto-flash .scene-card,
body.focus-mode .auto-flash .scene-card img {
  min-height: min(74vh, 760px);
}

.profile-body {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.88), rgba(246, 242, 234, 0.98)),
    url("./images/words-photo-v3-jpg/by-word/strategy.jpg") center top / cover fixed no-repeat;
}

.profile-shell {
  padding-top: 42px;
}

.profile-head {
  max-width: 760px;
  margin-bottom: 24px;
}

.profile-card {
  align-content: start;
  min-height: 230px;
}

.profile-form input,
.profile-form textarea,
.profile-form select {
  min-height: 44px;
  padding: 9px 11px;
}

.set-status-list {
  display: grid;
  gap: 8px;
}

.set-status-list div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
  padding: 10px 12px;
}

.set-status-list div.available {
  border-color: rgba(31, 128, 104, 0.32);
  background: rgba(227, 243, 238, 0.7);
}

.set-status-list div.blocked {
  border-color: rgba(183, 121, 31, 0.32);
  background: rgba(255, 244, 220, 0.7);
}

.set-status-list strong {
  font-size: 0.92rem;
}

.set-status-list span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.exam-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(37, 109, 133, 0.22);
  border-radius: 8px;
  background: rgba(237, 245, 241, 0.78);
  padding: 12px;
}

.exam-summary strong {
  color: var(--green);
  font-size: 2rem;
  line-height: 1;
}

.exam-summary span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.final-exam-list {
  display: grid;
  gap: 10px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}

.final-exam-item {
  display: grid;
  gap: 10px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.78);
  padding: 12px;
}

.final-exam-item legend {
  padding: 0 4px;
  font-weight: 900;
}

.final-exam-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.final-exam-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.final-exam-choices label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  text-transform: none;
}

.final-exam-choices input {
  flex: 0 0 auto;
  min-height: auto;
  margin-top: 3px;
  accent-color: var(--green);
}

.final-exam-choices span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 1160px) {
  .landing-hero {
    padding-inline: 24px;
  }

  .product-preview {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 28px;
  }

  .auto-flash {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .landing-hero {
    min-height: calc(100vh - 70px);
    padding: 42px 16px 72px;
  }

  .landing-copy h1 {
    font-size: 44px;
  }

  .landing-copy p {
    font-size: 1rem;
  }

  .product-preview {
    width: 100%;
  }

  .dashboard,
  .main-grid {
    gap: 12px;
  }

  .auto-flash,
  .auto-flash .scene-card,
  .auto-flash .scene-card img {
    min-height: 320px;
  }

  .final-exam-choices {
    grid-template-columns: 1fr;
  }

  .auto-flash > div {
    padding: 22px;
  }

  .cinematic-panel {
    width: calc(100% - 32px);
    margin: 0 16px 28px;
  }

  .cinematic-script {
    font-size: 17px;
  }

  .cinematic-flash .example-line,
  .cinematic-flash .word-facts {
    justify-self: center;
    width: calc(100% - 32px);
    margin-inline: 16px;
  }

  .cinematic-flash .word-facts {
    display: none;
  }

  .auto-flash.word-mode .flashword {
    font-size: 54px;
  }
}

/* Simple active-learning theme: white surface, blue focus, orange accent. */
body.focus-mode {
  background: #ffffff;
}

body.focus-mode .app-shell {
  width: min(1180px, 100%);
  padding: 18px;
}

body.focus-mode .page-card.learning-card {
  border: 0;
  background: #ffffff;
  box-shadow: none;
}

body.focus-mode .page-hero {
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px 18px;
}

body.focus-mode .page-kicker {
  color: var(--blue);
}

body.focus-mode .mission-meter,
body.focus-mode .round-track button.active,
body.focus-mode .button-group .primary {
  background: var(--blue);
  color: #ffffff;
}

body.focus-mode .round-track button {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

body.focus-mode .round-track button.done {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eff6ff;
  color: var(--blue);
}

body.focus-mode .auto-progress {
  height: 6px;
  border: 0;
  background: #e8eef8;
}

body.focus-mode .auto-progress > div {
  background: var(--blue);
}

body.focus-mode .cinematic-flash {
  min-height: min(72vh, 720px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

body.focus-mode .cinematic-flash::after {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82) 46%, rgba(255, 255, 255, 0.5)),
    linear-gradient(0deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.18) 52%);
}

body.focus-mode .cinematic-flash .scene-card,
body.focus-mode .cinematic-flash .scene-card img,
body.focus-mode .auto-flash,
body.focus-mode .auto-flash .scene-card,
body.focus-mode .auto-flash .scene-card img {
  min-height: min(72vh, 720px);
}

body.focus-mode .cinematic-flash .scene-card img {
  opacity: 0.62;
}

body.focus-mode .cinematic-panel {
  width: min(700px, calc(100% - 48px));
}

body.focus-mode .scene-meta span {
  border-color: rgba(37, 99, 235, 0.18);
  background: #eff6ff;
  color: var(--blue);
}

body.focus-mode .flashword {
  color: var(--blue);
  letter-spacing: 0;
}

.flash-ipa {
  margin-top: 10px;
  color: #3b4a5f;
  font-size: clamp(20px, 2.8vw, 34px);
  font-weight: 750;
  line-height: 1.2;
}

body.focus-mode .flash-zh,
body.focus-mode .definition.muted,
body.focus-mode .cinematic-script {
  color: var(--ink);
}

body.focus-mode .cinematic-script {
  max-width: 680px;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 760;
}

body.focus-mode .knowledge-fact {
  border-left-color: var(--gold);
  background: #fff7ed;
  color: #5f3b10;
}

body.focus-mode .cinematic-flash .example-line,
body.focus-mode .cinematic-flash .word-facts {
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: none;
}

body.focus-mode .cinematic-flash .word-facts dt {
  color: var(--blue);
}

body.focus-mode .audio-warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #7c2d12;
}

@media (max-width: 680px) {
  body.focus-mode .app-shell {
    padding: 12px;
  }

  body.focus-mode .page-hero {
    padding: 14px;
  }

  body.focus-mode .cinematic-flash,
  body.focus-mode .cinematic-flash .scene-card,
  body.focus-mode .cinematic-flash .scene-card img,
  body.focus-mode .auto-flash,
  body.focus-mode .auto-flash .scene-card,
  body.focus-mode .auto-flash .scene-card img {
    min-height: 520px;
  }

  body.focus-mode .cinematic-panel {
    width: calc(100% - 28px);
    margin: 0 14px 24px;
  }

  body.focus-mode .cinematic-flash .example-line {
    width: calc(100% - 28px);
    margin: 0 14px 14px;
  }
}
