/* 拾级英语 · 官网
   版式：一幅立轴。纸是空的，画只在右下角；往下滚是往上走。
   每一节是一个数（六级、五遍、六种、一本），毛笔只写这些数和口号，其余是宋体；
   红只用在印上和「到了」的地方。颜色、字体都从下面这组变量取。 */

@font-face { font-family: "Shiji Brush"; src: url(assets/fonts/brush.woff2?v=975f55b3) format("woff2"); font-display: swap; }
@font-face { font-family: "Shiji Song"; src: url(assets/fonts/song.woff2?v=235591fb) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(assets/fonts/fraunces.woff2?v=1b28c096) format("woff2"); font-weight: 600 900; font-display: swap; }
@font-face { font-family: "Andika"; src: url(assets/fonts/andika.woff2?v=fb934856) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Andika"; src: url(assets/fonts/andika-bold.woff2?v=0eb6cf72) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #FBF5EA;
  --surface: #FFFDF8;
  --edge: #E3D8C6;
  --silk: #DDD0B6;
  --ink: #3B2A20;
  --ink-soft: rgba(59, 42, 32, .74);
  --ink-faint: rgba(59, 42, 32, .5);
  --red: #C8432B;
  --seal: #BD3A24;
  --on-seal: #FFF6E8;
  --rule: rgba(200, 67, 43, .4);
  --bar: #1C1612;
  --on-bar: #FFFFFF;
  --amber: #FFD27A;
  --on-amber: #3B2A20;
  --good: #2F8F4E;
  --again: #D9601A;
  --star: #F2A91E;
  --blue: #3F7EC0;
  --you: rgba(200, 67, 43, .075);
  --you-edge: rgba(200, 67, 43, .5);
  --shadow: 0 1px 2px rgba(74, 48, 30, .08), 0 18px 44px -16px rgba(74, 48, 30, .26);
  --wood-1: #6B4630;
  --wood-2: #A07250;
  --wood-3: #47291A;
  --painting: url(assets/img/painting-light.webp?v=5c4dc388);

  --f-brush: "Shiji Brush", "Kaiti SC", "STKaiti", "KaiTi", serif;
  --f-song: "Shiji Song", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --f-latin: "Fraunces", Georgia, "Times New Roman", serif;
  --f-read: "Andika", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;

  --gut-l: max(22px, env(safe-area-inset-left, 0px));
  --gut-r: max(22px, env(safe-area-inset-right, 0px));
  --pop: cubic-bezier(.3, 1.6, .5, 1);
  --settle: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1B1713; --surface: #26201A; --edge: #3A3129; --silk: #332A22;
    --ink: #EDE3D2; --ink-soft: rgba(237, 227, 210, .74); --ink-faint: rgba(237, 227, 210, .5);
    --red: #E0694F; --seal: #C9482F; --on-seal: #FFF1E0; --rule: rgba(224, 105, 79, .42);
    --bar: #0F0C09; --on-bar: #F3EADB; --amber: #FFD27A; --on-amber: #2A1D15;
    --good: #8FD6A0; --again: #FFB673; --star: #F2C14E; --blue: #8DB8EC;
    --you: rgba(224, 105, 79, .13); --you-edge: rgba(224, 105, 79, .6);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 44px -16px rgba(0, 0, 0, .6);
    --wood-1: #5A3A27; --wood-2: #7E583D; --wood-3: #2E1B11;
    --painting: url(assets/img/painting-dark.webp?v=23eadd6f);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1B1713; --surface: #26201A; --edge: #3A3129; --silk: #332A22;
  --ink: #EDE3D2; --ink-soft: rgba(237, 227, 210, .74); --ink-faint: rgba(237, 227, 210, .5);
  --red: #E0694F; --seal: #C9482F; --on-seal: #FFF1E0; --rule: rgba(224, 105, 79, .42);
  --bar: #0F0C09; --on-bar: #F3EADB; --amber: #FFD27A; --on-amber: #2A1D15;
  --good: #8FD6A0; --again: #FFB673; --star: #F2C14E; --blue: #8DB8EC;
  --you: rgba(224, 105, 79, .13); --you-edge: rgba(224, 105, 79, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 44px -16px rgba(0, 0, 0, .6);
  --wood-1: #5A3A27; --wood-2: #7E583D; --wood-3: #2E1B11;
  --painting: url(assets/img/painting-dark.webp?v=23eadd6f);
  color-scheme: dark;
}

/* ---------- 底子 ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.calm { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.85 var(--f-song);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}
img { max-width: 100%; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.brush { font-family: var(--f-brush); font-weight: 400; }
.wrap { max-width: 1164px; margin-inline: auto; padding-left: var(--gut-l); padding-right: var(--gut-r); }
[lang="en"] { letter-spacing: 0; }

/* 印：一方红，白文，边是毛的 */
.seal {
  display: inline-grid; place-items: center; flex: none;
  background: var(--seal); color: var(--on-seal);
  font-family: var(--f-brush); font-style: normal; font-weight: 400; line-height: 1; letter-spacing: 0;
  border-radius: 3px; writing-mode: vertical-rl;
  filter: url(#seal-worn);
}
.seal-s { width: 26px; height: 26px; font-size: 18px; }
.seal-m { width: 1.42em; height: 1.42em; font-size: 28px; }

/* ---------- 页眉 ---------- */

.top {
  position: absolute; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gut-r) 0 var(--gut-l);
}
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: .16em; font-size: 16px; }
.top-nav { margin-left: auto; display: flex; gap: clamp(16px, 2.2vw, 30px); font-size: 15px; letter-spacing: .2em; }
.top-nav a { color: var(--ink-soft); text-decoration: none; padding: 6px 0; background: linear-gradient(var(--red), var(--red)) left bottom / 0 1.5px no-repeat; transition: background-size .3s var(--settle), color .2s; }
.top-nav a:hover { color: var(--ink); background-size: 100% 1.5px; }
.top-tools { display: flex; gap: 8px; }
.tool {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--edge); background: transparent;
  color: var(--ink-soft); font: 600 13px/1 var(--f-song); cursor: pointer; transition: border-color .2s, color .2s, transform .2s var(--pop);
}
.tool:hover { border-color: var(--ink-faint); color: var(--ink); }
.tool:active { transform: scale(.92); }
.tool[aria-pressed="false"] { color: var(--ink-faint); border-style: dashed; }
@media (max-width: 820px) { .top-nav { display: none; } .top-tools { margin-left: auto; } }

