:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #718096;
  --line: #d9e2ec;
  --paper: #fffdf8;
  --blue: #2f80ed;
  --green: #2f9e73;
  --coral: #ec6f55;
  --accent: #e95b3c;
  --accent-soft: #fff1eb;
  --yellow: #f5c14b;
  --gold: #f2c66d;
  --soft-blue: #eaf4ff;
  --soft-green: #e9f8f1;
  --soft-coral: #fff0eb;
  --peach: #ffd9c9;
  --butter: #ffe8a5;
  --sky: #d9ecff;
  --mint: #dcf7e7;
  --lilac: #eadbff;
  --navy: #20325a;
  --leaf: #2b8a3e;
  --font-ui: "Hannotate SC", "Chalkboard SE", "Marker Felt", "Comic Sans MS", "PingFang SC", sans-serif;
  --font-story: "Chalkboard SE", "Marker Felt", "Comic Sans MS", "Hannotate SC", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #f5f7fb;
  color: var(--ink);
  font-family: var(--font-ui);
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  backdrop-filter: blur(16px);
}

.brand {
  border: 0;
  background: var(--coral);
  color: white;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 900;
}

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

.nav button,
.primary-action,
.activation-form button,
.panel-form button,
.admin-login button,
.admin-create button,
.lesson-tile button,
.load-more,
.save-word,
.vocab-item button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  min-height: 40px;
  padding: 0 14px;
  font-weight: 800;
}

.nav span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: #1d5fbf;
}

.primary-action,
.activation-form button,
.save-word {
  border-color: var(--coral);
  background: var(--coral);
  color: white;
}

.audio-missing {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px dashed #f1b79f;
  border-radius: 16px;
  background: #fff5ef;
  color: #9d4e2f;
  font-weight: 800;
}

.band,
.study-layout {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 14px 28px rgba(31, 41, 51, 0.08);
}

.band {
  padding: 24px;
  margin-top: 16px;
}

.intro-band {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background:
    radial-gradient(circle at top right, rgba(47, 128, 237, .12), transparent 32%),
    linear-gradient(135deg, #fffdf8 0%, #f3fbff 100%);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--coral);
  font-weight: 900;
}

.hero-copy {
  max-width: 720px;
  margin: 14px 0 0;
  color: #506174;
  font-size: 18px;
  line-height: 1.7;
  font-weight: 800;
}

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

h1 {
  margin-bottom: 0;
  font-size: 42px;
  line-height: 1.1;
}

.section-head {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.section-head p {
  color: var(--muted);
  line-height: 1.6;
}

.product-section {
  margin-top: 24px;
}

.product-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.product-row h3 {
  margin: 0;
}

.product-row span {
  color: var(--green);
  font-weight: 900;
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.lesson-tile {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.lesson-tile img {
  width: 86px;
  height: 112px;
  border-radius: 12px;
  object-fit: cover;
  background: #eef2f7;
}

.lesson-tile p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.lesson-tile h4 {
  margin-bottom: 12px;
}

.lesson-tile.is-locked {
  opacity: .78;
}

.load-more {
  display: block;
  margin: 16px auto 0;
  background: #fff9e8;
  border-color: #f4d487;
}

.activate-band {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.account-band,
.admin-band {
  display: grid;
  gap: 18px;
}

.profile-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid #f3d38b;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(245, 193, 75, .22), transparent),
    #fffaf0;
}

.profile-card span,
.profile-card small {
  color: var(--muted);
  font-weight: 800;
}

.profile-card strong {
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1;
}

.profile-card code {
  justify-self: start;
  padding: 8px 12px;
  border-radius: 999px;
  background: #19345d;
  color: white;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .08em;
}

.account-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.panel-form,
.admin-create {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}

.panel-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 900;
}

.panel-form input,
.admin-login input,
.admin-create input,
.admin-create select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.stats-grid article {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ecf7ff, #fffdf8);
  border: 1px solid var(--line);
}

.stats-grid span {
  color: var(--muted);
  font-weight: 900;
}

.stats-grid strong {
  font-size: 34px;
}

.admin-create {
  grid-template-columns: 1fr 1.4fr .7fr auto;
  align-items: end;
}

.admin-create h2 {
  grid-column: 1 / -1;
  margin: 0;
}

.code-table {
  display: grid;
  gap: 10px;
}

.code-table article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.code-table article.is-disabled {
  opacity: .55;
}

.code-table div {
  display: grid;
  gap: 4px;
}

.code-table strong {
  word-break: break-all;
}

.code-table span,
.code-table small,
.empty-admin p {
  color: var(--muted);
}

.code-table button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 0 12px;
  font-weight: 900;
}

.empty-admin {
  padding: 18px;
  border-radius: 20px;
  background: #f8fbff;
  border: 1px dashed var(--line);
}

.product-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.product-choice {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 18px;
  text-align: left;
  background: white;
}

.product-choice.is-selected {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.product-choice span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.activation-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.activation-form input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
}

.code-hints {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.code-hints span {
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--soft-green);
  color: #236a50;
  font-size: 13px;
  font-weight: 800;
}

.study-shell {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.lesson-hero,
.study-layout,
.exercise-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 14px 30px rgba(20, 32, 62, 0.08);
}

.lesson-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 20px;
}

.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  gap: 16px;
  align-items: start;
  padding: 20px;
}

