/* ============================================================
   好牛静听睡前白噪音 · 网站端样式（手机优先）
   设计取向：低亮度暖暗色、大触点、单手操作、竖屏为主，横屏/平板自动改双列
   与桌面端（frontend/css/radio.css）不共用样式表，只共用同一套视觉语汇：
   墨绿黑底 + 米白字 + 柔光
   ============================================================ */

:root {
  --bg: #0a0f0d;
  --ink: #eaf1ea;
  --ink-2: rgba(234, 241, 234, .62);
  --ink-3: rgba(234, 241, 234, .38);
  --line: rgba(150, 186, 160, .22);
  --glass: rgba(12, 18, 15, .58);
  --glass-2: rgba(16, 24, 20, .82);
  --acc: #8fd0a8;          /* 主强调：苔绿 */
  --acc-2: #d8b98a;        /* 次强调：暖沙 */
  --warn: #e08b8b;
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tap: 46px;             /* 最小触点高度 */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; height: 100%;
  background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
               "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  overscroll-behavior: none;
}
body {
  display: flex; flex-direction: column;
  position: fixed; inset: 0; overflow: hidden;
  touch-action: manipulation;
}

/* ---------- 背景层 ---------- */
.bg { position: fixed; inset: 0; z-index: 0; background: var(--bg); }
.bg-layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: none;
  filter: saturate(.85) brightness(.72);
  transform: scale(1.04);            /* 预留一点放大，避免轮播时的边缘露白 */
}
.bg-scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 78% at 50% 8%, rgba(0, 0, 0, 0) 40%, rgba(6, 10, 8, .72) 100%),
    linear-gradient(180deg, rgba(6, 10, 8, .55) 0%, rgba(6, 10, 8, .18) 34%, rgba(6, 10, 8, .78) 100%);
  transition: opacity .4s ease;
}
.bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .85; }

/* 「屏幕常亮」按钮同时是去雾开关：js/fx.js 给 <html> 加 .no-haze。
   背景图那层灰雾由三样叠成——.bg-layer 的压暗降饱和、.bg-scrim 的暗角罩、Canvas 的雾团；
   这里撤掉前两样（雾团由 JS 停止绘制，雨丝与暖光不受影响）。
   scrim 保留 28% 而不是直接归零：浅底图上底栏与顶栏文字会糊，留一点渐变兜边。
   注意别给 .bg-layer 加 transition——它的 opacity 是轮播逐帧驱动的，加了会和淡化打架。 */
html.no-haze .bg-layer { filter: saturate(1) brightness(.94); }
html.no-haze .bg-scrim { opacity: .28; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 16px 6px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-name { font-size: 15px; letter-spacing: 3px; color: var(--ink-2); }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-3); transition: background .4s, box-shadow .4s;
}
.dot.live {
  background: var(--acc);
  box-shadow: 0 0 0 4px rgba(143, 208, 168, .16), 0 0 12px rgba(143, 208, 168, .5);
  animation: breathe 4.2s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }

.icon-btn {
  min-width: var(--tap); min-height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--glass); border: 1px solid var(--line); border-radius: 50%;
  color: var(--ink-2); cursor: pointer; padding: 0;
}
/* 顶栏右侧：定时胶囊 + 常亮 */
.top-right { display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 11px 0 9px; border-radius: 16px;
  background: rgba(216, 185, 138, .14); border: 1px solid rgba(216, 185, 138, .4);
  color: var(--acc-2); font-size: 12.5px; letter-spacing: .5px;
  font-variant-numeric: tabular-nums; cursor: pointer;
}
.pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.pill.done { background: rgba(150, 186, 160, .12); border-color: var(--line); color: var(--ink-3); }

.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.icon-btn[aria-pressed="true"] { color: var(--acc-2); border-color: rgba(216, 185, 138, .5); }
#sheet-close { border-radius: 12px; font-size: 16px; }

/* 顶栏播放/暂停（原来在底栏中央，现在底栏中央是音轨抽屉） */
.play-btn { gap: 6px; min-width: 54px; padding: 0 12px; border-radius: 23px; }
.play-btn svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.play-state { font-size: 12px; letter-spacing: 1px; }
.play-btn.playing { color: var(--acc); border-color: rgba(143, 208, 168, .5); }