/* ---------- 一 山门 ---------- */

.gate {
  position: relative; overflow: hidden;
  min-height: max(640px, min(100svh, 1060px));
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 120px 110px;
}
.gate-art {
  position: absolute; right: 0; bottom: 0;
  height: 88%; aspect-ratio: 1403 / 1121; max-width: 84vw;
  background: var(--painting) right bottom / contain no-repeat;
}
.gate-mist { position: absolute; inset: 0; pointer-events: none; }
.gate-mist::before, .gate-mist::after {
  content: ""; position: absolute; border-radius: 50%;
  background: radial-gradient(closest-side, var(--paper) 0, transparent 100%);
  animation: mist 46s ease-in-out infinite alternate;
}
.gate-mist::before { width: 62vw; height: 26vh; right: 18vw; bottom: 16%; opacity: .78; }
.gate-mist::after { width: 54vw; height: 20vh; right: -14vw; bottom: 44%; opacity: .5; animation-duration: 61s; animation-direction: alternate-reverse; }
@keyframes mist { from { transform: translate3d(-7vw, 0, 0); } to { transform: translate3d(9vw, -1.5vh, 0); } }

.gate-text { position: relative; z-index: 2; width: 100%; }
.slogan {
  margin: 0 0 clamp(26px, 3.4vw, 46px); display: grid; justify-items: start;
  font: 400 clamp(62px, 9.2vw, 132px)/1.1 var(--f-brush); letter-spacing: .04em;
  transform: rotate(-5deg); transform-origin: left bottom;
}
.slogan > span { display: block; white-space: nowrap; }
.slogan > span + span { margin-left: .62em; }
.slogan .seal { font-size: .2em; width: 1.36em; height: 2.36em; margin-left: .5em; vertical-align: .9em; letter-spacing: .04em; }
.gate-en { margin: 0 0 14px; font: 700 clamp(19px, 1.9vw, 25px)/1.3 var(--f-latin); letter-spacing: .01em; }
.gate-en span { font: 400 .78em/1.3 var(--f-song); color: var(--ink-soft); margin-left: .5em; letter-spacing: .02em; }
.gate-lede { margin: 0; max-width: 29em; color: var(--ink-soft); font-size: clamp(16px, 1.25vw, 18px); }
.gate-cta { margin: clamp(26px, 3vw, 40px) 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 22px 10px 16px;
  background: var(--ink); color: var(--paper); border-radius: 14px; text-decoration: none;
  transition: transform .25s var(--pop);
}
.store:hover { transform: translateY(-2px); }
.store:active { transform: scale(.97); }
.store span { display: grid; line-height: 1.2; }
.store b { font: 700 17px/1.2 var(--f-latin); }
.store small { font-size: 11.5px; letter-spacing: .3em; opacity: .8; }
.go { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; letter-spacing: .16em; font-size: 15px; padding: 8px 0; border-bottom: 1.5px solid var(--red); }
.go i { font-style: normal; transition: transform .3s var(--settle); }
.go:hover i { transform: translateY(4px); }
.leaf-note { position: absolute; z-index: 2; left: var(--gut-l); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); margin: 0; font-size: 13px; letter-spacing: .24em; color: var(--ink-faint); }

