:root {
  --brand-a: #F5A89A;
  --brand-b: #C23A5A;
  --panel-bg: rgba(20, 12, 14, 0.92);
  --text: #fff7f5;
  --muted: #d4b0b0;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
  background: #07060a; color: var(--text); overflow: hidden;
}
#boot {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; background: #07060a; overflow: hidden;
  transition: opacity 0.7s ease;
}
#boot .mark {
  position: relative; width: min(42vw, 220px); max-width: 70%;
  display: flex; align-items: center; justify-content: center;
}
#boot .glow {
  position: absolute; width: 180%; height: 180%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.45) 0%, rgba(255,255,255,.12) 42%, rgba(255,255,255,0) 70%);
  opacity: 0; transform: scale(.86);
  animation: glowBreath 5.6s ease-in-out 1.6s infinite;
  pointer-events: none;
}
#boot img {
  position: relative; width: 100%; opacity: 0;
  filter: brightness(.15) blur(8px);
  animation: peachIn 1.8s ease forwards, peachBreath 5.6s ease-in-out 1.6s infinite;
}
#boot .boot-line {
  margin: 0 auto; width: min(24em, calc(100% - 48px));
  text-align: center; color: #fff7f5; font-size: 13px;
  letter-spacing: .04em; line-height: 1.7; opacity: 0;
  animation: lineIn 2.8s ease 1.6s forwards;
}
#boot .boot-line span { display: block; }
#boot .boot-line span + span {
  margin-top: 6px; color: rgba(255,247,245,.72); letter-spacing: .16em;
}
#boot.flash .glow { animation: glowFlash .62s ease forwards; }
#boot.flash img { animation: peachFlash .62s ease forwards; }
#boot.flash .boot-line { opacity: 0; animation: none; }
#boot.done { opacity: 0; pointer-events: none; }
@keyframes peachIn {
  0% { opacity: 0; filter: brightness(.05) blur(10px); transform: scale(.96); }
  100% { opacity: 1; filter: brightness(1) blur(0) drop-shadow(0 0 8px rgba(255,255,255,.28)); transform: scale(1); }
}
@keyframes peachBreath {
  0%, 100% { filter: brightness(.9) drop-shadow(0 0 6px rgba(255,255,255,.18)); }
  50% { filter: brightness(1.22) drop-shadow(0 0 18px rgba(255,255,255,.55)); }
}
@keyframes glowBreath {
  0%, 100% { opacity: .16; transform: scale(.9); }
  50% { opacity: .5; transform: scale(1.04); }
}
@keyframes lineIn {
  0% { opacity: 0; }
  100% { opacity: .86; }
}
@keyframes peachFlash {
  0% { filter: brightness(1.2) drop-shadow(0 0 14px #fff); transform: scale(1); }
  42% { filter: brightness(7) drop-shadow(0 0 54px #fff); transform: scale(1.06); }
  100% { filter: brightness(3) drop-shadow(0 0 80px #fff); opacity: 0; transform: scale(1.02); }
}
@keyframes glowFlash {
  0% { opacity: .55; transform: scale(1); }
  40% { opacity: 1; transform: scale(1.45); }
  100% { opacity: 0; transform: scale(1.9); }
}
#app { position: relative; width: 100%; height: 100%; }
#scene-stage {
  position: absolute; inset: 0; overflow: hidden;
  background: #12080a;
}
#scene-canvas { position: relative; width: 100%; height: 100%; }
/* 双图层：傍晚 / 夜晚，沿用参考站 2.4s 交叉淡入 */
.scene-layers { position: relative; width: 100%; height: 100%; }
.scene-period {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transition: opacity 2.4s cubic-bezier(.45, 0, .15, 1);
  user-select: none; -webkit-user-drag: none;
  pointer-events: none;
}
.scene-period { opacity: 0; z-index: 0; }
.scene-period.is-on { opacity: 1; }
#scene-canvas.mood-day .lamp-glow { opacity: 0; transform: scale(.9); }
#scene-canvas.mood-dawn .lamp-glow { opacity: .35; transform: scale(.95); }
#scene-canvas.mood-evening .lamp-glow { opacity: .55; transform: scale(.92); }

/* 台灯光晕（参考站 lamp-glow） */
.lamp-glow {
  position: absolute;
  left: 18%; top: 48%; width: 18%; aspect-ratio: 1;
  border-radius: 50%; pointer-events: none; z-index: 3;
  background: radial-gradient(circle, rgba(255,190,95,.28), rgba(255,150,55,.1) 38%, transparent 70%);
  filter: blur(18px);
  opacity: .55; transform: scale(.92);
  transition: opacity 2.2s cubic-bezier(.45,0,.15,1), transform 2.2s cubic-bezier(.45,0,.15,1);
}
#scene-canvas.night-mode .lamp-glow {
  opacity: .85; transform: scale(1.15);
  animation: glowPulse 3.5s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: .85; transform: scale(1.15); }
  50% { opacity: .65; transform: scale(1.06); }
}
@media (max-width: 700px) {
  .lamp-glow { left: 11%; top: 47%; width: 28%; }
}
#hotspots { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.hotspot {
  position: absolute; pointer-events: auto; cursor: pointer;
  border-radius: 10px; border: 0 solid transparent;
  background: transparent; appearance: none; -webkit-appearance: none; padding: 0; margin: 0;
  -webkit-tap-highlight-color: transparent;
}
.hotspot:active { background: rgba(245, 168, 154, 0.12); }
body.debug .hotspot {
  border: 1.5px solid rgba(245, 168, 154, 0.85);
  background: rgba(194, 58, 90, 0.18);
}
body.debug .hotspot::after {
  content: attr(data-id);
  position: absolute; left: 4px; top: 4px;
  font-size: 10px; padding: 2px 5px; border-radius: 4px;
  background: rgba(0,0,0,.65); color: #fff; white-space: nowrap;
}
#hud {
  position: absolute; left: 12px; right: 12px;
  top: calc(10px + var(--safe-t));
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; z-index: 20; pointer-events: none;
}
.hud-right { display: flex; align-items: center; gap: 8px; pointer-events: none; }
#bgm-toggle {
  pointer-events: auto;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
#bgm-toggle.is-on {
  background: rgba(255, 255, 255, 0.42);
  border-color: rgba(255, 255, 255, 0.75);
  color: #fff;
}
#hud .pill {
  pointer-events: auto;
  background: rgba(20,12,14,.55); backdrop-filter: blur(8px);
  border: 1px solid rgba(245,168,154,.35);
  border-radius: 999px; padding: 6px 12px; font-size: 13px;
}
#clock-readout { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
#brand-logo-link {
  display: block;
  pointer-events: auto;
  line-height: 0;
  border-radius: 8px;
  transition: transform .2s ease, opacity .2s ease;
}
#brand-logo-link:active { transform: scale(.96); opacity: .85; }
#brand-logo {
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.45));
  user-select: none;
  -webkit-user-drag: none;
}
@media (min-width: 700px) {
  #brand-logo { height: 44px; max-width: 140px; }
}
#lang-toggle {
  pointer-events: auto;
  color: #fff;
  font-size: 12px;
  letter-spacing: .06em;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
