/* =========================================================
   岁时记 · 节日节气馆
   视觉基调：深夜墨底 + 主题光晕 + 金属渐变字 + 微粒动态
   ========================================================= */

:root {
  --c1: #e63946;
  --c2: #ffc845;
  --bg: #240a0c;
  --c1-a: rgba(230, 57, 70, .45);
  --c2-a: rgba(255, 200, 69, .35);
  --ink: #f4efe6;
  --ink-dim: rgba(244, 239, 230, .58);
  --line: rgba(255, 255, 255, .12);
  --glass: rgba(18, 16, 22, .55);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --dock-h: 148px;
  --dock-pad: 198px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: #06060a;
  color: var(--ink);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* ---------------- 背景 ---------------- */
.bg-base {
  position: absolute; inset: 0;
  background:
    radial-gradient(140% 110% at 18% 8%, var(--c1-a) 0%, transparent 52%),
    radial-gradient(120% 100% at 84% 92%, var(--c2-a) 0%, transparent 55%),
    radial-gradient(80% 60% at 50% 50%, rgba(255,255,255,.05), transparent 70%),
    linear-gradient(165deg, var(--bg) 0%, #05050a 78%, #000 100%);
  transition: background .9s cubic-bezier(.22,.61,.36,1);
}

.bg-aura { position: absolute; inset: 0; overflow: hidden; }
.bg-aura i {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  will-change: transform;
}
.bg-aura i:nth-child(1) {
  width: 46vw; height: 46vw; left: 4%; top: -12%;
  background: radial-gradient(circle, var(--c1-a), transparent 68%);
  animation: drift1 18s ease-in-out infinite alternate;
}
.bg-aura i:nth-child(2) {
  width: 40vw; height: 40vw; right: 2%; bottom: -10%;
  background: radial-gradient(circle, var(--c2-a), transparent 68%);
  animation: drift2 22s ease-in-out infinite alternate;
}
.bg-aura i:nth-child(3) {
  width: 26vw; height: 26vw; left: 46%; top: 34%;
  background: radial-gradient(circle, rgba(255,255,255,.10), transparent 70%);
  animation: drift3 26s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate3d(8%, 10%, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(-10%, -8%, 0) scale(1.18); } }
@keyframes drift3 { to { transform: translate3d(-6%, 6%, 0) scale(.9); } }

.bg-rays {
  position: absolute; inset: -30%;
  background: conic-gradient(from 0deg at 50% 46%,
    transparent 0deg, var(--c2-a) 12deg, transparent 26deg,
    transparent 78deg, var(--c1-a) 96deg, transparent 112deg,
    transparent 168deg, var(--c2-a) 190deg, transparent 208deg,
    transparent 268deg, var(--c1-a) 286deg, transparent 304deg,
    transparent 360deg);
  opacity: .18;
  filter: blur(18px);
  animation: rayspin 90s linear infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}
@keyframes rayspin { to { transform: rotate(360deg); } }

#motes { position: absolute; inset: 0; pointer-events: none; z-index: 2; }

.bg-grain {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

.bg-vignette {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 46%, transparent 40%, rgba(0,0,0,.55) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.55), transparent 18%, transparent 72%, rgba(0,0,0,.72));
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 22px 30px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-seal {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 22px; font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  border-radius: 3px;
  box-shadow: 0 8px 24px var(--c1-a), inset 0 1px 0 rgba(255,255,255,.4);
  position: relative;
  overflow: hidden;
}
.brand-seal::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: sealShine 5s ease-in-out infinite;
}
@keyframes sealShine { 0%,80% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

.brand-text b {
  display: block; font-family: var(--serif); font-size: 19px; letter-spacing: .18em; font-weight: 700;
}
.brand-text span {
  display: block; font-size: 9.5px; letter-spacing: .28em; color: var(--ink-dim); margin-top: 3px;
}

.today {
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(10, 10, 16, .42);
  backdrop-filter: blur(14px);
  font-size: 12.5px; letter-spacing: .08em;
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.today .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c2);
  box-shadow: 0 0 10px var(--c2);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.today b { font-weight: 600; }
.today em { font-style: normal; color: var(--ink-dim); }

.tools { display: flex; gap: 8px; position: relative; }
.iconbtn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(12, 12, 18, .42);
  backdrop-filter: blur(10px);
  transition: border-color .25s, box-shadow .25s, transform .25s, background .25s;
}
.iconbtn svg { width: 17px; height: 17px; fill: none; stroke: rgba(255,255,255,.72); stroke-width: 1.6; stroke-linecap: round; }
.iconbtn:hover {
  border-color: var(--c2);
  box-shadow: 0 0 0 1px var(--c2-a), 0 8px 26px var(--c1-a);
  transform: translateY(-1px);
}
.iconbtn[data-on="1"] svg .wave { stroke: var(--c2); }

/* ---------------- 场景 ---------------- */
.stage {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 74px 0 calc(var(--dock-pad) + 26px);
  z-index: 10;
  overflow: hidden;
}

.scene {
  position: relative;
  width: min(1180px, 92vw);
  height: 100%;
  display: grid; place-items: center;
}
.scene-body {
  width: 100%;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  flex: 0 0 auto;
  transition: opacity .38s ease, transform .5s cubic-bezier(.22,.61,.36,1), filter .38s ease;
  will-change: transform, opacity, filter;
}
.scene-body > * { flex-shrink: 0; }
.scene-body.out {
  opacity: 0;
  transform: scale(1.04) translateY(-14px);
  filter: blur(10px);
}
.scene-body.in {
  opacity: 0;
  transform: scale(.94) translateY(18px);
  filter: blur(12px);
}

.scene-eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 11px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 14px;
}
.scene-eyebrow::before, .scene-eyebrow::after {
  content: ""; width: 34px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--c2-a), transparent);
}

