/* 若木相羊网站样式（v0.7，由首页原型 prototype/home/ v2.2 搬来）
   配色取自主播直播间（P002）：奶油白、可可棕、金色饰品、湖蓝色眼睛、酒红色
   布局参照设计稿 P001；交互框是"四角内凹"形状（见 site.js 的 drawFrame）
   前半部分是首页（和原型一致），后半部分是 v0.7 新增的内页样式 */

@font-face { font-family: "RomuBrush"; src: url("assets/fonts/longcang-sub.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "RomuSerif"; src: url("assets/fonts/notoserifsc-600-sub.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "RomuLatin"; src: url("assets/fonts/cormorant-sub.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --ink: #3a2a25;          /* 可可棕：正文 */
  --ink-soft: #735f54;
  --gold: #c39543;
  --gold-soft: #e7c98d;
  --teal: #23908f;         /* 湖蓝：强调色 */
  --wine: #8e2f30;         /* 酒红：置顶、舰长专属 */
  --glass: rgba(255, 249, 240, .56);
  --glass-hover: rgba(255, 251, 245, .72);
  --glass-strong: rgba(255, 250, 243, .78);
  --line: rgba(255, 255, 255, .78);
  --line-inner: rgba(195, 149, 67, .42);
  --line-glow: rgba(255, 244, 222, .65);
  --title: #fffaf1;
  --title-shadow: 0 2px 14px rgba(110, 60, 20, .45);
  --spark: 255, 226, 150;
  --ease: cubic-bezier(.22, .7, .2, 1);
  --font-sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "RomuSerif", "Songti SC", "STSong", "SimSun", serif;
  --font-brush: "RomuBrush", "KaiTi", "STKaiti", serif;
  --font-latin: "RomuLatin", "Cormorant Garamond", Georgia, serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #f4e8d8;
  --ink-soft: #cbb8a6;
  --gold: #d8b06a;
  --teal: #6fd0ca;
  --wine: #b04446;
  --glass: rgba(36, 26, 32, .52);
  --glass-hover: rgba(46, 33, 40, .66);
  --glass-strong: rgba(58, 42, 50, .78);
  --line: rgba(255, 228, 190, .3);
  --line-inner: rgba(216, 176, 106, .38);
  --line-glow: rgba(150, 190, 255, .25);
  --title: #fdf3e4;
  --title-shadow: 0 2px 16px rgba(10, 6, 30, .7);
  --spark: 190, 225, 255;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
/* 背景和页面宽度一律按整个窗口算（包括滚动条的位置）：长页面出现滚动条时，背景不会因为窗口变窄 15px 而缩放一下，
   内容也不会左右挪动。滚动条直接盖在页面右边一点点上（页面两边本来就有留白） */
html { overflow-x: hidden; }   /* 注意：html 不要设背景色，否则 body 的底色会盖在背景图上面（2026-11-08 出过这个问题） */
body {
  zoom: var(--zoom, 1);                         /* 大屏幕整体放大，app.js 按窗口算 */
  min-height: calc(100vh / var(--zoom, 1));     /* zoom 会把 vh 一起放大，这里除回去 */
  width: calc(100vw / var(--zoom, 1));
  display: flex; flex-direction: column;
  font-family: var(--font-sans);
  font-variant-numeric: lining-nums;   /* 英文字体 Cormorant 默认是"旧式数字"（3、7、9 往下坠），统一改成等高数字，和中文对齐 */
  color: var(--ink);
  background: #e9c9a0;
  overflow-x: hidden;
  overflow-x: clip;   /* clip 不会让 body 变成滚动容器，页面里的"贴顶"（position: sticky）才有效；老浏览器不认 clip 时退回上一行 */
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] body { background: #2a1e22; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { -webkit-user-drag: none; user-select: none; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.arrow { display: inline-block; transition: transform .3s var(--ease); }
/* 按钮、标签、顶栏、卡片不让选中文字：连续快点（比如日夜按钮）会被浏览器当成双击，选中旁边头像里的字（2026-11-08 用户反馈）。
   用户菜单里的名字和 UID 仍然可以选中复制 */
.topbar, button, .btn, .tabs, .admin-tabs, .cards, .player, .mascot, .to-top, .nav-bar { -webkit-user-select: none; user-select: none; }
.user-menu.open .menu-pop .who { -webkit-user-select: text; user-select: text; }   /* 只在菜单展开时可选（收起时只是透明，不能让它被连击选中） */

/* ---------- 背景：白天、夜晚各一张（构图相同），切换时只改透明度（显卡直接合成，不重绘） ---------- */
.bg { position: fixed; left: 0; top: 0; width: calc(100vw / var(--zoom, 1)); height: calc(100vh / var(--zoom, 1)); z-index: -2; overflow: hidden; contain: strict; }
.bg-day, .bg-night { position: absolute; inset: 0; background: center / cover no-repeat; background-position: 50% var(--bg-oy, 50%); }   /* --bg-oy：上下偏移，site.js Romu.fitBg 按卡片位置算 */
.bg-day { background-image: url("assets/scene-day-1672.webp"); }
/* 日夜混合比例 --night（0 白天 ~ 1 夜里）由 theme.js / site.js 按现实时间或按钮写入（v0.7.4 R011），黄昏、清晨是两张图叠在一起 */
.bg-night { background-image: url("assets/scene-night-1672.webp"); opacity: var(--night, 0); transition: opacity .9s; will-change: opacity; }
.bg-shade::before, .bg-shade::after { content: ""; position: absolute; inset: 0; transition: opacity .9s; }
/* 背景上的罩色（日 / 夜各一组），轻量模式的"假毛玻璃"也用同一组，保证颜色一致 */
:root {
  --shade-day: linear-gradient(90deg, rgba(255, 240, 220, .36) 0%, rgba(255, 240, 220, .06) 45%, rgba(60, 30, 20, .06) 100%),
               linear-gradient(0deg, rgba(70, 40, 25, .3) 0%, rgba(70, 40, 25, 0) 38%);
  --shade-night: linear-gradient(90deg, rgba(20, 14, 34, .34) 0%, rgba(20, 14, 34, .05) 45%),
                 linear-gradient(0deg, rgba(12, 8, 20, .5) 0%, rgba(12, 8, 20, 0) 40%);
  --shade: var(--shade-day);
  --bg-blur: url("assets/scene-day-blur-1672.webp");
  --bg-pos: 50% var(--bg-oy, 50%);
}
:root[data-theme="dark"] { --shade: var(--shade-night); --bg-blur: url("assets/scene-night-blur-1672.webp"); }
.bg-shade::before { background: var(--shade-day); opacity: calc(1 - var(--night, 0)); }
.bg-shade::after { background: var(--shade-night); opacity: var(--night, 0); }

/* ---------- 昼夜场景（v0.7.4，R010 / R011）：太阳、月亮按时间从海上升起落下，朝霞晚霞，海面波光，船轻轻起伏 ----------
   .scene 和电脑版背景图（1672×941，铺满裁切）一样大、一样对齐，里面的东西都用"占背景图的百分比"定位：
   宽 = max(背景框宽, 背景框高 × 1672/941)，高同理（cqw / cqh 是相对 .bg 的单位）。手机版背景另外裁切，看不到海，整个场景不显示。
   位置数据：海平线 y 69.18%（第 651 行）；船图在 (610, 610)、64×56 像素（见 prototype/home/build_scene.py 的 SHIP_BOX、PAD）。
   太阳月亮的位置 --sun-x / --sun-y / --moon-x / --moon-y（背景图百分比）、透明度、"低不低"由 site.js 每分钟算一次写入。 */
.bg { container-type: size; }
.bg-glow {   /* 朝霞 / 晚霞：海平线附近的粉橙色光 */
  position: absolute; inset: 0; pointer-events: none; opacity: var(--glow, 0); transition: opacity .9s;
  background: radial-gradient(42% 34% at var(--glow-x, 24%) 66%, rgba(255, 150, 96, .42), rgba(255, 128, 140, .12) 55%, transparent 80%),
              linear-gradient(0deg, rgba(255, 140, 110, .1), rgba(255, 140, 110, 0) 50%);
}
.scene { position: absolute; left: 50%; top: var(--bg-oy, calc((100cqh - max(56.28cqw, 100cqh)) / 2)); width: max(100cqw, 177.684cqh); height: max(56.28cqw, 100cqh); transform: translateX(-50%); pointer-events: none; }
.scene .sky { position: absolute; left: 0; top: 0; width: 100%; height: 69.18%; overflow: hidden; }   /* 只画在海平线以上：落到海平线就"沉进海里" */
/* 云和树挡住太阳月亮（2026-11-13）：太阳、月亮各放在一层里，这层用"晴空遮罩"裁剪：遮罩是背景图和 ChatGPT 去掉云后的
   晴空图逐像素比较算出来的（prototype/home/build_scene.py），云越厚越不透；树冠、城堡完全挡住。白天的云配太阳，夜里的云配月亮 */
.sky .sky-l { position: absolute; inset: 0; -webkit-mask: var(--sky-mask) 0 0 / 100% 100% no-repeat; mask: var(--sky-mask) 0 0 / 100% 100% no-repeat; }
.sky .sun-l { --sky-mask: url("assets/sky-mask-day.webp"); }
.sky .moon-l { --sky-mask: url("assets/sky-mask-night.webp"); }
.sky .sun, .sky .moon { position: absolute; width: 2.5%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); transition: opacity .9s; }
.sky .sun { left: calc(var(--sun-x, -10) * 1%); top: calc(var(--sun-y, 120) / .6918 * 1%); opacity: var(--sun-o, 0);
  background: radial-gradient(circle, #fff 0%, #fffbea 50%, #ffeeb8 64%, rgba(255, 226, 150, .6) 69%, rgba(255, 214, 140, 0) 74%);
  box-shadow: 0 0 .6em .25em rgba(255, 250, 225, calc(.85 - var(--sun-red, 0) * .45)); font-size: clamp(8px, 1cqw, 24px);
  /* 贴近海平线：大一点、稍微压扁（大气折射），越低越明显 */
  transform: translate(-50%, -50%) scale(calc(1 + var(--sun-low, 0) * .22), calc(1 + var(--sun-low, 0) * .22 - var(--sun-red, 0) * .14)); }
.sky .sun::before {   /* 光晕：太阳越低越大、越偏橙 */
  content: ""; position: absolute; left: 50%; top: 50%; width: 1200%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) scale(calc(.7 + var(--sun-low, 0) * .5));
  background: radial-gradient(circle, rgba(255, 255, 240, .95) 0%, rgba(255, 248, 210, .7) 5%, rgba(255, 230, 170, .4) 11%,
              rgba(255, 205, 140, .2) 22%, rgba(255, 180, 110, .08) 38%, transparent 60%);
}
.sky .sun::after {   /* 低的时候外圈带点橙色；贴着海面时整个太阳发红（--sun-red） */
  content: ""; position: absolute; inset: -60%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 120, 40, calc(var(--sun-red, 0) * .85)) 0, rgba(255, 92, 36, calc(var(--sun-red, 0) * .9)) 27%, transparent 33%),
              radial-gradient(circle, transparent 30%, rgba(255, 160, 80, calc(var(--sun-low, 0) * .32)) 42%, rgba(255, 150, 80, 0) 70%); }
/* 月亮：当天真实的月相（site.js 画 SVG：暗的整圆 + 亮的部分），亮的一边斜向下朝着太阳 */
.sky .moon { left: calc(var(--moon-x, -10) * 1%); top: calc(var(--moon-y, 120) / .6918 * 1%); opacity: var(--moon-o, 0); width: 2.3%;
  font-size: clamp(8px, 1.1cqw, 22px); transform: translate(-50%, -50%) rotate(var(--moon-rot, 25deg)); }
.sky .moon svg { position: relative; display: block; width: 100%; height: 100%; overflow: visible; }
.sky .moon svg * { stroke: none; }    /* 全站的图标 SVG 默认有描边（1.6），这里不要 */
.sky .moon .dark { fill: rgba(176, 190, 235, .14); }     /* 没照亮的部分淡淡地看得见（地球反照），新月的晚上也知道月亮在哪 */
.sky .moon .lit { fill: #fff4d6; }
.sky .moon::before { content: ""; position: absolute; left: 50%; top: 50%; width: 700%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  opacity: calc(.25 + var(--moon-lit, 1) * .75);
  background: radial-gradient(circle, rgba(220, 230, 255, .22) 0%, rgba(200, 215, 255, .08) 30%, transparent 62%); }
/* 海面（只在海的范围里画：左边灌木和右边礁石之间） */
.scene .sea { position: absolute; inset: 0;
  clip-path: polygon(18.5% 69.2%, 47.5% 69.2%, 49.5% 71.4%, 47% 74.4%, 45.4% 77.6%, 41% 79.6%, 30% 79.6%, 26.5% 78.2%, 23% 75.4%, 19.5% 72.2%); }
.sea-path {   /* 太阳 / 月亮正下方海面的光带 */
  position: absolute; top: 69.2%; height: 10.4%; width: 2.6%; transform: translateX(-50%);
  left: calc(var(--path-x, -10) * 1%); opacity: var(--path-o, 0); transition: opacity .9s;
  background: repeating-linear-gradient(180deg, var(--path-c, rgba(255, 232, 170, .75)) 0, rgba(255, 232, 170, 0) 3px, var(--path-c, rgba(255, 232, 170, .75)) 6px);
  filter: blur(.6px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent), linear-gradient(180deg, #000, transparent);
  -webkit-mask-composite: source-in; mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent) intersect, linear-gradient(180deg, #000 20%, transparent);
  animation: path-shimmer 2.4s ease-in-out infinite;
}
:root[data-theme="dark"] .sea-path { --path-c: rgba(225, 235, 255, .7); }
@keyframes path-shimmer { 0%, 100% { transform: translateX(-50%) scaleX(1); } 50% { transform: translateX(-50%) scaleX(1.22); } }
.glints { position: absolute; inset: 0; }
.glints i {   /* 波光：海面上一闪一闪的小亮线（home 页才有，site.js 生成） */
  position: absolute; height: 2px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 246, 214, .95), transparent);
  animation: glint 2.4s ease-in-out infinite;
}
:root[data-theme="dark"] .glints i { background: linear-gradient(90deg, transparent, rgba(214, 228, 255, .85), transparent); }
@keyframes glint { 0%, 100% { opacity: 0; transform: scaleX(.4); } 45% { opacity: 1; transform: scaleX(1); } 60% { opacity: .7; } }
.scene-ship { position: absolute; left: 36.483%; top: 64.825%; width: 3.828%; height: 5.951%; }   /* 船图 64×56（含四周 2 像素透明边），在背景图的 (610, 610) */
.scene-ship i { position: absolute; inset: 0; background: center / 100% 100% no-repeat; transform-origin: 50% 88%; animation: ship-bob 5.6s ease-in-out infinite; }
.scene-ship .day { background-image: url("assets/ship-day.webp"); opacity: calc(1 - var(--night, 0)); transition: opacity .9s; }   /* 天黑时白天的船一起淡出：不然夜里船边缘透出白天船图那圈亮边 */
.scene-ship .night { background-image: url("assets/ship-night.webp"); opacity: var(--night, 0); transition: opacity .9s; }
@keyframes ship-bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-3.5%) rotate(1.2deg); }
}
/* 底部卡片后面不画动态的东西（毛玻璃后面一动，毛玻璃就要每帧重新模糊）：--fx-cut 由 home.js 按卡片位置算 */
.scene-fx { position: absolute; inset: 0; clip-path: inset(0 0 var(--fx-cut, 0px) 0); }
.inner .scene-fx .sea, .inner .glints { display: none; }      /* 内页只保留太阳月亮和船（不动的），不放波光 */
.inner .scene-ship i { animation: none; }
@media (prefers-reduced-motion: reduce) { .scene-ship i, .sea-path, .glints i { animation: none; } .glints { display: none; } }