/* ---------- 主舞台 ---------- */
.stage {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: clamp(14px, 3vh, 26px);
  padding: 4px 98px 0 20px;          /* 右侧 98px 让给头像位 */
  min-height: 0;
}

/* 右侧头像位：缩小的颂钵（参考短视频平台头像列的位置与体量） */
.side-avatar {
  position: absolute; z-index: 2; right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 84px; display: flex; flex-direction: column; align-items: center; gap: 0;
}
.avatar-stage { position: relative; width: 84px; height: 84px; display: grid; place-items: center; }
.ring {
  position: absolute; left: 50%; top: 50%; width: 112px; height: 112px;
  transform: translate(-50%, -50%); pointer-events: none;
}
.bowl {
  position: relative; border: 0; background: none; padding: 0; cursor: pointer;
  width: 78px; height: auto;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .55));
  transition: transform .12s ease;
}
.bowl:active { transform: scale(.955); }
.bowl svg { width: 100%; height: auto; display: block; }
.bowl-body { fill: rgba(28, 42, 34, .78); stroke: rgba(196, 220, 200, .5); stroke-width: 1.4; }
.bowl-rim { fill: rgba(16, 26, 21, .6); stroke: rgba(206, 228, 210, .55); stroke-width: 1.4; }
.bowl-mallet { stroke: var(--acc-2); stroke-width: 3; stroke-linecap: round; fill: none; opacity: .8; }
.bowl-mallet-head { fill: var(--acc-2); opacity: .9; }
.bowl.hit .bowl-rim { stroke: rgba(240, 250, 244, .95); }
/* 小心心：点击随机播放敲击类音样（全池，含颂钵/铜锣/颂钵低频/双耳节拍）
   钵与心之间那行文字说明已按需求去掉；亮屏（去雾）时浅图会把 .78 透明度的粉色洗掉
   （实测最差同样 1.01:1），所以和下面的切换背景按钮一样给自己的暗底 chip，色值改成实色。 */
.heart-btn {
  width: 52px; height: 52px; margin-top: 6px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(6, 10, 8, .62); border: 1px solid rgba(255, 201, 216, .3);
  border-radius: 16px; cursor: pointer; color: #ffc9d8;
}
.heart-btn svg {
  width: 34px; height: 34px; fill: currentColor; stroke: none;
  transition: transform .16s ease, color .35s ease;
}
.heart-btn:active { transform: scale(.94); }
.heart-btn.hit svg { transform: scale(1.22); color: #ffe3ea; }
/* 切换背景：随机固定 img/suiji 里的一张（轮播让位），与小心心同一列头像位。
   实测过 12 张背景图右侧头像位的亮度（ffmpeg signalstats 取样），去雾后最亮的一张到 232/255，
   原先 .72 透明度的细描边压在浅图上只剩 1.01:1，等于看不见。
   给它一块自己的暗底（alpha .62）＋实色描边：24 个底色组合里最差 5.19:1，不再依赖背景图或雾态。 */
.bg-btn {
  width: 46px; height: 46px; margin-top: 6px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(6, 10, 8, .62); border: 1px solid rgba(216, 185, 138, .32);
  border-radius: 14px; cursor: pointer; color: #f5e4bd;
}
.bg-btn svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.1;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .16s ease, color .35s ease;
}
.bg-btn:active { transform: scale(.94); }
.bg-btn.hit svg { transform: scale(1.14); color: #fff6e0; }

/* ---------- 底部操作坞 ---------- */
.dock {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 10px;
  padding: 10px 16px calc(14px + var(--safe-b));
}
.dock-btn {
  min-height: 54px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--glass-2); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--r-l);
  font-size: 13px; letter-spacing: 1px; cursor: pointer;
}
.dock-btn svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.dock-btn#btn-drawer svg, .dock-btn#btn-bgm svg, .dock-btn#btn-settings svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.dock-btn.primary {
  background: linear-gradient(180deg, rgba(143, 208, 168, .26), rgba(143, 208, 168, .12));
  border-color: rgba(143, 208, 168, .46); color: #f2fbf4;
}
.dock-btn.on { color: var(--acc); border-color: rgba(143, 208, 168, .45); }
.dock-btn.open { box-shadow: inset 0 0 0 1px rgba(143, 208, 168, .35); }