.symbol-wrap {
  position: relative;
  width: clamp(70px, 9vw, 106px); height: clamp(70px, 9vw, 106px);
  margin-bottom: clamp(10px, 1.8vh, 22px);
  display: grid; place-items: center;
}
.symbol-wrap svg {
  width: 100%; height: 100%;
  fill: none; stroke: var(--c2); stroke-width: 1.1;
  stroke-linejoin: round; stroke-linecap: round;
  opacity: .9;
  filter: drop-shadow(0 0 18px var(--c2-a));
}
.symbol-wrap::before {
  content: ""; position: absolute; inset: -18px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 50%;
  animation: spinSlow 24s linear infinite;
}
.symbol-wrap::after {
  content: ""; position: absolute; inset: -30px;
  border: 1px dashed rgba(255,255,255,.06);
  border-radius: 50%;
  animation: spinSlow 40s linear infinite reverse;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }

.hero-title {
  display: flex; justify-content: center; flex-wrap: wrap;
  font-family: var(--serif);
  font-size: var(--tsize, clamp(44px, 11.5vw, 168px));
  line-height: .96;
  font-weight: 700;
  letter-spacing: .05em;
  gap: clamp(4px, .6vw, 14px);
  perspective: 900px;
}
.hero-title span {
  display: inline-block;
  background: linear-gradient(178deg, #ffffff 0%, #fff8e6 18%, var(--c2) 46%, var(--c1) 78%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)) drop-shadow(0 0 26px var(--c1-a));
  /* 逐字入场用 forwards，动画被跳过时字也还在（不会被按在 opacity 0） */
  animation: letterIn .78s cubic-bezier(.16,1.02,.32,1) forwards;
  animation-delay: calc(var(--i) * 60ms);
}
@keyframes letterIn {
  from { opacity: 0; transform: translateY(46px) rotateX(-72deg) scale(.86); filter: blur(14px) drop-shadow(0 0 0 transparent); }
  60% { opacity: 1; filter: blur(0); }
  to { opacity: 1; transform: none; }
}
/* 大字背后的光晕 */
.hero-title { position: relative; }

.hero-en {
  margin-top: 18px;
  font-size: clamp(10px, 1.1vw, 13px);
  letter-spacing: .5em;
  text-transform: uppercase;
  color: rgba(255,255,255,.44);
}

.hero-tag {
  margin-top: 20px;
  position: relative;
  font-family: var(--serif);
  font-size: clamp(15px, 1.9vw, 25px);
  letter-spacing: .22em;
  color: #fff;
  text-shadow: 0 0 22px var(--c1-a);
}
.hero-tag::before, .hero-tag::after {
  content: "「"; position: absolute; opacity: .35; font-size: .8em;
  color: var(--c2);
}
.hero-tag::before { left: -20px; top: -2px; }
.hero-tag::after { content: "」"; right: -20px; bottom: -2px; }

.hero-meta {
  margin-top: 26px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.pill {
  padding: 8px 15px;
  font-size: 12px; letter-spacing: .1em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255,255,255,.045);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,.86);
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.pill.accent {
  border-color: rgba(255,255,255,.28);
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #12100f;
  font-weight: 700;
  box-shadow: 0 10px 28px var(--c1-a);
}
.pill.mute { color: var(--ink-dim); }

.hero-actions {
  margin-top: 32px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
}
.cta {
  position: relative;
  flex: 0 0 auto;          /* 按钮不许被挤扁，窄屏乖乖换行 */
  min-width: max-content;  /* 文字不会被压到边框上 */
  white-space: nowrap;
  padding: 13px 30px;
  font-size: 13.5px; letter-spacing: .22em;
  border-radius: 4px;
  color: #14100c;
  font-weight: 700;
  background: linear-gradient(135deg, var(--c2), var(--c1));
  box-shadow: 0 12px 32px var(--c1-a), inset 0 1px 0 rgba(255,255,255,.45);
  transition: transform .22s, box-shadow .22s;
  overflow: hidden;
}
.cta::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
  animation: sweep 4.5s ease-in-out infinite;
}
@keyframes sweep { 0%,72% { left: -60%; } 100% { left: 130%; } }
.cta:hover { transform: translateY(-2px); box-shadow: 0 18px 40px var(--c1-a), inset 0 1px 0 rgba(255,255,255,.5); }
.cta.ghost {
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 10px 26px rgba(0,0,0,.4);
}
.cta.ghost::after { display: none; }
.cta.ghost:hover { border-color: var(--c2); box-shadow: 0 0 0 1px var(--c2-a), 0 14px 34px rgba(0,0,0,.45); }

/* 场景四角装饰 */
.scene-corners { position: absolute; inset: 0; pointer-events: none; }
.scene-corners i {
  position: absolute; width: 54px; height: 54px;
  border: 1px solid rgba(255,255,255,.12);
}
.scene-corners i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.scene-corners i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.scene-corners i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.scene-corners i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* ---------------- 底部 dock ---------------- */
.dock {
  position: absolute; left: 0; right: 0; bottom: 0;
  min-height: var(--dock-h);
  z-index: 22;
  padding: 10px 26px 2px;
  display: flex; flex-direction: column; gap: 10px;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(4,4,8,.92) 12%, rgba(4,4,8,.55) 62%, transparent);
  pointer-events: none;
}
.dock > * { pointer-events: auto; }

/* 「回到今天 / 自动巡游」：不放在分类横条里，任何时候都在，大屏浮在分类行右侧 */
.dock-ops {
  position: absolute; right: 26px; top: 8px;
  display: flex; align-items: center; gap: 6px;
  z-index: 3;
}

/* 备案 */
.beian {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 2px 12px;
  margin-top: -10px;
  font-size: 9px; letter-spacing: .02em;
  color: rgba(255, 255, 255, .26);
  line-height: 1;
}
.beian-a {
  display: inline-flex; align-items: center; gap: 3px;
  color: inherit; text-decoration: none;
  transition: color .2s ease;
}
.beian-a:hover { color: rgba(255, 255, 255, .6); }
.beian-a img { width: 10px; height: 11px; display: block; opacity: .8; }
@media (max-width: 900px) {
  .beian { font-size: 8.5px; gap: 2px 8px; margin-top: -10px; }
}