.js .slogan > span { animation: write 1.1s var(--settle) both; }
.js .slogan > span + span { animation-delay: .5s; }
.js .gate-art { animation: fade 2s ease both; }
.js .gate-en, .js .gate-lede, .js .gate-cta, .js .leaf-note { animation: fade 1.1s ease both; animation-delay: 1.1s; }
.js .gate-lede { animation-delay: 1.3s; }
.js .gate-cta, .js .leaf-note { animation-delay: 1.5s; }
@keyframes write { from { clip-path: inset(-20% 100% -20% -10%); } to { clip-path: inset(-20% -10% -20% -10%); } }
@keyframes fade { from { opacity: 0; } }

@media (max-width: 760px) {
  .gate { min-height: max(680px, 100svh); justify-content: flex-start; padding-block: 104px 0; }
  .gate-art { height: 50%; max-width: none; }
  .gate-mist::before { width: 120vw; height: 16vh; right: -10vw; bottom: 30%; }
  .gate-mist::after { display: none; }
  .slogan { font-size: clamp(58px, 17.2vw, 92px); margin-bottom: 26px; }
  .gate-lede { font-size: 15.5px; line-height: 1.8; }
  .leaf-note { font-size: 12px; letter-spacing: .16em; }
}

/* ---------- 每节的题 ---------- */

.head { padding-block: clamp(84px, 11vw, 160px) clamp(26px, 4vw, 54px); }
.head h2 { margin: 0; display: flex; align-items: flex-end; gap: .9em; font-weight: 400; line-height: 1; }
.head h2 .brush { font-size: clamp(76px, 10.5vw, 138px); line-height: .95; transform: rotate(-5deg); transform-origin: left bottom; white-space: nowrap; }
.h-rest { font: 600 clamp(16px, 1.5vw, 21px)/1 var(--f-song); letter-spacing: .5em; color: var(--ink-soft); padding-bottom: 1.5em; white-space: nowrap; }
.h-stroke { display: block; margin: 6px 0 0 -6px; }
.lead { max-width: 34em; margin: clamp(20px, 2.4vw, 30px) 0 0; color: var(--ink-soft); font-size: clamp(16px, 1.25vw, 18px); }
[data-lang="en"] .h-rest { letter-spacing: .14em; }
[data-lang="en"] .top-nav, [data-lang="en"] .go, [data-lang="en"] .mark-name, [data-lang="en"] .leaf-note { letter-spacing: .06em; }
[data-lang="en"] .store small { letter-spacing: .1em; }
[data-lang="en"] .climb-cue { letter-spacing: .2em; }
[data-lang="en"] .landing h3, [data-lang="en"] .letter h3, [data-lang="en"] .quiz-ask, [data-lang="en"] .ledger-key, [data-lang="en"] .picked { letter-spacing: .04em; }
[data-lang="en"] .act, [data-lang="en"] .hear { letter-spacing: .02em; }

/* ---------- 二 六级台阶 ---------- */

/* 不爬的时候（没有脚本、减弱动态效果、屏幕太矮）：六级从上往下排 */
.climb-world { display: grid; gap: clamp(56px, 8vw, 96px); max-width: 1000px; margin-inline: auto; padding-left: var(--gut-l); padding-right: var(--gut-r); }
.climb-sky, .rail, .climb-cue, .flight { display: none; }

