/* ============================================================
 * WILDSKILL · 竖滑视频落地页样式
 * 章节：1 变量/主题  2 基础  3 舞台/顶栏  4 分类/圆点
 *       5 竖滑容器  6 首屏  7 视频屏  8 尾屏
 *       9 进度条/提示/弹层  10 动效  11 响应式  12 无障碍
 * ============================================================ */

/* ---------- 1. 变量 / 主题 ---------- */
:root {
  --font-display: Impact, "Arial Narrow", "Haettenschweiler", "Franklin Gothic Heavy", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --radius: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --topbar-h: 62px;
  --filters-h: 90px;
  --vprog-h: 86px;

  --ease: cubic-bezier(.22, .68, 0, 1);
}

:root[data-theme="dark"] {
  --bg: #080c09;
  --bg-2: #101a12;
  --panel: rgba(11, 17, 12, .86);
  --panel-solid: #101811;
  --ink: #f5f2e8;
  --ink-dim: rgba(245, 242, 232, .66);
  --ink-faint: rgba(245, 242, 232, .38);
  --line: rgba(245, 242, 232, .15);
  --line-strong: rgba(245, 242, 232, .3);
  --accent: #ff6a24;
  --accent-2: #ffb03a;
  --moss: #8fb45a;
  --moss-deep: #3f6b3a;
  --stage-shadow: 0 40px 120px rgba(0, 0, 0, .75);
  --grain-op: .16;
}

:root[data-theme="light"] {
  --bg: #d9d6c8;
  --bg-2: #eae7da;
  --panel: rgba(246, 243, 233, .9);
  --panel-solid: #f6f3e9;
  --ink: #17231a;
  --ink-dim: rgba(23, 35, 26, .72);
  --ink-faint: rgba(23, 35, 26, .45);
  --line: rgba(23, 35, 26, .16);
  --line-strong: rgba(23, 35, 26, .34);
  --accent: #d64f14;
  --accent-2: #e08718;
  --moss: #4f7a37;
  --moss-deep: #35602d;
  --stage-shadow: 0 40px 120px rgba(40, 45, 30, .35);
  --grain-op: .1;
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  transition: background .45s ease, color .45s ease;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.grain, .vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.grain {
  opacity: var(--grain-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.vignette { background: radial-gradient(120% 80% at 50% 45%, transparent 45%, rgba(0,0,0,.55) 100%); opacity: .5; }
:root[data-theme="light"] .vignette { opacity: .18; }

/* ---------- 3. 舞台 / 顶栏 ---------- */
.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg-2);
  isolation: isolate;
}
body::before {
  /* PC 背景等高线 */
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 20%, rgba(143,180,90,.09), transparent 70%),
    radial-gradient(55% 45% at 85% 80%, rgba(255,106,36,.09), transparent 70%);
}

