/* web/style.css — 第三自习室核心页样式（单文件无依赖，深色沉浸自习氛围） */

:root {
  --bg: #0e1420;
  --bg-soft: #161e2e;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8edf5;
  --text-dim: #8b97ab;
  --accent: #ff7a59;
  --accent-soft: rgba(255, 122, 89, 0.16);
  --green: #4caf7d;
  --radius: 14px;
  --panel: rgba(21, 28, 42, 0.6); /* 内容面板底色：半透明+毛玻璃，氛围场景能透出来 */
}

* { box-sizing: border-box; }

html {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* body 不上背景色：T9 .scene(z-index:-1) 场景层要透出来（body 若有不透明底会盖住负 z 层） */
body {
  margin: 0;
  padding: 0;
  color: var(--text);
}

#app {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 18px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* —— 顶部：品牌 + 全球计数 —— */
.topbar { text-align: center; }

h1 {
  margin: 6px 0 10px;
  font-size: 26px;
  letter-spacing: 2px;
}

.counter {
  margin: 0 0 8px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 14px;
}

.counter-num {
  font-size: 34px;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  min-width: 1.2em;
}

.counter-label { font-size: 14px; }

/* —— 番茄钟 —— */
.timer-zone {
  margin: 18px 0 8px;
  text-align: center;
}

.ring-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto;
}

.ring { width: 100%; height: 100%; transform: rotate(-90deg); }

