:root {
  --paper: #f4efe4;
  --paper-2: #ebe4d4;
  --paper-3: #e3d8c4;
  --sheet: #fbf7ee;
  --ink: #2b2924;
  --ink-soft: #5a554c;
  --muted: #8b8478;
  --line: #d8cfbe;
  --line-strong: #c4b8a2;
  --blue: #5a7a96;
  --blue-deep: #3e5c75;
  --green: #5f8068;
  --amber: #c4893f;
  --coral: #c15b4e;
  --stamp: #a33c36;
  --gold: #c9a227;
  --shadow: 0 12px 40px rgba(60, 48, 30, 0.12);
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "ZCOOL XiaoWei", "STKaiti", "KaiTi", serif;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-cursive: "Ma Shan Zheng", "Zhi Mang Xing", "STXingkai", "华文行楷", "KaiTi", cursive;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
html { color-scheme: light; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(197, 139, 63, 0.08), transparent 50%),
    radial-gradient(900px 500px at 110% 8%, rgba(90, 122, 150, 0.08), transparent 46%),
    linear-gradient(180deg, #f7f2e8 0%, var(--paper) 40%, #efe7d8 100%);
  min-height: 100vh;
  letter-spacing: 0.02em;
}

#grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
}

#app { min-height: 100vh; position: relative; z-index: 1; }
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
a { color: var(--blue-deep); }

.wrap {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 80px;
}
.wrap-wide { width: min(1100px, calc(100% - 28px)); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; }
p { margin: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 700;
  transform: rotate(-6deg);
  background: rgba(163, 60, 54, 0.06);
}
.brand-title { font-family: var(--font-display); font-size: 22px; line-height: 1; }
.brand-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

.ghost, .btn, .btn-text {
  border: 0;
  background: none;
  color: inherit;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 18px rgba(43, 41, 36, 0.16);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.primary { background: var(--blue-deep); }
.btn.green { background: var(--green); }
.btn.stamp {
  background: var(--stamp);
  border-radius: 6px;
  letter-spacing: 0.12em;
}
.btn.amber { background: var(--amber); color: #fff; }
.btn.wide { width: 100%; min-height: 52px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.35);
  color: var(--ink-soft);
  font-size: 13px;
}
.btn-line:hover { background: #fff; }
.btn-text {
  color: var(--ink-soft);
  font-size: 14px;
  padding: 6px 4px;
}
.btn-text:hover { color: var(--ink); }
.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  font-size: 16px;
}

/* Home */
.hero {
  padding: 18px 0 8px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 54px);
  letter-spacing: 0.08em;
}
.hero p {
  margin: 12px auto 0;
  max-width: 520px;
  color: var(--ink-soft);
  line-height: 1.8;
  font-size: 15px;
}
.paste-card {
  margin-top: 28px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  position: relative;
}
.paste-card:before {
  content: "";
  position: absolute;
  top: -10px;
  left: 28px;
  width: 86px;
  height: 22px;
  background: rgba(90, 122, 150, 0.18);
  transform: rotate(-2deg);
}
.paste-card textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  outline: none;
}
.paste-card textarea::placeholder { color: #b3aa9b; }
.paste-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.recent {
  margin-top: 36px;
}
.section-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.recent-list { display: grid; gap: 10px; }
.recent-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255,255,255,.38);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  color: inherit;
}
.recent-item strong { font-weight: 600; }
.recent-item small { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(90, 122, 150, 0.12);
  color: var(--blue-deep);
  font-size: 12px;
}

