/* 滑一段 — a vertical run of characters coming out of the fog. Paper, ink, cinnabar. */
:root {
  --paper: #ecebe7; --paper-2: #e2e1dc; --ink: #111; --ink-2: #333331; --ink-3: #6b6a65;
  --line-soft: #c9c8c2; --red: #c23a22;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #141413; --paper-2: #1c1c1a; --ink: #ecebe7; --ink-2: #c9c8c2; --ink-3: #8b8a85; --line-soft: #3a3a37; --red: #e2644c; }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 400 17px/1.8 var(--serif);
  -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
p, ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.screen { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: max(10vh, 48px) 28px 24px; display: grid; gap: 26px; align-content: start; justify-items: start;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.title { margin: 0; font: 900 clamp(56px, 17vw, 92px)/1 var(--serif); letter-spacing: .04em; }
.title::first-letter { color: var(--red); }
.lede { font-size: 20px; line-height: 1.9; }
.how { display: grid; gap: 6px; font-size: 17px; padding-left: 14px; border-left: 2px solid var(--red); }
.how b { font-weight: 900; }
.fine { font: 12.5px/1.9 var(--sans); color: var(--ink-3); letter-spacing: .04em; }
.btn { min-height: 52px; padding: 0 38px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 16px/1 var(--sans); letter-spacing: .4em; cursor: pointer; }
.linkish { color: var(--ink-3); text-underline-offset: 4px; font: 14px/1 var(--sans); }
.icon { width: 44px; height: 44px; border: 0; background: none; font: 15px/1 var(--sans); color: var(--ink-3); cursor: pointer; }
.icon[aria-pressed="false"] { text-decoration: line-through; opacity: .5; }

/* ---- the slope ---- */
.slope { max-width: none; padding: 0; gap: 0; grid-template-rows: auto 1fr; justify-items: stretch; align-content: stretch;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; cursor: pointer; }
.slope__top { display: flex; align-items: center; justify-content: space-between; padding: max(env(safe-area-inset-top, 0px), 6px) 10px 0; }
.slope__left { font: 11px/1 var(--mono); letter-spacing: .14em; color: var(--ink-3); }
.run { position: relative; overflow: hidden; min-height: 60vh; }
.run.is-wobble { animation: wobble .42s; }
@keyframes wobble { 20% { transform: translateX(-9px) rotate(-.6deg); } 50% { transform: translateX(8px) rotate(.5deg); } 80% { transform: translateX(-4px); } }
.run__chars { position: absolute; inset: 0; }
.run__chars span { position: absolute; left: 50%; top: 0; width: 1.3em; margin-left: -.65em; text-align: center; font: 700 var(--fs, 40px)/1 var(--serif); will-change: transform, opacity; }
.run__chars span.is-mark { color: var(--red); }                 /* punctuation = terrain */
.run__chars span.is-past { color: var(--ink-3); font-weight: 400; }
.run__me { position: absolute; left: 50%; top: 32%; width: 9px; height: 9px; margin: -4px 0 0 calc(var(--fs, 40px) * -1.5); border-radius: 50%; background: var(--red);
  transform: translateX(var(--sway, 0px)); }
/* the fog: nothing readable below a short distance */
.run::after { content: ""; position: absolute; inset: 62% 0 0 0; pointer-events: none; background: linear-gradient(to bottom, transparent, var(--paper) 55%); }
.run__tip { position: absolute; left: 0; right: 0; bottom: max(env(safe-area-inset-bottom, 0px), 26px); text-align: center; font: 13px/1 var(--sans); letter-spacing: .3em; color: var(--ink-3); transition: opacity .6s; z-index: 2; }
.run__tip.is-off { opacity: 0; }

/* ---- after the run: the whole passage ---- */
.done { gap: 22px; }
.done__date { font: 12px/1 var(--mono); letter-spacing: .14em; color: var(--red); }
.done__text { font-size: 19px; line-height: 1.8; white-space: pre-wrap; padding-left: 14px; border-left: 2px solid var(--line-soft); animation: rise 1.4s .3s both; }
.done__actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.foot { padding: 14px 28px calc(env(safe-area-inset-bottom, 0px) + 18px); text-align: center; font: 11px/1 var(--mono); letter-spacing: .12em; }
.foot a { color: var(--ink-3); text-decoration: none; }
body.is-running .foot { display: none; }
@media (prefers-reduced-motion: reduce) { .run.is-wobble { animation: none; } }