body.carousel-open #lang-toggle,
body.camera-open #lang-toggle { opacity: 0; pointer-events: none; }
#memory-count {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 16%;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(32, 26, 22, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: .02em;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
#memory-count b { font-weight: 600; font-variant-numeric: tabular-nums; }
#memory-count i { font-style: normal; opacity: .7; margin: 0 6px; }
body.carousel-open #memory-count,
body.camera-open #memory-count { opacity: 0; }

#modal-root[hidden] { display: none !important; }
#modal-root {
  position: absolute; inset: 0; z-index: 40;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.55); padding: 0 0 var(--safe-b);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .3s ease;
}
#modal-root.open { opacity: 1; }
#modal-root .sheet {
  width: min(520px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  background: var(--panel-bg);
  border-radius: 20px 20px 0 0;
  border: 1px solid rgba(255,255,255,.08);
  border-bottom: none;
  padding: 16px 16px 28px;
  transform: translateY(18px) scale(.96);
  opacity: 0;
  transition: transform .4s cubic-bezier(.22,.61,.36,1), opacity .35s ease;
}
#modal-root.open .sheet { transform: none; opacity: 1; }
.sheet header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; gap: 8px;
}
.sheet h2 { margin: 0; font-size: 18px; }
.sheet .close {
  appearance: none; border: 0; background: rgba(255,255,255,.08);
  color: var(--text); width: 36px; height: 36px; border-radius: 50%;
  font-size: 18px; cursor: pointer;
}
.muted { color: var(--muted); font-size: 13px; line-height: 1.5; }
.sheet .muted, .voice-meta { color: #e8752c; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card {
  background: rgba(255,255,255,.05); border-radius: 12px; padding: 10px;
  border: 1px solid rgba(255,255,255,.06);
}
.card img { width: 100%; border-radius: 8px; display: block; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list .row {
  display: flex; gap: 10px; align-items: center;
  padding: 10px; border-radius: 12px; background: rgba(255,255,255,.05);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 12px; width: 100%; padding: 12px;
  border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(90deg, var(--brand-a), var(--brand-b));
  color: #fff; font-weight: 600; font-size: 15px;
}
.btn.ghost {
  background: transparent; border: 1px solid rgba(245,168,154,.45); color: var(--text);
}
.tip-qr {
  width: min(260px, 76vw);
  margin: 14px auto;
  display: block;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  pointer-events: auto;
  touch-action: auto;
  -webkit-user-select: auto;
  user-select: auto;
  -webkit-touch-callout: default;
  cursor: pointer;
}
.tip-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.tip-actions .btn { margin-top: 0; }
@media (min-width: 420px) {
  .tip-actions {
    flex-direction: row;
    justify-content: stretch;
  }
  .tip-actions .btn { flex: 1; }
}
.fake-badge {
  font-size: 11px; color: var(--brand-a);
  border: 1px solid rgba(245,168,154,.4); border-radius: 6px; padding: 2px 6px;
}
@media (min-width: 900px) {
  #modal-root { align-items: center; padding: 24px; }
  #modal-root .sheet { border-radius: 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
}

/* ===== 统一媒体轮播壳（monitor / frame-user / frame-official） ===== */
/* 傍晚/夜晚由双图层 opacity 交叉淡入（参考站）；台灯切换，非时钟驱动 */
#scene-stage, #hud { transition: filter .35s ease, transform .35s ease; }
body.carousel-open #hotspots { pointer-events: none; }

#carousel-root[hidden] { display: none; }
.carousel-root {
  --card-w: min(46%, 760px);
  --card-h: min(62%, 520px);
  --gap: 20px;
  --peek: .12;      /* 侧边露出比例（相对卡宽） */
  --peek-scale: .72;
  --radius: 22px;
  position: fixed; inset: 0; z-index: 60;
  display: grid;
  grid-template-rows: auto 1fr auto auto auto;
  padding: max(14px, env(safe-area-inset-top)) 0 max(18px, env(safe-area-inset-bottom));
  color: #fff;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
@keyframes cr-fade { from { opacity: 0; } to { opacity: 1; } }
.cr-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s ease; }
.carousel-root.open .cr-backdrop { opacity: 1; }
.cr-top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; height: 52px;
}
.cr-title { font-size: 15px; font-weight: 600; letter-spacing: .04em; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.cr-badge { margin-left: 6px; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: rgba(245,168,154,.25); border: 1px solid rgba(245,168,154,.5); }

.cr-close, .cr-arrow {
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transition: background .2s, opacity .2s, transform .15s;
}
.cr-close { width: 40px; height: 40px; }
.cr-close:hover, .cr-arrow:hover:not(:disabled) { background: rgba(255,255,255,.28); }
.cr-close:active, .cr-arrow:active:not(:disabled) { transform: scale(.94); }

.cr-viewport { position: relative; z-index: 1; overflow: hidden; touch-action: none; }
.cr-track { --drag: 0px; position: absolute; inset: 0; }
.cr-slide {
  --off: 0;
  position: absolute; left: 50%; top: 50%;
  width: var(--card-w); height: var(--card-h);
  transform:
    translate(calc(-50% + var(--off) * (var(--card-w) * (.5 + var(--peek) - var(--peek-scale) / 2) + var(--gap)) + var(--drag)), -50%)
    scale(var(--peek-scale));
  opacity: 0;
  transition: transform .4s cubic-bezier(.22,.61,.36,1), opacity .35s ease;
  pointer-events: none;
}
.cr-track.is-dragging .cr-slide { transition: none; }
.cr-slide.is-active { transform: translate(calc(-50% + var(--drag)), -50%) scale(1); opacity: 1; filter: none; pointer-events: auto; z-index: 2; }
.carousel-root:not(.open) .cr-slide.is-active {
  transform: translate(calc(-50% + var(--drag)), calc(-50% + 18px)) scale(.96);
  opacity: 0;
  filter: none;
}
.cr-slide.is-peek { opacity: .75; pointer-events: auto; cursor: pointer; z-index: 1; }
.cr-card {
  position: relative; width: 100%; height: 100%;
  border-radius: var(--radius); overflow: hidden;
  background: #000;
  box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08);
}
.cr-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; touch-action: none; }
.cr-hit { position: absolute; left: 0; right: 0; top: 0; bottom: 56px; z-index: 3; touch-action: none; }
.cr-hit.cr-hit-edge { top: 0; bottom: 0; width: 18%; }
.cr-hit.cr-hit-edge.is-left { left: 0; right: auto; }
.cr-hit.cr-hit-edge.is-right { right: 0; left: auto; }
.cr-play-tag {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  font-size: 12px; padding: 5px 12px; border-radius: 999px;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.2);
}