/* Editor */
.para-list { display: grid; gap: 12px; }
.para-card {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: 0 6px 18px rgba(60,48,30,.05);
}
.para-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}
.para-index {
  font-family: var(--font-display);
  color: var(--stamp);
  letter-spacing: 0.12em;
  font-size: 18px;
}
.para-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.para-body {
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.para-card textarea {
  width: 100%;
  min-height: 110px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 10px;
  font-size: 16px;
  line-height: 1.8;
  background: #fffdf8;
  outline: none;
  resize: vertical;
}
.title-field {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.04em;
  padding: 4px 0 8px;
  outline: none;
  margin-bottom: 18px;
}

.sticky-actions {
  position: sticky;
  bottom: 12px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  padding: 10px;
  background: rgba(244, 239, 228, 0.86);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 14px;
}

/* Mode */
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
.mode-card {
  text-align: left;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 20px 20px;
  box-shadow: var(--shadow);
  color: inherit;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .16s ease;
}
.mode-card:hover { transform: translateY(-3px); }
.mode-card h2 { font-size: 30px; }
.mode-card p { color: var(--ink-soft); line-height: 1.75; flex: 1; }
.mode-kicker { color: var(--amber); letter-spacing: 0.16em; font-size: 12px; }

/* Map */
.handbook {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px 18px 28px;
  position: relative;
  overflow: hidden;
}
.handbook.theme-notes {
  background: #f3efe3;
}
.handbook.theme-scroll {
  background: #e8d7b0;
  border-color: #b08958;
}
.handbook:after {
  content: "";
  position: absolute;
  inset: 10px auto 10px 18px;
  width: 1px;
  background: repeating-linear-gradient(#d9b4b0, #d9b4b0 8px, transparent 8px, transparent 14px);
}
.handbook-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 8px 16px 28px;
  border-bottom: 1px dashed var(--line);
}
.handbook-head h2 { font-size: 30px; }
.star-sum { color: var(--gold); font-size: 18px; letter-spacing: 0.08em; }

.region-list { list-style: none; margin: 8px 0 0; padding: 8px 4px 0 28px; }
.region {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  padding: 16px 8px;
  border-bottom: 1px dashed var(--line);
  position: relative;
  color: inherit;
  width: 100%;
  text-align: left;
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  border-radius: 0;
}
.region:hover { background: rgba(90, 122, 150, 0.05); }
.region.locked { opacity: .45; cursor: not-allowed; }
.region-num {
  width: 44px;
  height: 44px;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 700;
  background: rgba(163,60,54,.05);
}
.region.done .region-num { background: var(--stamp); color: var(--paper); }
.region.current .region-num { box-shadow: 0 0 0 4px rgba(163,60,54,.12); }
.region-preview {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nodes {
  display: flex;
  gap: 7px;
  margin-top: 8px;
  align-items: center;
}
.node {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: transparent;
}
.node.done { background: var(--green); border-color: var(--green); }
.node.current { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 3px rgba(196,137,63,.2); }
.region-stars { margin-top: 6px; color: var(--gold); letter-spacing: 0.12em; font-size: 14px; }

.boss-entry {
  margin: 16px 0 0 28px;
  border: 2px solid var(--ink);
  background: #221f1b;
  color: var(--paper);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: calc(100% - 36px);
}
.boss-entry.locked { opacity: .4; background: transparent; color: var(--ink); border-style: dashed; }

/* Play */
.play-shell { padding-bottom: 28px; }
.para-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 10px;
}
.para-picker label {
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.para-picker select {
  max-width: min(460px, 72vw);
  min-height: 38px;
  padding: 0 34px 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background-color: rgba(255,255,255,.55);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%235a554c' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  appearance: none;
  -webkit-appearance: none;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.para-picker select:focus {
  border-color: var(--blue);
  background-color: #fff;
}
.play-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.play-meta { text-align: center; flex: 1; }
.play-kicker { font-size: 12px; letter-spacing: 0.18em; color: var(--muted); }
.play-title { font-family: var(--font-display); font-size: 26px; margin-top: 2px; }
.play-event {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--stamp);
  letter-spacing: 0.12em;
}

.level-dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 16px; }
.level-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong);
}
.level-dots span.on { background: var(--ink); }
.level-dots span.done { background: var(--green); }

.stage {
  min-height: 42vh;
  display: grid;
  place-items: center;
}
.paper-sheet {
  width: min(860px, 100%);
  min-height: 280px;
  max-height: 58vh;
  overflow: auto;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 36px 40px;
  position: relative;
}
.classroom .paper-sheet {
  padding: 48px 52px 56px;
  min-height: 52vh;
  width: min(1040px, 100%);
}
.passage {
  font-size: 22px;
  line-height: 2.05;
  letter-spacing: 0.06em;
  text-align: justify;
  position: relative;
  z-index: 1;
  word-break: break-word;
}
.classroom .passage { font-size: clamp(28px, 3.2vw, 38px); line-height: 2.15; }
.passage .w, .passage .particle { display: inline; }
.passage .w.pinyin { display: inline-flex; }
.passage .punct { color: var(--ink); }
.passage .sp { white-space: pre-wrap; }

