:root {
  --ink: #16243d;
  --ink-soft: #31415f;
  --paper: #fffdf8;
  --cream: #f4efe5;
  --cream-deep: #e9e0d1;
  --green: #2e7d61;
  --green-soft: #dcecdf;
  --orange: #cf7448;
  --orange-soft: #f4dfd0;
  --red: #ad493f;
  --red-soft: #f4d8d4;
  --line: rgba(22, 36, 61, 0.12);
  --shadow: 0 24px 80px rgba(22, 36, 61, 0.11);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --sans: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --serif: Georgia, "Times New Roman", "Noto Serif SC", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(207, 116, 72, 0.14), transparent 26rem),
    radial-gradient(circle at 93% 38%, rgba(46, 125, 97, 0.11), transparent 30rem),
    var(--cream);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(207, 116, 72, 0.38);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(1px);
  pointer-events: none;
}

.ambient-one {
  top: 8rem;
  right: -9rem;
  width: 26rem;
  height: 26rem;
  border: 1px solid rgba(22, 36, 61, 0.08);
}

.ambient-two {
  bottom: -9rem;
  left: -8rem;
  width: 28rem;
  height: 28rem;
  border: 1px solid rgba(22, 36, 61, 0.07);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
  background: rgba(244, 239, 229, 0.84);
  border-bottom: 1px solid rgba(22, 36, 61, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  border-radius: 14px 5px 14px 5px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  letter-spacing: 0.04em;
}

.brand small {
  margin-top: 2px;
  color: #758097;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.main-nav {
  display: flex;
  gap: 3px;
  padding: 5px;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.nav-item {
  padding: 8px 17px;
  color: #69738a;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  transition: 180ms ease;
}

.nav-item:hover {
  color: var(--ink);
}

.nav-item.is-active {
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 6px 18px rgba(22, 36, 61, 0.17);
}

.header-date {
  justify-self: end;
  color: #6d778d;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.app-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 64px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: view-in 360ms ease both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.55fr 0.75fr;
  min-height: 368px;
  overflow: hidden;
  color: var(--paper);
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 15px),
    var(--ink);
  border-radius: 34px 34px 10px 34px;
  box-shadow: var(--shadow);
}

.hero::before {
  position: absolute;
  top: -10rem;
  right: 14%;
  width: 32rem;
  height: 32rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.hero::after {
  position: absolute;
  right: -4rem;
  bottom: -10rem;
  width: 24rem;
  height: 24rem;
  background: rgba(207, 116, 72, 0.15);
  border-radius: 50%;
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 48px 58px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: #d8a78d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.eyebrow.dark {
  color: var(--orange);
}

.hero h1,
.page-heading h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.hero h1 {
  max-width: 640px;
  font-size: clamp(40px, 5vw, 66px);
  line-height: 1.04;
}

.hero h1 span {
  color: #e4b497;
}

.hero-intro {
  max-width: 590px;
  margin: 22px 0 0;
  color: rgba(255, 253, 248, 0.68);
  font-size: 14px;
  line-height: 1.8;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 15px 0 0;
  padding: 7px 11px;
  color: rgba(255, 253, 248, 0.62);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
}

.sync-status.is-current {
  color: rgba(219, 242, 226, 0.8);
}

.sync-status.is-stale {
  color: #f2c8ae;
  border-color: rgba(228, 180, 151, 0.25);
}

.sync-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: #e4b497;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(228, 180, 151, 0.12);
}

.is-current .sync-dot {
  background: #8fd3ad;
  box-shadow: 0 0 0 3px rgba(143, 211, 173, 0.12);
}

.hero-actions,
.done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 21px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.02em;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-light {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.button-light:hover {
  box-shadow: 0 13px 34px rgba(0, 0, 0, 0.22);
}

.button-dark {
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 10px 24px rgba(22, 36, 61, 0.18);
}

.button-dark:hover {
  background: #213453;
}

.button-ghost {
  color: rgba(255, 253, 248, 0.8);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.button-ghost:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.08);
}

.button-ghost-dark {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

.hero-progress {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  background: rgba(255, 255, 255, 0.045);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-ring {
  display: grid;
  width: 158px;
  height: 158px;
  padding: 7px;
  place-items: center;
  background: conic-gradient(#e4b497 0deg, rgba(255, 255, 255, 0.13) 0deg);
  border-radius: 50%;
  transition: background 500ms ease;
}

.ring-center {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: baseline;
  justify-content: center;
  padding-top: 51px;
  background: var(--ink);
  border-radius: 50%;
}

.ring-center strong {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 500;
}

.ring-center span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 14px;
}

.ring-center b {
  font-weight: inherit;
}

.hero-progress > p {
  margin: 16px 0 22px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  padding-top: 19px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-stats div {
  text-align: center;
}

.mini-stats div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-stats strong,
.mini-stats span {
  display: block;
}

.mini-stats strong {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
}

.mini-stats span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.75fr);
  gap: 20px;
  margin-top: 20px;
}

.panel {
  background: rgba(255, 253, 248, 0.91);
  border: 1px solid rgba(22, 36, 61, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(22, 36, 61, 0.05);
}

.session-panel {
  min-height: 560px;
  padding: 28px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading.compact {
  align-items: center;
}

.panel-heading .section-kicker {
  margin-bottom: 7px;
}

.panel-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.session-counter {
  display: flex;
  align-items: baseline;
  color: #9ba2b1;
}

.session-counter span {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 28px;
}

.session-counter small {
  font-size: 12px;
}

.session-counter b {
  font-weight: inherit;
}

.progress-track {
  height: 3px;
  margin: 19px 0 0;
  overflow: hidden;
  background: #ece6db;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--orange);
  border-radius: inherit;
  transition: width 400ms ease;
}

.start-state,
.done-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 68px 24px 42px;
  text-align: center;
}

.start-symbol {
  display: grid;
  width: 74px;
  height: 74px;
  margin-bottom: 23px;
  place-items: center;
  color: var(--orange);
  background: var(--orange-soft);
  border-radius: 50% 50% 50% 13px;
  font-family: var(--serif);
  font-size: 25px;
  font-style: italic;
}

.start-state h3,
.done-state h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
}

.start-state > p,
.done-state > p {
  max-width: 500px;
  margin: 13px 0 0;
  color: #69738a;
  font-size: 13px;
  line-height: 1.8;
}

.word-stage-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(760px, 100%);
  gap: 12px;
  margin-top: 24px;
  text-align: left;
}

.word-stage-choice-grid article {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  padding: 22px;
  background: #f6f1e9;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.word-stage-choice-grid article > span {
  color: var(--orange);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.word-stage-choice-grid article > strong {
  margin-top: 9px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.word-stage-choice-grid article > p {
  flex: 1;
  margin: 10px 0 18px;
  color: #758094;
  font-size: 11px;
  line-height: 1.7;
}

.word-stage-choice-grid article > .button {
  align-self: flex-start;
}

.recognition-state {
  min-height: 500px;
  padding: 36px 20px 18px;
  text-align: center;
}

.recognition-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #858e9f;
  font-size: 9px;
  font-weight: 700;
}

.bank-badge {
  padding: 5px 9px;
  color: var(--orange);
  background: var(--orange-soft);
  border-radius: 999px;
}

.bank-badge.is-learned {
  color: var(--green);
  background: var(--green-soft);
}

.recognition-word {
  margin: 34px 0 20px;
  font-family: var(--serif);
  font-size: clamp(46px, 7vw, 74px);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.recognition-example {
  max-width: 720px;
  margin: 0 auto 22px;
  padding: 16px 20px;
  background: #f6f1e9;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.recognition-example > span {
  color: var(--orange);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.recognition-example blockquote {
  margin: 8px 0 0;
  color: #536078;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.7;
}

.recognition-question {
  margin: 0;
  color: #758094;
  font-size: 12px;
}

.recognition-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(500px, 100%);
  gap: 10px;
  margin: 20px auto 0;
}

.recognition-choice button {
  min-height: 64px;
  border: 0;
  border-radius: 15px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
}

.recognition-know {
  color: var(--green);
  background: var(--green-soft);
}

.recognition-unknown {
  color: var(--red);
  background: var(--red-soft);
}

.recognition-choice button:hover {
  color: var(--paper);
  transform: translateY(-1px);
}

.recognition-know:hover {
  background: var(--green);
}

.recognition-unknown:hover {
  background: var(--red);
}

.recognition-answer {
  max-width: 680px;
  margin: 0 auto;
  padding: 22px;
  background: #f6f1e9;
  border-radius: 17px;
}

.recognition-answer h3 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
}

.recognition-answer blockquote {
  margin: 15px 0 0;
  color: #6e788b;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.65;
}

.recognition-actions {
  display: flex;
  max-width: 680px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px auto 0;
}

.recognition-actions > span {
  color: #8a92a1;
  font-size: 10px;
}

.recognition-action-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.recognition-retry {
  color: var(--red);
  white-space: nowrap;
}

.plan-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 26px;
}

.plan-notes span {
  padding: 7px 12px;
  color: #677186;
  background: #f2eee7;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.quiz-state {
  padding-top: 22px;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.question-type {
  padding: 6px 10px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: #69738a;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--ink);
  background: #f3eee5;
}

.icon-button svg {
  width: 17px;
  fill: currentColor;
}

.question-main {
  min-height: 170px;
  padding: 18px 0 20px;
  text-align: center;
}

.question-prompt {
  margin: 0 0 13px;
  color: #7c8598;
  font-size: 11px;
  font-weight: 650;
}

.question-main h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.question-main h3.sentence-question,
.question-main h3.meaning-question {
  max-width: 760px;
  margin: 0 auto;
  font-family: var(--sans);
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 650;
  letter-spacing: -0.03em;
}

.question-main h3.meaning-question {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 500;
}

.ipa {
  min-height: 18px;
  margin: 9px 0 0;
  color: var(--orange);
  font-family: var(--serif);
  font-size: 14px;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.option {
  position: relative;
  min-height: 58px;
  padding: 14px 44px 14px 17px;
  overflow: hidden;
  color: var(--ink-soft);
  text-align: left;
  background: #f7f3ec;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 620;
  line-height: 1.45;
  transition: 160ms ease;
}

.option:hover:not(:disabled) {
  color: var(--ink);
  background: #eee8de;
  border-color: rgba(22, 36, 61, 0.1);
  transform: translateY(-1px);
}

.option::after {
  position: absolute;
  top: 50%;
  right: 16px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #949cab;
  background: rgba(22, 36, 61, 0.055);
  border-radius: 7px;
  content: attr(data-index);
  font-size: 9px;
  font-weight: 800;
  transform: translateY(-50%);
}

.option:disabled {
  cursor: default;
}

.option.is-correct {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(46, 125, 97, 0.26);
}

.option.is-correct::after {
  color: var(--paper);
  background: var(--green);
  content: "✓";
}

.option.is-wrong {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(173, 73, 63, 0.22);
}

.option.is-wrong::after {
  color: var(--paper);
  background: var(--red);
  content: "×";
}

.feedback {
  margin-top: 16px;
  padding: 17px;
  background: #f7f3ec;
  border-radius: 16px;
  animation: feedback-in 260ms ease both;
}

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

.feedback-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.feedback-icon {
  display: grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  place-items: center;
  color: var(--paper);
  background: var(--green);
  border-radius: 50%;
  font-weight: 800;
}

.feedback.is-wrong .feedback-icon {
  background: var(--red);
}

.feedback-heading strong {
  display: block;
  font-size: 13px;
}

.feedback-heading p {
  margin: 3px 0 0;
  color: #6d778b;
  font-size: 12px;
}

.example-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.example-box span {
  color: var(--orange);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.example-box p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.55;
}

.example-box mark {
  color: inherit;
  background: #f5d9c5;
}

.memory-tip {
  margin: 10px 0 0;
  color: #737d90;
  font-size: 11px;
  line-height: 1.6;
}

.memory-tip strong {
  margin-right: 7px;
  color: var(--ink);
}

.mark-toggle-button {
  margin-top: 11px;
  padding: 7px 11px;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid rgba(173, 73, 63, 0.16);
  border-radius: 999px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.mark-toggle-button:hover {
  color: var(--paper);
  background: var(--red);
}

.mark-toggle-button.is-marked {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(46, 125, 97, 0.18);
}

.mark-toggle-button.is-marked:hover {
  color: var(--paper);
  background: var(--green);
}

.quiz-actions {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 15px;
}

.text-button {
  padding: 5px 0;
  color: #7a8395;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.text-button:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.text-button.danger {
  color: var(--red);
}

.next-button {
  margin-left: auto;
}

.done-state {
  padding-top: 38px;
}

.result-badge {
  display: grid;
  width: 68px;
  height: 68px;
  margin-bottom: 20px;
  place-items: center;
  color: var(--paper);
  background: var(--green);
  border-radius: 50% 50% 50% 15px;
  font-size: 27px;
}

.done-state .section-kicker {
  margin-bottom: 9px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(430px, 100%);
  margin-top: 25px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-stats div + div {
  border-left: 1px solid var(--line);
}

.result-stats strong,
.result-stats span {
  display: block;
}

.result-stats strong {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

.result-stats span {
  margin-top: 3px;
  color: #7c8596;
  font-size: 10px;
}

.side-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.due-panel {
  padding: 28px;
}

.rhythm-list {
  margin-top: 12px;
}

.rhythm-item {
  display: grid;
  grid-template-columns: 37px 1fr;
  gap: 11px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.rhythm-item:last-child {
  padding-bottom: 2px;
  border-bottom: 0;
}

.rhythm-index {
  padding-top: 2px;
  color: var(--orange);
  font-family: var(--serif);
  font-size: 13px;
}

.rhythm-item strong {
  font-size: 12px;
}

.rhythm-item p {
  margin: 5px 0 0;
  color: #7b8496;
  font-size: 11px;
  line-height: 1.65;
}

.quote-panel {
  position: relative;
  min-height: 190px;
  padding: 30px;
  overflow: hidden;
  color: var(--paper);
  background: var(--green);
  border-radius: var(--radius-lg);
}

.quote-panel::after {
  position: absolute;
  right: -26px;
  bottom: -62px;
  color: rgba(255, 255, 255, 0.1);
  content: "“";
  font-family: var(--serif);
  font-size: 170px;
}

.quote-panel p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-style: italic;
  line-height: 1.4;
}

.quote-panel span {
  position: absolute;
  bottom: 24px;
  left: 30px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin: 30px 0 32px;
}

.page-heading h1 {
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.1;
}

.page-heading > div > p:last-child {
  max-width: 620px;
  margin: 14px 0 0;
  color: #747e91;
  font-size: 13px;
  line-height: 1.75;
}

.library-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 7px;
}

.library-count strong {
  font-family: var(--serif);
  font-size: 50px;
  font-weight: 500;
}

.library-count span {
  color: #7c8597;
  font-size: 11px;
}

.library-toolbar {
  position: sticky;
  top: 79px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(244, 239, 229, 0.9);
  border: 1px solid rgba(22, 36, 61, 0.08);
  border-radius: 18px;
  backdrop-filter: blur(15px);
}

.search-box {
  display: flex;
  min-width: 280px;
  flex: 1;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.search-box svg {
  width: 17px;
  fill: none;
  stroke: #8991a1;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search-box input {
  width: 100%;
  height: 42px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.search-box input::placeholder {
  color: #9da4b1;
}

.filter-chips {
  display: flex;
  gap: 4px;
}

.order-toggle {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.order-toggle button {
  padding: 6px 11px;
  color: #737d90;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.order-toggle button.is-active {
  color: var(--paper);
  background: var(--orange);
}

.chip {
  padding: 9px 13px;
  color: #707a8e;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.chip:hover {
  color: var(--ink);
}

.chip.is-active {
  color: var(--paper);
  background: var(--ink);
}

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

.word-card {
  position: relative;
  min-height: 243px;
  padding: 22px;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(22, 36, 61, 0.09);
  border-radius: 21px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.word-card:hover {
  border-color: rgba(22, 36, 61, 0.17);
  box-shadow: 0 16px 36px rgba(22, 36, 61, 0.07);
  transform: translateY(-3px);
}

.word-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.word-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.word-card .word-ipa {
  margin: 3px 0 0;
  color: var(--orange);
  font-family: var(--serif);
  font-size: 12px;
}

.favorite-button {
  display: grid;
  flex: 0 0 auto;
  width: 33px;
  height: 33px;
  padding: 0;
  place-items: center;
  color: #a3a9b4;
  background: #f3eee5;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 17px;
  transition: 150ms ease;
}

.favorite-button:hover,
.favorite-button.is-favorite {
  color: var(--orange);
  background: var(--orange-soft);
}

.word-meaning {
  min-height: 42px;
  margin: 17px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.word-example {
  display: -webkit-box;
  min-height: 38px;
  margin: 9px 0 0;
  overflow: hidden;
  color: #7c8596;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.word-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.word-tags {
  display: flex;
  gap: 5px;
  overflow: hidden;
}

.word-tags span {
  padding: 4px 7px;
  color: #788194;
  background: #f1ece3;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}

.mastery-dots {
  display: flex;
  gap: 3px;
}

.mastery-dots i {
  display: block;
  width: 5px;
  height: 5px;
  background: #ded8cd;
  border-radius: 50%;
}

.mastery-dots i.is-filled {
  background: var(--green);
}

.empty-state {
  padding: 80px 20px;
  text-align: center;
}

.empty-state strong {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

.empty-state p {
  color: #7d8698;
  font-size: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card {
  min-height: 158px;
  padding: 24px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(22, 36, 61, 0.08);
  border-radius: 21px;
}

.metric-card span,
.metric-card small,
.metric-card strong {
  display: block;
}

.metric-card span {
  color: #737d91;
  font-size: 11px;
  font-weight: 700;
}

.metric-card strong {
  margin: 16px 0 5px;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 500;
}

.metric-card small {
  color: #a0a7b4;
  font-size: 9px;
}

.metric-card.accent-dark {
  color: var(--paper);
  background: var(--ink);
}

.metric-card.accent-dark span,
.metric-card.accent-dark small {
  color: rgba(255, 255, 255, 0.55);
}

.metric-card.accent-warm {
  background: var(--orange-soft);
}

.progress-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.mastery-panel,
.history-panel {
  padding: 28px;
}

.subtle-label {
  color: #98a0ae;
  font-size: 10px;
}

.mastery-chart {
  display: flex;
  min-height: 230px;
  align-items: flex-end;
  justify-content: space-around;
  gap: 13px;
  padding-top: 30px;
}

.mastery-bar-group {
  display: flex;
  height: 180px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.mastery-bar-value {
  margin-bottom: 7px;
  color: #7c8596;
  font-size: 10px;
  font-weight: 700;
}

.mastery-bar {
  width: min(42px, 75%);
  min-height: 4px;
  background: var(--orange);
  border-radius: 9px 9px 3px 3px;
  transition: height 450ms ease;
}

.mastery-bar-group:nth-child(3n) .mastery-bar {
  background: var(--green);
}

.mastery-bar-group:nth-child(2n) .mastery-bar {
  background: #d2a16c;
}

.mastery-bar-label {
  margin-top: 9px;
  color: #697387;
  font-size: 9px;
  font-weight: 700;
}

.history-list {
  margin-top: 22px;
}

.history-day {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.history-day:last-child {
  border-bottom: 0;
}

.history-date {
  color: #7a8395;
  font-size: 10px;
  font-weight: 700;
}

.history-bar {
  height: 5px;
  overflow: hidden;
  background: #ece6dc;
  border-radius: 999px;
}

.history-bar span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.history-score {
  color: #6d778a;
  font-size: 10px;
  font-weight: 700;
}

.history-empty {
  padding: 45px 10px;
  color: #8b93a2;
  text-align: center;
  font-size: 12px;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 22px 26px;
  background: rgba(255, 253, 248, 0.54);
  border: 1px dashed rgba(173, 73, 63, 0.25);
  border-radius: 18px;
}

.danger-zone strong {
  font-size: 13px;
}

.danger-zone p {
  margin: 5px 0 0;
  color: #858d9d;
  font-size: 10px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 100;
  padding: 12px 18px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(22, 36, 61, 0.22);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 220ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.mobile-access-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  padding: 22px;
  place-items: center;
  background: rgba(22, 36, 61, 0.72);
  backdrop-filter: blur(9px);
}

.mobile-access-card {
  position: relative;
  width: min(570px, 100%);
  padding: 34px;
  background: var(--paper);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
}

.mobile-access-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 500;
}

.mobile-access-card > p:not(.eyebrow):not(.mobile-access-hint) {
  margin: 12px 0 20px;
  color: #6f798d;
  font-size: 12px;
  line-height: 1.75;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: #7b8496;
  background: #f1ece3;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
}

.modal-close:hover {
  color: var(--paper);
  background: var(--ink);
}

.mobile-url-box {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  background: #f3eee6;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.mobile-url-box code {
  align-self: center;
  padding: 6px 8px;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  line-height: 1.5;
}

.mobile-url-box button {
  padding: 0 14px;
  color: var(--paper);
  background: var(--green);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.mobile-url-box button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mobile-access-hint {
  margin: 13px 0 0;
  color: #8a92a1;
  font-size: 9px;
  line-height: 1.6;
}

.selection-hint {
  margin: -11px 0 18px !important;
  color: #969dab !important;
  font-family: var(--sans) !important;
  font-size: 9px !important;
  line-height: 1.5 !important;
}

.selectable-word {
  padding: 0 1px;
  border-radius: 3px;
  cursor: text;
  transition: background 120ms ease, color 120ms ease;
}

.selectable-word:hover {
  color: var(--ink);
  background: rgba(207, 116, 72, 0.16);
}

.selectable-word.is-target {
  background: #f5d9c5;
}

.selectable-word::selection {
  color: var(--ink);
  background: #e9b892;
}

.selection-menu {
  position: fixed;
  z-index: 95;
  width: min(390px, calc(100vw - 20px));
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(22, 36, 61, 0.32);
}

.selection-menu-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
}

.selection-menu-actions button {
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.8);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.selection-menu-actions button:hover {
  color: var(--ink);
  background: var(--paper);
}

.selection-menu-actions .selection-menu-close {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px;
}

.selection-menu > p {
  margin: 0;
  padding: 11px 13px 13px;
  color: #d9dfeb;
  background: rgba(255, 255, 255, 0.06);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  line-height: 1.65;
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 12px;
  }

  .header-date {
    grid-column: 2;
    grid-row: 1;
  }

  .hero {
    grid-template-columns: 1.35fr 0.65fr;
  }

  .hero-copy {
    padding: 40px;
  }

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

  .side-column {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
  }

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

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

  .progress-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header,
  .app-shell {
    width: min(100% - 24px, 1180px);
  }

  .brand small,
  .header-date {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    border-radius: 26px 26px 8px 26px;
  }

  .hero-copy {
    padding: 38px 26px 28px;
  }

  .hero-progress {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 0;
  }

  .progress-ring {
    width: 116px;
    height: 116px;
  }

  .ring-center {
    padding-top: 35px;
  }

  .ring-center strong {
    font-size: 37px;
  }

  .hero-progress > p {
    margin: 0;
  }

  .mini-stats {
    width: 100%;
    padding-top: 14px;
  }

  .side-column {
    display: flex;
  }

  .session-panel {
    min-height: 0;
    padding: 20px;
  }

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

  .question-main {
    min-height: 148px;
  }

  .quiz-actions {
    align-items: flex-end;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-toolbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    min-width: 0;
  }

  .filter-chips {
    overflow-x: auto;
    padding-bottom: 2px;
  }

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

  .danger-zone {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .nav-item {
    padding: 8px 12px;
    font-size: 11px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .mini-stats {
    display: none;
  }

  .result-stats {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .result-stats div + div {
    border-left: 0;
  }

  .done-actions,
  .done-actions .button {
    width: 100%;
  }

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

  .word-card {
    min-height: 0;
  }

  .mobile-access-card {
    padding: 28px 20px 22px;
  }

  .mobile-url-box {
    grid-template-columns: 1fr;
  }

  .mobile-url-box button {
    min-height: 38px;
  }
}

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

/* Sprint dashboard v2 */

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.header-tools > span {
  margin-right: 5px;
  color: #6d778d;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.header-tool {
  padding: 7px 9px;
  color: #69738a;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.header-tool:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.primary-nav .nav-item {
  padding-inline: 22px;
}

.practice-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  min-height: 460px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(22, 36, 61, 0.09);
  border-radius: 34px 34px 10px 34px;
  box-shadow: var(--shadow);
}

.practice-intro::after {
  position: absolute;
  right: -130px;
  bottom: -180px;
  width: 460px;
  height: 460px;
  background: var(--orange-soft);
  border-radius: 50%;
  content: "";
}

.practice-intro-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 56px 62px;
}

.practice-intro-copy h1,
.practice-complete h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.practice-intro-copy h1 span {
  color: var(--orange);
}

.practice-intro-copy > p:not(.eyebrow) {
  max-width: 610px;
  margin: 20px 0 28px;
  color: #6f798d;
  font-size: 14px;
  line-height: 1.8;
}

.practice-blueprint {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: center;
  gap: 1px;
  padding: 26px 38px 105px;
  background: var(--ink);
}

.practice-blueprint > div {
  display: flex;
  min-height: 145px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.practice-blueprint strong {
  font-family: var(--serif);
  font-size: 45px;
  font-weight: 500;
}

.practice-blueprint span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 700;
}

.practice-blueprint small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.auto-archive-note {
  position: absolute;
  z-index: 2;
  right: 36px;
  bottom: 22px;
  left: calc(65% + 36px);
  padding: 14px 17px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(22, 36, 61, 0.08);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(22, 36, 61, 0.08);
}

.auto-archive-note span {
  color: var(--green);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.auto-archive-note p {
  margin: 5px 0 0;
  font-size: 10px;
  line-height: 1.6;
}

.practice-runner {
  position: relative;
  padding: 32px;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(22, 36, 61, 0.08);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.timer-cluster {
  display: flex;
  align-items: stretch;
  gap: 7px;
}

.practice-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.practice-topbar h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(25px, 3vw, 36px);
  font-weight: 500;
}

.timer-box {
  min-width: 114px;
  padding: 10px 15px;
  color: var(--paper);
  text-align: center;
  background: var(--ink);
  border-radius: 14px;
}

.timer-box span,
.timer-box strong {
  display: block;
}

.timer-box span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.timer-box strong {
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

.timer-box strong.is-overtime {
  color: #f1a98e;
}

.timer-pause-button {
  min-width: 75px;
  padding: 0 13px;
  color: var(--ink);
  background: var(--orange-soft);
  border: 1px solid rgba(207, 116, 72, 0.2);
  border-radius: 12px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  transition: 160ms ease;
}

.timer-pause-button:hover {
  color: var(--paper);
  background: var(--orange);
}

.timer-pause-button.is-paused {
  color: var(--paper);
  background: var(--green);
  border-color: var(--green);
}

.pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(22, 36, 61, 0.78);
  border-radius: inherit;
  backdrop-filter: blur(9px);
}

.pause-card {
  width: min(420px, 100%);
  padding: 35px;
  text-align: center;
  background: var(--paper);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.pause-card > span {
  color: var(--orange);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.pause-card h2 {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 500;
}

.pause-card p {
  margin: 11px 0 22px;
  color: #758094;
  font-size: 11px;
  line-height: 1.7;
}

.stage-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 25px 0 24px;
}

.stage-nav > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  padding: 11px 13px;
  color: #8d95a4;
  background: #f3eee6;
  border: 1px solid transparent;
  border-radius: 12px;
}

.stage-nav span {
  grid-row: 1 / 3;
  align-self: center;
  color: #afb5bf;
  font-family: var(--serif);
  font-size: 13px;
}

.stage-nav strong {
  font-size: 10px;
}

.stage-nav small {
  font-size: 8px;
}

.stage-nav > div.is-active {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.stage-nav > div.is-active span {
  color: #e4b497;
}

.stage-nav > div.is-complete {
  color: var(--green);
  background: var(--green-soft);
}

.practice-content {
  min-height: 540px;
  padding-top: 8px;
}

.practice-question-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: #8b93a3;
  font-size: 10px;
  font-weight: 700;
}

.stage-label {
  color: var(--orange);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.15em;
}

.practice-prompt-card {
  display: grid;
  min-height: 180px;
  padding: 32px;
  place-items: center;
  text-align: center;
  background: #f7f3ec;
  border-radius: 20px;
}

.practice-prompt-card .question-prompt {
  align-self: end;
  margin-bottom: 12px;
}

.practice-prompt-card h2 {
  align-self: start;
  max-width: 900px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.45;
}

.practice-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 16px;
}

.practice-option {
  min-height: 54px;
  padding: 13px 16px;
  color: var(--ink-soft);
  text-align: left;
  background: #fbf8f2;
  border: 1px solid rgba(22, 36, 61, 0.1);
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  transition: 160ms ease;
}

.practice-option:hover:not(:disabled) {
  color: var(--ink);
  background: #f1ebe1;
  transform: translateY(-1px);
}

.practice-option.is-correct {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(46, 125, 97, 0.3);
}

.practice-option.is-wrong {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(173, 73, 63, 0.3);
}

.practice-feedback {
  margin-top: 14px;
  padding: 16px 18px;
  background: #f7f3ec;
  border-left: 4px solid var(--green);
  border-radius: 12px;
}

.practice-feedback.is-wrong {
  border-left-color: var(--red);
}

.practice-feedback strong {
  color: var(--green);
  font-size: 12px;
}

.practice-feedback.is-wrong strong {
  color: var(--red);
}

.practice-feedback p {
  margin: 6px 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.practice-feedback blockquote {
  margin: 9px 0 0;
  padding-left: 12px;
  color: #788195;
  border-left: 2px solid #d9d1c4;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.6;
}

.practice-unsure {
  margin-top: 12px;
}

.practice-actions {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 14px;
}

.practice-actions > span {
  color: #9299a7;
  font-size: 10px;
}

.button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}

.reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
  align-items: start;
  gap: 18px;
}

.reading-passage {
  max-height: 720px;
  padding: 28px;
  overflow-y: auto;
  background: #fbf8f2;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.source-line span {
  color: var(--orange);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.source-line h2 {
  margin: 7px 0 20px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
}

.reading-passage p {
  margin: 0 0 15px;
  color: #37445d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.8;
}

.reading-workbench {
  position: sticky;
  top: 100px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 35px rgba(22, 36, 61, 0.06);
}

.workbench-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--orange);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.workbench-heading small {
  color: #9aa1ae;
  font-size: 8px;
  letter-spacing: normal;
}

.reading-workbench > h3 {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.45;
}

.reading-options {
  grid-template-columns: 1fr;
}

.compact-actions {
  margin-top: 12px;
}

.compact-actions .button {
  min-height: 38px;
  padding-inline: 14px;
}

.glossary-block {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.glossary-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.glossary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #f5f0e8;
  border-radius: 9px;
}

.glossary-item div {
  min-width: 0;
}

.glossary-item strong,
.glossary-item span {
  display: block;
}

.glossary-item strong {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
}

.glossary-item span {
  margin-top: 2px;
  overflow: hidden;
  color: #7c8596;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glossary-item button,
.phrase-chip-list button {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: var(--green);
  background: var(--green-soft);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}

.glossary-item button:hover,
.phrase-chip-list button:hover {
  color: var(--paper);
  background: var(--green);
}

.phrase-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.translation-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: start;
  gap: 18px;
}

.translation-source,
.translation-answer {
  padding: 28px;
  background: #fbf8f2;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.translation-chinese {
  margin: 0;
  padding: 22px;
  color: var(--ink);
  background: var(--paper);
  border-left: 4px solid var(--orange);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2;
}

.translation-keywords {
  margin-top: 23px;
}

.translation-answer > label {
  display: block;
  color: var(--orange);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.translation-answer textarea {
  width: 100%;
  min-height: 330px;
  margin-top: 12px;
  padding: 18px;
  resize: vertical;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.8;
}

.translation-answer textarea:focus {
  border-color: rgba(207, 116, 72, 0.55);
  box-shadow: 0 0 0 3px rgba(207, 116, 72, 0.1);
}

.translation-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.translation-tools > span {
  color: #9098a6;
  font-size: 9px;
}

.reference-translation {
  margin-top: 18px;
  padding: 18px;
  background: var(--green-soft);
  border-radius: 14px;
}

.reference-translation > span {
  color: var(--green);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.reference-translation > p {
  margin: 9px 0 0;
  color: #294b3d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1.75;
}

.strategy-list {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid rgba(46, 125, 97, 0.18);
}

.strategy-list p {
  position: relative;
  margin: 5px 0;
  padding-left: 12px;
  color: #4f6c5e;
  font-size: 10px;
  line-height: 1.55;
}

.strategy-list p::before {
  position: absolute;
  left: 0;
  content: "·";
}

.self-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

.self-rating > span {
  margin-right: 4px;
  color: #818a9a;
  font-size: 9px;
  font-weight: 700;
}

.self-rating button {
  padding: 6px 9px;
  color: #6f788a;
  background: #f2ede5;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.self-rating button.is-active {
  color: var(--paper);
  background: var(--ink);
}

.review-layout {
  display: grid;
  gap: 18px;
}

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

.review-score-grid > div {
  padding: 24px;
  text-align: center;
  background: #f5f0e8;
  border-radius: 16px;
}

.review-score-grid strong,
.review-score-grid span {
  display: block;
}

.review-score-grid strong {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
}

.review-score-grid span {
  margin-top: 4px;
  color: #788194;
  font-size: 9px;
}

.review-note {
  padding: 34px;
  background: var(--ink);
  border-radius: 20px;
}

.review-note h2 {
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
}

.review-note > p:not(.section-kicker) {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  line-height: 1.75;
}

.review-rule-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.review-rule-list span {
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  font-size: 9px;
}

.finish-practice-button {
  justify-self: center;
  min-width: 210px;
}

.practice-complete {
  padding: 70px 40px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.practice-complete .result-badge {
  margin-inline: auto;
}

.practice-complete > p:not(.eyebrow) {
  max-width: 760px;
  margin: 14px auto 0;
  color: #6e788b;
  font-size: 13px;
  line-height: 1.8;
}

.practice-complete-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 800px;
  margin: 30px auto 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.practice-complete-grid div + div {
  border-left: 1px solid var(--line);
}

.practice-complete-grid strong,
.practice-complete-grid span {
  display: block;
}

.practice-complete-grid strong {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
}

.practice-complete-grid span {
  margin-top: 4px;
  color: #80899a;
  font-size: 9px;
}

.practice-complete .done-actions {
  justify-content: center;
}

.phrase-card {
  min-height: 220px;
  padding: 22px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(22, 36, 61, 0.09);
  border-radius: 21px;
}

.phrase-label {
  color: var(--orange);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.phrase-card h3 {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

.phrase-meaning {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.phrase-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.phrase-bottom span {
  color: #6f798b;
  font-size: 9px;
  line-height: 1.5;
}

.phrase-bottom small {
  flex: 0 0 auto;
  color: #9aa1ae;
  font-size: 8px;
}

.countdown-panel {
  margin-top: 22px;
  padding: 25px;
  color: var(--paper);
  text-align: center;
  background: var(--ink);
  border-radius: 18px;
}

.countdown-panel strong,
.countdown-panel span {
  display: block;
}

.countdown-panel strong {
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 500;
  line-height: 1;
}

.countdown-panel span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
}

.countdown-panel p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 8px;
}

.sprint-note {
  margin-top: 16px;
}

.sprint-note strong {
  font-size: 11px;
}

.sprint-note p {
  color: #7a8395;
  font-size: 10px;
  line-height: 1.65;
}

.history-entry {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.history-entry span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 750;
}

.history-entry strong {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
}

.archive-tray {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  color: var(--paper);
  background: var(--green);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 14px 35px rgba(46, 125, 97, 0.25);
  cursor: pointer;
}

.archive-tray span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
}

.archive-tray strong {
  font-size: 10px;
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .primary-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 11px;
  }

  .header-tools {
    grid-column: 2;
    grid-row: 1;
  }

  .practice-intro {
    grid-template-columns: 1fr;
  }

  .practice-blueprint {
    grid-template-columns: repeat(4, 1fr);
    padding: 18px;
  }

  .practice-blueprint > div {
    min-height: 105px;
  }

  .auto-archive-note {
    position: static;
    margin: 0 32px 28px;
  }

  .reading-layout,
  .translation-layout {
    grid-template-columns: 1fr;
  }

  .reading-passage {
    max-height: 520px;
  }

  .reading-workbench {
    position: static;
  }
}

@media (max-width: 720px) {
  .header-tools > span {
    display: none;
  }

  .header-tool {
    padding-inline: 4px;
    font-size: 10px;
  }

  .primary-nav {
    width: 100%;
  }

  .primary-nav .nav-item {
    flex: 1;
    padding-inline: 12px;
  }

  .practice-runner {
    padding: 18px;
    border-radius: 22px;
  }

  .word-stage-choice-grid {
    grid-template-columns: 1fr;
  }

  .recognition-state {
    padding-inline: 0;
  }

  .recognition-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .practice-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .timer-cluster {
    align-self: stretch;
  }

  .timer-box {
    flex: 1;
  }

  .timer-pause-button {
    min-width: 98px;
  }

  .practice-intro-copy {
    padding: 36px 25px;
  }

  .practice-blueprint {
    grid-template-columns: 1fr 1fr;
    padding: 18px;
  }

  .auto-archive-note {
    margin: 0 18px 18px;
  }

  .stage-nav {
    grid-template-columns: 1fr 1fr;
  }

  .practice-options {
    grid-template-columns: 1fr;
  }

  .translation-source,
  .translation-answer,
  .reading-passage {
    padding: 19px;
  }

  .review-score-grid,
  .practice-complete-grid {
    grid-template-columns: 1fr 1fr;
  }

  .practice-complete-grid div:nth-child(3) {
    border-left: 0;
  }

  .archive-tray {
    right: 12px;
    bottom: 12px;
  }
}
