@charset "UTF-8";
/* ==========================================================================
   《另有其事》 One Thing Led to Another
   全站样式。没有任何图片、图标字体或表情符号；所有视觉都由字体、留白与线条承担。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 字体
   子集化自：得意黑 Smiley Sans (SIL OFL)、HarmonyOS Sans SC、思源宋体 Noto Serif SC (SIL OFL)
   按系列拆分，进哪个系列只下那个系列的字。
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Smiley";
  src: url("../fonts/smiley-display.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HarmonySC";
  src: url("../fonts/harmony-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HarmonySC";
  src: url("../fonts/harmony-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SerifCore";
  src: url("../fonts/serif-core.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SerifStory";
  src: url("../fonts/serif-story.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. 变量
   -------------------------------------------------------------------------- */
:root {
  --sans-fallback: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif-fallback: "Songti SC", "SimSun", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* 中性（总入口与通用外壳） */
  --n-bg: #f4f1ec;
  --n-ink: #221f1a;
  --n-muted: #6d6459;
  --n-rule: #ded6c9;

  --measure: 32em;      /* 正文行宽，单位是 em 所以约等于汉字数 */
  --gutter: 20px;
  --step: 1.5rem;

  --dur: 420ms;
  --ease: cubic-bezier(.22, .61, .36, 1);

  color-scheme: light;
}

/* 荒唐匣：暖纸白、圆润黑体、节奏紧凑 */
[data-theme="absurd"] {
  --bg: #fbf7f0;
  --surface: #fffdf9;
  --ink: #1e1b16;
  --muted: #6e6558;
  --faint: #a2988a;
  --rule: #e6ddcd;
  --accent: #c8441e;
  --accent-soft: #f6e3da;
  --font-display: "Smiley", "HarmonySC", var(--sans-fallback);
  --font-body: "HarmonySC", var(--sans-fallback);
  --measure: 32em;
  --body-lh: 1.95;
  --para-gap: 1.1em;
  color-scheme: light;
}

/* 后怕匣：冷暗、宋体、大留白、几乎无动效 */
[data-theme="horror"] {
  --bg: #0f1214;
  --surface: #161b1e;
  --ink: #d9d6d0;
  --muted: #838a8d;
  --faint: #5b6265;
  --rule: #262d31;
  --accent: #9fb0a8;
  --accent-soft: #1b2326;
  --font-display: "SerifCore", var(--serif-fallback);
  --font-body: "SerifStory", "SerifCore", var(--serif-fallback);
  --measure: 27em;
  --body-lh: 2.15;
  --para-gap: 1.5em;
  color-scheme: dark;
}

/* 总入口 */
[data-theme="home"] {
  --bg: var(--n-bg);
  --surface: #fffdf9;
  --ink: var(--n-ink);
  --muted: var(--n-muted);
  --faint: #938a7d;
  --rule: var(--n-rule);
  --accent: #8a5a2b;
  --accent-soft: #ece3d6;
  --font-display: "Smiley", var(--sans-fallback);
  --font-body: "HarmonySC", var(--sans-fallback);
  --body-lh: 1.95;
  --para-gap: 1.1em;
}

/* --------------------------------------------------------------------------
   3. 基础
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: var(--body-lh, 1.95);
  letter-spacing: .015em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
  overflow-x: hidden;
}

@media (min-width: 700px)  { body { font-size: 18px; } }
@media (min-width: 1100px) { body { font-size: 18px; } }

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  letter-spacing: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* 小标签。
   等宽字体栈里没有中文字形，中文会掉到系统后备字、和正文不是一套，
   所以 .tag 用正文字体；只有纯拉丁与编号（H03 / ABSURD TALES）才走 .tag-en。 */