.blank-box {
  display: inline-block;
  min-height: 1.05em;
  border-bottom: 2px solid var(--ink);
  margin: 0 2px;
  vertical-align: baseline;
  background: linear-gradient(180deg, transparent 70%, rgba(90,122,150,.08) 70%);
  cursor: pointer;
  border-radius: 2px;
}
.w.blank.revealed .blank-box { display: none; }
.w.blank.revealed { color: var(--blue-deep); }

.play-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}
.play-bar .left, .play-bar .right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hint-note { font-size: 12px; color: var(--muted); }

/* Event looks */
.stage.ev-traditional .passage { font-family: var(--font-serif); }
.stage.ev-cursive .passage {
  font-family: var(--font-cursive);
  font-size: 1.18em;
  line-height: 1.9;
  letter-spacing: 0.04em;
}
.stage.ev-seal .paper-sheet {
  background: #d9c7a4;
  background-image: radial-gradient(circle at 20% 10%, rgba(80,50,20,.08), transparent 40%);
}
.stage.ev-seal .passage {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.32em;
  writing-mode: vertical-rl;
  height: min(46vh, 22em);
  margin: 0 auto;
  color: #3c2a18;
  text-shadow: 0 0 0.6px #3c2a18;
  line-height: 2.2;
}
.stage.ev-ancient-book .paper-sheet {
  background: #e6d5b0;
  border: 10px solid #6d4a2c;
  box-shadow: inset 0 0 50px rgba(90,50,20,.12), var(--shadow);
  background-image: repeating-linear-gradient(
    to left,
    transparent 0,
    transparent 1.85em,
    rgba(109, 74, 44, 0.18) 1.85em,
    rgba(109, 74, 44, 0.18) calc(1.85em + 1px)
  );
}
.stage.ev-ancient-book .passage,
.stage.ev-vertical .passage {
  writing-mode: vertical-rl;
  height: min(64vh, 680px);
  font-family: var(--font-serif);
  letter-spacing: 0.16em;
  line-height: 2.1;
  margin: 0 auto;
}
.stage.ev-vertical .paper-sheet { background: #f7f1e4; }

.chop {
  display: inline-block;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  padding: 0 .12em;
  margin: 0 .08em;
  line-height: 1.4;
  transform: rotate(-3deg);
  box-shadow: inset 0 0 0 1px var(--stamp);
  font-family: var(--font-serif);
  font-weight: 700;
}
.w.keyword-on { color: var(--ink); font-weight: 700; }
.w.keyword-off, .particle.keyword-off { color: rgba(43,41,36,.16); }
.w.fade-target { animation: fadeSoft 2.8s ease forwards; }
@keyframes fadeSoft {
  0% { opacity: 1; }
  100% { opacity: .08; }
}
.w.fade-target.peek { animation: none; opacity: 1 !important; color: var(--blue-deep); }
.w.mirror { display: inline-block; transform: scaleX(-1); }
.w.shift { display: inline-block; }
.w.size-up { font-size: 1.35em; }
.w.size-down { font-size: 0.78em; opacity: .85; }
.w.blurred { filter: blur(2.2px); }
.w.pinyin {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 1.5em;
  margin: 0 0.12em;
  padding: 0 0.08em 0.04em;
  border-bottom: 2px solid var(--blue);
  vertical-align: baseline;
  line-height: 1.2;
  cursor: pointer;
}
.w.pinyin small {
  font-size: 0.72em;
  color: var(--blue-deep);
  letter-spacing: 0.02em;
  font-family: var(--font-sans);
  font-weight: 500;
}
.w.pinyin.revealed {
  border-bottom-color: var(--blue-deep);
  color: var(--blue-deep);
}
.classroom .w.pinyin small { font-size: 0.58em; }

.fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.fx-layer.interactive { pointer-events: auto; }
.fx-layer svg { width: 100%; height: 100%; display: block; }
.blot, .stain, .paw { cursor: pointer; transition: opacity .4s ease; }

.stage.ev-aged .paper-sheet {
  background: #e3d2ae;
  filter: sepia(.18) contrast(1.05);
  box-shadow: inset 0 0 80px rgba(80,50,20,.18);
}
.stage.ev-aged .passage span:nth-child(3n) { opacity: .72; }
.stage.ev-aged .passage span:nth-child(7n) { opacity: .5; }

.stage.ev-spotlight .paper-sheet { background: #1c1a17; }
.stage.ev-spotlight .passage { color: #f3ead8; }
.spotlight-veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    160px 160px at var(--spot-x, 50%) var(--spot-y, 40%),
    rgba(243,234,216,.08) 0%,
    rgba(12,10,8,.18) 28%,
    rgba(8,7,6,.88) 70%
  );
}

.annot {
  border-bottom: 1px solid var(--stamp);
  background: linear-gradient(transparent 60%, rgba(163,60,54,.12) 60%);
}
.annot-mark {
  font-size: 11px;
  color: var(--stamp);
  font-family: var(--font-cursive);
  margin-left: 2px;
  vertical-align: super;
}

/* Quiz */
.quiz-card {
  width: min(560px, calc(100% - 24px));
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
}
.quiz-card h3 { font-size: 26px; margin-bottom: 8px; }
.quiz-q { font-size: 18px; line-height: 1.8; margin: 12px 0 16px; }
.quiz-options { display: grid; gap: 8px; }
.quiz-opt {
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 16px;
  line-height: 1.6;
}
.quiz-opt:hover { border-color: var(--blue); }
.quiz-opt.correct { background: #e7f0e8; border-color: var(--green); }
.quiz-opt.wrong { background: #f8e8e4; border-color: var(--coral); }
.feedback {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(90,122,150,.08);
  line-height: 1.7;
}

/* Collection */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.collect-item {
  aspect-ratio: 1;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
}
.collect-item.rare { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(201,162,39,.3); }
.collect-item.uncommon { border-color: var(--coral); }
.collect-svg { width: 72px; height: 72px; }
.collect-item strong { font-size: 14px; font-weight: 600; }
.collect-item small { color: var(--muted); font-size: 11px; }

/* Complete */
.ceremony {
  text-align: center;
  padding: 40px 10px;
}
.ceremony h1 { font-size: clamp(36px, 6vw, 56px); }
.big-seal {
  width: 120px;
  height: 120px;
  margin: 18px auto;
  border: 6px solid var(--stamp);
  color: var(--stamp);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 700;
  transform: rotate(-12deg);
  opacity: .9;
}

/* Overlay / toast / modal */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(30, 26, 20, 0.38);
  display: grid;
  place-items: center;
  padding: 20px;
}
#overlay[hidden] { display: none !important; }
.modal {
  width: min(460px, 100%);
  background: var(--sheet);
  border-radius: 16px;
  padding: 22px;
  border: 1px solid var(--line);
}
.modal h3 { font-size: 24px; margin-bottom: 8px; }
.modal p { color: var(--ink-soft); line-height: 1.7; }
.modal .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow);
}
#toast[hidden] { display: none !important; }

.drop-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px dashed var(--gold);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 14px;
}

.help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.classroom-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.diff-seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}
.diff-seg button {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-soft);
}
.diff-seg button.on { background: var(--ink); color: var(--paper); }

.foot-note {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 720px) {
  .mode-grid { grid-template-columns: 1fr; }
  .paper-sheet { padding: 22px 18px; }
  .classroom .paper-sheet { padding: 24px 16px; }
  .passage { font-size: 18px; }
  .classroom .passage { font-size: 22px; }
  .handbook:after { left: 12px; }
  .region-list, .handbook-head, .boss-entry { padding-left: 22px; margin-left: 12px; }
  .boss-entry { width: calc(100% - 20px); }
  .play-title { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
