:root {
  --bg: #efe6d6;
  --paper: #fffaf3;
  --paper-2: #f7f0e4;
  --ink: #221b15;
  --muted: #6d6258;
  --line: rgba(34, 27, 21, 0.12);
  --red: #a33b2c;
  --red-soft: #f8e6e1;
  --indigo: #1f3d66;
  --indigo-soft: #e6eef8;
  --pine: #215743;
  --pine-soft: #e5f3ec;
  --plum: #6a3148;
  --plum-soft: #f8e8ef;
  --gold: #8a5a28;
  --gold-soft: #f8efd8;
  --ok: #1d7a4a;
  --ok-soft: #e5f6ec;
  --bad: #a33b2c;
  --bad-soft: #fdecea;
  --mark: #ffe08a;
  --shadow: 0 18px 50px rgba(68, 42, 18, 0.1);
  --sans: "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "Noto Serif SC", serif;
  --brush: "Ma Shan Zheng", "Kaiti SC", "STKaiti", cursive;
  --accent: var(--red);
  --accent-soft: var(--red-soft);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
html.big { font-size: 18.5px; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(80, 50, 20, 0.045) 0.7px, transparent 0.8px);
  background-size: 7px 7px;
  min-height: 100vh;
  line-height: 1.65;
}
body.tone-red { --accent: var(--red); --accent-soft: var(--red-soft); }
body.tone-indigo { --accent: var(--indigo); --accent-soft: var(--indigo-soft); }
body.tone-plum { --accent: var(--plum); --accent-soft: var(--plum-soft); }
body.tone-pine { --accent: var(--pine); --accent-soft: var(--pine-soft); }
body.tone-gold { --accent: var(--gold); --accent-soft: var(--gold-soft); }
body.tone-ink { --accent: #3a3128; --accent-soft: #f3eadc; }

::selection { background: #f3c56b; color: var(--ink); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
.skip {
  position: absolute; left: 12px; top: -40px; background: var(--ink); color: white;
  padding: 6px 10px; border-radius: 8px; z-index: 20;
}
.skip:focus { top: 12px; }
.boot { padding: 48px 20px; text-align: center; color: var(--muted); }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 22px;
  background: rgba(239, 230, 214, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-seal, .mini-seal {
  width: 46px; height: 46px; flex: none;
  border: 2px solid var(--red); color: var(--red);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--kai); font-size: 22px;
  transform: rotate(-8deg);
  background: rgba(255, 250, 243, 0.7);
  box-shadow: inset 0 0 0 3px rgba(163, 59, 44, 0.15);
}
.brand b { display: block; font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0.04em; }
.brand small { display: block; color: var(--muted); font-size: 0.75rem; }
.nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nav a, .iconbtn {
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.75);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: var(--ink);
  font-size: 0.88rem;
}
.nav a[aria-current="page"], .iconbtn[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.xp {
  font-variant-numeric: tabular-nums;
  background: var(--ink); color: #fffaf3;
  border-radius: 999px; padding: 0.35rem 0.7rem; font-size: 0.82rem;
}
.badge {
  display: inline-grid; place-items: center;
  min-width: 1.2rem; height: 1.2rem; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: white;
  font-size: 0.72rem; margin-left: 4px;
}

.wrap { width: min(1120px, calc(100% - 28px)); margin: 0 auto; padding: 18px 0 64px; }
.kicker {
  margin: 0 0 6px; color: var(--accent); letter-spacing: 0.14em;
  font-size: 0.78rem; font-weight: 700;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: var(--brush); font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 400; line-height: 1.05; margin-bottom: 8px; }
h2 { font-family: var(--serif); font-size: 1.55rem; line-height: 1.35; margin-bottom: 8px; }
h3 { font-family: var(--serif); font-size: 1.15rem; margin-bottom: 6px; }
.lead { font-size: 1.05rem; max-width: 42rem; color: var(--ink); }
.muted { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.btn {
  border: 1px solid transparent;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn.ghost { background: transparent; color: var(--ink); border-color: rgba(34, 27, 21, 0.2); }
.btn.small { padding: 0.4rem 0.8rem; font-size: 0.88rem; font-weight: 600; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
:focus-visible { outline: 3px solid #c4923a; outline-offset: 2px; }

.hero {
  display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 22px;
  background: var(--paper);
  border-radius: 28px;
  padding: 28px 28px 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(34, 27, 21, 0.06);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; right: -40px; top: -50px;
  width: 180px; height: 180px; border-radius: 50%;
  border: 18px solid rgba(163, 59, 44, 0.08);
}
.weight { margin-top: 18px; }
.bar {
  display: flex; height: 16px; border-radius: 999px; overflow: hidden;
  background: rgba(34, 27, 21, 0.06);
}
.bar i { display: block; height: 100%; }
.bar .ji { background: var(--red); width: 65%; }
.bar .shuo { background: var(--indigo); width: 18%; }
.bar .shi { background: var(--plum); width: 12%; }
.bar .wen { background: var(--pine); width: 5%; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 16px; padding: 0; margin: 10px 0 0; list-style: none; font-size: 0.86rem; }
.legend i {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px;
}
.legend .ji i { background: var(--red); }
.legend .shuo i { background: var(--indigo); }
.legend .shi i { background: var(--plum); }
.legend .wen i { background: var(--pine); }
.note {
  margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--red);
  background: var(--red-soft); border-radius: 0 12px 12px 0; font-size: 0.92rem;
}
.side-card {
  background: var(--paper-2);
  border-radius: 20px;
  padding: 16px;
  align-self: end;
  border: 1px dashed rgba(34, 27, 21, 0.16);
}
.side-card ol { margin: 8px 0 0; padding-left: 1.2rem; }
.side-card li { margin: 6px 0; }
.stars { color: #c6a15b; letter-spacing: 2px; font-size: 1.05rem; }
.stars .off { color: rgba(34, 27, 21, 0.18); }
.statline { display: flex; gap: 14px; margin-top: 16px; font-size: 0.92rem; color: var(--muted); }

.nextcard, .zcard, .fcard, .grow, .paper, .sheet, .cert {
  background: var(--paper);
  border: 1px solid rgba(34, 27, 21, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.nextcard { margin-top: 16px; padding: 16px 18px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.bento {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 14px;
}
.zcard { padding: 18px 18px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; min-height: 150px; position: relative; }
.zcard:hover { transform: translateY(-2px); }
.zcard.ji { grid-row: span 2; min-height: 320px; }
.zcard.boss { grid-column: 1 / -1; min-height: 0; }
.zhead { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.mini-seal { width: 42px; height: 42px; font-size: 20px; border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 3px var(--accent-soft); }
.tone-red { --accent: var(--red); --accent-soft: var(--red-soft); }
.tone-indigo { --accent: var(--indigo); --accent-soft: var(--indigo-soft); }
.tone-plum { --accent: var(--plum); --accent-soft: var(--plum-soft); }
.tone-pine { --accent: var(--pine); --accent-soft: var(--pine-soft); }
.tone-gold { --accent: var(--gold); --accent-soft: var(--gold-soft); }
.tone-ink { --accent: #3a3128; --accent-soft: #f3eadc; }
.weight-tag {
  font-size: 0.78rem; border-radius: 999px; padding: 3px 8px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
}
.modules { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.modules a, .tag {
  text-decoration: none; background: var(--paper-2); border-radius: 12px; padding: 8px 10px;
  display: flex; justify-content: space-between; gap: 8px; font-size: 0.92rem;
}
.tag { display: inline-flex; width: auto; padding: 2px 8px; border-radius: 999px; color: var(--muted); font-size: 0.78rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.today {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: var(--paper); border-radius: 24px; padding: 22px 24px;
  border: 1px solid rgba(34, 27, 21, 0.06); box-shadow: var(--shadow);
}
.today h2 { margin-bottom: 4px; }
.today .muted { margin: 0; }
.home-section { margin-top: 28px; }
.home-section h2 { margin-bottom: 4px; }
.home-section .hint { margin: 0 0 12px; color: var(--muted); }
.grade-row {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px;
}
.grade-row a {
  background: var(--paper); text-decoration: none; text-align: center;
  border-radius: 18px; padding: 18px 8px 14px;
  border: 1px solid rgba(34, 27, 21, 0.06); box-shadow: var(--shadow);
}
.grade-row a:hover { transform: translateY(-2px); }
.grade-row strong {
  display: block; font-family: var(--serif); font-size: 1.8rem; line-height: 1; color: var(--red);
}
.grade-row span { display: block; margin-top: 8px; color: var(--muted); font-size: 0.88rem; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.method-card {
  display: flex; gap: 12px; align-items: flex-start; text-decoration: none;
  background: var(--paper); border-radius: 18px; padding: 16px;
  border: 1px solid rgba(34, 27, 21, 0.06); box-shadow: var(--shadow);
}
.method-card:hover { transform: translateY(-2px); }
.method-card h3 { margin: 0 0 4px; }
.method-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.method-stars { margin-top: 8px !important; }
.shelf { margin: 8px 0 22px; }
.shelf-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.shelf-grid .fcard { min-height: 96px; }
.formula-row { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fcard { padding: 16px; box-shadow: none; }
.fcard strong { font-family: var(--serif); display: block; margin-bottom: 6px; }
.fcard p { margin: 0; }
.foot { margin-top: 22px; color: var(--muted); font-size: 0.82rem; }

.zone-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; margin-bottom: 8px; }
.glist { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.grow { padding: 16px 16px 14px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.grow h3 { margin: 0 0 4px; }
.grow p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.playhead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(34, 27, 21, 0.16); }
.dot.on { background: var(--accent); }
.dot.now { outline: 2px solid var(--accent); outline-offset: 2px; background: var(--accent); }
.clock { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.clock.urgent { color: var(--red); }

.split { display: grid; grid-template-columns: minmax(280px, 390px) 1fr; gap: 16px; align-items: start; }
.passage-col { position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow: auto; }
.passage, .paper { padding: 16px 16px 18px; }
.passage header { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.passage h2 { font-family: var(--kai); font-size: 1.8rem; margin: 0; }
.para { font-family: var(--serif); font-size: 1.08rem; line-height: 1.9; margin: 0 0 10px; }
.para-no {
  display: inline-grid; place-items: center;
  width: 1.45rem; height: 1.45rem; margin-right: 6px;
  border-radius: 50%; background: var(--accent); color: white;
  font-family: var(--sans); font-size: 0.75rem; vertical-align: 2px;
}
.sent {
  border-radius: 4px;
  cursor: pointer;
}
.sent:hover { background: rgba(255, 224, 138, 0.45); }
.sent.on {
  background-image: linear-gradient(#ffe08a, #ffe08a);
  background-repeat: no-repeat;
  background-size: 100% 42%;
  background-position: 0 68%;
}
.sent.ok { box-shadow: inset 0 -2px 0 var(--ok); }
.sent.bad { box-shadow: inset 0 -2px 0 var(--bad); }
.sent.miss { outline: 1px dashed var(--ok); }
.is-dim { opacity: 0.42; }
.is-focus { background: rgba(255, 250, 243, 0.65); border-radius: 10px; box-shadow: inset 3px 0 0 var(--accent); }

.task h2 { font-size: 1.28rem; }
.help, .hint { color: var(--muted); font-size: 0.92rem; }
.hint:empty { display: none; }
.hint { color: var(--red); min-height: 0; }
.board.locked { pointer-events: none; }
.board.armed .bin, .board.armed .slot { outline: 2px dashed var(--accent); outline-offset: 2px; }

.cards, .tray, .opts, .stamps, .checks { display: flex; flex-wrap: wrap; gap: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.qcard, .chip, .opt, .stamp, .check, .pill {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 14px;
  padding: 10px 12px;
  text-align: left;
  line-height: 1.5;
}
.qcard { width: auto; }
.qcard.is-sel, .chip.is-sel, .opt.is-sel, .stamp.is-sel, .pill.is-sel, .check.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}
.qcard.ok, .chip.ok, .opt.ok, .slot.ok, .bin.ok { border-color: var(--ok); background: var(--ok-soft); }
.qcard.bad, .chip.bad, .opt.bad, .slot.bad, .bin.bad { border-color: var(--bad); background: var(--bad-soft); }
.chip.miss { border-style: dashed; border-color: var(--ok); }
.opt small, .qcard small, .bin small { display: block; color: var(--muted); font-size: 0.78rem; }

.bins, .slots, .dual, .film { display: grid; gap: 10px; }
.bins { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 12px; }
.slots { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.bin, .slot, .group, .panel {
  border: 1px dashed rgba(34, 27, 21, 0.22);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 250, 243, 0.55);
  min-height: 92px;
}
.bin, .slot { cursor: pointer; }
.bin { text-align: left; width: 100%; }
.bin b, .slot b, .group b, .panel b { display: block; margin-bottom: 6px; font-size: 0.92rem; }
.slot .placed, .bin .placed {
  display: block; width: 100%; margin-top: 6px;
  border-radius: 12px; border: 1px solid var(--line); background: white; padding: 8px; text-align: left;
}
.tray { margin-top: 12px; }
.chip { max-width: 100%; }

.judge-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.stepills { display: flex; gap: 6px; flex-wrap: wrap; }
.stepill { border-radius: 999px; padding: 3px 8px; background: var(--paper-2); font-size: 0.78rem; }
.stepill.now { background: var(--accent); color: white; }
.stepill.done { background: var(--ok-soft); color: var(--ok); }
.quote {
  font-family: var(--serif); font-size: 1.15rem;
  background: var(--paper-2); border-radius: 14px; padding: 12px 14px; margin: 8px 0 12px;
}

.breakline {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  font-family: var(--kai); font-size: 2rem; line-height: 1; padding: 12px 0 4px;
}
.zi { padding: 6px 0; }
.gutter {
  width: 22px; height: 42px; border: 0; background: transparent; color: transparent;
  border-radius: 6px; position: relative;
}
.gutter:hover { background: rgba(163, 59, 44, 0.08); }
.gutter.on { color: var(--red); font-weight: 700; font-family: var(--sans); font-size: 1.3rem; }
.gutter.ok { color: var(--ok); }
.gutter.bad { color: var(--bad); }
.gutter.miss { color: var(--ok); opacity: 0.85; }
.gloss, details.gloss { margin-top: 8px; color: var(--muted); font-size: 0.92rem; }

.poemv {
  display: flex; flex-direction: row-reverse; justify-content: center; gap: 12px;
  overflow-x: auto; padding: 8px 4px 12px;
}
.pline { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.poemv .zi, .poemv .zbtn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-family: var(--kai); font-size: 1.45rem;
}
.zbtn {
  border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 0;
}
.pline.active .zbtn { border-color: var(--line); background: white; }
.zbtn.is-sel { border-color: var(--red); color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.zbtn.answer { background: var(--red-soft); border-color: var(--red); }
.pline.dim { opacity: 0.45; }
.poem-meta { text-align: center; }
.poem-meta h3 { font-family: var(--kai); font-size: 1.6rem; margin-bottom: 0; }

.memgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.mem { display: block; width: 100%; height: 118px; border: 0; background: transparent; padding: 0; perspective: 800px; border-radius: 14px; }
.mem .inner {
  display: block; position: relative; height: 118px; transform-style: preserve-3d; transition: transform 0.45s ease;
}
.mem.is-up .inner, .mem.is-matched .inner { transform: rotateY(180deg); }
.mem .face {
  position: absolute; inset: 0; backface-visibility: hidden;
  display: grid; place-items: center; text-align: center; padding: 8px;
  border-radius: 14px; border: 1px solid var(--line);
}
.mem .back {
  background:
    repeating-linear-gradient(45deg, rgba(255, 250, 243, 0.18) 0 2px, transparent 2px 8px),
    var(--indigo);
  color: white; font-family: var(--kai); font-size: 1.4rem;
}
.mem .front { transform: rotateY(180deg); background: var(--paper); font-size: 0.92rem; line-height: 1.45; }
.mem.is-matched .front { border-color: var(--ok); background: var(--ok-soft); }

.film { grid-template-columns: repeat(3, 1fr); }
.panel { background: var(--paper); border-style: solid; }
.panel p { font-family: var(--serif); margin: 6px 0 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pill { border-radius: 999px; padding: 4px 8px; background: white; }

.sheet {
  margin-top: 14px; padding: 14px 14px 12px;
  display: grid; grid-template-columns: auto 1fr; gap: 12px;
  position: sticky; bottom: 10px; z-index: 4;
}
.sealbig {
  width: 84px; height: 84px; border-radius: 50%;
  border: 3px solid var(--red); color: var(--red);
  display: grid; place-items: center;
  font-family: var(--kai); font-size: 2rem;
  transform: rotate(-10deg);
  box-shadow: inset 0 0 0 2px rgba(163, 59, 44, 0.25);
  animation: pop 0.35s cubic-bezier(0.2, 1.4, 0.3, 1);
}
.model {
  background: var(--gold-soft); border-radius: 12px; padding: 8px 10px; margin: 8px 0;
}
.model b { font-family: var(--serif); }
.sheet ul { margin: 6px 0; padding-left: 1.1rem; }
.sheet li.ok { color: var(--ok); }
.sheet li.bad { color: var(--bad); }

.cert { padding: 22px; text-align: center; }
.cert h2 { font-family: var(--brush); font-size: 2.4rem; font-weight: 400; }
.cert .stars { font-size: 1.8rem; }
.log { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.log article { padding: 12px 14px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.confetti { pointer-events: none; position: fixed; inset: 0; overflow: hidden; z-index: 30; }
.confetti i {
  position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px;
  animation: fall 1.15s ease-in forwards;
}

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 14px; }
.tabs a { text-decoration: none; border-radius: 999px; padding: 6px 10px; background: rgba(255,250,243,.7); border: 1px solid var(--line); }
.tabs a[aria-current="true"] { background: var(--ink); color: white; border-color: var(--ink); }
.csec h2 { margin-top: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 12px; overflow: hidden; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; font-size: 0.95rem; }
th { background: var(--indigo); color: white; font-weight: 600; }
.formula {
  font-family: var(--serif); background: var(--paper); border-left: 4px solid var(--accent);
  padding: 10px 12px; border-radius: 0 12px 12px 0; margin: 8px 0;
}
.codex .list { padding-left: 1.2rem; }
.codex .list li { margin: 4px 0; }
.csec { display: none; }
.csec.on { display: block; }
.check { flex: 1 1 260px; }
.zi.is-sel, .zi.answer { box-shadow: inset 0 0 0 2px var(--red); border-radius: 8px; }

.miss article { margin-bottom: 10px; }
.empty { padding: 28px 8px; color: var(--muted); }

.shake { animation: shake 0.28s ease; }
@keyframes shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
@keyframes pop {
  from { transform: rotate(-18deg) scale(1.35); opacity: 0; }
  to { transform: rotate(-10deg) scale(1); opacity: 1; }
}
@keyframes fall {
  to { transform: translateY(100vh) rotate(180deg); opacity: 0.2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important; transition: none !important;
  }
}

@media (max-width: 860px) {
  .hero, .bento, .formula-row, .split, .film, .grow, .sheet, .nextcard, .zone-head, .method-grid {
    grid-template-columns: 1fr;
  }
  .grade-row { grid-template-columns: repeat(4, 1fr); }
  .today { align-items: flex-start; flex-direction: column; }
  .zcard.ji, .zcard.boss { grid-column: auto; grid-row: auto; }
  .passage-col { position: static; max-height: none; }
  .playhead { display: block; }
  .brand small { display: none; }
  h1 { font-size: 2.15rem; line-height: 1.2; }
  .brand b { font-size: 0.95rem; }
  .grow { grid-template-columns: 1fr; }
  .topbar { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .nav { width: 100%; justify-content: flex-start; }
  .wrap { width: min(1120px, calc(100% - 20px)); }
}
@media print {
  body { background: white; }
  .topbar, .tabs, .no-print, .skip { display: none !important; }
  .csec { display: block !important; }
  .wrap { width: auto; }
  .sheet, .zcard, .fcard { box-shadow: none; }
}