.landing { position: relative; display: grid; grid-template-columns: clamp(150px, 17vw, 196px) minmax(0, 1fr); column-gap: clamp(22px, 3vw, 40px); row-gap: 16px; padding-bottom: 40px; }
.landing .no { grid-row: 1 / span 2; position: relative; min-width: 0; }
.num { display: block; font-size: clamp(112px, 13vw, 168px); line-height: .92; margin-left: -.04em; }
.landing .no .seal { position: absolute; left: clamp(92px, 10.6vw, 136px); top: clamp(76px, 8.8vw, 116px); }
.landing h3 { margin: 16px 0 6px; font: 600 15px/1.5 var(--f-song); letter-spacing: .16em; }
.landing .no p { margin: 0; font-size: 14.5px; line-height: 1.75; color: var(--ink-soft); }
.plate { grid-column: 2; margin: 0; min-width: 0; background: var(--surface); border: 1px solid var(--edge); border-radius: 5px; box-shadow: var(--shadow); overflow: hidden; }
.plate img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.plate figcaption { padding: 16px 20px 14px; }
.sent { margin: 0; font: 400 clamp(19px, 1.85vw, 26px)/1.42 var(--f-read); }
.sent-zh { margin: 6px 0 0; font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); }
.src { margin: 12px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-faint); }
.src cite { font: 700 14.5px/1.3 var(--f-latin); font-style: normal; color: var(--ink-soft); }
.w { border-radius: 4px; transition: color .14s; }
.w.on { color: var(--red); }
.hear {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  border: 1px solid var(--edge); background: transparent; border-radius: 999px; padding: 5px 14px 5px 11px;
  font: 600 13px/1.5 var(--f-song); letter-spacing: .1em; cursor: pointer; transition: border-color .2s, transform .2s var(--pop);
}
.hear:hover { border-color: var(--ink-faint); }
.hear:active { transform: scale(.95); }
.hear i { width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent var(--red); }
.hear.playing i { width: 8px; height: 10px; border-width: 0 3px; border-color: var(--red); }
.spec { grid-column: 2; display: flex; margin: 0; min-width: 0; }
.spec div { flex: 1; min-width: 0; padding-right: 10px; }
.spec dt { font-size: 12px; letter-spacing: .3em; color: var(--ink-faint); line-height: 1.6; }
.spec dd { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; white-space: nowrap; }
.spec dd b { font: 700 22px/1.2 var(--f-latin); color: var(--ink); margin-right: 5px; font-variant-numeric: tabular-nums; }
[data-lang="en"] .spec dt { letter-spacing: .06em; }
.tread { position: absolute; left: -4%; bottom: 0; width: 108%; height: 30px; pointer-events: none; }

@media (max-width: 760px) {
  .landing { grid-template-columns: minmax(0, 1fr); padding-bottom: 36px; row-gap: 12px; }
  .landing .no { grid-row: auto; display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; align-content: end; }
  .num { grid-row: 1 / span 2; font-size: 92px; }
  .landing .no .seal { left: 62px; top: 56px; font-size: 22px; }
  .landing h3 { margin: 0 0 2px; align-self: end; font-size: 14px; }
  .landing .no p { font-size: 13.5px; line-height: 1.6; }
  .plate, .spec { grid-column: 1; }
  .plate figcaption { padding: 12px 14px 12px; }
  .sent { font-size: 19px; }
  .sent-zh { font-size: 13.5px; }
  .spec dd b { font-size: 19px; }
}

/* 爬的时候：一个吸在屏幕上的台子，镜头沿石阶往右上走 */
.climb-on .climb-track { position: relative; }
.climb-on .climb-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.climb-on .climb-world { position: absolute; left: 50%; top: 90%; display: block; max-width: none; margin: 0; padding: 0; visibility: hidden; will-change: transform; }
.climb-ready .climb-world { visibility: visible; }
.climb-on .landing { position: absolute; left: 0; top: 0; width: var(--lw, min(62vw, 880px)); opacity: .42; transition: opacity .6s var(--settle); }
.climb-on .landing.is-here { opacity: 1; }
.climb-on .landing .no h3, .climb-on .landing .no p, .climb-on .spec { text-shadow: 0 0 5px var(--paper), 0 0 10px var(--paper), 0 0 16px var(--paper); }
.climb-on .plate img { max-height: 38vh; max-height: 38svh; }
.climb-on .landing .no .seal { opacity: 0; transform: scale(1.7) rotate(-9deg); transition: transform .5s var(--pop), opacity .2s; }
.climb-on .landing.is-here .no .seal { opacity: 1; transform: none; transition-delay: .18s; }
.climb-on .flight { display: block; position: absolute; left: 0; top: 0; pointer-events: none; }
.climb-on .climb-sky { display: block; position: absolute; inset: 0; overflow: hidden; }
.climb-sky canvas { position: absolute; left: 0; will-change: transform; }
.climb-sky::after { content: ""; position: absolute; inset: auto 0 0; height: 22%; background: linear-gradient(to top, var(--paper), transparent); }
.climb-on .rail {
  display: flex; align-items: flex-end; position: absolute; z-index: 3; margin: 0; padding: 0; list-style: none;
  left: var(--gut-l); top: calc(58px + env(safe-area-inset-top, 0px));
}
.rail li { border-bottom: 1.5px solid var(--ink-faint); padding: 0 1px 3px; }
.rail li:nth-child(2) { transform: translateY(-7px); }
.rail li:nth-child(3) { transform: translateY(-14px); }
.rail li:nth-child(4) { transform: translateY(-21px); }
.rail li:nth-child(5) { transform: translateY(-28px); }
.rail li:nth-child(6) { transform: translateY(-35px); }
.rail button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 3px; background: none; font-size: 21px; line-height: 1; color: var(--ink-faint); cursor: pointer; transition: color .2s, transform .35s var(--pop); }
.rail button:hover { color: var(--ink); }
.rail li.on button { background: var(--seal); color: var(--on-seal); filter: url(#seal-worn); transform: scale(1.08); }
.climb-on .climb-cue { display: block; position: absolute; z-index: 3; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); margin: 0; text-align: center; font-size: 12.5px; letter-spacing: .5em; color: var(--ink-faint); transition: opacity .5s; pointer-events: none; }
.climbed .climb-cue { opacity: 0; }
@media (max-width: 760px) {
  .climb-on .plate img { max-height: 27vh; max-height: 27svh; }
  .climb-on .rail { top: calc(46px + env(safe-area-inset-top, 0px)); }
}

.summit { margin-top: clamp(48px, 8vw, 110px); }
.summit { font-size: clamp(20px, 2.3vw, 30px); line-height: 1.65; letter-spacing: .05em; }
.summit { max-width: calc(26em + var(--gut-l) + var(--gut-r)); }
.climb-on .summit { margin-top: clamp(36px, 5vw, 70px); }
[data-lang="en"] .summit { letter-spacing: 0; }

/* ---------- 三 五遍 ---------- */

.passes-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: clamp(28px, 7vw, 110px); align-items: start; }
.pass-list { list-style: none; margin: 0; padding: 0; }
.pass-list button { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--edge); padding: 15px 0; cursor: pointer; }
.pass-list li:last-child button { border-bottom: 1px solid var(--edge); }
.pass-list b { font-size: 66px; line-height: 1; color: var(--ink-faint); transform-origin: left center; transition: color .3s, transform .4s var(--pop); }
.pass-list .on b { color: var(--ink); transform: rotate(-5deg) scale(1.06); }
.pass-list strong { display: block; font-weight: 600; font-size: 15px; letter-spacing: .14em; color: var(--ink-soft); }
.pass-list .on strong { color: var(--red); }
.pass-list em { display: block; font-style: normal; font-size: 15px; line-height: 1.7; color: var(--ink-soft); }
[data-lang="en"] .pass-list strong { letter-spacing: .04em; }