/* ---------- 音轨抽屉（底栏中央按钮展开，播放中的排前面） ---------- */
.drawer-mask {
  position: fixed; inset: 0; z-index: 10;
  background: rgba(4, 7, 6, .58);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .25s;
}
.drawer-mask.show { opacity: 1; }
.drawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 11;
  max-height: 64vh; display: flex; flex-direction: column;
  background: rgba(11, 17, 14, .97);
  border-top: 1px solid var(--line);
  border-radius: var(--r-l) var(--r-l) 0 0;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.22, .8, .26, 1);
  padding-bottom: calc(6px + var(--safe-b));
}
.drawer.show { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 6px; }
.drawer-head h2 { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: 3px; }
.drawer-count { font-size: 11.5px; color: var(--ink-3); letter-spacing: .5px; }
#drawer-close { margin-left: auto; width: 34px; height: 34px; min-width: 34px; min-height: 34px; border-radius: 10px; font-size: 14px; }
.drawer-tools {
  display: flex; gap: 8px; padding: 4px 18px 10px;
  border-bottom: 1px solid rgba(150, 186, 160, .14);
}
.tool-btn {
  flex: 1; min-height: 42px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--glass-2); border: 1px solid var(--line); border-radius: var(--r-s);
  color: var(--ink-2); font-size: 13px; letter-spacing: 1px; cursor: pointer;
  transition: transform .12s ease, color .25s ease;
}
.tool-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.tool-btn:active { transform: scale(.98); }
.tool-btn.primary {
  color: #f2fbf4; border-color: rgba(143, 208, 168, .42);
  background: linear-gradient(180deg, rgba(143, 208, 168, .2), rgba(143, 208, 168, .07));
}

/* BGM 抽屉里的音量滑块：与设置页 f-bgmVol 同一份值，拖动即时作用到 BGM 母线 */
.drawer-vol {
  display: flex; align-items: center; gap: 10px; padding: 9px 18px 11px;
  border-bottom: 1px solid rgba(150, 186, 160, .14);
  color: var(--ink-3); font-size: 12px; letter-spacing: 1px;
}
.drawer-vol .dv-lbl { flex: none; }
.dv-slider { display: flex; align-items: center; gap: 10px; flex: 1; }
.dv-slider b { font-size: 12px; font-weight: 400; color: var(--ink-3); width: 30px; text-align: right; }