.tag {
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.tag-en {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.rule-short { width: 34px; height: 1px; background: var(--rule); border: 0; margin: 0; }

/* --------------------------------------------------------------------------
   4. 外壳
   -------------------------------------------------------------------------- */
.shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: baseline;
  gap: 1.35rem;
  padding: 1rem var(--gutter) .85rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 220ms linear;
}
.topbar[data-scrolled="1"] { border-bottom-color: var(--rule); }
.topbar:empty { display: none; }

.topbar .brand {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-right: auto;
}
[data-theme="horror"] .topbar .brand { font-weight: 600; letter-spacing: .12em; }

.topbar nav { display: flex; gap: 1.15rem; }
.topbar nav button {
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .08em;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 180ms, border-color 180ms;
}
.topbar nav button:hover,
.topbar nav button[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.main { flex: 1 0 auto; }

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap-wide { max-width: 46rem; }

.foot {
  padding: 4rem var(--gutter) 3rem;
  text-align: center;
  color: var(--faint);
  font-size: .72rem;
  letter-spacing: .1em;
}

/* --------------------------------------------------------------------------
   5. 总入口
   -------------------------------------------------------------------------- */
.home {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.home-head {
  padding: clamp(3.5rem, 12vh, 7rem) var(--gutter) clamp(2.5rem, 7vh, 4rem);
  text-align: center;
}
.home-title {
  font-family: "Smiley", var(--sans-fallback);
  font-size: clamp(2.6rem, 11vw, 4.4rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: .06em;
  margin-bottom: .7rem;
}
.home-title-en {
  font-family: var(--mono);
  font-size: clamp(.62rem, 2.4vw, .74rem);
  letter-spacing: .34em;
  color: var(--muted);
  text-transform: uppercase;
  padding-left: .34em;
}
.home-lede {
  margin: clamp(2.2rem, 6vh, 3.4rem) auto 0;
  max-width: 19em;
  color: var(--ink);
  line-height: 2.1;
  font-size: 1rem;
}
.home-lede span { display: block; }

/* 两块：各自用自己系列的字体和底色排。这是总入口唯一的“视觉”。 */
.gates { display: grid; grid-template-columns: 1fr; flex: 1 0 auto; }
@media (min-width: 860px) { .gates { grid-template-columns: 1fr 1fr; } }

.gate {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: clamp(2.6rem, 7vh, 4.2rem) clamp(1.5rem, 6vw, 3.4rem);
  border-top: 1px solid var(--n-rule);
  transition: filter 300ms var(--ease);
}
@media (min-width: 860px) {
  .gate { border-top: 0; display: flex; flex-direction: column; justify-content: center; min-height: 46vh; }
  .gate + .gate { border-left: 1px solid rgba(0,0,0,.14); }
  /* 大屏上把内容往里推一点，但保持左对齐——所有元素共用一条左基线 */
  .gate { padding-left: clamp(2rem, 7vw, 5.5rem); padding-right: clamp(2rem, 5vw, 4rem); }
}

.gate-absurd { background: #fbf7f0; color: #1e1b16; }
.gate-horror { background: #0f1214; color: #d9d6d0; }

.gate:hover { filter: brightness(1.03); }
.gate-horror:hover { filter: brightness(1.28); }

.gate .tag { display: block; margin-bottom: 1.15rem; }
.gate-absurd .tag { color: #a2988a; }
.gate-horror .tag { color: #5b6265; }

.gate-name { display: block; margin-bottom: .9rem; }
.gate-absurd .gate-name {
  font-family: "Smiley", var(--sans-fallback);
  font-size: clamp(2rem, 8vw, 2.9rem);
  letter-spacing: .05em;
  line-height: 1.2;
}
.gate-horror .gate-name {
  font-family: "SerifCore", var(--serif-fallback);
  font-size: clamp(1.85rem, 7.4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: .2em;
  line-height: 1.35;
}

.gate-line { display: block; font-size: .95rem; max-width: 15em; }
.gate-absurd .gate-line { font-family: "HarmonySC", var(--sans-fallback); line-height: 1.9; color: #554d42; }
.gate-horror .gate-line { font-family: "SerifCore", var(--serif-fallback); line-height: 2.1; color: #8d9497; }

.gate-en {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.gate-absurd .gate-en { color: #b3a898; }
.gate-horror .gate-en { color: #4d5457; }

.home-foot {
  padding: 1.9rem var(--gutter) 2.4rem;
  text-align: center;
  font-size: .72rem;
  letter-spacing: .16em;
  color: var(--n-muted);
}
.home-foot b { font-weight: 400; color: var(--n-ink); }
.home-foot .sep { opacity: .4; padding: 0 .55em; }
.home-foot .links { margin-top: 1rem; display: flex; gap: 1.4rem; justify-content: center; }
.home-foot .links button { font-size: .74rem; letter-spacing: .1em; color: var(--n-muted); border-bottom: 1px solid var(--n-rule); padding-bottom: 2px; }
.home-foot .links button:hover { color: var(--n-ink); }

/* --------------------------------------------------------------------------
   6. 系列目录
   -------------------------------------------------------------------------- */
.cat-head { padding: clamp(2.6rem, 8vh, 4.5rem) 0 clamp(1.8rem, 4vh, 2.6rem); }
.cat-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.7rem);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: .55rem;
}
[data-theme="absurd"] .cat-title { letter-spacing: .05em; font-weight: 400; }
[data-theme="horror"] .cat-title { letter-spacing: .2em; }
.cat-sub { color: var(--muted); font-size: .92rem; }

.cat-notice p + p { margin-top: .45em; }
.cat-notice {
  margin-top: 1.6rem;
  padding-left: .9rem;
  border-left: 1px solid var(--rule);
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.95;
  max-width: 26em;
}

.cards { display: flex; flex-direction: column; margin: 1rem 0 0; }

.card {
  position: relative;
  border-top: 1px solid var(--rule);
  padding: 1.7rem 0 1.5rem;
}
.card:last-child { border-bottom: 1px solid var(--rule); }

.card-open {
  display: block;
  width: 100%;
  text-align: left;
}
.card-head { display: flex; align-items: baseline; gap: .85rem; margin-bottom: .55rem; }
.card-title {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.5;
}
[data-theme="absurd"] .card-title { font-weight: 400; letter-spacing: .02em; }
[data-theme="horror"] .card-title { letter-spacing: .14em; font-weight: 500; }

.card-sum { color: var(--muted); font-size: .93rem; line-height: 1.9; max-width: 26em; }

.card-foot {
  margin-top: .95rem;
  display: flex;
  align-items: center;
  gap: .9rem;
  flex-wrap: wrap;
  font-size: .73rem;
  letter-spacing: .1em;
  color: var(--faint);
}
.card-state[data-read="1"] { color: var(--accent); }

.card-open:hover .card-title { color: var(--accent); }

/* 内容提示：折叠，默认不展开 */
.cw { margin-top: .2rem; }
.cw summary {
  display: inline-block;
  font-size: .73rem;
  letter-spacing: .1em;
  color: var(--faint);
  cursor: pointer;
  list-style: none;
  border-bottom: 1px dotted var(--rule);
  padding-bottom: 1px;
}
.cw summary::-webkit-details-marker { display: none; }
.cw summary:hover { color: var(--muted); }
.cw[open] summary { color: var(--muted); }
.cw-body {
  margin-top: .7rem;
  padding-left: .85rem;
  border-left: 1px solid var(--rule);
  font-size: .82rem;
  line-height: 1.95;
  color: var(--muted);
  max-width: 24em;
}

/* --------------------------------------------------------------------------
   7. 阅读
   一条连续的正文流：不分页、不清空、不弹窗。
   -------------------------------------------------------------------------- */
.read { padding: clamp(2rem, 6vh, 3.4rem) 0 0; }

.read-head { margin-bottom: clamp(2rem, 5vh, 3rem); }
.read-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6.4vw, 2.1rem);
  font-weight: 600;
  line-height: 1.45;
  margin: .5rem 0 0;
}
[data-theme="absurd"] .read-title { font-weight: 400; letter-spacing: .03em; }
[data-theme="horror"] .read-title { letter-spacing: .16em; font-weight: 500; }

/* 必要前提：只有 H05 / H08 有，第一问之前必须看到 */
.precondition {
  margin: 1.8rem 0 0;
  padding: 1rem 0 1rem 1rem;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: .89rem;
  line-height: 2.05;
  background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
}
.precondition .tag { display: block; margin-bottom: .5rem; }
.precondition p + p { margin-top: .6em; }

/* 正文 */
.prose { max-width: var(--measure); }
.prose p {
  margin: 0 0 var(--para-gap);
  text-wrap: pretty;
}
.prose p.is-new { animation: rise var(--dur) var(--ease) both; }

/* 结尾那一段：后怕匣在它前面留出明显的呼吸 */
[data-theme="horror"] .prose p.is-final { margin-top: 2.4em; }
[data-theme="absurd"] .prose p.is-final { margin-top: 1.2em; }

@keyframes rise {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: none; }
}
[data-theme="horror"] .prose p.is-new { animation-duration: 760ms; animation-name: fade; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* 已作出的选择：塌缩成一行小字，不划掉——结尾要回头重读前文 */
.made {
  margin: -.35em 0 var(--para-gap);
  padding-left: .85rem;
  border-left: 1px solid var(--rule);
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--faint);
  line-height: 1.85;
  animation: fade 320ms var(--ease) both;
}
.made b { font-weight: inherit; color: var(--muted); }

/* 提问 + 三个选项 */
.ask { margin: 2.2em 0 0; max-width: var(--measure); }
.ask[hidden] { display: none; }
.ask-q {
  font-size: .95rem;
  color: var(--muted);
  margin-bottom: 1.15em;
  line-height: 1.95;
}
[data-theme="horror"] .ask-q { color: var(--accent); }

.choices { display: flex; flex-direction: column; gap: .55rem; }

.choice {
  position: relative;
  width: 100%;
  text-align: left;
  padding: .92rem 1.1rem .92rem 1rem;
  line-height: 1.8;
  transition: background-color 200ms, border-color 200ms, transform 160ms var(--ease);
}
[data-theme="absurd"] .choice {
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--surface);
}
[data-theme="absurd"] .choice:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(3px);
}
[data-theme="horror"] .choice {
  border: 0;
  border-left: 1px solid var(--rule);
  padding-left: 1.1rem;
  background: none;
}
[data-theme="horror"] .choice:hover { border-left-color: var(--accent); color: #fff; }

.choice:disabled { opacity: .4; pointer-events: none; }

.ask.is-leaving .choices { animation: fadeout 220ms var(--ease) both; }
@keyframes fadeout { to { opacity: 0; transform: translateY(-4px); } }

/* --------------------------------------------------------------------------
   8. 结尾
   不弹“恭喜”。页面安静下来，四段完整可见，底部一行小字。
   -------------------------------------------------------------------------- */
.ending { margin-top: clamp(2.8rem, 8vh, 4.4rem); max-width: var(--measure); }

.ending-meta {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  flex-wrap: wrap;
  padding-top: 1.3rem;
  border-top: 1px solid var(--rule);
  font-size: .74rem;
  letter-spacing: .1em;
  color: var(--faint);
}
.ending-meta .route { color: var(--muted); }
.ending-meta > span + span::before {
  content: "·";
  margin-right: .7rem;
  opacity: .45;
}

.acts { margin-top: 1.9rem; display: flex; flex-direction: column; gap: .6rem; }
@media (min-width: 560px) { .acts { flex-direction: row; flex-wrap: wrap; align-items: center; } }

.btn {
  display: inline-block;
  padding: .82rem 1.5rem;
  font-size: .92rem;
  letter-spacing: .06em;
  border: 1px solid var(--ink);
  border-radius: 2px;
  text-align: center;
  transition: background-color 200ms, color 200ms, border-color 200ms;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-quiet { border-color: transparent; color: var(--muted); padding-left: .4rem; padding-right: .4rem; }
.btn-quiet:hover { background: none; color: var(--ink); border-color: transparent; text-decoration: underline; text-underline-offset: 5px; }
.btn:disabled { opacity: .45; pointer-events: none; }

.fiction-note {
  margin-top: 2.6rem;
  color: var(--faint);
  font-size: .74rem;
  line-height: 1.95;
  max-width: 26em;
}

/* --------------------------------------------------------------------------
   9. 故事卡预览
   -------------------------------------------------------------------------- */
.sheet-back {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 72%, #000 28%);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(1rem, 4vh, 3rem) var(--gutter) 3rem;
  animation: fade 220ms var(--ease) both;
}
.sheet {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.sheet-title { font-size: .76rem; letter-spacing: .14em; color: var(--muted); text-align: center; }
.sheet canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
  border: 1px solid var(--rule);
  box-shadow: 0 18px 50px rgba(0,0,0,.34);
}
.sheet-acts { display: flex; flex-direction: column; gap: .5rem; }
.sheet-hint { font-size: .74rem; color: var(--faint); text-align: center; line-height: 1.9; }

/* --------------------------------------------------------------------------
   10. 分享落地页
   -------------------------------------------------------------------------- */
.land { padding: clamp(2.6rem, 9vh, 5rem) 0 0; }
.land-from {
  font-size: .78rem;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 1.6rem;
}
.land-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7.2vw, 2.4rem);
  font-weight: 600;
  line-height: 1.4;
  margin: .45rem 0 1.5rem;
}
[data-theme="absurd"] .land-title { font-weight: 400; letter-spacing: .04em; }
[data-theme="horror"] .land-title { letter-spacing: .16em; font-weight: 500; }

.reveal { margin-top: 2.4rem; border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.reveal summary {
  list-style: none;
  cursor: pointer;
  font-size: .86rem;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  display: inline-block;
  padding-bottom: 3px;
}
.reveal summary::-webkit-details-marker { display: none; }
.reveal summary:hover { color: var(--ink); border-bottom-color: var(--accent); }
.reveal[open] summary { color: var(--faint); }
.reveal-body { margin-top: 1.8rem; animation: fade 400ms var(--ease) both; }
.reveal-warn { font-size: .76rem; color: var(--faint); margin-top: .6rem; letter-spacing: .04em; }

/* --------------------------------------------------------------------------
   11. 我的记录
   -------------------------------------------------------------------------- */
.rec-head { padding: clamp(2.6rem, 8vh, 4.5rem) 0 1.6rem; }
.rec-count { font-size: .82rem; color: var(--muted); letter-spacing: .08em; }

.rec-story { border-top: 1px solid var(--rule); padding: 1.5rem 0; }
.rec-story:last-of-type { border-bottom: 1px solid var(--rule); }
.rec-story-head { display: flex; align-items: baseline; gap: .8rem; margin-bottom: .9rem; }
.rec-story-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
[data-theme="absurd"] .rec-story-title { font-weight: 400; }

.dots { display: flex; flex-wrap: wrap; gap: 5px; margin-top: .3rem; }
.dot {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: .6rem;
  color: var(--faint);
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-variant-numeric: tabular-nums;
}
.dot[data-on="1"] { color: var(--bg); background: var(--ink); border-color: var(--ink); cursor: pointer; }
.dot[data-on="1"]:hover { background: var(--accent); border-color: var(--accent); }

.empty { color: var(--muted); font-size: .92rem; line-height: 2; padding: 2rem 0 1rem; max-width: 24em; }


/* --------------------------------------------------------------------------
   11b. 存档与换设备
   -------------------------------------------------------------------------- */
.save-panel {
  margin-top: 2.8rem;
  padding-top: 1.7rem;
  border-top: 1px solid var(--rule);
}
.save-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.3rem;
}
[data-theme="absurd"] .save-title { font-weight: 400; letter-spacing: .03em; }
[data-theme="horror"] .save-title { letter-spacing: .14em; font-weight: 500; }

.save-label { display: block; margin-bottom: .6rem; }
.save-label + .save-row { margin-bottom: .8rem; }

.save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.save-code {
  font-family: var(--mono);
  font-size: .92rem;
  letter-spacing: .04em;
  padding: .58rem .75rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--surface);
  word-break: break-all;
  flex: 1 1 100%;
}

.save-input {
  flex: 1 1 100%;
  min-width: 0;
  font-family: var(--mono);
  font-size: .88rem;
  letter-spacing: .04em;
  padding: .62rem .75rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
}
.save-input:focus { outline: none; border-color: var(--accent); }
.save-input::placeholder { color: var(--faint); }

.save-note {
  margin: .2rem 0 1.9rem;
  font-size: .78rem;
  line-height: 1.95;
  color: var(--faint);
  max-width: 27em;
}

.save-choice {
  margin-top: 1.1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
}
.save-choice[hidden] { display: none; }
.save-choice-q { font-size: .9rem; line-height: 1.9; margin-bottom: .9rem; }
.save-choice-note { margin-top: .9rem; font-size: .76rem; line-height: 1.9; color: var(--muted); }
.save-choice .acts { margin-top: 0; }

.save-status-row {
  margin-top: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: .8rem;
}
.save-status { font-size: .8rem; color: var(--muted); letter-spacing: .04em; }

@media (min-width: 560px) {
  .save-code, .save-input { flex: 1 1 16rem; }
}

.sync-line {
  margin-top: 1.1rem;
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--faint);
}

.btn-quiet[data-on="1"] { color: var(--accent); }
/* 收藏：在方块外面套一圈，和「走过」的填充区分开 */
.dots { gap: 9px; }
.dot[data-fav="1"] { outline: 1px solid var(--accent); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   12. 关于 / 怎么玩
   -------------------------------------------------------------------------- */
.doc { padding: clamp(2.6rem, 8vh, 4.5rem) 0 0; max-width: var(--measure); }
.doc h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.6rem 0 1rem;
  line-height: 1.5;
}
[data-theme="absurd"] .doc h2 { font-weight: 400; letter-spacing: .03em; }
[data-theme="horror"] .doc h2 { letter-spacing: .14em; font-weight: 500; }
.doc h2:first-child { margin-top: 0; }
.doc p { margin-bottom: 1.1em; }
.doc p.sub { color: var(--muted); font-size: .9rem; }
.doc dl { margin: 0; }
.doc dt { font-size: .8rem; letter-spacing: .1em; color: var(--faint); margin-top: 1.5rem; }
.doc dd { margin: .4rem 0 0; color: var(--muted); font-size: .92rem; line-height: 2; }

/* --------------------------------------------------------------------------
   13. 提示条
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.6rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 80;
  padding: .7rem 1.3rem;
  background: var(--ink);
  color: var(--bg);
  font-size: .82rem;
  letter-spacing: .06em;
  border-radius: 2px;
  animation: fade 200ms var(--ease) both;
  max-width: calc(100vw - 2 * var(--gutter));
  text-align: center;
}

/* --------------------------------------------------------------------------
   14. 三端
   正文行宽用 em 锁定，桌面端变宽的只是留白。
   -------------------------------------------------------------------------- */
@media (min-width: 700px) {
  :root { --gutter: 32px; }
}
@media (min-width: 1100px) {
  :root { --gutter: 40px; }
  .read, .land { padding-top: 4.5rem; }
}

body { padding-bottom: env(safe-area-inset-bottom); }

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

@media print {
  .topbar, .acts, .ask, .foot, .sheet-back { display: none !important; }
  body { background: #fff; color: #000; }
}