/* 光点只在左侧和中间的天空、树冠区域飘（不在毛玻璃后面，避免毛玻璃每帧重新模糊） */
.sparkles { position: fixed; left: 0; top: 0; width: 66vw; height: 70vh; z-index: -1; pointer-events: none; overflow: hidden; contain: strict; }
.sparkles i {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--spark), 1) 0%, rgba(var(--spark), .6) 40%, transparent 70%);
  animation: float 9s linear infinite; opacity: 0; will-change: transform, opacity;
}
/* 白天：原来的淡金色光点在明亮天空上完全看不见；改成浅金光尘（亮芯 + 淡琥珀外圈），
   比夜里的萤火稍大一点，目标是"若有若无、仔细看能发现"（2026-11-08 用户：加强版太显眼） */
:root:not([data-theme="dark"]) .sparkles i {
  background: radial-gradient(circle, rgba(255, 252, 238, .95) 0%, rgba(255, 210, 120, .8) 34%, rgba(214, 134, 44, .32) 60%, transparent 72%);
  box-shadow: 0 0 4px rgba(255, 196, 96, .3);
  scale: 1.3;
}
/* 白天的落叶（默认；首页 ?day=dust 时换回光尘）：从树冠下方的天空缓缓飘落，左右摆动、偶尔翻面。
   只在左侧天空区域（不在毛玻璃后面），外层负责下落和摆动，内层负责翻转 */