.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 30;
  height: calc(var(--topbar-h) + var(--safe-t));
  padding: var(--safe-t) 16px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(to bottom, rgba(6,10,7,.82), rgba(6,10,7,.35) 70%, transparent);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-mark {
  width: 32px; height: 32px; flex: 0 0 32px; padding: 5px;
  color: var(--accent-2);
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: rgba(255,176,58,.08);
}
.brand-mark svg { stroke-width: 1.6; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-text b {
  font-family: var(--font-display); font-size: 18px; letter-spacing: 1.6px;
  color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.brand-text i {
  font-style: normal; font-size: 9px; letter-spacing: .7px;
  color: rgba(255,255,255,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-right { display: flex; align-items: center; gap: 8px; }
.counter {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px;
  color: rgba(255,255,255,.68); padding-right: 4px; white-space: nowrap;
}
.counter b { color: #fff; font-size: 13px; }
.counter__sep { margin: 0 3px; color: var(--accent); }
.icon-btn, .lang-btn {
  height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
  background: rgba(10,16,11,.5); backdrop-filter: blur(10px);
  color: #fff; transition: background .2s, border-color .2s, transform .2s;
}
.icon-btn:hover, .lang-btn:hover { background: rgba(255,106,36,.22); border-color: var(--accent); transform: translateY(-1px); }
.icon-btn { width: 34px; padding: 8px; }
.icon-btn svg { stroke-width: 1.7; }
.icon-btn .ic-sun { display: none; }
:root[data-theme="light"] .icon-btn .ic-sun { display: block; }
:root[data-theme="light"] .icon-btn .ic-moon { display: none; }
.lang-btn { padding: 0 10px 0 9px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; }
.lang-btn svg { width: 15px; height: 15px; }

/* ---------- 4. 分类 / 圆点 ---------- */
.filters {
  position: absolute; z-index: 29;
  top: calc(var(--topbar-h) + var(--safe-t));
  left: 0; right: 0;
  padding: 4px 0 12px;
  background: linear-gradient(to bottom, rgba(6,10,7,.4), transparent);
  pointer-events: none;
}
.filters > * { pointer-events: auto; }
.tabs { display: flex; justify-content: center; gap: 22px; padding: 2px 0 10px; }
.tab {
  position: relative; padding: 4px 2px 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.6px;
  color: rgba(255,255,255,.55); text-shadow: 0 1px 6px rgba(0,0,0,.8);
  transition: color .2s;
}
.tab:hover { color: #fff; }
.tab.is-on { color: #fff; font-weight: 700; }
.tab.is-on::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 22px; height: 2px; border-radius: 2px; background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.cats {
  display: flex; gap: 7px; padding: 0 14px 2px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.cats::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 11px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 999px;
  background: rgba(10,16,11,.55); backdrop-filter: blur(8px);
  color: rgba(255,255,255,.8); font-size: 11px; letter-spacing: .3px; white-space: nowrap;
  transition: all .2s;
}
.cat-chip svg { width: 13px; height: 13px; }
.cat-chip:hover { border-color: rgba(255,176,58,.7); color: #fff; }
.cat-chip.is-on {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700;
  box-shadow: 0 4px 18px rgba(255,106,36,.4);
}

.dots {
  position: absolute; z-index: 26; right: 10px; top: 50%; transform: translateY(-50%);
  display: none; flex-direction: column; gap: 9px; align-items: center;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%; padding: 0;
  background: rgba(255,255,255,.32); border: 1px solid rgba(0,0,0,.25);
  transition: all .3s var(--ease);
}
.dot:hover { background: rgba(255,255,255,.7); transform: scale(1.3); }
.dot.is-on { height: 18px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* ---------- 5. 竖滑容器 ---------- */
.feed {
  position: absolute; inset: 0; z-index: 5;
  height: 100%;
  overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.feed::-webkit-scrollbar { display: none; }
.slide {
  position: relative;
  height: 100%; min-height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  isolation: isolate;
}

/* ---------- 6. 首屏 ---------- */
.slide--intro {
  background: radial-gradient(120% 70% at 50% 88%, #4a1c07 0%, #1b1a0d 42%, #080c09 100%);
  color: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
}
.intro-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.intro-glow {
  position: absolute; left: 50%; bottom: -18%; transform: translateX(-50%);
  width: 130%; height: 62%;
  background: radial-gradient(50% 55% at 50% 60%, rgba(255,138,40,.5), rgba(255,80,10,.14) 55%, transparent 75%);
  filter: blur(14px);
  animation: fireBreath 5s ease-in-out infinite;
}
.intro-contours { position: absolute; inset: 0; color: rgba(255,190,110,.22); }
.intro-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}
.intro-compass {
  position: absolute; z-index: 1; top: 15%; right: -52px;
  width: 220px; height: 220px; color: rgba(255,176,58,.28);
  animation: spin 48s linear infinite;
}
.intro-compass text { stroke: none; }
.intro-inner { position: relative; z-index: 2; padding: 0 26px; margin-top: 26px; }
.intro-kicker {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2.2px;
  color: var(--accent-2); text-transform: uppercase;
  animation: fadeUp .8s .1s both var(--ease);
}
.kicker-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: blink 1.8s infinite; }
.intro-title {
  margin: 14px 0 0; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(72px, 21vw, 122px); line-height: .84; letter-spacing: 1px;
  color: #fff; text-transform: uppercase;
  text-shadow: 0 8px 40px rgba(0,0,0,.6);
  animation: fadeUp .9s .2s both var(--ease);
}
.intro-title span, .intro-title em { display: block; }
.intro-title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent-2);
  text-shadow: 0 0 32px rgba(255,138,40,.4);
}
.intro-rule { width: 62px; height: 3px; margin: 22px 0 16px; background: linear-gradient(90deg, var(--accent), transparent); animation: fadeUp .9s .35s both var(--ease); }
.intro-desc {
  margin: 0; max-width: 340px; font-size: 13.5px; line-height: 1.65;
  color: rgba(255,255,255,.76);
  animation: fadeUp .9s .42s both var(--ease);
}
.intro-stats {
  margin-top: 18px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.8px;
  color: var(--moss); animation: fadeUp .9s .5s both var(--ease);
}
.intro-cats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 26px;
  animation: fadeUp .9s .6s both var(--ease);
}
.intro-cat {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 8px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px;
  background: rgba(255,255,255,.045); backdrop-filter: blur(4px);
  font-size: 10.5px; color: rgba(255,255,255,.8); text-align: left;
  transition: all .25s var(--ease);
}
.intro-cat:hover { border-color: var(--accent); background: rgba(255,106,36,.14); transform: translateY(-2px); }
.intro-cat svg { width: 17px; height: 17px; flex: 0 0 17px; color: var(--accent-2); }
.intro-scroll {
  position: absolute; z-index: 3; bottom: calc(26px + var(--safe-b)); left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2.4px;
  color: rgba(255,255,255,.72);
  animation: fadeUp 1s .8s both var(--ease);
}
.intro-scroll svg { width: 20px; height: 20px; color: var(--accent-2); animation: bob 1.8s ease-in-out infinite; }
.intro-scroll:hover { color: #fff; }

/* ---------- 7. 视频屏 ---------- */
.slide--video { background: #060906; color: #fff; }

/* 各分类占位海报配色（视频未加载时也不黑屏） */
.slide--video[data-cat="fire"]     { --p1:#2a0d04; --p2:#8c2c08; --p3:#ff9a3c; }
.slide--video[data-cat="water"]    { --p1:#04161f; --p2:#0a4d66; --p3:#6fd0c6; }
.slide--video[data-cat="food"]     { --p1:#161c06; --p2:#4c6a1c; --p3:#c9e06a; }
.slide--video[data-cat="shelter"]  { --p1:#1a1108; --p2:#6b4520; --p3:#e0a35c; }
.slide--video[data-cat="firstaid"] { --p1:#210809; --p2:#8c2027; --p3:#ff7b7b; }
.slide--video[data-cat="multi"]    { --p1:#08160e; --p2:#265338; --p3:#8fce7a; }

.poster {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(70% 45% at 50% 78%, color-mix(in srgb, var(--p3) 36%, transparent), transparent 70%),
    linear-gradient(165deg, var(--p1) 0%, var(--p2) 100%);
  transition: opacity .6s ease;
}
.poster__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(70% 60% at 50% 50%, #000, transparent 90%);
}
.poster__num {
  position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-display); font-size: clamp(150px, 48vw, 260px); line-height: 1;
  color: rgba(255,255,255,.07); letter-spacing: -6px; user-select: none;
}
.poster__label {
  position: absolute; bottom: 34%; left: 0; right: 0; text-align: center;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 3px;
  color: rgba(255,255,255,.32);
}
.slide--video.is-ready .poster { opacity: 0; }

.v {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02);
  opacity: 0; transition: opacity .55s ease;
  background: #000;
}
.slide--video.is-ready .v { opacity: 1; }

.scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.62) 0%, rgba(0,0,0,.12) 26%, rgba(0,0,0,.05) 50%, rgba(0,0,0,.42) 76%, rgba(0,0,0,.9) 100%);
}
.scrim--foot {
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.55) 30%, transparent 62%);
}

.v-top {
  position: absolute; z-index: 12; left: 16px; right: 16px;
  top: calc(var(--topbar-h) + var(--filters-h) + var(--safe-t));
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 27px; padding: 0 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--p3) 22%, rgba(0,0,0,.5));
  border: 1px solid color-mix(in srgb, var(--p3) 55%, transparent);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.7);
}
.chip svg { width: 13px; height: 13px; color: var(--p3); }
.v-count { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.5px; color: rgba(255,255,255,.72); text-shadow: 0 1px 5px rgba(0,0,0,.8); }
.v-count b { color: var(--accent-2); font-size: 13px; }

/* 右侧操作栏 */
.rail {
  position: absolute; z-index: 14; right: 9px;
  bottom: calc(var(--vprog-h) + 22px + var(--safe-b));
  display: flex; flex-direction: column; align-items: center; gap: 15px;
}
.avatar {
  width: 42px; height: 42px; padding: 9px; margin-bottom: 4px;
  border: 2px solid #fff; border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--moss-deep));
  color: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.5);
  animation: spin 8s linear infinite;
}
.avatar svg { stroke-width: 1.7; }
.rail-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 46px; padding: 0; color: #fff;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.6));
  transition: transform .2s var(--ease);
}
.rail-btn:hover { transform: scale(1.1); }
.rail-btn > svg { width: 30px; height: 30px; stroke-width: 1.7; }
.rail-num { font-family: var(--font-mono); font-size: 10px; letter-spacing: .4px; color: rgba(255,255,255,.9); }
.rail-btn.is-liked > svg { fill: var(--accent); stroke: var(--accent); }
.rail-btn.is-saved > svg { fill: var(--accent-2); stroke: var(--accent-2); }
.rail-btn.is-hint::before {
  content: ""; position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--accent-2);
  animation: ring 1.7s ease-out infinite;
}

/* 左下信息区 */
.info {
  position: absolute; z-index: 13; left: 16px; right: 78px;
  bottom: calc(var(--vprog-h) + 14px + var(--safe-b));
  text-shadow: 0 2px 12px rgba(0,0,0,.85);
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.slide--video.is-active .info { opacity: 1; transform: none; }
.info-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 11px; }
.meta-tag {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 1.4px;
  padding: 3px 8px; border-radius: 4px;
  background: var(--accent); color: #fff; font-weight: 700;
}
.meta-item {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .8px;
  color: rgba(255,255,255,.62);
}
.meta-item i { font-style: normal; opacity: .7; margin-right: 3px; }
.meta-item b { color: #fff; font-weight: 600; }
.info-author {
  display: flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .4px; color: #fff; margin-bottom: 7px;
}
.verified { width: 13px; height: 13px; padding: 2px; border-radius: 50%; background: var(--accent-2); color: #101811; stroke-width: 3; }
.info-title {
  margin: 0 0 5px; font-family: var(--font-display);
  font-size: clamp(27px, 8vw, 38px); line-height: 1.03; letter-spacing: .3px;
  text-transform: uppercase; color: #fff;
}
.info-hook { margin: 0 0 9px; font-size: 13px; font-weight: 600; color: var(--accent-2); line-height: 1.4; }
.info-desc {
  margin: 0 0 11px; font-size: 12px; line-height: 1.55;
  color: rgba(255,255,255,.84);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.info-tips {
  margin: 0 0 11px; padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.2); border-left: 3px solid var(--accent-2); border-radius: 8px;
  background: rgba(6,10,7,.72); backdrop-filter: blur(8px);
  animation: fadeUp .35s both var(--ease);
}
.tips-label { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.8px; color: var(--accent-2); margin-bottom: 6px; }
.info-tips ul { margin: 0; padding-left: 15px; }
.info-tips li { font-size: 11.5px; line-height: 1.55; color: rgba(255,255,255,.9); margin-bottom: 3px; }
.music-line { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: rgba(255,255,255,.7); overflow: hidden; }
.music-line svg { width: 14px; height: 14px; flex: 0 0 14px; color: var(--accent-2); }
.marquee { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-mono); letter-spacing: .6px; }

.tap-layer { position: absolute; inset: 0; z-index: 10; width: 100%; height: 100%; }
.play-badge {
  position: absolute; z-index: 15; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 68px; padding: 20px; border-radius: 50%;
  background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.4);
  color: #fff; backdrop-filter: blur(6px); pointer-events: none;
}
.play-badge svg { stroke-width: 1.6; }

/* ---------- 8. 尾屏 ---------- */
.slide--end {
  background: radial-gradient(120% 75% at 50% 30%, #3a2409 0%, #171a0d 45%, #080c09 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff;
}
.end-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.end-glow {
  position: absolute; left: 50%; top: 12%; transform: translateX(-50%);
  width: 120%; height: 70%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,150,44,.35), transparent 70%);
  animation: fireBreath 5s ease-in-out infinite;
}
.end-inner { position: relative; z-index: 2; padding: 0 30px; width: 100%; }
.end-badge {
  width: 74px; height: 74px; margin: 0 auto 22px; padding: 14px;
  border: 1px solid rgba(255,176,58,.5); border-radius: 50%;
  background: rgba(255,176,58,.08); color: var(--accent-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  box-shadow: 0 0 40px rgba(255,138,40,.18);
}
.end-badge svg { width: 26px; height: 26px; }
.end-badge span { font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px; }
.end-kicker { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2.2px; color: var(--accent-2); }
.end-title {
  margin: 14px 0 10px; font-family: var(--font-display);
  font-size: clamp(40px, 12vw, 62px); line-height: 1; letter-spacing: .5px; text-transform: uppercase;
}
.end-desc { margin: 0 auto 22px; max-width: 300px; font-size: 13px; line-height: 1.65; color: rgba(255,255,255,.74); }
.end-stat {
  display: inline-block; margin-bottom: 26px; padding: 7px 14px;
  border: 1px dashed rgba(255,255,255,.28); border-radius: 6px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.6px; color: var(--moss);
}
.btn-primary {
  position: relative; display: block; width: 100%; max-width: 320px; margin: 0 auto 12px;
  height: 52px; border-radius: 10px;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #fff; font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase;
  box-shadow: 0 8px 34px rgba(255,106,36,.42);
  animation: ctaBreath 2.8s ease-in-out infinite;
  transition: transform .2s var(--ease);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  margin: 0 auto; padding: 9px 18px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px;
  color: rgba(255,255,255,.86); font-size: 12px; letter-spacing: .5px;
  transition: all .2s;
}
.btn-ghost:hover { border-color: var(--accent-2); color: #fff; background: rgba(255,176,58,.1); }
.btn-ghost svg { width: 15px; height: 15px; }
.end-hint { margin-top: 18px; min-height: 16px; font-size: 11px; color: var(--accent-2); }
.end-footer {
  position: absolute; z-index: 2; bottom: calc(20px + var(--safe-b)); left: 0; right: 0;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .8px; color: rgba(255,255,255,.4);
}

/* ---------- 9. 进度条 / 提示 / 弹层 ---------- */
.vprog {
  position: absolute; z-index: 40; left: 0; right: 0; bottom: 0;
  padding: 10px 18px calc(11px + var(--safe-b));
  background: linear-gradient(to top, rgba(4,7,5,.94), rgba(4,7,5,.72) 72%, transparent);
  backdrop-filter: blur(10px);
  animation: fadeUp .35s both var(--ease);
}
.vprog-status { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px; color: rgba(255,255,255,.72); }
.vprog-live { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: blink 1.6s infinite; }
.vprog-num { margin-left: auto; color: var(--accent-2); }
.vprog-track {
  position: relative; height: 5px; border-radius: 5px;
  background: rgba(255,255,255,.22); cursor: pointer; touch-action: none;
}
.vprog-track:hover { height: 7px; }
.vprog-buffer, .vprog-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.vprog-buffer { background: rgba(255,255,255,.32); width: 0; }
.vprog-fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; box-shadow: 0 0 10px rgba(255,106,36,.6); }
.vprog-knob {
  position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%);
  width: 11px; height: 11px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 8px rgba(0,0,0,.6); opacity: 0; transition: opacity .2s;
}
.vprog-track:hover .vprog-knob, .vprog-track:focus-visible .vprog-knob, .vprog-track.is-drag .vprog-knob { opacity: 1; }
.vprog-time { display: flex; justify-content: space-between; margin-top: 5px; font-family: var(--font-mono); font-size: 9px; color: rgba(255,255,255,.55); }