.cats {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding-bottom: 2px;
  padding-right: 214px;   /* 给右上角那两枚常驻按钮留位，别被压住 */
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: 0 0 auto;
  padding: 6px 13px;
  font-size: 11.5px; letter-spacing: .16em;
  color: var(--ink-dim);
  border: 1px solid transparent;
  border-radius: 3px;
  transition: color .22s, border-color .22s, background .22s, box-shadow .22s;
}
.cat:hover { color: #fff; border-color: rgba(255,255,255,.16); }
.cat.active {
  color: #fff;
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.07);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.cat b { color: var(--c2); font-weight: 600; margin-left: 4px; }

.rail-wrap { position: relative; display: flex; align-items: center; gap: 6px; }
.rail-arrow {
  flex: 0 0 auto; width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 3px;
  background: rgba(255,255,255,.04);
  transition: background .2s, border-color .2s;
}
.rail-arrow svg { width: 16px; height: 16px; fill: none; stroke: rgba(255,255,255,.65); stroke-width: 2; }
.rail-arrow:hover { background: rgba(255,255,255,.1); border-color: var(--c2); }

.rail {
  display: flex; gap: 7px;
  overflow-x: auto; scrollbar-width: none;
  padding: 8px 2px 12px;
  scroll-behavior: auto;
  flex: 1;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.rail::-webkit-scrollbar { display: none; }

.rail-item {
  position: relative;
  flex: 0 0 auto;
  min-width: 62px;
  padding: 8px 11px 9px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.035);
  text-align: center;
  transition: transform .24s, border-color .24s, box-shadow .24s, background .24s;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.rail-item:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.08);
}
.rail-item.active {
  border-color: var(--c2);
  background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
  box-shadow: 0 8px 26px var(--c1-a), 0 0 0 1px var(--c2-a) inset;
}
.rail-item.active::before {
  content: ""; position: absolute; left: 50%; top: -9px; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--c2);
  box-shadow: 0 0 12px var(--c2);
}
.rail-item .rd {
  font-family: var(--serif);
  font-size: 10px;
  color: rgba(255,255,255,.42);
  letter-spacing: .04em;
  margin-bottom: 3px;
  white-space: nowrap;
}
.rail-item .rn {
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(255,255,255,.9);
  white-space: nowrap;
}
.rail-item.active .rd { color: var(--c2); }
.rail-item.past .rn { color: rgba(255,255,255,.52); }
.rail-item.today::after {
  content: "今";
  position: absolute; right: -3px; top: -5px;
  width: 14px; height: 14px;
  font-size: 8px; line-height: 14px;
  border-radius: 50%;
  background: var(--c1); color: #fff;
  box-shadow: 0 0 10px var(--c1-a);
}

/* ---------------- 抽屉 ---------------- */
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(430px, 92vw);
  z-index: 40;
  transform: translateX(102%);
  transition: transform .52s cubic-bezier(.22,.61,.36,1);
}
.drawer.open { transform: none; }

/* 系统开了「减少动态效果」就不做滑入/淡入，避免晕眩，也方便截图核对终态 */
@media (prefers-reduced-motion: reduce) {
  .drawer, .gp-mask, .gp-panel, .overlay, .gp-over, .gp-tab, .gp-done, .cat, .rail-arrow {
    transition: none !important;
    animation: none !important;
  }
}
.drawer-glass {
  position: absolute; inset: 0;
  background: linear-gradient(200deg, rgba(16,14,20,.92), rgba(8,8,12,.96));
  border-left: 1px solid rgba(255,255,255,.1);
  box-shadow: -30px 0 60px rgba(0,0,0,.6);
  backdrop-filter: blur(20px);
}
.drawer-glass::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--c1), var(--c2), transparent);
  opacity: .8;
}
.drawer-inner { position: relative; height: 100%; display: flex; flex-direction: column; }
.drawer-close {
  position: absolute; right: 16px; top: 16px; z-index: 2;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 3px;
}
.drawer-close svg { width: 15px; height: 15px; fill: none; stroke: rgba(255,255,255,.7); stroke-width: 1.8; }
.drawer-close:hover { border-color: var(--c2); }
.drawer-scroll {
  overflow-y: auto; height: 100%;
  padding: 64px 30px 40px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent;
}
.drawer-scroll::-webkit-scrollbar { width: 2px; }
.drawer-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); }