.cr-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; z-index: 3; }
.cr-arrow:active:not(:disabled) { transform: translateY(-50%) scale(.94); }
.cr-prev { left: max(12px, calc(50% - var(--card-w) * (.5 + var(--peek)) - var(--gap) - 72px)); }
.cr-next { right: max(12px, calc(50% - var(--card-w) * (.5 + var(--peek)) - var(--gap) - 72px)); }
/* 关闭键贴卡片右上角（参考图） */
.cr-viewport .cr-close { position: absolute; z-index: 4; width: 34px; height: 34px;
  top: calc(50% - var(--card-h) / 2 - 14px); right: calc(50% - var(--card-w) / 2 - 14px); }
.cr-fs {
  position: absolute; z-index: 4;
  top: calc(50% - var(--card-h) / 2 - 14px);
  right: calc(50% - var(--card-w) / 2 + 28px);
  height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; font-size: 13px; line-height: 1; cursor: pointer;
}
.cr-fs[hidden] { display: none; }
.carousel-root.is-fs {
  display: block;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: #000;
}
.carousel-root.is-fs .cr-backdrop { background: #000; }
.carousel-root.is-fs .cr-top,
.carousel-root.is-fs .cr-caption,
.carousel-root.is-fs .cr-dots,
.carousel-root.is-fs .cr-actions,
.carousel-root.is-fs .cr-arrow,
.carousel-root.is-fs .cr-slide:not(.is-active) { display: none; }
.carousel-root.is-fs .cr-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.carousel-root.is-fs .cr-slide.is-active,
.carousel-root.is-fs .cr-slide.is-active.is-media {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: none;
  filter: none;
  opacity: 1;
  transition: none;
}
.carousel-root.is-fs .cr-card,
.carousel-root.is-fs .cr-slide.is-media .cr-card {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
}
.carousel-root.is-fs .cr-media,
.carousel-root.is-fs video.cr-media,
.carousel-root.is-fs img.cr-media,
.carousel-root.is-fs iframe.cr-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  background: #000;
}
.carousel-root.is-fs .cr-slide.is-media .cr-hit { bottom: 72px; }
.carousel-root.is-fs .cr-slide.is-media .cr-hit.cr-hit-edge { bottom: 0; }
.carousel-root.is-fs .cr-slide.is-media video.cr-media { touch-action: auto; }
.carousel-root.is-fs .cr-close,
.carousel-root.is-fs .cr-fs {
  visibility: visible; pointer-events: auto;
  top: max(12px, env(safe-area-inset-top));
}
.carousel-root.is-fs .cr-close { right: max(12px, env(safe-area-inset-right)); }
.carousel-root.is-fs .cr-fs { right: calc(max(12px, env(safe-area-inset-right)) + 46px); }
.carousel-root:fullscreen,
.carousel-root:-webkit-full-screen { width: 100%; height: 100%; background: #000; }
.cr-arrow:disabled { opacity: .3; cursor: default; }

.cr-caption { position: relative; z-index: 2; text-align: center; font-size: 13px; color: #e8752c; opacity: 1; min-height: 20px; padding: 10px 16px 0; }
.cr-dots { position: relative; z-index: 2; display: flex; justify-content: center; gap: 8px; padding: 12px 0 4px; }
.cr-dot { width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: rgba(255,255,255,.4); cursor: pointer; transition: width .25s, background .25s; }
.cr-dot.is-on { width: 22px; background: #fff; }
.cr-actions { position: relative; z-index: 2; display: flex; justify-content: center; padding-top: 10px; }
.cr-upload { font-size: 12px; color: #fff; padding: 7px 16px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px dashed rgba(255,255,255,.35); }

/* 手机竖屏：卡片更宽，两侧仍露出一窄条预览；箭头压在卡片边缘 */
@media (max-aspect-ratio: 1/1) {
  .carousel-root { --card-w: 80%; --card-h: 62%; --gap: 8px; --radius: 18px; --peek: .06; --peek-scale: .8; }
  .cr-viewport .cr-close { right: calc(50% - var(--card-w) / 2 - 10px); }
  .cr-arrow { width: 40px; height: 40px; }
  .cr-prev { left: 6px; } .cr-next { right: 6px; }
}
html.force-landscape .carousel-root {
  --card-w: min(52%, 760px);
  --card-h: min(70%, 520px);
  --gap: 16px;
  --peek: .1;
  --peek-scale: .78;
}

/* ===== 墙上相框默认内容 ===== */
#frame-layer { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.frame-slot { position: absolute; overflow: hidden; pointer-events: none; min-width: 4px; min-height: 4px; }
.frame-content { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #1a1410; filter: brightness(var(--frame-light, 1)); transition: filter .45s; }
.frame-content.is-incoming { opacity: 0; }
.frame-content.is-incoming.is-shown { opacity: 1; transition: filter .45s, opacity .7s ease; }
.period-evening { --frame-light: .92; --monitor-light: 1; }
.period-night { --frame-light: .62; --monitor-light: .9; }
.monitor-screen {
  position: absolute; object-fit: cover; display: block; pointer-events: none;
  background: #111; filter: none; z-index: 5;
}
.monitor-screen.monitor-poster { background: #000; }
.monitor-screen.monitor-bili {
  overflow: hidden;
  filter: none;
  background: #000 center / cover no-repeat;
}
.period-night .monitor-screen.monitor-bili { opacity: .92; }
.monitor-bili-frame {
  position: absolute;
  left: -6%;
  top: -14%;
  width: 112%;
  height: 128%;
  border: 0;
  pointer-events: none;
}
iframe.cr-media { border: 0; background: #000; }

.cover-pick {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 6, 8, .72);
  padding: 24px;
}
.cover-card { width: min(560px, 100%); color: #fff; text-align: center; }
.cover-card p { margin: 0 0 12px; font-size: 14px; }
.cover-card video {
  width: 100%; max-height: 52vh; background: #000;
  border-radius: 12px; object-fit: contain;
}
.cover-card input[type="range"] { width: 100%; margin: 14px 0; }
.cover-actions { display: flex; justify-content: center; gap: 10px; }
.cover-actions button {
  border: 0; border-radius: 999px; padding: 8px 16px;
  background: rgba(255,255,255,.22); color: #fff; cursor: pointer;
}
.cover-actions [data-ok] { background: rgba(255,255,255,.88); color: #1a120f; }

/* ===== 竖屏：横版场景铺满高度，左右平移 ===== */
body.pan-mode #scene-stage {
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  scrollbar-width: none; touch-action: pan-x;
}
body.pan-mode #scene-stage::-webkit-scrollbar { display: none; }
body.pan-mode #scene-canvas { flex: none; }
#pan-hint[hidden] { display: none; }
#pan-hint { position: fixed; inset: 0; pointer-events: none; z-index: 15; }
.pan-edge {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 24px; line-height: 1; color: #fff; background: rgba(20,12,14,.42);
  border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s; animation: pan-nudge 1.6s ease-in-out infinite;
}
.pan-left { left: 8px; } .pan-right { right: 8px; }
#pan-hint.can-left .pan-left, #pan-hint.can-right .pan-right { opacity: .85; }
@keyframes pan-nudge { 50% { transform: translateY(-50%) translateX(var(--nx, 3px)); } }
.pan-left { --nx: -3px; }
.pan-toast {
  position: absolute; left: 50%; bottom: calc(68px + var(--safe-b)); transform: translateX(-50%);
  font-size: 13px; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  background: rgba(20,12,14,.6); border: 1px solid rgba(245,168,154,.35); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .4s;
}
#pan-hint.show-toast .pan-toast { opacity: 1; }
body.carousel-open #pan-hint { display: none; }

/* 贴在视口底部正中，不在可左右滑动的场景里，所以竖屏怎么滑都居中。 */
#orient-dock {
  position: fixed;
  z-index: 32;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  transform: translateX(-50%);
  display: flex;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}
#orient-dock button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  margin: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  min-height: 32px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
body.carousel-open #orient-dock,
body.camera-open #orient-dock { opacity: 0; pointer-events: none; }

/* 视口右下角客服 FAB（HUD），非桌面热点 */
#support-fab {
  position: fixed;
  z-index: 33;
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(12px + var(--safe-b));
  width: 48px;
  height: 48px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  appearance: none;
  -webkit-appearance: none;
}
#support-fab[hidden] { display: none !important; }
#support-fab:active { transform: scale(0.96); }
body.carousel-open #support-fab,
body.camera-open #support-fab { opacity: 0; pointer-events: none; }

.support-form { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.support-field { display: flex; flex-direction: column; gap: 6px; }
.support-field label {
  font-size: 13px;
  color: #e8752c;
  line-height: 1.4;
}
.support-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.support-cats label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.support-cats input { accent-color: var(--brand-b); }
.support-form textarea,
.support-form input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  resize: vertical;
  min-height: 96px;
}
.support-form input[type="text"] { min-height: 0; }
.support-form textarea::placeholder,
.support-form input::placeholder { color: rgba(255,247,245,.45); }
.support-error {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #e8752c;
}
.support-thanks {
  margin: 8px 0 4px;
  text-align: center;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}
.support-blocked {
  margin: 8px 0 4px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}
html.force-landscape.device-portrait body {
  position: fixed;
  width: 100vh;
  width: 100dvh;
  height: 100vw;
  height: 100dvw;
  top: 0;
  left: 100vw;
  left: 100dvw;
  transform: rotate(90deg);
  transform-origin: top left;
  overflow: hidden;
}
html.suspend-rotate body {
  transform: none !important;
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  left: auto !important;
  top: auto !important;
}

/* ===== 相机：拍照 / 选图后加工 ===== */
#camera-root[hidden], #toast[hidden] { display: none; }
.cam-root {
  position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column;
  background: #0d0809; color: #fff;
  padding: max(10px, env(safe-area-inset-top)) 0 max(14px, env(safe-area-inset-bottom));
}
.cam-top { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; height: 48px; }
.cam-title { font-size: 15px; font-weight: 600; }
.cam-stage { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; padding: 8px 16px; }
.cam-canvas { width: auto; height: auto; max-width: calc(100vw - 48px); max-height: calc(100vh - 290px); max-height: calc(100dvh - 290px); aspect-ratio: 3 / 4; border-radius: 6px; touch-action: none; cursor: grab;
  box-shadow: 0 0 0 8px #f4efe6, 0 12px 40px rgba(0,0,0,.5); }
.cam-tip { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font-size: 12px; opacity: .7; white-space: nowrap; }
.cam-tools { display: grid; gap: 10px; padding: 8px 16px 0; max-width: 520px; width: 100%; margin: 0 auto; }
.cam-slider { display: grid; grid-template-columns: 40px 1fr; align-items: center; font-size: 13px; color: var(--muted); }
.cam-slider input { width: 100%; accent-color: var(--brand-a); }
.cam-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.cam-filters button { flex: none; font-size: 13px; color: #fff; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); }
.cam-filters button.on { background: #fff; color: #1a0e10; }
.cam-btn { font-size: 14px; border-radius: 999px; padding: 8px 16px; border: 0; cursor: pointer; color: #fff; }
.cam-btn.ghost { background: transparent; padding: 8px 4px; }
.cam-btn.primary { padding: 12px; background: linear-gradient(90deg, var(--brand-a), var(--brand-b)); font-weight: 600; }
@media (orientation: landscape) and (max-height: 500px) {
  .cam-root { flex-direction: row; flex-wrap: wrap; }
  .cam-top { width: 100%; }
  .cam-stage { flex: 1; height: calc(100% - 48px); }
  .cam-tools { width: 300px; align-content: center; height: calc(100% - 48px); }
  .cam-canvas { max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); max-width: calc(100vw - 360px); }
}
#toast {
  position: fixed; left: 50%; bottom: calc(68px + var(--safe-b)); transform: translateX(-50%); z-index: 90;
  font-size: 13px; padding: 9px 16px; border-radius: 999px; white-space: nowrap;
  background: rgba(20,12,14,.78); border: 1px solid rgba(245,168,154,.4); backdrop-filter: blur(8px);
}
.frame-slot.just-hung .frame-content { animation: hang-in .7s ease; }
@keyframes hang-in { 0% { opacity: 0; transform: scale(.92); } 100% { opacity: 1; transform: none; } }

/* ---------- 电子表：屏幕实时时间（傍晚 / 夜晚都显示） ---------- */
.desk-clock-face {
  position: absolute; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: calc(var(--dcf-h) * 0.1);
  background: radial-gradient(ellipse at 50% 40%, #17110e 0%, #0d0a08 70%, #090706 100%);
  box-shadow: inset 0 0 calc(var(--dcf-h) * 0.08) rgba(0,0,0,.7);
  color: #f4f1ec; font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums; line-height: 1; user-select: none;
  transition: opacity .45s, filter .45s;
}
.desk-clock-face .dcf-time {
  font-size: calc(var(--dcf-h) * 0.36); font-weight: 300; letter-spacing: .02em;
  text-shadow: 0 0 calc(var(--dcf-h) * 0.08) rgba(255,245,230,.45);
}
.desk-clock-face .dcf-ampm {
  margin-top: calc(var(--dcf-h) * 0.07);
  font-size: calc(var(--dcf-h) * 0.15); font-weight: 500; letter-spacing: .06em; opacity: .9;
}
/* 夜晚：屏幕自发光，仍然清晰可读 */
.period-night .desk-clock-face { filter: brightness(.95); }
.period-night .desk-clock-face .dcf-time { text-shadow: 0 0 calc(var(--dcf-h) * 0.12) rgba(255,245,230,.6); }

/* ---------- 电子表弹窗：沿用参考站 clockModal ---------- */
.clock-overlay[hidden] { display: none !important; }
.clock-overlay {
  position: fixed; inset: 0; z-index: 45;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .3s ease;
}
.clock-overlay.open { opacity: 1; }
.clock-card {
  width: 100%; max-width: 320px; background: #0a0a0a; color: #fff;
  border-radius: 22px; border: 1px solid rgba(255,255,255,.08);
  padding: 34px 30px; text-align: center; position: relative;
  box-shadow: 0 30px 70px rgba(0,0,0,.55);
  transform: translateY(18px) scale(.96); opacity: 0;
  transition: transform .4s cubic-bezier(.22,.61,.36,1), opacity .35s ease;
}
.clock-overlay.open .clock-card { transform: none; opacity: 1; }
.clock-close {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer;
}
.clock-greeting { font-size: 12px; letter-spacing: .14em; color: #e8752c; font-weight: 700; margin-bottom: 14px; }
.clock-time { font-size: 42px; font-weight: 700; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.clock-date { opacity: .65; margin-top: 8px; font-size: 13px; }

/* 票据无效：盖住整页，底下的模拟间不可读 */
html.ticket-refused #boot,
html.ticket-refused #app,
html.ticket-refused #clock-modal,
html.ticket-refused #carousel-root,
html.ticket-refused #camera-root,
html.ticket-refused #toast,
html.ticket-refused #pan-hint {
  display: none !important;
}
#ticket-refuse {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  background: #12100e;
  color: #f3ece4;
}
#ticket-refuse p {
  margin: 0;
  max-width: 16em;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .04em;
}
.diary-text {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}


/* 横屏客诉：同打赏，限制可视高度可滚动，竖屏不走这里 */
@media (orientation: landscape) and (max-height: 520px) {
  html.support-open #modal-root {
    align-items: center;
    padding: 10px 16px;
  }
  html.support-open #modal-root .sheet.support-sheet {
    width: min(520px, 100%);
    max-height: 100%;
    overflow: auto;
    border-radius: 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 12px 16px 14px;
  }
  html.support-open .support-form { gap: 8px; }
  html.support-open .support-cats label { padding: 8px 10px; font-size: 13px; }
  html.support-open .support-form textarea {
    min-height: 52px;
    max-height: min(96px, 28vh);
    resize: none;
  }
  html.support-open .support-form .btn { margin-top: 4px; padding: 10px; }
}
html.force-landscape.device-portrait.support-open #modal-root {
  align-items: center;
  padding: 10px 16px;
}
html.force-landscape.device-portrait.support-open #modal-root .sheet.support-sheet {
  width: min(560px, calc(100% - 8px));
  max-height: calc(100% - 4px);
  overflow: auto;
  border-radius: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 12px 16px 14px;
}
html.force-landscape.device-portrait.support-open .support-form { gap: 8px; }
html.force-landscape.device-portrait.support-open .support-cats label { padding: 8px 10px; font-size: 13px; }
html.force-landscape.device-portrait.support-open .support-form textarea {
  min-height: 48px;
  max-height: min(88px, 36%);
  resize: none;
}
html.force-landscape.device-portrait.support-open .support-form .btn { margin-top: 4px; padding: 10px; }
html.force-landscape.device-portrait.support-open .support-sheet h2,
html.force-landscape.device-portrait.support-open .support-sheet .muted,
html.force-landscape.device-portrait.support-open .support-sheet .support-thanks,
html.force-landscape.device-portrait.support-open .support-sheet .support-blocked,
html.support-open .support-sheet h2,
html.support-open .support-sheet .muted,
html.support-open .support-sheet .support-thanks,
html.support-open .support-sheet .support-blocked {
  writing-mode: horizontal-tb;
  overflow-wrap: anywhere;
}

/* 横屏打赏：弹层跟着可视高度，文字不挤出右侧；竖屏不走这里 */
@media (orientation: landscape) and (max-height: 520px) {
  html.tip-open #modal-root {
    align-items: center;
    padding: 10px 16px;
  }
  html.tip-open #modal-root .sheet.tip-sheet {
    width: min(520px, 100%);
    max-height: 100%;
    border-radius: 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 12px 16px 14px;
  }
  html.tip-open .tip-sheet .tip-qr {
    width: min(168px, 34vh);
    margin: 8px auto;
  }
  html.tip-open .tip-sheet .btn { margin-top: 8px; padding: 10px; }
  html.tip-open .tip-sheet .tip-actions { gap: 6px; }
  html.tip-open .tip-sheet .tip-actions .btn { margin-top: 0; padding: 8px 10px; }
}
html.force-landscape.device-portrait.tip-open #modal-root {
  align-items: center;
  padding: 10px 16px;
}
html.force-landscape.device-portrait.tip-open #modal-root .sheet.tip-sheet {
  width: min(560px, calc(100% - 8px));
  max-height: calc(100% - 4px);
  overflow: auto;
  border-radius: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 12px 16px 14px;
}
html.force-landscape.device-portrait.tip-open .tip-sheet .tip-qr {
  width: min(150px, 42%);
  height: auto;
  margin: 8px auto;
}
html.force-landscape.device-portrait.tip-open .tip-sheet h2,
html.force-landscape.device-portrait.tip-open .tip-sheet .muted,
html.force-landscape.device-portrait.tip-open .tip-sheet .tip-thanks,
html.tip-open .tip-sheet h2,
html.tip-open .tip-sheet .muted,
html.tip-open .tip-sheet .tip-thanks {
  writing-mode: horizontal-tb;
  overflow-wrap: anywhere;
}
.tip-thanks {
  margin: 8px 0 4px;
  text-align: center;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}