.reader { position: relative; background: var(--surface); border: 1px solid var(--edge); border-radius: 26px; box-shadow: var(--shadow); overflow: hidden; }
.modes { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin: 14px; padding: 5px; background: var(--bar); border-radius: 999px; }
.modes button { position: relative; z-index: 1; border: 0; background: none; color: var(--on-bar); font: 600 15px/1.4 var(--f-song); padding: 8px 0; border-radius: 999px; cursor: pointer; transition: color .25s; white-space: nowrap; }
.modes button[aria-selected="true"] { color: var(--on-amber); }
.pill { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 5); background: var(--amber); border-radius: 999px; transition: transform .38s var(--pop); }
.reader[data-pass="read"] .pill { transform: translateX(100%); }
.reader[data-pass="repeat"] .pill { transform: translateX(200%); }
.reader[data-pass="speak"] .pill { transform: translateX(300%); }
.reader[data-pass="check"] .pill { transform: translateX(400%); }
[data-lang="en"] .modes button { font-size: 13px; }
.reader-art { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.reader-title { display: flex; align-items: baseline; gap: 12px; padding: 14px 22px 2px; }
.reader-title b { font: 700 26px/1.2 var(--f-latin); }
.reader-title span { color: var(--ink-soft); font-size: 14px; letter-spacing: .2em; }
.lines { list-style: none; margin: 0; padding: 8px 18px 2px; display: grid; gap: 9px; }
.line { justify-self: start; max-width: 90%; }
.line.you { justify-self: end; }
.line small { display: block; font: 400 12px/1.5 var(--f-read); color: var(--ink-faint); margin: 0 14px 1px; }
.line.you small { text-align: right; color: var(--red); }
.line p { margin: 0; padding: 8px 16px; border: 1.5px solid var(--edge); border-radius: 18px; background: var(--surface); font: 400 19px/1.4 var(--f-read); transition: border-color .25s; }
.line.you p { background: var(--you); border-color: transparent; }
.line.cur p { border-color: var(--you-edge); }
.line .tr { display: none; font-size: 13px; line-height: 1.6; color: var(--ink-soft); margin: 3px 16px 0; }
.line.you .tr { text-align: right; }
.reader[data-pass="read"].show-tr .tr { display: block; }
.reader[data-pass="read"] .lines .w, .reader[data-pass="repeat"] .lines .w.again { cursor: pointer; }
.reader[data-pass="read"] .lines .w:hover { color: var(--blue); }
.w.tapped { color: var(--blue); }
.w.good { color: var(--good); }
.w.again { color: var(--again); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.w.mask { color: transparent; border-bottom: 2px solid var(--ink-soft); border-radius: 0; user-select: none; }
.score { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 4px 14px 0; font-size: 13px; color: var(--ink-soft); }
.stars { display: inline-flex; gap: 3px; }
.stars i { width: 16px; height: 16px; background: var(--edge); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.stars i.lit { background: var(--star); animation: pop .5s var(--pop) both; }
.stars i.lit:nth-child(2) { animation-delay: .16s; }
.stars i.lit:nth-child(3) { animation-delay: .32s; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

.quiz { padding: 10px 18px 2px; }
.quiz-q { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 8px 16px 8px 8px; border: 1.5px solid var(--edge); border-radius: 18px; font: 400 19px/1.4 var(--f-read); width: fit-content; max-width: 100%; }
.quiz-q .hear { padding: 9px 10px 9px 12px; }
.quiz-ask { margin: 0 0 8px; font-size: 13.5px; letter-spacing: .14em; color: var(--ink-soft); }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opts button { text-align: left; padding: 9px 16px; border: 1.5px solid transparent; border-radius: 18px; background: var(--you); font: 400 18px/1.4 var(--f-read); cursor: pointer; transition: border-color .2s, color .2s, transform .25s var(--pop); }
.quiz-opts button:hover { border-color: var(--you-edge); }
.quiz-opts button:active { transform: scale(.98); }
.quiz-opts button.right { border-color: var(--good); color: var(--good); background: transparent; }
.quiz-opts button.wrong { border-color: var(--again); color: var(--again); background: transparent; animation: nudge .35s; }
@keyframes nudge { 30% { transform: translateX(-5px); } 65% { transform: translateX(4px); } }

.deck { min-height: 84px; padding: 12px 18px 18px; display: flex; align-items: center; }
.deck-pane { display: flex; align-items: center; gap: 14px; width: 100%; }
.act { display: inline-flex; align-items: center; gap: 10px; background: var(--red); color: #fff; border: 0; border-radius: 999px; padding: 10px 22px 10px 18px; font: 600 15px/1.5 var(--f-song); letter-spacing: .1em; cursor: pointer; transition: transform .25s var(--pop); }
.act:active { transform: scale(.96); }
.ico-play { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.act.playing .ico-play { width: 10px; height: 12px; border-width: 0 3.5px; border-color: currentColor; }
.tip { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); min-width: 0; }
.chip { flex: none; margin-left: auto; border: 1px solid var(--edge); background: none; border-radius: 999px; padding: 6px 14px; font: 600 13.5px/1.5 var(--f-song); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--bar); color: var(--on-bar); border-color: var(--bar); }
.seg { display: inline-flex; flex: none; background: var(--bar); border-radius: 999px; padding: 4px; }
.seg button { border: 0; background: none; color: var(--on-bar); border-radius: 999px; padding: 6px 13px; font: 600 13.5px/1.5 var(--f-song); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--amber); color: var(--on-amber); }
.mic { position: relative; flex: none; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--bar); cursor: pointer; transition: transform .25s var(--pop), background .2s; }
.mic:active { transform: scale(.94); }
.mic i { position: relative; z-index: 1; display: block; width: 26px; height: 26px; margin: auto; background: var(--on-bar);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15a3.5 3.5 0 0 0 3.5-3.5v-6a3.5 3.5 0 0 0-7 0v6A3.5 3.5 0 0 0 12 15zm6-3.5a.9.9 0 0 0-1.8 0 4.2 4.2 0 0 1-8.4 0 .9.9 0 0 0-1.8 0 6 6 0 0 0 5.1 5.9V20H9a.9.9 0 0 0 0 1.8h6a.9.9 0 0 0 0-1.8h-2.1v-2.6a6 6 0 0 0 5.1-5.9z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15a3.5 3.5 0 0 0 3.5-3.5v-6a3.5 3.5 0 0 0-7 0v6A3.5 3.5 0 0 0 12 15zm6-3.5a.9.9 0 0 0-1.8 0 4.2 4.2 0 0 1-8.4 0 .9.9 0 0 0-1.8 0 6 6 0 0 0 5.1 5.9V20H9a.9.9 0 0 0 0 1.8h6a.9.9 0 0 0 0-1.8h-2.1v-2.6a6 6 0 0 0 5.1-5.9z'/%3E%3C/svg%3E") center / contain no-repeat; }
.mic.rec { background: var(--red); }
.mic.rec::before, .mic.rec::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--red); animation: ripple 1.5s ease-out infinite; }
.mic.rec::after { animation-delay: .75s; }
@keyframes ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(2.1); opacity: 0; } }