.dw-title {
  font-family: var(--serif);
  font-size: 34px; letter-spacing: .1em;
  background: linear-gradient(120deg, #fff, var(--c2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dw-sub { font-size: 10px; letter-spacing: .3em; color: var(--ink-dim); margin-top: 8px; }
.dw-line { height: 1px; background: linear-gradient(90deg, var(--c2-a), transparent); margin: 20px 0; }

.dw-block { margin-bottom: 24px; }
.dw-block h4 {
  font-size: 11px; letter-spacing: .28em; color: var(--c2);
  font-weight: 600; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.dw-block h4::before {
  content: ""; width: 14px; height: 1px; background: var(--c2);
}
.dw-block ul { list-style: none; }
.dw-block li {
  position: relative;
  padding: 7px 0 7px 16px;
  font-size: 13px; line-height: 1.7;
  color: rgba(255,255,255,.8);
}
.dw-block li::before {
  content: ""; position: absolute; left: 0; top: 15px;
  width: 5px; height: 5px;
  border: 1px solid var(--c2); transform: rotate(45deg);
  opacity: .7;
}
.dw-verse {
  font-family: var(--serif);
  font-size: 17px; line-height: 2;
  color: #fff;
  padding: 18px 18px 18px 22px;
  background: rgba(255,255,255,.04);
  border-left: 2px solid var(--c2);
  border-radius: 0 4px 4px 0;
  letter-spacing: .06em;
}
.dw-verse small { display: block; margin-top: 10px; font-size: 11px; color: var(--ink-dim); letter-spacing: .12em; font-family: var(--sans); }

.dw-bless-box {
  padding: 16px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 4px;
  background: rgba(255,255,255,.03);
  font-size: 14px; line-height: 1.8; color: #fff;
  min-height: 62px;
  display: flex; align-items: center;
}
.dw-meta-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 22px;
}
.dw-meta-row div {
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px;
  background: rgba(255,255,255,.04);
}
.dw-meta-row span { display: block; font-size: 10px; letter-spacing: .2em; color: var(--ink-dim); margin-bottom: 6px; }
.dw-meta-row b { font-size: 14px; font-weight: 600; letter-spacing: .04em; }

/* ---------- 祝福墙 · 弹幕 ---------- */
.wish-form { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; align-items: stretch; }
.dm-stage {
  position: relative;
  height: 172px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
}
.dm-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 12px; letter-spacing: .06em; color: rgba(255,255,255,.42);
  pointer-events: none;
}
.dm {
  position: absolute; left: 100%; top: 0;
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
  padding: 2px 9px;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(8, 8, 14, .52);
  font-size: 12.5px; line-height: 1.7;
  will-change: transform;
  animation-name: dmFlow;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}
.dm:hover { animation-play-state: paused; }
.dm.mine { border-color: var(--c2-a); box-shadow: 0 0 14px rgba(0,0,0,.4); }
.dm-name { color: var(--c2); font-weight: 600; letter-spacing: .04em; }
.dm-code {
  font-size: 9.5px; letter-spacing: .06em;
  color: rgba(255,255,255,.5);
  font-variant-numeric: tabular-nums;
}
.dm-sep { color: rgba(255,255,255,.3); }
.dm-text { color: rgba(255,255,255,.93); }
.dm-x {
  margin-left: 6px;
  padding: 0 5px; border-radius: 2px;
  font-size: 10px; line-height: 1.5;
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.04);
  cursor: pointer;
}
.dm-x:hover { color: #ffd7d4; border-color: rgba(255,150,140,.55); }
@keyframes dmFlow {
  from { transform: translateX(0); opacity: 0; }
  5%   { opacity: 1; }
  90%  { opacity: 1; }
  to   { transform: translateX(calc(-100% - var(--sw, 440px))); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .dm-stage { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; padding: 10px; }
  .dm { position: static; animation: none !important; opacity: 1 !important; }
}
/* 调试直达 / 截图用：静态列出来，不做飘动 */
.dm-static { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; padding: 10px; }
.dm-static .dm { position: static; animation: none !important; opacity: 1 !important; }

/* ---------- 祝福墙弹窗 ---------- */
.wishwall .ww {
  position: relative;
  width: min(820px, 92vw);
  max-height: 86vh;
  display: flex; flex-direction: column;
  padding: 18px 20px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(160deg, rgba(18,16,22,.96), rgba(9,9,14,.96));
  box-shadow: 0 30px 80px rgba(0,0,0,.66);
}
.ww-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.ww-head b { font-size: 17px; letter-spacing: .16em; font-weight: 600; }
.ww-sub { font-size: 11px; letter-spacing: .16em; color: var(--ink-dim); }
.ww-x {
  margin-left: auto; width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.16); border-radius: 4px;
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.7); font-size: 15px; line-height: 1;
  align-self: center;
}
.ww-x:hover { color: #fff; border-color: var(--c2); }
.wishwall .dm-stage { flex: 1 1 auto; height: min(48vh, 360px); margin-top: 0; }
.ww .wish-form { margin-top: 14px; }

.wish-form input {
  flex: 1 1 110px; min-width: 0; padding: 10px 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 4px;
  color: #fff; font-size: 12.5px; outline: none;
}
.wish-form input:first-child { flex: 0 0 88px; }
.wish-form input:focus { border-color: var(--c2); }
.wish-form button {
  flex: none;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 11.5px; letter-spacing: .06em;
  background: linear-gradient(135deg, var(--c2), var(--c1));
  color: #14100c; font-weight: 700;
  box-shadow: 0 8px 22px var(--c1-a);
}
.wish-note {
  margin-top: 8px;
  font-size: 10.5px; line-height: 1.6; letter-spacing: .02em;
  color: rgba(255,255,255,.4);
}

/* ---------------- 遮罩弹层 ---------------- */
.overlay {
  position: absolute; inset: 0; z-index: 50;
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity .32s ease;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.overlay-glass {
  position: absolute; inset: 0;
  background: rgba(4,4,8,.72);
  backdrop-filter: blur(18px);
}

.search-box {
  position: relative;
  width: min(660px, 90vw);
  max-height: 74vh;
  display: flex; flex-direction: column;
  transform: translateY(14px) scale(.98);
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
}
.overlay.open .search-box { transform: none; }
.search-line {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 4px;
  background: rgba(255,255,255,.06);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.search-line svg { width: 18px; height: 18px; fill: none; stroke: rgba(255,255,255,.6); stroke-width: 1.6; }
.search-line input {
  flex: 1; background: none; border: none; outline: none;
  color: #fff; font-size: 17px; letter-spacing: .06em;
}
.search-line input::placeholder { color: rgba(255,255,255,.3); }
.esc {
  font-size: 9px; letter-spacing: .2em;
  padding: 5px 8px; border-radius: 3px;
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.5);
}
.search-result {
  margin-top: 12px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
  scrollbar-width: thin;
}
.sr-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 4px;
  background: rgba(255,255,255,.03);
  text-align: left;
  transition: border-color .2s, background .2s, transform .2s;
}
.sr-item:hover { border-color: var(--c2); background: rgba(255,255,255,.08); transform: translateX(3px); }
.sr-item .k {
  font-family: var(--serif); font-size: 17px; min-width: 96px;
}
.sr-item .d { font-size: 11.5px; color: var(--ink-dim); letter-spacing: .08em; }
.sr-item .c { margin-left: auto; font-size: 10px; color: var(--c2); letter-spacing: .16em; }
.sr-empty { padding: 28px; text-align: center; color: var(--ink-dim); font-size: 13px; }

.modal {
  position: relative;
  width: min(460px, 90vw);
  padding: 34px 32px 28px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(160deg, rgba(22,20,28,.96), rgba(8,8,12,.98));
  box-shadow: 0 30px 80px rgba(0,0,0,.7);
}
.modal h3 { font-family: var(--serif); font-size: 22px; letter-spacing: .1em; margin-bottom: 10px; }
.modal > p { font-size: 12.5px; color: var(--ink-dim); line-height: 1.7; margin-bottom: 22px; }
.birth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.birth-row label { display: flex; flex-direction: column; gap: 6px; }
.birth-row label span { font-size: 10px; letter-spacing: .24em; color: var(--c2); }
.birth-row label.wide { grid-column: span 2; }
.birth-row input {
  padding: 11px 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 4px;
  color: #fff; font-size: 14px; outline: none;
}
.birth-row input:focus { border-color: var(--c2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }

/* ---------------- 转场闪光 ---------------- */
.flash {
  position: absolute; inset: 0; z-index: 60;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%),
    rgba(255,255,255,.95) 0%, var(--c2-a) 18%, var(--c1-a) 38%, transparent 66%);
  mix-blend-mode: screen;
}
.flash.fire { animation: flashFire .68s ease-out forwards; }
@keyframes flashFire {
  0% { opacity: 0; transform: scale(.12); }
  18% { opacity: 1; }
  42% { opacity: .85; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(2.5); }
}