/* 推荐组合小按钮：配方来自 data/presets.json */
.drawer-presets {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 11px 18px 3px;
}
.preset-lbl { font-size: 11px; letter-spacing: 2px; color: var(--ink-3); margin-right: 2px; }
.preset-chip {
  min-height: 34px; padding: 0 13px; border-radius: 17px;
  background: var(--glass-2); border: 1px solid var(--line);
  color: var(--ink-2); font-size: 13px; letter-spacing: 1px; cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.preset-chip:active { transform: scale(.97); }
.preset-chip.active { color: #f4fbf6; border-color: var(--acc); background: rgba(143, 208, 168, .18); }

/* 循环 BGM 抽屉的行：整行可点，清单来自 manifest.bgm（即 audio/bgm 目录实测产物） */
.bgm-list { display: flex; flex-direction: column; }
.bgm-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  width: 100%; min-height: 54px; padding: 10px 2px; text-align: left;
  background: none; border: 0; border-bottom: 1px solid rgba(150, 186, 160, .1);
  color: var(--ink-2); font-family: inherit; cursor: pointer;
}
.bgm-row .b-name {
  font-size: 14px; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bgm-row .b-meta { font-size: 11px; color: var(--ink-3); margin-top: 3px; letter-spacing: .5px; }
.bgm-row .b-state { font-size: 11.5px; letter-spacing: 1px; color: var(--ink-3); }
.bgm-row.playing { color: #f4fbf6; }
.bgm-row.playing .b-state { color: var(--acc); }
.bgm-row.playing .b-name::before { content: "◉ "; color: var(--acc); }
.bgm-row:active { opacity: .78; }
/* BGM 音源条数少，面板上限比音轨抽屉矮一截，不至于占满半屏 */
.bgm-drawer { max-height: 56vh; }
.drawer-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 18px 10px; }
.drawer-list { display: flex; flex-direction: column; }
/* 音量数字与右侧开关之间原先只隔着 12px 的 grid gap，数字贴着滑道列右边缘，
   开关（.switch 50px，scale(.9) 后布局盒与视觉盒不同宽）会压住它：
   开关列改成固定 50px 不再由内容撑，滑道列加 10px 收边把数字整列左移，
   并把列宽从 128 提到 138 补回收边的 10px（滑道长度不变）。 */
.drawer-row {
  display: grid; grid-template-columns: 1fr 138px 50px; align-items: center; gap: 12px;
  min-height: var(--tap); padding: 9px 0; border-bottom: 1px solid rgba(150, 186, 160, .1);
}
.drawer-row .d-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.drawer-row .d-name {
  font-size: 14px; letter-spacing: 1px; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.drawer-row .d-slider { display: flex; align-items: center; gap: 8px; padding-right: 10px; min-width: 0; }
/* range 控件有自身的最小内容宽度，不给 min-width:0 它能把数字顶出 138px 的格子、压到开关底下 */
.drawer-row .d-slider input[type="range"] { min-width: 0; }
.drawer-row .d-slider b { font-size: 11px; font-weight: 400; color: var(--ink-3); width: 24px; flex: none; text-align: right; }
.drawer-row.live .d-name { color: var(--acc); }
.drawer-row .d-role {
  font-size: 10.5px; letter-spacing: 1px; padding: 1px 7px; border-radius: 9px;
  background: rgba(150, 186, 160, .14); color: var(--ink-3);
}
.drawer-row.live.is-main .d-role { background: rgba(216, 185, 138, .18); color: var(--acc-2); }
.drawer-row .switch { transform: scale(.9); transform-origin: right center; }

/* ---------- 设置面板（底部抽屉） ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 8;
  background: rgba(4, 7, 6, .58);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .25s;
}
.sheet-mask.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
  max-height: 82vh; display: flex; flex-direction: column;
  background: rgba(11, 17, 14, .96);
  border-top: 1px solid var(--line);
  border-radius: var(--r-l) var(--r-l) 0 0;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.22, .8, .26, 1);
  padding-bottom: var(--safe-b);
}
.sheet.show { transform: none; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 8px;
}
.sheet-head h2 { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: 3px; }
.tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.tab {
  flex: 1; min-height: var(--tap); padding: 8px 4px;
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--ink-3); font-size: 14px; letter-spacing: 2px; cursor: pointer;
}
.tab.active { color: var(--ink); border-bottom-color: var(--acc); }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 18px 22px; }
.tab-pane { display: none; flex-direction: column; gap: 4px; }
.tab-pane.active { display: flex; }

.field {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 8px 0; border-bottom: 1px solid rgba(150, 186, 160, .1);
}
.field.col { flex-direction: column; align-items: stretch; gap: 8px; }
.lbl { font-size: 14px; color: var(--ink-2); letter-spacing: 1px; }
.tip { margin: 6px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--ink-3); }
.tip.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }

.slider { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 240px; }
.slider b { font-size: 12px; font-weight: 400; color: var(--ink-3); width: 30px; text-align: right; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; flex: 1; height: 26px; background: none;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px; border-radius: 2px; background: rgba(150, 186, 160, .3);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8.5px;
  border-radius: 50%; background: var(--acc); border: 0;
  box-shadow: 0 0 0 4px rgba(143, 208, 168, .14);
}
input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: rgba(150, 186, 160, .3); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--acc); }

.switch { position: relative; width: 50px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i {
  position: absolute; inset: 0; border-radius: 14px;
  background: rgba(150, 186, 160, .18); transition: background .25s; pointer-events: none;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--ink-2); transition: transform .25s, background .25s;
}
.switch input:checked + i { background: rgba(143, 208, 168, .38); }
.switch input:checked + i::after { transform: translateX(22px); background: var(--acc); }

.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button {
  width: var(--tap); height: var(--tap); border-radius: var(--r-s);
  background: var(--glass-2); border: 1px solid var(--line); color: var(--ink); font-size: 18px;
}
.stepper span { font-size: 14px; min-width: 62px; text-align: center; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  min-height: 38px; padding: 0 14px; border-radius: 19px;
  background: var(--glass-2); border: 1px solid var(--line);
  color: var(--ink-2); font-size: 13px; cursor: pointer;
}
.chips button.active { color: #f4fbf6; border-color: var(--acc); background: rgba(143, 208, 168, .16); }

select {
  width: 100%; min-height: var(--tap); padding: 0 12px;
  background: #101a15; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-s); font-size: 14px;
}

.track-list { display: flex; flex-direction: column; gap: 2px; }
.track-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px;
  padding: 10px 0; border-bottom: 1px solid rgba(150, 186, 160, .1);
}
.track-row .t-name { font-size: 14px; color: var(--ink-2); }
.track-row.live .t-name { color: var(--acc); }
.track-row .t-sub { font-size: 11px; color: var(--ink-3); grid-column: 1 / -1; }
.track-row .t-slider { grid-column: 1 / 2; display: flex; align-items: center; gap: 8px; }
.track-row .t-slider b { font-size: 11px; font-weight: 400; color: var(--ink-3); width: 26px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; }
.ghost {
  min-height: var(--tap); padding: 0 16px; border-radius: var(--r-s);
  background: var(--glass-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px;
}
.ghost.danger { color: var(--warn); border-color: rgba(224, 139, 139, .35); }

/* ---------- 解锁层 / 轻提示 ---------- */
.unlock {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center;
  background: radial-gradient(90% 60% at 50% 45%, rgba(18, 28, 22, .92), rgba(6, 10, 8, .98));
  transition: opacity .6s ease;
}
.unlock.gone { opacity: 0; pointer-events: none; }
.unlock-inner { text-align: center; padding: 0 28px; }
/* 首屏图标：logot.png（本身是圆形徽标，圆角只是防素材换成方图时顶出来） */
.unlock-mark {
  width: clamp(64px, 17vw, 86px); height: auto; display: block; margin: 0 auto;
  border-radius: 50%; opacity: .9;
  animation: breathe 3.4s ease-in-out infinite;
}
.unlock h1 {
  margin: 14px 0 10px; font-size: clamp(17px, 5vw, 21px); font-weight: 500;
  letter-spacing: clamp(2px, 2.4vw, 6px);
}
.unlock p { margin: 0; font-size: 13px; color: var(--ink-3); letter-spacing: 2px; }
.unlock-desc {
  max-width: 25em; margin: 0 auto 16px; font-size: 11.5px; line-height: 2.05;
  letter-spacing: .6px; text-align: justify;
}
.unlock-note { font-size: 12.5px; letter-spacing: 2px; }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%);
  z-index: 30; max-width: 84vw;
  padding: 10px 16px; border-radius: 18px;
  background: rgba(10, 16, 13, .92); border: 1px solid var(--line);
  color: var(--ink-2); font-size: 13px; line-height: 1.6;
}
.toast.err { color: var(--warn); border-color: rgba(224, 139, 139, .4); }

/* ---------- 横屏 / 平板 / 桌面 ---------- */
@media (orientation: landscape), (min-width: 780px) {
  body { flex-direction: row; flex-wrap: wrap; }
  .topbar { position: absolute; top: 0; left: 0; right: 0; }
  .stage { flex: 1 1 55%; order: 2; padding: 4px 132px 4px 4vw; }
  .side-avatar { right: max(20px, 4vw); width: 96px; }
  .avatar-stage { width: 96px; height: 96px; }
  .bowl { width: 90px; }
  .ring { width: 128px; height: 128px; }
  .dock {
    flex: 1 1 100%; order: 3; grid-template-columns: repeat(3, 1fr);
    max-width: 420px; right: 0; bottom: 0; position: fixed;
    padding: 10px 22px calc(16px + var(--safe-b));
  }
  .sheet {
    position: fixed; top: 0; bottom: 0; left: auto; right: 0; width: min(440px, 92vw);
    max-height: none; border-radius: var(--r-l) 0 0 var(--r-l);
    border-left: 1px solid var(--line); border-top: 0;
    transform: translateX(100%);
  }
  .sheet.show { transform: none; }
  .drawer {
    top: 0; bottom: 0; left: auto; right: 0; width: min(400px, 90vw); max-height: none;
    border-radius: var(--r-l) 0 0 var(--r-l); border-left: 1px solid var(--line); border-top: 0;
    transform: translateX(100%); padding-bottom: 18px;
  }
  .drawer.show { transform: none; }
}
@media (min-width: 780px) {
  .dock { max-width: none; left: 0; padding-left: max(24px, 6vw); padding-right: max(24px, 6vw); }
  .dock-btn { max-width: 320px; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .dot.live, .unlock-mark { animation: none; }
}