.reader-surface {
  display: grid;
  gap: 16px;
}

.reader-title {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.reader-title button {
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--soft-blue);
  color: #1d5fbf;
  font-weight: 900;
}

.reader-title p {
  margin: 0 0 4px;
  color: var(--muted);
}

.reader-title h1 {
  font-size: 36px;
}

.lesson-actions {
  display: flex;
  justify-content: flex-end;
}

.lesson-actions button,
.print-toolbar button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 0 14px;
  font-weight: 900;
}

.hero-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}

.hero-image-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(255, 230, 176, 0.34), transparent 30%),
    linear-gradient(180deg, #fffef9 0%, #fff8ef 100%);
  overflow: hidden;
}

.lesson-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
  background: white;
  box-shadow: 0 8px 20px rgba(41, 52, 86, 0.08);
}

.hero-image-tip {
  position: absolute;
  right: 14px;
  bottom: 14px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(29, 43, 58, 0.72);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

audio {
  width: 100%;
  margin: 14px 0;
}

.reading-text,
.reading {
  font-family: var(--font-story);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.85;
  font-weight: 900;
  letter-spacing: .01em;
}

.reading-sentence {
  display: inline;
}

.reading-sentence.is-current {
  background: linear-gradient(180deg, rgba(255, 233, 164, 0) 0%, rgba(255, 233, 164, 0.72) 100%);
  border-radius: 10px;
}

.word-button,
.word-chip {
  display: inline;
  border: 0;
  border-radius: 10px;
  margin: 0 1px;
  padding: 0 4px;
  background: transparent;
  color: inherit;
  font: inherit;
}

.word-button:hover {
  background: #fff0b8;
}

.highlight-peach { background: var(--peach); }
.highlight-sky { background: var(--sky); }
.highlight-mint { background: var(--mint); }
.highlight-butter { background: var(--butter); }
.highlight-lilac { background: var(--lilac); }

.highlight-peach,
.highlight-sky,
.highlight-mint,
.highlight-butter,
.highlight-lilac {
  border-radius: 12px;
  padding: 0 7px;
}

.mini-recap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px dashed #f0d8b2;
  background: linear-gradient(180deg, #fff7dc 0%, #fffaf0 100%);
}

.mini-recap-label {
  color: var(--leaf);
  font-weight: 900;
  letter-spacing: .02em;
}

.recap-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  color: var(--navy);
  cursor: pointer;
}

.study-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.side-section,
.lookup-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: white;
}

.sidebar-stack {
  display: grid;
  gap: 12px;
}

.player-card {
  background:
    radial-gradient(circle at top right, rgba(255, 230, 176, 0.36), transparent 28%),
    linear-gradient(180deg, #fffdf9 0%, #fff7ee 100%);
}

.player-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff0d9;
  color: #9a5a15;
  font-size: 13px;
  font-weight: 900;
}

