/* 等我说停 — theme layer. Loaded after style.css: tokens, the redesigned home, gate, cover,
   the light-based stage and the motion system. */

@font-face {
  font-family: "Hush Serif";
  src: url("/assets/serif.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink-0: #0e080c;
  --ink-1: #170d13;
  --ink-2: #21131b;
  --ink-3: #2d1a25;
  --line: #ffffff12;
  --line-strong: #ffffff22;
  --text: #fcf1f4;
  --muted: #d0b9c3;
  --subtle: #a48d98;
  --rose: #ff8fb0;
  --peach: #ffb894;
  --blush: #ffd7e2;
  --wine: #7d2748;
  --go: #8fe8bf;
  --slow: #ffd07e;
  --stop: #ff6f92;
  --grad: linear-gradient(118deg, #ff8fb0 0%, #ffa59f 48%, #ffc08f 100%);
  --grad-soft: linear-gradient(118deg, #ff8fb024, #ffc08f1c);
  --serif: "Hush Serif", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.3, 1.35, .45, 1);
  --radius: 22px;
  --bg: var(--ink-0);
  --panel: var(--ink-1);
  --border: #3a2430;
  background: var(--ink-0);
}

body { background: var(--ink-0); color: var(--text); }
.serif { font-family: var(--serif); font-weight: 600; letter-spacing: .02em; }
::selection { background: #ff8fb055; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline-color: var(--rose); }

/* ---------- Ambient night: three slow, blurred lights drifting behind everything ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(120% 80% at 50% -10%, #2a1220 0%, var(--ink-0) 60%); }
.ambient i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: .32; mix-blend-mode: screen; animation: drift 26s ease-in-out infinite alternate; }
.ambient i:nth-child(1) { background: #b0315e; left: -18vmax; top: -22vmax; }
.ambient i:nth-child(2) { background: #c4683f; right: -24vmax; top: 18vh; animation-duration: 31s; animation-delay: -8s; opacity: .2; }
.ambient i:nth-child(3) { background: #5d1f4b; left: 20vw; bottom: -34vmax; animation-duration: 37s; animation-delay: -14s; opacity: .36; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); }
  100% { transform: translate3d(-4vmax, 7vmax, 0) scale(.94); }
}

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 30; background: #0e080cf0; border-bottom: 1px solid var(--line); }
/* Blur only where the tab bar is not fixed inside the header (a filter would trap it). */
@media (min-width: 581px) { .header { background: #0e080cc4; -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); } }
.brand { gap: 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 50%, #ff8fb033, transparent 70%); border: 1px solid #ff8fb04d; box-shadow: none; }
.brand-mark i { width: 11px; height: 11px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 14px var(--rose), 0 0 30px #ff8fb088; animation: heartbeat 2.4s ease-in-out infinite; }
.wordmark { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: .14em; color: var(--text); }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); opacity: .9; }
  12% { transform: scale(1.35); opacity: 1; }
  24% { transform: scale(1); }
  36% { transform: scale(1.22); opacity: 1; }
  52% { transform: scale(1); opacity: .85; }
}
.view-tab { color: var(--subtle); transition: color .25s var(--ease-out); }
.view-tab[aria-current="page"] { color: var(--text); }
.view-tab[aria-current="page"] .tab-icon { color: var(--rose); }
.icon-button { color: var(--muted); transition: background-color .2s, color .2s, transform .15s; }
.icon-button:active { transform: scale(.92); }
@media (hover: hover) { .icon-button:hover, .profile:hover { background: #ffffff0f; color: var(--text); } }
.cover-toggle svg { width: 19px; height: 19px; }
.profile { border-color: var(--line-strong); color: var(--muted); }
.avatar { background: #3a1a29; color: var(--blush); }

/* ---------- Buttons, chips, fields ---------- */
.button { border-radius: 999px; min-height: 46px; padding: 11px 20px; font-weight: 650; letter-spacing: .02em; transition: background-color .2s, border-color .2s, color .2s, box-shadow .3s, transform .16s var(--ease-spring); }
.button.primary { position: relative; overflow: hidden; isolation: isolate; color: #2a0c18; background: var(--grad); border-color: transparent; box-shadow: 0 8px 28px #ff8fb040, inset 0 1px 0 #ffffff66; }
.button.primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, transparent 30%, #ffffff70 50%, transparent 70%); transform: translateX(-120%); animation: shimmer 4.8s ease-in-out infinite; }
@keyframes shimmer { 0%, 62% { transform: translateX(-120%); } 82%, 100% { transform: translateX(120%); } }
@media (hover: hover) { .button.primary:hover:enabled { background: var(--grad); box-shadow: 0 10px 34px #ff8fb060, inset 0 1px 0 #ffffff80; filter: brightness(1.05); } }
.button.primary:disabled { filter: saturate(.3) brightness(.7); }
.button.outline { background: #ffffff08; border-color: var(--line-strong); color: var(--text); }
@media (hover: hover) { .button.outline:hover:enabled { background: #ffffff12; border-color: #ff8fb066; } }
.button.danger { background: #3c1522; border-color: #6a2a3f; color: #ffc6d4; }
.text-button { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
@media (hover: hover) { .text-button:hover { color: var(--text); } }
.chip span, .choice, .duration-option { transition: background-color .2s, border-color .2s, color .2s, transform .15s var(--ease-spring); }
.chip input:checked + span, .duration-option[aria-pressed="true"], .choice:has(input:checked) { background: #ff8fb024; border-color: #ff8fb088; color: var(--text); }
.chip span:active, .choice:active, .duration-option:active { transform: scale(.95); }
.field input, .field textarea, input[type="search"], input[type="text"], input[type="number"], textarea { background: #0f080ccc; border-color: var(--line-strong); color: var(--text); }
.field input:focus, textarea:focus { border-color: #ff8fb099; box-shadow: 0 0 0 3px #ff8fb026; }

/* ---------- Dialogs ---------- */
dialog { background: linear-gradient(180deg, #24131c, #180d13); border: 1px solid #ff8fb026; border-radius: 26px; box-shadow: 0 30px 120px #000c, 0 0 0 1px #ffffff08 inset; }
dialog::backdrop { background: #0a0508c2; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#dialog-title { font-family: var(--serif); font-weight: 600; letter-spacing: .06em; }
.rule { align-items: flex-start; }
.rule > i { flex: none; width: 14px; height: 14px; margin: 5px 4px 0; border-radius: 50%; background: var(--light, var(--rose)); box-shadow: 0 0 12px var(--light, var(--rose)); }
.rule[data-light="go"] { --light: var(--go); }
.rule[data-light="slow"] { --light: var(--slow); }
.rule[data-light="stop"] { --light: var(--stop); }
.guide-lead, .solo-lead { color: var(--muted); line-height: 1.7; }

/* ---------- Gate ---------- */
.gated body { overflow: hidden; }
.gate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; overflow-y: auto; padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(90% 60% at 50% 20%, #3a1528 0%, #120a0f 60%, #0b0609 100%); }
.gate.leaving { animation: gate-out .7s var(--ease-out) forwards; }
@keyframes gate-out { to { opacity: 0; transform: scale(1.04); filter: blur(8px); visibility: hidden; } }
.gate-inner { width: min(420px, 100%); text-align: center; }
.gate-lights { display: flex; justify-content: center; gap: 14px; margin-bottom: 22px; }
.gate-lights i { width: 14px; height: 14px; border-radius: 50%; opacity: .25; animation: gate-light 3.6s ease-in-out infinite; }
.gate-lights [data-light="go"] { background: var(--go); color: var(--go); }
.gate-lights [data-light="slow"] { background: var(--slow); color: var(--slow); animation-delay: 1.2s; }
.gate-lights [data-light="stop"] { background: var(--stop); color: var(--stop); animation-delay: 2.4s; }
@keyframes gate-light { 0%, 100% { opacity: .22; box-shadow: none; } 15%, 30% { opacity: 1; box-shadow: 0 0 18px currentColor, 0 0 40px currentColor; } 45% { opacity: .22; } }
.gate-title { margin: 0; font-size: clamp(56px, 16vw, 84px); font-weight: 600; letter-spacing: .16em; line-height: 1.1; }
/* Each character carries its own gradient: a transformed inline-block would drop a parent's text clip. */
.gate-title span { display: inline-block; animation: char-in 1.1s var(--ease-out) both; background: linear-gradient(160deg, #ffe1e9, #ff8fb0 60%, #ffb894); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0 18px #ff8fb055); }
.gate-title span:nth-child(2) { animation-delay: .14s; }
.gate-title span:nth-child(3) { animation-delay: .28s; }
.gate-title span:nth-child(4) { animation-delay: .42s; }
@keyframes char-in { from { opacity: 0; transform: translateY(14px); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
.gate-line { color: var(--muted); margin: 12px 0 26px; letter-spacing: .12em; animation: char-in 1.2s .7s var(--ease-out) both; }
.gate-card { text-align: left; padding: 22px; border-radius: 26px; background: #1d0f16d9; border: 1px solid #ff8fb024; box-shadow: 0 24px 80px #0009; animation: rise .9s .9s var(--ease-out) both; display: grid; gap: 16px; }
.gate-field { display: grid; gap: 9px; color: var(--muted); font-size: 14px; }
.gate-field input { min-height: 52px; border-radius: 16px; border: 1px solid var(--line-strong); background: #0f080c; color: var(--text); padding: 0 16px; font-size: 16px; }
.gate-field input:focus { outline: none; border-color: #ff8fb099; box-shadow: 0 0 0 3px #ff8fb026; }
.gate-switch { display: flex; align-items: center; gap: 12px; color: var(--text); font-size: 14px; line-height: 1.45; cursor: pointer; }
.gate-switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { flex: none; width: 50px; height: 30px; border-radius: 999px; background: #3a2430; position: relative; transition: background-color .3s; }
.switch-track i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .35s var(--ease-spring); }
.gate-switch input:checked + .switch-track { background: var(--grad); }
.gate-switch input:checked + .switch-track i { transform: translateX(20px); }
.gate-switch input:focus-visible + .switch-track { outline: 2px solid var(--rose); outline-offset: 3px; }
.gate-enter { width: 100%; min-height: 54px; font-size: 16px; }
.gate-promise { margin: 0; color: var(--subtle); font-size: 12.5px; line-height: 1.7; text-align: center; }
.gate-leave { display: inline-block; margin-top: 22px; color: var(--subtle); font-size: 14px; text-decoration: none; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Home ---------- */
.view-home { padding-bottom: 12px; }
.view:not([hidden]) { animation: view-in .45s var(--ease-out); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease-out) var(--delay, 0ms), transform .8s var(--ease-out) var(--delay, 0ms); }
[data-reveal].in { opacity: 1; transform: none; }

.hero { margin-top: 26px; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); grid-template-areas: "copy light" "roles light" "sub sub" "queue queue"; gap: 10px 36px; align-items: center;
  padding: clamp(24px, 4vw, 48px); border-radius: 32px; border: 1px solid #ff8fb01f; background: linear-gradient(160deg, #24111bcc, #140b10cc 60%); overflow: hidden; position: relative; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -1px; z-index: -1; background: radial-gradient(60% 70% at 85% 40%, #ff8fb01c, transparent 70%); }
.hero-copy { grid-area: copy; }
.eyebrow { margin: 0 0 12px; color: var(--rose); font-size: 13px; letter-spacing: .32em; }
.hero h1 { margin: 0; font-size: clamp(38px, 5.4vw, 64px); line-height: 1.2; font-weight: 600; letter-spacing: .04em; }
.hero h1 em { display: block; font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin: 16px 0 0; color: var(--muted); line-height: 1.75; font-size: 15.5px; max-width: 30em; }
.lede span { display: block; color: var(--subtle); }
.live-presence { margin: 18px 0 0; background: #ffffff08; border-color: var(--line); }
.live-dot { background: var(--go); box-shadow: 0 0 10px var(--go); }

.hero-light { grid-area: light; position: relative; justify-self: center; width: min(300px, 70vw); aspect-ratio: 1; display: grid; place-items: center; cursor: pointer; --light: var(--go); -webkit-tap-highlight-color: transparent; }
.hero-light[data-light="slow"] { --light: var(--slow); }
.hero-light[data-light="stop"] { --light: var(--stop); }
.light-halo { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--light) 42%, transparent) 0%, transparent 66%); filter: blur(6px); animation: breathe 3.2s ease-in-out infinite; transition: background .9s ease; }
.light-core { position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 38% 34%, #fff 0%, var(--light) 34%, color-mix(in srgb, var(--light) 60%, #000) 100%);
  box-shadow: 0 0 40px var(--light), 0 0 120px color-mix(in srgb, var(--light) 60%, transparent); transition: background .9s ease, box-shadow .9s ease; animation: core-beat 3.2s ease-in-out infinite; }
.hero-light[data-light="stop"] .light-core { animation: core-hold 3.2s ease-in-out infinite; }
.light-word { position: relative; margin-top: 64%; font-size: 26px; color: var(--text); letter-spacing: .3em; text-shadow: 0 0 18px #000; }
.light-word.swap { animation: word-swap .9s var(--ease-out); }
@keyframes breathe { 0%, 100% { transform: scale(.92); opacity: .75; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes core-beat { 0%, 100% { transform: scale(1); } 20% { transform: scale(1.06); } 40% { transform: scale(.98); } 60% { transform: scale(1.04); } }
@keyframes core-hold { 0%, 100% { transform: scale(.96); filter: brightness(.9); } 50% { transform: scale(1); filter: brightness(1.15); } }
@keyframes word-swap { from { opacity: 0; letter-spacing: .6em; filter: blur(6px); } to { opacity: 1; letter-spacing: .3em; filter: none; } }

.role-pick { grid-area: roles; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.role-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; text-align: left; padding: 18px; border-radius: 22px; color: #2a0c18; border: 0; background: var(--grad);
  box-shadow: 0 14px 40px #ff8fb033, inset 0 1px 0 #ffffff70; transition: transform .25s var(--ease-spring), box-shadow .3s; overflow: hidden; isolation: isolate; }
.role-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, transparent 35%, #ffffff66 50%, transparent 65%); transform: translateX(-120%); animation: shimmer 5.6s ease-in-out infinite; }
.role-card.follow { color: var(--text); background: #ffffff0a; border: 1px solid #ff8fb04d; box-shadow: inset 0 1px 0 #ffffff12; }
.role-card.follow::after { animation-delay: 2.4s; background: linear-gradient(100deg, transparent 35%, #ff8fb026 50%, transparent 65%); }
.role-card:active { transform: scale(.97); }
@media (hover: hover) { .role-card:hover { transform: translateY(-2px); box-shadow: 0 18px 50px #ff8fb04d, inset 0 1px 0 #ffffff70; } .role-card.follow:hover { background: #ff8fb014; } }
.role-glyph { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: #ffffff55; }
.role-card.follow .role-glyph { background: #ff8fb024; color: var(--rose); }
.role-text strong { display: block; font-size: 17px; letter-spacing: .04em; }
.role-text small { display: block; margin-top: 4px; font-size: 12.5px; opacity: .78; }
.role-arrow svg { width: 18px; height: 18px; }
.hero-sub { grid-area: sub; display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 6px; }
.hero-queue { grid-area: queue; margin: 0; color: var(--subtle); font-size: 13px; }

.assure { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.assure li { display: flex; align-items: center; gap: 9px; padding: 13px 14px; border-radius: 16px; background: #ffffff06; border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.assure [data-icon] { color: var(--rose); }

.daily-card { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 260px); gap: 14px; align-items: stretch; }
.daily-main, .daily-level { border-radius: 22px; border: 1px solid #ff8fb026; background: var(--grad-soft), #170d13; padding: 18px; }
.daily-main { display: flex; gap: 14px; align-items: center; }
.daily-main small, .me-daily small { color: var(--rose); letter-spacing: .12em; font-size: 12px; }
.daily-main strong, .me-daily strong { display: block; margin-top: 4px; font-family: var(--serif); font-size: 19px; }
.daily-main p, .me-daily p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.daily-glyph { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--peach); background: #ffb89418; font-size: 20px; animation: twinkle 3s ease-in-out infinite; }
.done .daily-glyph { color: var(--go); background: #8fe8bf18; animation: none; }
@keyframes twinkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(45deg) scale(1.08); } }
.daily-level { text-align: left; color: var(--text); display: grid; align-content: center; gap: 8px; cursor: pointer; transition: border-color .2s, transform .2s var(--ease-spring); }
.daily-level strong { font-family: var(--serif); font-size: 18px; }
@media (hover: hover) { .daily-level:hover { border-color: #ff8fb066; } }
.level-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: #2a0c18; background: var(--grad); }
.level-bar { display: block; height: 6px; border-radius: 999px; background: #ffffff12; overflow: hidden; }
.level-bar i { display: block; height: 100%; width: calc(var(--share, 0) * 100%); border-radius: inherit; background: var(--grad); box-shadow: 0 0 12px #ff8fb088; transition: width 1.1s var(--ease-out); }

.modes { margin-top: 38px; }
.section-label h2, .social-heading h2 { font-family: var(--serif); font-weight: 600; letter-spacing: .06em; }
.mode-grid { gap: 14px; }
.mode-card { border-radius: 24px; border: 1px solid var(--line); background: #ffffff06; padding: 22px; transition: border-color .3s, transform .3s var(--ease-spring), background-color .3s; }
@media (hover: hover) { .mode-card:hover { border-color: #ff8fb04d; background: #ff8fb00a; transform: translateY(-2px); } }
.mode-card h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: .04em; margin: 14px 0 8px; }
.mode-card p { color: var(--muted); line-height: 1.7; }
.mode-icon { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; color: var(--rose); background: #ff8fb01a; font-size: 20px; }
.solo-card .mode-icon { color: var(--peach); background: #ffb8941a; }
.card-action { margin-top: 14px; color: var(--rose); font-weight: 650; display: inline-flex; gap: 6px; align-items: center; padding: 0; }
.me-teaser { margin-top: 18px; border-radius: 20px; border-color: var(--line); background: #ffffff06; }
.active-rooms { margin-top: 38px; }
.social-panel { border-radius: 24px; border-color: var(--line); background: #ffffff05; }

.faq { margin-top: 44px; }
.faq-lead { display: grid; gap: 10px; color: var(--muted); line-height: 1.85; font-size: 15px; max-width: 46em; }
.faq-lead p { margin: 0; }
.faq-lead strong { color: var(--text); font-family: var(--serif); }
.lights-legend { list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lights-legend li { --light: var(--go); position: relative; padding: 18px 18px 18px 52px; border-radius: 20px; border: 1px solid var(--line); background: #ffffff05; display: grid; gap: 4px; }
.lights-legend li[data-light="slow"] { --light: var(--slow); }
.lights-legend li[data-light="stop"] { --light: var(--stop); }
.lights-legend i { position: absolute; left: 18px; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: var(--light); box-shadow: 0 0 14px var(--light); animation: breathe 2.6s ease-in-out infinite; }
.lights-legend strong { font-family: var(--serif); font-weight: 600; }
.lights-legend span { color: var(--muted); font-size: 13.5px; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border-radius: 18px; border: 1px solid var(--line); background: #ffffff05; padding: 0 18px; transition: background-color .3s, border-color .3s; }
.faq-list details[open] { background: #ff8fb008; border-color: #ff8fb033; }
.faq-list summary { list-style: none; cursor: pointer; padding: 16px 28px 16px 0; position: relative; font-weight: 600; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; position: absolute; right: 2px; top: 50%; width: 9px; height: 9px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease-out); }
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-list details p { margin: 0 0 16px; color: var(--muted); line-height: 1.8; animation: view-in .4s var(--ease-out); }

.footer { border-top-color: var(--line); }
.footer-mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--rose); background: #ff8fb014; font-size: 18px; }

/* ---------- Cover: an ordinary memo page ---------- */
.covered body > *:not(#cover):not(dialog) { visibility: hidden; }
.covered dialog { visibility: hidden; }
.cover { position: fixed; inset: 0; z-index: 200; background: #f6f4ef; color: #2b2b2b; overflow: auto; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; animation: cover-in .16s ease-out; }
@keyframes cover-in { from { opacity: 0; } to { opacity: 1; } }
.cover-page { max-width: 640px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 22px 40px; }
.cover header { display: flex; justify-content: space-between; align-items: baseline; color: #c8a13a; font-weight: 600; font-size: 17px; }
.cover header small { color: #9a9a9a; font-weight: 400; font-size: 13px; }
.cover h2 { font-size: 26px; margin: 28px 0 14px; color: #1d1d1d; }
.cover ul { padding-left: 20px; line-height: 2.1; font-size: 16px; }
.cover-hint { margin-top: 48px; color: #c4c4c4; font-size: 12px; text-align: center; }

/* ---------- Stage: one big light ---------- */
.room-stage { --phase: var(--rose); --stage-core: #2a1220; --stage-edge: #150b10; border-radius: 30px; border-color: #ff8fb01f; }
.room-stage[data-cue="fast"] { --phase: var(--go); --stage-core: #11352a; --stage-edge: #0f1513; }
.room-stage[data-cue="slow"] { --phase: var(--slow); --stage-core: #3b2a12; --stage-edge: #18110b; }
.room-stage[data-cue="stop"] { --phase: var(--stop); --stage-core: #44121f; --stage-edge: #150a0d; }
.room-stage[data-cue="stop"]::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 35%, #000a 100%); animation: vignette 2.4s ease-in-out infinite; }
@keyframes vignette { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
.room-stage[data-state="cue"] .orb { width: 132px; height: 132px; color: transparent; border: 0;
  background: radial-gradient(circle at 38% 34%, #fff 0%, var(--phase) 36%, color-mix(in srgb, var(--phase) 55%, #000) 100%);
  box-shadow: 0 0 40px var(--phase), 0 0 120px color-mix(in srgb, var(--phase) 55%, transparent); transition: background .6s ease, box-shadow .6s ease; }
.room-stage[data-state="cue"] .orb svg { opacity: 0; }
.room-stage[data-cue="stop"] .orb { animation: core-hold 2.4s ease-in-out infinite; }
.stage-content h2 { font-family: var(--serif); font-weight: 600; letter-spacing: .14em; }
.room-stage[data-state="cue"] .stage-content h2 { font-size: clamp(40px, 9vw, 64px); margin: 18px 0 4px; color: var(--text); text-shadow: 0 0 30px color-mix(in srgb, var(--phase) 50%, transparent); }
.room-stage[data-state="cue"] .stage-content > p { font-family: var(--serif); font-size: 17px; color: var(--blush); letter-spacing: .06em; min-height: 1.6em; }
.room-stage[data-state="countdown"] .stage-content h2 { font-size: 88px; font-family: var(--serif); }
.stage-badges span { background: #ffffff0d; border-color: var(--line); color: var(--muted); }
.beat-ring { border-color: var(--phase); }
.time-label { font-variant-numeric: tabular-nums; color: var(--muted); }
.progress { background: #ffffff10; }
.progress span { background: linear-gradient(90deg, var(--phase), color-mix(in srgb, var(--phase) 60%, #fff)); box-shadow: 0 0 10px var(--phase); }
.peer-feedback { font-family: var(--serif); color: var(--blush); background: #ff8fb014; border: 1px solid #ff8fb033; border-radius: 999px; animation: whisper-in .6s var(--ease-out); }
@keyframes whisper-in { from { opacity: 0; transform: translateY(6px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.room-head h1 { font-family: var(--serif); font-weight: 600; letter-spacing: .08em; }
.room-side, .room-chat, .room-voice, .control-dock { border-radius: 24px; }

/* ---------- Solo setup: pick a persona ---------- */
.solo-form { display: grid; gap: 14px; }
.persona-field { border: 0; padding: 0; margin: 0; }
.persona-field legend, .solo-form legend { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.persona-options { display: grid; gap: 10px; }
.persona-option { position: relative; display: block; cursor: pointer; }
.persona-option input { position: absolute; opacity: 0; }
.persona-option span { display: grid; gap: 3px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line-strong); background: #ffffff06; transition: border-color .25s, background-color .25s, transform .2s var(--ease-spring); }
.persona-option strong { font-family: var(--serif); font-size: 17px; }
.persona-option small { color: var(--subtle); }
.persona-option em { font-style: normal; color: var(--blush); font-family: var(--serif); font-size: 14px; margin-top: 2px; }
.persona-option input:checked + span { border-color: #ff8fb099; background: #ff8fb014; box-shadow: 0 0 0 3px #ff8fb01a; }
.persona-option input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }
.persona-option:active span { transform: scale(.98); }

/* ---------- Solo ending: TA's verdict ---------- */
.ending { text-align: center; padding: 6px 0 2px; }
.ending-kicker { color: var(--muted); letter-spacing: .2em; margin: 0 0 18px; }
.ending-card { position: relative; width: 150px; height: 200px; margin: 0 auto; perspective: 900px; }
.ending-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 22px; font-size: 44px; backface-visibility: hidden; transition: transform 1s var(--ease-spring); }
.ending-face.front { background: linear-gradient(150deg, #3a1628, #1c0d14); border: 1px solid #ff8fb04d; color: var(--rose); box-shadow: 0 14px 40px #0008; }
.ending-face.back { transform: rotateY(180deg); color: #2a0c18; background: var(--grad); box-shadow: 0 0 60px #ff8fb066; }
.ending[data-result="deny"] .ending-face.back { color: var(--text); background: linear-gradient(150deg, #5b1730, #2a0c18); box-shadow: 0 0 60px #ff6f9255; border: 1px solid #ff6f9266; }
.ending[data-draw="true"]:not(.revealed) .ending-face.front { animation: shuffle .5s ease-in-out infinite alternate; }
@keyframes shuffle { from { transform: rotate(-3deg) translateY(0); } to { transform: rotate(3deg) translateY(-4px); } }
.ending.revealed .ending-face.front { transform: rotateY(-180deg); }
.ending.revealed .ending-face.back { transform: rotateY(0); }
.ending-line { font-size: 20px; margin: 22px 0 4px; color: var(--text); opacity: 0; transition: opacity .8s .5s; }
.ending-by { color: var(--subtle); margin: 0 0 8px; opacity: 0; transition: opacity .8s .8s; }
.ending.revealed .ending-line, .ending.revealed .ending-by { opacity: 1; }
.ending .dialog-actions { opacity: 0; transition: opacity .6s 1.1s; }
.ending.revealed .dialog-actions { opacity: 1; }

/* ---------- 我的: title and daily ---------- */
.me-card { border-radius: 26px; border-color: #ff8fb026; background: var(--grad-soft), #170d13; }
.me-avatar { background: var(--grad); color: #2a0c18; font-size: 22px; }
.me-name p { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.me-level, .me-daily { margin-top: 14px; border-radius: 22px; border: 1px solid var(--line); background: #ffffff06; padding: 18px; }
.me-level-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.me-level-head strong { font-size: 24px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.me-level-head small { color: var(--subtle); }
.me-level > p { margin: 10px 0 0; color: var(--muted); font-size: 13.5px; }
.me-ladder { margin-top: 12px; }
.me-ladder summary { cursor: pointer; color: var(--rose); font-size: 13.5px; }
.me-ladder ol { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.me-ladder li { display: flex; gap: 8px; align-items: center; padding: 9px 12px; border-radius: 14px; background: #ffffff05; color: var(--subtle); font-family: var(--serif); }
.me-ladder li span { font-family: Inter, system-ui, sans-serif; font-size: 11px; color: var(--subtle); }
.me-ladder li.passed { color: var(--muted); }
.me-ladder li.current { color: var(--text); background: #ff8fb01a; box-shadow: inset 0 0 0 1px #ff8fb04d; }
.me-daily { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.daily-state { color: var(--peach); font-weight: 700; font-size: 13px; }
.me-daily.done .daily-state { color: var(--go); }
.ach.unlocked { border-color: #ff8fb04d; background: #ff8fb00d; }
.ach.unlocked .ach-icon { filter: drop-shadow(0 0 8px #ff8fb088); }
.ach:not(.unlocked) .ach-icon { filter: grayscale(1) opacity(.45); }
.ach strong { font-family: var(--serif); font-weight: 600; }

/* ---------- Report: title progress ---------- */
.report-level { margin: 14px 0 4px; padding: 14px 16px; border-radius: 18px; border: 1px solid #ff8fb026; background: var(--grad-soft); display: grid; gap: 8px; }
.report-level-head { display: flex; align-items: center; gap: 10px; }
.report-level-head strong { font-family: var(--serif); font-size: 18px; }
.level-gain { margin-left: auto; color: var(--peach); font-weight: 700; animation: gain-pop .8s .6s var(--ease-spring) both; }
@keyframes gain-pop { from { opacity: 0; transform: translateY(8px) scale(.8); } to { opacity: 1; transform: none; } }
.report-level small { color: var(--muted); }
.level-up { animation: level-glow 1.6s .4s ease-in-out 2; }
@keyframes level-glow { 50% { box-shadow: 0 0 0 2px #ff8fb099, 0 0 40px #ff8fb055; } }
.report-daily { margin: 8px 0; color: var(--peach); font-weight: 600; display: flex; gap: 8px; align-items: center; animation: gain-pop .8s .9s var(--ease-spring) both; }
.report-head h2 { font-family: var(--serif); font-weight: 600; letter-spacing: .06em; }
.ring-value { stroke: var(--rose); }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: "light" "copy" "roles" "sub" "queue"; text-align: left; padding: 22px 18px 20px; border-radius: 28px; margin-top: 16px; }
  .hero-light { width: min(220px, 62vw); margin: -6px auto -18px; }
  .light-word { font-size: 22px; }
  .hero h1 { font-size: clamp(34px, 10vw, 44px); }
  .role-pick { grid-template-columns: 1fr; }
  .role-card { padding: 16px; }
  .assure { grid-template-columns: 1fr 1fr; }
  .daily-card { grid-template-columns: 1fr; }
  .lights-legend { grid-template-columns: 1fr; }
  .me-ladder ol { grid-template-columns: 1fr; }
  .room-stage[data-state="cue"] .orb { width: 104px; height: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient i, .brand-mark i, .light-halo, .light-core, .gate-lights i, .daily-glyph, .lights-legend i, .button.primary::after, .role-card::after, .room-stage[data-cue="stop"]::after { animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .gate-title span, .gate-line, .gate-card, .view:not([hidden]) { animation: none; }
}

.daily-level .level-badge, .report-level-head .level-badge { justify-self: start; }
.mode-card.friend-card, .mode-card.solo-card { background: #ffffff06; border-color: var(--line); }
@media (hover: hover) { .mode-card.friend-card:hover, .mode-card.solo-card:hover { background: #ff8fb00a; border-color: #ff8fb04d; } }
.friend-card .card-action, .solo-card .card-action { color: var(--rose); }
.friend-card .card-action { border-top-color: var(--line); }
