:root {
  --ink: #12343a;
  --ink-deep: #082a31;
  --ink-soft: #5b7073;
  --paper: #edf3f0;
  --paper-deep: #e1e9e5;
  --card: #fbfdfc;
  --line: #c9d8d4;
  --line-soft: #dfe9e5;
  --mint: #cce5dc;
  --mint-deep: #92c8ba;
  --green: #327b73;
  --yellow: #eed66c;
  --orange: #2f66b0;
  --red: #b44e50;
  --shadow: 0 16px 42px rgba(10, 42, 48, 0.075);
  --font-ui: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  --font-display: "Bahnschrift", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --font-reading: "Palatino Linotype", "Book Antiqua", Georgia, "Songti SC", serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --duration-press: 140ms;
  --duration-ui: 240ms;
  --rail: 206px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-ui);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 88% 3%, rgba(70, 126, 173, 0.1), transparent 25%),
    linear-gradient(90deg, rgba(18, 52, 58, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 32px 32px, auto;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(219, 116, 80, 0.28);
  outline-offset: 2px;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

.rail {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--rail);
  flex-direction: column;
  padding: 27px 18px 21px;
  color: #f6f2e8;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--ink-deep);
  background-size: 30px 30px;
}

.rail::after {
  position: absolute;
  right: -90px;
  bottom: 110px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(255, 255, 255, 0.018);
  content: "";
  pointer-events: none;
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.brand-seal {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 13px 13px 13px 4px;
  color: var(--ink-deep);
  background: var(--yellow);
  transform: rotate(-4deg);
}

.brand-seal svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.55;
}

.brand-name {
  color: #f8f5ec;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
}

.brand-name small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.38);
  font-family: var(--font-ui);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.rail-nav {
  display: grid;
  gap: 5px;
  margin-top: 54px;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 45px;
  padding: 0 13px;
  border-radius: 11px;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  font-size: 12px;
  text-align: left;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.rail-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}

.rail-link.is-active {
  color: var(--ink-deep);
  background: #d9ebe5;
  box-shadow: inset 3px 0 0 var(--orange);
  font-weight: 800;
}

.rail-link svg {
  width: 18px;
  height: 18px;
}

.rail-exam {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
}

.rail-level {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 14px 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.03);
}

.rail-level > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rail-level span {
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: 12px;
}

.rail-level strong {
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  font-weight: 500;
}

.rail-level-track {
  height: 4px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.11);
}

.rail-level-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--yellow);
}

.rail-exam .tiny-label {
  color: rgba(255, 255, 255, 0.34);
}

.rail-exam strong {
  font-size: 11px;
}

.rail-exam > span:last-child {
  color: rgba(255, 255, 255, 0.4);
  font-size: 9px;
}

.rail-settings {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 13px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.42);
  background: transparent;
  font-size: 10px;
  text-align: left;
}

.rail-settings:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
}

.rail-settings svg {
  width: 16px;
  height: 16px;
}

.workspace {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 48px 70px;
}

.workspace-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.workspace-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.level-mini {
  display: none;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #dbcf9c;
  border-radius: 999px;
  color: #7d641e;
  background: #fff8e3;
  font-family: var(--font-display);
  font-size: 11px;
}

.exam-glance {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.54);
}

.exam-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--mint-deep);
}

.page {
  max-width: 970px;
  margin: 0 auto;
  padding-top: 54px;
}

@keyframes page-fallback-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page.is-entering,
.focus-shell.is-entering {
  animation: page-fallback-in 220ms var(--ease-out) both;
}

html[data-nav-direction="back"] .page.is-entering,
html[data-nav-direction="back"] .focus-shell.is-entering {
  animation-name: page-fallback-back;
}

@keyframes page-fallback-back {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.eyebrow {
  margin: 0 0 11px;
  color: var(--orange);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.2em;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 25px;
}

.home-intro .eyebrow {
  grid-column: 1 / -1;
}

.home-intro h1 {
  margin: 0;
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: clamp(31px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.home-intro h1 span {
  color: var(--ink-soft);
  font-size: 0.74em;
  font-weight: 400;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.55);
  font-size: 9px;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(63, 121, 103, 0.1);
}

.mastery-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 34px;
  margin-top: 54px;
  padding: 30px 0 35px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mastery-primary {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.mastery-primary .tiny-label {
  position: absolute;
  margin-top: -34px;
}

.mastery-primary strong {
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: clamp(73px, 10vw, 108px);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.75;
}

.mastery-unit {
  color: var(--ink-soft);
  font-size: 13px;
}

.mastery-secondary {
  padding-bottom: 8px;
}

.mastery-secondary > p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.75;
}

.mastery-footnotes {
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  margin-top: 15px;
  color: var(--ink-soft);
  font-size: 10px;
}

.mastery-footnotes strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
}

.today-card {
  margin-top: 34px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.section-head,
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.tiny-label {
  display: block;
  color: var(--ink-soft);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-head h2,
.panel-head h2 {
  margin: 5px 0 0;
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.time-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 9px;
}

.time-note svg {
  width: 14px;
  height: 14px;
}

.task-row {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 17px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: var(--paper);
}

.task-row + .task-row {
  margin-top: 10px;
}

.task-row.is-done {
  background: #f1f5f0;
}

.task-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: var(--ink);
  background: var(--mint);
}

.is-done .task-symbol {
  color: #fff;
  background: var(--green);
}

.task-symbol svg {
  width: 19px;
  height: 19px;
}

.task-copy {
  min-width: 0;
}

.task-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink-deep);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-copy span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row-paper {
  border-style: dashed;
}

.done-label {
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
}

.task-note {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
}

.advisor-invite {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 16px 4px;
}

.advisor-orbit {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--mint);
}

.advisor-orbit svg {
  width: 17px;
  height: 17px;
}

.advisor-invite strong {
  display: block;
  font-size: 11px;
}

.advisor-invite p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  color: var(--ink);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

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

.text-button svg {
  width: 13px;
  height: 13px;
}

.memory-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 8px;
  padding: 15px 18px;
  border: 1px solid rgba(63, 121, 103, 0.18);
  border-radius: 13px;
  background: #f1f5f1;
}

.memory-note strong,
.memory-note span {
  display: block;
}

.memory-note strong {
  font-size: 10px;
}

.memory-note span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 9px;
}

.memory-note > div:last-child {
  display: flex;
  gap: 7px;
}

.button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 17px;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 800;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

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

.button svg {
  width: 14px;
  height: 14px;
}

.button-primary {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 9px 20px rgba(13, 43, 39, 0.13);
}

.button-primary:hover {
  background: #25584e;
}

.button-secondary {
  border: 1px solid var(--line);
  background: var(--card);
}

.button-secondary:hover {
  border-color: var(--ink-soft);
  background: var(--paper);
}

.button-quiet {
  color: var(--ink-soft);
  background: transparent;
}

.button-quiet:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.button-small {
  min-height: 33px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 9px;
}

.page-heading {
  margin-bottom: 33px;
}

.page-heading h1,
.advisor-heading h1 {
  margin: 0;
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.page-heading > div > p:last-child,
.advisor-heading > div > p:last-child {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.growth-numbers {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--line);
}

.growth-numbers > div {
  min-width: 0;
  padding: 18px 16px;
  background: var(--card);
}

.growth-numbers span {
  display: block;
  color: var(--ink-soft);
  font-size: 8px;
}

.growth-numbers strong {
  display: block;
  margin-top: 7px;
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
}

.growth-number-primary {
  background: var(--mint) !important;
}

.growth-number-primary strong {
  font-size: 34px;
}

.growth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.panel-head {
  margin-bottom: 24px;
}

.panel-note {
  color: var(--ink-soft);
  font-size: 8px;
}

.growth-chart {
  display: grid;
  height: 167px;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to top, transparent 0, transparent 47px, rgba(23, 61, 54, 0.045) 48px);
}

.growth-column {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.growth-column > span {
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 9px;
}

.growth-column i {
  display: block;
  width: min(72%, 27px);
  min-height: 3px;
  border-radius: 5px 5px 1px 1px;
  background: var(--mint-deep);
}

.growth-column.is-today i {
  background: var(--orange);
}

.growth-column small {
  position: absolute;
  transform: translateY(27px);
  color: var(--ink-soft);
  font-size: 7px;
}

.tier-list {
  display: grid;
  gap: 22px;
  padding-top: 2px;
}

.tier-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tier-copy strong {
  font-size: 10px;
}

.tier-copy span {
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 10px;
}

.tier-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--paper-deep);
}

.tier-track > span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
}

.tier-high {
  background: var(--orange);
}

.tier-core {
  background: var(--green);
}

.tier-extended {
  background: var(--mint-deep);
}

.word-list-panel {
  margin-top: 18px;
}

.small-search {
  display: flex;
  width: min(240px, 45%);
  height: 35px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}

.dictionary-search {
  width: min(380px, 58%);
}

.small-search svg {
  width: 14px;
  height: 14px;
  color: var(--ink-soft);
}

.small-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 9px;
}

.word-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.word-list-row.is-outside {
  border-color: #e2e9e6;
  border-left: 1px solid #e2e9e6;
  background: rgba(251, 253, 252, 0.55);
}

.word-list-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--orange);
  border-radius: 11px;
  background: #e5f0eb;
}

.word-line {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.word-line strong {
  font-family: var(--font-display);
  font-size: 16px;
}

.word-line span {
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-list-row p {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-list-row.is-outside .word-line strong {
  color: #60736f;
}

.word-list-row.is-outside p {
  color: #85938f;
}

.word-list-row.is-outside .sound-button {
  color: #71847f;
  background: #edf2f0;
}

.word-row-end {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.lookup-count {
  min-height: 27px;
  padding: 0 7px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--ink-soft);
  background: var(--card);
  font-size: 9px;
  white-space: nowrap;
}

.lookup-count:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
}

.word-tier,
.word-state {
  padding: 4px 6px;
  border-radius: 5px;
  font-size: 7px;
  white-space: nowrap;
}

.word-tier {
  color: var(--orange);
  background: #faede7;
}

.word-state {
  color: var(--ink-soft);
  background: var(--paper-deep);
}

.word-state.is-outside {
  border: 1px solid #dbe5e1;
  color: #7b8c88;
  background: transparent;
}

.search-welcome {
  display: flex;
  min-height: 92px;
  grid-column: 1 / -1;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: 11px;
  color: var(--ink-soft);
  background: var(--paper);
}

.search-welcome > span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--mint);
}

.search-welcome svg {
  width: 18px;
  height: 18px;
}

.search-welcome strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.search-welcome p {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.6;
}

.search-loading {
  display: flex;
  min-height: 90px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-soft);
}

.search-loading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  animation: search-pulse 700ms ease-in-out infinite alternate;
}

.search-loading p {
  margin: 0;
  font-size: 11px;
}

.search-status {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.lookup-hint {
  margin: -6px 0 16px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.word-detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.word-detail-title h2 {
  font-family: "Bahnschrift SemiCondensed", "Arial Narrow", var(--font-display);
  font-size: 39px;
}

.word-detail-phonetic {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-reading);
  font-size: 14px;
}

.word-detail-meaning {
  margin: 22px 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.65;
}

.word-detail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.word-detail-foot span {
  color: var(--ink);
  font-size: 12px;
}

.word-detail-foot small {
  color: var(--ink-soft);
  font-size: 10px;
}

@keyframes search-pulse {
  from {
    opacity: 0.35;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.sound-button {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--mint);
}

.sound-button:hover {
  color: #fff;
  background: var(--orange);
}

.sound-button svg {
  width: 13px;
  height: 13px;
}

.empty-list {
  grid-column: 1 / -1;
  padding: 30px;
  color: var(--ink-soft);
  font-size: 10px;
  text-align: center;
}

.advisor-page {
  max-width: 790px;
  margin: 0 auto;
}

.advisor-heading {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  gap: 17px;
  align-items: start;
  margin-bottom: 24px;
}

.advisor-avatar,
.message-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-deep);
  background: var(--yellow);
}

.advisor-avatar {
  width: 45px;
  height: 45px;
}

.advisor-avatar svg {
  width: 23px;
  height: 23px;
}

.advisor-heading h1 {
  font-size: 34px;
}

.chat-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.chat-messages {
  display: flex;
  height: min(50vh, 430px);
  min-height: 285px;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  padding: 26px;
  scroll-behavior: smooth;
}

.chat-messages > * {
  flex: 0 0 auto;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.message.is-user {
  justify-content: flex-end;
}

.message-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

.message-avatar svg {
  width: 14px;
  height: 14px;
}

.message-bubble {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 4px 14px 14px 14px;
  color: var(--ink);
  background: #f0f3ed;
  font-size: 10px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.message-body {
  display: flex;
  max-width: 78%;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.message-body .message-bubble {
  max-width: 100%;
}

.message.is-user .message-body {
  align-items: flex-end;
}

.reply-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.reply-options button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid #c6d8d2;
  border-radius: 9px;
  color: var(--ink);
  background: #f7fbf9;
  font-size: 14px;
  transition:
    transform var(--duration-press) var(--ease-out),
    border-color 160ms ease,
    background-color 160ms ease;
}

.reply-options button:active {
  transform: scale(0.975);
}

@media (hover: hover) and (pointer: fine) {
  .reply-options button:hover {
    border-color: var(--green);
    background: #edf7f2;
  }
}

.is-user .message-bubble {
  border-radius: 14px 4px 14px 14px;
  color: #fff;
  background: var(--ink);
}

.plan-change {
  margin-left: 35px;
  padding: 15px;
  border: 1px solid rgba(63, 121, 103, 0.2);
  border-radius: 13px;
  background: #f1f6f2;
}

.plan-change.plan-change-docked {
  margin: 0 20px 12px;
}

.plan-change > span {
  color: var(--green);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.plan-change > strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
}

.plan-change > p {
  margin: 5px 0 12px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.plan-change > div {
  display: flex;
  gap: 7px;
}

.chat-suggestions {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 20px 12px;
}

.chat-suggestions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 8px;
  white-space: nowrap;
}

.chat-suggestions button:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
}

.preset-panel {
  padding: 15px 20px 5px;
  border-top: 1px solid var(--line-soft);
  background: #f8fbf9;
}

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

.preset-panel-head strong {
  font-size: 15px;
}

.preset-panel-head span {
  color: var(--ink-soft);
  font-size: 12px;
}

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

.preset-group > span {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.preset-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-group button {
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #cbdad5;
  border-radius: 8px;
  color: var(--ink);
  background: var(--card);
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  transition:
    transform var(--duration-press) var(--ease-out),
    border-color 160ms ease,
    background-color 160ms ease;
}

.preset-group button:active {
  transform: scale(0.975);
}

@media (hover: hover) and (pointer: fine) {
  .preset-group button:hover {
    border-color: var(--green);
    background: #edf7f2;
  }
}

.plan-overview-strip {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--line-soft);
}

.plan-overview-strip > div {
  min-width: 0;
  padding: 14px 15px;
  background: var(--card);
}

.plan-overview-strip span,
.plan-overview-strip strong {
  display: block;
}

.plan-overview-strip span {
  color: var(--ink-soft);
  font-size: 11px;
}

.plan-overview-strip strong {
  margin-top: 5px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pause-notice {
  margin-bottom: 14px;
  padding: 12px 15px;
  border: 1px solid #dfcf9e;
  border-radius: 10px;
  color: #715b22;
  background: #fff8e5;
  font-size: 12px;
}

.adjust-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-deep);
}

.adjust-tabs button {
  min-height: 59px;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--ink-soft);
  background: transparent;
  text-align: left;
}

.adjust-tabs button.is-active {
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 4px 14px rgba(13, 43, 39, 0.07);
}

.adjust-tabs strong,
.adjust-tabs span {
  display: block;
}

.adjust-tabs strong {
  font-size: 13px;
}

.adjust-tabs span {
  margin-top: 4px;
  font-size: 11px;
}

.adjust-workspace {
  margin-top: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.adjust-preview {
  margin: 0 0 16px !important;
}

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

.adjust-category-grid > button,
.adjust-option-grid > button {
  position: relative;
  min-height: 105px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: var(--ink);
  background: #f8fbf9;
  text-align: left;
  transition:
    transform var(--duration-press) var(--ease-out),
    border-color 160ms ease,
    background-color 160ms ease;
}

.adjust-category-grid > button:active,
.adjust-option-grid > button:active {
  transform: scale(0.985);
}

.adjust-category-grid strong,
.adjust-option-grid strong {
  display: block;
  padding-right: 38px;
  font-size: 15px;
}

.adjust-category-grid p,
.adjust-option-grid span {
  display: block;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.adjust-detail-head {
  margin-bottom: 17px;
}

.adjust-back {
  margin-bottom: 14px;
  padding: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
}

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

.adjust-detail-head h2 {
  margin: 0;
  color: var(--ink-deep);
  font-size: 22px;
}

.adjust-detail-head p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

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

.adjust-option-grid > button {
  min-height: 80px;
}

.adjust-option-grid > button strong {
  padding-right: 0;
}

@media (hover: hover) and (pointer: fine) {
  .adjust-category-grid > button:hover,
  .adjust-option-grid > button:hover {
    border-color: #aec7c0;
    background: #eef7f3;
  }
}

.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  margin: 0 20px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}

.chat-form textarea {
  width: 100%;
  max-height: 140px;
  min-height: 25px;
  resize: none;
  padding: 4px 5px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 10px;
  line-height: 1.6;
}

.chat-send {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--ink);
}

.chat-send svg {
  width: 15px;
  height: 15px;
}

.chat-scope {
  margin: 10px 20px 14px;
  color: #9a9f99;
  font-size: 7px;
  text-align: center;
}

.focus-shell {
  min-height: 100vh;
  padding: 25px 38px 55px;
  background:
    radial-gradient(circle at 50% 25%, rgba(219, 233, 224, 0.4), transparent 36%),
    var(--paper);
}

.focus-top {
  display: grid;
  max-width: 900px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 9px;
}

.focus-top > :last-child {
  text-align: right;
}

.focus-examline {
  width: min(100%, 900px);
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 8px;
  text-align: right;
}

.focus-level {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #765b16;
  background: #fff7df;
  font-family: var(--font-display);
  font-size: 9px;
}

.focus-exit {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 9px;
}

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

.focus-exit svg {
  width: 13px;
  height: 13px;
}

.focus-progress {
  width: min(100%, 900px);
  height: 3px;
  margin: 16px auto 0;
  overflow: hidden;
  border-radius: 99px;
  background: var(--paper-deep);
}

.focus-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 250ms ease;
}

.study-stage {
  width: min(100%, 650px);
  margin: 8vh auto 0;
}

.study-meta {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-bottom: 14px;
}

.study-meta span {
  padding: 5px 8px;
  border-radius: 5px;
  color: var(--ink-soft);
  background: rgba(219, 233, 224, 0.7);
  font-size: 7px;
  font-weight: 800;
}

.word-card-v2 {
  min-height: 385px;
  padding: 36px 43px 31px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background:
    linear-gradient(rgba(23, 61, 54, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 61, 54, 0.025) 1px, transparent 1px),
    var(--card);
  background-size: 25px 25px;
  box-shadow: var(--shadow);
}

.word-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
}

.word-heading h1 {
  margin: 0;
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: clamp(49px, 7vw, 72px);
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.sound-button-large {
  width: 34px;
  height: 34px;
}

.word-phonetic {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 13px;
  text-align: center;
}

.recall-space {
  min-height: 141px;
  display: grid;
  place-items: center;
  align-content: center;
  margin-top: 25px;
  border-top: 1px dashed var(--line);
}

.recall-space span {
  color: #c3bcb0;
  font-family: var(--font-display);
  font-size: 32px;
}

.recall-space p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
}

.word-pronunciation-row,
.dictionary-pronunciation-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 34px;
  margin-top: 5px;
}

.dictionary-pronunciation-row {
  justify-content: flex-start;
  margin-top: 9px;
}

.word-pronunciation-row .word-phonetic,
.dictionary-pronunciation-row .word-detail-phonetic {
  margin: 0;
}

.pronunciation-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pronunciation-button {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid #bcd3ca;
  border-radius: 999px;
  color: #315f58;
  background: #e8f2ed;
  font-size: 10px;
  white-space: nowrap;
  transition:
    transform 130ms var(--ease-out),
    border-color 160ms ease,
    background-color 160ms ease;
}

.pronunciation-button:hover {
  border-color: #7eaca0;
  background: #dceee7;
}

.pronunciation-button:active {
  transform: scale(0.96);
}

.pronunciation-button svg {
  width: 13px;
  height: 13px;
}

.pronunciation-button span {
  font-weight: 700;
}

.word-reveal {
  min-height: 141px;
  margin-top: 25px;
  padding-top: 23px;
  border-top: 1px dashed var(--line);
}

.definition {
  margin: 0;
  color: var(--ink-deep);
  font-size: 18px;
  font-weight: 800;
}

.definition span {
  margin-right: 7px;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 11px;
  font-style: italic;
  font-weight: 400;
}

.example {
  margin: 14px 0 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.6;
}

.translation {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
}

.study-actions {
  margin-top: 17px;
  text-align: center;
}

.study-actions > p {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 9px;
}

.reveal-wide {
  width: 100%;
  min-height: 47px;
}

.rating-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.rating-row button {
  min-height: 57px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.rating-row button:hover {
  border-color: var(--ink-soft);
  background: var(--paper);
}

.rating-row strong,
.rating-row span {
  display: block;
}

.rating-row strong {
  font-size: 10px;
}

.rating-row span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 7px;
}

.verify-stage {
  width: min(100%, 610px);
  margin: 8vh auto 0;
  padding: 35px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}

.verify-kicker {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 8px;
}

.verify-stage h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 43px;
}

.verify-phonetic {
  margin: 5px 0 25px;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 11px;
}

.verify-options {
  display: grid;
  gap: 8px;
}

.verify-options button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-size: 10px;
  text-align: left;
}

.verify-options button > span {
  min-width: 35px;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 9px;
  font-style: italic;
}

.verify-options button.is-correct {
  border-color: var(--green);
  background: #edf5ef;
}