.player-shell {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.player-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.player-play {
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff8f62 0%, #eb5a38 100%);
  color: white;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(233, 91, 60, 0.28);
}

.player-label {
  color: #8b5a1f;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.player-title,
.sentence-panel-title {
  font-family: var(--font-story);
  color: var(--navy);
}

.player-title {
  font-size: 26px;
}

.player-caption {
  color: #6f6d74;
  font-size: 14px;
  line-height: 1.5;
}

.player-jump,
.loop-chip {
  border: 0;
  border-radius: 999px;
  min-height: 38px;
  padding: 0 12px;
  background: white;
  color: #b94b32;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px #f0d7ca;
}

.player-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tool-label {
  color: #7c8796;
  font-size: 13px;
  font-weight: 900;
  margin-right: 2px;
}

.speed-chip {
  border: 0;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  background: white;
  color: var(--navy);
  font-weight: 900;
  box-shadow: inset 0 0 0 1px #dbe3f0;
}

.speed-chip.active,
.loop-chip.active {
  background: var(--navy);
  color: white;
  box-shadow: none;
}

.sentence-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px #f2e2d3;
}

.sentence-panel-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.sentence-panel-title {
  font-size: 22px;
}

.sentence-mode {
  color: #9a5a15;
  font-size: 13px;
  font-weight: 900;
}

.sentence-list,
.sidebar-word-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.sentence-list {
  max-height: 220px;
}

.sentence-chip {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 0;
  border-radius: 16px;
  background: white;
  color: var(--navy);
  text-align: left;
  box-shadow: inset 0 0 0 1px #e6ebf5;
}

.sentence-chip.is-active {
  box-shadow: inset 0 0 0 2px #f08d63;
  background: #fff6f1;
}

.sentence-chip.is-looping {
  background: var(--navy);
  color: white;
  box-shadow: none;
}

.sentence-chip-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  border-radius: 12px;
  background: #eef4ff;
  color: #5f6f8b;
  font-size: 13px;
  font-weight: 900;
}

.sentence-chip.is-looping .sentence-chip-index {
  background: rgba(255, 255, 255, 0.16);
  color: #fff7d8;
}

.sentence-chip-text {
  font-size: 15px;
  line-height: 1.55;
  font-weight: 800;
}

.words-card {
  max-height: min(860px, calc(100vh - 120px));
  overflow: hidden;
}

.sidebar-word-list {
  gap: 12px;
  padding-right: 8px;
}

.sidebar-word-row {
  padding: 10px 10px 12px;
  border: 0;
  border-bottom: 1px dashed #e6d7cf;
  border-radius: 16px;
  background: transparent;
  text-align: left;
}

.sidebar-word-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 4px;
}

.sidebar-word-top strong {
  font-family: var(--font-story);
  font-size: 25px;
  color: var(--navy);
}

.sidebar-word-top span {
  color: #7a8798;
  font-size: 15px;
}

.sidebar-word-audio {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  background: #fff4d9;
  color: #9a5a15;
  box-shadow: inset 0 0 0 1px #f2d7a6;
}

.sidebar-word-meaning {
  color: #bd452b;
  font-weight: 900;
  margin-bottom: 3px;
}

.sidebar-word-note {
  color: #677587;
  font-size: 14px;
  line-height: 1.55;
}

.focus-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px dashed #eadccf;
  background: transparent;
  text-align: left;
}

.focus-row strong {
  font-size: 24px;
  color: #20325a;
}

.focus-row small {
  color: var(--muted);
}

.focus-row span {
  grid-column: 1 / -1;
  color: var(--coral);
  font-weight: 900;
}

.lookup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lookup-head button {
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff3c4;
}

.definition-list p {
  padding: 10px 0;
  border-bottom: 1px dashed #eadccf;
}

.definition-list strong {
  margin-right: 8px;
  color: var(--coral);
}

.exercise-block {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.exercise-panel {
  padding: 20px;
  background:
    radial-gradient(circle at top right, rgba(255, 224, 184, 0.28), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #fff8f1 100%);
}

.exercise-header {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.exercise-header h2 {
  margin: 0;
  font-family: var(--font-story);
  font-size: 34px;
}

.exercise-subtitle {
  color: #6e6b72;
  line-height: 1.6;
  font-weight: 800;
}

.exercise-grid {
  display: grid;
  gap: 14px;
}

.exercise-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  background: white;
  box-shadow: 0 10px 22px rgba(49, 54, 83, 0.06);
}

.exercise-kicker {
  color: var(--accent);
  font-weight: 900;
  margin-bottom: 8px;
}

.exercise-card h3 {
  margin: 0 0 12px;
  font-family: var(--font-story);
  font-size: 26px;
  line-height: 1.35;
  color: var(--navy);
}

.option-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.option-pill {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid #e6ebf5;
  background: #f9fbff;
  font-family: var(--font-story);
  font-weight: 900;
  font-size: 20px;
  line-height: 1.45;
  text-align: left;
}

.option-pill:hover {
  border-color: #f1b991;
  background: #fff7ef;
}

.answers-panel {
  position: relative;
  margin-top: 8px;
}

.answers-hint {
  margin: 8px 0 12px;
  color: #8d7d67;
  font-size: 14px;
  font-weight: 900;
}

.answers-reveal {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid #f1dcc2;
  background:
    radial-gradient(circle at top right, rgba(255, 230, 183, 0.26), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #fff7ef 100%);
}

.answers-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
  transition: filter 220ms ease, opacity 220ms ease;
}

.scratch-veil {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: inherit;
  color: #7c4d18;
  text-align: center;
  pointer-events: none;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.18) 0 12px, rgba(249,219,153,0.08) 12px 24px),
    linear-gradient(135deg, #f4c86d 0%, #f8dc95 34%, #ffe9b9 50%, #f3c45f 68%, #ebaf49 100%);
}

.scratch-veil-title {
  font-family: var(--font-story);
  font-size: 26px;
}

.scratch-veil-note {
  font-size: 14px;
  font-weight: 900;
}

@media (hover: hover) {
  .scratch-veil {
    display: flex;
  }

  .answers-panel .answers-list {
    filter: blur(10px);
    opacity: .26;
    user-select: none;
  }

  .answers-panel:hover .answers-list,
  .answers-panel:focus-within .answers-list {
    filter: none;
    opacity: 1;
    user-select: text;
  }

  .answers-panel:hover .scratch-veil,
  .answers-panel:focus-within .scratch-veil {
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 420ms ease, transform 420ms ease;
  }
}

.exercise-section,
.question-card,
.answer-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: white;
}

