/* 夜潮 · Night Tide. Loaded after ui.css / pages.css / room.css and overrides them.
   The whole screen is one light (night.js): TA's cue is its colour and speed, the one holding on is a tide rising
   from below. Nothing sits in boxes: type floats in the light, buttons are soft light, panels are dark glass. */

@font-face { font-family: "Night Serif"; src: url("/assets/serif.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Night Hand"; src: url("/assets/hand.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  --serif: "Night Serif", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", serif;
  --hand: "Night Hand", "Kaiti SC", "STKaiti", "KaiTi", var(--serif);
  --ink: #1c0a17;
  --veil: #ffffff09;
  --veil-2: #ffffff12;
  --hair: #ffffff0f;
  --hair-2: #ffffff1c;
  --glass: linear-gradient(180deg, #3a142ee0, #1e0a1af0);
  --text: #fbeef3;
  --soft: #f0d9e3cc;
  --dim: #f0d9e37a;
  --go: #ff5a93;
  --slow: #ffa66e;
  --stop: #a99bff;
  --gold: #ff8fb1;
}
html { background: #1c0a17; }
body { background:
  radial-gradient(90% 50% at 50% 8%, #6e194680 0%, transparent 70%),
  radial-gradient(120% 40% at 50% 105%, #5c0f3080 0%, transparent 70%), transparent; background-attachment: fixed; }
.hand { font-family: var(--hand); font-weight: 500; letter-spacing: .02em; }
.ch { display: inline-block; }

/* The light field. Paper Shaders would inject these rules; the site's CSP blocks inline styles, so they live here. */
.night-field { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
/* Phones: the address bar shrinking and growing while scrolling changed this box's height, every change resized
   (and so cleared) the WebGL canvas, and the background flashed. Size it to the largest viewport instead, so
   scrolling never resizes it; when the bar is showing, the bottom simply sits under it. */
@supports (height: 100lvh) { .night-field { bottom: auto; height: 100lvh; } }
:where([data-paper-shader]) { isolation: isolate; }
:where([data-paper-shader]) canvas { contain: strict; display: block; position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.ambient { display: none; }

/* ---------- Shared pieces: dark glass instead of boxes, light instead of plastic ---------- */
.button { border: 0; background: #ffffff10; }
.button.outline { border: 0; background: #ffffff10; color: var(--text); }
.button.outline:hover { background: #ffffff1a; }
.button.primary { position: relative; isolation: isolate; border: 0; color: #2b0a18; background: linear-gradient(120deg, #ffd1df, #ff8db1 45%, #f0588c);
  box-shadow: inset 0 1px 0 #fff9, 0 10px 34px #ff4f8460; }
.chip-button, .phrase, .rail-chip, .sheet-tab { border: 0 !important; background: #ffffff10; }
.sheet-tab small { margin-left: 4px; opacity: .55; font-size: .85em; }
.sheet-tab[aria-selected="true"] { background: #ff8fb12a; color: #fff; }
.toast { border: 0; background: #2c0f24ee; box-shadow: 0 10px 40px #0008; }
dialog, .report-dialog { border: 0 !important; background: var(--glass) !important; box-shadow: 0 30px 90px #000a !important; }
dialog::backdrop { background: #12050ecc; }
.wait-card, .watch-row, #online-filters, .me-card, .me-level, .me-daily, .me-voice, .me-stats, .relation-option span, .role-option span, .persona-option span, .consent-option span {
  border-color: transparent !important; background: #2a0d2266 !important; }
input:not([type="radio"]):not([type="checkbox"]):not([type="range"]), textarea, select { border-color: transparent !important; background: #ffffff0d !important; }
.serif { font-family: var(--serif); }

/* ---------- Header: quiet glyphs on the light ---------- */
.header { background: linear-gradient(180deg, #1c0a17cc, transparent) !important; border: 0 !important; backdrop-filter: none !important; box-shadow: none !important; }
.brand-mark { display: none; }
.wordmark { letter-spacing: .3em; font-weight: 700; }
.view-tabs { border: 0 !important; background: linear-gradient(0deg, #1c0a17f2, #1c0a1700) !important; backdrop-filter: none !important; box-shadow: none !important; }
.view-tab { background: none !important; }
.view-tab[aria-current="page"] { color: #fff; }
.view-tab[aria-current="page"] .tab-icon { color: #ff8fb1; filter: drop-shadow(0 0 8px #ff6f98); }
.footer { opacity: .7; }

/* ---------- Gate ---------- */
.gate { background: radial-gradient(90% 60% at 50% 30%, #3a0f2ccc, #1c0a17f2) !important; }
.gate-lights { display: none; }
.gate-title { font-size: clamp(56px, 16vw, 96px) !important; font-weight: 900 !important; letter-spacing: .12em; color: #ffe3ec;
  text-shadow: 0 0 18px #ff78a58c, 0 0 60px #ff5a8c59; }
.gate-line { font-size: 22px !important; color: #ffd6e4 !important; letter-spacing: .06em; }
.gate-card { border: 0 !important; background: #2a0d2270 !important; }
.gate-enter { border-radius: 999px !important; }

/* ---------- 今晚 (home) ---------- */
/* 今晚 is exactly one screen and never scrolls (11-24): header + this + the room the phone's tab bar needs = 100dvh.
   The hero (the vertical 等我说停 and the handwritten line) takes whatever height is left over the role and 开始匹配, and
   the title sizes itself to that height, so a short phone shrinks it instead of overlapping 都可以 or hiding the links
   under the tab bar. 旁观区 moved to 大厅 and the footer shows on the other tabs. */
.tonight { position: relative; display: flex !important; flex-direction: column; gap: 0 !important; padding-top: 8px;
  height: calc(100dvh - 64px - env(safe-area-inset-top) - var(--nav-h) - 30px - env(safe-area-inset-bottom) - var(--notices-h, 0px)); min-height: 380px !important; }
@media (min-width: 760px) { .tonight { height: calc(100dvh - 68px - env(safe-area-inset-top) - 24px - var(--notices-h, 0px)); } }
body:has(#lobby[data-view="home"]:not([hidden])) .footer { display: none !important; }
.tonight-hero { position: relative; flex: 1 1 auto; min-height: 0; container: hero / size; }
/* Too little height for a readable column: the header already says 等我说停, so the hero keeps just the line, centred. */
.tonight-hero:has(.tonight-title) { display: flex; flex-direction: column; }
@container hero (max-height: 160px) {
  .tonight-title { display: none !important; }
  .tonight-line { max-width: none !important; margin: auto 0 !important; font-size: clamp(19px, 17cqh, 26px) !important; }
}
.tonight-top { position: relative; z-index: 2; }
.greet { font-size: 13px !important; letter-spacing: .3em !important; color: var(--dim) !important; }
.live-presence { border: 0 !important; background: none !important; padding: 0 !important; color: var(--dim); font-size: 12.5px; }
.tonight-title { position: absolute; top: 6px; right: -4px; margin: 0 !important; writing-mode: vertical-rl; white-space: nowrap; height: auto; font-family: var(--serif);
  font-size: clamp(36px, 22.5cqh, 96px) !important; line-height: 1.02 !important; font-weight: 900 !important; letter-spacing: .06em !important; color: #ffe3ec;
  text-shadow: 0 0 18px #ff78a58c, 0 0 60px #ff5a8c59; pointer-events: none; }
.tonight-title .ch { display: inline-block !important; margin: 0 !important; font-size: 1em !important; color: inherit !important; letter-spacing: inherit !important; }
.tonight-line { position: relative; z-index: 1; margin-top: clamp(4px, 11cqh, 60px); max-width: 62%; display: grid; gap: 2px; font-size: clamp(19px, min(3.6dvh, 12cqh), 30px); line-height: 1.35; color: #ffd6e4;
  text-shadow: 0 0 20px #ff6f9866; }
.start-card { margin-top: auto !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; gap: 0 !important; }
.start-ask { margin-bottom: 2px; color: var(--dim); font-size: 12px; letter-spacing: .4em; }
.role-switch { display: flex !important; align-items: flex-end; gap: 22px !important; padding: 0 0 40px !important; background: none !important; border: 0 !important; box-shadow: none !important; }
.role-pick-option { position: static !important; display: block !important; padding: 0 0 8px !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; color: #f0d9e380 !important; }
.role-pick-option b { position: relative; display: block; font-size: 40px !important; font-weight: 800; letter-spacing: .04em !important; transition: color .5s, text-shadow .5s; }
.role-pick-option[data-role="either"] b { font-size: 22px !important; }
.role-pick-option[aria-checked="true"] { color: #fff !important; }
.role-pick-option[aria-checked="true"] b { text-shadow: 0 0 22px #ff96b9bf; }
.role-pick-option[aria-checked="true"] b::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: -8px; height: 3px; border-radius: 3px; background: currentColor; box-shadow: 0 0 16px currentColor; animation: role-line .5s var(--spring); }
.role-pick-option small { position: absolute; left: 0; right: 0; bottom: 8px; font-size: 17px !important; color: var(--soft) !important; opacity: 0; transform: translateY(4px); filter: blur(4px); transition: opacity .5s, transform .5s, filter .5s; pointer-events: none; text-align: left; }
.role-pick-option[aria-checked="true"] small { opacity: 1; transform: none; filter: none; }
.role-switch { position: relative; }
@keyframes role-line { from { transform: scaleX(0); opacity: 0; } }
.start-button { min-height: 66px !important; border-radius: 999px !important; color: #2b0a18 !important; border: 0 !important; overflow: hidden; isolation: isolate;
  background: linear-gradient(120deg, #ffd1df, #ff8db1 45%, #f0588c) !important; box-shadow: inset 0 1px 0 #fff9, 0 12px 40px #ff4f8473 !important; }
.start-button::before { display: none; }
.start-button::after { content: ""; position: absolute; inset: -40%; z-index: -1; border-radius: 999px; filter: blur(28px); background: #ff4f84; opacity: .5; animation: halo 2.6s ease-in-out infinite; }
.start-label { font-size: 22px !important; letter-spacing: .5em !important; font-weight: 800 !important; }
.start-button small { color: #2b0a18b0; }
.tonight:has([data-role="controller"][aria-checked="true"]) .start-button { background: linear-gradient(120deg, #fff0dc, #ffd3a3 50%, #f0a77f) !important; box-shadow: inset 0 1px 0 #fffb, 0 12px 40px #ffbe8c66 !important; }
.tonight:has([data-role="controller"][aria-checked="true"]) .start-button::after { background: #ffcf9a; }
.tonight:has([data-role="either"][aria-checked="true"]) .start-button { background: linear-gradient(120deg, #ffd6e6, #ff9ac0 40%, #b58cff) !important; }
.tonight:has([data-role="either"][aria-checked="true"]) .start-button::after { background: #d58bff; }
.start-profile { margin-top: 6px; }
.home-links { margin-top: 16px !important; gap: 4px !important; }
.home-links button { border: 0 !important; background: none !important; color: var(--soft) !important; padding: 6px 10px !important; }
.home-links button + button::before { content: "·"; margin-right: 10px; color: var(--dim); }
.home-links [data-icon] { display: none; }
@keyframes halo { 0%, 100% { opacity: .35; transform: scale(.92); } 50% { opacity: .7; transform: scale(1.04); } }
.sheen { position: absolute; inset: 0 auto 0 -40%; width: 35%; background: linear-gradient(100deg, transparent, #ffffff8c, transparent); filter: blur(6px); animation: sheen 3.6s ease-in-out infinite; pointer-events: none; }
@keyframes sheen { 0% { transform: translateX(0); } 55%, 100% { transform: translateX(520%); } }

/* Shorter phones (most phones once the browser's own bars are counted): the same pieces, tighter. */
@media (max-height: 740px) {
  .role-switch { padding-bottom: 30px !important; }
  .role-pick-option small { bottom: 6px; }
  .start-ask { margin-bottom: 0; }
  .start-profile { margin-top: 2px; }
  .role-pick-option b { font-size: 34px !important; }
  .role-pick-option small { font-size: 15.5px !important; }
  .start-button { min-height: 58px !important; padding: 8px 18px !important; gap: 0 !important; }
  .start-label { line-height: 1.25; }
  .start-button small { line-height: 1.3; }
  .home-links { margin-top: 2px !important; }
  .home-links button { min-height: 32px !important; }
}
@media (max-height: 620px) {
  .start-ask { font-size: 11px; }
  .role-switch { gap: 16px !important; padding-bottom: 28px !important; }
  .role-pick-option b { font-size: 29px !important; }
  .role-pick-option[data-role="either"] b { font-size: 19px !important; }
  .role-pick-option small { font-size: 14px !important; bottom: 6px; }
  .start-button { min-height: 52px !important; padding: 6px 18px !important; }
  .start-label { font-size: 19px !important; }
  .start-button small { font-size: 11px; }
  .start-profile, .hero-queue { font-size: 12px !important; margin-top: 2px; }
  .home-links { margin-top: 2px !important; }
  .home-links button { min-height: 30px !important; font-size: 13px !important; }
}
/* 今晚, step 1 (11-24): how to play. 联机匹配 is the big card; 约一个人 / 一个人 / 旁观 / 听声音 are real buttons now,
   not a line of small links. Step 2 keeps the role and 开始匹配, with 换个玩法 and a 我的约定 row you can see. */
.tonight[data-step="modes"] .hero-queue { display: none; }
.mode-picker { display: grid; gap: 8px; margin-top: auto; }
.mode-picker .start-ask { margin-bottom: 2px; }
.mode-card { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 13px 14px; border-radius: 20px; text-align: left;
  color: var(--text); background: #ffffff0d; border: 1px solid #ffffff1f; transition: transform .25s var(--spring), border-color .2s, background-color .2s; }
.mode-card:active { transform: scale(.97); }
@media (hover: hover) { .mode-card:hover { border-color: #ff8fb166; background: #ffffff14; } }
.mode-icon { flex: none; width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: #ff8fb11f; color: var(--gold); }
.mode-icon svg { width: 19px; height: 19px; }
.mode-copy { display: grid; gap: 1px; min-width: 0; }
.mode-copy b { font-size: 16px; font-weight: 700; letter-spacing: .08em; }
.mode-copy small { color: var(--soft); font-size: 12px; line-height: 1.45; }
.mode-main { min-height: 84px; padding: 14px 16px; border: 0; color: #2b0a18; background: linear-gradient(120deg, #ffd6e6, #ff9ac0 45%, #b58cff);
  box-shadow: inset 0 1px 0 #fff9, 0 12px 40px #ff4f8459; }
.mode-main .mode-icon { width: 46px; height: 46px; border-radius: 16px; background: #ffffff66; color: #2b0a18; }
.mode-main .mode-copy b { font-size: 22px; font-weight: 800; letter-spacing: .24em; }
.mode-main .mode-copy small { color: #2b0a18b8; font-size: 12.5px; }
.mode-live { font-style: normal; font-size: 12px; font-weight: 700; color: #6b1238; }
.mode-live:empty { display: none; }
.mode-go { margin-left: auto; flex: none; color: #2b0a18; }
.mode-go svg { width: 20px; height: 20px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-grid .mode-card { padding: 12px; gap: 10px; }
.start-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.start-head .start-ask { margin: 0; }
.mode-back { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 12px 0 8px; border-radius: 999px; border: 1px solid #ffffff2b;
  color: var(--soft); font-size: 12.5px; }
.mode-back svg { width: 15px; height: 15px; }
.my-terms { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 10px 12px; border-radius: 16px; text-align: left;
  background: #ffffff0d; border: 1px solid #ffffff26; color: var(--text); }
@media (hover: hover) { .my-terms:hover { border-color: #ff8fb166; } }
.my-terms-label { flex: none; padding: 2px 9px; border-radius: 99px; background: #ff8fb12b; color: #ffc6d8; font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.my-terms-text { flex: 1; min-width: 0; color: var(--soft); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-terms-edit { flex: none; display: inline-flex; align-items: center; gap: 2px; color: var(--gold); font-size: 13px; font-weight: 700; }
.my-terms-edit svg { width: 14px; height: 14px; }
/* 这次匹配: the sheet before every match. */
.match-sheet { display: grid; gap: 16px; }
.ms-row { display: grid; gap: 8px; }
.ms-label { color: var(--dim); font-size: 12.5px; letter-spacing: .24em; }
.match-sheet .segmented .chip { flex: 1 1 0; }
.match-sheet .segmented .chip span { width: 100%; justify-content: center; }
.voice-chips .chip span { min-height: 38px; padding: 7px 14px; }
.ms-widen { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: #b58cff14; border: 1px solid #b58cff47; cursor: pointer; }
.ms-widen input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: #b58cff; }
.ms-widen b { display: block; font-size: 14.5px; letter-spacing: .06em; }
.ms-widen small { display: block; margin-top: 2px; color: var(--soft); font-size: 12.5px; line-height: 1.6; }
.match-sheet .my-terms { margin-top: 0; }
.match-sheet .dialog-actions .button { width: 100%; min-height: 52px; }
/* 扩大匹配池, asked while waiting. */
.queue-widen { display: grid; justify-items: center; gap: 6px; margin-top: 10px; padding: 12px 14px; border-radius: 18px; background: #b58cff14; border: 1px solid #b58cff47; text-align: center; }
.queue-widen p { color: var(--text); font-size: 13.5px; line-height: 1.6; }
.queue-widen .button { min-height: 40px; padding: 8px 20px; }
.queue-widen small { color: var(--dim); font-size: 12px; }
@media (max-height: 740px) {
  .mode-main { min-height: 72px; padding: 11px 14px; }
  .mode-main .mode-icon { width: 40px; height: 40px; }
  .mode-grid .mode-card { padding: 10px; }
  .mode-icon { width: 34px; height: 34px; }
  .my-terms { margin-top: 8px; padding: 8px 12px; }
}
@media (max-height: 620px) {
  .mode-grid .mode-copy small, .mode-main .mode-copy small { display: none; }
  .mode-main { min-height: 60px; }
  .mode-main .mode-copy b { font-size: 20px; }
  .mode-grid .mode-card { padding: 9px 10px; }
}
/* Narrow phones: the header's 等我说停 stays on one line, and so does each link under 开始匹配. */
.home-links button { white-space: nowrap; }
@media (max-width: 380px) {
  .home-links button { padding: 4px 7px !important; font-size: 13.5px !important; }
  .home-links button + button::before { margin-right: 7px; }
  .wordmark { white-space: nowrap; letter-spacing: .14em; font-size: 17px; }
  .header-inner { gap: 8px; }
  .header-end { gap: 0; }
}
@media (max-width: 359px) {
  .home-links button { padding: 4px 5px !important; font-size: 12.5px !important; }
  .home-links button + button::before { margin-right: 6px; }
  .role-switch { gap: 14px !important; }
}

/* ---------- Room ---------- */
.room::before { display: none !important; }
.room-head { background: linear-gradient(180deg, #1c0a17b3, transparent) !important; border: 0 !important; backdrop-filter: none !important; box-shadow: none !important; }
.room-head h1 { color: var(--soft); font-size: 14px !important; letter-spacing: .3em !important; }
.rm-tool { color: var(--soft); background: none; }
.rm-leave { border: 0 !important; background: #ff7a7a1f !important; }

/* The stage holds only type now: no border, no box, no orb. */
.room-stage, .room[data-view="play"] .room-stage { border: 0 !important; background: none !important; box-shadow: none !important; backdrop-filter: none !important; }
.room-stage::before, .room-stage::after { display: none !important; }
.light { display: none !important; }
.orb { width: auto !important; height: auto !important; background: none !important; box-shadow: none !important; border: 0 !important; color: #ffd6e4; filter: drop-shadow(0 0 14px #ff6f98); }
.orb::after, .loading-orb::after { display: none !important; }
.orb svg { width: 30px !important; height: 30px !important; }
.stage-content > h2:not(.cue-word) { font-size: clamp(30px, 8vw, 44px) !important; font-weight: 800 !important; letter-spacing: .14em; color: #fff; text-shadow: 0 0 24px #ff78a5a6, 0 0 70px #ff5a8c59; }
.stage-content > p { color: var(--soft); }
.stage-enter > * { animation: none !important; }
.stage-badges span { background: #ffffff10 !important; border: 0 !important; }
.time-label { font-family: var(--serif); font-weight: 700 !important; font-size: 17px !important; letter-spacing: .08em; color: var(--soft) !important; }
.progress { display: none !important; }

.cue-kicker { color: var(--dim); font-size: 11.5px; letter-spacing: .5em; }
.cue-word { position: relative; font-size: clamp(76px, 12.5dvh, 124px) !important; font-weight: 900 !important; line-height: 1 !important; letter-spacing: .08em !important; color: #fff;
  text-shadow: 0 0 22px var(--glow, #ff5a91d9), 0 0 54px var(--glow, #ff5a91a6) !important; }
.cue-word[data-cue="slow"] { --glow: #ff9660cc; font-size: clamp(60px, 9.5dvh, 96px) !important; }
.cue-word[data-cue="stop"] { --glow: #a08cffd9; }
/* The word that is leaving while the next one settles (app.js paintCue): it stays where it was, out of the flow. */
.cue-word.cue-ghost { position: absolute !important; margin: 0 !important; pointer-events: none; }
.stage-meta { gap: 12px !important; margin-top: 6px; color: var(--soft); font-size: 13px; }
.cue-chip { border: 0 !important; background: none !important; padding: 0 !important; color: var(--soft) !important; letter-spacing: .08em; }
.cue-chip i { display: none; }
.cue-bpm { font-family: var(--serif); font-weight: 800; font-size: 17px; color: #fff; }
.strength { border: 0 !important; background: none !important; padding: 0 !important; }
.strength i { width: 8px !important; height: 8px !important; }
.strength i[data-on="true"] { background: var(--phase, var(--go)) !important; box-shadow: 0 0 10px var(--phase, var(--go)) !important; }
.cue-hold { background: #a99bff26 !important; }
.cue-instruction { max-width: 15em !important; margin-top: 8px; font-family: var(--hand) !important; font-size: clamp(20px, 5.6vw, 26px) !important; line-height: 1.45 !important; color: #ffe0ea !important;
  text-shadow: 0 0 18px #ff78a073; }
.room-stage[data-role="lead"] .cue-instruction::before { content: "TA 看到："; color: var(--dim); font-family: var(--sans); font-size: 12px; }
.phase-bar { width: 120px !important; height: 3px !important; background: #ffffff1a !important; margin-top: 8px; }
.cue-sub { color: var(--dim) !important; font-size: 12.5px !important; }
.peer-feedback { border: 0 !important; background: #2a0d2299 !important; font-family: var(--hand); font-size: 18px !important; color: #ffe0ea !important; }
.stage-banner { font-weight: 900 !important; }
.card-fly { border: 0 !important; background: #2a0d22cc !important; font-family: var(--hand) !important; font-size: 22px !important; }
.beat-veil { display: none; }

/* Layout while a round is on: stage and pillar side by side, the talk always open, the buttons at the bottom. */
.room-grid, .playfield { display: block !important; max-width: 1320px; margin: 0 auto; }
.stage-stack { display: flex; flex-direction: column; gap: 12px; }
.room[data-view="play"] .stage-stack { height: calc(100dvh - var(--head) - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); min-height: 560px; }
.control-dock { border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; }
.lead, .follow { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; grid-template-columns: minmax(0, 1fr) !important; }
.room-stage[data-role="lead"] .stage-content { grid-template-columns: none !important; justify-items: center !important; text-align: center !important; }
.room-stage[data-role="lead"] .cue-word { font-size: clamp(52px, 8.5dvh, 96px) !important; }
.room-stage[data-role="lead"] .cue-word[data-cue="slow"] { font-size: clamp(44px, 7dvh, 80px) !important; }
.room-stage[data-role="lead"] .cue-instruction { font-size: 16px !important; color: var(--soft) !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.room-stage .stage-content { gap: 4px !important; }
.room[data-view="meet"] .control-dock, .room[data-view="result"] .control-dock { width: 100%; max-width: 580px; margin: 0 auto; }
.heat-slot { display: flex; }
.room[data-view="play"] .stage-stack {
  display: grid !important; gap: 8px 10px !important;
  grid-template-columns: minmax(0, 1fr) 58px;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "strip strip" "stage heat" "talk heat" "dock dock";
}
.room[data-view="play"] .partner-strip { grid-area: strip; }
.room[data-view="play"] .room-stage { grid-area: stage; min-height: 0 !important; padding: 12px 4px !important; }
.room[data-view="play"] .heat-slot { grid-area: heat; min-height: 0; }
.room[data-view="play"] .room-talk { grid-area: talk; min-width: 0; }
.room[data-view="play"] .control-dock { grid-area: dock; }
.room:not([data-view="play"]) .heat-slot { display: none; }

/* TA (for 说停): a slim line above the stage. */
.partner-strip { padding: 2px 2px 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; animation: none !important; }
.ps-avatar { box-shadow: 0 0 20px #ff5f8c73; }
.ps-ask { border: 0 !important; background: #ffa66e26 !important; }

/* The heat pillar. */
.heat { position: relative; display: flex !important; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; height: 100%; }
.heat-caption { flex: none; align-self: center; writing-mode: vertical-rl; color: var(--dim); font-size: 10.5px; letter-spacing: .3em; max-height: 46%; overflow: hidden; }
.heat .heat-track { position: relative; flex: 1 1 auto; width: 100%; min-height: 120px; height: auto !important; border-radius: 999px !important; border: 0 !important; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background: linear-gradient(180deg, #ffffff08, #ffffff17) !important; box-shadow: inset 0 0 0 1px #ffffff0a !important; padding: 0; }
.heat .heat-fill { position: absolute; left: 0; right: 0; top: auto !important; bottom: 0; width: auto !important; height: calc(max(var(--v), 4) * 1%); border-radius: inherit;
  background: linear-gradient(0deg, #ff9a62 0%, #ff6f98 45%, #ff2d6a 85%, #fff0f5 100%) !important; box-shadow: 0 0 26px #ff4f84a6, inset 0 2px 8px #ffffff73 !important; animation: none !important; }
.heat[data-ready] .heat-fill { transition: height .35s cubic-bezier(.2, .8, .2, 1) !important; }
.heat .heat-fill::after { display: none; }
.heat .heat-edge { left: 8px !important; right: 8px !important; top: 10% !important; bottom: auto !important; width: auto !important; height: 1px !important; background: #ffffff4d !important; }
.heat .heat-pct { left: 0 !important; right: 0; top: auto !important; bottom: calc(min(max(var(--v), 4), 86) * 1% + 6px); transform: none !important; text-align: center; font-family: var(--serif); font-weight: 800; font-size: 14px; color: #fff; text-shadow: 0 0 10px #0008; transition: bottom .35s; }
.heat[data-zone="edge"] .heat-track { box-shadow: 0 0 30px #ff2d6a99 !important; animation: none !important; }
.heat[data-zone="edge"] .heat-fill { animation: boil .45s ease-in-out infinite alternate !important; }
.heat[data-zone="edge"] .heat-edge { background: #fff !important; box-shadow: 0 0 10px #fff; }
button.heat-track { cursor: pointer; }
button.heat-track.tap { animation: pillar-tap .3s cubic-bezier(.2, .9, .2, 1) !important; }
button.heat-track.pressing { filter: brightness(.8); box-shadow: inset 0 0 0 2px #a99bff66 !important; }
.heat-combo { right: 66px !important; top: auto !important; bottom: 40%; font-size: 24px !important; }
@keyframes boil { from { filter: brightness(1); box-shadow: 0 0 26px #ff2d6a99; } to { filter: brightness(1.35); box-shadow: 0 0 60px #ff2d6a; } }
@keyframes pillar-tap { 50% { transform: scaleX(1.12); } }

/* The talk: always on screen, lines fade into the light above, the rail and the input right there. */
.room[data-view="play"] .room-talk, .room-talk { border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; }
.chat-item { border: 0 !important; }
.chat-bubble { border: 0 !important; background: #2a0d2299 !important; }
.chat-item:not(.mine) .chat-bubble { background: #ff8fb11f !important; }
.chat-note { font-family: var(--hand); font-size: 16px; }
.room-talk .chat-form { gap: 6px; }
.room-talk .chat-slot, .room-talk .chat-quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.room-talk .chat-slot::-webkit-scrollbar, .room-talk .chat-quick::-webkit-scrollbar { display: none; }
.rail-chip { flex: none; min-height: 34px; padding: 6px 12px !important; border-radius: 999px !important; font-size: 13.5px; color: var(--text); white-space: nowrap; }
.rail-chip.warn { background: #ff6b6b24 !important; color: #ffb4b4; }
.rail-chip.cards, .rail-chip.group { background: #ffd9a81f !important; color: #ffe2bb; }
.rail-chip.harsh { color: #ffc2cc; background: #ff2d551f !important; }
.chat-compose { border: 0 !important; background: #ffffff10 !important; border-radius: 999px !important; }
.chat-compose input { background: none !important; }
.chat-send { border-radius: 999px !important; background: #ff6f98 !important; color: #2b0a18 !important; box-shadow: 0 0 20px #ff6f9880; }

/* 忍住: two big things to press. */
.follow, .solo-board { display: grid; gap: 8px; }
.follow-meter { display: none !important; }
.follow-asked { color: #ffc89a; font-size: 13px; text-align: center; animation: ask 1s ease-in-out 3; }
.follow-main { display: grid !important; grid-template-columns: 84px 1fr; gap: 10px !important; align-items: stretch; }
.follow-lost { order: -1; border: 0 !important; background: none !important; color: var(--dim) !important; font-size: 13px; }
.big-button { position: relative; isolation: isolate; min-height: 64px !important; border: 0 !important; border-radius: 999px !important; font-family: var(--serif); font-weight: 800 !important; font-size: 21px !important; letter-spacing: .24em; }
.big-button small { font-family: var(--sans); font-weight: 500; letter-spacing: .02em; }
.big-button::before { content: ""; position: absolute; inset: -30%; pointer-events: none; z-index: -1; border-radius: 999px; filter: blur(26px); background: var(--halo, #ff4f84); opacity: .45; animation: halo 2.6s ease-in-out infinite; }
.big-button.edge { --halo: #ff4f84; color: #2b0a18 !important; background: linear-gradient(120deg, #ffd1df, #ff8db1 45%, #f0588c) !important; box-shadow: inset 0 1px 0 #fff9, 0 12px 40px #ff4f8473 !important; }
.big-button.mark, .big-button.cool { --halo: #8f7cff; color: #160c3a !important; background: linear-gradient(120deg, #ece8ff, #b4a6ff 45%, #6b56e8) !important; box-shadow: inset 0 1px 0 #fff9, 0 12px 40px #826eff73 !important; }
.big-button.gold { --halo: #ffcf9a; color: #3a1a10 !important; background: linear-gradient(120deg, #fff0dc, #ffd3a3 50%, #f0a77f) !important; box-shadow: inset 0 1px 0 #fffb, 0 12px 40px #ffbe8c66 !important; }
.big-button.deny { --halo: #8f7cff; color: #fff !important; background: #ffffff14 !important; }
.follow[data-heat-zone="edge"] .big-button.edge, .solo-board[data-heat-zone="edge"] .big-button.edge { animation: urgent .7s ease-in-out infinite !important; }
@keyframes urgent { 0%, 100% { box-shadow: 0 0 20px #ff2d6a80; } 50% { box-shadow: 0 0 60px #ff2d6af2; } }
.desk-replies, .desk-deck { display: none; }
.solo-stats { display: flex !important; justify-content: center; gap: 22px !important; }
.solo-stats div { border: 0 !important; background: none !important; padding: 0 !important; }
.solo-row { display: flex; justify-content: space-between; }

/* 说停: the tempo bar, strength, the three words, the tools. */
.lead { display: grid !important; gap: 8px !important; }
.lead-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 72px; align-items: center; gap: 10px; }
.lead-tempo { grid-template-columns: auto minmax(0, 1fr) auto; }
.lead-auto { display: grid; align-content: center; min-height: 44px; padding: 3px 9px; border: 1px solid #ffffff32; border-radius: 12px; background: #ffffff12; color: var(--text); font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.lead-auto small { color: var(--dim); font-size: 11px; font-weight: 500; }
.lead-auto[aria-pressed="true"] { border-color: var(--go); }
.lead-auto[aria-pressed="true"] small { color: var(--go); }
.lead-label { color: var(--dim); font-size: 12px; letter-spacing: .2em; }
.tempo-bar { --t: 0; position: relative; height: 44px; border-radius: 999px; background: #ffffff0f; touch-action: none; cursor: ew-resize; user-select: none; -webkit-user-select: none; overflow: hidden; }
.tempo-fill { position: absolute; inset: 0 auto 0 0; width: calc(6% + var(--t) * 94%); border-radius: inherit; opacity: .75; transition: width .25s cubic-bezier(.2, .8, .2, 1), background .6s;
  background: linear-gradient(90deg, transparent, var(--tempo, #ff5a93)); }
.tempo-thumb { position: absolute; top: 50%; left: calc(6% + var(--t) * 94% - 8px); width: 5px; height: 28px; border-radius: 3px; transform: translateY(-50%); background: #fff; box-shadow: 0 0 14px #fff; transition: left .25s cubic-bezier(.2, .8, .2, 1); }
.tempo-bar.dragging .tempo-fill, .tempo-bar.dragging .tempo-thumb { transition: none; }
.tempo-bar[data-zone="slow"] { --tempo: #ffa66e; }
.tempo-bar[data-zone="stop"] { --tempo: #a99bff; }
.tempo-bar[data-zone="wild"] { --tempo: #ff2d6a; }
.tempo-bar[data-zone="wild"] .tempo-thumb { animation: wild .3s ease-in-out infinite alternate; }
@keyframes wild { to { box-shadow: 0 0 26px #ff2d6a, 0 0 8px #fff; } }
.tempo-value { text-align: right; white-space: nowrap; }
.tempo-value b { font-family: var(--serif); font-size: 20px; font-weight: 800; color: #fff; }
.tempo-value small { margin-left: 2px; color: var(--dim); font-size: 11px; }
.strength-picks { display: flex; justify-content: space-between; }
.strength-pick { flex: 1 1 0; min-width: 0; min-height: 44px; display: grid; place-items: center; }
.strength-zero { font-size: 12px; color: var(--dim); }
.strength-zero[aria-checked="true"] { color: var(--text); }
.strength-pick i { display: block; width: 10px; height: 10px; border-radius: 50%; background: #ffffff24; transition: background .3s, box-shadow .3s, transform .4s var(--spring); }
.strength-pick[data-level="2"] i { width: 12px; height: 12px; } .strength-pick[data-level="3"] i { width: 14px; height: 14px; }
.strength-pick[data-level="4"] i { width: 16px; height: 16px; } .strength-pick[data-level="5"] i { width: 18px; height: 18px; }
.strength-pick[data-filled] i { background: var(--go); box-shadow: 0 0 14px var(--go); }
.strength-pick:active i { transform: scale(1.4); }
.strength-word { text-align: right; color: var(--dim); font-size: 12px; }
.lead-cues { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.lead-cue { position: relative; height: 62px; border-radius: 999px; color: #f0d9e380; transition: color .3s, background .4s, box-shadow .4s; }
.lead-cue span { font-size: 22px; font-weight: 900; letter-spacing: .12em; }
.lead-cue[data-cue="stop"] span { font-size: 30px; }
.lead-cue[aria-pressed="true"] { color: #fff; }
.lead-cue[data-cue="fast"][aria-pressed="true"] { background: radial-gradient(120% 140% at 30% 0%, #ffb3cb, #ff4f84 55%, #a8164f); box-shadow: 0 0 34px #ff4f848c; }
.lead-cue[data-cue="slow"][aria-pressed="true"] { background: radial-gradient(120% 140% at 30% 0%, #ffd2b0, #ff9a62 55%, #a8482a); box-shadow: 0 0 34px #ff9a6280; }
.lead-cue[data-cue="stop"][aria-pressed="true"] { background: radial-gradient(120% 140% at 30% 0%, #ddd6ff, #8f7cff 55%, #4a3cb8); box-shadow: 0 0 34px #8f7cff99; }
.lead-cue:active { transform: scale(.94); }
.lead-tools { display: flex !important; gap: 6px !important; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.lead-tools::-webkit-scrollbar { display: none; }
.tool-btn, .tool-sprint, .tool-sprint-time { flex: none; min-height: 38px !important; padding: 6px 14px !important; border: 0 !important; border-radius: 999px !important; background: #ffffff10 !important; font-size: 13.5px; white-space: nowrap; }
.tool-btn.on { color: var(--dim); }
.tool-btn.gold { background: #ffd9a826 !important; color: #ffe2bb; }
.tool-sprint-wrap { display: inline-flex; gap: 2px; flex: none; }
.tool-sprint { display: inline-flex !important; align-items: center; gap: 4px; background: linear-gradient(120deg, #ff8db1, #ff2d6a) !important; color: #fff !important; font-weight: 800; box-shadow: 0 0 20px #ff2d6a66; }
.tool-sprint b, .tool-sprint small { font-weight: 800; }
.tool-sprint.on { animation: urgent .6s ease-in-out infinite; }
.tool-sprint-time { padding: 6px 10px !important; color: var(--soft); }
.pad, .pad-readout { display: none !important; }

/* Ready, result and the verdict: dark glass with light type. */
.meet-card, .verdict, .bound-ask, .watch-consent, .after-actions, .after-more { border: 0 !important; }
.meet-card { background: #2a0d2266 !important; box-shadow: none !important; }
.meet-kicker { font-size: 26px !important; font-weight: 800; color: #fff; text-shadow: 0 0 24px #ff78a5a6; }
.meet-hero { display: none !important; }
.consent-chip { border: 0 !important; background: #ffffff12 !important; }
.verdict-card { border: 0 !important; background: linear-gradient(160deg, #fff0dc, #ffd3a3 55%, #d08a5c) !important; box-shadow: 0 20px 60px #ffbe8c4d !important; }
.verdict[data-result="deny"] .verdict-card, .verdict[data-result="lost"] .verdict-card { background: linear-gradient(160deg, #ece8ff, #b4a6ff 55%, #5a46c8) !important; box-shadow: 0 20px 60px #826eff4d !important; }
.verdict-line { font-family: var(--hand) !important; font-size: 21px !important; }

/* 快到了 / 准许: the whole room flushes and asks. */
.signal { background: #16060f59 !important; }
.signal-glow { display: none !important; }
.signal-body { border: 0 !important; background: none !important; box-shadow: none !important; }
.signal-body h2 { font-size: clamp(44px, 13vw, 64px) !important; font-weight: 900 !important; color: #fff; text-shadow: 0 0 30px #ff5a91d9, 0 0 90px #ff5a91d9; }
.signal[data-kind="grant"] .signal-body h2 { text-shadow: 0 0 30px #ffd3a3d9, 0 0 90px #ffcf9acc; }
.signal-kicker { letter-spacing: .5em; color: var(--soft); }
.signal-body > p { font-family: var(--hand); font-size: 20px; color: #ffe0ea; }
.signal-choice { border: 0 !important; background: #ffffff14 !important; border-radius: 999px !important; }
.signal-choice.sprint { background: linear-gradient(120deg, #ff8db1, #ff2d6a) !important; color: #fff; }
.signal-choice.allow:not([disabled]) { background: linear-gradient(120deg, #fff0dc, #ffd3a3) !important; color: #3a1a10; }

/* Sheets: dark glass from below. */
.room-sheet { border: 0 !important; background: var(--glass) !important; box-shadow: 0 -20px 60px #0008 !important; }
.room-panel-backdrop { background: #0d050b8c !important; }
.deck-card { border: 0 !important; border-radius: 22px !important; min-height: 78px; padding: 12px 14px !important; text-align: left; font-family: var(--hand); font-size: 17px !important; line-height: 1.45; color: #ffe0ea !important;
  background: linear-gradient(160deg, #ff8cb429, #ffffff0a) !important; }
.deck-card[data-cue="slow"] { background: linear-gradient(160deg, #ffa66e29, #ffffff0a) !important; }
.deck-card[data-cue="stop"] { background: linear-gradient(160deg, #a99bff2e, #ffffff0a) !important; }
.deck { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
.phrase { font-family: var(--hand); font-size: 16px; }

/* Waiting for a match: the room goes dark, words breathe. */
.room[data-view="queue"] .stage-content > h2 { font-family: var(--hand) !important; font-weight: 500 !important; font-size: clamp(20px, 6vw, 26px) !important; letter-spacing: .02em; color: #ffd6e4; white-space: nowrap; }

/* Wide screens: stage and pillar on the left, the talk as a full column on the right. */
@media (min-width: 900px) {
  body:has(#lobby[hidden]) main.shell { width: min(1320px, 100% - 36px); }
  .room[data-view="meet"] .stage-stack, .room[data-view="result"] .stage-stack { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); grid-template-areas: "dock talk"; align-items: start; }
  .room[data-view="meet"] .control-dock, .room[data-view="result"] .control-dock { grid-area: dock; }
  .room[data-view="meet"] .room-talk, .room[data-view="result"] .room-talk { grid-area: talk; position: sticky; top: calc(var(--head) + 8px); }
  .room[data-view="play"] .stage-stack {
    grid-template-columns: minmax(0, 1fr) 64px minmax(320px, 400px);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "strip strip talk" "stage heat talk" "dock dock talk";
  }
  .room[data-view="play"] .room-talk .chat-panel { flex: 1 1 auto; display: flex; flex-direction: column; }
  .room[data-view="play"] .room-talk .chat-scroll { flex: 1; max-height: none !important; }
  .cue-word { font-size: clamp(96px, 14dvh, 150px) !important; }
}
@media (min-width: 1200px) { .desk-deck, .desk-replies { display: block; } }

@media (prefers-reduced-motion: reduce) {
  .sheen, .start-button::after, .big-button::before, .heat[data-zone="edge"] .heat-fill, .tool-sprint.on { animation: none !important; }
}

/* ---------- 偷偷看 (spectator) ---------- */
.watch-panel { gap: 10px !important; padding-bottom: calc(150px + env(safe-area-inset-bottom)) !important; }
.watch-heading .button { background: #ffffff10 !important; }
.watch-main { display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: 10px; min-height: 46dvh; }
.watch-stage { border: 0 !important; background: none !important; box-shadow: none !important; min-height: 0 !important; padding: 18px 4px !important; gap: 4px !important; }
.watch-stage::before, .watch-stage::after { display: none !important; }
.watch-light { display: none !important; }
.watch-phase { letter-spacing: .5em !important; }
.watch-cue { font-size: clamp(72px, 12dvh, 120px) !important; font-weight: 900 !important; line-height: 1 !important; letter-spacing: .08em !important; color: #fff; text-shadow: 0 0 30px var(--glow, #ff5a91d9), 0 0 90px var(--glow, #ff5a91d9) !important; }
.watch-cue[data-cue="slow"] { --glow: #ff9660cc; }
.watch-cue[data-cue="stop"] { --glow: #a08cffd9; }
.watch-beat { display: flex; gap: 12px; color: var(--soft); font-size: 13px; }
.watch-strength { color: #ff8fb1; letter-spacing: .1em; }
.watch-stage time { font-family: var(--serif); font-weight: 700 !important; font-size: 17px; }
.watch-players { color: var(--dim) !important; }
.watch-mics { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 2px; }
.watch-mic { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: #ffffff10; color: var(--dim); font-size: 12px; }
.watch-mic:empty { display: none; }
.watch-mic::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ffffff38; }
.watch-mic[data-mic="on"] { color: #c9f5dd; background: #3ee08f1f; }
.watch-mic[data-mic="on"]::before { background: #3ee08f; box-shadow: 0 0 8px #3ee08f; animation: pulse 1.4s ease-in-out infinite; }
.watch-heat { --v: 0; position: relative; display: flex !important; flex-direction: column; gap: 6px; height: auto !important; margin: 0 !important; background: none !important; overflow: visible !important; animation: none !important; }
.watch-heat-track { position: relative; flex: 1; border-radius: 999px; overflow: hidden; background: linear-gradient(180deg, #ffffff08, #ffffff17); }
.watch-heat i { position: absolute; inset: auto 0 0 0 !important; width: auto !important; height: calc(max(var(--v), 4) * 1%); border-radius: inherit;
  background: linear-gradient(0deg, #ff9a62 0%, #ff6f98 45%, #ff2d6a 85%, #fff0f5 100%) !important; box-shadow: 0 0 26px #ff4f84a6 !important; transition: height .5s cubic-bezier(.2, .8, .2, 1); }
.watch-heat-pct { position: absolute; left: 0; right: 0; bottom: calc(min(max(var(--v), 4), 86) * 1% + 6px); text-align: center; font-family: var(--serif); font-size: 14px; color: #fff; transition: bottom .5s; }
.watch-heat[data-zone="edge"] i { animation: boil .45s ease-in-out infinite alternate !important; }
.watch-interaction { display: grid; grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
.watch-interaction > div { border: 0 !important; background: none !important; padding: 0 4px !important; }
.watch-says small { display: block; color: var(--dim); font-size: 11.5px; letter-spacing: .3em; }
.watch-says[data-side="follow"] { text-align: right; }
.watch-controls span { color: var(--soft) !important; font-size: 13px !important; }
.watch-hint, .watch-reply { font-family: var(--hand) !important; font-size: 20px !important; line-height: 1.4; color: #ffe0ea !important; text-shadow: 0 0 16px #ff78a066; }
.watch-cheers { border: 0 !important; background: linear-gradient(0deg, #1c0a17f2, #1c0a1700) !important; box-shadow: none !important; padding: 14px 4px 4px !important; backdrop-filter: none !important; }
.cheer-group { display: inline-flex; align-items: center; gap: 6px; }
.cheer-group small { color: var(--dim); font-size: 11.5px; }
.cheer { border: 0 !important; border-radius: 999px !important; background: #ffffff12 !important; padding: 6px 12px !important; font-family: var(--hand); font-size: 16px; }
.cheer-group[data-group="羞"] .cheer { color: #ffc2cc; background: #ff2d551f !important; }
.cheer.sent { background: #ff8fb144 !important; box-shadow: 0 0 20px #ff6f9866; }
.floater-cheer, .floater-cheer-harsh { font-family: var(--hand) !important; }
@media (min-width: 900px) {
  .watch-panel { grid-template-areas: "head head" "main side" "main chat" !important; }
  /* Head, status row and the space kept for the cheer bar take ~300px; taller pushed 退出旁观 above the top edge. */
  .watch-main { grid-area: main; min-height: calc(100dvh - 300px); }
  /* room.css gives .watch-stage the page-level area "stage"; inside .watch-main that name made the grid invent
     extra tracks, so the heat pillar ended up as a wide bar and the stage drifted. Stage left, pillar right. */
  .watch-main .watch-stage { grid-area: auto !important; min-height: 0 !important; }
}

/* ---------- Matching: words and light, no stat boxes ---------- */
.queue-board, .queue-stats { gap: 6px !important; }
.queue-stat, .queue-board > div, .queue-panel > div { border: 0 !important; background: none !important; box-shadow: none !important; }
.stage-content .stage-controls .button { min-height: 44px; border-radius: 999px !important; }
.match-pill { border: 0 !important; background: #2a0d22cc !important; }

/* ---------- Result: the card, the curve, what next ---------- */
.curve-card, .report-card { border: 0 !important; background: #2a0d2266 !important; }
.after-actions .button, .after-more .button { border-radius: 999px !important; }
.bound-ask { background: #2a0d2266 !important; }
.bound-ask p { font-family: var(--hand) !important; font-size: 19px; }
.queue-stats { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 4px 16px !important; }
.queue-stats > * { padding: 0 !important; background: none !important; }
.queue-stats strong { display: inline !important; font-family: var(--serif); font-size: 16px !important; color: #fff; }
.queue-stats span { margin-left: 4px; }
.queue-clock, .queue-elapsed, .match-elapsed { font-size: 30px !important; letter-spacing: .1em; color: var(--soft); }
.room[data-view="queue"] .orb, .room[data-view="vacant"] .orb, .room[data-view="invite"] .orb { display: none !important; }

/* ---------- 收集的瞬间: achievements as seals ---------- */
.seal { --c1: #ffb3cb; --c2: #ff4f84; --c3: #8a1846; position: relative; flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px;
  background: radial-gradient(120% 120% at 30% 20%, var(--c1), var(--c2) 55%, var(--c3)); box-shadow: 0 0 22px color-mix(in srgb, var(--c2) 55%, transparent), inset 0 1px 0 #fff8; }
.seal b { font-size: 24px; font-weight: 900; color: #fff; text-shadow: 0 1px 6px #0006; line-height: 1; }
.seal[data-tier="2"] { --c1: #ddd6ff; --c2: #8f7cff; --c3: #3c2c9c; }
.seal[data-tier="3"] { --c1: #fff4e0; --c2: #ffc98e; --c3: #a8612e; }
.seal[data-tier="3"] b { color: #4a2410; text-shadow: 0 1px 0 #fff8; }
.seal[data-tier="3"]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(110deg, transparent 30%, #fff9 50%, transparent 70%); background-size: 250% 100%; animation: seal-shine 3.2s ease-in-out infinite; }
@keyframes seal-shine { 0% { background-position: 150% 0; } 60%, 100% { background-position: -50% 0; } }
.seal[data-locked="true"] { background: #ffffff0d; box-shadow: inset 0 0 0 1px #ffffff14; }
.seal[data-locked="true"] b { color: #ffffff40; text-shadow: none; }
.seal[data-locked="true"]::after { display: none; }
.seal-big { width: 64px; height: 64px; border-radius: 20px; }
.seal-big b { font-size: 32px; }
.me-achievements { margin-top: 18px; }
.ach-group { display: flex; align-items: baseline; gap: 8px; margin: 18px 2px 8px; font-size: 16px; letter-spacing: .2em; }
.ach-group small { color: var(--dim); font-family: var(--sans); font-size: 12px; letter-spacing: 0; }
.ach-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 8px !important; padding: 0; margin: 0; list-style: none; }
.ach { display: grid !important; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px !important; border: 0 !important; border-radius: 18px !important;
  background: #2a0d2255 !important; opacity: 1 !important; filter: none !important; }
.ach .seal { grid-row: 1 / span 2; }
.ach strong { font-size: 14px; align-self: end; }
.ach small { color: var(--dim); font-size: 11.5px; line-height: 1.35; align-self: start; }
.ach:not(.unlocked) strong { color: var(--soft); }
.ach-icon { display: none !important; }
.ach-bar { grid-column: 2; height: 3px; margin-top: 4px; border-radius: 3px; background: #ffffff14; overflow: hidden; }
.ach-bar i { display: block; height: 100%; width: calc(var(--share, 0) * 100%); background: linear-gradient(90deg, #ff9a62, #ff5a93); }
.report-badge { display: flex !important; align-items: center; gap: 12px; border: 0 !important; background: none !important; }
.report-badge .seal { animation: seal-in .8s cubic-bezier(.2, .9, .2, 1) both; }
.report-badge:nth-child(2) .seal { animation-delay: .15s; } .report-badge:nth-child(3) .seal { animation-delay: .3s; } .report-badge:nth-child(4) .seal { animation-delay: .45s; }
@keyframes seal-in { 0% { opacity: 0; transform: scale(2.4) rotate(-12deg); filter: blur(10px); } 70% { transform: scale(.94) rotate(2deg); filter: none; } 100% { opacity: 1; transform: none; } }
.unlock-toast { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; min-width: 240px; max-width: 86vw; padding: 18px 22px; border: 0; border-radius: 28px;
  background: #2a0d22d9; box-shadow: 0 20px 60px #0009, 0 0 60px #ffcf9a33; color: var(--text); pointer-events: auto; animation: unlock-in .7s cubic-bezier(.2, .9, .2, 1) both; }
.unlock-toast small { color: var(--dim); letter-spacing: .3em; font-size: 11.5px; }
.unlock-toast strong { font-size: 18px; letter-spacing: .1em; }
.unlock-seals { display: flex; gap: 10px; }
.unlock-seals .seal { animation: seal-in .8s cubic-bezier(.2, .9, .2, 1) both; }
.unlock-seals .seal:nth-child(2) { animation-delay: .15s; } .unlock-seals .seal:nth-child(3) { animation-delay: .3s; }
.unlock-toast.leaving { opacity: 0; transform: translateX(-50%) translateY(-16px); transition: opacity .45s, transform .45s; }
@keyframes unlock-in { from { opacity: 0; transform: translateX(-50%) translateY(20px) scale(.9); } }

/* ---------- 我的, 大厅, 心动: dark glass, no hard boxes ---------- */
.me-avatar, .avatar, .wait-avatar, .pair-avatar, .popup-avatar { box-shadow: 0 0 20px #ff5f8c59; }
.me-stat { border: 0 !important; background: none !important; }
.me-stat dd { font-family: var(--serif); font-weight: 800; }
.level-badge { border: 0 !important; background: #ff8fb12a !important; }
.social-heading h2, .section-label h2 { font-weight: 800; letter-spacing: .14em; }
.voice-card, .hall-card, .self-card { border: 0 !important; background: #2a0d2266 !important; }

/* Long rows of words scroll inside themselves; nothing may widen the page on a phone. */
html { overflow-x: clip; }
.stage-stack > *, .room-talk, .room-talk .chat-panel, .room-talk .chat-form, .chat-slot, .chat-quick, .lead-tools, .control-dock, .lead, .follow, .watch-panel > * { min-width: 0; max-width: 100%; }
.lead { align-content: start !important; }
.lead-tools { align-items: center !important; }
.lead-tools > *, .tool-sprint-wrap > * { height: 38px !important; min-height: 0 !important; }

.solo-board { padding: 0 !important; border: 0 !important; background: none !important; }
.solo-stats strong { font-family: var(--serif); }
.tool-sprint-wrap { position: relative; }
.tool-sprint-time { position: static !important; transform: none !important; width: auto !important; border-radius: 999px !important; }
/* Wide screens: the home column stays a readable width; solo play has no talk column. */
@media (min-width: 900px) {
  .view-home .tonight { max-width: 620px; margin: 0 auto; }
  .room-grid.practice .stage-stack { max-width: 760px; margin: 0 auto; grid-template-columns: minmax(0, 1fr) 64px !important; grid-template-areas: "strip strip" "stage heat" "dock dock" !important; grid-template-rows: auto minmax(0, 1fr) auto !important; }
}
/* Long decks scroll under the tabs; the tabs keep their height and stay on top. */
.sheet-tabs { min-height: 44px; position: sticky; top: -6px; z-index: 2; padding: 6px 0 !important; margin: -6px 0 0; background: linear-gradient(180deg, #2e1027 70%, #2e102700); }
.sheet-tab { min-height: 34px !important; }

/* ---------- The round's clock: big, top centre; urgent in the last minute ---------- */
.room[data-view="play"] .time-label, .room-stage .time-label { position: absolute; top: 2px !important; left: 50% !important; right: auto !important; transform: translateX(-50%);
  display: flex; align-items: baseline; gap: 6px; font-size: 26px !important; font-weight: 800 !important; letter-spacing: .06em; color: #fff !important; text-shadow: 0 0 18px #ff78a066; font-variant-numeric: tabular-nums; z-index: 3; }
.room-stage .time-label::before { content: "还剩"; font-family: var(--sans); font-size: 11.5px; font-weight: 500; letter-spacing: .3em; color: var(--dim); }
.room-stage .time-label[data-urgency="final"] { color: #ffd0de !important; animation: clock-beat 1s ease-in-out infinite; }
.room-stage .time-label[data-urgency="last"] { color: #ff5a8a !important; font-size: 34px !important; animation: clock-beat .5s ease-in-out infinite; }
@keyframes clock-beat { 50% { transform: translateX(-50%) scale(1.08); } }
.room-stage .progress { display: block !important; position: absolute; left: 10% !important; right: 10% !important; top: 40px !important; bottom: auto !important; height: 2px !important; background: #ffffff14 !important; border-radius: 2px; overflow: hidden; }
.room-stage .progress span { background: linear-gradient(90deg, #ffb3cb, #ff5a93) !important; box-shadow: 0 0 10px #ff5a93 !important; }
.room-stage .progress[hidden] { display: none !important; }
.room[data-view="play"] .room-stage { padding-top: 52px !important; }

/* ---------- The metronome: four ticks under the word, the first one heavier ---------- */
.beat-ticks { display: flex; align-items: flex-end; gap: 10px; height: 22px; margin-top: 4px; }
.beat-ticks i { width: 6px; height: 12px; border-radius: 4px; background: #ffffff26; transition: background .12s, box-shadow .12s, height .12s; }
.beat-ticks i:first-child { width: 8px; }
.beat-ticks i.on { height: 22px; background: var(--tick, #ff6f9c); box-shadow: 0 0 14px var(--tick, #ff6f9c), 0 0 30px var(--tick, #ff6f9c); }
.room-stage[data-cue="slow"] .beat-ticks { --tick: #ffa66e; }
.room-stage[data-sprint] .beat-ticks { --tick: #fff; }
.beat-veil { display: block !important; position: fixed !important; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(120% 90% at 50% 45%, transparent 52%, color-mix(in srgb, var(--veil-c, #ff4f84) 42%, transparent)) !important; }
.room:has(.room-stage[data-cue="slow"]) .beat-veil { --veil-c: #ff9a62; }

/* ---------- Near the edge: everything runs hotter ---------- */
.room[data-fever="high"] .cue-word { animation: tremble .22s steps(2) infinite; }
.room[data-fever="edge"] .cue-word { animation: tremble .12s steps(2) infinite; text-shadow: 0 0 30px #ff2d6a, 0 0 90px #ff2d6a !important; }
.room[data-fever="edge"] .beat-veil { --veil-c: #ff1f5a; }
.room[data-fever="edge"] .room-stage::after { content: "就差一点……"; display: block !important; position: absolute; left: 0; right: 0; bottom: 6px; text-align: center;
  font-family: var(--hand); font-size: 18px; color: #ffc2d2; text-shadow: 0 0 16px #ff2d6a; animation: breathe-text 1.2s ease-in-out infinite; }
@keyframes tremble { 0% { translate: 0 0; } 50% { translate: .6px -.6px; } 100% { translate: -.6px .4px; } }
@keyframes breathe-text { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .room[data-fever] .cue-word { animation: none !important; } }

/* ---------- Asking for permission, counted permission ---------- */
.rail-chip.beg { background: linear-gradient(120deg, #ffd9a838, #ff8fb12e) !important; color: #ffe6c4; font-family: var(--hand); font-size: 15px; box-shadow: 0 0 16px #ffc58a33; }
.room[data-fever] .rail-chip.beg { animation: beg-glow 1.1s ease-in-out infinite; }
@keyframes beg-glow { 50% { opacity: .72; } }
.tool-note.gold { color: #ffe2bb; font-size: 13px; white-space: nowrap; align-self: center; padding: 0 6px; }
.big-button.gold[disabled] { opacity: 1 !important; filter: saturate(.7) brightness(.85); }
.signal .chip-button.gold { margin-top: 4px; border-radius: 999px !important; background: #ffd9a826 !important; color: #ffe2bb; }
.signal[data-kind="beg"] .signal-body h2 { text-shadow: 0 0 30px #ffc58ad9, 0 0 90px #ff8fb1cc; }
.signal[data-kind="extend"] .signal-body h2 { font-size: clamp(40px, 11vw, 56px) !important; }

/* ---------- 找到了 ---------- */
.match-scene { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; pointer-events: auto;
  background: radial-gradient(70% 50% at 50% 45%, #2a0c22b3, #12050ef2); animation: scene-in .5s ease-out both; }
.match-scene h2 { opacity: 0; font-size: clamp(56px, 17vw, 84px); font-weight: 900; letter-spacing: .2em; color: #fff; text-shadow: 0 0 24px #ffcf9acc, 0 0 80px #ff8fb199; }
.match-scene h2.in { opacity: 1; }
.match-scene .ms-who, .match-scene .ms-tags, .match-scene .ms-line { opacity: 0; transform: translateY(10px); filter: blur(6px); transition: opacity .7s, transform .7s, filter .7s; }
.match-scene.who .ms-who { opacity: 1; transform: none; filter: none; }
.match-scene.who .ms-tags { opacity: 1; transform: none; filter: none; transition-delay: .25s; }
.match-scene.who .ms-line { opacity: 1; transform: none; filter: none; transition-delay: .55s; }
.ms-who { display: grid; gap: 2px; }
.ms-who strong { font-size: 26px; color: #fff; }
.ms-who span, .ms-tags { color: var(--soft); font-size: 13.5px; letter-spacing: .1em; }
.ms-line { font-size: 24px; color: #ffe0ea; text-shadow: 0 0 18px #ff78a080; }
.match-scene.leaving { opacity: 0; filter: blur(8px); transition: opacity .55s, filter .55s; }
@keyframes scene-in { from { opacity: 0; } }

/* ---------- 收集的瞬间: a card on 我的, the collection in a popup ---------- */
.ach-open { display: grid; gap: 10px; width: 100%; padding: 16px; border: 0; border-radius: 24px; text-align: left; color: var(--text);
  background: #2a0d2266; }
.ach-open:active { transform: scale(.98); }
.ach-open-head { display: flex; align-items: baseline; gap: 8px; }
.ach-open-head strong { font-size: 18px; letter-spacing: .14em; }
.ach-open-head small { color: var(--dim); }
.ach-open-more { margin-left: auto; color: #ffb3c9; font-size: 13px; }
.ach-recent { display: flex; gap: 10px; }
.ach-recent .seal { width: 46px; height: 46px; }
.ach-open-note { color: var(--dim); font-size: 12px; }
.ach-popup { position: relative; display: grid; gap: 12px; }
.ach-popup .sheet-tabs { position: sticky; top: -1px; background: linear-gradient(180deg, #2e1027 75%, #2e102700); }
.ach-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ach-card { display: grid; justify-items: center; gap: 6px; padding: 12px 4px 10px; border: 0; border-radius: 18px; background: #ffffff08; color: var(--soft); animation: card-in .45s cubic-bezier(.2, .9, .2, 1) both; }
.ach-card:nth-child(2) { animation-delay: .04s; } .ach-card:nth-child(3) { animation-delay: .08s; } .ach-card:nth-child(4) { animation-delay: .12s; }
.ach-card:nth-child(5) { animation-delay: .16s; } .ach-card:nth-child(6) { animation-delay: .2s; } .ach-card:nth-child(n+7) { animation-delay: .24s; }
.ach-card strong { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.ach-card.unlocked { background: #ffffff10; color: #fff; }
.ach-card:active { transform: scale(.94); }
@keyframes card-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.ach-detail { position: absolute; inset: -8px; z-index: 3; display: grid; justify-items: center; align-content: center; gap: 10px; padding: 24px 18px; border-radius: 24px; text-align: center;
  background: radial-gradient(100% 70% at 50% 30%, #4a1838f2, #1e0a1af7); box-shadow: 0 20px 60px #000a; animation: detail-in .5s cubic-bezier(.2, .9, .2, 1) both; }
.ach-detail h3 { font-size: 26px; letter-spacing: .12em; }
.ach-detail p.hand { font-size: 19px; color: #ffe0ea; max-width: 16em; }
.ach-tier { color: var(--dim); letter-spacing: .3em; font-size: 11.5px; }
.ach-when { color: var(--soft); font-size: 13px; }
.ach-detail .ach-bar { width: 60%; height: 4px; margin: 0; grid-column: auto; }
.ach-detail .seal { animation: seal-in .8s cubic-bezier(.2, .9, .2, 1) both; }
.ach-detail[data-tier="3"] { background: radial-gradient(100% 70% at 50% 30%, #5a3420f2, #1e0a1af7); }
@keyframes detail-in { from { opacity: 0; transform: scale(.92); filter: blur(8px); } }
.seal-huge { width: 112px; height: 112px; border-radius: 34px; }
.seal-huge b { font-size: 58px; }


/* ==========================================================================
   Smoothness pass (11-23). Two rules everywhere:
   1. No frosted glass. backdrop-filter over a background that redraws every frame is the most expensive thing a
      phone can be asked to do, and some browsers draw it as hard-edged squares. Panels get a little more opacity.
   2. Anything that loops animates only opacity or transform (handled by the GPU), never box-shadow, filter,
      text-shadow or background (those repaint every frame).
   ========================================================================== */
*, *::before, *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.wait-card, .watch-row, #online-filters, .me-card, .me-level, .me-daily, .me-voice, .me-stats, .relation-option span, .role-option span, .persona-option span, .consent-option span,
.meet-card, .curve-card, .report-card, .bound-ask, .gate-card, .ach-open, .voice-card, .hall-card, .self-card, .ach { background: #2a0d22c2 !important; }
.chat-bubble { background: #2a0d22cc !important; }
.chat-item:not(.mine) .chat-bubble { background: #3a1230cc !important; }
.chat-compose, .button, .button.outline, .chip-button, .phrase, .rail-chip, .sheet-tab, .cheer, .tool-btn, .tool-sprint-time, .heat .heat-track { background-color: #ffffff14; }
.signal { background: radial-gradient(90% 70% at 50% 45%, #1e0816cc, #12050ef0) !important; }
.match-scene { background: radial-gradient(70% 50% at 50% 45%, #2a0c22f2, #12050efa) !important; }
.unlock-toast { background: #2a0d22f5 !important; }
.room-panel-backdrop { background: #0d050bc7 !important; }
.peer-feedback, .card-fly { background: #2a0d22eb !important; }
.room-sheet, dialog, .report-dialog { background: linear-gradient(180deg, #3a142ef7, #1e0a1afc) !important; }

/* Old looping effects that repainted every frame: off, replaced by the light halos below. */
.start-button, .tool-sprint, .tool-sprint.on, .tool-btn.gold, .big-button.edge, .big-button.gold, .signal-choice.sprint, .rm-tool.primary,
.press-edge, .heat-fill, .heat[data-zone="edge"] .heat-track, .heat[data-zone="edge"] .heat-fill, .watch-heat[data-zone="edge"] i, .tempo-bar[data-zone="wild"] .tempo-thumb,
.follow[data-heat-zone="edge"] .big-button.edge, .solo-board[data-heat-zone="edge"] .big-button.edge, .meter-cell, .partner-strip, .live-dot { animation: none !important; }
/* Urgency is a halo breathing faster (opacity and scale only). */
.follow[data-heat-zone="edge"] .big-button.edge::before, .solo-board[data-heat-zone="edge"] .big-button.edge::before { animation: halo .7s ease-in-out infinite !important; opacity: .7; }
.tool-sprint { position: relative; isolation: isolate; }
.tool-sprint.on::after { content: ""; position: absolute; inset: -6px; z-index: -1; border-radius: 999px; background: #ff2d6a; filter: blur(12px); animation: halo .6s ease-in-out infinite; }
/* The heat pillar at the edge: a bright core that pulses by opacity over the fill. */
.heat .heat-track::after, .watch-heat-track::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: linear-gradient(0deg, transparent 30%, #ffffff8c); }
.heat[data-zone="edge"] .heat-track::after, .watch-heat[data-zone="edge"] .watch-heat-track::after { animation: edge-core .45s ease-in-out infinite alternate; }
.heat[data-zone="edge"] .heat-track, .watch-heat[data-zone="edge"] .watch-heat-track { box-shadow: 0 0 36px #ff2d6acc !important; }
@keyframes edge-core { from { opacity: .1; } to { opacity: .85; } }
/* The fastest tempos: the thumb glows, statically. */
.tempo-bar[data-zone="wild"] .tempo-thumb { box-shadow: 0 0 22px #ff2d6a, 0 0 6px #fff; }
/* Gold seals shine with a moving band (transform), not a moving background. */
.seal[data-tier="3"] { overflow: hidden; isolation: isolate; }
.seal[data-tier="3"]::after { inset: 0 auto 0 -60% !important; width: 50%; background: linear-gradient(100deg, transparent, #ffffffa6, transparent) !important; background-size: auto !important;
  animation: seal-band 3.2s ease-in-out infinite !important; }
@keyframes seal-band { 0% { transform: translateX(0); } 60%, 100% { transform: translateX(420%); } }
/* Big type glows a little tighter: a smaller blur is much cheaper to paint when the word changes. */
.title-glow, .gate-title, .tonight-title, .role-pick-option[aria-checked="true"] b { text-shadow: 0 0 16px #ff78a58c, 0 0 40px #ff5a8c59 !important; }
.signal-body h2 { text-shadow: 0 0 22px #ff5a91d9, 0 0 54px #ff5a91a6 !important; }
.watch-cue { text-shadow: 0 0 22px var(--glow, #ff5a91d9), 0 0 54px var(--glow, #ff5a91a6) !important; }
/* Elements that animate often get their own GPU layer up front instead of being promoted mid-animation. */
.cue-word, .beat-veil, .time-label { will-change: transform; }
.beat-veil { will-change: opacity; }
/* Bottom navigation on phones: words on a soft fade, not a floating dark box. */
@media (max-width: 759px) {
  .view-tabs { left: 0 !important; right: 0 !important; bottom: 0 !important; height: calc(var(--nav-h) + env(safe-area-inset-bottom)) !important;
    padding: 18px 12px calc(4px + env(safe-area-inset-bottom)) !important; border-radius: 0 !important; border: 0 !important; box-shadow: none !important;
    background: linear-gradient(0deg, #1c0a17 0%, #1c0a17e6 45%, #1c0a1700 100%) !important; }
  .view-tab { border-radius: 0 !important; box-shadow: none !important; }
  .view-tab[aria-current="page"]::before, .view-tab[aria-current="page"]::after { display: none !important; }
}

/* Lobby pages (11-23): 大厅、心动 and the history on 我的 are whole page sections that share .social-panel with two
   small notices. The sections float on the light (no box); only the small notices are cards. */
#social.social-panel, #round-history.social-panel { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; }
#boot-status.social-panel, #moderation-notice.social-panel { background: #2a0d22c2 !important; border: 0 !important; border-radius: 20px !important; padding: 14px 16px !important; }
.social-heading h2 { font-size: 22px; }
.social-message, #friend-sync { color: var(--soft); }
#social-list .social-row, #round-history .history-list > li { border: 0 !important; border-radius: 20px !important; background: #2a0d22b3 !important; padding: 12px 14px !important; }
/* After a round: one slim line, on 今晚 and 心动 only. */
#lobby-notices { display: grid; gap: 8px; margin: 4px 0 10px; }
.recent-round { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 999px; background: #2a0d22d9; box-shadow: 0 10px 30px #0006; }
.recent-round p { flex: 1; min-width: 0; font-size: 13.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-round p b { color: #fff; font-weight: 600; }
.recent-round .button { min-height: 34px !important; padding: 4px 12px !important; border-radius: 999px !important; font-size: 13px; }
#lobby:not([data-view="home"]):not([data-view="friends"]) .recent-round { display: none; }
#lobby-notices:not(:has(> :not(.recent-round))) { margin: 0; }
#lobby:not([data-view="home"]):not([data-view="friends"]) #lobby-notices:not(:has(> :not(.recent-round))) { display: none; }
.me-stats { border-radius: 24px !important; padding: 14px 16px !important; overflow: hidden; }

/* The field's own canvas (night.js draws it; opaque, sized by a pixel budget, stretched to the screen). */
.night-field .night-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

/* Home and gate type waits for its fonts and a quiet moment before it moves in (home.js adds .type-in);
   if scripts never run, it shows anyway after a moment. */
html:not(.type-in) .tonight-title, html:not(.type-in) .tonight-line, html:not(.type-in) #gate-title { opacity: 0; animation: show-late .4s 2.5s forwards; }
@keyframes show-late { to { opacity: 1; } }

/* 说停 / 忍住 / 都可以: the old line disappears at once and the new one rises in (no crossfade of two lines in the same
   place, no blur on text). */
.role-pick-option small { transition: none !important; filter: none !important; transform: translateY(6px); }
.role-pick-option[aria-checked="true"] small { transform: none; transition: opacity .4s ease-out .05s, transform .4s cubic-bezier(.2, .8, .2, 1) .05s !important; }

/* ---------- 说停 (11-23 redesign): TA's heat in the top strip, a fixed deck at the bottom, nothing off-screen ---------- */
.room[data-view="play"][data-role="lead"] .stage-stack { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-areas: "strip" "stage" "talk" "dock"; }
@media (min-width: 900px) {
  .room[data-view="play"][data-role="lead"] .stage-stack { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "strip talk" "stage talk" "dock talk"; }
}
.partner-strip .heat.heat-h { display: block !important; height: auto !important; margin-top: 8px; }
.heat.heat-h .heat-track { flex: none !important; height: 14px !important; min-height: 0 !important; }
.heat.heat-h .heat-fill { top: 0 !important; bottom: 0 !important; left: 0 !important; right: auto !important; height: auto !important; width: calc(max(var(--v), 3) * 1%) !important;
  background: linear-gradient(90deg, #ff9a62 0%, #ff6f98 45%, #ff2d6a 85%, #fff0f5 100%) !important; }
.heat.heat-h[data-ready] .heat-fill { transition: width .35s cubic-bezier(.2, .8, .2, 1) !important; }
.heat.heat-h .heat-edge { top: 0 !important; bottom: 0 !important; left: 90% !important; right: auto !important; width: 2px !important; height: auto !important; }
.heat.heat-h .heat-pct { top: 50% !important; bottom: auto !important; left: auto !important; right: 8px !important; transform: translateY(-50%) !important; font-size: 11px !important; }
.heat.heat-h .heat-caption { display: none; }

.lead { gap: 8px !important; }
.lead-cues .lead-cue { height: 56px; }
.lead-strength { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
.lead-strength .strength-picks { grid-column: 1 / -1; grid-row: 2; }
.lead-strength .strength-word { justify-self: end; }
.lead-strength .lead-sprint-wrap, .lead-strength > .lead-sprint { grid-column: 2; grid-row: 3; justify-self: end; }
@media (min-width: 600px) {
  .lead-strength { grid-template-columns: 34px minmax(0, 1fr) minmax(max-content, 46px) auto; gap: 10px; }
  .lead-strength .strength-picks, .lead-strength .lead-sprint-wrap, .lead-strength > .lead-sprint { grid-column: auto; grid-row: auto; }
}
.strength-off { color: var(--dim); font-size: 12px; }
.lead-sprint-wrap { display: inline-flex; gap: 3px; }
.lead-sprint { position: relative; isolation: isolate; height: 38px; padding: 0 14px; border-radius: 999px; background: linear-gradient(120deg, #ff8db1, #ff2d6a); color: #fff; font-weight: 800; font-size: 14.5px; white-space: nowrap; box-shadow: 0 0 18px #ff2d6a59; }
.lead-sprint small { margin-left: 4px; font-weight: 600; }
.lead-sprint.on::after { content: ""; position: absolute; inset: -6px; pointer-events: none; z-index: -1; border-radius: 999px; background: #ff2d6a; filter: blur(12px); animation: halo .6s ease-in-out infinite; }
.lead-sprint-time { height: 38px; padding: 0 10px; border-radius: 999px; background: #ffffff14; color: var(--soft); font-size: 13px; }
.lead-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.lead-tile { display: grid; gap: 2px; align-content: center; justify-items: center; min-height: 54px; padding: 6px 4px; border-radius: 18px; background: #ffffff12; color: var(--text); text-align: center; }
.lead-tile b { font-size: 14.5px; font-weight: 700; white-space: nowrap; }
.lead-tile small { font-size: 10.5px; line-height: 1.25; color: var(--dim); }
.lead-tile:active { transform: scale(.95); }
.lead-tile.gold { background: linear-gradient(160deg, #ffd9a83d, #ff8fb12e); color: #ffe6c4; }
.lead-tile.gold small { color: #ffe6c4b3; }
.lead-tile.done { box-shadow: inset 0 0 0 1px #ffd9a866; }
.lead-tools { display: none !important; }
.grant-choices { display: grid; gap: 10px; }
.grant-choice { display: grid; gap: 3px; padding: 16px 18px; border: 0; border-radius: 22px; text-align: left; background: linear-gradient(120deg, #fff0dc, #ffd3a3 50%, #f0a77f); color: #3a1a10; }
.grant-choice b { font-family: var(--serif); font-size: 19px; }
.grant-choice small { font-size: 12.5px; opacity: .8; }
.grant-choice + .grant-choice { background: #ffd9a826; color: #ffe6c4; }
.room[data-room-panel="grant"] [data-sheet="grant"] { transform: none; visibility: visible; transition: transform .55s var(--spring), visibility 0s; }

/* Cards: which light a card switches to, and the ones already sent. */
.deck-tag { display: block; margin-bottom: 6px; font-family: var(--sans); font-size: 11px; letter-spacing: .08em; color: #ff8fb1; }
.deck-tag[data-cue="slow"] { color: #ffb685; } .deck-tag[data-cue="stop"] { color: #b9adff; } .deck-tag[data-cue="any"] { color: #f0d9e3b3; }
.deck-card[data-used] { opacity: .5; }

/* ---------- Heat runs high: the bar wobbles, then shakes; embers rise in it; the big word trembles ---------- */
@keyframes heat-wobble { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-1.2px, .6px) rotate(-.5deg); } 50% { transform: translate(1.2px, -.6px) rotate(.5deg); } 75% { transform: translate(-.6px, -1px); } }
@keyframes heat-shake { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-3px, 1px) rotate(-1.2deg); } 40% { transform: translate(3px, -1px) rotate(1.2deg); } 60% { transform: translate(-2px, -1.5px) rotate(-.7deg); } 80% { transform: translate(2.5px, 1.5px) rotate(.9deg); } }
.heat[data-zone="high"] .heat-track { animation: heat-wobble .3s linear infinite !important; }
.heat[data-zone="edge"] .heat-track { animation: heat-shake .14s linear infinite !important; }
.heat.heat-h[data-zone="high"] .heat-track { animation-name: heat-wobble !important; }
.heat .heat-fill { overflow: hidden; }
.heat .heat-fill::before { content: ""; position: absolute; left: 0; right: 0; top: -100%; height: 200%; opacity: 0; transition: opacity .5s;
  background: radial-gradient(circle at 30% 70%, #fffc 0 1.4px, transparent 2px) 0 0 / 16px 24px, radial-gradient(circle at 70% 30%, #ffd3e0cc 0 1px, transparent 1.6px) 0 0 / 22px 30px;
  animation: embers 1.4s linear infinite; }
.heat[data-zone="high"] .heat-fill::before { opacity: .7; }
.heat[data-zone="edge"] .heat-fill::before { opacity: 1; animation-duration: .7s; }
.heat.heat-h .heat-fill::before { top: 0; left: -100%; width: 200%; height: 100%; animation-name: embers-x; }
@keyframes embers { from { transform: translateY(0); } to { transform: translateY(50%); } }
@keyframes embers-x { from { transform: translateX(0); } to { transform: translateX(50%); } }
@keyframes tremble { 0%, 100% { translate: 0 0; } 25% { translate: 1.5px -1px; } 50% { translate: -1.5px 1px; } 75% { translate: 1px 1.5px; } }
@keyframes tremble-hard { 0%, 100% { translate: 0 0; rotate: 0deg; } 20% { translate: 3px -2px; rotate: -.8deg; } 40% { translate: -3px 2px; rotate: .8deg; } 60% { translate: 2px 2.5px; rotate: -.5deg; } 80% { translate: -2.5px -1.5px; rotate: .6deg; } }
.room[data-fever="high"] .cue-word { animation: tremble .2s linear infinite !important; }
.room[data-fever="edge"] .cue-word { animation: tremble-hard .12s linear infinite !important; }
.room[data-fever="edge"] .partner-strip .ps-level { color: #ff8fb1; }
@media (prefers-reduced-motion: reduce) {
  .heat .heat-track, .room[data-fever] .cue-word { animation: none !important; }
  .heat .heat-fill::before { animation: none; }
}
/* "就差一点……" belongs to the one holding on; the leader reads it in TA's strip. */
.room[data-role="lead"][data-fever="edge"] .room-stage::after { display: none !important; }
/* Embers: sparse, uneven sparks instead of a regular dot grid. */
.heat .heat-fill::before { background:
  radial-gradient(circle at 23% 61%, #fffd 0 1.2px, transparent 1.8px) 0 0 / 19px 37px,
  radial-gradient(circle at 71% 17%, #ffd3e0cc 0 .9px, transparent 1.5px) 7px 11px / 29px 53px,
  radial-gradient(circle at 48% 83%, #ffe9c9bb 0 1.6px, transparent 2.3px) 3px 29px / 41px 71px !important; }
.heat[data-zone="high"] .heat-fill::before { opacity: .55; }
.lead-tile small { white-space: nowrap; }
/* Top of the room and the spectator's cheer bar: the fade runs edge to edge (an inset fade showed as a dark band
   with hard sides, the same "box" as the lobby pages). */
.room-head { background: none !important; isolation: isolate; }
.room-head::before { content: ""; position: fixed; z-index: -1; top: 0; left: 0; right: 0; height: calc(var(--head) + 18px + env(safe-area-inset-top)); pointer-events: none;
  background: linear-gradient(180deg, #1c0a17c7 0%, #1c0a1773 60%, #1c0a1700 100%); }
.watch-cheers { left: 0 !important; right: 0 !important; transform: none !important; max-width: none !important; border-radius: 0 !important; padding: 18px 12px calc(10px + env(safe-area-inset-bottom)) !important; }
.watch-heading { position: relative; isolation: isolate; }

/* ---------- 11-23 b: no blur in motion ----------
   Safari clips an animated filter: blur() (and a large glow on a moving layer) to the element's own box, so text that
   blurs in shows a hard rectangle around it — the "boxes" seen on 找到了, the role lines and the banners. Every entrance
   below moves only transform and opacity; glows are small on moving text and big only on still pseudo-elements. */
@keyframes light-in { from { opacity: .4; transform: scale(.82); } to { opacity: 1; transform: none; } }
@keyframes banner { 0% { opacity: 0; transform: scale(1.6); } 18% { opacity: 1; transform: scale(1); } 72% { opacity: 1; } 100% { opacity: 0; transform: translateY(-24px); } }
@keyframes card-fly { 0% { opacity: 0; transform: translate(-50%, 40%) rotate(-8deg) scale(.7); } 14% { opacity: 1; transform: translate(-50%, -50%) rotate(1deg) scale(1.02); }
  22% { transform: translate(-50%, -50%) rotate(0) scale(1); } 82% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -70%) scale(.9); } }
@keyframes whisper { from { opacity: 0; transform: translateY(10px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes slam { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.6); } 16% { opacity: 1; transform: translate(-50%, -50%) scale(.92); }
  26% { transform: translate(-50%, -50%) scale(1.04); } 34% { transform: translate(-50%, -50%) scale(1); } 72% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.82); } }
@keyframes slam-go { 0% { opacity: 0; transform: translate(-50%, -50%) scale(3); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(.94); }
  30% { transform: translate(-50%, -50%) scale(1.06); } 40% { transform: translate(-50%, -50%) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -64%) scale(1.3); } }
@keyframes gate-out { to { opacity: 0; transform: scale(1.04); visibility: hidden; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes word-slam { 0% { opacity: 0; transform: scale(2.2); } 40% { opacity: 1; transform: scale(.95); } 100% { transform: none; } }
@keyframes letter-slam { 0% { opacity: 0; transform: translateY(-.5em) scale(1.9) rotate(-6deg); } 55% { opacity: 1; transform: translateY(0) scale(.94); } 75% { transform: scale(1.04); } 100% { transform: none; } }
@keyframes seal-in { 0% { opacity: 0; transform: scale(2.4) rotate(-12deg); } 70% { transform: scale(.94) rotate(2deg); } 100% { opacity: 1; transform: none; } }
@keyframes detail-in { from { opacity: 0; transform: scale(.92); } }
@keyframes strength-up { 30% { transform: scale(1.25); } }
.stage-banner { text-shadow: 0 0 16px var(--c, var(--go)) !important; }
/* Characters that animate one by one carry their own room for a glow (a moving layer never cuts it off). */
.ch { padding: .22em .12em; margin: -.22em -.12em; }

/* 找到了: the halo is a still, soft ellipse behind the word; the word itself only fades and scales. */
.match-scene h2 { position: relative; isolation: isolate; text-shadow: 0 0 14px #ffcf9acc !important; }
.match-scene h2::before { content: ""; position: absolute; z-index: -1; left: -30%; right: -30%; top: -55%; bottom: -55%; pointer-events: none;
  background: radial-gradient(closest-side, #ff8fb15c, #ff8fb124 55%, transparent); opacity: 0; transition: opacity .9s ease-out .15s; }
.match-scene h2.in::before { opacity: 1; }
.match-scene .ms-who, .match-scene .ms-tags, .match-scene .ms-line { filter: none !important; transition: opacity .7s, transform .7s cubic-bezier(.2, .8, .2, 1) !important; }
.match-scene.who .ms-tags { transition-delay: .25s !important; } .match-scene.who .ms-line { transition-delay: .55s !important; }
.match-scene .ms-line { text-shadow: 0 0 10px #ff78a080 !important; }
.match-scene.leaving { filter: none !important; transform: scale(1.03); transition: opacity .55s, transform .55s !important; }
/* The big stage word: tight glow on the letters, the wide one as a still bloom behind them. */
.cue-word, .watch-cue, .signal-body h2 { text-shadow: 0 0 14px var(--glow, #ff5a91d9) !important; }
.room[data-fever="edge"] .cue-word { text-shadow: 0 0 16px #ff2d6a !important; }
.room-stage .stage-content { isolation: isolate; }
.room-stage .stage-content::before { content: ""; position: absolute; z-index: -1; left: 4%; right: 4%; top: 2%; height: 62%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow, #ff5a91) 30%, transparent), transparent); }
.room-stage:has(.cue-word[data-cue="slow"]) .stage-content { --glow: #ff9660; }
.room-stage:has(.cue-word[data-cue="stop"]) .stage-content { --glow: #a08cff; }

/* ---------- TA, for 说停: name, state and a big number above a thicker bar ---------- */
.partner-strip { gap: 6px !important; }
.partner-strip .ps-who { gap: 10px; }
.partner-strip .ps-avatar { width: 38px; height: 38px; font-size: 16px; }
.partner-strip .ps-name { display: grid !important; gap: 2px; align-items: start; }
.partner-strip .ps-name strong { font-size: 16px; }
.partner-strip .ps-level { justify-self: start; font-size: 13.5px !important; color: var(--soft) !important; letter-spacing: .04em; }
.ps-pct { flex: none; min-width: 2.4em; text-align: right; font-size: 32px; font-weight: 800; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 12px #ff5a91a6; }
.partner-strip[data-zone="mid"] .ps-level { color: #ffc9d8 !important; }
.partner-strip[data-zone="high"] .ps-level { color: #ff9dba !important; font-weight: 700; }
.partner-strip[data-zone="high"] .ps-pct { color: #ffd6e2; animation: tremble .2s linear infinite; }
.partner-strip[data-zone="edge"] .ps-level { padding: 1px 9px; border-radius: 999px; background: #ff2d6a; color: #fff !important; font-weight: 700; animation: beg-glow .7s ease-in-out infinite; }
.partner-strip[data-zone="edge"] .ps-pct { color: #ff8fb1; text-shadow: 0 0 14px #ff2d6a; animation: tremble-hard .12s linear infinite; }
.heat.heat-h { margin-top: 2px !important; }
.heat.heat-h .heat-track { height: 18px !important; box-shadow: inset 0 0 0 1px #ffffff14 !important; }
.heat.heat-h .heat-pct { display: none !important; }
.heat.heat-h .heat-edge { width: 3px !important; background: #ffffffa6 !important; }
@media (prefers-reduced-motion: reduce) { .partner-strip .ps-pct, .partner-strip .ps-level { animation: none !important; } }

/* ---------- 说停 on a phone: nothing overlaps at any height; the stage gives way first ---------- */
@media (max-width: 899px) {
  .room[data-view="play"][data-role="lead"] .room-stage { container: lead-stage / size; overflow: hidden !important; padding-top: 46px !important; padding-bottom: 4px !important; }
  .room-stage[data-role="lead"] .stage-content { gap: 2px !important; }
  .room-stage[data-role="lead"] .cue-word { font-size: clamp(40px, min(8.5dvh, 25cqh), 96px) !important; }
  .room-stage[data-role="lead"] .cue-word[data-cue="slow"] { font-size: clamp(36px, min(7dvh, 21cqh), 80px) !important; }
  /* The talk's heights: talk.css. */
}
@container lead-stage (max-height: 290px) { .room-stage[data-role="lead"] .cue-sub { display: none !important; } }
@container lead-stage (max-height: 250px) { .room-stage[data-role="lead"] .cue-instruction { -webkit-line-clamp: 1 !important; font-size: 14.5px !important; } }
@container lead-stage (max-height: 215px) { .room-stage[data-role="lead"] .cue-instruction, .room-stage[data-role="lead"] .cue-kicker { display: none !important; } }
@container lead-stage (max-height: 160px) { .room-stage[data-role="lead"] .beat-ticks { height: 14px; margin-top: 0; } .room-stage[data-role="lead"] .stage-meta { margin-top: 0; } }
/* Short phones: the deck gets tighter too. */
@media (max-width: 899px) and (max-height: 760px) {
  .lead { gap: 6px !important; }
  .lead-cues .lead-cue { height: 46px; }
  .lead-tile { min-height: 44px; padding: 4px; }
  .lead-tile small { display: none; }
  .partner-strip .ps-avatar { width: 32px; height: 32px; }
  .ps-pct { font-size: 28px; }
}

/* ---------- 准备 on a phone: the talk sits at the bottom of the screen, the card above scrolls if it must ---------- */
@media (max-width: 899px) {
  .room[data-view="meet"] .stage-stack { display: flex !important; flex-direction: column; gap: 8px;
    height: calc(100dvh - var(--head) - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); min-height: 420px; }
  .room[data-view="meet"] .control-dock { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent); padding-bottom: 14px !important; }
  .room[data-view="meet"] .control-dock::-webkit-scrollbar { display: none; }
  .room[data-view="meet"] .room-talk { flex: none; }
  /* 让别人偷偷看 in one line; the fine print stays one tap away (on the button itself). */
  .room[data-view="meet"] .watch-consent { padding: 10px 12px !important; }
  .room[data-view="meet"] .consent-row { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
  .room[data-view="meet"] .consent-dots { display: none !important; }
  .room[data-view="meet"] .consent-actions { grid-column: auto !important; display: flex; gap: 6px; }
  .room[data-view="meet"] .consent-actions .button { flex: none !important; }
  .room[data-view="meet"] .consent-actions .button { min-height: 36px; padding: 0 14px; font-size: 13px; }
  .room[data-view="meet"] .consent-note { font-size: 11px; margin-top: 6px; line-height: 1.5; }
  .room[data-view="meet"] .meet-line { font-size: 13px; line-height: 1.55; }
}
.tonight-title .ch { padding: .2em .1em !important; margin: -.2em -.1em !important; }
@media (max-width: 899px) {
  /* 准备: the button right under TA's card (not floating over the rest), the optional 公开 below it. */
  .room[data-view="meet"] .meet { display: flex !important; flex-direction: column; }
  .room[data-view="meet"] .meet-bar { order: 1; position: relative !important; bottom: auto !important; background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .room[data-view="meet"] .meet > .watch-consent { order: 2; }
  .room-stage[data-role="lead"] .cue-word { line-height: 1.14 !important; }
}

/* ---------- Computer: a top bar made for it (the dark fade under the tabs was the phone's bottom bar) ---------- */
@media (min-width: 760px) {
  .header-inner { position: relative; height: 68px; }
  .wordmark { font-size: 20px; letter-spacing: .34em; }
  .view-tabs { background: none !important; padding: 0 !important; height: auto !important; gap: 6px; margin-left: 22px; }
  .view-tab { height: 44px; padding: 0 14px; gap: 7px; border-radius: 0 !important; color: #f0d9e3a6; font-size: 15px; letter-spacing: .12em; transition: color .25s; }
  .view-tab .tab-icon { width: 16px; height: 16px; opacity: .8; }
  .view-tab:hover { color: #fff; }
  .view-tab:focus-visible { outline: 2px solid #ff8fb1; outline-offset: 2px; border-radius: 10px !important; }
  /* The current page: a small light under the word, gliding in. */
  .view-tab::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 22px; height: 2px; margin-left: -11px; border-radius: 2px; pointer-events: none;
    background: #ff8fb1; box-shadow: 0 0 10px #ff6f98, 0 0 3px #fff8; opacity: 0; transform: scaleX(.2); transition: opacity .3s, transform .4s cubic-bezier(.2, .8, .2, 1); }
  .view-tab[aria-current="page"] { color: #fff; }
  .view-tab[aria-current="page"]::after { opacity: 1; transform: none; }
  .view-tab .tab-badge { margin-left: 2px; }
  .header-end { gap: 2px; }
  .header-end .icon-button { color: #f0d9e3b3; }
  .header-end .icon-button:hover { color: #fff; background: #ffffff12; }
  .profile { border: 0 !important; background: #ffffff10; color: #f0d9e3d9; padding: 0 14px 0 4px; height: 40px; transition: background-color .2s; }
  .profile:hover { background: #ffffff1c; }
}
/* Wide enough: the tabs sit in the middle of the bar, the brand left, the tools right. */
@media (min-width: 1000px) {
  .view-tabs { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; gap: 14px; }
}
@media (min-width: 760px) { .wordmark, .view-tab, .profile { white-space: nowrap; } }
/* Between a phone and a laptop: words only, the profile as its avatar. */
@media (min-width: 760px) and (max-width: 999px) {
  .wordmark { letter-spacing: .2em; font-size: 18px; }
  .view-tabs { margin-left: 10px; gap: 2px; }
  .view-tab { padding: 0 11px; letter-spacing: .06em; }
  .view-tab .tab-icon { display: none; }
  .profile { padding: 0 4px; } .profile #profile-name { display: none; }
}

/* ---------- 公屏 in the room: replaced by talk.css (公屏 v2, 11-24) ---------- */

/* The two confirmations (求你让我去 / 先停): the room dims, one clear answer. */
.signal[data-kind^="confirm"] .signal-body h2 { font-size: clamp(36px, 10vw, 52px) !important; }
.signal[data-kind^="confirm"] .signal-body > p:not(.signal-kicker) { font-family: var(--sans); font-size: 15px; color: var(--soft); max-width: 22em; margin-inline: auto; line-height: 1.7; }
.signal[data-kind^="confirm"] .signal-actions { display: grid; gap: 10px; justify-items: center; width: min(360px, 100%); margin-inline: auto; }
.signal[data-kind^="confirm"] .big-button { width: 100%; }
.signal[data-kind="confirm-uncomfortable"] .signal-body h2 { text-shadow: 0 0 14px #a08cffd9 !important; }

/* ---------- A round on a computer ---------- */
@media (min-width: 900px) {
  /* Fits a laptop's browser window (often 600–730 tall): no minimum taller than that; the stage gives way first. */
  .room[data-view="play"] .stage-stack { min-height: 440px !important; }
  .room[data-view="play"][data-role="lead"] .room-stage { container: lead-stage / size; overflow: hidden !important; }
  /* 说停: the controls keep a hand's width under the stage instead of stretching across the whole column. */
  .room[data-view="play"][data-role="lead"] .control-dock .lead { width: 100%; max-width: 640px; margin-inline: auto; }
  .room[data-view="play"][data-role="lead"] .partner-strip { width: 100%; max-width: 760px; justify-self: center; }
  /* The replies under 我快到了: tabs without the sheet's dark band. */
  .desk-replies .sheet-tabs { position: static !important; background: none !important; margin: 0 !important; min-height: 0 !important; }
}
/* Not tall enough for the replies under the button: they stay in the rail and the sheet. */
@media (min-width: 1200px) and (max-height: 859px) { .desk-replies { display: none !important; } }

/* ---------- 匹配档案: one page, three answers, the rest folded ---------- */
.match-form.mp { gap: 12px; }
.mp-block { display: grid; gap: 12px; padding: 14px 14px 16px; border-radius: 22px; background: #ffffff0a; }
.mp-block[hidden] { display: none; }
.mp-block h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-family: var(--serif); font-size: 16px; font-weight: 700; color: #fff; }
.mp-block h3 small { font-family: var(--sans); font-size: 11.5px; font-weight: 400; color: var(--dim); }
.mp-row { display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: start; gap: 10px; }
.mp-label { padding-top: 11px; color: var(--soft); font-size: 13.5px; letter-spacing: .06em; white-space: nowrap; }
.mp-field { display: grid; gap: 5px; min-width: 0; }
.mp-note { color: var(--dim); font-size: 11.5px; line-height: 1.5; }
.mp .chip-group { gap: 6px; }
.mp .chip span { min-height: 40px; padding: 8px 15px; }
.mp .segmented .chip { flex: 1 1 0; }
.mp .segmented .chip span { width: 100%; justify-content: center; }
.mp .chip input:disabled + span { opacity: .55; cursor: not-allowed; }
.mp .chip input:disabled:checked + span { opacity: .8; }
.mp-options .chip span { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; line-height: 1.3; }
.mp-options .chip span small { font-size: 10.5px; font-weight: 400; color: var(--dim); }
.mp-options .chip input:checked + span small { color: #ffd6e2b3; }
.mp-options .chip input[type="checkbox"]:checked + span::before { display: none; }
.mp .match-more { margin-top: 0; }
.mp #match-summary { margin: 2px 4px 0; }
.mp-actions { position: sticky; bottom: -1px; z-index: 2; margin-top: 4px !important; padding: 14px 0 4px; background: linear-gradient(180deg, #1e0a1a00, #1e0a1af2 40%); }
.mp-actions .button.outline { flex: 0 1 auto !important; }
.mp-actions .button.primary { flex: 1 1 auto !important; }

/* 我的 → 匹配档案 */
.me-profile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--r-3); background: #2a0d2266; }
.me-profile-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #ff8fb11a; color: #ff8fb1; }
.me-profile strong { display: block; font-size: 15px; }
.me-profile small { display: block; margin-top: 2px; color: var(--dim); font-size: 12.5px; line-height: 1.5; }
.me-profile .me-profile-lock { color: #ffc9a8; }
.me-profile .button { min-height: 40px; }

/* 分享我的这一局: inside the result card, right under the numbers, so it is there the moment the round ends. */
.verdict-share { display: flex; justify-content: center; margin-top: 12px; }
.verdict-share .button { min-height: 40px; padding: 8px 20px; border-radius: 999px !important; font-size: 13.5px; background: #ffffff14; color: var(--text); }
.verdict-share .button [data-icon] svg { width: 15px; height: 15px; }

/* ---------- 匹配中: one sentence, the role switch, four quiet things to do, then 修改条件 / 取消 ---------- */
.room-stage[data-state="queue"] .stage-content > p { margin-bottom: 4px; }
.queue-board { justify-items: center; gap: 10px !important; }
.queue-status { margin: 0; color: var(--text); font-size: 15px; line-height: 1.6; text-align: center; text-wrap: balance; }
.queue-relax { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 10px; color: var(--dim); font-size: 13px; text-align: center; }
.queue-relax .text-button { padding: 2px 0; font-size: 13px; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #ff8fb166; }
.stage-content .stage-controls:has(.queue-tools) { flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.queue-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 380px; }
.queue-tool { display: grid; justify-items: center; gap: 7px; padding: 12px 4px 10px; border-radius: 18px; background: #ffffff0b; color: var(--soft); font-size: 12.5px; letter-spacing: .04em; transition: background .2s, color .2s, transform .2s var(--out, ease); }
.queue-tool [data-icon] svg { width: 22px; height: 22px; }
.queue-tool:hover, .queue-tool:focus-visible { background: #ffffff16; color: var(--text); }
.queue-tool:active { transform: scale(.96); }
.queue-main { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 380px; }
.queue-main .button { width: 100%; min-height: 46px; }
.queue-main .button.quiet { background: none; color: var(--dim); box-shadow: inset 0 0 0 1px #ffffff1c; }
.queue-main .button.quiet:hover { color: var(--text); }
@media (max-width: 359px) { .queue-tool { font-size: 11.5px; padding: 10px 2px 8px; } }

/* 匹配档案: the role picked on the home page shows as one line; 改 opens the three choices. */
.mp-role-now { display: flex; align-items: center; gap: 12px; min-height: 42px; }
.mp-role-now strong { font-family: var(--serif); font-size: 17px; color: var(--text); }
.mp-role-now .text-button { color: var(--gold); padding: 4px 6px; }
/* While matching, 取消匹配 sits with 修改条件 at the bottom; the header does not repeat it. */
#room[data-view="queue"] .rm-leave { display: none; }

/* ---------- Cheaper to draw, same look (11-24) ---------- */
/* The round's bar fills by scaleX, which the compositor animates (a width changed every tick relaid the stage every
   frame). The bar clips its own glow and its gradient follows the box either way, so it looks the same. */
.room-stage .progress span { width: 100% !important; transform: scaleX(var(--done, 0)); transform-origin: left center; transition: transform 1s linear, background .8s !important; }
/* The four ticks change height on every beat; sized and contained, that stays inside them (the glow is not clipped). */
.beat-ticks { contain: size layout style; width: 56px; }

/* ---------- A round on a phone: nothing overlaps at any height (11-24) ----------
   Short screens (an iPhone in Safari shows 390×664) left the stage a few pixels: 说停's clock and big word went under
   安全暂停 and the talk, 忍住's instruction was cut mid-line. Now the stage keeps a floor, the type scales with the
   room it has, lines end whole, and 说停's 安全暂停 sits on the clock's line (app.js moves it there on phones). */
@media (max-width: 899px) {
  .room[data-view="play"] .stage-stack { min-height: 400px !important; }
  .room[data-view="play"][data-role="lead"] .stage-stack { grid-template-rows: auto minmax(110px, 1fr) auto auto; }
  .room[data-view="play"][data-role="follow"] .stage-stack { grid-template-rows: auto minmax(150px, 1fr) auto auto; }
  .room-stage > .room-safety { position: absolute; top: 2px; left: 0; z-index: 4; padding: 0; }
  .room-stage > .room-safety .button { min-height: 38px; padding: 0 12px; gap: 5px; font-size: 13px; }
  .room[data-view="play"][data-role="follow"] .room-stage { container: follow-stage / size; overflow: hidden !important; }
  .room-stage[data-role="follow"] .cue-word { font-size: clamp(46px, min(12.5dvh, 27cqh), 124px) !important; }
  .room-stage[data-role="follow"] .cue-word[data-cue="slow"] { font-size: clamp(40px, min(9.5dvh, 22cqh), 96px) !important; }
}
/* 力度 and 冲刺 share a line under the label (was three lines). */
@media (max-width: 599px) {
  .lead-strength .strength-picks { grid-column: 1; grid-row: 2; }
  .lead-strength .lead-sprint-wrap, .lead-strength > .lead-sprint { grid-column: 2; grid-row: 2; align-self: center; }
}
@container follow-stage (max-height: 340px) { .room-stage[data-role="follow"] .cue-sub { display: none !important; } }
@container follow-stage (max-height: 340px) { .room-stage[data-role="follow"] .cue-instruction { display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } }
@container follow-stage (max-height: 270px) { .room-stage[data-role="follow"] .cue-instruction { -webkit-line-clamp: 1; font-size: 18px !important; } }
@container follow-stage (max-height: 215px) { .room-stage[data-role="follow"] .cue-kicker { display: none !important; } .room-stage[data-role="follow"] .cue-instruction { margin-top: 2px; } }
/* Very short (an iPhone SE in Safari): what to do outranks the tempo line; the ticks still keep the beat. */
@container follow-stage (max-height: 190px) { .room-stage[data-role="follow"] .stage-meta { display: none !important; } }
/* Short phones: TA's name and how far TA is share one line; 说停's stage drops its tempo line before anything else
   (the same tempo and strength are right under it in the controls). */
@media (max-width: 899px) and (max-height: 760px) {
  .partner-strip .ps-name { display: flex !important; align-items: baseline; gap: 8px; }
  .partner-strip .ps-name strong { flex: none; max-width: 62%; }
  .partner-strip .ps-name .ps-level { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
@container lead-stage (max-height: 140px) { .room-stage[data-role="lead"] .stage-meta { display: none !important; } }

/* ---------- 观战 on a phone: one screen, nothing over the 公屏 (11-24) ----------
   The cheer bar floated over the page, and on an iPhone in Safari (390×664) it covered the newest 公屏 line, which only
   had room for two; on taller phones 慢一点 was so big it broke onto two lines. Now the page is one column that fits the
   screen: the stage gives way first, the 公屏 keeps about a quarter of the screen with the newest line at the bottom,
   and the cheers come last, in the flow. Computers keep their two-column page. */
@media (max-width: 899px) {
  .watch-panel:not([hidden]) { display: flex !important; flex-direction: column; gap: 8px !important; height: 100dvh; min-height: 540px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important; }
  .watch-panel > * { flex: none; }
  .watch-panel > .watch-main { flex: 1 1 0; min-height: 128px !important; }
  .watch-main .watch-stage { container: watch-stage / size; padding: 30px 4px 8px !important; }
  .watch-cue { font-size: clamp(40px, min(11dvh, 22vw, 34cqh), 120px) !important; white-space: nowrap; }
  .watch-stage time { top: 4px !important; }
  .watch-panel .room-chat { display: flex; flex-direction: column; max-height: none !important; }
  /* The 公屏's look and height: talk.css. */
  .watch-panel .watch-actions .button { min-height: 38px; padding-block: 0; font-size: 13.5px; }
  .watch-panel > .watch-status, .watch-panel > .watch-actions { order: 5; }
  .watch-panel > .watch-cheers { order: 6; position: static !important; padding: 2px 0 0 !important; background: none !important; }
}
@container watch-stage (max-height: 230px) { .watch-stage .watch-phase { display: none !important; } }
@container watch-stage (max-height: 170px) { .watch-stage .watch-mics { display: none !important; } }

/* ---------- Announcements (公告, 11-24) ---------- */
/* In a room or 旁观 an important announcement floats over the top of the stage: in the flow it pushed the round's
   controls and the 公屏 off the screen. It closes with ✕ like everywhere else. */
.site-notices.in-room { position: fixed; z-index: 66; top: calc(env(safe-area-inset-top) + 60px); left: 10px; right: 10px; max-width: 560px; margin: 0 auto; }
.site-notices.in-room .site-notice { padding: 10px 12px; background: #2a1422f5; border-color: #ff8fb166; box-shadow: 0 16px 40px #000c; }
.site-notices.in-room .site-notice-copy { font-size: 12.5px; line-height: 1.5; }
.site-notices.in-room .site-notice-copy p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.site-notice[data-level="important"] { border-color: #ff8fb173; }
.site-notice-close { flex: none; width: 32px; height: 32px; margin: -6px -6px 0 0; border-radius: 50%; display: grid; place-items: center; }
.site-notice-close svg, .site-notice-icon svg { width: 17px; height: 17px; }
/* The bubble: icon, words and ✕ on one row, 知道了 under them. */
.bubble-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 12px; align-items: start; }
.bubble-card .site-notice-icon { margin-top: 3px; }
.bubble-copy small { display: block; color: var(--gold); font-size: 11.5px; letter-spacing: .24em; }
.bubble-copy strong { display: block; margin: 2px 0 4px; color: var(--text); font-size: 15px; letter-spacing: .04em; }
.bubble-copy p { line-height: 1.65; }
.bubble-card .site-notice-close { grid-column: 3; grid-row: 1; }
.bubble-ok { grid-column: 2 / 4; justify-self: end; min-height: 38px !important; padding: 6px 20px !important; }
.site-bubble[data-level="important"] .bubble-card { border-color: #ff8fb173; }
