/* 等我说停 · Night Rose design system. Heat is the language: 继续 is hot rose, 慢一点 warm apricot, 停 cool violet. */

@font-face { font-family: "Hush Serif"; src: url("/assets/serif.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  color-scheme: dark;
  /* Deep plum, never black. */
  --ink: #1a0c1b;
  --ink-1: #24112250;
  --ink-2: #2c1529;
  --ink-3: #381b33;
  --veil: #ffffff0a;
  --veil-2: #ffffff13;
  --hair: #ffffff15;
  --hair-2: #ffffff26;
  --text: #fbeef2;
  --soft: #dec6ce;
  --dim: #a88f9a;
  /* --gold is the primary accent (kept as a name for the many rules that use it): a rose with warmth in it. */
  --gold: #ff8fb1;
  --gold-2: #ffc6d8;
  --gold-ink: #2d0a18;
  --rose-grad: linear-gradient(135deg, #ffb3c9 0%, #ff7fa6 48%, #e2588a 100%);
  --champagne: #f2cb9f;
  --champagne-2: #fbe3c6;
  --champagne-ink: #2a1a10;
  --blush: #d6a6ff;
  --wine: #6e1240;
  --go: #ff4f8f;
  --slow: #ffad6b;
  --stop: #9488ff;
  --danger: #ff7a7a;
  --serif: "Hush Serif", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  --out: cubic-bezier(.2, .8, .2, 1);
  --r-1: 12px; --r-2: 18px; --r-3: 26px; --r-4: 34px;
  --pad: 18px;
  --nav-h: 66px;
  font-family: var(--sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  background: var(--ink);
  color: var(--text);
}
@supports (transition-timing-function: linear(0, 1)) {
  :root { --spring: linear(0, .006, .025 2.8%, .101 6.1%, .539 18.9%, .721 25.3%, .849 31.5%, .937 38.1%, .968 41.8%, .991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100dvh; background: transparent; color: var(--text); line-height: 1.6; overflow-x: hidden; }
html { background: var(--ink); }
img, svg { display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .42; }
a { color: var(--gold); -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.serif { font-family: var(--serif); font-weight: 600; letter-spacing: .03em; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: none; }
[data-icon] svg, button > svg { width: 1.15em; height: 1.15em; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 650; }
p { margin: 0; }
::selection { background: #ff8fb144; }

/* ---------- Night: grain + slow candle light ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background: radial-gradient(120% 70% at 50% -12%, #5a1a42d9 0%, transparent 62%), radial-gradient(90% 60% at 110% 105%, #3a1a66b3 0%, transparent 60%), radial-gradient(70% 50% at -10% 70%, #4a1a2a80 0%, transparent 60%), var(--ink); }
.ambient::after { content: ""; position: absolute; inset: -50%; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite; }
.ambient i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: candle 18s ease-in-out infinite alternate; }
.ambient i:nth-child(1) { width: 46vmax; height: 46vmax; right: -12vmax; top: -14vmax; background: #8a1a4c66; }
.ambient i:nth-child(2) { width: 34vmax; height: 34vmax; left: -10vmax; bottom: -8vmax; background: #6a3cc22a; animation-duration: 23s; animation-delay: -6s; }
.ambient i:nth-child(3) { width: 26vmax; height: 26vmax; left: 30vw; top: 40vh; background: #ff8fb117; animation-duration: 29s; animation-delay: -12s; }
@keyframes candle { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(3vmax, 2vmax, 0) scale(1.08); } 100% { transform: translate3d(-2vmax, 4vmax, 0) scale(.95); } }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

/* ---------- Layout shell ---------- */
.shell { width: min(1080px, 100% - 2 * var(--pad)); margin-inline: auto; }
.header { position: sticky; top: 0; z-index: 40; background: linear-gradient(180deg, #1a0c1bd9 60%, #1a0c1b00); padding-top: env(safe-area-inset-top); }
.header-inner { height: 64px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-mark { position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #ff8fb133, transparent 70%); }
.brand-mark i { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold), 0 0 26px #ff8fb188; animation: pulse 2.6s ease-in-out infinite; }
.wordmark { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: .2em; }
.wordmark span { display: none; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.4); } 28% { transform: scale(1); } 42% { transform: scale(1.25); } 60% { transform: scale(1); } }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-button { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--soft); transition: background-color .2s, color .2s, transform .25s var(--spring); }
.icon-button:active { transform: scale(.9); }
@media (hover: hover) { .icon-button:hover { background: var(--veil-2); color: var(--text); } }
.icon-button svg { width: 19px; height: 19px; }
.profile { display: none; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 4px; border-radius: 99px; border: 1px solid var(--hair); color: var(--soft); font-size: 13px; margin-left: 6px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ink-3); color: var(--gold); }
.avatar-small svg { width: 15px; height: 15px; }
#profile-name { max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Lobby tabs: a floating dock on phones, a quiet row on desktop. */
.view-tabs { display: flex; gap: 2px; margin-left: 26px; }
.view-tab { position: relative; display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 99px; color: var(--dim); font-size: 14px; transition: color .25s, background-color .25s; }
.view-tab[aria-current="page"] { color: var(--text); background: var(--veil-2); }
.view-tab[aria-current="page"] .tab-icon { color: var(--gold); }
.tab-icon svg { width: 18px; height: 18px; }
.tab-badge { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--gold); color: var(--gold-ink); font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; }
body:has(#lobby[hidden]) .view-tabs { display: none; }
@media (min-width: 760px) { .profile { display: inline-flex; } }
@media (max-width: 759px) {
  .view-tabs { position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); margin: 0; height: var(--nav-h); padding: 6px;
    display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 26px; background: #1a0c15e6; border: 1px solid var(--hair); box-shadow: 0 18px 50px #000a;
    -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
  .view-tab { height: auto; flex-direction: column; justify-content: center; gap: 2px; padding: 0; font-size: 11px; border-radius: 20px; }
  .view-tab .tab-badge { position: absolute; top: 4px; left: calc(50% + 7px); }
  body:has(#lobby:not([hidden])) main { padding-bottom: calc(var(--nav-h) + 30px + env(safe-area-inset-bottom)); }
}

main { display: block; min-height: 70dvh; }
main:focus { outline: none; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; padding: 34px 0 calc(40px + env(safe-area-inset-bottom)); margin-top: 40px; border-top: 1px solid var(--hair); color: var(--dim); font-size: 13px; }
body:has(#lobby[hidden]) .footer { display: none; }
.footer-note { display: flex; gap: 12px; align-items: center; }
.footer-note strong { display: block; color: var(--soft); font-weight: 600; }
.footer-note small { display: block; }
.footer-mark { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); border: 1px solid var(--hair-2); font-size: 17px; }
.footer-links { display: flex; gap: 18px; }
@media (max-width: 759px) { .footer { padding-bottom: calc(var(--nav-h) + 40px + env(safe-area-inset-bottom)); } }

/* ---------- Primitives ---------- */
.button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 99px; font-size: 15px; font-weight: 650; letter-spacing: .03em; white-space: nowrap;
  border: 1px solid transparent; transition: transform .3s var(--spring), background-color .2s, border-color .2s, box-shadow .3s, color .2s; overflow: hidden; isolation: isolate; }
.button:not(:disabled):active { transform: scale(.95); }
.button.primary { background: var(--rose-grad); color: var(--gold-ink); box-shadow: 0 10px 32px #ff6f9f40, inset 0 1px 0 #fff8; }
.button.primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, transparent 30%, #fff9 50%, transparent 70%); transform: translateX(-130%); animation: sheen 5s ease-in-out infinite; }
@keyframes sheen { 0%, 64% { transform: translateX(-130%); } 84%, 100% { transform: translateX(130%); } }
@media (hover: hover) { .button.primary:hover:enabled { filter: brightness(1.06); } }
.button.outline { background: var(--veil); border-color: var(--hair-2); color: var(--text); }
@media (hover: hover) { .button.outline:hover:enabled { background: var(--veil-2); border-color: #ff8fb166; } }
.button.danger { background: #ff7a7a17; border-color: #ff7a7a55; color: #ffc9c9; }
.button.gold { background: linear-gradient(135deg, #fff0db, var(--champagne) 55%, #c99a66); color: var(--champagne-ink); box-shadow: 0 10px 30px #f2cb9f33, inset 0 1px 0 #fff8; }
.button [data-icon] svg { width: 17px; height: 17px; }
.text-button { display: inline-flex; align-items: center; gap: 6px; color: var(--soft); font-size: 14px; padding: 6px 2px; transition: color .2s; }
.text-button [data-icon] svg { width: 15px; height: 15px; }
@media (hover: hover) { .text-button:hover { color: var(--gold); } }
.card-action { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 650; font-size: 14px; }
.chip-button, .mini-button, .phrase { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--hair-2); background: var(--veil); color: var(--text); font-size: 14px;
  transition: transform .3s var(--spring), background-color .2s, border-color .2s, color .2s; }
.chip-button:not(:disabled):active, .phrase:not(:disabled):active, .mini-button:active { transform: scale(.94); }
.chip-button[aria-pressed="true"], .chip-button.on, .phrase[aria-pressed="true"] { background: linear-gradient(135deg, #ff8fb133, #d6a6ff1f); border-color: var(--gold); color: #fff; box-shadow: 0 0 0 3px #ff8fb117; }
.chip-button.gold { background: linear-gradient(135deg, #fff0db, var(--champagne) 60%, #c99a66); color: var(--champagne-ink); border-color: transparent; font-weight: 650; }
.mini-button { min-height: 30px; padding: 4px 12px; font-size: 12.5px; }
.chip-note { font-size: 13px; color: var(--dim); align-self: center; }
.chip-note.gold { color: var(--gold); }
.sent { animation: sent .6s var(--spring); }
@keyframes sent { 40% { transform: scale(1.06); background: #ff8fb133; } }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-rail { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip-rail::-webkit-scrollbar { display: none; }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 99px; border: 1px solid var(--hair-2); background: var(--veil); font-size: 14px; color: var(--soft); transition: all .25s var(--out); }
/* Chosen is unmistakable: filled with rose light, bright text and a check for multi-choice. */
.chip input:checked + span { background: linear-gradient(135deg, #ff8fb138, #d6a6ff24); border-color: var(--gold); color: #fff; font-weight: 600; box-shadow: 0 0 0 3px #ff8fb11a, 0 6px 18px #ff6f9f22; }
.chip input[type="checkbox"]:checked + span::before { content: ""; width: 14px; height: 8px; margin: -3px 7px 0 -2px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); animation: tick .3s var(--spring); }
@keyframes tick { from { transform: rotate(-45deg) scale(.2); opacity: 0; } }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.chip:active span { transform: scale(.95); }
.segmented { gap: 6px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 99px; border: 1px solid var(--hair-2); background: var(--veil); cursor: pointer; font-size: 14px; color: var(--soft); }
.choice input { position: absolute; opacity: 0; }
.choice:has(input:checked) { background: linear-gradient(135deg, #ff8fb138, #d6a6ff24); border-color: var(--gold); color: #fff; font-weight: 600; }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 10px; color: var(--soft); font-size: 13.5px; font-weight: 600; }
.field { display: grid; gap: 8px; font-size: 13.5px; color: var(--soft); margin: 0 0 14px; }
.chip-field { margin: 0 0 18px; }
input[type="text"], input[type="search"], input[type="number"], input:not([type]), textarea, select {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--hair-2); background: #1a0c1b99; color: var(--text); font-size: 16px; transition: border-color .2s, box-shadow .2s; }
textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #ff8fb199; box-shadow: 0 0 0 4px #ff8fb11f; }
input::placeholder, textarea::placeholder { color: #8c7480; }
.toggle { position: relative; display: flex; align-items: center; gap: 12px; margin: 10px 0; color: var(--soft); font-size: 14px; line-height: 1.5; cursor: pointer; }
.toggle input { appearance: none; flex: none; width: 46px; height: 28px; margin: 0; border-radius: 99px; background: var(--ink-3); border: 1px solid var(--hair-2); position: relative; cursor: pointer; transition: background-color .3s; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--soft); transition: transform .35s var(--spring), background-color .3s; }
.toggle input:checked { background: var(--rose-grad); border-color: transparent; box-shadow: 0 0 14px #ff6f9f55; }
.toggle input:checked::after { transform: translateX(18px); background: #fff; }
.field-note, .form-hint, .duration-hint, .profile-hint { color: var(--dim); font-size: 13px; line-height: 1.6; margin: 6px 0 0; }
.form-error { margin: 10px 0; padding: 10px 14px; border-radius: 14px; background: #ff7a7a1a; color: #ffc9c9; font-size: 13.5px; }
.pick-count { margin-left: 8px; color: var(--dim); font-weight: 500; }
.form-actions, .dialog-actions, .popup-actions, .share-actions, .queue-actions, .stage-controls, .meet-actions, .verdict-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.dialog-actions { margin-top: 20px; justify-content: flex-end; }
.dialog-actions .button { flex: 1 1 auto; }

/* Sheets. Every hidden panel (dialogs, room panels) is one component: a handle you can drag, a title that stays
   in place with a close button, a body that scrolls on its own, and a blurred rose-tinted backdrop. */
dialog { width: min(520px, 100% - 24px); max-height: min(88dvh, 820px); margin: auto; padding: 0; border: 1px solid var(--hair-2); border-radius: var(--r-4);
  background: linear-gradient(180deg, #34182f, #241120 70%); color: var(--text);
  box-shadow: 0 40px 120px #000d, inset 0 1px 0 #ffffff12; overflow: auto; overscroll-behavior: contain; opacity: 0; transform: translateY(24px) scale(.98);
  transition: opacity .3s var(--out), transform .5s var(--spring), overlay .45s allow-discrete, display .45s allow-discrete; }
dialog[open] { opacity: 1; transform: none; }
@starting-style { dialog[open] { opacity: 0; transform: translateY(24px) scale(.98); } }
dialog::backdrop { background: radial-gradient(120% 80% at 50% 100%, #3a0f2899, #07030599 70%); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  opacity: 0; transition: opacity .35s, overlay .45s allow-discrete, display .45s allow-discrete; }
dialog[open]::backdrop { opacity: 1; }
@starting-style { dialog[open]::backdrop { opacity: 0; } }
.dialog-panel { padding: 0 20px calc(22px + env(safe-area-inset-bottom)); }
.dialog-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -20px 14px; padding: 18px 16px 12px 20px;
  background: linear-gradient(180deg, #34182f 75%, #34182f00); }
.dialog-top .icon-button { background: var(--veil-2); }
#dialog-title { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: .06em; }
.sheet-handle { display: none; position: relative; width: 44px; height: 5px; border-radius: 99px; background: var(--hair-2); margin: 10px auto 0; }
.sheet-handle::before { content: ""; position: absolute; inset: -14px -40px; }
.dialog-panel > .sheet-handle { position: sticky; top: 0; z-index: 3; margin-bottom: -6px; }
.dialog-panel > p, .dialog-panel form > p { color: var(--soft); line-height: 1.75; margin-bottom: 12px; }
@media (max-width: 759px) {
  dialog { width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0; border-radius: 30px 30px 0 0; border-bottom: 0; transform: translateY(100%); }
  dialog[open] { transform: none; }
  @starting-style { dialog[open] { transform: translateY(100%); } }
  .sheet-handle { display: block; }
}
dialog.dragging { transition: none; }

/* Folds (details): one look everywhere, a chevron that turns, and content that slides open where the browser can. */
details.fold, .match-more, .online-settings, .me-ladder { border-radius: var(--r-2); background: var(--veil); border: 1px solid var(--hair); padding: 0 16px; transition: background-color .3s, border-color .3s; }
details.fold[open], .match-more[open], .online-settings[open], .me-ladder[open] { background: #ff8fb10a; border-color: #ff8fb133; }
details.fold > summary, .match-more > summary, .online-settings > summary, .me-ladder > summary { list-style: none; cursor: pointer; position: relative; display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 12px 28px 12px 0; font-weight: 600; color: var(--soft); }
details.fold > summary::-webkit-details-marker, .match-more > summary::-webkit-details-marker, .online-settings > summary::-webkit-details-marker, .me-ladder > summary::-webkit-details-marker { display: none; }
details.fold > summary::after, .match-more > summary::after, .online-settings > summary::after, .me-ladder > summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 8px; height: 8px;
  border-right: 1.6px solid var(--gold); border-bottom: 1.6px solid var(--gold); transform: translateY(-70%) rotate(45deg); transition: transform .4s var(--spring); }
details[open].fold > summary::after, .match-more[open] > summary::after, .online-settings[open] > summary::after, .me-ladder[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
details.fold > summary small, .match-more > summary small { margin-left: auto; margin-right: 4px; color: var(--dim); font-weight: 400; font-size: 12.5px; }
@supports selector(::details-content) {
  :root { interpolate-size: allow-keywords; }
  details.fold::details-content, .match-more::details-content, .online-settings::details-content, .me-ladder::details-content {
    height: 0; overflow: clip; opacity: 0; transition: height .45s var(--out), opacity .35s, content-visibility .45s allow-discrete; }
  details[open].fold::details-content, .match-more[open]::details-content, .online-settings[open]::details-content, .me-ladder[open]::details-content { height: auto; opacity: 1; }
}
.match-more[open], .online-settings[open], details.fold[open] { padding-bottom: 14px; }

.toast { position: fixed; z-index: 120; left: 50%; bottom: calc(var(--nav-h) + 34px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px) scale(.96); opacity: 0; pointer-events: none; max-width: min(92vw, 420px);
  padding: 12px 18px; border-radius: 18px; background: #2a1422f2; border: 1px solid #ff8fb155; color: var(--text); font-size: 14px; font-weight: 600; box-shadow: 0 20px 50px #000b, 0 0 30px #ff6f9f22;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: opacity .3s, transform .5s var(--spring); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
body:has(#lobby[hidden]) .toast { bottom: calc(120px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) { .toast { bottom: 36px; } }

.social-panel { margin-top: 28px; }
.social-heading, .section-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.social-heading h2, .section-label h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .06em; }
.section-hint, .section-label span { color: var(--dim); font-size: 13px; }
.social-message { color: var(--dim); font-size: 14px; padding: 18px 0; }
.social-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: var(--r-2); background: var(--veil); border: 1px solid var(--hair); margin-bottom: 10px; }
.social-row strong { display: block; font-size: 15px; }
.social-row small { display: block; color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.social-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.social-actions .button { min-height: 38px; padding: 8px 14px; font-size: 13.5px; }
@media (max-width: 559px) { .social-row { flex-direction: column; align-items: stretch; } .social-actions { justify-content: flex-start; } }

/* ---------- Gate ---------- */
.gated body { overflow: hidden; }
.gate { position: fixed; inset: 0; z-index: 90; overflow-y: auto; display: grid; place-items: center; padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  background: radial-gradient(80% 55% at 50% 15%, #4a1232 0%, #14070f 60%, var(--ink) 100%); }
.gate.leaving { pointer-events: none; animation: gate-out .8s var(--out) forwards; }
@keyframes gate-out { to { opacity: 0; filter: blur(10px); transform: scale(1.04); visibility: hidden; } }
.gate-inner { width: min(400px, 100%); text-align: center; }
.gate-lights { display: flex; justify-content: center; gap: 12px; margin-bottom: 26px; }
.gate-lights i { width: 12px; height: 12px; border-radius: 50%; opacity: .2; 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: .2; box-shadow: none; } 15%, 30% { opacity: 1; box-shadow: 0 0 16px currentColor, 0 0 36px currentColor; } 45% { opacity: .2; } }
.gate-title { font-size: clamp(54px, 15vw, 80px); line-height: 1.1; letter-spacing: .14em; }
.gate-title span { display: inline-block; color: var(--gold-2); text-shadow: 0 0 30px #ff8fb166; animation: rise-in 1.2s var(--out) both; }
.gate-title span:nth-child(2) { animation-delay: .12s; } .gate-title span:nth-child(3) { animation-delay: .24s; } .gate-title span:nth-child(4) { animation-delay: .36s; color: #fff; text-shadow: 0 0 24px var(--go), 0 0 60px var(--go); }
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
.gate-line { margin: 14px 0 30px; color: var(--soft); letter-spacing: .2em; animation: rise-in 1.2s .6s var(--out) both; }
.gate-card { display: grid; gap: 18px; text-align: left; padding: 22px; border-radius: var(--r-3); background: #1c0c16e6; border: 1px solid var(--hair); box-shadow: 0 30px 90px #000b; animation: rise-in 1s .85s var(--out) both; }
.gate-field { display: grid; gap: 10px; color: var(--soft); font-size: 14px; }
.gate-switch { display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.gate-switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { flex: none; position: relative; width: 50px; height: 30px; border-radius: 99px; background: var(--ink-3); border: 1px solid var(--hair-2); transition: background-color .3s; }
.switch-track i { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--soft); transition: transform .4s var(--spring), background-color .3s; }
.gate-switch input:checked + .switch-track { background: var(--rose-grad); border-color: transparent; box-shadow: 0 0 14px #ff6f9f55; }
.gate-switch input:checked + .switch-track i { transform: translateX(20px); background: #fff; }
.gate-switch input:focus-visible + .switch-track { outline: 2px solid var(--gold); outline-offset: 3px; }
.gate-enter { width: 100%; min-height: 54px; font-size: 16px; }
.gate-promise { color: var(--dim); font-size: 12.5px; line-height: 1.75; text-align: center; }
.gate-leave { display: inline-block; margin-top: 22px; color: var(--dim); font-size: 14px; text-decoration: none; }

/* ---------- Cover ---------- */
.covered body > *:not(#cover), .covered dialog { visibility: hidden !important; }
.cover { position: fixed; inset: 0; z-index: 300; overflow: auto; background: #f7f5f0; color: #2a2a2a; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
.cover-page { max-width: 640px; margin: 0 auto; padding: max(30px, env(safe-area-inset-top)) 22px 40px; }
.cover header { display: flex; justify-content: space-between; color: #c9a03a; font-weight: 600; font-size: 17px; }
.cover header small { color: #999; font-weight: 400; }
.cover h2 { margin: 26px 0 14px; font-size: 26px; color: #1d1d1d; }
.cover ul { padding-left: 20px; line-height: 2.1; }
.cover-hint { margin-top: 50px; color: #c6c6c6; font-size: 12px; text-align: center; }

/* ---------- Motion helpers ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--out) var(--delay, 0ms), transform .9s var(--out) var(--delay, 0ms); }
[data-reveal].in { opacity: 1; transform: none; }
.view:not([hidden]) { animation: view-in .5s var(--out); }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