.verify-options button.is-wrong {
  border-color: var(--red);
  background: #f9eeeb;
}

.verify-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px dashed var(--line);
  text-align: left;
}

.verify-footer p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 8px;
}

.result-shell {
  display: grid;
  place-items: center;
}

.study-result {
  width: min(100%, 620px);
  margin-top: 4vh;
  text-align: center;
  animation: result-enter 280ms var(--ease-out) both;
}

@keyframes result-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.result-seal {
  display: grid;
  width: 67px;
  height: 67px;
  margin: 0 auto 22px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-deep);
  background: var(--yellow);
  box-shadow: 0 0 0 11px rgba(240, 203, 112, 0.15);
}

.result-seal svg {
  width: 29px;
  height: 29px;
}

.study-result h1 {
  margin: 0;
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: clamp(31px, 5vw, 44px);
  letter-spacing: -0.035em;
}

.result-lead {
  max-width: 460px;
  margin: 12px auto 25px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.75;
}

.result-count {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  padding: 24px;
  border-radius: 18px;
  background: var(--mint);
}

.result-count span {
  color: var(--ink-soft);
  font-size: 10px;
}

.result-count strong {
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: 54px;
  font-weight: 400;
  line-height: 0.8;
}

.result-count small {
  color: var(--ink-soft);
  font-size: 9px;
}

.result-meta {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 17px 0 25px;
  color: var(--ink-soft);
  font-size: 8px;
}

.result-meta strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
}

.tomorrow-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  text-align: left;
}

.tomorrow-question strong,
.tomorrow-question span {
  display: block;
}

.tomorrow-question strong {
  font-size: 10px;
}

.tomorrow-question span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 8px;
}

.tomorrow-options {
  display: flex;
  gap: 5px;
}

.tomorrow-options button {
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  font-size: 8px;
}

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

.result-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

#overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
}

#overlay.is-open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 34, 30, 0.48);
  backdrop-filter: blur(5px);
  animation: fade 180ms ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 30px), 580px);
  max-height: calc(100vh - 40px);
  margin: 20px auto;
  overflow-y: auto;
  padding: 28px;
  border-radius: 21px;
  background: var(--card);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.22);
  animation: modal-in 220ms var(--ease-out);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal h2 {
  margin: 0;
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: 29px;
}

.modal > p:not(.eyebrow) {
  margin: 9px 0 18px;
  color: var(--ink-soft);
  font-size: 9px;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--paper);
}

.modal-close svg {
  width: 14px;
  height: 14px;
}

.modal textarea {
  width: 100%;
  resize: vertical;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: var(--paper);
  font-size: 10px;
  line-height: 1.6;
}

.modal textarea:focus {
  border-color: var(--ink-soft);
}

.prestudy-label {
  display: block;
  margin-bottom: 6px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.prestudy-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line-soft);
}

.prestudy-summary > div {
  padding: 15px 12px;
  background: var(--paper);
  text-align: center;
}

.prestudy-summary strong,
.prestudy-summary span {
  display: block;
}

.prestudy-summary strong {
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: 26px;
}

.prestudy-summary span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 10px;
}

.prestudy-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 8px;
  margin-top: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 13px;
}

.settings-modal {
  width: min(calc(100% - 30px), 650px);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 24px;
}

.field {
  display: block;
  min-width: 0;
  margin-top: 18px;
}

.field > span,
.field-label,
.field-title-row > span {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.field > span em {
  margin-left: 5px;
  color: var(--ink-soft);
  font-size: 8px;
  font-style: normal;
  font-weight: 400;
}

.field input,
.field select {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--paper);
  font-size: 10px;
}

.field input:focus,
.field select:focus {
  border-color: var(--ink-soft);
  background: var(--card);
}

.field > small {
  display: block;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.55;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.field-grid.compact {
  margin-top: 13px;
}

.range {
  width: 100%;
  height: 5px;
  margin: 16px 0 8px;
  appearance: none;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green) 0 40%, var(--paper-deep) 40% 100%);
}

.range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  appearance: none;
  border: 4px solid var(--card);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

.field-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-title-row > span {
  margin: 0;
}

.field-title-row strong {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 14px;
}

.range-ends {
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 7px;
}

.optional-block {
  margin-top: 14px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.optional-block summary {
  cursor: pointer;
  padding: 13px 0;
  font-size: 9px;
  font-weight: 700;
}

.optional-block summary span {
  margin-left: 5px;
  color: var(--ink-soft);
  font-size: 7px;
  font-weight: 400;
}

.optional-block .field {
  margin-bottom: 13px;
  margin-top: 0;
}

.toggle-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}

.toggle-line strong,
.toggle-line small {
  display: block;
}

.toggle-line strong {
  font-size: 10px;
}

.toggle-line small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 8px;
}

.toggle-line input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}

.settings-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 23px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.settings-bottom > div {
  display: flex;
  gap: 7px;
}

.danger-link {
  padding: 0;
  color: var(--red);
  background: transparent;
  font-size: 8px;
}

.onboarding-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(310px, 0.85fr) minmax(500px, 1.15fr);
}

.onboarding-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 35px clamp(35px, 5vw, 75px) 32px;
  overflow: hidden;
  color: #f8f5eb;
  background:
    radial-gradient(circle at 20% 80%, rgba(240, 203, 112, 0.12), transparent 25%),
    linear-gradient(140deg, #123a33, #0c2925);
}

.onboarding-story::after {
  position: absolute;
  right: -130px;
  bottom: 70px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  box-shadow:
    0 0 0 35px rgba(255, 255, 255, 0.018),
    0 0 0 70px rgba(255, 255, 255, 0.012);
  content: "";
}

.story-copy {
  position: relative;
  z-index: 1;
  margin: auto 0;
  padding: 70px 0;
}

.story-kicker {
  color: var(--yellow);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.story-copy h2 {
  margin: 18px 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.story-copy p {
  max-width: 390px;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.85;
}

.story-note {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.3);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.onboarding-form {
  width: min(100%, 650px);
  margin: auto;
  padding: 45px clamp(28px, 6vw, 85px);
  background: var(--paper);
}

.step-track {
  display: flex;
  gap: 6px;
  margin-bottom: 55px;
}

.step-track span {
  width: 28px;
  height: 3px;
  border-radius: 99px;
  background: var(--line);
}

.step-track span.is-done {
  background: var(--green);
}

.onboarding-heading {
  margin-bottom: 30px;
}

.step-count {
  display: block;
  margin-bottom: 12px;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 10px;
}

.onboarding-heading h1 {
  margin: 0;
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: clamp(29px, 3.2vw, 39px);
  letter-spacing: -0.035em;
  line-height: 1.24;
}

.onboarding-heading p {
  margin: 11px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.7;
}

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

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

.choice-card {
  min-height: 105px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  text-align: left;
}

.choice-card:hover {
  border-color: var(--ink-soft);
}

.choice-card.is-selected {
  border-color: var(--ink);
  background: var(--mint);
  box-shadow: inset 0 0 0 1px var(--ink);
}

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

.choice-card > span {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 10px;
}

.choice-card > strong {
  margin-top: 15px;
  font-size: 11px;
}

.choice-card > small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 8px;
}

.onboarding-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.module-choices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.module-choices button {
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 9px;
}

.module-choices button.is-selected {
  color: var(--ink-deep);
  border-color: var(--ink);
  background: var(--mint);
  font-weight: 800;
}

.material-choice button {
  min-height: 94px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  text-align: left;
}

.material-choice button.is-selected {
  border-color: var(--ink);
  background: var(--mint);
}

.material-choice strong,
.material-choice small {
  display: block;
}

.material-choice strong {
  font-size: 10px;
}

.material-choice small {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  z-index: 300;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 16px;
  border-radius: 10px;
  color: #fff;
  background: var(--ink-deep);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.19);
  font-size: 9px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 170ms ease, transform 170ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

.mobile-nav {
  display: none;
}

@media (max-width: 1050px) {
  .workspace {
    padding-right: 30px;
    padding-left: 30px;
  }

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

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .rail {
    display: none;
  }

  .workspace {
    width: 100%;
    padding: 20px 18px 100px;
  }

  .page {
    padding-top: 35px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 50;
    right: 13px;
    bottom: 11px;
    left: 13px;
    display: grid;
    height: 62px;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    padding: 7px 12px;
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.48);
    background: rgba(13, 43, 39, 0.96);
    box-shadow: 0 13px 35px rgba(9, 34, 30, 0.25);
    backdrop-filter: blur(12px);
  }

  .mobile-nav button {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 3px;
    color: inherit;
    background: transparent;
    font-size: 7px;
  }

  .mobile-nav button.is-active {
    color: var(--yellow);
  }

  .mobile-nav svg {
    width: 18px;
    height: 18px;
  }

  .level-mini {
    display: inline-flex;
  }

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

  .onboarding-shell {
    display: block;
  }

  .onboarding-story {
    min-height: 280px;
    padding: 27px 25px;
  }

  .story-copy {
    padding: 38px 0 18px;
  }

  .story-copy h2 {
    margin: 12px 0;
    font-size: 31px;
  }

  .story-note {
    display: none;
  }

  .onboarding-form {
    width: 100%;
    padding: 30px 24px 55px;
  }

  .step-track {
    margin-bottom: 32px;
  }
}

@media (max-width: 580px) {
  .workspace {
    padding-right: 14px;
    padding-left: 14px;
  }

  .workspace-top {
    font-size: 8px;
  }

  .exam-glance {
    padding: 6px 9px;
  }

  .home-intro {
    display: block;
  }

  .home-intro h1 {
    font-size: 33px;
  }

  .home-intro h1 span {
    font-size: 0.7em;
  }

  .status-line {
    margin-top: 15px;
    margin-bottom: 0;
  }

  .mastery-hero {
    display: block;
    margin-top: 29px;
    padding: 25px 0 24px;
  }

  .mastery-primary strong {
    font-size: 78px;
  }

  .mastery-secondary {
    margin-top: 20px;
  }

  .today-card {
    margin-top: 20px;
    padding: 20px 17px;
  }

  .task-row {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .task-symbol {
    width: 38px;
    height: 38px;
  }

  .task-row > button,
  .task-row > .done-label {
    grid-column: 2;
    justify-self: start;
  }

  .task-copy strong,
  .task-copy span {
    overflow: visible;
    white-space: normal;
  }

  .advisor-invite {
    grid-template-columns: 35px minmax(0, 1fr);
    padding: 15px 0 4px;
  }

  .advisor-invite .text-button {
    grid-column: 2;
    justify-self: start;
  }

  .memory-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .growth-numbers {
    grid-template-columns: 1fr 1fr;
  }

  .growth-number-primary {
    grid-column: 1 / -1;
  }

  .page-heading h1 {
    font-size: 36px;
  }

  .panel {
    padding: 19px 16px;
  }

  .small-search {
    width: 45%;
  }

  .word-list-row {
    align-items: flex-start;
  }

  .word-line span,
  .word-tier {
    display: none;
  }

  .word-state {
    max-width: 48px;
  }

  .advisor-heading {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
  }

  .advisor-avatar {
    width: 38px;
    height: 38px;
  }

  .advisor-heading h1 {
    font-size: 29px;
  }

  .chat-messages {
    height: 42vh;
    padding: 18px;
  }

  .message-bubble {
    max-width: 86%;
    font-size: 10px;
  }

  .chat-suggestions {
    padding-right: 14px;
    padding-left: 14px;
  }

  .chat-form {
    margin-right: 14px;
    margin-left: 14px;
  }

  .chat-scope {
    margin-right: 14px;
    margin-left: 14px;
  }

  .focus-shell {
    padding: 18px 14px 35px;
  }

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

  .study-stage {
    margin-top: 5vh;
  }

  .word-card-v2 {
    min-height: 360px;
    padding: 28px 21px 23px;
  }

  .word-heading h1 {
    font-size: 45px;
  }

  .word-heading {
    gap: 8px;
  }

  .rating-row {
    gap: 6px;
  }

  .rating-row button {
    min-height: 54px;
    padding: 5px;
  }

  .verify-stage {
    margin-top: 5vh;
    padding: 25px 18px;
  }

  .verify-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-meta {
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .tomorrow-question {
    align-items: stretch;
    flex-direction: column;
  }

  .tomorrow-options button {
    flex: 1;
  }

  .result-actions {
    flex-direction: column;
  }

  .settings-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .settings-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-bottom > div {
    justify-content: flex-end;
  }

  .onboarding-story {
    min-height: 250px;
  }

  .story-copy {
    padding-top: 27px;
  }

  .story-copy h2 {
    font-size: 27px;
  }

  .story-copy p {
    font-size: 9px;
  }

  .onboarding-form {
    padding: 26px 18px 55px;
  }

  .onboarding-heading h1 {
    font-size: 27px;
  }

  .choice-row {
    gap: 7px;
  }

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

  .choice-card {
    min-height: 96px;
    padding: 13px;
  }

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

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

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

  .toast {
    right: 17px;
    bottom: 87px;
    left: 17px;
  }
}

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

/* Readability pass: keep the interface calm without shrinking essential text. */
.rail-link {
  min-height: 48px;
  font-size: 14px;
}

.rail-link svg {
  width: 20px;
  height: 20px;
}

.rail-exam {
  padding: 17px 13px;
}

.rail-exam .tiny-label {
  font-size: 10px;
}

.rail-exam strong {
  font-size: 13px;
  line-height: 1.45;
}

.rail-exam > span:last-child {
  font-size: 11px;
  line-height: 1.5;
}

.rail-settings {
  min-height: 42px;
  font-size: 12px;
}

.rail-settings svg {
  width: 18px;
  height: 18px;
}

.workspace-top {
  font-size: 12px;
}

.exam-glance {
  padding: 8px 12px;
  font-size: 11px;
}

.eyebrow {
  margin-bottom: 13px;
  font-size: 11px;
  letter-spacing: 0.15em;
}

.home-intro h1 {
  line-height: 1.25;
}

.status-line {
  min-height: 34px;
  padding: 7px 13px;
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
}

.mastery-primary .tiny-label {
  margin-top: -38px;
}

.tiny-label {
  font-size: 11px;
  letter-spacing: 0.11em;
}

.mastery-unit {
  font-size: 15px;
}

.mastery-secondary > p {
  font-size: 16px;
  line-height: 1.7;
}

.mastery-footnotes {
  gap: 20px;
  font-size: 13px;
}

.mastery-footnotes strong {
  font-size: 17px;
}

.section-head h2,
.panel-head h2 {
  font-size: 24px;
}

.time-note {
  font-size: 12px;
}

.time-note svg {
  width: 17px;
  height: 17px;
}

.task-row {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 19px;
}

.task-symbol {
  width: 47px;
  height: 47px;
}

.task-symbol svg {
  width: 22px;
  height: 22px;
}

.task-copy strong {
  font-size: 16px;
  line-height: 1.5;
}

.task-copy span {
  margin-top: 6px;
  overflow: visible;
  font-size: 13px;
  line-height: 1.65;
  text-overflow: clip;
  white-space: normal;
}

.done-label {
  font-size: 12px;
}

.task-note {
  font-size: 12px;
  line-height: 1.6;
}

.advisor-invite {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 15px;
  padding: 18px 4px;
}

.advisor-orbit {
  width: 44px;
  height: 44px;
}

.advisor-orbit svg {
  width: 20px;
  height: 20px;
}

.advisor-invite strong {
  font-size: 14px;
}

.advisor-invite p {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.55;
}

.text-button {
  font-size: 13px;
}

.text-button svg {
  width: 15px;
  height: 15px;
}

.button {
  min-height: 46px;
  font-size: 13px;
}

.button-small {
  min-height: 37px;
  padding: 0 14px;
  font-size: 12px;
}

.memory-note strong {
  font-size: 13px;
}

.memory-note span {
  font-size: 11px;
  line-height: 1.55;
}

.page-heading > div > p:last-child,
.advisor-heading > div > p:last-child {
  font-size: 14px;
}

.growth-numbers span {
  font-size: 11px;
}

.growth-numbers strong {
  font-size: 29px;
}

.growth-number-primary strong {
  font-size: 40px;
}

.panel-note {
  font-size: 11px;
}

.growth-column > span {
  font-size: 11px;
}

.growth-column small {
  font-size: 11px;
}

.tier-copy strong {
  font-size: 13px;
}

.tier-copy span {
  font-size: 13px;
}

.small-search {
  height: 42px;
}

.small-search svg {
  width: 16px;
  height: 16px;
}

.small-search input {
  font-size: 12px;
}

.word-list-row {
  padding: 15px;
}

.word-line strong {
  font-size: 20px;
}

.word-line span {
  font-size: 11px;
}

.word-list-row p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.word-tier,
.word-state {
  padding: 5px 7px;
  font-size: 11px;
}

.sound-button {
  width: 32px;
  height: 32px;
}

.sound-button svg {
  width: 15px;
  height: 15px;
}

.empty-list {
  font-size: 13px;
}

.advisor-heading h1 {
  font-size: 37px;
}

.message-bubble {
  max-width: 80%;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.75;
}

.message-avatar {
  width: 30px;
  height: 30px;
}

.message-avatar svg {
  width: 16px;
  height: 16px;
}

.plan-change {
  margin-left: 39px;
  padding: 17px;
}

.plan-change > span {
  font-size: 10px;
}

.plan-change > strong {
  font-size: 16px;
}

.plan-change > p {
  font-size: 13px;
  line-height: 1.6;
}

.chat-suggestions button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
}

.chat-form textarea {
  font-size: 13px;
}

.chat-scope {
  font-size: 11px;
  line-height: 1.5;
}

.focus-top {
  font-size: 12px;
}

.focus-exit {
  font-size: 12px;
}

.focus-examline {
  font-size: 11px;
}

.study-meta span {
  padding: 6px 9px;
  font-size: 11px;
}

.word-heading h1 {
  font-size: clamp(52px, 7vw, 78px);
}

.word-phonetic {
  font-size: 16px;
}

.recall-space p {
  font-size: 12px;
}

.definition {
  font-size: 23px;
  line-height: 1.55;
}

.definition span {
  font-size: 14px;
}

.example {
  font-size: 17px;
  line-height: 1.65;
}

.translation {
  font-size: 13px;
  line-height: 1.6;
}

.study-actions > p {
  font-size: 12px;
}

.rating-row button {
  min-height: 66px;
}

.rating-row strong {
  font-size: 14px;
}

.rating-row span {
  font-size: 11px;
}

.verify-kicker {
  font-size: 11px;
}

.verify-stage h1 {
  font-size: 47px;
}

.verify-phonetic {
  font-size: 14px;
}

.verify-options button {
  min-height: 55px;
  padding: 11px 15px;
  font-size: 14px;
  line-height: 1.45;
}

.verify-options button > span {
  font-size: 12px;
}

.verify-footer p {
  font-size: 11px;
}

.study-result h1 {
  line-height: 1.25;
}

.result-lead {
  font-size: 14px;
}

.result-count span {
  font-size: 13px;
}

.result-count small {
  font-size: 12px;
}

.result-meta {
  font-size: 12px;
}

.result-meta strong {
  font-size: 15px;
}

.xp-award {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin-top: 18px;
  padding: 17px 19px;
  border: 1px solid #dfcf9f;
  border-radius: 13px;
  background: #fff9e9;
  text-align: left;
}

.xp-award > div:first-child span,
.xp-award > div:first-child strong {
  display: block;
}

.xp-award > div:first-child span {
  color: var(--ink-soft);
  font-size: 10px;
}

.xp-award > div:first-child strong {
  margin-top: 3px;
  color: #8b6717;
  font-family: var(--font-display);
  font-size: 23px;
}

.xp-level > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.xp-level > div:first-child strong {
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: 15px;
}

.xp-level > div:first-child span {
  color: var(--ink-soft);
  font-size: 9px;
}

.xp-progress {
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(23, 61, 54, 0.1);
}

.xp-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d9aa2e, var(--yellow));
  animation: xp-fill 650ms var(--ease-out) both;
}

.xp-level small {
  display: block;
  margin-top: 6px;
  color: var(--orange);
  font-size: 9px;
  font-weight: 800;
}

.xp-stamp {
  position: fixed;
  z-index: 260;
  right: 32px;
  bottom: 34px;
  display: grid;
  min-width: 128px;
  gap: 2px;
  padding: 13px 17px;
  border: 3px double rgba(232, 176, 55, 0.72);
  border-radius: 7px;
  color: #6f5217;
  background: rgba(255, 249, 224, 0.96);
  box-shadow: 0 12px 34px rgba(29, 45, 40, 0.17);
  pointer-events: none;
  transform-origin: center;
  animation: stamp-in 950ms var(--ease-out) both;
}

.xp-stamp span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.xp-stamp strong {
  font-family: var(--font-display);
  font-size: 23px;
}

.xp-stamp small {
  color: var(--orange);
  font-size: 10px;
  font-weight: 900;
}

.xp-stamp.is-finish {
  border-color: rgba(47, 102, 176, 0.7);
  color: #214e86;
  background: rgba(234, 243, 255, 0.97);
}

.xp-stamp.is-level-up {
  border-color: rgba(219, 116, 80, 0.78);
  box-shadow:
    0 0 0 8px rgba(240, 201, 107, 0.18),
    0 14px 38px rgba(29, 45, 40, 0.2);
}

@keyframes stamp-in {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(1.28) rotate(-9deg);
  }
  22% {
    opacity: 1;
    transform: translateY(0) scale(0.96) rotate(-4deg);
  }
  35% {
    transform: scale(1.04) rotate(-4deg);
  }
  72% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(-4deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-18px) scale(0.98) rotate(-2deg);
  }
}

@keyframes xp-fill {
  from {
    width: 0;
  }
}

.tomorrow-question strong {
  font-size: 14px;
}

.tomorrow-question span {
  font-size: 11px;
}

.tomorrow-options button {
  min-height: 36px;
  padding: 0 13px;
  font-size: 11px;
}

.modal h2 {
  font-size: 32px;
}

.modal > p:not(.eyebrow) {
  font-size: 13px;
  line-height: 1.6;
}

.modal textarea {
  font-size: 14px;
}