#modal-root .sheet.voice-sheet {
  writing-mode: horizontal-tb;
  width: min(520px, 100%);
}
.voice-sheet h2,
.voice-name,
.voice-meta,
.voice-play {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
}
.voice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.voice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
}
.voice-copy { min-width: 0; }
.voice-name {
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
}
.voice-meta {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.45;
  color: #e8752c;
}
.voice-play {
  appearance: none;
  border: 1px solid rgba(245,168,154,.45);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  min-height: 36px;
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.voice-sheet audio.voice-file {
  display: none;
}
video.monitor-still {
  background: #000;
  pointer-events: none;
}


/* ===== 经营上传 / 置顶 / local_only ===== */
.operate-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 4px 0 12px;
}
.operate-actions .btn { margin-top: 0; }
.operate-note { margin: 0 0 8px; }
.diary-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.diary-form textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.28);
  color: var(--text);
  padding: 12px;
  font: inherit;
  line-height: 1.6;
}
.diary-list { display: flex; flex-direction: column; gap: 12px; }
.diary-entry {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
}
.diary-entry.is-pinned { border-color: rgba(245,168,154,.45); }
.diary-entry .diary-text { margin: 0; }
.diary-ops { display: flex; gap: 8px; margin-top: 8px; }
.diary-mini { width: auto; margin-top: 0; padding: 6px 10px; font-size: 12px; font-weight: 500; }
.voice-row .voice-pin,
.voice-row .voice-del {
  appearance: none;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.cr-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.cr-record {
  font-size: 12px; color: #fff; padding: 7px 16px; border-radius: 999px;
  background: rgba(194,58,90,.35); border: 1px solid rgba(245,168,154,.45); cursor: pointer;
}
.cr-pin, .cr-del {
  font-size: 12px; color: #fff; padding: 7px 12px; border-radius: 999px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22); cursor: pointer;
}
.cr-local, .cr-own-actions {
  font-size: 11px; color: #e8752c; letter-spacing: .04em;
}
.cr-empty { text-align: center; padding: 48px 16px; opacity: .85; }

/* diary/voice landscape operate */
@media (orientation: landscape) and (max-height: 520px) {
  #modal-root .sheet.diary-sheet,
  #modal-root .sheet.voice-sheet {
    max-height: 100%;
    overflow: auto;
  }
  .diary-form textarea { min-height: 56px; max-height: 22vh; }
}
html.force-landscape.device-portrait #modal-root .sheet.diary-sheet,
html.force-landscape.device-portrait #modal-root .sheet.voice-sheet {
  max-height: min(86vh, 720px);
}