/* 生日吹蜡烛 / 月亮放大 */
.symbol-wrap.blow { animation: blowOut .95s cubic-bezier(.2,.8,.3,1); }
@keyframes blowOut {
  0% { transform: scale(1); }
  28% { transform: scale(1.28) translateY(-8px); filter: brightness(1.6); }
  60% { transform: scale(.96) translateY(2px); }
  100% { transform: scale(1); }
}
.symbol-wrap svg { animation: hoverFloat 6.5s ease-in-out infinite; }
@keyframes hoverFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.toast {
  position: absolute; left: 50%; bottom: 160px;
  transform: translate(-50%, 14px);
  z-index: 70;
  padding: 11px 22px;
  font-size: 12.5px; letter-spacing: .14em;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(12,10,16,.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.hint {
  position: absolute; left: 50%; bottom: calc(var(--dock-h) + 6px);
  transform: translateX(-50%);
  font-size: 10px; letter-spacing: .24em;
  color: rgba(255,255,255,.26);
  z-index: 15;
  pointer-events: none;
  transition: opacity .5s;
  white-space: nowrap;
}

/* ---------------- 启动画面 ---------------- */
.boot-screen {
  position: absolute; inset: 0; z-index: 80;
  display: grid; place-content: center; justify-items: center; gap: 22px;
  background: #06060a;
  transition: opacity .7s ease, visibility .7s;
}
.boot-ring {
  width: 92px; height: 92px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.1);
  position: relative;
}
.boot-ring::before {
  content: ""; position: absolute; inset: -1px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: #ffc845;
  border-right-color: #e63946;
  animation: spinSlow 2.4s linear infinite;
}
.boot-ring::after {
  content: "岁"; position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 32px;
  color: rgba(255,255,255,.4);
}
.boot-title { font-family: var(--serif); font-size: 20px; letter-spacing: .6em; color: rgba(255,255,255,.8); text-indent: .6em; }
.boot-sub { font-size: 10px; letter-spacing: .3em; color: rgba(255,255,255,.3); }
.boot .boot-screen, .boot-screen.hide { opacity: 0; visibility: hidden; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  :root { --dock-h: 160px; }
  .topbar { padding: 14px 16px; gap: 10px; }
  .brand-text span { display: none; }
  .brand-text b { font-size: 16px; letter-spacing: .12em; }
  .brand-seal { width: 34px; height: 34px; font-size: 18px; }
  .today { padding: 6px 10px; font-size: 10.5px; }
  .today em { display: none; }
  .iconbtn { width: 32px; height: 32px; }
  .hero-title { font-size: clamp(40px, 15vw, 78px); }
  .hero-tag { font-size: 14px; letter-spacing: .12em; }
  .hero-tag::before, .hero-tag::after { display: none; }
  .hero-actions { margin-top: 22px; }
  .cta { padding: 11px 20px; font-size: 12px; letter-spacing: .14em; }
  .pill { padding: 6px 10px; font-size: 10.5px; }
  .dock { padding: 8px 12px 3px; }
  /* 小屏：两个常驻按钮改到分类横条上方单独一行，一进来就看得见 */
  .dock-ops {
    position: static; justify-content: flex-end;
    margin: 0 0 3px; gap: 6px;
  }
  .cats { padding-right: 0; }
  .scene { width: 94vw; }
  .hint { display: none; }
  .dw-meta-row { grid-template-columns: 1fr; }
}

@media (max-height: 640px) {
  .hero-title { font-size: clamp(36px, 9vh, 100px); }
  .symbol-wrap { width: 58px; height: 58px; }
  .hero-tag { margin-top: 12px; font-size: 14px; }
  .hero-meta { margin-top: 14px; }
  .hero-actions { margin-top: 16px; }
}

/* =========================================================
   第二轮改造：母题剪影 / 场景浮物 / 专属小游戏 / 生日
   ========================================================= */

/* ---------- 母题剪影层 ---------- */
#motif {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .72;
  transition: opacity .9s ease;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 58%, rgba(0,0,0,.55) 76%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 58%, rgba(0,0,0,.55) 76%, transparent 96%);
}

