:root {
  --paper: #f4f0e6;
  --paper-deep: #e9e1d1;
  --sheet: #fffdf7;
  --ink: #25231f;
  --ink-soft: #6f695f;
  --line: rgba(49, 44, 36, 0.18);
  --line-strong: rgba(49, 44, 36, 0.38);
  --blue: #2381bd;
  --blue-soft: #dbeef7;
  --orange: #df7a29;
  --orange-soft: #f6e2cc;
  --red: #c94b3c;
  --green: #557854;
  --gold: #b28a54;
  --shadow: 0 22px 70px rgba(48, 41, 30, 0.1);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: Georgia, "Times New Roman", "Songti SC", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --radius: 24px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.52;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(109, 90, 54, 0.055) 0 0.8px, transparent 0.9px),
    radial-gradient(circle at 76% 64%, rgba(69, 58, 39, 0.045) 0 0.7px, transparent 0.8px);
  background-size: 19px 23px, 27px 31px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--ink-soft);
}

.boot-screen p {
  margin: 0;
  letter-spacing: 0.12em;
  font-size: 14px;
}

.boot-mark {
  width: 70px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 45% 55% 52% 48%;
  background: var(--sheet);
  font: 700 30px var(--serif);
  transform: rotate(-4deg);
  animation: breathe 1.5s ease-in-out infinite alternate;
}

@keyframes breathe {
  to {
    transform: rotate(3deg) translateY(-5px);
  }
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  width: min(calc(100% - 48px), var(--content));
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  border: 0;
  background: transparent;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font: 700 20px var(--serif);
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 31px;
  height: 31px;
  color: var(--green);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mode-pill,
.eyebrow,
.micro-label,
.figure-stamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
}

.mode-pill {
  padding: 8px 12px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.58);
}

.mode-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(178, 138, 84, 0.15);
}

.mode-pill.live .mode-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(85, 120, 84, 0.15);
}

.mode-pill.quota {
  border-style: dashed;
  text-transform: none;
  letter-spacing: 0.04em;
}

.mode-pill.quota.empty {
  color: #a24b3f;
  border-color: rgba(162, 75, 63, 0.5);
  background: rgba(255, 246, 242, 0.7);
}

/* ── 三档界面语言（zh 中文为主 / dual 双语 / en 全英文） ── */
#app .i18n-en { display: none; }
#app[data-lang="dual"] .i18n-en,
#app[data-lang="en"] .i18n-en { display: inline; }
#app[data-lang="en"] .i18n-zh { display: none; }
#app[data-lang="zh"] .i18n-en,
#app[data-lang="dual"] .i18n-en {
  display: inline;
  font-style: italic;
  font-weight: 400;
  margin-left: 6px;
  white-space: normal;
}
#app[data-lang="zh"] .i18n-en { font-size: 0.8em; opacity: 0.72; }
#app[data-lang="dual"] .i18n-en { font-size: 0.92em; opacity: 0.9; }

#app .brand .i18n-zh,
#app .brand .i18n-en { display: block; }
#app[data-lang="zh"] .brand .i18n-en,
#app[data-lang="dual"] .brand .i18n-en {
  margin-left: 0;
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
  white-space: normal;
}

#app .hero h1 .i18n-zh,
#app .hero h1 .i18n-en { display: block; }
#app[data-lang="zh"] .hero h1 .i18n-en,
#app[data-lang="dual"] .hero h1 .i18n-en {
  margin-left: 0;
  margin-top: 14px;
  font-size: 0.34em;
  opacity: 0.75;
  white-space: nowrap;
}
#app[data-lang="dual"] .hero h1 .i18n-en { font-size: 0.5em; opacity: 0.85; }

#app .hero-copy .i18n-en,
#app .collage-note .i18n-en {
  display: block;
  margin-left: 0;
  margin-top: 10px;
  font-size: 0.88em;
  white-space: normal;
}

#app .demo-hint .i18n-en,
#app .preview-approve p .i18n-en {
  display: block;
  margin-left: 0;
  margin-top: 6px;
  font-size: 0.86em;
  opacity: 0.78;
  white-space: normal;
}

#app .mode-pill .i18n-en { font-size: 0.78em; letter-spacing: 0.06em; white-space: nowrap; }
#app .stage-tab .i18n-en { font-size: 0.78em; }
#app .lesson-kicker .i18n-en,
#app .eyebrow .i18n-en { letter-spacing: 0.08em; }

/* 设置弹窗 */
#app .lang-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 24px 18px;
}
#app .lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  font: 500 15px var(--serif);
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.6);
  color: var(--ink);
  cursor: pointer;
}
#app .lang-option.selected { border-color: var(--ink); background: var(--paper); }
#app .lang-option .i18n-en { white-space: normal; }
#app .lang-check { margin-left: auto; color: var(--green); font-weight: 700; }
#app .settings-note { padding: 0 24px 22px; line-height: 1.7; }

.icon-button,
.ghost-button,
.primary-button,
.secondary-button,
.text-button,
.stage-tab,
.chip,
.scene-dot {
  min-height: 44px;
  border: 0;
  cursor: pointer;
}

.icon-button {
  width: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(37, 35, 31, 0.06);
}