/* 日记编辑：临时解除 force-landscape 后，竖屏全屏 sheet，跟系统键盘对齐 */
html.diary-edit-open #modal-root {
  align-items: stretch;
  justify-content: flex-end;
}
html.diary-edit-open #modal-root .sheet.diary-sheet {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  min-height: min(100%, 100dvh);
  border-radius: 16px 16px 0 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
html.diary-edit-open .diary-form textarea {
  min-height: 120px;
  max-height: none;
  font-size: 16px; /* 避免 iOS/安卓 focus 时自动缩放 */
}

/* ===== 法务 P0-C：首次进站协议门闸 ===== */
html.legal-gate-open #boot,
html.legal-gate-open #app,
html.legal-gate-open #clock-modal,
html.legal-gate-open #carousel-root,
html.legal-gate-open #camera-root,
html.legal-gate-open #toast,
html.legal-gate-open #pan-hint,
html.legal-gate-open #modal-root,
html.legal-gate-open #ticket-refuse {
  pointer-events: none !important;
}
#legal-gate[hidden] { display: none !important; }
#legal-gate {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(8, 6, 5, .78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #f3ece4;
}
.legal-gate-card {
  width: min(440px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
  background: #16120f;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 22px 20px 20px;
  box-shadow: 0 28px 70px rgba(0,0,0,.55);
}
.legal-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .08em;
  font-weight: 700;
  color: #e8752c;
  border: 1px solid rgba(232,117,44,.45);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 12px;
}
#legal-gate h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}
.legal-lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.65;
  color: #cbb9a8;
}
.legal-doc-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-doc-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
}
.legal-doc-list a {
  color: #ffc2a0;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-ver {
  font-size: 11px;
  color: #8f7f70;
  word-break: break-all;
}
.legal-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 12px;
  font-size: 13px;
  line-height: 1.55;
  cursor: pointer;
}
.legal-check input {
  margin-top: 3px;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}