.leaves { display: none; position: fixed; left: 0; top: 0; width: 66vw; height: 78vh; z-index: -1; pointer-events: none; overflow: hidden; contain: strict; }
.fx-leaves:not([data-theme="dark"]) .leaves { display: block; }
.fx-leaves:not([data-theme="dark"]) .sparkles { display: none; }
.leaves i { position: absolute; top: -24px; animation: leaf-fall 18s linear infinite; will-change: transform, opacity; opacity: 0; }
.leaves b { display: block; border-radius: 0 85% 0 85%; animation: leaf-flip 3s ease-in-out infinite alternate; box-shadow: 0 1px 2px rgba(90, 40, 10, .18); }
.leaf-red { background: linear-gradient(135deg, #c8553a, #9a3424); }
.leaf-orange { background: linear-gradient(135deg, #e48a3c, #b8561f); }
.leaf-gold { background: linear-gradient(135deg, #e9b54f, #c27d25); }
@keyframes leaf-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: .78; }
  25% { transform: translate(-34px, 18vh) rotate(80deg); }
  50% { transform: translate(18px, 37vh) rotate(170deg); }
  75% { transform: translate(-42px, 56vh) rotate(260deg); }
  92% { opacity: .7; }
  100% { transform: translate(-14px, 76vh) rotate(340deg); opacity: 0; }
}
@keyframes leaf-flip { 0% { transform: rotate3d(1, .4, 0, 0deg); } 100% { transform: rotate3d(1, .4, 0, 160deg); } }

/* 夜里的萤火虫（R009）：黄绿色，一明一灭，弯弯曲曲地飞。白天不显示；夜里原来的光点不再显示 */
.fireflies { display: none; position: fixed; left: 0; top: 0; width: 66vw; height: 74vh; z-index: -1; pointer-events: none; overflow: hidden; contain: strict; }
:root[data-theme="dark"] .fireflies { display: block; }
:root[data-theme="dark"] .sparkles { display: none; }
.fireflies i { position: absolute; animation: ff-wander-0 20s ease-in-out infinite alternate; will-change: transform; }
.fireflies b {
  display: block; border-radius: 50%; opacity: 0; will-change: opacity;
  background: radial-gradient(circle, #fffde6 0%, #f4ff9a 32%, rgba(206, 246, 96, .85) 52%, rgba(170, 230, 70, 0) 74%);
  box-shadow: 0 0 8px 3px rgba(210, 250, 110, .6), 0 0 22px 8px rgba(170, 230, 70, .28);
  animation: ff-blink 4s ease-in-out infinite;
}
.fireflies .far b { box-shadow: 0 0 6px 2px rgba(210, 250, 110, .55), 0 0 14px 5px rgba(170, 230, 70, .2); }
@keyframes ff-blink {
  0%, 24% { opacity: .08; }
  40% { opacity: 1; }
  62% { opacity: .9; }
  80%, 100% { opacity: .08; }
}
@keyframes ff-wander-0 {
  0% { transform: translate(0, 0); } 25% { transform: translate(34px, -22px); }
  50% { transform: translate(12px, -48px); } 75% { transform: translate(-26px, -30px); } 100% { transform: translate(-8px, 6px); }
}
@keyframes ff-wander-1 {
  0% { transform: translate(0, 0); } 30% { transform: translate(-40px, -16px); }
  55% { transform: translate(-18px, 22px); } 80% { transform: translate(26px, 10px); } 100% { transform: translate(44px, -20px); }
}
@keyframes ff-wander-2 {
  0% { transform: translate(0, 0); } 20% { transform: translate(18px, 26px); }
  45% { transform: translate(52px, 4px); } 70% { transform: translate(30px, -34px); } 100% { transform: translate(-14px, -18px); }
}

@keyframes float {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  15% { opacity: .9; }
  60% { transform: translate(12px, -100px) scale(1); }
  100% { transform: translate(-6px, -170px) scale(1.1); opacity: 0; }
}

/* ---------- 四角内凹的框（app.js 往 [data-shape] 里插 .sh-bg 和 .sh-line，并按尺寸设 clip-path） ----------
   性能：只有 [data-glass] 的大块才做背景模糊（共 8 个）；按钮类只用半透明底色。
   凹角用 clip-path 路径裁剪（比 CSS 遮罩省：遮罩每帧要多画一张遮罩图）。 */
[data-shape] { position: relative; isolation: isolate; }
.sh-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background: var(--sh-fill, var(--glass));
  transition: background .35s;
}
[data-glass] > .sh-bg { -webkit-backdrop-filter: blur(12px) saturate(135%); backdrop-filter: blur(12px) saturate(135%); }
.sh-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; overflow: visible; }
.sh-line path { fill: none; stroke-width: 1; vector-effect: non-scaling-stroke; transition: stroke .35s, opacity .35s; }
.sh-line .g { stroke: var(--line-glow); stroke-width: 4; opacity: .5; }   /* 柔光：一条粗的半透明线，代替滤镜 */
.sh-line .o { stroke: var(--sh-line, var(--line)); }
.sh-line .i { stroke: var(--sh-inner, var(--line-inner)); }

/* 轻量模式（app.js 检测到没有显卡加速或帧率太低时加 .lite）：
   "假毛玻璃"——面板里贴一张预先模糊好的背景小图（固定在视口上，和背景对齐），
   看起来和实时模糊几乎一样，但每帧不用重新计算模糊（没有显卡时每帧从约 24ms 降到约 4ms）。
   光点保留（不在面板后面，很便宜）；背景不做淡入（切换由圆形展开完成） */
.lite [data-glass] > .sh-bg {
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background-image: linear-gradient(var(--sh-fill, var(--glass)), var(--sh-fill, var(--glass))), var(--shade), var(--bg-blur);
  background-size: auto, auto, auto, cover;
  background-position: 0 0, 0 0, 0 0, var(--bg-pos);
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.lite .bg-night, .lite .bg-shade::before, .lite .bg-shade::after { transition: none; will-change: auto; }
.lite .glints, .lite .sea-path { display: none; }      /* 轻量模式：海面不放波光 */
/* 只画当前主题的那张背景和那层罩色（软件渲染时每多一层全屏图都很贵） */
.lite:not([data-theme="dark"]) .bg-night, .lite:not([data-theme="dark"]) .bg-shade::after,
.lite[data-theme="dark"] .bg-day, .lite[data-theme="dark"] .bg-shade::before { display: none; }

/* ---------- 进场动画（有 JS 时才隐藏，防止脚本出错时页面空白） ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); }
.js .ready [data-reveal], .ready[data-reveal] { animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
/* 毛玻璃块不能整体做淡入：外层元素半透明时，里面的背景模糊看不到后面的画面（规范里叫 Backdrop Root），
   要等淡入结束才突然变成毛玻璃。所以毛玻璃块本身只做位移，淡入放在它的每个子元素上（包括模糊层 .sh-bg 自己） */
.js [data-reveal][data-glass] { opacity: 1; }
.js [data-reveal][data-glass] > * { opacity: 0; }
.js .ready [data-reveal][data-glass] { animation-name: rise-move; }
.js .ready [data-reveal][data-glass] > * { animation: fade-in .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
@keyframes rise-move { to { transform: none; } }
@keyframes fade-in { to { opacity: 1; } }
/* 站内跳转（theme.js 加 .seen）：不放入场动画，页面直接出现 */
.seen.js [data-reveal], .seen.js [data-reveal][data-glass] > *,
.seen.js .welcome-sub, .seen.js .welcome-rule { opacity: 1; transform: none; animation: none; }
.seen.js .welcome .l1, .seen.js .welcome .l2 { animation: none; -webkit-mask: none; mask: none; }
.seen.js .welcome-arc .arc { animation: none; stroke-dashoffset: 0; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 18px clamp(16px, 3vw, 48px) 0;
  position: relative; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; user-select: none; }
.brand-emblem { width: 62px; height: auto; filter: drop-shadow(0 2px 6px rgba(90, 50, 10, .35)); transition: transform .8s var(--ease); }
.brand:hover .brand-emblem { transform: rotate(-12deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; align-items: center; color: var(--title); text-shadow: var(--title-shadow); }
.brand-cn { font-family: var(--font-serif); font-weight: 600; font-size: 34px; letter-spacing: .18em; line-height: 1.1; padding-left: .18em; }
.brand-en { display: flex; align-items: center; gap: 8px; font-family: var(--font-latin); font-size: 15px; letter-spacing: .32em; }
.brand-en i { width: 22px; height: 1px; background: currentColor; opacity: .7; }

.space-link {
  margin: 0 auto; display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 20px 0 18px;
  color: var(--title); text-shadow: 0 1px 6px rgba(90, 50, 20, .5);
  --sh-fill: rgba(120, 70, 30, .22); --sh-line: rgba(255, 255, 255, .6); --sh-inner: transparent;
}
:root[data-theme="dark"] .space-link { --sh-fill: rgba(30, 20, 34, .5); --sh-line: rgba(255, 228, 190, .4); }
.space-link:hover, .space-link:focus-visible { --sh-fill: rgba(120, 70, 30, .36); }
:root[data-theme="dark"] .space-link:hover { --sh-fill: rgba(50, 34, 52, .66); }
.space-link .tv { font-size: 26px; stroke-width: 1.4; transition: transform .5s var(--ease); }
.space-link:hover .tv { transform: rotate(-8deg) translateY(-1px); }
/* 主播头像（R013）：小电视和名字之间，圆形，细金边 */
.space-face { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none;
  box-shadow: 0 0 0 1.5px var(--sh-line, rgba(255, 236, 200, .7)), 0 2px 6px rgba(60, 30, 10, .3); transition: transform .5s var(--ease); }
.space-link:hover .space-face { transform: scale(1.08); }
.space-text { display: flex; align-items: baseline; gap: 6px; line-height: 1; }
.space-text b { font-family: var(--font-serif); font-weight: 600; font-size: 18px; letter-spacing: .08em; }
.space-text small { font-size: 13.5px; opacity: .9; letter-spacing: .04em; }.space-link .out { font-size: 16px; opacity: .8; transition: transform .3s var(--ease); }
.space-link:hover .out { transform: translate(2px, -2px); }

.actions { display: flex; align-items: center; gap: 10px; flex: none; }
.inner .actions { margin-left: auto; }   /* 内页没有中间的 B站入口，按钮靠右 */
.theme-btn, .avatar-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .6); background: rgba(120, 70, 30, .22); color: var(--title); font-size: 20px;
  transition: background .3s, transform .3s var(--ease);
}
:root[data-theme="dark"] .theme-btn, :root[data-theme="dark"] .avatar-btn { background: rgba(30, 20, 34, .5); border-color: rgba(255, 228, 190, .35); }
.theme-btn:hover, .avatar-btn:hover { background: rgba(120, 70, 30, .36); transform: translateY(-1px); }
:root[data-theme="dark"] .theme-btn:hover, :root[data-theme="dark"] .avatar-btn:hover { background: rgba(50, 34, 52, .66); }
.theme-btn svg { position: absolute; transition: transform .6s var(--ease), opacity .4s; }
.theme-btn .star { fill: currentColor; stroke: none; }
/* 三档图标（v0.7.4 R012）：跟随时间 = 半日半月；固定白天 = 太阳；固定夜晚 = 月亮 */
.theme-btn .sun, .theme-btn .moon, .theme-btn .auto { opacity: 0; transform: rotate(-70deg) scale(.5); }
:root[data-mode="light"] .theme-btn .sun, :root[data-mode="dark"] .theme-btn .moon,
:root:not([data-mode="light"]):not([data-mode="dark"]) .theme-btn .auto { opacity: 1; transform: none; }
.theme-btn .auto .half { fill: currentColor; stroke: none; opacity: .85; }
.login-btn {
  height: 38px; padding: 0 20px 0 22px; display: inline-flex; align-items: center; line-height: 1;
  color: var(--title); font-family: var(--font-serif); font-weight: 600; letter-spacing: .14em;
  --sh-fill: rgba(120, 70, 30, .24); --sh-line: rgba(255, 255, 255, .7); --sh-inner: transparent;
}
:root[data-theme="dark"] .login-btn { --sh-fill: rgba(30, 20, 34, .5); --sh-line: rgba(255, 228, 190, .45); }
.login-btn:hover, .login-btn:focus-visible { --sh-fill: rgba(120, 70, 30, .38); }
:root[data-theme="dark"] .login-btn:hover { --sh-fill: rgba(50, 34, 52, .66); }

/* ---------- 主区域 ---------- */
.hero {
  flex: 1; display: grid; grid-template-columns: 1fr minmax(360px, 430px); gap: 32px;
  padding: 28px clamp(16px, 3vw, 48px) 24px; align-items: start;
}
.welcome { position: relative; padding: 9vh 0 0 4vw; color: var(--title); user-select: none; -webkit-user-select: none; cursor: default; }
.welcome-arc { position: absolute; left: 1vw; top: 3vh; width: 330px; height: 330px; opacity: .85; pointer-events: none; }
.welcome-arc .arc { stroke: var(--title); stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .welcome-arc .arc { stroke-dashoffset: 1; animation: draw 2.2s .3s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.welcome-arc .spark { fill: var(--title); stroke: none; transform-origin: 200px 20px; animation: twinkle 3.2s ease-in-out infinite; }
.welcome-arc .dot { fill: var(--title); stroke: none; }
@keyframes twinkle { 50% { transform: scale(.6) rotate(45deg); opacity: .6; } }
.welcome h1 { margin: 0; font-family: var(--font-brush); font-weight: 400; line-height: 1.15; text-shadow: var(--title-shadow); }
.welcome .l1 { display: block; font-size: clamp(44px, 4.6vw, 76px); letter-spacing: .08em; }
.welcome .l2 { display: block; font-size: clamp(50px, 5.2vw, 86px); letter-spacing: .08em; padding-left: 1.4em; }
/* 毛笔字从左往右"写"出来 */
.js .welcome .l1, .js .welcome .l2 {
  -webkit-mask: linear-gradient(90deg, #000 40%, #0000 60%) 100% 0 / 260% 100% no-repeat;
          mask: linear-gradient(90deg, #000 40%, #0000 60%) 100% 0 / 260% 100% no-repeat;
  animation: write 1.6s var(--ease) forwards;
}
.js .welcome .l1 { animation-delay: .35s; }
.js .welcome .l2 { animation-delay: .95s; }
@keyframes write { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
.welcome-tag { display: inline-flex; flex-direction: column; margin: 18px 0 0 2.2em; }   /* 横线跟着文字宽度走 */
/* 句末的"。"右半边是空的，加上字间距，文字右边比左边多空出约 0.74 个字宽；左边补同样的空，文字墨迹才在横线正中 */
.welcome-sub { margin: 0; padding-left: .74em; font-size: 16px; letter-spacing: .12em; text-shadow: 0 1px 8px rgba(90, 50, 20, .55); }
.welcome-rule { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; opacity: .85; }
.welcome-rule i { flex: 1; height: 1px; background: var(--title); }
.welcome-rule b { font-size: 12px; font-weight: 400; }
.js .welcome-sub, .js .welcome-rule { opacity: 0; animation: rise 1.2s 1.9s var(--ease) forwards; }
.js .welcome-rule { animation-delay: 2.1s; }

.side { display: flex; flex-direction: column; gap: 16px; }
.panel { padding: 18px 22px; }
.panel-head { display: flex; align-items: center; gap: 10px; }
.panel-ico { font-size: 26px; color: var(--gold); flex: none; }
.panel h2 { margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: 21px; letter-spacing: .08em; }
.more { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-soft); transition: color .25s; }
.more:hover { color: var(--teal); }
.more:hover .arrow, a:hover > .arrow, .card:hover .arrow { transform: translateX(4px); }

.tabs { position: relative; display: flex; gap: 6px; margin: 12px 0 8px; border-bottom: 1px solid rgba(160, 120, 80, .22); padding-bottom: 8px; }
.tabs button { z-index: 1; height: 29px; border: 0; background: none; padding: 0 14px; font-size: 14px; line-height: 1; cursor: pointer; color: var(--ink-soft); transition: color .3s; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.tab-ind {
  position: absolute; left: 0; top: 0; height: 29px; width: 50px; z-index: 0;
  --sh-fill: var(--glass-strong); --sh-inner: transparent;
  transition: transform .45s var(--ease), width .45s var(--ease);
}
.news-list { list-style: none; margin: 0 0 -8px; padding: 0; min-height: 111px; transition: opacity .25s, transform .25s var(--ease); }
.news-list.out { opacity: 0; transform: translateX(-8px); }
.news-list li { display: flex; align-items: center; gap: 8px; height: 37px; padding: 0 2px; font-size: 14.5px; line-height: 1; }
.news-list li + li { border-top: 1px dashed rgba(160, 120, 80, .22); }
.news-list a { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .25s, padding .3s var(--ease); }
.news-list a:hover { color: var(--teal); padding-left: 3px; }
.news-list .bullet { color: var(--gold); font-size: 11px; }
.news-list li.none { color: var(--ink-soft); font-size: 13.5px; }
.news-list time { position: relative; top: -1px; font-family: var(--font-latin); font-size: 15px; color: var(--ink-soft); flex: none; }   /* 上移 1px，日期和中文标题中线对齐 */
.tag { flex: none; font-size: 11.5px; line-height: 17px; padding: 1px 6px; border-radius: 3px; background: var(--wine); color: #fff; letter-spacing: .05em; }

.cd-head { display: flex; align-items: center; gap: 10px; }
.cd-head h2 { font-size: 16px; letter-spacing: .06em; }
.cd-when { margin-left: auto; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.cd-none { display: flex; flex-direction: column; justify-content: center; height: 56px; margin: 0 0 0 4px; font-size: 15px; font-weight: 600; letter-spacing: .04em; }
.cd-none small { font-weight: 400; font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.cd-note { margin: -3px 0 1px 4px; max-width: 15em; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 数字和小狼一行；小狼放在右侧剩余空间的正中，左右留白相等 */
.cd-body { display: flex; align-items: center; margin-top: 6px; }
.cd-left { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; transform: translateY(-7px); }  /* 数字字形偏下，整体上提让视觉居中 */
.cd-num { display: flex; align-items: baseline; gap: 6px; margin-left: 4px; }
.digit { display: inline-block; overflow: hidden; height: 56px; line-height: 56px; }
.digit b { display: inline-block; font-family: var(--font-latin); font-weight: 600; font-size: 52px; color: var(--ink); min-width: .6em; text-align: center; }
.digit b.roll { animation: roll .55s var(--ease); }
@keyframes roll { from { transform: translateY(-80%); opacity: 0; } to { transform: none; opacity: 1; } }
.cd-num small { font-size: 15px; margin-right: 8px; color: var(--ink-soft); }
.cd-live { display: flex; align-items: center; gap: 8px; height: 50px; font-weight: 600; color: var(--wine); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #e04848; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(224, 72, 72, .6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(224, 72, 72, 0); } }
.mini-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 14px 1px 16px; font-size: 13px; line-height: 1; --sh-fill: var(--glass-strong); --sh-inner: transparent; transition: color .25s; }
.mini-btn:hover { color: var(--teal); }

.mascot { position: relative; border: 0; background: none; padding: 0; cursor: pointer; margin: 0 auto; flex: none; }
.mascot img { display: block; height: 116px; width: auto; filter: drop-shadow(0 4px 8px rgba(60, 30, 10, .28)); animation: bob 4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.mascot:hover img { animation: hop .6s var(--ease); }
@keyframes hop { 30% { transform: translateY(-10px) rotate(-6deg); } 60% { transform: translateY(0) rotate(4deg); } }
.bubble {
  position: absolute; right: 70%; top: 0; white-space: nowrap; padding: 4px 10px; border-radius: 10px 10px 2px 10px;
  background: var(--glass-strong); font-size: 13px; color: var(--ink); box-shadow: 0 2px 8px rgba(60, 30, 10, .15);
  opacity: 0; transform: translateY(6px) scale(.9); transition: opacity .3s, transform .4s var(--ease); pointer-events: none;
}
.mascot.talk .bubble { opacity: 1; transform: none; }

/* ---------- 五个板块 ---------- */
.cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; padding: 0 clamp(16px, 3vw, 48px); }
.card {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-content: center;   /* 文字和按钮作为一组上下居中 */
  column-gap: 14px; align-items: center; padding: 21px 20px 21px 18px; min-height: 164px;
  transition: transform .45s var(--ease);
}
.card .sh-bg::after {   /* 悬停时一道光扫过 */
  content: ""; position: absolute; inset: -10% -30%;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .38) 50%, transparent 58%);
  transform: translateX(-75%); transition: transform 0s;
}
.card:hover .sh-bg::after { transform: translateX(75%); transition: transform 1s var(--ease); }
.card:hover, .card:focus-visible { transform: translateY(-5px); --sh-fill: var(--glass-hover); }
.card:hover .sh-line .g { opacity: 1; }
.card-ico { position: relative; grid-row: 1 / span 2; width: 96px; height: 96px; filter: drop-shadow(0 4px 8px rgba(70, 40, 15, .28)); transition: transform .6s var(--ease); }
.card-ico img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.card-ico .night { opacity: 0; transition: opacity .9s; }   /* 夜间版图标（月光、冷色，ChatGPT 重画的，轮廓和白天版略有不同）：
   只在天黑 / 天亮切换主题那一刻淡入淡出，不跟背景慢慢混合（不然黄昏几十分钟里两个轮廓叠在一起） */
:root[data-theme="dark"] .card-ico .night { opacity: 1; }
.lite:not([data-theme="dark"]) .card-ico .night, .lite[data-theme="dark"] .card-ico .day { display: none; }
.card:hover .card-ico { transform: translateY(-4px) scale(1.07) rotate(-4deg); }
.card-text { display: flex; flex-direction: column; gap: 6px; }
.card-text b { font-family: var(--font-serif); font-weight: 600; font-size: 22px; letter-spacing: .08em; }
.card-text small { font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; min-height: 2.8em; }   /* 说明统一占两行，五张卡的标题对齐 */
.enter { justify-self: start; margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px 1px 14px; font-size: 13px; line-height: 1; --sh-fill: var(--glass-strong); --sh-inner: transparent; transition: color .25s; }
.card:hover .enter { color: var(--teal); }
.enter.soon-enter { color: var(--ink-soft); letter-spacing: .06em; }
.home-legal { flex-basis: 100%; margin: 0; text-align: center; font-size: 12px; color: var(--title); text-shadow: 0 1px 6px rgba(60, 30, 10, .6); opacity: .85; }
.home-legal a { text-decoration: underline; text-underline-offset: 3px; }
.card-shop { --line: rgba(222, 180, 100, .95); --line-inner: rgba(195, 149, 67, .7); }
.ribbon {
  position: absolute; right: 22px; top: -9px; z-index: 2; padding: 2px 10px; font-size: 12px; letter-spacing: .1em; color: #fff;
  background: linear-gradient(90deg, #a5403b, var(--wine));
  clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 50%, 100% 100%, 0 100%, 5px 50%);
  padding-inline: 14px;
}

/* ---------- 底栏 ---------- */
.bottombar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 16px clamp(16px, 3vw, 48px) 18px; }
.motto { display: flex; align-items: center; gap: 12px; color: var(--title); text-shadow: var(--title-shadow); user-select: none; -webkit-user-select: none; cursor: default; }
.motto img { width: 46px; height: auto; animation: spin-slow 40s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.motto p { margin: 0; font-family: var(--font-brush); font-size: 22px; line-height: 1.35; letter-spacing: .06em; }

/* 音乐：平时只露一张小唱片；悬停 / 播放时从左侧展开信息 */
.player { display: flex; align-items: center; gap: 10px; }
.player-info {
  display: flex; flex-direction: column; gap: 7px; width: 240px; padding: 8px 16px 10px;
  --sh-fill: var(--glass); --sh-inner: transparent;
  opacity: 0; transform: translateX(16px); pointer-events: none;
  transition: opacity .35s, transform .45s var(--ease);
}
.player:hover .player-info, .player:focus-within .player-info, .player.peek .player-info { opacity: 1; transform: none; pointer-events: auto; }
.track-name { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; font-family: var(--font-serif); font-weight: 600; white-space: nowrap; }
.track-name small { font-family: var(--font-sans); font-weight: 400; font-size: 11.5px; color: var(--ink-soft); }
.player-row { display: flex; align-items: center; gap: 12px; }
.progress { flex: 1; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 18%, transparent); cursor: pointer; position: relative; }
.progress::after { content: ""; position: absolute; inset: -6px 0; }   /* 扩大点击范围 */
.progress i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--gold); transition: width .25s linear; }
.vol { display: flex; align-items: center; gap: 4px; font-size: 15px; color: var(--ink-soft); }
.vol input { -webkit-appearance: none; appearance: none; width: 56px; height: 14px; background: none; cursor: pointer; }
.vol input::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; margin-top: -3.5px; border-radius: 50%; background: var(--gold); border: 0; }
.vol input::-moz-range-track { height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.vol input::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); border: 0; }
.disc {
  position: relative; width: 52px; height: 52px; flex: none; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px solid var(--line); background: var(--glass-strong);
  display: grid; place-items: center; transition: transform .35s var(--ease), background .3s;
}
.disc:hover { transform: scale(1.06); background: var(--glass-hover); }
.disc img { width: 42px; height: 42px; object-fit: contain; animation: spin 7s linear infinite paused; }
.player.playing .disc img { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.disc-state {
  position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--glass-strong); border: 1px solid var(--line); color: var(--ink); font-size: 12px;
}
.disc-state svg { fill: currentColor; stroke: none; }
.eq { display: none; gap: 1.5px; align-items: flex-end; height: 9px; }
.eq i { width: 2px; background: var(--gold); animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 9px; } }
.player.playing .eq { display: flex; }
/* 内页右下角的唱片（上一页正在播放时出现） */
.bgm-dock { position: fixed; right: clamp(16px, 3vw, 48px); bottom: 18px; z-index: 40; }
/* 浏览器不让新页面自动出声：唱片外圈闪烁，提示点一下 */
.player.blocked .disc { animation: disc-hint 1.6s ease-in-out infinite; }
@keyframes disc-hint { 0%, 100% { box-shadow: 0 0 0 0 rgba(195, 149, 67, .55); } 50% { box-shadow: 0 0 0 9px rgba(195, 149, 67, 0); } }
.player.playing .i-play { display: none; }

/* 站内换页时顶部的细进度条：取页面超过 0.12 秒才出现（site.js 给 html 加 .navigating） */
.nav-bar { position: fixed; left: 0; top: 0; z-index: 100; width: 100%; height: 2px; pointer-events: none; opacity: 0;
           transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, transparent, var(--gold) 40%, var(--teal)); transition: opacity .2s; }
.navigating .nav-bar { opacity: 1; animation: nav-bar 2.4s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes nav-bar { from { transform: scaleX(0); } to { transform: scaleX(.92); } }
.navigating, .navigating * { cursor: progress; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 60;
  padding: 10px 20px; border-radius: 99px; background: rgba(58, 42, 37, .9); color: #fff; font-size: 14px;
  transition: opacity .25s, transform .35s var(--ease); pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
[data-shape]:focus-visible { outline: none; --line: var(--teal); --sh-line: var(--teal); }

/* 主题切换：从按钮处圆形展开（支持 View Transitions 的浏览器）。
   展开期间关掉页面里其他过渡，新画面一次画好。
   有显卡时用 clip-path 圆形裁剪（site.js）；轻量模式（没有显卡）用"圆角 50% 的正方形 + 图片位置反向偏移"，
   只画圆覆盖的那一块，省一整屏的绘制（这种少见的用法在有显卡时连续切换出现过浏览器崩溃，所以只用在轻量模式） */
/* 站内页面跳转不用浏览器的跨页淡入淡出（@view-transition）：2026-11-08 测试时第一次进入页面偶尔闪白，
   推测是新页面还没画好就被拍了快照。现在跳转直接切换（背景不动，站内跳转也不重放入场动画）。
   下面只用于日夜切换（切换时 html 上有 .vt-run） */
:root.vt-run::view-transition-old(root), :root.vt-run::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
:root.vt-run.lite::view-transition-new(root) {
  inset: auto; left: 0; top: 0; width: 0; height: 0;
  border-radius: 50%; overflow: hidden; object-fit: none; object-position: 0 0;
}
.vt-run *, .vt-run *::before, .vt-run *::after { transition: none !important; animation-play-state: paused !important; }
:root.vt-run, :root.vt-run * { -webkit-user-select: none !important; user-select: none !important; }   /* 切换过程中连点不会选中文字 */

/* ======================================================================
   v0.7 网站：顶栏用户菜单、内页（风信、香羊糕铺、登录、管理）、表单、列表
   内页统一用 .page 容器 + .box 面板（四角内凹、毛玻璃，底色比首页更实，长文字好读）
   ====================================================================== */
:root {
  --glass-page: rgba(255, 250, 244, .82);
  --field: rgba(255, 255, 255, .72);
  --field-line: rgba(160, 120, 80, .3);
  --btn: #23908f;
  --btn-hover: #1c7d7c;
  --ok: #2f7f4a;
  --modal-fill: #fbf5ec;
  --warn: #b5502a;
}
:root[data-theme="dark"] {
  --glass-page: rgba(38, 28, 34, .84);
  --field: rgba(18, 12, 16, .45);
  --field-line: rgba(255, 228, 190, .22);
  --btn: #2a8a86;
  --btn-hover: #33a39e;
  --ok: #86d39f;
  --modal-fill: #2e2228;
  --warn: #f2a27a;
}

/* ---------- 顶栏：登录后的用户菜单 ---------- */
.user-menu { position: relative; }
/* 名字第一个字是动态内容（字体子集里不一定有），用系统黑体，所有字都有、上下位置一致 */
.avatar-btn .initial { font-family: var(--font-sans); font-weight: 700; font-size: 16px; line-height: 1; }
.avatar-btn.captain { border-color: var(--gold-soft); box-shadow: 0 0 0 2px rgba(231, 201, 141, .35); }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 12px); width: 230px; padding: 14px 16px 12px; z-index: 30;
  --sh-fill: var(--glass-page); --sh-inner: transparent; color: var(--ink);
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .25s, transform .35s var(--ease);
}
.user-menu.open .menu-pop { opacity: 1; transform: none; pointer-events: auto; }
.menu-pop .who { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-pop .who small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.menu-pop nav { display: flex; flex-direction: column; margin-top: 8px; border-top: 1px dashed var(--field-line); padding-top: 6px; }
.menu-pop nav a, .menu-pop nav button {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px; border: 0; background: none; cursor: pointer;
  font-size: 14px; text-align: left; color: var(--ink); border-radius: 4px; transition: background .2s, color .2s;
}
.menu-pop nav button { padding-bottom: 1px; }   /* 按钮里的文字比链接低 1 像素 */
.menu-pop nav a:hover, .menu-pop nav button:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--teal); }
.role { display: inline-block; font-size: 11px; line-height: 14px; padding: 0 6px; margin-left: 6px; border-radius: 3px; vertical-align: 1px;
        border: 1px solid var(--gold); color: var(--gold); font-weight: 400; }

/* ---------- 内页容器 ---------- */
.page { flex: 1; width: min(940px, 100% - 2 * clamp(16px, 3vw, 48px)); margin: 26px auto 8px; display: flex; flex-direction: column; gap: 18px; }
.page.narrow { width: min(640px, 100% - 32px); }
/* 页面标题条：背景图很亮的地方白字看不清，所以也放在一条毛玻璃上 */
.page-head {
  display: flex; align-items: center; gap: 14px; padding: 10px 22px 10px 14px; user-select: none; -webkit-user-select: none;
  --sh-fill: var(--glass-page); --sh-inner: transparent;
}
.page-head img { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(60, 30, 10, .3)); flex: none; }
.page-head h1 { margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: 26px; letter-spacing: .12em; line-height: 1.25; }
.page-head p { margin: 2px 0 0; font-size: 13.5px; letter-spacing: .04em; color: var(--ink-soft); }
.page-head .back { margin-left: auto; font-size: 14px; display: inline-flex; gap: 4px; align-items: center; color: var(--ink-soft); transition: color .25s; }
.page-head .back:hover { color: var(--teal); }
.page-head .back:hover .arrow { transform: translateX(-3px); }

.box { padding: 22px 26px 24px; --sh-fill: var(--glass-page); line-height: 1.75; font-size: 15px; }
.box > :first-child { margin-top: 0; }
.box > :last-child { margin-bottom: 0; }
.box h1 { font-family: var(--font-serif); font-weight: 600; font-size: 24px; letter-spacing: .06em; margin: 0 0 10px; line-height: 1.4; }
/* 公告标题、礼物名是动态内容，字体子集里没有这些字，用系统黑体，不会一个标题里混两种字体 */
.news-body h1, #redeem h1 { font-family: var(--font-sans); font-weight: 700; letter-spacing: .02em; }
.box h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-family: var(--font-serif); font-weight: 600; font-size: 19px; letter-spacing: .06em; }
.box h2::before { content: "✦"; color: var(--gold); font-size: 12px; }
.box h3 { margin: 18px 0 6px; font-size: 16px; }
.box p { margin: 6px 0; }
.box a:not(.btn):not(.plain) { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--teal) 45%, transparent); }
.box a:not(.btn):not(.plain):hover { text-decoration-color: currentColor; }
.box ul:not(.list):not(.rewards):not(.news-items) { padding-left: 1.3em; }
.hint { color: var(--ink-soft); font-size: 13.5px; }
.error { color: var(--warn); }
.warn { color: var(--warn); font-size: 14px; }
.ok-text { color: var(--ok); }
.tag-line { display: inline-block; font-style: normal; font-size: 12px; line-height: 19px;   /* 框高 21（奇数），12px 中文墨迹 11 像素，上下才能一样 */ color: var(--gold); border: 1px solid currentColor; border-radius: 3px; padding: 0 5px; margin-right: 4px; }

