/* BiliBridge public homepage. Served under the console CSP (style-src 'self'):
   no inline styles, no external fonts; dynamic values come from CSSOM custom
   properties set by home.mjs. */
:root {
  color-scheme: dark;
  --bg: #05070d; --bg-raise: #0c111b; --raise-2: #141b2a;
  --ink: #eef2fb; --muted: #9ba5b9; --dim: #7c869b;
  --line: rgb(140 170 255 / .1); --line-strong: rgb(140 170 255 / .17);
  /* The logo's pink is the only accent: the brand, the main action and live state.
     White light marks selection and focus. */
  --pink: #ef5794; --pink-soft: #ff9cc9; --pink-pale: #ffd8e8; --pink-deep: #c2306f; --pink-hot: #e14182;
  --grad: linear-gradient(100deg, #ffffff, #ffc4dc 32%, #ef5794 70%, #c2306f);
  --focus: rgb(226 232 245 / .82);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 32px);
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: 84px;
}
@media (prefers-reduced-motion: no-preference) { :root { scroll-behavior: smooth; } }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); overflow-x: clip; }
body::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; background-image: var(--grain); background-size: var(--grain-size, 160px); opacity: .055; }
img, canvas { display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: rgb(239 87 148 / .3); color: #fff; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { display: inline-block; width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.15em; }
.gi { display: block; width: 28px; height: 28px; flex: none; fill: none; stroke: none; }
.container { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: -80px; left: 16px; padding: 10px 18px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 600; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

/* ---------- Buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px;
  font-size: 15px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; isolation: isolate; overflow: hidden;
  transition: translate .45s var(--ease), scale .14s var(--ease), box-shadow .35s var(--ease), background-color .25s, border-color .25s, color .25s; }
.btn-sm { height: 36px; padding: 0 15px; font-size: 14px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; }
.btn .i { transition: transform .35s var(--ease); }
.btn:hover .i { transform: translateX(3px); }
.btn-primary { color: #12090d; background: linear-gradient(180deg, #f46aa3, #ea4d8c); box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 8px 20px -12px rgb(239 87 148 / .55); }
.btn-primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 32%, rgb(255 255 255 / .6) 50%, transparent 68%); transform: translateX(-130%); transition: transform .9s var(--ease); }
.btn-primary:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 16px 44px -10px rgb(239 87 148 / .9); }
.btn-primary:hover::after { transform: translateX(130%); }
.btn-glass { color: var(--ink); background: rgb(140 170 255 / .07); border-color: var(--line-strong); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn-glass:hover { background: rgb(255 255 255 / .1); border-color: rgb(255 255 255 / .24); }
.btn-quiet { color: var(--muted); }
.btn-quiet:hover { color: var(--ink); background: rgb(255 255 255 / .07); }
.link-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border: 0; border-radius: 7px; background: none; color: var(--pink); font-size: 12px; }
.link-btn:hover { background: rgb(239 87 148 / .12); }

/* ---------- Navigation ---------- */
.scroll-progress { position: fixed; inset: 0 0 auto; z-index: 70; height: 2px; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: var(--pink); transform-origin: 0 50%; transform: scaleX(0); }
.nav { position: fixed; inset: 0 0 auto; z-index: 60; border-bottom: 1px solid transparent; transition: background-color .4s, border-color .4s, -webkit-backdrop-filter .4s, backdrop-filter .4s; }
.nav.scrolled { background: rgb(5 7 13 / .66); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); }
.nav-inner { display: flex; align-items: center; gap: 20px; width: min(100% - 2 * var(--gutter), 1200px); height: 68px; margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 680; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 0 0 1px rgb(255 255 255 / .12), 0 6px 22px rgb(194 48 111 / .45); }
.nav-links { display: flex; gap: 2px; margin-inline: auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgb(140 170 255 / .04); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.nav-links a { padding: 6px 14px; border-radius: 8px; color: var(--muted); font-size: 14px; transition: color .2s, background-color .3s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); background: rgb(255 255 255 / .09); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }
.nav-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(118px, 15vh, 170px); overflow: clip; }
.hero-backdrop { position: absolute; inset: 0 0 auto; height: min(1180px, 130vh); z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent); mask-image: linear-gradient(to bottom, #000 58%, transparent); }
.aurora { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.8s ease; }
.aurora.ready { opacity: 1; }
.aurora-fallback { position: absolute; inset: 0; filter: blur(70px); }
.aurora-fallback i { position: absolute; border-radius: 50%; animation: drift 20s ease-in-out infinite alternate; }
.aurora-fallback i:nth-child(1) { width: 56vw; height: 38vw; left: 4%; top: -14%; background: radial-gradient(closest-side, rgb(239 87 148 / .42), transparent); }
.aurora-fallback i:nth-child(2) { width: 50vw; height: 36vw; right: 0; top: -6%; background: radial-gradient(closest-side, rgb(194 48 111 / .4), transparent); animation-delay: -7s; }
.aurora-fallback i:nth-child(3) { width: 40vw; height: 30vw; left: 32%; top: 18%; background: radial-gradient(closest-side, rgb(239 87 148 / .22), transparent); animation-delay: -13s; }
.aurora.ready ~ .hero-grid { opacity: .8; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgb(255 255 255 / .035) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .035) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center -1px;
  -webkit-mask-image: radial-gradient(ellipse 72% 52% at 50% 26%, #000 15%, transparent 72%); mask-image: radial-gradient(ellipse 72% 52% at 50% 26%, #000 15%, transparent 72%); }
.hero-danmaku { position: absolute; inset: 76px 0 auto; height: 62%; overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 46% 46% at 50% 42%, transparent 60%, #000 92%); mask-image: radial-gradient(ellipse 46% 46% at 50% 42%, transparent 60%, #000 92%); }
.hdm { position: absolute; top: 0; left: 0; white-space: nowrap; color: rgb(232 232 235 / .5); font-size: 14px; font-weight: 500; will-change: transform; }
.hdm.far { font-size: 12px; color: rgb(232 232 235 / .26); }
.hdm.near { font-size: 16px; color: rgb(242 242 244 / .7); }
.hdm.bot { color: rgb(255 156 201 / .8); text-shadow: 0 0 18px rgb(239 87 148 / .55); }
.hdm.far.bot { color: rgb(255 156 201 / .4); }

.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; }
.pill { position: relative; display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 5px 14px 5px 5px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: rgb(255 255 255 / .045); color: var(--muted); font-size: 13px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: fade-up 1s var(--ease) both; transition: border-color .3s, background-color .3s, color .3s; }
.pill > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill:hover { color: var(--ink); border-color: rgb(239 87 148 / .4); background: rgb(239 87 148 / .07); }
.pill .i { transition: transform .35s var(--ease); }
.pill:hover .i { transform: translateX(3px); }
.pill-tag { flex: none; padding: 2px 9px; border-radius: 7px; background: var(--pink); color: #120a0e; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.hero h1 { margin-top: 28px; font-size: clamp(42px, 7.2vw, 94px); font-weight: 760; line-height: 1.06; letter-spacing: -.04em; }
.hero h1 .line { display: block; overflow: hidden; padding: 0 .04em .1em; }
.hero h1 .line > span { display: inline-block; animation: line-up 1.25s var(--ease) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: .1s; }
.grad-text { font-style: normal; background: linear-gradient(100deg, #ff9cc9, #ff9cc9 30%, #e0679c 55%, #ef5794 75%, #ff9cc9); background-size: 240% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 9s linear infinite; }
.hero-sub { max-width: 720px; text-wrap: balance; margin-top: 26px; color: var(--muted); font-size: clamp(16px, 1.55vw, 19px); line-height: 1.8; animation: fade-up 1s .22s var(--ease) both; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 38px; }
.hero-copy .hero-cta { animation: fade-up 1s .34s var(--ease) both; }
.hero-note { margin-top: 18px; color: var(--dim); font-size: 14px; animation: fade-up 1s .44s var(--ease) both; }
.hero-note a { display: inline-flex; align-items: center; gap: 4px; color: var(--pink); }
.hero-note a:hover { text-decoration: underline; text-underline-offset: 4px; }

.stage { position: relative; z-index: 1; width: min(100% - 2 * var(--gutter), 1180px); margin: clamp(56px, 8vw, 92px) auto 0; perspective: 1800px; animation: stage-in 1.6s .35s var(--ease) both; }.stage-glow { position: absolute; inset: 6% 4% -8%; z-index: -1; background: radial-gradient(ellipse at 50% 40%, rgb(239 87 148 / .24), rgb(194 48 111 / .14) 45%, transparent 70%); filter: blur(64px); }
.stage-tilt { transform-origin: 50% 0; transform-style: preserve-3d; will-change: transform;
  transform: translateY(calc(var(--tilt, 1) * 26px)) rotateX(calc(var(--tilt, 1) * 20deg + var(--rx, 0deg))) rotateY(var(--ry, 0deg)) scale(calc(1 - var(--tilt, 1) * .05)); }
.window { position: relative; overflow: hidden; border: 1px solid rgb(140 170 255 / .14); border-radius: 18px; background: linear-gradient(180deg, rgb(15 20 32 / .95), rgb(7 10 17 / .97));
  box-shadow: 0 0 0 1px rgb(0 0 0 / .5), 0 50px 120px -30px rgb(0 0 0 / .9), 0 0 90px -24px rgb(239 87 148 / .22), inset 0 1px 0 rgb(255 255 255 / .09); }
.window::before { content: ""; position: absolute; inset: 0 8% auto; z-index: 5; height: 1px; background: linear-gradient(90deg, transparent, rgb(255 255 255 / .4), transparent); }
.window-bar { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .02); color: var(--muted); font-size: 13px; }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: rgb(255 255 255 / .14); }
.dots i:first-child { background: rgb(239 87 148 / .85); }
.window-title { display: inline-flex; align-items: center; gap: 8px; margin-inline: auto; color: var(--ink); font-weight: 560; opacity: .88; }
.window-title img { border-radius: 4px; }
.window-meta { padding: 2px 9px; border: 1px solid var(--line); border-radius: 7px; font-family: var(--mono); color: var(--dim); font-size: 12px; }

/* ---------- Simulated B站 live room (hero + trial) ---------- */
/* Drawn after B站's own web live room: a light page with two white cards. Left:
   the streamer bar (avatar, 点赞, pink 关注), the player and the gift bar. Right:
   房间观众 / 大航海 with the top three, the 弹幕区 with fan medals, the latest
   进场 notice beside 点赞, and the input with its pink 发送. Trimmed to what the
   demo needs. 小助手's lines are tinted pink: that is what BiliBridge does. The
   overlays inside the player are the streamer's OBS scene, as viewers see it. */
.blive { --bl-ink: #18191c; --bl-text: #61666d; --bl-dim: #9499a0; --bl-faint: #c9ccd0; --bl-line: #e3e5e7; --bl-soft: #f6f7f8;
  --bl-pink: #ff6699; --bl-pink-hover: #ff85ad; --bl-pink-wash: #fff1f6; --bl-blue: #00aeec;
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(250px, 26%, 300px); gap: 10px; min-width: 0; padding: 10px;
  background: radial-gradient(60% 70% at 0% 0%, #f7f9fc, transparent 70%), radial-gradient(50% 70% at 100% 100%, #d9e3ee, transparent 70%), linear-gradient(160deg, #e6ecf3, #eef1f6);
  color: var(--bl-ink); color-scheme: light; font-size: 13px; line-height: 1.5; }
.blive :focus-visible { outline-color: var(--bl-blue); }
.blive ::selection { background: rgb(0 174 236 / .22); color: inherit; }
.blive-main, .blive-side { min-width: 0; overflow: hidden; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgb(24 25 28 / .05), 0 8px 24px -16px rgb(24 25 28 / .25); }
.blive-main { display: flex; flex-direction: column; }
.blive-head { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 14px; }
.blive-avatar { position: relative; display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #ffb6d0, #ff6f9f); color: #fff; }
.blive-avatar b { font-size: 15px; font-weight: 700; }
.blive-avatar::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: #ffb027; }
.blive-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.blive-name { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.blive-likes { color: var(--bl-dim); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.blive-follow { display: inline-flex; flex: none; align-items: center; gap: 2px; height: 24px; padding: 0 12px 0 9px; border: 0; border-radius: 12px; background: var(--bl-pink); color: #fff; font-size: 12px; transition: background-color .2s; }
.blive-follow .i { width: 12px; height: 12px; stroke-width: 2.6; }
button.blive-follow:hover { background: var(--bl-pink-hover); }
.blive-actions { display: flex; flex: none; align-items: center; gap: 12px; margin-left: auto; }
.blive-hot { padding: 0 10px; border-radius: 10px; background: var(--bl-faint); color: #fff; font-size: 12px; line-height: 20px; }
.blive-area { color: var(--bl-text); font-size: 12px; }
.blive-share { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: var(--bl-ink); font-size: 12px; transition: background-color .2s; }
.blive-share .i { width: 16px; height: 16px; }
button.blive-share:hover { background: var(--bl-soft); }

/* The player: a soft game scene and a facecam, as an OBS scene would show them. */
.screen { position: relative; isolation: isolate; overflow: hidden; background: #0b0d16; }
.blive-player { aspect-ratio: 16 / 9; }
.scene { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.scene-sky { position: absolute; inset: 0; background: radial-gradient(60% 46% at 50% 60%, rgb(239 87 148 / .3), transparent 72%), radial-gradient(42% 36% at 18% 26%, rgb(126 140 255 / .14), transparent 70%),
  radial-gradient(30% 30% at 84% 20%, rgb(255 156 201 / .12), transparent 70%), linear-gradient(180deg, #0b1120, #151024 58%, #08070f); }
.scene-floor { position: absolute; left: -60%; right: -60%; bottom: -6%; height: 58%; transform: perspective(260px) rotateX(62deg); transform-origin: 50% 0;
  background-image: linear-gradient(rgb(255 156 201 / .13) 1px, transparent 1px), linear-gradient(90deg, rgb(255 156 201 / .13) 1px, transparent 1px); background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%); mask-image: linear-gradient(to bottom, transparent, #000 40%); animation: floor 2.8s linear infinite; }
.facecam { position: absolute; right: 2.5%; bottom: 5%; z-index: -1; width: 19%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px;
  background: radial-gradient(90% 80% at 50% 22%, #3b3352, #15121e 76%); box-shadow: 0 0 0 1px rgb(255 255 255 / .14), 0 14px 30px -10px rgb(0 0 0 / .7); }
.facecam i { position: absolute; left: 50%; bottom: -34%; width: 66%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: linear-gradient(180deg, #5b4e72, #332b47 72%); }
.facecam i::before { content: ""; position: absolute; left: 50%; top: -50%; width: 52%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: linear-gradient(180deg, #8c7ca6, #5b4e72); }

/* B站's own PK bar across the top of the player: 我方 red, 对方 blue. */
.pk { position: absolute; left: 50%; top: 8px; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 4px; width: min(40%, 380px); translate: -50% 0; animation: pk-in .7s var(--ease) both; }
.pk[hidden] { display: none; }
.pk.leaving { animation: pk-out .45s var(--ease) both; }
.pk-time { padding: 0 10px; border-radius: 10px; background: rgb(0 0 0 / .5); color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 600; line-height: 18px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.pk-bar { display: flex; width: 100%; height: 22px; overflow: hidden; border-radius: 11px; box-shadow: 0 0 0 1.5px rgb(255 255 255 / .75), 0 8px 20px rgb(0 0 0 / .35); }
.pk-ours, .pk-theirs { position: relative; display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; color: #fff; font-size: 11px; white-space: nowrap; text-shadow: 0 1px 2px rgb(0 0 0 / .3); }
.pk-ours { flex: none; width: 50%; padding-left: 10px; background: linear-gradient(90deg, #ff3d7a, #ff6c9a); transition: width .7s var(--ease); }
.pk-ours::after { content: ""; position: absolute; top: -2px; right: -4px; bottom: -2px; width: 7px; background: #fff; transform: skewX(-18deg); }
.pk-theirs { flex: 1; justify-content: flex-end; padding-right: 10px; background: linear-gradient(90deg, #4c9bff, #2d78f5); }
.pk-ours i, .pk-theirs i { font-style: normal; opacity: .92; }
.pk-ours b, .pk-theirs b { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pk-phase { padding: 0 9px; border-radius: 9px; background: rgb(0 0 0 / .42); color: #fff; font-size: 11px; line-height: 18px; }

/* 礼物心愿, as the gift-goals display draws it. */
.goal-overlay { position: absolute; top: 12px; right: 12px; z-index: 3; width: min(27%, 200px); padding: 8px 10px 9px; border: 1px solid rgb(255 255 255 / .16); border-radius: 12px;
  background: rgb(10 8 16 / .58); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.goal-overlay p { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: rgb(255 255 255 / .82); font-size: 11px; white-space: nowrap; }
.goal-overlay p span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.goal-overlay b { flex: none; color: #fff; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.goal-overlay i { display: block; height: 6px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: rgb(255 255 255 / .14); }
.goal-overlay i span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff9cc9, #ef5794); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.goal-overlay.done b { color: var(--pink-soft); }
.goal-overlay.reached { animation: goal-reached .9s var(--ease); }

/* Bullet comments as B站's player draws them: bold white with a dark outline,
   over the stream and its overlays. Your own get a frame. */
.danmaku-layer { position: absolute; inset: 8px 0 42%; z-index: 4; overflow: hidden; pointer-events: none; }
.dm { position: absolute; top: 0; left: 0; color: #fff; font-size: clamp(14px, 1.5vw, 20px); font-weight: 700; line-height: 30px; white-space: nowrap; will-change: transform;
  text-shadow: 1px 0 1px #000, -1px 0 1px #000, 0 1px 1px #000, 0 -1px 1px #000; }
.dm.self { padding: 0 5px; border: 1.5px solid #fff; line-height: 26px; }
.dm.bot { color: #ffd6e6; }
.dm.gold { color: #ffd8a8; }

.gift-overlay { position: absolute; left: 12px; bottom: 12px; z-index: 3; width: min(42%, 270px); }
.go-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; padding: 3px 10px; border-radius: 999px; color: rgb(255 255 255 / .78); font-size: 11px; }
.go-head b { color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.go-list { display: flex; flex-direction: column; gap: 6px; }
.go-item { position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; overflow: hidden; border-radius: 999px; animation: ribbon-in .7s var(--ease) both; }
.go-item.out { animation: ribbon-out .5s var(--ease) both; }
.go-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .45) 50%, transparent 65%); transform: translateX(-120%); animation: shine 1.2s .25s var(--ease) both; }
.go-item .av { width: 26px; height: 26px; font-size: 11px; }
.go-item p { display: flex; flex-direction: column; min-width: 0; font-size: 11px; line-height: 1.25; }
.go-item p b { overflow: hidden; color: #fff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.go-item p span { color: rgb(255 255 255 / .78); white-space: nowrap; }
.go-item .x { margin-left: auto; color: #ffd8e8; font-size: 15px; font-weight: 800; font-style: italic; font-variant-numeric: tabular-nums; text-shadow: 0 0 10px rgb(255 196 220 / .6); }
.go-item .x.bump { animation: bump .45s var(--ease); }
.go-item .gi { width: 26px; height: 26px; }
[data-skin="neon"] .go-head { background: linear-gradient(90deg, rgb(239 87 148 / .32), transparent); }
[data-skin="neon"] .go-item { border: 1px solid rgb(255 255 255 / .2); background: linear-gradient(90deg, rgb(239 87 148 / .62), rgb(194 48 111 / .4) 62%, rgb(255 156 201 / .12)); box-shadow: 0 0 22px rgb(239 87 148 / .28); }
[data-skin="glass"] .go-head { background: rgb(255 255 255 / .1); }
[data-skin="glass"] .go-item { border: 1px solid rgb(255 255 255 / .22); background: rgb(255 255 255 / .12); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
[data-skin="mono"] .go-head { border-radius: 6px; background: rgb(0 0 0 / .55); }
[data-skin="mono"] .go-item { border-radius: 8px; background: rgb(0 0 0 / .62); box-shadow: inset 2px 0 0 var(--pink); }
[data-skin="mono"] .go-item::after { display: none; }

/* Gift bar under the player: icon, name and price, as on B站. */
.blive-gifts { display: flex; align-items: stretch; gap: 4px; min-height: 76px; padding: 6px 10px; overflow-x: auto; scrollbar-width: none; }
.blive-gifts::-webkit-scrollbar { display: none; }
.gift-chip, .gift-btn { position: relative; display: inline-flex; flex: none; flex-direction: column; align-items: center; justify-content: center; width: 72px; padding: 4px 2px; border: 0; border-radius: 8px;
  background: none; color: var(--bl-ink); font-size: 12px; line-height: 1.4; white-space: nowrap; }
.gift-chip .gi, .gift-btn .gi { width: 34px; height: 34px; margin-bottom: 2px; }
.gift-chip small, .gift-btn small { color: var(--bl-dim); font-size: 10.5px; line-height: 1.3; }
.gift-btn { transition: background-color .2s, transform .25s var(--ease); }
.gift-btn:hover { background: var(--bl-soft); }
.gift-btn .gi { transition: transform .45s var(--ease); }
.gift-btn:hover .gi { transform: translateY(-2px) scale(1.06); }
.gift-btn.pop::after, .blive-like.pop::after { content: ""; position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 2px solid var(--bl-pink); border-radius: 50%; animation: burst .6s var(--ease) both; }

/* Right card: 房间观众 / 大航海, the top three, the 弹幕区, 点赞 and the input. */
.blive-side { display: flex; flex-direction: column; overflow: visible; contain: size; }
.blive-tabs { display: grid; flex: none; grid-template-columns: 1fr 1fr; align-items: center; height: 40px; border-bottom: 1px solid var(--bl-line); font-size: 13px; text-align: center; }
.blive-tabs > * { position: relative; }
.blive-tabs b { font-weight: 600; font-variant-numeric: tabular-nums; }
.blive-tabs > span { color: var(--bl-dim); }
.blive-tabs > b::after { content: ""; position: absolute; top: 3px; right: 0; bottom: 3px; border-right: 1px solid var(--bl-line); }
.rank-list { display: grid; flex: none; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 4px; min-height: 46px; padding: 8px 10px; border-bottom: 1px solid var(--bl-line); }
.rank-list li { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 12px; }
.rank-list .av { width: 24px; height: 24px; font-size: 10px; }
.rank-tag { flex: none; padding: 0 4px; border-radius: 3px 8px 8px 3px; background: linear-gradient(90deg, #ff5f8b, #ff9478); color: #fff; font-size: 9px; font-style: normal; font-weight: 700; line-height: 14px; }
.rank-name { overflow: hidden; color: var(--bl-text); text-overflow: ellipsis; white-space: nowrap; }
.rank-list li.rank-empty { display: block; grid-column: 1 / -1; color: var(--bl-dim); text-align: center; }
.blive-chat { position: relative; display: flex; flex: 1; flex-direction: column; min-height: 0; }
.feed-list { display: flex; flex: 1; flex-direction: column; gap: 2px; min-height: 0; padding: 8px 12px 4px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #d7dade transparent; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18px); mask-image: linear-gradient(to bottom, transparent, #000 18px); }
.feed-list > :first-child { margin-top: auto; }
.blive-tools { display: flex; flex: none; align-items: center; gap: 8px; min-height: 32px; padding: 0 8px 0 12px; }
.blive-interact { flex: 1; min-width: 0; overflow: hidden; color: var(--bl-dim); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.blive-interact b { color: var(--bl-text); font-weight: 400; }
.blive-interact.fresh { animation: note-in .35s var(--ease); }
.blive-like { position: relative; display: inline-grid; flex: none; place-items: center; width: 30px; height: 30px; margin-left: auto; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--bl-pink); transition: background-color .2s; }
.blive-like .i { width: 19px; height: 19px; fill: rgb(255 102 153 / .16); }
button.blive-like:hover { background: var(--bl-pink-wash); }
.blive-input { display: flex; flex: none; align-items: center; gap: 8px; margin: 0 10px 10px; padding: 7px 7px 7px 10px; border: 1px solid var(--bl-line); border-radius: 8px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.blive-input:focus-within { border-color: #c4c8cd; box-shadow: 0 0 0 3px rgb(0 174 236 / .12); }
.blive-input-field { display: flex; flex: 1; align-items: center; justify-content: space-between; min-width: 0; height: 30px; color: var(--bl-faint); font-size: 13px; }
.blive-input-field small { color: var(--bl-dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.blive-send, .send-btn { display: inline-grid; flex: none; place-items: center; height: 30px; padding: 0 16px; border: 0; border-radius: 15px; background: var(--bl-pink); color: #fff; font-size: 13px; }
.send-btn { transition: background-color .2s; }
.send-btn:hover { background: var(--bl-pink-hover); }
.chat-field { position: relative; display: flex; flex: 1; min-width: 0; }
.chat-field input { width: 100%; min-width: 0; height: 30px; padding: 0 42px 0 0; border: 0; outline: none; background: none; color: var(--bl-ink); font-size: 13px; }
.chat-field input::placeholder { color: var(--bl-faint); }
.chat-field.shake { animation: shake .4s ease; }
.chat-count { position: absolute; top: 50%; right: 2px; color: var(--bl-dim); font-size: 11px; font-variant-numeric: tabular-nums; translate: 0 -50%; pointer-events: none; }
.chat-count.full { color: var(--bl-pink); }

/* 弹幕区 rows the way B站 prints them: fan medal, grey name, then the line. */
.msg { flex: none; padding: 3px 0; font-size: 13px; line-height: 20px; animation: msg-in .45s var(--ease) both; }
.msg > p { min-width: 0; overflow-wrap: anywhere; }
.msg .who, .msg .colon { color: var(--bl-dim); }
.msg .text { color: var(--bl-text); }
.msg.self .who { color: var(--bl-blue); }
.msg.event > p { color: var(--bl-dim); font-size: 12px; }
.msg.gift > p { color: var(--bl-dim); }
.msg .gift-name { color: #f2833a; }
.msg.gift .gi { display: inline-block; width: 20px; height: 20px; margin-left: 3px; vertical-align: -5px; }
.msg.notice > p { color: #f25d8e; font-size: 12.5px; line-height: 1.6; }
.msg.system { display: flex; justify-content: center; padding: 4px 0; }
.msg.system > p { display: inline-flex; align-items: center; gap: 5px; padding: 1px 10px; border-radius: 10px; background: var(--bl-soft); color: var(--bl-text); font-size: 12px; }
.msg.system .i { width: 13px; height: 13px; color: var(--bl-pink); }
.msg.bot { margin: 2px -6px; padding: 5px 6px 6px; border-radius: 8px; background: var(--bl-pink-wash); box-shadow: inset 0 0 0 1px rgb(255 102 153 / .26); }
.msg.bot .who { color: var(--bl-pink); }
.msg.bot .text { color: var(--bl-ink); }
.msg .meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: #e9457e; font-size: 10.5px; line-height: 16px; }
.msg .tag { padding: 0 6px; border-radius: 4px; background: rgb(255 102 153 / .12); }
.msg .len { margin-left: auto; color: var(--bl-dim); font-variant-numeric: tabular-nums; }
.mention { color: var(--bl-blue); }
.msg.typing > p { color: var(--bl-dim); font-size: 12px; }
.msg.typing > p > i { display: inline-block; width: 4px; height: 4px; margin-left: 3px; border-radius: 50%; background: var(--bl-pink); vertical-align: middle; animation: typing 1s ease-in-out infinite; }
.msg.typing > p > i:nth-of-type(2) { animation-delay: .15s; }
.msg.typing > p > i:nth-of-type(3) { animation-delay: .3s; }
/* Fan medals as one rounded pill, coloured by level like B站's 粉丝团灯牌. */
.medal { --m1: #6d82d4; --m2: #92a3e4; display: inline-flex; align-items: center; gap: 3px; height: 16px; margin-right: 4px; padding: 0 5px 0 6px; border-radius: 8px;
  background: linear-gradient(90deg, var(--m1), var(--m2)); color: #fff; font-size: 10px; line-height: 16px; vertical-align: -2px; white-space: nowrap; }
.medal[data-tier="2"] { --m1: #b674b0; --m2: #d59bca; }
.medal[data-tier="3"] { --m1: #e0709f; --m2: #f39dbf; }
.medal[data-tier="4"] { --m1: #3a9be6; --m2: #6fc2f6; }
.medal-name { display: inline-flex; align-items: center; gap: 1px; }
.medal-name .i { width: 10px; height: 10px; stroke-width: 2.4; }
.medal-level { font-weight: 700; font-variant-numeric: tabular-nums; }
.role { display: inline-block; height: 16px; margin-right: 4px; padding: 0 3px; border: 1px solid #f6b44b; border-radius: 3px; color: #f29a12; font-size: 10px; line-height: 14px; vertical-align: -2px; }
.av { display: inline-grid; flex: none; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, hsl(var(--h, 200) 62% 58%), hsl(calc(var(--h, 200) + 40) 52% 40%)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22); }
.av-bot { background: linear-gradient(135deg, #ef5794, #ff9cc9); color: #12090d; }
.av-a { --h: 168; } .av-b { --h: 205; } .av-c { --h: 28; } .av-d { --h: 226; } .av-e { --h: 296; } .av-f { --h: 262; }

/* Numbered pins: which part of the room BiliBridge looks after. */
.mark { position: absolute; top: -9px; left: -9px; z-index: 6; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--pink); color: #12090d; font-family: var(--mono); font-size: 12px; font-weight: 800; box-shadow: 0 0 0 3px rgb(239 87 148 / .22), 0 6px 16px rgb(0 0 0 / .45); }
.blive-chat .mark { top: 10px; left: -11px; }
.stage-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.stage-legend li { display: flex; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, rgb(130 160 255 / .05), rgb(130 160 255 / .015)); }
.stage-legend b { display: grid; flex: none; place-items: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--pink); color: #12090d; font-family: var(--mono); font-size: 12px; font-weight: 800; }
.stage-legend p { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.stage-legend strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 14.5px; font-weight: 620; }

/* ---------- Ticker & stats ---------- */
.ticker { position: relative; margin-top: clamp(72px, 10vw, 120px); padding: 18px 0; overflow: hidden; border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
.ticker-track { display: flex; width: max-content; animation: marquee 56s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; color: var(--muted); font-size: 15px; white-space: nowrap; }
.ticker-track span::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: clamp(72px, 10vw, 120px); overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--line); }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 30px 26px; background: var(--bg); }
.stat b { font-family: var(--mono); font-size: clamp(38px, 4.6vw, 58px); font-weight: 700; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 22%, #a7b3cc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat b em { margin-left: 5px; font-size: .36em; font-style: normal; letter-spacing: 0; }
.stat > span { margin-top: 10px; font-weight: 620; }
.stat small { color: var(--dim); font-size: 13px; }

/* ---------- Sections ---------- */
.section { position: relative; padding-top: clamp(104px, 13vw, 176px); }
.section-head { max-width: 760px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--pink); font-family: var(--mono); font-size: 13px; font-weight: 650; letter-spacing: .2em; }
.kicker::before { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--pink)); }
.section-head h2, .final h2 { margin-top: 18px; font-size: clamp(32px, 4.7vw, 58px); font-weight: 740; line-height: 1.14; letter-spacing: -.035em;
  background: linear-gradient(180deg, #fff 35%, #a7b3cc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 640px; margin-top: 20px; text-wrap: pretty; color: var(--muted); font-size: clamp(16px, 1.4vw, 18px); line-height: 1.85; }
.center .lead, .final .lead { margin-inline: auto; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: 60px; }
.card, .trust-card { position: relative; isolation: isolate; overflow: hidden; border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(180deg, rgb(130 160 255 / .06), rgb(130 160 255 / .015)); transition: border-color .4s, background-color .4s; }
.card { display: flex; flex-direction: column; gap: 28px; min-height: 330px; padding: 30px; }
.card::before, .trust-card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgb(239 87 148 / .1), transparent 42%); }
.card::after, .trust-card::after { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; opacity: 0; pointer-events: none; transition: opacity .5s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgb(255 255 255 / .32), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.card:hover::before, .card:hover::after, .trust-card:hover::before, .trust-card:hover::after { opacity: 1; }
.card-chat { grid-column: 1 / span 8; grid-row: span 2; }
.card-pk, .card-gifts { grid-column: 9 / span 4; }
.card-box, .card-overlay { grid-column: span 6; }
.card-mini { grid-column: span 3; gap: 0; min-height: 0; padding: 24px; }
.card-mini .card-icon { width: 40px; height: 40px; border-radius: 12px; }
.card-mini .card-icon .i { width: 19px; height: 19px; }
.card-mini h3 { margin-top: 18px; font-size: 17px; }
.card-mini p { margin-top: 6px; font-size: 14px; line-height: 1.7; }
.card-icon { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgb(255 255 255 / .1); border-radius: 13px;
  background: linear-gradient(135deg, rgb(239 87 148 / .22), rgb(194 48 111 / .14)); color: var(--pink); box-shadow: 0 8px 24px -8px rgb(239 87 148 / .5); }
.card-icon .i { width: 22px; height: 22px; }
/* Safety reads as the system's job: cyan instead of the brand pink. */
.card h3, .trust-card h3 { margin-top: 22px; font-size: 21px; font-weight: 660; letter-spacing: -.01em; }
.card p, .trust-card p { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.78; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tags li { padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgb(140 170 255 / .05); color: var(--muted); font-size: 12.5px; }

.mini-chat { display: flex; flex: 1; flex-direction: column; justify-content: flex-end; gap: 12px; min-height: 280px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: rgb(2 4 10 / .4); }
.mc-row { display: flex; align-items: flex-start; gap: 10px; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .mc-row:not(.on) { opacity: 0; transform: translateY(14px) scale(.98); }
.mc-row .av { width: 30px; height: 30px; font-size: 13px; }
.mc-row p { padding-top: 4px; color: var(--muted); font-size: 14px; }
.mc-row p b { margin-right: 6px; color: var(--ink); font-weight: 600; }
.mc-row.bot p { padding: 8px 12px; border: 1px solid rgb(239 87 148 / .3); border-radius: 12px; background: linear-gradient(135deg, rgb(239 87 148 / .14), rgb(255 156 201 / .06)); color: #fff2f7; }
.mc-row.bot small { display: block; margin-top: 2px; color: rgb(255 156 201 / .85); font-size: 11px; }
.mc-row em { margin-right: 4px; color: var(--pink-soft); font-style: normal; font-weight: 600; }
.mini-pk { margin-top: auto; }
.mp-bar { position: relative; height: 10px; overflow: hidden; border-radius: 999px; background: linear-gradient(90deg, #ff7aa8, #e14182); }
.mp-bar span { position: absolute; inset: 0; transform-origin: 0 50%; border-radius: 999px; background: linear-gradient(90deg, #ff9cc9, #ef5794); box-shadow: 0 0 14px rgb(239 87 148 / .8); animation: tug 4.5s ease-in-out infinite alternate; }
.mp-lines { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin-top: 16px; }
.mp-lines li, .mini-ribbon li { transition: opacity .55s var(--ease), transform .55s var(--ease); }
.js .mp-lines li:not(.on), .js .mini-ribbon li:not(.on) { opacity: 0; transform: translateX(-16px); }
.mp-lines li { padding: 3px 10px; border: 1px solid rgb(239 87 148 / .4); border-radius: 999px; background: rgb(239 87 148 / .1); color: #ffe6f0; font-size: 12.5px; }
.mini-ribbon { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.mini-ribbon li { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border: 1px solid rgb(255 255 255 / .16); border-radius: 999px;
  background: linear-gradient(90deg, rgb(239 87 148 / .45), rgb(194 48 111 / .28) 65%, transparent); }
.mini-ribbon .av { width: 28px; height: 28px; font-size: 12px; }
.mini-ribbon p { margin: 0; color: rgb(255 255 255 / .82); font-size: 12.5px; line-height: 1.3; }
.mini-ribbon p b { display: block; color: #fff; font-size: 13px; }
.mini-ribbon .gi { margin-left: auto; }
.mini-bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: auto; }
.bars { display: flex; flex: 1; align-items: flex-end; gap: 7px; max-width: 320px; height: 104px; }
.bars i { flex: 1; height: var(--v, 50%); border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, var(--pink-soft), rgb(255 156 201 / .15));
  transform-origin: bottom; transition: transform .9s var(--ease) var(--d, 0s); }
.js .mini-bars:not(.in) .bars i { transform: scaleY(0); }
.bars i:nth-child(1) { --v: 42%; } .bars i:nth-child(2) { --v: 66%; --d: .06s; } .bars i:nth-child(3) { --v: 30%; --d: .12s; } .bars i:nth-child(4) { --v: 78%; --d: .18s; }
.bars i:nth-child(5) { --v: 24%; --d: .24s; } .bars i:nth-child(6) { --v: 58%; --d: .3s; } .bars i:nth-child(7) { --v: 90%; --d: .36s; } .bars i:nth-child(8) { --v: 48%; --d: .42s; } .bars i:nth-child(9) { --v: 100%; --d: .48s; }
.bars i:nth-child(3), .bars i:nth-child(5) { background: linear-gradient(180deg, var(--pink), rgb(239 87 148 / .15)); }
.mini-bars p { flex: none; text-align: right; }
.mini-bars small { display: block; color: var(--dim); font-size: 12px; }
.mini-bars b { color: var(--pink-soft); font-size: 30px; font-weight: 720; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.mini-bars span { margin-left: 4px; color: var(--muted); font-size: 13px; }
.mini-bubbles { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: auto; }
.mini-bubbles li { display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 6px 14px 6px 6px; border: 1px solid var(--line-strong); border-radius: 16px 16px 16px 4px; background: var(--bg);
  transition: opacity .55s var(--ease), transform .55s var(--ease); }
.js .mini-bubbles li:not(.on) { opacity: 0; transform: translateY(14px); }
.mini-bubbles li.tier-captain { border-color: rgb(239 87 148 / .45); background: rgb(239 87 148 / .12); }
.mini-bubbles .av { width: 28px; height: 28px; font-size: 12px; }
.mini-bubbles p { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.35; }
.mini-bubbles p b { display: block; color: var(--dim); font-size: 11px; font-weight: 600; }
.mini-bubbles .tier-captain p b::after { content: " · 舰长"; color: var(--pink); }
.mini-goal { margin-top: 18px; }
.mini-goal div { display: flex; justify-content: space-between; color: var(--muted); font-size: 12.5px; }
.mini-goal b { color: var(--ink); font-variant-numeric: tabular-nums; }
.mini-goal i { position: relative; display: block; height: 8px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: var(--raise-2); }
.mini-goal i span { position: absolute; inset: 0; border-radius: inherit; background: var(--pink); transform: scaleX(.74); transform-origin: left; transition: transform 1.4s var(--ease) .2s; }
.js .card-mini:not(.in) .mini-goal i span { transform: scaleX(0); }
.mini-rank, .mini-queue { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.mini-rank li, .mini-queue li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.mini-rank b, .mini-queue b { display: grid; flex: none; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--raise-2); color: var(--muted); font-size: 11px; }
.mini-rank li:first-child b, .mini-queue li:first-child b { background: var(--ink); color: var(--bg); }
.mini-rank span, .mini-queue span { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.mini-rank em, .mini-queue em { margin-left: auto; color: var(--dim); font-size: 12px; font-style: normal; white-space: nowrap; }
.mini-rank li:first-child em { color: var(--pink); font-weight: 600; }
.mini-lottery { display: flex; align-items: baseline; gap: 12px; margin-top: 16px; }
.mini-lottery b { color: var(--ink); font-family: var(--mono); font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mini-lottery span { color: var(--dim); font-size: 12px; }

/* Trial */
.assurance { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.assurance li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border: 1px solid rgb(255 156 201 / .24); border-radius: 9px; background: rgb(255 156 201 / .08); color: #ffd8e8; font-size: 13px; }
.assurance .i { color: var(--pink-soft); }
.trial-shell { position: relative; display: flex; flex-direction: column; gap: 14px; margin-top: 56px; padding: 16px;
  border: 1px solid var(--line-strong); border-radius: 22px; background: linear-gradient(180deg, rgb(130 160 255 / .05), rgb(130 160 255 / .015));
  box-shadow: 0 60px 140px -50px rgb(0 0 0 / .9), 0 0 120px -50px rgb(239 87 148 / .28), inset 0 1px 0 rgb(255 255 255 / .07); }
.trial-shell::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: radial-gradient(60% 50% at 30% 0%, rgb(239 87 148 / .16), transparent 70%); filter: blur(30px); }
/* The visitor's own controls: who you are, entering again, a PK and the crowd. */
.trial-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 2px 2px 0; }
.trial-bar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.you { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.you b { overflow: hidden; max-width: 11em; color: var(--ink); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.act { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgb(140 170 255 / .05); font-size: 13.5px; text-align: left;
  transition: background-color .25s, border-color .25s, transform .25s var(--ease), opacity .25s; }
.act:hover { border-color: rgb(255 255 255 / .26); background: rgb(255 255 255 / .08); }
.act:active, .gift-btn:active, .blive-like:active { transform: scale(.96); }
.act .i { width: 17px; height: 17px; color: var(--pink); }
.act-pk .i { color: var(--pink-pale); }
.act[aria-disabled="true"] { opacity: .5; }
.switch { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 13.5px; text-align: left; transition: background-color .2s, color .2s; }
.switch:hover { background: rgb(255 255 255 / .05); color: var(--ink); }
.switch[aria-checked="true"] { color: var(--ink); }
.track { position: relative; flex: none; width: 34px; height: 20px; border-radius: 999px; background: linear-gradient(90deg, #ef5794, #f46aa3) left center / 0% 100% no-repeat, rgb(140 170 255 / .16); transition: background-size .36s var(--ease), box-shadow .3s; }
.thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .45); transition: transform .4s var(--ease); }
.switch[aria-checked="true"] .track { background-size: 100% 100%, auto; }
.switch[aria-checked="true"] .thumb { transform: translateX(14px); }
.blive-trial { border-radius: 14px; }

/* ---------- Trial console ---------- */
/* The streamer's side, drawn like the real console's 直播设置 page (web/style.css
   4.1): the top bar with breadcrumbs and the account chip, the workbench status
   bar, 自动行为一览 with the console's own switches, names and groups, 展示与 OBS
   and three live figures. Only what the trial can show is kept. */
.tc-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 6px; padding: 0 2px; color: var(--dim); font-size: 12.5px; }
.tc-caption b { color: var(--ink); font-size: 14px; font-weight: 650; }
.tc { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 16px; background: #05070d; box-shadow: inset 0 1px 0 rgb(255 255 255 / .05); }
.tc-top { display: flex; align-items: center; gap: 16px; min-height: 58px; padding: 0 18px; border-bottom: 1px solid rgb(140 170 255 / .07); background: rgb(5 7 13 / .76); }
.tc-brand { display: inline-flex; flex: none; align-items: center; gap: 10px; padding-right: 18px; border-right: 1px solid var(--line); }
.tc-brand img { border-radius: 7px; }
.tc-brand > span { display: flex; flex-direction: column; line-height: 1.2; }
.tc-brand b { color: var(--ink); font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.tc-brand small { color: var(--muted); font-size: 11px; }
.tc-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--dim); font-size: 13px; white-space: nowrap; }
.tc-crumbs i { color: rgb(140 170 255 / .32); font-style: normal; }
.tc-crumbs b { color: var(--ink); font-weight: 600; }
.tc-account { display: inline-flex; flex: none; align-items: center; gap: 9px; margin-left: auto; padding: 5px 12px 5px 5px; border: 1px solid var(--line); border-radius: 10px; background: rgb(140 170 255 / .04); }
.tc-account-av { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #ff9cc9, #ef5794); color: #12090d; font-size: 12px; font-weight: 700; }
.tc-account > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.tc-account b { color: var(--ink); font-size: 12.5px; font-weight: 600; }
.tc-account small { color: var(--dim); font-size: 10.5px; }
.tc-page { display: flex; flex-direction: column; gap: 16px; padding: 22px 22px 18px; }
.tc-head h3 { width: fit-content; background: linear-gradient(180deg, #ffffff 30%, #a7b3cc); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 26px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.tc-head p { margin-top: 6px; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.tc-statusbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px 0; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, rgb(130 160 255 / .045), transparent 70%), #0a0e17; }
.tc-metric { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 4px 14px; min-width: 0; padding: 0 20px; border-right: 1px solid var(--line); }
.tc-metric:last-child { border-right: 0; }
.tc-metric > span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.tc-metric > span .i { width: 15px; height: 15px; color: #f5f5f5; }
.tc-metric > strong { color: var(--ink); font-size: 13px; font-weight: 600; text-align: right; white-space: nowrap; }
.tc-metric > strong.ok { color: #4fe0a4; }
.tc-metric > small { grid-column: 1 / -1; min-width: 0; overflow: hidden; color: var(--dim); font-size: 11.5px; line-height: 1.6; text-overflow: ellipsis; white-space: nowrap; }
.feed-status { display: flex; align-items: center; gap: 6px; transition: color .3s; }
.feed-status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-status i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #4fe0a4; transition: background-color .3s; }
.feed-status.busy { color: var(--pink-soft); }
.feed-status.busy i { background: var(--pink); animation: blink .9s ease-in-out infinite; }
.tc-label { margin-bottom: -6px; color: var(--ink); font-size: 14px; font-weight: 650; }
.tc-switchboard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.tc-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.tc-group { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #0f1421; }
.tc-group > strong { margin-bottom: 2px; color: var(--ink); font-size: 13px; font-weight: 600; }
.tc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; min-width: 0; }
.tc-switch { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; text-align: left; transition: color .2s; }
.tc-switch:hover, .tc-switch[aria-checked="true"] { color: var(--ink); }
.tc-track { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; background: linear-gradient(90deg, #ef5794, #f46aa3) left center / 0% 100% no-repeat, rgb(140 170 255 / .16);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / .3); transition: background-size .36s var(--ease); }
.tc-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .45); transition: transform .4s var(--ease); }
.tc-switch[aria-checked="true"] .tc-track { background-size: 100% 100%, auto; }
.tc-switch[aria-checked="true"] .tc-track::after { transform: translateX(18px); }
.tc-row > small { flex-basis: 100%; margin: -7px 0 3px 53px; color: var(--dim); font-size: 11px; }
.tc-hint { margin-top: 2px; color: var(--dim); font-size: 11.5px; line-height: 1.65; }
.tc-tag { padding: 0 6px; border-radius: 5px; background: rgb(255 196 220 / .12); color: var(--pink-pale); font-size: 10.5px; font-style: normal; line-height: 18px; }
.tc-bottom { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px; }
.tc-display-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 46px; padding: 6px 0; }
.tc-display-row + .tc-display-row { border-top: 1px solid var(--line); }
.tc-display-row > span { display: flex; flex-direction: column; color: var(--ink); font-size: 13px; line-height: 1.4; }
.tc-display-row small { color: var(--dim); font-size: 11px; }
.tc-display-row > b { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.skin-switch { display: flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgb(0 0 0 / .3); }
.skin-switch button { padding: 4px 12px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 12px; transition: background-color .25s, color .25s; }
.skin-switch button:hover { color: var(--ink); }
.skin-switch button[aria-pressed="true"] { background: rgb(255 255 255 / .14); color: #fff; }
.tc-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tc-card { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #0a0e17; }
.tc-card:first-child { border-color: rgb(239 87 148 / .28); background: radial-gradient(120% 120% at 100% 0%, rgb(239 87 148 / .12), transparent 60%), #0a0e17; }
.tc-card > span { color: var(--muted); font-size: 12px; }
.tc-card strong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; color: var(--ink); font-family: var(--mono); font-size: 24px; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tc-card strong small { color: var(--muted); font-family: var(--font); font-size: 12px; font-weight: 500; }
.tc-card > small { color: var(--dim); font-size: 11px; }
.tc-note { min-height: 1.7em; margin-top: -4px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.tc-note.fresh { animation: note-in .4s var(--ease); }
.trial-note { max-width: 900px; padding: 0 4px 2px; color: var(--dim); font-size: 12.5px; line-height: 1.75; }

/* Workflow */
.workflow-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 7vw, 110px); align-items: start; }
.workflow-head { position: sticky; top: 130px; }
.workflow-head .btn { margin-top: 34px; }
.steps { position: relative; display: flex; flex-direction: column; gap: 22px; padding-left: 50px; }
.steps::before, .steps::after { content: ""; position: absolute; top: 14px; bottom: 14px; left: 13px; width: 2px; border-radius: 2px; }
.steps::before { background: rgb(140 170 255 / .1); }
.steps::after { background: var(--pink); transform: scaleY(var(--progress, 0)); transform-origin: top; }
.step { position: relative; }
.step-dot { position: absolute; top: 32px; left: -50px; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid rgb(255 255 255 / .16); border-radius: 50%; background: var(--bg); transition: border-color .5s, box-shadow .5s; }
.step-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgb(255 255 255 / .22); transition: background-color .5s, transform .5s var(--ease); }
.step.active .step-dot { border-color: var(--pink); box-shadow: 0 0 0 6px rgb(239 87 148 / .12); }
.step.active .step-dot::after { background: var(--pink); transform: scale(1.25); }
.step-card { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, rgb(130 160 255 / .05), rgb(130 160 255 / .012)); transition: border-color .6s, background-color .6s, box-shadow .6s; }
.step.active .step-card { border-color: rgb(255 255 255 / .16); background-color: rgb(255 255 255 / .03); }
.step-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgb(255 255 255 / .1); border-radius: 12px; background: rgb(255 255 255 / .05); color: var(--muted); transition: color .5s, background-color .5s; }
.step.active .step-icon { background: rgb(239 87 148 / .14); color: var(--pink); }
.step-icon .i { width: 21px; height: 21px; }
.step-index { margin-top: 18px; color: var(--pink); font-family: var(--mono); font-size: 12px; letter-spacing: .16em; }
.step h3 { margin-top: 6px; font-size: 21px; font-weight: 660; }
.step p:not(.step-index) { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.78; }

/* Developers */
.dev-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.checks { display: flex; flex-direction: column; gap: 18px; margin: 30px 0 34px; }
.checks li { display: flex; gap: 12px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.checks .i { margin-top: 4px; color: var(--pink); }
.checks b { display: block; color: var(--ink); font-weight: 620; }
.checks code { padding: 1px 6px; border-radius: 6px; background: rgb(255 255 255 / .07); color: #ffd8e8; font-family: var(--mono); font-size: .88em; }
/* The code window's glow reaches past its column; on the narrowest phones that would widen the page. */
.developers { overflow-x: clip; }
.code-stack { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.code-stack::before { content: ""; position: absolute; inset: 10% -6% -4%; z-index: -1; background: radial-gradient(closest-side, rgb(194 48 111 / .22), transparent); filter: blur(50px); }
.code-window { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 14px; background: rgb(6 9 16 / .94); box-shadow: 0 40px 100px -34px rgb(0 0 0 / .85), inset 0 1px 0 rgb(255 255 255 / .06); }
.code-bar { display: flex; align-items: center; gap: 16px; height: 46px; padding: 0 14px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .02); }
.code-tabs { display: flex; gap: 4px; }
.code-tabs button { padding: 5px 12px; border: 0; border-radius: 8px; background: none; color: var(--dim); font-family: var(--mono); font-size: 12.5px; transition: background-color .2s, color .2s; }
.code-tabs button:hover { color: var(--ink); }
.code-tabs button[aria-selected="true"] { background: rgb(255 255 255 / .08); color: var(--ink); }
.code { margin: 0; padding: 18px 0 20px; overflow-x: auto; color: #d6dcea; font-family: var(--mono); font-size: 13px; line-height: 1.8; counter-reset: line; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .14) transparent; }
.code:focus-visible { outline-offset: -3px; }
.code code { font: inherit; }
.code .ln { display: inline-block; min-width: 100%; padding-right: 24px; }
.code .ln::before { counter-increment: line; content: counter(line); display: inline-block; width: 3.4em; padding-right: 1.3em; color: rgb(255 255 255 / .2); text-align: right; -webkit-user-select: none; user-select: none; }
.code .k { color: #f5a3c7; } .code .s { color: #ffc4dc; } .code .f { color: #ffc4dc; } .code .t { color: #ffc4dc; }
.code .p { color: #ff9ec4; } .code .n { color: #ffb3d1; } .code .c { color: #66708a; font-style: italic; }
.js .code:not(.typed) .ln { opacity: 0; transform: translateX(-8px); }
.js .code .ln { transition: opacity .35s var(--ease), transform .35s var(--ease); }
.js .code:not(.typed) .ln.on { opacity: 1; transform: none; }
.code .ln.caret::after { content: ""; display: inline-block; width: 7px; height: 1.15em; margin-left: 3px; vertical-align: -3px; background: var(--pink); animation: caret 1s steps(1) infinite; }
.terminal { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: rgb(4 7 13 / .94); font-family: var(--mono); font-size: 12px; }
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--dim); }
.terminal-bar .pulse { width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--pink-soft); animation: pulse 2s ease-out infinite; }
.terminal-lines { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; height: 160px; padding: 10px 14px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%); mask-image: linear-gradient(to bottom, transparent, #000 45%); }
.terminal-lines li { flex: none; overflow: hidden; color: #a3a3a8; text-overflow: ellipsis; white-space: nowrap; animation: term-in .45s var(--ease) both; }
.terminal-lines .ts { color: rgb(255 255 255 / .28); }
.terminal-lines .ev { display: inline-block; width: 7.5em; color: var(--pink); }

/* Security */
.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 60px; }
.trust-card { min-height: 250px; padding: 28px 24px; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(36px, 7vw, 110px); align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 4px; font-size: 17px; font-weight: 620; list-style: none; cursor: pointer; transition: color .2s; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--ink); }
.faq-list summary .i { width: 20px; height: 20px; color: var(--dim); transition: transform .5s var(--ease), color .3s; }
.faq-list details[open]:not(.closing) summary .i { color: var(--pink); transform: rotate(45deg); }
.faq-body { overflow: hidden; }
.faq-body p { max-width: 660px; padding: 0 4px 24px; color: var(--muted); line-height: 1.9; }

/* Final call to action */
.final { position: relative; margin-top: clamp(104px, 13vw, 176px); padding-block: clamp(104px, 13vw, 170px); overflow: hidden; border-top: 1px solid var(--line); text-align: center; }
.final-orb { position: absolute; top: 50%; left: 50%; width: min(980px, 130vw); aspect-ratio: 1; translate: -50% -50%; pointer-events: none; }
.final-orb i { position: absolute; inset: 0; border-radius: 50%; }
.final-orb i:nth-child(1) { inset: 8%; opacity: .75; filter: blur(70px); animation: spin 22s linear infinite;
  background: conic-gradient(from 0deg, transparent, rgb(239 87 148 / .36), transparent 28%, rgb(194 48 111 / .32), transparent 58%, rgb(239 87 148 / .26), transparent 82%); }
.final-orb i:nth-child(2) { inset: 20%; border: 1px solid rgb(255 255 255 / .06); }
.final-orb i:nth-child(3) { inset: 33%; border: 1px solid rgb(255 255 255 / .08); box-shadow: inset 0 0 120px rgb(239 87 148 / .12); }
.final-inner { position: relative; }
.final h2 { font-size: clamp(34px, 5.8vw, 70px); }

/* Footer */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--line); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-brand p { margin-top: 12px; color: var(--dim); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 32px clamp(32px, 6vw, 88px); }
.footer-links h3 { margin-bottom: 12px; color: var(--dim); font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.footer-links a { display: block; padding: 5px 0; color: var(--muted); font-size: 14px; transition: color .2s; }
.footer-links a:hover { color: var(--ink); }
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12.5px; }
.footer-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.motion-control { min-height: 32px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 9px; background: none; color: var(--muted); font-size: 12.5px; transition: color .2s, border-color .2s; }
.motion-control:hover:not(:disabled) { border-color: rgb(255 255 255 / .3); color: var(--ink); }
.motion-control:disabled { cursor: default; opacity: .7; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; }
.js .reveal.in { opacity: 1; animation: reveal 1.1s var(--ease) var(--d, 0ms) backwards; }

/* ---------- Keyframes ---------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes line-up { from { opacity: 0; transform: translateY(105%) rotate(2deg); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes stage-in { from { opacity: 0; transform: translateY(70px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes reveal { from { opacity: 0; transform: translateY(30px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes sheen { to { background-position: -240% 0; } }
@keyframes drift { from { transform: translate3d(-4%, -2%, 0) scale(1); } to { transform: translate3d(5%, 4%, 0) scale(1.12); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes floor { to { background-position: 0 44px; } }
@keyframes goal-reached { 40% { transform: scale(1.05); } }
@keyframes note-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes msg-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ribbon-in { from { opacity: 0; transform: translateX(-40px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes ribbon-out { to { opacity: 0; transform: translateX(-24px) scale(.94); } }
@keyframes shine { to { transform: translateX(120%); } }
@keyframes bump { 40% { transform: scale(1.45); } }
@keyframes pk-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pk-out { to { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes typing { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes tug { from { transform: scaleX(.4); } to { transform: scaleX(.66); } }
@keyframes burst { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(2.2); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes caret { 50% { opacity: 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(255 156 201 / .5); } 100% { box-shadow: 0 0 0 10px rgb(255 156 201 / 0); } }
@keyframes term-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(1turn); } }

/* Animations that cost nothing off screen are still paused while hidden. */
.is-offscreen .scene-floor, .is-offscreen .feed-status i, .is-offscreen .mp-bar span,
.is-offscreen .final-orb i, .ticker-track.is-offscreen { animation-play-state: paused; }

/* ---------- Responsive ---------- */
/* ---------- Promo film ----------
   Frames come from /promo-film.mjs and /promo-film.css (pf- classes).
   1. Title sequence: on a session's first visit the film's opening covers the
      viewport, then hands off to the hero headline below (home.mjs filmIntro).
   2. "观看宣传片" plays the whole film in a dialog with a real end card. */
.film-intro { position: fixed; inset: 0; z-index: 80; overflow: hidden; background: var(--bg); transition: opacity .85s var(--ease); }
.film-intro[hidden] { display: none; }
.film-intro.leaving { opacity: 0; pointer-events: none; }
.film-intro.leaving-fast { opacity: 0; pointer-events: none; transition-duration: .28s; }
.film-intro-screen { position: absolute; inset: 0; overflow: hidden; }
.film-skip { position: absolute; right: max(16px, var(--gutter)); bottom: max(20px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: rgb(5 7 13 / .6); color: var(--muted); font-size: 13px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.film-skip:hover { color: var(--ink); border-color: rgb(255 255 255 / .26); }
/* While the title sequence runs, the hero waits; its entrance animations start
   when the class goes away, so the headline lands as the film hands over. */
.film-intro-on .nav, .film-intro-on .hero-copy, .film-intro-on .hero .stage { visibility: hidden; }
.film-intro-on .hero-copy, .film-intro-on .hero-copy *, .film-intro-on .hero .stage { animation-name: none !important; }
.film-intro-on body { overflow: hidden; }

.film-open { gap: 10px; padding-left: 8px; border-color: var(--line-strong); background: transparent; color: var(--ink); }
.film-open:hover { border-color: rgb(255 255 255 / .26); background: rgb(255 255 255 / .05); }
.film-open small { color: var(--dim); font-size: 12px; font-weight: 500; }
.film-open-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgb(239 87 148 / .5); background: rgb(239 87 148 / .14); color: var(--pink-soft); }
.film-open-icon .i { width: 13px; height: 13px; fill: currentColor; stroke-width: 1.2; }
.film-open:hover .i { transform: none; }
html:not(.js) .film-open { display: none; }

.film-dialog { width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: var(--ink); overflow: hidden; }
.film-dialog[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.film-dialog::backdrop { background: rgb(0 0 0 / .85); }
.film-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 12px; }
.film-error { position: absolute; z-index: 1; text-align: center; }
.film-error p { margin-bottom: 12px; }
.film-screen { position: relative; width: min(100%, (100dvh - 96px) * 16 / 9); aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg); cursor: pointer; }
.film-end { position: absolute; left: 50%; top: 50%; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: min(100% - 32px, 640px);
  translate: -50% calc(min(100vw - 24px, (100dvh - 96px) * 16 / 9) * 9 / 16 * .157 - 50%); opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); }
.film-end.shown { opacity: 1; pointer-events: auto; }
.film-end .btn-quiet { border-color: var(--line-strong); background: transparent; color: var(--ink); }
.film-end .btn-quiet:hover { background: rgb(255 255 255 / .07); }
.film-end .btn-quiet .i { width: 16px; height: 16px; }
.film-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%;
  background: rgb(5 7 13 / .7); color: var(--ink); }
.film-close:hover { background: rgb(255 255 255 / .1); }
.film-bar { display: flex; align-items: center; gap: 12px; width: min(100%, 1200px); margin: 0 auto; padding: 8px 16px max(10px, env(safe-area-inset-bottom)); }
.film-btn { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--ink); }
.film-btn:hover { background: rgb(255 255 255 / .08); }
.film-btn .i { width: 18px; height: 18px; }
.film-btn [href="#i-play"] { fill: currentColor; }
.film-track { position: relative; flex: 1; min-width: 0; padding-bottom: 20px; }
.film-scrub { --p: 0; display: block; width: 100%; height: 22px; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
.film-scrub::-webkit-slider-runnable-track { height: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--pink) calc(var(--p) * 100%), rgb(255 255 255 / .16) 0); }
.film-scrub::-moz-range-track { height: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--pink) calc(var(--p) * 100%), rgb(255 255 255 / .16) 0); }
.film-scrub::-webkit-slider-thumb { width: 13px; height: 13px; margin-top: -5px; border: 0; border-radius: 50%; background: #fff; -webkit-appearance: none; appearance: none; }
.film-scrub::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; }
.film-chapters { position: absolute; left: 6px; right: 6px; bottom: 0; height: 18px; }
.film-chapters li { position: absolute; left: calc(var(--at, 0) * 100%); top: 0; }
.film-chapters button { padding: 0 4px; margin-left: -4px; border: 0; border-radius: 5px; background: none; color: var(--dim); font-size: 11px; line-height: 18px; white-space: nowrap; }
.film-chapters button:hover, .film-chapters button.active { color: var(--ink); }
.film-chapters button.active { background: rgb(255 255 255 / .08); }
.film-time { flex: none; min-width: 84px; color: var(--muted); font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }

@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-chat { grid-column: 1 / -1; grid-row: auto; }
  .card-pk, .card-gifts, .card-box, .card-overlay, .card-mini { grid-column: auto; }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tc-bottom { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .workflow-grid, .dev-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .workflow-head { position: static; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blive { grid-template-columns: minmax(0, 1fr) 236px; }
  .blive-area { display: none; }
  .pk { left: 12px; width: min(52%, 320px); translate: none; }
  .goal-overlay { width: min(40%, 210px); }
  .tc-switchboard { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tc-switchboard > [data-scene="audience"] { grid-column: 1 / -1; order: -1; }
  .tc-switchboard > [data-scene="audience"] .tc-rows { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .br-wide, .hero-danmaku { display: none; }
  .window-meta, [data-room="showcase"] .blive-share { display: none; }
  /* As in B站's phone room: the player, then the 弹幕区; the ranking stays out. */
  .blive { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 8px; }
  .blive-side { contain: none; }
  .blive-tabs, .rank-list { display: none; }
  .blive-chat .mark { left: auto; right: 10px; }
  .feed-list { flex: none; height: 216px; }
  .chat-list { height: 260px; }
  [data-room="showcase"] .blive-gifts, [data-room="showcase"] .blive-input { display: none; }
  .tc-crumbs { display: none; }
  .tc-statusbar { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .tc-metric { padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tc-metric:last-child { border-bottom: 0; }
  .stage-legend { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 20px; }
  .stage-tilt { transform: translateY(calc(var(--tilt, 1) * 14px)) rotateX(calc(var(--tilt, 1) * 14deg)) scale(calc(1 - var(--tilt, 1) * .03)); }
}
@media (max-width: 640px) {
  .film-chapters button:not(.active) { width: 10px; overflow: hidden; color: transparent; }
  .film-time { min-width: 0; }
  .film-stage { align-content: center; }
  .film-end { position: static; translate: none; width: 100%; margin-top: 18px; }
  .film-end .btn { height: 42px; padding: 0 16px; font-size: 14px; }
  .film-chapters button:not(.active) { width: 12px; padding: 2px 0; overflow: hidden; color: transparent; }
  .film-chapters button:not(.active)::before { content: ""; display: block; width: 4px; height: 4px; margin: 6px auto; border-radius: 50%; background: var(--dim); }
  .film-cta .btn { height: 40px; padding: 0 16px; font-size: 14px; }
  .nav-inner { gap: 10px; height: 60px; }
  .brand span { font-size: 17px; }
  .nav-actions .btn-quiet { padding: 0 10px; }
  .hero h1 { font-size: clamp(36px, 11vw, 48px); }
  .hero-cta .btn { flex: 1 1 100%; }
  .bento, .trust { grid-template-columns: minmax(0, 1fr); }
  .card { min-height: 0; padding: 24px; }
  .mini-chat { min-height: 0; padding: 14px; }
  .stat { padding: 22px 18px; }
  .trial-shell { padding: 10px; border-radius: 16px; }
  .trial-bar { gap: 8px; }
  .trial-bar-actions { width: 100%; }
  .trial-bar-actions .act { flex: 1 1 0; justify-content: center; padding: 0 10px; }
  .trial-bar-actions .switch { flex-basis: 100%; }
  .blive-head { gap: 8px; min-height: 50px; padding: 8px 10px; }
  .blive-avatar { width: 34px; height: 34px; }
  .blive-avatar::after { width: 12px; height: 12px; }
  .blive-hot, .facecam, .blive-share > span { display: none; }
  .pk { top: 6px; left: 8px; width: 58%; gap: 3px; translate: none; }
  .pk-bar { height: 18px; border-radius: 9px; }
  .pk-ours, .pk-theirs { font-size: 10px; }
  .pk-ours { padding-left: 7px; }
  .pk-theirs { padding-right: 7px; }
  .pk-ours b, .pk-theirs b { font-size: 11px; }
  .pk-time, .pk-phase { font-size: 10px; line-height: 16px; }
  .goal-overlay { top: 8px; right: 8px; width: 36%; padding: 6px 8px 7px; }
  .goal-overlay p { font-size: 10px; }
  .gift-overlay { left: 8px; bottom: 8px; width: 62%; }
  .go-head { margin-bottom: 4px; }
  .go-item:not(:last-child) { display: none; }
  .danmaku-layer { inset: 6px 0 38%; }
  .blive-gifts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; min-height: 0; padding: 6px; overflow: visible; }
  .gift-chip, .gift-btn { width: auto; min-width: 0; font-size: 11px; }
  .gift-chip .gi, .gift-btn .gi { width: 30px; height: 30px; }
  .gift-chip small, .gift-btn small { font-size: 10px; }
  .tc-top { gap: 10px; min-height: 52px; padding: 0 12px; }
  .tc-brand { padding-right: 0; border-right: 0; }
  .tc-account { padding: 4px 10px 4px 4px; }
  .tc-page { gap: 14px; padding: 16px 14px 14px; }
  .tc-head h3 { font-size: 22px; }
  .tc-metrics { gap: 8px; }
  .tc-card { gap: 6px; padding: 10px 12px; }
  .tc-card strong { font-size: 18px; }
  .tc-card > small { display: none; }
  .steps { padding-left: 40px; }
  .step-dot { left: -40px; }
  .step-card { padding: 22px; }
  .terminal-lines .ev { width: 6.5em; }
  .footer-legal { flex-direction: column; }
}
@media (max-width: 560px) {
  .tc-switchboard { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tc-switchboard > [data-scene="audience"] .tc-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .tc-switchboard > [data-scene="audience"] .tc-rows { grid-template-columns: minmax(0, 1fr); }
}
/* The smallest phones keep the logo but drop the wordmark so both nav actions fit. */
@media (max-width: 380px) {
  .nav .brand span { display: none; }
}

/* ---------- Motion language (信号语法·简约) ---------- */
/* The console's quiet grammar: a press sinks, a selection slides to its new place
   (home.mjs moves a block drawn like the selection; the new item fades in as it
   arrives), a switch fills from its off side and keyboard focus settles onto its
   target. No glow and no overshoot. Pausing motion or the system's reduced-motion
   setting turns all of it off (see Preferences). */
:is(.btn, .nav-links a, .code-tabs button, .skin-switch button, .switch, .tc-switch, .faq-list summary, .link-btn, .motion-control):active { scale: .97; }
:is(.nav-links a.active, .code-tabs button[aria-selected="true"], .skin-switch button[aria-pressed="true"]) { transition-delay: .1s; }
.fx-glide { position: fixed; z-index: 65; pointer-events: none; transform-origin: 0 0; border-radius: 8px; background: rgb(255 255 255 / .085); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); }
.fx-glide[data-shape="round"] { border-radius: 999px; background: rgb(255 255 255 / .16); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22); }
:is(.btn, .nav-links a, .code-tabs button, .skin-switch button, .act, .gift-btn, .switch, .tc-switch, .link-btn, .motion-control, .faq-list summary):focus-visible { animation: focus-aim .2s var(--ease); }
@keyframes focus-aim { from { outline-offset: 7px; outline-color: rgb(226 232 245 / 0); } }


/* ---------- Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; }
  .stage-tilt { transform: none; }
  .js .code:not(.typed) .ln { opacity: 1; transform: none; }
  .js .mc-row:not(.on), .js .mp-lines li:not(.on), .js .mini-ribbon li:not(.on), .js .mini-bubbles li:not(.on) { opacity: 1; transform: none; }
  .js .card-mini:not(.in) .mini-goal i span { transform: scaleX(.74); }
  .js .mini-bars:not(.in) .bars i { transform: none; }
  .hero-danmaku { display: none; }
}
/* Paused or reduced motion: no animations or transitions at all, so every
   state change (FAQ icon, switches, reveals) lands immediately. */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition: none !important; }
html.js[data-motion="off"] .reveal, html.js[data-motion="off"] .mc-row, html.js[data-motion="off"] .mp-lines li, html.js[data-motion="off"] .mini-ribbon li,
html.js[data-motion="off"] .mini-bubbles li { opacity: 1; transform: none; }
html[data-motion="off"] .stage-tilt { transform: none; }
html.js[data-motion="off"] .mini-bars .bars i, html.js[data-motion="off"] .mini-goal i span { opacity: 1; transform: none; }
html.js[data-motion="off"] .mini-goal i span { transform: scaleX(.74); }
@media (prefers-reduced-transparency: reduce) {
  .nav.scrolled, .btn-glass, .pill, .goal-overlay { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: var(--bg-raise); }
}
@media (forced-colors: active) {
  .grad-text, .section-head h2, .final h2, .stat b { background: none; color: CanvasText; }
  .btn { border-color: ButtonText; }
}