@media (max-width: 900px) {
  .passes-body { grid-template-columns: minmax(0, 1fr); }
  .reader { order: -1; max-width: 480px; width: 100%; margin-inline: auto; }
  .js .pass-list li:not(.on) { display: none; }
  .pass-list button { border: 0 !important; padding: 0; grid-template-columns: 64px minmax(0, 1fr); max-width: 480px; margin-inline: auto; }
  .pass-list b { font-size: 52px; }
}

/* ---------- 四 六种：一卷手卷 ---------- */

.scroll { position: relative; margin-top: 10px; }
.scroll-paper {
  list-style: none; margin: 0; display: flex; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: none; cursor: grab;
  padding: 36px max(64px, calc((100vw - 1164px) / 2 + 22px));
  background: var(--surface); border-block: 14px solid var(--silk);
  box-shadow: inset 0 1px 0 var(--edge), inset 0 -1px 0 var(--edge);
}
.scroll-paper::-webkit-scrollbar { display: none; }
.scroll-paper.drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.kind { flex: 0 0 clamp(248px, 24vw, 318px); scroll-snap-align: center; padding: 0 clamp(18px, 2vw, 28px); border-right: 1px solid var(--edge); }
.kind:last-child { border-right: 0; }
.kind figure { margin: 0; padding: 6px; border: 1px solid var(--edge); background: var(--paper); }
.kind img { display: block; width: 100%; height: auto; pointer-events: none; }
.kind h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 18px 0 0; font: 600 22px/1.3 var(--f-song); letter-spacing: .16em; }
.kind h3 small { font: 700 14px/1.3 var(--f-latin); letter-spacing: 0; color: var(--ink-soft); }
.kind-lv { margin: 4px 0 8px; font-size: 12.5px; letter-spacing: .3em; color: var(--red); }
.kind p { margin: 0; font-size: 14.5px; line-height: 1.75; color: var(--ink-soft); }
[data-lang="en"] .kind-lv { letter-spacing: .08em; }
.roller {
  position: absolute; z-index: 2; top: -9px; bottom: -9px; width: 24px; border-radius: 5px;
  background: linear-gradient(90deg, var(--wood-3), var(--wood-2) 34%, var(--wood-1) 68%, var(--wood-3));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .14);
}
.roller::before, .roller::after { content: ""; position: absolute; left: 50%; width: 13px; height: 17px; margin-left: -6.5px; border-radius: 3px; background: var(--wood-3); }
.roller::before { top: -15px; }
.roller::after { bottom: -15px; }
.roller-l { left: max(12px, calc((100vw - 1290px) / 2)); box-shadow: 0 0 0 1px rgba(0, 0, 0, .14), 12px 0 22px -8px rgba(60, 38, 20, .5); }
.roller-r { right: max(12px, calc((100vw - 1290px) / 2)); box-shadow: 0 0 0 1px rgba(0, 0, 0, .14), -12px 0 22px -8px rgba(60, 38, 20, .5); }
@media (max-width: 760px) { .scroll-paper { padding-inline: 50px; } .kind { flex-basis: 72vw; } }