/* ---------- 按钮（四角内凹，data-shape="8"） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 22px;
  border: 0; background: none; cursor: pointer; font-size: 15px; letter-spacing: .06em; line-height: 1; color: var(--ink);
  --sh-fill: var(--glass-strong); --sh-inner: transparent; transition: color .25s, opacity .25s;
}
.btn:hover:not(:disabled) { --sh-fill: var(--glass-hover); color: var(--teal); }
.btn.primary { color: #fff; --sh-fill: var(--btn); --sh-line: rgba(255, 255, 255, .55); }
.btn.primary:hover:not(:disabled) { --sh-fill: var(--btn-hover); color: #fff; }
.btn.danger:hover:not(:disabled) { color: var(--warn); }
/* 下边多留 1px：13px 微软雅黑在 line-height: 1 的按钮里会偏下 1 像素（check-align-all.js 实测），小按钮、歌切、直播间、进入都一样 */
.btn.small { height: 30px; padding: 0 12px 1px; font-size: 13px; letter-spacing: .02em; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.btn:not([data-shape]) { background: var(--glass-strong); border-radius: 6px; }   /* 脚本没加载时的样子 */
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }

/* ---------- 表单 ---------- */
.field { display: block; margin: 14px 0 0; }
.field > span { display: block; font-size: 13.5px; color: var(--ink-soft); margin-bottom: 5px; }
.box input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .box select, .box textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--field);
  border: 1px solid var(--field-line); border-radius: 6px; padding: 9px 12px; transition: border-color .2s, box-shadow .2s;
}
.box textarea { min-height: 280px; resize: vertical; line-height: 1.75; }
.box input:focus, .box select:focus, .box textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent); }
.box select { width: auto; min-width: 7em; }
label.check { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 4px; font-size: 14.5px; cursor: pointer; }
label.check input { margin-top: 6px; accent-color: var(--btn); }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row > .field { flex: 1 1 200px; }
.counter { float: right; font-size: 12px; color: var(--ink-soft); }