.sound-hint {
  position: absolute; z-index: 45; top: calc(var(--topbar-h) + var(--filters-h) + var(--safe-t) + 42px);
  left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(10,16,11,.86); border: 1px solid var(--accent-2);
  color: #fff; font-size: 11px; letter-spacing: .3px; white-space: nowrap;
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
  animation: fadeUp .4s both var(--ease);
}
.sound-hint svg { width: 16px; height: 16px; color: var(--accent-2); }
.sound-hint__ring { position: absolute; inset: -4px; border: 1px solid var(--accent-2); border-radius: 999px; opacity: .5; animation: ring 1.8s ease-out infinite; }

.heart-burst {
  position: absolute; z-index: 50; top: 50%; left: 50%;
  width: 110px; height: 110px; padding: 12px; color: var(--accent);
  transform: translate(-50%, -50%) scale(0); opacity: 0; pointer-events: none;
}
.heart-burst svg { fill: var(--accent); stroke: #fff; stroke-width: 1; filter: drop-shadow(0 4px 20px rgba(255,106,36,.8)); }
.heart-burst.is-pop { animation: heartPop .8s var(--ease) forwards; }

.toast {
  position: absolute; z-index: 60; left: 50%; bottom: calc(var(--vprog-h) + 26px + var(--safe-b));
  transform: translate(-50%, 12px);
  padding: 9px 16px; border-radius: 999px;
  background: rgba(10,16,11,.92); border: 1px solid var(--line-strong);
  color: #fff; font-size: 11.5px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.sheet-scrim {
  position: absolute; z-index: 100; inset: 0;
  display: flex; align-items: flex-end;
  background: rgba(0,0,0,.62); backdrop-filter: blur(4px);
  animation: fadeIn .25s both;
}
.sheet {
  position: relative; width: 100%;
  max-height: 78%; overflow-y: auto;
  padding: 22px 20px calc(22px + var(--safe-b));
  background: var(--panel-solid);
  border-top: 1px solid var(--line-strong);
  border-radius: 20px 20px 0 0;
  color: var(--ink);
  box-shadow: 0 -20px 60px rgba(0,0,0,.5);
  animation: sheetUp .35s var(--ease) both;
}
.sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 0 auto 16px; }
.sheet-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; padding: 8px;
  border-radius: 50%; background: var(--panel); border: 1px solid var(--line); color: var(--ink);
}
.sheet-close:hover { border-color: var(--accent); }
.sheet-title { margin: 0 0 4px; font-family: var(--font-display); font-size: 26px; letter-spacing: 1px; text-transform: uppercase; }
.sheet-sub { margin: 0 0 18px; font-size: 12px; color: var(--ink-dim); }
.lang-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.lang-opt {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); text-align: left; transition: all .2s;
}
.lang-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.lang-opt.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel-solid)); }
.lang-opt__code {
  flex: 0 0 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 7px; background: var(--bg-2); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--accent);
}
.lang-opt.is-on .lang-opt__code { background: var(--accent); color: #fff; border-color: var(--accent); }
.lang-opt__txt { display: flex; flex-direction: column; min-width: 0; }
.lang-opt__txt b { font-size: 12.5px; font-weight: 600; }
.lang-opt__txt i { font-style: normal; font-size: 10px; color: var(--ink-faint); }
.lang-opt__check { margin-left: auto; width: 14px; height: 14px; color: var(--accent); stroke-width: 3; flex: 0 0 14px; visibility: hidden; }
.lang-opt.is-on .lang-opt__check { visibility: visible; }
.sheet-foot { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .6px; color: var(--ink-faint); text-align: center; }

/* ---------- 10. 动效 ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .28; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(7px); opacity: 1; } }
@keyframes fireBreath { 0%, 100% { opacity: .72; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.08); } }
@keyframes ring { 0% { transform: translateX(-50%) scale(.72); opacity: .9; } 100% { transform: translateX(-50%) scale(1.5); opacity: 0; } }
@keyframes ctaBreath {
  0%, 100% { box-shadow: 0 8px 30px rgba(255,106,36,.36), 0 0 0 0 rgba(255,176,58,.32); }
  50% { box-shadow: 0 10px 42px rgba(255,106,36,.55), 0 0 0 12px rgba(255,176,58,0); }
}
@keyframes heartPop {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-18deg); opacity: 0; }
  35% { transform: translate(-50%, -50%) scale(1.18) rotate(8deg); opacity: 1; }
  65% { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 1; }
  100% { transform: translate(-50%, -60%) scale(1.05); opacity: 0; }
}

/* ---------- 11. 响应式 ---------- */
@media (min-width: 900px) and (min-height: 620px) {
  .stage {
    width: min(430px, 92vw);
    height: min(880px, 94dvh);
    margin-top: max(3dvh, 18px);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--stage-shadow);
  }
  .dots { display: flex; }
  .stage-deco { display: block; }
  .topbar { border-radius: var(--radius) var(--radius) 0 0; }
}
.stage-deco { display: none; position: fixed; z-index: 2; color: var(--ink-faint); pointer-events: none; }
.stage-deco--left { left: 5vw; top: 50%; transform: translateY(-50%); text-align: left; }
.stage-deco--right { right: 5vw; top: 50%; transform: translateY(-50%); text-align: right; }
.stage-deco__word {
  font-family: var(--font-display); font-size: clamp(38px, 5vw, 78px); letter-spacing: 2px;
  line-height: .95; color: transparent; -webkit-text-stroke: 1px var(--line-strong);
}
.stage-deco__rule { width: 90px; height: 2px; margin: 16px 0; background: var(--accent); }
.stage-deco--right .stage-deco__rule { margin-left: auto; }
.stage-deco__sub, .stage-deco__coords { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; margin-top: 8px; }
.stage-deco__coords { color: var(--accent-2); opacity: .7; }

@media (max-width: 359px) {
  .info { right: 70px; }
  .rail { right: 5px; gap: 12px; }
  .rail-btn > svg { width: 26px; height: 26px; }
  .intro-cats { gap: 5px; }
  .intro-cat { padding: 7px 6px; font-size: 9.5px; }
}

/* 横屏矮视口：压缩信息，避免遮挡 */
@media (max-height: 620px) {
  .intro-cats { display: none; }
  .intro-title { font-size: clamp(52px, 15vh, 84px); }
  .intro-desc { font-size: 11.5px; }
  .info-desc { -webkit-line-clamp: 2; }
  .info-title { font-size: 24px; }
  .rail { gap: 9px; }
  .rail-btn > svg { width: 25px; height: 25px; }
  .avatar { width: 34px; height: 34px; padding: 7px; }
}

/* ---------- 12. 无障碍 / 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .info { opacity: 1; transform: none; }
}