/* ---------- 场景浮物 ---------- */
.floaters { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.fl {
  position: absolute;
  bottom: -14vh;
  left: var(--x);
  color: var(--clr);
  font-size: var(--s);
  line-height: 1;
  opacity: 0;
  text-shadow: 0 0 10px var(--clr), 0 0 22px var(--clr);
  animation: flRise var(--d) linear infinite;
  animation-delay: var(--dl);
  will-change: transform, opacity;
}
@keyframes flRise {
  0%   { opacity: 0;   transform: translate3d(0, 0, 0) rotate(0deg) scale(.85); }
  14%  { opacity: var(--o); }
  52%  { transform: translate3d(calc(var(--dr) * .52), -54vh, 0) rotate(calc(var(--rot) * .5)) scale(1); }
  86%  { opacity: calc(var(--o) * .62); }
  100% { opacity: 0;   transform: translate3d(var(--dr), -116vh, 0) rotate(var(--rot)) scale(1.06); }
}

/* ---------- 中间按钮：专属小游戏 ---------- */
.cta.game {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 22px 11px 18px;
  border-radius: 3px;
  border: 1px solid transparent;
  color: #fff;
  font-weight: 800;
  letter-spacing: .14em;
  background:
    linear-gradient(135deg, rgba(10, 10, 16, .66), rgba(10, 10, 16, .34)) padding-box,
    linear-gradient(135deg, var(--c2), var(--c1) 62%, var(--c2)) border-box;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .5), 0 0 24px var(--c1-a), inset 0 1px 0 rgba(255, 255, 255, .16);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
  transition: transform .22s, box-shadow .22s, filter .22s;
}
.cta.game::after { display: none; }
.cta.game:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .55), 0 0 34px var(--c2-a), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.cta.game .gdot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c2);
  box-shadow: 0 0 10px var(--c2), 0 0 20px var(--c2);
  animation: pulseDot 1.7s ease-in-out infinite;
}
@keyframes pulseDot { 50% { transform: scale(.5); opacity: .55; } }
.cta.game .gcnt {
  padding: 2px 6px;
  font-size: 10px; font-weight: 600; letter-spacing: .06em;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 2px;
  color: rgba(255, 255, 255, .82);
}

/* ---------- 生日气泡（尾巴指向右上角蛋糕图标） ---------- */
.bday-tip {
  position: absolute;
  right: 0;
  top: calc(100% + 11px);
  width: max-content;
  max-width: 156px;
  padding: 8px 11px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: linear-gradient(135deg, rgba(20, 18, 24, .94), rgba(16, 14, 20, .74));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5), 0 0 18px var(--c1-a);
  backdrop-filter: blur(10px);
  animation: tipFloat 4.4s ease-in-out infinite;
  transition: opacity .4s ease, transform .4s;
  --tip-tail: 14px;   /* 三角中心正对蛋糕按钮（38px 宽，距右 19px） */
}
.bday-tip::before {
  content: "";
  position: absolute;
  top: -6px; right: var(--tip-tail);
  width: 10px; height: 10px;
  background: rgba(20, 18, 24, .9);
  border-left: 1px solid rgba(255, 255, 255, .22);
  border-top: 1px solid rgba(255, 255, 255, .22);
  transform: rotate(45deg);
}
.bday-tip.off { opacity: 0; pointer-events: none; transform: translateY(-6px); }
.bday-tip-text {
  display: block;
  padding: 0;
  font-size: 11.5px; line-height: 1.55; letter-spacing: .05em;
  color: rgba(255, 255, 255, .92);
  text-align: right;
  background: none; border: none;
  transition: color .2s;
}
.bday-tip-text:hover { color: var(--c2); }
@keyframes tipFloat { 50% { transform: translateY(-5px); } }

/* ---------- 底部操作提示 ---------- */
.stage-hint {
  position: absolute; left: 0; right: 0;
  bottom: calc(var(--dock-pad) + 2px);
  z-index: 11;
  text-align: center;
  font-size: 10.5px; letter-spacing: .14em;
  color: rgba(255, 255, 255, .3);
  pointer-events: none;
  transition: opacity .4s ease;
}

