/* 水星号 · 天使降临之日 —— 独立预览页 */
:root {
  --gold: #f0d9a8;
  --gold-soft: rgba(240, 217, 168, .6);
  --ink: #0b0713;
  --line: rgba(240, 217, 168, .16);
  --text: rgba(248, 244, 255, .92);
  --muted: rgba(248, 244, 255, .45);
  --serif: "Songti SC", "Noto Serif SC", Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, #2a1b3d 0%, #150d22 45%, #0b0713 100%),
    radial-gradient(60% 40% at 80% 85%, rgba(240, 217, 168, .08), transparent 70%);
}

.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(46% 52% at 50% 42%, rgba(240, 217, 168, .12), transparent 72%);
  mix-blend-mode: screen;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 1;
}
.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: pointer;
}
.stage canvas.is-grabbing { cursor: grabbing; }

/* ---------- 加载 ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #0b0713;
  transition: opacity .45s ease, visibility .45s;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader__ring {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(240, 217, 168, .18);
  border-top-color: var(--gold);
  animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader__text { font-size: 11px; letter-spacing: .28em; color: var(--muted); }
.loader__bar { width: 180px; height: 2px; background: rgba(240, 217, 168, .12); overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c9a86a, var(--gold)); transition: width .3s ease; }

/* ---------- 顶栏 ---------- */
.top {
  position: fixed;
  z-index: 4;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(16px, 2.4vw, 30px) clamp(16px, 2.8vw, 38px);
  pointer-events: none;
}
.ident__kicker {
  display: block;
  font-size: 9px;
  letter-spacing: .32em;
  color: var(--gold-soft);
  margin-bottom: 8px;
}
.ident__name {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
  letter-spacing: .12em;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .6);
}
.ident__sub {
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--muted);
  font-family: inherit;
}
.tools { display: flex; align-items: center; gap: 8px; pointer-events: auto; }
.tool {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(20, 12, 32, .5);
  color: rgba(248, 244, 255, .7);
  font-family: inherit;
  font-size: 11.5px;
  letter-spacing: .1em;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: color .2s, background .2s, border-color .2s;
}
.tool:hover { color: #fff; border-color: rgba(240, 217, 168, .35); }
.tool.is-on {
  color: #241708;
  background: linear-gradient(180deg, #f6e6bf, #dcbf85);
  border-color: transparent;
}
.tool--icon { padding: 7px 9px; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- 字幕 / 提示 ---------- */
.subtitle {
  position: fixed;
  z-index: 3;
  left: 50%;
  bottom: 132px;
  transform: translate(-50%, 10px);
  width: min(660px, calc(100vw - 48px));
  padding: 12px 20px;
  border-radius: 14px;
  background: rgba(12, 7, 20, .62);
  border: 1px solid rgba(240, 217, 168, .14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.85;
  letter-spacing: .04em;
  color: rgba(255, 250, 240, .92);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
  pointer-events: none;
}
.subtitle.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.toast {
  position: fixed;
  z-index: 6;
  left: 50%;
  top: 76px;
  transform: translate(-50%, -6px);
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(12, 7, 20, .72);
  border: 1px solid rgba(240, 217, 168, .16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 11.5px;
  letter-spacing: .12em;
  color: rgba(255, 250, 240, .9);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  pointer-events: none;
}
.toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- 底部动作条 ---------- */
.actions {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: max(26px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(14, 8, 22, .6);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.act {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(248, 244, 255, .66);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .08em;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: color .18s, background .18s, transform .12s;
}
.act:hover { color: #fff; background: rgba(240, 217, 168, .12); }
.act:active { transform: scale(.95); }
.act.is-playing {
  color: #241708;
  background: linear-gradient(180deg, #f6e6bf, #dcbf85);
  box-shadow: 0 6px 20px rgba(220, 191, 133, .3);
}
.act__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
}
.act.is-playing .act__dot { opacity: .8; }

.act--primary {
  color: var(--gold);
  background: rgba(240, 217, 168, .1);
  border: 1px solid rgba(240, 217, 168, .22);
}
.act--primary:hover { background: rgba(240, 217, 168, .2); color: #fff3d8; }
.act__ico { font-size: 13px; line-height: 1; }

.hint {
  position: fixed;
  z-index: 3;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  margin: 0;
  font-size: 10.5px;
  letter-spacing: .14em;
  color: rgba(248, 244, 255, .28);
  white-space: nowrap;
  transition: opacity .6s ease;
  pointer-events: none;
}
.hint.is-hidden { opacity: 0; }

/* ---------- 移动端 ---------- */
@media (max-width: 720px) {
  .ident__name { font-size: 19px; gap: 8px; }
  .ident__sub { font-size: 9.5px; }
  .top { padding: 14px 14px 0; }

  .actions {
    left: 12px;
    right: 12px;
    transform: none;
    justify-content: space-between;
    gap: 2px;
    padding: 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .actions::-webkit-scrollbar { display: none; }
  .act { padding: 8px 10px; font-size: 11.5px; letter-spacing: .02em; flex: 0 0 auto; }
  .act__dot { display: none; }

  .subtitle { bottom: 128px; font-size: 13px; padding: 10px 14px; }
  .hint { bottom: 92px; font-size: 9.5px; letter-spacing: .1em; }
}