.field > span,
.field-label,
.field-title-row > span {
  font-size: 13px;
}

.field > span em {
  font-size: 11px;
}

.field input,
.field select {
  height: 48px;
  font-size: 14px;
}

.field > small {
  font-size: 11px;
}

.field-title-row strong {
  font-size: 17px;
}

.range-ends {
  font-size: 11px;
}

.optional-block summary {
  font-size: 12px;
}

.optional-block summary span {
  font-size: 11px;
}

.toggle-line strong {
  font-size: 13px;
}

.toggle-line small {
  font-size: 11px;
  line-height: 1.5;
}

.danger-link {
  font-size: 11px;
}

.story-kicker {
  font-size: 11px;
}

.story-copy p {
  font-size: 14px;
}

.story-note {
  font-size: 12px;
}

.brand-name small {
  font-size: 8px;
  letter-spacing: 0.18em;
}

.step-count {
  font-size: 13px;
}

.onboarding-heading p {
  font-size: 13px;
  line-height: 1.7;
}

.choice-card {
  min-height: 115px;
  padding: 18px;
}

.choice-card > span {
  font-size: 13px;
}

.choice-card > strong {
  font-size: 14px;
}

.choice-card > small {
  font-size: 11px;
}

.module-choices button {
  min-height: 48px;
  font-size: 13px;
}

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

.material-choice small {
  font-size: 11px;
}

.toast {
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .mobile-nav {
    height: 68px;
  }

  .mobile-nav button {
    font-size: 11px;
  }

  .mobile-nav svg {
    width: 21px;
    height: 21px;
  }

  .story-copy p {
    font-size: 13px;
  }

  .wordbook-status-copy > span {
    font-size: 11px;
  }

  .wordbook-status-copy strong {
    font-size: 17px;
  }

  .wordbook-status-copy strong em,
  .wordbook-status-copy small {
    font-size: 11px;
  }

  .onboarding-form {
    padding-bottom: 65px;
  }
}

@media (max-width: 580px) {
  .workspace-top {
    font-size: 14px;
  }

  .exam-glance {
    font-size: 11px;
  }

  .home-intro h1 {
    font-size: 35px;
  }

  .mastery-secondary > p {
    font-size: 15px;
  }

  .today-card {
    padding: 22px 18px;
  }

  .task-row {
    grid-template-columns: 43px minmax(0, 1fr);
  }

  .task-symbol {
    width: 43px;
    height: 43px;
  }

  .task-copy strong {
    font-size: 15px;
  }

  .task-copy span {
    font-size: 12px;
  }

  .advisor-invite {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .advisor-invite strong {
    font-size: 13px;
  }

  .advisor-invite p {
    font-size: 12px;
  }

  .growth-numbers span {
    font-size: 11px;
  }

  .word-line strong {
    font-size: 19px;
  }

  .word-list-row p {
    font-size: 12px;
  }

  .advisor-heading h1 {
    font-size: 31px;
  }

  .message-bubble {
    max-width: 87%;
    font-size: 14px;
  }

  .focus-top,
  .focus-exit {
    font-size: 11px;
  }

  .word-card-v2 {
    min-height: 385px;
  }

  .word-heading h1 {
    font-size: 48px;
  }

  .definition {
    font-size: 20px;
  }

  .example {
    font-size: 15px;
  }

  .translation {
    font-size: 12px;
  }

  .rating-row button {
    min-height: 62px;
    padding: 7px 4px;
  }

  .rating-row strong {
    font-size: 12px;
  }

  .rating-row span {
    font-size: 11px;
    line-height: 1.4;
  }

  .verify-stage {
    padding: 27px 18px;
  }

  .verify-options button {
    min-height: 57px;
    font-size: 13px;
  }

  .verify-footer p {
    font-size: 12px;
    line-height: 1.5;
  }

  .result-lead {
    font-size: 13px;
  }

  .result-count span {
    font-size: 12px;
  }

  .result-meta {
    font-size: 12px;
  }

  .tomorrow-question strong {
    font-size: 13px;
  }

  .tomorrow-question span {
    font-size: 11px;
  }

  .story-copy p {
    font-size: 13px;
    line-height: 1.7;
  }

  .onboarding-heading h1 {
    font-size: 29px;
  }

  .onboarding-heading p {
    font-size: 13px;
  }

  .choice-card > strong {
    font-size: 13px;
  }

  .choice-card > small,
  .material-choice small {
    font-size: 11px;
  }
}

/* Motion follows state changes; decorative motion is kept out of the reading surface. */
.button,
.rail-link,
.choice-card,
.module-choices button,
.material-choice button,
.filter-tab,
.quiz-option,
.rating-row button,
.tomorrow-options button,
.text-button,
.modal-close,
.sound-button {
  transition:
    transform var(--duration-press) var(--ease-out),
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.button:active,
.rating-row button:active,
.tomorrow-options button:active,
.choice-card:active,
.module-choices button:active,
.material-choice button:active,
.sound-button:active,
.modal-close:active,
.rail-link:active {
  transform: scale(0.975);
}

.word-card-v2.is-entering {
  animation: word-enter 240ms var(--ease-out) both;
}

@keyframes word-enter {
  from {
    opacity: 0.62;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.word-reveal {
  animation: reveal-content 180ms var(--ease-out) both;
}

@keyframes reveal-content {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.verify-stage.is-entering {
  animation: verify-enter 220ms var(--ease-out) both;
}

@keyframes verify-enter {
  from {
    opacity: 0.72;
    transform: translateX(9px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.task-row.is-done .task-symbol {
  animation: completion-mark 200ms var(--ease-out) both;
}

@keyframes completion-mark {
  from {
    opacity: 0.7;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#overlay.is-closing .modal-backdrop {
  animation: backdrop-out 160ms var(--ease-out) both;
}

#overlay.is-closing .modal {
  animation: modal-out 160ms var(--ease-out) both;
}

@keyframes backdrop-out {
  to {
    opacity: 0;
  }
}

@keyframes modal-out {
  to {
    opacity: 0;
    transform: translateY(5px) scale(0.98);
  }
}

html.is-page-transitioning .word-card-v2.is-entering,
html.is-page-transitioning .study-result {
  animation: none;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    transform: translateY(-1px);
  }

  .rail-link:hover {
    transform: translateX(2px);
  }
}

@media (hover: none), (pointer: coarse) {
  .button:hover,
  .rail-link:hover,
  .choice-card:hover,
  .filter-tab:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page.is-entering,
  .focus-shell.is-entering,
  .word-card-v2.is-entering,
  .verify-stage.is-entering,
  .task-row.is-done .task-symbol,
  .study-result {
    animation: reduce-motion-fade 160ms ease both !important;
  }

  .word-reveal,
  #overlay.is-closing .modal-backdrop,
  #overlay.is-closing .modal,
  .xp-stamp {
    animation: reduce-motion-fade 160ms ease both !important;
  }

  .button:active,
  .rating-row button:active,
  .tomorrow-options button:active,
  .choice-card:active,
  .module-choices button:active,
  .material-choice button:active,
  .sound-button:active,
  .modal-close:active,
  .rail-link:active {
    transform: none;
  }
}

@keyframes reduce-motion-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.range-control {
  position: relative;
  height: 40px;
  margin-top: 10px;
}

.range-ticks {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 13px;
  left: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  transform: translateY(-50%);
}

.range-ticks i {
  width: 2px;
  height: 10px;
  border-radius: 3px;
  background: #879f99;
  transition: background-color 90ms linear, transform 90ms var(--ease-out);
}

.range-ticks i:nth-child(odd) {
  width: 3px;
  height: 14px;
  background: #66847d;
}

.range-ticks i.is-filled {
  background: var(--orange);
  transform: scale(1.08);
}

.field input.range {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  cursor: grab;
  touch-action: pan-y;
}

.field input.range:active {
  cursor: grabbing;
}

.field input.range:focus,
.field input.range:focus-visible {
  border: 0;
  background: transparent;
  outline: 3px solid rgba(47, 102, 176, 0.25);
  outline-offset: 5px;
}

.field input.range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    var(--orange) 0 var(--range-fill),
    #d8e2df var(--range-fill) 100%
  );
}

.field input.range::-webkit-slider-thumb {
  width: 26px;
  height: 26px;
  margin-top: -10px;
  appearance: none;
  border: 4px solid var(--card);
  border-radius: 50%;
  background: var(--orange);
  box-shadow:
    0 0 0 1px var(--orange),
    0 4px 12px rgba(13, 43, 39, 0.18);
}

.field input.range::-moz-range-track {
  height: 6px;
  border-radius: 99px;
  background: #d8e2df;
}

.field input.range::-moz-range-progress {
  height: 6px;
  border-radius: 99px;
  background: var(--orange);
}

.field input.range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 4px solid var(--card);
  border-radius: 50%;
  background: var(--orange);
  box-shadow:
    0 0 0 1px var(--orange),
    0 4px 12px rgba(13, 43, 39, 0.18);
}

.range-labels {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.range-labels span {
  text-align: center;
}

.range-labels span:first-child {
  text-align: left;
}

.range-labels span:last-child {
  text-align: right;
}

.session-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.session-options button {
  min-height: 70px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  text-align: left;
  transition:
    transform var(--duration-press) var(--ease-out),
    background-color 160ms ease,
    border-color 160ms ease;
}

.session-options button.is-selected {
  border-color: var(--ink);
  background: var(--mint);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.session-options strong,
.session-options span {
  display: block;
}

.session-options strong {
  font-size: 13px;
}

.session-options span {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.settings-session-field {
  min-width: 0;
  grid-column: 1 / -1;
}

@media (max-width: 580px) {
  .session-options {
    grid-template-columns: 1fr;
  }

  .dictionary-search {
    width: 100%;
  }

  .word-state {
    max-width: 86px;
    text-align: center;
  }

  .message-body {
    max-width: 88%;
  }

  .plan-change.plan-change-docked {
    margin-right: 14px;
    margin-left: 14px;
  }

  .preset-panel {
    padding-right: 14px;
    padding-left: 14px;
  }

  .preset-panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .preset-groups {
    grid-template-columns: 1fr;
  }
}

@media (hover: hover) and (pointer: fine) {
  .session-options button:hover {
    border-color: #8aa49e;
  }
}

/* Distinct visual language: an exam study ledger, with accumulated word marks. */
.eyebrow {
  color: var(--orange);
  letter-spacing: 0.08em;
}

.mastery-primary strong {
  font-weight: 800;
}

.mastery-tally {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding: 0 10px;
}

.mastery-tally i {
  display: block;
  width: 3px;
  height: 22px;
  border-radius: 2px;
  background: var(--orange);
  transform: rotate(calc((var(--mark) % 3 - 1) * 5deg));
}

.today-card {
  border-radius: 3px 24px 3px 3px;
}

.task-row {
  border-left: 4px solid var(--mint-deep);
  border-radius: 5px 14px 14px 5px;
}

.task-row.is-done {
  border-left-color: var(--green);
}

.task-symbol {
  border-radius: 4px 12px 12px 12px;
}

.word-heading h1 {
  font-family: "Bahnschrift SemiCondensed", "Arial Narrow", var(--font-display);
}

.example {
  font-family: var(--font-reading);
}

.home-intro h1 {
  max-width: 720px;
}

.exam-glance {
  color: var(--ink-soft);
  background: rgba(251, 253, 252, 0.76);
}

.brand-seal {
  background: var(--yellow);
}

.study-result h1,
.onboarding-heading h1,
.page-heading h1,
.advisor-heading h1 {
  font-family: var(--font-display);
  font-weight: 800;
}

@media (max-width: 580px) {
  .mastery-tally {
    display: none;
  }
}

@media (max-width: 580px) {
  .plan-overview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-overview-strip > div:first-child {
    grid-column: 1 / -1;
  }

  .adjust-tabs {
    grid-template-columns: 1fr;
  }

  .adjust-tabs button {
    min-height: 52px;
  }

  .adjust-workspace {
    padding: 14px;
  }

  .adjust-category-grid,
  .adjust-option-grid {
    grid-template-columns: 1fr;
  }
}

.plan-page-heading {
  align-items: center;
}

.growth-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-deep);
}

.growth-tabs button {
  min-height: 36px;
  padding: 0 18px;
  border-radius: 7px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
}

.growth-tabs button.is-active {
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 3px 10px rgba(13, 43, 39, 0.06);
  font-weight: 800;
}

.plan-summary-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.plan-progress-ring {
  --percent: 0;
  position: relative;
  display: grid;
  width: 126px;
  height: 126px;
  place-content: center;
  justify-self: center;
  border-radius: 50%;
  background: conic-gradient(var(--orange) calc(var(--percent) * 1%), var(--paper-deep) 0);
  text-align: center;
}

.plan-progress-ring::before {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: var(--card);
  content: "";
}

.plan-progress-ring strong,
.plan-progress-ring span {
  position: relative;
  z-index: 1;
}

.plan-progress-ring strong {
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: 28px;
}

.plan-progress-ring span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 9px;
}

.plan-summary-main h2 {
  margin: 5px 0 5px;
  color: var(--ink-deep);
  font-size: 24px;
}

.plan-summary-main > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.plan-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--line-soft);
}

.plan-metrics > div {
  padding: 11px 12px;
  background: var(--paper);
}

.plan-metrics span,
.plan-metrics strong {
  display: block;
}

.plan-metrics span {
  color: var(--ink-soft);
  font-size: 9px;
}

.plan-metrics strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 12px;
}

.today-plan-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 17px 20px;
  border: 1px solid #b9d5c9;
  border-radius: 13px;
  background: #e8f3ee;
}

.today-plan-strip strong {
  display: block;
  margin-top: 4px;
  color: var(--ink-deep);
  font-size: 16px;
}

.today-plan-strip p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.today-plan-progress {
  width: min(230px, 40%);
  flex: 0 0 auto;
}

.today-plan-progress > span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  text-align: right;
}

.today-plan-progress > div {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(23, 61, 54, 0.1);
}

.today-plan-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.plan-timeline-panel {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.plan-timeline {
  position: relative;
  display: grid;
  gap: 0;
}

.plan-timeline::before {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 16px;
  width: 1px;
  background: var(--line);
  content: "";
}

.plan-day {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  border-bottom: 1px solid var(--line-soft);
}

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

.plan-day-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--card);
  font-family: var(--font-display);
  font-size: 10px;
}

.plan-day-marker svg {
  width: 15px;
  height: 15px;
}

.plan-day.is-today .plan-day-marker {
  color: var(--ink-deep);
  border-color: var(--yellow);
  background: var(--yellow);
  box-shadow: 0 0 0 5px #fff9df;
}

.plan-day.is-done .plan-day-marker {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.plan-day-copy > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.plan-day-copy strong {
  color: var(--ink);
  font-size: 13px;
}

.plan-day-copy span {
  color: var(--ink-soft);
  font-size: 10px;
}

.plan-day-copy p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.plan-day-count {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--ink-soft);
}

.plan-day-count strong {
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: 21px;
}

.plan-day-count span {
  font-size: 9px;
}

.timeline-expand {
  display: block;
  min-height: 38px;
  margin: 14px auto 0;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--paper);
  font-size: 11px;
}

.timeline-expand:hover {
  border-color: var(--ink-soft);
  background: var(--paper-deep);
}

.plan-search-panel {
  margin-top: 0;
}

@media (max-width: 760px) {
  .plan-summary-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

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

  .today-plan-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .today-plan-progress {
    width: 100%;
  }
}