/* ---------- 小游戏面板 ---------- */
.gp-mask {
  position: fixed; inset: 0; z-index: 72;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: radial-gradient(120% 90% at 50% 50%, rgba(8, 8, 14, .52), rgba(3, 3, 6, .8));
  backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden;
  transition: opacity .34s ease, visibility .34s;
}
.gp-mask.open { opacity: 1; visibility: visible; }
.gp-panel {
  position: relative;
  width: min(840px, 95vw);
  height: min(660px, 86vh);
  display: flex; flex-direction: column;
  background: linear-gradient(160deg, rgba(23, 20, 29, .97), rgba(9, 8, 13, .98));
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 6px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 70px var(--c1-a);
  overflow: hidden;
  transform: translateY(16px) scale(.975);
  transition: transform .42s cubic-bezier(.22, .9, .3, 1);
}
.gp-mask.open .gp-panel { transform: none; }
.gp-head {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(90deg, var(--c1-a), transparent 55%);
}
.gp-tt { min-width: 148px; max-width: 240px; }
.gp-tt b {
  display: block; font-family: var(--serif);
  font-size: 16px; letter-spacing: .08em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gp-tt i {
  display: block; margin-top: 3px;
  font-style: normal; font-size: 10px; letter-spacing: .22em;
  color: var(--ink-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gp-tabs { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; overflow-x: auto; scrollbar-width: none; }
.gp-tabs::-webkit-scrollbar { display: none; }
.gp-tab {
  flex: none;
  padding: 7px 13px;
  font-size: 11.5px; letter-spacing: .06em;
  color: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 3px;
  background: rgba(255, 255, 255, .045);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .32);
  transition: color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.gp-tab:hover { color: #fff; border-color: var(--c2); transform: translateY(-1px); }
.gp-tab.on {
  color: #100c11; font-weight: 800;
  border-color: transparent;
  background: linear-gradient(135deg, var(--c2), var(--c1));
  box-shadow: 0 6px 20px var(--c1-a);
}
.gp-stat {
  display: flex; gap: 16px; text-align: right;
  font-size: 9.5px; letter-spacing: .16em; color: var(--ink-dim);
}
.gp-stat span { display: block; }
.gp-stat b {
  display: block; margin-top: 2px;
  font-size: 17px; letter-spacing: .02em; color: #fff;
  font-variant-numeric: tabular-nums;
}
.gp-x {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 3px;
  color: rgba(255, 255, 255, .8);
  transition: border-color .2s, color .2s;
}
.gp-x:hover { color: #fff; border-color: var(--c2); }
.gp-x svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.gp-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.gp-bar { position: relative; height: 2px; background: rgba(255, 255, 255, .07); }
.gp-bar i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 100%;
  background: linear-gradient(90deg, var(--c2), var(--c1));
  box-shadow: 0 0 12px var(--c2-a);
  transition: width 1.05s linear;
}
#gpCanvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.gp-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap;
  padding: 11px 15px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 11.5px; letter-spacing: .04em; color: var(--ink-dim);
}
.gp-done {
  display: none;
  align-items: center;
  padding: 7px 15px;
  border-radius: 3px;
  border: 1px solid rgba(255, 226, 179, .5);
  background: linear-gradient(135deg, rgba(255, 226, 179, .26), rgba(255, 226, 179, .08));
  color: #ffe2b3;
  font: 600 12px/1 inherit;
  letter-spacing: .06em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .38);
  transition: transform .18s ease, box-shadow .18s ease;
}
.gp-done.on { display: inline-flex; }
.gp-done:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
/* 面板里的按钮统一去掉移动端 300ms 双击延迟，点着点着不会“失灵” */
.gp-tab, .gp-x, .gp-done, .gp-over .cta, .gp-foot button { touch-action: manipulation; user-select: none; }
.cat.today-btn { color: #ffe2b3; border-color: rgba(255, 226, 179, .42); box-shadow: 0 3px 12px rgba(0, 0, 0, .34); }
.gp-desc { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-tip { flex: none; color: rgba(255, 255, 255, .62); }
.gp-tip b { color: var(--c2); }
.gp-over {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(6, 6, 12, .76);
  backdrop-filter: blur(5px);
  opacity: 0; visibility: hidden;
  pointer-events: none;
  /* 隐藏时立刻撤掉命中区，避免结算层刚收起时吞掉下方按键的点击 */
  transition: opacity .3s ease, visibility 0s linear .3s;
}
.gp-over.show { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .3s ease, visibility 0s linear 0s; }
.gp-over-in { padding: 18px 26px; text-align: center; }
.gp-over-in h4 {
  font-family: var(--serif);
  font-size: 30px; letter-spacing: .14em;
  background: linear-gradient(135deg, var(--c2), var(--c1));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gp-over-in p { margin: 12px 0 20px; font-size: 12.5px; line-height: 1.8; color: var(--ink-dim); }
.gp-badge {
  font-family: var(--serif);
  font-size: clamp(46px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: .04em;
  margin-top: 6px;
  color: #8fd8ff;
  text-shadow: 0 0 26px rgba(143, 216, 255, .7);
  animation: badgeIn .5s cubic-bezier(.2, 1.5, .4, 1) both;
}
.gp-over[data-tier="S"] .gp-badge { animation-duration: .62s; }
@keyframes badgeIn {
  from { transform: scale(.5) rotate(-8deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}
.gp-over-btns { display: flex; gap: 10px; justify-content: center; }

/* ---------- 生日幕布 ---------- */
.bdc {
  position: fixed; inset: 0; z-index: 88;
  display: grid; place-items: center;
  background: radial-gradient(65% 65% at 50% 48%, rgba(9, 8, 14, .88), rgba(2, 2, 5, .98));
  opacity: 0; visibility: hidden;
  transition: opacity .5s ease, visibility .5s;
  overflow: hidden;
}
.bdc.show { opacity: 1; visibility: visible; }
.bdc.fade {
  opacity: 0;
  transition: opacity .62s ease;
}
.bdc::before {
  content: "";
  position: absolute; inset: -40%;
  background: conic-gradient(from 0deg at 50% 50%,
    transparent 0deg, color-mix(in srgb, var(--c2) 16%, transparent) 20deg, transparent 44deg,
    transparent 130deg, color-mix(in srgb, var(--c1) 18%, transparent) 150deg, transparent 176deg,
    transparent 260deg, color-mix(in srgb, var(--c2) 14%, transparent) 280deg, transparent 310deg);
  filter: blur(26px);
  opacity: .5;
  animation: rayspin 46s linear infinite;
}
.bdc-inner {
  position: relative;
  text-align: center;
  transform: scale(1);
  transition: transform 1.1s cubic-bezier(.16, .9, .2, 1), opacity .9s ease, filter .9s;
  will-change: transform;
}
.bdc-t {
  font-family: var(--serif);
  font-size: clamp(30px, 7.4vw, 104px);
  letter-spacing: .12em;
  line-height: 1.12;
  white-space: nowrap;
  text-indent: .12em;
  background: linear-gradient(135deg, #fff 6%, var(--c2) 42%, var(--c1) 76%, #fff 98%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 30px color-mix(in srgb, var(--c1) 45%, transparent));
}
.bdc.show.in .bdc-t span {
  display: inline-block;
  /* forwards 而不是 both：动画没跑起来时用元素自身样式（可见），
     不会被 backwards 填充按在「透明」那一帧上 */
  animation: bdcChar .9s cubic-bezier(.2, .9, .25, 1) forwards;
  animation-delay: var(--d, 0s);
}
/* 默认就可见：入场动画只是锦上添花，动画被跳过（省电模式 / 小屏首帧掉帧）也不能白屏 */
.bdc-t span { display: inline-block; opacity: 1; }
@keyframes bdcChar {
  0%   { opacity: 0; transform: translateY(.3em) scale(1.06); filter: blur(4px); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: none; filter: none; }
}
.bdc-sub {
  margin-top: 18px;
  font-size: 11px; letter-spacing: .34em;
  color: rgba(255, 255, 255, .42);
  transition: opacity .5s;
}
.bdc-meta {
  margin-top: 10px;
  font-size: 12px; letter-spacing: .18em;
  color: rgba(255, 255, 255, .56);
  transition: opacity .5s;
}
.bdc.shrink .bdc-inner {
  transform: translateY(-28vh) scale(.3);
  opacity: 0;
  filter: blur(6px);
  transition: transform .8s cubic-bezier(.4, 0, .8, .4), opacity .7s ease .1s, filter .7s ease;
}
.bdc.shrink .bdc-sub, .bdc.shrink .bdc-meta { opacity: 0; }

/* 生日场景的额外光效 */
#app[data-scene="bday"] .hero-title {
  filter: drop-shadow(0 0 16px var(--c2-a));
  gap: clamp(10px, 1.2vw, 28px);
  letter-spacing: .08em;
}
#app[data-scene="bday"] .hero-tag {
  color: #fff; text-shadow: 0 0 18px var(--c2-a), 0 0 40px var(--c1-a);
}
#app[data-scene="bday"] .scene-eyebrow { letter-spacing: .5em; }
#app[data-scene="bday"] .bday-tip,
.bday-tip.off { opacity: 0 !important; pointer-events: none !important; transition: none !important; animation: none !important; }

/* ---------- 响应式补丁 ---------- */
@media (max-width: 900px) {
  :root { --dock-pad: 224px; }
  /* 小屏的生日大字：实色字 + 外发光，不再依赖 background-clip 与入场动画，
     任何机器上都一定看得见「祝你生日快乐」 */
  .bdc-t {
    font-size: clamp(26px, 8.4vw, 46px);
    letter-spacing: .08em;
    white-space: normal;
    max-width: 92vw;
    margin: 0 auto;
    color: #fff;
    background: none;
    -webkit-background-clip: border-box; background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    filter: drop-shadow(0 0 18px var(--c1-a)) drop-shadow(0 0 8px rgba(255, 255, 255, .55));
  }
  .bdc-t span { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  /* 小屏的中文大字：同样走实色，不依赖 background-clip（老内核/WebView 上会整字消失） */
  .hero-title {
    max-width: 94vw;
    margin-left: auto; margin-right: auto;
  }
  .hero-title span {
    color: #fff;
    background: none;
    -webkit-background-clip: border-box; background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .35)) drop-shadow(0 0 22px var(--c1-a));
  }
  .bday-tip {
    max-width: 132px; padding: 7px 10px;
    font-size: 10.5px; top: calc(100% + 9px);
    --tip-tail: 14px;
  }
  .bday-tip-text { font-size: 10.5px; }
  .stage-hint { font-size: 9.5px; letter-spacing: .08em; }
  .gp-panel { width: 96vw; height: 90vh; }
  .gp-head { flex-wrap: wrap; gap: 6px 10px; padding: 9px 11px 10px; }
  .gp-tt { flex: 1 1 120px; min-width: 0; max-width: none; }
  .gp-tt b { font-size: 14px; }
  .gp-stat { margin-left: auto; gap: 10px; }
  .gp-x { order: 2; width: 32px; height: 32px; }
  /* 换局按钮独占一行，三个等分，小屏也点得到 */
  .gp-tabs { order: 4; flex: 0 0 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; overflow: visible; }
  .gp-tab { flex: none; min-width: 0; padding: 9px 4px; font-size: 11px; text-align: center; touch-action: manipulation; }
  .gp-foot { padding: 8px 12px; font-size: 10.5px; }
  .cta.game { padding: 10px 16px; font-size: 12px; letter-spacing: .1em; }
}

/* 矮屏（笔记本 / 横屏手机）：压缩纵向留白，避免按钮压到底部索引 */
@media (max-height: 780px) {
  .stage { padding-top: 62px; padding-bottom: calc(var(--dock-pad) + 14px); }
  .symbol-wrap { width: clamp(54px, 6.4vw, 78px); height: clamp(54px, 6.4vw, 78px); }
  .hero-title { font-size: calc(var(--tsize, 88px) * .82); }
  .hero-en { margin-top: 10px; }
  .hero-tag { margin-top: 10px; font-size: 15px; }
  .hero-meta { margin-top: 14px; }
  .hero-actions { margin-top: 18px; }
  .scene-eyebrow { margin-bottom: 8px; }
}

@media (max-height: 660px) {
  :root { --dock-pad: 190px; }
  .symbol-wrap { display: none; }
  .hero-title { font-size: calc(var(--tsize, 76px) * .66); }
  .hero-tag, .hero-en { margin-top: 8px; }
  .hero-meta { margin-top: 10px; gap: 6px; }
  .hero-actions { margin-top: 12px; }
  /* 矮屏也留着这行提示（矮屏 / 手机更容易看不到操作方式） */
  .stage-hint { font-size: 9px; letter-spacing: .06em; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-aura i, .bg-rays, .cta::after, .brand-seal::after, .symbol-wrap::before, .symbol-wrap::after { animation: none !important; }
  .hero-title span { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .scene-body, .flash { transition: none !important; }
  .fl, .bday-tip, .cta.game .gdot, .bdc::before { animation: none !important; }
  .fl { opacity: var(--o); transform: translate3d(0, -40vh, 0); }
  .bdc.show .bdc-t span { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* ---------- 交互兜底：让按钮任何时候都点得动（不改任何视觉） ---------- */
.cta, .cta *,
.topbar button, .topbar .icon-btn,
.gp-tab, .gp-x, .gp-foot button, .gp-over-btns button,
.rail-arrow, .rail-item, .cat,
.bday-tip-text, .ww-x, .wish-form button,
.scene-body [data-act] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* 遮罩关掉之后不保留毛玻璃图层，模糊不用一直算 */
.gp-mask:not(.open),
.overlay:not(.open) { backdrop-filter: none; -webkit-backdrop-filter: none; }
.drawer:not(.open) .drawer-glass { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* 关掉的遮罩一律不吃事件（有哪层没关干净也不会再挡住点击） */
.gp-mask:not(.open),
.overlay:not(.open),
.drawer:not(.open) { pointer-events: none !important; }

/* 提示文案：鼠标说滚轮，手机说点击/滑动 */
.hint-touch { display: none; }
@media (max-width: 900px), (hover: none), (pointer: coarse) {
  .hint-mouse { display: none; }
  .hint-touch { display: inline; }
}

/* 玩法面板打开时，背后那堆动画全部暂停：反正在遮罩下看不见，省下来的算力都给面板 */
#app.gp-on .bg-aura i,
#app.gp-on .bg-rays,
#app.gp-on .fl,
#app.gp-on .symbol-wrap svg,
#app.gp-on .cta::after,
#app.gp-on .brand-seal::after,
#app.gp-on .hero-title span,
#app.gp-on .bday-tip,
#app.gp-on .bdc::before { animation-play-state: paused !important; }

/* 玩的时候锁住手势：手机怎么滑都不会牵动底下的页面、不会触发视口高度变化把画布重设一遍 */
html, body { overscroll-behavior: none; }
html { overscroll-behavior-y: none; }
.gp-mask.open,
.gp-stage,
#gpCanvas { overscroll-behavior: contain; touch-action: none; }