/* ---------- 列表（积分明细、兑换记录、奖品） ---------- */
.list, .rewards, .news-items { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: 6.5em 1fr auto; gap: 0 10px; padding: 10px 0; border-bottom: 1px dashed var(--field-line); }
.list li:last-child, .rewards li:last-child { border-bottom: 0; }
.list .date { color: var(--ink-soft); font-size: 13px; font-family: var(--font-latin); font-size: 15px; }
.list .desc { grid-column: 2 / 4; color: var(--ink-soft); font-size: 13px; }
.list .desc .btn { margin: 6px 6px 0 0; }
.amount { font-weight: 700; text-align: right; font-family: var(--font-latin); font-size: 18px; }
.amount.pos { color: var(--ok); }
.amount.neg { color: var(--warn); }
.rewards li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 11px 0; border-bottom: 1px dashed var(--field-line); }
.rewards .name { font-weight: 600; }
.rewards a.name { color: var(--teal); text-decoration: none; }
.rewards a.name:hover { text-decoration: underline; }
.rewards .cost { font-family: var(--font-latin); font-weight: 700; font-size: 18px; }
.rewards .why { grid-column: 1 / 3; font-size: 13px; color: var(--ink-soft); }
.rewards li.ok .why { color: var(--ok); }
.rewards .why em { font-style: normal; font-size: 12px; color: var(--gold); border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; margin-right: 4px; }

