/* =========================================================
   TOP之家 · Butterfly Fan Site
   紫色为基调，蝴蝶为灵魂
   ========================================================= */

/* ---------- 1. 变量 ---------- */
:root {
  --purple-950: #150727;
  --purple-900: #1e0a3c;
  --purple-800: #2c1059;
  --purple-700: #4a1d95;
  --purple-600: #6d28d9;
  --purple-500: #8b5cf6;
  --purple-400: #a78bfa;
  --purple-300: #c4b5fd;
  --purple-200: #ddd6fe;
  --purple-100: #ede9fe;

  --pink: #f0abfc;
  --pink-soft: #fbcfe8;
  --cyan: #67e8f9;
  --gold: #fcd34d;
  --coral: #fb7185;

  --bg-0: #120524;
  --bg-1: #1b0738;
  --bg-2: #240a4b;
  --ink: #f5eefe;
  --ink-dim: #cbb8ea;
  --ink-faint: #9d86c4;

  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --stroke: rgba(196, 181, 253, 0.22);
  --stroke-strong: rgba(196, 181, 253, 0.42);
  --shadow: 0 18px 50px rgba(8, 0, 24, 0.55);

  --grad-main: linear-gradient(135deg, #7c3aed 0%, #a21caf 52%, #f0abfc 100%);
  --grad-line: linear-gradient(90deg, transparent, var(--purple-400), var(--pink), transparent);
  --grad-text: linear-gradient(100deg, #f5eefe 0%, #d8b4fe 40%, #f0abfc 100%);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-pill: 999px;

  --shadow-glow: 0 0 0 1px rgba(196, 181, 253, 0.18), 0 12px 40px rgba(139, 92, 246, 0.35);
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Noto Serif SC", "Songti SC", "SimSun", "Source Han Serif SC", serif;
  --font-body: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-num: "Bahnschrift", "DIN Alternate", "Segoe UI", system-ui, sans-serif;
}

[data-theme="light"] {
  --bg-0: #f7f3ff;
  --bg-1: #efe8ff;
  --bg-2: #e6dcff;
  --ink: #2c1059;
  --ink-dim: #5b3d8f;
  --ink-faint: #8169b0;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --stroke: rgba(109, 40, 217, 0.18);
  --stroke-strong: rgba(109, 40, 217, 0.34);
  --shadow: 0 18px 44px rgba(76, 29, 149, 0.16);
  --grad-text: linear-gradient(100deg, #2c1059 0%, #7c3aed 45%, #c026d3 100%);
}

/* ---------- 2. 基础 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-0);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -30vmax;
  z-index: -3;
  background:
    radial-gradient(38vmax 38vmax at 12% 8%, rgba(139, 92, 246, 0.42), transparent 60%),
    radial-gradient(32vmax 32vmax at 88% 14%, rgba(217, 70, 239, 0.34), transparent 62%),
    radial-gradient(42vmax 42vmax at 50% 96%, rgba(109, 40, 217, 0.4), transparent 62%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 45%, var(--bg-0));
  animation: auroraShift 22s ease-in-out infinite alternate;
}

[data-theme="light"] body::before {
  background:
    radial-gradient(38vmax 38vmax at 12% 8%, rgba(167, 139, 250, 0.4), transparent 60%),
    radial-gradient(32vmax 32vmax at 88% 14%, rgba(244, 187, 251, 0.55), transparent 62%),
    radial-gradient(42vmax 42vmax at 50% 96%, rgba(196, 181, 253, 0.6), transparent 62%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 45%, var(--bg-0));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

@keyframes auroraShift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2%, -2%, 0) scale(1.06); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.02); }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5em;
  letter-spacing: 0.02em;
}

p { margin: 0 0 1em; }

a { color: var(--purple-300); text-decoration: none; transition: color 0.25s var(--ease); }
a:hover { color: var(--pink); }

img, svg { max-width: 100%; }

button, input, textarea, select { font: inherit; color: inherit; }

::selection { background: rgba(240, 171, 252, 0.4); color: #fff; }

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: 6px;
}

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. 布局 ---------- */
.wrap { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }

.section { padding: clamp(3.6rem, 8vw, 6.5rem) 0; position: relative; }
.section[id] { scroll-margin-top: 8.5rem; }

.section__head { text-align: center; margin-bottom: clamp(2rem, 4vw, 3.4rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--purple-300); padding: 0.35rem 1rem;
  border: 1px solid var(--stroke); border-radius: var(--r-pill);
  background: var(--glass); backdrop-filter: blur(10px);
}

.section__title {
  font-size: clamp(1.85rem, 4.6vw, 3rem);
  margin: 1rem 0 0.6rem;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.section__sub { color: var(--ink-dim); max-width: 44ch; margin-inline: auto; }

/* TOP 页三个子页面里的大标题块收小一档：眉题、标题、说明都紧凑些 */
.section__head--tight { margin-bottom: clamp(1.1rem, 2.2vw, 1.8rem); }
.section__head--tight .eyebrow { font-size: 0.7rem; letter-spacing: 0.26em; padding: 0.25rem 0.85rem; }
.section__head--tight .eyebrow svg { width: 11px; height: 11px; }
.section__head--tight .section__title { font-size: clamp(1.4rem, 3vw, 2.05rem); margin: 0.65rem 0 0.4rem; }
.section__head--tight .section__sub { font-size: 0.92rem; margin-bottom: 0; }

.bfly-deco { display: block; width: 100%; height: auto; color: var(--purple-400); opacity: 0.85; }
.bfly-deco path, .bfly-deco ellipse, .bfly-deco circle { vector-effect: non-scaling-stroke; }

.wing-divider {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  color: var(--purple-400); opacity: 0.6; margin: 0.4rem 0 1.2rem;
}
.wing-divider::before,
.wing-divider::after {
  content: ""; flex: 1 1 auto; height: 1px; background: var(--grad-line); max-width: 240px;
}
.wing-divider svg { width: 26px; height: 26px; color: var(--pink); animation: bobbing 4s ease-in-out infinite; }

/* ---------- 4. 按钮 / 标签 ---------- */
.btn {
  --btn-bg: var(--glass);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke-strong);
  background: var(--btn-bg);
  color: var(--ink);
  font-size: 0.95rem; font-weight: 600; letter-spacing: 0.04em;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s, background 0.3s;
  backdrop-filter: blur(12px);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.28), transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); border-color: var(--pink); color: var(--ink); }
.btn:hover::before { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(0.97); }

.btn--primary {
  background: var(--grad-main); border-color: transparent; color: #fff;
  box-shadow: 0 10px 34px rgba(168, 85, 247, 0.45);
}
.btn--primary:hover { color: #fff; }
.btn--ghost { background: transparent; }
.btn--sm { padding: 0.5rem 1.05rem; font-size: 0.85rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.28rem 0.85rem; border-radius: var(--r-pill);
  font-size: 0.76rem; letter-spacing: 0.08em;
  border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-dim);
}
.chip svg { width: 13px; height: 13px; }
.chip--pink { color: var(--pink); border-color: rgba(240, 171, 252, 0.4); background: rgba(240, 171, 252, 0.12); }
.chip--cyan { color: var(--cyan); border-color: rgba(103, 232, 249, 0.36); background: rgba(103, 232, 249, 0.1); }
.chip--gold { color: var(--gold); border-color: rgba(252, 211, 77, 0.36); background: rgba(252, 211, 77, 0.1); }

/* ---------- 5. 玻璃卡片 ---------- */
.card {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.14), transparent 42%);
}
.card__pad { padding: clamp(1.2rem, 2.4vw, 1.9rem); }

/* ---------- 6. 导航 ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
  padding: 0.9rem 0;
}
.topbar.is-stuck {
  background: color-mix(in srgb, var(--bg-0) 78%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 10px 30px rgba(10, 0, 30, 0.35);
  border-bottom: 1px solid var(--stroke);
}
.topbar__inner { display: flex; align-items: center; gap: 1rem; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); }
.brand__mark { width: 42px; height: 42px; flex: none; color: var(--pink); filter: drop-shadow(0 0 12px rgba(240, 171, 252, 0.55)); animation: flapIdle 1.6s ease-in-out infinite; transform-origin: 50% 50%; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand.is-poked .brand__mark { animation: poke 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes poke {
  0% { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.28) rotate(-14deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.brand__name { font-family: var(--font-display); font-size: 1.16rem; font-weight: 700; letter-spacing: 0.1em; }
.brand__sub { font-size: 0.66rem; letter-spacing: 0.3em; color: var(--ink-faint); text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 0.3rem; }
.nav a {
  position: relative; padding: 0.5rem 0.95rem; border-radius: var(--r-pill);
  color: var(--ink-dim); font-size: 0.92rem; font-weight: 500;
}
.nav a::after {
  content: ""; position: absolute; left: 50%; bottom: 4px; translate: -50% 0;
  width: 0; height: 2px; border-radius: 2px; background: var(--grad-main);
  transition: width 0.3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 46%; }
.nav a.is-active { color: var(--ink); background: var(--glass); border: 1px solid var(--stroke); }

.nav-tools { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--stroke);
  background: var(--glass); color: var(--ink-dim); cursor: pointer;
  transition: all 0.3s var(--ease);
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { color: var(--ink); border-color: var(--pink); transform: translateY(-2px) rotate(-6deg); }
.icon-btn .ico-sun { display: none; }
[data-theme="light"] .icon-btn .ico-sun { display: block; }
[data-theme="light"] .icon-btn .ico-moon { display: none; }

.nav-toggle { display: none; }

/* 滚动进度 */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 70; width: 0;
  background: var(--grad-main); box-shadow: 0 0 12px rgba(240, 171, 252, 0.8);
  transition: width 0.1s linear;
}

/* ---------- 7. Hero ---------- */
.hero {
  padding: clamp(6.5rem, 15vh, 9rem) 0 clamp(2.5rem, 6vw, 4rem);
  position: relative;
  /* 旋转中的 .stage-ring 绘制盒会超出容器，横向裁掉避免整页出现横向滚动条。
     用 clip 而不是 hidden：hidden 会把 overflow-y 变成 auto 并生成滚动容器，
     那样 .stage-glow 的模糊光晕和 .stage-card 的投影会被纵向切掉。 */
  overflow-x: clip;
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }

.hero__badge {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1.2rem;
  padding: 0.4rem 1.1rem 0.4rem 0.45rem; border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--stroke);
  font-size: 0.8rem; color: var(--ink-dim); letter-spacing: 0.14em;
}
.hero__badge b { color: var(--ink); font-weight: 600; }
.hero__badge .dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad-main); font-size: 0.8rem;
}

.hero__title {
  font-size: clamp(2.6rem, 8.2vw, 5.1rem);
  line-height: 1.05; margin: 0 0 0.4rem; letter-spacing: 0.04em;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 8px 26px rgba(139, 92, 246, 0.35));
}
.hero__title .en {
  display: block; font-size: 0.3em; letter-spacing: 0.5em; font-family: var(--font-body);
  font-weight: 500; -webkit-text-fill-color: var(--ink-faint); margin-top: 0.6rem;
}
.hero__lead { font-size: clamp(1rem, 1.6vw, 1.12rem); color: var(--ink-dim); max-width: 46ch; }
/* 四个入口收小一点，好在一行里排齐 */
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1.8rem 0 2.4rem; }
.hero__actions .btn { gap: 0.4rem; padding: 0.7rem clamp(0.7rem, 1.3vw, 1.15rem); font-size: 0.8rem; }
.hero__actions .btn svg { width: 15px; height: 15px; }

.stats { display: flex; flex-wrap: wrap; gap: clamp(1rem, 3vw, 2.4rem); }
.stat__num {
  font-family: var(--font-num); font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1; background: var(--grad-main);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat__label { font-size: 0.78rem; letter-spacing: 0.18em; color: var(--ink-faint); text-transform: uppercase; margin-top: 0.35rem; }

/* Hero 展示台：占位视觉 */
.hero__stage { position: relative; aspect-ratio: 4 / 5; max-width: 460px; margin-inline: auto; width: 100%; }
.stage-glow {
  position: absolute; inset: 8%; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(240, 171, 252, 0.4), rgba(103, 232, 249, 0.25), rgba(192, 38, 211, 0.4), rgba(240, 171, 252, 0.4));
  filter: blur(48px); animation: spin 18s linear infinite;
}
.stage-ring {
  position: absolute; inset: 6%; border-radius: 50%;
  border: 1px dashed rgba(196, 181, 253, 0.4);
  animation: spin 30s linear infinite reverse;
}
.stage-card {
  position: absolute; inset: 14%; border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--stroke-strong);
  backdrop-filter: blur(14px);
  display: grid; place-items: center; gap: 0.4rem; text-align: center;
  box-shadow: 0 30px 70px rgba(10, 0, 30, 0.5);
  animation: floaty 6s ease-in-out infinite;
}
.stage-card__b { width: 46%; color: var(--pink); filter: drop-shadow(0 0 22px rgba(240, 171, 252, 0.5)); }
.stage-card__b svg { width: 100%; height: auto; }
.stage-card__t { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 0.18em; }
.stage-card__s { font-size: 0.7rem; letter-spacing: 0.3em; color: var(--ink-faint); text-transform: uppercase; }

.orbit { position: absolute; inset: 0; }
.orbit__item {
  --r: 152px;
  position: absolute; top: 50%; left: 50%; width: 34px; color: var(--purple-300);
  animation: orbit 14s linear infinite;
}
.orbit__item svg { width: 100%; height: auto; }
.orbit__item:nth-child(2) { animation-duration: 19s; animation-delay: -6s; color: var(--pink); width: 26px; }
.orbit__item:nth-child(3) { animation-duration: 24s; animation-delay: -12s; color: var(--cyan); width: 30px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(10px); } }
@keyframes bobbing { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-7px) rotate(8deg); } }
@keyframes orbit {
  from { transform: rotate(0deg) translateX(var(--r)) rotate(0deg); }
  to { transform: rotate(360deg) translateX(var(--r)) rotate(-360deg); }
}

/* 滚动提示 */
.scroll-hint {
  display: inline-flex; flex-direction: column; align-items: center; gap: 0.4rem;
  margin-top: 2.4rem; color: var(--ink-faint); font-size: 0.72rem; letter-spacing: 0.3em;
}
.scroll-hint__line { width: 1px; height: 46px; background: linear-gradient(180deg, var(--pink), transparent); animation: dropLine 2.2s ease-in-out infinite; }
@keyframes dropLine { 0%, 100% { opacity: 0.25; transform: scaleY(0.5); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- 7.5 滚动蝴蝶带 ---------- */
.marquee {
  overflow: hidden; padding: 1.1rem 0; margin: 1rem 0 0;
  border-block: 1px solid var(--stroke);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.12), rgba(240, 171, 252, 0.14), rgba(103, 232, 249, 0.1));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: 2.2rem; width: max-content;
  animation: slide 26s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-family: var(--font-display); font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  letter-spacing: 0.24em; white-space: nowrap;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.marquee__track svg { width: 30px; height: auto; color: var(--pink); flex: none; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- 7.6 内页页头 ---------- */
.page-head { padding: clamp(6.5rem, 14vh, 8.5rem) 0 1.2rem; }
.page-head__title {
  font-size: clamp(2.1rem, 6vw, 3.6rem); margin: 0.8rem 0 0.6rem;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.page-head__sub { color: var(--ink-dim); max-width: 62ch; font-size: 1rem; }
.page-head__topline { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.4rem); flex-wrap: wrap; }
.page-head__topline .page-head__title { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.bears-art { flex: 1 1 300px; min-width: 260px; max-width: 460px; height: auto; }
/* 五只小熊整体再往左挪 1cm（窄屏整行铺开，不挪，免得贴边裁掉） */
@media (min-width: 1120px) {
  .bears-art { transform: translateX(-1cm); }
}
@media (max-width: 720px) {
  .bears-art { min-width: 0; flex-basis: 100%; }
}
.fact-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
/* 页头左文右图：介绍照放右边，窄屏自动叠到下面 */
.page-head__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: clamp(1.2rem, 3.4vw, 2.6rem); align-items: center; }
/* 两栏排版下文字铺满左栏，别再被 62ch 掐成一窄条 */
.page-head__grid .page-head__sub { max-width: none; }
#group-intro { white-space: pre-line; }
.page-head__shot { position: relative; justify-self: end; width: 100%; margin: 0; }
.page-head__shot-img {
  position: relative;
  aspect-ratio: 3 / 4; overflow: hidden;
  border: 1px solid var(--stroke); border-radius: var(--r-lg); background: var(--glass);
  box-shadow: var(--shadow);
}
.page-head__shot-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.page-head__shot-img::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(18, 5, 36, 0.55) 100%);
}
/* 站在照片上沿的五只海鸥：容器高度 0，脚正好落在照片那条边上 */
.page-head__gulls {
  position: absolute; left: 0; right: 0; top: 0; height: 0;
  color: #f6f2ff; filter: drop-shadow(0 3px 5px rgba(18, 5, 36, 0.5));
}
.page-head__gulls svg { position: absolute; bottom: 0; animation: gullBob 3.8s var(--ease) infinite; }
.page-head__gulls svg:nth-child(1) { left: 0;   width: 15%; transform: rotate(-7deg); animation-delay: 0s; }
.page-head__gulls svg:nth-child(2) { left: 20%; width: 12%; transform: rotate(5deg);  animation-delay: -0.7s; }
.page-head__gulls svg:nth-child(3) { left: 40%; width: 17%; transform: rotate(-3deg); animation-delay: -1.5s; }
.page-head__gulls svg:nth-child(4) { left: 61%; width: 11%; transform: rotate(7deg);  animation-delay: -2.2s; }
.page-head__gulls svg:nth-child(5) { left: 79%; width: 14%; transform: rotate(-5deg); animation-delay: -2.9s; }
@keyframes gullBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2px; } }
@media (max-width: 900px) {
  .page-head__grid { grid-template-columns: minmax(0, 1fr); }
  .page-head__shot { justify-self: start; max-width: 260px; }
}
.fact {
  padding: 0.55rem 1.05rem; border-radius: var(--r-md);
  border: 1px solid var(--stroke); background: var(--glass);
  backdrop-filter: blur(10px); min-width: 130px;
}
.fact b { display: block; font-family: var(--font-num); font-size: 1.02rem; letter-spacing: 0.04em; }
.fact small { font-size: 0.68rem; letter-spacing: 0.18em; color: var(--ink-faint); text-transform: uppercase; }

#group-facts .fact { padding: 0.38rem 0.8rem; min-width: 100px; }
#group-facts .fact b { font-size: 0.86rem; }
#group-facts .fact small { font-size: 0.6rem; letter-spacing: 0.14em; }

/* 页内子导航：主界面 + 子页面，切换式不滚动 */
.subnav-bar {
  position: sticky; top: var(--topbar-h, 70px); z-index: 45;
  padding: 0.6rem 0; margin-bottom: 0.4rem;
  background: color-mix(in srgb, var(--bg-0) 84%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--stroke);
}
.subnav {
  /* 几个 tab 就分几列：TOP 页四个，影像馆四个 */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 0.8rem;
}
.subnav__item {
  display: flex; align-items: center; gap: 0.85rem; width: 100%;
  text-align: left; cursor: pointer;
  padding: 0.95rem 1.1rem; border-radius: var(--r-md);
  border: 1px solid var(--stroke); background: var(--glass);
  backdrop-filter: blur(10px); color: var(--ink);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.subnav__item:hover { transform: translateY(-3px); border-color: var(--stroke-strong); box-shadow: var(--shadow-glow); color: var(--ink); }
.subnav__ico {
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-main); color: #fff; box-shadow: 0 6px 18px rgba(168, 85, 247, 0.32);
}
.subnav__ico svg { width: 20px; height: 20px; }
.subnav__txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.subnav__txt b { font-family: var(--font-display); font-size: 1.02rem; letter-spacing: 0.06em; }
.subnav__txt small { font-size: 0.74rem; color: var(--ink-faint); }
.subnav__item.is-on { border-color: var(--purple-400); background: var(--glass-strong); box-shadow: 0 0 0 1px var(--stroke-strong); }
/* TOP 页那张栏更紧凑：矮一截，图标小一点 */
.subnav-bar--tight { padding: 0.42rem 0; }
.subnav--tight { gap: 0.6rem; }
.subnav--tight .subnav__item { padding: 0.68rem 0.9rem; gap: 0.7rem; }
.subnav--tight .subnav__ico { width: 32px; height: 32px; border-radius: 11px; }
.subnav--tight .subnav__ico svg { width: 17px; height: 17px; }
/* TOP 页现在是 5 个 tab：auto-fit 在中等宽度会排成 4 + 1，落单很难看，这里锁成 3 + 2。
   区间写成 721~1127px，是为了不和下面 720px 的两列规则打架。 */
@media (max-width: 1127px) and (min-width: 721px) {
  .subnav--tight { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* 除「成员档案」外，标题降一档，长标题才排得下且不抢主界面 */
.subnav__item--sm .subnav__txt b { font-size: 0.9rem; letter-spacing: 0.04em; }
.subnav__item--sm .subnav__txt small { font-size: 0.7rem; }
/* 搜索时分类先让路，所有匹配结果一次摊开 */
.subnav.is-searching { opacity: 0.4; pointer-events: none; }
.tabpanel[hidden] { display: none !important; }
@media (max-width: 720px), (max-width: 960px) and (max-height: 520px) {
  /* 吸顶的 tab 不能在窄屏堆成几行卡片，太占地方：
     窄屏（含横屏矮窗）改成一排横向滚动的紧凑胶囊，只留小图标 + 标题 */
  .subnav-bar { padding: 0.3rem 0; }
  .subnav {
    display: flex; flex-wrap: nowrap; align-items: center;
    gap: 0.35rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; scroll-snap-type: x proximity;
  }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav__item,
  .subnav--tight .subnav__item {
    flex: 0 0 auto; width: auto;
    padding: 0.22rem 0.6rem; gap: 0.35rem;
    border-radius: 999px; scroll-snap-align: start;
  }
  .subnav__ico,
  .subnav--tight .subnav__ico { width: 18px; height: 18px; border-radius: 6px; }
  .subnav__ico svg,
  .subnav--tight .subnav__ico svg { width: 11px; height: 11px; }
  .subnav__txt b,
  .subnav__item--sm .subnav__txt b { font-size: 0.75rem; letter-spacing: 0.02em; white-space: nowrap; }
  .subnav__txt small { display: none; }
}

/* 工具条 */
.toolbar {
  display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  flex-wrap: wrap; margin-bottom: 1.8rem;
  padding: 0.9rem 1.1rem; border-radius: var(--r-lg);
  border: 1px solid var(--stroke); background: var(--glass); backdrop-filter: blur(12px);
}
.toolbar__note { margin: 0; font-size: 0.88rem; color: var(--ink-dim); letter-spacing: 0.04em; }
.toolbar__note b { color: var(--pink); font-size: 1.05rem; font-family: var(--font-display); }
.sort-box {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.9rem; border-radius: var(--r-pill);
  border: 1px solid var(--stroke); background: rgba(255, 255, 255, 0.05);
}
[data-theme="light"] .sort-box { background: rgba(255, 255, 255, 0.8); }
.sort-box svg { width: 16px; height: 16px; color: var(--purple-300); }
.sort-box select { border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 0.88rem; }
.sort-box select option { background: var(--bg-2); color: var(--ink); }

/* 生日卡 */
.bday { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.3rem; cursor: pointer; }
.bday__d {
  flex: none; width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center;
  background: var(--grad-main); color: #fff; line-height: 1.1; text-align: center;
  box-shadow: 0 8px 22px rgba(168, 85, 247, 0.35);
}
.bday__d b { font-family: var(--font-num); font-size: 1.5rem; }
.bday__d small { display: block; font-size: 0.6rem; letter-spacing: 0.1em; opacity: 0.9; }
.bday__info { flex: 1; min-width: 0; }
.bday__n { font-family: var(--font-display); font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bday__s { font-size: 0.8rem; color: var(--ink-faint); } /* 装不下就折成两行，不再挤旁边那列 */
/* 倒计时不能被中间那列挤成一字一行：整块不收缩，「203 / 天后」两行都不断字 */
.bday__c { margin-left: auto; text-align: right; flex: none; white-space: nowrap; }
.bday__c b { font-family: var(--font-num); font-size: 1.4rem; background: var(--grad-main); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bday__c small { display: block; font-size: 0.66rem; color: var(--ink-faint); white-space: nowrap; }
.bday.is-soon { border-color: var(--pink); box-shadow: 0 0 0 1px rgba(240, 171, 252, 0.3), var(--shadow); }

/* 空状态提示 */
.empty-note { color: var(--ink-faint); font-size: 0.9rem; letter-spacing: 0.1em; text-align: center; padding: 1.4rem 0; }

/* ---------- 8. 通用网格 ---------- */
.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.6rem); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
/* 作品区：每张卡固定在 ~170px 宽，屏幕窄了自动多排一列，卡片不会被拉宽。
   用 auto-fill 而不是 auto-fit —— auto-fit 会把空轨道收掉、最后一行被拉满，卡片就又宽回去了。 */
.grid--6 { grid-template-columns: repeat(auto-fill, minmax(min(168px, 100%), 1fr)); gap: clamp(0.7rem, 1.4vw, 1rem); }
.grid--6 .release { padding: 1rem 1.1rem; }
.grid--6 .release__title { font-size: 0.92rem; line-height: 1.4; }
.grid--6 .release__type { font-size: 0.66rem; }
@media (max-width: 430px) { .grid--6 { grid-template-columns: 1fr; } }

/* 成员卡专用：固定一排 3 张，多出来的自动居中排成 3 + 2
   （不用 auto-fit，否则宽屏会挤成 4 张一排） */
.mgrid { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1rem, 2.2vw, 1.6rem); }
.mgrid > .mcard { flex: 0 0 calc((100% - 2 * clamp(1rem, 2.2vw, 1.6rem)) / 3); }
@media (max-width: 900px) { .mgrid > .mcard { flex-basis: calc((100% - clamp(1rem, 2.2vw, 1.6rem)) / 2); } }
@media (max-width: 560px) { .mgrid > .mcard { flex-basis: 100%; } }

/* ---------- 9. 成员卡 ---------- */
.mcard { perspective: 1400px; height: 430px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.mcard__inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.9s var(--ease);
}
.mcard.is-flipped .mcard__inner { transform: rotateY(180deg); }
.mcard__face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: var(--r-lg); padding: 1.4rem;
  display: flex; flex-direction: column;
  border: 1px solid var(--stroke); background: var(--glass);
  backdrop-filter: blur(16px); box-shadow: var(--shadow);
  overflow: hidden;
}
.mcard__face--back { transform: rotateY(180deg); padding-top: 3.4rem; background: linear-gradient(160deg, rgba(139, 92, 246, 0.2), rgba(240, 171, 252, 0.08)); }
.mcard:hover { transform: translateY(-6px); }
.mcard__inner { transition: transform 0.9s var(--ease); }
/* 注意：不要给 .mcard__inner 加 filter / opacity 等分组属性，
   否则 transform-style: preserve-3d 会退化成 flat，翻面时两面会同时透出来 */
.mcard__face { transition: border-color .3s, box-shadow .3s; }
.mcard:hover .mcard__face { border-color: rgba(240, 171, 252, .55); }
.mcard:focus-visible { outline: 2px solid var(--pink); outline-offset: 4px; }

.mcard__tag {
  position: absolute; top: 1.1rem; right: 1.2rem;
  font-family: var(--font-num); font-size: 0.8rem; letter-spacing: 0.16em;
  color: var(--ink-faint);
}
.mcard__info {
  position: absolute; top: 0.7rem; left: 0.8rem;
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--stroke);
  background: var(--glass); color: var(--ink-faint);
  cursor: pointer; padding: 0;
  transition: color 0.25s, border-color 0.25s, transform 0.25s, background 0.25s;
}
.mcard__info svg { width: 1rem; height: 1rem; }
.mcard__info:hover { color: var(--pink); border-color: var(--pink); transform: rotate(12deg) scale(1.08); background: var(--glass-2); }
.mcard__info:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.mcard__avatar {
  position: relative; width: 108px; height: 108px; margin: 0.3rem auto 0.9rem;
  border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 30%, var(--mc-glow, rgba(240, 171, 252, 0.5)), rgba(124, 58, 237, 0.14) 70%);
  border: 1px solid var(--stroke-strong);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.04), 0 14px 36px rgba(10, 0, 30, 0.45);
}
.mcard__avatar::after {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 1px dashed rgba(196, 181, 253, 0.35); animation: spin 22s linear infinite;
}
.mcard__avatar .b { width: 62%; color: var(--ink); opacity: 0.9; }
.mcard__avatar .b svg { width: 100%; height: auto; }
/* 两页成员卡正面：原图蝴蝶签名，保留各自线条与渐变。 */
.mcard__avatar--signature {
  width: 136px; height: 136px; flex: 0 0 auto;
  background: radial-gradient(circle at 50% 30%, rgba(37, 16, 67, .82), rgba(10, 4, 25, .94) 75%);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .04), 0 0 28px var(--mc-glow), 0 14px 36px rgba(10, 0, 30, .45);
}
[data-theme="light"] .mcard__avatar--signature {
  background: radial-gradient(circle at 50% 30%, #fff, #e9ddf8 75%);
  box-shadow: 0 0 0 8px rgba(109, 40, 217, .04), 0 0 24px var(--mc-glow), 0 10px 24px rgba(76, 29, 149, .15);
}
.mcard__signature {
  display: block; width: 100%; height: 100%; object-fit: contain;
  pointer-events: none; -webkit-user-drag: none;
}

/* 弹窗头像换成个人简介照片：圆形裁切、对着脸 */
.mcard__avatar .mcard__pic {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover; object-position: 50% 28%;
}

/* 背面证件照：缺图时露出底层渐变 + 蝴蝶标，不会出现空白框 */
.mcard__idhead { display: flex; align-items: center; gap: 1rem; flex: 0 0 auto; margin-bottom: 0.9rem; }
.mcard__idphoto {
  position: relative; flex: 0 0 auto;
  width: 96px; height: 118px; border-radius: var(--r-md);
  overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 30%, var(--mc-glow, rgba(240, 171, 252, 0.5)), rgba(124, 58, 237, 0.16) 72%);
  border: 1px solid var(--stroke-strong);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04), 0 12px 28px rgba(10, 0, 30, 0.42);
}
[data-theme="light"] .mcard__idphoto { box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.05), 0 12px 28px rgba(76, 29, 149, 0.18); }
.mcard__idphoto .b { width: 46%; color: var(--ink); opacity: 0.45; transition: opacity 0.4s; }
.mcard__idphoto .b svg { width: 100%; height: auto; }
.mcard__idphoto img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 14%; display: block; -webkit-user-drag: none;
}
.mcard__idphoto.is-loaded .b { opacity: 0; }
.mcard__idinfo { flex: 1; min-width: 0; }
.mcard__idname { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: 0.14em; margin-bottom: 0.45rem; }
.mcard__idinfo .mbti-badge { margin-bottom: 0.35rem; }

.mcard__name { font-family: var(--font-display); font-size: 1.6rem; text-align: center; letter-spacing: 0.14em; }
.mcard__en { text-align: center; font-size: 0.72rem; letter-spacing: 0.34em; color: var(--ink-faint); text-transform: uppercase; margin-bottom: 0.9rem; }
.mcard__hint { margin-top: auto; text-align: center; font-size: 0.72rem; color: var(--ink-faint); letter-spacing: 0.2em; }
.mcard__hint-b { display: none; }
.mcard.is-flipped .mcard__hint-a { display: none; }
.mcard.is-flipped .mcard__hint-b { display: inline; }

/* ---------- MBTI ---------- */
/* 徽章 */
.mbti-badge {
  display: inline-flex; align-items: center; gap: 0.32em;
  padding: 0.24em 0.7em; border-radius: var(--r-pill);
  font-size: 0.7rem; letter-spacing: 0.06em; white-space: nowrap;
  color: var(--ink);
  background: color-mix(in srgb, var(--mt-c, var(--pink)) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--mt-c, var(--pink)) 55%, transparent);
}
.mbti-badge b { font-weight: 600; font-size: 0.86em; opacity: 0.62; letter-spacing: 0.14em; }

/* 弹窗里的 MBTI 区块 */
.mbti {
  --mt-c: var(--pink);
  position: relative; margin: 0 0 1rem; padding: 0.8rem 1rem 0.85rem 1.15rem;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--mt-c) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--mt-c) 34%, transparent);
  overflow: hidden;
}
.mbti::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--mt-c);
}

.mcard__list { list-style: none; margin: 0 0 0.9rem; padding: 0; display: grid; gap: 0.42rem; flex: 0 0 auto; }
.mcard__list li { display: flex; justify-content: space-between; gap: 0.8rem; font-size: 0.82rem; border-bottom: 1px dashed var(--stroke); padding-bottom: 0.35rem; }
.mcard__list span:first-child { color: var(--ink-faint); }
.mcard__list span:last-child { color: var(--ink); text-align: right; }

/* 弹窗里的应援色：色名 + 两个色号 */
.fancolor { margin: 1rem 0 0; }
.fancolor__title { font-size: 0.72rem; letter-spacing: 0.26em; color: var(--ink-faint); margin-bottom: 0.5rem; }
.fancolor__row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.fancolor__sw {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-num); font-size: 0.78rem; color: var(--ink-dim);
  padding: 0.2rem 0.65rem 0.2rem 0.28rem; border: 1px solid var(--stroke);
  border-radius: var(--r-pill); background: var(--glass);
}
.fancolor__sw i {
  width: 17px; height: 17px; border-radius: 50%; background: var(--fc, var(--purple-400));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.16);
}

.songs { margin: 1rem 0 0; }
.songs__title { font-size: 0.72rem; letter-spacing: 0.26em; color: var(--ink-faint); margin-bottom: 0.5rem; }
.songs__head,
.songs__row { display: grid; grid-template-columns: minmax(0, 1.5fr) auto minmax(0, 1fr); gap: 0.8rem; align-items: baseline; }
.songs__head { font-size: 0.68rem; letter-spacing: 0.12em; color: var(--ink-faint); padding-bottom: 0.35rem; border-bottom: 1px solid var(--stroke); }
.songs__head span:last-child { text-align: right; }
.songs__row { font-size: 0.82rem; padding: 0.42rem 0; border-bottom: 1px dashed var(--stroke); }
.songs__name { color: var(--ink); min-width: 0; }
.songs__date { color: var(--ink-dim); font-family: var(--font-num); white-space: nowrap; }
.songs__note { color: var(--ink-faint); text-align: right; }

.mini-bars { display: grid; gap: 0.7rem; margin-bottom: 1rem; }
.mini-bars__row { font-size: 0.78rem; }
.mini-bars__label { display: flex; justify-content: space-between; color: var(--ink-dim); margin-bottom: 0.3rem; }
.mini-bars__track { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.mini-bars__fill {
  height: 100%; border-radius: 4px; background: var(--grad-main);
  width: 0; transition: width 1.2s var(--ease);
}
[data-theme="light"] .mini-bars__track { background: rgba(109, 40, 217, 0.14); }

.countdown {
  margin-top: auto; text-align: center; padding: 0.7rem;
  border-radius: var(--r-md); background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
}
[data-theme="light"] .countdown { background: rgba(255, 255, 255, 0.7); }
.countdown__num { font-family: var(--font-num); font-size: 1.5rem; background: var(--grad-main); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.countdown__label { font-size: 0.7rem; letter-spacing: 0.2em; color: var(--ink-faint); }

/* ---------- 10. 作品 / 时间线 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2.2rem; }
.filter-btn {
  padding: 0.5rem 1.15rem; border-radius: var(--r-pill); cursor: pointer;
  border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-dim);
  font-size: 0.85rem; transition: all 0.3s var(--ease);
}
.filter-btn:hover { color: var(--ink); border-color: var(--stroke-strong); transform: translateY(-2px); }
.filter-btn.is-active { background: var(--grad-main); color: #fff; border-color: transparent; box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4); }

/* 时间轴的「年份 / 事项」索引：分两排、左对齐，按钮小一号 */
.tl-filters { flex-direction: column; align-items: flex-start; gap: 0.45rem; }
.tl-filters .filter-bar__row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; justify-content: flex-start; }
.tl-filters .filter-bar__label {
  font-size: 0.72rem; letter-spacing: 0.2em; color: var(--ink-faint);
  margin-right: 0.15rem; user-select: none;
}
.tl-filters .filter-btn { padding: 0.32rem 0.85rem; font-size: 0.78rem; }

.release {
  display: flex; flex-direction: column; gap: 0.8rem;
  padding: 1.3rem; border-radius: var(--r-lg);
  border: 1px solid var(--stroke); background: var(--glass);
  backdrop-filter: blur(14px); position: relative; overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.4s;
}
.release::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--grad-main); transform: scaleY(0); transform-origin: top;
  transition: transform 0.45s var(--ease);
}
.release:hover { transform: translateY(-8px); box-shadow: var(--shadow-glow); border-color: var(--stroke-strong); }
.release:hover::after { transform: scaleY(1); }
.release__cover {
  aspect-ratio: 2 / 1; border-radius: var(--r-md); position: relative; overflow: hidden;
  display: grid; place-items: center;
  /* 全部歌曲统一紫色：深紫渐变底 + 浅紫小熊 */
  background: linear-gradient(140deg, var(--purple-800), var(--purple-500));
}
.release__cover::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.32), transparent 55%);
}
.release__cover .b { width: 34%; color: var(--purple-200); filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.35)); }
.release__cover .b svg { width: 100%; height: auto; }
.release__play {
  position: absolute; right: 0.8rem; bottom: 0.8rem;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(12, 0, 28, 0.55); border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px); color: #fff; cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s;
}
.release__play svg { width: 16px; height: 16px; }
.release__play:hover { transform: scale(1.12); background: rgba(240, 171, 252, 0.5); }
.release__play.is-playing { background: var(--pink); color: #2c1059; }
.release__play.is-playing .ico-pause { display: none; }
.release__play.is-playing .ico-play { display: block; }

/* 进度条 + 时间：默认隐藏，只有真在播的时候才占位，卡片高度不会跳 */
.release__bar {
  height: 4px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  opacity: 0; max-height: 0; margin: 0;
  transition: opacity 0.3s, max-height 0.3s, margin 0.3s;
}
.release__fill {
  display: block; width: 0; height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--purple-400));
  border-radius: 999px;
  transition: width 0.25s linear;
}
.release__time {
  font-size: 0.72rem; color: var(--ink-dim); margin: 0;
  font-variant-numeric: tabular-nums;
  opacity: 0; max-height: 0; overflow: hidden;
  transition: opacity 0.3s, max-height 0.3s;
}
.release.has-audio .release__bar { opacity: 1; max-height: 4px; margin: 0.15rem 0 0.3rem; }
.release.has-audio .release__time { opacity: 1; max-height: 1.4em; }
.release__type { font-size: 0.72rem; letter-spacing: 0.2em; color: var(--purple-300); text-transform: uppercase; }
.release__title { font-size: 1.12rem; margin: 0; font-family: var(--font-display); }
.release__meta { font-size: 0.82rem; color: var(--ink-dim); margin: 0; }
.release__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* 播放键上的两个图标默认只显示一个：平时 play，播放中 pause */
.release__play .ico-pause { display: none; }
.release__play.is-playing .ico-play { display: none; }
.release__play.is-playing .ico-pause { display: block; }

/* ---------- 全站播放器（左上角悬浮） ----------
   左上角常驻一个「唱片 + 音符」小图标（.pmusic）：点一下开 / 收下面的播放条，
   第一次点就从第一首开始放；播放时唱片慢慢转、音符轻轻跳。
   播放条本身：上一首 / 播放暂停 / 下一首、拖进度、调音量、展开歌单、收成小胶囊。 */
.pmusic {
  position: fixed; z-index: 81;
  top: 4.6rem; left: clamp(0.8rem, 1.6vw, 1.4rem);
  width: 46px; height: 46px; padding: 0;
  display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(196, 181, 253, 0.5);
  background: radial-gradient(circle at 32% 24%, rgba(167, 139, 250, 0.55), rgba(76, 29, 149, 0.88) 62%, rgba(43, 16, 89, 0.95));
  box-shadow: 0 10px 26px rgba(8, 0, 24, 0.55);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s var(--ease);
}
.pmusic:hover { transform: translateY(-2px) scale(1.05); border-color: var(--purple-300); box-shadow: 0 14px 30px rgba(8, 0, 24, 0.6), 0 0 18px rgba(240, 171, 252, 0.35); }
.pmusic:focus-visible { outline: 2px solid var(--purple-300); outline-offset: 3px; }
.pmusic svg { display: block; width: 34px; height: 34px; }
.pmusic__disc { transform-origin: 50% 50%; }
.pmusic.is-playing { border-color: rgba(240, 171, 252, 0.6); box-shadow: 0 10px 26px rgba(8, 0, 24, 0.55), 0 0 20px rgba(240, 171, 252, 0.38); }
.pmusic.is-playing .pmusic__disc { animation: pmusicSpin 3.4s linear infinite; }
.pmusic.is-playing .pmusic__note { animation: pmusicNote 1.8s ease-in-out infinite; }
@keyframes pmusicSpin { to { rotate: 360deg; } }
@keyframes pmusicNote { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.6px); } }
@media (prefers-reduced-motion: reduce) {
  .pmusic.is-playing .pmusic__disc, .pmusic.is-playing .pmusic__note { animation: none; }
}

.pdock {
  /* 80：浮在内容 / 顶栏 / 小鸟上面，但要压在弹窗（90）和提示条（95）下面，
     不然打开弹窗时播放条会盖住弹窗标题 */
  position: fixed; z-index: 80;
  top: 8.1rem; left: clamp(0.8rem, 1.6vw, 1.4rem);   /* 挂在常驻音乐图标的下面 */
  width: min(300px, calc(100vw - 1.6rem));
  max-height: calc(100vh - 9rem);
  color: var(--ink);
  --pdock-scale: 0.9;   /* 整条播放条的大小，想再小/再大就改这一个数 */
  transform-origin: top left;
  animation: pdockIn 0.45s var(--ease) both;
}
.pdock[hidden] { display: none; }
/* 入场动画里就带着缩放，所以结束态不是 none，而是 scale(--pdock-scale) */
@keyframes pdockIn {
  from { opacity: 0; transform: translateY(-14px) scale(calc(var(--pdock-scale) * 0.97)); }
  to { opacity: 1; transform: scale(var(--pdock-scale)); }
}
/* 小胶囊在 .pdock 里面，别再缩一次 */
@keyframes pdockPillIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

.pdock__panel {
  border-radius: var(--r-lg); padding: 0.9rem;
  max-height: 100%; overflow: auto; overscroll-behavior: contain;
  background: linear-gradient(165deg, rgba(76, 29, 149, 0.55), rgba(12, 0, 28, 0.92)), var(--glass);
  border: 1px solid rgba(196, 181, 253, 0.22);
  box-shadow: 0 22px 60px rgba(8, 0, 24, 0.65), var(--shadow-glow);
  backdrop-filter: blur(14px);
  display: grid; gap: 0.7rem; align-content: start;
  /* 单列严格按面板宽度收：不然长歌名会把列撑宽、文字被面板边缘裁掉 */
  grid-template-columns: minmax(0, 1fr);
}
.pdock__top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.pdock__flag { font-size: 0.7rem; letter-spacing: 0.14em; color: var(--purple-200); }
.pdock.is-playing .pdock__flag { color: var(--pink); }
.pdock__tools { display: flex; gap: 0.3rem; }
.pdock__mini {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink-dim); cursor: pointer; transition: 0.25s;
}
.pdock__mini svg { width: 14px; height: 14px; }
.pdock__mini:hover { color: #fff; background: rgba(240, 171, 252, 0.22); border-color: var(--purple-300); }
.pdock__mini[data-pd="loop"][aria-pressed="true"] {
  color: #2b0a43; background: var(--pink); border-color: var(--pink);
}
.pdock__close {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink-faint); cursor: pointer; transition: 0.25s;
}
.pdock__close svg { width: 13px; height: 13px; }
.pdock__close:hover {
  color: #fff; background: rgba(244, 63, 94, 0.28); border-color: rgba(244, 63, 94, 0.6);
}

.pdock__now { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.pdock__art {
  flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--purple-800), var(--purple-500));
  border: 1px solid rgba(196, 181, 253, 0.3);
}
.pdock__art svg { width: 66%; color: var(--purple-200); }
.pdock.is-playing .pdock__art svg { animation: floaty 1.6s ease-in-out infinite; }
.pdock__txt { min-width: 0; flex: 1; }
.pdock__title {
  /* 歌名长就换到第二排（最多两排），再长就用更小的字号；两排还放不下才省略号 */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  font-family: var(--font-display); font-size: 0.98rem; line-height: 1.32;
  white-space: normal; overflow-wrap: anywhere; overflow: hidden;
}
.pdock__title.is-long { font-size: 0.86rem; }
.pdock__title.is-longer { font-size: 0.78rem; }
.pdock__sub {
  display: block; font-size: 0.74rem; color: var(--ink-faint); margin-top: 0.15rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.pdock__bar {
  position: relative; height: 6px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); touch-action: none;
}
.pdock__bar::after {
  /* 手指/鼠标够得着的热区，视觉上还是细条 */
  content: ""; position: absolute; inset: -10px 0;
}
.pdock__bar:focus-visible { outline: 2px solid var(--purple-300); outline-offset: 4px; }
.pdock__fill {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--purple-400));
}
.pdock__time {
  display: flex; align-items: center; gap: 0.35rem; margin: -0.35rem 0 0;
  font-size: 0.72rem; color: var(--ink-faint); font-variant-numeric: tabular-nums;
}
.pdock__sep { opacity: 0.5; }

.pdock__ctrls { display: flex; align-items: center; justify-content: center; gap: 0.9rem; }
.pdock__btn {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink); cursor: pointer; transition: 0.25s var(--ease);
}
.pdock__btn svg { width: 15px; height: 15px; }
.pdock__btn:hover { background: rgba(240, 171, 252, 0.24); border-color: var(--purple-300); transform: translateY(-1px); }
.pdock__btn--main {
  width: 46px; height: 46px;
  background: linear-gradient(140deg, var(--pink), var(--purple-500));
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 24px -12px rgba(236, 72, 153, 0.9);
}
.pdock__btn--main svg { width: 19px; height: 19px; }
.pdock__btn--main:hover { filter: brightness(1.08); }
.pdock__pp--pause { display: none; }
.pdock.is-playing .pdock__pp--play { display: none; }
.pdock.is-playing .pdock__pp--pause { display: block; }

.pdock__vol { display: flex; align-items: center; gap: 0.6rem; }
/* 手机也保留静音开关，避免已保存的静音状态无法取消。 */
.pdock__volume-hint { font-size: 12px; color: var(--ink-dim); }
.pdock__range {
  flex: 1; height: 4px; border-radius: 999px; appearance: none; -webkit-appearance: none;
  background: linear-gradient(90deg, var(--purple-300) var(--v, 100%), rgba(255, 255, 255, 0.14) var(--v, 100%));
  cursor: pointer;
}
.pdock__range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px rgba(196, 181, 253, 0.35);
}
.pdock__range::-moz-range-thumb {
  width: 12px; height: 12px; border: 0; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px rgba(196, 181, 253, 0.35);
}
.pdock.is-muted .pdock__range { --v: 0%; }

/* 歌单 */
.pdock__list {
  display: grid; gap: 0.1rem; max-height: 32vh; overflow: auto; overscroll-behavior: contain;
  padding-top: 0.5rem; border-top: 1px solid rgba(196, 181, 253, 0.18);
}
.pdock__list[hidden] { display: none; }
/* 播放器和歌单都不要拉动条：内容多了照样能滚（滚轮 / 手指） */
.pdock__panel, .pdock__list { scrollbar-width: none; }
.pdock__panel::-webkit-scrollbar, .pdock__list::-webkit-scrollbar { width: 0; height: 0; }
.pdock__row {
  display: flex; align-items: baseline; gap: 0.5rem; width: 100%;
  padding: 0.4rem 0.5rem; border: 0; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--ink-dim); font: inherit; font-size: 0.8rem; text-align: left;
  transition: 0.2s;
}
.pdock__row:hover { background: rgba(255, 255, 255, 0.07); color: var(--ink); }
.pdock__row.is-on { background: rgba(240, 171, 252, 0.16); color: #fff; }
.pdock__rown { font-size: 0.68rem; color: var(--ink-faint); min-width: 1.4em; font-variant-numeric: tabular-nums; }
.pdock__rowt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdock__rowd { font-size: 0.68rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* 收起来的小胶囊 */
.pdock__pill {
  display: none; align-items: center; gap: 0.5rem; width: 100%;
  padding: 0.45rem 0.5rem; border-radius: var(--r-pill);
  background: linear-gradient(140deg, rgba(76, 29, 149, 0.6), rgba(12, 0, 28, 0.94)), var(--glass);
  border: 1px solid rgba(196, 181, 253, 0.24);
  box-shadow: 0 18px 44px rgba(8, 0, 24, 0.6);
  backdrop-filter: blur(12px);
  animation: pdockPillIn 0.4s var(--ease) both;
}
.pdock.is-mini .pdock__panel { display: none; }
.pdock.is-mini .pdock__pill { display: flex; }
.pdock__pillmain {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.6rem;
  padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit;
}
.pdock__pillart {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--purple-800), var(--purple-500));
}
.pdock__pillart svg { width: 70%; color: var(--purple-200); }
.pdock.is-playing .pdock__pillart svg { animation: floaty 1.6s ease-in-out infinite; }
.pdock__pilltitle {
  flex: 1; min-width: 0; text-align: left; font-size: 0.82rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pdock__pilltitle.is-long { font-size: 0.76rem; }
.pdock__pilltitle.is-longer { font-size: 0.7rem; }
.pdock__pillbtn {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--pink), var(--purple-500)); color: #fff;
  border: 0; cursor: pointer; transition: 0.25s var(--ease);
}
.pdock__pillbtn:hover { filter: brightness(1.1); transform: scale(1.05); }
.pdock__pillbtn svg { width: 14px; height: 14px; }
.pdock__pillbtn--x {
  width: 28px; height: 28px; background: rgba(255, 255, 255, 0.08); color: var(--ink-dim);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.pdock__pillbtn--x svg { width: 12px; height: 12px; }
.pdock__pillbtn--x:hover {
  filter: none; color: #fff; background: rgba(244, 63, 94, 0.32); border-color: rgba(244, 63, 94, 0.6);
  transform: scale(1.05);
}

/* 窄屏：贴着左上角，宽度让给正文，不再压住页脚 */
@media (max-width: 760px) {
  .pmusic { top: 4.4rem; left: 0.6rem; }
  .pdock { top: 7.8rem; left: 0.6rem; width: min(272px, calc(100vw - 1.2rem)); }
  .pdock__list { max-height: 26vh; }
}
@media (max-width: 400px) {
  .pdock__sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pdock, .pdock__pill { animation: none; }
  .pdock.is-playing .pdock__art svg,
  .pdock.is-playing .pdock__pillart svg,
  .release.is-playing .release__cover { animation: none; }
}

/* 软跳转换页时轻微提示一下（音乐、主题、蝴蝶都不受影响） */
main { transition: opacity 0.18s var(--ease); }
.is-navigating main { opacity: 0.35; }

.tl { position: relative; padding-left: 2.4rem; }
.tl::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, transparent, var(--purple-400) 8%, var(--pink) 55%, transparent);
  border-radius: 2px;
}
.tl__year {
  font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 0.1em;
  margin: 2rem 0 1rem; color: var(--pink);
}
.tl__item { position: relative; margin-bottom: 1rem; }
.tl__dot {
  position: absolute; left: -2.4rem; top: 1.5rem; width: 20px; height: 20px;
  margin-left: 0; border-radius: 50%;
  background: var(--bg-0); border: 2px solid var(--pink);
  display: grid; place-items: center; color: var(--pink);
  transition: all 0.4s var(--ease);
}
.tl__dot svg { width: 10px; height: 10px; }
.tl__item:hover .tl__dot { background: var(--grad-main); color: #fff; transform: scale(1.15); }
.tl__date { font-size: 0.78rem; letter-spacing: 0.16em; color: var(--ink-faint); font-family: var(--font-num); }
.tl__body { padding: 1.1rem 1.3rem; border-radius: var(--r-md); border: 1px solid var(--stroke); background: var(--glass); backdrop-filter: blur(12px); cursor: pointer; transition: all 0.4s var(--ease); }
.tl__body:hover { border-color: var(--stroke-strong); transform: translateX(6px); box-shadow: var(--shadow); }
.tl__title { font-family: var(--font-display); font-size: 1.08rem; margin: 0.2rem 0 0.35rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.tl__desc { margin: 0; font-size: 0.9rem; color: var(--ink-dim); }
.tl__more {
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height 0.5s var(--ease), opacity 0.4s, margin 0.4s;
  font-size: 0.86rem; color: var(--ink-dim);
}
.tl__item.is-open .tl__more { max-height: 260px; opacity: 1; margin-top: 0.8rem; }

/* ---------- 11. 应援 / 打卡 ---------- */
.checkin {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(1.2rem, 3vw, 2.4rem); align-items: center;
  padding: clamp(1.4rem, 3vw, 2.2rem);
}
.checkin__visual { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.checkin__ring { position: absolute; inset: 0; border-radius: 50%; }
.checkin__ring--1 { border: 1px solid rgba(196, 181, 253, 0.3); }
.checkin__ring--2 { border: 1px dashed rgba(240, 171, 252, 0.45); animation: spin 26s linear infinite; }
.checkin__ring--3 { border: 2px solid transparent; border-top-color: var(--pink); border-right-color: var(--purple-500); animation: spin 6s linear infinite; }
.checkin__core {
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(240, 171, 252, 0.42), rgba(109, 40, 217, 0.25));
  border: 1px solid var(--stroke-strong); color: var(--pink);
  box-shadow: 0 0 34px rgba(168, 85, 247, 0.45);
}
.checkin__core svg { width: 46px; height: auto; }
.checkin__core.is-done { animation: pop 0.6s var(--ease); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }

.checkin__title { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 0.4rem; }
.checkin__text { color: var(--ink-dim); font-size: 0.94rem; }
.checkin__stats { display: flex; flex-wrap: wrap; gap: 1.4rem; margin: 1.2rem 0; }
.checkin__stat { text-align: left; }
.checkin__stat b { display: block; font-family: var(--font-num); font-size: 1.6rem; line-height: 1.1; background: var(--grad-main); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.checkin__stat small { font-size: 0.72rem; letter-spacing: 0.16em; color: var(--ink-faint); }

.streak-week { display: flex; flex-wrap: nowrap; gap: 0.4rem; margin-top: 0.95rem; }
.streak-week__d {
  flex: 1 1 0; min-width: 0; min-height: 56px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 1px solid var(--stroke); background: var(--glass);
  color: var(--ink-faint); position: relative;
}
.streak-week__w { font-size: 0.66rem; letter-spacing: 0.04em; line-height: 1; }
.streak-week__n { font-family: var(--font-num); font-size: 0.95rem; line-height: 1.2; color: var(--ink); white-space: nowrap; }
.streak-week__d.is-on {
  background: var(--grad-main); border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.4);
}
.streak-week__d.is-on .streak-week__n { color: #fff; }
.streak-week__d.is-today { border-color: var(--pink); }
.streak-week__d.is-today::after {
  content: "今天"; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  font-size: 0.56rem; line-height: 1; padding: 2px 5px; border-radius: 999px;
  background: var(--pink); color: #fff; letter-spacing: 0.04em;
}
.streak-week__d.is-on.is-today { box-shadow: 0 0 0 2px var(--pink), 0 6px 18px rgba(168, 85, 247, 0.4); }

/* 蝴蝶图鉴 */
.dex { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 0.9rem; }
.dex__item {
  border-radius: var(--r-md); border: 1px solid var(--stroke); background: var(--glass);
  padding: 1rem 0.8rem; text-align: center; position: relative; overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.dex__item:hover { transform: translateY(-5px) rotate(-1deg); border-color: var(--stroke-strong); }
.dex__item.is-locked { filter: grayscale(1); opacity: 0.45; }
.dex__item.is-locked::after {
  content: "未解锁"; position: absolute; inset: auto 0 0.5rem; font-size: 0.66rem; letter-spacing: 0.2em; color: var(--ink-faint);
}
.dex__item.is-new::after {
  content: "NEW"; position: absolute; top: 8px; right: 8px; font-size: 0.58rem; font-weight: 700;
  padding: 1px 6px; border-radius: 999px; background: var(--pink); color: #2c1059; letter-spacing: 0.1em;
}
.dex__b { width: 58%; margin: 0 auto 0.4rem; color: var(--dk, var(--purple-300)); }
.dex__b svg { width: 100%; height: auto; }
.dex__item.is-locked .dex__b { color: var(--ink-faint); }
.dex__name { font-family: var(--font-display); font-size: 0.94rem; letter-spacing: 0.08em; }
.dex__no { font-size: 0.64rem; color: var(--ink-faint); letter-spacing: 0.2em; }
.dex__count { font-size: 0.66rem; color: var(--ink-faint); margin-top: 0.2rem; }
/* 蝴蝶图鉴整块上移（桌面 150px；窄屏少挪，别压到日历） */
#dex { margin-top: calc(58px - 2 * clamp(3.6rem, 8vw, 6.5rem)); }

/* 随机寄语 */
.quote-box { text-align: center; padding: clamp(1.6rem, 4vw, 2.6rem); }
.quote-box__q {
  font-family: var(--font-display); font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  line-height: 1.9; margin: 0 auto 0.6rem; max-width: 30ch; min-height: 3.8em;
  display: flex; align-items: center; justify-content: center;
}
.quote-box__from { font-size: 0.82rem; letter-spacing: 0.2em; color: var(--ink-faint); }
.quote-box__b { width: 44px; color: var(--pink); margin: 0 auto 0.6rem; animation: flapIdle 1.8s ease-in-out infinite; transform-origin: 50% 50%; }
.quote-box__b svg { width: 100%; height: auto; }

.mood-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; justify-content: center; }
.mood {
  border: 1px solid var(--stroke); background: var(--glass); border-radius: var(--r-pill);
  padding: 0.45rem 1.05rem; cursor: pointer; font-size: 0.85rem; color: var(--ink-dim);
  transition: all 0.3s var(--ease);
}
.mood:hover { transform: translateY(-2px); color: var(--ink); }
.mood.is-active { background: var(--grad-main); color: #fff; border-color: transparent; }

/* 表单控件：日记等共用 */
.form-grid { display: grid; gap: 1rem; }
.field label { display: block; font-size: 0.78rem; letter-spacing: 0.16em; color: var(--ink-faint); margin-bottom: 0.4rem; text-transform: uppercase; }
.input, .textarea {
  width: 100%; padding: 0.85rem 1.05rem; border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--stroke);
  color: var(--ink); transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
[data-theme="light"] .input, [data-theme="light"] .textarea { background: rgba(255, 255, 255, 0.85); }
.input:focus, .textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(240, 171, 252, 0.16); }
.input option { background: var(--bg-2); color: var(--ink); }
.textarea { min-height: 120px; resize: vertical; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }

@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* 物料打卡 · 书架 */
.mat-tools { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.6rem; }
/* .mat-tools 是纵向 flex，vsearch 的 flex-basis 会变成高度，这里按内容高度收回来 */
.mat-tools .vsearch { width: 100%; flex: none; }
.mat-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.mat-sum__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.mat-sum__title { margin: 0.7rem 0 0.2rem; font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 1.8rem); }
.mat-sum__title b { font-family: var(--font-num); background: var(--grad-main); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mat-sum__sub { margin: 0; font-size: 0.84rem; color: var(--ink-dim); }
.mat-sum__sub b { color: var(--purple-300); font-family: var(--font-num); }
.mat-sum__btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.mat-sum__bar { height: 10px; border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--stroke); overflow: hidden; margin-top: 1.1rem; }
.mat-sum__bar span { display: block; height: 100%; border-radius: inherit; background: var(--grad-main); transition: width 0.6s var(--ease); }

.mat-shelf { display: grid; gap: 1.6rem; }
.shelf__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.shelf__name { margin: 0; font-size: 1.05rem; }
.shelf__prog { margin: 0.15rem 0 0; font-size: 0.76rem; color: var(--ink-faint); }
.shelf__prog b { color: var(--purple-300); font-family: var(--font-num); }
.shelf__bar { flex: 0 0 180px; height: 7px; border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--stroke); overflow: hidden; }
.shelf__bar span { display: block; height: 100%; background: var(--grad-main); transition: width 0.5s var(--ease); }

/* 书架：一层层木板，上面立着一本本简笔画的书，点一下书皮翻开 */
.bookshelf { min-width: 0; display: grid; gap: clamp(0.9rem, 2vw, 1.4rem); }
.shelf-row {
  position: relative;
  display: flex; flex-wrap: wrap; min-width: 0; align-items: flex-end; justify-content: center;
  gap: clamp(0.5rem, 1.1vw, 0.9rem);
  padding: 0 clamp(0.4rem, 1.6vw, 1rem) 0.9rem;
}
.shelf-row::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; border-radius: 5px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--purple-800) 74%, #000 26%), #170a29);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.bookcard {
  position: relative; flex: none; display: block; padding: 0; border: 0; background: transparent; cursor: pointer;
  width: clamp(84px, 9.5vw, 112px); height: clamp(116px, 13.2vw, 156px);
  transform-origin: bottom center; perspective: 720px;
  font-family: inherit; text-align: left; color: var(--ink);
  transition: transform 0.32s var(--ease);
}
.bookcard:hover, .bookcard:focus-visible { transform: translateY(-6px) rotate(-1.2deg); }
/* 翻开时露出的内页：横线纸 */
.bookcard__pages {
  position: absolute; inset: 0; border: 1.5px solid color-mix(in srgb, var(--ink) 46%, transparent); border-left-width: 3px;
  border-radius: 3px 8px 8px 3px;
  background:
    repeating-linear-gradient(180deg, transparent 0 8px, color-mix(in srgb, var(--ink) 12%, transparent) 8px 9px),
    color-mix(in srgb, var(--glass) 90%, var(--bg-1));
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
}
/* 简笔画书皮：一笔描边 + 缝线书脊，悬停微微翻起，点开翻到左边（背面是内衬纸） */
.bookcard__cover {
  position: absolute; inset: 0;
  transform-origin: left center; transform-style: preserve-3d;
  transition: transform 0.55s var(--ease);
}
.bookcard__front {
  position: absolute; inset: 0; display: flex; overflow: hidden;
  border: 1.5px solid color-mix(in srgb, var(--ink) 46%, transparent); border-radius: 3px 8px 8px 3px;
  background: color-mix(in srgb, var(--glass) 92%, var(--bg-1));
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.3);
  backface-visibility: hidden;
}
.bookcard__back {
  position: absolute; inset: 0; border: 1.5px solid color-mix(in srgb, var(--ink) 46%, transparent);
  border-left-width: 3px; border-radius: 3px 8px 8px 3px;
  background:
    radial-gradient(circle at 62% 46%, color-mix(in srgb, var(--bk-ink, var(--purple-300)) 16%, transparent), transparent 62%),
    color-mix(in srgb, var(--glass) 90%, var(--bg-1));
  transform: rotateY(180deg); backface-visibility: hidden;
}
.bookcard:hover .bookcard__cover, .bookcard:focus-visible .bookcard__cover { transform: rotateY(-14deg); }
.bookcard.is-opening .bookcard__cover { transform: rotateY(-128deg); }
.bookcard__spine {
  flex: none; width: 8px;
  border-right: 1px dashed color-mix(in srgb, var(--ink) 34%, transparent);
  background: color-mix(in srgb, var(--bk-ink, var(--purple-300)) 12%, transparent);
}
.bookcard__face { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0.5rem 0.5rem 0.45rem 0.4rem; }
.bookcard__eyebrow { font-size: 0.48rem; letter-spacing: 0.14em; color: var(--bk-ink, var(--purple-300)); opacity: 0.9; }
.bookcard__title {
  font-family: var(--font-display); font-size: clamp(0.7rem, 0.95vw, 0.84rem); line-height: 1.25; margin-top: 0.3rem;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.bookcard__count { margin-top: auto; font-size: 0.58rem; color: var(--ink-dim); }
.bookcard__count b { font-family: var(--font-num); color: var(--bk-ink, var(--purple-300)); }
.bookcard__bar { height: 4px; margin-top: 0.3rem; border-radius: var(--r-pill); border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent); overflow: hidden; }
.bookcard__bar i { display: block; height: 100%; background: var(--bk-ink, var(--purple-300)); transition: width 0.5s var(--ease); }
.bookcard__mark { position: absolute; right: -8px; bottom: -7px; width: 52px; height: auto; color: var(--bk-ink, var(--purple-300)); opacity: 0.24; pointer-events: none; }

/* 物料清单：一行一个条目，点一下打勾；长按条目 / 点「⋯」开详情 */
.mat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.mat-item {
  display: flex; align-items: stretch;
  border: 1px solid var(--stroke); border-radius: var(--r-md); background: var(--glass);
  overflow: hidden; transition: border-color 0.3s var(--ease), opacity 0.3s var(--ease);
}
.mat-item:hover { border-color: var(--stroke-strong); }
.mat-item.is-read { opacity: 0.6; }
.mat-item__toggle {
  flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 0.7rem;
  border: 0; background: transparent; color: inherit; font-family: inherit; text-align: left;
  padding: 0.62rem 0.85rem; cursor: pointer;
}
.mat-item__check {
  flex: none; width: 20px; height: 20px; margin-top: 0.06rem; border-radius: 6px;
  border: 1.5px solid var(--stroke-strong); display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 700; color: #fff;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.mat-item__toggle[aria-pressed="true"] .mat-item__check { background: var(--grad-main); border-color: transparent; }
.mat-item__main { min-width: 0; display: grid; gap: 0.12rem; }
.mat-item__title { font-size: 0.9rem; line-height: 1.5; }
.mat-item.is-read .mat-item__title { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--purple-300) 65%, transparent); }
.mat-item__meta { font-size: 0.72rem; color: var(--ink-faint); }
.mat-item__stars { color: var(--gold); font-style: normal; }
.mat-item__pen { color: var(--purple-300); font-style: normal; }
.mat-item__more {
  flex: none; border: 0; border-left: 1px solid var(--stroke); background: transparent;
  color: var(--ink-faint); padding: 0 0.85rem; font-size: 1.05rem; cursor: pointer;
  transition: color 0.25s, background 0.25s;
}
.mat-item__more:hover { color: var(--ink); background: var(--glass-strong); }
.mat-item.is-hit { animation: matHit 2.4s var(--ease); }
@keyframes matHit {
  0%, 55% { box-shadow: 0 0 0 3px rgba(240, 171, 252, 0.7), 0 12px 22px rgba(0, 0, 0, 0.36); }
  100% { box-shadow: none; }
}

/* 翻开一本书：弹窗里按合集分组 */
.mat-book { animation: bookOpen 0.5s var(--ease) both; transform-origin: left center; }
@keyframes bookOpen {
  from { transform: perspective(1200px) rotateY(-24deg) translateX(-16px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.mat-book__title { margin: 0.8rem 0 0.2rem; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.mat-book__sub { margin: 0; color: var(--ink-dim); font-size: 0.86rem; }
.mat-book__sub b { color: var(--purple-300); font-family: var(--font-num); }
.mat-book__groups { display: grid; gap: 1.3rem; margin-top: 1.3rem; }
.mat-group .shelf__head { margin-bottom: 0.6rem; }
.mat-group .shelf__name { font-size: 0.98rem; }
@media (prefers-reduced-motion: reduce) { .mat-book { animation: none; } }

/* 点开一本书的弹窗 */
.mat-modal__title { margin: 0.8rem 0 0.2rem; font-size: 1.25rem; line-height: 1.5; }
.mat-modal__meta { margin: 0; font-size: 0.78rem; color: var(--ink-faint); }
.mat-modal__row { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin-top: 1rem; }
.mat-modal__stars { display: flex; gap: 0.15rem; }
.mat__star { border: 0; background: transparent; padding: 0.1rem; cursor: pointer; color: var(--ink-faint); opacity: 0.5; transition: transform 0.2s var(--ease), color 0.2s, opacity 0.2s; }
.mat__star svg { width: 19px; height: 19px; display: block; }
.mat__star:hover { transform: scale(1.2); opacity: 1; color: var(--gold); }
.mat__star.is-on { color: var(--gold); opacity: 1; }

@media (max-width: 640px) {
  .shelf__bar { flex: 1 1 100%; }
  .bookcard { width: 76px; height: 106px; }
}

/* ---------- 12. 弹窗 / 彩蛋 ---------- */
.modal {
  position: fixed; inset: var(--overlay-top, 0px) 0 auto; height: var(--overlay-height, 100dvh);
  z-index: 90; display: none; place-items: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overscroll-behavior: contain;
  background: rgba(8, 0, 22, 0.72); backdrop-filter: blur(10px);
}
.modal.is-open { display: grid; animation: fadeIn 0.3s var(--ease); }
.modal__box {
  width: min(680px, 100%); min-width: 0; min-height: 0;
  max-height: min(86vh, 100%); display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--stroke-strong);
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  animation: riseIn 0.4s var(--ease) both; position: relative;
}
.modal__content { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scroll-padding-block: 1rem; }
.modal__content > :first-child { padding-top: max(4rem, 3vw); }
[data-theme="light"] .modal__box { background: linear-gradient(160deg, #fff, #f2ecff); }
.modal__close {
  position: absolute; top: 0.9rem; right: 0.9rem; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22);
  /* 固定深色底 + 白图标：弹窗里无论压着深色卡片还是浅色信纸都看得清 */
  background: rgba(24, 8, 46, 0.62); color: #fff; cursor: pointer; display: grid; place-items: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform 0.3s var(--ease);
}
.modal__close:hover { transform: rotate(90deg); }
.modal__close svg { width: 16px; height: 16px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.toast-wrap {
  position: fixed; left: 50%; bottom: 2rem; translate: -50% 0; z-index: 110; width: min(440px, calc(100% - 24px));
  display: flex; flex-direction: column; gap: 0.6rem; align-items: center; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1.2rem; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  border: 1px solid var(--stroke-strong); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); font-size: 0.88rem;
  animation: riseIn 0.35s var(--ease) both;
}
.toast { max-width: 100%; overflow-wrap: anywhere; }
.toast svg { flex: none; width: 16px; height: 16px; color: var(--pink); }
.toast.is-out { animation: fadeOut 0.4s var(--ease) forwards; }
@keyframes fadeOut { to { opacity: 0; transform: translateY(14px); } }

/* ---------- 12.5 荣誉墙 · 展示柜 ---------- */
.case {
  position: relative; overflow: hidden;
  border: 1px solid var(--stroke-strong); border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 26%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1) 70%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: clamp(1.6rem, 3.4vw, 2.6rem) clamp(0.9rem, 2.2vw, 1.8rem) 0;
}
/* 柜顶那排灯：一条亮带 + 四道往下打的光 */
.case__lamp {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, 640px); height: 3px; border-radius: var(--r-pill);
  background: linear-gradient(90deg, transparent, var(--pink), var(--purple-300), transparent);
  box-shadow: 0 0 18px rgba(240, 171, 252, 0.75);
}
.case__shelf {
  display: grid; gap: clamp(0.7rem, 1.6vw, 1.2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
}
/* 一层托板 = 一组展位，层间留点距离 */
.case__row + .case__row { margin-top: clamp(1rem, 2.2vw, 1.6rem); }
/* 层标题（比如「荣耀之战专柜」） */
.case__label {
  display: flex; align-items: center; justify-content: center; gap: 0.9rem;
  margin: 0 0 clamp(0.7rem, 1.6vw, 1.1rem);
  font-family: var(--font-display); font-size: 0.82rem;
  letter-spacing: 0.32em; text-indent: 0.32em; color: var(--gold);
}
.case__label::before, .case__label::after {
  content: ""; height: 1px; flex: 0 1 140px;
  background: linear-gradient(90deg, transparent, rgba(252, 211, 77, 0.55));
}
.case__label::after { transform: scaleX(-1); }
/* 一层放满六座（荣耀之战专柜）时排成一排，整层缩到三分之二大小 */
.case__shelf--six { grid-template-columns: repeat(6, minmax(0, 1fr)); zoom: 0.67; }
@media (max-width: 1080px) { .case__shelf--six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .case__shelf--six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 柜底的托板，奖杯站在它上面 */
.case__rail {
  height: 10px; margin-top: clamp(1rem, 2.4vw, 1.8rem);
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--purple-400), var(--purple-700));
  box-shadow: 0 6px 18px rgba(8, 0, 24, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  opacity: 0.75;
}

.honor { margin: 0; text-align: center; }
/* 展位顶上的聚光 */
.honor__spot {
  height: clamp(5rem, 9vw, 7.5rem);
  background: radial-gradient(60% 100% at 50% 0%, rgba(240, 171, 252, 0.22), transparent 72%);
}
.honor__cup { position: relative; display: grid; place-items: center; height: clamp(4.2rem, 7.6vw, 6rem); }
.honor__cup::before {
  content: ""; position: absolute; width: 130%; height: 130%;
  background: radial-gradient(50% 50% at 50% 52%, rgba(252, 211, 77, 0.26), transparent 70%);
  pointer-events: none;
}
.honor__cup svg {
  position: relative;
  width: auto; height: clamp(4rem, 7.2vw, 6rem);
  filter: drop-shadow(0 6px 16px rgba(252, 211, 77, 0.45)) drop-shadow(0 1px 3px rgba(120, 53, 15, 0.35));
  transition: transform 0.5s var(--ease);
}
/* 奖杯上那道扫光 */
.honor__sheen {
  position: absolute; inset: -14% 18% 22% 18%;
  border-radius: 50%; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.34), transparent 60%);
  opacity: 0.55; transition: opacity 0.4s, transform 0.5s var(--ease);
}
.honor__base {
  width: clamp(2.4rem, 4.6vw, 3.4rem); height: 8px; margin: 0.3rem auto 0;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--gold), var(--pink-soft), var(--gold));
  box-shadow: 0 4px 12px rgba(252, 211, 77, 0.35);
}
/* 铭牌 */
.honor__plaque {
  margin: 0.85rem 0 0; padding: 0.7rem 0.6rem 0.85rem;
  border: 1px solid rgba(252, 211, 77, 0.32); border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(252, 211, 77, 0.1), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.honor__plaque b {
  display: block; font-family: var(--font-display);
  font-size: 0.98rem; line-height: 1.5; color: var(--gold);
}
.honor__plaque small {
  display: block; margin-top: 0.3rem;
  font-family: var(--font-num); font-size: 0.62rem;
  letter-spacing: 0.14em; color: var(--ink-faint); line-height: 1.5;
}
.honor__tag { display: block; margin-top: 0.4rem; font-size: 0.7rem; color: var(--ink-dim); }

/* 可以点开的奖杯（写了获奖视频的那四座）：整座展位都是热区 */
.honor--video { cursor: pointer; touch-action: manipulation; }
.honor--video:focus-visible { outline: 2px solid var(--pink); outline-offset: 6px; border-radius: var(--r-md); }
.honor__hint {
  display: inline-flex; align-items: center; gap: 0.26rem;
  margin-top: 0.45rem; font-size: 0.68rem;
  letter-spacing: 0.06em; color: var(--gold); opacity: 0.85;
}
.honor__hint svg { width: 0.78em; height: 0.78em; }
@media (hover: hover) {
  .case__shelf .honor--video:hover .honor__hint { opacity: 1; }
}
[data-theme="light"] .honor__hint { color: #a16207; }

/* 环形奖杯（荣耀之战款）：玫瑰金配色 */
.honor--ring .honor__cup::before {
  background: radial-gradient(50% 50% at 50% 52%, rgba(240, 166, 138, 0.3), transparent 70%);
}
.honor--ring .honor__cup svg {
  filter: drop-shadow(0 6px 16px rgba(233, 147, 116, 0.45)) drop-shadow(0 1px 3px rgba(107, 52, 37, 0.35));
}
.honor--ring .honor__base {
  background: linear-gradient(90deg, #c9765a, #f4c3ab, #c9765a);
  box-shadow: 0 4px 12px rgba(201, 118, 90, 0.35);
}
.honor--ring .honor__plaque {
  border-color: rgba(240, 179, 155, 0.34);
  background: linear-gradient(180deg, rgba(240, 179, 155, 0.1), rgba(255, 255, 255, 0.03));
}
.honor--ring .honor__plaque b { color: #f4c3ab; }
[data-theme="light"] .honor--ring .honor__plaque b { color: #a24b32; }
@media (hover: hover) {
  .case__shelf .honor--ring:hover .honor__plaque { border-color: rgba(240, 179, 155, 0.62); }
}

/* 鼠标扫过展位：灯亮一点，奖杯轻轻抬起来 */
@media (hover: hover) {
  .case__shelf .honor:hover .honor__cup svg { transform: translateY(-7px) scale(1.06); }
  .case__shelf .honor:hover .honor__sheen { opacity: 0.95; transform: translateY(-7px); }
  .case__shelf .honor:hover .honor__plaque { border-color: rgba(252, 211, 77, 0.6); }
}
@media (prefers-reduced-motion: no-preference) {
  .honor__sheen { animation: honorGleam 4.6s var(--ease) infinite; }
  .honor:nth-child(2) .honor__sheen { animation-delay: 1.1s; }
  .honor:nth-child(3) .honor__sheen { animation-delay: 2.3s; }
  .honor:nth-child(4) .honor__sheen { animation-delay: 3.4s; }
  @keyframes honorGleam {
    0%, 72%, 100% { opacity: 0.4; transform: translateX(0); }
    86% { opacity: 1; transform: translateX(10px); }
  }
}
[data-theme="light"] .case { background: linear-gradient(180deg, #fff, var(--bg-1) 72%); }
[data-theme="light"] .honor__plaque b { color: #a16207; }
[data-theme="light"] .honor__cup svg { filter: drop-shadow(0 4px 12px rgba(180, 120, 20, 0.35)); }
[data-theme="light"] .honor--ring .honor__cup svg { filter: drop-shadow(0 4px 12px rgba(160, 85, 60, 0.35)); }

/* ---------- 13. 页脚 ---------- */
.footer { position: relative; padding: 3.4rem 0 2rem; border-top: 1px solid var(--stroke); margin-top: 2rem; }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.footer__title { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.14em; margin-bottom: 0.8rem; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.88rem; color: var(--ink-dim); }
/* 页脚的「页面」一栏排成两列，贴着排、紧凑一点 */
.footer__list--pages {
  grid-template-columns: repeat(2, max-content);
  column-gap: 1.4rem;
  row-gap: 0.3rem;
}
.footer__bottom {
  margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px dashed var(--stroke);
  display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: space-between;
  font-size: 0.76rem; color: var(--ink-faint); letter-spacing: 0.1em;
}
.credit {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin: 0.9rem 0 0; padding: 0.32rem 0.9rem 0.32rem 0.4rem;
  border: 1px solid var(--stroke); border-radius: 999px;
  background: var(--glass-2); font-size: 0.82rem;
}
.credit__k {
  padding: 0.12rem 0.6rem; border-radius: 999px;
  background: var(--grad-main); color: #fff; letter-spacing: 0.16em; font-size: 0.7rem;
}
.credit__v { color: var(--pink); font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.12em; }
/* 手机页脚：别拖一长条——品牌占一整行，页面/组合信息并成两栏，小提示再占一整行，字号整体收小 */
@media (max-width: 620px) {
  .footer { padding: 1.8rem 0 1.1rem; margin-top: 1.2rem; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.95rem 1.1rem; }
  .footer__grid > div:first-child { grid-column: 1 / -1; }
  .footer__grid > div:last-child { grid-column: 1 / -1; }
  .footer .brand { margin-bottom: 0.5rem !important; }
  .footer__grid > div:first-child p { font-size: 0.8rem !important; max-width: none !important; }
  .footer__title { font-size: 0.95rem; letter-spacing: 0.1em; margin-bottom: 0.45rem; }
  .footer__list { font-size: 0.8rem; gap: 0.25rem; }
  .footer__list--pages { column-gap: 1.1rem; row-gap: 0.25rem; }
  .credit { margin-top: 0.5rem; padding: 0.24rem 0.75rem 0.24rem 0.34rem; gap: 0.4rem; }
  .credit__k { font-size: 0.62rem; padding: 0.1rem 0.5rem; }
  .credit__v { font-size: 0.92rem; }
  .footer__bottom { margin-top: 1.1rem; padding-top: 0.8rem; font-size: 0.68rem; gap: 0.35rem; }
}
.to-top {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 50;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--stroke-strong); background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  backdrop-filter: blur(12px); color: var(--ink); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(20px); pointer-events: none;
  transition: all 0.4s var(--ease);
}
.to-top svg { width: 18px; height: 18px; }
.to-top.is-show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--grad-main); color: #fff; border-color: transparent; }

/* ---------- 14. 蝴蝶动画层 ---------- */
.bfly-layer { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.bfly-layer .b { position: absolute; will-change: transform; color: var(--purple-300); opacity: 0; }
.bfly-layer svg { width: 100%; height: auto; display: block; }
.bfly-layer .b.is-catchable { pointer-events: auto; cursor: pointer; }
.bfly-layer .b.is-catchable:hover { filter: drop-shadow(0 0 12px rgba(240, 171, 252, 0.9)); }

.spark {
  position: fixed; z-index: 95; pointer-events: none; border-radius: 50%;
  background: var(--pink); box-shadow: 0 0 12px 2px rgba(240, 171, 252, 0.8);
  animation: sparkFly 0.9s var(--ease) forwards;
}
@keyframes sparkFly {
  to { transform: translate(var(--dx, 0px), var(--dy, -90px)) scale(0.2); opacity: 0; }
}

/* 翅膀扇动 */
.w-l, .w-r { transform-origin: 50px 42px; animation: flap .42s ease-in-out infinite; }
.w-r { animation-delay: -0.05s; }
@keyframes flap { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(0.42); } }
@keyframes flapIdle { 0%, 100% { transform: scaleX(1) scale(1); } 50% { transform: scaleX(0.55) scale(1.02); } }

/* ---------- 14b. 影像馆 ---------- */
:root { --bili: #fb7299; }

/* 影像网格：宽屏一排五支，逐级降到 4 / 3 / 2 / 1 */
.vgrid { display: grid; gap: clamp(0.6rem, 1.3vw, 1rem); grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* 官方合集：宽屏一排四个，逐级降到 3 / 2 / 1 */
.sgrid { display: grid; gap: clamp(0.7rem, 1.5vw, 1.1rem); grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* --- 单支视频卡 --- */
.vcard {
  display: flex; flex-direction: column;
  border-radius: var(--r-md); border: 1px solid var(--stroke);
  background: var(--glass); backdrop-filter: blur(14px); overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.4s;
  color: var(--ink);
}
.vcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-glow); border-color: var(--stroke-strong); }
.vcard__cover {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: linear-gradient(140deg, var(--purple-700), var(--purple-500) 55%, #c026d3);
  display: grid; place-items: center;
}
.vcard__cover .b { color: rgba(255, 255, 255, 0.85); filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.35)); }
.vcard__cover .b svg { width: 100%; height: auto; }
.vcard__pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); }
.vcard__pic.is-on { opacity: 1; }
.vcard:hover .vcard__pic { transform: scale(1.05); }
  .vcard__kind {
    position: absolute; left: 0.4rem; top: 0.4rem; z-index: 2;
    padding: 0.1rem 0.45rem; border-radius: var(--r-pill);
    font-size: 0.58rem; letter-spacing: 0.1em; color: #2c1059; font-weight: 700;
    background: var(--vk, var(--pink));
  }
.vcard__kind[data-kind="material"] { --vk: var(--pink); }
.vcard__kind[data-kind="stage"] { --vk: var(--cyan); }
.vcard__kind[data-kind="practice"] { --vk: var(--purple-300); }
.vcard__kind[data-kind="variety"] { --vk: var(--gold); }
  /* 站外条目的平台角标（微博 / 抖音），落在封面右上角 */
  .vcard__site {
    position: absolute; right: 0.4rem; top: 0.4rem; z-index: 2;
    padding: 0.1rem 0.45rem; border-radius: var(--r-pill);
    font-size: 0.58rem; font-weight: 700; letter-spacing: 0.08em;
    color: #fff; background: rgba(10, 0, 24, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.28); backdrop-filter: blur(4px);
  }
  .vcard__site[data-site="微博"] { background: rgba(226, 26, 47, 0.85); border-color: transparent; }
  .vcard__site[data-site="抖音"] { background: rgba(24, 24, 30, 0.82); border-color: rgba(255, 255, 255, 0.42); }
  .vcard__dur {
    position: absolute; right: 0.35rem; bottom: 0.35rem; z-index: 2;
    padding: 0.06rem 0.35rem; border-radius: 5px;
    background: rgba(10, 0, 24, 0.68); color: #fff;
    font-size: 0.6rem; font-family: var(--font-num);
  }
  /* 分类分块：官方合集之后，每类影像各起一节 */
    .vblock { padding-top: max(0px, calc(clamp(2.6rem, 5.5vw, 4.4rem) - 50px)); }
  .vblock .section__head { margin-bottom: clamp(1.2rem, 2.4vw, 2rem); }
  .vblock .vcount { margin: 0 0 0.9rem; }
  .vcard__play {
    position: absolute; inset: 0; z-index: 3; margin: auto;
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(12, 0, 28, 0.5); border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(6px); color: #fff; cursor: pointer;
    transition: transform 0.3s var(--ease), background 0.3s;
  }
  .vcard__play { text-decoration: none; }
  .vcard__play--ext { background: rgba(12, 0, 28, 0.66); }
  .vcard__play svg { width: 14px; height: 14px; }
  .vcard:hover .vcard__play { transform: scale(1.12); background: var(--bili); border-color: transparent; }
  .vcard:hover .vcard__play--ext { background: rgba(255, 255, 255, 0.92); color: #3b0764; }
  .vcard__body { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.6rem 0.7rem 0.72rem; flex: 1; }
  .vcard__title {
    margin: 0; font-size: 0.82rem; line-height: 1.45; font-weight: 600;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .vcard__series { font-size: 0.66rem; color: var(--purple-300); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* 推荐指数与推荐语（推荐物料清单） */
  .vcard__stars { display: flex; gap: 2px; margin: 0; }
  .vcard__stars svg { width: 12px; height: 12px; color: var(--ink-faint); opacity: 0.45; }
  .vcard__stars svg.is-on { color: var(--gold); opacity: 1; filter: drop-shadow(0 0 5px rgba(252, 211, 77, 0.35)); }
  .vcard__note {
    margin: 0; font-size: 0.68rem; line-height: 1.55; color: var(--ink-dim);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  .vcard__meta { display: flex; justify-content: space-between; gap: 0.4rem; margin-top: auto; font-size: 0.64rem; color: var(--ink-faint); font-family: var(--font-num); }

/* --- 官方合集卡 --- */
.scard {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  border-radius: var(--r-md); border: 1px solid var(--stroke);
  background: var(--glass); backdrop-filter: blur(14px); overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.4s;
}
.scard:hover { transform: translateY(-6px); box-shadow: var(--shadow-glow); border-color: var(--stroke-strong); color: var(--ink); }
.scard__cover {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: linear-gradient(140deg, var(--purple-700), #c026d3); display: grid; place-items: center;
}
.scard__cover .b { color: rgba(255, 255, 255, 0.85); }
.scard__cover .b svg { width: 100%; height: auto; }
.scard__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); }
.scard__cover img.is-on { opacity: 1; }
.scard:hover .scard__cover img { transform: scale(1.05); }
.scard__no {
  position: absolute; left: 0.55rem; top: 0.55rem; z-index: 2;
  padding: 0.16rem 0.6rem; border-radius: var(--r-pill);
  font-size: 0.66rem; letter-spacing: 0.14em; font-weight: 700; color: #2c1059;
  background: var(--vk, var(--pink));
}
.scard__no[data-kind="material"] { --vk: var(--pink); }
.scard__no[data-kind="stage"] { --vk: var(--cyan); }
.scard__no[data-kind="practice"] { --vk: var(--purple-300); }
.scard__no[data-kind="variety"] { --vk: var(--gold); }
  .scard__body { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.7rem 0.8rem 0.82rem; flex: 1; }
  .scard__name { margin: 0; font-family: var(--font-display); font-size: 0.96rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .scard__desc { margin: 0; font-size: 0.76rem; color: var(--ink-dim); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .scard__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: auto; font-size: 0.68rem; color: var(--ink-faint); }
  .scard__go { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--bili); font-weight: 600; white-space: nowrap; }
  .scard__go svg { width: 12px; height: 12px; }

/* --- 工具条：搜索 / 随机 / 更多 --- */
.gal-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.vsearch { position: relative; flex: 1 1 240px; min-width: 0; }
.vsearch svg { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-faint); pointer-events: none; }
.vsearch input {
  width: 100%; padding: 0.62rem 1rem 0.62rem 2.5rem;
  border-radius: var(--r-pill); border: 1px solid var(--stroke-strong);
  background: var(--glass); color: var(--ink); font-size: 0.9rem; font-family: inherit;
  backdrop-filter: blur(12px);
}
.vsearch input::placeholder { color: var(--ink-faint); }
.vsearch input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(240, 171, 252, 0.18); }

/* --- 页内播放器 --- */
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: #0b0318; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-note { margin: .8rem 0 0; font-size: .8rem; color: var(--ink-faint); text-align: center; }
.modal__pad { padding: clamp(1.3rem, 3vw, 2rem); }
.modal__title { margin: 0 0 1rem; font-family: var(--font-display); font-size: 1.1rem; line-height: 1.5; padding-right: 3rem; }

.vlink { color: inherit; text-decoration: none; transition: color 0.3s; }
.vlink:hover { color: var(--bili); text-decoration: underline; text-underline-offset: 3px; }

.vcount { font-size: 0.84rem; color: var(--ink-dim); }
.vcount b { color: var(--pink); font-family: var(--font-num); font-size: 1.05rem; }
.more-wrap { display: flex; justify-content: center; margin-top: 2rem; }
.more-wrap[hidden] { display: none; }

/* 还在整理的分页占位（外务综艺） */
.gal-pending { text-align: center; }
.gal-pending p { color: var(--ink-dim); margin: 0 0 1.1rem; }

/* 推荐物料的二级筛选栏：靠左、比通用 filter-bar 小一号 */
.gal-picks-bar { justify-content: flex-start; margin: 0.2rem 0 1.1rem; gap: 0.45rem; }
.gal-picks-bar .filter-btn { padding: 0.36rem 1rem; font-size: 0.82rem; }

/* ---------- 17.5 外务综艺 · 行程表 ---------- */
.vr { margin-top: clamp(1.8rem, 4vw, 2.8rem); }
.vr:first-child { margin-top: 0; }
.vr__title {
  display: flex; align-items: baseline; gap: 0.6rem;
  font-size: 1.5rem; margin-bottom: 0.4rem;
}
.vr__title span {
  font-family: var(--font-num); font-size: 0.95rem;
  color: var(--pink); letter-spacing: 0.06em;
}

/* 综艺企划 / 飞行：一格一个通告 */
.vrc-grid {
  display: grid; gap: clamp(0.7rem, 1.6vw, 1.1rem);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1.1rem;
}
.vrc {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 1.1rem 1.2rem; border-radius: var(--r-md);
  border: 1px solid var(--stroke); background: var(--glass);
  box-shadow: var(--shadow); transition: transform 0.3s var(--ease), border-color 0.3s;
}
.vrc:hover { transform: translateY(-4px); border-color: var(--stroke-strong); }
.vrc__ico {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 11px; background: var(--glass-2);
  border: 1px solid var(--stroke); color: var(--pink);
}
.vrc__ico svg { width: 17px; height: 17px; }
.vrc__name { font-size: 1.02rem; line-height: 1.5; }
.vrc__name small {
  margin-left: 0.4rem; padding: 0.1rem 0.45rem;
  border-radius: var(--r-pill); font-size: 0.68rem; font-weight: 400;
  background: var(--glass-2); border: 1px solid var(--stroke); color: var(--ink-dim);
}
.vrc__date { font-family: var(--font-num); font-size: 0.78rem; color: var(--ink-faint); letter-spacing: 0.05em; }

/* 晚会活动：时间线 */
.vrg-list {
  list-style: none; margin: 1.1rem 0 0; position: relative;
  padding-left: clamp(3.4rem, 7vw, 5.2rem);
}
.vrg-list::before {
  content: ""; position: absolute; left: clamp(1.2rem, 2.6vw, 2rem); top: 0.5rem; bottom: 0.5rem;
  width: 2px; border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--pink), var(--purple-400), transparent);
  opacity: 0.5;
}
.vrg {
  position: relative; list-style: none; margin: 0 0 0.9rem;
  padding: 1rem 1.2rem; border-radius: var(--r-md);
  border: 1px solid var(--stroke); background: var(--glass);
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.vrg:last-child { margin-bottom: 0; }
.vrg:hover { transform: translateX(4px); border-color: var(--stroke-strong); }
.vrg::before {
  content: ""; position: absolute; left: calc(-1 * clamp(2.2rem, 4.6vw, 3.2rem)); top: 1.45rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--pink); box-shadow: 0 0 0 3px var(--bg-1), 0 0 12px rgba(240, 171, 252, 0.7);
}
.vrg__date {
  position: absolute; right: calc(100% + clamp(0.7rem, 1.4vw, 1.1rem)); top: 1.1rem;
  font-family: var(--font-num); font-size: 0.76rem;
  color: var(--ink-faint); white-space: nowrap; letter-spacing: 0.04em;
}
.vrg__name { font-size: 1.02rem; line-height: 1.5; margin-bottom: 0.35rem; }
.vrg__acts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.vrg__act { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; font-size: 0.86rem; }
.vrg__label {
  flex: none; padding: 0.08rem 0.5rem; border-radius: var(--r-pill);
  font-size: 0.7rem; background: var(--glass-2);
  border: 1px solid var(--stroke); color: var(--ink-dim);
}
.vrg__songs { color: var(--ink-dim); }
.vrg__songs b { font-weight: 500; color: var(--gold); }
.vrg__note {
  display: flex; align-items: center; gap: 0.35rem;
  margin-top: 0.5rem; font-size: 0.78rem; color: var(--ink-faint);
}
.vrg__note svg { width: 13px; height: 13px; flex: none; color: var(--pink-soft); }

/* 日期改到标题上方，给平板和窄桌面保留足够的内容宽度。 */
@media (max-width: 1120px) {
  .vrg { padding-left: 1rem; padding-right: 1rem; }
  .vrg-list { padding-left: 0; }
  .vrg-list::before { left: 5px; }
  .vrg::before { left: 0; top: 1.15rem; }
  .vrg__date { position: static; display: block; margin-bottom: 0.25rem; }
  .vrg:hover { transform: none; }
}

/* 影像网格逐级降列：5 → 4 → 3 → 2 → 1 */
@media (max-width: 1180px) { .vgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .vgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  {
  .sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vcard__title { font-size: 0.86rem; }
}
@media (max-width: 620px)  { .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px)  { .sgrid { grid-template-columns: 1fr; } }
@media (max-width: 400px)  { .vgrid { grid-template-columns: 1fr; } }

/* ---------- 17. 照片墙 ----------
   彩旗 + 灰粽色墙板 + 图钉 + 歪着钉上去的拍立得。
   类名统一用 pw- 前缀，避免和其它模块重名 */
.pw-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
/* 照片墙：年份那一栏不再用大标题，只在眉标后面挂一个小标签 */
.pw-note {
  font-style: normal; margin-left: 0.55em; padding: 0.1em 0.6em;
  border-radius: var(--r-pill); font-size: 0.9em; font-family: var(--font-display);
  color: var(--pink);
  background: color-mix(in srgb, var(--pink) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--pink) 36%, transparent);
}
/* 年份墙页头：说明句接在眉标（和「还在长。」小标签）后面同一行 */
.pw-headsub {
  display: inline-block; vertical-align: middle; margin-left: 0.8rem;
  max-width: 100%; font-size: 0.9rem; letter-spacing: 0.02em; color: var(--ink-dim);
}
.pw-count { font-size: 0.84rem; color: var(--ink-dim); }
.pw-count b { color: var(--pink); font-family: var(--font-num); font-size: 1.05rem; }

/* --- 拍立得墙：上传自己照片的独立按钮，单独一行摆在墙上方 --- */
.pw-same-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.9rem;
  max-width: min(100%, 1040px);
  margin: 0.4rem auto 0.5rem;
  text-align: center;
}
.pw-same-cta__tip { font-size: 0.82rem; color: var(--ink-dim); }

/* --- 三角旗彩带 --- */
.pw-bunting {
  --n: 15;
  position: relative;
  display: flex;
  justify-content: center;
  gap: 0.18rem;
  padding: 0 clamp(0.2rem, 2vw, 1.2rem) 0.9rem;
  margin: 0 auto 0.3rem;
  max-width: min(100%, 1040px);
}
/* 挂旗的那根绳：一条微微下垂的线 */
.pw-bunting::before {
  content: "";
  position: absolute;
  inset: 4px 0 auto;
  height: 14px;
  border-bottom: 2px solid rgba(196, 181, 253, 0.5);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  pointer-events: none;
}
.pw-flag {
  position: relative;
  flex: 1 1 0;
  max-width: 42px;
  height: 20px;
  /* 三角形靠 border 切出来，上面宽下面收成尖 */
  border-left: clamp(4px, 1vw, 8px) solid transparent;
  border-right: clamp(4px, 1vw, 8px) solid transparent;
  border-top: clamp(14px, 2.2vw, 22px) solid var(--c, var(--pink));
  transform-origin: 50% 0;
  transform: rotate(var(--tilt, 0deg));
  filter: drop-shadow(0 3px 5px rgba(8, 0, 24, 0.4));
  animation: pwSway 4.6s var(--ease) infinite alternate;
  animation-delay: var(--delay, 0s);
}
.pw-flag::before {
  /* 旗子根部的小扣眼 */
  content: "";
  position: absolute;
  left: 50%;
  top: calc(-1 * clamp(14px, 2.2vw, 22px) - 3px);
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--ink-faint);
  opacity: 0.75;
}
@keyframes pwSway {
  0%   { transform: rotate(var(--tilt, 0deg)); }
  100% { transform: rotate(calc(var(--tilt, 0deg) * 0.3 + 2.4deg)); }
}

/* --- 墙板：灰粽色 + 最外层黑边 --- */
.pw-board {
  --board: #8a7d6b;
  --board-2: #6f6455;
  position: relative;
  padding: clamp(0.8rem, 1.6vw, 1.3rem);
  border: 5px solid #16121c;
  border-radius: var(--r-lg);
  background:
    /* 织纹 */
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 6px),
    /* 四角压暗，像真的打过光 */
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.16), transparent 62%),
    radial-gradient(100% 100% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.3)),
    linear-gradient(160deg, var(--board), var(--board-2));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 14px 34px rgba(0, 0, 0, 0.22),
    0 22px 52px rgba(8, 0, 24, 0.5);
  overflow: hidden;
}
/* 浅色主题下墙板要提亮，不然整块像贴了张黑纸 */
[data-theme="light"] .pw-board { --board: #b3a794; --board-2: #968a76; }

/* 还没上照片的墙：留一块空墙板，等拍立得冲洗好 */
.pw-board--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(140px, 24vw, 220px);
}
.pw-empty {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}
[data-theme="light"] .pw-empty { color: rgba(38, 28, 20, 0.62); }
.pw-empty p { margin: 0; }
.pw-empty__sub { margin-top: 0.45rem !important; font-size: 0.86rem; opacity: 0.85; }
.pw-empty .btn { margin-top: 1.15rem; }

/* 本机钉上去的照片角标 */
.pw-mine {
  position: absolute;
  left: 5px;
  top: 5px;
  z-index: 2;
  padding: 0.08rem 0.42rem;
  border-radius: var(--r-pill);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: #fff;
  background: color-mix(in srgb, var(--pink) 72%, #7c3aed);
  box-shadow: 0 2px 8px rgba(8, 0, 24, 0.45);
}

/* --- 拍立得墙：自由钉，点哪钉哪 --- */
.pw-board--free { position: relative; min-height: clamp(420px, 60vh, 680px); }
.pw-free__pin {
  position: absolute;
  width: clamp(84px, 10vw, 148px);
  transform: translate(-50%, -50%);
}
.pw-free__pin:hover { z-index: 99 !important; }
.pw-free__pin .pw-tile { width: 100%; }
.pw-free__hint {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  width: min(92%, 520px);
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.72);
  pointer-events: none;
}
[data-theme="light"] .pw-free__hint { color: rgba(38, 28, 20, 0.62); }
.pw-free__hint--on {
  font-size: 1.15rem;
  color: var(--pink);
  animation: pwPulse 1.5s ease-in-out infinite;
}
@keyframes pwPulse { 50% { opacity: 0.5; } }
.pw-board--placing {
  cursor: crosshair;
  outline: 2px dashed color-mix(in srgb, var(--pink) 65%, transparent);
  outline-offset: -10px;
}

/* --- 照片网格：小一点、密一点 --- */
.pw-grid {
  display: grid;
  gap: clamp(0.4rem, 0.9vw, 0.7rem);
  grid-template-columns: repeat(auto-fill, minmax(min(96px, 100%), 1fr));
  align-items: start;
}

/* --- 单张照片：白边拍立得，歪着钉上去 --- */
.pw-tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #fdfbff;
  border-radius: 3px;
  cursor: zoom-in;
  /* 整格的宽高比由脚本按照片真实比例算好内联写上，
     底部 13% 是拍立得白边，照片占上面 87% */
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.42s var(--ease), box-shadow 0.42s var(--ease);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 10px 22px rgba(0, 0, 0, 0.34);
  /* 防下载：手机上长按整格也不弹保存 / 拷贝菜单 */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.pw-tile img {
  position: absolute;
  inset: 0 0 13% 0;
  width: 100%;
  height: 87%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  background: linear-gradient(150deg, #6d28d9, #f0abfc);
}
.pw-tile img.is-on { opacity: 1; }
/* 图没加载出来时露出的蝴蝶占位 */
.pw-tile .b {
  position: absolute;
  inset: 0 0 13% 0;
  width: 46%;
  margin: auto;
  color: rgba(255, 255, 255, 0.85);
}
.pw-tile .b svg { width: 100%; height: auto; }
.pw-tile__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 13%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  color: #6b5a78;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 0.22rem;
}
/* 「其他」墙：文件名即介绍，字号稍大一点，太长就省略号 */
.pw-tile__cap--desc {
  font-size: 0.55rem;
  letter-spacing: 0.02em;
  font-weight: 500;
}
.pw-tile__cap--desc > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pw-tile:hover,
.pw-tile:focus-visible {
  /* 鼠标移上去把照片扶正、抬起来 */
  transform: rotate(0deg) translateY(-7px) scale(1.05);
  z-index: 3;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.32),
    0 22px 44px rgba(0, 0, 0, 0.45);
}

/* --- 图钉 --- */
.pw-pin {
  position: absolute;
  /* --pin-x 由脚本按文件名算出来，让钉子别全挤在正中 */
  left: calc(50% + var(--pin-x, 0px));
  top: -7px;
  width: 15px;
  height: 15px;
  margin-left: -7.5px;
  border-radius: 50%;
  z-index: 2;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.92), transparent 42%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--pin) 78%, #fff) 0 30%, var(--pin) 72%, color-mix(in srgb, var(--pin) 55%, #000) 100%);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.5),
    inset 0 -1px 2px rgba(0, 0, 0, 0.3);
}
/* 钉子投在照片上的小影子 */
.pw-pin::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 12px;
  height: 5px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.26);
  filter: blur(2px);
}

/* 拍立得专属实景：以下都限定在 .pw-room 内，其他年份网格不变。 */
.pw-room {
  width: 94%;
  max-width: 1128px;
  margin-inline: auto;
  position: relative;
  isolation: isolate;
  --felt: #b5a0ab;
  --felt-low: #9d8896;
  padding: clamp(44px, 5vw, 65px) clamp(18px, 4.5vw, 60px) clamp(48px, 5vw, 70px);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 50% 0%, #fff9df66, transparent 65%),
    radial-gradient(ellipse at 50% 12%, #b58f4b38 0 3px, transparent 4px) 0 0 / 44px 62px,
    radial-gradient(ellipse at 35% 30%, #b58f4b2b 0 4px, transparent 5px) 0 0 / 44px 62px,
    radial-gradient(ellipse at 65% 30%, #b58f4b2b 0 4px, transparent 5px) 0 0 / 44px 62px,
    radial-gradient(ellipse at 50% 45%, #b58f4b2b 0 3px, transparent 4px) 0 0 / 44px 62px,
    repeating-linear-gradient(90deg, #a68b5810 0 1px, transparent 1px 4px),
    linear-gradient(110deg, #dbc9a8, #eee0c5 48%, #d3bf9d);
  box-shadow: inset 0 0 40px #63472922;
}
.pw-room::after {
  content: "";
  position: absolute;
  bottom: 23px;
  left: 17%;
  right: 15%;
  height: 13px;
  border: 1px solid #493022;
  background: repeating-linear-gradient(0deg, #a1744f 0 1px, #6a472f 2px 4px, #8e6041 5px 7px);
  box-shadow: inset 0 2px #d7b488, 0 8px 10px #49302155;
  transform: perspective(300px) rotateX(15deg);
  pointer-events: none;
}
.pw-room .pw-board--free {
  container-type: inline-size;
  min-height: 0;
  padding: 0;
  border: clamp(12px, 2vw, 23px) solid transparent;
  border-bottom-width: clamp(26px, 3.8vw, 44px);
  border-radius: 2px;
  background:
    repeating-linear-gradient(90deg, #fff1 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, #58405010 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 46% 28%, #ead6df5c, transparent 65%),
    radial-gradient(ellipse at center, transparent 45%, #4e334b50 100%),
    linear-gradient(130deg, var(--felt), var(--felt-low));
  background-clip: padding-box;
  overflow: visible;
  box-shadow: inset 0 0 0 2px #3a251c, inset 0 4px 13px #3e293b60, 2px 5px 0 #332117, 0 15px 25px #412d285e;
}
.pw-room .pw-board--free::before {
  content: "";
  position: absolute;
  inset: calc(-1 * clamp(12px, 2vw, 23px));
  bottom: calc(-1 * clamp(26px, 3.8vw, 44px));
  z-index: -1;
  border: 2px solid #352218;
  background:
    repeating-linear-gradient(3deg, transparent 0 3px, #d3985925 4px 5px, #1c100d22 6px 7px, transparent 8px 15px),
    repeating-linear-gradient(91deg, transparent 0 23px, #d49f6230 24px, transparent 27px 44px),
    linear-gradient(105deg, #3b251d, #6c4731 30%, #442a1f 62%, #533524);
  box-shadow: inset 0 0 0 2px #b18c5b55, inset 0 0 0 5px #24180f44, inset 0 7px 9px #cc9b6540;
  pointer-events: none;
}
.pw-room .pw-grid--scatter {
  position: relative;
  display: block;
  aspect-ratio: 1000 / 570;
  overflow: visible;
}
.pw-room .pw-scattered {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  transform: translate(-50%, -50%);
  z-index: var(--layer);
}
.pw-room .pw-scattered:hover,
.pw-room .pw-scattered:focus-within,
.pw-room .pw-free__pin:hover,
.pw-room .pw-free__pin:focus-within { z-index: 1000 !important; }
.pw-room .pw-tile {
  border-radius: 1px;
  box-shadow: 1px 3px 3px #39292e65, 3px 7px 9px #39292e50;
}
.pw-room .pw-tile img { inset: 5% 5% 17%; width: 90%; height: 78%; background: #cabac7; }
.pw-room .pw-tile__cap { height: 15%; font-size: clamp(4px, .6vw, 8px); color: #847079; }
.pw-room .pw-pin { width: clamp(7px, .85vw, 11px); height: clamp(7px, .85vw, 11px); margin-left: -5px; top: -4px; }
.pw-room .pw-pin::after { top: 7px; width: 8px; height: 4px; }
.pw-room .pw-tile:hover,
.pw-room .pw-tile:focus-visible { transform: rotate(0deg) translateY(-7px) scale(1.06); box-shadow: 0 10px 20px #35212a66; outline-offset: 4px; }
.pw-room .pw-free__pin {
  width: 11.5%;
  /* 点在边缘时按旋转包围盒留出安全距离，本机照片也不伸出板面。 */
  left: clamp(11%, var(--local-x), 89%) !important;
  top: clamp(100px, calc(var(--local-y) * .57cqw), calc(var(--local-limit) * .57cqw - 100px)) !important;
}
.pw-room .pw-free__hint { color: #3c293c; z-index: 1100; background: #fff9ece8; border-radius: 20px; padding: 12px; box-shadow: 0 4px 15px #4d334733; }
.pw-room .pw-board--placing .pw-tile { cursor: crosshair; }
.pw-room .pw-bunting {
  display: block;
  position: absolute;
  top: clamp(26px, 3vw, 39px);
  left: 3.5%;
  right: 3.5%;
  height: clamp(50px, 8vw, 95px);
  margin: 0;
  padding: 0;
  max-width: none;
  z-index: 1101;
  pointer-events: none;
}
.pw-room .pw-bunting::before { inset: -5px 0 auto; height: 27px; border-bottom: 1.5px solid #786655; }
.pw-room .pw-flag,
.pw-bunting--memory .pw-flag {
  position: absolute;
  left: var(--flag-x);
  top: var(--flag-y);
  width: 6.9%;
  max-width: 78px;
  height: auto;
  aspect-ratio: .85;
  border: 0;
  background: linear-gradient(105deg, #ffffff50, transparent 60%, #65537016), var(--c);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 3px 2px #34233455);
  animation-duration: 5.8s;
}
.pw-room .pw-flag::before,
.pw-bunting--memory .pw-flag::before { display: none; }

/* 其余照片墙复用第一面的柔和彩旗，留出独立高度，不遮住照片。 */
.pw-bunting.pw-bunting--memory {
  display: block;
  position: relative;
  width: 87.42%;
  max-width: 1049px;
  height: clamp(72px, 10vw, 116px);
  margin: 0 auto 0.3rem;
  padding: 0;
  pointer-events: none;
  /* 彩旗回到自然位置；下面的墙板已上收，旗子正好搭在板子上沿 */
  z-index: 2;
}
.pw-bunting--memory::before {
  inset: -5px 0 auto;
  height: 27px;
  border-bottom: 1.5px solid #786655;
}
@media (max-width: 600px) {
  .pw-bunting.pw-bunting--memory { width: 94%; height: 56px; }
  .pw-bunting--memory::before { height: 17px; }
  .pw-bunting--memory .pw-flag { top: calc(var(--flag-y) * .65); width: 7.4%; }
}

.pw-sticker-row { position: absolute; bottom: 33px; left: 26%; right: 26%; display: flex; justify-content: center; gap: 2%; z-index: 1102; pointer-events: none; }
.pw-sticker { display: block; width: clamp(24px, 4.1vw, 51px); transform: rotate(var(--sticker-rot, -5deg)); filter: drop-shadow(1px 2px 1px #44304055); }
.pw-sticker svg { display: block; width: 100%; height: auto; }
.pw-sticker--inside { position: absolute; bottom: -6px; left: 50%; z-index: 100; width: 5.8%; transform: translateX(-50%) rotate(-5deg); pointer-events: none; }
.pw-tomato { position: absolute; width: clamp(67px, 12vw, 142px); bottom: 31px; right: .8%; transform: rotate(14deg); filter: drop-shadow(2px 3px 2px #35212e66); z-index: 1102; pointer-events: none; }
[data-theme="light"] .pw-room { --felt: #c1afb8; --felt-low: #ac98a5; }
[data-theme="dark"] .pw-room { --felt: #a6909e; --felt-low: #8e798a; background-color: #c6b394; }
@media (max-width: 600px) {
  .pw-room { padding: 43px 14px 50px; }
  .pw-room .pw-grid--scatter { aspect-ratio: 1000 / 1200; }
  .pw-room .pw-scattered { left: var(--mx); top: var(--my); width: var(--mw); }
  .pw-room .pw-free__pin { width: 16.8%; left: clamp(16%, var(--local-x), 84%) !important; top: clamp(65px, calc(var(--local-y) * 1.2cqw), calc(var(--local-limit) * 1.2cqw - 65px)) !important; }
  .pw-room .pw-bunting { top: 33px; left: 3%; right: 3%; height: 50px; }
  .pw-room .pw-bunting::before { height: 17px; }
  .pw-room .pw-flag { top: calc(var(--flag-y) * .65); width: 7.4%; }
  .pw-sticker-row { bottom: 28px; left: 19%; right: 19%; gap: 1%; }
  .pw-sticker { width: 11%; }
  .pw-sticker--inside { width: 9%; left: 50%; }
  .pw-tomato { right: 6px; bottom: 28px; width: 69px; }
  .pw-room::after { bottom: 17px; height: 10px; }
  .pw-room .pw-mine { padding: 1px 3px; font-size: 5px; }
}
@media (prefers-reduced-motion: reduce) { .pw-room .pw-flag { animation: none; } }


/* --- 灯箱 --- */
.pw-view { position: relative; }
.pw-view__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58vh;
}
.pw-view__img {
  display: block;
  max-width: 100%;
  max-height: 74vh;
  margin-inline: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #0b0318;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.6);
}
/* 照片墙防下载：图不可选、不可拖、不接收指针事件。
   右键 / 长按菜单打不到 <img> 上，配合 JS 再禁一层右键菜单 */
.pw-tile img,
.pw-view__img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}
/* 灯箱大图上的透明罩：右键 / 长按落在它身上，菜单里没有「另存为」 */
.pw-view__guard {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.pw-view__cap {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--ink-dim);
  letter-spacing: 0.06em;
}
.pw-view__cap b { color: var(--pink); font-family: var(--font-num); }
.pw-view__name { display: block; margin-bottom: 0.35rem; color: var(--ink); line-height: 1.65; overflow-wrap: anywhere; }
.pw-view__cap kbd {
  display: inline-block;
  padding: 0.05em 0.42em;
  border: 1px solid var(--stroke-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--glass);
  font-family: var(--font-num);
  font-size: 0.94em;
  line-height: 1.5;
}
.pw-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--stroke-strong);
  background: var(--glass-strong);
  backdrop-filter: blur(10px);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.28s var(--ease), background 0.28s, color 0.28s;
  z-index: 2;
}
.pw-nav svg { width: 19px; height: 19px; }
.pw-nav:hover { background: var(--grad-main); color: #fff; border-color: transparent; }
.pw-nav--prev { left: -6px; }
.pw-nav--next { right: -6px; }
.pw-nav--prev:hover { transform: translateY(-50%) translateX(-3px); }
.pw-nav--next:hover { transform: translateY(-50%) translateX(3px); }
.pw-view__spin {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--pink);
  animation: spin 0.9s linear infinite;
}

@media (max-width: 900px) { .pw-grid { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); } }
@media (max-width: 760px) {
  .pw-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 0.4rem; }
  .pw-bunting { gap: 0.18rem; padding-bottom: 0.7rem; }
  .pw-nav { width: 36px; height: 36px; }
  .pw-nav--prev { left: 2px; }
  .pw-nav--next { right: 2px; }
  /* 手机保留完整照片名字，键盘提示收起。 */
  .pw-view__hint { display: none; }
}
@media (max-width: 480px) {
  .pw-board { border-width: 4px; padding: 0.5rem; }
  .pw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pw-bunting { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pw-flag { animation: none; }
  .pw-tile { transition: transform 0.12s; }
}

/* 整页收紧：照片墙的每一面墙挨得近一点、标题离墙近一点 */
.section[data-wall] { padding-top: 0.6rem; }
.section[data-wall] .section__head { margin-bottom: 0.5rem; }
.section[data-wall] .more-wrap { margin-top: 1.1rem; }
/* 年份墙：墙板往彩旗下面再收一截（含额外 15px 上收），整组往上靠 */
.section[data-wall]:not([data-wall="pailide"]) .pw-board { margin-top: calc(clamp(-70px, -5vw, -20px) - 15px); }

/* ---------- 18. 倾听我（信） ---------- */
.let-toggle { gap: 0.65rem; }
.let-toggle .filter-btn { padding: 0.6rem 1.4rem; font-weight: 600; }

.let-series { padding-top: clamp(2rem, 4.4vw, 3.4rem); }
.let-series:first-child { padding-top: 0; }
.let-series__head { margin-bottom: clamp(1.1rem, 2.4vw, 1.8rem); }
.let-series__title {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap;
  margin: 0; font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.7rem);
}
.let-series__sub { margin: 0.5rem 0 0; text-align: center; color: var(--ink-dim); font-size: 0.9rem; }
.let-series__count {
  align-self: center; padding: 0.18rem 0.7rem; border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--stroke);
  font-family: var(--font-num); font-size: 0.8rem; color: var(--ink-dim);
}
.let-series__headbar {
  display: inline-block; width: 0.72em; height: 0.72em; border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.16); margin-right: 0.35em;
}
.let-grid {
  --let-gap: clamp(0.9rem, 1.8vw, 1.3rem);
  display: grid; gap: var(--let-gap);
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
}
.let-empty {
  grid-column: 1 / -1; text-align: center; color: var(--ink-faint);
  padding: 2.4rem 1rem; border: 1px dashed var(--stroke); border-radius: var(--r-lg);
  font-size: 0.92rem;
}

/* 致谢页：一封带线描蝴蝶和五只小熊的信。 */
.section.section--bare { padding-top: clamp(7.2rem, 15vh, 9.4rem); padding-bottom: clamp(1.4rem, 3vw, 2.4rem); }
.thx-paper {
  --thx-lh: 2.15rem;
  --thx-rule: rgba(143, 116, 175, .17);
  --thx-margin: clamp(1.1rem, 4vw, 2.6rem);
  position: relative; isolation: isolate; max-width: 51rem; margin: 0 auto;
  padding: 3.8rem clamp(1.4rem, 4.5vw, 3.6rem) 2.6rem calc(var(--thx-margin) + 1.6rem);
  border: 1px solid #e2d8ed; border-radius: 5px 5px 16px 5px;
  background:
    repeating-linear-gradient(112deg, rgba(121, 91, 150, .025) 0 1px, transparent 1px 5px),
    radial-gradient(ellipse at 90% 0%, #f1e7f8 0%, transparent 42%),
    linear-gradient(178deg, #fffcf8, #fcf8ff 70%, #f7f0fc);
  color: #514064;
  box-shadow: 0 30px 65px -30px rgba(16, 4, 34, .65), 4px 5px 0 -1px #e9dfef, 7px 9px 0 -2px #d9cde4;
  font-family: var(--font-display);
}
[data-theme="light"] .thx-paper { box-shadow: 0 26px 55px -30px rgba(76, 29, 149, .35), 4px 5px 0 -1px #e9dfef, 7px 9px 0 -2px #d9cde4; }
.thx-paper__tape {
  position: absolute; top: -12px; left: 50%; width: 140px; height: 34px;
  transform: translateX(-50%) rotate(-3deg);
  background: repeating-linear-gradient(90deg, rgba(173, 142, 205, .08) 0 3px, transparent 3px 8px), rgba(204, 178, 226, .64);
  border-left: 1px dashed #b799cc; border-right: 1px dashed #b799cc;
  box-shadow: 0 2px 3px rgba(112, 78, 141, .05); pointer-events: none;
}
.thx-paper__margin {
  position: absolute; inset: 0 auto 0 var(--thx-margin); width: 1px;
  background: linear-gradient(transparent, rgba(190, 137, 170, .35) 9%, rgba(190, 137, 170, .35) 94%, transparent);
  pointer-events: none;
}
.thx-paper__head { position: relative; text-align: center; padding: 0 2.5rem 2rem; margin-bottom: 2.15rem; border-bottom: 1px solid #dfd1e9; }
.thx-paper__eyebrow { margin: 0 0 .8rem; font-family: var(--font-body); font-size: .72rem; letter-spacing: .18em; color: #8c729e; }
.thx-paper__title { margin: 0; font-size: clamp(1.4rem, 3.3vw, 2rem); line-height: 1.65; letter-spacing: .07em; font-weight: 500; color: #684682; }
.thx-paper__subtitle { margin: .75rem 0 0; font-size: .8rem; color: #8c729e; }
.thx-paper__butterfly { position: absolute; display: block; color: #9575ad; width: 78px; pointer-events: none; }
.thx-paper__butterfly--left { top: -.8rem; left: -1.8rem; transform: rotate(-19deg); }
.thx-paper__butterfly--right { width: 60px; right: -1.8rem; bottom: 1rem; transform: rotate(17deg); }
.thx-paper svg { display: block; width: 100%; height: auto; fill: none; }
.thx-paper__body {
  position: relative; line-height: var(--thx-lh);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--thx-lh) - 1px), var(--thx-rule) calc(var(--thx-lh) - 1px), var(--thx-rule) var(--thx-lh));
}
.thx-paper__line { margin: 0; text-indent: 2em; font-size: 1rem; letter-spacing: .025em; overflow-wrap: anywhere; }
.thx-paper__line:last-child { margin-bottom: 0; }
.thx-paper__who { color: #825ca0; font-weight: 600; }
.thx-paper__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; padding-top: 2.4rem; }
.thx-paper__bears { display: flex; align-items: flex-end; gap: .15rem; width: min(63%, 300px); color: #8d719f; }
.thx-paper__bears span { width: 20%; }
.thx-paper__bears span:nth-child(2) { transform: translateY(-5px) rotate(-6deg); }
.thx-paper__bears span:nth-child(4) { transform: translateY(-3px) rotate(6deg); }
.thx-paper__signature { flex-shrink: 0; min-width: 5rem; text-align: right; }
.thx-paper__sign { margin: 0; font-size: 1.12rem; color: #76558f; letter-spacing: .08em; }
.thx-paper__closing-butterfly { display: block; width: 54px; margin: .55rem 0 0 auto; color: #a38ab6; transform: rotate(12deg); }
.thx-paper__credit { margin: 1.4rem 0 0; font-family: var(--font-body); font-size: .68rem; line-height: 1.8; color: #8c729e; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .thx-paper { --thx-lh: 1.95rem; --thx-margin: .8rem; padding: 2.7rem 1.05rem 1.8rem 1.55rem; }
  .thx-paper__head { padding: 0 .7rem 1.6rem; margin-bottom: 1.95rem; }
  .thx-paper__eyebrow { font-size: .65rem; letter-spacing: .1em; }
  .thx-paper__title { font-size: clamp(1.13rem, 4.5vw, 1.5rem); letter-spacing: .015em; }
  .thx-paper__subtitle { font-size: .7rem; }
  .thx-paper__butterfly--left { width: 42px; left: -.8rem; top: -.7rem; }
  .thx-paper__butterfly--right { width: 34px; right: -.65rem; bottom: .35rem; }
  .thx-paper__line { font-size: .93rem; letter-spacing: .01em; }
  .thx-paper__foot { padding-top: 1.9rem; gap: .7rem; }
  .thx-paper__bears { width: 68%; gap: 0; }
  .thx-paper__signature { min-width: 3.5rem; }
  .thx-paper__sign { font-size: .95rem; }
  .thx-paper__closing-butterfly { width: 37px; }
}


/* 来自 TOP 的信：和其他卡一样大，只用紫色区分 */
.let-card--group {
  border-color: color-mix(in srgb, var(--purple-400) 45%, transparent);
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--purple-800) 34%, transparent), transparent 70%),
    var(--glass);
  box-shadow: 0 10px 30px -20px rgba(168, 85, 247, 0.85);
}
.let-card--group:hover, .let-card--group:focus-visible {
  border-color: var(--purple-300);
  box-shadow: 0 14px 34px -18px rgba(168, 85, 247, 0.95), var(--shadow-glow);
}
.let-card--group .let-card__title { color: var(--purple-100); }
.let-card--group .let-card__env {
  border: 1px solid color-mix(in srgb, var(--purple-300) 40%, transparent);
  box-shadow: 0 6px 16px -8px rgba(168, 85, 247, 0.9);
}
.let-series__headbar.is-group { background: linear-gradient(90deg, #3b0764, var(--purple-400), var(--pink)); }

/* 这一组的信：卡一样大，一排三个 */
.let-grid--mixed { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 900px) { .let-grid--mixed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .let-grid--mixed { grid-template-columns: 1fr; } }

/* 同一系列里的小分组：梦寐以求六个主题、无所畏计划三种信 */
.let-sub { margin-top: clamp(1.7rem, 3.2vw, 2.5rem); }
.let-sub:first-child { margin-top: 0; }
.let-sub__title {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap;
  margin: 0 0 0.95rem; font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 600;
}
.let-sub__count {
  align-self: center; padding: 0.15rem 0.65rem; border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--stroke);
  font-family: var(--font-num); font-size: 0.76rem; font-weight: 400; color: var(--ink-dim);
}
/* 小主题做成可点的分栏（梦寐以求 / 无所畏计划 / 生日会） */
.let-subtabs { margin: 0 0 1.15rem; gap: 0.45rem; }
.let-subtabs .filter-btn { padding: 0.42rem 1.05rem; font-size: 0.84rem; }

/* 两排吸顶选择栏：按故事的系列（场次）、按人物的写信人，点谁只看谁 */
.let-series--pick { padding-top: 0; }
.let-pickbar {
  position: sticky; top: var(--topbar-h, 70px); z-index: 40;
  display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center;
  width: fit-content; max-width: 100%; margin: 0 auto 1.6rem;
  padding: 0.5rem 0.6rem; border-radius: var(--r-lg);
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--bg-0) 84%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 16px 44px -34px rgba(0, 0, 0, 0.7);
}
.let-pickbar__btn { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.42rem 0.95rem; font-size: 0.84rem; }
.let-pickbar__btn.is-active { transform: none; }
.let-pickbar__dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.let-pickbar__dot.is-group { background: linear-gradient(90deg, #3b0764, var(--purple-400), var(--pink)); }
.let-pickbar__count { font-family: var(--font-num); font-size: 0.72rem; opacity: 0.72; margin-left: 0.1em; }

.let-card {
  display: flex; flex-direction: column; gap: 0.5rem; text-align: left;
  padding: 1.15rem 1.2rem; border-radius: var(--r-lg); cursor: pointer;
  border: 1px solid var(--stroke); background: var(--glass);
  backdrop-filter: blur(14px); color: var(--ink);
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
}
.let-card:hover, .let-card:focus-visible {
  transform: translateY(-5px); border-color: var(--stroke-strong);
  box-shadow: var(--shadow-glow); outline: none;
}
.let-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.let-card__env {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  color: var(--purple-200); background: linear-gradient(140deg, var(--purple-800), var(--purple-500));
  filter: drop-shadow(0 6px 14px rgba(139, 92, 246, 0.35));
}
.let-card__env svg { width: 24px; height: 24px; }
.let-card__stamp {
  font-size: 0.72rem; padding: 0.22rem 0.6rem; border-radius: var(--r-pill);
  border: 1px solid var(--stroke); color: var(--ink-faint);
}
.let-card__stamp.is-ready { color: var(--pink); border-color: color-mix(in srgb, var(--pink) 45%, transparent); background: color-mix(in srgb, var(--pink) 12%, transparent); }
.let-card__title { margin: 0; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.45; }
.let-card__chips { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.let-card__who { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: var(--ink-dim); }
.let-card__dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.let-card__meta { font-size: 0.76rem; color: var(--ink-faint); font-family: var(--font-num); }
.let-card__folder {
  margin-top: auto; font-size: 0.72rem; color: var(--ink-faint); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Consolas, monospace);
}

/* 读信弹窗 */
.let-read { text-align: left; }
.let-read__date { margin: 0.3rem 0 1rem; font-size: 0.8rem; color: var(--ink-faint); font-family: var(--font-num); }
.let-read__body {
  padding: 1.4rem 1.5rem; border-radius: var(--r-md);
  background: var(--glass); border: 1px solid var(--stroke);
  white-space: normal; line-height: 2; font-size: 1rem; color: var(--ink);
}
.let-read__body--soon {
  display: grid; place-items: center; gap: 0.9rem; text-align: center; color: var(--ink-dim);
  padding: 2.6rem 1.4rem;
}
.let-read__body--soon svg { width: 56px; height: 56px; color: var(--purple-300); opacity: 0.8; }
.let-read__body--soon p { margin: 0; max-width: 34ch; }
.let-read__foot {
  margin-top: 1rem; display: flex; justify-content: center; gap: 0.6rem; flex-wrap: wrap;
}

/* 读信信纸：展开动画 + 按写信人配色（TOP紫 / 小朱黄 / 小宝绿 / 小极橙 / 小左蓝 / 小苏红）。
   纸上只摆三样小东西：小熊、蝴蝶、杨桃。 */
.let-sheet {
  --let-ink: #a78bfa;
  --let-lh: 2.1rem;
  --let-rule: color-mix(in srgb, var(--let-ink) 24%, transparent);
  position: relative; width: 100%; max-width: 34rem; margin: 0 auto;
  padding: 2.7rem clamp(1.1rem, 4vw, 2.2rem) 2.1rem calc(clamp(1.1rem, 4vw, 2.2rem) + 0.9rem);
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--let-ink) 30%, #e8ddfb);
  background:
    radial-gradient(130% 60% at 50% 0%, color-mix(in srgb, var(--let-ink) 12%, transparent), transparent 72%),
    repeating-linear-gradient(115deg, color-mix(in srgb, var(--let-ink) 5%, transparent) 0 2px, transparent 2px 8px),
    linear-gradient(178deg, #ffffff, #fbf8ff 55%, color-mix(in srgb, var(--let-ink) 7%, #f4eeff));
  color: #3b0764;
  font-family: var(--font-display);
  box-shadow: 0 28px 70px -40px rgba(20, 4, 44, 0.85), 0 1px 0 #fff inset;
  transform-origin: 50% 0;
  overflow: hidden;
  animation: letUnfold 0.85s cubic-bezier(0.22, 0.85, 0.28, 1.04) both;
}
/* 展开时从顶上扫下来的一道折痕影子 */
.let-sheet__crease {
  position: absolute; left: 0; right: 0; top: 0; height: 38px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--let-ink) 34%, rgba(59, 7, 100, 0.55)),
    color-mix(in srgb, var(--let-ink) 10%, transparent) 60%, transparent);
  opacity: 0;
  animation: letCrease 0.85s ease-out both;
}
/* 左边一道装订线 */
.let-sheet::before {
  content: ""; position: absolute; top: 1.4rem; bottom: 1.4rem; left: clamp(0.8rem, 3vw, 1.5rem); width: 1px;
  background: linear-gradient(180deg, transparent,
    color-mix(in srgb, var(--let-ink) 55%, transparent) 12%,
    color-mix(in srgb, var(--let-ink) 55%, transparent) 88%, transparent);
}
/* 角落的小熊 / 蝴蝶 / 杨桃 */
.let-sheet__deco { position: absolute; color: var(--let-ink); opacity: 0.17; pointer-events: none; }
.let-sheet__deco--star { top: 0.95rem; left: 1rem; width: 34px; height: 34px; transform: rotate(-14deg); }
.let-sheet__deco--bear { bottom: 0.75rem; left: 1.1rem; width: 38px; height: 38px; }
.let-sheet__deco--bfly { bottom: 0.8rem; right: 1.1rem; width: 46px; height: 39px; transform: rotate(12deg); }

.let-sheet__head { position: relative; text-align: center; margin-bottom: 1.1rem; }
.let-sheet__seal {
  display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 0.55rem;
  border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--let-ink) 68%, #fff), var(--let-ink) 72%);
  box-shadow: 0 12px 26px -14px var(--let-ink), 0 0 0 5px color-mix(in srgb, var(--let-ink) 14%, transparent);
}
.let-sheet__seal svg { width: 29px; height: 29px; }
.let-sheet__head .eyebrow { color: color-mix(in srgb, var(--let-ink) 62%, #6b21a8); }
.let-sheet .modal__title { padding-right: 0; margin: 0.25rem 0 0.2rem; color: color-mix(in srgb, var(--let-ink) 45%, #3b0764); }
.let-sheet__date { margin: 0; font-family: var(--font-num); font-size: 0.8rem; color: color-mix(in srgb, var(--let-ink) 52%, #6b7280); }

.let-sheet__body {
  position: relative;
  font-size: 0.98rem; line-height: var(--let-lh);
  background-image: repeating-linear-gradient(to bottom,
    transparent 0, transparent calc(var(--let-lh) - 1px),
    var(--let-rule) calc(var(--let-lh) - 1px), var(--let-rule) var(--let-lh));
  word-break: break-word;
}
/* 段与段之间不留空行，每段开头空两格 */
.let-sheet__body p { margin: 0; text-indent: 2em; }
/* 多人信里的说话人：单独一行，名字带本人的颜色 */
.let-sheet__body .let-sheet__who {
  display: flex; align-items: center; gap: 0.5rem;
  text-indent: 0; font-weight: 700; letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--who-ink, var(--purple-400)) 55%, #3b0764);
}
.let-sheet__who i {
  flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: var(--who-ink, var(--purple-400));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--who-ink, var(--purple-400)) 18%, transparent);
}
.let-sheet__who--all { color: #7c3aed; }
.let-sheet__who--all i { background: linear-gradient(90deg, #3b0764, var(--purple-400), var(--pink)); }
/* 连着两个同名：第二条是本人喊自己的名字，居中、拉开字距 */
.let-sheet__body .let-sheet__shout {
  text-indent: 0; text-align: center; font-weight: 700; letter-spacing: 0.3em;
  color: color-mix(in srgb, var(--who-ink, var(--purple-400)) 62%, #3b0764);
}
/* 正文里的简称说话人：苏：… 朱：… 极：… 航：… 宝：… */
.let-sheet__who-inline { font-weight: 700; color: color-mix(in srgb, var(--who-ink, var(--purple-400)) 55%, #3b0764); }
.let-sheet__body--soon {
  display: grid; place-items: center; gap: 0.8rem; text-align: center;
  padding: 2.4rem 1rem; background-image: none; color: #6d28d9;
}
.let-sheet__body--soon p { text-indent: 0; }
.let-sheet__body--soon svg { width: 50px; height: 50px; opacity: 0.7; }
.let-sheet__body--soon p { margin: 0; }

/* 信纸展开：以纸的上沿为轴，从立着的位置放平，末尾轻轻回弹一下 */
@keyframes letUnfold {
  0%   { transform: perspective(1300px) rotateX(-84deg); }
  55%  { transform: perspective(1300px) rotateX(4.5deg); }
  78%  { transform: perspective(1300px) rotateX(-1.2deg); }
  100% { transform: perspective(1300px) rotateX(0); }
}
/* 折痕影子从纸顶扫到纸底，扫过的地方像刚被展开 */
@keyframes letCrease {
  0%   { transform: translateY(-42px) scaleY(0.45); opacity: 0.9; }
  55%  { opacity: 0.45; }
  100% { transform: translateY(105%) scaleY(1); opacity: 0; }
}
/* 纸放平之后，封蜡先弹出来，再是抬头和正文 */
@keyframes letRise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes letSeal {
  from { opacity: 0; transform: scale(0.2) rotate(-32deg); }
  to   { opacity: 1; transform: none; }
}
.let-sheet__seal { animation: letSeal 0.5s 0.3s cubic-bezier(0.18, 1.4, 0.4, 1) both; }
.let-sheet__head { animation: letRise 0.45s 0.42s ease both; }
.let-sheet__body { animation: letRise 0.5s 0.5s ease both; }

@media (prefers-reduced-motion: reduce) {
  .let-sheet, .let-sheet__crease { animation: none; }
  .let-sheet__seal, .let-sheet__head, .let-sheet__body { animation: none; }
}

/* ---------- TOP的生日 · 论坛体 ---------- */
.bbs { display: grid; gap: clamp(1rem, 2.2vw, 1.5rem); }
.bbs__rounds { margin-bottom: 0.2rem; gap: 1rem; }
.bbs__rounds-tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.bbs__jumps { display: flex; align-items: center; gap: 0.35rem; }
.bbs__jumps::before {
  content: ""; width: 1px; height: 1.4rem; margin-right: 0.3rem; background: var(--stroke);
}
.bbs-jump {
  border: 0; background: none; padding: 0; cursor: pointer; line-height: 0;
  border-radius: 50%; transition: transform 0.25s var(--ease);
}
.bbs-jump:hover, .bbs-jump:focus-visible { transform: translateY(-2px) scale(1.08); outline: none; }
.bbs-jump .bbs-avatar { width: 26px; height: 26px; }
.bbs-jump .bbs-avatar svg { width: 15px; height: 15px; }
.bbs .tabpanel { display: grid; gap: 1rem; }

.bbs-thread {
  --who: #a78bfa;
  border: 1px solid var(--stroke); border-radius: var(--r-lg);
  background: var(--glass);
  overflow: hidden;
}

/* 本命色小熊头像：底色跟人走，小熊描白 */
.bbs-avatar {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; /* 熊跟着 currentColor：这里定白色，别让头像熊变成文字色 / 纯黑 */
  background: radial-gradient(circle at 32% 28%,
    color-mix(in srgb, var(--who, var(--purple-400)) 62%, #fff),
    var(--who, var(--purple-400)) 78%);
  box-shadow: 0 6px 14px -8px var(--who, var(--purple-400));
}
.bbs-avatar svg { width: 20px; height: 20px; fill: #fff; }
.bbs-thread__bar {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 0.95rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--who) 24%, transparent), transparent 72%);
  border-bottom: 1px solid var(--stroke);
}
.bbs-thread__badge {
  flex: none; font-size: 0.68rem; padding: 0.12rem 0.5rem; border-radius: var(--r-pill);
  background: var(--grad-main); color: #fff; letter-spacing: 0.08em;
}
.bbs-thread__title { margin: 0; font-family: var(--font-display); font-size: 1.02rem; }
.bbs-thread__meta { font-family: var(--font-num); font-size: 0.72rem; color: var(--ink-dim); }
.bbs-thread__stat { margin-left: auto; white-space: nowrap; font-size: 0.74rem; color: var(--ink-faint); }
.bbs-thread__stat b { font-family: var(--font-num); color: color-mix(in srgb, var(--who) 70%, var(--ink)); }
.bbs-thread__body { padding: 0 0.95rem 0.9rem; }

/* 一层楼：左边头像，右边楼层标记 + 正文 */
.bbs-post {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 0.85rem;
  padding: 0.9rem 0; border-top: 1px dashed var(--stroke);
}
.bbs-thread__body > .bbs-post:first-child { border-top: 0; }
.bbs-post--op { position: relative; }
.bbs-post--op::before {
  content: ""; position: absolute; inset: 0.35rem -0.5rem; z-index: 0; pointer-events: none;
  border-radius: var(--r-md);
  background: linear-gradient(90deg, color-mix(in srgb, var(--who) 13%, transparent), transparent 85%);
}
.bbs-post--op > * { position: relative; z-index: 1; }

.bbs-post__user { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; text-align: center; }
.bbs-post__user .bbs-avatar { width: 46px; height: 46px; }
.bbs-post__user .bbs-avatar svg { width: 26px; height: 26px; }
.bbs-post__name { font-size: 0.8rem; font-weight: 600; line-height: 1.2; }

.bbs-post__meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.bbs-post__floor {
  font-family: var(--font-num); font-size: 0.7rem; letter-spacing: 0.06em;
  padding: 0.05rem 0.45rem; border-radius: var(--r-pill);
  border: 1px solid var(--stroke); color: var(--ink-faint);
}
.bbs-post__floor.is-op {
  color: var(--pink);
  border-color: color-mix(in srgb, var(--pink) 45%, transparent);
  background: color-mix(in srgb, var(--pink) 10%, transparent);
}
.bbs-post__tag {
  font-size: 0.66rem; padding: 0.05rem 0.45rem; border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--who, var(--purple-400)) 45%, transparent);
  color: color-mix(in srgb, var(--who, var(--purple-400)) 68%, var(--ink));
}
.bbs-post__body { font-size: 0.94rem; line-height: 1.95; color: var(--ink); }
.bbs-post__body p { margin: 0; }
.bbs-post__body p + p { margin-top: 0.4rem; }

/* 楼中楼 */
.bbs-post__sub { display: grid; gap: 0.55rem; margin-top: 0.75rem; }
.bbs-sub {
  padding: 0.6rem 0.8rem; border-radius: var(--r-md);
  border: 1px solid var(--stroke);
  border-left: 3px solid color-mix(in srgb, var(--who, var(--purple-400)) 45%, transparent);
  background: color-mix(in srgb, var(--who, var(--purple-400)) 7%, transparent);
}
.bbs-sub__head { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.25rem; font-size: 0.84rem; }
.bbs-sub__head .bbs-avatar { width: 24px; height: 24px; }
.bbs-sub__head .bbs-avatar svg { width: 14px; height: 14px; }
.bbs-sub__to { margin-left: auto; font-size: 0.72rem; color: var(--ink-faint); }
.bbs-sub p { margin: 0; font-size: 0.9rem; line-height: 1.9; color: var(--ink-dim); }

@media (max-width: 560px) {
  .bbs-post { grid-template-columns: 56px minmax(0, 1fr); gap: 0.6rem; }
  .bbs-post__user .bbs-avatar { width: 40px; height: 40px; }
  .bbs-post__user .bbs-avatar svg { width: 22px; height: 22px; }
  .bbs-thread__meta { display: none; }
}

@media (max-width: 620px) { .let-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .let-grid { grid-template-columns: 1fr; } }

/* 按人物：标题做成可点开的一行 */
.let-series--fold .let-series__head { margin-bottom: 0; }
.let-series--fold .let-series__sub { margin-top: 0.45rem; }
.let-series__toggle {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 1.3rem; border-radius: var(--r-pill);
  border: 1px solid var(--stroke); background: var(--glass);
  backdrop-filter: blur(12px); color: var(--ink);
  font-family: var(--font-display); font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 600; cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.let-series__toggle:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--purple-300) 55%, transparent);
  box-shadow: var(--shadow-glow);
}
.let-series__toggle.is-open {
  border-color: color-mix(in srgb, var(--purple-300) 70%, transparent);
  background: linear-gradient(140deg, color-mix(in srgb, var(--purple-800) 40%, transparent), var(--glass));
}
/* 右边那支小箭头：收起朝上，点开转过来朝下 */
.let-series__arrow {
  width: 1em; height: 1em; margin-left: 0.15rem; color: var(--purple-200);
  transform: rotate(180deg); transition: transform 0.35s var(--ease);
}
.let-series__toggle.is-open .let-series__arrow { transform: rotate(0deg); }
.let-series__foldbody {
  margin-top: clamp(1.1rem, 2.4vw, 1.6rem);
  animation: let-fold 0.42s var(--ease);
}
@keyframes let-fold {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

/* 翻页：一页两个块，页码做成蝴蝶停下来的样子 */
.let-pager {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0.5rem 0.4rem;
  margin-top: clamp(2.2rem, 4.6vw, 3.4rem);
  padding-top: clamp(1.4rem, 3vw, 2rem);
  border-top: 1px dashed var(--stroke);
}
.let-pager__nums { display: inline-flex; align-items: center; gap: 0.3rem; }
.let-pager__btn {
  min-width: 2.5rem; height: 2.5rem; padding: 0 0.7rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke); background: var(--glass);
  backdrop-filter: blur(12px);
  color: var(--ink-dim); font-family: var(--font-num); font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s, color 0.3s, background 0.3s, box-shadow 0.3s;
}
.let-pager__btn svg { width: 15px; height: 15px; }
.let-pager__btn:hover:not(:disabled):not(.is-on) {
  transform: translateY(-2px); color: var(--ink);
  border-color: color-mix(in srgb, var(--purple-300) 55%, transparent);
  box-shadow: var(--shadow-glow);
}
.let-pager__btn.is-on {
  color: #fff; border-color: transparent;
  background: var(--grad-main);
  box-shadow: 0 8px 24px -8px rgba(168, 85, 247, 0.8);
}
.let-pager__btn:disabled { opacity: 0.32; cursor: not-allowed; }
.let-pager__gap { padding: 0 0.2rem; color: var(--ink-faint); }
.let-pager__info {
  flex-basis: 100%; margin: 0.5rem 0 0; text-align: center;
  color: var(--ink-faint); font-size: 0.8rem; font-family: var(--font-num);
}

/* ---------- 15. 出现动画 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }
.reveal[data-d="5"] { transition-delay: 0.4s; }

/* ---------- 15.5 小登一家 · 细节证据卡 ---------- */
.evi__count { margin: -0.9rem 0 1.5rem; text-align: center; color: var(--ink-faint); font-size: 0.86rem; letter-spacing: 0.08em; }
.evi__count b { color: var(--pink); font-family: var(--font-num); font-size: 1.05rem; }
.evi-grid { display: grid; gap: clamp(1rem, 2vw, 1.4rem); grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.evi {
  position: relative; padding: 1.2rem 1.3rem 1.1rem; border-radius: var(--r-lg);
  border: 1px solid var(--stroke); background: var(--glass); backdrop-filter: blur(12px);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.evi:hover { border-color: var(--stroke-strong); transform: translateY(-4px); box-shadow: var(--shadow); }
.evi__top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.evi__who { display: flex; align-items: center; min-width: 0; }
.evi__face {
  flex: none; width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
  margin-left: -8px; border: 2px solid var(--bg-1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.evi__face:first-child { margin-left: 0; }
.evi__names { margin-left: 0.7rem; font-size: 0.82rem; color: var(--ink-dim); letter-spacing: 0.06em; }
.evi__when { display: flex; align-items: center; gap: 0.55rem; font-family: var(--font-num); font-size: 0.74rem; letter-spacing: 0.14em; color: var(--ink-faint); }
.evi__time { color: var(--cyan); }
.evi__img {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 14px; margin-bottom: 0.9rem; background: var(--bg-2);
}
.evi__title { font-family: var(--font-display); font-size: 1.1rem; margin: 0.7rem 0 0.45rem; }
.evi__desc { margin: 0; font-size: 0.92rem; line-height: 1.8; color: var(--ink-dim); }
.evi__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.9rem; }
.evi__tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.evi__src {
  display: inline-flex; align-items: center; gap: 0.3rem; flex: none;
  font-size: 0.78rem; color: var(--ink-faint); text-decoration: none;
  letter-spacing: 0.06em; border-bottom: 1px dashed var(--stroke-strong); padding-bottom: 1px;
}
.evi__src:hover { color: var(--cyan); }
.evi__src svg { width: 12px; height: 12px; }
.filter-btn--face { display: inline-flex; align-items: center; gap: 0.4rem; }
.filter-btn__face { flex: none; width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ---------- 15.6 小登一家 · 简笔小屋 ----------
   family.html 专用：整页包在一间手绘线稿的小屋里 —— 天空(云/鸟) → 屋顶(瓦片+烟囱+蝴蝶+门牌) → 墙(串灯+门牌 tab) → 院子(草线+小花)。
   线条统一用 --h-line / --h-thin 两个颜色变量，深浅主题各一套。 */
.house-page { padding: clamp(6.6rem, 15vh, 8.8rem) 0 0; }

.house {
  --h-line: rgba(240, 171, 252, 0.6);
  --h-thin: rgba(196, 181, 253, 0.42);
  position: relative;
  width: min(100% - 2.4rem, 1300px);
  margin-inline: auto;
}

/* 天空：深色出月亮、浅色出太阳，云和飞鸟画在屋顶后面 */
.house__sky { position: absolute; inset: -30px 0 auto; height: 200px; z-index: 0; pointer-events: none; }
.hs-celestial { position: absolute; left: 4%; top: 5%; width: clamp(40px, 4.6vw, 58px); aspect-ratio: 1; }
.hs-celestial svg { display: block; width: 100%; height: 100%; }
/* 显隐写在 .hs-celestial 后面，特异性要压过上面那条 .hs-celestial svg */
.hs-celestial .hs-moon { color: var(--purple-200); filter: drop-shadow(0 0 16px rgba(216, 180, 254, .6)); animation: bobbing 9s ease-in-out infinite; }
.hs-celestial .hs-sun { display: none; color: var(--gold); filter: drop-shadow(0 0 14px rgba(252, 211, 77, .6)); transform-origin: 50% 50%; animation: hsSpin 46s linear infinite; }
[data-theme="light"] .hs-celestial .hs-moon { display: none; }
[data-theme="light"] .hs-celestial .hs-sun { display: block; }
@keyframes hsSpin { to { rotate: 360deg; } }
.hs-cloud { position: absolute; color: var(--h-thin); opacity: .85; }
.hs-cloud svg { display: block; width: 100%; height: auto; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.hs-cloud--l { left: 14%; top: 20px; width: 108px; animation: hsDrift 27s ease-in-out infinite; }
.hs-cloud--m { left: 38%; top: 0; width: 68px; opacity: .5; animation: hsDrift 34s ease-in-out infinite -9s; }
.hs-cloud--r { right: 0; top: 72px; width: 128px; animation: hsDrift 31s ease-in-out infinite -17s; }
.hs-birds { position: absolute; right: 20%; top: 2px; color: var(--h-thin); }
.hs-birds svg { display: block; width: 78px; height: auto; animation: hsDrift 22s ease-in-out infinite; }
@keyframes hsDrift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(16px); } }

/* 屋顶：SVG 横向拉伸，所以描边一律 non-scaling-stroke。
   屋顶斜边换算：左坡占 f=0~0.5，y% = 1 - 1.8375f；右坡 f=0.5~1，y% = 1.8375f - 0.8375。 */
.house__roof { position: relative; z-index: 3; height: clamp(190px, 26vw, 324px); margin-inline: clamp(-19px, -2.5%, -8px); }
.house__roof-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.house__roof-art .hs-ink path { vector-effect: non-scaling-stroke; }
.hs-ink { fill: none; stroke: var(--h-line); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.hs-ink .hs-2 { stroke: var(--h-thin); stroke-width: 1.7; transform: translate(3px, 4px); }
.hs-ink .hs-thin, .hs-ink .hs-sh, .hs-ink .hs-tick { stroke: var(--h-thin); stroke-width: 1.4; }
.hs-ink .hs-eave { stroke-width: 5.5; }

/* 烟囱 + 冒出来的爱心烟：尺寸全按屋顶的百分比走，跟屋顶一起缩放；
   底边用 clip-path 顺着瓦片斜线收口，任何宽度下都接在屋顶上 */
.hs-chimney {
  position: absolute; left: 72%; bottom: 44.5%; width: 3.2%; height: 17.9%;
  border: 2.4px solid var(--h-line); border-bottom: 0; border-radius: 4px 4px 0 0;
  rotate: 3deg;
  clip-path: polygon(-30% -200%, 130% -200%, 130% 0, 100% 98%, 0 65%, -30% 0);
}
.hs-chimney::before { content: ""; position: absolute; top: -13.8%; left: -16.7%; right: -16.7%; height: 15.5%; border: 2.4px solid var(--h-line); border-radius: 3px; }
.hs-chimney::after { content: ""; position: absolute; inset: 20.7% 2.4% auto; height: 31%; background: repeating-linear-gradient(180deg, var(--h-thin) 0 1.5px, transparent 1.5px 9px); }
.hs-smoke { position: absolute; bottom: 100%; left: calc(50% - max(4px, 14%)); width: max(8px, 28%); height: max(8px, 28%); color: var(--pink); animation: hsSmoke 4.6s ease-in-out infinite; }
.hs-smoke svg { display: block; width: 100%; height: 100%; }
.hs-smoke--2 { left: calc(50% + 1px); animation-delay: -1.5s; }
.hs-smoke--3 { left: calc(50% - 1px); animation-delay: -3s; }
@keyframes hsSmoke {
  0% { opacity: 0; translate: 0 6px; scale: .5; }
  25% { opacity: .85; }
  100% { opacity: 0; translate: 0 -40px; scale: 1.1; }
}

/* 屋顶小圆窗：里面一颗会呼吸的紫色荧光五角星 */
.hs-attic {
  position: absolute; left: 50%; top: 18%; translate: -50% 0;
  width: clamp(64px, 9.6vw, 100px); aspect-ratio: 1;
  display: grid; place-items: center; color: var(--purple-300);
  border: 2.4px solid var(--h-line); border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(237, 233, 254, .34), transparent 70%);
  box-shadow: 0 0 30px rgba(167, 139, 250, .5);
}
.hs-attic::before, .hs-attic::after { content: ""; position: absolute; background: var(--h-thin); }
.hs-attic::before { left: 50%; top: 7%; bottom: 7%; width: 1.6px; translate: -50% 0; }
.hs-attic::after { top: 50%; left: 9%; right: 9%; height: 1.6px; translate: 0 -50%; }
.hs-attic svg { width: 40%; color: var(--purple-300); filter: drop-shadow(0 0 10px rgba(196, 181, 253, .95)); animation: hsPulse 3.4s ease-in-out infinite; }
@keyframes hsPulse { 0%, 100% { opacity: .8; scale: 1; } 50% { opacity: 1; scale: 1.16; } }

/* 停在屋顶的蝴蝶：只留两只紫的，top 用上面的斜边公式，让脚正好落在瓦片线上 */
.hs-bfly { position: absolute; color: var(--pink); filter: drop-shadow(0 3px 9px rgba(12, 3, 30, .45)); }
.hs-bfly svg { display: block; width: 100%; height: auto; transform-origin: 50% 50%; animation: flapIdle 1.7s ease-in-out infinite; }
.hs-bfly--2 { left: 11%; top: calc(80% - 45px); width: 58px; color: var(--purple-300); }
.hs-bfly--3 { left: 66%; top: calc(37.5% - 25px); width: 30px; color: var(--purple-400); }

/* 门牌：标题钉在屋檐下，压住墙头上沿一点 */
.house__sign {
  position: absolute; left: 50%; bottom: clamp(-14px, -1vw, -4px); z-index: 3;
  translate: -50% 0; rotate: -1.1deg;
  display: inline-flex; flex-direction: column; align-items: center; gap: .45rem;
  padding: .7rem clamp(1.1rem, 3vw, 2rem) .95rem;
  text-align: center;
  border: 2.4px solid var(--h-line); border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-1) 92%, transparent), color-mix(in srgb, var(--bg-2) 86%, transparent));
  box-shadow: 0 14px 32px rgba(10, 2, 30, .42);
}
.house__sign::before, .house__sign::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--h-thin); translate: 0 -50%; }
.house__sign::before { left: 10px; }
.house__sign::after { right: 10px; }
.house__sign .eyebrow { background: transparent; backdrop-filter: none; font-size: .72rem; padding: .22rem .8rem; }
.house__title {
  margin: 0; font-family: var(--font-display); letter-spacing: .1em; line-height: 1.1;
  font-size: clamp(1.9rem, 5.4vw, 3.1rem);
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* 墙：壁纸 + 上下两道虚线 */
.house__walls {
  position: relative; z-index: 2;
  padding: clamp(2.7rem, 6vw, 3.8rem) clamp(.5rem, 1.6vw, 1.2rem) 0;
  border: 2.4px solid var(--h-line); border-radius: 12px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 17px),
    linear-gradient(180deg, color-mix(in srgb, var(--bg-1) 90%, transparent), color-mix(in srgb, var(--bg-0) 94%, transparent));
  box-shadow: var(--shadow), inset 0 0 70px rgba(168, 85, 247, .12);
}
.house__walls::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16px;
  border-top: 1.5px dashed var(--h-thin); border-radius: 0 0 10px 10px;
  background: repeating-linear-gradient(90deg, var(--h-thin) 0 1px, transparent 1px 26px);
  opacity: .5; pointer-events: none;
}

/* 屋里的串灯：电线是一条二次曲线，灯珠按同一条曲线摆 */
.house__lights { position: absolute; inset: 0 0 auto; height: clamp(40px, 5.5vw, 78px); z-index: 1; pointer-events: none; }
.house__wire { position: absolute; inset: 0; width: 100%; height: 100%; }
.house__wire path { fill: none; stroke: var(--h-thin); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.house__lights i {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  left: calc(var(--t) * 100%);
  top: calc((8 + 132 * var(--t) * (1 - var(--t))) * 1.25%);
  translate: -50% -50%;
  color: var(--pink); background: currentColor; box-shadow: 0 0 10px currentColor;
  animation: hsSway 3.6s ease-in-out infinite; animation-delay: calc(var(--t) * -3s);
}
.house__lights i:nth-child(3n) { color: var(--gold); }
.house__lights i:nth-child(3n + 1) { color: var(--cyan); }
@keyframes hsSway { 0%, 100% { rotate: -7deg; } 50% { rotate: 7deg; } }

/* 门口那行说明：左文右照。文字靠左排、整块再往左让一点，两行收住；右边墙上挂一块「小登一家」的星星木门牌 */
.house-intro {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(92px, 9vw + 26px, 160px);
  gap: clamp(.9rem, 2.2vw, 2rem); align-items: center;
  width: min(100%, 1060px);
  padding-left: clamp(1.2rem, 2.2vw, 1.8rem);
  margin: clamp(1.4rem, 3.2vw, 2.2rem) auto calc(clamp(1rem, 2.2vw, 1.6rem) - 75px);
  translate: 0 -60px;
}
.house-intro__text {
  margin: 0;
  margin-left: clamp(-1.1rem, -1.6vw, 0px);
  max-width: 52em;
  text-align: left; color: var(--ink-dim); font-size: .98rem; line-height: 1.85;
}
/* 墙上挂的「小登一家」星星实木门牌：钉子 + 挂绳 + 星形木板（厚度 / 正面木纹 / 打光三层叠）+ 刻着名字和两颗心 + 会轻轻晃的小铜铃。
   门牌是实体小物，颜色不跟主题走，深浅两套主题共用同一套木色。 */
.house-intro__shot {
  position: relative; margin: 0;
  rotate: 1.2deg; translate: 0 -9px;
  transition: rotate .4s var(--ease), translate .4s var(--ease);
}
.house-intro__shot:hover { rotate: 0deg; translate: 0 -13px; }
.house-intro__plate {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 3px 4px rgba(8, 0, 24, .32)) drop-shadow(0 16px 24px rgba(8, 0, 24, .42));
}
.hs-plate__bellhit { fill: transparent; stroke: none; cursor: pointer; pointer-events: all; touch-action: manipulation; outline: none; }
.hs-plate__bellhit:focus-visible { stroke: rgba(255, 255, 255, .85); stroke-width: 1.6; stroke-dasharray: 3 3; }
.hs-plate__nail { fill: #cdbba2; stroke: #7a6a52; stroke-width: 1.1; }
.hs-plate__chain { fill: none; stroke: #5c4c38; stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 2.4 3; }
.hs-plate__ring, .hs-plate__hook { fill: none; stroke: #5c4c38; stroke-width: 1.8; }
/* 侧面（厚度）→ 正面（木纹在 filter 里做）→ 光泽，三层叠出实木感 */
.hs-plate__side { fill: url(#hsPlateSide); stroke: url(#hsPlateSide); stroke-width: 9; stroke-linejoin: round; }
.hs-plate__face { fill: url(#hsPlateWood); stroke: url(#hsPlateWood); stroke-width: 10; stroke-linejoin: round; }
.hs-plate__sheen { fill: url(#hsPlateSheen); stroke: url(#hsPlateSheen); stroke-width: 10; stroke-linejoin: round; }
.hs-plate__title {
  font-family: var(--font-display); font-size: 25px; font-weight: 700;
  letter-spacing: 2.2px; text-anchor: middle; fill: #6b4224;
  filter: drop-shadow(0 .8px .3px rgba(255, 243, 216, .6)) drop-shadow(0 -.5px .5px rgba(70, 36, 12, .45));
}
.hs-plate__cut { fill: #6b4224; filter: drop-shadow(0 .7px .3px rgba(255, 243, 216, .55)) drop-shadow(0 -.4px .5px rgba(70, 36, 12, .4)); }
.hs-plate__loop { fill: none; stroke: #97701f; stroke-width: 1.5; }
.hs-plate__bellbody { fill: url(#hsPlateBrass); stroke: #8a6423; stroke-width: .9; stroke-linejoin: round; }
.hs-plate__bellrim { fill: url(#hsPlateBrassRim); stroke: #7d5a1c; stroke-width: .8; stroke-linejoin: round; }
.hs-plate__bellmouth { fill: #5e431a; opacity: .85; }
.hs-plate__shine { fill: none; stroke: #fff; stroke-opacity: .55; stroke-width: 1.3; stroke-linecap: round; }
.hs-plate__clapper { fill: #b8903c; stroke: #7d5a1c; stroke-width: .7; }
.hs-plate__bell { transform-box: fill-box; transform-origin: 50% 0; animation: hsBell 4.2s ease-in-out infinite; }
@keyframes hsBell { 0%, 100% { rotate: -6deg; } 50% { rotate: 6deg; } }
@media (prefers-reduced-motion: reduce) { .hs-plate__bell { animation: none; } }
@media (max-width: 950px) {
  .house-intro { grid-template-columns: 1fr; padding-left: 0; }
  .house-intro__text { margin-left: 0; }
  .house-intro__shot { max-width: 165px; justify-self: center; translate: 0 -4px; }
}

/* 三个小标题做成门牌：一排三个，很窄了就竖着排，别挤成一条 */
/* 小屋里的门牌：宽屏五个一排，中屏 3 + 2，手机两列（别堆成一长条） */
.house .subnav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1159px) { .house .subnav { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .house .subnav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.house__tabsbar {
  position: sticky; top: var(--topbar-h, 70px); z-index: 6; margin-top: .3rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-1) 94%, transparent), color-mix(in srgb, var(--bg-0) 92%, transparent));
  border-top: 2px dashed var(--h-thin); border-bottom: 2px dashed var(--h-thin);
  backdrop-filter: blur(14px) saturate(140%);
}
.house .subnav__item {
  position: relative;
  padding: .68rem 1rem .68rem .8rem;
  gap: .6rem;
  border: 2.2px solid var(--h-line); border-radius: 15px 15px 7px 7px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-2) 62%, transparent), color-mix(in srgb, var(--bg-1) 86%, transparent));
  box-shadow: 0 5px 0 -1px rgba(240, 171, 252, .16);
  rotate: -.8deg;
  transition: transform .3s var(--ease), rotate .3s var(--ease), border-color .3s, box-shadow .3s var(--ease), background .3s;
}
.house .subnav__item:nth-child(2n) { rotate: .7deg; }
.house .subnav__item:hover { transform: translateY(-4px); rotate: 0deg; border-color: var(--stroke-strong); color: var(--ink); }
.house .subnav__item.is-on {
  border-color: var(--pink);
  background: linear-gradient(180deg, rgba(240, 171, 252, .26), rgba(168, 85, 247, .16));
  box-shadow: 0 0 0 1px rgba(240, 171, 252, .35), 0 12px 28px rgba(168, 85, 247, .3), 0 5px 0 -1px rgba(240, 171, 252, .3);
}
/* 门把手：选中的那扇亮起来 */
.house .subnav__item::after {
  content: ""; position: absolute; right: 9px; top: 50%; translate: 0 -50%;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--h-thin); box-shadow: 0 0 0 3px rgba(240, 171, 252, .1);
}
.house .subnav__item.is-on::after { background: var(--gold); box-shadow: 0 0 9px rgba(252, 211, 77, .85); }
.house .subnav__ico { width: 34px; height: 34px; border-radius: 50%; }
.house .subnav__ico svg { width: 18px; height: 18px; }
/* 五个门牌一排时字号收一点，7 个字的标题才不折行 */
.house .subnav__txt b { font-size: .93rem; letter-spacing: .02em; }

/* 院子：草线 + 几朵小花 */
.house__yard { position: relative; height: clamp(56px, 8vw, 96px); margin-top: -2px; }
.house__ground { position: absolute; inset: 0; width: 100%; height: 100%; }
.house__ground path { fill: none; stroke: var(--h-line); stroke-width: 2.6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.house__ground .hs-2 { stroke: var(--h-thin); stroke-width: 1.6; }
.hs-heart { position: absolute; color: var(--pink); }
.hs-heart svg { display: block; width: 100%; height: 100%; animation: bobbing 5s ease-in-out infinite; }
.hs-heart--1 { left: 8%; top: 16%; width: 15px; }
.hs-heart--2 { left: 48%; top: 50%; width: 12px; color: var(--gold); animation-delay: -1.6s; }
.hs-heart--3 { right: 11%; top: 24%; width: 18px; color: var(--purple-300); animation-delay: -3.1s; }

/* 浅色主题：线换成墨紫，墙改成白纸 */
[data-theme="light"] .house { --h-line: rgba(124, 58, 237, .55); --h-thin: rgba(109, 40, 217, .32); }
[data-theme="light"] .house__walls {
  background:
    repeating-linear-gradient(90deg, rgba(109, 40, 217, .05) 0 1px, transparent 1px 17px),
    linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .58));
}
[data-theme="light"] .house__sign,
[data-theme="light"] .house .subnav__item { background: linear-gradient(180deg, #fff, #f5eeff); }
[data-theme="light"] .house .subnav__item.is-on { background: linear-gradient(180deg, rgba(216, 180, 254, .5), rgba(233, 213, 255, .4)); }


/* 窄屏：屋顶上的小玩意少留几个，别糊成一团 */
@media (max-width: 720px), (max-width: 960px) and (max-height: 520px) {
  .hs-attic { display: none; }
  .hs-bfly--2 { width: 44px; top: calc(80% - 38px); }
  .hs-bfly--3 { display: none; }
  .hs-cloud--m { display: none; }
  .house .subnav__item { padding: .2rem .62rem; rotate: 0deg; }
  .house .subnav__ico { width: 18px; height: 18px; }
  .house .subnav__ico svg { width: 11px; height: 11px; }
  .house .subnav__txt b { font-size: .75rem; }
  .house .subnav__item::after { display: none; }
  /* 屋顶牌子：手机上整体收小一圈，字一律不许折行
     （不然「小登一家」/ LITTLE FAMILY 会被挤成两排，糊成一团看不清） */
  .house__sign { gap: .28rem; padding: .46rem .85rem .6rem; border-radius: 13px; }
  .house__sign .eyebrow { font-size: .6rem; letter-spacing: .06em; padding: .16rem .55rem; white-space: nowrap; }
  .house__title { font-size: clamp(1.45rem, 6.6vw, 1.9rem); letter-spacing: .07em; white-space: nowrap; }
}
@media (max-width: 460px) {
  .house__roof { height: 168px; }
  .hs-cloud--l { width: 78px; }
  .hs-cloud--r { width: 92px; }
}

/* ---------- 15.7 小登一家 · 冰箱餐桌 & 中国地图 ---------- */
/* 冰箱和餐桌是两张可点的卡片，跟屋里其他东西一样手绘细线 + 玻璃底；
   地图入口在「屋里的小玩意」那排卡里（样式见 15.8 的 .toy-map__*），点开是这里的地图弹窗。 */

/* —— 冰箱 / 餐桌入口 —— */
.kitchen { display: grid; gap: clamp(0.9rem, 2vw, 1.4rem); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin: 0 0 clamp(1.4rem, 3vw, 2.2rem); }
.kitchen__item {
  display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 1rem;
  margin: 0; padding: 0.95rem 1.1rem; border-radius: var(--r-lg); text-align: left; font: inherit; color: var(--ink);
  border: 1px solid var(--stroke); background: var(--glass); cursor: pointer;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.kitchen__item:hover { transform: translateY(-5px); border-color: var(--stroke-strong); box-shadow: var(--shadow-glow); }
.kitchen__art { position: relative; display: grid; place-items: center; }
.kitchen__svg { display: block; width: 100%; max-width: 88px; height: auto; overflow: visible; transition: transform 0.5s var(--ease); }
.kitchen__item:hover .kitchen__svg { transform: translateY(-4px) scale(1.04); }
.kitchen__badge {
  position: absolute; top: -4px; right: -8px; min-width: 25px; height: 25px; padding: 0 7px;
  border-radius: 999px; display: grid; place-items: center; font: 700 0.78rem/1 var(--font-num);
  color: #fff; background: var(--grad-main); box-shadow: 0 4px 14px rgba(168, 85, 247, 0.42);
}
.kitchen__meta { display: flex; flex-direction: column; gap: 0.28rem; min-width: 0; }
.kitchen__meta b { font-family: var(--font-display); font-size: 1.16rem; letter-spacing: 0.06em; }
.kitchen__meta small { color: var(--ink-faint); font-size: 0.82rem; }
.kitchen__go { margin-left: auto; align-self: center; color: var(--ink-faint); font-size: 1.2rem; transition: transform 0.4s var(--ease), color 0.4s var(--ease); }
.kitchen__item:hover .kitchen__go { transform: translateX(4px); color: var(--pink); }

/* 冰箱线稿 */
.fridge__body, .fridge__door, .table__top, .table__leg {
  stroke: var(--h-line, rgba(240, 171, 252, 0.6)); stroke-width: 2.1; stroke-linejoin: round; stroke-linecap: round;
}
.fridge__body, .fridge__door { fill: color-mix(in srgb, var(--bg-2) 82%, #fff 5%); }
.fridge__door { transform-box: fill-box; transition: transform 0.55s var(--ease); }
.fridge__door--top { transform-origin: 0% 50%; }
.fridge__door--bot { transform-origin: 0% 50%; }
.kitchen__item:hover .fridge__door--top { transform: translateX(-7px) rotate(-3deg); }
.kitchen__item:hover .fridge__door--bot { transform: translateX(-4px) rotate(-2deg); }
.fridge__handle { stroke: var(--h-thin, rgba(196, 181, 253, 0.45)); stroke-width: 2.4; stroke-linecap: round; }
.fridge__inner { fill: color-mix(in srgb, var(--bg-0) 90%, #000 4%); }
.fridge__bottle { fill: var(--cyan); opacity: 0.75; }
.fridge__note { fill: var(--gold); }
.fridge__bfly { color: var(--pink); transform-box: fill-box; transform-origin: 50% 50%; animation: flapIdle 1.5s ease-in-out infinite; }
.fridge__cold { fill: var(--cyan); opacity: 0; animation: hsDrift 4.6s ease-in-out infinite; }

/* 餐桌线稿 */
.table__top, .table__leg { fill: color-mix(in srgb, var(--bg-2) 82%, #fff 5%); }
.table__plate { fill: color-mix(in srgb, var(--bg-0) 88%, #000 4%); }
.table__food { fill: var(--gold); }
.table__bowl { fill: var(--pink); opacity: 0.7; }
.table__cup { fill: var(--cyan); opacity: 0.7; }
.table__steam { fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linecap: round; opacity: 0; animation: steamRise 3.4s ease-in-out infinite; }
.kitchen__item:hover .table__steam { opacity: 0.55; }
.kitchen__item:hover .table__food { animation: pop 1.6s var(--ease) infinite; }

/* 烧烤架线稿 */
.grill__body, .grill__leg, .grill__grate, .grill__skew, .grill__food, .grill__dial {
  stroke: var(--h-line, rgba(240, 171, 252, 0.6)); stroke-width: 2.1; stroke-linejoin: round; stroke-linecap: round;
}
.grill__body { fill: color-mix(in srgb, var(--bg-2) 82%, #fff 5%); }
.grill__leg, .grill__grate, .grill__dial, .grill__skew { fill: none; }
.grill__dial { stroke-width: 1.8; }
.grill__food { fill: var(--gold); }
.grill__steam { fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linecap: round; opacity: 0; animation: steamRise 3.4s ease-in-out infinite; }
.kitchen__item:hover .grill__steam { opacity: 0.55; }
.grill__skew { transform-box: fill-box; transition: transform 0.5s var(--ease); }
.kitchen__item:hover .grill__skew { transform: translateY(-5px); }

/* 3D 起不来时的烧烤架简笔画 */
.fridge3d__fallback { max-width: 240px; margin: 0 auto; padding: 1.2rem 0; text-align: center; }
.fridge3d__fallback .kitchen__svg { max-width: 100%; }
.fridge3d__fallback .fridge3d__loading { margin-bottom: 1rem; }

/* 弹窗里的菜 */
.kitchen__lead { margin: 0 0 1rem; color: var(--ink-dim); font-size: 0.92rem; line-height: 1.85; }
.kitchen__list { display: grid; gap: 0.7rem; }
.kitchen__list.is-empty { display: block; }
.kitchen__dish { padding: 0.8rem 0.95rem; border-radius: var(--r-md); border: 1px solid var(--stroke); background: var(--glass); }
.kitchen__dishname { margin: 0 0 0.3rem; font-family: var(--font-display); font-size: 1.05rem; }
.kitchen__dishdesc { margin: 0.35rem 0 0; color: var(--ink-dim); font-size: 0.88rem; line-height: 1.8; }
.kitchen__dishtags { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.55rem; }
.kitchen__dishfoot { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.65rem; }
.kitchen__dishfoot:empty { display: none; }
.kitchen__table {
  display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.1rem; margin-bottom: 1rem;
  border-radius: var(--r-md); border: 1px dashed var(--stroke-strong);
  background: radial-gradient(90% 130% at 18% 0%, color-mix(in srgb, var(--purple-600) 20%, transparent), transparent 72%), var(--glass);
}
.kitchen__plate {
  flex: none; min-width: 96px; padding: 0.7rem 0.9rem; border-radius: var(--r-md); text-align: center;
  font-family: var(--font-display); font-size: 1.05rem; color: var(--ink);
  background: var(--glass-strong); border: 1px solid var(--stroke-strong);
}
.kitchen__plate--empty { color: var(--ink-faint); font-size: 1.7rem; }
.kitchen__platenote { color: var(--ink-dim); font-size: 0.86rem; }
.kitchen__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
.kitchen__foot { margin: 0.9rem 0 0; color: var(--ink-faint); font-size: 0.78rem; line-height: 1.7; }

/* ---------- 15.7b 小登现在干什么 · 两个小板块（陪陪我 / 说说话） ---------- */
.todo-mods { margin: 0 0 clamp(1.4rem, 3vw, 2.2rem); }
.todo-mods__tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.85rem; }
.todo-modtab {
  padding: 0.42rem 0.95rem; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.86rem;
  border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-dim);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.todo-modtab:hover { border-color: var(--stroke-strong); color: var(--ink); }
.todo-modtab.is-on { color: var(--ink); border-color: var(--stroke-strong); background: color-mix(in srgb, var(--purple-500) 16%, transparent); }
.todo-mod { padding: clamp(0.9rem, 2vw, 1.3rem); border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--glass); }

/* ---------- 15.y 五人小学校（小登现在干什么 · 去上课） ----------
   五只小鸟永远一起出现；奶油纸张 + 胶带 + 手绘线条的手绘本风格。
   没有考试、分数、排名、失败——只有一起完成和耍赖。 */
.sch { display: grid; gap: 1rem; }
.sch-card {
  position: relative; border-radius: 18px; padding: clamp(0.9rem, 2vw, 1.25rem);
  border: 2px solid #ecd9b8; color: #4a3a20;
  background: repeating-linear-gradient(0deg, transparent 0 26px, rgba(200, 170, 120, 0.09) 26px 27px), #fdf6e9;
  box-shadow: 0 10px 26px rgba(74, 58, 32, 0.16);
}
.sch-card::before {
  content: ""; position: absolute; top: -9px; left: 50%; width: 84px; height: 18px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(246, 216, 156, 0.88); border-radius: 3px; box-shadow: 0 2px 5px rgba(74, 58, 32, 0.12);
}
.sch-card--house::before { left: 22%; }
.sch-card--today { border-color: #f0c9a0; box-shadow: 0 12px 30px rgba(74, 58, 32, 0.2); }
.sch-eyebrow { font-size: 0.72rem; letter-spacing: 0.22em; color: #a8865a; }
.sch-title { margin: 0.4rem 0 0.5rem; font-family: var(--font-display); font-size: clamp(1.1rem, 2.6vw, 1.45rem); }
.sch-sub { margin: 0 0 0.6rem; font-size: 0.86rem; color: #7a6543; line-height: 1.8; }
.sch-sub--tight { margin: 0.25rem 0 0.6rem; }
.sch-tip { margin: 0.55rem 0 0; font-size: 0.8rem; color: #8a744f; line-height: 1.8; }
.sch-sub i, .sch-msg i, .sch-tip i { font-style: normal; }
.sch-link { border: 0; background: transparent; color: #b98b5b; font-size: 0.76rem; cursor: pointer; text-decoration: underline dotted; }
.sch-link:hover { color: #8a6a3d; }
.sch-chip {
  display: inline-flex; align-items: center; padding: 0.08rem 0.52rem; border-radius: 999px;
  font-size: 0.68rem; letter-spacing: 0.04em; color: #b3543a;
  background: #ffe9dd; border: 1px dashed #f0a58f;
}
.sch-chip--today { color: #fff; background: linear-gradient(135deg, #f8d477, #f0a58f); border: 0; }
.sch-house { display: block; width: min(100%, 385px); margin: 0.4rem auto 0; }
.sch-gate { display: flex; justify-content: center; gap: 0.4rem; margin-top: 0.2rem; }
.sch-gate-line { text-align: center; margin: 0.35rem 0 0; font-size: 0.82rem; color: #8a744f; }
/* 学校主页两栏：学校收窄放左边，今日推荐 + 挑教室叠在右边；窄屏再竖过来 */
.sch-top { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.sch-top__main { display: grid; gap: 1rem; }

/* 五只小鸟 */
.sch-bird { position: relative; width: 46px; display: inline-block; }
.sch-bird svg { display: block; width: 100%; height: auto; }
.sch-bird__emo { position: absolute; left: 50%; top: -16px; transform: translateX(-50%); font-size: 1.05rem; font-style: normal; opacity: 0; }
.sch-bird__label { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); font-size: 0.6rem; font-style: normal; color: #a8865a; white-space: nowrap; }
.sch-gate .sch-bird__label { display: none; }
.sch-crew { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 0.35rem; min-height: 100px; padding: 0.8rem 0 1.1rem; }
.sch-crew .sch-bird { width: 56px; }
.sch-msg {
  text-align: center; margin: 0; font-size: 0.9rem; color: #6b5433; line-height: 1.9;
  /* 每点一下就换一句话，留两行高度：下面的按钮不跟着上下跳 */
  min-height: 3.8em; display: flex; align-items: center; justify-content: center; gap: 0.2rem;
}

/* 一起动的动画 */
.sch-crew[class*="act-"] .sch-bird__emo { opacity: 1; animation: schEmoUp 1.5s var(--ease) infinite; }
.sch-crew.act-clap .sch-bird, .sch-crew.act-sing .sch-bird, .sch-crew.act-play .sch-bird { animation: schHop 0.6s var(--ease) infinite; }
.sch-crew.act-heart .sch-bird { animation: schHeart 0.9s var(--ease) infinite; }
.sch-crew.act-spin .sch-bird { animation: schSpin 0.9s var(--ease) infinite; }
.sch-crew.act-raise .sch-bird { animation: schRise 0.8s var(--ease) infinite; }
.sch-crew.act-stomp .sch-bird, .sch-crew.act-run .sch-bird, .sch-crew.act-walk .sch-bird { animation: schShake 0.55s var(--ease) infinite; }
.sch-crew.act-hold .sch-bird { animation: schLean 1s var(--ease) infinite; }
.sch-crew.act-pose .sch-bird, .sch-crew.act-jump .sch-bird { animation: schJump 0.75s var(--ease) infinite; }
.sch-crew.act-sit .sch-bird, .sch-crew.act-rest .sch-bird, .sch-crew.act-bow .sch-bird { animation: schSit 0.7s var(--ease) 1 both; }
.sch-crew.act-goofy .sch-bird { animation: schGoofy 0.85s var(--ease) infinite; }
/* 歌词接龙：接上之后小鸟照着「小鸟小话」做的反应（act 键来自 data-family.js 的 FAM_SCHOOL_LYRICS） */
.sch-crew.act-hug .sch-bird { animation: schHug 0.9s var(--ease) infinite; }
.sch-crew.act-shy .sch-bird { animation: schShy 1s var(--ease) infinite; }
.sch-crew.act-peek .sch-bird { animation: schPeek 1.1s var(--ease) infinite; }
.sch-crew.act-fly .sch-bird { animation: schFly 1.05s var(--ease) infinite; }
.sch-crew.act-sway .sch-bird { animation: schSway 0.9s var(--ease) infinite; }
.sch-crew.act-shiver .sch-bird { animation: schShiver 0.5s linear infinite; }
.sch-crew.act-doze .sch-bird { animation: schDoze 1.3s var(--ease) infinite; }
.sch-crew.act-cheer .sch-bird { animation: schCheer 0.8s var(--ease) infinite; }
.sch-crew.act-puff .sch-bird { animation: schPuff 0.8s var(--ease) infinite; }
.sch-crew.act-sad .sch-bird { animation: schSad 1.2s var(--ease) infinite; }
.sch-crew.act-wave .sch-bird { animation: schWave 0.9s var(--ease) infinite; }
.sch-crew.act-nod .sch-bird { animation: schNod 0.8s var(--ease) infinite; }
.sch-crew.act-back .sch-bird { animation: schBack 1.3s var(--ease) infinite; }
/* 抱抱：两边的鸟朝中间挤一挤，凑成一团 */
.sch-crew.act-hug .sch-bird:nth-child(1) { --hx: 6px; }
.sch-crew.act-hug .sch-bird:nth-child(2) { --hx: 3px; }
.sch-crew.act-hug .sch-bird:nth-child(4) { --hx: -3px; }
.sch-crew.act-hug .sch-bird:nth-child(5) { --hx: -6px; }
@keyframes schHop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes schHeart { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.14); } }
@keyframes schSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes schRise { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-14px); } }
@keyframes schShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(6deg); } 75% { transform: rotate(-6deg); } }
@keyframes schLean { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-8deg) translateX(4px); } }
@keyframes schJump { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-18px); } }
@keyframes schSit { 0% { transform: translateY(0); } 100% { transform: translateY(10px) scaleY(0.9); } }
@keyframes schGoofy { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(7deg) translateY(-6px); } }
@keyframes schEmoUp { 0% { transform: translate(-50%, 6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(-50%, -16px); opacity: 0; } }
@keyframes schHug { 0%, 100% { transform: translateX(0) scale(1); } 50% { transform: translateX(var(--hx, 0px)) scale(1.06); } }
@keyframes schShy { 0%, 100% { transform: rotate(0) scale(1); } 30% { transform: rotate(-7deg) scale(0.96, 1.04); } 65% { transform: rotate(7deg) scale(0.96, 1.04); } }
@keyframes schPeek { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.08); } }
@keyframes schFly { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-16px) rotate(-4deg); } 70% { transform: translateY(-4px) rotate(3deg); } }
@keyframes schSway { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) translateY(-4px); } }
@keyframes schShiver { 0%, 100% { transform: translateX(0) scale(1); } 25% { transform: translateX(-1.5px) scale(1.02, 0.98); } 75% { transform: translateX(1.5px) scale(1.02, 0.98); } }
@keyframes schDoze { 0%, 100% { transform: translateY(0) rotate(0) scaleY(1); } 35% { transform: translateY(4px) rotate(-14deg) scaleY(0.92); } 70% { transform: translateY(2px) rotate(2deg); } }
@keyframes schCheer { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-10px) scale(1.05, 1.03); } }
@keyframes schPuff { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.12, 0.94); } }
@keyframes schSad { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(3px) rotate(-6deg); } }
@keyframes schWave { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) translateY(-5px); } }
@keyframes schNod { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(3px) rotate(3deg); } 75% { transform: translateY(-1px) rotate(-2deg); } }
@keyframes schBack { 0%, 40% { transform: scaleX(1); } 55%, 90% { transform: scaleX(-1); } 100% { transform: scaleX(1); } }

/* 教室格 */
.sch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.55rem; margin-top: 0.6rem; }
.sch-room {
  position: relative; display: grid; gap: 0.1rem; justify-items: center; text-align: center; padding: 0.7rem 0.4rem;
  border-radius: 14px; border: 2px solid #ecd9b8; background: #fffdf6; cursor: pointer;
  font-family: inherit; color: #4a3a20; transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.sch-room:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 8px 16px rgba(74, 58, 32, 0.16); }
.sch-room.is-today { border-color: #f0a58f; background: linear-gradient(180deg, #fff7ef, #fffdf6); }
.sch-room i { font-style: normal; font-size: 1.35rem; }
.sch-room b { font-size: 0.84rem; }
.sch-room small { font-size: 0.62rem; color: #a8865a; }
.sch-room .sch-room__tag {
  position: absolute; top: -0.62rem; right: -0.3rem; padding: 0.06rem 0.42rem; border-radius: 999px;
  font-size: 0.62rem; color: #fff; background: linear-gradient(135deg, #f6b8cf, #f0a58f);
  box-shadow: 0 2px 6px rgba(74, 58, 32, 0.18);
}

/* 按钮 */
.sch-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.7rem; }
.sch-btn {
  border-radius: var(--r-pill); border: 2px solid #e2cda6; background: #fffdf6; color: #6b5433;
  font-family: inherit; font-size: 0.86rem; padding: 0.55rem 1.05rem; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.sch-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(74, 58, 32, 0.18); }
.sch-btn--primary { background: linear-gradient(135deg, #f6b8cf, #f0a58f); border-color: transparent; color: #fff; }
.sch-btn--ghost { background: transparent; }
.sch-today-count { font-size: 0.76rem; color: #a8865a; }
/* 玩法提示条：这句话点醒「该点什么」；右边是进度 */
.sch-guide {
  display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap;
  margin: 0 0 0.75rem; padding: 0.5rem 0.75rem; border-radius: 12px;
  border: 1.5px dashed #e2cda6; background: #fff8e8;
}
.sch-guide__hint { font-size: 0.84rem; color: #6b5433; line-height: 1.7; }
.sch-guide__hint i { font-style: normal; margin-right: 0.15rem; }
.sch-progress {
  margin-left: auto; white-space: nowrap; padding: 0.18rem 0.62rem; border-radius: 999px;
  font-size: 0.74rem; color: #8a744f; background: #fdf1dc; border: 1px solid #ecd9b8;
}
.sch-progress.is-done { color: #a05a2c; background: #ffe9dd; border-color: #f0a58f; }
.sch-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sch-act {
  display: inline-flex; align-items: center; gap: 0.35rem; border-radius: var(--r-pill);
  border: 2px solid #e2cda6; background: #fffdf6; color: #6b5433; font-family: inherit;
  font-size: 0.84rem; padding: 0.5rem 0.95rem; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.sch-act i { font-style: normal; }
.sch-act:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 6px 14px rgba(74, 58, 32, 0.18); }
.sch-act--wide { flex: 1 1 200px; justify-content: center; }
.sch-act--primary { background: linear-gradient(135deg, #f8d477, #f0a58f); color: #fff; border-color: transparent; }
.sch-act--silly { background: #fef3c7; }
.sch-act--encore { background: linear-gradient(135deg, #c4b5fd, #f6b8cf); color: #fff; border-color: transparent; }

/* 教室顶栏 / 麦克风 / 乐队 */
.sch-card--bar { padding: 0.6rem 0.8rem; }
.sch-card--bar::before { display: none; }
.sch-classbar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.sch-classbar__name { font-family: var(--font-display); font-size: 1.05rem; color: #4a3a20; }
.sch-classbar__sub { font-size: 0.76rem; color: #a8865a; }
.sch-mic { font-size: 2rem; text-align: center; margin-bottom: 0.3rem; }
.sch-step { text-align: center; margin: 0 0 0.6rem; font-size: 0.95rem; color: #6b5433; min-height: 1.9em; }
.sch-band { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.45rem; margin-bottom: 0.8rem; }
.sch-band__item { display: grid; justify-items: center; gap: 0.1rem; padding: 0.55rem 0.3rem; border-radius: 12px; border: 1.5px dashed #e2cda6; background: #fffdf6; }
.sch-band__item i { font-style: normal; font-size: 1.3rem; }
.sch-band__item small { font-size: 0.62rem; color: #a8865a; }
.sch-foot { display: flex; gap: 0.55rem; flex-wrap: wrap; }

/* 课堂合照 */
.sch-photo {
  position: relative; max-width: 380px; margin: 0.9rem auto 0.3rem; padding: 0.9rem 0.9rem 0.7rem;
  background: #fffdf5; border: 8px solid #fff; outline: 2px solid #ecd9b8; border-radius: 10px;
  box-shadow: 0 12px 26px rgba(74, 58, 32, 0.22); animation: schPop3 0.5s var(--ease);
}
@keyframes schPop3 { from { transform: scale(0.86); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sch-photo__tape { position: absolute; top: -13px; left: 50%; width: 92px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: rgba(246, 216, 156, 0.92); border-radius: 3px; }
.sch-photo__top { text-align: center; font-size: 0.74rem; color: #a8865a; letter-spacing: 0.12em; }
.sch-photo__crew { display: flex; justify-content: center; gap: 0.2rem; padding: 0.55rem 0 0.25rem; }
.sch-photo__crew i { width: 44px; }
.sch-photo__crew svg { width: 100%; display: block; }
.sch-photo__cap { text-align: center; font-size: 0.72rem; color: #8a744f; }

/* 课堂日记 */
.sch-diary__head { display: flex; justify-content: space-between; align-items: center; }
.sch-diary-days { display: grid; gap: 0.7rem; margin-top: 0.65rem; }
.sch-diary-day { border: 1.5px dashed #e2cda6; border-radius: 14px; padding: 0.65rem 0.8rem; background: #fffdf6; }
.sch-diary-day h4 { margin: 0 0 0.35rem; font-size: 0.88rem; }
.sch-diary-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.22rem; }
.sch-diary-day li { display: flex; gap: 0.5rem; align-items: baseline; font-size: 0.82rem; }
.sch-diary-day li b { font-weight: 600; }
.sch-diary-day li span { margin-left: auto; }
.sch-diary-day li i { font-style: normal; }
.sch-empty { margin: 0.5rem 0 0; font-size: 0.82rem; color: #a8865a; }
.sch-diary-photos { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.sch-mini-photo { display: inline-flex; gap: 0.1rem; padding: 0.3rem 0.4rem; background: #fff; border: 1px solid #ecd9b8; border-radius: 8px; }
.sch-mini-photo i { width: 22px; }
.sch-mini-photo svg { width: 100%; display: block; }
@media (max-width: 720px) {
  .sch-top { grid-template-columns: minmax(0, 1fr); }
  .sch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sch-band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sch-crew .sch-bird { width: 46px; }
  .sch-photo__crew i { width: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .sch-crew[class*="act-"] .sch-bird { animation: none; }
  .sch-crew[class*="act-"] .sch-bird__emo { animation: none; opacity: 1; }
}

/* 课堂小游戏（四间教室各一局）：奶油纸上再加一层游戏卡。
   入口并进课堂动作卡（.sch-game-entry），开局后整张卡原地换成游戏卡，
   所以点击目标不会在「上面 / 下面」之间跳。 */
.sch-card--game { border-color: #e6c98f; }
.sch-card--game .sch-tip { min-height: 1.8em; } /* 演示 / 轮到你的提示长短不一，卡片别跟着变高 */
.sch-chip--game { color: #6b5433; background: #fff6e6; border: 1px solid #f0c9a0; }
.sch-game-entry { margin-top: 0.9rem; padding-top: 0.75rem; border-top: 1.5px dashed #e2cda6; display: grid; gap: 0.55rem; }
.sch-game-entry__hint { font-size: 0.8rem; color: #8a744f; line-height: 1.8; }
.sch-game-entry__hint i { font-style: normal; margin-right: 0.15rem; }
.sch-levels { display:grid; gap:0.6rem; }
.sch-level { min-height:60px; width:100%; padding:0.7rem 0.9rem; border:2px solid #e2cda6; border-radius:14px; background:#fffdf6; color:#6b5433; text-align:left; cursor:pointer; }
.sch-level b,.sch-level small { display:block; line-height:1.6; }
.sch-level small { font-size:0.76rem; }
.sch-level.is-done { border-color:#adc799; }
.sch-level:disabled { opacity:0.6; cursor:default; }
.sch-level:focus-visible,.sch-exchange-btn:focus-visible { outline:3px solid #d6946c; outline-offset:2px; }
.sch-exchange { padding:0.65rem 0; font-size:0.8rem; line-height:1.8; color:#7a6543; }
.sch-exchange p { margin:0.2rem 0; }
.sch-exchange-btn { min-height:44px; padding:0.4rem 0.55rem; border:1px solid #d8b572; border-radius:10px; background:#fff4d5; color:#6b5433; font-size:0.72rem; cursor:pointer; }
.sch-exchange-btn:disabled { opacity:0.5; cursor:default; }
.sch-sticker small { font-size:0.65rem; }
.sch-stickerrow__slots { flex-wrap:wrap; }
.sch-card--stickers .sch-sticker { width:auto; min-width:80px; flex:1; }
@media (max-width:400px) { .sch-card--stickers .sch-stickerrow { flex-direction:column; align-items:stretch; } .sch-card--stickers .sch-stickerrow__slots { display:flex; } }
@media (max-width: 720px) {
  .sch-card--game .sch-tip { min-height: 3.6em; } /* 窄屏提示多半两行，也先占住 */
}
.sch-card--win { border-color: #f0a58f; box-shadow: 0 14px 30px rgba(74, 58, 32, 0.22); }
.sch-gseq { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.55rem 0 0.7rem; min-height: 2.2rem; }
.sch-gseq__dot {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  border: 2px solid #ecd9b8; background: #fffdf6; font-size: 1.02rem; font-style: normal;
  color: #6b5433; transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.sch-gseq__dot.is-next {
  border-color: var(--note-c, #f0a58f);
  background: color-mix(in srgb, var(--note-c, #f0a58f) 18%, #fffdf6);
  animation: schDotPulse 1.1s var(--ease) infinite;
}
.sch-gseq__dot.is-done { background: #f3e8cf; border-color: #dcc79c; opacity: 0.7; }
@keyframes schDotPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.sch-gprompt { margin: 0.4rem 0 0.65rem; text-align: center; font-family: var(--font-display); font-size: clamp(1.05rem, 3vw, 1.3rem); color: #6b5433; min-height: 1.5em; }
.sch-gprompt i { font-style: normal; margin-right: 0.2rem; }
.sch-track { display: flex; align-items: center; gap: 0.4rem; margin: 0.6rem 0 0.2rem; }
.sch-track__seg { flex: 1; height: 10px; border-radius: 999px; background: #f6ecd6; border: 1.5px dashed #e2cda6; transition: background 0.3s var(--ease); }
.sch-track__seg.is-done { background: linear-gradient(135deg, #f8d477, #f0a58f); border-style: solid; border-color: transparent; }
.sch-track__flag { font-size: 1.1rem; }
.sch-notes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 0.7rem; }
.sch-note {
  display: grid; gap: 0.08rem; justify-items: center; padding: 0.7rem 0.2rem; cursor: pointer;
  border-radius: 14px; font-family: inherit; font-size: 1.1rem; color: #4a3a20;
  border: 2px solid color-mix(in srgb, var(--note-c, #ecd9b8) 55%, #ecd9b8);
  background: color-mix(in srgb, var(--note-c, #f6ecd6) 12%, #fffdf6);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.sch-note small { font-size: 0.62rem; color: #a8865a; }
.sch-note:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(74, 58, 32, 0.16); }
.sch-note:active { transform: scale(0.94); }
.sch-note:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }
.sch-gband { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 0.7rem; }
.sch-gband__item {
  display: grid; gap: 0.05rem; justify-items: center; padding: 0.55rem 0.25rem 0.45rem;
  border-radius: 14px; border: 2px solid #ecd9b8; background: #fffdf6; cursor: pointer;
  font-family: inherit; color: #4a3a20; transition: transform 0.22s var(--ease), box-shadow 0.22s, border-color 0.22s;
}
.sch-gband__item:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(74, 58, 32, 0.16); }
.sch-gband__item.is-on { border-color: var(--c, #ecd9b8); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, #f0a58f) 26%, transparent); }
.sch-gband__item:disabled { opacity: 0.75; cursor: default; transform: none; }
.sch-gband__bird { width: 34px; font-style: normal; }
.sch-gband__bird svg { width: 100%; display: block; }
.sch-gband__inst { font-style: normal; font-size: 1.1rem; }
.sch-gband__item small { font-size: 0.6rem; color: #a8865a; text-align: center; line-height: 1.5; }
/* 被点名的那只鸟：跳出来一点 */
.sch-crew .sch-bird { transition: transform 0.3s var(--ease), filter 0.3s var(--ease); }
.sch-crew .sch-bird.is-hi { transform: translateY(-6px) scale(1.08); filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--c, #f0a58f) 60%, transparent)); }
.sch-crew .sch-bird.is-hi .sch-bird__emo { opacity: 1; }
/* 课堂贴纸册 */
.sch-stickers { display: grid; gap: 0.5rem; margin-top: 0.6rem; }
.sch-stickers--tight { margin-top: 0.35rem; }
.sch-stickerrow { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.sch-stickerrow__name { min-width: 92px; font-size: 0.8rem; color: #8a744f; }
.sch-stickerrow__slots { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.sch-sticker {
  display: inline-flex; flex-direction: column; align-items: center; gap: 0.05rem;
  min-width: 66px; padding: 0.35rem 0.5rem; border-radius: 12px; font-size: 1.15rem;
  border: 2px dashed #e2cda6; background: #fffdf6; color: #b9a988; font-style: normal;
}
.sch-sticker i { font-style: normal; }
.sch-sticker b { font-size: 0.6rem; font-weight: 600; line-height: 1.5; text-align: center; }
.sch-sticker.is-on { border-style: solid; border-color: #f0c9a0; background: #fff6e6; color: #6b5433; animation: schPop3 0.45s var(--ease); }
.sch-act:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }
@media (max-width: 460px) {
  .sch-gband { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 新三间课堂小游戏：校准 / 接歌词 / 15 秒手速（沿用同一张游戏卡） */
.sch-fit-count { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:8px; font-size:.85rem; }
.sch-fit-count span { display:grid; place-items:center; width:28px; height:28px; border:1px dashed #d9bf92; border-radius:50%; }
.sch-fit-count .is-done { background:#d4edd6; border-color:#62a874; }
.sch-calibration { display:block; position:relative; width:100%; min-height:68px; padding:16px 12px; border:2px solid #d9bf92; border-radius:16px; background:#fffdf6; touch-action:manipulation; cursor:pointer; }
.sch-calibration:disabled { cursor:default; }
.sch-calibration__rail { position:relative; display:block; height:30px; border-radius:10px; background:#eae0cc; }
.sch-calibration__green { position:absolute; height:100%; border:2px solid #489a63; border-radius:6px; background:repeating-linear-gradient(135deg,#a4d9a6 0 5px,#bce9bc 5px 10px); }
.sch-calibration__pointer { position:absolute; left:0; top:-7px; width:5px; height:44px; border-radius:3px; background:#714928; box-shadow:0 0 0 2px #fff8e8; will-change:transform; pointer-events:none; }
.sch .sch-calibrate-btn { width:100%; min-height:54px; font-size:1.08rem; touch-action:manipulation; }
.sch-fit-crew { gap:clamp(4px,1.4vw,10px); }
.sch-fit-bird { position:relative; transition:translate .3s; }
.sch-fit-bird.is-done { translate:0 -12px; }
.sch-fit-bird.is-jumping .sch-bird { animation:schFitJump .9s ease-out both; }
.sch-fit-bird.is-falling .sch-bird { animation:schFitFall 1s ease-in-out both; transform-origin:50% 85%; }
.sch-fit-bird.is-falling::after { content:"✦ ✧ ✦"; position:absolute; top:-14px; left:0; right:0; text-align:center; color:#c99632; font-size:14px; animation:schFitStars 1s ease-out both; }
@keyframes schFitJump { 0%,100% {transform:translateY(0)} 45% {transform:translateY(-20px) rotate(-8deg)} }
@keyframes schFitFall { 0% {transform:rotate(0)} 30%,65% {transform:rotate(80deg) translateY(6px)} 100% {transform:rotate(0)} }
@keyframes schFitStars { 0%,100% {opacity:0} 25%,75% {opacity:1;transform:translateY(-6px)} }
.sch-lyric-question { padding:16px; border:1px dashed #d9bf92; border-radius:14px; background:#fffdf6; text-align:center; overflow-wrap:anywhere; }
.sch-lyric-question span { font-size:.78rem; color:#8a744f; }
.sch-lyric-question p { margin:12px 0; font-size:1.15rem; font-weight:600; line-height:1.7; }
.sch-lyric-question b { font-size:.87rem; color:#86582e; }
.sch-lyric-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:14px 0; }
.sch-lyric-opt { display:flex; flex-direction:column; justify-content:center; gap:4px; padding:12px; min-height:64px; border:2px solid #decba7; border-radius:12px; background:#fffdf6; color:#4a3a20; font:inherit; font-size:.92rem; line-height:1.65; overflow-wrap:anywhere; touch-action:manipulation; cursor:pointer; }
.sch-lyric-opt.is-selected { box-shadow:0 0 0 3px #e4c58366; }
.sch-lyric-opt.is-right { border-color:#5c9c6c; background:#e5f4e5; }
.sch-lyric-opt.is-wrong { border-color:#d29976; background:#fff0e4; }
.sch-lyric-opt:disabled { opacity:1; cursor:default; }
.sch-lyric-opt b { font-size:.75rem; }
.sch-lyric-feedback { min-height:5.4em; margin:8px 0 0; line-height:1.8; font-size:.84rem; color:#7a6543; }
.sch-result { padding:10px 12px; border-radius:12px; background:#fff7df; color:#745027; font-weight:600; line-height:1.8; }
.sch-rush-clock { text-align:center; font-size:1rem; font-variant-numeric:tabular-nums; }
.sch-rush-clock b { font-size:1.65rem; color:#a56631; }
.sch-rush-meter { height:8px; margin:10px 0 0; overflow:hidden; border-radius:8px; background:#eae0cc; }
.sch-rush-meter span { display:block; width:var(--rush,100%); height:100%; background:linear-gradient(90deg,#a8d19a,#f3cb77); }
.sch-rush-crew { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; padding:12px 0 16px; }
.sch-rush-slot { display:flex; flex-direction:column; align-items:center; min-width:0; }
.sch-rush-head { position:relative; display:grid; place-items:center; width:100%; height:64px; }
.sch-rush-bubble { position:absolute; top:8px; left:50%; translate:-50% 0; display:grid; place-items:center; width:48px; height:48px; padding:0; border:2px solid #c99d59; border-radius:50%; background:#fffaf0; box-shadow:0 3px 7px #74502730; color:#4a3a20; font-size:1.6rem; touch-action:manipulation; cursor:pointer; animation:schRushPop .18s ease-out both; }
.sch-rush-bird { display:block; width:min(100%,48px); font-style:normal; }
.sch-rush-bubble.is-leaving { pointer-events:none; animation:schRushFade .09s ease-out reverse both; }
.sch-rush-bird svg { display:block; width:100%; height:auto; }
.sch-rush-bird.is-playing { animation:schFitJump .4s ease-out both; }
.sch-rush-slot small { font-size:.65rem; line-height:1.7; white-space:nowrap; color:#8a744f; }
.sch-rush-count { text-align:center; font-size:.85rem; font-variant-numeric:tabular-nums; }
@keyframes schRushPop { from {opacity:0;transform:translateY(6px)} to {opacity:1;transform:translateY(0)} }
@keyframes schRushFade { from {opacity:0} to {opacity:1} }
@media (max-width:460px) {
  .sch-lyric-options { grid-template-columns:minmax(0,1fr); gap:8px; }
  .sch-lyric-opt { min-height:54px; padding:10px 12px; }
  .sch-fit-crew .sch-bird { width:40px; }
  .sch-rush-bubble { width:44px; height:48px; }
}
@media (prefers-reduced-motion:reduce) {
  .sch-fit-bird { transition:none; }
  .sch-fit-bird.is-jumping .sch-bird { animation:schRushFade 1s ease-out both; }
  .sch-fit-bird.is-falling .sch-bird { animation:schFitFall 1.3s ease-in-out both; }
  .sch-fit-bird.is-falling::after { animation:schFitStars 1.3s ease-out both; }
  .sch-rush-bubble { animation:schRushFade .25s ease-out both; }
  .sch-rush-bird.is-playing { animation:schRushFade .4s ease-out both; }
}

/* 陪陪我：五个页面（首页 / 时间设置 / 陪伴进行中 / 休息 / 完成），居中留白、不弹窗 */
.comp { display: grid; justify-items: center; text-align: center; gap: 0.3rem; padding: 0.5rem 0 0.3rem; }
.comp__title { margin: 0; font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.24em; color: var(--ink-faint); }
.comp__bird { margin: 0.3rem 0 0.1rem; }
.comp__bird--sm .comp-bird__svg { width: clamp(120px, 24vw, 160px); }
.comp-bird__svg { width: clamp(150px, 34vw, 210px); height: auto; display: block; margin: 0 auto; }
/* 陪陪我：这里不再画 2D 小鸟，留一块空地，让页面上飞的那五只三维小鸟
   飞过来停成五角星（空地位置是 birds3d.js 摆星星的锚点，见 [data-comp-star]） */
.comp__star { width: clamp(150px, 34vw, 210px); aspect-ratio: 200 / 214; margin: 0.3rem 0 0.1rem; pointer-events: none; }
.comp__star--sm { width: clamp(120px, 24vw, 160px); }
.comp-bird__sway { transform-box: fill-box; transform-origin: 50% 94%; animation: compSway 5.6s ease-in-out infinite; }
.comp-bird__breathe { transform-box: fill-box; transform-origin: 50% 96%; animation: compBreathe 4.2s ease-in-out infinite; }
.comp-bird__eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: compBlink 5.4s ease-in-out infinite; }
.comp-bird__eyes-closed { display: none; }
.comp-bird__svg.is-rest .comp-bird__eyes { display: none; }
.comp-bird__svg.is-rest .comp-bird__eyes-closed { display: block; fill: none; stroke: #191322; stroke-width: 3; stroke-linecap: round; }
.comp__bird.is-paused .comp-bird__sway,
.comp__bird.is-paused .comp-bird__breathe,
.comp__bird.is-paused .comp-bird__eyes { animation-play-state: paused; }
.comp-bird__belly, .comp-bird__face { fill: #f7f5fd; opacity: 0.96; }
.comp-bird__body, .comp-bird__wing ellipse, .comp-bird__tuft { stroke: rgba(30, 16, 48, 0.18); stroke-width: 2; }
.comp-bird__beak { fill: #e08a1f; stroke: rgba(30, 16, 48, 0.3); stroke-width: 1.6; stroke-linejoin: round; }
.comp-bird__foot { fill: #e8a63a; }
.comp-bird__steam { fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; opacity: 0.55; animation: compSteam 3.2s ease-in-out infinite; }
.comp-bird__zzz text { font-family: var(--font-num); font-size: 15px; fill: var(--ink-faint); animation: compZzz 3s ease-in-out infinite; }
.comp-bird__zzz text + text { animation-delay: 0.7s; }
@keyframes compSway { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }
@keyframes compBreathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.016, 1.028); } }
@keyframes compBlink { 0%, 91%, 100% { transform: scaleY(1); } 94% { transform: scaleY(0.08); } }
@keyframes compSteam { 0%, 100% { opacity: 0.15; transform: translateY(2px); } 50% { opacity: 0.6; transform: translateY(-2px); } }
@keyframes compZzz { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.7; } }
.comp__ask { margin: 0.5rem 0 1rem; font-size: 1.04rem; color: var(--ink-dim); }
.comp__tasks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 0.7rem; width: min(680px, 100%); }
.comp-task {
  display: grid; gap: 0.22rem; justify-items: center; padding: 1rem 0.8rem;
  border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--glass);
  cursor: pointer; font: inherit; color: var(--ink);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.comp-task:hover { transform: translateY(-3px); border-color: var(--stroke-strong); box-shadow: var(--shadow-glow); }
.comp-task__ico { font-size: 1.5rem; }
.comp-task b { font-size: 0.95rem; }
.comp-task small { color: var(--ink-faint); font-size: 0.76rem; }
.comp__label { margin: 1.15rem 0 0.5rem; font-size: 0.9rem; color: var(--ink-dim); }
.comp__choices { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; align-items: center; }
.comp-chip {
  padding: 0.5rem 1rem; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.88rem;
  border: 1px solid var(--stroke); background: transparent; color: var(--ink-dim);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.comp-chip:hover { border-color: var(--stroke-strong); color: var(--ink); }
.comp-chip.is-on { color: var(--ink); border-color: var(--stroke-strong); background: color-mix(in srgb, var(--purple-500) 18%, transparent); }
.comp-num { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; color: var(--ink-faint); }
.comp-num input {
  width: 76px; padding: 0.42rem 0.5rem; border-radius: 999px; text-align: center;
  border: 1px solid var(--stroke); background: var(--glass); color: var(--ink); font: inherit; font-size: 0.84rem;
}
.comp-num input:focus { outline: none; border-color: var(--stroke-strong); }
.comp__custom input {
  width: min(240px, 80%); margin-top: 0.7rem; padding: 0.55rem 0.8rem; border-radius: var(--r-md); text-align: center;
  border: 1px solid var(--stroke-strong); background: var(--glass); color: var(--ink); font: inherit;
}
.comp__custom input:focus { outline: none; border-color: var(--pink); }
.comp__start { margin-top: 1.5rem; padding: 0.8rem 2.6rem; font-size: 1rem; }
.comp__back { margin-top: 0.7rem; border: 0; background: none; color: var(--ink-faint); font: inherit; font-size: 0.82rem; cursor: pointer; }
.comp__back:hover { color: var(--ink); }
.comp__say { margin: 0.6rem 0 0; font-family: var(--font-display); font-size: 1.2rem; }
.comp__with { margin: 0.4rem 0 0; color: var(--ink-dim); font-size: 0.95rem; letter-spacing: 0.06em; }
.comp__time { font-family: var(--font-num); font-size: clamp(2.6rem, 9vw, 4rem); letter-spacing: 0.06em; line-height: 1.15; }
.comp__doing { margin: 0; color: var(--ink-faint); font-size: 0.9rem; }
.comp__bubble {
  margin: 0.85rem 0 0; padding: 0.45rem 1.1rem; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--stroke); color: var(--ink-dim); font-size: 0.88rem;
}
.comp__bar { width: min(420px, 82%); height: 6px; border-radius: 999px; background: var(--stroke); overflow: hidden; margin-top: 1.05rem; }
.comp__bar span { display: block; height: 100%; width: 100%; background: var(--grad-main); border-radius: 999px; transition: width 0.3s linear; }
.comp__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 1.3rem; }
.comp__stat { margin: 0.25rem 0 0; color: var(--ink-dim); font-size: 0.95rem; }
/* 完成页：五只小鸟各说一句（头像颜色走应援色 --closet-c） */
.comp__feedback {
  width: min(560px, 100%); margin-top: 1.1rem; padding: 0.85rem 1.05rem;
  display: grid; gap: 0.6rem; text-align: left;
  border-radius: var(--r-lg); border: 1px dashed var(--stroke-strong); background: var(--glass);
}
.comp__fb { display: flex; align-items: flex-start; gap: 0.55rem; margin: 0; }
.comp__fb-bird { width: 34px; flex: none; margin-top: 0.08rem; }
.comp__fb-bird svg { display: block; width: 100%; height: auto; }
.comp__fb-text { min-width: 0; font-size: 0.88rem; line-height: 1.75; color: var(--ink-dim); }
.comp__fb-text b { display: block; font-size: 0.76rem; letter-spacing: 0.08em; color: color-mix(in srgb, var(--c, #c4b5fd) 55%, var(--ink)); }
.comp__records {
  width: min(560px, 100%); margin-top: 1.7rem; padding: 0.9rem 1.1rem;
  border-radius: var(--r-lg); border: 1px dashed var(--stroke-strong); background: var(--glass); text-align: left;
}
.comp__records-title { margin: 0; font-size: 0.88rem; color: var(--ink-dim); }
.comp__records ul { list-style: none; margin: 0.45rem 0; padding: 0; display: grid; gap: 0.3rem; font-size: 0.9rem; }
.comp__records li { display: flex; justify-content: space-between; gap: 1rem; }
.comp__records li b { font-family: var(--font-num); font-weight: 700; }
.comp__records-total { margin: 0.45rem 0 0; font-weight: 700; }
.comp__records-note { margin: 0.3rem 0 0; color: var(--ink-faint); font-size: 0.82rem; }

/* 说说话：小登陪你聊一会儿（开场问候 → 挑心情 / 直接聊） */
.fam-chat--greet { display: grid; justify-items: center; text-align: center; gap: 0.15rem; padding: 0.4rem 0 0.2rem; }
.fam-chat__hero { margin: 0.2rem 0 0.35rem; }
.fam-chat__hero .comp-bird__svg { width: clamp(140px, 30vw, 190px); }
/* 说说话：手绘小鸟图（轻轻浮动的动效） */
.fam-chat__bird-img {
  filter: drop-shadow(0 12px 20px rgba(30, 16, 48, 0.16));
  transform-origin: 50% 92%;
  animation: famChatBirdFloat 5.6s ease-in-out infinite;
}
@keyframes famChatBirdFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-0.7deg); }
}
.fam-chat__ava-img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) {
  .fam-chat__bird-img { animation: none; }
}
.fam-chat__hello { margin: 0; font-family: var(--font-display); font-size: clamp(1.15rem, 3vw, 1.4rem); letter-spacing: 0.04em; }
.fam-chat__sub { margin: 0.35rem 0 1rem; color: var(--ink-faint); font-size: 0.86rem; }
.fam-chat__moods { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.fam-chat__mood {
  padding: 0.36rem 0.85rem; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.82rem;
  border: 1px solid var(--stroke); background: transparent; color: var(--ink-dim);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.fam-chat__mood:hover { border-color: var(--stroke-strong); color: var(--ink); }
.fam-chat__mood.is-on { color: var(--ink); border-color: var(--stroke-strong); background: color-mix(in srgb, var(--purple-500) 16%, transparent); }
.fam-chat__alt { display: flex; flex-direction: column; gap: 0.15rem; margin-top: 1.05rem; align-items: center; }
.fam-chat__link {
  border: 0; background: none; padding: 0.34rem 0.7rem; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 0.88rem; color: var(--ink-dim);
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.fam-chat__link:hover { color: var(--ink); background: color-mix(in srgb, var(--purple-500) 12%, transparent); }
.fam-chat__link--open { font-weight: 700; color: var(--ink); }

/* 聊天中：小登一直挂在每条话旁边 */
.fam-chat__log {
  display: flex; flex-direction: column; gap: 0.55rem;
  max-height: min(52vh, 430px); overflow-y: auto; padding: 0.25rem 0.15rem 0.35rem;
}
.fam-chat__row { display: flex; align-items: flex-end; gap: 0.5rem; max-width: 100%; }
.fam-chat__row.is-me { justify-content: flex-end; }
.fam-chat__ava {
  width: 34px; height: 34px; flex: none; margin-bottom: 2px; border-radius: 50%;
  background: var(--glass-strong); border: 1px solid var(--stroke); overflow: hidden;
}
.fam-chat__ava svg { display: block; width: 100%; height: 100%; }
.fam-chat__bubble {
  margin: 0; max-width: min(78%, 520px); padding: 0.55rem 0.9rem;
  border-radius: 15px 15px 15px 5px; font-size: 0.9rem; line-height: 1.8; white-space: pre-line;
  overflow-wrap: anywhere; background: var(--glass-strong); border: 1px solid var(--stroke);
}
.fam-chat__row.is-me .fam-chat__bubble {
  border-radius: 15px 15px 5px 15px;
  background: color-mix(in srgb, var(--purple-500) 22%, transparent); border-color: var(--stroke-strong);
}
.fam-chat__dots { display: inline-flex; gap: 4px; align-items: center; padding: 0.78rem 0.95rem; }
.fam-chat__dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); animation: famChatDot 1.2s ease-in-out infinite; }
.fam-chat__dots span:nth-child(2) { animation-delay: 0.18s; }
.fam-chat__dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes famChatDot { 0%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 0.9; transform: translateY(-3px); } }
.fam-chat__helper { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0.25rem 0 0.1rem 2.6rem; }
.fam-chat__composer { display: flex; align-items: flex-end; gap: 0.5rem; margin-top: 0.85rem; }
.fam-chat__input {
  flex: 1; min-height: 46px; max-height: 120px; resize: none; overflow-y: auto;
  padding: 0.62rem 0.9rem; border-radius: 14px; border: 1px solid var(--stroke);
  background: var(--glass-strong); color: var(--ink); font: inherit; font-size: 0.92rem; line-height: 1.6;
}
.fam-chat__input:focus { outline: none; border-color: var(--stroke-strong); box-shadow: var(--shadow-glow); }
.fam-chat__input::placeholder { color: var(--ink-faint); }
.fam-chat__send {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff; background: var(--grad-main);
  transition: transform 0.3s var(--ease);
}
.fam-chat__send svg { width: 20px; height: 20px; transform: translateX(1px); }
.fam-chat__send:hover { transform: translateY(-2px); }
.fam-chat__send:active { transform: scale(0.96); }
.fam-chat__tools { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.55rem; }
.fam-chat__tool {
  padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid var(--stroke); background: transparent;
  color: var(--ink-dim); font: inherit; font-size: 0.78rem; cursor: pointer;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.fam-chat__tool:hover { border-color: var(--stroke-strong); color: var(--ink); background: color-mix(in srgb, var(--purple-500) 10%, transparent); }
.fam-chat__moods--bar { margin-top: 0.6rem; justify-content: flex-start; }
.fam-chat__moods.is-hidden { display: none; }

/* 说说话：表情包面板（🐥 开合；每位成员一套 10 张，名单见 page-family.js 的 FAM_CHAT_STICKERS） */
.fam-chat__stickerbar {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; padding: 0.5rem;
  border-radius: 14px; border: 1px solid var(--stroke); background: var(--glass);
}
.fam-chat__stickerbar.is-hidden { display: none; }
.fam-chat__sticker-btn {
  width: 56px; height: 56px; padding: 0.2rem; border-radius: 12px; cursor: pointer;
  display: grid; place-items: center; border: 1px solid transparent; background: transparent;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.fam-chat__sticker-btn img { display: block; width: 100%; height: 100%; object-fit: contain; }
.fam-chat__sticker-btn:hover {
  transform: translateY(-2px); border-color: var(--stroke-strong);
  background: color-mix(in srgb, var(--purple-500) 10%, transparent);
}
.fam-chat__sticker-btn:active { transform: scale(0.94); }
/* 聊天里的表情：不套气泡，像贴上去的一张小图 */
.fam-chat__sticker-wrap { display: inline-flex; }
.fam-chat__sticker {
  display: block; width: clamp(88px, 22vw, 116px); height: auto;
  filter: drop-shadow(0 8px 14px rgba(30, 16, 48, 0.14));
}

/* 手机：单列、输入框贴着屏幕底，心情按钮自动换行、不横向滚 */
@media (max-width: 767px) {
  .fam-chat__log { max-height: 56vh; }
  .fam-chat__bubble { max-width: 84%; }
  .fam-chat__sticker-btn { width: 48px; height: 48px; }
  .fam-chat__composer {
    position: sticky; bottom: 0.4rem; z-index: 3; padding: 0.35rem; margin: 0.7rem -0.35rem 0; border-radius: 18px;
    background: color-mix(in srgb, var(--bg-1) 82%, transparent); backdrop-filter: blur(10px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .fam-chat__dots span { animation: none; }
  .fam-chat__send:hover { transform: none; }
  .fam-chat__sticker-btn:hover { transform: none; }
}

/* —— 冰箱 3D 弹窗（点冰箱弹出来的那台会转的） —— */
#global-modal:has(.fridge3d) .modal__box { width: min(880px, 100%); }
.fridge3d__stage {
  position: relative; height: min(56vh, 540px); min-height: 240px;
  border-radius: var(--r-lg); border: 1px solid var(--stroke); overflow: hidden;
  background:
    radial-gradient(120% 95% at 50% 0%, color-mix(in srgb, var(--purple-600) 26%, transparent), transparent 68%),
    radial-gradient(95% 80% at 50% 108%, color-mix(in srgb, var(--pink) 16%, transparent), transparent 70%),
    color-mix(in srgb, var(--bg-1) 92%, #000 6%);
  cursor: grab; touch-action: none;
}
.fridge3d__stage.is-drag { cursor: grabbing; }
.fridge3d__stage canvas { display: block; width: 100%; height: 100%; }
.fridge3d__loading {
  position: absolute; inset: 0; margin: 0; display: grid; place-items: center;
  color: var(--ink-faint); font-size: 0.88rem; letter-spacing: 0.08em;
}
.fridge3d__tip { margin: 0.75rem 0 0; color: var(--ink-faint); font-size: 0.78rem; line-height: 1.7; }
.fridge3d__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.85rem; }
.fridge3d__bar .btn.is-on { border-color: var(--purple-400); background: var(--glass-strong); color: var(--ink); box-shadow: 0 0 0 1px var(--stroke-strong); }
.fridge3d__bar .btn:disabled { opacity: 0.42; cursor: not-allowed; }
.fridge3d__bar .btn:disabled:hover { transform: none; }
.fridge3d__sep { width: 1px; align-self: stretch; min-height: 1.4rem; background: var(--stroke); margin: 0 0.2rem; }

/* —— 3D 小菜的名字注释（冰箱 / 餐桌 / 烧烤架共用）——
   每个 3D 舞台下面一排 6 个小框：序号 + 菜名；点一条，3D 里对应那道菜跳一下。
   简介统一在「选菜」面板里看，这里不重复。 */
.dish-legend { margin-top: 0.85rem; }
.dish-legend__lead { margin: 0; color: var(--ink-dim); font-size: 0.8rem; letter-spacing: 0.04em; }
.dish-legend__list {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.35rem; margin: 0.55rem 0 0; padding: 0; list-style: none;
}
.dish-legend__item {
  display: flex; align-items: center; gap: 0.4rem; width: 100%; height: 100%;
  padding: 0.38rem 0.5rem; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  border-radius: 10px; border: 1px solid var(--stroke); background: var(--glass);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.dish-legend__item:hover {
  transform: translateY(-2px); border-color: var(--stroke-strong);
  background: color-mix(in srgb, var(--pink) 12%, transparent);
  box-shadow: var(--shadow-glow);
}
.dish-legend__item:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.dish-legend__num {
  flex: none; width: 1.1rem; height: 1.1rem;
  display: grid; place-items: center; border-radius: 50%;
  font-family: var(--font-num); font-size: 0.62rem; color: var(--ink-dim);
  border: 1px solid var(--stroke); background: color-mix(in srgb, var(--bg-0) 45%, transparent);
}
.dish-legend__meta { min-width: 0; }
.dish-legend__head { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.dish-legend__head b {
  font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
@media (max-width: 1080px) {
  .dish-legend__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .dish-legend__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .dish-legend__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 餐桌 3D：圆桌是横着的，舞台比冰箱矮一点 */
.table3d .fridge3d__stage { height: min(48vh, 460px); }

/* —— 地图弹窗 —— */
/* 弹窗比别处大：给一个确定的高度 + overflow:hidden，最外层就不再有上下滚动条，
   滚动只发生在右边行程列表里。里面的 .mapdlg 撑成 flex 列，好把高度传下去。
   地图被宽度卡住（viewBox 1000×600 等比缩放，绘制大小 = 左栏宽度），
   所以真正让它变大的是：收内外边距 + 加宽弹窗 + 加宽左栏比例。 */
#global-modal:has(.mapdlg) { padding: 0.7rem; }
#global-modal:has(.mapdlg) .modal__box { width: min(1900px, 100%); height: min(96dvh, 1080px); max-height: 100%; overflow: hidden; display: flex; flex-direction: column; }
/* 弹窗内边距也收一收：这 20 多 px 在任何屏幕上都是地图的宽度 */
#global-modal:has(.mapdlg) .modal__content { flex: 1; }
#global-modal:has(.mapdlg) .modal__pad { padding: 4rem 1.2rem 1.3rem; }
.mapdlg { display: flex; flex-direction: column; min-height: 0; }
/* 说明挪到弹窗右下角。.kitchen__foot 是厨房弹窗共用的，这里只改 mapdlg 作用域内的对齐 */
.mapdlg > .kitchen__foot { flex: none; margin: 0.6rem 0.2rem 0; text-align: right; }
.mapdlg__body { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(210px, 0.7fr); gap: clamp(0.7rem, 1.4vw, 1.1rem); align-items: stretch; flex: 1; min-height: 0; }
.mapdlg__stage {
  padding: 0.45rem 0.45rem 0.6rem; border-radius: var(--r-lg); border: 1px solid var(--stroke);
  background: radial-gradient(130% 130% at 28% 8%, color-mix(in srgb, var(--bg-2) 86%, #fff 4%), color-mix(in srgb, var(--bg-1) 90%, #000 5%));
  display: flex; flex-direction: column; min-height: 0; position: relative;
}
/* 标题压在地图左上角，不占布局高度 */
.mapdlg__title {
  position: absolute; top: 0.85rem; left: 0.95rem; z-index: 2; margin: 0;
  padding: 0.22rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--stroke); background: var(--glass-strong);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-family: var(--font-display); font-size: 1.02rem; line-height: 1.5; color: var(--ink);
}
.map-svg { display: block; width: 100%; flex: 1 1 0; min-height: 0; }
.map-land { fill: color-mix(in srgb, var(--purple-500) 30%, transparent); stroke: color-mix(in srgb, var(--purple-300) 50%, transparent); stroke-width: 1.4; stroke-linejoin: round; }
/* 浅色底上浅紫描边看不清省界：换深一档的紫，加粗一点点 */
[data-theme="light"] .map-land { fill: color-mix(in srgb, var(--purple-500) 16%, transparent); stroke: color-mix(in srgb, var(--purple-600) 46%, transparent); stroke-width: 1.5; }
.map-line { fill: none; stroke: url(#maproute); stroke-width: 5.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 10px rgba(240, 171, 252, 0.42)); }
.map-line--ghost { stroke: color-mix(in srgb, var(--purple-300) 26%, transparent); stroke-width: 2.4; stroke-dasharray: 3 9; filter: none; }
/* 装饰层一律不参与命中：国界和路线线是背景，蝴蝶连同脉冲圈盖在针脚上面，
   不关掉的话蝴蝶飞到澳门会把周围 15 个针脚的点击全吃掉。 */
.map-land, .map-line, .map-line--ghost, .map-fly { pointer-events: none; }
.map-pin { cursor: pointer; }
.map-pin__hit { fill: none; pointer-events: all; }
.map-pin__halo { fill: color-mix(in srgb, var(--gold) 20%, transparent); }
.map-pin__dot { fill: var(--gold); stroke: var(--bg-0); stroke-width: 2.4; }
.map-pin.is-on .map-pin__halo { fill: color-mix(in srgb, var(--gold) 42%, transparent); }
/* 点选改成「找最近针脚」后，整张地图在热区内都能点：鼠标进来给手型 + 针脚高亮 */
.map-svg.is-hot { cursor: pointer; }
.map-pin.is-hover .map-pin__halo { fill: color-mix(in srgb, var(--gold) 55%, transparent); }
.map-pin.is-hover .map-pin__dot { fill: var(--pink); }
.map-fly__pulse { fill: color-mix(in srgb, var(--pink) 26%, transparent); transform-box: fill-box; transform-origin: 50% 50%; animation: mapPulse 2.2s ease-out infinite; }
.map-fly__bfly { color: var(--pink); filter: drop-shadow(0 0 10px rgba(240, 171, 252, 0.7)); transform-box: fill-box; transform-origin: 50% 50%; animation: flapIdle 0.9s ease-in-out infinite; }
.map-hud { display: flex; align-items: baseline; gap: 0.65rem; flex-wrap: wrap; padding: 0.75rem 0.4rem 0.2rem; }
.map-hud__date { font-family: var(--font-num); font-size: 0.78rem; letter-spacing: 0.16em; color: var(--cyan); }
.map-hud__city { font-family: var(--font-display); font-size: 1.5rem; }
.map-hud__title { color: var(--ink-dim); font-size: 0.88rem; }
.map-ctrls { display: flex; gap: 0.5rem; flex-wrap: wrap; padding: 0.25rem 0.4rem 0.3rem; }
.map-ctrls .btn { display: inline-flex; align-items: center; gap: 0.35rem; }
.map-ctrls svg { width: 14px; height: 14px; }
/* 同城切换条：上一站/下一站 下面再来一根，专门翻当前城市的那几件事 */
.map-ctrls--city { border-top: 1px solid var(--stroke); margin: 0.45rem 0.4rem 0; padding: 0.55rem 0 0.15rem; align-items: center; }
.map-ctrls--city .btn { padding: 0.4rem 0.85rem; }
.map-ctrls__city {
  font-family: var(--font-num); font-size: 0.82rem; letter-spacing: 0.08em; color: var(--cyan);
  margin-right: auto; white-space: nowrap;
}
.map-ctrls--city.is-single .map-ctrls__city { color: var(--ink-faint); }

/* 行程列表：跟地图一样高，滚动只发生在这里（overscroll-behavior 挡住滚动接力） */
.map-stops {
  list-style: none; margin: 0; padding: 0 0.3rem 0 0; display: flex; flex-direction: column; gap: 0.5rem;
  min-height: 0; height: 100%; overflow-y: auto; overscroll-behavior: contain;
  scroll-padding: 0.4rem 0.1rem;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--purple-400) 55%, transparent) transparent;
}
.map-stops::-webkit-scrollbar { width: 9px; }
.map-stops::-webkit-scrollbar-track { background: transparent; }
.map-stops::-webkit-scrollbar-thumb {
  border-radius: 999px; border: 2px solid transparent; background-clip: padding-box;
  background-color: color-mix(in srgb, var(--purple-400) 45%, transparent);
}
.map-stops::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--purple-400) 75%, transparent); }
/* 列表栏被压窄了，条目自身的内边距和序号一起收紧，把文字宽度还回来一点 */
.map-stop {
  display: flex; align-items: flex-start; gap: 0.5rem; width: 100%; margin: 0; padding: 0.55rem 0.55rem; text-align: left; font: inherit; color: var(--ink);
  border-radius: var(--r-md); border: 1px solid var(--stroke); background: var(--glass); cursor: pointer;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.map-stop:hover { border-color: var(--stroke-strong); }
.map-stop.is-on { border-color: var(--purple-400); background: var(--glass-strong); }
.map-stop--off { cursor: default; opacity: 0.7; }
.map-stop__n {
  flex: none; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%;
  font: 700 0.75rem/1 var(--font-num); color: #fff; background: var(--grad-main);
}
.map-stop--off .map-stop__n { background: var(--glass-strong); color: var(--ink-faint); }
.map-stop__txt { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.map-stop__txt b { font-family: var(--font-display); font-size: 1rem; }
.map-stop__txt small { color: var(--ink-faint); font-size: 0.76rem; }
.map-stop__detail { color: var(--ink-dim); font-size: 0.82rem; line-height: 1.7; }
.map-stop__off { font-style: normal; font-size: 0.7rem; color: var(--ink-faint); border: 1px solid var(--stroke); border-radius: 999px; padding: 0 0.4rem; margin-left: 0.3rem; }

@keyframes mapPulse { 0% { transform: scale(0.35); opacity: 0.9; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes steamRise { 0% { opacity: 0; transform: translateY(3px); } 35% { opacity: 0.6; } 100% { opacity: 0; transform: translateY(-9px); } }

@media (max-width: 860px) {
  .kitchen { grid-template-columns: 1fr; }
  .kitchen__item { grid-template-columns: 76px 1fr; }
  /* 窄屏不用 grid 挤：地图栏按内容自然撑开，HUD / 按钮不再被压出栏外
     叠到行程列表上；整屏由弹窗自己滚（下面的 max-height + overflow-y） */
  .mapdlg__body { display: block; flex: none; }
  .mapdlg__stage { margin-bottom: 0.7rem; }
  .map-svg { flex: none; height: min(46vh, 380px); }
  .map-stops { max-height: min(34vh, 300px); height: auto; }
  /* 窄屏地图和列表上下叠着放，挤不进一屏，外层得能滚 */
  #global-modal:has(.mapdlg) .modal__box { width: 100%; height: auto; max-height: 100%; overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .kitchen__svg, .fridge__door, .kitchen__item { transition: none; }
  .fridge__bfly, .table__steam, .table__food, .map-fly__pulse, .map-fly__bfly { animation: none; }
  .map-fly__pulse { opacity: 0.5; }
}

/* ---------- 15.8 小登一家 · 家里的小玩意（答案之书 / 扭蛋机 / 许愿瓶 / 拍立得墙 / 中国地图） ---------- */
.house-toys { margin: 0 0 clamp(1.4rem, 3vw, 2.2rem); }
.toy-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(0.7rem, 1.6vw, 1.1rem); }
.toy {
  display: grid; gap: 0.6rem; padding: 0.95rem 0.95rem 1.05rem; text-align: left; font: inherit; color: var(--ink);
  border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--glass); cursor: pointer;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.toy:hover { transform: translateY(-5px); border-color: var(--stroke-strong); box-shadow: var(--shadow-glow); }
.toy__art { position: relative; display: grid; place-items: center; min-height: 100px; }
.toy__art .toy-svg { width: 100%; max-width: 104px; height: auto; overflow: visible; transition: transform 0.5s var(--ease); }
.toy:hover .toy-svg { transform: translateY(-4px) scale(1.04); }
.toy__badge {
  position: absolute; top: -4px; right: -8px; min-width: 25px; height: 25px; padding: 0 7px;
  border-radius: 999px; display: grid; place-items: center; font: 700 0.78rem/1 var(--font-num);
  color: #fff; background: var(--grad-main); box-shadow: 0 4px 14px rgba(168, 85, 247, 0.42);
}
.toy__meta { display: flex; flex-direction: column; gap: 0.22rem; min-width: 0; }
.toy__meta b { font-family: var(--font-display); font-size: 1.06rem; letter-spacing: 0.05em; }
.toy__meta small { color: var(--ink-faint); font-size: 0.78rem; }

/* 简笔画线稿（沿用屋里家具那套颜色） */
.toy-svg { --toy-line: var(--h-line, rgba(240, 171, 252, 0.6)); }
/* 摊开的书：外封皮粗线稿，页面带一点纸的底色，页脚几道线画书页厚度；
   摊开的那层平时藏着，封面翻开（.is-open）才露出来 */
.toy-book__shell { fill: none; stroke: var(--toy-line); stroke-width: 3.4; stroke-linejoin: round; stroke-linecap: round; }
.toy-book__page { fill: color-mix(in srgb, var(--bg-2) 88%, #fff 4%); stroke: var(--toy-line); stroke-width: 2.7; stroke-linejoin: round; }
.toy-book__stack { fill: none; stroke: var(--h-thin, rgba(196, 181, 253, 0.45)); stroke-width: 1.7; stroke-linecap: round; }
.toy-book__spine { fill: none; stroke: var(--toy-line); stroke-width: 2.7; stroke-linecap: round; }
.toy-book__stamp { color: color-mix(in srgb, var(--toy-line) 58%, transparent); fill: currentColor; }
.toy-book__leaf { fill: color-mix(in srgb, var(--bg-2) 90%, #fff 7%); stroke: var(--toy-line); stroke-width: 2.7; stroke-linejoin: round; opacity: 0; transform-box: fill-box; transform-origin: 0% 50%; }
.toy-book__spread { opacity: 0; transition: opacity 0.3s ease 0.16s; }
#fam-book-art.is-open .toy-book__spread { opacity: 1; }
/* 合上的封面：小熊和蝴蝶印在封面框里 */
.toy-book__coverface { fill: color-mix(in srgb, var(--purple-500) 28%, var(--bg-2)); stroke: var(--toy-line); stroke-width: 3; }
.toy-book__hinge { fill: none; stroke: var(--toy-line); stroke-width: 2.2; stroke-linecap: round; }
.toy-book__coverframe { fill: none; stroke: color-mix(in srgb, var(--toy-line) 62%, transparent); stroke-width: 1.6; }
.toy-book__bfly { color: var(--pink); }
.toy-book__bear { fill: #000; }
/* 封面上的书名和五颗小星星（统一淡紫） */
.toy-book__title { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: 2.5px; fill: var(--toy-line); text-anchor: middle; }
.toy-book__subtitle { font-family: var(--font-display); font-size: 8.5px; letter-spacing: 3.5px; fill: color-mix(in srgb, var(--toy-line) 74%, transparent); text-anchor: middle; }
.toy-book__memberstar { stroke: rgba(30, 10, 60, 0.3); stroke-width: 0.7; }
/* 寻找真爱永恒吧：放大镜里一颗心 + 碎片格子 + 集齐后的大合照 */
.toy-love__glass { fill: color-mix(in srgb, var(--pink) 12%, var(--bg-0)); stroke: var(--toy-line); stroke-width: 3; }
.toy-love__heart { fill: var(--pink); stroke: var(--toy-line); stroke-width: 1.6; }
.toy-love__handle { fill: none; stroke: var(--toy-line); stroke-width: 6; stroke-linecap: round; }
.toy-love__spark { fill: none; stroke: color-mix(in srgb, var(--toy-line) 62%, transparent); stroke-width: 1.8; stroke-linejoin: round; }
.toy-love__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin: 1.1rem 0 0; }
.toy-love__frag:last-child:nth-child(odd) { grid-column: 1 / -1; }
.toy-love__frag {
  border-radius: var(--r-md); border: 1px dashed var(--stroke-strong); background: var(--glass);
  padding: 0.85rem 0.8rem; text-align: center;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.toy-love__frag.is-found {
  border-style: solid; border-color: var(--pink);
  background: linear-gradient(160deg, rgba(244, 114, 182, 0.12), rgba(109, 40, 217, 0.12));
}
.toy-love__frag-ico { display: block; width: 34px; margin: 0 auto 0.35rem; color: var(--ink-faint); opacity: 0.55; }
.toy-love__frag.is-found .toy-love__frag-ico { color: var(--pink); opacity: 1; }
.toy-love__frag-ico svg { display: block; width: 100%; height: auto; }
.toy-love__frag b { font-family: var(--font-display); font-size: 0.98rem; letter-spacing: 0.06em; }
.toy-love__frag.is-locked b { color: var(--ink-faint); }
.toy-love__frag p { margin: 0.3rem 0 0; font-size: 0.78rem; line-height: 1.7; color: var(--ink-dim); }
.toy-love__frag-date { display: block; margin-top: 0.15rem; font-size: 0.66rem; font-style: normal; letter-spacing: 0.08em; color: var(--ink-faint); }
.toy-love__frag.is-found .toy-love__frag-date { color: var(--pink); }
/* 碎片卡上的照片位：有图显示图；图还没放（或挂了）就露出占位框，框里写着该放哪张 */
.toy-love__shot { position: relative; display: block; width: min(100%, 150px); aspect-ratio: 4 / 3; margin: 0.6rem auto 0.1rem; border: 1px dashed var(--stroke-strong); border-radius: var(--r-sm); overflow: hidden; background: var(--glass); }
.toy-love__shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.toy-love__shot.is-loaded .toy-love__shot-ph { display: none; }
.toy-love__shot-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.12rem; padding: 0.3rem; font-size: 0.56rem; line-height: 1.45; color: var(--ink-faint); text-align: center; word-break: break-all; }
/* 集齐后的庆祝弹窗：浮在四张碎片卡中间（鸟 + 那句话 + 大合照） */
.toy-love__stage { position: relative; }
.toy-love__pop { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 0.6rem; border-radius: var(--r-md); background: rgba(10, 4, 24, 0.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn 0.35s var(--ease); }
.toy-love__pop[hidden] { display: none; }
.toy-love__popcard { width: min(100%, 420px); max-height: 100%; overflow-y: auto; padding: 0.9rem 0.85rem 0.8rem; border-radius: var(--r-md); border: 1px solid var(--stroke-strong); background: linear-gradient(160deg, var(--bg-2), var(--bg-1)); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55); text-align: center; animation: riseIn 0.45s var(--ease) both; }
[data-theme="light"] .toy-love__popcard { background: linear-gradient(160deg, #fff, #f2ecff); }
.toy-love__pop .toy-love__birds { margin: 0; }
.toy-love__pop .love-bird { width: clamp(38px, 8vw, 46px); }
.toy-love__pop .toy-love__final { margin: 0.7rem 0 0; }
.toy-love__pop .toy-love__final img { width: min(100%, 230px); }
.toy-love__popclose { margin-top: 0.7rem; }
.toy-love__final { margin: 1.1rem 0 0; text-align: center; }
/* 集齐后的大合照：直接展示原图，圆角 + 描边 + 阴影当相片卡 */
.toy-love__final img { width: min(100%, 300px); border-radius: var(--r-md); border: 1px solid var(--stroke); box-shadow: var(--shadow); }
.toy-love__final figcaption { margin-top: 0.5rem; font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.12em; color: var(--ink); }
.toy-love__final p { margin: 0.35rem 0 0; font-size: 0.82rem; color: var(--ink-dim); }
.toy-love__final:not([hidden]) { animation: pop 0.6s var(--ease); }
.toy-love__final.is-late:not([hidden]) { animation: loveFinalIn 0.7s var(--ease) 2.3s both; }
@keyframes loveFinalIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
/* 集齐时飞进来的五只小鸟：从两侧和上方飞进弹窗，按蓝绿黄橙红站成一排，落稳后浮出一句话 */
#global-modal:has(.lovedlg) .modal__box { overflow-x: hidden; }
.toy-love__birds { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 0.4rem 0.45rem; margin: 1.2rem 0 0; text-align: center; }
.toy-love__birds[hidden] { display: none; }
.love-bird { width: clamp(42px, 9vw, 54px); }
.love-bird__fly, .love-bird__bob, .love-bird__svg { display: block; }
.love-bird__svg { width: 100%; height: auto; }
.love-bird__body, .love-bird__tuft, .love-bird__wing ellipse { fill: var(--c, #f6c453); stroke: rgba(30, 16, 48, 0.18); stroke-width: 2; }
.love-bird__wingline { fill: none; stroke: #f7f5fd; stroke-width: 3; stroke-linecap: round; opacity: 0.85; }
.love-bird__face, .love-bird__belly { fill: #f7f5fd; }
.love-bird__eyes ellipse { fill: #191322; }
.love-bird__shine { fill: #fff; }
.love-bird__shine--sm { opacity: 0.7; }
.love-bird__beak { fill: #e08a1f; stroke: rgba(30, 16, 48, 0.3); stroke-width: 1.6; stroke-linejoin: round; }
.love-bird__foot { fill: #e8a63a; }
.love-bird__wing { transform-box: fill-box; transform-origin: 50% 14%; }
.love-bird__wing--l { --flap: -26deg; }
.love-bird__wing--r { --flap: 26deg; }
.love-bird:nth-child(1) { --dx: -250px; --dy: -90px; --rot: -24deg; --delay: 0.05s; --dur: 0.9s; --flaps: 4; }
.love-bird:nth-child(2) { --dx: 230px; --dy: -140px; --rot: 20deg; --delay: 0.3s; --dur: 1s; --flaps: 5; }
.love-bird:nth-child(3) { --dx: -170px; --dy: -60px; --rot: -14deg; --delay: 0.55s; --dur: 0.95s; --flaps: 4; }
.love-bird:nth-child(4) { --dx: 190px; --dy: -110px; --rot: 16deg; --delay: 0.8s; --dur: 1.05s; --flaps: 5; }
.love-bird:nth-child(5) { --dx: -110px; --dy: -80px; --rot: -10deg; --delay: 1.05s; --dur: 0.9s; --flaps: 4; }
.toy-love__birds.is-in .love-bird__fly { animation: loveBirdFly var(--dur, 1s) cubic-bezier(0.22, 0.68, 0.28, 1) both; animation-delay: var(--delay, 0s); }
.toy-love__birds.is-in .love-bird__wing { animation: loveBirdFlap 0.22s ease-in-out var(--flaps, 4); animation-delay: var(--delay, 0s); }
.toy-love__birds.is-in .love-bird__bob { animation: loveBirdBob 2.8s ease-in-out infinite; animation-delay: calc(var(--delay, 0s) + var(--dur, 1s)); }
.toy-love__birds-line { flex-basis: 100%; margin: 0.6rem 0 0; font-family: var(--font-display); font-size: 0.98rem; font-style: normal; letter-spacing: 0.12em; color: var(--ink); }
.toy-love__birds.is-in .toy-love__birds-line { animation: loveLineIn 0.9s var(--ease) 2s both; }
@keyframes loveBirdFly { from { transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--rot, 0deg)); opacity: 0; } 14% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes loveBirdFlap { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(var(--flap, -24deg)); } }
@keyframes loveBirdBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes loveLineIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .toy-love__pop,
  .toy-love__popcard { animation: none; }
  .toy-love__birds.is-in .love-bird__fly,
  .toy-love__birds.is-in .love-bird__wing,
  .toy-love__birds.is-in .love-bird__bob,
  .toy-love__birds.is-in .toy-love__birds-line { animation: none; }
}
/* TOP 扭蛋机（按参考图配色：主体 #FFD6E7 / 半透明 #FFE7F2 / 金属 #C0C0C0 / 细节 #F8BBD0） */
.toy-gacha__body { fill: #ffd6e7; stroke: #ec9fc4; stroke-width: 2.6; }
.toy-gacha__wing { fill: #ffe7f2; fill-opacity: 0.88; stroke: #f3b8d4; stroke-width: 1.6; stroke-linejoin: round; }
.toy-gacha__wire { fill: none; stroke: #b9bec6; stroke-width: 1.6; stroke-linecap: round; }
.toy-gacha__metal { fill: #c0c0c0; stroke: #9aa0a8; stroke-width: 1.4; }
.toy-gacha__brandpill { fill: #f8bbd0; stroke: #ec9fc4; stroke-width: 1.2; }
.toy-gacha__brand { font-family: var(--font-display); font-size: 8px; font-weight: 700; letter-spacing: 1.2px; fill: #fff; text-anchor: middle; }
.toy-gacha__glass { fill: #fff4dd; stroke: #ec9fc4; stroke-width: 2; }
.toy-gacha__ball { fill: #ffd97a; opacity: 0.95; }
.toy-gacha__ball--2 { fill: #f8bbd0; }
.toy-gacha__ball--3 { fill: #d9c7f5; }
.toy-gacha__glass-shine { fill: none; stroke: #f8cfe2; stroke-width: 1.8; stroke-linecap: round; }
.toy-gacha__slot { fill: #c0c0c0; }
.toy-gacha__knob { fill: #f8bbd0; stroke: #ec9fc4; stroke-width: 2; }
.toy-gacha__knobfly { fill: #e08fb5; }
.toy-gacha__sidebtn { fill: #f8bbd0; stroke: #ec9fc4; stroke-width: 1.8; }
.toy-gacha__tagwire { fill: none; stroke: #c9a8bb; stroke-width: 1.4; stroke-linecap: round; }
.toy-gacha__tag { fill: #ffe7f2; stroke: #f3b8d4; stroke-width: 1.8; }
.toy-gacha__tagdot { fill: none; stroke: #f0a6c8; stroke-width: 1.3; }
.toy-gacha__foot { fill: #f8bbd0; stroke: #ec9fc4; stroke-width: 1.8; }
.toy-gacha__dot { fill: #d9a7bd; }
/* 星星瓶缩略图：手绘线稿（奶油盖 + 爱心蝴蝶结 + 水纹 + 纸星星） */
.toy-wish__thumbbottle { fill: color-mix(in srgb, var(--bg-2) 86%, #fff 5%); stroke: var(--toy-line); stroke-width: 3; stroke-linejoin: round; }
.toy-wish__thumbbottle-in { fill: none; stroke: color-mix(in srgb, var(--toy-line) 42%, transparent); stroke-width: 1.3; stroke-linejoin: round; }
.toy-wish__ripple, .toy-wish__capmark, .toy-wish__motion, .toy-wish__smile { fill: none; stroke: color-mix(in srgb, var(--toy-line) 62%, transparent); stroke-width: 1.6; stroke-linecap: round; }
.toy-wish__dot { fill: color-mix(in srgb, var(--toy-line) 72%, transparent); }
.toy-wish__cap, .toy-wish__lid { fill: color-mix(in srgb, var(--gold) 50%, var(--bg-2)); stroke: var(--toy-line); stroke-width: 2; }
.toy-wish__bow { fill: none; stroke: var(--toy-line); stroke-width: 2.2; stroke-linejoin: round; }
.toy-wish__tail { fill: none; stroke: var(--pink); stroke-width: 2.6; stroke-linecap: round; }
.toy-wish__heart--knot { fill: var(--pink); stroke: var(--toy-line); stroke-width: 1.1; }
.toy-wish__heart--deep { fill: #7c3aed; stroke: rgba(255, 255, 255, 0.5); stroke-width: 0.8; }
.toy-wish__heart--line { fill: none; stroke: var(--toy-line); stroke-width: 1.8; stroke-linejoin: round; }
.toy-wish__sparkline { fill: none; stroke: var(--toy-line); stroke-width: 1.8; stroke-linejoin: round; }
.toy-wish__eye { fill: var(--toy-line); }
/* 星星瓶点开的大图：一套马卡龙淡彩（玻璃 / 星星水 / 小熊 / 缎带 / 翅膀） */
.toy-wish__bigglass { fill: #fdf9fc; stroke: #dfa0ba; stroke-width: 2.6; stroke-linejoin: round; }
.toy-wish__bigoutline { fill: none; stroke: #dfa0ba; stroke-width: 2.6; stroke-linejoin: round; }
.toy-wish__biginner { fill: none; stroke: #f3cdda; stroke-width: 1.3; stroke-linejoin: round; }
.toy-wish__bigwater { fill: #b9cdf0; }
.toy-wish__bigwave { fill: none; stroke: #dde8f9; stroke-width: 2; stroke-linecap: round; }
.toy-wish__bigbubble { fill: #fff; opacity: 0.85; }
.toy-wish__bigmoon { fill: #f2d476; }
.toy-wish__bigstar { fill: #f5d36e; stroke: #e3bd55; stroke-width: 0.8; stroke-linejoin: round; }
.toy-wish__bigheart { fill: #f6b9cb; stroke: #e39db4; stroke-width: 1; }
.toy-wish__bigcap { fill: #f7ecd6; stroke: #d9c39a; stroke-width: 2; }
.toy-wish__bigcap-line { fill: none; stroke: #e4d3ae; stroke-width: 1.4; stroke-linecap: round; }
.toy-wish__wing { fill: #faf7f4; stroke: #d5ccd8; stroke-width: 1.4; stroke-linejoin: round; }
.toy-wish__boat { fill: #fcfbfa; stroke: #d9d2dc; stroke-width: 1.6; stroke-linejoin: round; }
.toy-wish__boatline { fill: none; stroke: #d9d2dc; stroke-width: 1.4; }
.toy-wish__bearfur { fill: #a9836f; }
.toy-wish__bearface { fill: #ecd7c9; }
.toy-wish__bearink { fill: #4b382f; }
.toy-wish__bearline { fill: none; stroke: #4b382f; stroke-width: 1.3; stroke-linecap: round; }
.toy-wish__bighat { fill: #f2d476; stroke: #d8b258; stroke-width: 1.3; stroke-linejoin: round; }
.toy-wish__bigpom { fill: #fff; stroke: #e3dcd2; stroke-width: 1.2; }
.toy-wish__bigribbon { fill: #f4bfce; stroke: #dd9db1; stroke-width: 1.5; stroke-linejoin: round; }
.toy-wish__bigtail { fill: none; stroke: #f2b9ca; stroke-width: 9; stroke-linecap: round; }
.toy-wish__bigtail-line { fill: none; stroke: #e8a4bb; stroke-width: 1.6; stroke-linecap: round; opacity: 0.85; }
.toy-wish__bigspark { fill: #f3c3d4; }
.toy-wish__bigspark--gold { fill: #f2d477; }
.toy-wish__bigdot { fill: #f2d477; }
/* 星星纸：白 / 浅紫 / 深紫，瓶里的星和列表里的纸条都用这三种 */
.toy-wish__star--white { fill: #f7f5fd; stroke: rgba(30, 10, 60, 0.35); stroke-width: 0.8; }
.toy-wish__star--lilac { fill: #d8b4fe; stroke: rgba(30, 10, 60, 0.3); stroke-width: 0.8; }
.toy-wish__star--deep { fill: #7c3aed; stroke: rgba(255, 255, 255, 0.45); stroke-width: 0.8; }
.toy-pola__frame { fill: #fff; stroke: var(--toy-line); stroke-width: 1.6; }
.toy-pola__photo { fill: color-mix(in srgb, var(--purple-400) 40%, var(--bg-0)); }
.toy-pola__photo--2 { fill: color-mix(in srgb, var(--pink) 36%, var(--bg-0)); }
.toy-pola__cap { fill: none; stroke: var(--h-thin, rgba(196, 181, 253, 0.45)); stroke-width: 2.4; stroke-linecap: round; }
.toy-pola__pin { fill: var(--gold); }
/* 地图卡：轮廓直接用 CHINA_MAP 的路径（viewBox 1000×600），描边用 non-scaling-stroke
   才不会被缩成看不见的细线；点还是行程里走过的城市 */
.toy__art .toy-map { max-width: 126px; } /* 地图是横的，比别的简笔画放宽一点才不显小 */
.toy-map__land { fill: color-mix(in srgb, var(--purple-500) 26%, transparent); stroke: var(--toy-line); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill 0.4s var(--ease); }
.toy:hover .toy-map__land { fill: color-mix(in srgb, var(--purple-500) 40%, transparent); }
.toy-map__dot { fill: var(--gold); }
.toy-map__sheet { fill: color-mix(in srgb, var(--bg-2) 88%, #fff 4%); stroke: var(--toy-line); stroke-width: 2; stroke-linejoin: round; }
.toy-map__fold { fill: none; stroke: var(--h-thin, rgba(196, 181, 253, 0.45)); stroke-width: 2; }
.toy-map__route { fill: none; stroke: var(--pink); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 5 6; }

/* 弹窗里的四样 */
.toy-bookstage {
  display: grid; place-items: center; gap: 0.7rem; padding: 1rem; margin-bottom: 0.2rem;
  border-radius: var(--r-md); border: 1px dashed var(--stroke-strong); background: var(--glass);
}
.toy-bookstage__art { width: 150px; }
.toy-bookstage__art .toy-svg { width: 100%; height: auto; }
.toy-answer { margin: 0; min-height: 1.6em; font-family: var(--font-display); font-size: 1.16rem; text-align: center; }

/* 答案之书：星幕舞台 + 大书 + 醒目的翻页键 */
/* 框尽量占满屏幕：高度给一个确定值，内部用 flex 把富余空间让给舞台，
   内容不多不少地放得下，不用上下滑 */
#global-modal:has(.bookdlg) .modal__box {
  width: min(1200px, 100%); height: min(100dvh - 24px, 1080px); max-height: 100%;
  overflow: hidden; display: flex; flex-direction: column;
}
#global-modal:has(.bookdlg) .modal__content { flex: 1; display: flex; flex-direction: column; }
#global-modal:has(.bookdlg) .modal__pad { flex: 1; display: flex; flex-direction: column; padding: 3rem 1.4rem 1.2rem; }
#global-modal:has(.bookdlg) .kitchen__lead { margin-bottom: 0.7rem; }
.bookdlg__head { display: flex; flex-direction: column; gap: 0.3rem; }
.bookdlg__head .eyebrow { display: inline-flex; align-items: center; gap: 0.4rem; }
.bookdlg .modal__title {
  margin-bottom: 0.2rem; font-size: clamp(1.4rem, 3vw, 1.85rem);
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bookdlg .toy-bookstage {
  position: relative; overflow: hidden; gap: 1.05rem; padding: 1.8rem 1.4rem 1.5rem; flex: 1;
  border: 1px solid color-mix(in srgb, var(--purple-500) 38%, var(--stroke));
  background:
    radial-gradient(58% 46% at 50% 34%, color-mix(in srgb, var(--purple-500) 26%, transparent), transparent 74%),
    radial-gradient(1.7px 1.7px at 14% 22%, rgba(255, 255, 255, 0.9), transparent 55%),
    radial-gradient(1.7px 1.7px at 86% 18%, rgba(255, 255, 255, 0.85), transparent 55%),
    radial-gradient(1.4px 1.4px at 72% 30%, rgba(255, 255, 255, 0.7), transparent 55%),
    radial-gradient(1.4px 1.4px at 26% 36%, rgba(255, 255, 255, 0.75), transparent 55%),
    radial-gradient(1.2px 1.2px at 52% 12%, rgba(255, 255, 255, 0.8), transparent 55%),
    radial-gradient(1.2px 1.2px at 44% 26%, rgba(255, 255, 255, 0.6), transparent 55%),
    radial-gradient(1.2px 1.2px at 63% 40%, rgba(255, 255, 255, 0.55), transparent 55%),
    var(--glass);
}
.bookdlg .toy-bookstage::after {
  content: ""; position: absolute; left: 50%; top: 56%; width: min(430px, 86%); height: 58%;
  transform: translate(-50%, -50%); z-index: 0; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--purple-400) 30%, transparent), transparent 72%);
}
.bookdlg .toy-bookstage__art, .bookdlg__draw, .bookdlg .toy-answer { position: relative; z-index: 1; }
.bookdlg .toy-bookstage__art { width: clamp(260px, 52vw, 400px); }
.bookdlg .toy-bookstage__art .toy-svg { filter: drop-shadow(0 18px 30px rgba(87, 20, 158, 0.45)); }

/* 翻页键：书正下方的大按钮 */
.bookdlg__draw {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 2.5rem; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 1.08rem; font-weight: 700; letter-spacing: 0.16em;
  color: #fff; background: var(--grad-main);
  box-shadow: 0 14px 30px -12px rgba(168, 85, 247, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.bookdlg__draw:hover { transform: translateY(-2px) scale(1.04); }
.bookdlg__draw:active { transform: scale(0.97); }
.bookdlg__draw svg { width: 15px; height: 15px; }
@media (prefers-reduced-motion: no-preference) {
  .bookdlg__draw { animation: bookDrawGlow 2.8s ease-in-out infinite; }
  @keyframes bookDrawGlow {
    0%, 100% { box-shadow: 0 14px 30px -12px rgba(168, 85, 247, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
    50% { box-shadow: 0 16px 38px -10px rgba(240, 171, 252, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.32); }
  }
}

.bookdlg .toy-answer {
  min-height: 2.3em; padding: 0.95rem 1.6rem; border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--purple-400) 42%, var(--stroke));
  background: linear-gradient(160deg, color-mix(in srgb, var(--bg-2) 78%, transparent), color-mix(in srgb, var(--bg-1) 88%, transparent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: clamp(1.3rem, 2.8vw, 1.62rem); line-height: 1.8;
}
.bookdlg .toy-answer::before {
  content: "✦"; position: absolute; top: -0.78em; left: 50%; transform: translateX(-50%);
  padding: 0 0.5rem; border-radius: 999px; background: var(--bg-1);
  color: var(--purple-300); font-size: 0.9rem; line-height: 1.5;
}

/* 屏幕矮（笔记本小窗 / 横屏手机）时把空白收一收：书和文字都不动，
   只压缩边距和间隙，保证整框一屏放下 */
@media (max-height: 800px) {
  #global-modal:has(.bookdlg) .modal__pad { padding: 1.1rem 1.4rem 0.75rem; }
  #global-modal:has(.bookdlg) .kitchen__lead { margin-bottom: 0.3rem; }
  .bookdlg .toy-bookstage { padding: 0.9rem 1.2rem 0.65rem; gap: 0.45rem; }
}

/* 答案之书：保持 SVG / HTML 结构，以书脊为轴进行 3D 翻页。 */
#fam-book-art { position: relative; perspective: 900px; perspective-origin: 50% 45%; }
#fam-book-art .toy-book { overflow: visible; }
#fam-book-art .toy-book__cover {
  transform-box: fill-box; transform-origin: 2% 50%; backface-visibility: hidden;
  transform: perspective(460px) rotateY(0deg);
  transition: transform .62s cubic-bezier(.22,.72,.24,1.08), opacity .18s ease .32s;
}
#fam-book-art.is-open .toy-book__cover { transform: perspective(460px) rotateY(-168deg); opacity: 0; }
#fam-book-art .toy-book__leaf {
  transform-box: fill-box; transform-origin: 0% 50%; backface-visibility: visible;
  transform: perspective(460px) rotateY(0deg); opacity: 0;
}
#fam-book-art.is-flip .toy-book__leaf { animation: famBookFlip .62s cubic-bezier(.24,.65,.28,1) both; }
#fam-book-art.is-flip .toy-book__spread { animation: famBookNudge .62s ease-out; }
/* 两个静态渐变只移动合成层和改变透明度，不逐帧绘制阴影或滤镜。 */
#fam-book-art::before, #fam-book-art::after { content: ""; position: absolute; pointer-events: none; opacity: 0; }
#fam-book-art::before {
  z-index: 2; left: 46%; top: 26%; width: 10%; height: 55%;
  background: linear-gradient(90deg, transparent, rgba(70,47,95,.27) 42%, transparent);
  transform-origin: 42% 50%;
}
#fam-book-art::after {
  z-index: 3; left: 50%; top: 27%; width: 38%; height: 53%;
  background: linear-gradient(105deg, transparent 12%, rgba(255,255,255,.72) 45%, transparent 70%);
  clip-path: polygon(0 4%, 94% 0, 100% 93%, 0 100%); transform-origin: left center;
}
#fam-book-art.is-flip::before { animation: famBookSpineShade .62s ease-in-out both; }
#fam-book-art.is-flip::after { animation: famBookPageLight .62s cubic-bezier(.24,.65,.28,1) both; }
@keyframes famBookFlip {
  0% { transform: perspective(460px) rotateY(0deg) rotateZ(0deg); opacity: 0; }
  8% { opacity: 1; }
  42% { transform: perspective(460px) translateZ(8px) rotateY(-78deg) rotateZ(-1deg); opacity: 1; }
  72% { transform: perspective(460px) translateZ(2px) rotateY(-171deg) rotateZ(.6deg); opacity: 1; }
  84% { transform: perspective(460px) rotateY(-183deg) rotateZ(-.3deg); opacity: .82; }
  95% { transform: perspective(460px) rotateY(-177deg) rotateZ(0deg); opacity: .3; }
  100% { transform: perspective(460px) rotateY(-180deg); opacity: 0; }
}
@keyframes famBookPageLight {
  0%, 100% { transform: perspective(460px) rotateY(0deg); opacity: 0; }
  18% { transform: perspective(460px) rotateY(-25deg) translateX(4%); opacity: .15; }
  42% { transform: perspective(460px) translateZ(8px) rotateY(-78deg) translateX(-8%); opacity: .8; }
  72% { transform: perspective(460px) rotateY(-171deg) translateX(-20%); opacity: .18; }
  84% { transform: perspective(460px) rotateY(-183deg); opacity: 0; }
}
@keyframes famBookSpineShade {
  0%, 100% { transform: scaleX(.6); opacity: 0; }
  42% { transform: scaleX(1.4); opacity: .9; }
  72% { transform: scaleX(.9); opacity: .4; }
}
@keyframes famBookNudge {
  0%, 100% { transform: translateY(0); }
  38% { transform: translateY(-2px); }
  82% { transform: translateY(.6px); }
}
/* 呼吸光仅改变透明度；按钮本体的投影保持静态。 */
.bookdlg__draw { isolation: isolate; animation: none; }
.bookdlg__draw::after {
  content: ""; position: absolute; inset: -6px; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(ellipse, rgba(167,139,250,.42), transparent 72%); opacity: .35;
}
@media (prefers-reduced-motion: no-preference) {
  .bookdlg__draw::after { animation: famBookButtonBreathe 2.8s ease-in-out infinite; }
}
@keyframes famBookButtonBreathe { 0%, 100% { opacity: .28; transform: scale(.96); } 50% { opacity: .72; transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) {
  #fam-book-art .toy-book__cover, #fam-book-art.is-open .toy-book__cover { transform: none; transition: opacity .15s ease; }
  #fam-book-art .toy-book__spread { transition: opacity .15s ease; }
  #fam-book-art.is-flip .toy-book__leaf, #fam-book-art.is-flip .toy-book__spread,
  #fam-book-art.is-flip::before, #fam-book-art.is-flip::after { animation: none; }
  #fam-book-art .toy-book__leaf, #fam-book-art::before, #fam-book-art::after { opacity: 0; }
  .bookdlg__draw::after { animation: none; }
}

.toy-gacha { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; align-items: start; margin-bottom: 0.2rem; }
.toy-gacha__stage { position: relative; }
.toy-gacha__stage .toy-svg { width: 100%; height: auto; }
.toy-capsule {
  position: absolute; left: 50%; top: 45%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.55), transparent 42%), var(--grad-main);
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.45);
}
.toy-capsule.is-drop { animation: capsuleDrop 0.72s cubic-bezier(0.5, 1.3, 0.6, 1) both; }
@keyframes capsuleDrop {
  0% { transform: translateY(-26px) scale(0.55); opacity: 0; }
  25% { opacity: 1; }
  70% { transform: translateY(36px) scale(1); }
  100% { transform: translateY(58px) scale(1); opacity: 1; }
}
.toy-result {
  display: flex; flex-direction: column; gap: 0.25rem; min-height: 86px; padding: 0.8rem 0.95rem;
  border-radius: var(--r-md); border: 1px dashed var(--stroke-strong); background: var(--glass);
}
.toy-result__rarity { font-size: 0.7rem; letter-spacing: 0.14em; color: var(--ink-faint); }
.toy-result__rarity--rare { color: var(--cyan); }
.toy-result__rarity--hidden { color: var(--gold); }
.toy-result__name { font-family: var(--font-display); font-size: 1.15rem; }
.toy-result__detail { color: var(--ink-dim); font-size: 0.84rem; }
.toy-result__hint { color: var(--ink-faint); font-size: 0.84rem; }
.toy-collection { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.7rem; max-height: 148px; overflow: auto; }
.toy-chip {
  padding: 0.18rem 0.55rem; border-radius: 999px; font-size: 0.72rem;
  border: 1px solid var(--stroke); color: var(--ink-faint); background: var(--glass);
}
.toy-chip.is-got { color: var(--ink); border-color: var(--stroke-strong); }
.toy-chip.is-got.toy-chip--rare { border-color: color-mix(in srgb, var(--cyan) 60%, var(--stroke)); }
.toy-chip.is-got.toy-chip--hidden { border-color: var(--gold); color: var(--gold); }
.toy-count { margin: 0.6rem 0 0; color: var(--ink-faint); font-size: 0.78rem; }

/* TOP 扭蛋机 · 内部功能：今天状态 / 忌口 / 结果卡补充（机器本体不动） */
.gacha-tools { display: grid; gap: 0.55rem; margin-bottom: 0.7rem; }
.gacha-tools__row { display: grid; gap: 0.3rem; }
.gacha-tools__label { font-size: 0.76rem; letter-spacing: 0.06em; color: var(--ink-faint); }
.gacha-tools__label small { margin-left: 0.4em; font-size: 0.7rem; }
.gacha-tools__chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.gacha-chip {
  padding: 0.22rem 0.6rem; border-radius: 999px; font-size: 0.74rem; cursor: pointer;
  border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-dim);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.gacha-chip:hover { border-color: var(--stroke-strong); color: var(--ink); }
.gacha-chip.is-on {
  color: var(--ink); border-color: var(--stroke-strong);
  background: color-mix(in srgb, var(--pink) 18%, transparent);
}
.gacha-tools__note { margin: 0; font-size: 0.74rem; color: var(--ink-faint); }
.toy-collection__empty { color: var(--ink-faint); font-size: 0.78rem; }
.toy-count__put {
  margin-left: 0.5rem; padding: 0.12rem 0.5rem; border-radius: 999px; font-size: 0.7rem; cursor: pointer;
  border: 1px solid var(--stroke); background: transparent; color: var(--ink-faint);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.toy-count__put:hover { border-color: var(--stroke-strong); color: var(--ink); }
.toy-result__keys { color: var(--ink-dim); font-size: 0.8rem; }
.toy-result__why { color: var(--ink-faint); font-size: 0.78rem; }
.toy-result__fortune { color: var(--gold); font-size: 0.76rem; letter-spacing: 0.03em; }

/* TOP 扭蛋机 3D：弹窗放大一点，舞台留给会转的机器 + 从出球口滚出来的扭蛋 */
#global-modal:has(.gachadlg) .modal__box { width: min(880px, 100%); }
.gachadlg .toy-gacha { grid-template-columns: clamp(240px, 32vw, 320px) 1fr; gap: 1.4rem; }
.gachadlg .toy-gacha__stage {
  height: clamp(320px, 48vh, 430px); display: flex; align-items: center; justify-content: center;
  padding: 0.6rem; border-radius: var(--r-md);
  background: radial-gradient(70% 60% at 50% 44%, color-mix(in srgb, var(--pink) 16%, transparent), transparent 72%);
}
.gachadlg .toy-gacha__stage .toy-svg { width: 100%; max-width: 260px; height: auto; }
.gacha3d { position: relative; }
.gacha3d canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.gacha3d.is-drag canvas { cursor: grabbing; }
.gacha3d__hint {
  position: absolute; left: 50%; bottom: 0.55rem; transform: translateX(-50%);
  padding: 0.22rem 0.8rem; border-radius: 999px;
  background: rgba(20, 6, 40, 0.55); color: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem; letter-spacing: 0.08em; white-space: nowrap;
  pointer-events: none; transition: opacity 0.6s ease;
}
.gacha3d__hint.is-out { opacity: 0; }

.toy-wish { display: grid; grid-template-columns: 170px 1fr; gap: 1rem; align-items: start; }
.toy-wish__bottle { display: grid; place-items: center; }
.toy-wish__bottle .toy-svg { width: 100%; max-width: 160px; height: auto; }
.toy-wish__side { min-width: 0; }
.toy-wish__count { margin: 0.8rem 0 0; color: var(--ink-faint); font-size: 0.78rem; }
.toy-wish__count b { color: var(--ink); font-family: var(--font-num); }
.toy-wish__list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.45rem; max-height: 210px; overflow: auto; }
/* 「随机拆一颗」就地翻开的那颗星：像把纸条从上往下展开，不带整块弹跳 / 位移 */
.toy-wish__draw { margin-top: 0.7rem; }
.toy-wish__draw.is-pop .toy-wish__list { transform-origin: 50% 0; animation: wishUnfold 0.6s var(--ease); }
@keyframes wishUnfold {
  0% { transform: scaleY(0.15); opacity: 0; }
  55% { transform: scaleY(1.06); opacity: 1; }
  100% { transform: scaleY(1); opacity: 1; }
}
.toy-wish__list--single { max-height: none; margin-top: 0; overflow: visible; } /* 单张纸条永远不出滚动条 */
.toy-wish__list--single .toy-wish__del { display: none; }
.toy-wish__item {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.6rem;
  border-radius: var(--r-md); border: 1px solid var(--stroke); background: var(--glass);
}
.toy-wish__who { display: inline-flex; align-items: center; gap: 0.3rem; flex: none; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; opacity: 0.85; }
.toy-wish__starico { width: 11px; height: 11px; flex: none; }
.toy-wish__text { flex: 1; min-width: 0; font-size: 0.86rem; word-break: break-word; }
.toy-wish__date {
  display: inline-block; margin-right: 0.42rem; padding: 0.05rem 0.4rem; border-radius: 999px;
  border: 1px solid currentColor; font-family: var(--font-num); font-size: 0.66rem; line-height: 1.55;
  letter-spacing: 0.04em; opacity: 0.72; vertical-align: 0.08em;
}
.toy-wish__body { word-break: break-word; }
.toy-wish__time { flex: none; color: var(--ink-faint); font-size: 0.68rem; font-family: var(--font-num); }
.toy-wish__del {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--stroke); background: transparent; color: var(--ink-faint); cursor: pointer;
}
.toy-wish__del:hover { color: var(--pink); border-color: var(--pink); }
.toy-wish__del svg { width: 13px; height: 13px; }
.toy-wish__empty { color: var(--ink-faint); font-size: 0.82rem; }
.toy-wish__sect { padding: 0.55rem 0.2rem 0.15rem; font-size: 0.72rem; letter-spacing: 0.12em; color: var(--ink-faint); }

/* 星星纸的颜色（整条纸条跟着变） */
.toy-wish__item--white { background: #f6f2fd; border-color: rgba(74, 58, 90, 0.18); color: #4a3a5a; }
.toy-wish__item--lilac { background: linear-gradient(160deg, #f0e6ff, #ddc9ff); border-color: rgba(70, 41, 110, 0.2); color: #46296e; }
.toy-wish__item--deep { background: linear-gradient(160deg, #7c3aed, #5b21b6); border-color: rgba(255, 255, 255, 0.2); color: #f6f1ff; }
.toy-wish__item--white .toy-wish__starico { color: #8b5cf6; }
.toy-wish__item--lilac .toy-wish__starico { color: #7c3aed; }
.toy-wish__item--deep .toy-wish__starico { color: #f0abfc; }
.toy-wish__item--white .toy-wish__time, .toy-wish__item--lilac .toy-wish__time { color: rgba(74, 58, 90, 0.55); }
.toy-wish__item--deep .toy-wish__time { color: rgba(246, 241, 255, 0.7); }
.toy-wish__item--white .toy-wish__del, .toy-wish__item--lilac .toy-wish__del { border-color: rgba(74, 58, 90, 0.3); color: rgba(74, 58, 90, 0.6); }
.toy-wish__item--white .toy-wish__del:hover, .toy-wish__item--lilac .toy-wish__del:hover { color: #a21caf; border-color: #a21caf; }
.toy-wish__item--deep .toy-wish__del { border-color: rgba(255, 255, 255, 0.35); color: rgba(255, 255, 255, 0.75); }
.toy-wish__item--deep .toy-wish__del:hover { color: #fff; border-color: #fff; }

/* 给星星的悄悄话：弹窗、瓶子和清单都放大 */
#global-modal:has(.wishdlg) .modal__box { width: min(880px, 100%); }
.wishdlg .toy-wish { grid-template-columns: clamp(230px, 30vw, 300px) 1fr; gap: 1.4rem; }
.wishdlg .toy-wish__bottle {
  padding: 0.6rem; border-radius: var(--r-md);
  background: radial-gradient(70% 60% at 50% 42%, color-mix(in srgb, var(--purple-500) 22%, transparent), transparent 72%);
}
.wishdlg .toy-wish__bottle .toy-svg { max-width: 270px; }
/* 「随机拆一颗」拆开的纸条：就贴在按钮下面，拆过的不重复，「叠好放回去」清空 */
.toy-wish__drawn {
  margin: 0.6rem 0 0; padding: 0.6rem 0.75rem 0.7rem; border-radius: var(--r-md);
  border: 1px dashed var(--stroke-strong); background: var(--glass);
}
.toy-wish__drawn-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  font-size: 0.76rem; letter-spacing: 0.04em; color: var(--ink-faint);
}
.toy-wish__drawn-head b { color: var(--ink); font-family: var(--font-num); }
/* 拆开的框：一次正好露四条，多出来的上下滑；每条压成一行，长了用省略号（悬停看全句） */
.toy-wish__list--drawn {
  --wish-row: 2.35rem;
  margin-top: 0.5rem;
  max-height: calc(var(--wish-row) * 4 + 0.45rem * 3);
  overflow: auto;
  grid-template-columns: minmax(0, 1fr); /* 列宽跟着框走，长句才截得掉 */
}
.toy-wish__list--drawn .toy-wish__item { height: var(--wish-row); padding-top: 0; padding-bottom: 0; }
/* 整条压成一行：日期在左、内容紧跟在后，长了从尾巴截（悬停看全句） */
.toy-wish__list--drawn .toy-wish__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toy-wish__list--drawn .toy-wish__body { display: inline; }
.toy-wish__list--drawn .toy-wish__del { display: none; }
.toy-wish__item.is-new { transform-origin: 50% 0; animation: wishUnfold 0.6s var(--ease); }

/* 「全部打开」：盖在许愿瓶弹窗上的独立小窗（自己一个框，不顶掉瓶子） */
.fam-wish-all {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 1.2rem;
  background: rgba(8, 0, 22, 0.6); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.22s ease;
}
.fam-wish-all.is-on { opacity: 1; }
.fam-wish-all__box {
  width: min(560px, 100%); max-height: min(82vh, 660px); min-height: 0;
  display: flex; flex-direction: column;
  padding: 1.35rem 1.45rem 1.15rem; border-radius: var(--r-lg);
  border: 1px solid var(--stroke-strong);
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  transform: translateY(12px) scale(0.98); transition: transform 0.24s var(--ease);
}
.fam-wish-all.is-on .fam-wish-all__box { transform: none; }
.fam-wish-all .toy-wish__list { max-height: min(56vh, 460px); }
/* 许愿瓶 3D：画布舞台 + 底部小提示（还没通电 / 没 WebGL 时这里放淡彩大图） */
.wish3d { position: relative; width: 100%; margin: 0 auto; height: clamp(300px, 46vh, 400px); overflow: hidden; border-radius: var(--r-md); }
.wish3d > .toy-svg { width: 100%; height: 100%; max-width: none; margin: 0 auto; display: block; }
.wish3d canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.wish3d.is-drag canvas { cursor: grabbing; }
.wish3d__hint {
  position: absolute; left: 50%; bottom: 0.55rem; transform: translateX(-50%);
  padding: 0.22rem 0.8rem; border-radius: 999px;
  background: rgba(20, 6, 40, 0.55); color: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem; letter-spacing: 0.08em; white-space: nowrap;
  pointer-events: none; transition: opacity 0.6s ease;
}
.wish3d__hint.is-out { opacity: 0; }

/* 3D 第一次现加载：先别把手绘图闪出来，给个「正在搬过来」的占位 */
.wish3d.is-loading > .toy-svg,
.gacha3d.is-loading > .toy-svg { opacity: 0; }
.wish3d.is-loading::after,
.gacha3d.is-loading::after {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--ink-faint); font-size: 0.84rem; letter-spacing: 0.14em;
  animation: softPulse 1.4s ease-in-out infinite;
}
.wish3d.is-loading::after { content: "星瓶正在搬过来…"; }
.gacha3d.is-loading::after { content: "机器正在搬过来…"; }
@keyframes softPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }


.toy-pola-wall {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.7rem, 1.8vw, 1.1rem);
  padding: 1.1rem 1rem 1rem; border-radius: var(--r-lg); border: 1px solid var(--stroke);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-2) 88%, #fff 3%), color-mix(in srgb, var(--bg-2) 94%, #000 3%));
}
.toy-pola { position: relative; aspect-ratio: 3 / 3.8; border: 0; padding: 0; background: none; cursor: pointer; transform: rotate(var(--tilt, 0deg)); perspective: 800px; }
.toy-pola__tape {
  position: absolute; top: -7px; left: 50%; width: 46px; height: 14px; margin-left: -23px; z-index: 2;
  background: color-mix(in srgb, var(--gold) 62%, transparent); transform: rotate(-4deg); border-radius: 2px;
}

/* 纯照片的拍立得卡：按照片比例撑开（底部 13% 留白边），六张比例接近才整齐 */
.toy-pola--bare {
  margin: 0; cursor: default;
  aspect-ratio: calc(var(--pola-ratio, 1.5) * 0.87);
  padding: 6px 6px 0; background: #fff; border-radius: 4px;
  box-shadow: 0 12px 26px -16px rgba(0, 0, 0, 0.6);
}
.toy-pola--bare img { display: block; width: 100%; height: auto; border-radius: 2px; background: var(--bg-0); }

/* 小登的衣柜：卡片上的简笔画 + 弹窗里挑鸟 / 挑饰品 */
.toy-closet__body { fill: color-mix(in srgb, var(--purple-500) 15%, var(--bg-2)); stroke: var(--toy-line); stroke-width: 3; stroke-linejoin: round; }
.toy-closet__roofline, .toy-closet__door { fill: none; stroke: var(--toy-line); stroke-width: 2.6; stroke-linecap: round; }
.toy-closet__feet { fill: none; stroke: var(--toy-line); stroke-width: 3.2; stroke-linecap: round; }
.toy-closet__panel { fill: color-mix(in srgb, var(--bg-2) 86%, #fff 5%); stroke: color-mix(in srgb, var(--toy-line) 72%, transparent); stroke-width: 1.8; }
.toy-closet__knob { fill: var(--pink); }
.toy-closet__star { fill: var(--gold); }
.toy-closet__heart { fill: var(--pink); }
.toy-closet__bird ellipse { fill: color-mix(in srgb, var(--purple-400) 68%, #fff 12%); }
.toy-closet__birdink { fill: var(--bg-0); }
.toy-closet__beak { fill: var(--gold); }
.toy-closet__bow { fill: var(--pink); }

/* 福来进化史：圆滚滚的笑脸 Q 版小蝴蝶（简笔画） */
.toy-evolve__wing { fill: color-mix(in srgb, var(--purple-400) 42%, var(--bg-2)); stroke: var(--toy-line); stroke-width: 2.6; stroke-linejoin: round; }
.toy-evolve__wing--low { fill: color-mix(in srgb, var(--purple-500) 36%, var(--bg-2)); }
.toy-evolve__spot { fill: var(--pink); opacity: 0.85; }
.toy-evolve__spot--gold { fill: var(--gold); opacity: 0.9; }
.toy-evolve__body { fill: color-mix(in srgb, var(--bg-2) 58%, #fff 34%); stroke: var(--toy-line); stroke-width: 2.6; }
.toy-evolve__wire { fill: none; stroke: var(--toy-line); stroke-width: 2; stroke-linecap: round; }
.toy-evolve__antdot { fill: var(--gold); }
.toy-evolve__eye { fill: #241540; }
.toy-evolve__eye-shine { fill: #fff; }
.toy-evolve__smile { fill: none; stroke: #241540; stroke-width: 1.9; stroke-linecap: round; }
.toy-evolve__cheek { fill: var(--pink); opacity: 0.72; }
.toy-evolve__spark { fill: none; stroke: color-mix(in srgb, var(--toy-line) 62%, transparent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.toy-evolve__dot { fill: color-mix(in srgb, var(--toy-line) 72%, transparent); }
/* 弹窗里的 3D 舞台：第一版 / 第二版并排两个，放着慢慢左右摆，拖动只在正面左右各 80°、
   双击回正面；没 WebGL / 加载失败时露出里面的简笔画小蝴蝶 */
#global-modal:has(.evolvedlg) .modal__box { width: min(920px, 100%); }
/* 右侧预留给翻页小三角的走道：模型框/阶段卡都往里收，三角落在框外 */
.evolvedlg { --evolve-gap: clamp(0.6rem, 1.6vw, 1rem); --evolve-nav-gap: clamp(64px, 8vw, 84px); }
.evolve3d__pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--evolve-gap); margin: 0.4rem 0 0.8rem; padding-right: var(--evolve-nav-gap); }
.evolvedlg .evi-grid { padding-right: var(--evolve-nav-gap); }
.evolve3d__cell { position: relative; min-width: 0; }
.evolvedlg .evolve3d {
  position: relative; height: clamp(260px, 38vh, 350px);
  border-radius: var(--r-lg); border: 1px solid var(--stroke); overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(70% 60% at 50% 44%, color-mix(in srgb, var(--pink) 16%, transparent), transparent 72%);
}
.evolvedlg .evolve3d > .toy-svg { width: min(170px, 68%); height: auto; }
.evolve3d__tag {
  position: absolute; left: 0.6rem; top: 0.55rem; z-index: 2;
  padding: 0.16rem 0.62rem; border-radius: 999px; pointer-events: none;
  font-size: 0.68rem; letter-spacing: 0.14em; line-height: 1.6;
  color: var(--ink-dim); border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--bg-0) 55%, transparent);
}
@media (max-width: 720px) {
  .evolvedlg { --evolve-nav-gap: 52px; }
  .evolve3d__pair { grid-template-columns: 1fr; }
  .evolvedlg .evolve3d { height: clamp(220px, 32vh, 300px); }
  /* 窄屏两版蝴蝶改成上下排，问号框也跟着占满、和单格同高 */
  .evolvedlg__mystery { width: calc(100% - var(--evolve-nav-gap)); height: clamp(220px, 32vh, 300px); }
}
.evolve3d canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.evolve3d.is-drag canvas { cursor: grabbing; }
.evolve3d__hint {
  position: absolute; left: 50%; bottom: 0.55rem; transform: translateX(-50%);
  padding: 0.22rem 0.8rem; border-radius: 999px;
  background: rgba(20, 6, 40, 0.55); color: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem; letter-spacing: 0.08em; white-space: nowrap;
  pointer-events: none; transition: opacity 0.6s ease;
}
.evolve3d__hint.is-out { opacity: 0; }
.evolve3d.is-loading > .toy-svg { opacity: 0; }
.evolve3d.is-loading::after {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--ink-faint); font-size: 0.84rem; letter-spacing: 0.14em;
  animation: softPulse 1.4s ease-in-out infinite;
  content: "蝴蝶正在飞过来…";
}

/* 进化史弹窗的两面滑板：一面是两版 3D 蝴蝶 + 前两步，另一面是问号（向左滑翻过去）；
   右边的小三角点一下也能翻面，翻到头反过来指 */
.evolvedlg__stage { position: relative; }
.evolvedlg__slider { overflow: hidden; margin: 0.55rem 0 0.2rem; touch-action: pan-y; user-select: none; }
.evolvedlg__track { display: flex; width: 200%; transition: transform 0.42s var(--ease); }
.evolvedlg__track.is-drag { transition: none; }
.evolvedlg__page { flex: 0 0 50%; width: 50%; min-width: 0; }
.evolvedlg__nav {
  position: absolute; top: 50%; right: 0.45rem; z-index: 3;
  width: 38px; height: 38px; padding: 0; border-radius: 50%;
  transform: translateY(-50%);
  display: grid; place-items: center; cursor: pointer;
  color: rgba(255, 255, 255, 0.85); border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(24, 8, 46, 0.62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}
.evolvedlg__nav:hover { color: #fff; background: rgba(24, 8, 46, 0.85); transform: translateY(-50%) scale(1.08); }
.evolvedlg__nav:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.evolvedlg__nav-tri {
  width: 0; height: 0;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
  transition: transform 0.3s var(--ease);
}
.evolvedlg__nav.is-back .evolvedlg__nav-tri { transform: rotate(180deg); }
.evolvedlg__mystery {
  position: relative; overflow: hidden;
  /* 问号框和前面两版 3D 蝴蝶的单格一样大：宽度扣掉格间距和右侧走道再对半；靠左摆，
     正好落在下面那张介绍它的阶段卡正上方 */
  width: calc((100% - var(--evolve-nav-gap) - var(--evolve-gap)) / 2);
  height: clamp(260px, 38vh, 350px);
  margin-right: auto;
  border-radius: var(--r-lg); border: 1px dashed var(--stroke-strong);
  display: grid; place-items: center;
  background:
    radial-gradient(70% 60% at 50% 44%, color-mix(in srgb, var(--pink) 15%, transparent), transparent 74%),
    radial-gradient(90% 70% at 50% 110%, color-mix(in srgb, var(--purple-500) 18%, transparent), transparent 72%);
}
.evolvedlg__q {
  font-family: var(--font-num); font-weight: 800; line-height: 1;
  font-size: clamp(4.6rem, 13vw, 7.2rem);
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 14px 34px rgba(240, 171, 252, 0.28));
  animation: evolvedlgQ 3.4s ease-in-out infinite;
}
@keyframes evolvedlgQ { 0%, 100% { transform: translateY(-5%); } 50% { transform: translateY(3%); } }
@media (prefers-reduced-motion: reduce) { .evolvedlg__q { animation: none; } }

#global-modal:has(.closetdlg) .modal__box { width: min(920px, 100%); }
/* 左边实时 3D 预览 + 右边挑鸟 / 挑饰品 */
.closet__layout { display: grid; grid-template-columns: minmax(250px, 360px) minmax(0, 1fr); gap: 0.95rem; align-items: start; margin-top: 1rem; }
.closet__stage {
  position: relative; height: min(52vh, 430px); min-height: 280px; border-radius: var(--r-lg);
  border: 1px solid var(--stroke); overflow: hidden; cursor: grab; touch-action: none;
  background:
    radial-gradient(120% 95% at 50% 0%, color-mix(in srgb, var(--purple-600) 26%, transparent), transparent 68%),
    radial-gradient(95% 80% at 50% 108%, color-mix(in srgb, var(--pink) 16%, transparent), transparent 70%),
    color-mix(in srgb, var(--bg-1) 92%, #000 6%);
}
.closet__stage.is-drag { cursor: grabbing; }
.closet__stage canvas { display: block; width: 100%; height: 100%; }
.closet__stage-tip { position: absolute; left: 0; right: 0; bottom: 0.55rem; margin: 0; text-align: center; color: var(--ink-faint); font-size: 0.72rem; pointer-events: none; }
.closet__stage-note { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: 1rem 1.2rem; text-align: center; color: var(--ink-faint); font-size: 0.84rem; line-height: 1.8; }
.closet__side { min-width: 0; }
.closet__side .closet__birds { margin-top: 0; }
.closet__birds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; margin: 1rem 0 0; }
.closet__bird {
  display: grid; justify-items: center; gap: 0.3rem; padding: 0.6rem 0.35rem 0.65rem; text-align: center;
  font: inherit; color: var(--ink); cursor: pointer; border-radius: var(--r-md);
  border: 1px solid var(--stroke); background: var(--glass);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.closet__bird:hover { transform: translateY(-3px); border-color: var(--stroke-strong); }
.closet__bird.is-active { border-color: var(--pink); background: linear-gradient(160deg, rgba(244, 114, 182, 0.14), rgba(109, 40, 217, 0.14)); box-shadow: var(--shadow-glow); }
.closet__bird-art { display: block; width: 44px; height: 44px; }
.closet__bird-art svg { display: block; width: 100%; height: auto; }
.closet__bird-meta { display: grid; gap: 0.08rem; }
.closet__bird-meta b { font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.04em; }
.closet__bird-meta small { color: var(--ink-faint); font-size: 0.7rem; }
.closet__now { margin: 0.75rem 0 0; color: var(--ink-dim); font-size: 0.86rem; }
.closet__now b { color: var(--ink); font-weight: 600; }
/* 头饰 / 背饰 / 服装三个柜子的分页 */
.closet__cats { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.closet__cat {
  padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid var(--stroke);
  background: var(--glass); color: var(--ink-dim); cursor: pointer; font: inherit; font-size: 0.78rem;
  transition: color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.closet__cat:hover { border-color: var(--stroke-strong); color: var(--ink); }
.closet__cat.is-active { color: #fff; background: var(--grad-main); border-color: transparent; box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35); }
.closet__cat small { margin-left: 0.28rem; opacity: 0.8; font-size: 0.68rem; }
.closet__grid .closet__empty { grid-column: 1 / -1; margin: 0; }
/* 饰品格子：auto-fill 自己排（侧栏宽了就 3 列），单格更小、一件一行也放得下 */
.closet__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(148px, 100%), 1fr)); gap: 0.35rem; margin-top: 0.6rem; }
.closet__item {
  position: relative; display: flex; align-items: flex-start; gap: 0.35rem; padding: 0.36rem 0.42rem;
  text-align: left; font: inherit; color: var(--ink); cursor: pointer; border-radius: var(--r-sm);
  border: 1px solid var(--stroke); background: var(--glass);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.closet__item:hover { transform: translateY(-2px); border-color: var(--stroke-strong); }
.closet__item.is-on { border-color: var(--pink); background: linear-gradient(160deg, rgba(244, 114, 182, 0.12), rgba(109, 40, 217, 0.12)); }
.closet__item.is-locked { opacity: 0.45; cursor: not-allowed; }
.closet__item.is-locked:hover { transform: none; border-color: var(--stroke); }
/* 还没买的饰品：虚框 + 金币价牌，点一下买下 */
.closet__item.is-shop { border-style: dashed; }
.closet__item.is-shop:hover { border-color: var(--gold); }
.closet__item.is-shop .closet__item-meta { padding-right: 3rem; }
.closet__item-price {
  position: absolute; top: 0.3rem; right: 0.32rem; white-space: nowrap;
  padding: 0.02rem 0.34rem; border-radius: 999px; font-size: 0.6rem; color: #9a6b16;
  border: 1px solid color-mix(in srgb, #e8b25c 55%, var(--stroke));
  background: color-mix(in srgb, #f7cf4a 20%, transparent);
}
.closet__coins { margin: 0.35rem 0 0; font-size: 0.88rem; color: var(--ink-dim); }
.closet__coins b { font-family: var(--font-num); color: var(--ink); }
.closet__coins-note { color: var(--ink-faint); font-size: 0.76rem; margin-left: 0.45rem; }
.closet__item-ico { flex: none; width: 18px; height: 18px; margin-top: 0.08rem; color: var(--closet-c, var(--pink)); }
.closet__item-ico svg { display: block; width: 100%; height: auto; }
.closet__item-meta { display: grid; gap: 0.06rem; min-width: 0; padding-right: 0.7rem; }
.closet__item-meta b { font-family: var(--font-display); font-size: 0.76rem; letter-spacing: 0.04em; }
.closet__item-meta small { color: var(--ink-faint); font-size: 0.6rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.closet__item-lock { color: var(--gold); }
.closet__item-check { position: absolute; top: 0.3rem; right: 0.32rem; width: 12px; height: 12px; color: var(--pink); opacity: 0; transform: scale(0.6); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.closet__item-check svg { display: block; width: 100%; height: auto; }
.closet__item.is-on .closet__item-check { opacity: 1; transform: scale(1); }
/* 柜子页码：‹ 1 2 3 4 › */
.closet__pages { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.7rem; }
.closet__page {
  min-width: 30px; height: 30px; padding: 0 0.5rem; border-radius: 9px;
  border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-dim);
  font-family: var(--font-num); font-size: 0.86rem; line-height: 1; cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.closet__page:hover:not(:disabled) { color: var(--ink); border-color: var(--stroke-strong); }
.closet__page.is-on { background: var(--grad-main); color: #fff; border-color: transparent; }
.closet__page:disabled { opacity: 0.35; cursor: default; }
.closet__page-gap { color: var(--ink-faint); font-family: var(--font-num); padding: 0 0.1rem; }
.closet__empty { margin: 0.75rem 0 0; padding: 0.9rem 1rem; border-radius: var(--r-md); border: 1px dashed var(--stroke-strong); color: var(--ink-faint); font-size: 0.84rem; line-height: 1.8; text-align: center; }

@media (max-width: 860px) {
  .toy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toy-gacha, .toy-wish { grid-template-columns: 1fr; }
  .gachadlg .toy-gacha { grid-template-columns: 1fr; }
  .wishdlg .toy-wish { grid-template-columns: 1fr; }
  .toy-wish__bottle .toy-svg { max-width: 132px; }
  .toy-pola-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .closet__layout { grid-template-columns: 1fr; }
  .closet__stage { height: min(42vh, 330px); min-height: 240px; }
  .closet__grid { grid-template-columns: repeat(auto-fill, minmax(min(136px, 100%), 1fr)); }
  .closet__birds { gap: 0.35rem; }
  .closet__bird { padding: 0.5rem 0.2rem 0.55rem; }
  .closet__bird-art { width: 34px; height: 34px; }
  .closet__bird-meta b { font-size: 0.74rem; }
}
/* 超窄屏（折叠屏外屏一类）：小玩意两列太挤，改一列 */
@media (max-width: 340px) {
  .toy-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .toy, .toy__art .toy-svg, #fam-book-art .toy-book__cover, .toy-book__spread { transition: none; }
  .toy-capsule.is-drop, #fam-book-art .toy-book__leaf, #fam-book-art .toy-book__spread { animation: none; }
  .closet__bird, .closet__item, .closet__item-check, .closet__cat { transition: none; }
  .lvl__pop { animation: none; }
}

/* ---------- 15.x 福来小屋：日历 / 等级 / 三维小鸟 ---------- */
#bird-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 46; pointer-events: none; } /* 46：浮在吸顶 tab 栏（45）上面，不会被它盖住；仍在顶栏 / 弹窗下面 */

/* 陪陪我：五个小鸟之间连成五角星的紫色线条（birds3d.js 画，画在三维小鸟下面） */
.star-line { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 45; pointer-events: none; overflow: visible; }
.star-line polyline {
  fill: none; stroke: var(--purple-400); stroke-width: 2.5;
  stroke-linejoin: round; stroke-linecap: round; opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.75));
}

/* 福来小屋整页只出紫色蝴蝶：图鉴里的蝴蝶也统一成紫的（其它页面照旧按图鉴配色） */
main[data-bfly="purple"] .dex__b { color: var(--purple-300); }

/* 福来日历 */
.cal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cal__title { margin: 0.55rem 0 0; font-size: 1.35rem; }
.cal__nav { display: flex; align-items: center; gap: 0.55rem; }
.cal__ym { font-family: var(--font-num); font-size: 0.98rem; letter-spacing: 0.04em; }
.cal__week, .cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.cal__week { margin: 1.1rem 0 0.45rem; }
.cal__week span { text-align: center; font-size: 0.72rem; letter-spacing: 0.18em; color: var(--ink-faint); }
.cal__d {
  position: relative; height: clamp(2.3rem, 4.6vw, 3.1rem); border-radius: 12px; border: 1px solid transparent;
  display: grid; place-items: center; font-family: var(--font-num); font-size: 0.86rem;
  color: var(--ink-dim); background: var(--glass);
}
.cal__d i { font-style: normal; }
.cal__d.is-empty { background: transparent; }
.cal__d.is-future { opacity: 0.38; }
.cal__d.is-today { border-color: var(--stroke-strong); }
.cal__d.is-today i { color: var(--ink); font-weight: 700; }
.cal__d.is-on { background: linear-gradient(160deg, rgba(196, 181, 253, 0.24), rgba(240, 171, 252, 0.14)); border-color: var(--stroke); color: var(--ink); }
.cal__d.is-on .cal__b { position: absolute; left: 18%; top: 14%; width: 64%; height: auto; color: var(--purple-300); opacity: 0.85; }
.cal__d.is-on i { position: absolute; right: 0.3rem; bottom: 0.1rem; font-size: 0.64rem; color: var(--ink-dim); }
.cal__foot { margin: 1.1rem 0 0; color: var(--ink-dim); font-size: 0.86rem; }
.cal__foot b { color: var(--ink); font-family: var(--font-num); }

/* 福来等级 */
.lvl__title { margin: 0.55rem 0 0.2rem; font-size: 1.35rem; }
.lvl__name { font-family: var(--font-display); font-size: 1.6rem; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 0.7rem; }
.lvl__bar-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; margin: 0 0 0.45rem; font-size: 0.8rem; color: var(--ink-faint); }
.lvl__bar-meta b { font-family: var(--font-num); font-size: 0.98rem; color: var(--ink); }
.lvl__bar { height: 10px; border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--stroke); overflow: hidden; }
.lvl__bar span { display: block; height: 100%; border-radius: inherit; background: var(--grad-main); transition: width 0.6s var(--ease); }
.lvl__hint { color: var(--ink-dim); font-size: 0.86rem; margin: 0.6rem 0 0.9rem; }
.lvl__hint b { color: var(--ink); font-family: var(--font-num); }
.lvl__steps { display: grid; grid-template-columns: 1fr; gap: 0.4rem; }
.lvl__step { border: 1px solid var(--stroke); border-radius: var(--r-sm); padding: 0.5rem 0.7rem; font-size: 0.78rem; color: var(--ink-faint); display: flex; align-items: center; gap: 0.6rem; }
.lvl__step b { font-family: var(--font-num); color: inherit; flex: none; }
.lvl__step i { font-style: normal; font-family: var(--font-num); font-size: 0.7rem; opacity: 0.7; margin-left: auto; }
.lvl__step.is-on { color: var(--ink); border-color: var(--stroke-strong); background: var(--glass); }

/* 等级表收进卡片右上角的「?」按钮：点击弹出小浮窗，点别处 / Esc 收起 */
#level-box { position: relative; }
.lvl__help {
  position: absolute; top: 0.95rem; right: 0.95rem; z-index: 2;
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid rgba(252, 211, 77, 0.36); background: rgba(252, 211, 77, 0.1);
  color: var(--gold); font-family: var(--font-num); font-size: 1rem; font-weight: 700;
  line-height: 1; cursor: pointer; transition: all 0.3s var(--ease);
}
.lvl__help i { font-style: normal; transform: translateY(-1px); }
.lvl__help:hover { border-color: var(--gold); transform: translateY(-2px) rotate(-6deg); }
.lvl__help.is-on { background: rgba(252, 211, 77, 0.24); border-color: var(--gold); }
.lvl__pop {
  position: absolute; z-index: 55; top: calc(100% + 0.55rem); right: 0; width: min(19rem, 100%);
  padding: 0.95rem 1rem 1.05rem; border: 1px solid var(--stroke-strong); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--bg-0) 94%, transparent);
  backdrop-filter: blur(16px); box-shadow: var(--shadow);
  transform-origin: top right; animation: lvlPop 0.22s var(--ease);
}
.lvl__pop[hidden] { display: none; }
.lvl__pop-title { margin: 0 0 0.7rem; font-size: 0.78rem; letter-spacing: 0.14em; color: var(--ink-faint); }
@keyframes lvlPop { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }

@media (max-width: 520px) {
  .cal__week, .cal__grid { gap: 0.25rem; }
  .cal__d { border-radius: 9px; font-size: 0.78rem; }
  .cal__d.is-on i { right: 0.2rem; bottom: 0.05rem; font-size: 0.58rem; }
}

/* =========================================================
   17. 福来日记（support.html 福来小屋）
   一本属于福来自己的追星纪念册：手账卡片 / 时间线 / 相册 /
   现场票根 / 收藏柜 / 纪念日 / 时间胶囊 / 年度报告
   ========================================================= */

.fd-h2 { font-family: var(--font-display); font-size: clamp(1.15rem, 2.4vw, 1.4rem); margin: 0 0 0.9rem; }
.fd-h3 { font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 0.5rem; }
.fd-sub { margin: -0.2rem 0 0.9rem; font-size: 0.84rem; color: var(--ink-dim); }

/* —— 陪伴卡 —— */
.fd-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; flex-wrap: wrap;
  padding: clamp(1.3rem, 3vw, 2rem) clamp(1.3rem, 3vw, 2.2rem);
  background:
    radial-gradient(120% 160% at 8% 0%, rgba(240, 171, 252, 0.16), transparent 55%),
    var(--glass);
}
.fd-hero__days { font-family: var(--font-display); font-size: clamp(1.35rem, 3.4vw, 1.9rem); line-height: 1.35; }
.fd-hero__days b { font-family: var(--font-num); font-size: 1.5em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fd-hero__date { margin-top: 0.35rem; font-family: var(--font-num); font-size: 0.86rem; color: var(--ink-faint); letter-spacing: 0.14em; }
.fd-hero__line { margin-top: 0.2rem; color: var(--ink-dim); font-size: 0.9rem; }
.fd-hero__side { display: grid; gap: 0.7rem; justify-items: end; }
.fd-hero__stats { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.8rem; color: var(--ink-dim); }
.fd-hero__stats b { color: var(--ink); font-family: var(--font-num); margin-right: 0.15rem; }

/* —— 今天：快捷记录 —— */
.fd-quick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.55rem; margin-bottom: 2rem; }
.fd-quick__item {
  display: grid; gap: 0.1rem; justify-items: center; text-align: center;
  padding: 0.8rem 0.4rem; border: 1px solid var(--stroke); border-radius: var(--r-md);
  background: var(--glass); color: var(--ink); cursor: pointer; font-family: inherit;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.fd-quick__item:hover { transform: translateY(-3px); border-color: var(--stroke-strong); box-shadow: var(--shadow-glow); }
.fd-quick__item i { font-style: normal; font-size: 1.3rem; }
.fd-quick__item b { font-size: 0.86rem; }
.fd-quick__item small { font-size: 0.68rem; color: var(--ink-faint); }

/* —— 卡片列表 —— */
.fd-list { display: grid; gap: 0.9rem; }
.fd-card {
  position: relative; display: grid; gap: 0.5rem; width: 100%; text-align: left; font-family: inherit; color: var(--ink);
  border: 1px solid var(--stroke); border-radius: var(--r-md); padding: 0.95rem 1.05rem;
  background: var(--glass); cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.fd-card:hover { transform: translateY(-2px); border-color: var(--stroke-strong); }
.fd-card__head { display: flex; align-items: center; justify-content: space-between; }
.fd-card__date { font-family: var(--font-num); font-size: 0.78rem; color: var(--ink-faint); letter-spacing: 0.08em; }
.fd-card__mood { font-size: 1.1rem; filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--mc, #a78bfa) 60%, transparent)); }
.fd-card__title { display: flex; align-items: center; gap: 0.4rem; font-size: 0.98rem; font-weight: 600; flex-wrap: wrap; }
.fd-card__ico { flex: none; }
.fd-card__text { margin: 0; font-size: 0.88rem; color: var(--ink-dim); line-height: 1.75; white-space: pre-wrap; }
.fd-card__photos { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.fd-card__photos img { width: clamp(64px, 22%, 108px); aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--stroke); }
.fd-card__more { align-self: end; font-size: 0.72rem; color: var(--ink-faint); }
.fd-card__letterkind { font-size: 0.78rem; color: var(--pink); }
.fd-card__tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.fd-tag { font-size: 0.72rem; color: var(--purple-300); background: color-mix(in srgb, var(--purple-500) 16%, transparent); border-radius: var(--r-pill); padding: 0.1rem 0.55rem; }
.fd-card__foot { display: flex; justify-content: space-between; align-items: center; font-size: 0.74rem; color: var(--ink-faint); border-top: 1px dashed var(--stroke); padding-top: 0.45rem; }
.fd-card__go { color: var(--purple-300); }
.fd-card__foot-end { display: inline-flex; align-items: center; gap: 0.5rem; }
/* 「上板」：把这条日记一键贴到留言板 */
.fd-card__board {
  padding: 0.16rem 0.55rem; border-radius: var(--r-pill);
  border: 1px solid var(--stroke); background: var(--glass);
  color: var(--purple-300); font: inherit; font-size: 0.72rem; cursor: pointer;
  transition: 0.2s var(--ease);
}
.fd-card__board:hover { border-color: var(--purple-400); color: var(--ink); }
.fd-card__board:disabled { opacity: 0.55; cursor: default; }
.fd-card__board.is-done { border-color: color-mix(in srgb, var(--purple-400) 55%, var(--stroke)); color: var(--purple-400); }

/* —— 日记纸：八张纸，卡片和详情共用同一张 ——
   每张纸改写局部变量，正文 / 日期 / 虚线跟着纸张调色；
   除星空纸外都是纸本浅色，深浅主题下都按纸的颜色显示。 */
.fd-card--tpl-paper, .fd-card--tpl-lined, .fd-card--tpl-grid, .fd-card--tpl-dots,
.fd-card--tpl-pink, .fd-card--tpl-letter, .fd-card--tpl-kraft { --purple-300: #6f5cb8; --pink: #b23a9b; }
:is(.fd-card, .fd-detail)[class*="fd-card--tpl-"] {
  --paper-edge: rgba(88,65,45,.1);
  isolation: isolate; border-radius: 4px 7px 5px 6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.48), inset 0 -3px 2px rgba(79,53,33,.08), 0 8px 20px rgba(38,12,74,.16);
  clip-path: polygon(0 .5%, 9% .2%, 18% .6%, 29% 0, 41% .4%, 54% .1%, 67% .5%, 81% .1%, 92% .6%, 99.5% .3%, 99.8% 15%, 99.5% 31%, 100% 49%, 99.6% 68%, 99.9% 83%, 99.4% 99.6%, 89% 99.8%, 76% 99.3%, 62% 100%, 48% 99.5%, 33% 99.9%, 20% 99.4%, 8% 100%, .5% 99.5%, .1% 83%, .4% 65%, 0 49%, .5% 32%, .2% 16%);
}
:is(.fd-card, .fd-detail)[class*="fd-card--tpl-"]::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background-image:
    linear-gradient(135deg, transparent 44%, rgba(91,66,45,.13) 49%, rgba(255,255,255,.54) 51%, transparent 68%),
    radial-gradient(ellipse at center, transparent 50%, var(--paper-edge) 100%),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27160%27%20height%3D%27160%27%20viewBox%3D%270%200%20160%20160%27%3E%3Cfilter%20id%3D%27fiber%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%27.72%20.19%27%20numOctaves%3D%272%27%20seed%3D%2717%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20type%3D%27saturate%27%20values%3D%270%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url%28%23fiber%29%27%20opacity%3D%27.22%27%2F%3E%3C%2Fsvg%3E");
  background-size: 28px 28px, 100% 100%, 160px 160px;
  background-position: right bottom, center, left top; background-repeat: no-repeat, no-repeat, repeat;
  opacity: .7;
}
:is(.fd-card, .fd-detail)[class*="fd-card--tpl-"]:focus-visible { outline: 3px solid #8b5cf6; outline-offset: -4px; }
.fd-card--tpl-star { --paper-edge: rgba(0,0,0,.23); }
@media (max-width: 600px) {
  :is(.fd-card, .fd-detail)[class*="fd-card--tpl-"]::after { background-size: 22px 22px, 100% 100%, 160px 160px; }
}

/* 素白纸 */
.fd-card--tpl-paper {
  --ink: #3f3a55; --ink-dim: #5f5a78; --ink-faint: #716b83;
  --stroke: rgba(63, 58, 85, 0.16); --stroke-strong: rgba(63, 58, 85, 0.3);
  background: linear-gradient(160deg, #fffdf9, #f4eee5);
}
/* 横线纸：每个本子上都有的横线 + 左边那道红边线，纸边三个装订孔 */
.fd-card--tpl-lined {
  --ink: #333c5c; --ink-dim: #58627f; --ink-faint: #656d84;
  --stroke: rgba(51, 60, 92, 0.16); --stroke-strong: rgba(51, 60, 92, 0.3);
  background-color: #fdfbf3;
  background-image:
    linear-gradient(90deg, transparent 0 2.5rem, rgba(226, 118, 130, 0.5) 2.5rem 2.56rem, transparent 2.56rem),
    repeating-linear-gradient(180deg, transparent 0 1.6rem, rgba(116, 145, 196, 0.38) 1.6rem 1.66rem);
  padding-left: 3.1rem;
}
.fd-card--tpl-lined::before {
  content: ""; position: absolute; left: 0.75rem; top: 0; bottom: 0; width: 0.8rem; pointer-events: none;
  background-image: radial-gradient(circle at 50% 20%, rgba(70,55,100,.22) 0 2.5px, transparent 3px),
    radial-gradient(circle at 50% 50%, rgba(70,55,100,.22) 0 2.5px, transparent 3px),
    radial-gradient(circle at 50% 80%, rgba(70,55,100,.22) 0 2.5px, transparent 3px);
}
/* 方格纸 */
.fd-card--tpl-grid {
  --ink: #3a4a55; --ink-dim: #5c6b76; --ink-faint: #626f79;
  --stroke: rgba(58, 74, 85, 0.16); --stroke-strong: rgba(58, 74, 85, 0.3);
  background-color: #fbfaf4;
  background-image:
    linear-gradient(rgba(122, 152, 178, 0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 152, 178, 0.26) 1px, transparent 1px);
  background-size: 1.32rem 1.32rem;
}
/* 点阵纸 */
.fd-card--tpl-dots {
  --ink: #403a58; --ink-dim: #615b79; --ink-faint: #736b86;
  --stroke: rgba(64, 58, 88, 0.16); --stroke-strong: rgba(64, 58, 88, 0.3);
  background-color: #fdfbf6;
  background-image: radial-gradient(rgba(118, 108, 158, 0.4) 1px, transparent 1.35px);
  background-size: 1.05rem 1.05rem;
}
/* 樱粉纸 */
.fd-card--tpl-pink {
  --ink: #5c3550; --ink-dim: #7c5372; --ink-faint: #8a607b;
  --stroke: rgba(92, 53, 80, 0.16); --stroke-strong: rgba(92, 53, 80, 0.3);
  background:
    radial-gradient(120% 150% at 100% 0%, rgba(251, 207, 232, 0.6), transparent 58%),
    linear-gradient(165deg, #fffafc, #ffe9f4);
}
/* 信笺纸 */
.fd-card--tpl-letter {
  --ink: #4a3a20; --ink-dim: #6b5a3a; --ink-faint: #796647;
  --stroke: rgba(90, 70, 30, 0.2); --stroke-strong: rgba(90, 70, 30, 0.36);
  background-color: #fdf6e9;
  background-image:
    linear-gradient(90deg, transparent 0 2.5rem, rgba(190, 120, 90, 0.42) 2.5rem 2.56rem, transparent 2.56rem),
    repeating-linear-gradient(180deg, transparent 0 1.8rem, rgba(120, 90, 40, 0.16) 1.8rem 1.86rem);
  padding-left: 3.1rem;
}
/* 牛皮纸 */
.fd-card--tpl-kraft {
  --ink: #43301c; --ink-dim: #63503a; --ink-faint: #69583f;
  --stroke: rgba(67, 48, 28, 0.22); --stroke-strong: rgba(67, 48, 28, 0.38);
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(25deg, rgba(67, 48, 28, 0.035) 0 1px, transparent 1px 7px),
    linear-gradient(160deg, #e6cfab, #d2b489);
}
.fd-card--tpl-letter .fd-card__text, .fd-card--tpl-letter .fd-detail__text,
.fd-card--tpl-kraft .fd-card__text, .fd-card--tpl-kraft .fd-detail__text { font-family: var(--font-display); }
/* 星空纸（深色，字保持浅色） */
.fd-card--tpl-star {
  --ink: #f1ebff; --ink-dim: #cbc0f2; --ink-faint: #9c90d4;
  --stroke: rgba(196, 181, 253, 0.28); --stroke-strong: rgba(196, 181, 253, 0.5);
  background:
    radial-gradient(1.6px 1.6px at 18% 22%, rgba(255, 255, 255, 0.85), transparent 60%),
    radial-gradient(1.4px 1.4px at 74% 14%, rgba(255, 255, 255, 0.65), transparent 60%),
    radial-gradient(1.4px 1.4px at 86% 68%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1.2px 1.2px at 34% 78%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1.6px 1.6px at 58% 46%, rgba(255, 255, 255, 0.5), transparent 60%),
    linear-gradient(160deg, #3a1d6e, #170a33);
}
/* —— 日记纸小样：编辑器里选纸的那排小方块 —— */
.fd-chip--tpl { display: inline-flex; align-items: center; gap: 0.4rem; }
.fd-tpl-swatch {
  width: 18px; height: 18px; flex: none; border-radius: 6px;
  border: 1px solid var(--stroke-strong); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.fd-tpl-swatch--paper { background: linear-gradient(160deg, #fffdf9, #f2ebe0); }
.fd-tpl-swatch--lined {
  background-color: #fdfbf3;
  background-image:
    linear-gradient(90deg, transparent 0 4px, rgba(226, 118, 130, 0.6) 4px 5px, transparent 5px),
    repeating-linear-gradient(180deg, transparent 0 3px, rgba(116, 145, 196, 0.5) 3px 4px);
}
.fd-tpl-swatch--grid {
  background-color: #fbfaf4;
  background-image:
    linear-gradient(rgba(122, 152, 178, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 152, 178, 0.45) 1px, transparent 1px);
  background-size: 5px 5px;
}
.fd-tpl-swatch--dots {
  background-color: #fdfbf6;
  background-image: radial-gradient(rgba(118, 108, 158, 0.6) 1px, transparent 1.2px);
  background-size: 5px 5px;
}
.fd-tpl-swatch--pink { background: linear-gradient(160deg, #fffafc, #ffd7ec); }
.fd-tpl-swatch--letter {
  background-color: #fdf6e9;
  background-image: repeating-linear-gradient(180deg, transparent 0 3px, rgba(120, 90, 40, 0.32) 3px 4px);
}
.fd-tpl-swatch--kraft { background: linear-gradient(160deg, #e3c99f, #c9a56f); }
.fd-tpl-swatch--star {
  background:
    radial-gradient(1px 1px at 30% 30%, #fff, transparent 60%),
    radial-gradient(1px 1px at 70% 65%, rgba(255, 255, 255, 0.8), transparent 60%),
    linear-gradient(160deg, #3a1d6e, #170a33);
}

/* —— 详情弹窗 —— */
.fd-detail { min-width: 0; }
.fd-detail__head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.fd-detail__date { font-family: var(--font-num); font-size: 0.82rem; color: var(--ink-faint); }
.fd-detail__mood { font-size: 0.82rem; }
.fd-detail__text { margin-top: 0.9rem; font-size: 0.94rem; line-height: 1.9; white-space: pre-wrap; }
.fd-detail__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(96px, 100%), 1fr)); gap: 0.5rem; margin-top: 1rem; }
.fd-detail__photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--stroke); cursor: zoom-in; }
.fd-detail__rows { margin-top: 1rem; border-top: 1px dashed var(--stroke); }
.fd-detail__row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px dashed var(--stroke); font-size: 0.84rem; color: var(--ink-dim); }
.fd-detail__row b { color: var(--ink); font-weight: 600; text-align: right; }
.fd-detail__btns { display: flex; gap: 0.55rem; flex-wrap: wrap; margin-top: 1.1rem; }

/* —— 编辑器 —— */
.fd-editor { min-width: 0; }
.fd-editor__head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.fd-editor__title { margin: 0.6rem 0 0.8rem; font-family: var(--font-display); font-size: 1.25rem; }
.fd-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fd-chip {
  border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-dim); font-family: inherit;
  border-radius: var(--r-pill); padding: 0.34rem 0.75rem; font-size: 0.8rem; cursor: pointer;
  transition: all 0.25s var(--ease);
}
.fd-chip:hover { color: var(--ink); border-color: var(--stroke-strong); }
.fd-chip.is-on { background: var(--grad-main); color: #fff; border-color: transparent; }
.fd-typebar { margin-bottom: 1rem; }
.fd-field { margin-top: 1rem; }
.fd-field > label { display: block; font-size: 0.78rem; letter-spacing: 0.14em; color: var(--ink-faint); margin-bottom: 0.4rem; }
.fd-field textarea { min-height: 130px; }
.fd-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 0.5rem; }
.fd-two label { display: block; font-size: 0.74rem; color: var(--ink-faint); margin-bottom: 0.25rem; }
.fd-moods { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.fd-mood {
  display: grid; justify-items: center; gap: 0.05rem; width: 68px; padding: 0.45rem 0.2rem;
  border: 1px solid var(--stroke); border-radius: var(--r-md); background: var(--glass);
  color: var(--ink-dim); cursor: pointer; font-family: inherit; transition: all 0.25s var(--ease);
}
.fd-mood i { font-style: normal; font-size: 1.25rem; }
.fd-mood small { font-size: 0.62rem; }
.fd-mood:hover { transform: translateY(-2px); color: var(--ink); }
.fd-mood.is-on { border-color: var(--mc, var(--purple-300)); background: color-mix(in srgb, var(--mc, #a78bfa) 18%, transparent); color: var(--ink); }
.fd-file { padding: 0.6rem 0.8rem; }
.fd-photo-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.fd-photo-strip__item { position: relative; }
.fd-photo-strip__item img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; border: 1px solid var(--stroke); }
.fd-photo-strip__item button {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: var(--coral, #fb7185); color: #fff; cursor: pointer; line-height: 1;
}
.fd-editor__foot { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.3rem; }
.fd-editor__hint { font-size: 0.74rem; color: var(--ink-faint); }

/* —— 搜索 —— */
.fd-search { margin-top: 0.7rem; }

/* —— 时间线 —— */
.fd-tl { position: relative; display: grid; gap: 1rem; padding-left: 1.3rem; }
.fd-tl::before { content: ""; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--purple-400), rgba(167, 139, 250, 0.12)); border-radius: 2px; }
.fd-tl__item { position: relative; display: flex; gap: 0.7rem; cursor: pointer; }
.fd-tl__badge {
  position: absolute; left: -1.3rem; top: 0; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.78rem;
  background: var(--bg-1); border: 1px solid var(--stroke-strong);
}
.fd-tl__body { padding-left: 1.1rem; display: grid; gap: 0.1rem; }
.fd-tl__date { font-family: var(--font-num); font-size: 0.74rem; color: var(--ink-faint); }
.fd-tl__body b { font-size: 0.92rem; }
.fd-tl__body small { font-size: 0.74rem; color: var(--purple-300); }
.fd-tl__item.is-today .fd-tl__badge { background: var(--grad-main); border-color: transparent; }
.fd-tl__item.is-today .fd-tl__body b { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* —— 相册 —— */
.fd-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(118px, 100%), 1fr)); gap: 0.6rem; }
.fd-album__item { position: relative; border: 0; padding: 0; background: transparent; cursor: zoom-in; border-radius: 12px; overflow: hidden; }
.fd-album__item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform 0.35s var(--ease); }
.fd-album__item:hover img { transform: scale(1.05); }
.fd-album__item span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 0.66rem; color: #fff; background: linear-gradient(transparent, rgba(10, 2, 24, 0.75)); padding: 0.8rem 0.5rem 0.35rem; text-align: left; }
.fd-lightbox { display: grid; gap: 0.8rem; justify-items: center; max-height: 82vh; }
.fd-lightbox img { max-width: min(86vw, 640px); max-height: 68vh; border-radius: var(--r-md); }
.fd-lightbox__foot { display: flex; gap: 0.5rem; }

/* —— 现场：票根 —— */
.fd-live { display: grid; gap: 0.9rem; }
.fd-ticket {
  position: relative; border: 1px dashed color-mix(in srgb, var(--purple-300) 55%, transparent); border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(240, 171, 252, 0.14), rgba(96, 165, 250, 0.1)), var(--glass);
  padding: 1rem 1.1rem; cursor: pointer; transition: transform 0.3s var(--ease), border-color 0.3s;
}
.fd-ticket:hover { transform: translateY(-2px); border-color: var(--purple-300); }
.fd-ticket__head { display: flex; justify-content: space-between; gap: 0.8rem; font-weight: 600; font-size: 0.94rem; flex-wrap: wrap; }
.fd-ticket__head b { font-family: var(--font-num); font-size: 0.8rem; color: var(--ink-faint); font-weight: 400; }
.fd-ticket__meta { margin-top: 0.3rem; font-size: 0.78rem; color: var(--ink-dim); }
.fd-ticket p { margin: 0.55rem 0 0; font-size: 0.86rem; color: var(--ink-dim); font-style: italic; }
.fd-ticket__rate { margin-top: 0.5rem; font-size: 0.82rem; }

/* —— 收藏柜 —— */
.fd-cabinet { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: 0.8rem; }
.fd-collect {
  border: 1px solid var(--stroke); border-radius: var(--r-md); background: var(--glass);
  padding: 0.7rem; display: grid; gap: 0.2rem; cursor: pointer; transition: transform 0.3s var(--ease), border-color 0.3s;
}
.fd-collect:hover { transform: translateY(-3px); border-color: var(--stroke-strong); }
.fd-collect img, .fd-collect__ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--stroke); }
.fd-collect__ph { display: grid; place-items: center; font-size: 2rem; background: color-mix(in srgb, var(--purple-500) 12%, transparent); }
.fd-collect b { font-size: 0.88rem; margin-top: 0.25rem; }
.fd-collect small { font-size: 0.72rem; color: var(--ink-faint); }
.fd-collect i { font-style: normal; font-size: 0.74rem; color: var(--purple-300); }

/* —— 纪念日 —— */
.fd-anniv__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.fd-anniv { display: grid; gap: 0.55rem; }
.fd-anniv__item { display: flex; align-items: center; gap: 0.7rem; border: 1px solid var(--stroke); border-radius: var(--r-md); background: var(--glass); padding: 0.65rem 0.85rem; position: relative; }
.fd-anniv__ico { font-size: 1.15rem; }
.fd-anniv__body { min-width: 0; display: grid; gap: 0.05rem; }
.fd-anniv__body b { font-size: 0.9rem; }
.fd-anniv__body small { font-size: 0.72rem; color: var(--ink-faint); }
.fd-anniv__cd { margin-left: auto; text-align: center; }
.fd-anniv__cd b { display: block; font-family: var(--font-num); font-size: 1.15rem; color: var(--purple-300); line-height: 1.1; }
.fd-anniv__cd small { font-size: 0.66rem; color: var(--ink-faint); }
.fd-anniv__del { border: 0; background: transparent; color: var(--ink-faint); font-size: 1rem; cursor: pointer; padding: 0.2rem 0.4rem; }
.fd-anniv__del:hover { color: var(--coral, #fb7185); }

/* —— 时间胶囊 —— */
.fd-capsules { display: grid; gap: 0.6rem; }
.fd-capsule {
  display: flex; align-items: center; gap: 0.8rem; border: 1px solid var(--stroke); border-radius: var(--r-md);
  background: var(--glass); padding: 0.75rem 0.9rem; cursor: pointer; transition: border-color 0.3s, transform 0.3s var(--ease);
}
.fd-capsule:hover { transform: translateY(-2px); border-color: var(--stroke-strong); }
.fd-capsule.is-open { border-color: color-mix(in srgb, var(--purple-300) 55%, transparent); }
.fd-capsule__ico { font-size: 1.2rem; }
.fd-capsule__body { display: grid; gap: 0.05rem; min-width: 0; }
.fd-capsule__body b { font-size: 0.9rem; }
.fd-capsule__body small { font-size: 0.72rem; color: var(--ink-faint); }
.fd-capsule__go { margin-left: auto; font-size: 0.76rem; color: var(--purple-300); }
.fd-capsule-open__date { font-size: 0.78rem; color: var(--ink-faint); margin: 0.2rem 0 0; }

/* —— 关于TA —— */
.fd-about__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.fd-about__name { margin: 0.8rem 0 0.9rem; font-family: var(--font-display); font-size: clamp(1.2rem, 2.6vw, 1.5rem); }
.fd-about__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; }
.fd-about__grid div { border: 1px solid var(--stroke); border-radius: var(--r-sm); padding: 0.6rem 0.7rem; background: color-mix(in srgb, var(--purple-500) 8%, transparent); }
.fd-about__grid b { display: block; font-family: var(--font-num); font-size: 1.05rem; }
.fd-about__grid small { font-size: 0.68rem; color: var(--ink-faint); }

/* —— 年度报告 —— */
.fd-report {
  background:
    radial-gradient(120% 160% at 90% 0%, rgba(96, 165, 250, 0.18), transparent 55%),
    radial-gradient(120% 160% at 0% 100%, rgba(240, 171, 252, 0.16), transparent 55%),
    var(--glass);
}
.fd-report__title { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 0.9rem; }
.fd-report__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.fd-report__grid div { border: 1px solid var(--stroke); border-radius: var(--r-sm); padding: 0.55rem 0.7rem; background: color-mix(in srgb, #fff 5%, transparent); }
.fd-report__grid b { display: block; font-family: var(--font-num); font-size: 1.1rem; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fd-report__grid small { font-size: 0.66rem; color: var(--ink-faint); }
.fd-report__highlights { margin: 0.9rem 0; display: grid; gap: 0.3rem; font-size: 0.84rem; color: var(--ink-dim); }
.fd-report__highlights p { margin: 0; }
.fd-report__line { font-size: 0.86rem; color: var(--ink-dim); margin: 0 0 0.9rem; }

.fd-data__btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* —— 日记内部导航（今天 / 日记 / 回忆 / 我的 + ＋记录） —— */
.fd-nav { margin-bottom: 1.3rem; }
.fd-chip--primary { background: var(--grad-main); color: #fff; border-color: transparent; font-weight: 600; }
.fd-chip--primary:hover { color: #fff; }

/* —— 响应式 —— */
@media (max-width: 900px) {
  .fd-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fd-about__grid, .fd-report__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fd-hero__side { justify-items: start; }
}
@media (max-width: 520px) {
  .fd-mood { width: 60px; }
  .fd-about__grid div, .fd-report__grid div { padding: 0.5rem 0.55rem; }
}
@media (prefers-reduced-motion: reduce) {
  .fd-quick__item, .fd-card, .fd-collect, .fd-capsule, .fd-ticket, .bookcard__cover { transition: none; }
}

/* ---------- 16. 响应式 ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__stage { max-width: 340px; order: -1; }
  .checkin { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .checkin__stats, .mood-row { justify-content: center; }
}

/* 940px 以下横向导航塞不下（会挤成竖排字），一律收进汉堡菜单；
   实测放得下完整导航的最小宽度是 ~940px（导航 617 + 品牌 + 工具 = 853） */
@media (max-width: 940px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute; inset: 100% 0 auto; max-height: calc(100dvh - var(--topbar-h, 70px)); overflow-y: auto; overscroll-behavior: contain; flex-direction: column; align-items: stretch;
    background: color-mix(in srgb, var(--bg-1) 96%, transparent);
    border-bottom: 1px solid var(--stroke); padding: 0.8rem 1.2rem 1.4rem; gap: 0.2rem;
    visibility: hidden; pointer-events: none; transform: translateY(-1rem); transition: transform 0.25s var(--ease);
    box-shadow: 0 20px 40px rgba(8, 0, 22, 0.45); backdrop-filter: blur(18px);
  }
  .nav.is-open { visibility: visible; pointer-events: auto; transform: none; }
  .nav a { padding: 0.85rem 1rem; }
  .nav a::after { display: none; }
}
@media (max-width: 760px) {
  .mcard { height: 460px; }
  .wall { columns: 2 220px; }
}

@media (max-width: 480px) {
  .wall { columns: 1; }
  .mcard { height: 480px; }
  .brand__sub { display: none; }
  .orbit__item { --r: 112px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .bfly-layer { display: none; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .topbar, .bfly-layer, .to-top, .footer, .scroll-progress { display: none !important; }
  body { background: #fff; color: #000; }
  body::before, body::after { display: none; }
}

/* ---------- 16. 五人小农场 ----------
   一本可以点的农场绘本：场景、五个人、动物、作物都是 page-farm.js 现场画的 SVG，
   这里只负责颜色、动作（蹲下 / 浇水 / 欢呼）、特效和弹窗。 */
.farm-section { padding-bottom: 1.5rem; }
.farm-hero { text-align: center; margin-bottom: 0.6rem; }
.farm-hero .house__title { margin-bottom: 0.2rem; }
.farm-sub { margin: 0; color: var(--ink-faint); font-size: 0.88rem; }
.farm-today {
  margin: 0.55rem auto 0.2rem; display: inline-block;
  font-family: var(--font-display); font-size: clamp(0.95rem, 2.4vw, 1.08rem); color: var(--ink-dim);
  padding: 0.35rem 1rem; border-radius: 999px; border: 1px dashed var(--stroke-strong);
  background: color-mix(in srgb, var(--pink) 10%, transparent);
}
.farm-views { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.9rem 0 0.8rem; justify-content: center; }
.farm-views button {
  font: inherit; font-size: 0.86rem; cursor: pointer; padding: 0.45rem 1rem; border-radius: 999px;
  border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-dim);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}
.farm-views button:hover { border-color: var(--stroke-strong); color: var(--ink); transform: translateY(-1px); }
.farm-views button.is-on { color: var(--ink); border-color: var(--stroke-strong); background: color-mix(in srgb, var(--pink) 16%, transparent); box-shadow: var(--shadow-glow); }

.farm-stage { position: relative; }
.farm-wrap { position: relative; }
/* 嵌进「小登现在干什么 → 去种菜」时的样子：整体居中，提示行和篮子靠左 */
.farm-host { text-align: center; }
.farm-host .farm-hint { text-align: left; }
.farm-host .farm-pantry { justify-content: center; }
.farm-svg {
  display: block; width: 100%; height: auto; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--stroke); background: #d9ecff; box-shadow: var(--shadow);
}
/* —— 3D 菜园：canvas 在底层，手绘的天空 / 小鸟 / 特效叠在上面 —— */
.farm-wrap--3d .farm-stage3d {
  position: relative; width: 100%; aspect-ratio: 1000 / 660; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--stroke); box-shadow: var(--shadow);
  background: #dcefff;   /* 和 Blender 场景的世界底色一致 */
}
.farm-3dhost { position: absolute; inset: 0; }
.farm-3dhost canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.farm-svg--overlay {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; box-shadow: none;
  background: none; border-radius: 0; pointer-events: none;
}
.farm-svg--overlay .farm-plot { pointer-events: auto; }
.farm-plot--veil .plot__hit { fill: rgba(255, 255, 255, 0); stroke: transparent; stroke-linejoin: round; }
.farm-plot--veil:hover .plot__hit { stroke: color-mix(in srgb, var(--pink) 62%, transparent); stroke-width: 2.5; }
.farm-plot--veil:focus-visible { outline: none; }
.farm-plot--veil:focus-visible .plot__hit { stroke: var(--pink); stroke-width: 3; }
.farm-plot--veil.is-ready .plot__hit { stroke: rgba(232, 178, 92, 0.7); stroke-width: 2.5; stroke-dasharray: 10 8; }
/* 「放大查看」时右上角的收回按钮（只在 3D 菜园里出现） */
.farm-zoomout {
  position: absolute; right: 0.6rem; top: 0.6rem; z-index: 4;
  display: inline-flex; align-items: center; gap: 0.3rem;
  border-radius: 999px; border: 1px solid var(--stroke-strong);
  background: var(--glass); color: var(--ink);
  font-family: inherit; font-size: 0.78rem; padding: 0.34rem 0.8rem; cursor: pointer;
  backdrop-filter: blur(6px); box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.farm-zoomout:hover { transform: translateY(-1px); border-color: var(--pink); }
.farm-zoomout[hidden] { display: none; }
.farm-hint { margin: 0 0 0.65rem; color: var(--ink-faint); font-size: 0.8rem; }
.farm-pantry { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem; color: var(--ink-dim); font-size: 0.84rem; }
.farm-pantry__label { letter-spacing: 0.04em; }
.farm-pantry__chip {
  display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.22rem 0.6rem;
  border-radius: 999px; border: 1px solid var(--stroke); background: var(--glass); font-size: 0.86rem;
}
.farm-pantry__chip b { font-family: var(--font-num); font-size: 0.78rem; color: var(--ink); }
.farm-pantry__empty { color: var(--ink-faint); font-size: 0.8rem; }
.farm-pantry__coins {
  display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.22rem 0.6rem;
  border-radius: 999px; border: 1px solid color-mix(in srgb, #e8b25c 55%, var(--stroke));
  background: color-mix(in srgb, #f7cf4a 16%, transparent); font-size: 0.84rem;
}
.farm-pantry__coins b { font-family: var(--font-num); font-size: 0.82rem; color: var(--ink); }
.farm-pantry__bag {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.24rem 0.7rem;
  border-radius: 999px; border: 1px solid var(--stroke-strong); background: var(--glass);
  font: inherit; font-size: 0.84rem; color: var(--ink); cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.farm-pantry__bag:hover { transform: translateY(-1px); border-color: var(--pink); box-shadow: var(--shadow-glow); }
.farm-pantry__bag b { font-family: var(--font-num); font-size: 0.78rem; color: var(--ink-dim); }

/* —— 场景里的小东西 —— */
.farm-sun__core { fill: #ffdf7e; }
.farm-sun__rays { stroke: #ffcf5a; stroke-width: 5; stroke-linecap: round; fill: none; transform-box: fill-box; transform-origin: 50% 50%; animation: farmSpin 64s linear infinite; }
.farm-cloud ellipse { fill: rgba(255, 255, 255, 0.92); }
.farm-cloud--a { animation: farmDrift 42s ease-in-out infinite alternate; }
.farm-cloud--b { animation: farmDrift 55s ease-in-out infinite alternate-reverse; }
.farm-cloud--c { animation: farmDrift 48s ease-in-out infinite alternate; }
.ff__rail, .ff__post { fill: #e0c39a; stroke: #b98a5c; stroke-width: 1.5; }

/* —— 五只小鸟（菜园里的干活小队；沿用 .fp 前缀，姿势类不变） —— */
.fp, .fp * { pointer-events: none; transform-box: fill-box; }
.fp { transition: transform 0.95s cubic-bezier(0.32, 1.22, 0.45, 1); }
.fp__shadow { fill: rgba(90, 60, 40, 0.16); }
.fp__leg { fill: none; stroke: #e8a63a; stroke-width: 3; stroke-linecap: round; }
.fp__foot { fill: none; stroke: #e8a63a; stroke-width: 3; stroke-linecap: round; }
.fp__wing { fill: color-mix(in srgb, var(--c, #f0abfc) 74%, #fff 26%); stroke: rgba(60, 40, 70, 0.2); stroke-width: 1.4; }
.fp__shirt { fill: var(--c, #f0abfc); stroke: rgba(60, 40, 70, 0.2); stroke-width: 1.4; }
.fp__belly { fill: #f7f5fd; }
.fp__beak { fill: #f0b23f; }
.fp__eye { fill: #191322; }
.fp__eye-shine { fill: #fff; }
.fp__blush { fill: #f7a8b8; opacity: 0.75; }
.fp__body, .fp__head, .fp__arm { transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.5, 1); }
.fp.is-squat .fp__body { transform: translateY(20px) scaleY(0.9); transform-origin: 50% 100%; }
.fp.is-squat .fp__head { transform: translateY(34px); }
.fp.is-squat .fp__arm--l { transform: rotate(24deg); transform-origin: 50% 6%; }
.fp.is-squat .fp__arm--r { transform: rotate(-24deg); transform-origin: 50% 6%; }
.fp.is-cheer .fp__arm--l { transform: rotate(145deg); transform-origin: 50% 6%; }
.fp.is-cheer .fp__arm--r { transform: rotate(-145deg); transform-origin: 50% 6%; }
.fp.is-look .fp__head { transform: rotate(-9deg); transform-origin: 50% 85%; }
.fp.is-water .fp__arm--r { transform: rotate(-68deg); transform-origin: 50% 6%; }
.fp.is-feed .fp__arm--r { transform: rotate(42deg); transform-origin: 50% 6%; }
.fp.is-pet .fp__arm--r { transform: rotate(-12deg); transform-origin: 50% 6%; }
.fp.is-run .fp__body { animation: farmBob 0.34s ease-in-out infinite alternate; }
.fp.is-run .fp__head { animation: farmBob 0.34s ease-in-out infinite alternate; }
.fp__prop { display: none; }
.fp.has-can .fp__prop--can, .fp.has-basket .fp__prop--basket,
.fp.has-camera .fp__prop--camera, .fp.has-shovel .fp__prop--shovel { display: block; }
.fp__prop--can rect { fill: #93cfc6; stroke: #6aa9a0; stroke-width: 1.5; }
.fp__prop--can path { fill: none; stroke: #6aa9a0; stroke-width: 3; stroke-linecap: round; }
.fp__prop--basket path { fill: #dcae6a; stroke: #b9834a; stroke-width: 1.6; stroke-linejoin: round; }
.fp__prop--camera rect { fill: #4a4458; }
.fp__prop--camera circle { fill: #8fd0e8; stroke: #2f2a3c; stroke-width: 1.5; }
.fp__prop--shovel rect { fill: #b9834a; }
.fp__prop--shovel path { fill: #b9c0c9; stroke: #8b939e; stroke-width: 1.2; }

/* —— 土地 & 作物 —— */
.farm-plot { cursor: pointer; }
.plot__soil { fill: #c99b63; stroke: #a87c48; stroke-width: 2; transition: filter 0.3s var(--ease); }
.plot__rows { fill: none; stroke: rgba(120, 80, 40, 0.32); stroke-width: 3; stroke-dasharray: 12 9; stroke-linecap: round; }
.plot__plus { fill: rgba(110, 80, 50, 0.5); font-size: 32px; font-weight: 700; }
.farm-plot:hover .plot__soil { filter: brightness(1.05); translate: 0 -3px; }
.farm-plot:focus-visible { outline: none; }
.farm-plot:focus-visible .plot__soil { stroke: var(--pink); stroke-width: 3; }
.plot__ready { display: none; }
.plot__ready text { font-size: 21px; }
.farm-plot.is-ready .plot__ready { display: block; animation: farmReady 1.6s ease-in-out infinite; }
.farm-plot.is-ready .plot__soil { stroke: #e8b25c; }
.crop__stem, .crop__hill { fill: none; stroke: #4f9a3d; stroke-width: 3.4; stroke-linecap: round; }
.crop__leaf { fill: #6fbf5f; stroke: rgba(60, 110, 50, 0.35); stroke-width: 1; }
.crop__seed { fill: #b98a56; stroke: #966b3e; stroke-width: 1.2; }
.crop__mound { fill: #b98a56; opacity: 0.9; }
.crop__fruit { fill: #e8b25c; }
.crop--strawberry .crop__fruit { fill: #e0443a; }
.crop--strawberry .crop__dot { fill: #ffe9b8; }
.crop--corn .crop__fruit { fill: #f2c94c; stroke: #d9a83a; stroke-width: 1.4; }
.crop--carrot .crop__fruit { fill: #ef8b3a; }
.crop--tomato .crop__fruit { fill: #e04b3a; }
.crop__petal { fill: #f7cf4a; }
.crop__core { fill: #8a5a35; }
.crop--cabbage .crop__fruit { fill: #cfe9a6; }
.crop--eggplant .crop__fruit { fill: #7b4fa0; }
.crop--pumpkin .crop__fruit { fill: #e8872e; }
.crop__rib { fill: none; stroke: #c96a1f; stroke-width: 2.4; stroke-linecap: round; opacity: 0.75; }
.crop__stalk { fill: none; stroke: #7a5230; stroke-width: 4; stroke-linecap: round; }

/* —— 台词气泡 & 小特效 —— */
.farm-says { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.farm-say {
  position: absolute; transform: translate(-50%, -100%);
  max-width: min(320px, 76%); padding: 0.42rem 0.85rem; border-radius: 14px;
  background: #fffaf0; color: #5a4636; font-size: 0.82rem; line-height: 1.55;
  border: 2px solid #ecd6b8; box-shadow: 0 8px 20px rgba(90, 60, 30, 0.18);
  transition: opacity 0.4s var(--ease); animation: farmSayIn 0.35s var(--ease);
}
.farm-say::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 11px; height: 11px;
  background: #fffaf0; border-right: 2px solid #ecd6b8; border-bottom: 2px solid #ecd6b8;
  transform: translateX(-50%) rotate(45deg);
}
.farm-say.is-out { opacity: 0; }
.farm-fx__item { opacity: 0; animation: farmFly 1.15s ease-out forwards; }
.farm-fx__item--dirt, .farm-fx__item.fx-dirt { fill: #8a5f36; }

/* —— 小农场弹窗 —— */
#global-modal:has(.farmdlg) .modal__box { width: min(720px, 100%); }
.farm-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.4rem; }
.farm-pick {
  position: relative; display: grid; justify-items: center; gap: 0.2rem; padding: 0.9rem 0.5rem 0.8rem;
  border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--glass); cursor: pointer;
  font: inherit; color: var(--ink);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.farm-pick:hover { transform: translateY(-3px); border-color: var(--stroke-strong); box-shadow: var(--shadow-glow); }
.farm-pick__emoji { font-size: 2rem; line-height: 1.2; }
.farm-pick b { font-size: 0.92rem; }
.farm-pick i {
  position: absolute; top: 0.45rem; right: 0.55rem; font-style: normal; font-size: 0.6rem;
  padding: 0.06rem 0.42rem; border-radius: 999px; background: var(--grad-main); color: #fff; letter-spacing: 0.06em;
}
.farm-pick small { color: var(--ink-faint); font-size: 0.7rem; line-height: 1.5; }
.farm-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.4rem 0 0.2rem; }
.farm-act {
  flex: 1 1 120px; display: grid; justify-items: center; gap: 0.25rem; padding: 0.85rem 0.6rem;
  border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--glass); cursor: pointer;
  font: inherit; color: var(--ink);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.farm-act span { font-size: 1.5rem; line-height: 1.2; }
.farm-act b { font-size: 0.86rem; font-weight: 600; }
.farm-act:hover { transform: translateY(-3px); border-color: var(--stroke-strong); box-shadow: var(--shadow-glow); }
.farm-act.is-off { opacity: 0.5; }

/* —— 背包（卖菜换金币） —— */
.farmbag__coins {
  margin: 0.2rem 0 0.1rem; font-size: 0.95rem; color: var(--ink-dim);
  padding: 0.4rem 0.8rem; border-radius: var(--r-md); display: inline-block;
  border: 1px solid color-mix(in srgb, #e8b25c 55%, var(--stroke));
  background: color-mix(in srgb, #f7cf4a 14%, transparent);
}
.farmbag__coins b { font-family: var(--font-num); font-size: 1.05rem; color: var(--ink); }
.farmbag__list { display: grid; gap: 0.55rem; margin-top: 0.6rem; }
.farmbag__row {
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
  padding: 0.6rem 0.8rem; border-radius: var(--r-lg);
  border: 1px solid var(--stroke); background: var(--glass);
}
.farmbag__emoji { font-size: 1.7rem; line-height: 1; }
.farmbag__name { display: grid; flex: 1 1 8rem; min-width: 0; }
.farmbag__name b { font-size: 0.92rem; }
.farmbag__name small { color: var(--ink-faint); font-size: 0.74rem; }
.farmbag__count { font-family: var(--font-num); color: var(--ink-dim); font-size: 0.9rem; }
.farmbag__btns { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }

/* —— 农场日记 —— */
.farmdiary__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.farmdiary__lead { margin: 0; color: var(--ink-dim); font-size: 0.92rem; }
.farmdiary__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 0.7rem; margin-top: 0.8rem; }
.farmdiary__item {
  display: grid; gap: 0.5rem; align-content: start; padding: 0.75rem;
  border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--glass);
}
.farmdiary__icon { font-size: 1.9rem; line-height: 1.2; }
.farmdiary__text { margin: 0; font-size: 0.9rem; line-height: 1.7; }
.farmdiary__time { color: var(--ink-faint); font-size: 0.74rem; }
.farm-photo { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--stroke); background: #fff; }
.farm-photo svg { display: block; width: 100%; height: auto; }
.farm-photo__bg { fill: #ffe9f3; }
.farm-photo__sun { fill: #ffe08a; }
.farm-photo__grass { fill: #cfe8a9; }
.farm-photo__stamp { font-size: 16px; }
.farm-photo p { margin: 0; padding: 0.45rem 0.6rem 0.55rem; font-size: 0.82rem; color: #6a5a6e; }

/* —— 手机底栏入口 —— */
.farm-quick { display: none; }
@media (max-width: 720px) {
  .farm-section { padding-bottom: 5rem; }
  .farm-quick {
    display: flex; position: fixed; left: 0.9rem; right: 0.9rem; bottom: 0.9rem; z-index: 40;
    gap: 0.4rem; padding: 0.45rem; border-radius: 999px;
    background: color-mix(in srgb, var(--bg-1) 90%, transparent);
    border: 1px solid var(--stroke-strong); box-shadow: var(--shadow);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .farm-quick button {
    flex: 1; font: inherit; font-size: 0.84rem; padding: 0.55rem 0.2rem; border-radius: 999px;
    border: 0; background: transparent; color: var(--ink-dim); cursor: pointer;
  }
  .farm-quick button.is-on { background: var(--grad-main); color: #fff; }
  .farm-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* —— 动效 —— */
@keyframes farmSpin { to { transform: rotate(360deg); } }
@keyframes farmDrift { from { transform: translateX(-22px); } to { transform: translateX(24px); } }
@keyframes farmBob { from { transform: translateY(0); } to { transform: translateY(-4px); } }
@keyframes farmReady { 0%, 100% { translate: 0 0; opacity: 0.65; } 50% { translate: 0 -6px; opacity: 1; } }
@keyframes farmSayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes farmFly {
  0% { opacity: 0; transform: translate(0, 0); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, -70px)); }
}
@media (prefers-reduced-motion: reduce) {
  .farm-cloud--a, .farm-cloud--b, .farm-cloud--c, .farm-sun__rays,
  .farm-fx__item, .fp.is-run .fp__body, .fp.is-run .fp__head,
  .farm-plot.is-ready .plot__ready { animation: none !important; }
  .fp { transition: none; }
}

/* =========================================================
   今天吃什么 · 选菜面板（三个 3D 弹窗里点「选菜」）
   ========================================================= */
.dish-pick {
  position: fixed; inset: 4vh 5vw; z-index: 999;
  margin: auto; max-width: 920px; max-height: 90vh;
  display: flex; flex-direction: column;
  background: rgba(24, 12, 42, 0.98);
  border: 1px solid rgba(230, 200, 255, 0.22);
  border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.dish-pick__head {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.9rem 1.1rem 0.6rem; color: #f3eaff;
}
.dish-pick__head b { font-size: 1.05rem; }
.dish-pick__count { margin-left: auto; color: rgba(243, 234, 255, 0.72); font-size: 0.85rem; }
.dish-pick__list {
  flex: 1; overflow: auto; padding: 0.2rem 0.9rem 0.4rem;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 0.45rem;
}
.dish-pick__row {
  display: flex; gap: 0.55rem; align-items: flex-start;
  padding: 0.55rem 0.65rem; border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}
.dish-pick__row input { margin-top: 0.2rem; accent-color: #a78bfa; }
.dish-pick__meta { display: flex; flex-direction: column; gap: 0.1rem; color: #efe6ff; }
.dish-pick__meta b { font-size: 0.9rem; }
.dish-pick__meta i { font-style: normal; font-size: 0.72rem; color: #f0abfc; }
.dish-pick__meta small { color: rgba(239, 230, 255, 0.66); font-size: 0.78rem; line-height: 1.35; }
.dish-pick__foot {
  display: flex; justify-content: flex-end; gap: 0.6rem;
  padding: 0.7rem 1.1rem 1rem;
}
@media (max-width: 640px) {
  .dish-pick { inset: 2vh 3vw; }
  .dish-pick__list { grid-template-columns: 1fr; }
}

/* =========================================================
   开饭了 · 五只的饭桌（「小登今天吃什么」最上面那张）
   屋子会按时间换光；一张圆桌，五个座位牌绕它摆一圈，每顿随机排位（五个小孩随便坐）；
   五只三维小鸟会飞过来坐在座位牌上（座位牌就是点它说话 / 夹菜的地方）。
   ========================================================= */
.dinner { margin-bottom: 1.5rem; }
.dinner__head { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; margin: 0 0 0.6rem; }
.dinner__title { margin: 0; font-size: 1.3rem; letter-spacing: 0.02em; }
.dinner__status { margin: 0; color: var(--ink-dim); font-size: 0.88rem; }

.dinner__room {
  position: relative; overflow: hidden; min-height: 340px;
  border-radius: var(--r-lg); border: 1px solid var(--stroke); box-shadow: var(--shadow);
  background: linear-gradient(180deg, #241640 0%, #2f1d52 60%, #1d1236 100%);
}
.dinner__room--dusk { background: linear-gradient(180deg, #38235c 0%, #52285c 58%, #241640 100%); }
.dinner__room--morning { background: linear-gradient(180deg, #443061 0%, #674a7e 58%, #2c1d55 100%); }
.dinner__room--day { background: linear-gradient(180deg, #52407c 0%, #785890 58%, #32215e 100%); }

/* 窗户：按时间换天色；晚上是月亮，白天太阳 */
.dinner__window {
  position: absolute; left: 5%; top: 7%; width: 15%; height: 24%;
  border-radius: 14px; border: 3px solid rgba(255, 240, 220, 0.5);
  background: linear-gradient(180deg, #1b1440, #2c1d55);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.08);
}
.dinner__window::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; border-radius: 50%;
  transform: translate(-60%, -60%);
  background: radial-gradient(circle at 35% 35%, #fff8dc, #f4d47a 70%);
}
.dinner__room--morning .dinner__window { background: linear-gradient(180deg, #ffd9a0, #ff9d7a); }
.dinner__room--morning .dinner__window::after { background: radial-gradient(circle at 50% 50%, #fff3b0, #ffd166 75%); }
.dinner__room--day .dinner__window { background: linear-gradient(180deg, #bfe3ff, #eaf6ff); }
.dinner__room--day .dinner__window::after { opacity: 0; }
.dinner__room--dusk .dinner__window { background: linear-gradient(180deg, #5a3a7a 0%, #ff9e6d 100%); }
.dinner__room--dusk .dinner__window::after { background: radial-gradient(circle at 40% 40%, #fff1c9, #ffb26b 75%); }

/* 吊灯：一小团暖光 */
.dinner__lamp { position: absolute; right: 10%; top: 0; width: 2px; height: 44px; background: rgba(255, 240, 220, 0.55); }
.dinner__lamp::after {
  content: ""; position: absolute; left: 50%; top: 42px; width: 54px; height: 34px;
  transform: translateX(-50%); border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 50% 20%, #ffe9b8, #f2b96a);
  box-shadow: 0 0 34px 12px rgba(255, 214, 130, 0.32);
}

.dinner__scene { position: absolute; inset: 0; }
/* 圆桌：一个压扁的椭圆桌面 + 底下压出的一圈桌沿厚度，五个座位牌绕着它摆一圈 */
.dinner__tablebox {
  position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%);
  width: min(520px, 74%); height: min(190px, 50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 14%, rgba(255, 238, 208, 0.32), rgba(255, 238, 208, 0) 62%),
    linear-gradient(180deg, #b3814f 0%, #99643f 58%, #7a4f33 100%);
  border: 1px solid rgba(255, 226, 190, 0.35);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.16), inset 0 -20px 34px rgba(0, 0, 0, 0.26),
    0 22px 0 -12px #6b4527, 0 28px 36px rgba(0, 0, 0, 0.4);
}
.dinner__dishes {
  position: absolute; left: 50%; top: 26px; transform: translateX(-50%);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem;
  width: min(360px, 64%); margin: 0; padding: 0; list-style: none;
}
.dinner__dish {
  display: inline-flex; align-items: center; padding: 0.26rem 0.68rem;
  border-radius: 12px; background: #fff8ec; color: #5a3d22;
  border: 1px solid rgba(120, 80, 40, 0.3); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  font-size: 0.82rem; cursor: pointer;
  transition: transform 0.25s var(--ease), outline-color 0.25s var(--ease);
}
.dinner__dish:hover { transform: translateY(-2px); }
.dinner__dish.is-pick { outline: 2px solid var(--pink); outline-offset: 1px; transform: translateY(-3px); }
.dinner__hint {
  position: absolute; left: 0; right: 0; top: 44px; margin: 0; text-align: center;
  color: rgba(255, 245, 230, 0.72); font-size: 0.85rem;
}

/* 五个座位牌：既是名签，也是「和它说话 / 给它夹菜」的按钮；位次每顿随机，绕圆桌摆一圈 */
.dinner__seats { position: absolute; inset: 0; }
.dinner__seat {
  position: absolute; transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 0.16rem;
  padding: 0.28rem 0.5rem 0.26rem; border-radius: 14px; border: 1px solid transparent;
  background: rgba(20, 10, 36, 0.38); color: #f5eefe; font: inherit; cursor: pointer;
  backdrop-filter: blur(2px);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.dinner__seat:hover, .dinner__seat:focus-visible { background: rgba(20, 10, 36, 0.64); border-color: rgba(240, 171, 252, 0.45); }
.dinner__seat:focus-visible { outline: none; }
.dinner__seatface { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(255, 255, 255, 0.7); }
.dinner__seat b { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; }
.dinner__seat--0 { left: calc(50% - min(260px, 37%) - 46px); top: 55%; }
.dinner__seat--1 { left: 30%; top: 36%; }
.dinner__seat--2 { left: 50%; top: 26%; }
.dinner__seat--3 { left: 70%; top: 36%; }
.dinner__seat--4 { left: calc(50% + min(260px, 37%) + 46px); top: 55%; }

.dinner__birthday {
  position: absolute; left: 12px; bottom: 10px; margin: 0;
  padding: 0.24rem 0.6rem; border-radius: 999px; font-size: 0.74rem;
  background: rgba(252, 211, 77, 0.16); border: 1px solid rgba(252, 211, 77, 0.5); color: #ffe6a3;
}

.dinner__bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.7rem; }
.dinner__talk { margin: 0.7rem 0 0; color: var(--ink-dim); font-size: 0.88rem; min-height: 1.3em; }

.dinner__serve {
  margin-top: 0.7rem; border: 1px solid var(--stroke); border-radius: var(--r-md);
  background: var(--glass); padding: 0.7rem 0.85rem;
}
.dinner__group + .dinner__group { margin-top: 0.55rem; }
.dinner__grouptitle { display: block; font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 0.35rem; letter-spacing: 0.06em; }
.dinner__choices { display: flex; flex-wrap: wrap; gap: 0.38rem; max-height: 168px; overflow: auto; }
.dinner__choice {
  font: inherit; font-size: 0.8rem; color: var(--ink); padding: 0.26rem 0.68rem;
  border-radius: 999px; border: 1px solid var(--stroke); background: var(--glass); cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}
.dinner__choice:hover { border-color: var(--stroke-strong); }
.dinner__choice.is-on { background: var(--grad-main); color: #fff; border-color: transparent; }
.dinner__choice:disabled { opacity: 0.4; cursor: default; }
.dinner__servefoot { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.65rem; flex-wrap: wrap; }
.dinner__servehint { color: var(--ink-faint); font-size: 0.75rem; }

.dinner__notes { margin-top: 0.85rem; border-top: 1px dashed var(--stroke); padding-top: 0.6rem; }
.dinner__notestitle { font-size: 0.82rem; color: var(--ink-faint); letter-spacing: 0.05em; }
.dinner__noteslist { margin: 0.4rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.3rem; }
.dinner__noteslist li { color: var(--ink-dim); font-size: 0.85rem; padding-left: 1.1rem; position: relative; }
.dinner__noteslist li::before { content: "·"; position: absolute; left: 0.3rem; color: var(--pink); }
.dinner__notesempty, .dinner__notesmore { color: var(--ink-faint); font-size: 0.8rem; margin: 0.35rem 0 0; }

/* 夹菜时飞过去的小筷子 */
.dinner__fly {
  position: fixed; z-index: 80; pointer-events: none; font-size: 20px; line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

@media (max-width: 760px) {
  .dinner__room { min-height: 340px; }
  .dinner__dishes { top: 26px; width: min(260px, 66%); }
  .dinner__dish { font-size: 0.72rem; padding: 0.2rem 0.52rem; }
  .dinner__seat { padding: 0.22rem 0.4rem; }
  .dinner__seat b { font-size: 0.62rem; }
  .dinner__seat--0 { left: 8%; top: 54%; }
  .dinner__seat--1 { top: 34%; }
  .dinner__seat--3 { top: 34%; }
  .dinner__seat--4 { left: 92%; top: 54%; }
}
@media (prefers-reduced-motion: reduce) {
  .dinner__dish, .dinner__seat, .dinner__choice { transition: none; }
}

/* =========================================================
   16.z 为什么要有家人（「小登一家」新分页）
   一条从成团夜走回家里的小路：奶油纸张 + 手绘虚线 + 木牌，
   走完五站，路尽头的家里聚齐五只小鸟。
   ========================================================= */
.why { display: grid; gap: clamp(0.9rem, 2vw, 1.3rem); }

.why-head {
  position: relative; border-radius: 18px; padding: clamp(1rem, 2.4vw, 1.5rem) clamp(1rem, 2.6vw, 1.6rem);
  border: 2px solid #ecd9b8; color: #4a3a20;
  background: repeating-linear-gradient(0deg, transparent 0 26px, rgba(200, 170, 120, 0.09) 26px 27px), #fdf6e9;
  box-shadow: 0 10px 26px rgba(74, 58, 32, 0.16);
}
.why-head::before {
  content: ""; position: absolute; top: -9px; left: 50%; width: 84px; height: 18px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(246, 216, 156, 0.88); border-radius: 3px; box-shadow: 0 2px 5px rgba(74, 58, 32, 0.12);
}
.why-eyebrow { font-size: 0.72rem; letter-spacing: 0.22em; color: #a8865a; }
.why-title { margin: 0.4rem 0 0.5rem; font-family: var(--font-display); font-size: clamp(1.2rem, 2.8vw, 1.6rem); }
.why-intro { margin: 0; font-size: 0.88rem; line-height: 1.9; color: #7a6543; }
.why-progress { margin: 0.7rem 0 0; font-size: 0.8rem; color: #8a744f; }
.why-progress b { color: #b3543a; }

.why-path { display: grid; gap: 0.65rem; }
.why-stop { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 0.55rem; }
.why-stop__rail { position: relative; }
.why-stop__rail::before {
  content: ""; position: absolute; left: 50%; top: -0.65rem; bottom: -0.65rem; width: 2px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(180deg, #e2cda6 0 7px, transparent 7px 13px);
}
.why-stop:first-child .why-stop__rail::before { top: 18px; }
.why-stop:last-child .why-stop__rail::before { bottom: calc(100% - 18px); }
.why-stop__dot {
  position: absolute; left: 50%; top: 16px; width: 14px; height: 14px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fffdf6; border: 2px solid #e2cda6;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.why-stop.is-read .why-stop__dot { background: linear-gradient(135deg, #f6b8cf, #f0a58f); border-color: #f0a58f; }
.why-stop__main { min-width: 0; }

.why-sign {
  width: 100%; text-align: left; font: inherit; cursor: pointer; color: #4a3a20;
  display: grid; gap: 0.22rem; padding: 0.75rem 0.95rem;
  border-radius: 16px; border: 2px solid #ecd9b8; background: #fffdf6;
  box-shadow: 0 6px 16px rgba(74, 58, 32, 0.1);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.why-sign:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(74, 58, 32, 0.16); }
.why-sign:focus-visible { outline: 2px solid #f0a58f; outline-offset: 2px; }
.why-sign__tag { font-size: 0.7rem; letter-spacing: 0.14em; color: #a8865a; }
.why-sign__title { font-size: clamp(0.98rem, 2.2vw, 1.12rem); line-height: 1.6; }
.why-sign__state { font-size: 0.74rem; color: #b98b5b; display: inline-flex; align-items: center; gap: 0.25rem; }
.why-sign__state i { font-style: normal; transition: transform 0.3s var(--ease); }
.why-stop.is-open .why-sign { border-color: #f0c9a0; box-shadow: 0 12px 26px rgba(74, 58, 32, 0.18); }
.why-stop.is-open .why-sign__state i { transform: rotate(90deg); }

.why-body {
  margin-top: 0.55rem; padding: 0.9rem 1rem 1rem;
  border-radius: 16px; border: 1.5px dashed #e2cda6; background: #fff8e8;
}
.why-body__lead { margin: 0 0 0.7rem; font-size: 0.84rem; line-height: 1.9; color: #6b5433; }
.why-notes { display: grid; gap: 0.55rem; }
@media (min-width: 640px) { .why-notes { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.why-note {
  display: flex; gap: 0.6rem; padding: 0.65rem 0.75rem; border-radius: 14px;
  background: #fffdf6; border: 1px solid #f0e2c8; box-shadow: 0 3px 9px rgba(74, 58, 32, 0.08);
}
.why-note__ico { font-size: 1.2rem; line-height: 1.4; }
.why-note__t { margin: 0 0 0.18rem; font-size: 0.9rem; }
.why-note__d { margin: 0; font-size: 0.8rem; line-height: 1.85; color: #7a6543; }

.why-home {
  position: relative; text-align: center; border-radius: 18px; padding: 1.1rem 1rem 1.2rem;
  border: 2px solid #ecd9b8; background: #fdf6e9; box-shadow: 0 10px 26px rgba(74, 58, 32, 0.14);
}
.why-home__roof { display: block; }
.why-home__roof svg { width: 120px; height: 78px; fill: none; stroke: #c99a68; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.why-home__birds { display: flex; justify-content: center; gap: 0.4rem; margin: 0.2rem 0 0.3rem; }
.why-home__bird {
  width: clamp(52px, 10vw, 72px); height: auto;
  filter: grayscale(1); opacity: 0.28; transform: translateY(4px);
  transition: filter 0.5s var(--ease), opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.why-home.is-done .why-home__bird { filter: none; opacity: 1; transform: none; }
.why-home.is-done .why-home__bird:nth-child(2) { transition-delay: 0.08s; }
.why-home.is-done .why-home__bird:nth-child(3) { transition-delay: 0.16s; }
.why-home.is-done .why-home__bird:nth-child(4) { transition-delay: 0.24s; }
.why-home.is-done .why-home__bird:nth-child(5) { transition-delay: 0.32s; }
.why-home__title { margin: 0.15rem 0 0.5rem; font-family: var(--font-display); font-size: 1.15rem; }
.why-home__wait { margin: 0; font-size: 0.84rem; color: #8a744f; }
.why-home__lines p { margin: 0.4rem auto; max-width: 44ch; font-size: 0.88rem; line-height: 2; color: #5d4a2c; }
.why-home__lines p:last-child { color: #b3543a; }
.why-reset { margin-top: 0.85rem; border: 0; background: transparent; color: #b98b5b; font-size: 0.76rem; cursor: pointer; text-decoration: underline dotted; }
.why-reset:hover { color: #8a6a3d; }

/* =========================================================
   16.aa 小登的平行世界 · 集卡册（「小登一家」新分页）
   六个世界 × 五张卡；没翻开的卡是背面（世界纹样 + 问号），
   翻开是成员卡：奶油纸张 + 应援色 + 小鸟图。
   ========================================================= */
.au { display: grid; gap: clamp(0.9rem, 2vw, 1.3rem); }
.au-head {
  position: relative; border-radius: 18px; padding: clamp(1rem, 2.4vw, 1.5rem) clamp(1rem, 2.6vw, 1.6rem);
  border: 2px solid #ecd9b8; color: #4a3a20;
  background: repeating-linear-gradient(0deg, transparent 0 26px, rgba(200, 170, 120, 0.09) 26px 27px), #fdf6e9;
  box-shadow: 0 10px 26px rgba(74, 58, 32, 0.16);
}
.au-head::before {
  content: ""; position: absolute; top: -9px; left: 50%; width: 84px; height: 18px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(246, 216, 156, 0.88); border-radius: 3px; box-shadow: 0 2px 5px rgba(74, 58, 32, 0.12);
}
.au-eyebrow { font-size: 0.72rem; letter-spacing: 0.22em; color: #a8865a; }
.au-title { margin: 0.4rem 0 0.5rem; font-family: var(--font-display); font-size: clamp(1.2rem, 2.8vw, 1.6rem); }
.au-intro { margin: 0; font-size: 0.88rem; line-height: 1.9; color: #7a6543; }
.au-intro--hint { margin-top: 0.35rem; font-size: 0.8rem; color: #a8865a; }
.au-progress { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.75rem; }
.au-bar { flex: 1 1 160px; height: 9px; border-radius: 999px; background: #f0e2c8; overflow: hidden; border: 1px solid #ecd9b8; }
.au-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #f6b8cf, #f0a58f); transition: width 0.5s var(--ease); }
.au-count { font-size: 0.78rem; color: #8a744f; white-space: nowrap; }
.au-count b { color: #b3543a; }
.au-seals { display: inline-flex; gap: 0.28rem; }
.au-seal {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  border: 2px dashed #e2cda6; background: #fffdf6; font-size: 0.95rem;
  filter: grayscale(1); opacity: 0.45;
  transition: filter 0.4s var(--ease), opacity 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.au-seal.is-done { filter: none; opacity: 1; border-style: solid; border-color: #f0a58f; background: #ffe9dd; transform: rotate(-6deg); }
.au-reset { margin-left: auto; border: 0; background: transparent; color: #b98b5b; font-size: 0.74rem; cursor: pointer; text-decoration: underline dotted; }
.au-reset:hover { color: #8a6a3d; }

.au-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.au-chip { min-height:44px; }
.au-chip:disabled { opacity:0.55; cursor:default; }
.au-wallet { font-size:0.86rem; line-height:1.8; color:#8a744f; }
.au-card__hint { line-height:1.6; }
.au-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.42rem 0.85rem;
  border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.84rem; color: #6b5433;
  border: 1.5px solid #e2cda6; background: #fffdf6;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}
.au-chip:hover { transform: translateY(-1px); border-color: #d9b98a; }
.au-chip small { font-size: 0.68rem; color: #a8865a; }
.au-chip.is-on { background: linear-gradient(135deg, #f6b8cf, #f0a58f); border-color: transparent; color: #fff; }
.au-chip.is-on small { color: rgba(255, 255, 255, 0.85); }
.au-chip.is-done::after { content: "🏅"; font-size: 0.8rem; }

.au-world {
  border-radius: 18px; padding: clamp(0.9rem, 2vw, 1.25rem);
  border: 2px solid #ecd9b8; background: #fdf6e9; box-shadow: 0 10px 26px rgba(74, 58, 32, 0.14);
}
.au-world.is-done { border-color: #f0a58f; }
.au-world__head { display: flex; gap: 0.7rem; align-items: flex-start; }
.au-world__emoji { font-size: 1.8rem; line-height: 1.2; }
.au-world__meta { min-width: 0; flex: 1; }
.au-world__name { margin: 0 0 0.25rem; font-family: var(--font-display); font-size: 1.1rem; }
.au-world__name small { font-size: 0.68rem; letter-spacing: 0.18em; color: #a8865a; margin-left: 0.35rem; }
.au-world__premise { margin: 0; font-size: 0.84rem; line-height: 1.85; color: #7a6543; }
.au-world__count { font-size: 0.78rem; color: #b3543a; white-space: nowrap; }
.au-world__ask {
  margin: 0.7rem 0 0.75rem; padding: 0.5rem 0.7rem; border-radius: 12px;
  border: 1.5px dashed #e2cda6; background: #fff8e8; font-size: 0.82rem; color: #6b5433; line-height: 1.8;
}
.au-world__ask i { font-style: normal; margin-right: 0.3rem; }
.au-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); }
.au-world__done { margin: 0.75rem 0 0; font-size: 0.8rem; color: #8a744f; }
.au-world__done b { color: #b3543a; }

.au-card { min-width: 0; }
.au-card__in {
  display: grid; gap: 0.28rem; width: 100%; text-align: left; font: inherit; color: #4a3a20;
  padding: 0.8rem 0.85rem 0.9rem; border-radius: 16px; border: 2px solid #ecd9b8; background: #fffdf6;
  box-shadow: 0 6px 16px rgba(74, 58, 32, 0.1);
}
.au-card.is-locked .au-card__in {
  position: relative; place-items: center; gap: 0.3rem; min-height: 210px; cursor: pointer; border-style: dashed;
  background: repeating-linear-gradient(-45deg, rgba(240, 165, 143, 0.08) 0 10px, transparent 10px 20px), #fffdf6;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.au-card.is-locked .au-card__in:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 10px 20px rgba(74, 58, 32, 0.16); border-color: #f0a58f; }
.au-card.is-locked .au-card__in:focus-visible { outline: 2px solid #f0a58f; outline-offset: 2px; }
.au-card__backmark { font-size: 1.9rem; filter: grayscale(0.2); opacity: 0.75; }
.au-card__q { font-family: var(--font-display); font-size: 2.1rem; color: #d9b98a; line-height: 1; }
.au-card__who { font-size: 0.92rem; font-weight: 600; }
.au-card__hint { font-size: 0.7rem; color: #a8865a; }

.au-card.is-open .au-card__in { border-color: color-mix(in srgb, var(--mc) 45%, #ecd9b8); }
.au-card.is-new .au-card__in { animation: auFlip 0.55s var(--ease) both; transform-origin: left center; }
@keyframes auFlip { from { transform: perspective(700px) rotateY(-88deg); opacity: 0.3; } to { transform: none; opacity: 1; } }
.au-card__top { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.68rem; color: #a8865a; letter-spacing: 0.06em; }
.au-card__top b { font-weight: 600; letter-spacing: 0.02em; }
.au-card__art {
  display: grid; place-items: center; margin: 0.2rem 0 0.1rem; padding: 0.55rem 0; border-radius: 12px;
  background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--mc) 26%, #fff) 0%, #fffdf6 72%);
}
.au-card__art img { width: 74px; height: auto; }
.au-card__name { margin: 0.15rem 0 0; font-size: 1rem; }
.au-card__role { margin: 0; font-size: 0.8rem; color: #b3543a; font-weight: 600; }
.au-card__line { margin: 0.2rem 0 0; font-size: 0.78rem; line-height: 1.85; color: #7a6543; }
.au-card__quote { margin: 0.35rem 0 0; font-size: 0.74rem; color: #a8865a; }

.au-final {
  border-radius: 18px; padding: 1rem 1.1rem; border: 2px dashed #e2cda6;
  background: #fff8e8; text-align: center;
}
.au-final__title { margin: 0 0 0.4rem; font-size: 0.95rem; color: #8a744f; }
.au-final.is-done { border-style: solid; border-color: #f0a58f; background: #fff4ec; }
.au-final.is-done .au-final__title { color: #b3543a; }
.au-final__lines p { margin: 0.4rem auto; max-width: 46ch; font-size: 0.86rem; line-height: 1.95; color: #5d4a2c; }
.au-final__wait { margin: 0; font-size: 0.8rem; color: #a8865a; }

@media (max-width: 640px) {
  .au-grid { grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); }
  .au-card__line { font-size: 0.74rem; }
}
@media (prefers-reduced-motion: reduce) {
  .au-card.is-new .au-card__in { animation: none; }
  .why-home__bird { transition: none; }
  .au-bar i, .au-seal, .why-stop__dot, .why-sign, .why-sign__state i { transition: none; }
}

/* =========================================================
   移动端收尾（手机占多数）
   1) 点按不出现浏览器灰块、双击不缩放（照常滚动）
   2) 输入框 ≥16px：iOS 聚焦时不再把整页放大
   3) 中文小标签抬到 ~11px 起步
   4) 小圆钮热区放大一点、播放条不吃掉整屏
   ========================================================= */
html { -webkit-tap-highlight-color: transparent; }

a, button, [role="button"], summary, label, .chip, .mcard { touch-action: manipulation; }

@media (max-width: 720px) {
  /* iOS 聚焦输入框不放大：这几个输入 / 文本域是页面上仅有的写作口 */
  .vsearch input, .fam-chat__input, .comp-num input, .sort-box select, .textarea { font-size: 16px; }

  /* 小字标签：手机上中文别再小于 11px */
  .vcard__kind, .vcard__dur { font-size: 0.72rem; }
  .vcard__series, .vcard__meta { font-size: 0.74rem; }
  .vcard__note { font-size: 0.78rem; }
  .countdown__label { font-size: 0.74rem; letter-spacing: 0.14em; }
  .dex__no, .dex__count, .streak-week__w { font-size: 0.72rem; }
  #group-facts .fact small { font-size: 0.72rem; letter-spacing: 0.1em; }
  .mbti-badge { font-size: 0.76rem; }

  /* 小圆钮：手指够得着的热区 */
  .mcard__info, .lvl__help, .pdock__mini, .pdock__close, .pdock__pillbtn--x { width: 44px; height: 44px; }

  /* 饭桌座位牌：名字别挤成竖排 */
  .dinner__seat b { font-size: 0.7rem; white-space: nowrap; }

  /* 播放器挪到左下角：手机上顶栏下面就是吸顶 tab 栏，
     左上角的位置会压住第一个 tab 卡片的角（右上角是顶栏工具，也放不下）。
     面板从下往上弹，缩放原点改到底边，弹出来才贴着按钮 */
  .pmusic { top: auto; bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px)); left: 0.9rem; }
  .pdock { top: auto; bottom: calc(4.7rem + env(safe-area-inset-bottom, 0px)); left: 0.6rem; transform-origin: bottom left; }
}

@media (max-width: 940px) {
  /* 汉堡菜单展开时，把顶栏抬到常驻音乐钮（z 81）上面：
     不然音乐钮正好压住菜单第一项「首页」 */
  .topbar:has(.nav.is-open) { z-index: 82; }
}

/* 手机地址栏会让 100vh 比实际屏幕高：播放条按 dvh 收，别溢出屏幕 */
@supports (height: 100dvh) {
  .pdock { max-height: calc(100dvh - 9rem); }
}

/* 手机采用可阅读的单列内容，装饰与紧凑工具仍保留原有主题。 */
@media (max-width: 560px) {
  .hero { padding-top: 5.5rem; }
  .hero__stage { max-width: min(66vw, 260px); margin-bottom: 0.5rem; }
  .hero__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__actions .btn { min-height: 46px; padding: 0.65rem 0.5rem; font-size: 0.875rem; }
  .mgrid { gap: 1rem; }
  .mgrid > .mcard { flex-basis: 100%; }
  .mcard { height: 440px; }
  .mcard__face { padding: 1.25rem; }
  .mcard__face--back { padding-top: 3.75rem; }
  .mcard__idhead { gap: 0.8rem; }
  .mcard__idphoto { width: 76px; height: 96px; }
  .mcard__en, .mcard__hint { font-size: 0.8rem; letter-spacing: 0.12em; }
  .mcard__info { width: 44px; height: 44px; }
  .mcard__list li { font-size: 0.875rem; }
  .grid--6, .sgrid, .vgrid, .let-grid, .let-grid--mixed { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .grid--6 .release { padding: 1rem; }
  .grid--6 .release__title, .scard__name, .vcard__title, .let-card__title { font-size: 1rem; line-height: 1.5; }
  .release__type, .scard__no, .scard__foot, .vcard__kind, .vcard__site, .vcard__dur,
  .vcard__meta, .vcard__series, .let-card__stamp, .let-card__who, .let-card__meta,
  .let-card__folder { font-size: 0.8rem; }
  .scard__body, .vcard__body { padding: 1rem; gap: 0.5rem; }
  .scard__desc, .vcard__note { font-size: 0.875rem; }
  .scard__name, .scard__desc, .vcard__title, .vcard__note { display: block; overflow: visible; -webkit-line-clamp: unset; }
  .release__play, .vcard__play { width: 44px; height: 44px; }
  .let-card { padding: 1rem; gap: 0.6rem; }
}

/* 横屏手机：把纵向拉开的东西并回横向，首屏别浪费一屏高 */
@media (max-width: 940px) and (orientation: landscape) {
  .hero { padding: 4.6rem 0 2.2rem; }
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: 1.1rem; }
  .hero__stage { order: 0; max-width: min(250px, 58vh); margin-bottom: 0; }
  .pmusic { top: auto; bottom: calc(0.9rem + env(safe-area-inset-bottom, 0px)); left: 0.9rem; }
  .pdock { top: auto; bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); left: 0.6rem; transform-origin: bottom left; }
}

/* 手机（含横屏）弹窗按 dvh 收高，别被地址栏顶出屏幕 */
@media (max-width: 940px) {
  @supports (height: 100dvh) {
    .modal__box { max-height: 100%; }
  }
}

/* =========================================================
   导航栏 · 账号胶囊（登录后出现：头像 + 同步信号灯 + 小菜单）
   ========================================================= */
.user-chip { position: relative; }
.user-chip__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.68rem 0.3rem 0.34rem;
  border: 1px solid var(--stroke);
  border-radius: var(--r-pill);
  background: var(--glass);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
  touch-action: manipulation;
}
.user-chip__btn:hover { border-color: var(--pink); transform: translateY(-1px); }
.user-chip__ava {
  width: 27px;
  height: 27px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-main);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
}
.user-chip__name {
  max-width: 7.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #94a3b8;
}
.user-chip__dot[data-state="ok"] { background: #4ade80; }
.user-chip__dot[data-state="syncing"] { background: #facc15; animation: ucPulse 1s ease-in-out infinite; }
.user-chip__dot[data-state="error"],
.user-chip__dot[data-state="expired"] { background: #fb7185; }
@keyframes ucPulse { 50% { opacity: 0.3; } }

.user-chip__menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 40;
  width: 235px;
  padding: 0.8rem;
  border: 1px solid var(--stroke-strong);
  border-radius: var(--r-md);
  background: var(--bg-1);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.45rem;
}
.user-chip__who { display: grid; gap: 0.1rem; }
.user-chip__who b { font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip__who small { font-size: 0.72rem; color: var(--ink-faint); }
.user-chip__row {
  font-size: 0.75rem;
  color: var(--ink-dim);
  padding: 0.45rem 0.6rem;
  border-radius: var(--r-sm);
  background: var(--glass);
}
.user-chip__act {
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  background: var(--glass);
  color: var(--ink);
  padding: 0.45rem 0.6rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
  touch-action: manipulation;
}
.user-chip__act:hover { border-color: var(--pink); color: var(--pink); }
.user-chip__act--out { color: #fda4af; }
.user-chip__act--out:hover { border-color: #fb7185; color: #fb7185; }

@media (max-width: 640px) {
  .user-chip__name { display: none; }
  .user-chip__btn { padding: 0.28rem 0.5rem 0.28rem 0.3rem; }
  .user-chip__menu { width: 205px; }
}

/* 全局兜底：hidden 属性必须是真隐藏（有的组件类写了 display，会盖掉浏览器默认值） */
[hidden] { display: none !important; }

/* 内容自身允许收缩与换行；裁切仅用于照片、装饰和动画舞台。 */
.wrap, .grid > *, .hero__grid > *, .toolbar > *, .footer__grid > *,
.mgrid > *, .kitchen__meta, .toy__meta, .dish-pick__meta { min-width: 0; }
main, .modal__content, .overlay-layer, .footer, .login-card { overflow-wrap: anywhere; }
.input, .textarea, input[type="date"], input[type="text"], input[type="number"], select, textarea { min-width: 0; max-width: 100%; }
.eyebrow { max-width: 100%; flex-wrap: wrap; }
.btn { max-width: 100%; text-align: center; }
.btn, .icon-btn { flex-shrink: 0; }
.modal__content .card__pad > h2, .modal__content .card__pad > h3 { padding-right: 2rem; }

/* 子弹窗挂到 body，避免动画 transform 把 fixed 限制在父弹窗内部。 */
.overlay-layer, .fam-wish-all, .toy-love__pop.overlay-layer {
  position: fixed; inset: var(--overlay-top, 0px) 0 auto; height: var(--overlay-height, 100dvh);
  display: grid; place-items: center; z-index: 100;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: rgba(8, 0, 22, 0.72); backdrop-filter: blur(6px); overscroll-behavior: contain;
}
.overlay-layer .dish-pick { position: relative; inset: auto; margin: 0; width: min(920px, 100%); max-height: 100%; min-height: 0; }
.dish-pick__list { min-height: 0; overscroll-behavior: contain; }
.dish-pick__foot { flex-wrap: wrap; }
.fam-wish-all__box { max-height: 100%; min-width: 0; overflow: auto; }
.fam-wish-all .toy-wish__list { min-height: 0; overscroll-behavior: contain; }
.toy-love__pop.overlay-layer .toy-love__popcard { max-height: 100%; overscroll-behavior: contain; }

@media (max-width: 720px) {
  .wrap { width: min(100% - 24px, var(--maxw)); }
  .section { padding-block: 2.5rem; }
  #dex { margin-top: -20px; }
  .section__head { margin-bottom: 1.5rem; }
  .section__title { font-size: clamp(1.65rem, 6vw, 2rem); }
  .section__sub, .hero__lead { font-size: 1rem; line-height: 1.8; }
  .card__pad { padding: 1rem; }
  .toolbar { padding: 0.8rem; gap: 0.75rem; }
  .toolbar .vsearch { flex-basis: 100%; }
  .filter-btn, .chip, .fd-chip, .btn--sm { min-height: 44px; font-size: 0.875rem; }
  .icon-btn, .lvl__help, .pdock__mini, .pdock__close, .pdock__pillbtn--x { width: 44px; height: 44px; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select { font-size: 16px; }
  .brand { gap: 0.4rem; }
  .brand__mark { width: 32px; height: 32px; }
  .brand__name { font-size: 1rem; letter-spacing: 0.04em; white-space: nowrap; }
  .topbar__inner { gap: 0.4rem; }
  .nav-tools { gap: 0.25rem; }
  .user-chip__btn { min-height: 44px; }
  .user-chip__menu { max-width: calc(100vw - 24px); max-height: calc(100dvh - var(--topbar-h, 70px) - 24px); overflow: auto; }
  .user-chip__act { min-height: 44px; font-size: 0.875rem; }
  .subnav, .house .subnav { padding-block: 3px; }
  .subnav__item, .subnav--tight .subnav__item { min-height: 44px; padding: 0.5rem 0.75rem; }
  .subnav__txt b, .subnav__item--sm .subnav__txt b { font-size: 0.875rem; }
  .subnav__ico, .subnav--tight .subnav__ico { width: 24px; height: 24px; }
  .subnav__ico svg, .subnav--tight .subnav__ico svg { width: 15px; height: 15px; }
  .modal__pad { padding: 4rem 1rem 1rem; }
  .modal__title { font-size: 1.15rem; padding-right: 0; }
  .modal__close { top: 0.5rem; right: 0.5rem; }
  .modal__box { border-radius: 18px; max-height: 100%; }
  #global-modal:has(.mapdlg) { padding: 12px; }
  .fd-editor__foot, .fd-detail__btns, .kitchen__actions { gap: 0.6rem; }
  .fd-editor__foot .btn, .kitchen__actions .btn { flex: 1 1 120px; }
  .fd-two { grid-template-columns: minmax(0, 1fr); }
  .fd-mood small, .fd-field > label, .fd-two label, .fd-editor__hint { font-size: 0.8rem; }
  .fd-photo-strip__item button, .toy-wish__del, .closet__page, .pw-nav { min-width: 44px; min-height: 44px; }
  .toy-wish__list--drawn .toy-wish__item { height: auto; min-height: var(--wish-row); padding-block: 0.5rem; }
  .toy-wish__list--drawn .toy-wish__text { white-space: normal; overflow: visible; }
  .let-sheet { padding: 1.1rem; }
  .let-sheet__body { font-size: 1rem; line-height: 1.9; }
  .let-sheet__head .eyebrow { font-size: 0.8rem; letter-spacing: 0.06em; }
  .lvl__pop { max-height: calc(100dvh - 24px); overflow: auto; }
  .lvl__name { padding-right: 2.2rem; }
  .cal__week span, .cal__d { font-size: 0.875rem; }
  .streak-week { gap: 0.2rem; }
  .footer { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
  .footer__list { font-size: 0.875rem; gap: 0.5rem; }
  .footer__list a { display: inline-flex; align-items: center; min-height: 36px; }
  .footer__bottom { font-size: 0.8rem; }
  .to-top { right: 12px; bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .pdock { max-height: calc(100dvh - 6rem - env(safe-area-inset-bottom)); }
}
@media (max-width: 430px) {
  .toy-grid, .kitchen { grid-template-columns: minmax(0, 1fr); }
  .fd-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toy { padding: 1rem; }
  .sort-box { max-width: 100%; flex-wrap: wrap; }
  .closet__birds { gap: 0.25rem; }
  .closet__bird { padding-inline: 0.2rem; }
}
@media (max-width: 940px) and (orientation: landscape) {
  .modal__box { max-height: 100%; }
}

@media (min-width: 861px) {
  #global-modal:has(.mapdlg) .modal__content { display: flex; }
  .mapdlg { width: 100%; height: 100%; overflow: hidden; }
}
@media (min-width: 941px) { .modal { padding: 1.4rem; } }
@media (max-width: 720px) {
  .page-head { padding-top: calc(var(--topbar-h, 70px) + 1.5rem); }
  .page-head__title { font-size: clamp(1.8rem, 7vw, 2.2rem); }
  .bookcard { width: 88px; height: 128px; }
  .bookcard__title { font-size: 0.8rem; }
  .bookcard__eyebrow, .bookcard__count { font-size: 0.75rem; }
  .bookcard__front { overflow-y: auto; }
  .shelf-row { column-gap: 0.75rem; row-gap: 1rem; }
  .map-svg { height: min(46dvh, 380px); }
  .map-stops { max-height: none; overflow: visible; }
  .fd-lightbox { max-height: none; padding: 4rem 1rem 1rem; }
  .fd-lightbox img { max-width: 100%; max-height: 65dvh; object-fit: contain; }
  .closet__item-meta small { font-size: 0.8rem; }
  .closet__item-meta small { display: block; -webkit-line-clamp: unset; }
}

@media (max-width: 720px) {
  main small, .modal__content small, .overlay-layer small { font-size: 0.8rem; }
  .eyebrow, .section__head--tight .eyebrow, .house__sign .eyebrow,
  .sch-eyebrow, .sch-chip, .sch-room__tag { font-size: 0.8rem; letter-spacing: 0.08em; }
  .closet__bird-meta b, .closet__bird-meta small { font-size: 0.8rem; }
  .todo-modtab, .sch-btn, .sch-link, .closet__cat, .closet__page, .dinner__choice { min-height: 44px; font-size: 0.875rem; }
  .release__meta, .release__tags, .vcard__series { white-space: normal; overflow: visible; }
  .dinner__seat b { font-size: 0.8rem; }
  .cal__week, .cal__grid { gap: 0.2rem; }
  .cal__d { padding: 0; }
}

/* ---------- 留言板（福来小屋 · board.js） ---------- */
/* 左 2/3 是滚动屏，右 1/3 是发布区；窄屏自动上下排（发布区在上） */
.board-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr); gap: 1.2rem; align-items: start; --board-bears-h: clamp(3.6rem, 11.6vw, 7.8rem); }
.board-head { grid-column: 1 / -1; grid-row: 1; }
.board-layout__feed { grid-column: 1; grid-row: 2; min-width: 0; }
/* 右边发布卡往下让出小熊的高度：和留言屏上沿对齐 */
.board-layout__write { grid-column: 2; grid-row: 2; margin-top: var(--board-bears-h); }
.board-compose { max-width: none; margin: 0; }
.board-compose__title { margin: 0.55rem 0 0.2rem; font-size: 1.3rem; }
.board-compose__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 0.6rem; }
.board-compose__count { font-size: 0.76rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.board-compose__count.is-warn { color: var(--pink); font-weight: 700; }
.board-compose__count.is-over { color: var(--coral); font-weight: 700; }
/* 发送中：小转圈 + 「贴上中…」 */
#board-send .board-send__spin { animation: boardSendSpin 0.9s linear infinite; }
@keyframes boardSendSpin { to { transform: rotate(360deg); } }
.board-mode { margin: 0.9rem 0 0; font-size: 0.76rem; color: var(--ink-faint); border-top: 1px dashed var(--stroke); padding-top: 0.7rem; }
.board-mode.is-local { color: var(--gold); }

/* 留言板 · 附件：图片 / 拍照 / 表情 / 心情 / 地点（board.js） */
.board-pick { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.7rem; }
.board-pick__item { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; border: 1px solid var(--stroke); background: var(--glass); }
.board-pick__item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.board-pick__item button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; padding: 0; border: none; border-radius: 50%; background: rgba(12, 4, 28, 0.72); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.board-pick__item--busy { display: grid; place-items: center; font-size: 0.72rem; color: var(--ink-faint); border-style: dashed; }
.board-pick__tag { display: inline-flex; align-items: center; gap: 0.3rem; align-self: center; padding: 0.32rem 0.6rem; border-radius: var(--r-pill); border: 1px dashed var(--stroke-strong); background: var(--glass); font-size: 0.76rem; color: var(--ink-dim); }
.board-pick__tag svg { width: 13px; height: 13px; }
.board-pick__tag button { padding: 0; border: none; background: none; color: var(--ink-faint); font-size: 13px; line-height: 1; cursor: pointer; }
.board-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem; }
.board-tool { display: inline-flex; align-items: center; gap: 0.32rem; padding: 0.34rem 0.7rem; border-radius: var(--r-pill); border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-dim); font: inherit; font-size: 0.8rem; cursor: pointer; transition: 0.2s var(--ease); }
.board-tool svg { width: 15px; height: 15px; }
.board-tool:hover { color: var(--ink); border-color: var(--stroke-strong); }
.board-tool.is-on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--purple-500), var(--pink)); }
.board-pop { margin-top: 0.7rem; padding: 0.8rem 0.9rem; border-radius: 14px; border: 1px solid var(--stroke); background: var(--glass-strong); }
.board-pop__title { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.55rem; font-size: 0.8rem; color: var(--ink-dim); }
.board-pop__clear { margin-left: auto; padding: 0; border: none; background: none; color: var(--purple-400); font-size: 0.76rem; cursor: pointer; }
.board-pop__grid { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.board-pop__emo { width: 36px; height: 36px; display: grid; place-items: center; font-size: 1.15rem; border-radius: 10px; border: 1px solid transparent; background: var(--glass); cursor: pointer; transition: 0.15s var(--ease); }
.board-pop__emo:hover { background: var(--glass-strong); border-color: var(--stroke-strong); transform: translateY(-2px); }
.board-pop__mood { display: inline-flex; align-items: center; gap: 0.32rem; padding: 0.34rem 0.7rem; border-radius: var(--r-pill); border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-dim); font: inherit; font-size: 0.8rem; cursor: pointer; transition: 0.2s var(--ease); }
.board-pop__mood b { font-size: 1rem; font-weight: 400; }
.board-pop__mood:hover { border-color: var(--stroke-strong); color: var(--ink); }
.board-pop__mood.is-on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--purple-500), var(--pink)); }
/* 「图片」里的小选择：从本机选 / 拍一张 */
.board-pop__src {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.95rem;
  border-radius: var(--r-pill); border: 1px solid var(--stroke); background: var(--glass);
  color: var(--ink-dim); font-family: inherit; font-size: 0.84rem; cursor: pointer;
  transition: transform 0.2s var(--ease), color 0.2s, border-color 0.2s;
}
.board-pop__src b { font-size: 1.05rem; font-weight: 400; }
.board-pop__src:hover { color: var(--ink); border-color: var(--stroke-strong); transform: translateY(-2px); }
.board-place { display: flex; gap: 0.5rem; }
.board-place__in { flex: 1; min-width: 0; padding: 0.5rem 0.7rem; border-radius: 10px; border: 1px solid var(--stroke); background: var(--glass); color: var(--ink); font: inherit; font-size: 0.85rem; }
.board-place__in:focus { outline: none; border-color: var(--purple-400); }

.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0; }
.board-head__sub { margin: 0.15rem 0 0; font-size: 0.8rem; color: var(--ink-faint); }

/* 留言屏：一块固定高度的滚动屏，消息在屏里滚，页面不越拉越长 */
.board-screen {
  position: relative;
  height: clamp(360px, 64vh, 720px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 1rem 0.15rem;
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  /* 底色偏实：滚动时不用反复透出背后的动画背景，画面才稳不闪 */
  background: color-mix(in srgb, var(--bg-1) 85%, transparent);
  box-shadow: inset 0 2px 18px rgba(8, 0, 24, 0.2);
  /* 滑动条藏起来：屏里照常能滚（滚轮 / 手指 / 键盘），只是不画那条杠 */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.board-screen:focus-visible { outline: 2px solid var(--purple-400); outline-offset: 2px; }
.board-screen::-webkit-scrollbar { display: none; width: 0; height: 0; }
[data-theme="light"] .board-screen { background: color-mix(in srgb, #fff 88%, transparent); box-shadow: inset 0 2px 14px rgba(76, 29, 149, 0.1); }

/* 留言屏外框：人物趴在上沿，回顶提示贴在屏底 */
.board-screen-wrap { position: relative; margin-top: var(--board-bears-h); }
/* 左航、张泽禹、朱志鑫、张极、苏新皓：沿用原来五个装饰的横向位置；整组缩小两成、居中 */
.board-boys {
  position: absolute; left: 0; right: 0; bottom: 100%; z-index: 2;
  margin-bottom: -10px; padding: 0 clamp(6px, 4%, 48px);
  pointer-events: none; user-select: none;
}
.board-boys__art { display: block; width: 80%; height: auto; overflow: hidden; margin: 0 auto; }
/* 滚到底准备回到头上时的轻提示 */
.board-screen__hint {
  position: absolute; left: 50%; bottom: 1rem; z-index: 1;
  transform: translateX(-50%) translateY(6px);
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.32rem 0.8rem; border-radius: var(--r-pill);
  border: 1px solid var(--stroke-strong); background: var(--glass-strong);
  color: var(--ink-dim); font-size: 0.76rem; white-space: nowrap;
  pointer-events: none; opacity: 0;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.board-screen__hint.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 一条留言占一行，从上往下排 */
.board-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.85rem; align-items: start; }
.board-note {
  position: relative; padding: 1rem 1.1rem 0.8rem;
  border-radius: var(--r-md); border: 1px solid var(--stroke);
  /* 实色底、不用毛玻璃：滚动时不再反复重绘，画面不闪 */
  background: #2b104f;
  box-shadow: 0 8px 22px rgba(8, 0, 24, 0.26);
  /* 用独立的 translate，别动 .reveal 的 transform */
  transition: translate 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  /* 整张纸条都能点开看详情 */
  cursor: pointer;
}
.board-note:focus-visible { outline: 2px solid var(--purple-400); outline-offset: 2px; }
.board-note:hover { translate: 0 -2px; border-color: var(--stroke-strong); box-shadow: 0 12px 28px rgba(8, 0, 24, 0.34); }
[data-theme="light"] .board-note { background: #f6f1ff; box-shadow: 0 10px 22px rgba(76, 29, 149, 0.12); }
[data-theme="light"] .board-note:hover { box-shadow: 0 14px 28px rgba(76, 29, 149, 0.18); }
.board-note.is-mine { border-color: color-mix(in srgb, var(--purple-400) 55%, var(--stroke)); }

.board-note__head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.55rem; }
.board-note__ava {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; color: #fff;
  background: linear-gradient(135deg, var(--purple-500), var(--pink));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.board-note__who { min-width: 0; display: grid; line-height: 1.3; }
.board-note__who b { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-note__who small { font-size: 0.72rem; color: var(--ink-faint); }
.board-note__del {
  margin-left: auto; flex: none; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid transparent; background: transparent; color: var(--ink-faint);
  cursor: pointer; display: grid; place-items: center; transition: 0.2s;
}
.board-note__del svg { width: 15px; height: 15px; }
.board-note__del:hover { color: var(--coral); background: var(--glass-strong); border-color: var(--stroke); }
.board-note__body { margin: 0; font-size: 0.92rem; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
/* 列表里文字最多露四行，超出的折起来；点开详情看全文 */
.board-note__body.is-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}
.board-note__body--full { white-space: pre-wrap; }
.board-note__more {
  display: none;
  margin-top: 0.35rem; padding: 0; border: none; background: none;
  color: var(--purple-300); font: inherit; font-size: 0.78rem;
  cursor: pointer; transition: 0.2s var(--ease);
}
.board-note.is-clamped .board-note__more { display: inline-flex; }
.board-note__more:hover { color: var(--pink); }

/* 详情弹窗：一条留言的全文、大图、心情地点与点赞 */
.board-detail .board-note__body { margin-top: 0.2rem; }
.board-detail__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.1rem; }
.board-detail__btns { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-left: auto; }

/* 「我的留言」入口：发布框下面一条，自己的纸条都收在弹窗里 */
.board-mine-btn { width: 100%; justify-content: center; gap: 0.45rem; margin-top: 0.8rem; border-style: dashed; }
.board-mine-btn__n {
  font-style: normal; min-width: 1.35em; padding: 0.02rem 0.4rem;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--purple-500), var(--pink));
  color: #fff; font-size: 0.7rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.board-mine-btn.is-pulse { animation: boardMinePulse 0.9s var(--ease); border-color: var(--purple-400); }
@keyframes boardMinePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--pink) 55%, transparent); }
  45% { transform: scale(1.035); box-shadow: 0 0 0 8px color-mix(in srgb, var(--pink) 0%, transparent); }
  100% { transform: scale(1); }
}

/* 「我的留言」弹窗：内容 + 实时点赞 + 摘掉 */
.board-mine__title { margin: 0.55rem 0 0.2rem; font-size: 1.25rem; }
.board-mine__sub { margin: 0; color: var(--ink-dim); font-size: 0.86rem; }
.board-mine__list { display: grid; gap: 0.7rem; margin-top: 1rem; }
.board-mine__item {
  padding: 0.85rem 0.95rem 0.7rem;
  border-radius: var(--r-md); border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--bg-1) 72%, transparent);
}
[data-theme="light"] .board-mine__item { background: color-mix(in srgb, #fff 80%, transparent); }
.board-mine__head { display: flex; align-items: center; margin-bottom: 0.35rem; }
.board-mine__when { font-size: 0.74rem; color: var(--ink-faint); }
.board-mine__row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.7rem; }
.board-mine__acts { display: inline-flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; margin-left: auto; }
.board-mine__ask { font-size: 0.76rem; color: var(--ink-dim); }
.board-mine__del {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.22rem 0.65rem; border-radius: var(--r-pill);
  border: 1px solid var(--stroke); background: var(--glass);
  color: var(--ink-faint); font: inherit; font-size: 0.76rem; cursor: pointer;
  transition: 0.2s var(--ease);
}
.board-mine__del svg { width: 13px; height: 13px; }
.board-mine__del:hover { color: var(--coral); border-color: var(--coral); }
.board-mine__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 1rem; }
.board-mine__count { font-size: 0.78rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.board-mine .board-empty { margin: 0; }

/* 留言里带的图与小标签 */
.board-note__imgs { display: grid; gap: 6px; margin-top: 0.65rem; }
/* 板上滚动的纸条：图最多占卡片宽度的三分之一，别把整张卡撑满 */
#board-list .board-note__imgs { max-width: 33%; }
.board-note__imgs--1 { grid-template-columns: 1fr; }
.board-note__imgs--2 { grid-template-columns: 1fr 1fr; }
.board-note__imgs--3 { grid-template-columns: repeat(3, 1fr); }
.board-note__imgs--4 { grid-template-columns: 1fr 1fr; }
.board-note__img { padding: 0; border: none; border-radius: 10px; overflow: hidden; background: var(--glass); cursor: zoom-in; aspect-ratio: 1 / 1; }
.board-note__imgs--1 .board-note__img { aspect-ratio: 4 / 3; }
.board-note__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: 0.25s var(--ease); }
.board-note__img:hover img { transform: scale(1.04); }
.board-note__meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.board-note__tag { display: inline-flex; align-items: center; gap: 0.28rem; padding: 0.22rem 0.55rem; border-radius: var(--r-pill); border: 1px solid var(--stroke); background: var(--glass); font-size: 0.74rem; color: var(--ink-dim); }
.board-note__tag svg { width: 12px; height: 12px; }
.board-note__tag--mood { border-color: color-mix(in srgb, var(--purple-400) 45%, var(--stroke)); }
.board-lightbox { display: grid; gap: 0.8rem; justify-items: center; }
.board-lightbox img { max-width: 100%; max-height: 72vh; border-radius: 14px; box-shadow: 0 18px 44px rgba(8, 0, 24, 0.5); }

.board-note__foot { display: flex; justify-content: flex-end; margin-top: 0.7rem; }

.board-like {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-dim);
  border-radius: var(--r-pill); padding: 0.25rem 0.75rem; font: inherit; font-size: 0.8rem;
  cursor: pointer; transition: 0.2s var(--ease); font-variant-numeric: tabular-nums;
}
.board-like svg { width: 15px; height: 15px; }
.board-like:hover { border-color: var(--pink); color: var(--pink); }
.board-like.is-on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--purple-500), var(--pink)); box-shadow: 0 6px 16px rgba(240, 171, 252, 0.35); }
.board-like.is-on:hover { color: #fff; }
.board-like.is-on svg { animation: boardHeart 0.45s var(--ease); }
.board-like.is-busy { opacity: 0.6; pointer-events: none; }
@keyframes boardHeart {
  0% { transform: scale(1); }
  40% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

.board-list > .board-loading,
.board-list > .board-empty { grid-column: 1 / -1; }
.board-loading { text-align: center; color: var(--ink-faint); font-size: 0.9rem; padding: 3.2rem 0; }
.board-empty { max-width: 620px; margin: 1.8rem auto 2.6rem; text-align: center; color: var(--ink-dim); }
.board-empty__ico { width: 44px; height: 40px; color: var(--purple-400); opacity: 0.85; margin-bottom: 0.4rem; }
.board-empty p { margin: 0 0 1rem; }
.board-more { display: flex; justify-content: center; margin-top: 1.2rem; padding-bottom: 0.5rem; }

@media (max-width: 900px) {
  .board-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .board-layout__write { grid-column: 1; grid-row: 1; margin-top: 0; }
  .board-head { grid-column: 1; grid-row: 2; }
  .board-layout__feed { grid-column: 1; grid-row: 3; }
  .board-screen-wrap { margin-top: clamp(3.6rem, 15.2vw, 8.8rem); }
}
@media (max-width: 720px) {
  .board-list { gap: 0.7rem; }
  .board-head { align-items: center; }
  .board-compose__title { font-size: 1.15rem; }
  .board-pick__item { width: 64px; height: 64px; }
  .board-pop__emo { width: 32px; height: 32px; font-size: 1.05rem; }
  .board-screen { height: clamp(280px, 56vh, 560px); padding: 0.7rem 0.7rem 0.1rem; }
  .board-screen-wrap { margin-top: clamp(3.6rem, 16vw, 7.2rem); }
}
@media (prefers-reduced-motion: reduce) {
  #board-send .board-send__spin { animation: none; }
}


/* 留言板 · 紫藤花园。只加绝对定位的装饰和表面样式，保留屏幕、
   小熊、发布卡的尺寸、间距、响应式排列与原有交互。 */
.board-screen-wrap {
  --board-frame: #bca2e0;
  --board-paper-line: rgba(202, 175, 232, .12);
}
.board-screen-wrap::before {
  content: "";
  position: absolute; inset: -5px;
  border: 1px solid color-mix(in srgb, var(--board-frame) 48%, transparent);
  border-radius: calc(var(--r-md) + 5px);
  box-shadow: 0 0 0 3px rgba(183, 149, 220, .04), 0 10px 35px rgba(10, 2, 25, .15);
  pointer-events: none;
}
.board-screen {
  border-color: color-mix(in srgb, var(--board-frame) 65%, var(--bg-1));
  background: linear-gradient(135deg, rgba(189, 151, 223, .09), transparent 36%), var(--bg-1);
  box-shadow: inset 0 0 0 3px rgba(191, 156, 224, .05), inset 0 2px 18px rgba(8, 0, 24, .2);
}
.board-garden {
  position: absolute; inset: 0; z-index: 3;
  pointer-events: none; user-select: none;
}
.board-garden img { display: block; position: absolute; pointer-events: none; }
.board-garden__corner { width: clamp(62px, 8vw, 98px); height: auto; opacity: .92; }
.board-garden__corner--tl { top: -12px; left: -14px; }
.board-garden__corner--tr { top: -12px; right: -14px; transform: scaleX(-1); }
.board-garden__corner--bl { bottom: -12px; left: -14px; transform: scaleY(-1); }
.board-garden__corner--br { bottom: -12px; right: -14px; transform: scale(-1); }
.board-garden__side { bottom: calc(100% - 4px); width: 13%; max-width: 104px; height: auto; }
.board-garden__side--left { left: 0; }
.board-garden__side--right { right: 0; transform: scaleX(-1); }

.board-compose {
  --board-letter-line: rgba(195, 160, 224, .13);
  background: radial-gradient(ellipse at 100% 0, rgba(220, 177, 233, .14), transparent 55%),
    linear-gradient(145deg, #302045, #231336 65%, #2b193e);
  border-color: rgba(208, 181, 232, .5);
  box-shadow: 0 14px 36px rgba(8, 0, 24, .25), inset 0 0 0 5px rgba(212, 185, 237, .035);
}
.board-compose::before {
  inset: 9px; border: 1px dashed rgba(211, 186, 237, .2);
  border-radius: calc(var(--r-lg) - 7px); background: none;
}
.board-compose::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: repeating-linear-gradient(125deg, #b8a0d8 0 12px, #392649 12px 22px, #afbbab 22px 34px, #392649 34px 44px);
  opacity: .65; pointer-events: none;
}
.board-compose__stamp {
  position: absolute; top: 20px; right: 19px; width: 30px; height: 36px;
  color: #cbb0e5; opacity: .64; transform: rotate(9deg);
  pointer-events: none; user-select: none;
}
.board-compose__stamp svg { display: block; width: 100%; height: 100%; }
.board-compose > .chip {
  color: #e7d4fa; border-color: rgba(201, 171, 229, .38);
  background: rgba(191, 153, 218, .13);
}
.board-compose__title { color: #eee1fc; }
.board-compose .field > label { color: #c6b1d9; }
.board-compose .textarea {
  border-color: rgba(197, 173, 224, .36);
  background: repeating-linear-gradient(transparent 0 calc(1.75em - 1px), var(--board-letter-line) calc(1.75em - 1px) 1.75em), #22132f;
  background-origin: content-box, padding-box;
  box-shadow: inset 0 2px 8px rgba(8, 0, 24, .12);
  caret-color: #e1bbf2;
}
.board-compose .textarea::placeholder { color: #ac93be; opacity: 1; }
.board-compose .textarea:focus {
  border-color: #cfadeb; box-shadow: 0 0 0 3px rgba(205, 167, 235, .14), inset 0 2px 8px rgba(8, 0, 24, .12);
}
.board-compose .board-tool {
  background: rgba(218, 190, 239, .06); border-color: rgba(206, 175, 230, .26); color: #d9c5e9;
}
.board-compose .board-tool:hover { background: rgba(218, 190, 239, .14); border-color: #b79acd; }
.board-compose .board-tool.is-on { background: linear-gradient(135deg, #956cc1, #b776b7); border-color: transparent; color: #fff; }
.board-compose .board-compose__count:not(.is-warn):not(.is-over) { color: #bfa6d2; }
.board-compose #board-send { background: linear-gradient(135deg, #8a64b9, #b377ae); box-shadow: 0 4px 14px rgba(158, 106, 183, .25); }
.board-compose #board-send:hover { box-shadow: 0 6px 18px rgba(184, 133, 208, .35); }
.board-compose .board-mine-btn {
  background: rgba(197, 173, 224, .04); border-color: rgba(197, 173, 224, .32); color: #d9c5e9;
}
.board-compose .board-mine-btn:hover { background: rgba(197, 173, 224, .1); border-color: #b79acd; }

[data-theme="light"] .board-screen-wrap { --board-frame: #a78abb; }
[data-theme="light"] .board-screen {
  background: linear-gradient(135deg, rgba(213, 191, 230, .17), transparent 42%), #fffcff;
  box-shadow: inset 0 0 0 3px rgba(176, 146, 200, .06), inset 0 2px 14px rgba(76, 29, 149, .06);
}
[data-theme="light"] .board-garden__corner { opacity: 1; }
[data-theme="light"] .board-compose {
  --board-letter-line: rgba(155, 126, 180, .14);
  background: radial-gradient(ellipse at 100% 0, rgba(220, 195, 237, .3), transparent 55%),
    linear-gradient(145deg, #fffcf8, #faf4ff 65%, #f5eefa);
  border-color: #cfbcdc; box-shadow: 0 14px 36px rgba(98, 65, 127, .1), inset 0 0 0 5px rgba(203, 177, 221, .08);
}
[data-theme="light"] .board-compose::before { border-color: rgba(161, 129, 183, .3); }
[data-theme="light"] .board-compose::after {
  background: repeating-linear-gradient(125deg, #b8a0d8 0 12px, #fbf5fc 12px 22px, #afbbab 22px 34px, #fbf5fc 34px 44px);
}
[data-theme="light"] .board-compose__stamp { color: #9473ac; }
[data-theme="light"] .board-compose > .chip { color: #77588e; background: #eee2f5; border-color: #cebbdd; }
[data-theme="light"] .board-compose__title { color: #553768; }
[data-theme="light"] .board-compose .field > label { color: #806491; }
[data-theme="light"] .board-compose .textarea {
  background: repeating-linear-gradient(transparent 0 calc(1.75em - 1px), var(--board-letter-line) calc(1.75em - 1px) 1.75em), #fffdfa;
  background-origin: content-box, padding-box; border-color: #d9c8e3; caret-color: #805897;
}
[data-theme="light"] .board-compose .textarea::placeholder { color: #92789f; }
[data-theme="light"] .board-compose .board-tool,
[data-theme="light"] .board-compose .board-mine-btn { color: #775888; background: rgba(255, 255, 255, .6); border-color: #d9c8e3; }
[data-theme="light"] .board-compose .board-tool:hover,
[data-theme="light"] .board-compose .board-mine-btn:hover { background: #efe5f5; border-color: #b79acd; }
[data-theme="light"] .board-compose .board-tool.is-on { color: #fff; background: linear-gradient(135deg, #956cc1, #b776b7); border-color: transparent; }
[data-theme="light"] .board-compose .board-compose__count:not(.is-warn):not(.is-over) { color: #806491; }

@media (max-width: 720px) {
  .board-garden__corner { width: 66px; }
  .board-garden__corner--tl, .board-garden__corner--bl { left: -10px; }
  .board-garden__corner--tr, .board-garden__corner--br { right: -10px; }
  .board-garden__side { width: 12%; }
  .board-compose__stamp { top: 17px; right: 17px; width: 26px; height: 32px; }
}

/* ---------- 留言板管理：站长 / 管理员（board.js · 第五个隐藏 tab） ---------- */

/* 「管理」tab 上的数字角标（新待审到了轻抖一下） */
.subnav__item .subnav__n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.35em; height: 1.35em; padding: 0 0.32em; margin-left: 0.4rem;
  border-radius: var(--r-pill); vertical-align: middle;
  background: linear-gradient(135deg, var(--purple-500), var(--pink));
  color: #fff; font-style: normal; font-size: 0.66rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 10px rgba(240, 171, 252, 0.5);
}
.subnav__item.is-alert small { color: var(--gold); }
.subnav__item.is-pulse { animation: boardMinePulse 0.9s var(--ease); }

/* 面板骨架 */
.adm-wrap { display: grid; gap: 1rem; max-width: 880px; }
.adm-hero__top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.adm-refresh {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.34rem 0.72rem; border-radius: var(--r-pill);
  border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-dim);
  font: inherit; font-size: 0.8rem; cursor: pointer; transition: 0.2s var(--ease);
}
.adm-refresh svg { width: 14px; height: 14px; }
.adm-refresh:hover { color: var(--ink); border-color: var(--stroke-strong); }
.adm-refresh.is-busy { pointer-events: none; opacity: 0.7; }
.adm-refresh.is-busy svg { animation: boardSendSpin 0.9s linear infinite; }
.adm-hero__title { margin: 0.6rem 0 0.15rem; font-size: 1.35rem; }
.adm-hero__sub { margin: 0; color: var(--ink-dim); font-size: 0.9rem; }
.adm-role { color: var(--gold); }
.adm-stats { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.8rem; }
.adm-stat {
  display: inline-flex; align-items: baseline; gap: 0.28rem;
  padding: 0.26rem 0.66rem; border-radius: var(--r-pill);
  border: 1px solid var(--stroke); background: var(--glass);
  font-size: 0.78rem; color: var(--ink-dim);
}
.adm-stat b { font-size: 0.95rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.adm-stat--dim { color: var(--ink-faint); border-style: dashed; }

/* 审核开关 */
.adm-switchrow { display: flex; align-items: center; gap: 1.2rem; justify-content: space-between; }
.adm-switchrow__txt b { font-size: 0.98rem; }
.adm-switchrow__txt p { margin: 0.3rem 0 0; color: var(--ink-dim); font-size: 0.86rem; line-height: 1.65; }
.adm-switch {
  flex: none; width: 52px; height: 30px; padding: 0; border-radius: 999px;
  border: 1px solid var(--stroke-strong); background: var(--glass);
  cursor: pointer; position: relative; transition: 0.25s var(--ease);
}
.adm-switch i {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink-faint); transition: 0.25s var(--ease);
}
.adm-switch:hover { border-color: var(--purple-400); }
.adm-switch.is-on { border-color: transparent; background: linear-gradient(135deg, var(--purple-500), var(--pink)); box-shadow: 0 4px 14px rgba(240, 171, 252, 0.35); }
.adm-switch.is-on i { left: 27px; background: #fff; }
.adm-switch:focus-visible { outline: 2px solid var(--purple-400); outline-offset: 2px; }
.adm-switch:disabled { opacity: 0.6; cursor: default; }
.adm-hint { margin: 0.7rem 0 0; color: var(--ink-faint); font-size: 0.76rem; line-height: 1.6; }

/* 内部分区：待审核 / 最近留言 / 管理员 */
.adm-tabs {
  display: flex; gap: 0.35rem; padding: 0.3rem; border-radius: var(--r-pill);
  border: 1px solid var(--stroke); background: var(--glass);
  overflow-x: auto; scrollbar-width: none;
}
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.5rem 0.8rem; border: none; border-radius: var(--r-pill);
  background: transparent; color: var(--ink-dim); font: inherit; font-size: 0.86rem;
  cursor: pointer; transition: 0.2s var(--ease); white-space: nowrap;
}
.adm-tab:hover { color: var(--ink); }
.adm-tab.is-on { color: #fff; background: linear-gradient(135deg, var(--purple-500), var(--pink)); box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3); }
.adm-tab i {
  font-style: normal; font-size: 0.68rem; font-weight: 700; line-height: 1.5;
  min-width: 1.4em; padding: 0 0.32em; border-radius: var(--r-pill);
  background: var(--glass-strong); color: var(--ink-dim);
}
.adm-tab.is-on i { background: rgba(255, 255, 255, 0.25); color: #fff; }

.adm-view { min-height: 4rem; }
.adm-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; min-height: 2.2rem; }
.adm-bar__sum { font-size: 0.8rem; color: var(--ink-faint); }
.adm-list { display: grid; gap: 0.7rem; margin-top: 0.5rem; }

/* 一张留言卡 */
.adm-item {
  padding: 0.9rem 1rem 0.75rem;
  border-radius: var(--r-md); border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--bg-1) 72%, transparent);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.adm-item:hover { border-color: var(--stroke-strong); }
[data-theme="light"] .adm-item { background: color-mix(in srgb, #fff 82%, transparent); }
.adm-item.is-wait {
  border-color: color-mix(in srgb, var(--gold) 50%, var(--stroke));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 16%, transparent), 0 8px 22px rgba(8, 0, 24, 0.18);
}
.adm-item__head { display: flex; align-items: center; gap: 0.55rem; }
.adm-item__ava {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--purple-500), var(--pink));
}
.adm-item__who { min-width: 0; display: grid; line-height: 1.25; }
.adm-item__who b { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-item__who small { font-size: 0.72rem; color: var(--ink-faint); }
.adm-item__flag {
  margin-left: auto; flex: none; font-size: 0.7rem; padding: 0.14rem 0.5rem; border-radius: var(--r-pill);
  color: var(--gold); border: 1px solid rgba(252, 211, 77, 0.4); background: rgba(252, 211, 77, 0.1);
}
.adm-item__body {
  margin: 0.5rem 0 0; font-size: 0.88rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden;
}
.adm-item.is-open .adm-item__body { -webkit-line-clamp: unset; line-clamp: none; display: block; }
.adm-item__more {
  display: inline-flex; margin-top: 0.3rem; padding: 0; border: none; background: none;
  color: var(--purple-300); font: inherit; font-size: 0.76rem; cursor: pointer; transition: 0.2s var(--ease);
}
.adm-item__more:hover { color: var(--pink); }
.adm-item__meta { margin: 0.45rem 0 0; font-size: 0.76rem; color: var(--ink-faint); }
.adm-item__acts {
  display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end;
  margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px dashed var(--stroke);
}
.adm-item__acts .btn { min-width: 86px; justify-content: center; }
.adm-item__acts .btn:disabled { opacity: 0.6; cursor: default; }
.adm-delbtn { color: var(--coral); border-color: color-mix(in srgb, var(--coral) 40%, transparent); }
.adm-delbtn:hover { color: var(--coral); background: color-mix(in srgb, var(--coral) 12%, transparent); border-color: var(--coral); }
.adm-imgs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.55rem; }
.adm-imgs__b { padding: 0; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--stroke); background: var(--glass); cursor: zoom-in; transition: 0.2s var(--ease); }
.adm-imgs__b:hover { border-color: var(--purple-400); transform: translateY(-1px); }
.adm-imgs__b img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 空态 / 加载态 / 出错态 */
.adm-empty2 {
  display: grid; justify-items: center; gap: 0.3rem; text-align: center;
  padding: 2.2rem 1rem; border-radius: var(--r-md);
  border: 1px dashed var(--stroke-strong); background: var(--glass);
  color: var(--ink-dim);
}
.adm-empty2 svg { width: 36px; height: 32px; color: var(--purple-400); opacity: 0.85; }
.adm-empty2 p { margin: 0.35rem 0 0; font-size: 0.92rem; color: var(--ink); }
.adm-empty2 small { color: var(--ink-faint); font-size: 0.76rem; }
.adm-empty2--load { border-style: solid; border-color: var(--stroke); }
.adm-empty2--load p { margin: 0; color: var(--ink-faint); }

/* 管理员名单与添加 */
.adm-person { display: flex; align-items: center; gap: 0.6rem; padding: 0.62rem 0.2rem; border-bottom: 1px dashed var(--stroke); font-size: 0.9rem; }
.adm-person:last-of-type { border-bottom: none; }
.adm-person__ava {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--purple-500), var(--pink));
}
.adm-person__name { min-width: 0; display: grid; line-height: 1.3; }
.adm-person__name b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-person__name small { color: var(--ink-faint); font-size: 0.72rem; }
.adm-person .board-mine__del { margin-left: auto; flex: none; }
.adm-add { display: flex; gap: 0.5rem; margin-top: 0.9rem; flex-wrap: wrap; }
.adm-add .input { flex: 1; min-width: 180px; }

/* 待审核标记（公开屏 / 我的留言里） */
.board-note.is-wait { border-color: color-mix(in srgb, var(--gold) 55%, var(--stroke)); }
.board-note.is-wait .board-note__who small { color: var(--gold); }
.board-mine__wait {
  margin-left: auto; font-size: 0.7rem; padding: 0.12rem 0.5rem; border-radius: var(--r-pill);
  color: var(--gold); border: 1px solid rgba(252, 211, 77, 0.4); background: rgba(252, 211, 77, 0.1);
}

/* 口令门弹窗 */
.adm-gate__title { margin: 0.55rem 0 0.2rem; }
.adm-gate__sub { margin: 0; color: var(--ink-dim); font-size: 0.86rem; }
.adm-gate__msg { min-height: 1.2em; margin: 0.5rem 0 0; font-size: 0.8rem; color: var(--coral); }
.adm-gate__foot { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 0.9rem; }

/* 留言关键词搜索 */
.adm-search {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  padding: 0.55rem 0.7rem; border-radius: var(--r-md);
  border: 1px solid var(--stroke); background: var(--glass);
  transition: border-color 0.25s var(--ease);
}
.adm-search > svg { width: 16px; height: 16px; flex: none; color: var(--ink-faint); }
.adm-search .input { flex: 1; min-width: 160px; padding: 0.42rem 0.6rem; font-size: 0.86rem; }
.adm-search.is-on { border-color: var(--purple-400); }
.adm-search .btn { flex: none; }
.adm-search .btn svg { width: 13px; height: 13px; }

/* 屏蔽词 */
.adm-wordadd { display: flex; gap: 0.5rem; flex-wrap: wrap; padding: 0.75rem 0.8rem; border-radius: var(--r-md); border: 1px solid var(--stroke); background: var(--glass); }
.adm-wordadd .input { flex: 1; min-width: 200px; }
.adm-words { margin-top: 0.9rem; }
.adm-words__label { margin: 0.8rem 0 0.35rem; font-size: 0.78rem; color: var(--ink-faint); }
.adm-wordchips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.adm-wordchip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.26rem 0.66rem; border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--purple-400) 45%, var(--stroke));
  background: var(--glass); font-size: 0.82rem; color: var(--ink);
}
.adm-wordchip.is-base { border-style: dashed; color: var(--ink-dim); }
.adm-wordchip.is-empty { border-style: dashed; color: var(--ink-faint); }
.adm-wordchip__tag { font-style: normal; font-size: 0.68rem; color: var(--ink-faint); }
.adm-wordchip button {
  display: grid; place-items: center; width: 18px; height: 18px; padding: 0;
  border: none; border-radius: 50%; background: var(--glass-strong);
  color: var(--ink-faint); cursor: pointer; transition: 0.15s var(--ease);
}
.adm-wordchip button:hover { color: var(--coral); background: color-mix(in srgb, var(--coral) 18%, transparent); }
.adm-wordchip button svg { width: 11px; height: 11px; }

/* 站点内容（管理员上传） */
.cms-sec { display: flex; gap: 0.35rem; flex-wrap: wrap; padding: 0.3rem; border-radius: var(--r-pill); border: 1px solid var(--stroke); background: var(--glass); }
.cms-secbtn {
  flex: 1; min-width: 4.6rem; display: inline-flex; align-items: center; justify-content: center;
  padding: 0.45rem 0.7rem; border: none; border-radius: var(--r-pill);
  background: transparent; color: var(--ink-dim); font: inherit; font-size: 0.84rem;
  cursor: pointer; transition: 0.2s var(--ease); white-space: nowrap;
}
.cms-secbtn:hover { color: var(--ink); }
.cms-secbtn.is-on { color: #fff; background: linear-gradient(135deg, var(--purple-500), var(--pink)); box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3); }
.cms-secnote { margin-top: 0.6rem; }
.cms-items { display: grid; gap: 0.35rem; margin-top: 0.35rem; }
.cms-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.7rem; border-radius: var(--r-md); border: 1px dashed var(--stroke); background: var(--glass); font-size: 0.86rem; }
.cms-item__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cms-item__when { flex: none; font-size: 0.72rem; color: var(--ink-faint); }
.cms-item .board-mine__del { flex: none; }
.cms-form { margin-top: 1.1rem; padding: 0.95rem 1rem; border-radius: var(--r-md); border: 1px solid var(--stroke); background: var(--glass); }
.cms-form__title { margin: 0 0 0.7rem; font-size: 0.98rem; font-weight: 700; }
.cms-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 0.8rem; }
.cms-field { display: grid; gap: 0.28rem; min-width: 0; }
.cms-field > span { font-size: 0.76rem; color: var(--ink-dim); }
.cms-field--wide { grid-column: 1 / -1; }
.cms-field .input, .cms-field .textarea { width: 100%; font-size: 0.86rem; }
.cms-field input[type="file"] { padding: 0.35rem 0.5rem; font-size: 0.78rem; color: var(--ink-dim); }
.cms-field input[type="file"]::file-selector-button {
  margin-right: 0.6rem; padding: 0.3rem 0.7rem; border-radius: var(--r-pill);
  border: 1px solid var(--stroke-strong); background: var(--glass-strong); color: var(--ink);
  font: inherit; font-size: 0.78rem; cursor: pointer;
}
.cms-foot { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.9rem; }
.cms-foot .btn:disabled { opacity: 0.6; cursor: default; }
.cms-msg { min-height: 1.2em; font-size: 0.8rem; color: var(--coral); }
.cms-msg.is-good { color: var(--purple-300); }
[data-theme="light"] .cms-msg.is-good { color: var(--purple-500); }
.pw-mine--cms { background: linear-gradient(135deg, var(--purple-500), var(--pink)); }
@media (max-width: 720px) {
  .cms-grid { grid-template-columns: 1fr; }
  .cms-secbtn { min-width: 3.6rem; padding: 0.42rem 0.5rem; font-size: 0.8rem; }
}

@media (max-width: 720px) {
  .adm-switchrow { gap: 0.8rem; }
  .adm-item__acts { justify-content: stretch; }
  .adm-item__acts .btn { flex: 1; }
  .adm-imgs__b { width: 56px; height: 56px; }
  .adm-tab { padding: 0.5rem 0.6rem; }
  .adm-search .input { min-width: 100%; order: 2; }
  .adm-search > svg { order: 1; }
  .adm-search .btn { order: 3; flex: 1; justify-content: center; }
}

/* TOP 手绘插画落地 */
.toy { border-radius: 19px 22px 18px 21px; }
.toy__art { isolation: isolate; min-height: 150px; padding: 10px; background: #fffdf6; border-radius: 14px 17px 13px 16px; }
.toy__art .toy-img { max-width: 140px; aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; }
.toy__art .toy-book { max-width: 150px; mix-blend-mode: multiply; }
.toy-img { object-fit: contain; }
.toy-gacha__stage:has(.toy-img), .toy-evolve__art:has(.toy-img) { isolation: isolate; background: #fffdf6; border-radius: 18px; }
.toy-gacha__stage .toy-img { mix-blend-mode: multiply; }
.toy-wish__bigsvg.toy-img { border-radius: 24px; background: #fffdf6; }
.bookdlg .toy-bookstage {
  background: radial-gradient(ellipse at 50% 40%, #f0e7ff, transparent 65%), #fffdf6;
  border-color: #d8c7ed;
}
.bookdlg .toy-bookstage__art .toy-svg { filter: none; mix-blend-mode: multiply; }
.bookdlg .toy-answer { color: #554164; background: #fffdf6; border-color: #d4bee8; }
.bookdlg .toy-answer::before { background: #fffdf6; color: #a78bfa; }
.toy-book--illustrated .toy-book__leaf { fill: #fffdf6; stroke: #9b83b6; stroke-width: .65; }
.bookcard { width: clamp(90px, 10.5vw, 128px); height: clamp(138px, 15.5vw, 194px); }
.bookcard__front, .bookcard__back, .bookcard__pages { --ink: #514261; --ink-dim: #665573; --purple-300: #8165b6; --bk-ink: #8165b6; background-color: #fffdf6; }
.bookcard__front { background: #fffdf6; border-color: #ae94c5; box-shadow: 2px 4px 0 #d6c8e3, 0 7px 15px rgba(36,15,55,.17); }
.bookcard__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; mix-blend-mode: multiply; pointer-events: none; }
.bookcard__spine { position: relative; width: 7px; border-color: #ac96c1; background: transparent; }
.bookcard__face { padding: .55rem .5rem .6rem .45rem; }
.bookcard__title { font-size: clamp(.72rem, .92vw, .88rem); line-height: 1.35; -webkit-line-clamp: 4; margin-top: .26rem; }
.bookcard__eyebrow { color: #8065a4; }
.bookcard__count { color: #665573; font-size: .61rem; }
.bookcard__bar { border-color: #bca5d4; background: #eee6f8; }
.bookcard__bar i { background: #a78bfa; }
.bookcard__mark { display: none; }
.fd-card.fd-card--tpl-star { --paper-edge: rgba(0,0,0,.23); }
@media (max-width: 520px) {
  .toy__art { min-height: 120px; padding: 6px; }
  .toy__art .toy-img { max-width: 118px; }
  .bookcard { width: clamp(86px, 25vw, 112px); height: clamp(142px, 41vw, 184px); }
  .bookcard__title { font-size: .73rem; }
  .bookcard__eyebrow { font-size: .49rem; }
  .bookcard__count { font-size: .59rem; }
  .bookcard__front { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  #fam-book-art .toy-book__cover, #fam-book-art .toy-book__spread { transition: opacity .15s ease; }
}

/* 浅色纸面自行设置文字颜色，避免继承深色主题文字。 */
.bookcard__front { color: #514261; }
.bookcard__title { color: #514261; }
#fam-book-art { isolation: isolate; background: #fffdf6; border-radius: 18px; }
.toy__art .toy-img--book { aspect-ratio: 3 / 4; max-width: 94px; height: 136px; }
.wish3d:has(> .toy-img), .evolve3d:has(.toy-img) { isolation: isolate; background: #fffdf6; }
.wish3d > .toy-img, .evolve3d .toy-img { mix-blend-mode: multiply; }

.fd-detail[class*="fd-card--tpl-"] { position: relative; color: var(--ink); }
.fd-detail.fd-card--tpl-star { --paper-edge: rgba(0,0,0,.23); }
/* 书脊阴影止于纸面，柔化上下端。 */
#fam-book-art::before { left: 47%; width: 6%; top: 27%; height: 48%; border-radius: 50%; mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }

.bookdlg__draw { transition: transform .3s var(--ease); }

/* 八个玩具入口：原插画显示为紫色线稿，图标区域使用透明底。 */
#fam-toys .toy__art { background: transparent; }
#fam-toys .toy__art .toy-img {
  mix-blend-mode: normal;
  filter: url(#fam-toy-purple-outline);
}
#fam-toy-purple-outline feFlood { flood-color: var(--purple-400); }
[data-theme="light"] #fam-toy-purple-outline feFlood { flood-color: var(--purple-600); }

/* 饭桌：保持数据/座位次序，扩展实际点击区并让窄屏菜盘自然撑开。 */
.dinner__seat { min-width:44px; min-height:44px; }
.dinner__dish { min-width:44px; min-height:44px; font-family:inherit; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.dinner__dish:focus-visible, .dinner__seat:focus-visible, .dinner__bar .btn:focus-visible { outline:2px solid var(--pink); outline-offset:3px; }
.dinner__bar .btn:active, .dinner__dish:active { transform:translateY(1px); }
.dinner__talk, .dinner__birthday { overflow-wrap:anywhere; }
.dinner__dishes > li { min-width:0; }
@media (max-width:720px) {
  .dinner__room { min-height:340px; }
  .dinner__scene { position:relative; min-height:340px; padding:160px 24px 62px; }
  .dinner__tablebox { position:relative; left:auto; bottom:auto; transform:none; width:100%; height:auto; min-height:180px; padding:20px 12px 32px; }
  .dinner__dishes { position:static; transform:none; width:100%; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .dinner__dish { width:100%; justify-content:center; padding:6px; }
  .dinner__seats { top:78px; height:64px; }
  .dinner__seat--0 { left:10%; top:0; }
  .dinner__seat--1 { left:30%; top:0; }
  .dinner__seat--2 { left:50%; top:0; }
  .dinner__seat--3 { left:70%; top:0; }
  .dinner__seat--4 { left:90%; top:0; }
  .dinner__hint { top:60px; }
  .dinner__birthday { max-width:calc(100% - 24px); border-radius:12px; }
}
@media (prefers-reduced-motion:reduce) { .dinner__seat, .dinner__dish { transition:none; } }

.model-progress { position:absolute; inset:12px 10px auto; z-index:4; text-align:center; font-size:.85rem; color:var(--ink); background:var(--glass); border-radius:12px; padding:8px; pointer-events:none; }

/* 活跃面板内屏外内容允许跳过排版；面板本身仍由 hidden/display:none 管理。 */
.vgrid > .vcard { content-visibility:auto; contain-intrinsic-size:auto 360px; }
.sgrid > .scard { content-visibility:auto; contain-intrinsic-size:auto 160px; }

#fam-au .au-card { content-visibility:auto; contain-intrinsic-size:auto 260px; }


/* 小登今天吃什么 · 仅饭桌场景的视觉细化，沿用原有节点、状态与交互。 */
#fam-dinner .dinner__room {
  --dinner-wall-top: #403447;
  --dinner-wall-bottom: #64505e;
  --dinner-floor: #493643;
  --dinner-floor-line: rgba(245, 217, 189, 0.065);
  border: 1px solid rgba(242, 213, 184, 0.42);
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 87% 15%, rgba(255, 216, 157, 0.28), transparent 42%),
    radial-gradient(ellipse at 12% 22%, rgba(242, 221, 203, 0.12), transparent 40%),
    linear-gradient(180deg, var(--dinner-wall-top), var(--dinner-wall-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 245, 230, 0.28), 0 12px 32px rgba(34, 17, 36, 0.18);
  isolation: isolate;
}
#fam-dinner .dinner__room--morning {
  --dinner-wall-top: #e8d8cb;
  --dinner-wall-bottom: #cdb6b6;
  --dinner-floor: #ab8380;
  --dinner-floor-line: rgba(255, 239, 211, 0.14);
}
#fam-dinner .dinner__room--day {
  --dinner-wall-top: #eee4d6;
  --dinner-wall-bottom: #d5c5c9;
  --dinner-floor: #b79a92;
  --dinner-floor-line: rgba(255, 245, 222, 0.16);
}
#fam-dinner .dinner__room--dusk {
  --dinner-wall-top: #84646e;
  --dinner-wall-bottom: #b5867d;
  --dinner-floor: #76545c;
  --dinner-floor-line: rgba(255, 228, 198, 0.10);
}
#fam-dinner .dinner__room::before {
  content: "";
  position: absolute;
  inset: 58% 0 0;
  z-index: 0;
  pointer-events: none;
  border-top: 5px solid rgba(255, 232, 205, 0.25);
  background:
    repeating-linear-gradient(90deg, transparent 0 119px, var(--dinner-floor-line) 119px 120px),
    repeating-linear-gradient(0deg, transparent 0 28px, var(--dinner-floor-line) 28px 29px),
    linear-gradient(180deg, rgba(38, 20, 32, 0.10), transparent 30%),
    var(--dinner-floor);
  box-shadow: 0 -1px 0 rgba(70, 40, 43, 0.15), inset 0 8px 14px rgba(59, 31, 35, 0.08);
}
#fam-dinner .dinner__room::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  left: 50%; bottom: 12px;
  width: min(670px, 90%); height: 34%;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 5px double rgba(255, 235, 211, 0.25);
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 241, 220, 0.035) 3px 4px),
    rgba(237, 202, 179, 0.13);
  box-shadow: 0 4px 12px rgba(43, 23, 30, 0.08);
}
#fam-dinner .dinner__window {
  z-index: 1;
  width: min(156px, 15%); height: 27%; top: 7%;
  border: 5px solid #f4dfc8;
  border-radius: 38px 38px 9px 9px;
  background: linear-gradient(180deg, #39365e, #8a779d);
  box-shadow: 0 0 0 1px rgba(106, 72, 66, 0.25), inset 0 0 20px rgba(241, 230, 220, 0.16), 0 7px 0 -3px #c5a58e, 0 10px 18px rgba(76, 48, 48, 0.13);
  pointer-events: none;
}
#fam-dinner .dinner__window::before {
  content: "";
  position: absolute; z-index: 1; inset: -2px;
  border-radius: 32px 32px 4px 4px;
  background:
    linear-gradient(90deg, transparent 48%, #f4dfc8 48% 52%, transparent 52%),
    linear-gradient(180deg, transparent 54%, #f4dfc8 54% 59%, transparent 59%),
    repeating-linear-gradient(90deg, #d2b6b4 0 4px, #e7c9c1 4px 8px) left top / 16% 100% no-repeat,
    repeating-linear-gradient(90deg, #e7c9c1 0 4px, #d2b6b4 4px 8px) right top / 16% 100% no-repeat;
  box-shadow: inset 0 3px 0 rgba(255, 249, 229, 0.35);
}
#fam-dinner .dinner__window::after {
  left: 68%; top: 30%; width: 20px; height: 20px;
  background: #fff5d4;
  box-shadow: 0 0 16px rgba(255, 228, 170, 0.55);
}
#fam-dinner .dinner__room--morning .dinner__window { background: linear-gradient(180deg, #f6c6ae, #ffe7bd); }
#fam-dinner .dinner__room--day .dinner__window { background: linear-gradient(180deg, #b7d2da, #eaf0dc); }
#fam-dinner .dinner__room--dusk .dinner__window { background: linear-gradient(180deg, #a191b5, #ffc59e); }
#fam-dinner .dinner__lamp {
  z-index: 1; height: 47px;
  background: #b89a7f;
  pointer-events: none;
}
#fam-dinner .dinner__lamp::before {
  content: ""; position: absolute; left: 50%; top: 63px;
  width: 150px; height: 126px; transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 0, rgba(255, 220, 161, 0.26), transparent 70%);
}
#fam-dinner .dinner__lamp::after {
  top: 45px; width: 66px; height: 35px;
  border-radius: 30px 30px 9px 9px;
  border: 1px solid rgba(176, 130, 80, 0.42);
  background:
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(194, 139, 81, 0.12) 6px 7px),
    linear-gradient(180deg, #fae2ba, #f0c88f);
  box-shadow: inset 0 -4px 0 #fff0ce, 0 10px 26px 8px rgba(255, 218, 153, 0.28);
}
#fam-dinner .dinner__scene { z-index: 2; }
#fam-dinner .dinner__seats { pointer-events: none; }
#fam-dinner .dinner__tablebox {
  border: 1px solid #e8bd87;
  background:
    radial-gradient(ellipse at 42% 20%, rgba(255, 239, 204, 0.48), transparent 64%),
    repeating-linear-gradient(2deg, transparent 0 7px, rgba(117, 68, 35, 0.045) 7px 8px, transparent 8px 15px),
    linear-gradient(180deg, #d6a36d, #bc8859 72%, #a9754e);
  box-shadow: inset 0 4px 0 rgba(255, 235, 196, 0.45), inset 0 -8px 18px rgba(115, 66, 40, 0.12), 0 12px 0 -3px #906044, 0 14px 0 -3px #d0a174, 0 25px 24px -8px rgba(55, 30, 36, 0.30);
}
#fam-dinner .dinner__tablebox::before {
  content: ""; position: absolute; pointer-events: none;
  inset: 12px 18%; border-radius: 50%;
  border: 1px dashed rgba(131, 96, 69, 0.38);
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(160, 116, 73, 0.045) 3px 4px),
    rgba(255, 238, 206, 0.58);
  box-shadow: 0 0 0 5px rgba(255, 238, 206, 0.40);
}
#fam-dinner .dinner__dishes { z-index: 1; }
#fam-dinner .dinner__dish {
  border-radius: 18px;
  border: 1px solid #e0c6a5;
  background: linear-gradient(180deg, #fffdf5, #f6ead8);
  color: #614735; line-height: 1.45;
  box-shadow: inset 0 0 0 3px rgba(255, 253, 245, 0.8), 0 3px 0 #caa785, 0 5px 9px rgba(99, 60, 38, 0.14);
}
#fam-dinner .dinner__dish:hover {
  background: #fffaf0; border-color: #bc9371;
  box-shadow: inset 0 0 0 3px #fffdf7, 0 3px 0 #caa785, 0 8px 12px rgba(99, 60, 38, 0.18);
}
#fam-dinner .dinner__dish.is-pick { outline-color: #875c84; background: #fff3e8; }
#fam-dinner .dinner__hint {
  z-index: 1; top: 64px; padding: 0 12px;
  color: #73513d; font-size: 0.82rem; line-height: 1.8;
  text-shadow: 0 1px 0 rgba(255, 246, 224, 0.5);
}
#fam-dinner .dinner__hint::before {
  content: ""; display: block; margin: 0 auto 12px;
  width: 42px; height: 15px; border-radius: 50%;
  border: 3px double #bb9473;
  background: #fff7e7;
  box-shadow: 0 4px 0 -1px #e7ccaa, 0 8px 9px -4px rgba(109, 71, 45, 0.22);
}
#fam-dinner .dinner__seat {
  pointer-events: auto;
  --seat-accent: #ab8aa8;
  gap: 5px; padding: 8px 10px 7px;
  min-width: 64px; border-radius: 20px 20px 14px 14px;
  border: 1px solid #f0d9bd;
  background: linear-gradient(160deg, #fff9ed, #f4e4d0);
  color: #634b42;
  box-shadow: inset 0 1px 0 #fffdf6, 0 3px 0 rgba(161, 116, 90, 0.46), 0 7px 12px rgba(59, 36, 38, 0.15);
  backdrop-filter: none;
}
#fam-dinner .dinner__seat[data-dinner-seat="zuohang"] { --seat-accent: #719cba; }
#fam-dinner .dinner__seat[data-dinner-seat="zhangzeyu"] { --seat-accent: #86a187; }
#fam-dinner .dinner__seat[data-dinner-seat="zhangji"] { --seat-accent: #cf9a69; }
#fam-dinner .dinner__seat[data-dinner-seat="zhuzhixin"] { --seat-accent: #bc929f; }
#fam-dinner .dinner__seat[data-dinner-seat="suxinhao"] { --seat-accent: #a093be; }
#fam-dinner .dinner__seatface {
  width: 30px; height: 30px;
  border: 2px solid #fff9ef;
  outline: 1px solid var(--seat-accent);
  box-shadow: 0 2px 4px rgba(89, 53, 42, 0.12);
}
#fam-dinner .dinner__seat b { white-space: nowrap; font-size: 0.72rem; line-height: 1.5; letter-spacing: 0.025em; }
#fam-dinner .dinner__seat:hover, #fam-dinner .dinner__seat:focus-visible {
  background: #fffaf0; border-color: var(--seat-accent);
  box-shadow: inset 0 1px 0 #fffdf6, 0 3px 0 rgba(161, 116, 90, 0.46), 0 9px 18px rgba(59, 36, 38, 0.22);
}
#fam-dinner .dinner__seat:focus-visible, #fam-dinner .dinner__dish:focus-visible { outline: 2px solid #875c84; outline-offset: 4px; }
#fam-dinner .dinner__birthday { background: #fff0cd; border-color: #d9b477; color: #7e5734; box-shadow: 0 2px 6px rgba(60, 38, 32, 0.1); }
@media (max-width: 720px) {
  #fam-dinner .dinner__room { border-radius: 22px; }
  #fam-dinner .dinner__window { width: 68px; height: 82px; top: 20px; left: 20px; border-width: 4px; border-radius: 26px 26px 7px 7px; }
  #fam-dinner .dinner__window::before { border-radius: 22px 22px 3px 3px; }
  #fam-dinner .dinner__lamp { right: 14%; height: 38px; }
  #fam-dinner .dinner__lamp::after { top: 36px; width: 54px; height: 30px; }
  #fam-dinner .dinner__lamp::before { top: 56px; width: 100px; }
  #fam-dinner .dinner__scene { padding: 196px 24px 62px; }
  #fam-dinner .dinner__seats { top: 119px; height: 66px; }
  #fam-dinner .dinner__seat { min-width: 44px; gap: 4px; padding: 7px 4px 6px; border-radius: 17px 17px 12px 12px; }
  #fam-dinner .dinner__seatface { width: 27px; height: 27px; }
  #fam-dinner .dinner__seat b { font-size: 0.7rem; letter-spacing: 0; }
  #fam-dinner .dinner__hint { top: 61px; font-size: 0.76rem; padding: 0 14px; }
  #fam-dinner .dinner__tablebox::before { inset: 12px 12%; }
  #fam-dinner .dinner__dishes { position: relative; inset: auto; }
  #fam-dinner .dinner__dish { border-radius: 15px; }
}

/* TOP 页手机布局；所有调整只在手机宽度内生效。 */
@media (max-width: 560px) {
  .page-head__grid .page-head__shot {
    justify-self: center;
    margin-inline: auto;
  }

  #member-grid {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.75rem 0.25rem 1.25rem;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0.25rem;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #member-grid::-webkit-scrollbar { display: none; }
  #member-grid > .mcard {
    flex: 0 0 min(320px, calc(100% - 2rem));
    scroll-snap-align: start;
  }

  #group-intro { white-space: normal; }
  #group-intro .group-intro__paragraph { display: block; text-indent: 2em; }

  #group-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; }
  #group-facts .fact { zoom: 0.75; min-width: 0; }
  #group-facts .fact small { font-size: 0.85rem; letter-spacing: 0.04em; }

  #timeline .toolbar { padding: 0.65rem 0.75rem; gap: 0.65rem; }
  #tl-filter .filter-bar__row { gap: 0.25rem; }
  #tl-filter .filter-btn { min-height: 34px; font-size: 0.75rem; padding: 0.25rem 0.65rem; }
  #timeline .toolbar .btn { min-height: 34px; font-size: 0.75rem; padding: 0.3rem 0.7rem; }
  #timeline .toolbar .btn svg { width: 14px; height: 14px; }
  #tl-list .tl__date { font-size: 0.75rem; letter-spacing: 0.08em; }
  #tl-list .tl__title { font-size: 1rem; line-height: 1.5; }
  #tl-list .tl__desc, #tl-list .tl__more { font-size: 0.875rem; line-height: 1.75; }
  #tl-list .chip { min-height: 0; font-size: 0.72rem; padding: 0.2rem 0.55rem; }

  #tl-releases {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }
  #tl-releases .release {
    min-width: 0;
    padding: 0.5rem;
    gap: 0.45rem;
    border-radius: 0.9rem;
  }
  #tl-releases .release__title { font-size: 0.8rem; line-height: 1.4; }
  #tl-releases .release__type { font-size: 0.6875rem; letter-spacing: 0.04em; }
  #tl-releases .release__meta { font-size: 0.6875rem !important; line-height: 1.5; }
  #tl-releases .release__type,
  #tl-releases .release__tags,
  #tl-releases .release__meta:not(:last-child) { display: none; }
  #tl-releases .release__play {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
  }
  #tl-releases .release__play:hover { transform: translate(-50%, -50%) scale(1.12); }

  #honor-case .case__shelf {
    zoom: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  #honor-case .honor { width: 100%; align-self: start; }
  #honor-case .honor__plaque b { font-size: 0.95rem; }
  #honor-case .honor__plaque small { font-size: 0.7rem; letter-spacing: 0.06em; }
  #honor-case .honor__tag, #honor-case .honor__hint { font-size: 0.75rem; }
}
/* 滑动卡片不对移动背景反复模糊采样；保留翻面与原有色调。 */
@media (max-width: 560px) {
  .mgrid .mcard__face { backdrop-filter: none; -webkit-backdrop-filter: none; background: #24133b; }
  .mgrid .mcard__face--back { background: linear-gradient(160deg, #392253, #29163f); }
  [data-theme="light"] .mgrid .mcard__face { background: #faf6ff; }
  [data-theme="light"] .mgrid .mcard__face--back { background: linear-gradient(160deg, #f2e8ff, #fff8ff); }
  .mgrid.is-swiping .mcard__avatar::after { animation-play-state: paused; }
}

/* 手机页内说明与标题收紧。 */
@media (max-width: 560px) {
  #birthdays .section__sub { display: none; }
  #birthdays .section__head { margin-bottom: 0.5rem; }
  #birthdays .section__title { margin-bottom: 0; }
  #birthday-grid { gap: 0.65rem; }
  #honor-case .honor-case__desktop-suffix { display: none; }
}

/* 影像馆手机布局：标题与官方链接同行，搜索与随机按钮同行。 */
@media (max-width: 560px) {
  .gallery-page .page-head { padding-bottom: 0.5rem; }
  .gallery-page .page-head > .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
  }
  .gallery-page .page-head .eyebrow { display: none; }
  .gallery-page .page-head__title { margin: 0; font-size: 1.7rem; }
  .gallery-page #gl-space-btn { min-height: 40px; padding: 0.45rem 0.65rem; font-size: 0.75rem; }
  .gallery-page #gl-space-btn svg { width: 16px; height: 16px; }
  .gallery-page .gallery-controls { padding: 0.65rem 0 0.75rem !important; }
  .gallery-page .gal-bar { flex-wrap: nowrap; gap: 0.5rem; margin-bottom: 0; }
  .gallery-page .gal-bar .vsearch { flex: 1 1 0; width: auto; min-width: 0; }
  .gallery-page .gal-bar > div:last-child { display: contents; }
  .gallery-page #v-random { flex: 0 0 auto; white-space: nowrap; font-size: 0.75rem; padding-inline: 0.55rem; }
  .gallery-page #v-random svg { width: 14px; height: 14px; }

  .gallery-page #v-blocks .section__head { margin: 0; }
  .gallery-page #v-blocks .section__head .eyebrow,
  .gallery-page #v-blocks .section__sub { display: none; }
  .gallery-page .vblock { padding-block: 0.85rem 1.5rem; }
  .gallery-page .gal-picks-bar { gap: 0.35rem; margin-bottom: 0.65rem; }
  .gallery-page .gal-picks-bar .filter-btn { min-height: 34px; padding: 0.3rem 0.7rem; font-size: 0.75rem; }
  .gallery-page .vcount { font-size: 0.75rem; margin: 0.45rem 0 0.75rem; }

  .gallery-page .vgrid, .gallery-page .sgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
  .gallery-page .vcard, .gallery-page .scard { min-width: 0; }
  .gallery-page .vcard__body, .gallery-page .scard__body { padding: 0.65rem; gap: 0.4rem; }
  .gallery-page .vcard__title, .gallery-page .scard__name {
    font-size: 0.875rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }
  .gallery-page .vcard__note, .gallery-page .scard__desc {
    font-size: 0.78rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }
  .gallery-page .vcard__meta, .gallery-page .vcard__series { font-size: 0.72rem; line-height: 1.5; }
  .gallery-page .vcard__meta { flex-wrap: wrap; gap: 0.2rem; }
}

/* 手机拍立得墙放大约七分之一，窄屏保留两侧边缘。 */
@media (max-width: 560px) {
  #panel-pailide .pw-room {
    zoom: 1.142857;
    width: calc((100vw - 24px) * 0.94);
    max-width: calc((100vw - 4px) * 0.875);
    margin-inline: 0;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* 倾听我：仅手机端压紧首屏、横滑分类与双列故事信卡。 */
@media (max-width: 560px) {
  .listen-page .page-head { padding-bottom: 0; }
  .listen-page .page-head__title { margin-bottom: 0; }
  .listen-page > .section { padding-top: 0.65rem !important; }
  .listen-page .let-toggle { flex-wrap: nowrap; gap: 0.25rem; margin-bottom: 0.9rem; }
  .listen-page .let-toggle .filter-btn { min-height: 36px; padding: 0.4rem 0.45rem; font-size: 0.75rem; white-space: nowrap; }

  .listen-page .let-pickbar,
  .listen-page .let-subtabs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .listen-page .let-pickbar::-webkit-scrollbar,
  .listen-page .let-subtabs::-webkit-scrollbar { display: none; }
  .listen-page .let-pickbar { margin-bottom: 0.9rem; }
  .listen-page .let-pickbar__btn,
  .listen-page .let-subtabs .filter-btn { flex: 0 0 auto; white-space: nowrap; }

  .listen-page #letter-view[data-mode="story"] .let-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
  .listen-page #letter-view[data-mode="story"] .let-card { min-width: 0; padding: 0.7rem; gap: 0.45rem; }
  .listen-page #letter-view[data-mode="story"] .let-card__title { font-size: 0.875rem; line-height: 1.5; }
  .listen-page #letter-view[data-mode="story"] .let-card__stamp { font-size: 0.68rem; padding: 0.18rem 0.4rem; white-space: nowrap; }
  .listen-page #letter-view[data-mode="story"] .let-card__env { width: 32px; height: 32px; }
  .listen-page #letter-view[data-mode="story"] .let-card__env svg { width: 20px; height: 20px; }
  .listen-page #letter-view[data-mode="story"] .let-card .chip { min-height: 0; padding: 0.2rem 0.45rem; font-size: 0.68rem; }
  .listen-page #letter-view[data-mode="story"] .let-card__who,
  .listen-page #letter-view[data-mode="story"] .let-card__meta { font-size: 0.72rem; }
  .let-sheet__body { font-size: 0.875rem; line-height: 1.9; }
}

/* 小登一家：手机端统一横版入口卡、紧凑许愿瓶和进化史。 */
@media (max-width: 560px) {
  .house-page .house__walls { padding-top: 2rem; }
  .house-page .house-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
    padding-left: 0;
    margin: 0 auto 0.7rem;
    translate: none;
  }
  .house-page .house-intro__text { margin-left: 0; }
  .house-page .house-intro__shot {
    width: 68px;
    max-width: 68px;
    justify-self: end;
    margin-right: 0.3rem;
    rotate: 0deg;
    translate: none;
  }
  .house-page .house-intro__shot:hover { translate: 0 -2px; }
  .house-page #fam-toys .toy {
    grid-template-columns: 108px minmax(0, 1fr);
    align-items: center;
    min-height: 132px;
    gap: 0.75rem;
    padding: 0.7rem 0.8rem;
  }
  .house-page #fam-toys .toy__art { min-height: 108px; padding: 0; }
  .house-page #fam-toys .toy__art .toy-img { max-width: 104px; max-height: 104px; }
  .house-page #fam-toys .toy__art .toy-img--book { width: auto; max-width: 76px; height: 104px; }
  .house-page #fam-toys .toy__meta b { font-size: 0.96rem; line-height: 1.5; }
  .house-page #fam-toys .toy__meta small { font-size: 0.75rem; line-height: 1.5; }

  .wishdlg.modal__pad { padding-top: 0.8rem; padding-bottom: 0.5rem; }
  .wishdlg .modal__title { margin-bottom: 0.25rem; }
  .wishdlg .toy-wish { gap: 0.25rem; }
  .wishdlg .toy-wish__bottle { padding: 0; }
  .wishdlg .wish3d { height: clamp(210px, 34dvh, 235px); }
  .wishdlg .toy-wish__count { margin-top: 0.4rem; }
  .wishdlg .kitchen__actions { margin: 0.35rem 0; }
  .wishdlg .toy-wish__side .kitchen__actions { margin-top: 0.25rem !important; }
  .lovedlg.modal__pad { padding-top: 1.35rem; }
  .lovedlg .modal__title { margin-bottom: 0.45rem; }

  .evolvedlg__track { width: calc(var(--evolve-pages, 2) * 100%); }
  .evolvedlg__page { flex-basis: calc(100% / var(--evolve-pages, 2)); width: calc(100% / var(--evolve-pages, 2)); }
  .evolvedlg__mobile-page .evolve3d__cell { width: calc(100% - 48px); }
  .evolvedlg__mobile-page .evi-grid { grid-template-columns: minmax(0, 1fr); padding-right: 0; margin-top: 0.7rem; }
  .evolvedlg__nav { top: 118px; right: 0.25rem; }
  .evolvedlg__page .evolvedlg__mystery { width: calc(100% - 48px); height: clamp(220px, 32vh, 300px); margin-bottom: 0.7rem; }
  .evolvedlg__page .evi-grid { padding-right: 0; }
}

/* 三个大弹窗在手机上使用横屏布局：竖拿时旋转弹窗，横拿时自然铺开。 */
@media (max-width: 560px), (max-width: 940px) and (max-height: 560px) {
  #global-modal:has(.mapdlg),
  #global-modal:has(.gachadlg),
  #global-modal:has(.closetdlg) { padding: 0; grid-template-columns: minmax(0, 1fr); }
  #global-modal:has(.mapdlg) .modal__box,
  #global-modal:has(.gachadlg) .modal__box,
  #global-modal:has(.closetdlg) .modal__box { max-width: none; max-height: none; animation: none; overflow: hidden; }
  #global-modal:has(.mapdlg) .modal__content,
  #global-modal:has(.gachadlg) .modal__content,
  #global-modal:has(.closetdlg) .modal__content { height: 100%; overflow: hidden; scrollbar-gutter: auto; }
  #global-modal:has(.mapdlg) .modal__content > :first-child,
  #global-modal:has(.gachadlg) .modal__content > :first-child,
  #global-modal:has(.closetdlg) .modal__content > :first-child { padding-top: 0.5rem; }
  #global-modal:has(.mapdlg) .modal__close,
  #global-modal:has(.gachadlg) .modal__close,
  #global-modal:has(.closetdlg) .modal__close { top: 0.25rem; right: 0.25rem; width: 34px; height: 34px; }

  #global-modal:has(.mapdlg) .modal__pad { padding: 0.5rem; }
  #global-modal:has(.mapdlg) .modal__content { display: flex; }
  .mapdlg { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
  .mapdlg__body { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 0.9fr); gap: 0.45rem; flex: 1; min-height: 0; }
  .mapdlg__stage { min-height: 0; margin-bottom: 0; padding: 0.35rem; }
  .map-svg { flex: 1 1 0; width: 100%; height: auto; min-height: 0; }
  .map-stops { height: 100%; max-height: none; min-height: 0; overflow-y: auto; padding-top: 35px; }
  .map-hud { gap: 0.3rem; padding: 0.25rem 0.2rem 0; }
  .map-hud__city { font-size: 1rem; }
  .map-hud__date, .map-hud__title { font-size: 0.68rem; }
  .map-ctrls { gap: 0.25rem; padding: 0.1rem 0.2rem; }
  .map-ctrls .btn { min-height: 32px; padding: 0.25rem 0.45rem; }
  .mapdlg > .kitchen__foot { margin: 0.15rem 0 0; font-size: 0.6rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .gachadlg.modal__pad, .closetdlg.modal__pad { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 0.5rem 0.7rem; }
  .gachadlg .modal__title, .closetdlg .modal__title { flex: none; margin-bottom: 0.15rem; font-size: 1rem; line-height: 1.3; }
  .gachadlg .kitchen__lead { flex: none; margin-bottom: 0.25rem; font-size: 0.65rem; line-height: 1.3; max-height: 2.6em; overflow: hidden; }
  .gachadlg .toy-gacha, .closetdlg .closet__layout { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); grid-template-rows: minmax(0, 1fr); gap: 0.55rem; flex: 1; min-height: 0; }
  .gachadlg .toy-gacha__stage { width: 100%; height: 100%; min-height: 0; padding: 0.2rem; }
  .gachadlg .toy-gacha__side, .closetdlg .closet__side { min-height: 0; height: 100%; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
  .gachadlg .toy-gacha__side, .closetdlg .closet__side, .map-stops { scrollbar-width: thin; scrollbar-color: var(--purple-400) transparent; }
  .gachadlg .toy-gacha__side::-webkit-scrollbar, .closetdlg .closet__side::-webkit-scrollbar, .map-stops::-webkit-scrollbar { width: 4px; height: 4px; }
  .gachadlg .toy-gacha__side::-webkit-scrollbar-thumb, .closetdlg .closet__side::-webkit-scrollbar-thumb, .map-stops::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--purple-400); }
  .gachadlg > .kitchen__actions, .closetdlg > .kitchen__actions { flex: none; margin: 0.3rem 0 0; gap: 0.35rem; }
  .gachadlg > .kitchen__actions .btn, .closetdlg > .kitchen__actions .btn { min-height: 34px; padding: 0.3rem 0.6rem; }
  .closetdlg .closet__coins { flex: none; margin: 0.1rem 0 0.2rem; font-size: 0.72rem; }
  .closetdlg .closet__layout { margin-top: 0; }
  .closetdlg .closet__stage { height: 100%; min-height: 0; }
  .closetdlg > .kitchen__foot { display: none; }
}
@media (max-width: 560px) and (orientation: portrait) {
  #global-modal:has(.mapdlg) .modal__box,
  #global-modal:has(.gachadlg) .modal__box,
  #global-modal:has(.closetdlg) .modal__box {
    width: calc(100dvh - 24px);
    height: calc(100vw - 24px);
    transform: rotate(90deg);
  }
}
@media (max-width: 940px) and (max-height: 560px) and (orientation: landscape) {
  #global-modal:has(.mapdlg) .modal__box,
  #global-modal:has(.gachadlg) .modal__box,
  #global-modal:has(.closetdlg) .modal__box {
    width: calc(100vw - 24px);
    height: calc(100dvh - 24px);
    transform: none;
  }
}

/* 小登一家：拍立得贴近标题；横屏弹窗把操作键收在角落。 */
@media (max-width: 560px) {
  #global-modal:has(#fam-pola-wall) { place-items: start center; }
  #global-modal:has(#fam-pola-wall) .modal__content > .modal__pad {
    padding-top: 0.8rem;
  }
  #global-modal:has(#fam-pola-wall) .modal__title {
    margin-bottom: 0.45rem;
  }
  #fam-pola-wall { padding-top: 0.7rem; }
}
@media (max-width: 560px), (max-width: 940px) and (max-height: 560px) {
  .gachadlg > .kitchen__actions,
  .closetdlg > .kitchen__actions {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  .gachadlg > .kitchen__actions .btn,
  .closetdlg > .kitchen__actions .btn {
    flex: 0 0 24%;
    width: 24%;
    min-width: 0;
    min-height: 28px;
    padding: 0.22rem 0.55rem;
    font-size: 0.68rem;
    line-height: 1.15;
    white-space: nowrap;
  }
  .gachadlg > .kitchen__actions [data-modal-close],
  .closetdlg > .kitchen__actions [data-modal-close] { display: none; }
  .gachadlg .toy-gacha__side,
  .closetdlg .closet__side { touch-action: none; cursor: grab; }
  .gachadlg .toy-gacha__side.is-dragging,
  .closetdlg .closet__side.is-dragging { cursor: grabbing; }
}
@media (max-width: 560px) and (orientation: portrait) {
  .closetdlg > .kitchen__actions { justify-content: flex-end; }
}

.mapdlg__mobile-tools { display: none; }
.fam-phone-pop { grid-template-columns: minmax(0, 1fr); padding: 0; background: rgba(8, 0, 22, 0.72); backdrop-filter: blur(8px); }
.fam-phone-pop__card {
  position: relative; display: flex; flex-direction: column; min-height: 0;
  width: min(530px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 0.8rem; border: 1px solid var(--stroke-strong); border-radius: 18px;
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.fam-phone-pop__card .modal__close { top: 0.35rem; right: 0.35rem; width: 30px; height: 30px; }
.fam-phone-pop__title { flex: none; margin: 0 2rem 0.4rem 0; font-size: 0.95rem; line-height: 1.4; }
.fam-phone-pop__content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: none; cursor: grab; }
.fam-phone-pop__content.is-dragging { cursor: grabbing; }
.fam-phone-pop__actions { display: flex; flex: none; gap: 0.5rem; margin-top: 0.6rem; }
.fam-phone-pop__actions .btn { flex: 1; min-height: 32px; padding: 0.35rem 0.7rem; font-size: 0.75rem; white-space: nowrap; }
.fam-phone-pop--dinner .fam-phone-pop__card { width: min(530px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); transform: none; }
.fam-phone-pop--dinner .dinner__serve { margin: 0; padding: 0.4rem; }
.fam-phone-pop--dinner .dinner__choices { max-height: none; overflow: visible; }
.fam-phone-pop--dinner .fam-phone-pop__content { touch-action: pan-y; cursor: auto; }
.fam-phone-pop .toy-result { min-height: 0; gap: 0.35rem; padding: 0.25rem 0; border: 0; background: none; font-size: 0.78rem; line-height: 1.5; }
.fam-phone-pop .toy-result__name { font-size: 1.25rem; }
.fam-phone-pop .toy-result__detail { font-size: 0.8rem; }
.fam-phone-pop .toy-result__rarity { font-size: 0.68rem; }
.fam-map-detail__title { margin: 0.2rem 0 0.45rem; font-size: 1rem; line-height: 1.5; }
.fam-phone-pop--map-detail p { margin: 0; font-size: 0.85rem; line-height: 1.7; color: var(--ink-dim); }
.fam-map-list { display: grid; gap: 0.4rem; }
.fam-map-list button { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.5rem; border: 1px solid var(--stroke); border-radius: var(--r-sm); color: var(--ink); background: var(--glass); text-align: left; font: inherit; cursor: pointer; }
.fam-map-list b { flex: none; font-size: 0.8rem; }
.fam-map-list span { font-size: 0.72rem; line-height: 1.5; color: var(--ink-dim); }
[data-theme="light"] .fam-phone-pop__card { background: linear-gradient(160deg, #fff, #f2ecff); }

@media (max-width: 560px), (max-width: 940px) and (max-height: 560px) {
  .gachadlg > .kitchen__actions { justify-content: flex-start; }
  .gachadlg .toy-gacha { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .gachadlg .gacha3d.is-loading::after { display: none; }
  .gachadlg .gacha3d__loading, .gachadlg .model-progress { padding: 0.7rem; text-align: center; color: var(--ink-dim); font-size: 0.8rem; line-height: 1.6; }
  .gachadlg #fam-gacha-result { display: none; }
  .gachadlg > .kitchen__actions [data-fam-gacha-accept] { display: none; }

  .mapdlg__body { grid-template-columns: minmax(0, 1fr); }
  .mapdlg__stage { padding: 0; background: var(--bg-1); }
  .mapdlg .map-svg { overflow: hidden; }
  .mapdlg .map-pin__dot { r: 10px; }
  .mapdlg .map-pin__halo { r: 19px; }
  .mapdlg .map-stops, .mapdlg .map-hud,
  .mapdlg .map-ctrls, .mapdlg > .kitchen__foot { display: none; }
  .mapdlg__title { top: 0.5rem; left: 0.5rem; padding: 0.18rem 0.55rem; font-size: 0.85rem; }
  .mapdlg__mobile-tools {
    position: absolute; top: 0.35rem; right: 2.3rem; z-index: 2;
    display: flex; align-items: center; gap: 0.18rem; padding: 0.2rem;
    border: 1px solid var(--stroke); border-radius: 999px; background: var(--glass-strong);
    backdrop-filter: blur(6px);
  }
  .mapdlg__mobile-tools span { font-size: 0.58rem; color: var(--ink-dim); padding-inline: 0.15rem; }
  .mapdlg__mobile-tools button { min-width: 26px; height: 27px; padding: 0 0.3rem; border: 1px solid var(--stroke); border-radius: 999px; background: var(--glass); color: var(--ink); font: inherit; font-size: 0.7rem; line-height: 1; white-space: nowrap; cursor: pointer; }
  .mapdlg__mobile-tools button:disabled { opacity: 0.35; cursor: default; }

  .closetdlg .closet__birds { grid-template-columns: repeat(5, 42px); justify-content: start; gap: 0.25rem; }
  .closetdlg .closet__bird { padding: 0.2rem; gap: 0; min-height: 42px; }
  .closetdlg .closet__bird-art { width: 32px; height: 32px; }
  .closetdlg .closet__bird-meta { display: none; }
  .closetdlg .closet__now { margin-top: 0.3rem; font-size: 0.75rem; }
  .closetdlg .closet__cats { flex-wrap: nowrap; gap: 0.3rem; margin-top: 0.35rem; }
  .closetdlg .closet__cat { min-height: 25px; padding: 0.15rem 0.45rem; font-size: 0.7rem; white-space: nowrap; }
  .closetdlg .closet__cat small { font-size: 0.58rem; margin-left: 0.2rem; }
  .closetdlg .closet__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.3rem; margin-top: 0.35rem; }
  .closetdlg .closet__item { min-width: 0; gap: 0.25rem; padding: 0.35rem 0.35rem 1.1rem; }
  .closetdlg .closet__item-ico { width: 14px; height: 14px; }
  .closetdlg .closet__item-meta,
  .closetdlg .closet__item.is-shop .closet__item-meta { flex: 1; padding-right: 0; }
  .closetdlg .closet__item-meta b { font-size: 0.7rem; line-height: 1.4; }
  .closetdlg .closet__item-meta small { font-size: 0.65rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .closetdlg .closet__item-price { top: auto; bottom: 0.25rem; font-size: 0.55rem; }
}
@media (max-width: 560px) and (orientation: portrait) {
  #global-modal:has(.mapdlg) .modal__pad { padding: 0.2rem; }
  .fam-phone-pop__card { width: min(530px, calc(100dvh - 32px)); max-height: calc(100vw - 32px); transform: rotate(90deg); }
  .fam-phone-pop--dinner .fam-phone-pop__card { width: calc(100vw - 32px); max-height: calc(100dvh - 40px); transform: none; }
}
@media (max-width: 940px) and (max-height: 560px) and (orientation: landscape) {
  #global-modal:has(.mapdlg) .modal__pad { padding: 0.2rem; }
}

@media (max-width: 560px) {
  .house-page .comp__tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .house-page .comp-task { min-width: 0; padding: 0.65rem 0.5rem; }
  .house-page .comp-task__ico { font-size: 1.1rem; }
  .house-page .comp-task b { font-size: 0.85rem; }
  .house-page .comp-task small { font-size: 0.7rem; }
  .house-page .au-chips { flex-wrap: nowrap; overflow-x: auto; padding-block: 0.2rem 0.4rem; scrollbar-width: thin; touch-action: pan-x; cursor: grab; }
  .house-page .au-chip { flex: 0 0 auto; white-space: nowrap; }

  #sp-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
  #sp-facts .fact { min-width: 0; padding: 0.5rem 0.4rem; text-align: center; }
  #sp-facts .fact b { font-size: 0.95rem; }
  #sp-facts .fact small { font-size: 0.68rem; letter-spacing: 0.04em; }
  #fd-nav .fd-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; }
  #fd-nav [data-fd-sec="today"], #fd-nav #fd-record { display: none; }
  #fd-nav .fd-chip { min-width: 0; padding: 0.5rem 0.15rem; font-size: 0.7rem; white-space: nowrap; }

  /* 横线跟随正文的行盒绘制，换行和不同标题高度都不会让文字跑线。 */
  .fd-card--tpl-lined {
    background-image: linear-gradient(90deg, transparent 0 2.5rem, rgba(226, 118, 130, 0.5) 2.5rem 2.56rem, transparent 2.56rem);
  }
  .fd-card--tpl-lined .fd-card__text,
  .fd-card--tpl-lined .fd-detail__text {
    line-height: 1.75rem;
    background-image: repeating-linear-gradient(180deg, transparent 0 calc(1.75rem - 1px), rgba(116, 145, 196, 0.38) calc(1.75rem - 1px) 1.75rem);
    padding-bottom: 1px;
  }
}

/* 手机页脚收起重复的页面目录。 */
@media (max-width: 560px), (max-width: 940px) and (max-height: 560px) {
  .footer__grid > div:has(> .footer__list--pages) { display: none; }
}

/* 手机页脚只留最后一句小提示，收起自制站说明。 */
@media (max-width: 560px), (max-width: 940px) and (max-height: 560px) {
  .footer__grid > div:first-child > p,
  .footer__bottom > span:first-child,
  .footer__grid > div:last-child .footer__list > li:not(:last-child) { display: none; }
}

/* 手机页脚：组合信息与小提示并排。 */
@media (max-width: 560px), (max-width: 940px) and (max-height: 560px) {
  .footer__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: 1rem 0.7rem; }
  .footer__grid > div:first-child { grid-column: 1 / -1; }
  .footer__grid > div:last-child { grid-column: auto; }
}

/* 手机「现在干什么」：四个入口一排，学校与菜园共用横屏内容框。 */
@media (max-width: 560px), (max-width: 940px) and (max-height: 560px) {
  #fam-todo-mods .todo-mods__tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.25rem; }
  #fam-todo-mods .todo-modtab { min-width: 0; padding: 0.42rem 0.15rem; font-size: 0.72rem; white-space: nowrap; }
  .todo-landscape.overlay-layer { grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; }
  .todo-landscape__card {
    display: flex; flex-direction: column; min-height: 0;
    width: calc(100vw - 16px); height: calc(100dvh - 16px);
    padding: 0.6rem; border: 1px solid var(--stroke-strong); border-radius: 18px;
    background: linear-gradient(160deg, var(--bg-2), var(--bg-1)); box-shadow: var(--shadow);
  }
  .todo-landscape__head { position: relative; flex: none; padding-right: 2.2rem; }
  .todo-landscape__head .todo-mods__tabs { margin-bottom: 0.45rem; }
  .todo-landscape__head .modal__close { top: 0; right: 0; width: 28px; height: 28px; }
  .todo-landscape__body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0.6rem; touch-action: none; cursor: grab; }
  .todo-landscape__body.is-dragging { cursor: grabbing; }
  .todo-landscape .sch-top { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0.6rem; }
  .todo-landscape .sch-top__main, .todo-landscape .sch { gap: 0.7rem; }
  .todo-landscape .sch-card { padding: 0.75rem; }
  .todo-landscape .sch-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem; }
  .todo-landscape .sch-room { padding: 0.5rem 0.25rem; }
  .todo-landscape .sch-room i { font-size: 1.5rem; }
  .todo-landscape .sch-room b { font-size: 0.78rem; }
  .todo-landscape .sch-room small { font-size: 0.6rem; }
  .todo-landscape .farm-quick { display: none; }
  .todo-landscape .farm-views { margin: 0.35rem 0; }
  .todo-landscape .farm-today { margin: 0; padding: 0.3rem; font-size: 0.76rem; }
  .todo-landscape .farm-hint { margin-bottom: 0.3rem; font-size: 0.7rem; }
  .todo-landscape .farm-stage3d { height: 220px; aspect-ratio: auto; }
  .todo-landscape .farm-svg:not(.farm-svg--overlay) { max-height: 240px; }
  .todo-landscape .farm-pantry { margin-top: 0.35rem; font-size: 0.75rem; }
  .todo-landscape .farm-views button { font-size: 0.75rem; padding: 0.3rem 0.65rem; }
  .fam-todo-detail.overlay-layer { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .fam-todo-detail .modal__box { width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); animation: none; }
  .fam-todo-detail .modal__content { max-height: calc(100dvh - 32px); overflow: auto; touch-action: none; }
  .fam-todo-detail .modal__pad { padding: 0.75rem; }
  .fam-todo-detail .farm-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .house-page .au-chip:disabled { pointer-events: none; }
}
@media (max-width: 560px) and (orientation: portrait) {
  .todo-landscape__card { width: calc(100dvh - 16px); height: calc(100vw - 16px); transform: rotate(90deg); }
  .fam-todo-detail .modal__box { width: min(620px, calc(100dvh - 32px)); max-height: calc(100vw - 32px); transform: rotate(90deg); }
  .fam-todo-detail .modal__content { max-height: calc(100vw - 32px); }
}

@media (max-width: 560px), (max-width: 940px) and (max-height: 560px) {
  /* 陪伴时长与休息选项各四格，保留自定义输入。 */
  .comp--setup .comp__choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.25rem; width: 100%; }
  .comp--setup .comp-chip { min-width: 0; padding: 0.45rem 0.1rem; font-size: 0.72rem; white-space: nowrap; }
  .comp--setup .comp-num { min-width: 0; gap: 0.1rem; font-size: 0.64rem; }
  .comp--setup .comp-num input { min-width: 0; width: 100%; padding: 0.45rem 0.1rem; font-size: 0.72rem; }
  .map-external-label { fill: var(--pink); font-weight: 700; stroke: var(--bg-1); stroke-width: 4px; paint-order: stroke; cursor: pointer; }

  /* 四间教室都只保留一张内容卡，左鸟右互动。 */
  .todo-landscape__body:has(.sch--mobile-single) { overflow: hidden; padding: 0; border: 0; background: none; }
  .sch--mobile-single { height: 100%; min-height: 0; gap: 0; }
  .todo-landscape .sch-classroom { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 0.65rem; }
  .sch-classroom::before { display: none; }
  .sch-classroom .sch-classbar { flex: none; gap: 0.35rem; padding-bottom: 0.45rem; border-bottom: 1px dashed #decba8; }
  .sch-classroom .sch-classbar__name { font-size: 0.85rem; }
  .sch-classroom .sch-classbar .sch-btn { padding: 0.25rem 0.5rem; font-size: 0.7rem; }
  .sch-classroom .sch-chip, .sch-classroom .sch-link { font-size: 0.6rem; }
  .sch-classroom__columns { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 0.6rem; padding-block: 0.5rem; }
  .sch-classroom__birds { min-height: 0; overflow: auto; padding-right: 0.4rem; border-right: 1px dashed #decba8; }
  .sch-classroom__birds .sch-crew,
  .sch-classroom__birds .sch-rush-crew { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: center; justify-items: center; gap: 1.1rem 0.2rem; min-height: 100%; margin: 0; padding: 0.9rem 0.2rem; }
  .sch-classroom__birds .sch-bird { width: 48px; }
  .sch-classroom__birds .sch-rush-bird { width: 40px; }
  .sch-classroom__birds .sch-rush-head { height: 45px; }
  .sch-classroom__birds .sch-rush-slot { min-height: 0; }
  .sch-classroom__interact { min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: none; }
  .sch-classroom__interact.is-dragging { cursor: grabbing; }
  .sch-classroom__interact > .sch-card { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
  .sch-classroom__interact > .sch-card::before { display: none; }
  .sch-classroom__interact .sch-msg { min-height: 0; font-size: 0.75rem; line-height: 1.5; margin-bottom: 0.45rem; }
  .sch-classroom__interact .sch-guide__hint, .sch-classroom__interact .sch-game-entry__hint, .sch-classroom__interact .sch-tip { font-size: 0.65rem; line-height: 1.6; }
  .sch-classroom__interact .sch-acts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.3rem; }
  .sch-classroom__interact .sch-act { min-width: 0; padding: 0.35rem 0.2rem; font-size: 0.68rem; }
  .sch-classroom__interact .sch-act i { font-size: 1rem; }
  .sch-classroom .sch-foot { flex: none; gap: 0.4rem; padding-top: 0.4rem; border-top: 1px dashed #decba8; }
  .sch-classroom .sch-foot .sch-btn { padding: 0.3rem 0.6rem; font-size: 0.7rem; }

  /* 种子与背包的框宽、高上限各缩小三分之一。 */
  .fam-todo-detail--compact .modal__box { width: min(413px, calc((100vw - 32px) * 2 / 3)); max-height: calc((100dvh - 32px) * 2 / 3); }
  .fam-todo-detail--compact .modal__content { max-height: calc((100dvh - 32px) * 2 / 3); }
  .fam-todo-detail--compact .modal__pad { padding: 0.6rem; }
  .fam-todo-detail--compact .modal__title { margin-bottom: 0.35rem; font-size: 0.85rem; }
  .fam-todo-detail--compact .kitchen__lead,
  .fam-todo-detail--compact .empty-note { margin-block: 0.35rem; font-size: 0.72rem; line-height: 1.5; }
  .fam-todo-detail--compact .farm-picker { gap: 0.3rem; }
  .fam-todo-detail--compact .farm-pick { padding: 0.4rem; gap: 0.15rem; }
  .fam-todo-detail--compact .farm-pick__emoji { font-size: 1.4rem; }
  .fam-todo-detail--compact .farm-pick b { font-size: 0.72rem; }
  .fam-todo-detail--compact .farm-pick small { font-size: 0.6rem; }
  .fam-todo-detail--compact .empty-note { padding: 0.7rem 0.25rem; }
  .fam-todo-detail--compact .farmbag__coins { padding: 0.25rem 0.5rem; font-size: 0.8rem; }
  .fam-todo-detail--compact .farmbag__coins b { font-size: 0.9rem; }
  .fam-todo-detail--compact .kitchen__actions { margin: 0.45rem 0 0.1rem; }
  .fam-todo-detail--compact .kitchen__actions .btn { min-height: 28px; padding: 0.3rem 0.6rem; font-size: 0.72rem; }
  .fam-todo-detail--compact .modal__close { width: 26px; height: 26px; top: 0.3rem; right: 0.3rem; }
}
@media (max-width: 560px) and (orientation: portrait) {
  .fam-todo-detail--compact .modal__box { width: min(413px, calc((100dvh - 32px) * 2 / 3)); max-height: calc((100vw - 32px) * 2 / 3); }
  .fam-todo-detail--compact .modal__content { max-height: calc((100vw - 32px) * 2 / 3); }
}

/* 本轮手机布局：日记分类、时长选项、生日楼与衣柜提示。 */
.bbs-thread-pages { display: contents; }
@media (max-width: 560px) {
  .wall-tab-group { display: none; }
  #fd-filters > .fd-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
  #fd-filters .fd-chip { width: 100%; padding-inline: 0.3rem; font-size: 0.72rem; white-space: nowrap; }
  #mat-status { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.25rem; width: 100%; }
  #mat-status .filter-btn { min-width: 0; padding: 0.4rem 0.15rem; font-size: 0.7rem; white-space: nowrap; }
  .board-screen { scroll-behavior: auto; overflow-anchor: none; touch-action: pan-y; }
  .bbs-thread-pages {
    position: relative; display: flex; flex-direction: column; gap: 0.6rem;
    height: clamp(330px, calc(100dvh - var(--topbar-h, 60px) - 150px), 490px);
    overflow-y: auto; overscroll-behavior-y: contain; scroll-snap-type: y mandatory;
    scrollbar-width: none; touch-action: pan-y;
  }
  .bbs-thread-pages::-webkit-scrollbar { display: none; }
  .bbs-thread-pages > .bbs-thread {
    flex: 0 0 100%; height: 100%; min-height: 0; margin: 0;
    display: flex; flex-direction: column; scroll-snap-align: start; scroll-snap-stop: always;
  }
  .bbs-thread-pages .bbs-thread__bar { flex: none; display: grid; grid-template-columns: auto 1fr auto; gap: 0.3rem; padding: 0.6rem; }
  .bbs-thread-pages .bbs-thread__title { font-size: 0.88rem; }
  .bbs-thread-pages .bbs-thread__meta { grid-column: 1 / -1; grid-row: 2; font-size: 0.67rem; }
  .bbs-thread-pages .bbs-thread__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; padding: 0 0.6rem 0.6rem; }
}
@media (max-width: 560px), (max-width: 940px) and (max-height: 560px) {
  .comp--setup .comp__choices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
  .comp--setup .comp-chip, .comp--setup .comp-num { min-height: 36px; }
  .closetdlg .closet__notice { flex: none; margin: 0.25rem 0 0; padding: 0.35rem 0.5rem; border-radius: 8px; background: color-mix(in srgb, var(--pink) 14%, transparent); color: var(--ink); font-size: 0.72rem; line-height: 1.4; }
  .closetdlg .closet__bird-art svg { display: block; width: 100%; height: 100%; }
}

/* 公告栏仅增加必要控件，沿用致谢页信纸尺寸与手机断点。 */
.ann-toolbar { max-width: 51rem; margin: 0 auto 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ann-toolbar > h1 { color: var(--ink); }
.ann-card + .ann-card { margin-top: 2.4rem; }
.ann-card .thx-paper__title { overflow-wrap: anywhere; }
.ann-body { max-height: calc(var(--thx-lh) * 10); overflow: hidden; }
.ann-body.is-expanded { max-height: none; }
.ann-text { white-space: pre-wrap; text-indent: 0; }
.ann-toggle { margin-top: .9rem; color: #684682; }
.ann-toggle[hidden] { display: none !important; }
.ann-delete { position: absolute; right: 0; top: -2rem; color: #825ca0; }
.ann-status { max-width: 51rem; margin: 0 auto 1.5rem; }
#ann-form .cms-field { margin-top: 1rem; }
#ann-form textarea { resize: vertical; }
@media (max-width: 560px) {
  .ann-delete { top: -1.5rem; }
}

/* 致谢公告完整保留原信纸排版，日期放在信纸外。 */
.ann-thanks { max-width: 51rem; margin: 0 auto; }
.ann-thanks__date { margin: 0 0 1.6rem; text-align: right; color: var(--ink-dim); font-size: .8rem; }
.ann-card + .ann-thanks, .ann-thanks + .ann-card { margin-top: 2.4rem; }

/* 公告配图独立于正文折叠，每行最多三张；不影响致谢信纸。 */
.ann-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-top: 1rem; }
.ann-images:empty { display: none; }
.ann-image { position: relative; display: block; width: 100%; min-width: 0; aspect-ratio: 1; padding: 0; border: 1px solid #d9cddd; border-radius: .65rem; background: #f7f2f9; overflow: hidden; cursor: pointer; }
.ann-image img, .ann-image-draft img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ann-image span { position: absolute; inset: 0; display: grid; place-items: center; padding: .35rem; font-size: .75rem; color: #684682; background: #f7f2f9; }
.ann-image span[hidden] { display: none; }
.ann-image-draft { position: relative; aspect-ratio: 1; min-width: 0; background: #f7f2f9; border-radius: .65rem; overflow: hidden; }
.ann-image-draft button { position: absolute; right: .2rem; bottom: .2rem; background: #fff; }
.ann-image-view img { display: block; max-width: 100%; max-height: 78vh; width: auto; height: auto; object-fit: contain; margin: auto; }

/* 手机端细节：签名下移、荣誉标题固定一行、影像馆说明按段落阅读。 */
@media (max-width: 560px) {
  #home-members .mcard__avatar--signature,
  #member-grid .mcard__avatar--signature { margin-top: 3rem; }

  #honor-case .case__label > span { flex: 0 0 auto; white-space: nowrap; }

  .gallery-page .gallery-about__copy { text-align: left !important; text-indent: 2em; line-height: 1.85; }
  .gallery-page .gallery-about__script-note { display: none; }
  .gallery-page #v-search::placeholder { font-size: 0.6875rem; }
}