/* ---------- 五 一本账 ---------- */

.ledger {
  display: flex; flex-direction: row-reverse; overflow-x: auto; margin-top: 10px;
  background: var(--surface); border: 1.5px solid var(--rule); outline: 1px solid var(--rule); outline-offset: 5px;
}
.col { position: relative; flex: 0 0 clamp(86px, 9vw, 108px); min-height: 340px; padding: 20px 6px 16px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.col-title { flex-basis: clamp(88px, 10vw, 124px); justify-content: center; border-left: 3px double var(--rule); }
.col-title .brush { writing-mode: vertical-rl; font-size: clamp(42px, 5vw, 60px); line-height: 1; letter-spacing: .14em; }
.col-blank { flex: 1 0 56px; }
.col b { font: 700 17px/1.25 var(--f-read); text-align: center; overflow-wrap: anywhere; }
.col .zh { flex: 1; writing-mode: vertical-rl; font-size: 16px; line-height: 1.5; letter-spacing: .24em; color: var(--ink-soft); max-height: 12.5em; }
.col .lv { font-style: normal; font-size: 12px; letter-spacing: .2em; color: var(--ink-faint); }
.col .seal { position: absolute; right: 7px; bottom: 82px; transform: rotate(6deg); }
.col.mine .seal { animation: stamp .55s var(--pop) both; }
@keyframes stamp { from { transform: scale(1.9) rotate(-12deg); opacity: 0; } to { transform: rotate(6deg); opacity: 1; } }
.days { display: inline-flex; gap: 5px; vertical-align: middle; }
.days i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--rule); }
.days[data-done="1"] i:nth-child(-n+1), .days[data-done="2"] i:nth-child(-n+2), .days[data-done="3"] i { background: var(--seal); border-color: var(--seal); }
.ledger-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin: 20px 0 0; font-size: 13.5px; color: var(--ink-faint); }
.ledger-key { display: inline-flex; align-items: center; gap: 10px; letter-spacing: .1em; }