/* ---------- 香羊糕铺 ---------- */
.summary { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; align-items: center; }
.summary .who { color: var(--ink-soft); margin: 0; }
.summary .who b { color: var(--ink); font-size: 17px; margin-right: 6px; }
.balance { margin: 2px 0 6px; display: flex; align-items: baseline; gap: 8px; }
.balance .num { font-family: var(--font-latin); font-weight: 700; font-size: 60px; line-height: 1; color: var(--teal); }
.summary .side-img { grid-row: 1 / span 4; grid-column: 2; width: 110px; height: auto; filter: drop-shadow(0 4px 8px rgba(70, 40, 15, .25)); }
.summary > :not(.side-img):not(.sh-bg):not(.sh-line) { grid-column: 1; }
.rules ul { margin: 0; }
.guest-cta { text-align: center; padding: 34px 26px; }
.guest-cta img { width: 120px; height: auto; filter: drop-shadow(0 4px 8px rgba(70, 40, 15, .25)); }
.guest-cta .actions-row { justify-content: center; }
.ship { border-top: 1px dashed var(--field-line); padding: 12px 0; }
.ship ul { margin: 4px 0; padding-left: 20px; }
.ship .addr { background: var(--field); border-radius: 6px; padding: 8px 12px; }
.ship .row { display: flex; gap: 8px; align-items: center; }
.ship .row input { max-width: 260px; }

/* ---------- 若木风信：列表和正文 ---------- */
.cat-tabs { margin-top: -4px; }        /* 和首页风信一样的滑块标签（.tabs），切换时只换列表 */
.news-items { transition: opacity .2s, transform .25s var(--ease); }
.news-items.out { opacity: 0; transform: translateX(-8px); }
.news-items li a { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 13px 4px; border-bottom: 1px dashed var(--field-line); transition: padding .3s var(--ease); }
.news-items li:last-child a { border-bottom: 0; }
.news-items li a:hover { padding-left: 9px; }
.news-items li a:hover .t { color: var(--teal); }
.news-items .t { font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .2s; }
.news-items time { font-family: var(--font-latin); font-size: 16px; color: var(--ink-soft); }
.news-items .bullet { color: var(--gold); font-size: 11px; }
.kind { flex: none; font-size: 12px; padding: 0 6px; border-radius: 3px; border: 1px solid var(--field-line); color: var(--ink-soft); }
.news-body .meta { color: var(--ink-soft); font-size: 13.5px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--field-line); }
.news-body .text p { margin: 0 0 1em; font-size: 16px; line-height: 1.9; word-break: break-word; }
.empty { text-align: center; padding: 26px 0; color: var(--ink-soft); }
.box .empty.sm { padding: 10px 0 4px; margin: 0; font-size: 14px; letter-spacing: .08em; opacity: .8; }   /* 小面板里的"暂无"：不写句号，居中淡色 */

/* ---------- 长页面：回到顶部、回到首页 ---------- */
.page-end { justify-content: center; margin-top: 4px; }
/* 宽屏放在内容栏右边的空白处、屏幕上下居中（2026-11-08 用户：原来偏下）；窄屏右侧中间会压住内容，贴右下角、在音乐唱片上方 */
.to-top {
  position: fixed; z-index: 35; top: 50%; right: max(clamp(16px, 3vw, 48px), calc(50% - 470px - 68px));
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; font-size: 22px;
  color: var(--ink); background: var(--glass-page); border: 1px solid var(--line); box-shadow: 0 3px 12px rgba(60, 30, 10, .18);
  opacity: 0; transform: translateY(calc(-50% + 10px)); pointer-events: none; transition: opacity .3s, transform .4s var(--ease), color .2s;
}
.to-top.show { opacity: 1; transform: translateY(-50%); pointer-events: auto; }
.to-top.show:hover { color: var(--teal); transform: translateY(calc(-50% - 2px)); }
.to-top svg { stroke-width: 1.8; }
@media (max-width: 1180px) {
  .to-top { top: auto; bottom: 86px; transform: translateY(10px); }
  .to-top.show { transform: none; }
  .to-top.show:hover { transform: translateY(-2px); }
}

/* ---------- 即将开放 ---------- */
.soon { text-align: center; padding: 40px 26px 34px; }
.soon img { width: 140px; height: auto; filter: drop-shadow(0 6px 10px rgba(70, 40, 15, .28)); animation: bob 4s ease-in-out infinite; }
.soon h1 { margin-top: 12px; }
.soon .actions-row { justify-content: center; }

/* ---------- 登录 ---------- */
.code-box { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0; padding: 14px; border: 1.5px dashed var(--gold); border-radius: 8px;
            font-size: 26px; font-weight: 700; letter-spacing: 2px; background: var(--field); }
.steps { padding-left: 20px; font-size: 15px; }
.status { font-weight: 600; }