.icon-button svg,
.button-icon {
  width: 20px;
  height: 20px;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 650;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-button {
  color: var(--sheet);
  background: var(--ink);
  box-shadow: 0 8px 20px rgba(37, 35, 31, 0.16);
}

.primary-button:hover {
  transform: translateY(-2px) rotate(-0.5deg);
  box-shadow: 0 12px 28px rgba(37, 35, 31, 0.21);
}

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

.secondary-button:hover {
  background: var(--orange-soft);
  transform: translateY(-1px);
}

.ghost-button {
  padding: 0 15px;
  color: var(--ink-soft);
  background: transparent;
}

.ghost-button:hover {
  color: var(--ink);
  background: rgba(37, 35, 31, 0.055);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
  transform: none !important;
  box-shadow: none !important;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(35, 129, 189, 0.25);
  outline-offset: 3px;
}

.home-main {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
  flex: 1;
  padding: 74px 0 90px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(48px, 8vw, 104px);
  align-items: center;
  margin-bottom: 104px;
}

.eyebrow {
  color: var(--blue);
  margin-bottom: 22px;
}

.eyebrow::before {
  content: "";
  width: 35px;
  height: 2px;
  background: var(--blue);
  transform: rotate(-3deg);
}

.hero h1 {
  margin: 0;
  max-width: 650px;
  font: 500 clamp(46px, 6vw, 78px)/1.08 var(--serif);
  letter-spacing: -0.045em;
}

.hero h1 em {
  position: relative;
  color: var(--blue);
  font-style: normal;
  white-space: nowrap;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: -3%;
  right: -2%;
  bottom: -5px;
  height: 9px;
  border-top: 3px solid var(--orange);
  border-radius: 50%;
  transform: rotate(-1.5deg);
}

.hero h1 .i18n-en {
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero h1 .i18n-en em::after {
  content: none;
}

.hero-copy {
  max-width: 560px;
  margin: 28px 0 34px;
  color: var(--ink-soft);
  font: 400 18px/1.9 var(--serif);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions .primary-button,
.hero-actions .secondary-button {
  min-height: 52px;
  padding-inline: 26px;
}

.hero-note {
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.hero-collage {
  position: relative;
  min-height: 490px;
}

.collage-card {
  position: absolute;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--sheet);
  box-shadow: var(--shadow);
}

.collage-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collage-card.main {
  inset: 18px 0 62px 38px;
  border-radius: 48% 52% 46% 54% / 7% 8% 6% 9%;
  transform: rotate(2.2deg);
}

.collage-card.small {
  width: 46%;
  height: 34%;
  left: -22px;
  bottom: 2px;
  z-index: 2;
  border-radius: 8px 22px 12px 18px;
  transform: rotate(-5deg);
}

.collage-note {
  position: absolute;
  right: -14px;
  top: -16px;
  z-index: 3;
  width: 130px;
  padding: 15px 16px;
  color: #3b342b;
  background: #f4d78c;
  box-shadow: 0 10px 24px rgba(70, 54, 27, 0.14);
  font: 600 14px/1.55 var(--serif);
  transform: rotate(4deg);
}

.collage-note::before {
  content: "";
  position: absolute;
  width: 34px;
  height: 12px;
  top: -6px;
  left: 45px;
  background: rgba(255, 251, 232, 0.7);
  transform: rotate(-4deg);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font: 600 clamp(28px, 3vw, 38px) var(--serif);
}

.section-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.pack-grid {
  column-count: 3;
  column-gap: 22px;
}

.pack-grid > * {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: 22px;
}

.pack-card {
  position: relative;
  width: 100%;
  min-height: 285px;
  padding: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px 24px 18px 26px;
  background: rgba(255, 253, 247, 0.75);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.pack-card:hover {
  transform: translateY(-5px) rotate(-0.35deg);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.pack-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-soft);
  font-size: 12px;
}

.level-tag {
  padding: 6px 9px;
  color: var(--blue);
  border: 1px solid rgba(35, 129, 189, 0.26);
  background: var(--blue-soft);
  border-radius: 5px 8px 5px 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.pack-card h3 {
  position: relative;
  z-index: 1;
  margin: 42px 0 10px;
  font: 500 30px/1.18 var(--display);
  letter-spacing: -0.03em;
}

.pack-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.pack-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 13px;
}

.arrow-doodle {
  color: var(--orange);
  font-size: 24px;
  transform: rotate(-8deg);
}

.empty-card {
  min-height: 285px;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 30px;
  color: var(--ink-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  background: transparent;
  cursor: pointer;
}

.empty-card:hover {
  color: var(--ink);
  background: rgba(255, 253, 247, 0.5);
}

.plus-doodle {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 43% 57% 46% 54%;
  font-size: 32px;
  transform: rotate(4deg);
}

.home-footer {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
  padding: 24px 0 32px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.home-footer p {
  margin: 0;
}

/* 学习页 */
.learn-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.learn-header {
  width: min(calc(100% - 48px), 1260px);
  min-height: 72px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

.learn-header .brand {
  font-size: 17px;
}

.word-progress {
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.1em;
  justify-self: center;
  white-space: nowrap;
}

.learn-header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.learn-header-actions .ghost-button,
.learn-header-actions .icon-button {
  flex-shrink: 0;
}

.learn-header-actions .ghost-button .i18n-zh,
.learn-header-actions .ghost-button .i18n-en {
  white-space: nowrap;
}

.stage-rail {
  width: min(calc(100% - 48px), 960px);
  margin: 4px auto 24px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid var(--line);
}

.stage-tab {
  position: relative;
  min-width: 0;
  padding: 12px 4px 16px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
}

.stage-tab strong {
  display: inline-grid;
  width: 24px;
  aspect-ratio: 1;
  margin-right: 6px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font: 600 12px var(--display);
}

.stage-tab.active {
  color: var(--ink);
  font-weight: 700;
}

.stage-tab.active strong {
  color: var(--sheet);
  border-color: var(--blue);
  background: var(--blue);
  transform: rotate(-4deg);
}

.stage-tab.active::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -2px;
  height: 3px;
  border-radius: 50%;
  background: var(--orange);
  transform: rotate(-1.5deg);
}

.lesson-wrap {
  width: min(calc(100% - 48px), 1120px);
  margin: 0 auto;
  padding-bottom: 28px;
  display: grid;
  place-items: center;
}

.lesson-card {
  width: 100%;
  min-height: 560px;
  position: relative;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 30px 24px 32px 22px;
  background: rgba(255, 253, 247, 0.84);
  box-shadow: 0 16px 60px rgba(53, 44, 32, 0.075);
  overflow: hidden;
  animation: page-in 260ms ease both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.lesson-kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.image-stage {
  padding: 24px;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 32px;
  align-items: stretch;
}

.visual-frame {
  position: relative;
  min-height: 500px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px 16px 23px 17px;
  background: #f9f5e9;
}

.visual-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border: 1px solid rgba(37, 35, 31, 0.07);
  border-radius: 16px;
}

.visual-frame img {
  width: 100%;
  height: 100%;
  max-height: 590px;
  object-fit: contain;
  animation: ink-reveal 650ms ease both;
}

@keyframes ink-reveal {
  from {
    opacity: 0;
    filter: grayscale(1) contrast(1.4);
    transform: scale(1.018);
  }
}

.figure-stamp {
  position: absolute;
  left: 20px;
  top: 18px;
  z-index: 2;
  padding: 7px 10px;
  color: var(--ink-soft);
  border: 1px solid rgba(37, 35, 31, 0.12);
  background: rgba(255, 253, 247, 0.86);
  backdrop-filter: blur(8px);
}

.image-aside {
  padding: 26px 22px 22px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.image-aside h2 {
  margin: 12px 0 18px;
  font: 500 clamp(28px, 3vw, 43px)/1.25 var(--serif);
}

.image-aside > p {
  margin: 0;
  color: var(--ink-soft);
  font: 400 15px/1.9 var(--serif);
}

.hint-line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.hint-line p {
  margin: 0;
  color: var(--ink-soft);
  font: 400 15px/1.9 var(--serif);
}
.hint-refresh {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  padding: 1px 0;
  font: 300 10px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(111, 105, 95, 0.55);
  cursor: pointer;
  transition: color 140ms ease;
}
.hint-refresh .button-icon {
  width: 11px;
  height: 11px;
}
.hint-refresh:hover {
  color: var(--ink-soft);
}

.scene-switcher {
  margin: 28px 0 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.scene-dot {
  width: auto;
  min-width: 44px;
  padding: 0 12px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
}

.scene-dot.active {
  color: var(--sheet);
  border-color: var(--ink);
  background: var(--ink);
}

.aside-tools {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.generator-placeholder {
  min-height: 500px;
  width: 100%;
  padding: 44px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.generator-sketch {
  position: relative;
  width: 138px;
  height: 112px;
  margin-bottom: 24px;
}

.generator-sketch::before,
.generator-sketch::after {
  content: "";
  position: absolute;
  border: 2px solid var(--ink);
}

.generator-sketch::before {
  width: 92px;
  height: 70px;
  left: 21px;
  top: 13px;
  border-radius: 44% 56% 51% 49%;
  animation: sketch-wobble 1.5s ease-in-out infinite alternate;
}

.generator-sketch::after {
  width: 112px;
  height: 2px;
  left: 10px;
  top: 91px;
  border-width: 2px 0 0;
  transform: rotate(-3deg);
}

@keyframes sketch-wobble {
  to {
    transform: rotate(4deg) scale(1.03);
    border-color: var(--blue);
  }
}

.generator-placeholder h3 {
  margin: 0 0 9px;
  font: 600 24px var(--serif);
}

.generator-placeholder p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.generation-steps {
  margin: 25px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
}

.generation-steps li {
  padding: 6px 9px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
}

.generation-steps li.done {
  color: var(--green);
  border-color: rgba(85, 120, 84, 0.3);
  background: rgba(85, 120, 84, 0.08);
}

.generation-steps li.active {
  color: var(--blue);
  border-color: rgba(35, 129, 189, 0.3);
  background: var(--blue-soft);
}

.text-stage {
  padding: clamp(38px, 6vw, 76px);
  align-content: center;
}

.text-stage-inner {
  width: min(100%, 800px);
  margin: 0 auto;
}

.stage-number {
  display: inline-grid;
  width: 42px;
  aspect-ratio: 1;
  margin-bottom: 24px;
  place-items: center;
  color: var(--sheet);
  background: var(--blue);
  border-radius: 47% 53% 43% 57%;
  font: 700 17px var(--display);
  transform: rotate(-5deg);
}

.text-stage h2 {
  margin: 0 0 24px;
  font: 500 clamp(30px, 4.2vw, 52px)/1.35 var(--serif);
}

.text-stage .lead {
  margin: 0 0 30px;
  color: var(--ink-soft);
  font: 400 18px/1.9 var(--serif);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.chip {
  padding: 0 17px;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: 999px 999px 999px 10px;
  background: var(--sheet);
}

.chip:hover,
.chip.selected {
  color: var(--ink);
  border-color: var(--orange);
  background: var(--orange-soft);
}

.answer-field {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 17px 18px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 14px 18px 12px 20px;
  background: rgba(255, 253, 247, 0.72);
  line-height: 1.7;
}

.answer-field::placeholder,
.create-form textarea::placeholder {
  color: #aaa296;
}

.word-reveal {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.word-reveal h2 {
  margin: 0;
  color: var(--blue);
  font: 700 clamp(58px, 9vw, 112px)/0.95 var(--display);
  letter-spacing: -0.055em;
}

.pos-tag {
  color: var(--orange);
  font: italic 18px var(--display);
}

.phonetic-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--ink-soft);
  font: 20px var(--display);
}

.definition {
  margin: 0;
  font: 400 clamp(20px, 2.2vw, 28px)/1.85 var(--serif);
}

.usage-hook {
  position: relative;
  margin-top: 30px;
  padding: 18px 20px 18px 50px;
  color: #574a38;
  background: var(--orange-soft);
  border-radius: 7px 18px 10px 16px;
  font: 400 15px/1.8 var(--serif);
}

.usage-hook::before {
  content: "↳";
  position: absolute;
  left: 18px;
  top: 15px;
  color: var(--orange);
  font: 700 25px var(--display);
  transform: rotate(8deg);
}

.example-list { display: flex; flex-direction: column; gap: 14px; }
.example-card {
  position: relative;
  padding: clamp(26px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: 16px 24px 17px 22px;
  background: #f9f5e9;
}

.quote-mark {
  position: absolute;
  right: 24px;
  top: -23px;
  color: rgba(35, 129, 189, 0.16);
  font: 700 120px/1 var(--display);
}

.example-en {
  position: relative;
  margin: 0 0 20px;
  font: 500 clamp(28px, 4vw, 48px)/1.42 var(--display);
}

.example-en mark {
  color: var(--blue);
  background: linear-gradient(transparent 72%, rgba(223, 122, 41, 0.26) 0);
}

.example-zh {
  margin: 0;
  color: var(--ink-soft);
  font: 400 18px/1.8 var(--serif);
}

.example-actions {
  margin-top: 26px;
  display: flex;
  gap: 10px;
}

.lesson-dock {
  position: sticky;
  bottom: 0;
  z-index: 10;
  padding: 14px 24px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(244, 240, 230, 0.88);
  backdrop-filter: blur(18px);
}

.dock-inner {
  width: min(100%, 960px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.dock-inner > :last-child {
  justify-self: end;
}

.dock-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dock-dot {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: rgba(37, 35, 31, 0.18);
  cursor: pointer;
}

.dock-dot.active {
  width: 24px;
  border-radius: 999px;
  background: var(--orange);
}

/* 游戏 */
.game-main {
  width: min(calc(100% - 48px), 1120px);
  margin: 0 auto;
  flex: 1;
  padding: 56px 0 88px;
}

.game-hero {
  max-width: 760px;
  margin-bottom: 44px;
}

.game-hero h1 {
  margin: 10px 0 16px;
  font: 500 clamp(42px, 6vw, 72px)/1.12 var(--serif);
}

.game-hero p {
  margin: 0;
  color: var(--ink-soft);
  font: 400 18px/1.8 var(--serif);
}

.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.game-card {
  position: relative;
  min-height: 390px;
  padding: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 20px 30px 24px 19px;
  background: rgba(255, 253, 247, 0.82);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.game-card:hover {
  transform: translateY(-5px) rotate(-0.35deg);
  box-shadow: var(--shadow);
}

.game-number {
  color: var(--blue);
  font: 700 64px/1 var(--display);
}

.game-card h2 {
  margin: 40px 0 12px;
  font: 600 35px var(--serif);
}

.game-card p {
  max-width: 440px;
  margin: 0 0 32px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.game-card .arrow-doodle {
  margin-top: auto;
}

.game-card-art {
  position: absolute;
  width: 170px;
  height: 170px;
  right: -34px;
  top: -24px;
  border: 2px solid rgba(37, 35, 31, 0.1);
  border-radius: 50%;
}

.game-card-art::before,
.game-card-art::after {
  content: "";
  position: absolute;
  background: rgba(35, 129, 189, 0.15);
}

.game-card-art::before {
  width: 84px;
  height: 2px;
  left: 22px;
  top: 88px;
  transform: rotate(28deg);
}

.game-card-art::after {
  width: 22px;
  height: 22px;
  left: 76px;
  top: 74px;
  border-radius: 50%;
}

.play-card {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: 28px 20px 31px 23px;
  background: rgba(255, 253, 247, 0.84);
  box-shadow: var(--shadow);
}

.play-topline {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.play-topline h1 {
  margin: 0;
  font: 600 26px var(--serif);
}

.play-figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px 12px 19px 13px;
  background: #f9f5e9;
}

.play-figure img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
}

.play-question {
  padding: 30px 4px 0;
}

.play-question h2 {
  margin: 0 0 20px;
  font: 500 clamp(26px, 4vw, 40px)/1.4 var(--serif);
}

.inline-answer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.inline-answer input {
  min-height: 50px;
  min-width: 0;
  padding: 0 16px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--sheet);
}

.reveal-panel {
  margin-top: 20px;
  padding: 22px;
  border-left: 4px solid var(--orange);
  background: var(--orange-soft);
  animation: page-in 240ms ease both;
}

.reveal-panel strong {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font: 700 30px var(--display);
}

.reveal-panel p {
  margin: 0;
  font: 400 15px/1.8 var(--serif);
}

.dual-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dual-figures .play-figure {
  min-height: 280px;
  display: grid;
  place-items: center;
}

.dual-figures .play-figure img {
  height: 100%;
  max-height: 360px;
}

.play-footer {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* 对话框和提示 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(32, 29, 24, 0.34);
  backdrop-filter: blur(9px);
  animation: fade-in 160ms ease both;
}

@keyframes fade-in {
  from { opacity: 0; }
}

.modal {
  width: min(100%, 720px);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 24px 18px 28px 21px;
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(24, 21, 17, 0.25);
  animation: modal-in 220ms ease both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(-0.4deg);
  }
}

.modal-header {
  padding: 26px 30px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font: 600 28px var(--serif);
}

.create-form {
  padding: 28px 30px 32px;
}

.form-row {
  margin-bottom: 22px;
}

.form-row label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.form-help {
  float: right;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 400;
}

.create-form textarea,
.create-form select {
  width: 100%;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: var(--sheet);
}

.create-form textarea {
  min-height: 190px;
  padding: 16px;
  resize: vertical;
  border-radius: 13px 18px 14px 20px;
  line-height: 1.65;
}

.create-form select {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
}

.demo-hint {
  margin: 4px 0 24px;
  padding: 14px 16px;
  color: #5c4b35;
  background: #eee2ca;
  border-radius: 8px 13px 9px 15px;
  font: 400 13px/1.7 var(--serif);
}

.form-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  color: #7e3129;
  border: 1px solid rgba(201, 75, 60, 0.24);
  border-radius: 10px;
  background: rgba(201, 75, 60, 0.08);
  font-size: 13px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(244, 240, 230, 0.84);
  backdrop-filter: blur(12px);
}

.busy-card {
  padding: 36px;
  text-align: center;
}

.busy-card h2 {
  margin: 18px 0 8px;
  font: 600 27px var(--serif);
}

.busy-card p {
  margin: 0;
  color: var(--ink-soft);
}

.ink-spinner {
  width: 66px;
  height: 66px;
  margin: 0 auto;
  border: 3px solid rgba(37, 35, 31, 0.12);
  border-top-color: var(--blue);
  border-right-color: var(--orange);
  border-radius: 45% 55% 53% 47%;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 100;
  max-width: min(520px, calc(100% - 32px));
  padding: 12px 18px;
  color: var(--sheet);
  border-radius: 999px;
  background: rgba(37, 35, 31, 0.94);
  box-shadow: 0 12px 32px rgba(37, 35, 31, 0.2);
  transform: translateX(-50%);
  font-size: 13px;
  animation: toast-in 200ms ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    margin-bottom: 74px;
  }

  .hero-collage {
    width: min(100%, 610px);
    min-height: 430px;
    margin: 0 auto;
  }

  .pack-grid {
    column-count: 2;
  }

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

  .image-aside {
    padding: 0 14px 16px;
  }

  .visual-frame,
  .generator-placeholder {
    min-height: 420px;
  }
}

@media (max-width: 680px) {
  .site-header,
  .home-main,
  .home-footer,
  .learn-header,
  .stage-rail,
  .lesson-wrap,
  .game-main {
    width: min(calc(100% - 28px), var(--content));
  }

  .site-header {
    min-height: 68px;
  }

  .brand {
    font-size: 17px;
  }

  .brand-mark {
    width: 27px;
  }

  .mode-pill span:last-child {
    display: none;
  }

  .home-main {
    padding-top: 48px;
  }

  .hero {
    gap: 42px;
  }

  .hero h1 {
    font-size: clamp(42px, 13vw, 62px);
  }

  .hero-copy {
    font-size: 16px;
  }

  .hero-collage {
    min-height: 330px;
  }

  .collage-card.main {
    inset: 12px 0 44px 22px;
  }

  .collage-note {
    right: 0;
    width: 112px;
    font-size: 12px;
  }

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

  .game-grid,
  .dual-figures {
    grid-template-columns: 1fr;
  }

  .pack-grid {
    column-count: 1;
  }

  .home-footer {
    flex-direction: column;
  }

  .learn-header {
    min-height: 64px;
    grid-template-columns: 1fr auto;
  }

  .learn-header .word-progress {
    display: none;
  }

  .learn-header-actions {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .stage-rail {
    margin-bottom: 14px;
  }

  .stage-tab {
    padding-inline: 2px;
    font-size: 0;
  }

  .stage-tab strong {
    margin: 0;
    font-size: 12px;
  }

  .lesson-card {
    min-height: 530px;
  }

  .image-stage {
    padding: 12px;
    gap: 18px;
  }

  .visual-frame,
  .generator-placeholder {
    min-height: 340px;
  }

  .text-stage {
    padding: 34px 24px;
  }

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

  .dock-inner .ghost-button span,
  .dock-inner .primary-button span {
    display: none;
  }

  .dock-inner .primary-button,
  .dock-inner .ghost-button {
    width: 46px;
    padding: 0;
  }

  .game-main {
    padding-top: 38px;
  }

  .game-card {
    min-height: 330px;
    padding: 28px;
  }

  .play-card {
    padding: 14px;
  }

  .inline-answer {
    grid-template-columns: 1fr;
  }

  .dual-figures .play-figure {
    min-height: 220px;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal {
    max-height: calc(100vh - 20px);
  }

  .modal-header,
  .create-form {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ── Mode cards ── */
.section-title {
  font: 600 18px var(--serif);
  margin: 0 0 16px;
}
.mode-cards {
  padding: 24px 0 0;
}
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mode-card {
  all: unset;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px;
  border: 1.5px solid var(--paper-shade);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  background: var(--paper);
}
.mode-card:hover { border-color: var(--ink); box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.mode-card.teach:hover { border-color: var(--cobalt); }
.mode-card.learn:hover { border-color: var(--warm-orange); }
.mode-icon { font-size: 32px; flex-shrink: 0; line-height: 1; }
.mode-body { text-align: left; }
.mode-body h3 { margin: 0 0 4px; font: 600 17px var(--serif); }
.mode-body p { margin: 0 0 8px; font-size: 14px; color: #555; line-height: 1.6; }
.mode-meta { font-size: 12px; color: #999; }
.mode-cta { display: block; margin-top: 8px; font-size: 14px; font-weight: 600; }

/* ── Preview ── */
.preview-main { max-width: 880px; margin: 0 auto; padding: 32px 24px 120px; }
.preview-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 16px;
}
.preview-top h1 { margin: 4px 0 8px; font: 600 26px var(--serif); }
.preview-words { display: flex; flex-direction: column; gap: 16px; }
.preview-word {
  border: 1px solid var(--paper-shade);
  border-radius: 12px;
  overflow: hidden;
}
.preview-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.preview-summary::-webkit-details-marker { display: none; }
.preview-index { font: 600 14px var(--mono); color: #999; min-width: 24px; }
.preview-summary strong { font: 600 18px var(--serif); }
.badge-warn {
  margin-left: auto;
  font: 600 11px var(--mono);
  color: #8a5a00;
  background: #fff3d6;
  border: 1px solid #e8c77a;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.critic-warning {
  margin: 0 0 16px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #7a4a00;
  background: #fff8e6;
  border: 1px solid #ecd9a8;
  border-radius: 8px;
}
.badge-done { font-size: 12px; margin-left: auto; }
.badge-pending { font-size: 12px; margin-left: auto; color: var(--warm-orange); }
.phonetic-dim { font-size: 13px; color: #999; }
.preview-detail { padding: 0 20px 20px; }
.preview-scenes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.preview-scene { margin: 0; }
.preview-image-shell {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  border-radius: 8px;
  background: var(--paper-shade);
}
.preview-scene img { display: block; width: 100%; border-radius: 8px; border: 1px solid var(--paper-shade); }
.preview-scene figcaption { margin-top: 8px; font-size: 13px; line-height: 1.6; }
.preview-no-image .ghost-button { margin-top: 10px; }
.preview-no-image {
  aspect-ratio: 3 / 2;
  background: var(--paper-shade);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #999;
  text-align: center;
  line-height: 2;
}
.image-progress-overlay {
  position: absolute;
  inset: auto 10px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  color: #3f382d;
  background: rgba(255, 253, 247, .93);
  border: 1px solid rgba(90, 79, 61, .18);
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(42, 36, 28, .12);
  font-size: 12px;
  backdrop-filter: blur(8px);
}
.mini-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: qa-spin .8s linear infinite;
}
@keyframes qa-spin { to { transform: rotate(360deg); } }
.qa-inline,
.qa-status-row,
.qa-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.qa-inline {
  justify-content: space-between;
  margin: 10px 0 12px;
  padding: 8px 0;
  border-top: 1px dashed var(--paper-shade);
  border-bottom: 1px dashed var(--paper-shade);
}
.qa-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #6a6256;
  background: #f2efe6;
  font: 600 11px var(--mono);
  white-space: nowrap;
}
.qa-badge.passed,
.qa-badge.skipped,
.qa-badge.accepted { color: #315b41; background: #e8f3e9; }
.qa-badge.failed { color: #824a16; background: #fff0d9; }
.qa-badge.unavailable { color: #655c51; background: #ece8df; }
.qa-panel {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #e5c58f;
  border-radius: 9px;
  background: #fff8ea;
}
.qa-panel.unavailable { border-color: #d8d1c5; background: #f7f4ed; }
.qa-panel p { margin: 8px 0; color: #66543e; font-size: 12px; line-height: 1.65; }
.qa-layer { color: #8a5a24; font: 600 11px var(--mono); }
.qa-actions .compact { min-height: 34px; padding: 6px 12px; font-size: 12px; }
.qa-more { position: relative; }
.qa-more > summary {
  cursor: pointer;
  color: #777064;
  font-size: 12px;
  list-style: none;
  user-select: none;
}
.qa-more > summary::-webkit-details-marker { display: none; }
.qa-more > summary::after { content: " ···"; letter-spacing: 1px; }
.qa-more-menu {
  display: grid;
  gap: 4px;
  min-width: 185px;
  margin-top: 7px;
  padding: 7px;
  background: #fffdf7;
  border: 1px solid var(--paper-shade);
  border-radius: 9px;
  box-shadow: 0 8px 24px rgba(45, 39, 30, .12);
}
.qa-more-menu .ghost-button {
  justify-content: flex-start;
  min-height: 32px;
  padding: 5px 9px;
  border: 0;
  font-size: 12px;
}
.variant-trigger { margin-top: 10px; }
.variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.variant-card {
  position: relative;
  border: 2px solid var(--paper-shade);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.variant-card.selected { border-color: #1a5dff; }
.variant-card.picked { border-color: var(--green); }
.variant-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.variant-pick-toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  background: rgba(255, 253, 247, 0.92);
  border-radius: 999px;
  font-size: 11px;
  color: var(--ink-soft);
  cursor: pointer;
}
.variant-pick-toggle input {
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}
.variant-pick-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.variant-pick-row .secondary-button {
  min-height: 36px;
  padding: 0 16px;
  font-size: 13px;
}
.variant-copy {
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.55;
  max-height: 108px;
  overflow: hidden;
}
.variant-copy p { margin: 0 0 4px; }
.variant-copy .dim { font-size: 11px; }
.variant-qa-warn {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #a33;
}
.variant-card.selected .variant-qa-warn { color: #a33; }
.variant-card .ghost-button {
  width: 100%;
  border-radius: 0;
  font-size: 12px;
  padding: 8px 6px;
}
.variant-card.selected .ghost-button { color: #1a5dff; font-weight: 600; }
.preview-fields { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.preview-fields dt { font: 600 12px var(--mono); color: #999; text-transform: uppercase; letter-spacing: .5px; }
.preview-fields dd { margin: 0 0 8px; font-size: 14px; line-height: 1.6; }
.preview-fields dd.dim { color: #888; font-size: 13px; }
.preview-approve {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--paper-shade);
}
.preview-approve p { margin: 0; font-size: 13px; color: #888; line-height: 1.6; }
.preview-approve .primary-button { flex: 0 0 auto; }
.preview-approve .secondary-button { flex: 0 0 auto; }
.preview-approve .secondary-button .btn-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.15;
}
.preview-approve .secondary-button .btn-label .i18n-en {
  margin-left: 0;
  font-size: 0.72em;
  opacity: 0.8;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .mode-grid { grid-template-columns: 1fr; }
  .preview-scenes { grid-template-columns: 1fr; }
  .preview-top { flex-direction: column; }
}

@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;
  }
}
.history-link-row { margin-top: 10px; }
.history-link-row .ghost-button { font-size: 13px; }
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.history-card {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid var(--paper-shade);
  border-radius: 10px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: box-shadow .15s ease, transform .15s ease;
}
.history-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.9);
  color: #b0a890;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.history-delete:hover { color: #b04a3a; background: #f6e3df; }
.history-delete svg { width: 14px; height: 14px; }
.history-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-2px); }
.history-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.history-meta { padding: 8px 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.history-meta strong { font: 600 13px var(--serif); }
.history-meta .dim { font-size: 11px; }
.history-card .ghost-button {
  width: 100%;
  border-radius: 0;
  font-size: 12px;
  padding: 9px 6px;
}
.history-card .ghost-button:disabled { opacity: .55; cursor: default; }
.history-no-meta { padding: 0 10px 12px; font-size: 11px; text-align: center; }
.variant-usage {
  margin: 4px 0 0;
  font-size: 11px;
  color: #1a5dff;
}
.feeling-bridge {
  margin: 6px 0 14px;
  padding: 10px 12px;
  font-size: 14px;
  color: #4a4a3a;
  background: #f1efe2;
  border-radius: 8px;
}
.feeling-bridge span { font-weight: 600; }
.distractor-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.7;
  color: #6b4a00;
  background: #fff4d6;
  border: 1px solid #ecd9a8;
  border-radius: 8px;
}
.example-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  font: 600 11px var(--mono);
  color: #8a6a1a;
  background: #f6eeda;
  border: 1px solid #e3d3a8;
  border-radius: 999px;
  vertical-align: 2px;
}
.scene-official-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.scene-official-row .ghost-button { font-size: 12px; }
.scene-order-btns {
  display: inline-flex;
  gap: 2px;
}
.scene-order-btns .scene-move {
  width: 26px;
  height: 26px;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
  color: var(--ink-soft);
}
.scene-order-btns .scene-move:disabled {
  opacity: 0.35;
}
.official-badge {
  display: inline-block;
  font: 600 12px var(--serif);
  color: #1a5dff;
}
.cloze-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
}
.cloze-input {
  font: inherit;
  color: #3a3a2e;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(26, 93, 255, 0.4);
  padding: 0 2px;
  min-width: 7ch;
  max-width: 22ch;
  outline: none;
  caret-color: #1a5dff;
  transition: border-color .15s ease;
}
.cloze-input::placeholder {
  font-style: italic;
  font-weight: 300;
  color: rgba(0, 0, 0, 0.32);
}
.cloze-input:focus { border-bottom-color: rgba(26, 93, 255, 0.85); }
.cloze-hint {
  font-size: 12px;
  font-weight: 300;
  font-style: italic;
  color: rgba(0, 0, 0, 0.4);
  margin: 4px 0 0;
}
.cloze-hint-button {
  background: none;
  border: none;
  color: rgba(0, 0, 0, 0.4);
  font-size: 12px;
  font-weight: 300;
  font-style: italic;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 10px;
}
.cloze-feedback {
  font-size: 14px;
  line-height: 1.7;
  color: #4a4a3a;
  background: #f1efe2;
  border-radius: 8px;
  padding: 8px 10px;
}
.usage-list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.usage-card {
  padding: 14px 16px;
  border: 1px solid var(--paper-shade);
  border-radius: 10px;
  background: #fff;
}
.usage-card.right { border-color: #7fae7f; background: #f3faf1; }
.usage-card.wrong { border-color: #d9a8a0; background: #fdf5f3; }
.usage-situation { font: 500 16px var(--serif); line-height: 1.7; margin: 0 0 10px; }
.usage-actions { display: flex; gap: 10px; }
.usage-actions .ghost-button.selected {
  border-color: #1a5dff;
  color: #1a5dff;
  font-weight: 600;
}
.usage-verdict {
  font-size: 13px;
  font-weight: 600;
  color: #4a7a3a;
  margin: 0 0 6px;
}
.usage-card.wrong .usage-verdict { color: #a04a3a; }
.usage-explanation {
  font-size: 13px;
  line-height: 1.7;
  color: #55503f;
  margin: 0;
}
.usage-summary {
  margin-top: 14px;
  padding: 10px 12px;
  font-size: 13px;
  color: #4a4a3a;
  background: #f1efe2;
  border-radius: 8px;
}
.stage5-context {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 18px;
  padding: 12px 14px;
  background: #fbf9f1;
  border: 1px solid var(--paper-shade);
  border-radius: 12px;
}
.stage5-thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  flex: 0 0 auto;
}
.stage5-context h2 { font: 600 26px var(--serif); margin: 0; }
.stage5-context .definition-sm { font-size: 14px; line-height: 1.7; color: #55503f; margin: 4px 0 0; }
.usage-ask { font: 600 20px var(--serif); margin: 0 0 6px; }
.confirm-body { padding: 6px 24px 16px; font-size: 14px; line-height: 1.8; color: #4a4a3a; }
.confirm-actions { display: flex; gap: 10px; padding: 0 24px 20px; }
.variant-domain {
  margin: 4px 0 0;
  font-size: 11px;
  color: #8a6a1a;
}
.pack-card-wrap { position: relative; }
.pack-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(244, 240, 230, 0.9);
  color: #b0a890;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .15s ease, color .15s ease;
}
.pack-card-wrap:hover .pack-delete { opacity: 1; }
.pack-delete:hover { color: #b04a3a; background: #f6e3df; }
.pack-edit {
  position: absolute;
  top: 8px;
  right: 40px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(244, 240, 230, 0.9);
  color: #b0a890;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .15s ease, color .15s ease;
}
.pack-card-wrap:hover .pack-edit { opacity: 1; }
.pack-edit:hover { color: #1a5dff; background: #e8eefb; }
.preview-word-actions { margin-top: 8px; }
.usage-zh-toggle {
  margin-top: 8px;
  background: none;
  border: none;
  color: rgba(0, 0, 0, 0.4);
  font-size: 12px;
  font-weight: 300;
  text-decoration: underline;
  cursor: pointer;
  padding: 2px 4px;
}
.usage-explanation-zh {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: #8a8472;
}
.variant-corecheck {
  margin: 4px 0 0;
  font-size: 11px;
  color: #77705c;
  line-height: 1.5;
}
.save-mode-options { display: flex; gap: 18px; margin-top: 6px; }
.save-mode { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.save-mode input { accent-color: #1a5dff; }
.pack-count { font: 600 12px var(--mono); color: var(--ink-soft); }
.pack-name-row .pack-name-inputs,
.save-new-row .pack-name-inputs {
  display: flex;
  gap: 10px;
  align-items: center;
}
.pack-name-inputs input[type="text"] { flex: 1 1 0; min-width: 0; width: auto; }
.pack-name-inputs .pack-category { flex: 0 0 140px; }