.question-card {
  margin-top: 10px;
}

.question-card ol {
  margin: 8px 0 0 22px;
  padding: 0;
}

.question-card li {
  margin: 6px 0;
}

.word-bank {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.word-bank span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff4c8;
  font-weight: 900;
}

.cloze-text {
  line-height: 1.9;
}

.answer-line,
.answer-box {
  color: #1f6b4f;
  font-weight: 900;
}

.print-toolbar {
  position: sticky;
  top: 64px;
  z-index: 9;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 248, .92);
  backdrop-filter: blur(14px);
}

.print-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.print-toolbar button.is-selected {
  border-color: var(--coral);
  background: var(--soft-coral);
  color: #9d4e2f;
}

.print-sheet {
  width: min(920px, 100%);
  margin: 0 auto 60px;
  padding: 28px;
  border: 1px solid #d8dce7;
  border-radius: 18px;
  background: white;
  box-shadow: 0 18px 44px rgba(31, 41, 51, .12);
}

.print-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 3px solid #20325a;
}

.print-head p {
  margin-bottom: 6px;
  color: var(--muted);
  font-weight: 900;
}

.print-head span {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff4c8;
  font-weight: 900;
}

.print-main {
  display: grid;
  grid-template-columns: minmax(240px, .9fr) 1fr;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.print-main img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.print-reading {
  font-size: 22px;
  line-height: 1.75;
  font-weight: 900;
}

.print-words {
  margin-top: 18px;
}

.print-words > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.print-words article {
  padding: 10px;
  border: 1px dashed #d8dce7;
  border-radius: 14px;
}

.print-words strong {
  display: block;
  color: #20325a;
  font-size: 20px;
}

.print-words span,
.print-words p {
  color: var(--muted);
}

.muted {
  color: var(--muted);
  line-height: 1.65;
}

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

.vocab-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.vocab-item h3 {
  margin-bottom: 6px;
}

.vocab-item h3 span {
  color: var(--muted);
  font-size: 16px;
}

.vocab-item small {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  padding: 12px 16px;
  border-radius: 999px;
  background: #20325a;
  color: white;
  box-shadow: 0 16px 34px rgba(31, 50, 90, .22);
}

@media (max-width: 820px) {
	  .topbar,
	  .intro-band,
	  .activation-form,
	  .admin-login,
	  .admin-create,
	  .code-table article,
	  .print-toolbar,
	  .print-main,
	  .study-layout,
	  .vocab-item {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    font-size: 32px;
  }

	  .reading-text {
	    font-size: 22px;
	  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  body {
    background: white;
  }

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

  .topbar,
  .toast,
  .print-toolbar {
    display: none !important;
  }

  .print-sheet {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .print-head {
    page-break-after: avoid;
  }

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

  .print-main img {
    max-height: 330px;
  }

  .print-reading {
    font-size: 15pt;
    line-height: 1.55;
  }

  .print-words > div {
    grid-template-columns: repeat(3, 1fr);
  }

  .exercise-section,
  .question-card,
  .answer-box,
  .print-words article {
    break-inside: avoid;
  }

  .question-card,
  .exercise-section,
  .answer-box {
    border-color: #b9c1cf;
  }
}