/* ---------- 管理页 ---------- */
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-tabs .btn[aria-current="page"] { color: #fff; --sh-fill: var(--btn); }
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th, table.grid td { text-align: left; padding: 9px 8px; border-bottom: 1px dashed var(--field-line); vertical-align: middle; }
table.grid th { font-weight: 600; color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
table.grid td.t { min-width: 12em; }
table.grid td.nowrap { white-space: nowrap; }
.pill { display: inline-block; font-size: 12px; padding: 0 8px; border-radius: 99px; white-space: nowrap; border: 1px solid currentColor; }
.pill.published { color: var(--ok); }
.pill.draft { color: var(--ink-soft); }
.pill.scheduled { color: var(--gold); }
.weekly { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.weekly-row { display: flex; gap: 8px; align-items: center; }
.weekly-row input { width: 9em !important; }
.preview-line { margin-top: 14px; padding: 10px 14px; border-radius: 6px; background: var(--field); font-size: 14px; }

/* ---------- 歌单（/songs）和歌单管理 ---------- */
.cd-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.live-strip { display: flex; align-items: center; gap: 10px; padding: 12px 22px; color: var(--wine); --sh-fill: var(--glass-page); --sh-inner: transparent; transition: color .25s; }
.live-strip[hidden] { display: none; }
.live-strip b { font-weight: 600; }
.live-strip .arrow { margin-left: auto; transition: transform .3s var(--ease); }
.live-strip:hover { color: var(--teal); }
.live-strip:hover .arrow { transform: translateX(3px); }
/* 搜索框：在歌单这一块里滚动时贴在顶部 */
.song-search { position: sticky; top: 8px; z-index: 5; display: flex; gap: 10px; align-items: center; margin: -6px -10px 10px; padding: 8px 10px;
               border-radius: 10px; background: var(--glass-page); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.search-field { position: relative; flex: 1; display: block; }
.search-field svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--ink-soft); stroke-width: 1.8; pointer-events: none; }
.box .search-field input { padding-left: 38px !important; font-size: 16px !important; }   /* 通用输入框规则优先级更高，这里要 !important */      /* 16px：手机上点输入框不会自动放大页面 */
#filterToggle { display: none; position: relative; }
#filterToggle .dot { position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--wine); }
.filters { display: flex; flex-direction: column; gap: 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-label { width: 3em; flex: none; font-size: 13px; color: var(--ink-soft); }
.chip { height: 28px; padding: 2px 12px 0;   /* 微软雅黑在按钮里偏上，往下挪 1 像素 */
        border: 1px solid var(--field-line); border-radius: 99px; background: var(--field); color: var(--ink);
        font: inherit; font-size: 13.5px; line-height: 1; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--teal); color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: #fff; }
.song-bar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 16px 0 4px; padding-top: 12px; border-top: 1px dashed var(--field-line); }
.song-count { margin: 0 auto 0 0 !important; color: var(--ink-soft); font-size: 14px; }
.song-count b { font-family: var(--font-latin); font-size: 20px; color: var(--teal); margin: 0 2px; }
.seg { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; height: 30px; padding: 2px; border-radius: 99px;
       border: 1px solid var(--field-line); background: var(--field); }
.seg-ind { position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc(50% - 2px); border-radius: 99px; background: var(--btn);
           box-shadow: 0 1px 4px rgba(20, 60, 60, .25); transition: transform .3s var(--ease); }
.seg.second .seg-ind { transform: translateX(100%); }
.seg button { position: relative; border: 0; background: none; padding: 0 12px; border-radius: 99px; cursor: pointer;
              font: inherit; font-size: 13px; line-height: 1; padding-bottom: 1px; color: var(--ink-soft); white-space: nowrap; transition: color .25s; }
.seg button:hover { color: var(--teal); }
.seg button[aria-checked="true"] { color: #fff; }
.seg button:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.btn svg:not(.sh-line) { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; flex: none; }
/* 语言颜色：唱片中间的贴纸、筛选按钮上的小圆点 */
:root { --l-zh: #b4473e; --l-yue: #c27a22; --l-ja: #c4567c; --l-ko: #3d78b4; --l-en: #2d8a69; --l-etc: #8c7a68; }
:root[data-theme="dark"] { --l-zh: #d0675c; --l-yue: #d9993f; --l-ja: #e07a9c; --l-ko: #6aa1dc; --l-en: #4fb58f; --l-etc: #a8957f; }
.song-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 6px; align-items: start; }
.song-list { list-style: none; margin: 0; padding: 0; min-width: 0; }
.song { --lc: var(--l-etc); position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 3px 12px; align-items: center;
        padding: 10px 8px; border-bottom: 1px dashed var(--field-line); border-radius: 8px; cursor: pointer; transition: background .2s; }
.song[data-lang="国语"] { --lc: var(--l-zh); }
.song[data-lang="粤语"] { --lc: var(--l-yue); }
.song[data-lang="日语"] { --lc: var(--l-ja); }
.song[data-lang="韩语"] { --lc: var(--l-ko); }
.song[data-lang="英语"] { --lc: var(--l-en); }
.song:last-child { border-bottom: 0; }
.song:hover { background: color-mix(in srgb, var(--lc) 7%, transparent); }
.song > .song-disc { grid-column: 1; grid-row: 1; }
.song > .song-name { grid-column: 2; grid-row: 1; }
.song > .song-meta { grid-column: 3; grid-row: 1; }
.song > .clip-btn { grid-column: 4; grid-row: 1; }
.song > .copy-ico { grid-column: 5; grid-row: 1; }
/* 小唱片：外圈是黑胶纹路（悬停时转起来），中间圆贴纸用语言颜色写语言的第一个字 */
.song-disc { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
        box-shadow: 0 1px 4px rgba(40, 20, 10, .35); }
.song-disc::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
                background: conic-gradient(from 30deg, transparent 0 8%, rgba(255, 255, 255, .16) 12%, transparent 18% 58%, rgba(255, 255, 255, .1) 62%, transparent 68%),
                            repeating-radial-gradient(circle, #241a1a 0 1.4px, #382a28 1.4px 2.6px), #2a1f1f;
                transition: transform 1.2s var(--ease); }
.song-disc i { position: relative; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; background: var(--lc);
          font-style: normal; font-family: var(--font-sans); font-size: 10.5px; font-weight: 700; line-height: 1; color: #fff;
          box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .18); }
.song:hover .song-disc::before { transform: rotate(240deg); }
.song.paused .song-disc { filter: grayscale(1); opacity: .5; }
.song-name { min-width: 0; border: 0; background: none; padding: 2px 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.song-name b { font-size: 16.5px; font-weight: 600; transition: color .2s; }
.song-name small { display: block; font-size: 13px; color: var(--ink-soft); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song:hover .song-name b { color: var(--teal); }
.song-name .new { font-style: normal; font-size: 11px; padding: 0 5px; margin-left: 6px; border-radius: 3px; background: var(--wine); color: #fff; vertical-align: 2px; }
.song.paused .song-name b { opacity: .55; }
.song.copied { animation: copied .9s var(--ease); }
@keyframes copied { 0% { background: color-mix(in srgb, var(--teal) 24%, transparent); } 100% { background: transparent; } }
.copy-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--ink-soft); opacity: 0; transform: translateX(-4px);
            transition: opacity .2s, transform .25s var(--ease), color .2s, background .2s; }
.copy-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.song:hover .copy-ico, .song:focus-within .copy-ico { opacity: 1; transform: none; color: var(--teal); background: color-mix(in srgb, var(--teal) 12%, transparent); }
.song.paused .copy-ico { visibility: hidden; }
.song-meta { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; align-items: center; }
.song-meta .tag-line { margin-right: 0; }
.tag-line.star { color: #fff; background: var(--gold); border-color: var(--gold); }
.tag-line.star::before { content: "★"; margin-right: 2px; font-size: 10px; line-height: 1; }   /* line-height: 1：星号的备用字体比较高，会把框撑高 */
/* 首字母分组标题和右边的索引 */
.song-group { display: flex; align-items: center; gap: 10px; padding: 14px 8px 4px; scroll-margin-top: 78px;
              font-family: var(--font-latin); font-size: 21px; font-weight: 600; line-height: 1; color: var(--gold); }
.song-group::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-inner), transparent); }
.song-group + .song { border-top: 0; }
.az-rail { position: sticky; top: 76px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; margin-top: 8px;
           border-radius: 99px; background: color-mix(in srgb, var(--field) 70%, transparent); }
.az-rail[hidden] { display: none; }
.az-rail button { width: 24px; height: 21px; border: 0; border-radius: 6px; background: none; padding: 2px 0 0; cursor: pointer;   /* 大写字母在按钮里偏上，往下挪 */
                  font-family: var(--font-latin); font-size: 13.5px; font-weight: 600; line-height: 1; color: var(--ink-soft); transition: color .15s, background .15s; }
.az-rail button:hover, .az-rail button.on { color: #fff; background: var(--btn); }
.az-rail button:disabled { opacity: .3; cursor: default; background: none; color: var(--ink-soft); }
/* 筛选按钮上的数量和语言色点 */
.chip .n { font-style: normal; font-family: var(--font-latin); font-size: 14px; font-weight: 700; margin-left: 5px; color: var(--teal); }   /* 青色加粗：白天也看得清，和"共 27 首"一致 */
.chip[aria-pressed="true"] .n { color: #fff; opacity: .9; }
.chip:hover .n { color: inherit; }
.chip .ld { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.chip:disabled { opacity: .4; cursor: default; }
.key-badge { display: inline-block; font-size: 12.5px; font-weight: 600; line-height: 1.6; padding: 0 7px; border-radius: 3px; white-space: nowrap;
             color: var(--teal); background: color-mix(in srgb, var(--teal) 13%, transparent); }
.clip-btn { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 12px 1px 10px; font-size: 13px; line-height: 1;
            --sh-fill: var(--glass-strong); --sh-inner: transparent; transition: color .25s; }
.clip-btn svg:not(.sh-line) { width: 13px; height: 13px; fill: var(--teal); }
.clip-btn:hover { color: var(--teal); }
.song-note { grid-column: 2 / -1; grid-row: 2; margin: 0 !important; font-size: 13px; color: var(--ink-soft); }
/* 弹窗：随机一首、歌单长图 */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(30, 18, 12, .58); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
         opacity: 0; transition: opacity .25s; }
.modal[hidden] { display: none; }
.modal.show { opacity: 1; }
.modal-card { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px 24px; color: var(--ink); line-height: 1.7;
              --sh-fill: var(--modal-fill); --sh-inner: transparent; transform: translateY(10px) scale(.97); transition: transform .35s var(--ease); }
.modal.show .modal-card { transform: none; }
.modal-card h2 { margin: 0 0 12px; font-family: var(--font-serif); font-weight: 600; font-size: 20px; letter-spacing: .06em; text-align: center; }
.modal-card .actions-row { justify-content: center; margin-top: 14px; }
.modal-card .hint { text-align: center; margin: 8px 0 0; }
.flip { perspective: 900px; height: 170px; }
.flip-inner { position: relative; height: 100%; transform-style: preserve-3d; transition: transform .7s var(--ease); }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 16px;
             border: 1.5px dashed var(--gold); border-radius: 12px; background: var(--field); -webkit-backface-visibility: hidden; backface-visibility: hidden; text-align: center; }
.flip-front img { width: 72px; height: auto; }
.flip-front span { font-size: 15px; color: var(--ink-soft); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flip-back { transform: rotateY(180deg); }
.flip-back b { font-size: 24px; line-height: 1.35; word-break: break-word; }
.flip-back small { font-size: 14px; color: var(--ink-soft); }
.poster-card { width: min(620px, 100%); }
.poster-opts { display: flex; gap: 6px 16px; align-items: flex-end; flex-wrap: wrap; }
.poster-opts .field { flex: 1 1 200px; margin-top: 8px; }
.modal-card input:not([type="checkbox"]) { width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--field); border: 1px solid var(--field-line); border-radius: 6px; padding: 7px 10px; }
.poster-preview { margin-top: 12px; max-height: 46vh; overflow: auto; border-radius: 8px; border: 1px solid var(--field-line); background: var(--field); min-height: 80px; display: grid; place-items: center; }
.poster-preview img { display: block; width: 100%; height: auto; }
/* 管理页 */
.lookup-row { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.lookup-row input { flex: 1; }
.lookup-list { list-style: none; margin: 0 0 6px; padding: 0; max-height: 360px; overflow: auto; }
.lookup-list li { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px dashed var(--field-line); }
.lk-info { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 8px; align-items: center; }
.lk-info small { flex-basis: 100%; color: var(--ink-soft); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.box textarea.imp-text { min-height: 150px; font-family: Consolas, "Microsoft YaHei", monospace; font-size: 13px; line-height: 1.6; white-space: pre; tab-size: 12; }
.song-table td.ops { display: flex; gap: 4px; }
.song-table .kind, .song-table .tag-line { margin: 1px 4px 1px 0; display: inline-block; }
@media (max-width: 760px) {
  #filterToggle { display: inline-flex; }
  .filters { display: none; }
  .filters.open { display: flex; }
  .song { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 4px 10px; padding: 10px 4px; }
  .song > .song-disc { grid-row: 1 / span 2; align-self: start; margin-top: 2px; width: 36px; height: 36px; }
  .song > .song-meta { grid-column: 2 / -1; grid-row: 2; justify-content: flex-start; }
  .song > .clip-btn { grid-column: 3; }
  .song > .copy-ico { grid-column: 4; opacity: .7; transform: none; width: 28px; }
  .song-note { grid-column: 2 / -1; grid-row: 3; }
  .song-body { gap: 0 2px; }
  .az-rail { padding: 4px 0; }
  .az-rail button { width: 20px; height: 19px; padding: 0; font-size: 12px; }
  .live-strip { padding: 11px 16px; }
  .song-table td.ops { flex-direction: column; }
}

/* ---------- 页脚（内页） ---------- */
.site-foot { text-align: center; font-size: 12px; color: var(--title); text-shadow: 0 1px 6px rgba(60, 30, 10, .6); padding: 14px 16px 20px; opacity: .9; }
.site-foot a { text-decoration: underline; text-underline-offset: 3px; }
.footer-links { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.footer-links a { white-space: nowrap; }

@media (max-width: 760px) {
  .page { margin-top: 16px; gap: 14px; }
  .page-head img { width: 46px; height: 46px; }
  .page-head h1 { font-size: 22px; }
  .page-head p { font-size: 12.5px; }
  .box { padding: 18px 16px 20px; }
  .list li { grid-template-columns: 5.6em 1fr auto; }
  .balance .num { font-size: 48px; }
  .summary .side-img { width: 76px; }
  .menu-pop { right: -46px; }
  .weekly-row { flex-wrap: wrap; }
}

/* ---------- 平板 ---------- */
@media (max-width: 1280px) {
  .space-text small { display: none; }
  .card { grid-template-columns: 1fr; grid-template-rows: auto; justify-items: start; align-content: center; min-height: 0; padding: 23px 18px 16px; }   /* 同一行卡片等高，内容上下居中 */
  .card-ico { grid-row: auto; width: 64px; height: 64px; margin-bottom: 6px; }
  .card-text small { min-height: 0; }
}

/* ---------- 手机 ---------- */
@media (max-width: 960px) {
  .topbar { padding-top: 26px; gap: 10px; }
  .brand-emblem { width: 46px; }
  .brand-cn { font-size: 25px; }
  .brand-en { font-size: 12px; }
  .space-link { margin: 0 0 0 auto; padding: 9px 10px; gap: 8px; }
  .space-face { width: 26px; height: 26px; }
  .fireflies { width: 100vw; height: 62vh; }
  .space-text, .space-link .out { display: none; }
  .actions { gap: 8px; }

  .hero { grid-template-columns: 1fr; gap: 18px; padding-top: 18px; }
  .welcome { padding: 4vh 0 2vh 2vw; }
  .welcome-arc { width: 230px; height: 230px; top: 0; }
  .cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-shop { grid-column: 1 / -1; grid-template-columns: auto 1fr; }
  .card-shop img { grid-row: 1 / span 2; }
  .bottombar { flex-flow: column nowrap; align-items: stretch; }
  .motto { justify-content: center; }
  .home-legal { flex-basis: auto; }
  .player { justify-content: flex-end; }
  .player-info { flex: 1; width: auto; }
}
@media (max-width: 760px) {
  .bg-day { background-image: url("assets/bg-900.webp"); background-position: 72% center; }
  .bg-night { background-image: url("assets/bg-night-900.webp"); background-position: 72% center; }
  .scene { display: none; }    /* 手机背景裁掉了海：太阳月亮、海面、船都看不到（手机版背景里本来就画着船） */
  :root { --bg-blur: url("assets/bg-blur-900.webp"); --bg-pos: 72% center; }
  :root[data-theme="dark"] { --bg-blur: url("assets/bg-night-blur-900.webp"); }
  .sparkles { width: 100vw; height: 40vh; }
  .leaves { width: 100vw; height: 45vh; }
  .welcome-tag { margin-left: 1em; }
  .welcome-sub { font-size: 14px; }
  .welcome .l2 { padding-left: 1em; }
  .panel { padding: 16px 18px; }
  .digit { height: 42px; line-height: 42px; }
  .cd-left { transform: translateY(-5px); }
  .cd-none { height: 42px; }
  .digit b { font-size: 38px; }
  .card { padding: 18px 14px 12px; }
  .card-text b { font-size: 19px; }
}
@media (max-width: 420px) {
  .topbar { gap: 8px; }
  .brand { gap: 6px; }
  .brand-emblem { width: 38px; }
  .brand-cn { font-size: 21px; letter-spacing: .12em; }
  .brand-en { font-size: 11px; letter-spacing: .24em; gap: 5px; }
  .brand-en i { width: 12px; }
  .actions { gap: 6px; }
  .theme-btn { width: 36px; height: 36px; font-size: 18px; }
  .login-btn { height: 34px; padding: 0 14px; }
}
@media (hover: none) {
  .player.playing .player-info { opacity: 1; transform: none; pointer-events: auto; }
}

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

/* 直播投喂单：复用全站背景与管理页，长昵称、长明细可换行。 */
.gifts-page .actions-row { flex-wrap: wrap; align-items: flex-end; }
.gifts-page .actions-row .field { margin-top: 0; }
.gifts-page .admin-tabs a[href="/admin"] { padding-bottom: 2px; } /* 13px 字体该组字形墨迹偏下半像素 */
.gift-sessions { display: grid; gap: 8px; max-height: 240px; overflow-y: auto; margin-top: 20px; }
.gift-session { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding: 12px 16px; border: 1px solid var(--field-line); border-radius: 12px; text-decoration: none; }
.gift-session.selected { border-color: var(--ink-soft); background: var(--field); }
.gift-session span, .gift-person-name small { color: var(--ink-soft); font-size: 13px; }
.gift-warning { border-left: 3px solid var(--ink-soft); padding: 8px 12px; line-height: 1.8; }
.gift-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 22px 0; }
.gift-stats > div { padding: 16px 8px; text-align: center; background: var(--field); border-radius: 12px; }
.gift-stats strong { display: block; font: 600 28px/1.3 var(--font-latin); }
.gift-stats span { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-soft); }
.gift-person { border-bottom: 1px dashed var(--field-line); padding: 8px 0; }
.gift-person summary { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 14px 0; }
.gift-person-name { min-width: 150px; overflow-wrap: anywhere; }
.gift-person-name small { display: block; margin-top: 5px; }
.gift-person-items { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: system-ui,sans-serif; line-height: 1.8; }
.gift-person-total { flex: 0 1 210px; text-align: right; font-family: var(--font-sans); line-height: 1.7; }
.gift-person-total strong { display: block; font-size: 16px; color: var(--teal); }
.gift-person-total small { display: block; font-size: 13px; color: var(--ink-soft); }
.gift-stats strong { font-family: var(--font-sans); font-size: 20px; overflow-wrap: anywhere; }
.gift-person .grid { min-width: 660px; font-family: system-ui,sans-serif; }
.gift-person .grid td { overflow-wrap: anywhere; }
.gifts-page input[type="search"] { flex: 1 1 180px; min-width: 0; }
@media (max-width: 760px) {
  .gift-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .gift-person summary { flex-wrap: wrap; gap: 8px; }
  .gift-person-name { width: 100%; }
  .gift-person-items { flex-basis: 100%; }
  .gift-person-total { flex: 1 1 180px; text-align: left; }
  .gifts-page .actions-row .field { width: 100%; }
}