.ring-track,
.ring-progress {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.ring-track { stroke: var(--line); }

.ring-progress {
  stroke: var(--accent);
  stroke-dasharray: 628.3; /* 2πr, r=100 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.4s linear;
}

.timer-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.clock {
  font-size: 46px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

.timer-state {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-dim);
}

.timer-zone.done .clock { color: var(--green); }
.timer-zone.running .ring-progress { stroke: var(--accent); }

.timer-actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  min-width: 120px;
}

.btn-primary.paused-state { background: #e6a23c; }

.today-line {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}

/* —— 我的位置 —— */
.country-zone { margin-top: 22px; text-align: center; }

.country-line { margin: 0; font-size: 14px; color: var(--text-dim); }

.country-line .mine { color: var(--text); font-weight: 600; }

/* —— 排行榜条 —— */
.rank-zone {
  margin-top: 18px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 10px;
}

.zone-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rank-row {
  display: grid;
  grid-template-columns: 118px 1fr 44px;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.rank-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-dim);
}

.rank-row.mine .rank-name { color: var(--accent); font-weight: 600; }

.rank-bar-track {
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.rank-bar {
  height: 100%;
  border-radius: 5px;
  background: var(--accent-soft);
  border-right: 2px solid var(--accent);
  min-width: 4px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.rank-row.mine .rank-bar { background: var(--accent); border-right-color: var(--accent); }

.rank-count {
  text-align: right;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.rank-row.mine .rank-count { color: var(--accent); }

.rank-empty { color: var(--text-dim); font-size: 13px; padding: 4px 0; }

/* —— 战报图（T5）—— */
.report-zone {
  margin-top: 22px;
  text-align: center;
}

.report-canvas {
  width: min(320px, 84vw);
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.report-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.report-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-dim);
}

/* —— T6 变现位：联盟卡（战报区内）+ AdSense 预留槽 —— */
.shop-zone { margin-top: 20px; text-align: left; }

.shop-card {
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.shop-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.shop-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.shop-item {
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.shop-item:hover { border-color: var(--accent); background: var(--accent-soft); }

.shop-disclosure {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--text-dim);
}

/* AdSense 槽：hidden 时零占位；启用后 min-height 预留高度防 CLS */
.ad-slot {
  margin-top: 22px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-slot[hidden] { display: none; }

@media (max-width: 420px) {
  .shop-items { grid-template-columns: 1fr; }
}

/* —— 页脚 —— */
.foot {
  margin-top: auto;
  padding-top: 26px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55); /* 场景亮区（篝火/台灯）上保可读 */
}

.foot p { margin: 4px 0; }

.foot a { color: var(--text-dim); }

/* —— 小屏适配 —— */
@media (max-width: 420px) {
  .clock { font-size: 38px; }
  .counter-num { font-size: 28px; }
  .rank-row { grid-template-columns: 96px 1fr 38px; }
}

/* ════════ T9+++ 3D 场景效果集 ════════
   10 个场景（星夜/台灯/雨窗/图书馆/篝火/雪夜/海边/咖啡馆/森林/极光）以 scene-view 叠放，
   data-theme 属性一切 → 纯 CSS 交叉淡入淡出（零 JS）。
   分层 .plx 按 --depth 响应鼠标视差（JS 只写容器 --mx/--my 两个变量，transform 合成层不卡主线程）。
   动画全部只动 opacity/transform；非当前场景动画暂停（效果集性能闸）；prefers-reduced-motion 全静止。 */

.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* 场景切换丝滑：0.9s 交叉淡入 + 轻微缩放回落（新场景 1.04 → 1 有「走近」纵深感）
   T13 治卡：非活跃场景 visibility:hidden 整体退出绘制树（原先只 opacity:0 + 停动画，
   但几十个 blur/渐变层仍留在合成器里占 GPU —— 低端设备「卡得厉害」主因之一）。
   visibility 延迟 0.9s 切换 = 等淡出动画走完，交叉淡入淡出手感不变。 */
.scene-view {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  transition: opacity 0.9s ease, transform 1.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 0.9s;
}

/* 默认场景 = 星夜（无 data-theme 时显示）；其余场景各自配 data-theme='id' 显示规则 */
.scene-view[data-scene='night'] { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
html[data-theme] .scene-view[data-scene='night'] { opacity: 0; transform: scale(1.04); visibility: hidden; transition-delay: 0s, 0s, 0.9s; }
html[data-theme='lamp'] .scene-view[data-scene='lamp'] { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
html[data-theme='rain'] .scene-view[data-scene='rain'] { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
html[data-theme='library'] .scene-view[data-scene='library'] { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
html[data-theme='camp'] .scene-view[data-scene='camp'] { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
html[data-theme='snow'] .scene-view[data-scene='snow'] { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
html[data-theme='ocean'] .scene-view[data-scene='ocean'] { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
html[data-theme='cafe'] .scene-view[data-scene='cafe'] { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
html[data-theme='forest'] .scene-view[data-scene='forest'] { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
html[data-theme='aurora'] .scene-view[data-scene='aurora'] { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }

/* 效果集性能闸：非当前场景的动画全暂停（10 场景常驻叠放，不暂停会白吃 CPU/GPU；切换回来即恢复） */
html:not([data-theme]) .scene-view[data-scene='night'] :is(.plx, .plx *),
html:not([data-theme='lamp']) .scene-view[data-scene='lamp'] :is(.plx, .plx *),
html:not([data-theme='rain']) .scene-view[data-scene='rain'] :is(.plx, .plx *),
html:not([data-theme='library']) .scene-view[data-scene='library'] :is(.plx, .plx *),
html:not([data-theme='camp']) .scene-view[data-scene='camp'] :is(.plx, .plx *),
html:not([data-theme='snow']) .scene-view[data-scene='snow'] :is(.plx, .plx *),
html:not([data-theme='ocean']) .scene-view[data-scene='ocean'] :is(.plx, .plx *),
html:not([data-theme='cafe']) .scene-view[data-scene='cafe'] :is(.plx, .plx *),
html:not([data-theme='forest']) .scene-view[data-scene='forest'] :is(.plx, .plx *),
html:not([data-theme='aurora']) .scene-view[data-scene='aurora'] :is(.plx, .plx *) {
  animation-play-state: paused;
}

/* T13：地图视图盖住场景 → 场景动画全停（看不见就不画，省 GPU） */
html[data-view='map'] .scene-view :is(.plx, .plx *) {
  animation-play-state: paused;
}

/* ════════ T13 小镇地图（上帝视角导航 hub）════════ */
/* 层级：.scene(-1) < .map-view(0) < #app(1)。地图=导航层，番茄钟等前景 UI 浮在其上照常可用 */
.map-view {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: none;
  overflow: hidden;
  background: #0b1120; /* 图片加载前底色，防白闪；取地图夜空近似色 */
}

html[data-view='map'] .map-view { display: block; }
html[data-view='map'] #btn-map { display: none; }

/* 图片框 stage：宽高 max() 复刻 object-fit:cover 的算法，热区百分比相对图片而非视口
   —— 视口比图更宽时上下裁、更窄时退化为定宽居中（上下露底色，热区永远全部可点） */
.map-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100vw, 177.78vh);
  height: max(100vh, 56.25vw);
  transform: translate(-50%, -50%);
}

.map-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  user-select: none;
  /* 性能红线：LCP 元素不做 opacity 入场动画（实测 map-in 淡入把 LCP 从 ~600ms 推到 1996ms，
     Chrome 对 opacity:0 起步的图迟迟不登记 LCP）。入场感改由热区层淡入承担。 */
}

.map-hotspots { animation: map-in 0.7s ease; }

@keyframes map-in {
  from { opacity: 0; }
}

/* 热区：真实 <button>（键盘可达），坐标来自 CORE.MAP_HOTSPOTS 百分比 */
.map-spot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(10, 16, 32, 0.32);
  backdrop-filter: blur(2px);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.map-spot:hover,
.map-spot:focus-visible {
  transform: translate(-50%, -50%) scale(1.15);
  background: rgba(10, 16, 32, 0.62);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.14);
  outline: none;
}

.map-spot-name {
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12px;
  color: #fff;
  background: rgba(10, 16, 32, 0.78);
  border-radius: 8px;
  padding: 3px 9px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.map-spot:hover .map-spot-name,
.map-spot:focus-visible .map-spot-name { opacity: 1; }

/* 地图天气粒子画布：铺满视口（不随图片裁切），在热区之上、前景 UI 之下 */
.map-weather {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 天气切换（右上角，番茄钟 topbar 下方） */
.map-weather-switch {
  position: absolute;
  top: 64px;
  right: 18px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.map-weather-btn {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(10, 16, 32, 0.45);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.map-weather-btn[aria-pressed='true'] {
  background: rgba(255, 255, 255, 0.92);
  color: #101728;
  border-color: transparent;
}

.map-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(10, 16, 32, 0.45);
  border-radius: 999px;
  padding: 5px 14px;
  pointer-events: none;
  white-space: nowrap;
}

/* 回小镇按钮（场景视图 topbar 右上、场景切换器左侧，地图视图隐藏） */
#btn-map {
  position: absolute;
  top: 24px;
  right: 128px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 13px;
  padding: 6px 13px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#btn-map:hover { background: rgba(255, 255, 255, 0.16); }

/* 窄屏（竖屏手机）：地图定宽居中，上下露底色；热区百分比不受影响 */
@media (max-aspect-ratio: 16/9) {
  .map-stage {
    width: 100vw;
    height: calc(100vw * 0.5625);
  }
}

@media (max-width: 480px) {
  .map-weather-switch { top: 58px; right: 12px; }
  .map-spot { width: 38px; height: 38px; font-size: 17px; }
  .map-hint { display: none; } /* 小屏与页脚文字重叠，建筑本身可发现性足够 */
}

/* 视差层：容器 --mx/--my ∈ [-1,1]（鼠标位），各层按 --depth 放大位移；inset 负值防位移露边 */
.plx {
  position: absolute;
  inset: -4%;
  transform: translate3d(calc(var(--mx, 0) * var(--depth, 0) * 1px), calc(var(--my, 0) * var(--depth, 0) * 1px), 0);
  transition: transform 0.25s ease-out;
}

/* 需要自带动画（transform 类）的层把动画放 .fx 子层，避免和视差 transform 打架 */
.plx .fx { position: absolute; inset: 0; }

/* 主题底色变量（UI 面板跟随场景换气氛） */
html[data-theme='lamp'] { --bg: #0a0d15; --bg-soft: #141a26; --panel: rgba(20, 26, 38, 0.58); }
html[data-theme='rain'] { --bg: #101623; --bg-soft: #18202f; --panel: rgba(22, 30, 45, 0.6); }
html[data-theme='library'] { --bg: #15100a; --bg-soft: #201810; --panel: rgba(33, 25, 16, 0.6); }
html[data-theme='camp'] { --bg: #0b0e14; --bg-soft: #151a24; --panel: rgba(22, 25, 32, 0.55); }
html[data-theme='snow'] { --bg: #0d1220; --bg-soft: #171e30; --panel: rgba(24, 30, 46, 0.6); }
html[data-theme='ocean'] { --bg: #131022; --bg-soft: #1d1830; --panel: rgba(30, 24, 46, 0.6); }
html[data-theme='cafe'] { --bg: #170f08; --bg-soft: #241811; --panel: rgba(40, 28, 18, 0.6); }
html[data-theme='forest'] { --bg: #0d1410; --bg-soft: #16201a; --panel: rgba(22, 32, 26, 0.6); }
html[data-theme='aurora'] { --bg: #060a14; --bg-soft: #0e1524; --panel: rgba(14, 20, 34, 0.6); }

/* —— 星夜（默认 · 静音）—— */
.night-sky {
  background:
    radial-gradient(1200px 700px at 72% -10%, #1c2644, transparent 68%),
    radial-gradient(900px 600px at 14% 88%, #101a30, transparent 70%),
    linear-gradient(180deg, #0a0f1d 0%, #0a0e18 55%, #080b13 100%);
}

.night-stars {
  animation: starTwinkle 5s ease-in-out infinite alternate;
}
.night-stars.far {
  opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,.9), transparent 100%),
    radial-gradient(1px 1px at 28% 64%, rgba(255,255,255,.7), transparent 100%),
    radial-gradient(1.5px 1.5px at 44% 14%, rgba(255,255,255,.8), transparent 100%),
    radial-gradient(1px 1px at 58% 42%, rgba(255,255,255,.65), transparent 100%),
    radial-gradient(1px 1px at 72% 8%, rgba(255,255,255,.8), transparent 100%),
    radial-gradient(1.5px 1.5px at 84% 34%, rgba(255,255,255,.7), transparent 100%),
    radial-gradient(1px 1px at 92% 58%, rgba(255,255,255,.6), transparent 100%),
    radial-gradient(1px 1px at 8% 84%, rgba(255,255,255,.6), transparent 100%),
    radial-gradient(1px 1px at 36% 88%, rgba(255,255,255,.55), transparent 100%),
    radial-gradient(1px 1px at 66% 76%, rgba(255,255,255,.6), transparent 100%);
}
.night-stars.near {
  background-image:
    radial-gradient(2px 2px at 18% 34%, rgba(255,255,255,.95), transparent 100%),
    radial-gradient(1.5px 1.5px at 38% 52%, rgba(220,232,255,.9), transparent 100%),
    radial-gradient(2.5px 2.5px at 64% 22%, rgba(255,255,255,.9), transparent 100%),
    radial-gradient(1.5px 1.5px at 80% 64%, rgba(255,244,214,.9), transparent 100%),
    radial-gradient(2px 2px at 50% 78%, rgba(255,255,255,.8), transparent 100%),
    radial-gradient(1.5px 1.5px at 6% 58%, rgba(220,232,255,.8), transparent 100%),
    radial-gradient(2px 2px at 90% 12%, rgba(255,255,255,.85), transparent 100%);
}

.night-moon {
  background:
    radial-gradient(circle 42px at 78% 17%, rgba(250,252,255,.98), rgba(240,246,255,.9) 62%, transparent 70%),
    radial-gradient(circle 130px at 78% 17%, rgba(205,222,255,.26), transparent 70%);
}

.night-meteor .fx {
  top: 11%;
  left: 16%;
  width: 130px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95));
  opacity: 0;
  animation: meteor 9s linear infinite 3.5s;
}

@keyframes starTwinkle {
  from { opacity: 0.72; }
  to { opacity: 1; }
}

@keyframes meteor {
  0% { opacity: 0; transform: rotate(-24deg) translateX(-170px); }
  3% { opacity: 0.9; }
  8% { opacity: 0; transform: rotate(-24deg) translateX(340px); }
  100% { opacity: 0; transform: rotate(-24deg) translateX(340px); }
}

/* —— 深夜台灯（白噪音）· arena 壁纸级版 —— */
[data-scene="lamp"] {
  --lamp-x: 20%;                                     /* 灯芯 X（层坐标）：灯芯/光锥/光池/桌面反光/rim 全部读它 */
  --lamp-h: clamp(300px, 46vh, 520px);               /* 灯高 */
  --lamp-base: 30vh;                                 /* 灯底距层底 → 绝对落点 74vh */
  --desk-y: 60vh;                                    /* 桌沿（层坐标）→ 绝对 64vh */
  --lamp-bulb-y: calc(108vh - var(--lamp-base) - 0.766 * var(--lamp-h));  /* 灯芯 Y（层坐标） */
}

/* ① 墙面：左上冷窗光 + 灯侧暖罩 + 竖向空间 */
.lamp-wall {
  background:
    radial-gradient(56% 44% at 15% 0%, rgba(122,152,214,.16), transparent 66%),
    radial-gradient(64% 58% at var(--lamp-x) 56%, rgba(255,160,80,.17), transparent 70%),
    radial-gradient(118% 90% at var(--lamp-x) 72%, rgba(255,138,58,.11), transparent 72%),
    linear-gradient(180deg, #0a0c14 0%, #0c0b12 48%, #0a0810 100%);
}

/* ② 墙上冷窗光（SVG 投影） */
.lamp-win-svg {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}

/* ③ 桌面：桌面木色 + 桌沿下的阴影 */
.lamp-desk .fx {
  background:
    linear-gradient(180deg, rgba(0,0,0,.52), rgba(0,0,0,0) 100%),
    linear-gradient(180deg, rgba(96,64,44,.42) 0%, rgba(46,31,26,.56) 34%, rgba(14,11,15,.9) 100%);
  background-size: 100% 7vh, 100% calc(100% - var(--desk-y));
  background-position: 0 var(--desk-y), 0 100%;
  background-repeat: no-repeat;
}

/* 桌面光池：四层柔椭圆，核心沿灯口→桌内右下的抛洒方向 */
.lamp-pool {
  position: absolute; inset: 0;
}
.lamp-pool .fx {
  background:
    radial-gradient(12% 6.5% at calc(var(--lamp-x) + 5%) calc(var(--desk-y) + 8vh), rgba(255,226,174,.34), transparent 68%),
    radial-gradient(23% 11% at calc(var(--lamp-x) + 7.5%) calc(var(--desk-y) + 11vh), rgba(255,188,112,.2), transparent 70%),
    radial-gradient(39% 16% at calc(var(--lamp-x) + 10%) calc(var(--desk-y) + 13vh), rgba(255,166,84,.12), transparent 74%),
    radial-gradient(62% 20% at calc(var(--lamp-x) + 13%) calc(var(--desk-y) + 15vh), rgba(255,150,70,.07), transparent 78%);
  animation: lampPoolBreath 7.2s ease-in-out infinite;
}

/* 桌沿 rim（自灯侧向右渐隐）+ 桌面镜面反射条 */
.lamp-rim .fx {
  background:
    linear-gradient(90deg, rgba(255,208,150,.55) 0 6%, rgba(255,190,124,.26) 20%, rgba(255,180,110,.08) 38%, transparent 56%),
    radial-gradient(4% 20% at calc(var(--lamp-x) + 1%) calc(var(--desk-y) + 15vh), rgba(255,224,180,.22), transparent 72%);
  background-size: 100% 2.5px, 100% 100%;
  background-position: 0 var(--desk-y), 0 0;
  background-repeat: no-repeat;
}

/* ④ 光锥：四层柔椭圆叠体积（无 clip-path / 无 conic 硬边） */
.lamp-cone .fx {
  background:
    radial-gradient(9% 7% at var(--lamp-x) var(--lamp-bulb-y), rgba(255,236,196,.40), transparent 70%),
    radial-gradient(15% 13% at calc(var(--lamp-x) + 1.6%) calc(var(--lamp-bulb-y) + 5vh), rgba(255,214,152,.24), transparent 72%),
    radial-gradient(23% 20% at calc(var(--lamp-x) + 3.4%) calc(var(--lamp-bulb-y) + 11vh), rgba(255,190,116,.155), transparent 74%),
    radial-gradient(33% 25% at calc(var(--lamp-x) + 5.6%) calc(var(--lamp-bulb-y) + 18vh), rgba(255,166,88,.10), transparent 76%);
  animation: lampConeBreath 7.2s ease-in-out infinite;
}

/* ⑥ 台灯实体：灯泡口正好落在 --lamp-x（SVG 中心 = 灯芯）
   🔴 选择器带 .lamp-body 作用域：cafe 场景也有 .lamp-svg（吊灯），裸类名会被 cafe 段（文件更靠后）的 top:0 覆盖成悬空 */
.lamp-body .lamp-svg {
  position: absolute;
  left: var(--lamp-x);
  bottom: var(--lamp-base);
  top: auto;
  width: calc(var(--lamp-h) * .625);
  height: var(--lamp-h);
  transform: translateX(-50%);
  overflow: visible;
  display: block;
}

/* ⑦ 灯口辉光 */
.lamp-halo .fx {
  background:
    radial-gradient(4.5% 3.4% at var(--lamp-x) var(--lamp-bulb-y), rgba(255,246,220,.62), transparent 72%),
    radial-gradient(12% 9% at var(--lamp-x) var(--lamp-bulb-y), rgba(255,196,124,.26), transparent 74%),
    radial-gradient(24% 18% at calc(var(--lamp-x) + 2%) calc(var(--lamp-bulb-y) + 3vh), rgba(255,170,96,.10), transparent 76%);
  animation: lampHaloBreath 7.2s ease-in-out infinite;
}

/* 桌面实物 */
.lamp-book {
  position: absolute;
  left: calc(var(--lamp-x) + 10.5%);
  bottom: 11vh;
  width: clamp(170px, 21vw, 330px);
  transform: translateX(-50%);
}
.lamp-book svg { display: block; width: 100%; height: auto; }
.lamp-mug {
  position: absolute;
  left: calc(var(--lamp-x) + 4.2%);
  bottom: 20vh;
  width: clamp(44px, 5.4vw, 88px);
}
.lamp-mug svg { display: block; width: 100%; height: auto; overflow: visible; }

/* 蒸汽（只动 opacity / transform） */
.lamp-steam { animation: lampSteam 7s ease-in-out infinite; }
.lamp-steam-b { animation-duration: 9.4s; animation-delay: -3.2s; opacity: .8; }

/* ⑧ 颗粒 + 暗角（camp 同款手法） */
.lamp-grain {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http://www.w3.org/2000/svg'%20width%3D'220'%20height%3D'220'%3E%3Cfilter%20id%3D'n'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'0.85'%20numOctaves%3D'2'%20stitchTiles%3D'stitch'/%3E%3C/filter%3E%3Crect%20width%3D'100%25'%20height%3D'100%25'%20filter%3D'url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: .07;
  mix-blend-mode: overlay;
}
.lamp-vignette {
  background-image:
    radial-gradient(128% 100% at 50% 44%, transparent 40%, rgba(0,0,0,.30) 72%, rgba(0,0,0,.55) 100%),
    linear-gradient(180deg, rgba(0,0,0,.24), transparent 22%);
}

/* —— 动效：只动 opacity —— */
@keyframes lampConeBreath { 0%, 100% { opacity: .88; } 50% { opacity: 1; } }
@keyframes lampHaloBreath { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }
@keyframes lampPoolBreath { 0%, 100% { opacity: .9; } 50% { opacity: 1; } }
@keyframes lampSteam {
  0%   { opacity: 0;   transform: translateY(10px); }
  24%  { opacity: .5; }
  68%  { opacity: .3; }
  100% { opacity: 0;   transform: translateY(-34px); }
}

/* —— <760px 单独调：灯更靠边、更矮，桌面下移 —— */
@media (max-width: 760px) {
  [data-scene="lamp"] {
    --lamp-x: 12%;
    --lamp-h: clamp(190px, 30vh, 320px);
    --lamp-base: 26vh;
    --desk-y: 68vh;
  }
  .lamp-book { display: none; }
  .lamp-mug {
    left: calc(var(--lamp-x) + 7%);
    bottom: 17vh;
    width: clamp(34px, 9vw, 58px);
  }
}

/* —— 雨天窗边（雨声）· arena 壁纸级版 —— */
/* —— 雨天窗边（雨声）· 壁纸级升级 —— */

/* ① 窗外夜空：冷调 + 城市辉光 */
.rain-sky {
  background:
    radial-gradient(120% 58% at 50% 108%, rgba(122,142,182,.14), transparent 62%),
    radial-gradient(66% 40% at 22% 14%, rgba(96,124,176,.13), transparent 70%),
    radial-gradient(48% 30% at 82% 30%, rgba(88,112,160,.09), transparent 72%),
    linear-gradient(180deg, #10182a 0%, #0d1422 42%, #0b0f18 72%, #090c12 100%);
}

/* ② / ④ 城市剪影 SVG */
.rain-svg {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}

/* ③ 雨雾：把远近两层楼群拉开纵深 */
.rain-fog {
  background:
    linear-gradient(180deg, rgba(120,142,180,0) 52%, rgba(122,144,182,.11) 74%, rgba(118,138,176,.15) 88%, rgba(110,130,170,0) 100%),
    radial-gradient(90% 40% at 50% 92%, rgba(96,116,154,.10), transparent 70%);
}

/* ⑤ 四层雨丝
   角度 104°/102°/100°/98° → 距垂直 14°/12°/10°/8°（近垂直微斜）
   每层背景为 repeating-linear-gradient：色带垂直于渐变轴 → 沿丝线方向平移图案完全不变，
   所以位移向量取 (cosθ, sinθ) 方向、循环点 = 无缝 */
.plx.rain-far .fx {
  inset: -110px -70px;
  background-image: repeating-linear-gradient(104deg,
    transparent 0 30px,
    rgba(168,194,240,.05) 30px 32.5px,
    rgba(198,218,252,.085) 32.5px 34px,
    transparent 34px 62px);
  animation: rainFallFar 3.4s linear infinite;
}
.plx.rain-mid1 .fx {
  inset: -110px -70px;
  background-image: repeating-linear-gradient(102deg,
    transparent 0 22px,
    rgba(174,198,242,.07) 22px 24px,
    rgba(204,222,254,.115) 24px 25.6px,
    transparent 25.6px 46px);
  animation: rainFallMid1 2.1s linear infinite;
}
.plx.rain-mid2 .fx {
  inset: -110px -70px;
  background-image: repeating-linear-gradient(100deg,
    transparent 0 16px,
    rgba(180,202,244,.085) 16px 17.6px,
    rgba(210,226,255,.135) 17.6px 19.2px,
    transparent 19.2px 34px);
  animation: rainFallMid2 1.35s linear infinite;
}
.plx.rain-near .fx {
  inset: -110px -70px;
  background-image: repeating-linear-gradient(98deg,
    transparent 0 12px,
    rgba(190,210,248,.10) 12px 13.2px,
    rgba(216,232,255,.175) 13.2px 15px,
    transparent 15px 26px);
  animation: rainFallNear .85s linear infinite;
}

/* ⑥ 玻璃：室内暖光（偏左下，环境光）+ 冷斜反光 */
.rain-glass .fx {
  background:
    radial-gradient(56% 44% at 13% 97%, rgba(255,168,96,.2), transparent 66%),
    radial-gradient(28% 20% at 7% 88%, rgba(255,196,132,.14), transparent 70%),
    linear-gradient(198deg, transparent 33%, rgba(198,220,255,.05) 40%, rgba(214,232,255,.075) 45%, transparent 54%),
    linear-gradient(196deg, transparent 57%, rgba(190,212,250,.035) 62%, transparent 69%);
}
.rain-glass-svg {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}

/* 玻璃上滑落的水痕：慢速、极淡，循环点在不可见处 */
.rain-trail { animation: rainTrail 11s linear infinite; }
.rain-trail-b { animation-duration: 15s; animation-delay: -6.5s; opacity: .8; }

/* ⑦ 窗框 SVG */
.rain-win-svg {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}

/* ⑧ 颗粒 + 暗角（camp 同款手法） */
.rain-grain {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http://www.w3.org/2000/svg'%20width%3D'220'%20height%3D'220'%3E%3Cfilter%20id%3D'n'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'0.85'%20numOctaves%3D'2'%20stitchTiles%3D'stitch'/%3E%3C/filter%3E%3Crect%20width%3D'100%25'%20height%3D'100%25'%20filter%3D'url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: .07;
  mix-blend-mode: overlay;
}
.rain-vignette {
  background-image:
    radial-gradient(128% 100% at 50% 46%, transparent 40%, rgba(0,0,0,.3) 72%, rgba(0,0,0,.56) 100%),
    linear-gradient(180deg, rgba(0,0,0,.24), transparent 22%);
}

/* —— 动效：只动 opacity / transform —— */
@keyframes rainFallFar  { from { transform: translate3d(0, 0, 0); }      to { transform: translate3d(-10px, 39px, 0); } }
@keyframes rainFallMid1 { from { transform: translate3d(0, 0, 0); }      to { transform: translate3d(-8px, 39px, 0); } }
@keyframes rainFallMid2 { from { transform: translate3d(0, 0, 0); }      to { transform: translate3d(-7px, 39px, 0); } }
@keyframes rainFallNear { from { transform: translate3d(0, 0, 0); }      to { transform: translate3d(-6px, 40px, 0); } }
@keyframes rainTrail {
  0%   { opacity: 0;   transform: translateY(-30px); }
  14%  { opacity: .55; }
  78%  { opacity: .32; }
  100% { opacity: 0;   transform: translateY(260px); }
}
@keyframes rainBeacon {
  0%, 100% { opacity: .12; }
  8%   { opacity: 1; }
  16%  { opacity: .12; }
  40%  { opacity: .12; }
  46%  { opacity: .8; }
  54%  { opacity: .12; }
}

/* —— <760px：楼群压矮，避免细高；窗框保持结构 —— */
@media (max-width: 760px) {
  .plx.rain-city .fx .rain-svg,
  .plx.rain-city2 .fx .rain-svg {
    inset: auto 0 0 0;
    height: 54%;
  }
}

/* —— 图书馆（静音）—— */
.lib-light {
  background:
    radial-gradient(130% 78% at 50% -12%, rgba(255,205,130,.26), transparent 72%),
    radial-gradient(150% 100% at 50% 118%, rgba(255,170,100,.12), transparent 66%),
    linear-gradient(180deg, #1c150c 0%, #17110a 55%, #120d07 100%);
}

.lib-shelves {
  background:
    repeating-linear-gradient(90deg, transparent 0 76px, rgba(0,0,0,.3) 76px 81px),
    repeating-linear-gradient(0deg, transparent 0 122px, rgba(0,0,0,.27) 122px 126px),
    repeating-linear-gradient(90deg, rgba(255,226,170,.02) 0 26px, transparent 26px 52px),
    linear-gradient(0deg, rgba(0,0,0,.5) 0 10%, transparent 32%);
}

.lib-dust .fx {
  background:
    radial-gradient(2.5px 2.5px at 20% 30%, rgba(255,226,170,.4), transparent 100%),
    radial-gradient(2px 2px at 68% 58%, rgba(255,226,170,.32), transparent 100%),
    radial-gradient(3px 3px at 44% 76%, rgba(255,226,170,.34), transparent 100%),
    radial-gradient(2px 2px at 84% 36%, rgba(255,226,170,.28), transparent 100%),
    radial-gradient(2px 2px at 32% 16%, rgba(255,226,170,.3), transparent 100%);
  animation: dustFloat 14s ease-in-out infinite alternate;
}

.lib-foreshadow {
  background:
    radial-gradient(125% 92% at 50% 44%, transparent 58%, rgba(0,0,0,.52) 100%),
    linear-gradient(0deg, rgba(4,3,2,.68) 0 6%, transparent 15%);
}

@keyframes dustFloat {
  from { transform: translate3d(0, 0, 0); opacity: 0.6; }
  to { transform: translate3d(-26px, -34px, 0); opacity: 1; }
}

/* —— 篝火营地（篝火声）· arena 壁纸级版 v2 ——
   技法（其余场景可复用）：①feTurbulence 噪声颗粒 overlay 消渐变塑料感 ②大气透视（远山冷紫更亮更糊→近山近黑最锐）
   ③光衰减=多层径向 1/r ④SVG 形体山脊+近景火光 rim 勾边（光心跟随火源） ⑤火焰 SVG 分层（外/中/内/火舌）错相位呼吸
   ⑥火星四层负延迟错峰、落点即起点无缝循环
   ⑦火源 x 用 --fire-x 统一定义：火、光场、天空暖雾、火星、烟、rim 全部读同一个变量，光必须来自火 */
[data-scene="camp"] {
  --fire-w: clamp(161px, 25.3vw, 242px);             /* 火宽：v1 ×1.15 */
  --fire-x: calc(50% + 268px + var(--fire-w) / 2);   /* 火心 x：卡片列右缘外侧约 28px，避开中央卡片 */
}
@media (max-width: 760px) {
  [data-scene="camp"] {
    --fire-w: 120px;
    --fire-x: 84%;
  }
}

.camp-sky {
  background-color: #0a0b12;
  background-image:
    /* 顶部冷调天穹：让天空有高度 */
    radial-gradient(140% 110% at 50% -10%, rgba(38, 44, 74, .55), transparent 62%),
    /* 银河带：斜向极淡雾带 */
    linear-gradient(105deg, transparent 38%, rgba(150, 160, 200, .05) 46%, rgba(120, 120, 160, .035) 52%, transparent 58%),
    /* 火场暖雾：大半径低浓度，火光的大气散射，中心跟随火源 */
    radial-gradient(150% 120% at var(--fire-x) 118%, rgba(255, 122, 42, .14), transparent 68%),
    radial-gradient(110% 90% at var(--fire-x) 108%, rgba(255, 146, 66, .12), transparent 64%),
    linear-gradient(180deg, #0a0b12 0%, #0e0c14 46%, #140e0c 100%);
}

.camp-stars .stars-base {
  background-image:
    radial-gradient(1.1px 1.1px at 6% 8%, #fff, transparent 100%),
    radial-gradient(1.3px 1.3px at 13% 16%, #fff3d6, transparent 100%),
    radial-gradient(7px 7px at 19% 11%, rgba(255, 255, 255, .12), transparent 70%),
    radial-gradient(1.6px 1.6px at 19% 11%, #fff, transparent 100%),
    radial-gradient(1.2px 1.2px at 26% 22%, #cfe0ff, transparent 100%),
    radial-gradient(1px 1px at 33% 12%, #fff, transparent 100%),
    radial-gradient(1.4px 1.4px at 41% 18%, #fff3d6, transparent 100%),
    radial-gradient(1.1px 1.1px at 47% 9%, #fff, transparent 100%),
    radial-gradient(7px 7px at 54% 15%, rgba(255, 255, 255, .10), transparent 70%),
    radial-gradient(1.5px 1.5px at 54% 15%, #fff, transparent 100%),
    radial-gradient(1.2px 1.2px at 62% 21%, #cfe0ff, transparent 100%),
    radial-gradient(1.3px 1.3px at 68% 13%, #fff, transparent 100%),
    radial-gradient(1px 1px at 74% 20%, #fff3d6, transparent 100%),
    radial-gradient(7px 7px at 81% 12%, rgba(255, 255, 255, .11), transparent 70%),
    radial-gradient(1.6px 1.6px at 81% 12%, #fff, transparent 100%),
    radial-gradient(1.1px 1.1px at 87% 19%, #fff, transparent 100%),
    radial-gradient(1.3px 1.3px at 93% 10%, #cfe0ff, transparent 100%),
    radial-gradient(1.2px 1.2px at 97% 17%, #fff3d6, transparent 100%);
}
.camp-stars .stars-twinkle {
  animation: starTwinkle 6.5s ease-in-out infinite alternate;
  background-image:
    radial-gradient(8px 8px at 10% 26%, rgba(255, 255, 255, .14), transparent 70%),
    radial-gradient(1.8px 1.8px at 10% 26%, #fff, transparent 100%),
    radial-gradient(8px 8px at 36% 7%, rgba(255, 243, 214, .13), transparent 70%),
    radial-gradient(1.7px 1.7px at 36% 7%, #fff3d6, transparent 100%),
    radial-gradient(8px 8px at 58% 25%, rgba(207, 224, 255, .12), transparent 70%),
    radial-gradient(1.6px 1.6px at 58% 25%, #cfe0ff, transparent 100%),
    radial-gradient(8px 8px at 72% 9%, rgba(255, 255, 255, .13), transparent 70%),
    radial-gradient(1.8px 1.8px at 72% 9%, #fff, transparent 100%),
    radial-gradient(8px 8px at 90% 24%, rgba(255, 243, 214, .12), transparent 70%),
    radial-gradient(1.5px 1.5px at 90% 24%, #fff3d6, transparent 100%);
}

.camp-hills svg { display: block; width: 100%; height: 100%; }
.camp-hills .hills-far svg path { fill: #1b1626; opacity: .9; }
.camp-hills .hills-far { filter: blur(2px); }
.camp-hills .hills-mid svg path { fill: #120e14; }
.camp-hills .hills-near svg path { fill: #07060a; }
.camp-hills .hill-rim {
  fill: none;
  /* stroke 由 SVG 内 rimLit 径向渐变提供（中心在火源下方的山脊） */
  stroke-width: 2;
  filter: blur(1px);
}

.camp-glow .fx {
  transform-origin: var(--fire-x) 100%;
  animation: fireBreath 3.4s ease-in-out infinite;
  background-image:
    /* 主光场：从火焰位置向外按衰减曲线扩散 */
    radial-gradient(90% 58% at var(--fire-x) 103%, rgba(255, 150, 62, .24), transparent 72%),
    radial-gradient(66% 44% at var(--fire-x) 98%, rgba(255, 176, 92, .24), transparent 70%),
    radial-gradient(42% 30% at var(--fire-x) 93%, rgba(255, 204, 130, .28), transparent 68%),
    radial-gradient(22% 16% at var(--fire-x) 90%, rgba(255, 226, 170, .22), transparent 66%);
}
@keyframes fireBreath {
  0%, 100% { opacity: .88; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.015); }
}

.camp-flame .fx {
  bottom: 11%;              /* 火的基座落在近山坡地上 */
}
.flame-svg {
  position: absolute;
  left: var(--fire-x);
  bottom: 0;
  transform: translateX(-50%);
  display: block;
  width: var(--fire-w);
  height: auto;
  overflow: visible;  /* 地面光斑 blur 溢出 svg 视口，不出现裁切横线 */
}
.fl-outer, .fl-mid, .fl-core, .fl-tongue {
  transform-box: fill-box;  /* 缩放原点锁在火焰底部 */
  transform-origin: 50% 100%;
}
.fl-outer { animation: flameA 2.8s ease-in-out infinite; }
.fl-mid { animation: flameB 2.1s ease-in-out infinite; }
.fl-core { animation: flameC 1.6s ease-in-out infinite; }
.fl-tongue { animation: flameB 2.4s ease-in-out infinite reverse; }
.fl-base { animation: glowPulse 3.2s ease-in-out infinite; }
@keyframes flameA {
  0%, 100% { transform: scale(1, 1);    opacity: .90; }
  30%      { transform: scale(1.035, .97); opacity: 1; }
  65%      { transform: scale(.975, 1.03); opacity: .93; }
}
@keyframes flameB {
  0%, 100% { transform: scale(1, 1);    opacity: .92; }
  25%      { transform: scale(1.04, .965); opacity: 1; }
  70%      { transform: scale(.98, 1.025); opacity: .90; }
}
@keyframes flameC {
  0%, 100% { transform: scale(1, 1);    opacity: .95; }
  35%      { transform: scale(1.05, .95); opacity: 1; }
  70%      { transform: scale(.97, 1.04); opacity: .92; }
}
@keyframes glowPulse {
  0%, 100% { opacity: .40; }
  50%      { opacity: .55; }
}

/* 烟：火苗上方一缕极淡的暖灰，缓慢抬升消散；更淡、更短、更糊 */
.smoke {
  position: absolute;
  left: var(--fire-x);
  bottom: 36%;
  width: 130px;
  height: 240px;
  margin-left: -65px;
  background-image:
    radial-gradient(45% 28% at 50% 88%, rgba(150, 140, 150, .05), transparent 72%),
    radial-gradient(35% 22% at 58% 70%, rgba(140, 130, 145, .035), transparent 70%);
  filter: blur(18px);
  transform-origin: 50% 100%;
  animation: smokeRise 9s ease-in-out infinite;
}
@keyframes smokeRise {
  0%   { opacity: 0;   transform: translateY(10px) scale(.9); }
  20%  { opacity: .8;  transform: translateY(0) scale(1); }
  100% { opacity: 0;   transform: translateY(-70px) scale(1.15); }
}

.camp-embers .fx { transform-origin: 50% 100%; }
.camp-embers .embers-a {
  animation: embersUp 3.4s linear infinite;
  background-image:
    radial-gradient(2.4px 2.4px at calc(var(--fire-x) - 34px) 88%, rgba(255, 196, 116, .95), transparent 100%),
    radial-gradient(2px 2px at calc(var(--fire-x) - 18px) 91%, rgba(255, 176, 88, .85), transparent 100%),
    radial-gradient(2.2px 2.2px at calc(var(--fire-x) + 12px) 87%, rgba(255, 206, 130, .9), transparent 100%),
    radial-gradient(1.8px 1.8px at calc(var(--fire-x) - 6px) 93%, rgba(255, 166, 80, .75), transparent 100%);
}
.camp-embers .embers-b {
  animation: embersUp 4.2s linear -1.3s infinite;
  background-image:
    radial-gradient(2.2px 2.2px at calc(var(--fire-x) - 22px) 90%, rgba(255, 186, 100, .9), transparent 100%),
    radial-gradient(2.6px 2.6px at calc(var(--fire-x) + 8px) 86%, rgba(255, 200, 120, .95), transparent 100%),
    radial-gradient(1.9px 1.9px at calc(var(--fire-x) - 30px) 92%, rgba(255, 160, 74, .8), transparent 100%);
}
.camp-embers .embers-c {
  animation: embersUp 5.1s linear -2.6s infinite;
  background-image:
    radial-gradient(2.3px 2.3px at calc(var(--fire-x) + 2px) 89%, rgba(255, 196, 116, .95), transparent 100%),
    radial-gradient(1.9px 1.9px at calc(var(--fire-x) - 12px) 93%, rgba(255, 170, 84, .8), transparent 100%),
    radial-gradient(2.5px 2.5px at calc(var(--fire-x) + 24px) 87%, rgba(255, 210, 140, .9), transparent 100%);
}
.camp-embers .embers-d {
  animation: embersUpSway 3.8s linear -3.4s infinite;
  background-image:
    radial-gradient(2.1px 2.1px at calc(var(--fire-x) - 4px) 91%, rgba(255, 186, 100, .85), transparent 100%),
    radial-gradient(2.4px 2.4px at calc(var(--fire-x) + 16px) 88%, rgba(255, 204, 126, .95), transparent 100%),
    radial-gradient(1.8px 1.8px at calc(var(--fire-x) - 28px) 94%, rgba(255, 168, 78, .75), transparent 100%);
}
@keyframes embersUp {
  0%   { transform: translateY(0);    opacity: 0; }
  12%  { opacity: .9; }
  75%  { opacity: .45; }
  100% { transform: translateY(-130px); opacity: 0; }
}
@keyframes embersUpSway {
  0%   { transform: translate(0, 0);        opacity: 0; }
  12%  { opacity: .85; }
  50%  { transform: translate(6px, -65px);  opacity: .5; }
  100% { transform: translate(-4px, -130px); opacity: 0; }
}

/* 颗粒：feTurbulence 平铺噪声，overlay 混合，消除渐变塑料感（胶片感来源，~1KB） */
.camp-grain {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http://www.w3.org/2000/svg'%20width%3D'220'%20height%3D'220'%3E%3Cfilter%20id%3D'n'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'0.85'%20numOctaves%3D'2'%20stitchTiles%3D'stitch'/%3E%3C/filter%3E%3Crect%20width%3D'100%25'%20height%3D'100%25'%20filter%3D'url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: .07;
  mix-blend-mode: overlay;
}

/* 暗角 + 顶部压暗：收拢视线，给毛玻璃 UI 让对比度 */
.camp-vignette {
  background-image:
    radial-gradient(130% 100% at 50% 46%, transparent 42%, rgba(0, 0, 0, .28) 74%, rgba(0, 0, 0, .50) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .22), transparent 22%);
}

/* —— 雪夜暖窗（风雪声）· arena 壁纸级版 ——
   技法：①冷色天幕+冷色山体，大气透视同篝火版 ②远山雾带水平循环（瓦片宽 1000px，位移=瓦片宽）
   ③小屋剪影 + 四格窗为唯一暖源，光晕半径限定在窗周围 ④双层落雪：瓦片内只放离边 ≥ 6px 的雪花，
   位移量 = 瓦片高度，循环无缝 ⑤颗粒+暗角同篝火版
   注意：暖光只来自窗（--win-x 决定窗位置），天空/雪地/山体全部冷色 */
[data-scene="snow"] {
  --win-x: 76%;   /* 窗的位置：右侧留白区，落在卡片列之外 */
}

.snow-sky {
  background-color: #070a14;
  background-image:
    radial-gradient(120% 90% at 50% -12%, rgba(44, 58, 96, .45), transparent 62%),
    linear-gradient(104deg, transparent 40%, rgba(170, 185, 230, .045) 48%, rgba(120, 135, 190, .03) 54%, transparent 60%),
    linear-gradient(180deg, #070a14 0%, #0a1020 50%, #0d1426 100%);
}

.snow-stars .stars-base {
  background-image:
    radial-gradient(1.1px 1.1px at 4% 7%, #fff, transparent 100%),
    radial-gradient(1.3px 1.3px at 11% 19%, #dfe8ff, transparent 100%),
    radial-gradient(1px 1px at 17% 10%, #fff, transparent 100%),
    radial-gradient(1.4px 1.4px at 24% 24%, #fff, transparent 100%),
    radial-gradient(7px 7px at 31% 13%, rgba(220, 230, 255, .10), transparent 70%),
    radial-gradient(1.5px 1.5px at 31% 13%, #fff, transparent 100%),
    radial-gradient(1.1px 1.1px at 39% 6%, #cfe0ff, transparent 100%),
    radial-gradient(1.2px 1.2px at 46% 21%, #fff, transparent 100%),
    radial-gradient(1px 1px at 53% 11%, #fff, transparent 100%),
    radial-gradient(7px 7px at 61% 17%, rgba(220, 230, 255, .10), transparent 70%),
    radial-gradient(1.6px 1.6px at 61% 17%, #fff, transparent 100%),
    radial-gradient(1.2px 1.2px at 68% 8%, #dfe8ff, transparent 100%),
    radial-gradient(1.1px 1.1px at 75% 23%, #fff, transparent 100%),
    radial-gradient(1.3px 1.3px at 83% 14%, #fff, transparent 100%),
    radial-gradient(7px 7px at 89% 9%, rgba(220, 230, 255, .10), transparent 70%),
    radial-gradient(1.5px 1.5px at 89% 9%, #fff, transparent 100%),
    radial-gradient(1px 1px at 95% 20%, #cfe0ff, transparent 100%),
    radial-gradient(1.2px 1.2px at 99% 12%, #fff, transparent 100%);
}
.snow-stars .stars-twinkle {
  animation: starTwinkle 7.5s ease-in-out infinite alternate;
  background-image:
    radial-gradient(8px 8px at 15% 30%, rgba(255, 255, 255, .12), transparent 70%),
    radial-gradient(1.7px 1.7px at 15% 30%, #fff, transparent 100%),
    radial-gradient(8px 8px at 44% 4%, rgba(207, 224, 255, .12), transparent 70%),
    radial-gradient(1.6px 1.6px at 44% 4%, #cfe0ff, transparent 100%),
    radial-gradient(8px 8px at 72% 30%, rgba(255, 255, 255, .11), transparent 70%),
    radial-gradient(1.6px 1.6px at 72% 30%, #fff, transparent 100%),
    radial-gradient(8px 8px at 96% 36%, rgba(220, 230, 255, .10), transparent 70%),
    radial-gradient(1.5px 1.5px at 96% 36%, #dfe8ff, transparent 100%);
}

.snow-hills svg { display: block; width: 100%; height: 100%; }
.snow-hills .hills-far svg path { fill: #1a2339; opacity: .92; }
.snow-hills .hills-far { filter: blur(2px); }
.snow-hills .mist {
  background-image:
    radial-gradient(260px 50px at 300px 58%, rgba(150, 170, 215, .07), transparent 100%),
    radial-gradient(260px 46px at 700px 66%, rgba(150, 170, 215, .06), transparent 100%);
  background-size: 1000px 100%;
  background-repeat: repeat-x;
  animation: mistDrift 70s linear infinite;
}
.snow-hills .hills-mid svg path { fill: #121a2d; }
.snow-hills .hills-near svg path { fill: #0a0f1c; }
.snow-hills .hills-near svg path.ridge-rim {
  fill: none;
  stroke: rgba(196, 214, 255, .18);   /* 雪脊冷色勾边 */
  stroke-width: 1.6;
  filter: blur(.8px);
}
@keyframes mistDrift {
  from { background-position: 0 0; }
  to   { background-position: -1000px 0; }   /* 位移 = 瓦片宽，无缝 */
}

.snow-house .house-svg {
  position: absolute;
  left: var(--win-x);
  bottom: 19%;               /* 小屋基座落在中山脊线上 */
  width: clamp(96px, 9vw, 150px);
  height: auto;
  transform: translateX(-50%);
  display: block;
  overflow: visible;         /* 让窗晕超出画框 */
}

/* 双层落雪：瓦片内雪花离边 ≥ 6px；keyframe 位移 = 瓦片高度 → 无缝循环 */
.snow-fall-far .fx {
  background-size: 220px 220px;
  background-image:
    radial-gradient(1.3px 1.3px at 15px 9px, rgba(220, 230, 255, .6), transparent 100%),
    radial-gradient(1.2px 1.2px at 58px 31px, rgba(220, 230, 255, .55), transparent 100%),
    radial-gradient(1.4px 1.4px at 102px 14px, rgba(220, 230, 255, .65), transparent 100%),
    radial-gradient(1.2px 1.2px at 141px 52px, rgba(220, 230, 255, .5), transparent 100%),
    radial-gradient(1.3px 1.3px at 187px 22px, rgba(220, 230, 255, .6), transparent 100%),
    radial-gradient(1.5px 1.5px at 206px 78px, rgba(220, 230, 255, .7), transparent 100%),
    radial-gradient(1.2px 1.2px at 33px 88px, rgba(220, 230, 255, .55), transparent 100%),
    radial-gradient(1.3px 1.3px at 79px 104px, rgba(220, 230, 255, .6), transparent 100%),
    radial-gradient(1.2px 1.2px at 124px 96px, rgba(220, 230, 255, .5), transparent 100%),
    radial-gradient(1.4px 1.4px at 168px 126px, rgba(220, 230, 255, .65), transparent 100%),
    radial-gradient(1.2px 1.2px at 211px 147px, rgba(220, 230, 255, .55), transparent 100%),
    radial-gradient(1.3px 1.3px at 21px 160px, rgba(220, 230, 255, .6), transparent 100%),
    radial-gradient(1.2px 1.2px at 64px 176px, rgba(220, 230, 255, .5), transparent 100%),
    radial-gradient(1.4px 1.4px at 109px 188px, rgba(220, 230, 255, .65), transparent 100%),
    radial-gradient(1.2px 1.2px at 152px 170px, rgba(220, 230, 255, .55), transparent 100%),
    radial-gradient(1.3px 1.3px at 196px 199px, rgba(220, 230, 255, .6), transparent 100%),
    radial-gradient(1.2px 1.2px at 40px 212px, rgba(220, 230, 255, .5), transparent 100%),
    radial-gradient(1.3px 1.3px at 90px 144px, rgba(220, 230, 255, .6), transparent 100%);
  animation: snowFallFar 16s linear infinite;
}
.snow-fall-near .fx {
  background-size: 300px 300px;
  background-image:
    radial-gradient(2.6px 2.6px at 24px 18px, rgba(236, 242, 255, .9), transparent 100%),
    radial-gradient(2.2px 2.2px at 92px 64px, rgba(236, 242, 255, .85), transparent 100%),
    radial-gradient(3px 3px at 151px 12px, rgba(236, 242, 255, .9), transparent 100%),
    radial-gradient(2.4px 2.4px at 213px 88px, rgba(236, 242, 255, .85), transparent 100%),
    radial-gradient(2.8px 2.8px at 268px 40px, rgba(236, 242, 255, .9), transparent 100%),
    radial-gradient(2.2px 2.2px at 58px 140px, rgba(236, 242, 255, .8), transparent 100%),
    radial-gradient(3.2px 3.2px at 126px 176px, rgba(236, 242, 255, .9), transparent 100%),
    radial-gradient(2.4px 2.4px at 190px 150px, rgba(236, 242, 255, .85), transparent 100%),
    radial-gradient(2.8px 2.8px at 246px 208px, rgba(236, 242, 255, .9), transparent 100%),
    radial-gradient(2.6px 2.6px at 34px 236px, rgba(236, 242, 255, .85), transparent 100%),
    radial-gradient(2.2px 2.2px at 104px 262px, rgba(236, 242, 255, .8), transparent 100%),
    radial-gradient(3px 3px at 170px 254px, rgba(236, 242, 255, .9), transparent 100%),
    radial-gradient(2.4px 2.4px at 232px 282px, rgba(236, 242, 255, .85), transparent 100%);
  animation: snowFallNear 11s linear infinite;
}
@keyframes snowFallFar {
  from { background-position: 0 0; }
  to   { background-position: 0 220px; }    /* 位移 = 瓦片高 220px */
}
@keyframes snowFallNear {
  from { background-position: 0 0; }
  to   { background-position: 0 300px; }    /* 位移 = 瓦片高 300px */
}

/* 颗粒：feTurbulence 平铺噪声，overlay 混合（同篝火版） */
.snow-grain {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http://www.w3.org/2000/svg'%20width%3D'220'%20height%3D'220'%3E%3Cfilter%20id%3D'n'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'0.85'%20numOctaves%3D'2'%20stitchTiles%3D'stitch'/%3E%3C/filter%3E%3Crect%20width%3D'100%25'%20height%3D'100%25'%20filter%3D'url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: .07;
  mix-blend-mode: overlay;
}

/* 暗角：比篝火版略重，夜色更深 */
.snow-vignette {
  background-image:
    radial-gradient(130% 100% at 50% 46%, transparent 42%, rgba(0, 0, 0, .30) 74%, rgba(0, 0, 0, .55) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .25), transparent 22%);
}

/* —— 海边黄昏（海浪声）· arena 壁纸级版 —— */
/* ====== ocean 场景段 · 海边黄昏（壁纸级重构） ====== */
/* 光心统一变量：太阳本体/暖雾/海面光路/浪尖反光/云受光侧/礁石 rim 全读 --sun-x */
[data-scene="ocean"] {
  --sun-x: 19.9%;   /* 太阳光心：图层宽度的百分比，.fx 渐变 / 锚定 SVG / rim 全读它 */
  --sunr-y: 53.2%;
  --horizon-y: 55.5%;
}
/* --sun-x 为图层百分比，任何视口都保持像素级一致（光路碎光按同一 % 烘焙） */

/* —— 天幕：高天冷而亮 → 近地平线暖玫瑰 → 收进夜海 —— */
.ocean-sky {
  background-color: #131a36;
  background-image:
    radial-gradient(95% 46% at 64% -10%, rgba(118, 134, 184, .24), transparent 68%),
    radial-gradient(120% 26% at 50% 56.4%, rgba(196, 128, 142, .16), transparent 74%),
    radial-gradient(150% 100% at var(--sun-x) 55%, rgba(255, 172, 116, .28), transparent 62%),
    radial-gradient(70% 28% at calc(var(--sun-x) - 60px) 56.4%, rgba(255, 196, 136, .22), transparent 66%),
    linear-gradient(180deg,
      #171c3c 0%, #232a52 30%, #3a3563 46%, #55406b 53.4%,
      #6e4869 55.6%, #3c3154 56.6%, #222a4d 57.4%, #101a38 62%,
      #0a1228 78%, #070d1c 100%);
}
.sky-atmo { position: absolute; inset: 0; width: 100%; height: 100%; }

/* —— 海平线雾带：远端水汽（集中在光源一侧与右侧海面，避开中央卡片列） —— */
.ocean-haze .fx {
  transform-origin: 50% 56%;
  animation: oceanHazeBreath 11s ease-in-out infinite;
  background-image:
    radial-gradient(34% 3.4% at calc(var(--sun-x) + 30px) 55.2%, rgba(255, 206, 156, .26), transparent 100%),
    radial-gradient(24% 2.6% at calc(var(--sun-x) + 380px) 55.4%, rgba(184, 164, 196, .12), transparent 100%),
    radial-gradient(30% 2.4% at 78% 56.2%, rgba(150, 148, 186, .1), transparent 100%);
}

/* —— 落日：圆盘 + 多层 1/r 光晕，全部以 --sun-x 为圆心 —— */
.ocean-sun .fx {
  animation: oceanSunBreath 6.8s ease-in-out infinite;
  background-image:
    radial-gradient(circle clamp(15px, 2.1vw, 24px) at var(--sun-x) var(--sunr-y),
      #fff6df 0 34%, #ffe7bd 60%, #ffd19a 80%, rgba(255, 196, 138, 0) 100%),
    radial-gradient(circle clamp(48px, 7vw, 86px) at var(--sun-x) calc(var(--sunr-y) + .2%),
      rgba(255, 222, 170, .5) 0 18%, rgba(255, 186, 124, .2) 55%, rgba(255, 176, 120, 0) 100%),
    radial-gradient(46% 34% at var(--sun-x) 55.6%, rgba(255, 172, 116, .18), transparent 70%),
    radial-gradient(90% 58% at var(--sun-x) 54%, rgba(255, 158, 102, .09), transparent 72%);
}

/* —— 云：左侧近光源的横条云带受光、右侧云带入夜；全部位于海平线以上 —— */
.ocean-clouds .fx { animation: oceanCloudDrift 26s ease-in-out infinite alternate; }
.cloud-svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* —— 海平线上的暖雾层（叠在海面之上、光路之下，形成空气透视） —— */
.ocean-glow .fx {
  transform-origin: var(--sun-x) 56%;
  animation: oceanGlowBreath 6.8s ease-in-out infinite;
  background-image:
    radial-gradient(42% 11% at var(--sun-x) 57%, rgba(255, 198, 142, .24), transparent 100%),
    radial-gradient(30% 6.5% at var(--sun-x) 59.2%, rgba(255, 172, 116, .11), transparent 100%),
    radial-gradient(130% 6.5% at 50% 55.9%, rgba(222, 162, 152, .07), transparent 100%);
}

/* —— 海面：不透明底色 + 透视波纹。远（见地平线）细密、近（画面底）疏宽 —— */
.ocean-sea b { position: absolute; left: -100vw; right: -100vw; display: block; }
.ocean-sea .sea-body {
  left: 0; right: 0; top: 55.4%; bottom: 0;
  background-image:
    radial-gradient(60% 34% at var(--sun-x) 62%, rgba(255, 168, 110, .12), transparent 100%),
    linear-gradient(180deg, #3f4a74 0%, #313e69 30%, #23325c 58%, #16234a 80%, #0d1630 100%);
  animation: oceanSeaTone 9s ease-in-out infinite;
  transform-origin: 50% 56%;
}
.ocean-sea .sea-horizon {
  left: 0; right: 0; top: calc(var(--horizon-y) - .6px); height: 1.2px;
  background: linear-gradient(90deg,
    transparent 12%,
    rgba(255, 196, 146, .08) calc(var(--sun-x) - 220px),
    rgba(255, 222, 178, .26) var(--sun-x),
    rgba(255, 196, 146, .08) calc(var(--sun-x) + 220px),
    transparent 62%);
}
.ocean-sea .sea-tex {
  background-image: repeating-linear-gradient(180deg,
    rgba(158, 182, 228, .1) 0 1px, transparent 1px var(--p));
}
.ocean-sea .sea-mid { top: 55.8%; height: 10%; --p: 7px; background-size: 52px 100%; animation: oceanFoamBreathe 12s ease-in-out infinite -4s; opacity: .3; }
.ocean-sea .sea-near { top: 67%; height: 33%; --p: 16px; background-size: 120px 100%; animation: oceanFoamBreathe 17s ease-in-out infinite -8s; opacity: .2; }

/* —— 海面光路：以 --sun-x 为轴向下扇形展开的碎光（%坐标，与光心恒对齐），随波呼吸 —— */
.ocean-path b { position: absolute; display: block; }
.ocean-path .fx {
  transform-origin: var(--sun-x) 56%;
  animation: oceanPathSway 7.5s ease-in-out infinite alternate;
}
.ocean-path .path-glow {
  left: calc(var(--sun-x) - 4.8%);
  top: 55.7%;
  width: 9.6%;
  height: 41%;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(50% 42% at 50% 0%,
    rgba(255, 214, 160, .3) 0 18%, rgba(255, 190, 132, .12) 58%, rgba(255, 180, 122, 0) 100%);
  filter: blur(7px);
  animation: oceanPathGlow 6.2s ease-in-out infinite;
}
.ocean-path .path-far {
  left: 0; right: 0; top: 0; bottom: 0;
  background-image:
    radial-gradient(3.51px 1.81px at 19.55% 56.6%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(3.6px 1.84px at 20.06% 57.58%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(3.73px 1.88px at 19.6% 58.66%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(3.89px 1.94px at 19.87% 59.8%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(4.07px 2.01px at 20.07% 60.96%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(4.28px 2.08px at 20.22% 62.15%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(4.5px 2.17px at 19.84% 63.36%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(4.74px 2.25px at 19.9% 64.58%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(5.0px 2.35px at 19.23% 65.82%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(5.27px 2.45px at 19.8% 67.07%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(5.56px 2.55px at 19.69% 68.33%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(5.86px 2.66px at 20.52% 69.61%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(6.17px 2.78px at 19.99% 70.89%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(6.5px 2.89px at 20.42% 72.18%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(6.83px 3.02px at 19.76% 73.47%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(7.18px 3.14px at 19.15% 74.78%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(7.53px 3.27px at 20.76% 76.09%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(7.9px 3.41px at 20.74% 77.41%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(8.28px 3.55px at 19.56% 78.74%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(8.67px 3.69px at 18.71% 80.07%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(9.06px 3.83px at 19.94% 81.4%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(9.47px 3.98px at 19.89% 82.75%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(9.88px 4.13px at 20.84% 84.09%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(10.3px 4.28px at 20.25% 85.45%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(10.73px 4.44px at 19.93% 86.8%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(11.17px 4.6px at 20.2% 88.16%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(11.62px 4.77px at 19.39% 89.53%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(12.08px 4.93px at 17.93% 90.9%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(12.54px 5.1px at 17.9% 92.27%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(13.01px 5.27px at 22.0% 93.65%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(13.49px 5.45px at 21.58% 95.03%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(13.97px 5.62px at 18.85% 96.42%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(14.46px 5.8px at 21.99% 97.81%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(14.96px 5.99px at 20.02% 99.2%, rgba(255,236,198,0.8) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%);
  animation: oceanPathFlicker 3.4s ease-in-out infinite;
}
.ocean-path .path-near {
  left: 0; right: 0; top: 0; bottom: 0;
  background-image:
    radial-gradient(16.55px 3.95px at 20.76% 64.0%, rgba(255,236,198,0.62) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(17.59px 4.17px at 18.65% 66.22%, rgba(255,236,198,0.62) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(18.85px 4.45px at 21.41% 68.7%, rgba(255,236,198,0.62) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(20.27px 4.75px at 20.84% 71.29%, rgba(255,236,198,0.62) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(21.81px 5.08px at 18.78% 73.94%, rgba(255,236,198,0.62) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(23.47px 5.44px at 19.52% 76.65%, rgba(255,236,198,0.62) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(25.24px 5.82px at 17.17% 79.4%, rgba(255,236,198,0.62) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(27.11px 6.22px at 17.59% 82.19%, rgba(255,236,198,0.62) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(29.07px 6.65px at 21.0% 85.01%, rgba(255,236,198,0.62) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(31.13px 7.09px at 22.08% 87.86%, rgba(255,236,198,0.62) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(33.27px 7.55px at 17.17% 90.74%, rgba(255,236,198,0.62) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(35.49px 8.03px at 21.78% 93.64%, rgba(255,236,198,0.62) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(37.79px 8.52px at 18.64% 96.56%, rgba(255,236,198,0.62) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%),
    radial-gradient(40.16px 9.04px at 20.42% 99.5%, rgba(255,236,198,0.62) 0 14%, rgba(255,210,158,.32) 46%, rgba(255,194,136,.09) 70%, transparent 100%);
  filter: blur(3px);
  opacity: .85;
  animation: oceanPathFlicker 5.1s ease-in-out infinite -1.6s;
}

/* —— 浪涌：两列无缝横移浪脊（位移 = 瓦片宽）+ 光路上两簇浪尖反光 —— */
.ocean-waves b { position: absolute; display: block; }
.ocean-waves .sweep-b {
  left: -100vw; right: -100vw; top: 72%; height: 64px;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1200'%20height='64'%3E%3Cpath%20d='M0%2038%20C%20150%2029,%20310%2031,%20450%2041%20C%20570%2049,%20690%2047,%20820%2038%20C%20950%2029,%201080%2031,%201200%2041'%20fill='none'%20stroke='%23c3d2ef'%20stroke-opacity='.16'%20stroke-width='1.8'/%3E%3Cpath%20d='M0%2052%20C%20190%2044,%20370%2046,%20540%2055%20C%20660%2062,%20780%2060,%20900%2050%20C%201010%2042,%201090%2044,%201200%2052'%20fill='none'%20stroke='%23aebfe2'%20stroke-opacity='.07'%20stroke-width='1.3'/%3E%3C/svg%3E");
  background-size: 1200px 100%;
  background-repeat: repeat-x;
  animation: oceanSweepMid 31s linear infinite reverse;
  opacity: .9;
}
.ocean-waves .sweep-c {
  left: -100vw; right: -100vw; top: 84%; height: 76px;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1600'%20height='76'%3E%3Cpath%20d='M0%2044%20C%20200%2033,%20440%2035,%20620%2046%20C%20770%2056,%20920%2055,%201080%2044%20C%201230%2034,%201430%2036,%201600%2046'%20fill='none'%20stroke='%23c3d2ef'%20stroke-opacity='.1'%20stroke-width='2.2'/%3E%3Cpath%20d='M0%2060%20C%20240%2050,%20480%2052,%20680%2062%20C%20840%2070,%20990%2068,%201160%2057%20C%201320%2048,%201470%2050,%201600%2060'%20fill='none'%20stroke='%23aebfe2'%20stroke-opacity='.06'%20stroke-width='1.6'/%3E%3C/svg%3E");
  background-size: 1600px 100%;
  background-repeat: repeat-x;
  animation: oceanSweepNear 37s linear infinite;
  opacity: .85;
}
.ocean-waves .glint-a {
  left: calc(var(--sun-x) - 58px); top: 60.8%;
  width: 122px; height: 8px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 226, 180, .46), rgba(255, 204, 150, .16) 58%, transparent 100%);
  animation: oceanGlint 4.2s ease-in-out infinite;
}
.ocean-waves .glint-b {
  left: calc(var(--sun-x) - 78px); top: 67.2%;
  width: 168px; height: 10px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 214, 162, .32), rgba(255, 194, 138, .12) 58%, transparent 100%);
  animation: oceanGlint 5.6s ease-in-out infinite -1.8s;
}

/* —— 岸沫：无缝横移瓦片（瓦片宽 = 画布 1/3，位移 -33.3333% 即瓦片尺寸） —— */
.foam-svg {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 15%;
  animation: oceanFoamRoll 13s linear infinite;
}

/* —— 近景礁石：形体 + rim 勾边（rim 渐变圆心在太阳高度线，光来自 --sun-x 一侧） —— */
.rock-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

/* —— feTurbulence 颗粒 + 暗角收视线 —— */
.ocean-grain {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='220'%20height='220'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: .07;
  mix-blend-mode: overlay;
}
.ocean-vignette {
  background-image:
    radial-gradient(130% 100% at 50% 46%, transparent 42%, rgba(0, 0, 0, .3) 74%, rgba(0, 0, 0, .52) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .24), transparent 22%);
}

/* —— keyframes（全部 ocean 前缀；平移类位移 = 对应瓦片尺寸） —— */
@keyframes oceanSunBreath {
  0%, 100% { opacity: .86; }
  50% { opacity: 1; }
}
@keyframes oceanGlowBreath {
  0%, 100% { opacity: .82; }
  50% { opacity: 1; }
}
@keyframes oceanHazeBreath {
  0%, 100% { opacity: .78; }
  50% { opacity: 1; }
}
@keyframes oceanCloudDrift {
  from { transform: translate3d(-12px, 0, 0); }
  to { transform: translate3d(12px, 0, 0); }
}
@keyframes oceanFoamBreathe {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}
@keyframes oceanSeaTone {
  0%, 100% { opacity: .92; }
  50% { opacity: 1; }
}
@keyframes oceanSweepMid {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-1200px, 0, 0); } /* = 瓦片宽 1200px */
}
@keyframes oceanSweepNear {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-1600px, 0, 0); } /* = 瓦片宽 1600px */
}
@keyframes oceanGlint {
  0%, 100% { opacity: .26; transform: scaleX(.86); }
  50% { opacity: .92; transform: scaleX(1.06); }
}
@keyframes oceanPathSway {
  from { transform: translate3d(-3px, 0, 0) scaleX(.985); opacity: .88; }
  to { transform: translate3d(3px, 0, 0) scaleX(1.03); opacity: 1; }
}
@keyframes oceanPathGlow {
  0%, 100% { opacity: .7; transform: scaleY(.97); }
  50% { opacity: 1; transform: scaleY(1.03); }
}
@keyframes oceanPathFlicker {
  0%, 100% { opacity: .68; }
  50% { opacity: 1; }
}
@keyframes oceanFoamRoll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-33.3333%, 0, 0); } /* = 瓦片宽（画布宽 1/3） */
}

/* —— 街角咖啡馆（咖啡馆声）· arena 壁纸级版 —— */
/* ====== cafe 场景段 · 街角咖啡馆（壁纸级重构） ====== */
/* 光心统一变量：灯芯/灯罩受光/墙面被照亮范围/光锥/bokeh 高亮区/所有 rim 勾边全读 --lamp-x */
[data-scene="cafe"] {
  --lamp-x: calc(50% - 346px); /* 吊灯光心（灯 SVG 盒的横向中轴）；<760px 单独覆盖 */
  --bulb-y: 157px;             /* 灯芯高度：灯 SVG 盒顶起算的像素，与 .fx 渐变同一坐标原点 */
}
@media (max-width: 760px) {
  [data-scene="cafe"] {
    --lamp-x: calc(50% - 128px);
    --bulb-y: 125px;
  }
  .cafe-window { display: none; }
  .lamp-svg { left: calc(var(--lamp-x) - 76px); width: 152px; height: 192px; }
}

/* —— 墙：暖光只从灯的一侧让墙「亮起来」，越远越冷越暗 —— */
.cafe-wall {
  background-color: #0e0806;
  background-image:
    radial-gradient(54% 62% at var(--lamp-x) 26%, rgba(255, 186, 116, .22), transparent 66%),
    radial-gradient(90% 74% at var(--lamp-x) 34%, rgba(255, 166, 96, .1), transparent 70%),
    radial-gradient(70% 60% at 58% 46%, rgba(74, 52, 40, .16), transparent 72%),
    radial-gradient(44% 40% at 83% 36%, rgba(126, 150, 190, .07), transparent 70%),
    linear-gradient(180deg, #140d08 0%, #110b07 46%, #0d0805 78%, #0a0604 100%);
}

/* —— 墙面下半：护墙线 + 踢脚，受灯一侧微亮，给「室内」以纵深 —— */
.cafe-wall .fx::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 77.5%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 4%,
    rgba(255, 196, 136, .16) calc(var(--lamp-x) - 320px),
    rgba(255, 214, 158, .26) var(--lamp-x),
    rgba(180, 130, 90, .12) 58%,
    rgba(120, 100, 86, .06) 82%,
    transparent 96%);
}
.cafe-wall .fx::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 77.6%; bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .3) 40%, rgba(0, 0, 0, .42));
}

/* —— 窗：深蓝夜色圆角窄窗 + 窗外暖灯 + 霜面反光，窗台宽度过渡到暗部 —— */
.win-svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* —— 灯的世界光：多层 1/r 衰减，全部以 --lamp-x/--bulb-y 为圆心 —— */
.cafe-light .fx {
  animation: cafeLightBreath 7.2s ease-in-out infinite;
  background-image:
    radial-gradient(circle clamp(40px, 4.6vw, 66px) at var(--lamp-x) var(--bulb-y),
      rgba(255, 226, 176, .5) 0 16%, rgba(255, 196, 128, .24) 48%, rgba(255, 170, 100, 0) 100%),
    radial-gradient(circle clamp(110px, 12vw, 180px) at var(--lamp-x) calc(var(--bulb-y) + 10px),
      rgba(255, 186, 116, .2) 0 22%, rgba(255, 160, 92, .08) 55%, rgba(255, 150, 84, 0) 100%),
    radial-gradient(circle clamp(240px, 26vw, 390px) at var(--lamp-x) calc(var(--bulb-y) + 22px),
      rgba(255, 158, 90, .12) 0 26%, rgba(240, 130, 70, .05) 56%, rgba(230, 120, 64, 0) 100%),
    radial-gradient(64% 54% at calc(var(--lamp-x) + 2%) 44%, rgba(255, 156, 90, .05), transparent 72%);
}

/* —— 光锥：无任何直边，三层向下扩散的椭圆柔光叠出「光落下来」的体积感 —— */
.cafe-beam .fx {
  transform-origin: var(--lamp-x) var(--bulb-y);
  animation: cafeBeamBreath 5.6s ease-in-out infinite;
  background-image:
    radial-gradient(30% 17% at var(--lamp-x) 31%, rgba(255, 188, 118, .16), transparent 100%),
    radial-gradient(38% 26% at var(--lamp-x) 42%, rgba(255, 176, 106, .11), transparent 100%),
    radial-gradient(52% 40% at var(--lamp-x) 56%, rgba(255, 166, 96, .06), transparent 100%);
}

/* —— 吊灯：固定尺寸实物，横向中轴 = --lamp-x；灯罩形体 + 下沿受光唇线 + 灯芯 —— */
.lamp-svg {
  position: absolute;
  left: calc(var(--lamp-x) - 95px);
  top: 0;
  width: 190px;
  height: 240px;
}

/* —— bokeh：远层小而糊、近层大而虚，错峰漂移；高亮集中在 --lamp-x 一侧 —— */
.cafe-bokeh .fx {
  background-repeat: repeat;
  background-image:
    radial-gradient(12px 12px at 12% 66%, rgba(255, 206, 140, .15) 0 30%, rgba(255, 206, 140, .05) 55%, transparent 100%),
    radial-gradient(18px 18px at 31% 38%, rgba(255, 190, 120, .13) 0 28%, rgba(255, 190, 120, .04) 55%, transparent 100%),
    radial-gradient(9px 9px at 52% 74%, rgba(255, 214, 152, .12) 0 30%, rgba(255, 214, 152, .04) 55%, transparent 100%),
    radial-gradient(15px 15px at 71% 30%, rgba(255, 186, 116, .11) 0 28%, rgba(255, 186, 116, .04) 55%, transparent 100%),
    radial-gradient(11px 11px at 88% 58%, rgba(255, 200, 132, .12) 0 30%, rgba(255, 200, 132, .04) 55%, transparent 100%),
    radial-gradient(20px 20px at 46% 18%, rgba(140, 160, 200, .05) 0 40%, transparent 100%);
  background-size: 420px 460px;
}
.cafe-bokeh.far .fx { opacity: .55; animation: cafeBokehFloat 19s ease-in-out infinite alternate; filter: blur(1.5px); }
.cafe-bokeh.far .fx::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(22px 22px at calc(var(--lamp-x) + 4%) 40%, rgba(255, 218, 156, .16) 0 30%, rgba(255, 218, 156, .05) 55%, transparent 100%),
    radial-gradient(30px 30px at calc(var(--lamp-x) - 7%) 33%, rgba(255, 196, 128, .13) 0 28%, rgba(255, 196, 128, .04) 55%, transparent 100%),
    radial-gradient(17px 17px at calc(var(--lamp-x) + 12%) 48%, rgba(255, 206, 140, .12) 0 30%, rgba(255, 206, 140, .04) 55%, transparent 100%);
  animation: cafeBokehFloat 23s ease-in-out infinite alternate -6s;
}
.cafe-bokeh.near .fx {
  background-image:
    radial-gradient(52px 52px at 22% 72%, rgba(255, 198, 130, .13) 0 26%, rgba(255, 198, 130, .045) 52%, transparent 100%),
    radial-gradient(40px 40px at 63% 60%, rgba(255, 210, 146, .11) 0 26%, rgba(255, 210, 146, .04) 52%, transparent 100%),
    radial-gradient(64px 64px at 87% 78%, rgba(255, 180, 112, .1) 0 24%, rgba(255, 180, 112, .04) 50%, transparent 100%);
  background-size: 640px 620px;
  opacity: .75;
  animation: cafeBokehFloat 13s ease-in-out infinite -5s alternate-reverse;
  filter: blur(3px);
}

/* —— 吧台：形体剪影 + 台面受光 rim（光从 --lamp-x 一侧来）+ 杯盏书本 —— */
.counter-svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* —— 热气：杯上三缕，逐缕负延迟错峰上升 —— */
.cafe-steam .fx { transform-origin: 36% 74%; }
.cafe-steam b { position: absolute; display: block; left: 36%; width: 120px; height: 200px; }
.cafe-steam .wisp-a {
  bottom: 17%; margin-left: -60px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 234, 200, .19), rgba(255, 220, 180, .06) 60%, transparent 100%);
  animation: cafeSteam 9s ease-in-out infinite; opacity: .8;
  filter: blur(5px);
}
.cafe-steam .wisp-b {
  bottom: 16%; margin-left: -22px; width: 86px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 228, 190, .15), rgba(255, 214, 170, .05) 60%, transparent 100%);
  animation: cafeSteam 12s ease-in-out infinite -4s;
  filter: blur(6px);
}
.cafe-steam .wisp-c {
  bottom: 18%; margin-left: -98px; width: 70px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 224, 186, .12), rgba(255, 210, 165, .04) 58%, transparent 100%);
  animation: cafeSteam 15s ease-in-out infinite -8s;
  filter: blur(6px);
}

/* —— feTurbulence 颗粒 + 暗角 —— */
.cafe-grain {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='220'%20height='220'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: .07;
  mix-blend-mode: overlay;
}
.cafe-vignette {
  background-image:
    radial-gradient(130% 100% at 50% 46%, transparent 40%, rgba(0, 0, 0, .32) 74%, rgba(0, 0, 0, .56) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .26), transparent 22%);
}

/* —— keyframes（全部 cafe 前缀；只动 opacity/transform） —— */
@keyframes cafeLightBreath {
  0%, 100% { opacity: .84; }
  50% { opacity: 1; }
}
@keyframes cafeBeamBreath {
  0%, 100% { opacity: .78; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.035); }
}
@keyframes cafeBokehFloat {
  from { transform: translate3d(-14px, 6px, 0); }
  to { transform: translate3d(12px, -8px, 0); }
}
@keyframes cafeSteam {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: .5; }
  50% { transform: translate3d(6px, -14px, 0) scale(1.12); opacity: .9; }
}

/* —— 森林清晨（鸟鸣风声）· arena 壁纸级版 v2 —— */
/* ====== forest 场景段 · 森林清晨 v2（碎化针叶剪影 + 可读晨光） ====== */

[data-scene="forest"] {
  --forest-sun-x: 78%;
}

@media (max-width: 760px) {
  [data-scene="forest"] {
    --forest-sun-x: 84%;
  }
}

/* —— 天幕：高处偏冷、光源一侧泛暖、底部收暗 —— */
.forest-sky {
  background-color: #0a100f;
  background-image:
    radial-gradient(46% 36% at var(--forest-sun-x) 8%, rgba(231, 222, 174, .28), transparent 70%),
    radial-gradient(76% 60% at var(--forest-sun-x) 20%, rgba(172, 192, 152, .15), transparent 76%),
    radial-gradient(115% 55% at 50% 100%, rgba(42, 64, 49, .22), transparent 74%),
    linear-gradient(180deg, #0e1918 0%, #142019 42%, #0e1813 100%);
}

/* —— 光源核心：多层径向 1/r 光衰减（同 ocean 的 --sun-x 手法），峰亮 #f2eab9 级 —— */
.forest-sun .fx {
  background-image:
    radial-gradient(circle clamp(24px, 3vw, 40px) at var(--forest-sun-x) 8.5%,
      rgba(250, 245, 208, .96) 0 18%, rgba(242, 234, 185, .6) 40%, rgba(234, 226, 168, .2) 64%, rgba(234, 226, 168, 0) 100%),
    radial-gradient(circle clamp(72px, 10vw, 132px) at var(--forest-sun-x) 9%,
      rgba(240, 231, 180, .36) 0 12%, rgba(228, 218, 160, .16) 46%, rgba(228, 218, 160, 0) 100%),
    radial-gradient(circle clamp(150px, 21vw, 290px) at var(--forest-sun-x) 10%,
      rgba(226, 219, 166, .15) 0 16%, rgba(210, 206, 158, .06) 52%, rgba(210, 206, 158, 0) 100%),
    radial-gradient(24% 18% at var(--forest-sun-x) 11%, rgba(238, 230, 182, .2), transparent 74%),
    radial-gradient(52% 38% at var(--forest-sun-x) 16%, rgba(212, 212, 160, .12), transparent 78%),
    radial-gradient(92% 62% at var(--forest-sun-x) 24%, rgba(178, 196, 150, .07), transparent 80%);
  animation: forestSunBreath 7.4s ease-in-out infinite alternate;
}

/* —— 光柱 A：宽而柔的扇形，从光源放射、带方向性 —— */
.forest-beams .fx {
  transform-origin: var(--forest-sun-x) 5.5%;
  will-change: opacity, transform;
}

.forest-beams-a .fx {
  background: conic-gradient(from 196deg at var(--forest-sun-x) 5.5%,
    transparent 0deg,
    rgba(240, 233, 188, .02) 3deg,
    rgba(240, 233, 188, .15) 7deg,
    rgba(240, 233, 188, .05) 11.5deg,
    transparent 15deg,
    transparent 20.5deg,
    rgba(236, 229, 180, .03) 23deg,
    rgba(236, 229, 180, .11) 27.5deg,
    rgba(236, 229, 180, .03) 32deg,
    transparent 36deg,
    transparent 44deg,
    rgba(242, 235, 190, .04) 48deg,
    rgba(242, 235, 190, .14) 53deg,
    rgba(242, 235, 190, .04) 59deg,
    transparent 63deg,
    transparent 70deg,
    rgba(236, 229, 182, .03) 73deg,
    rgba(236, 229, 182, .1) 78deg,
    rgba(236, 229, 182, .03) 83deg,
    transparent 87deg,
    transparent 100deg);
  filter: blur(15px);
  animation: forestBeamA 10.6s ease-in-out infinite alternate;
}

/* —— 光柱 B：三道更亮的主光（树冠间隙透下） —— */
.forest-beams-b .fx {
  background: conic-gradient(from 204deg at var(--forest-sun-x) 5.5%,
    transparent 0deg,
    rgba(247, 241, 202, .02) 4.6deg,
    rgba(250, 244, 208, .3) 8deg,
    rgba(250, 244, 208, .38) 9.6deg,
    rgba(249, 243, 206, .16) 11.6deg,
    rgba(247, 241, 202, .02) 14.4deg,
    transparent 17deg,
    transparent 26deg,
    rgba(247, 241, 202, .02) 29.6deg,
    rgba(250, 244, 208, .26) 32.6deg,
    rgba(250, 244, 208, .34) 34.2deg,
    rgba(249, 243, 206, .13) 36.6deg,
    rgba(247, 241, 202, .02) 39.4deg,
    transparent 42.5deg,
    transparent 51.6deg,
    rgba(247, 241, 202, .02) 55deg,
    rgba(250, 244, 208, .22) 58deg,
    rgba(250, 244, 208, .3) 59.4deg,
    rgba(249, 243, 206, .12) 61.8deg,
    rgba(247, 241, 202, .02) 64.8deg,
    transparent 68deg,
    transparent 100deg);
  filter: blur(7px);
  animation: forestBeamB 8.2s ease-in-out -2.6s infinite alternate;
}

/* —— SVG 层通用 —— */
.forest-hills svg {
  display: block;
  width: 100%;
  height: 100%;
}

.forest-hills-far {
  filter: blur(2.2px);
  opacity: .82;
}

.forest-hills-mid {
  filter: blur(.6px);
  opacity: .98;
}

.forest-hills-near {
  filter: none;
}

/* —— 远景：雾岭 + 小针叶林 —— */
.forest-far-mass {
  fill: #45584c;
  opacity: .42;
}

.forest-far-fill {
  fill: #3f5245;
}

.forest-far-trees {
  opacity: .62;
}

.forest-far-ridge-rim {
  fill: none;
  stroke: rgba(196, 203, 172, .3);
  stroke-width: 2;
  filter: blur(1.3px);
}

/* 冠缘受光：同形外轮廓的横向渐变描边垫在填充下面（不会产生漂浮线，光心侧亮） */
.forest-rim-halo {
  fill: none;
  stroke: url(#forestRimGradFar);
  stroke-width: 2.6;
  stroke-linejoin: round;
  filter: blur(1.3px);
  opacity: .9;
}

.forest-hills-mid .forest-rim-halo {
  stroke: url(#forestRimGradMid);
  stroke-width: 2.8;
}

.forest-hills-near .forest-rim-halo {
  stroke: url(#forestRimGradNear);
  stroke-width: 3.2;
}

/* —— 中景：渐变地面 + 渐变小杉林 —— */
.forest-mid-ground {
  fill: url(#forestMidGround);
}

.forest-mid-back {
  opacity: .8;
}

.forest-back-fill {
  fill: #24382b;
}

.forest-mid-fill {
  fill: url(#forestMidTrees);
}

.forest-mid-saplings path {
  fill: #16241b;
}

/* —— 近景：暗地面 —— */
.forest-near-ground {
  fill: url(#forestNearGround);
}

.forest-near-fill {
  fill: #071009;
}

.forest-near-saplings path {
  fill: #050b07;
}

/* —— 远/中/近地面交界雾带（拆开平涂的钝感） —— */
.forest-mist-a .fx {
  background:
    radial-gradient(34% 4.6% at 21% 57.5%, rgba(200, 211, 188, .1), transparent 78%),
    radial-gradient(44% 5.4% at 56% 60%, rgba(206, 214, 186, .11), transparent 80%),
    radial-gradient(30% 4.2% at 37% 63%, rgba(182, 198, 174, .07), transparent 80%),
    radial-gradient(30% 5% at var(--forest-sun-x) 62%, rgba(219, 221, 184, .18), transparent 80%);
  animation: forestMistA 11.8s ease-in-out infinite alternate;
}

.forest-mist-b .fx {
  background:
    radial-gradient(48% 6.4% at 28% 73.5%, rgba(174, 194, 170, .08), transparent 80%),
    radial-gradient(34% 5% at 47% 78%, rgba(166, 186, 162, .06), transparent 80%),
    radial-gradient(40% 7% at var(--forest-sun-x) 76%, rgba(208, 212, 178, .15), transparent 82%);
  animation: forestMistB 14.6s ease-in-out -3.2s infinite alternate;
}

/* —— 近景地面受光斑（光源侧） —— */
.forest-groundglow {
  background:
    radial-gradient(30% 9% at calc(var(--forest-sun-x) - 2%) 77%, rgba(242, 238, 196, .3), transparent 76%),
    radial-gradient(36% 10% at 33% 82%, rgba(168, 190, 160, .06), transparent 80%),
    radial-gradient(30% 7% at calc(var(--forest-sun-x) - 12%) 87%, rgba(236, 232, 188, .12), transparent 78%);
  animation: forestGroundGlow 9.4s ease-in-out infinite alternate;
}

/* 近景地面受光斑：林间空地漏下的暖光（压在地面植被下面，树影自然遮进去） */
.forest-sunfloor {
  background:
    radial-gradient(21% 5.6% at calc(var(--forest-sun-x) - 3%) 81.5%, rgba(248, 244, 202, .5), transparent 70%),
    radial-gradient(30% 8% at calc(var(--forest-sun-x) - 6%) 84.5%, rgba(242, 237, 194, .32), transparent 74%),
    radial-gradient(42% 11% at calc(var(--forest-sun-x) - 1%) 88%, rgba(230, 228, 186, .18), transparent 80%);
  animation: forestSunfloor 10.8s ease-in-out -2s infinite alternate;
}

/* —— 浮尘：只落在光心 / 对角光路里（径向遮罩之外几乎无尘） —— */
.forest-dust .fx {
  background-repeat: repeat;
  background-size: 340px 280px;
  will-change: transform, opacity;
  -webkit-mask-image:
    radial-gradient(40% 32% at var(--forest-sun-x) 10%, rgba(0, 0, 0, .96) 0%, rgba(0, 0, 0, .56) 46%, transparent 78%),
    radial-gradient(24% 28% at 65% 32%, rgba(0, 0, 0, .5), transparent 80%),
    radial-gradient(28% 32% at 52% 54%, rgba(0, 0, 0, .4), transparent 80%),
    radial-gradient(22% 28% at 41% 72%, rgba(0, 0, 0, .3), transparent 82%),
    radial-gradient(28% 18% at calc(var(--forest-sun-x) - 2%) 84%, rgba(0, 0, 0, .46), transparent 84%);
  mask-image:
    radial-gradient(40% 32% at var(--forest-sun-x) 10%, rgba(0, 0, 0, .96) 0%, rgba(0, 0, 0, .56) 46%, transparent 78%),
    radial-gradient(24% 28% at 65% 32%, rgba(0, 0, 0, .5), transparent 80%),
    radial-gradient(28% 32% at 52% 54%, rgba(0, 0, 0, .4), transparent 80%),
    radial-gradient(22% 28% at 41% 72%, rgba(0, 0, 0, .3), transparent 82%),
    radial-gradient(28% 18% at calc(var(--forest-sun-x) - 2%) 84%, rgba(0, 0, 0, .46), transparent 84%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.forest-dust-a .fx {
  background-image:
    radial-gradient(1.5px 1.5px at 32px 46px, rgba(242, 229, 185, .78), transparent 100%),
    radial-gradient(1.2px 1.2px at 183px 112px, rgba(237, 227, 194, .6), transparent 100%),
    radial-gradient(1.4px 1.4px at 278px 218px, rgba(236, 224, 184, .66), transparent 100%);
  animation: forestDustDrift 21s -17s ease-in-out infinite;
}

.forest-dust-b .fx {
  background-image:
    radial-gradient(1.9px 1.9px at 77px 72px, rgba(246, 232, 190, .76), transparent 100%),
    radial-gradient(1.3px 1.3px at 239px 31px, rgba(233, 225, 195, .6), transparent 100%),
    radial-gradient(1.6px 1.6px at 305px 186px, rgba(241, 230, 196, .68), transparent 100%);
  animation: forestDustDrift 25s -11s ease-in-out infinite;
}

.forest-dust-c .fx {
  background-image:
    radial-gradient(2px 2px at 123px 54px, rgba(244, 229, 184, .8), transparent 100%),
    radial-gradient(1.6px 1.6px at 26px 193px, rgba(235, 221, 179, .66), transparent 100%),
    radial-gradient(1.8px 1.8px at 271px 139px, rgba(244, 230, 194, .72), transparent 100%);
  animation: forestDustDrift 29s -7s ease-in-out infinite;
}

.forest-dust-d .fx {
  background-image:
    radial-gradient(2.4px 2.4px at 61px 144px, rgba(250, 237, 204, .8), transparent 100%),
    radial-gradient(1.9px 1.9px at 215px 227px, rgba(238, 226, 191, .68), transparent 100%),
    radial-gradient(2.1px 2.1px at 317px 74px, rgba(244, 232, 201, .74), transparent 100%);
  animation: forestDustDrift 33s -3s ease-in-out infinite;
}

/* —— 底部雾层：把近景地面从纯黑里托起来 —— */
.forest-fog {
  background:
    radial-gradient(58% 10% at 28% 85%, rgba(186, 202, 178, .06), transparent 76%),
    radial-gradient(64% 12% at 76% 81%, rgba(198, 206, 178, .1), transparent 78%),
    radial-gradient(96% 14% at 52% 93%, rgba(170, 190, 160, .08), transparent 80%),
    linear-gradient(0deg, rgba(4, 9, 6, .4), transparent 26%);
  animation: forestFogSway 14s ease-in-out infinite alternate;
}

.forest-grain {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http://www.w3.org/2000/svg'%20width%3D'220'%20height%3D'220'%3E%3Cfilter%20id%3D'n'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'0.82'%20numOctaves%3D'2'%20stitchTiles%3D'stitch'/%3E%3C/filter%3E%3Crect%20width%3D'100%25'%20height%3D'100%25'%20filter%3D'url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: .06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.forest-vignette {
  background-image:
    radial-gradient(126% 100% at 50% 46%, transparent 42%, rgba(0, 0, 0, .22) 76%, rgba(0, 0, 0, .44) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .14), transparent 22%);
  pointer-events: none;
}

/* —— keyframes（forest 前缀；平移位移一律 = 瓦片尺寸 340px） —— */
@keyframes forestSunBreath {
  from { opacity: .82; transform: scale(.995); }
  to   { opacity: 1;   transform: scale(1.012); }
}

@keyframes forestBeamA {
  from { opacity: .62; transform: scale(1) translate3d(-6px, 0, 0); }
  to   { opacity: .95; transform: scale(1.03) translate3d(6px, 2px, 0); }
}

@keyframes forestBeamB {
  from { opacity: .55; transform: scale(1) translate3d(5px, 0, 0); }
  to   { opacity: .92; transform: scale(1.024) translate3d(-5px, 3px, 0); }
}

@keyframes forestMistA {
  from { transform: translate3d(-10px, 0, 0); opacity: .62; }
  to   { transform: translate3d(10px, -2px, 0); opacity: .96; }
}

@keyframes forestMistB {
  from { transform: translate3d(12px, 1px, 0); opacity: .58; }
  to   { transform: translate3d(-12px, -2px, 0); opacity: .92; }
}

@keyframes forestSunfloor {
  from { opacity: .7; transform: scaleX(.99); }
  to   { opacity: 1;  transform: scaleX(1.015); }
}

@keyframes forestGroundGlow {
  from { opacity: .62; transform: scaleX(.995); }
  to   { opacity: 1;   transform: scaleX(1.02); }
}

@keyframes forestFogSway {
  from { transform: translate3d(-9px, 0, 0); opacity: .66; }
  to   { transform: translate3d(9px, -3px, 0); opacity: .94; }
}

@keyframes forestDustDrift {
  0%   { transform: translate3d(0, 0, 0); opacity: .18; }
  22%  { opacity: .7; }
  72%  { opacity: .48; }
  100% { transform: translate3d(340px, -18px, 0); opacity: .16; }
}

/* —— 极光之夜（静音）· arena 壁纸级版 v4 —— */
/* ====== aurora 场景段 · 极光之夜：亮带收在 8%–52%，簇间透夜空 ====== */

.aurora-sky {
  background-color: #050910;
  background-image:
    radial-gradient(70% 40% at 80% 3%, rgba(46, 72, 94, .13), transparent 76%),
    radial-gradient(60% 44% at 16% 16%, rgba(44, 56, 88, .09), transparent 78%),
    linear-gradient(180deg, #050810 0%, #070d16 36%, #08111b 62%, #070e17 100%);
}

/* 星空：保持上线版本不动 */
.aurora-stars {
  background-repeat: repeat;
}

.aurora-stars-far {
  opacity: .72;
  background-size: 520px 400px;
  background-image:
    radial-gradient(1px 1px at 23px 47px, rgba(235, 243, 255, .78), transparent 100%),
    radial-gradient(1px 1px at 109px 166px, rgba(213, 228, 249, .61), transparent 100%),
    radial-gradient(1.2px 1.2px at 217px 91px, rgba(242, 246, 255, .74), transparent 100%),
    radial-gradient(1px 1px at 304px 278px, rgba(221, 231, 250, .58), transparent 100%),
    radial-gradient(1.1px 1.1px at 427px 48px, rgba(235, 243, 255, .66), transparent 100%),
    radial-gradient(1px 1px at 489px 218px, rgba(221, 233, 251, .57), transparent 100%),
    radial-gradient(1.2px 1.2px at 72px 331px, rgba(242, 246, 255, .62), transparent 100%),
    radial-gradient(1px 1px at 367px 367px, rgba(225, 237, 255, .56), transparent 100%),
    radial-gradient(5px 5px at 217px 91px, rgba(210, 229, 255, .11), transparent 75%);
  animation: starTwinkle 7.5s ease-in-out infinite alternate;
}

.aurora-stars-near {
  opacity: .86;
  background-size: 760px 570px;
  background-image:
    radial-gradient(1.5px 1.5px at 64px 83px, rgba(255, 255, 255, .88), transparent 100%),
    radial-gradient(1.2px 1.2px at 194px 318px, rgba(224, 240, 255, .77), transparent 100%),
    radial-gradient(1.6px 1.6px at 351px 144px, rgba(255, 255, 255, .91), transparent 100%),
    radial-gradient(1.2px 1.2px at 531px 410px, rgba(228, 239, 255, .76), transparent 100%),
    radial-gradient(1.5px 1.5px at 706px 65px, rgba(255, 255, 255, .84), transparent 100%),
    radial-gradient(1.3px 1.3px at 628px 265px, rgba(222, 237, 255, .72), transparent 100%),
    radial-gradient(1.4px 1.4px at 112px 492px, rgba(244, 248, 255, .82), transparent 100%),
    radial-gradient(1.1px 1.1px at 418px 531px, rgba(225, 239, 255, .72), transparent 100%),
    radial-gradient(7px 7px at 351px 144px, rgba(205, 229, 255, .13), transparent 75%),
    radial-gradient(6px 6px at 706px 65px, rgba(210, 230, 255, .11), transparent 75%);
  animation: starTwinkle 5.8s ease-in-out -2.4s infinite alternate;
}

/* 远层气辉：只补在亮带高度内，顶部与中央留空 */
.aurora-curtain-haze .fx {
  background:
    radial-gradient(26% 15% at 81% 27%, rgba(96, 214, 158, .13), transparent 76%),
    radial-gradient(20% 13% at 27% 27%, rgba(84, 190, 142, .085), transparent 78%),
    radial-gradient(14% 10% at 57% 30%, rgba(84, 190, 142, .05), transparent 80%);
  filter: blur(16px);
  animation: auroraHazeBreath 13.2s ease-in-out infinite alternate;
}

/* 帘层不依赖剪裁边缘；上下衰减由 SVG 内部渐变完成 */
.aurora-curtain {
  transform-origin: 50% 0%;
  pointer-events: none;
}

.aurora-curtain svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* 主绿帘 */
.aurora-curtain-green {
  animation: auroraGreenBreathe 9.6s ease-in-out infinite alternate;
}

.aurora-green-halo {
  animation: auroraGreenHalo 11.2s ease-in-out -3.1s infinite alternate;
}

.aurora-green-body {
  animation: auroraGreenBody 8.4s ease-in-out -1.8s infinite alternate;
}

.aurora-green-core {
  animation: auroraGreenCore 10.4s ease-in-out -4.6s infinite alternate;
}

.aurora-green-folds {
  animation: auroraGreenFolds 10.6s ease-in-out -4.2s infinite alternate;
}

.aurora-green-rays {
  opacity: .92;
  animation: auroraGreenRayBreath 7.6s ease-in-out -2.2s infinite alternate;
}

.aurora-green-rays-lower {
  opacity: .66;
  animation-duration: 9.2s;
  animation-delay: -5.3s;
}

.aurora-green-rays-left {
  opacity: .5;
  animation-duration: 8.6s;
  animation-delay: -3.4s;
}

/* 次级紫帘 */
.aurora-curtain-violet {
  opacity: .7;
  animation: auroraVioletBreathe 12.4s ease-in-out -3.1s infinite alternate;
}

.aurora-violet-halo {
  animation: auroraVioletHalo 10.8s ease-in-out -2.7s infinite alternate;
}

.aurora-violet-band {
  animation: auroraVioletBand 8.2s ease-in-out -2s infinite alternate;
}

.aurora-violet-rays {
  opacity: .55;
  animation: auroraVioletRays 7.2s ease-in-out -1.9s infinite alternate;
}

/* 局部丝缕 */
.aurora-wisp {
  fill: none;
  stroke-linecap: round;
  animation: auroraWisp 6.2s ease-in-out infinite alternate;
}

.aurora-wisp:nth-of-type(2) {
  animation-duration: 7.8s;
  animation-delay: -1.4s;
}

.aurora-wisp:nth-of-type(3) {
  animation-duration: 5.4s;
  animation-delay: -2.8s;
}

.aurora-wisp:nth-of-type(4) {
  animation-duration: 8.8s;
  animation-delay: -3.6s;
}

.aurora-wisp:nth-of-type(5) {
  animation-duration: 6.8s;
  animation-delay: -4.8s;
}

.aurora-wisp:nth-of-type(6) {
  animation-duration: 9.6s;
  animation-delay: -5.6s;
}

/* 地平线辉光 */
.aurora-horizon-glow {
  background:
    radial-gradient(30% 8% at 79% 70.5%, rgba(118, 226, 174, .3), transparent 78%),
    radial-gradient(44% 10% at 70% 71.5%, rgba(94, 188, 152, .16), transparent 80%),
    radial-gradient(26% 6.5% at 88% 72%, rgba(108, 214, 162, .14), transparent 80%),
    radial-gradient(70% 12% at 58% 74%, rgba(80, 150, 150, .07), transparent 82%);
  animation: auroraHorizonBreath 6s ease-in-out infinite alternate;
}

/* 雪原：保持底子不变 */
.aurora-ground svg {
  display: block;
  width: 100%;
  height: 100%;
}

.aurora-snow-reflection {
  opacity: .95;
  animation: auroraSnowReflect 7.4s ease-in-out infinite alternate;
}

.aurora-snow-cols {
  opacity: .95;
  animation: auroraSnowCols 7.8s ease-in-out -1.8s infinite alternate;
}

.aurora-snow-ridge {
  stroke: rgba(168, 222, 192, .24);
  stroke-width: 2;
}

.aurora-snow-streaks {
  opacity: .8;
  animation: auroraSnowStreak 9.2s ease-in-out -2.4s infinite alternate;
}

.aurora-grain {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http://www.w3.org/2000/svg'%20width%3D'220'%20height%3D'220'%3E%3Cfilter%20id%3D'n'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'0.84'%20numOctaves%3D'2'%20stitchTiles%3D'stitch'/%3E%3C/filter%3E%3Crect%20width%3D'100%25'%20height%3D'100%25'%20filter%3D%28%23n%29/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: .06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.aurora-vignette {
  background-image:
    radial-gradient(130% 100% at 50% 44%, transparent 44%, rgba(0, 0, 0, .26) 77%, rgba(0, 0, 0, .5) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .17), transparent 23%);
  pointer-events: none;
}

/* 动画仅改变 opacity / transform；各周期错相，避免同步呼吸 */
@keyframes auroraGreenBreathe {
  from { transform: translate3d(-5px, 0, 0); opacity: .9; }
  to { transform: translate3d(6px, 2px, 0); opacity: 1; }
}

@keyframes auroraGreenHalo {
  from { opacity: .58; transform: translate3d(-4px, 0, 0); }
  to { opacity: .92; transform: translate3d(6px, 2px, 0); }
}

@keyframes auroraGreenBody {
  from { opacity: .82; transform: skewX(-.3deg) translate3d(-3px, 0, 0); }
  to { opacity: 1; transform: skewX(.35deg) translate3d(4px, 2px, 0); }
}

@keyframes auroraGreenCore {
  from { opacity: .54; transform: translate3d(3px, 1px, 0); }
  to { opacity: .9; transform: translate3d(-4px, -1px, 0); }
}

@keyframes auroraGreenFolds {
  from { opacity: .34; transform: translate3d(-3px, 0, 0); }
  to { opacity: .66; transform: translate3d(4px, 1px, 0); }
}

@keyframes auroraGreenRayBreath {
  from { opacity: .68; transform: translate3d(-2px, 0, 0); }
  to { opacity: 1; transform: translate3d(3px, 1px, 0); }
}

@keyframes auroraHazeBreath {
  from { opacity: .6; transform: scale(1); }
  to { opacity: .92; transform: scale(1.028); }
}

@keyframes auroraVioletBreathe {
  from { transform: translate3d(5px, 0, 0); opacity: .52; }
  to { transform: translate3d(-6px, 2px, 0); opacity: .76; }
}

@keyframes auroraVioletHalo {
  from { opacity: .5; transform: translate3d(4px, 0, 0); }
  to { opacity: .74; transform: translate3d(-5px, 2px, 0); }
}

@keyframes auroraVioletBand {
  from { transform: skewX(.3deg) translate3d(4px, 0, 0); opacity: .56; }
  to { transform: skewX(-.35deg) translate3d(-5px, 3px, 0); opacity: .76; }
}

@keyframes auroraVioletRays {
  from { opacity: .34; transform: translate3d(-2px, 0, 0); }
  to { opacity: .6; transform: translate3d(3px, 1px, 0); }
}

@keyframes auroraWisp {
  from { transform: translate3d(-3px, 0, 0); opacity: .34; }
  to { transform: translate3d(4px, 2px, 0); opacity: .8; }
}

@keyframes auroraHorizonBreath {
  from { transform: scale(1); opacity: .66; }
  to { transform: scale(1.024); opacity: 1; }
}

@keyframes auroraSnowCols {
  from { opacity: .55; transform: scaleY(.985); }
  to { opacity: .95; transform: scaleY(1.015); }
}

@keyframes auroraSnowReflect {
  from { opacity: .66; }
  to { opacity: 1; }
}

@keyframes auroraSnowStreak {
  from { opacity: .5; transform: translate3d(-4px, 0, 0); }
  to { opacity: .9; transform: translate3d(4px, 0, 0); }
}

/* 动效克制：用户偏好减弱动效 → 场景动画/视差全静止，交叉淡入也缩短 */
@media (prefers-reduced-motion: reduce) {
  .scene-view { transition: opacity 0.3s ease; transform: none !important; }
  .plx { transform: none !important; transition: none !important; }
  .plx, .plx * { animation: none !important; }
}

/* ════════ T9+ 场景切换器（右上角自定义下拉，非原生 select）════════ */
.scene-switch {
  position: absolute;
  top: 20px;
  right: 0;
  z-index: 50;
}

#app { position: relative; z-index: 1; } /* 切换器绝对定位锚点；T13 层级在地图(0)之上 */

.scene-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(22, 30, 46, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  padding: 8px 12px 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.06s ease;
}

.scene-btn:hover { border-color: rgba(255, 255, 255, 0.2); background: rgba(28, 38, 58, 0.78); }
.scene-btn:active { transform: scale(0.98); }
.scene-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.scene-btn-icon { font-size: 15px; line-height: 1; }
.scene-btn-text { font-weight: 600; letter-spacing: 0.5px; }

.scene-caret {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
  border-top: 5px solid var(--text-dim);
  transition: transform 0.2s ease;
}

.scene-switch.open .scene-caret { transform: rotate(180deg); }

/* 下拉面板：毛玻璃卡 + 弹性缩放展开（origin 右上，跟按钮生长方向一致）；效果集 10 项 → 限高滚动 */
.scene-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 232px;
  max-height: min(62vh, 480px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(15, 21, 35, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  transform-origin: top right;
  text-align: left; /* topbar 是 center，菜单里必须拉回左对齐（图标+名称+描述排版） */
  opacity: 0;
  transform: scale(0.94) translateY(-4px);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease, visibility 0s linear 0.18s;
}

.scene-menu::-webkit-scrollbar { width: 6px; }
.scene-menu::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 3px; }

.scene-switch.open .scene-menu {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
}

.scene-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.scene-opt:hover,
.scene-opt:focus-visible { background: rgba(255, 255, 255, 0.06); outline: none; }

.scene-opt-icon { font-size: 17px; width: 22px; text-align: center; line-height: 1; }

.scene-opt-body { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.scene-opt-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.scene-opt-desc { font-size: 11px; color: var(--text-dim); }

.scene-opt-check {
  opacity: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.scene-opt[aria-selected='true'] { background: var(--accent-soft); }
.scene-opt[aria-selected='true'] .scene-opt-check { opacity: 1; transform: none; }
.scene-opt[aria-selected='true'] .scene-opt-name { color: var(--accent); }

/* —— T9 streak 展示 —— */
.streak-line {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}

.streak-line .streak-num {
  color: var(--accent);
  font-weight: 700;
}

.streak-me {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}