.legal-note {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.55;
  color: #8f7f70;
}
.legal-note code {
  font-size: 11px;
  background: rgba(255,255,255,.08);
  padding: 1px 4px;
  border-radius: 4px;
}
#legal-gate .btn:disabled,
#legal-gate .btn[disabled] {
  opacity: .42;
  cursor: not-allowed;
  filter: grayscale(.25);
}
.legal-reader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0,0,0,.55);
}
.legal-reader-card {
  width: min(720px, 100%);
  height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  background: #16120f;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  padding: 12px 12px 14px;
}
.legal-reader-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.legal-reader-card h3 { margin: 0; font-size: 16px; }
.legal-reader-meta {
  margin: 0 0 8px;
  font-size: 12px;
  color: #8f7f70;
}
.legal-reader-frame {
  flex: 1;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #0c0a09;
  min-height: 240px;
}

.legal-gate-toast{margin:0.6rem 0 0;color:#c45;font-size:0.85rem;min-height:1.2em}
.legal-gate-toast[hidden]{display:none}

/* ICP 备案页脚（合规展示，勿挡热区） */
.xt-beian-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(6px, env(safe-area-inset-bottom, 0px));
  z-index: 28;
  margin: 0;
  padding: 0 12px;
  text-align: center;
  pointer-events: none;
}
.xt-beian-footer .xt-beian,
a.xt-beian {
  pointer-events: auto;
  display: inline-block;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(243, 236, 228, 0.55);
  text-decoration: none;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
}
.xt-beian-footer .xt-beian:active,
a.xt-beian:hover {
  color: rgba(243, 236, 228, 0.85);
  text-decoration: underline;
}

.legal-beian { margin: 12px 0 0; text-align: center; font-size: 11px; }
.legal-beian .xt-beian { color: #8f7f70; text-decoration: none; }
.legal-beian .xt-beian:hover { color: #e8752c; text-decoration: underline; }

/* official: hide top-right peach logo */
#brand-logo-link, #brand-logo { display: none !important; }