@media (max-width: 580px) {
  .plan-page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .plan-page-heading .button {
    width: 100%;
  }

  .plan-timeline-panel {
    padding: 18px 14px;
  }

  .plan-day {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .plan-day-copy p {
    font-size: 10px;
  }

  .xp-award {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .xp-stamp {
    right: 18px;
    bottom: 92px;
  }
}

.setting-group {
  margin-top: 20px;
}

.setting-group > strong {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
}

.settings-exam-note {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.settings-exam-note span {
  color: var(--ink-soft);
  font-size: 10px;
}

.settings-exam-note strong {
  font-size: 13px;
}

.settings-exam-note small {
  color: var(--ink-soft);
  font-size: 11px;
}

.settings-plan-button {
  width: 100%;
  margin-top: 13px;
}

.settings-volume {
  width: 100%;
  height: 6px;
  margin: 8px 0 4px;
  appearance: none;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    var(--orange) 0 var(--range-fill),
    var(--paper-deep) var(--range-fill) 100%
  );
}

.settings-volume::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  appearance: none;
  border: 4px solid var(--card);
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 1px var(--orange);
}

.settings-preview-sound {
  margin-top: 10px;
}

/* Level progress is treated as a collected seal rather than a dashboard meter. */
.rail-exam {
  margin-top: auto;
}

.workspace-top {
  position: sticky;
  z-index: 16;
  top: 0;
  min-height: 66px;
  margin: -18px -12px 11px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(197, 213, 207, 0.58);
  border-radius: 0 0 18px 18px;
  background:
    linear-gradient(180deg, rgba(237, 243, 240, 0.96), rgba(237, 243, 240, 0.78)),
    rgba(237, 243, 240, 0.82);
  box-shadow: 0 10px 28px rgba(12, 47, 51, 0.035);
  backdrop-filter: blur(20px) saturate(145%);
}

.workspace-top-actions {
  gap: 10px;
}

.level-badge {
  --level-progress: 0%;
  display: inline-flex;
  min-width: 188px;
  align-items: center;
  gap: 11px;
  padding: 5px 14px 5px 5px;
  border: 1px solid rgba(167, 143, 72, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 253, 246, 0.92), rgba(242, 245, 238, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 5px 16px rgba(15, 52, 50, 0.055);
  color: var(--ink-deep);
}

.level-badge-medal {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 50%;
}

.level-badge-medal::before,
.level-badge-medal::after {
  position: absolute;
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.level-badge-medal::before {
  inset: -2px;
  border: 1px solid rgba(163, 132, 45, 0.22);
}

.level-badge-medal::after {
  inset: -5px;
  border: 1px solid rgba(47, 102, 176, 0.08);
}

.level-badge-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from -18deg,
    #d6a92f 0 var(--level-progress),
    rgba(28, 72, 69, 0.13) var(--level-progress) 100%
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
}

.level-badge-core {
  position: relative;
  display: grid;
  width: 37px;
  height: 37px;
  grid-template-rows: auto 1fr;
  place-items: center;
  padding: 3px 0 4px;
  border-radius: 50%;
  color: #fff8df;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(145deg, #174c47, #092f34 72%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 2px 7px rgba(9, 40, 41, 0.2);
  line-height: 1;
}

.level-badge-core small {
  color: rgba(255, 247, 213, 0.66);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

.level-badge-core strong {
  align-self: end;
  font-family: var(--font-display);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1;
}

.level-badge-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
  padding-right: 2px;
  text-align: left;
  white-space: nowrap;
}

.level-badge-copy > span {
  color: #71817e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.level-badge-copy strong {
  color: #143b3d;
  font-family: var(--font-display);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.level-badge-copy strong em {
  color: #70807c;
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}

.level-badge-copy small {
  color: #7b8a86;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.level-badge.is-level-up {
  border-color: rgba(208, 160, 42, 0.46);
  background:
    radial-gradient(circle at 12% 50%, rgba(238, 214, 108, 0.24), transparent 31%),
    linear-gradient(135deg, rgba(255, 253, 244, 0.96), rgba(244, 239, 219, 0.84));
}

.level-badge.is-level-up .level-badge-core {
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.25), transparent 34%),
    linear-gradient(145deg, #c59320, #785510);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 4px rgba(238, 214, 108, 0.16),
    0 3px 9px rgba(88, 61, 9, 0.2);
}

.level-badge.is-award .level-badge-medal {
  animation: level-seal-settle 760ms var(--ease-out) both;
}

.focus-level {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  padding: 3px 7px 3px 5px;
  border: 1px solid rgba(164, 138, 64, 0.28);
  border-radius: 999px;
  color: #5c4918;
  background: rgba(255, 249, 226, 0.88);
  font-family: var(--font-display);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  vertical-align: 1px;
}

.focus-level small {
  color: #9a7a29;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.focus-level strong {
  font-size: 10px;
  font-weight: 650;
}

.level-award {
  margin-top: 20px;
  padding: 5px;
  border: 1px solid rgba(180, 151, 66, 0.3);
  border-radius: 22px;
  background:
    radial-gradient(circle at 16% 20%, rgba(238, 214, 108, 0.2), transparent 38%),
    rgba(255, 252, 241, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 14px 34px rgba(42, 61, 49, 0.055);
}

.level-award .level-badge {
  width: 100%;
  min-height: 96px;
  justify-content: center;
  gap: 18px;
  padding: 12px 18px 12px 13px;
  border-color: transparent;
  border-radius: 17px;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: none;
}

.level-award .level-badge-medal {
  width: 68px;
  height: 68px;
  flex-basis: 68px;
}

.level-award .level-badge-ring {
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
}

.level-award .level-badge-core {
  width: 53px;
  height: 53px;
  padding: 5px 0 6px;
}

.level-award .level-badge-core small {
  font-size: 8px;
}

.level-award .level-badge-core strong {
  font-size: 27px;
}

.level-award .level-badge-copy {
  gap: 3px;
  min-width: 156px;
}

.level-award .level-badge-copy > span {
  font-size: 10px;
}

.level-award .level-badge-copy strong {
  color: #7c5b11;
  font-size: 24px;
}

.level-award .level-badge-copy small {
  font-size: 10px;
}

@keyframes level-seal-settle {
  0% {
    opacity: 0;
    transform: scale(0.82) rotate(-7deg);
  }
  58% {
    opacity: 1;
    transform: scale(1.035) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@media (max-width: 760px) {
  .workspace-top {
    align-items: flex-start;
  }

  .level-badge {
    min-width: 0;
    gap: 8px;
    padding-right: 10px;
  }

  .level-badge-medal {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .level-badge-core {
    width: 34px;
    height: 34px;
  }

  .level-badge-core strong {
    font-size: 17px;
  }

  .level-badge-copy > span {
    display: none;
  }
}

@media (max-width: 520px) {
  .workspace-top {
    min-height: 62px;
    margin-top: -14px;
    padding: 9px 8px;
  }

  .workspace-top > span:first-child {
    display: none;
  }

  .workspace-top-actions {
    width: 100%;
    justify-content: space-between;
    gap: 7px;
  }

  .level-badge {
    flex: 1 1 auto;
    padding-right: 9px;
  }

  .level-badge-copy {
    white-space: normal;
  }

  .level-badge-copy small {
    line-height: 1.2;
    white-space: nowrap;
  }

  .exam-glance {
    flex: 0 0 auto;
  }

  .level-award .level-badge {
    min-height: 88px;
    gap: 13px;
    padding-right: 13px;
  }

  .level-award .level-badge-copy {
    min-width: 0;
  }

  .level-award .level-badge-medal {
    width: 61px;
    height: 61px;
    flex-basis: 61px;
  }

  .level-award .level-badge-core {
    width: 48px;
    height: 48px;
  }

  .level-award .level-badge-core strong {
    font-size: 24px;
  }

  .level-award .level-badge-copy strong {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .level-badge.is-award .level-badge-medal {
    animation: none;
  }
}

/* The personal wordbook replaces abstract levels with a collection that grows. */
.wordbook-status {
  display: inline-flex;
  min-width: 188px;
  align-items: center;
  gap: 11px;
  padding: 5px 14px 5px 7px;
  border: 1px solid rgba(167, 143, 72, 0.28);
  border-radius: 999px;
  color: var(--ink-deep);
  background:
    linear-gradient(135deg, rgba(255, 253, 246, 0.94), rgba(242, 245, 238, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 5px 16px rgba(15, 52, 50, 0.055);
  text-align: left;
  transition:
    transform 130ms var(--ease-out),
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.wordbook-status:active {
  transform: scale(0.975);
}

.wordbook-status-icon {
  position: relative;
  display: block;
  width: 38px;
  height: 44px;
  flex: 0 0 38px;
}

.wordbook-status-icon::before {
  position: absolute;
  inset: 5px 0 2px 7px;
  border-radius: 2px 7px 7px 2px;
  background: repeating-linear-gradient(
    to bottom,
    #fbf6e7 0 2px,
    #d8cfb8 2px 3px
  );
  box-shadow: 1px 2px 3px rgba(28, 43, 34, 0.12);
  content: "";
}

.wordbook-status-icon i {
  position: absolute;
  inset: 0 5px 5px 0;
  border-radius: 3px 9px 9px 3px;
  background:
    radial-gradient(circle at 78% 18%, rgba(238, 214, 108, 0.17), transparent 26%),
    linear-gradient(145deg, #174b45, #092e32 78%);
  box-shadow:
    inset 3px 0 0 rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.wordbook-status-icon i::after {
  position: absolute;
  top: 13px;
  left: 12px;
  width: 9px;
  height: 13px;
  border: 1px solid rgba(238, 214, 108, 0.72);
  border-radius: 6px 0 6px 0;
  content: "";
  transform: rotate(-8deg);
}

.wordbook-status-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
  white-space: nowrap;
}

.wordbook-status-copy > span {
  color: #71817e;
  font-size: 10px;
  font-weight: 700;
}

.wordbook-status-copy strong {
  color: #143b3d;
  font-family: var(--font-display);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  line-height: 1.08;
}

.wordbook-status-copy strong em {
  color: #70807c;
  font-family: var(--font-ui);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}

.wordbook-status-copy small {
  color: #7b8a86;
  font-size: 10px;
  line-height: 1.15;
}

.focus-wordbook {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 3px 7px;
  border: 1px solid rgba(164, 138, 64, 0.28);
  border-radius: 999px;
  color: #5c4918;
  background: rgba(255, 249, 226, 0.88);
  font-family: var(--font-display);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  vertical-align: 1px;
}

.focus-wordbook small {
  color: #9a7a29;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 600;
}

.focus-wordbook strong {
  font-size: 10px;
  font-weight: 650;
}

.wordbook-layout {
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr);
  align-items: start;
  gap: 26px;
  margin-top: 18px;
}

.wordbook-identity {
  position: sticky;
  top: 86px;
  padding: 13px 8px 8px;
}

.wordbook-object {
  display: grid;
  width: 180px;
  height: 232px;
  grid-template-columns: minmax(0, 1fr) var(--book-depth);
  filter: drop-shadow(0 18px 17px rgba(23, 48, 43, 0.16));
  transform: perspective(900px) rotateY(-3deg);
  transform-origin: left center;
}

.wordbook-cover {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 19px 17px 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px 3px 3px 7px;
  color: #f8f3e5;
  background:
    radial-gradient(circle at 78% 18%, rgba(238, 214, 108, 0.11), transparent 29%),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(145deg, #184d47, #092e33 78%);
  background-size: auto, 24px 24px, 24px 24px, auto;
  box-shadow:
    inset 4px 0 0 rgba(255, 255, 255, 0.045),
    inset 0 0 0 7px rgba(4, 32, 33, 0.15);
}

.wordbook-cover::after {
  position: absolute;
  right: -52px;
  bottom: -48px;
  width: 136px;
  height: 136px;
  border: 1px solid rgba(238, 214, 108, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(238, 214, 108, 0.028);
  content: "";
  pointer-events: none;
}

.wordbook-cover-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px 10px 10px 3px;
  color: #173f38;
  background: var(--yellow);
  transform: rotate(-4deg);
}

.wordbook-cover-mark svg {
  width: 20px;
  height: 20px;
}

.wordbook-cover-kicker {
  margin-top: 21px;
  color: rgba(255, 255, 255, 0.38);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.wordbook-cover > strong {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  font-family: var(--font-reading);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.22;
}

.wordbook-cover-count {
  position: relative;
  z-index: 1;
  margin-top: auto;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.wordbook-cover-count b {
  margin-right: 3px;
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.wordbook-pages {
  position: relative;
  z-index: 1;
  height: calc(100% - 10px);
  margin-top: 5px;
  border-radius: 0 6px 6px 0;
  background:
    repeating-linear-gradient(
      to right,
      #fbf7ea 0 2px,
      #e5ddc9 2px 3px,
      #d5cbb5 3px 4px
    );
  box-shadow:
    inset -3px 0 5px rgba(72, 61, 39, 0.14),
    3px 4px 5px rgba(27, 47, 40, 0.09);
  transform: skewY(-0.8deg);
  transform-origin: left center;
}

.wordbook-identity > p {
  width: 186px;
  margin: 17px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.wordbook-page {
  position: relative;
  min-height: 430px;
  padding: 23px 26px 25px;
  border: 1px solid #d8d1bd;
  border-left-color: #beb49d;
  border-radius: 3px 13px 13px 3px;
  background:
    linear-gradient(90deg, rgba(108, 84, 45, 0.08), transparent 24px),
    linear-gradient(rgba(117, 106, 78, 0.055) 1px, transparent 1px),
    #fcf9ee;
  background-size: auto, 100% 31px, auto;
  box-shadow:
    inset 12px 0 22px rgba(75, 62, 39, 0.035),
    0 18px 38px rgba(25, 52, 45, 0.08);
  transform-origin: left center;
}

.wordbook-page::before {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 15px;
  width: 1px;
  background: rgba(180, 69, 45, 0.18);
  content: "";
  pointer-events: none;
}

.wordbook-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.wordbook-page-head > div > span {
  color: #8a7b5f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.wordbook-page-head h2 {
  margin: 5px 0 0;
  color: #183d3e;
  font-family: var(--font-reading);
  font-size: 24px;
  font-weight: 600;
}

.wordbook-search {
  display: flex;
  width: min(290px, 45%);
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid #bdb497;
  color: #73817c;
  background: rgba(255, 253, 246, 0.46);
}

.wordbook-search:focus-within {
  border-color: #2f665e;
  background: rgba(255, 255, 255, 0.72);
}

.wordbook-search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

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

.wordbook-page-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 19px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(137, 122, 89, 0.25);
  color: #8a7b5f;
}

.wordbook-page-status span {
  font-size: 10px;
}

.wordbook-page-status small {
  color: #857b64;
  font-size: 11px;
}

.wordbook-entries {
  display: grid;
}

.wordbook-entry {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto 21px;
  align-items: center;
  gap: 16px;
  padding: 13px 4px 13px 6px;
  border-bottom: 1px solid rgba(137, 122, 89, 0.18);
  color: #173b3c;
  background: transparent;
  text-align: left;
  transition:
    background-color 150ms ease,
    transform 130ms var(--ease-out);
}

.wordbook-entry:active {
  transform: scale(0.993);
}

.wordbook-entry-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.wordbook-entry-word {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 9px;
}

.wordbook-entry-word strong {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wordbook-entry-word span {
  overflow: hidden;
  color: #81775f;
  font-family: var(--font-reading);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wordbook-note-mark {
  display: none !important;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  color: #a77f26 !important;
}

.wordbook-note-mark svg {
  width: 14px;
  height: 14px;
}

.wordbook-entry.has-note .wordbook-note-mark {
  display: grid !important;
}

.wordbook-entry.has-note .wordbook-entry-word strong {
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-color: #c19b3b;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.wordbook-entry-meaning {
  overflow: hidden;
  color: #5e6f6c;
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wordbook-entry-meta {
  display: flex;
  align-items: center;
  gap: 19px;
}

.wordbook-entry-meta > span {
  display: grid;
  min-width: 47px;
  gap: 2px;
}

.wordbook-entry-meta small {
  color: #988e78;
  font-size: 8px;
}

.wordbook-entry-meta strong {
  color: #536662;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.wordbook-entry-arrow {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #81918b;
  background: rgba(23, 63, 56, 0.055);
}

.wordbook-entry-arrow svg {
  width: 11px;
  height: 11px;
}

.wordbook-empty {
  padding: 45px 18px;
  color: #7b806f;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.wordbook-page.is-turning::after {
  position: absolute;
  z-index: 5;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(102, 86, 54, 0.09), transparent 15%),
    linear-gradient(rgba(117, 106, 78, 0.05) 1px, transparent 1px),
    #fcf9ee;
  box-shadow: 12px 4px 28px rgba(45, 51, 39, 0.16);
  content: "";
  pointer-events: none;
  transform-origin: left center;
  animation: wordbook-page-sheet 520ms var(--ease-in-out) both;
}

.word-detail-modal.is-from-book {
  transform-origin: left center;
  animation: wordbook-detail-open 430ms var(--ease-out) both;
}

.wordbook-stamp {
  position: fixed;
  z-index: 260;
  right: 32px;
  bottom: 34px;
  display: grid;
  min-width: 142px;
  gap: 2px;
  padding: 13px 17px;
  border: 1px solid rgba(173, 146, 72, 0.42);
  border-left: 5px solid #316b61;
  border-radius: 5px 10px 10px 5px;
  color: #6c5623;
  background:
    linear-gradient(rgba(117, 106, 78, 0.045) 1px, transparent 1px),
    rgba(255, 251, 238, 0.97);
  background-size: 100% 22px, auto;
  box-shadow:
    7px 7px 0 rgba(214, 202, 171, 0.48),
    0 15px 36px rgba(29, 45, 40, 0.18);
  pointer-events: none;
  transform-origin: center;
  animation: wordbook-stamp-in 980ms var(--ease-out) both;
}

.wordbook-stamp span {
  color: #65716a;
  font-size: 9px;
  font-weight: 700;
}

.wordbook-stamp strong {
  overflow: hidden;
  max-width: 190px;
  font-family: var(--font-reading);
  font-size: 21px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wordbook-stamp small {
  color: #7a876f;
  font-size: 9px;
}

.wordbook-stamp.is-finish {
  border-left-color: #b48c28;
  color: #604a16;
}

.book-award {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 19px;
  margin-top: 20px;
  padding: 15px 17px;
  border: 1px solid rgba(174, 146, 70, 0.32);
  border-radius: 15px;
  background:
    radial-gradient(circle at 8% 8%, rgba(238, 214, 108, 0.18), transparent 35%),
    #fffaf0;
  text-align: left;
}

.book-award-stack {
  position: relative;
  display: block;
  width: 52px;
  height: 58px;
}

.book-award-stack::before,
.book-award-stack::after,
.book-award-stack i {
  position: absolute;
  border-radius: 3px 8px 8px 3px;
  content: "";
}

.book-award-stack::before {
  inset: 7px 0 0 9px;
  background: #e4dcc7;
  box-shadow: 2px 2px 0 #cfc4a8, 4px 4px 0 #e2d9c3;
}

.book-award-stack::after {
  inset: 2px 8px 5px 1px;
  background:
    linear-gradient(145deg, #174b45, #092e32);
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.08);
}

.book-award-stack i:first-child {
  top: 17px;
  left: 18px;
  width: 12px;
  height: 17px;
  border: 1px solid rgba(238, 214, 108, 0.75);
  border-radius: 6px 0;
  transform: rotate(-8deg);
}

.book-award > div > span,
.book-award > div > strong,
.book-award > div > small {
  display: block;
}

.book-award > div > span {
  color: var(--ink-soft);
  font-size: 10px;
}

.book-award > div > strong {
  margin-top: 3px;
  color: #624c1b;
  font-family: var(--font-reading);
  font-size: 22px;
}

.book-award > div > small {
  margin-top: 4px;
  color: #7d816e;
  font-size: 10px;
}

.book-award > button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #cbbd94;
  border-radius: 9px;
  color: #4b554b;
  background: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  white-space: nowrap;
}

@keyframes wordbook-page-sheet {
  0% {
    opacity: 1;
    transform: perspective(1400px) rotateY(0deg);
  }
  48% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: perspective(1400px) rotateY(-82deg);
  }
}

@keyframes wordbook-detail-open {
  0% {
    opacity: 0;
    transform: perspective(1200px) rotateY(-7deg) translateX(30px);
  }
  100% {
    opacity: 1;
    transform: perspective(1200px) rotateY(0deg) translateX(0);
  }
}

@keyframes wordbook-stamp-in {
  0% {
    opacity: 0;
    transform: translateY(15px) scale(1.08) rotate(-2deg);
  }
  22% {
    opacity: 1;
    transform: translateY(0) scale(0.97) rotate(-1deg);
  }
  70% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(-1deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-16px) scale(0.98) rotate(0);
  }
}

@media (hover: hover) and (pointer: fine) {
  .wordbook-status:hover {
    border-color: rgba(143, 113, 33, 0.48);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 8px 20px rgba(15, 52, 50, 0.08);
  }

  .wordbook-entry:hover {
    background: rgba(255, 255, 255, 0.48);
  }

  .book-award > button:hover {
    border-color: #a9935a;
    background: #fff;
  }
}

@media (max-width: 900px) {
  .wordbook-layout {
    grid-template-columns: 166px minmax(0, 1fr);
    gap: 16px;
  }

  .wordbook-object {
    width: 154px;
    height: 205px;
  }

  .wordbook-cover {
    padding: 15px 13px 13px;
  }

  .wordbook-cover-kicker {
    margin-top: 14px;
  }

  .wordbook-cover > strong {
    font-size: 21px;
  }

  .wordbook-cover-count b {
    font-size: 20px;
  }

  .wordbook-identity > p {
    width: 154px;
    font-size: 10px;
  }

  .wordbook-entry {
    gap: 10px;
  }

  .wordbook-entry-meta {
    gap: 12px;
  }
}

@media (max-width: 760px) {
  .wordbook-status {
    min-width: 0;
    max-width: 205px;
    gap: 8px;
    padding-right: 10px;
  }

  .wordbook-status-copy > span {
    display: none;
  }

  .wordbook-layout {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .wordbook-identity {
    position: static;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 2px 3px;
  }

  .wordbook-object {
    flex: 0 0 auto;
  }

  .wordbook-identity > p {
    width: auto;
    max-width: 250px;
    margin: 0;
  }

  .wordbook-page {
    min-height: 390px;
    padding: 20px 18px 21px;
  }

  .wordbook-page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .wordbook-search {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .workspace-top-actions {
    align-items: center;
  }

  .wordbook-status {
    flex: 1 1 auto;
    max-width: none;
  }

  .wordbook-status-icon {
    width: 34px;
    height: 40px;
    flex-basis: 34px;
  }

  .wordbook-status-copy strong {
    font-size: 14px;
  }

  .wordbook-status-copy small {
    font-size: 9px;
  }

  .wordbook-identity {
    gap: 13px;
  }

  .wordbook-object {
    width: 125px;
    height: 166px;
  }

  .wordbook-cover {
    padding: 11px 10px 10px;
  }

  .wordbook-cover-mark {
    width: 27px;
    height: 27px;
  }

  .wordbook-cover-mark svg {
    width: 16px;
    height: 16px;
  }

  .wordbook-cover-kicker {
    margin-top: 10px;
    font-size: 6px;
  }

  .wordbook-cover > strong {
    font-size: 17px;
  }

  .wordbook-cover-count {
    font-size: 8px;
  }

  .wordbook-cover-count b {
    font-size: 16px;
  }

  .wordbook-identity > p {
    font-size: 10px;
    line-height: 1.55;
  }

  .wordbook-page {
    min-height: 360px;
    padding: 18px 14px 19px;
  }

  .wordbook-page-head h2 {
    font-size: 21px;
  }

  .wordbook-entry {
    grid-template-columns: minmax(0, 1fr) 19px;
    gap: 8px;
    padding: 12px 2px 12px 5px;
  }

  .wordbook-entry-word {
    gap: 6px;
  }

  .wordbook-entry-word strong {
    font-size: 18px;
  }

  .wordbook-entry-word span {
    font-size: 9px;
  }

  .wordbook-entry-meaning {
    font-size: 11px;
  }

  .wordbook-entry-meta {
    grid-column: 1;
    gap: 16px;
    margin-top: 2px;
  }

  .wordbook-entry-meta > span {
    display: flex;
    min-width: 0;
    gap: 5px;
    align-items: baseline;
  }

  .wordbook-entry-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .wordbook-page-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .book-award {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 13px;
  }

  .book-award > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .wordbook-stamp {
    right: 18px;
    bottom: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wordbook-page.is-turning::after {
    display: none;
  }

  .word-detail-modal.is-from-book,
  .wordbook-stamp {
    animation-duration: 180ms;
  }
}

/* Compact semantic scenes: concrete objects arranged to explain one word. */
.word-visual.is-scene {
  --scene-ink: #194d46;
  --scene-accent: #d8ac2c;
  --scene-wash: #dcece5;
  min-height: 176px;
  margin-bottom: 20px;
  border: 1px solid rgba(35, 87, 79, 0.16);
  background:
    radial-gradient(circle at 18% 18%, color-mix(in srgb, var(--scene-accent) 25%, transparent), transparent 27%),
    linear-gradient(135deg, var(--scene-wash), #f3f7f4 72%);
}

.word-scene-stage {
  position: relative;
  min-height: 176px;
  overflow: hidden;
}

.word-scene-stage::before {
  position: absolute;
  inset: 0;
  background:
    repeating-radial-gradient(
      ellipse at 84% 96%,
      transparent 0 19px,
      rgba(20, 65, 60, 0.07) 20px 21px
    ),
    linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: auto, 100% 30px;
  content: "";
}

.scene-skyline {
  position: absolute;
  right: -24px;
  bottom: -42px;
  width: 220px;
  height: 150px;
  border: 1px solid rgba(25, 77, 70, 0.11);
  border-radius: 50% 50% 0 0;
  background: rgba(255, 255, 255, 0.16);
  transform: rotate(-8deg);
}

.scene-icon {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--scene-ink);
}

.scene-icon-primary {
  top: 48%;
  left: 34%;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%);
}

.scene-icon-secondary {
  top: 28%;
  right: 13%;
  width: 44px;
  height: 44px;
  color: var(--scene-accent);
}

.scene-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.35;
}

.scene-icon-secondary svg {
  stroke-width: 1.7;
}

.scene-path {
  position: absolute;
  z-index: 1;
  right: 14%;
  bottom: 35px;
  left: 18%;
  height: 1px;
  background: rgba(25, 77, 70, 0.18);
}

.scene-accent {
  position: absolute;
  z-index: 3;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--scene-accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--scene-accent) 18%, transparent);
}

.scene-accent-a {
  top: 25px;
  left: 18%;
}

.scene-accent-b {
  right: 22%;
  bottom: 43px;
  width: 5px;
  height: 5px;
}

.word-visual.is-scene figcaption {
  right: 12px;
  bottom: 10px;
  left: 12px;
  min-height: 30px;
  padding: 6px 9px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(8, 38, 37, 0.72);
}

.word-visual.is-scene figcaption span {
  font-size: 10px;
  font-weight: 700;
}

.word-visual.is-scene figcaption small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  text-align: right;
}

.scene-growth {
  --scene-ink: #1d5f4d;
  --scene-accent: #e4b830;
  --scene-wash: #dcece0;
}

.scene-growth .scene-path {
  right: 22%;
  bottom: 38px;
  left: 16%;
  height: 64px;
  border: 0;
  background: rgba(37, 106, 86, 0.15);
  clip-path: polygon(0 100%, 0 82%, 27% 82%, 27% 61%, 54% 61%, 54% 39%, 78% 39%, 78% 16%, 100% 16%, 100% 100%);
}

.scene-growth .scene-icon-primary {
  top: 45%;
  left: 28%;
}

.scene-growth .scene-icon-secondary {
  top: 26%;
  right: 12%;
}

.scene-retention {
  --scene-ink: #345c55;
  --scene-accent: #c99c31;
  --scene-wash: #eee8d7;
}

.scene-retention .scene-icon-primary {
  left: 39%;
  width: 82px;
  height: 82px;
}

.scene-retention .scene-icon-secondary {
  top: 25%;
  right: 19%;
}

.scene-retention .scene-path {
  right: 18%;
  bottom: 39px;
  left: 24%;
  height: 8px;
  border-radius: 99px;
  background: repeating-linear-gradient(90deg, rgba(50, 89, 81, 0.16) 0 18px, transparent 18px 23px);
}

.scene-support {
  --scene-ink: #2d5e59;
  --scene-accent: #c8a84c;
  --scene-wash: #e2e9e4;
}

.scene-support .scene-icon-primary {
  top: 50%;
  left: 43%;
  width: 118px;
  height: 82px;
}

.scene-support .scene-icon-secondary {
  top: 24%;
  right: 14%;
}

.scene-support .scene-path {
  right: 16%;
  bottom: 37px;
  left: 18%;
  height: 20px;
  border-bottom: 1px solid rgba(25, 77, 70, 0.16);
  border-radius: 50%;
}

.scene-viability {
  --scene-ink: #285d4c;
  --scene-accent: #e5bd3e;
  --scene-wash: #e1efe4;
}

.scene-viability .scene-icon-primary {
  top: 52%;
  left: 40%;
  width: 62px;
  height: 62px;
}

.scene-viability .scene-icon-secondary {
  top: 25%;
  right: 18%;
}

.scene-viability .scene-path {
  right: 22%;
  bottom: 47px;
  left: 26%;
  height: 26px;
  background: rgba(60, 81, 61, 0.22);
  clip-path: polygon(0 100%, 13% 45%, 23% 74%, 37% 19%, 51% 79%, 68% 28%, 82% 67%, 100% 100%);
}

.scene-state,
.scene-government,
.scene-community {
  --scene-ink: #244e51;
  --scene-accent: #d2aa3f;
  --scene-wash: #dfe9e8;
}

.scene-state .scene-icon-primary,
.scene-government .scene-icon-primary {
  left: 37%;
  width: 92px;
  height: 92px;
}

.scene-state .scene-icon-secondary,
.scene-government .scene-icon-secondary {
  top: 20%;
  right: 12%;
}

.scene-state .scene-path,
.scene-government .scene-path,
.scene-community .scene-path {
  right: 17%;
  bottom: 34px;
  left: 21%;
  height: 5px;
  border-radius: 99px;
  background: rgba(31, 77, 73, 0.16);
}

.scene-system {
  --scene-ink: #2a6259;
  --scene-accent: #88b6a5;
  --scene-wash: #dcebe6;
}

.scene-system .scene-icon-primary {
  left: 32%;
  width: 90px;
  height: 90px;
}

.scene-system .scene-icon-secondary {
  top: 24%;
  right: 15%;
  width: 61px;
  height: 61px;
  color: #547f74;
  transform: rotate(18deg);
}

.scene-system .scene-path {
  right: 18%;
  bottom: 34px;
  left: 20%;
  height: 72px;
  border: 1px dashed rgba(35, 91, 81, 0.18);
  border-radius: 50%;
  background: none;
}

.scene-program {
  --scene-ink: #244f56;
  --scene-accent: #76a9a0;
  --scene-wash: #dfe9e8;
}

.scene-program .scene-icon-primary {
  left: 35%;
  width: 102px;
  height: 88px;
}

.scene-program .scene-icon-secondary {
  top: 27%;
  right: 17%;
  width: 54px;
  height: 54px;
}

.scene-program .scene-path {
  right: 21%;
  bottom: 45px;
  left: 27%;
  height: 28px;
  border: 1px solid rgba(34, 83, 79, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
}

.scene-national,
.scene-political {
  --scene-ink: #294e4f;
  --scene-accent: #d8ad3b;
  --scene-wash: #e8e8db;
}

.scene-national .scene-icon-primary,
.scene-political .scene-icon-primary {
  left: 34%;
  width: 84px;
  height: 84px;
}

.scene-national .scene-icon-secondary,
.scene-political .scene-icon-secondary {
  top: 25%;
  right: 13%;
  width: 52px;
  height: 52px;
}

.scene-national .scene-path,
.scene-political .scene-path {
  right: 19%;
  bottom: 37px;
  left: 23%;
  height: 6px;
  border-radius: 99px;
  background: rgba(32, 75, 70, 0.14);
}

.scene-business {
  --scene-ink: #315a55;
  --scene-accent: #bd963e;
  --scene-wash: #e8e7dc;
}

.scene-business .scene-icon-primary {
  left: 35%;
  width: 84px;
  height: 84px;
}

.scene-business .scene-icon-secondary {
  top: 24%;
  right: 15%;
  width: 57px;
  height: 57px;
}

.scene-business .scene-path {
  right: 17%;
  bottom: 34px;
  left: 20%;
  height: 5px;
  border-radius: 99px;
  background: rgba(33, 76, 71, 0.16);
}

.scene-issue {
  --scene-ink: #475650;
  --scene-accent: #c29333;
  --scene-wash: #ede9df;
}

.scene-issue .scene-icon-primary {
  left: 35%;
  width: 90px;
  height: 90px;
}

.scene-issue .scene-icon-secondary {
  top: 23%;
  right: 15%;
  width: 45px;
  height: 45px;
}

.scene-issue .scene-path {
  right: 18%;
  bottom: 34px;
  left: 22%;
  height: 20px;
  background: repeating-linear-gradient(0deg, rgba(53, 75, 68, 0.16) 0 1px, transparent 1px 6px);
}

.scene-provide {
  --scene-ink: #2d5b51;
  --scene-accent: #d0a33e;
  --scene-wash: #e6ece1;
}

.scene-provide .scene-icon-primary {
  left: 32%;
  width: 94px;
  height: 94px;
}

.scene-provide .scene-icon-secondary {
  top: 25%;
  right: 15%;
  width: 53px;
  height: 53px;
}

.scene-provide .scene-path {
  right: 26%;
  bottom: 45px;
  left: 42%;
  height: 2px;
  border-radius: 99px;
  background: repeating-linear-gradient(90deg, rgba(45, 91, 79, 0.35) 0 7px, transparent 7px 12px);
}

.scene-queue {
  --scene-ink: #2b5753;
  --scene-accent: #c8a644;
  --scene-wash: #e4ebe7;
}

.scene-queue .scene-icon-primary {
  left: 30%;
  width: 78px;
  height: 78px;
}

.scene-queue .scene-icon-secondary {
  top: 27%;
  right: 16%;
  width: 57px;
  height: 57px;
}

.scene-queue .scene-path {
  right: 14%;
  bottom: 38px;
  left: 20%;
  height: 5px;
  border-radius: 99px;
  background: repeating-linear-gradient(90deg, rgba(43, 87, 82, 0.23) 0 12px, transparent 12px 18px);
}

.scene-point,
.scene-result {
  --scene-ink: #285a54;
  --scene-accent: #d8ac32;
  --scene-wash: #dfebe4;
}

.scene-point .scene-icon-primary,
.scene-result .scene-icon-primary {
  left: 32%;
  width: 76px;
  height: 76px;
}

.scene-point .scene-icon-secondary,
.scene-result .scene-icon-secondary {
  top: 22%;
  right: 14%;
  width: 58px;
  height: 58px;
}

.scene-point .scene-path,
.scene-result .scene-path {
  right: 20%;
  bottom: 40px;
  left: 24%;
  height: 5px;
  border-radius: 99px;
  background: rgba(39, 87, 80, 0.17);
}

.scene-law,
.scene-risk {
  --scene-ink: #4d5550;
  --scene-accent: #c79836;
  --scene-wash: #ebe6dc;
}

.scene-law .scene-icon-primary,
.scene-risk .scene-icon-primary {
  left: 33%;
  width: 82px;
  height: 82px;
}

.scene-law .scene-icon-secondary,
.scene-risk .scene-icon-secondary {
  top: 24%;
  right: 15%;
  width: 48px;
  height: 48px;
}

.scene-time {
  --scene-ink: #3d5755;
  --scene-accent: #c49c43;
  --scene-wash: #ebe9de;
}

.scene-time .scene-icon-primary {
  left: 34%;
  width: 82px;
  height: 82px;
}

.scene-time .scene-icon-secondary {
  top: 23%;
  right: 16%;
  width: 51px;
  height: 51px;
}

.scene-community .scene-icon-primary {
  left: 34%;
  width: 86px;
  height: 86px;
}

.scene-community .scene-icon-secondary {
  top: 24%;
  right: 15%;
  width: 55px;
  height: 55px;
}

.scene-team,
.scene-social {
  --scene-ink: #305b55;
  --scene-accent: #c8a341;
  --scene-wash: #e2ebe6;
}

.scene-team .scene-icon-primary,
.scene-social .scene-icon-primary {
  left: 33%;
  width: 89px;
  height: 89px;
}

.scene-team .scene-icon-secondary,
.scene-social .scene-icon-secondary {
  top: 24%;
  right: 15%;
  width: 51px;
  height: 51px;
}

.scene-direction,
.scene-continuation {
  --scene-ink: #2d5d56;
  --scene-accent: #d0a53c;
  --scene-wash: #dfebe5;
}

.scene-direction .scene-icon-primary,
.scene-continuation .scene-icon-primary {
  left: 34%;
  width: 92px;
  height: 92px;
}

.scene-direction .scene-icon-secondary,
.scene-continuation .scene-icon-secondary {
  top: 23%;
  right: 14%;
  width: 46px;
  height: 46px;
}

.scene-inclusion {
  --scene-ink: #3c5e58;
  --scene-accent: #bfa347;
  --scene-wash: #e5ebe6;
}

.scene-creation {
  --scene-ink: #32584f;
  --scene-accent: #e0b439;
  --scene-wash: #e8ede0;
}

.scene-idea {
  --scene-ink: #315a55;
  --scene-accent: #d3ab45;
  --scene-wash: #e3ebe7;
}

@media (max-width: 760px) {
  .word-visual.is-scene,
  .word-scene-stage {
    min-height: 164px;
  }

  .scene-icon-primary {
    width: 64px;
    height: 64px;
  }

  .scene-icon-secondary {
    width: 40px;
    height: 40px;
  }

  .word-visual.is-scene figcaption {
    align-items: center;
    flex-direction: row;
    gap: 10px;
  }

  .word-visual.is-scene figcaption small {
    font-size: 8px;
  }
}

/* Learning-card choices and the optional image / example layers. */
.study-style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.study-style-choice {
  min-height: 176px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(251, 253, 252, 0.82);
  text-align: left;
  transition:
    transform 140ms var(--ease-out),
    border-color 180ms ease,
    background-color 180ms ease;
}

.study-style-choice:active {
  transform: scale(0.985);
}

.study-style-choice.is-selected {
  border-color: #255f57;
  background: #f2faf6;
  box-shadow:
    inset 0 0 0 1px #255f57,
    0 7px 18px rgba(13, 51, 48, 0.075);
}

.study-style-choice > strong,
.study-style-choice > small {
  display: block;
}

.study-style-choice > strong {
  margin-top: 11px;
  font-size: 13px;
}

.study-style-choice > small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.study-style-preview {
  position: relative;
  display: block;
  height: 77px;
  overflow: hidden;
  border: 1px solid #d8e3df;
  border-radius: 10px;
  background:
    linear-gradient(rgba(26, 73, 67, 0.035) 1px, transparent 1px),
    #fbfdfc;
  background-size: 100% 19px;
}

.study-style-preview i {
  position: absolute;
  display: block;
  font-style: normal;
}

.study-style-preview .preview-word {
  top: 10px;
  left: 12px;
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.study-style-preview .preview-image {
  right: 10px;
  bottom: 9px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px 12px 12px 4px;
  color: #f7f3e7;
  background:
    radial-gradient(circle at 25% 20%, rgba(238, 214, 108, 0.28), transparent 34%),
    #184a44;
}

.study-style-preview .preview-image svg {
  width: 20px;
  height: 20px;
}

.study-style-preview .preview-example {
  bottom: 26px;
  left: 12px;
  width: 52%;
  height: 4px;
  border-radius: 99px;
  background: #c6d7d1;
}

.study-style-preview .preview-example.is-short {
  bottom: 16px;
  width: 39%;
  background: #dfe9e5;
}

.study-style-preview .preview-meaning {
  bottom: 19px;
  left: 12px;
  width: 58%;
  height: 7px;
  border-radius: 99px;
  background: #b7d5ca;
}

.study-style-preview .preview-collocation {
  bottom: 20px;
  left: 12px;
  width: 31%;
  height: 12px;
  border: 1px solid #b9d4ca;
  border-radius: 99px;
  background: #f4faf7;
}

.study-style-preview .preview-collocation.is-short {
  bottom: 20px;
  left: 40%;
  width: 28%;
}

.study-style-preview .preview-example.is-single {
  bottom: 40px;
}

.study-style-preview.is-image .preview-image,
.study-style-preview.is-rich .preview-image {
  top: 25px;
  right: 13px;
  bottom: auto;
  width: 43px;
  height: 43px;
}

.settings-study-style-grid {
  margin-top: 11px;
}

.settings-study-style-grid .study-style-choice {
  min-height: 160px;
}

.recall-preference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 17px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(251, 253, 252, 0.72);
}

.speech-preference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 17px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(251, 253, 252, 0.72);
}

.speech-preference > div:first-child {
  display: grid;
  gap: 4px;
}

.speech-preference strong {
  color: var(--ink-deep);
  font-size: 13px;
}

.speech-preference span {
  color: var(--ink-soft);
  font-size: 11px;
}

.speech-preference-options {
  flex: 0 0 auto;
  grid-template-columns: repeat(3, auto);
}

.recall-preference > div:first-child {
  display: grid;
  gap: 4px;
}

.recall-preference strong {
  color: var(--ink-deep);
  font-size: 13px;
}

.recall-preference span {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.recall-preference-options {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.recall-preference-options button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  background: var(--card);
  font-size: 11px;
}

.recall-preference-options button.is-selected {
  color: #fff;
  border-color: var(--ink-deep);
  background: var(--ink-deep);
}

.setting-help {
  margin: -3px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.word-visual {
  --visual-accent: #eed66c;
  --visual-wash: #dbece5;
  position: relative;
  display: grid;
  width: 100%;
  min-height: 126px;
  margin: 0 0 20px;
  overflow: hidden;
  border-radius: 15px;
  background:
    radial-gradient(circle at 20% 20%, rgba(238, 214, 108, 0.2), transparent 34%),
    linear-gradient(135deg, #dcece5, #eef4f0);
}

.word-visual.is-semantic {
  min-height: 168px;
  margin-bottom: 20px;
  border: 1px solid rgba(31, 83, 77, 0.16);
  background:
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--visual-accent) 34%, transparent), transparent 30%),
    radial-gradient(circle at 87% 82%, rgba(255, 255, 255, 0.64), transparent 32%),
    linear-gradient(135deg, var(--visual-wash), #eff6f2);
}

.word-visual.is-photo {
  min-height: 190px;
  margin-bottom: 20px;
  border: 1px solid rgba(31, 83, 77, 0.16);
  background:
    radial-gradient(circle at 22% 18%, rgba(238, 214, 108, 0.16), transparent 32%),
    linear-gradient(135deg, #dbe9e3, #eff4f1);
}

.word-visual.is-photo > img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  animation: word-photo-in 420ms var(--ease-out) both;
}

.word-visual.is-photo .word-visual-loading {
  min-height: 190px;
}

.word-visual.is-photo figcaption {
  gap: 16px;
  background:
    linear-gradient(90deg, rgba(8, 34, 35, 0.79), rgba(8, 34, 35, 0.61));
}

.word-visual.is-photo figcaption > span:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.word-visual-credit {
  display: inline-flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  overflow: visible;
  white-space: normal;
}

.word-visual-credit a {
  max-width: 195px;
}

.word-visual-credit button {
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 9px;
  white-space: nowrap;
}

.word-visual-credit button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.word-visual.is-failed {
  min-height: 176px;
  border-style: dashed;
  background: rgba(238, 244, 241, 0.8);
}

.word-visual.is-failed .word-visual-empty {
  min-height: 176px;
}

.word-visual-empty button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  font-size: 10px;
}

@keyframes word-photo-in {
  from {
    opacity: 0;
    transform: scale(1.018);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.word-visual.is-semantic::before {
  position: absolute;
  inset: 0;
  background:
    repeating-radial-gradient(
      ellipse at 82% 92%,
      transparent 0 18px,
      rgba(20, 67, 62, 0.075) 19px 20px
    ),
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: auto, 100% 29px;
  content: "";
  pointer-events: none;
}

.word-visual-canvas {
  position: relative;
  min-height: 168px;
}

.visual-orbit {
  position: absolute;
  border: 1px solid rgba(20, 70, 64, 0.15);
  border-radius: 50%;
}

.visual-orbit.is-large {
  top: 24px;
  left: 50%;
  width: 112px;
  height: 112px;
  transform: translateX(-50%);
}

.visual-orbit.is-small {
  top: 45px;
  left: 50%;
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-50%);
}

.visual-glyph {
  position: absolute;
  top: 43px;
  left: 50%;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 23px 23px 23px 7px;
  color: #f9f5e8;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.18), transparent 32%),
    color-mix(in srgb, #1d5d55 74%, var(--visual-accent));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 24px rgba(25, 66, 61, 0.18);
  transform: translateX(-50%);
}

.visual-glyph svg {
  width: 37px;
  height: 37px;
  stroke-width: 1.35;
}

.visual-dot {
  position: absolute;
  border-radius: 50%;
  background: var(--visual-accent);
  box-shadow: 0 0 0 5px rgba(238, 214, 108, 0.13);
}

.visual-dot.is-one {
  top: 28px;
  left: calc(50% + 63px);
  width: 8px;
  height: 8px;
}

.visual-dot.is-two {
  bottom: 38px;
  left: calc(50% - 72px);
  width: 5px;
  height: 5px;
}

.word-visual.is-semantic figcaption {
  right: 12px;
  bottom: 11px;
  left: 12px;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(8, 38, 37, 0.68);
}

.word-visual.is-semantic figcaption small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-visual.concept-growth,
.word-visual.concept-learning {
  --visual-accent: #eed66c;
  --visual-wash: #d9ebe2;
}

.word-visual.concept-stability,
.word-visual.concept-time {
  --visual-accent: #d7c68e;
  --visual-wash: #e9e4d2;
}

.word-visual.concept-mind,
.word-visual.concept-direction {
  --visual-accent: #9bcbbd;
  --visual-wash: #dcece7;
}

.word-visual.concept-people,
.word-visual.concept-communication {
  --visual-accent: #a9c4dd;
  --visual-wash: #dfeaf2;
}

.word-visual.concept-nature {
  --visual-accent: #b5d78c;
  --visual-wash: #e4efd9;
}

.word-visual.concept-rules,
.word-visual.concept-economy {
  --visual-accent: #d3b16f;
  --visual-wash: #eee5d7;
}

.word-visual.concept-risk {
  --visual-accent: #d1a9a2;
  --visual-wash: #eee1de;
}

.word-visual.concept-change {
  --visual-accent: #b6b6d8;
  --visual-wash: #e7e6f0;
}

.word-visual img {
  width: 100%;
  max-height: 210px;
  object-fit: cover;
}

.word-visual figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: #fff;
  background: rgba(8, 34, 35, 0.66);
  backdrop-filter: blur(12px) saturate(130%);
}

.word-visual figcaption span,
.word-visual figcaption a {
  overflow: hidden;
  font-size: 9px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-visual figcaption a {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.word-visual-loading,
.word-visual-empty {
  display: flex;
  min-height: 126px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 11px;
}

.word-visual-loading i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  animation: search-pulse 700ms ease-in-out infinite alternate;
}

.word-visual-empty {
  flex-direction: column;
}

.word-visual-empty span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
}

.word-visual-empty svg {
  width: 18px;
  height: 18px;
}

.word-visual-empty p {
  margin: 0;
}

.word-example-block {
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid rgba(201, 216, 212, 0.65);
}

.word-collocations {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(194, 215, 208, 0.82);
  border-radius: 10px;
  background: rgba(245, 250, 247, 0.78);
}

.word-collocation-label {
  color: #6e817b;
  font-size: 10px;
  font-weight: 700;
}

.word-collocation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.word-collocation-list > span:not(.collocation-loading):not(.collocation-empty) {
  padding: 5px 9px;
  border-radius: 999px;
  color: #285d55;
  background: #e0eee8;
  font-family: var(--font-reading);
  font-size: 12px;
}

.cloze-card {
  width: min(100%, 620px);
  margin: 20px auto 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(251, 253, 252, 0.84);
}

.cloze-card.is-correct {
  border-color: #9dcabd;
  background: #f2faf6;
}

.cloze-card.is-wrong {
  border-color: #d9b4aa;
  background: #fff8f5;
}

.cloze-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.cloze-heading span {
  color: var(--ink-deep);
  font-size: 12px;
  font-weight: 800;
}

.cloze-heading small {
  color: var(--ink-soft);
  font-size: 9px;
}

.cloze-card > p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.cloze-sentence {
  color: var(--ink) !important;
  font-family: var(--font-reading);
  font-size: 16px !important;
  line-height: 1.6;
}

.cloze-answer-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.cloze-answer-row input {
  min-width: 0;
  min-height: 40px;
  flex: 1;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #fff;
  font-family: var(--font-reading);
  font-size: 15px;
}

.cloze-answer-row input:focus {
  border-color: var(--green);
}

.cloze-answer-row button:disabled {
  opacity: 0.45;
  cursor: default;
}

.cloze-feedback {
  color: var(--ink) !important;
  font-size: 12px !important;
}

.cloze-feedback strong {
  color: var(--orange);
}

.collocation-loading,
.collocation-empty {
  color: var(--ink-soft);
  font-size: 10px;
}

.word-example-primary .example {
  margin-top: 0;
}

.word-example-placeholder {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.word-example-more {
  margin-top: 10px;
  padding: 0;
  color: #2d665e;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.word-example-more:hover {
  color: var(--ink-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.word-example-extra {
  margin-top: 12px;
  padding: 11px 13px;
  border-left: 2px solid #a9c9c0;
  color: var(--ink);
  background: rgba(237, 245, 241, 0.72);
}

.word-example-extra p {
  margin: 6px 0 0;
  font-family: var(--font-reading);
  font-size: 12px;
  line-height: 1.6;
}

.word-example-extra .word-example-label,
.word-example-extra .word-example-unavailable {
  margin-top: 0;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 10px;
}

.word-example-extra > a,
.dictionary-inline-source {
  display: inline-block;
  margin-top: 9px;
  color: #648078;
  font-family: var(--font-ui);
  font-size: 9px;
  text-decoration: none;
}

.word-example-extra > a:hover,
.dictionary-inline-source:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.example-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 10px;
}

.example-loading i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: search-pulse 700ms ease-in-out infinite alternate;
}

/* The lookup entry opens as a compact dictionary page. */
.dictionary-modal {
  width: min(calc(100% - 30px), 860px);
  padding: 30px;
}

.dictionary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-right: 40px;
}

.dictionary-head .word-detail-title {
  justify-content: flex-start;
}

.dictionary-head .word-detail-title h2 {
  font-size: clamp(42px, 6vw, 64px);
  letter-spacing: -0.035em;
  line-height: 1;
}

.dictionary-head .word-detail-phonetic {
  margin-top: 8px;
  font-size: 15px;
}

.dictionary-personal {
  display: grid;
  flex: 0 0 auto;
  gap: 4px;
  padding: 11px 13px;
  border: 1px solid #d9cfac;
  border-radius: 10px;
  background: #fff9e6;
  text-align: right;
}

.dictionary-personal span {
  color: #7d755d;
  font-size: 10px;
}

.dictionary-personal strong {
  color: #4d472f;
  font-size: 11px;
}

.dictionary-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 13px;
  margin-top: 22px;
  padding: 15px 17px;
  border-left: 4px solid var(--green);
  background: #e8f3ee;
}

.dictionary-summary span {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 12px;
  font-style: italic;
}

.dictionary-summary p {
  margin: 0;
  color: var(--ink-deep);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
}

.dictionary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.75fr);
  gap: 26px;
  margin-top: 22px;
}

.dictionary-main {
  min-width: 0;
}

.dictionary-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.dictionary-section + .dictionary-section {
  margin-top: 24px;
  padding-top: 21px;
  border-top: 1px solid var(--line-soft);
}

.dictionary-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.dictionary-section-title h3 {
  margin: 0;
  color: var(--ink-deep);
  font-size: 15px;
}

.dictionary-section-title span {
  color: #8a9994;
  font-size: 9px;
}

.dictionary-definitions,
.dictionary-meanings ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
}

.dictionary-definitions li,
.dictionary-meanings li {
  padding-left: 3px;
  font-size: 12px;
  line-height: 1.66;
}

.dictionary-translations {
  display: grid;
  gap: 5px;
}

.dictionary-translations p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.65;
}

.dictionary-forms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dictionary-forms > span {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--paper);
}

.dictionary-forms small {
  color: var(--ink-soft);
  font-size: 8px;
}

.dictionary-forms strong {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
}

.dictionary-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}

.dictionary-labels span {
  padding: 4px 7px;
  border-radius: 999px;
  color: #735c22;
  background: #f7f0d8;
  font-size: 9px;
}

.dictionary-meanings {
  display: grid;
  gap: 13px;
}

.dictionary-meanings article > strong {
  display: block;
  margin-bottom: 6px;
  color: #2d665e;
  font-family: var(--font-display);
  font-size: 12px;
  font-style: italic;
}

.dictionary-examples {
  display: grid;
  gap: 9px;
}

.dictionary-examples p {
  margin: 0;
  padding-left: 13px;
  border-left: 2px solid #b7cec6;
  color: var(--ink);
  font-family: var(--font-reading);
  font-size: 12px;
  line-height: 1.65;
}

.dictionary-relations {
  display: grid;
  gap: 7px;
}

.dictionary-relations p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.dictionary-relations p > span {
  min-width: 32px;
  color: var(--ink-soft);
  font-size: 9px;
}

.dictionary-relations em {
  padding: 4px 7px;
  border-radius: 999px;
  color: #405c57;
  background: #edf4f1;
  font-size: 10px;
  font-style: normal;
}

.dictionary-side-note,
.dictionary-online,
.dictionary-source-note {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(237, 243, 240, 0.68);
}

.dictionary-side-note {
  display: grid;
  gap: 5px;
}

.dictionary-side-note span,
.dictionary-source-note > span {
  color: var(--ink-soft);
  font-size: 9px;
}

.dictionary-side-note strong {
  color: var(--ink);
  font-size: 12px;
}

.dictionary-side-note small {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.dictionary-online-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
}

.dictionary-online-label span {
  color: var(--ink-deep);
  font-size: 12px;
  font-weight: 700;
}

.dictionary-online-label small {
  color: var(--ink-soft);
  font-size: 8px;
}

.dictionary-online .dictionary-section {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.dictionary-online .dictionary-section-title h3 {
  font-size: 12px;
}

.dictionary-online .dictionary-definitions li,
.dictionary-online .dictionary-examples p {
  font-size: 11px;
  line-height: 1.62;
}

.dictionary-loading {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-soft);
}

.dictionary-loading i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: search-pulse 700ms ease-in-out infinite alternate;
}

.dictionary-loading p,
.dictionary-muted {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.6;
}

.dictionary-source-note {
  display: grid;
  gap: 5px;
}

.dictionary-source-note a {
  color: #356b63;
  font-size: 10px;
  text-decoration: none;
}

.dictionary-source-note a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dictionary-modal .word-detail-foot {
  margin-top: 24px;
}

@media (max-width: 760px) {
  .study-style-grid {
    gap: 8px;
  }

  .study-style-choice {
    min-height: 165px;
    padding: 8px;
  }

  .study-style-preview {
    height: 68px;
  }

  .word-visual.is-semantic,
  .word-visual-canvas {
    min-height: 154px;
  }

  .word-visual.is-photo,
  .word-visual.is-photo .word-visual-loading {
    min-height: 174px;
  }

  .word-visual.is-photo > img {
    height: 190px;
  }

  .word-visual.is-photo figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .recall-preference {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .speech-preference {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .speech-preference-options {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

  .recall-preference-options {
    width: 100%;
  }

  .recall-preference-options button {
    flex: 1;
  }

  .word-visual.is-photo figcaption > span:first-child {
    width: 100%;
  }

  .word-visual-credit {
    width: 100%;
    justify-content: space-between;
  }

  .visual-orbit.is-large {
    top: 19px;
  }

  .visual-orbit.is-small {
    top: 40px;
  }

  .visual-glyph {
    top: 38px;
  }

  .dictionary-modal {
    padding: 24px 20px;
  }

  .dictionary-head {
    padding-right: 33px;
  }

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

  .dictionary-side {
    grid-template-columns: 1fr 1fr;
  }

  .dictionary-source-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .study-style-choice {
    min-height: 154px;
  }

  .study-style-choice > strong {
    font-size: 12px;
  }

  .study-style-choice > small {
    font-size: 9px;
  }

  .study-style-preview .preview-word {
    font-size: 13px;
  }

  .dictionary-modal {
    width: calc(100% - 18px);
    max-height: calc(100vh - 18px);
    margin: 9px auto;
    padding: 22px 16px;
    border-radius: 16px;
  }

  .dictionary-head {
    display: grid;
    gap: 15px;
    padding-right: 34px;
  }

  .dictionary-head .word-detail-title h2 {
    font-size: 43px;
  }

  .dictionary-personal {
    width: 100%;
    grid-template-columns: 1fr auto;
    text-align: left;
  }

  .dictionary-summary {
    grid-template-columns: 1fr;
    gap: 5px;
    margin-top: 17px;
  }

  .dictionary-summary p {
    font-size: 16px;
  }

  .dictionary-side {
    grid-template-columns: 1fr;
  }

  .dictionary-source-note {
    grid-column: auto;
  }

  .dictionary-modal .word-detail-foot {
    align-items: flex-start;
    flex-direction: column;
  }
}

.word-note-editor {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #d9cfad;
  border-radius: 13px;
  background:
    linear-gradient(rgba(123, 105, 63, 0.045) 1px, transparent 1px),
    #fffaf0;
  background-size: 100% 25px;
}

.word-note-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.word-note-head > div {
  display: grid;
  gap: 3px;
}

.word-note-head strong {
  color: var(--ink-deep);
  font-size: 14px;
}

.word-note-head span,
.word-note-head small {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.word-note-head small {
  flex: 0 0 auto;
}

.word-note-editor textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid #d8ceb6;
  border-radius: 9px;
  outline: none;
  background: rgba(255, 255, 255, 0.64);
  font-family: var(--font-reading);
  font-size: 13px;
  line-height: 1.65;
}

.word-note-editor textarea:focus {
  border-color: #9f8543;
  background: #fff;
}

.word-note-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.word-note-actions span {
  color: #81775f;
  font-size: 10px;
}

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

.inline-note-toggle {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #d8ceb6;
  border-radius: 999px;
  color: #715b29;
  background: #fff9e8;
  font-size: 11px;
  font-weight: 700;
}

.inline-note-toggle svg {
  width: 15px;
  height: 15px;
}

.inline-note-toggle:hover {
  border-color: #bca55f;
  background: #fffdf7;
}

.inline-note-panel {
  display: grid;
  gap: 9px;
  margin-top: 9px;
  padding: 13px;
  border: 1px solid #ddd2b4;
  border-radius: 11px;
  background:
    linear-gradient(rgba(122, 102, 57, 0.045) 1px, transparent 1px),
    #fffbf0;
  background-size: 100% 24px;
}

.inline-note-panel[hidden] {
  display: none;
}

.inline-note-panel textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  padding: 10px;
  border: 1px solid #d8cfb9;
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.7);
  font-family: var(--font-reading);
  font-size: 13px;
  line-height: 1.65;
}

.inline-note-panel textarea:focus {
  border-color: #ac8e42;
  background: #fff;
}

.inline-note-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inline-note-actions small {
  color: #7b755f;
  font-size: 10px;
}

@media (max-width: 580px) {
  .word-note-head,
  .word-note-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .word-note-head small {
    flex: auto;
  }

  .word-note-actions button {
    width: 100%;
  }

  .inline-note-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .inline-note-actions button {
    width: 100%;
  }
}

/* Reading-focused example layout: fewer sentences, more space between them. */
.word-example-block {
  margin-top: 21px;
  padding-top: 17px;
}

.word-example-primary .example {
  margin-top: 0;
  font-size: 20px;
  line-height: 1.8;
}

.word-example-primary .translation {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
}

.word-example-more {
  margin-top: 15px;
  font-size: 12px;
}

.word-example-extra {
  margin-top: 17px;
  padding: 16px 18px;
}

.word-example-extra p {
  margin-top: 0;
  font-size: 17px;
  line-height: 1.8;
}

.word-example-extra p + p {
  margin-top: 20px;
}

.word-example-extra .word-example-label {
  margin-bottom: 16px;
  font-size: 11px;
}

@media (max-width: 580px) {
  .word-example-primary .example {
    font-size: 18px;
    line-height: 1.75;
  }

  .word-example-primary .translation {
    font-size: 13px;
  }

  .word-example-extra {
    padding: 14px 15px;
  }

  .word-example-extra p {
    font-size: 16px;
    line-height: 1.75;
  }
}

.segmented {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 9px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-deep);
}

.segmented button {
  min-height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    transform 130ms var(--ease-out),
    box-shadow 150ms ease;
}

.segmented button:hover {
  color: var(--ink-deep);
  background: rgba(255, 255, 255, 0.48);
}

.segmented button.is-selected {
  color: #fff;
  background: var(--ink-deep);
  box-shadow: 0 5px 13px rgba(14, 49, 49, 0.15);
}

.segmented button:active {
  transform: scale(0.975);
}

.setting-current {
  margin: 9px 0 0;
  color: #38675f;
  font-size: 11px;
  font-weight: 700;
}

.speech-preference .speech-preference-options {
  width: min(330px, 48%);
  flex: 0 0 auto;
  margin-top: 0;
}

@media (max-width: 760px) {
  .speech-preference .speech-preference-options {
    width: 100%;
  }
}

/* Make the wordbook entry read as a primary destination, not a status chip. */
.wordbook-status {
  min-width: 224px;
  gap: 10px;
  padding: 6px 9px 6px 7px;
  border-color: rgba(222, 192, 98, 0.52);
  color: #f9f5e9;
  background:
    radial-gradient(circle at 90% 12%, rgba(238, 214, 108, 0.16), transparent 28%),
    linear-gradient(145deg, #123f3e, #082e33);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 20px rgba(8, 41, 43, 0.17);
}

.wordbook-status-icon {
  width: 41px;
  height: 46px;
  flex-basis: 41px;
}

.wordbook-status-icon::before {
  inset: 5px 0 2px 7px;
  background: repeating-linear-gradient(
    to bottom,
    #fffaf0 0 2px,
    #e3d7ba 2px 3px
  );
}

.wordbook-status-icon i {
  inset: 0 5px 5px 0;
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 255, 255, 0.32), transparent 24%),
    linear-gradient(145deg, #f1d166, #c49b2c);
  box-shadow:
    inset 3px 0 0 rgba(104, 76, 12, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.wordbook-status-icon i::after {
  border-color: rgba(18, 63, 62, 0.62);
}

.wordbook-status-copy > span {
  color: rgba(255, 248, 228, 0.67);
  font-size: 10px;
}

.wordbook-status-copy strong {
  color: #fffdf5;
  font-size: 16px;
}

.wordbook-status-copy strong em {
  color: rgba(255, 248, 228, 0.65);
  font-size: 10px;
}

.wordbook-status-copy small {
  color: #e8ce79;
  font-size: 9px;
}

.wordbook-status-arrow {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 50%;
  color: #173f3c;
  background: #eed66c;
}

.wordbook-status-arrow svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
}

@media (hover: hover) and (pointer: fine) {
  .wordbook-status:hover {
    border-color: rgba(242, 214, 110, 0.76);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 11px 25px rgba(8, 41, 43, 0.23);
    transform: translateY(-1px);
  }
}

@media (max-width: 760px) {
  .wordbook-status {
    min-width: 0;
    gap: 7px;
  }

  .wordbook-status-copy > span {
    display: block;
  }

  .wordbook-status-icon {
    width: 35px;
    height: 41px;
    flex-basis: 35px;
  }

  .wordbook-status-arrow {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }
}

@media (max-width: 380px) {
  .wordbook-status-copy small {
    display: none;
  }

  .wordbook-status-copy strong {
    font-size: 14px;
  }

  .wordbook-status-icon {
    width: 31px;
    height: 37px;
    flex-basis: 31px;
  }
}

/* Portrait phone layout: keep the hierarchy, reduce desktop-scale breathing room. */
@media (max-width: 640px) {
  .workspace {
    padding: 14px 14px calc(94px + env(safe-area-inset-bottom));
  }

  .workspace-top {
    align-items: flex-start;
    gap: 8px;
    font-size: 11px;
    line-height: 1.4;
  }

  .workspace-top-actions {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 6px;
  }

  .wordbook-status {
    min-height: 54px;
    padding: 6px 8px;
  }

  .wordbook-status-copy > span {
    font-size: 9px;
  }

  .wordbook-status-copy strong {
    font-size: 14px;
  }

  .wordbook-status-copy small {
    font-size: 8px;
  }

  .exam-glance {
    min-height: 32px;
    gap: 5px;
    padding: 5px 8px;
    font-size: 10px;
    white-space: nowrap;
  }

  .page {
    padding-top: 27px;
  }

  .eyebrow {
    margin-bottom: 9px;
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .home-intro h1 {
    max-width: 100%;
    font-size: clamp(27px, 7.4vw, 30px);
    letter-spacing: -0.035em;
    line-height: 1.2;
    text-wrap: balance;
  }

  .home-intro h1 span {
    font-size: 0.74em;
  }

  .status-line {
    min-height: 31px;
    margin-top: 12px;
    padding: 6px 10px;
    font-size: 11px;
  }

  .mastery-hero {
    margin-top: 21px;
    padding: 20px 0;
  }

  .mastery-primary {
    gap: 7px;
  }

  .mastery-primary .tiny-label {
    margin-top: -31px;
  }

  .mastery-primary strong {
    font-size: clamp(58px, 18vw, 70px);
    letter-spacing: -0.06em;
  }

  .mastery-unit {
    font-size: 13px;
  }

  .mastery-secondary {
    margin-top: 15px;
    padding-bottom: 0;
  }

  .mastery-secondary > p {
    font-size: 14px;
    line-height: 1.65;
  }

  .mastery-footnotes {
    gap: 14px;
    margin-top: 12px;
    font-size: 11px;
  }

  .mastery-footnotes strong {
    font-size: 14px;
  }

  .today-card {
    margin-top: 19px;
    padding: 17px 14px;
    border-radius: 4px 17px 4px 4px;
  }

  .section-head,
  .panel-head {
    gap: 12px;
  }

  .section-head h2,
  .panel-head h2 {
    font-size: 20px;
    line-height: 1.3;
  }

  .tiny-label {
    font-size: 9px;
  }

  .task-row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    padding: 13px 11px;
  }

  .task-symbol {
    width: 40px;
    height: 40px;
  }

  .task-copy strong {
    font-size: 14px;
    line-height: 1.45;
  }

  .task-copy span,
  .task-note {
    font-size: 11.5px;
    line-height: 1.58;
  }

  .page-heading {
    gap: 10px;
  }

  .page-heading h1 {
    font-size: clamp(27px, 7.3vw, 30px);
    line-height: 1.2;
    text-wrap: balance;
  }

  .page-heading > div > p:last-child,
  .advisor-heading > div > p:last-child {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.65;
  }

  .panel {
    padding: 16px 13px;
    border-radius: 15px;
  }

  .panel-note,
  .empty-list {
    font-size: 11px;
  }

  .small-search {
    height: 39px;
  }

  .small-search input {
    font-size: 12px;
  }

  .growth-numbers strong {
    font-size: 26px;
  }

  .growth-number-primary strong {
    font-size: 36px;
  }

  .word-list-row {
    padding: 12px;
  }

  .word-line strong {
    font-size: 18px;
  }

  .word-list-row p {
    font-size: 11.5px;
    line-height: 1.55;
  }

  .focus-shell {
    min-height: 100svh;
    padding: 12px 12px calc(18px + env(safe-area-inset-bottom));
  }

  .focus-top {
    font-size: 11px;
  }

  .focus-exit {
    gap: 4px;
    padding: 5px 0;
    font-size: 11px;
  }

  .focus-examline {
    margin-top: 2px;
    font-size: 10px;
    line-height: 1.45;
  }

  .focus-level {
    margin-left: 4px;
    padding: 2px 6px;
    font-size: 9px;
  }

  .focus-progress {
    height: 2px;
    margin-top: 10px;
  }

  .study-stage {
    width: 100%;
    margin-top: 17px;
  }

  .study-meta {
    gap: 5px;
    margin-bottom: 9px;
  }

  .study-meta span {
    padding: 4px 7px;
    font-size: 9px;
  }

  .word-card-v2 {
    min-height: 0;
    padding: 21px 16px 18px;
    border-radius: 17px;
    background-size: 20px 20px;
  }

  .word-heading {
    gap: 7px;
  }

  .word-heading h1 {
    max-width: calc(100% - 38px);
    font-size: clamp(31px, 9.5vw, 38px);
    line-height: 1.08;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
  }

  .sound-button-large {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
  }

  .word-pronunciation-row,
  .dictionary-pronunciation-row {
    min-height: 30px;
    gap: 7px;
    margin-top: 2px;
  }

  .word-pronunciation-row .word-phonetic,
  .dictionary-pronunciation-row .word-detail-phonetic {
    font-size: 12px;
  }

  .pronunciation-actions {
    gap: 4px;
  }

  .pronunciation-button {
    min-height: 28px;
    gap: 4px;
    padding: 0 7px;
    font-size: 9px;
  }

  .pronunciation-button svg {
    width: 12px;
    height: 12px;
  }

  .recall-space {
    min-height: 106px;
    margin-top: 17px;
  }

  .recall-space span {
    font-size: 27px;
  }

  .recall-space p {
    margin-top: 5px;
    font-size: 10px;
  }

  .word-reveal {
    min-height: 0;
    margin-top: 17px;
    padding-top: 17px;
  }

  .definition {
    font-size: 18px;
    line-height: 1.5;
  }

  .definition span {
    margin-right: 5px;
    font-size: 11px;
  }

  .word-collocations {
    gap: 6px;
    margin-top: 12px;
    padding: 10px 11px;
    border-radius: 9px;
  }

  .word-collocation-label {
    font-size: 10px;
  }

  .word-collocation-list {
    gap: 5px;
  }

  .word-collocation-list > span:not(.collocation-loading):not(.collocation-empty) {
    padding: 4px 8px;
    font-size: 11px;
  }

  .word-example-block {
    margin-top: 15px;
    padding-top: 13px;
  }

  .word-example-primary .example {
    font-size: 16px;
    line-height: 1.72;
  }

  .word-example-primary .translation {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.65;
  }

  .word-example-more {
    margin-top: 10px;
    font-size: 11px;
  }

  .word-example-extra {
    margin-top: 13px;
    padding: 12px 13px;
  }

  .word-example-extra .word-example-label {
    margin-bottom: 11px;
    font-size: 10px;
  }

  .word-example-extra p {
    font-size: 14px;
    line-height: 1.72;
  }

  .word-example-extra p + p {
    margin-top: 15px;
  }

  .word-example-extra > a,
  .dictionary-inline-source {
    margin-top: 7px;
    font-size: 9px;
  }

  .inline-note {
    margin-top: 12px;
  }

  .inline-note-toggle {
    min-height: 32px;
    padding: 0 10px;
    font-size: 10px;
  }

  .inline-note-panel {
    padding: 11px;
  }

  .inline-note-panel textarea {
    min-height: 70px;
    font-size: 13px;
    line-height: 1.6;
  }

  .study-actions {
    margin-top: 14px;
  }

  .study-actions > p {
    margin-bottom: 8px;
    font-size: 11px;
  }

  .rating-row {
    gap: 6px;
  }

  .rating-row button {
    min-height: 53px;
    padding: 5px 3px;
    border-radius: 10px;
  }

  .rating-row strong {
    font-size: 12px;
  }

  .rating-row span {
    margin-top: 3px;
    font-size: 9.5px;
    line-height: 1.35;
  }

  .verify-stage {
    width: 100%;
    margin-top: 17px;
    padding: 21px 14px;
    border-radius: 17px;
  }

  .verify-kicker {
    margin-bottom: 14px;
    font-size: 10px;
  }

  .verify-stage h1 {
    font-size: clamp(31px, 9.5vw, 37px);
    overflow-wrap: anywhere;
  }

  .verify-phonetic {
    margin: 4px 0 17px;
    font-size: 12px;
  }

  .verify-options {
    gap: 7px;
  }

  .verify-options button {
    min-height: 50px;
    gap: 8px;
    padding: 9px 11px;
    font-size: 13px;
    line-height: 1.45;
  }

  .verify-options button > span {
    min-width: 30px;
    font-size: 11px;
  }

  .verify-footer {
    margin-top: 14px;
    padding-top: 12px;
  }

  .verify-footer p {
    font-size: 11px;
    line-height: 1.5;
  }

  .cloze-card {
    margin-top: 14px;
    padding: 13px 12px;
  }

  .cloze-heading span {
    font-size: 12px;
  }

  .cloze-heading small,
  .cloze-card > p {
    font-size: 10px;
  }

  .cloze-sentence {
    font-size: 15px !important;
    line-height: 1.6;
  }

  .cloze-answer-row {
    gap: 6px;
    margin-top: 10px;
  }

  .cloze-answer-row input {
    min-height: 39px;
    font-size: 14px;
  }

  .study-result {
    margin-top: 15px;
  }

  .result-seal {
    width: 55px;
    height: 55px;
    margin-bottom: 18px;
    box-shadow: 0 0 0 8px rgba(240, 203, 112, 0.15);
  }

  .study-result h1 {
    font-size: clamp(27px, 7.4vw, 31px);
  }

  .result-lead {
    margin: 10px auto 18px;
    font-size: 12px;
    line-height: 1.65;
  }

  .result-count {
    gap: 7px;
    padding: 18px 14px;
    border-radius: 15px;
  }

  .result-count strong {
    font-size: 45px;
  }

  .result-count span,
  .result-count small,
  .result-meta {
    font-size: 11px;
  }

  .result-meta {
    gap: 8px 15px;
    margin: 14px 0 18px;
  }

  .result-meta strong {
    font-size: 13px;
  }

  .xp-award {
    gap: 11px;
    margin-top: 14px;
    padding: 14px;
  }

  .xp-level > div:first-child strong {
    font-size: 14px;
  }

  .tomorrow-question {
    gap: 11px;
    padding: 14px;
  }

  .tomorrow-question strong {
    font-size: 13px;
  }

  .tomorrow-question span {
    font-size: 10px;
    line-height: 1.45;
  }

  .tomorrow-options button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 10px;
  }

  .result-actions {
    margin-top: 16px;
  }

  .wordbook-layout {
    gap: 14px;
    margin-top: 14px;
  }

  .wordbook-identity {
    gap: 12px;
  }

  .wordbook-object {
    width: 112px;
    height: 148px;
  }

  .wordbook-cover {
    padding: 10px 9px 9px;
  }

  .wordbook-cover-mark {
    width: 25px;
    height: 25px;
  }

  .wordbook-cover-kicker {
    margin-top: 8px;
  }

  .wordbook-cover > strong {
    margin-top: 4px;
    font-size: 16px;
  }

  .wordbook-cover-count b {
    font-size: 15px;
  }

  .wordbook-identity > p {
    max-width: 210px;
    font-size: 10px;
    line-height: 1.55;
  }

  .wordbook-page {
    min-height: 330px;
    padding: 16px 13px 18px;
  }

  .wordbook-page-head {
    gap: 10px;
  }

  .wordbook-page-head > div > span {
    font-size: 9px;
  }

  .wordbook-page-head h2 {
    margin-top: 3px;
    font-size: 19px;
  }

  .wordbook-search {
    min-height: 38px;
    padding: 0 9px;
  }

  .wordbook-search input {
    font-size: 12px;
  }

  .wordbook-page-status {
    gap: 3px;
    margin-top: 14px;
    padding-bottom: 9px;
  }

  .wordbook-page-status span {
    font-size: 10px;
  }

  .wordbook-page-status small {
    font-size: 9.5px;
    line-height: 1.5;
  }

  .wordbook-entry {
    padding: 11px 2px 11px 4px;
  }

  .wordbook-entry-word strong {
    font-size: 17px;
  }

  .wordbook-entry-word span,
  .wordbook-entry-meaning {
    font-size: 10.5px;
  }

  .wordbook-entry-meta small {
    font-size: 8.5px;
  }

  .wordbook-entry-meta strong {
    font-size: 9.5px;
  }

  .modal {
    width: calc(100% - 16px);
    max-height: calc(100svh - 16px);
    margin: 8px auto;
    padding: 20px 15px 18px;
    border-radius: 16px;
  }

  .modal h2 {
    padding-right: 26px;
    font-size: 25px;
    line-height: 1.25;
  }

  .modal > p:not(.eyebrow) {
    margin: 8px 0 15px;
    font-size: 12px;
    line-height: 1.6;
  }

  .modal-close {
    top: 13px;
    right: 12px;
    width: 30px;
    height: 30px;
  }

  .prestudy-label {
    font-size: 10px;
  }

  .prestudy-summary {
    margin-top: 15px;
  }

  .prestudy-summary > div {
    padding: 12px 7px;
  }

  .prestudy-summary strong {
    font-size: 23px;
  }

  .prestudy-summary span {
    font-size: 9.5px;
  }

  .prestudy-actions {
    margin-top: 14px;
  }

  .settings-grid {
    margin-top: 17px;
  }

  .field {
    margin-top: 14px;
  }

  .field > span,
  .field-label,
  .field-title-row > span {
    margin-bottom: 6px;
    font-size: 12px;
  }

  .field input,
  .field select {
    height: 44px;
    font-size: 13px;
  }

  .field > small,
  .toggle-line small {
    font-size: 10px;
  }

  .field-title-row strong {
    font-size: 15px;
  }

  .segmented button {
    min-height: 38px;
    padding: 0 7px;
    font-size: 11px;
  }

  .setting-current {
    font-size: 10px;
  }

  .onboarding-story {
    min-height: 208px;
    padding: 20px 16px 18px;
  }

  .story-copy {
    padding: 17px 0 0;
  }

  .story-kicker {
    font-size: 9px;
  }

  .story-copy h2 {
    margin: 10px 0;
    font-size: clamp(25px, 7.2vw, 28px);
    line-height: 1.18;
  }

  .story-copy p {
    max-width: 330px;
    font-size: 12px;
    line-height: 1.65;
  }

  .onboarding-form {
    padding: 22px 16px calc(42px + env(safe-area-inset-bottom));
  }

  .step-track {
    margin-bottom: 22px;
  }

  .onboarding-heading {
    margin-bottom: 21px;
  }

  .step-count {
    margin-bottom: 8px;
    font-size: 11px;
  }

  .onboarding-heading h1 {
    font-size: clamp(25px, 7.2vw, 28px);
    line-height: 1.24;
    text-wrap: balance;
  }

  .onboarding-heading p {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.65;
  }

  .choice-row {
    gap: 8px;
  }

  .choice-card {
    min-height: 88px;
    padding: 12px;
    border-radius: 11px;
  }

  .choice-card > span {
    font-size: 10px;
  }

  .choice-card > strong {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.4;
  }

  .choice-card > small {
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.45;
  }

  .module-choices {
    gap: 6px;
  }

  .module-choices button {
    min-height: 44px;
    font-size: 12px;
  }

  .material-choice button {
    min-height: 82px;
    padding: 12px;
  }

  .material-choice strong {
    font-size: 13px;
  }

  .material-choice small {
    font-size: 10px;
  }

  .onboarding-actions {
    gap: 9px;
    margin-top: 23px;
    padding-top: 17px;
  }

  .mobile-nav {
    right: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 10px;
    height: 60px;
    padding: 6px 8px;
    border-radius: 16px;
  }

  .mobile-nav button {
    gap: 2px;
    font-size: 10px;
  }

  .mobile-nav svg {
    width: 19px;
    height: 19px;
  }

  .toast {
    right: 14px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    left: 14px;
    font-size: 12px;
  }

  .plan-summary-card {
    gap: 13px;
    padding: 16px;
  }

  .plan-progress-ring {
    width: 96px;
    height: 96px;
  }

  .plan-progress-ring::before {
    inset: 11px;
  }

  .plan-progress-ring strong {
    font-size: 24px;
  }

  .plan-summary-main h2 {
    margin-top: 3px;
    font-size: 20px;
  }

  .plan-summary-main > p {
    font-size: 11px;
    line-height: 1.55;
  }

  .plan-metrics {
    margin-top: 13px;
  }

  .plan-metrics > div {
    padding: 9px 10px;
  }

  .plan-metrics span {
    font-size: 9px;
  }

  .plan-metrics strong {
    font-size: 11px;
  }

  .today-plan-strip {
    gap: 10px;
    margin-top: 12px;
    padding: 14px;
  }

  .today-plan-strip strong {
    font-size: 14px;
  }

  .today-plan-strip p {
    font-size: 11px;
    line-height: 1.5;
  }

  .plan-timeline-panel {
    margin-top: 14px;
    padding: 16px 12px;
    border-radius: 15px;
  }

  .plan-day {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 9px;
    min-height: 64px;
  }

  .plan-day-marker {
    width: 30px;
    height: 30px;
    font-size: 9px;
  }

  .plan-day-copy strong {
    font-size: 12px;
  }

  .plan-day-copy span,
  .plan-day-copy p {
    font-size: 10px;
  }

  .plan-day-count strong {
    font-size: 18px;
  }

  .plan-day-count span {
    font-size: 8px;
  }

  .timeline-expand {
    min-height: 36px;
    margin-top: 11px;
    font-size: 10px;
  }

  .dictionary-modal {
    width: calc(100% - 16px);
    max-height: calc(100svh - 16px);
    margin: 8px auto;
    padding: 19px 14px;
    border-radius: 15px;
  }

  .dictionary-head .word-detail-title h2 {
    font-size: clamp(31px, 9.2vw, 36px);
    overflow-wrap: anywhere;
  }

  .dictionary-head .word-detail-phonetic {
    font-size: 12px;
  }

  .dictionary-summary p,
  .dictionary-definitions li,
  .dictionary-meanings li,
  .dictionary-examples p,
  .dictionary-relations p,
  .dictionary-side-note,
  .dictionary-online,
  .dictionary-source-note {
    font-size: 12px;
    line-height: 1.65;
  }

  .dictionary-layout,
  .dictionary-main,
  .dictionary-section,
  .dictionary-definitions,
  .dictionary-meanings {
    min-width: 0;
  }

  .dictionary-definitions li,
  .dictionary-meanings li,
  .dictionary-translations p,
  .dictionary-examples p {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* Everyday English is a learning direction of its own, not a seventh exam. */
.general-choice-card {
  grid-column: 1 / -1;
  display: grid;
  min-height: 96px;
  grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 18px;
}

.general-choice-card > span {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--green);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
}

.general-choice-card > strong {
  align-self: end;
  margin-top: 0;
  color: var(--ink-deep);
  font-size: 17px;
}

.general-choice-card > small {
  align-self: start;
  margin-top: 3px;
  font-size: 11px;
}

.choice-divider {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 10px;
  margin: 4px 0 1px;
  color: var(--ink-soft);
  font-size: 10px;
}

.choice-divider::before,
.choice-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.field-grid.is-single {
  grid-template-columns: 1fr;
}

.general-learning-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #a9c9c0;
  color: var(--ink-soft);
  background: rgba(232, 243, 238, 0.62);
  font-size: 11px;
  line-height: 1.65;
}

@media (min-width: 641px) {
  .story-copy h2 {
    font-size: 52px;
    line-height: 1.16;
  }
}

@media (max-width: 640px) {
  .general-choice-card {
    min-height: 88px;
    grid-template-columns: 76px minmax(0, 1fr);
    column-gap: 11px;
    padding: 12px;
  }

  .general-choice-card > span {
    font-size: 11px;
  }

  .general-choice-card > strong {
    font-size: 15px;
  }

  .general-choice-card > small {
    font-size: 10px;
    line-height: 1.45;
  }

  .choice-divider {
    margin-top: 2px;
    font-size: 9px;
  }

  .general-learning-note {
    margin-top: 13px;
    padding: 10px 11px;
    font-size: 10.5px;
  }

  .word-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 9px;
  }

  .word-list-row > div:first-child,
  .word-row-end {
    min-width: 0;
  }

  .word-row-end {
    width: 100%;
    justify-content: flex-start;
  }

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

  .plan-overview-strip > div:first-child {
    grid-column: auto;
  }

  .plan-overview-strip > div:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* The first confirmation of each day chooses how recall should feel today. */
.verify-mode-stage {
  width: min(100%, 650px);
  margin: 7vh auto 0;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.verify-mode-stage h1 {
  margin: 0;
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: clamp(31px, 4vw, 40px);
  letter-spacing: -0.035em;
}

.verify-mode-lead {
  max-width: 470px;
  margin: 10px 0 24px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

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

.verify-mode-choice {
  display: grid;
  min-height: 132px;
  grid-template-columns: 38px minmax(0, 1fr);
  align-content: start;
  gap: 4px 12px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
  transition:
    transform 130ms var(--ease-out),
    border-color 170ms ease,
    background-color 170ms ease;
}

.verify-mode-choice:hover {
  border-color: #8eaaa2;
  background: #f7fbf9;
}

.verify-mode-choice:active {
  transform: scale(0.985);
}

.verify-mode-icon {
  display: grid;
  width: 36px;
  height: 36px;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 10px;
  color: var(--ink-deep);
  background: var(--mint);
}

.verify-mode-icon svg {
  width: 18px;
  height: 18px;
}

.verify-mode-choice strong {
  align-self: end;
  font-size: 15px;
}

.verify-mode-choice small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.typed-recall-card {
  margin-top: 4px;
  padding: 17px;
  border: 1px solid #d5e1dc;
  border-radius: 14px;
  background:
    linear-gradient(rgba(23, 61, 54, 0.025) 1px, transparent 1px),
    #f7fbf9;
  background-size: 100% 26px;
  text-align: left;
}

.typed-recall-card.is-loading {
  background: var(--paper);
}

.typed-recall-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.typed-recall-head span {
  color: var(--ink-deep);
  font-size: 12px;
  font-weight: 800;
}

.typed-recall-head small {
  color: var(--ink-soft);
  font-size: 10px;
}

.typed-meaning {
  margin: 17px 0 10px;
  color: var(--ink-deep);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.55;
}

.typed-meaning span {
  margin-right: 6px;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 12px;
  font-style: italic;
  font-weight: 400;
}

.letter-mask {
  margin: 0 0 15px;
  overflow-wrap: anywhere;
  color: #315d56;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.45;
}

.typed-cloze-sentence {
  margin: 16px 0 0;
  color: var(--ink);
  font-family: var(--font-reading);
  font-size: 18px;
  line-height: 1.8;
}

.typed-cloze-translation {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.typed-answer-row {
  display: flex;
  gap: 7px;
  margin-top: 16px;
}

.typed-answer-row input {
  min-width: 0;
  min-height: 43px;
  flex: 1;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: #fff;
  font-family: var(--font-reading);
  font-size: 15px;
}

.typed-answer-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(63, 121, 103, 0.09);
}

.typed-answer-row button:disabled {
  opacity: 0.45;
}

.typed-feedback {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

.typed-feedback.is-correct {
  color: #2f6b5d;
}

.typed-feedback.is-wrong {
  color: #a4513e;
}

.typed-feedback strong {
  color: var(--ink);
}

.typed-loading-line {
  margin: 15px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

@media (max-width: 640px) {
  .verify-mode-stage {
    margin-top: 17px;
    padding: 21px 14px 17px;
    border-radius: 17px;
  }

  .verify-mode-stage h1 {
    font-size: 28px;
  }

  .verify-mode-lead {
    margin: 8px 0 17px;
    font-size: 12px;
    line-height: 1.6;
  }

  .verify-mode-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .verify-mode-choice {
    min-height: 82px;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 3px 10px;
    padding: 12px;
  }

  .verify-mode-icon {
    width: 32px;
    height: 32px;
  }

  .verify-mode-choice strong {
    font-size: 14px;
  }

  .verify-mode-choice small {
    font-size: 10.5px;
  }

  .typed-recall-card {
    padding: 13px 12px;
  }

  .typed-recall-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .typed-meaning {
    margin-top: 13px;
    font-size: 17px;
  }

  .letter-mask {
    margin-bottom: 12px;
    font-size: 23px;
    letter-spacing: 0.08em;
  }

  .typed-cloze-sentence {
    margin-top: 13px;
    font-size: 16px;
    line-height: 1.7;
  }

  .typed-answer-row {
    margin-top: 13px;
  }

  .typed-answer-row input {
    min-height: 41px;
    font-size: 14px;
  }

}

.settings-verification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 11px;
}

.settings-verification-choice {
  display: grid;
  min-height: 82px;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
}

.settings-verification-choice > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: var(--ink-deep);
  background: var(--mint);
}

.settings-verification-choice svg {
  width: 15px;
  height: 15px;
}

.settings-verification-choice > div {
  min-width: 0;
}

.settings-verification-choice strong,
.settings-verification-choice small {
  display: block;
}

.settings-verification-choice strong {
  font-size: 12px;
}

.settings-verification-choice small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.45;
}

.settings-verification-choice.is-selected {
  border-color: var(--ink-deep);
  background: var(--mint);
  box-shadow: inset 0 0 0 1px var(--ink-deep);
}

@media (max-width: 520px) {
  .settings-verification-grid {
    grid-template-columns: 1fr;
  }

  .settings-verification-choice {
    min-height: 68px;
  }
}

.plan-progress-ring {
  appearance: none;
  padding: 0;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.plan-progress-ring .plan-ring-marker {
  position: absolute;
  inset: 0;
  transform: rotate(var(--marker-angle));
}

.plan-progress-ring:focus-visible,
.plan-dial-large:focus-visible {
  outline: 3px solid rgba(63, 121, 103, 0.28);
  outline-offset: 5px;
}

.plan-ring-marker {
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  transform: rotate(var(--marker-angle));
}

.plan-ring-marker::after {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 1px 4px rgba(23, 61, 56, 0.24);
  content: "";
  transform: translateX(-50%);
}

.plan-ring-marker.is-buffer::after {
  background: #6f9b8e;
}

.plan-ring-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 13px;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 10px;
}

.plan-ring-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.plan-ring-legend i,
.plan-dial-legend i {
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--orange);
}

.plan-ring-legend i.is-buffer,
.plan-dial-legend i.is-buffer {
  background: #6f9b8e;
}

.plan-ring-legend small {
  margin-left: auto;
  color: #69817b;
  font-size: 9px;
}

.plan-stage-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--line);
}

.plan-stage-guide.is-general {
  display: block;
  padding: 16px 18px;
  background: var(--card);
}

.plan-stage {
  min-width: 0;
  padding: 15px;
  background: var(--card);
}

.plan-stage > span,
.plan-stage > strong,
.plan-stage > small {
  display: block;
}

.plan-stage > span {
  color: var(--ink-soft);
  font-size: 10px;
}

.plan-stage > strong {
  margin-top: 4px;
  color: var(--ink-deep);
  font-size: 13px;
  line-height: 1.45;
}

.plan-stage > small {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.plan-stage.is-vocabulary {
  box-shadow: inset 0 3px 0 var(--orange);
}

.plan-stage.is-paper {
  box-shadow: inset 0 3px 0 #c9a34a;
}

.plan-stage.is-buffer {
  box-shadow: inset 0 3px 0 #6f9b8e;
}

.plan-feasibility-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  color: #8a5b31;
  background: #fff9ed;
  font-size: 10px;
  line-height: 1.6;
}

.plan-stage-caption {
  grid-column: 1 / -1;
  padding: 9px 14px;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 9px;
  text-align: right;
}

.plan-day.is-buffer {
  color: var(--ink-soft);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(111, 155, 142, 0.035) 0 6px,
      transparent 6px 12px
    );
}

.plan-day.is-buffer .plan-day-marker {
  color: #4d786d;
  border-style: dashed;
  background: #eef5f2;
}

.plan-day.is-exam {
  background: rgba(246, 236, 198, 0.32);
}

.plan-day.is-exam .plan-day-marker {
  color: #6f5514;
  border-color: #dfc160;
  background: #f6e9b5;
}

.plan-dial-modal {
  width: min(calc(100% - 30px), 620px);
  padding: 28px 30px 24px;
  text-align: center;
}

.plan-dial-modal > p {
  max-width: 470px;
  margin-right: auto;
  margin-left: auto;
}

.plan-dial-large {
  --percent: 0;
  position: relative;
  display: grid;
  width: 238px;
  height: 238px;
  margin: 24px auto 20px;
  place-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--orange) calc(var(--percent) * 1%), #e3ebe7 0);
}

.plan-dial-large::before {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: inset 0 0 0 1px rgba(23, 61, 54, 0.04);
  content: "";
}

.plan-dial-large strong,
.plan-dial-large > span:not(.plan-ring-marker) {
  position: relative;
  z-index: 1;
}

.plan-dial-large strong {
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1;
}

.plan-dial-large > span:not(.plan-ring-marker) {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 11px;
}

.plan-dial-large .plan-ring-marker::after {
  top: 1px;
  width: 10px;
  height: 10px;
}

.plan-dial-legend {
  display: grid;
  gap: 9px;
  text-align: left;
}

.plan-dial-legend > div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.plan-dial-legend i {
  width: 9px;
  height: 9px;
  margin-top: 5px;
}

.plan-dial-legend strong,
.plan-dial-legend small {
  display: block;
}

.plan-dial-legend strong {
  color: var(--ink-deep);
  font-size: 12px;
}

.plan-dial-legend small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.plan-dial-summary {
  margin: 15px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.plan-dial-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.session-stop-button {
  display: grid;
  width: 100%;
  min-height: 62px;
  grid-template-columns: 38px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 11px;
  margin: 18px auto 0;
  padding: 11px 14px;
  border: 1px solid #d5b85e;
  border-radius: 14px;
  color: #493b18;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 255, 255, 0.62), transparent 30%),
    linear-gradient(135deg, #fff8df, #f8edc6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 7px 18px rgba(80, 64, 23, 0.08);
  text-align: left;
}

.session-stop-button:hover {
  color: #2f2918;
  border-color: #b99734;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 255, 255, 0.72), transparent 30%),
    linear-gradient(135deg, #fff8df, #f4e4aa);
}

.session-stop-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: #f9f4e5;
  background: #173f38;
}

.session-stop-icon svg {
  width: 18px;
  height: 18px;
}

.session-stop-copy {
  min-width: 0;
}

.session-stop-copy strong,
.session-stop-copy small {
  display: block;
}

.session-stop-copy strong {
  font-size: 15px;
  line-height: 1.35;
}

.session-stop-copy small {
  margin-top: 3px;
  color: #776c4c;
  font-size: 10px;
  line-height: 1.45;
}

.session-stop-arrow {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #574a22;
  background: rgba(255, 255, 255, 0.55);
}

.session-stop-arrow svg {
  width: 12px;
  height: 12px;
}

.result-actions {
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .plan-ring-legend small {
    width: 100%;
    margin-left: 0;
  }

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

  .plan-stage {
    padding: 12px 13px;
  }

  .plan-stage > strong {
    font-size: 12px;
  }

  .plan-stage-caption {
    text-align: left;
  }

  .plan-dial-modal {
    width: calc(100% - 16px);
    padding: 21px 15px 18px;
  }

  .plan-dial-large {
    width: 204px;
    height: 204px;
    margin: 19px auto 17px;
  }

  .plan-dial-large::before {
    inset: 19px;
  }

  .plan-dial-large strong {
    font-size: 41px;
  }

  .plan-dial-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .plan-dial-actions .button {
    width: 100%;
  }

  .session-stop-button {
    min-height: 60px;
    grid-template-columns: 35px minmax(0, 1fr) 24px;
    gap: 9px;
    margin-top: 12px;
    padding: 10px 11px;
  }

  .session-stop-icon {
    width: 33px;
    height: 33px;
  }

  .session-stop-copy strong {
    font-size: 14px;
  }

  .session-stop-copy small {
    font-size: 9.5px;
  }
}

@media (min-width: 821px) {
  :root {
    --rail: clamp(218px, 13vw, 252px);
  }

  .rail {
    padding-right: clamp(20px, 1.5vw, 28px);
    padding-left: clamp(20px, 1.5vw, 28px);
  }

  .brand-name {
    font-size: 24px;
  }

  .brand-name small {
    font-size: 8px;
  }

  .rail-nav {
    margin-top: 58px;
  }

  .rail-link {
    min-height: 49px;
    padding: 0 15px;
    font-size: 15px;
  }

  .rail-link svg {
    width: 20px;
    height: 20px;
  }

  .rail-exam {
    padding: 17px 14px;
  }

  .rail-exam strong {
    font-size: 14px;
  }

  .rail-exam > span:last-child,
  .rail-settings {
    font-size: 12px;
  }

  .workspace {
    max-width: none;
    padding: 29px clamp(30px, 3vw, 54px) 72px;
  }

  .page {
    max-width: 1400px;
    padding-top: 47px;
  }

  .plan-adjust-page {
    max-width: 1180px;
  }

  .workspace-top {
    font-size: 12px;
  }

  .exam-glance {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 13px;
  }

  .page-heading h1 {
    font-size: clamp(42px, 3.2vw, 54px);
  }

  .page-heading > div > p:last-child,
  .advisor-heading > div > p:last-child {
    font-size: 16px;
    line-height: 1.65;
  }

  .tiny-label {
    font-size: 12px;
  }

  .panel-note,
  .lookup-hint,
  .search-status,
  .plan-summary-main > p,
  .plan-stage > small,
  .today-plan-strip p {
    font-size: 14px;
    line-height: 1.6;
  }

  .growth-tabs button {
    min-height: 42px;
    font-size: 15px;
  }

  .small-search {
    height: 45px;
  }

  .small-search input {
    font-size: 15px;
  }

  .search-welcome strong {
    font-size: 17px;
  }

  .search-welcome p {
    font-size: 14px;
  }

  .word-list-row p {
    font-size: 14px;
    line-height: 1.55;
  }

  .word-line strong {
    font-size: 20px;
  }

  .word-tier,
  .word-state,
  .lookup-count {
    font-size: 11px;
  }

  .plan-summary-main h2 {
    font-size: 28px;
  }

  .plan-metrics span {
    font-size: 13px;
  }

  .plan-metrics strong {
    font-size: 16px;
  }

  .plan-stage > span {
    font-size: 12px;
  }

  .plan-stage > strong {
    font-size: 16px;
  }

  .plan-stage-caption,
  .plan-feasibility-note {
    font-size: 12px;
  }

  .plan-day-copy strong {
    font-size: 16px;
  }

  .plan-day-copy span,
  .plan-day-copy p {
    font-size: 13px;
  }

  .plan-day-count strong {
    font-size: 23px;
  }

  .plan-day-count span {
    font-size: 10px;
  }

  .adjust-status-chips > span {
    font-size: 13px;
  }

  .adjust-status-chips small {
    font-size: 11px;
  }

  .adjust-intent-heading h2 {
    font-size: 26px;
  }

  .adjust-intent-heading p,
  .adjust-focus-head p,
  .adjust-safe-note {
    font-size: 14px;
  }

  .adjust-intent-card {
    min-height: 100px;
  }

  .adjust-intent-card strong {
    font-size: 17px;
  }

  .adjust-intent-card small,
  .adjust-focus-options button span {
    font-size: 13px;
  }

  .adjust-more summary > span,
  .adjust-focus-head h2 {
    font-size: 18px;
  }

  .adjust-more summary > small {
    font-size: 13px;
  }

  .adjust-focus-options button strong {
    font-size: 16px;
  }
}

@media (min-width: 1000px) {
  .onboarding-shell {
    grid-template-columns: minmax(400px, 0.82fr) minmax(620px, 1.18fr);
  }

  .onboarding-story {
    padding: 38px clamp(42px, 4vw, 78px) 34px;
  }

  .onboarding-form {
    width: min(100%, 960px);
    padding: 48px clamp(38px, 5vw, 82px);
  }

  .step-count {
    font-size: 15px;
  }

  .onboarding-heading h1 {
    font-size: clamp(36px, 3vw, 44px);
  }

  .onboarding-heading p {
    font-size: 15px;
  }

  .choice-card {
    min-height: 118px;
    padding: 18px;
  }

  .choice-card > span {
    font-size: 14px;
  }

  .choice-card > strong {
    font-size: 17px;
  }

  .choice-card > small {
    font-size: 14px;
  }

  .general-choice-card {
    min-height: 108px;
  }

  .general-choice-card > span {
    font-size: 14px;
  }

  .general-choice-card > strong {
    font-size: 19px;
  }

  .general-choice-card > small {
    font-size: 14px;
  }

  .session-options strong {
    font-size: 15px;
  }

  .session-options span {
    font-size: 14px;
  }
}

/* Final readability floor for the controls repeatedly flagged as too small. */
.setting-help {
  font-size: 13px;
}

.setting-group > strong {
  font-size: 16px;
}

.setting-current {
  font-size: 13px;
}

.study-style-choice > strong {
  font-size: 15px;
}

.study-style-choice > small {
  font-size: 12px;
  line-height: 1.55;
}

.settings-verification-choice {
  min-height: 92px;
}

.settings-verification-choice strong {
  font-size: 14px;
}

.settings-verification-choice small {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.55;
}

.plan-ring-legend {
  font-size: 12px;
}

.plan-ring-legend small {
  font-size: 11px;
}

.adjust-status-chips > span {
  font-size: 13px;
}

.adjust-status-chips small {
  font-size: 11px;
}

.adjust-intent-card strong {
  font-size: 16px;
}

.adjust-intent-card small {
  font-size: 12.5px;
  line-height: 1.55;
}

@media (min-width: 821px) {
  .settings-verification-choice strong {
    font-size: 16px;
  }

  .settings-verification-choice small {
    font-size: 14px;
  }

  .plan-ring-legend {
    font-size: 15px;
  }

  .plan-ring-legend small {
    font-size: 14px;
  }

  .adjust-status-chips > span {
    min-height: 37px;
    padding: 6px 12px;
    font-size: 16px;
  }

  .adjust-status-chips small {
    color: #4e6965;
    font-size: 13px;
  }

  .adjust-intent-heading h2 {
    font-size: 29px;
  }

  .adjust-intent-heading p {
    margin-top: 6px;
    color: #526b67;
    font-size: 15px;
  }

  .adjust-intent-card {
    min-height: 112px;
    padding: 17px;
  }

  .adjust-intent-card strong {
    font-size: 20px;
  }

  .adjust-intent-card small {
    color: #506a66;
    font-size: 16px;
    font-weight: 500;
  }

  .adjust-more summary > span {
    font-size: 18px;
  }

  .adjust-more summary > small {
    color: #506a66;
    font-size: 14px;
  }

  .setting-group > strong {
    font-size: 18px;
  }

  .setting-help,
  .setting-current {
    font-size: 14px;
  }

  .study-style-choice > strong {
    font-size: 16px;
  }

  .study-style-choice > small {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .setting-help {
    font-size: 12px;
  }

  .setting-group > strong {
    font-size: 15px;
  }

  .setting-current {
    font-size: 12px;
  }

  .study-style-choice > strong {
    font-size: 14px;
  }

  .study-style-choice > small {
    font-size: 11px;
  }

  .settings-verification-choice {
    min-height: 78px;
  }

  .settings-verification-choice strong {
    font-size: 14px;
  }

  .settings-verification-choice small {
    font-size: 11.5px;
  }

  .plan-ring-legend {
    font-size: 11px;
  }

  .plan-ring-legend small {
    font-size: 10.5px;
  }

  .adjust-status-chips > span {
    font-size: 12px;
  }

  .adjust-status-chips small {
    font-size: 10px;
  }

  .adjust-intent-card strong {
    font-size: 14.5px;
  }

  .adjust-intent-card small {
    font-size: 11px;
  }
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 178px;
  align-items: start;
  gap: 28px;
}

.home-main {
  min-width: 0;
}

.home-action-rail {
  position: sticky;
  top: 28px;
  padding: 14px;
  border-radius: 19px;
  color: #f9f6ec;
  background:
    radial-gradient(circle at 85% 8%, rgba(242, 214, 108, 0.16), transparent 30%),
    linear-gradient(150deg, #16473f, #092f32);
  box-shadow: 0 18px 38px rgba(9, 47, 50, 0.2);
}

.home-action-kicker {
  margin: 0 2px 11px;
  color: rgba(255, 250, 236, 0.64);
  font-size: 10px;
  font-weight: 700;
}

.home-continue-button {
  display: flex;
  width: 100%;
  min-height: 172px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 20px 17px;
  border-radius: 14px;
  color: #173f38;
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 255, 255, 0.4), transparent 24%),
    linear-gradient(145deg, #f5df84, #e4bd46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 8px 19px rgba(5, 31, 31, 0.17);
  text-align: left;
}

.home-continue-button small {
  color: rgba(23, 63, 56, 0.68);
  font-size: 12px;
  font-weight: 600;
}

.home-continue-button strong {
  font-family: var(--font-display);
  font-size: 25px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.home-action-rail > p {
  margin: 11px 3px 1px;
  color: rgba(255, 250, 236, 0.54);
  font-size: 9px;
  line-height: 1.55;
}

@media (max-width: 820px) {
  .home-layout {
    display: block;
    padding-bottom: 88px;
  }

  .home-action-rail {
    position: fixed;
    z-index: 44;
    top: auto;
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    left: 16px;
    padding: 0;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
  }

  .home-action-kicker,
  .home-action-rail > p {
    display: none;
  }

  .home-continue-button {
    min-height: 68px;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px 12px 17px;
    border-radius: 15px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.6),
      0 10px 28px rgba(6, 36, 35, 0.24);
  }

  .home-continue-button small {
    order: 2;
    margin-left: auto;
    font-size: 10px;
  }

  .home-continue-button strong {
    order: 1;
    font-size: 19px;
  }
}

@media (max-width: 380px) {
  .home-continue-button small {
    display: none;
  }
}

/* Goal-first plan editing: choose the situation before the system category. */
.adjust-heading {
  margin-bottom: 17px;
}

.adjust-status-chips {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.adjust-status-chips > span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.72);
  font-size: 11px;
}

.adjust-status-chips small {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 500;
}

.adjust-intent-home,
.adjust-focus-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(23, 61, 56, 0.055);
}

.adjust-intent-home {
  padding: 22px;
}

.adjust-intent-heading {
  margin-bottom: 15px;
}

.adjust-intent-heading h2 {
  margin: 0;
  color: var(--ink-deep);
  font-size: 22px;
}

.adjust-intent-heading p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.adjust-intent-grid,
.adjust-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.adjust-intent-card {
  display: grid;
  min-height: 88px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-content: center;
  gap: 3px 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
}

.adjust-intent-icon {
  display: grid;
  width: 34px;
  height: 34px;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 9px;
  color: var(--ink-deep);
  background: var(--mint);
}

.adjust-intent-icon svg {
  width: 17px;
  height: 17px;
}

.adjust-intent-card strong,
.adjust-intent-card small {
  display: block;
}

.adjust-intent-card strong {
  align-self: end;
  font-size: 14px;
  line-height: 1.35;
}

.adjust-intent-card small {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.adjust-more {
  margin-top: 13px;
  border-top: 1px solid var(--line-soft);
}

.adjust-more summary {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 0;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.adjust-more summary::-webkit-details-marker {
  display: none;
}

.adjust-more summary > span {
  font-size: 12px;
  font-weight: 800;
}

.adjust-more summary > small {
  color: var(--ink-soft);
  font-size: 10px;
}

.adjust-more summary::after {
  color: var(--ink-soft);
  content: "+";
  font-family: var(--font-display);
  font-size: 19px;
}

.adjust-more[open] summary::after {
  content: "−";
}

.adjust-more-grid {
  margin-top: 7px;
}

.adjust-focus-panel {
  padding: 20px;
}

.adjust-focus-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.adjust-back {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 5px;
  padding: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
}

.adjust-back svg {
  width: 13px;
  height: 13px;
}

.adjust-focus-head > span {
  display: block;
  margin-top: 12px;
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
}

.adjust-focus-head h2 {
  margin: 4px 0 0;
  color: var(--ink-deep);
  font-size: 22px;
}

.adjust-focus-head p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.adjust-focus-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.adjust-focus-options button {
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
}

.adjust-focus-options button strong,
.adjust-focus-options button span {
  display: block;
}

.adjust-focus-options button strong {
  font-size: 13px;
}

.adjust-focus-options button span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.adjust-focus-options button.is-selected {
  border-color: var(--ink-deep);
  background: var(--mint);
  box-shadow: inset 0 0 0 1px var(--ink-deep);
}

.adjust-focus-panel .adjust-preview {
  margin-top: 14px;
}

.adjust-safe-note {
  margin: 13px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

@media (hover: hover) and (pointer: fine) {
  .adjust-intent-card:hover {
    border-color: #a7bdb6;
    background: #f7fbf9;
  }
}

@media (max-width: 640px) {
  .adjust-heading {
    align-items: center;
    margin-bottom: 11px;
  }

  .adjust-heading .advisor-avatar {
    width: 39px;
    height: 39px;
  }

  .adjust-heading h1 {
    font-size: 27px;
  }

  .adjust-heading p {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.55;
  }

  .adjust-status-chips {
    flex-wrap: nowrap;
    margin-right: 0;
    margin-bottom: 11px;
    padding-right: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .adjust-status-chips::-webkit-scrollbar {
    display: none;
  }

  .adjust-status-chips > span {
    min-height: 29px;
    flex: 0 0 auto;
    padding: 4px 9px;
    font-size: 10px;
  }

  .adjust-status-chips small {
    font-size: 8px;
  }

  .adjust-intent-home {
    padding: 15px 13px 12px;
    border-radius: 15px;
  }

  .adjust-intent-heading {
    margin-bottom: 10px;
  }

  .adjust-intent-heading h2 {
    font-size: 19px;
  }

  .adjust-intent-heading p {
    margin-top: 3px;
    font-size: 10px;
  }

  .adjust-intent-grid,
  .adjust-more-grid {
    gap: 7px;
  }

  .adjust-intent-card {
    min-height: 79px;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 2px 8px;
    padding: 10px;
  }

  .adjust-intent-icon {
    width: 30px;
    height: 30px;
  }

  .adjust-intent-icon svg {
    width: 15px;
    height: 15px;
  }

  .adjust-intent-card strong {
    font-size: 12.5px;
  }

  .adjust-intent-card small {
    font-size: 9.5px;
  }

  .adjust-more {
    margin-top: 9px;
  }

  .adjust-more summary {
    min-height: 39px;
    padding-top: 7px;
  }

  .adjust-more summary > span {
    font-size: 11px;
  }

  .adjust-more summary > small {
    margin-left: auto;
    font-size: 9px;
  }

  .adjust-more summary::after {
    font-size: 17px;
  }

  .adjust-focus-panel {
    padding: 15px 13px;
    border-radius: 15px;
  }

  .adjust-focus-head {
    padding-bottom: 11px;
  }

  .adjust-focus-head > span {
    margin-top: 8px;
    font-size: 9px;
  }

  .adjust-focus-head h2 {
    font-size: 19px;
  }

  .adjust-focus-head p {
    font-size: 10px;
  }

  .adjust-focus-options {
    gap: 7px;
    margin-top: 11px;
  }

  .adjust-focus-options button {
    min-height: 65px;
    padding: 10px;
  }

  .adjust-focus-options button strong {
    font-size: 12px;
  }

  .adjust-focus-options button span {
    font-size: 9px;
  }
}

/* Keep the compact control labels readable after all responsive overrides. */
@media (min-width: 821px) {
  .adjust-status-chips > span {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 16px;
  }

  .adjust-status-chips small {
    color: #4d6964;
    font-size: 13px;
  }

  .adjust-intent-heading h2 {
    font-size: 30px;
  }

  .adjust-intent-heading p {
    margin-top: 7px;
    color: #526b67;
    font-size: 16px;
  }

  .adjust-intent-card {
    min-height: 116px;
    padding: 18px;
  }

  .adjust-intent-card strong {
    font-size: 20px;
  }

  .adjust-intent-card small {
    color: #506a66;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.55;
  }

  .adjust-more summary > span {
    font-size: 19px;
  }

  .adjust-more summary > small {
    color: #506a66;
    font-size: 15px;
  }

  .plan-ring-legend {
    font-size: 15px;
  }

  .plan-ring-legend small {
    color: #4f6b65;
    font-size: 14px;
  }

  .setting-group > strong {
    font-size: 18px;
  }

  .setting-help,
  .setting-current {
    font-size: 14px;
  }

  .study-style-choice > strong {
    font-size: 16px;
  }

  .study-style-choice > small {
    font-size: 14px;
    line-height: 1.55;
  }

  .settings-verification-choice strong {
    font-size: 16px;
  }

  .settings-verification-choice small {
    font-size: 14px;
    line-height: 1.55;
  }
}

@media (max-width: 640px) {
  .adjust-status-chips > span {
    font-size: 12.5px;
  }

  .adjust-status-chips small {
    color: #526b67;
    font-size: 10.5px;
  }

  .adjust-intent-heading p {
    color: #526b67;
    font-size: 11.5px;
  }

  .adjust-intent-card strong {
    font-size: 14.5px;
  }

  .adjust-intent-card small {
    color: #506a66;
    font-size: 11.5px;
    line-height: 1.5;
  }

  .adjust-more summary > small {
    color: #506a66;
    font-size: 10.5px;
  }

  .plan-ring-legend {
    font-size: 12px;
  }

  .plan-ring-legend small {
    color: #4f6b65;
    font-size: 11px;
  }

  .setting-help,
  .setting-current {
    font-size: 12px;
  }

  .study-style-choice > strong {
    font-size: 14px;
  }

  .study-style-choice > small {
    font-size: 11.5px;
  }

  .settings-verification-choice strong {
    font-size: 14.5px;
  }

  .settings-verification-choice small {
    font-size: 12px;
  }
}

/* Home action: the selected bookmark-style study entry. */
.home-action-rail {
  padding: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.home-action-kicker {
  margin: 0 0 9px 4px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.home-continue-button {
  position: relative;
  min-height: 166px;
  justify-content: center;
  padding: 23px 20px 21px 31px;
  border: 1px solid #d7cba9;
  border-radius: 6px 17px 17px 6px;
  color: #173f38;
  background:
    linear-gradient(90deg, rgba(198, 157, 48, 0.1), transparent 25%),
    #fffaf0;
  box-shadow: 0 12px 28px rgba(52, 45, 24, 0.09);
}

.home-continue-button::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 15px;
  width: 2px;
  border-radius: 99px;
  background: #d8b248;
  content: "";
}

.home-continue-button:hover {
  border-color: #bfa455;
  background:
    linear-gradient(90deg, rgba(198, 157, 48, 0.14), transparent 25%),
    #fffdf5;
  box-shadow: 0 15px 32px rgba(52, 45, 24, 0.12);
}

.home-continue-button small {
  color: #85713b;
  font-size: 12px;
  font-weight: 650;
}

.home-continue-button strong {
  color: #173f38;
  font-size: 29px;
}

.home-continue-detail {
  display: block;
  margin-top: 9px;
  color: #776d53;
  font-size: 11px;
  line-height: 1.5;
}

.home-action-rail > p {
  margin: 10px 4px 0;
  color: #6f7d76;
  font-size: 10px;
}

@media (max-width: 820px) {
  .home-action-kicker {
    display: none;
  }

  .home-continue-button {
    min-height: 68px;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 16px 12px 27px;
    border-radius: 6px 15px 15px 6px;
  }

  .home-continue-button::before {
    left: 13px;
  }

  .home-continue-button small {
    order: 2;
    margin-left: auto;
    font-size: 11px;
  }

  .home-continue-button strong {
    order: 1;
    font-size: 21px;
  }

  .home-continue-detail {
    display: none;
  }
}