/* ---------- 六 问答 ---------- */

.help-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: clamp(28px, 6vw, 90px); align-items: start; }
.faq details { border-top: 1px solid var(--edge); }
.faq details:last-child { border-bottom: 1px solid var(--edge); }
.faq summary { position: relative; list-style: none; cursor: pointer; padding: 18px 40px 18px 0; font-weight: 600; letter-spacing: .05em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border-right: 1.5px solid var(--ink-soft); border-bottom: 1.5px solid var(--ink-soft); transform: translateY(-75%) rotate(45deg); transition: transform .3s var(--settle); }
.faq details[open] summary::after { transform: translateY(-25%) rotate(225deg); }
.faq details p { margin: -4px 0 22px; max-width: 38em; color: var(--ink-soft); font-size: 16px; }
[data-lang="en"] .faq summary { letter-spacing: 0; }
.letter { position: relative; padding: 26px 26px 22px; background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--shadow); }
.letter::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--rule); pointer-events: none; }
.letter > * { position: relative; }
.letter h3 { margin: 0 0 12px; font: 600 15px/1.5 var(--f-song); letter-spacing: .4em; color: var(--ink-soft); }
.letter p { margin: 0 0 8px; font-size: 15px; }
.mail a { font: 700 clamp(18px, 1.8vw, 22px)/1.4 var(--f-latin); text-decoration-color: var(--red); overflow-wrap: anywhere; }
.letter-note { color: var(--ink-faint); font-size: 13.5px !important; margin-top: 14px !important; }
@media (max-width: 820px) { .help-body { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 落款 ---------- */

.foot { position: relative; margin-top: clamp(80px, 12vw, 170px); padding-bottom: calc(46px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.foot-art { height: clamp(120px, 16vw, 210px); overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent); }
.foot-art canvas { display: block; }
.foot-slogan { display: inline-block; margin: 6px 0 22px; font-size: clamp(34px, 4vw, 48px); line-height: 1.2; letter-spacing: .06em; transform: rotate(-5deg); }
.foot-legal { margin: 0; font-size: 13px; line-height: 1.9; color: var(--ink-faint); }

/* ---------- 落叶、拾得、释义 ---------- */

.leaves { position: fixed; inset: 0; z-index: 15; pointer-events: none; overflow: hidden; }
.leaf { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 2px; margin: 0; padding: 8px; border: 0; background: none; cursor: pointer; font: 400 13.5px/1 var(--f-read); color: var(--ink-soft); will-change: transform; }
.leaf svg { display: block; overflow: visible; animation: leaf-turn var(--turn, 7s) ease-in-out infinite alternate; }
.leaf span { transition: color .2s, transform .25s var(--pop); }
.leaf:hover span, .leaf:focus-visible span { color: var(--ink); transform: scale(1.14); }
@keyframes leaf-turn { from { transform: rotate(var(--r0, -50deg)); } to { transform: rotate(var(--r1, 60deg)); } }
.leaf-still { position: absolute; z-index: 3; }
.calm .leaf svg { animation: none; transform: rotate(var(--r0, -20deg)); }

.picked {
  position: fixed; z-index: 18; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 15px 6px 7px;
  background: var(--surface); border: 1px solid var(--edge); border-radius: 999px; box-shadow: var(--shadow);
  text-decoration: none; font-size: 13.5px; letter-spacing: .08em; animation: rise .5s var(--settle) both;
}
.picked b { font: 700 15px/1 var(--f-latin); }
.picked.bump .seal { animation: bump .5s var(--pop); }
@keyframes rise { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bump { 40% { transform: scale(1.35) rotate(-8deg); } }

.gloss {
  position: fixed; z-index: 30; left: 0; top: 0; max-width: min(280px, 80vw); padding: 7px 14px 8px; border-radius: 12px;
  background: var(--bar); color: var(--on-bar); font-size: 14px; line-height: 1.5; pointer-events: none;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .45); animation: rise .25s var(--settle) both;
}
.gloss b { font: 700 16px/1.4 var(--f-read); margin-right: 8px; color: var(--amber); }
.gloss small { opacity: .7; margin-left: 8px; letter-spacing: .1em; }

/* 进场：题和正文从下往上浮一点，只走一遍；看不到脚本或减弱动态效果时原样摆着 */
.js:not(.calm) .rise-in { opacity: 0; transform: translateY(18px); }
.js:not(.calm) .rise-in.seen { opacity: 1; transform: none; transition: opacity .8s var(--settle), transform .9s var(--settle); }

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