/* ==========================================================
   Bot 游戏室 · 夜间游戏厅
   四格电台：琥珀色荧光屏 / 实体收音机
   多人扫雷：薄荷色雷区 / 实体按键
   ========================================================== */
@font-face {
  font-family: "Noto Sans SC UI";
  src: url("/assets/lobby-display.woff2?v=2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0c0d11;
  --bg-2: #12141a;
  --surface: #171a21;
  --surface-2: #1e222b;
  --raise: #262b36;
  --ink: #f1efe8;
  --ink-2: #d6d3ca;
  --muted: #9a9ca6;
  --dim: #666a75;
  --line: #ffffff14;
  --line-2: #ffffff26;
  --radio: #ffb547;
  --radio-ink: #2a1a00;
  --mines: #5eead4;
  --mines-ink: #032620;
  --danger: #ff5d5d;
  --good: #8ee05a;
  --accent: #e8ff6b;
  --accent-ink: #1b2200;
  --p1: #ffb547; --p2: #5eead4; --p3: #ff7ab6; --p4: #8fa8ff; --p5: #b5f06a; --p6: #ff8a5c;
  --r: 14px;
  --ease: cubic-bezier(.2, .9, .25, 1);
  --sans: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", "SF Mono", Consolas, ui-monospace, monospace;
  --display: "Bahnschrift", "DIN Alternate", "Barlow", var(--sans);
  --lobby-ui: "Noto Sans SC UI", var(--sans);
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body[data-game="radio"] { --accent: var(--radio); --accent-ink: var(--radio-ink); }
body[data-game="mines"] { --accent: var(--mines); --accent-ink: var(--mines-ink); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
h1, h2, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
::selection { background: var(--accent); color: var(--accent-ink); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60rem 36rem at 12% -10%, #ffb54714, transparent 60%),
    radial-gradient(50rem 34rem at 100% 10%, #5eead412, transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(#ffffff0d 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 70%);
}
body[data-game="radio"] { background: radial-gradient(56rem 34rem at 50% -8%, #ffb5471c, transparent 62%), var(--bg); }
body[data-game="mines"] { background: radial-gradient(56rem 34rem at 50% -8%, #5eead418, transparent 62%), var(--bg); }

.site-header, footer, main { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }

/* ---------- 顶栏 ---------- */
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 11px; border-radius: 9px; text-decoration: none; white-space: nowrap; }
.brand-name { color: #fff3db; font: 600 1.38rem/1.25 var(--lobby-ui); letter-spacing: .045em; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; width: 40px; height: 40px; padding: 8px; border-radius: 11px; background: #2d4299; }
.brand-mark i { border-radius: 2px; background: #8093df; }
.brand-mark i:nth-child(1) { background: #ffcf75; }
.brand-mark i:nth-child(4) { background: #a4e6da; }
.account.account-trigger { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 13px; border: 0; border-radius: 10px; background: #283765; color: #fff1d9; font-size: .9rem; }
.account.account-trigger:hover:not(:disabled) { background: #354782; }
.account-icon { position: relative; width: 18px; height: 18px; flex: 0 0 18px; color: #c4d0ff; }
.account-icon::before, .account-icon::after { position: absolute; content: ""; border: 1.5px solid currentColor; }
.account-icon::before { top: 1px; left: 6px; width: 6px; height: 6px; border-radius: 50%; }
.account-icon::after { right: 2px; bottom: 1px; left: 2px; height: 7px; border-radius: 7px 7px 3px 3px; }
.account-avatar { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.account-avatar:not([hidden]) + .account-icon { display: none; }
#account-status { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:not(.verified) #account-status { font: 600 .95rem/1.45 var(--lobby-ui); letter-spacing: .055em; }

main { flex: 1; display: grid; align-content: center; padding: 28px 0 56px; }

/* ---------- 通用控件 ---------- */
button {
  cursor: pointer; font: inherit; font-size: .95rem; font-weight: 700; letter-spacing: .01em;
  min-height: 46px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 12px;
  color: var(--ink); background: var(--surface-2);
  transition: background-color .18s, border-color .18s, color .18s, transform .12s, box-shadow .18s, opacity .18s;
}
button:hover:not(:disabled) { border-color: #ffffff50; background: var(--raise); }
button:active:not(:disabled) { transform: translateY(1px) scale(.985); }
button:disabled { cursor: not-allowed; opacity: .42; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button.primary { border-color: transparent; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 24px -10px var(--accent); }
button.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 82%, #fff); border-color: transparent; }
button.ghost { background: transparent; color: var(--muted); }
button.ghost:hover:not(:disabled) { color: var(--ink); background: #ffffff0a; }
button.link { min-height: 36px; padding: 0 8px; border-color: transparent; background: transparent; color: var(--muted); font-weight: 600; }
button.link:hover:not(:disabled) { color: var(--ink); background: #ffffff0a; border-color: transparent; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.eyebrow { color: var(--accent); font: 700 .75rem/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 10px; }
.support { color: var(--muted); font-size: .875rem; line-height: 1.65; }
.meter { display: block; height: 4px; overflow: hidden; border-radius: 4px; background: #ffffff14; }
.meter b { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform .25s linear, background-color .3s; }

.notice { margin: 0 0 18px; padding: 13px 16px; border: 1px solid #ff5d5d66; border-radius: 12px; background: #ff5d5d14; color: #ffd6d6; line-height: 1.5; }
.notice[data-kind="success"] { border-color: #8ee05a66; background: #8ee05a14; color: #e3ffcf; }
.notice[data-kind="connection"] { border-color: #ffb54766; background: #ffb54714; color: #ffe6bd; }

/* ---------- 大厅 ---------- */
body[data-view="home"] { background: #101521; }
body[data-view="home"] main { align-content: start; padding-top: 18px; }
.home { display: grid; gap: 17px; }
.lobby-banner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 33%);
  align-items: stretch; gap: 20px; padding: 12px;
  border-radius: 24px; background: #273d94;
  background-image: repeating-linear-gradient(133deg, transparent 0 15px, #e0e7ff08 15px 16px, transparent 16px 31px);
}
.home-intro { align-self: center; min-width: 0; padding: clamp(16px, 3vw, 39px); }
.lobby-kicker { color: #dae1ff; font-size: .9rem; font-weight: 700; letter-spacing: .085em; }
.home h1 { margin-top: 12px; color: #fff5df; font-size: clamp(2.4rem, 6vw, 5.3rem); font-weight: 850; line-height: 1.12; letter-spacing: -.022em; }
.home .game-page-title { display: none; }
body:not([data-page="lobby"]) #home-title,
body[data-page="radio"] .game-card:not([data-game="radio"]),
body[data-page="mines"] .game-card:not([data-game="mines"]),
body[data-page="landlord"] .game-card:not([data-game="landlord"]),
body:not([data-page="lobby"]) .card-entry { display: none; }
body[data-page="radio"] #radio-page-title,
body[data-page="mines"] #mines-page-title,
body[data-page="landlord"] #landlord-page-title { display: block; }
body[data-game="landlord"] { --accent: #f8a4aa; --accent-ink: #1a0c10; }
body:not([data-page="lobby"]) .games { grid-template-columns: minmax(0, 660px); }
.lede { margin-top: 16px; color: #e3e8ff; font-size: 1rem; line-height: 1.65; }
.lobby-section { display: flex; align-items: center; gap: 20px; margin-top: 13px; }
.lobby-section h2 { flex-shrink: 0; font-size: 1.45rem; }
.lobby-section::after { content: ""; height: 1px; background: #343e55; flex: 1; }
body:not([data-page="lobby"]) .lobby-section { display: none; }

.resume { margin-top: 16px; min-height: 42px; color: #fff5df; background: #1a2b70; border-color: #8392d6; }
.resume:hover:not(:disabled) { background: #1e307c; }

.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 18px; }
.game-card {
  --c: var(--radio); --ci: var(--radio-ink);
  position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden;
  border-radius: 16px; background: #191f2e;
  box-shadow: 0 15px 30px -12px #0009, 0 4px 8px -4px #0006;
}
.game-card[data-game="mines"] { --c: var(--mines); --ci: var(--mines-ink); }
.game-card[data-game="landlord"] { --c: #f8a4aa; --ci: #1a0c10; }
.card-art.landlord-art { display: flex; align-items: center; justify-content: center; gap: 2px; background: radial-gradient(ellipse, #4b2630, #20151c); }
.landlord-art span { display: grid; place-items: center; width: 64px; height: 92px; border-radius: 10px; background: #f5e6d7; color: #201721; font-size: 2.1rem; box-shadow: 0 8px 24px #0006; }
.landlord-art span:first-child { --rest: translateY(8px) rotate(-13deg); --fan: translate(-13px, 2px) rotate(-22deg); }
.landlord-art span:nth-child(2) { --rest: translateY(0); --fan: translateY(-13px); color: #a83149; z-index: 1; }
.landlord-art span:last-child { --rest: translateY(8px) rotate(13deg); --fan: translate(13px, 2px) rotate(22deg); }
.landlord-art span { transform: var(--rest); }
@media (prefers-reduced-motion: no-preference) {
  .landlord-art span { transition: transform .42s var(--ease); }
  .game-card:has(:focus-visible) .landlord-art span { transform: var(--fan); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .game-card:hover .landlord-art span { transform: var(--fan); }
}
.game-card button.primary { background: var(--c); color: var(--ci); box-shadow: 0 6px 24px -10px var(--c); }
.game-card button.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--c) 82%, #fff); }
.game-card :focus-visible { outline-color: var(--c); }
.card-art { position: relative; height: 210px; display: grid; place-items: center; overflow: hidden; }
.radio-art { background: radial-gradient(70% 90% at 50% 100%, #ffb54726, transparent 70%), #15130f; }
.mines-art { background: radial-gradient(70% 90% at 50% 100%, #5eead420, transparent 70%), #0f1514; }
.card-body { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 24px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.card-meta span { padding: 3px 10px; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); border-radius: 999px; color: var(--c); font: 600 .75rem/1.6 var(--mono); }
.card-body h3 { margin: 0; font-size: clamp(1.6rem, 2.6vw, 2rem); font-weight: 850; line-height: 1.25; }
.card-rule { color: var(--muted); line-height: 1.7; font-size: .95rem; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: auto; padding-top: 8px; }
.card-entry { color: var(--c); font-weight: 650; text-underline-offset: 4px; }
.cmd { padding: 6px 10px; border: 1px dashed var(--line-2); border-radius: 8px; color: var(--ink-2); font: 600 .85rem var(--mono); }

/* 大厅 · 迷你收音机 */
.mini-radio { position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 14px; width: min(320px, 82%); padding: 16px; border-radius: 18px; background: linear-gradient(180deg, #3a3329, #2a251e); box-shadow: 0 14px 0 #120f0b, 0 30px 40px -12px #000, inset 0 1px #ffffff26; transform: rotate(-3deg); transition: transform .5s var(--ease); }
.game-card:hover .mini-radio { transform: rotate(0deg) translateY(-4px); }
.mini-radio::before { content: ""; position: absolute; left: 30px; top: -26px; width: 3px; height: 34px; border-radius: 3px; background: #8b8170; transform: rotate(-24deg); transform-origin: bottom; }
.mini-grille { border-radius: 50%; aspect-ratio: 1; background: radial-gradient(circle, #1a1611 1.6px, transparent 2px) 0 0 / 7px 7px, #2f2a22; box-shadow: inset 0 2px 8px #000a; }
.mini-face { display: grid; gap: 10px; align-content: center; }
.mini-vfd { display: flex; align-items: baseline; gap: 6px; padding: 8px 10px; border-radius: 6px; background: #120d05; box-shadow: inset 0 0 0 1px #000, inset 0 0 18px #ffb5471a; color: var(--radio); font-family: var(--mono); text-shadow: 0 0 8px #ffb547aa; }
.mini-vfd span { font-size: .6rem; opacity: .7; }
.mini-vfd b { font-size: 1.25rem; }
.mini-vfd em { margin-left: auto; font-style: normal; font-size: .7rem; }
.mini-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.mini-keys i { height: 16px; border-radius: 4px; background: #4a4337; box-shadow: 0 3px 0 #1c1813; }
.mini-keys i.on { background: var(--radio); box-shadow: 0 1px 0 #1c1813, 0 0 14px #ffb54790; transform: translateY(2px); }
.mini-wave { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; align-items: end; gap: 4px; height: 26px; opacity: .55; }
.mini-wave i { width: 3px; height: 30%; border-radius: 2px; background: var(--radio); animation: eq 1.2s ease-in-out infinite alternate; }
.mini-wave i:nth-child(3n) { animation-delay: -.4s; }
.mini-wave i:nth-child(3n+1) { animation-delay: -.8s; animation-duration: .9s; }
.mini-wave i:nth-child(4n) { animation-duration: 1.5s; }
@keyframes eq { to { height: 100%; } }

/* 大厅 · 迷你雷区 */
.mini-board { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; width: min(250px, 70%); padding: 8px; border-radius: 12px; background: #0a100f; box-shadow: inset 0 0 0 1px #5eead422, 0 20px 40px -16px #000; transform: perspective(600px) rotateX(18deg) rotate(2deg); transition: transform .5s var(--ease); }
.game-card:hover .mini-board { transform: perspective(600px) rotateX(0deg) rotate(0deg); }
.mini-board i { aspect-ratio: 1; border-radius: 3px; background: linear-gradient(180deg, #2c3a38, #223030); box-shadow: inset 0 1px #ffffff1a; display: grid; place-items: center; font: 700 9px/1 var(--mono); font-style: normal; }
.mini-board i.o { background: #0f1716; box-shadow: none; }
.mini-board i[data-n]::after { content: attr(data-n); }
.mini-board i[data-n="1"] { color: #7cc4ff; }
.mini-board i[data-n="2"] { color: #8ee05a; }
.mini-board i.f { background: linear-gradient(180deg, #3a2a2a, #2a2020); }
.mini-board i.f::after { content: ""; width: 5px; height: 6px; background: var(--danger); clip-path: polygon(0 0, 100% 50%, 0 100%); }

.lobby-ticket { display: grid; align-content: center; gap: 13px; padding: clamp(18px, 2.5vw, 30px); border-radius: 17px; color: #1d2850; background: #fff0d4; }
.lobby-ticket label { font-size: 1.35rem; font-weight: 800; }
.lobby-ticket .support { color: #525a70; }
.join-field { display: flex; overflow: hidden; border-radius: 9px; border: 1px solid #a5a8b4; background: #fffaf0; }
.join-field:focus-within { outline: 2px solid #4055ac; outline-offset: 2px; }
.join-field input { flex: 1; width: 100%; min-width: 0; min-height: 46px; padding: 0 12px; border: 0; background: transparent; color: #1c2345; font: 700 1rem var(--mono); letter-spacing: .16em; text-transform: uppercase; outline: none; }
.join-field input::placeholder { color: #656c7d; font-family: var(--sans); font-weight: 500; letter-spacing: 0; }
.join-field button { min-height: 46px; border: 0; border-radius: 0; background: #273d94; color: #fff; }
.join-field button:hover:not(:disabled) { background: #1c2d78; }
.join-field button:focus-visible { outline-offset: -4px; }

.home .games { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home .card-art { height: 165px; }
.home .card-body { padding: 18px 20px 20px; gap: 7px; }
.home .card-meta { align-items: baseline; color: var(--c); font-size: .8rem; font-weight: 700; }
.home .card-meta span { padding: 0; border: 0; color: #aeb4c2; }
.home .card-rule { color: #b9c0cf; }
.home .card-actions { padding-top: 12px; gap: 10px; }
.home .card-actions .cmd { display: none; }
.home .game-card button.primary { box-shadow: none; }
.home .mini-wave i { animation: none; }
.home .mini-wave i:nth-child(3n) { height: 72%; }
.home .mini-wave i:nth-child(3n+1) { height: 48%; }
@media (max-width: 850px) {
  .home .games { grid-template-columns: repeat(auto-fit, minmax(min(100%, 248px), 1fr)); }
}
@media (max-width: 640px) {
  .lobby-banner { grid-template-columns: 1fr; gap: 6px; }
  .home-intro { padding: 16px 10px 14px; }
  .home .games { grid-template-columns: 1fr; }
}

/* ---------- 登录 ---------- */
.panel { width: min(100%, 620px); margin-inline: auto; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 30px 60px -40px #000; }
.panel h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 900; letter-spacing: -.035em; }
.lede-sm { margin-top: 10px; color: var(--muted); line-height: 1.7; }
.code-box { display: grid; gap: 14px; margin: 24px 0 16px; padding: 22px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--bg-2); }
.code-box strong { font: 800 clamp(1.4rem, 5.4vw, 2.3rem)/1.2 var(--mono); letter-spacing: .08em; color: var(--accent); overflow-wrap: anywhere; user-select: all; }
.code-timer { display: grid; gap: 6px; color: var(--muted); font: 500 .8rem var(--mono); font-variant-numeric: tabular-nums; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 24px; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-2); font-size: .85rem; line-height: 1.4; }
.steps b { flex: 0 0 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--raise); font: 700 .75rem var(--mono); }
.status-line { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: #ffffff08; color: var(--ink-2); font-size: .9rem; }
.status-line::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--accent); vertical-align: 1px; animation: blink 1.4s ease-in-out infinite; }
.login .support { margin-top: 10px; }
.back { margin-top: 14px; margin-left: -8px; }
@keyframes blink { 50% { opacity: .2; } }

/* ---------- 个人页 ---------- */
.profile { width: min(100%, 760px); }
.profile-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.profile-top .back { margin: -8px; }
.profile-hero { display: flex; align-items: center; gap: 20px; margin: 10px 0 20px; }
.profile-avatar { width: 76px; height: 76px; flex: 0 0 76px; border-radius: 50%; object-fit: cover; background: var(--raise); box-shadow: 0 0 0 1px var(--line-2); }
.profile-name { display: block; margin-top: 7px; color: var(--accent); font-size: 1.05rem; }
.profile-scope { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #ffffff05; color: var(--muted); line-height: 1.65; }
.profile-section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 30px 0 14px; }
.profile-section-head .eyebrow { margin-bottom: 4px; }
.profile-section-head h2 { font-size: 1.35rem; font-weight: 850; }
.profile-count { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: 600 .8rem var(--mono); white-space: nowrap; }
.profile-groups { display: grid; gap: 12px; }
.profile-group { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
.profile-group-head { display: flex; align-items: center; gap: 12px; }
.profile-group-avatar { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; object-fit: cover; background: var(--raise); }
.profile-group-identity { display: grid; gap: 3px; min-width: 0; }
.profile-group-identity .eyebrow { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .08em; }
.profile-group-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-group-summary { color: var(--muted); font-size: .8rem; }
.profile-coins { margin-left: auto; flex-shrink: 0; padding: 5px 10px; border: 1px solid #ffb54755; border-radius: 999px; background: #ffb54713; color: var(--radio); font-size: .85rem; font-weight: 750; white-space: nowrap; }
.profile-game-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.profile-game-stats p { padding: 10px; border-radius: 10px; background: #ffffff06; color: var(--ink-2); font-size: .8rem; line-height: 1.5; }
.profile-empty { padding: 24px 16px; border: 1px dashed var(--line-2); border-radius: 14px; color: var(--muted); text-align: center; line-height: 1.6; }
.profile-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.profile-help { margin-top: 10px; }

/* ---------- 房间 ---------- */
.room { display: grid; gap: 22px; }
.room-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; }
.room-heading { min-width: 0; flex: 1 1 380px; }
.room h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 900; letter-spacing: -.035em; line-height: 1.1; }
.room-status { margin-top: 10px; max-width: 46em; color: var(--muted); line-height: 1.7; }
.room-clock { display: grid; gap: 8px; min-width: 150px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.room-clock span { font: 800 1.8rem/1 var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.room-clock.urgent span { color: var(--danger); animation: blink .8s steps(2, jump-none) infinite; }
.room-clock.urgent .meter b { background: var(--danger); }
.room-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; align-items: start; }
.stage { display: grid; gap: 18px; min-width: 0; }
.stage:not(:has(> :not([hidden]))) { display: none; }
.room-layout:has(.stage:not(:has(> :not([hidden])))) { grid-template-columns: 1fr; }

.waiting-stage { display: grid; justify-items: start; gap: 12px; padding: clamp(22px, 4vw, 36px); border: 1px dashed var(--line-2); border-radius: 22px; background: radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), var(--surface); }
.waiting-stage .eyebrow { margin: 0; }
.invite-code { font: 800 clamp(2.6rem, 8vw, 4.4rem)/1 var(--mono); letter-spacing: .14em; color: var(--ink); user-select: all; }
.waiting-stage .actions { margin-top: 6px; }

/* 玩家列表 */
.roster { padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.roster-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-size: .95rem; font-weight: 800; }
.roster-title span { color: var(--muted); font: 600 .8rem var(--mono); }
.seats { display: grid; gap: 8px; }
.seats li {
  --pc: var(--dim);
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2);
  transition: border-color .25s, background-color .25s, box-shadow .25s;
}
.seats li[data-seat="1"] { --pc: var(--p1); } .seats li[data-seat="2"] { --pc: var(--p2); } .seats li[data-seat="3"] { --pc: var(--p3); }
.seats li[data-seat="4"] { --pc: var(--p4); } .seats li[data-seat="5"] { --pc: var(--p5); } .seats li[data-seat="6"] { --pc: var(--p6); }
.seats li.empty { --pc: var(--dim); border-style: dashed; background: transparent; }
.seats li.me { background: color-mix(in srgb, var(--pc) 9%, var(--bg-2)); }
.seats li.current-turn { border-color: var(--pc); box-shadow: 0 0 0 1px var(--pc), 0 0 24px -6px var(--pc); }
.seats li.current-turn::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pc); }
.seats li.gone { opacity: .6; }
.seat-person { grid-column: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.seat-person strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.seat-avatar, .mini-avatar { position: relative; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #111; font: 800 .8rem var(--mono); text-decoration: none; background: var(--pc, var(--raise)); }
.seat-avatar { width: 34px; height: 34px; box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 3.5px var(--pc); }
.empty .seat-avatar { background: transparent; color: var(--dim); box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: 1rem; }
.seat-avatar img, .mini-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--raise); }
.seat-detail { grid-column: 1; padding-left: 44px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.locked .seat-detail { color: var(--good); }
.locked .seat-detail::before { content: "✓ "; }
.current-turn .seat-detail { color: var(--pc); font-weight: 700; }
.seat-score { grid-column: 2; grid-row: 1 / span 2; font: 800 1.35rem/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.seat-exit { grid-column: 1 / -1; justify-self: start; margin: 4px 0 0 44px; padding: 2px 8px; border-radius: 6px; background: #ff8a5c1f; color: #ffc3a8; font-size: .75rem; }
.mini-avatar { width: 26px; height: 26px; font-size: .7rem; }
.mini-avatar[data-seat="1"] { --pc: var(--p1); } .mini-avatar[data-seat="2"] { --pc: var(--p2); } .mini-avatar[data-seat="3"] { --pc: var(--p3); }
.mini-avatar[data-seat="4"] { --pc: var(--p4); } .mini-avatar[data-seat="5"] { --pc: var(--p5); } .mini-avatar[data-seat="6"] { --pc: var(--p6); }
.mini-avatar img { box-shadow: 0 0 0 2px var(--pc); }

.room-actions { justify-content: flex-start; }

/* ---------- 四格电台 ---------- */
.radio-body {
  position: relative; display: grid; gap: 18px; padding: clamp(16px, 3vw, 26px);
  border-radius: 26px; background: linear-gradient(180deg, #2f2a22, #221e18);
  box-shadow: 0 14px 0 #110e0a, 0 40px 60px -30px #000, inset 0 1px #ffffff20, inset 0 0 0 1px #ffffff0c;
}
.radio-display { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 1px; overflow: hidden; border-radius: 12px; background: #000; box-shadow: inset 0 0 0 1px #000, 0 1px #ffffff14; }
.vfd-cell { display: grid; gap: 4px; padding: 12px 14px; background: radial-gradient(120% 140% at 50% 0%, #2a1c06, #110b03); color: var(--radio); font-family: var(--mono); text-shadow: 0 0 10px #ffb547b0; }
.vfd-cell small { font-size: .62rem; letter-spacing: .2em; opacity: .55; }
.vfd-cell b { font-size: clamp(1.05rem, 2.4vw, 1.5rem); font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.vfd-main b { font-size: clamp(1.5rem, 4vw, 2.3rem); }
.vfd-main { text-align: center; }
.vfd-cell:last-child { text-align: right; }
.dial { position: relative; height: 54px; border-radius: 10px; background: linear-gradient(180deg, #f3e6c8, #e4d3ad); box-shadow: inset 0 2px 6px #0006; overflow: hidden; --dial: 50%; }
.dial::before { content: ""; position: absolute; inset: 8px 14px auto; height: 16px; background: repeating-linear-gradient(90deg, #3d2f17 0 1px, transparent 1px 10px); opacity: .55; mask-image: linear-gradient(180deg, #000 40%, transparent); }
.dial-scale { position: absolute; inset: auto 14px 7px; display: flex; justify-content: space-between; color: #3d2f17; font: 700 .7rem var(--mono); }
.needle { position: absolute; top: 4px; bottom: 4px; left: var(--dial); width: 3px; border-radius: 2px; background: #e5432f; box-shadow: 0 0 8px #e5432f; translate: -50%; transition: left .7s var(--ease); }
.dial.scanning .needle { animation: scan 3.2s ease-in-out infinite alternate; }
@keyframes scan { from { left: 8%; } to { left: 92%; } }

.channels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.channels button {
  position: relative; display: grid; align-content: space-between; justify-items: start; gap: 6px;
  min-height: 132px; padding: 14px; text-align: left; border: 0; border-radius: 14px;
  background: linear-gradient(180deg, #4b4337, #3a342b); color: #f6ead2;
  box-shadow: 0 7px 0 #17130e, inset 0 1px #ffffff24;
  transition: transform .14s, box-shadow .14s, background-color .2s, opacity .2s;
}
.channels button:hover:not(:disabled) { background: linear-gradient(180deg, #574d3f, #443d32); }
.channels button:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 2px 0 #17130e, inset 0 1px #ffffff24; }
.channels button strong { font: 800 2.2rem/1 var(--mono); }
.channels .freq { color: #d9c9a6; font: 600 .75rem var(--mono); letter-spacing: .06em; opacity: .75; }
.channels small { min-height: 1.4em; padding: 2px 8px; border-radius: 6px; font-size: .75rem; font-weight: 800; }
.channels small:empty { padding: 0; }
.channels .bonus small { background: var(--radio); color: var(--radio-ink); }
.channels .bonus { box-shadow: 0 7px 0 #17130e, inset 0 1px #ffffff24, inset 0 0 0 2px #ffb54790; }
.channels .led { position: absolute; top: 14px; right: 14px; width: 9px; height: 9px; border-radius: 50%; background: #1a140c; box-shadow: inset 0 1px 2px #000; }
.channels button.selected { transform: translateY(5px); background: linear-gradient(180deg, var(--radio), #f09a20); color: var(--radio-ink); box-shadow: 0 2px 0 #17130e, 0 0 32px -6px var(--radio); opacity: 1; }
.channels button.selected .freq { color: var(--radio-ink); }
.channels button.selected small { background: var(--radio-ink); color: var(--radio); }
.channels button.selected .led { background: #fff6e0; box-shadow: 0 0 10px #fff, 0 0 18px var(--radio); }
.channels button:disabled:not(.selected) { opacity: .45; }
.channels button:focus-visible { outline-color: var(--radio); outline-offset: 4px; }

.spectrum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.band { position: relative; display: grid; grid-template-rows: auto 1fr auto auto; gap: 10px; min-height: 196px; padding: 14px; border-radius: 14px; background: #120d06; box-shadow: inset 0 0 0 1px #000, inset 0 0 30px #00000080; color: var(--radio); font-family: var(--mono); overflow: hidden; animation: pop .45s var(--ease) both; }
.band:nth-child(2) { animation-delay: .06s; } .band:nth-child(3) { animation-delay: .12s; } .band:nth-child(4) { animation-delay: .18s; }
.band-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.band-head strong { font-size: 1.5rem; }
.band-head span { font-size: .7rem; opacity: .6; }
.band-meter { align-self: end; height: calc(14px + 70px * var(--h)); border-radius: 4px; background: repeating-linear-gradient(0deg, currentColor 0 4px, transparent 4px 7px); opacity: .85; transform-origin: bottom; animation: rise .7s var(--ease) both .15s; }
.band-who { display: flex; flex-wrap: wrap; gap: 4px; min-height: 26px; }
.band-verdict { font: 800 .8rem var(--sans); letter-spacing: .02em; }
.band[data-state="empty"] { color: #5c4c33; }
.band[data-state="solo"] { color: var(--good); box-shadow: inset 0 0 0 1px #8ee05a50, inset 0 0 40px #8ee05a1a; }
.band[data-state="clash"] { color: var(--danger); box-shadow: inset 0 0 0 1px #ff5d5d60, inset 0 0 40px #ff5d5d1f; }
.band[data-state="clash"] .band-meter { animation: rise .7s var(--ease) both .15s, jitter .14s steps(2) 6 .85s; }
.band-you { position: absolute; top: 0; right: 0; padding: 3px 9px; border-bottom-left-radius: 8px; background: currentColor; }
.band-you::after { content: "你"; color: #120d06; font: 800 .7rem var(--sans); }
.band-timeout { grid-column: 1 / -1; color: #d9c9a6; font-size: .85rem; }
@keyframes rise { from { transform: scaleY(0); } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes jitter { 50% { transform: translateX(2px); } }

/* ---------- 多人扫雷 ---------- */
.mine-game { display: grid; gap: 16px; }
.mine-settings { padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.mine-settings .board-settings-title { margin-top: 22px; }
.mine-settings .size-picker { grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); }
.mine-settings .size-picker button { font-size: clamp(.95rem, 2.8vw, 1.6rem); }
.mine-settings .size-picker small { display: block; margin: 3px 0 0; }
.mine-settings button[aria-pressed="true"] { border-color: var(--mines); background: #5eead423; color: var(--mines); }
#mine-confirm { margin-top: 18px; }
.mine-dimensions { color: var(--mines); font: 650 .85rem var(--mono); }
.mine-rounds { display: flex; gap: 12px; align-items: center; margin-top: 20px; color: var(--muted); }
.mine-rounds select { border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); padding: 8px; font: inherit; }
.settings-q { margin-bottom: 18px; font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 900; }
.count-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.count-picker button { min-height: 86px; display: flex; align-items: center; justify-content: center; gap: 4px; border-radius: 16px; font: 800 2.2rem var(--mono); }
.count-picker small { align-self: flex-end; margin-bottom: 26px; font: 700 .85rem var(--sans); color: var(--muted); }
.count-picker button:hover:not(:disabled) { border-color: var(--mines); color: var(--mines); background: #5eead414; }

#mine-play { display: grid; gap: 14px; }
.mine-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.led-box { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 10px; background: #050807; box-shadow: inset 0 0 0 1px #000, 0 1px #ffffff12; }
.led-box small { color: var(--dim); font-size: .72rem; }
.led-box strong { color: var(--danger); font: 800 1.45rem/1 var(--mono); letter-spacing: .08em; text-shadow: 0 0 10px #ff5d5d90; }
.mine-last { flex: 1 1 200px; color: var(--muted); font-size: .88rem; }
.mine-last[data-kind="mine"] { color: #ffb3b3; }
.mine-last[data-kind="reveal"], .mine-last[data-kind="defuse"] { color: var(--ink-2); }
.mine-skip-notice { position: fixed; z-index: 10; top: max(16px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 12px 18px; border: 1px solid #5eead477; border-radius: 12px; background: #17332e; color: #cbfff5; font-weight: 700; box-shadow: 0 8px 30px #0008; pointer-events: none; }
.flag-toggle, .zoom-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; font-size: .88rem; }
.flag-glyph { width: 10px; height: 12px; border-left: 2px solid currentColor; position: relative; }
.flag-glyph::after { content: ""; position: absolute; left: 0; top: 0; width: 8px; height: 7px; background: var(--danger); clip-path: polygon(0 0, 100% 50%, 0 100%); }

.board-wrap { container-type: inline-size; padding: clamp(8px, 1.6vw, 14px); border-radius: 20px; background: #070b0a; box-shadow: inset 0 0 0 1px #5eead41f, 0 30px 60px -36px #000; }
.board-wrap.is-zoomed { max-height: min(74vh, 740px); overflow: auto; }
.mine-board { --gap: clamp(2px, .5vw, 5px); display: grid; grid-template-columns: repeat(var(--side, 10), minmax(0, 1fr)); gap: var(--gap); width: min(100%, 520px, 62vh); margin-inline: auto; }
.mine-board[data-large] { --gap: 1px; width: min(100%, 720px, 74vh); }
.board-wrap.is-zoomed .mine-board[data-large] { --gap: 2px; width: max(100%, calc(var(--side) * 28px)); }
.mine-board .cell {
  position: relative; min-width: 0; min-height: 0; aspect-ratio: 1; padding: 0; border: 0; border-radius: clamp(4px, .8vw, 8px);
  background: linear-gradient(180deg, #33433f, #26332f); color: var(--ink);
  box-shadow: inset 0 1px #ffffff1f, inset 0 -3px #0000004d;
  font: 800 clamp(.8rem, 2.6vw, 1.3rem)/1 var(--mono); font-variant-numeric: tabular-nums;
  cursor: default; transition: background-color .15s, transform .12s, box-shadow .15s;
}
.mine-board[data-large] .cell { border-radius: 2px; font-size: clamp(.25rem, calc(min(67cqw, 50vh) / var(--side)), 1.05rem); }
.board-wrap.is-zoomed .mine-board[data-large] .cell { border-radius: 4px; font-size: 1rem; }
.board-wrap:not(.is-zoomed) .mine-board[data-large] .cell.flag::after { border-left-width: 1px; }
.board-wrap:not(.is-zoomed) .mine-board[data-large] [data-value="-1"]::before { display: none; }
.mine-board .cell[aria-disabled="true"] { cursor: default; }
.mine-board.my-turn .cell:not(.open):not(.flag) { cursor: pointer; background: linear-gradient(180deg, #3a5c55, #2a4640); box-shadow: inset 0 1px #ffffff26, inset 0 -3px #0000004d, 0 0 0 1px #5eead433; }
.mine-board.my-turn .cell:not(.open):not(.flag):hover { background: linear-gradient(180deg, #4b7a70, #36594f); transform: translateY(-1px); }
.mine-board.my-turn .cell:not(.open):not(.flag):active { transform: translateY(1px); box-shadow: inset 0 1px 3px #0008; }
.mine-board.flag-mode .cell:not(.open) { cursor: crosshair; }
.mine-board.defuse-mode .cell:not(.open):not(.flag) { background: linear-gradient(180deg, #5a4f2c, #463c1f); box-shadow: inset 0 1px #ffffff26, 0 0 0 1px #ffd36a80; }
.mine-board.defuse-mode .cell:not(.open):not(.flag):hover { background: linear-gradient(180deg, #7a6a34, #5d4f26); }
.mine-board .cell.open { background: #0e1513; box-shadow: inset 0 0 0 1px #ffffff08; cursor: default; opacity: 1; }
.mine-board .cell:disabled { opacity: 1; cursor: default; }
.mine-board .cell.flag::after { content: ""; position: absolute; inset: 28% 32% 28% 38%; border-left: 2px solid #e5e5e5; }
.mine-board .cell.flag::before { content: ""; position: absolute; left: 38%; top: 28%; width: 30%; height: 26%; background: var(--danger); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.mine-board [data-value="1"] { color: #7cc4ff; }
.mine-board [data-value="2"] { color: #8ee05a; }
.mine-board [data-value="3"] { color: #ff8f7a; }
.mine-board [data-value="4"] { color: #c49bff; }
.mine-board [data-value="5"] { color: #ffb547; }
.mine-board [data-value="6"] { color: #5eead4; }
.mine-board [data-value="7"], .mine-board [data-value="8"] { color: #f1efe8; }
.mine-board [data-value="-1"] { background: radial-gradient(circle, #ff5d5d55, #3a1414 70%); box-shadow: inset 0 0 0 1px #ff5d5d70; }
.mine-board [data-value="-1"]::after { content: ""; position: absolute; inset: 26%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #555 0 12%, #111 40%); box-shadow: 0 0 0 2px #111, 0 0 12px #ff5d5d; }
.mine-board [data-value="-1"]::before { content: ""; position: absolute; inset: 18%; background: linear-gradient(#111, #111) center / 100% 2px no-repeat, linear-gradient(#111, #111) center / 2px 100% no-repeat; rotate: 45deg; }
.mine-board .cell.fresh { animation: flip .38s var(--ease) both; animation-delay: var(--delay, 0ms); }
.mine-board.shake { animation: shake .42s ease; }
@keyframes flip { from { transform: scale(.4) rotateX(70deg); opacity: 0; } }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

.mine-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.item-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.item-icon { width: 42px; height: 42px; border-radius: 12px; position: relative; }
.skip-icon { background: #8fa8ff22; box-shadow: inset 0 0 0 1px #8fa8ff55; }
.skip-icon::before { content: "⏭"; position: absolute; inset: 0; display: grid; place-items: center; color: #b8c7ff; font-size: 1.1rem; }
.defuse-icon { background: #ffd36a22; box-shadow: inset 0 0 0 1px #ffd36a55; }
.defuse-icon::before { content: "✂"; position: absolute; inset: 0; display: grid; place-items: center; color: #ffd36a; font-size: 1.15rem; }
.item-text { display: grid; gap: 2px; min-width: 0; }
.item-text strong { font-size: .95rem; }
.item-text > span { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.own { margin-left: 4px; padding: 1px 7px; border-radius: 6px; background: var(--raise); color: var(--ink-2); font: 700 .75rem var(--mono); }
.item-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.item-actions button { min-height: 38px; padding: 0 10px; font-size: .85rem; }
#use-defuse[aria-pressed="true"] { border-color: #ffd36a; background: #ffd36a26; color: #ffe7a8; }
.card-help { padding: 10px 14px; border-radius: 12px; background: #ffd36a14; color: #ffe7a8; font-size: .85rem; }

.landlord-table { display: grid; gap: 16px; padding: clamp(14px, 3vw, 26px); border: 1px solid var(--line-2); border-radius: 20px; background: radial-gradient(ellipse at top, #4b2630, #211820); }
.landlord-public { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 14px; }
.landlord-table h2 { font-size: .9rem; margin-bottom: 8px; }
.landlord-cards { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.landlord-card { display: inline-grid; place-content: center; min-width: 40px; height: 53px; border-radius: 8px; padding: 0 4px; background: #f5e6d7; color: #231923; border: 2px solid transparent; font: 800 .92rem var(--sans); }
.landlord-card.red { color: #932b42; }
button.landlord-card:hover:not(:disabled) { background: #fff6e9; color: #231923; }
button.landlord-card.selected { border-color: #ff8d9c; background: #ffd8db; transform: translateY(-3px); }
button.landlord-card:disabled { opacity: .8; }
.landlord-public .landlord-card { min-width: 29px; height: 39px; font-size: .75rem; }

/* ---------- 终局 ---------- */
.standings { padding: clamp(20px, 3.4vw, 30px); border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(80% 100% at 0% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%), var(--surface); }
.standings ol { display: grid; gap: 8px; }
.standings li { display: grid; grid-template-columns: 34px auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bg-2); animation: pop .45s var(--ease) both; }
.standings li:nth-child(2) { animation-delay: .07s; } .standings li:nth-child(3) { animation-delay: .14s; } .standings li:nth-child(n+4) { animation-delay: .2s; }
.standings li strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings .rank { color: var(--muted); font: 800 1.1rem var(--mono); text-align: center; }
.standings .pts { font: 800 1.1rem var(--mono); }
.standings .winner { background: color-mix(in srgb, var(--accent) 16%, var(--bg-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
.standings .winner .rank { color: var(--accent); font-size: 1.35rem; }
.standings .me strong { color: var(--accent); }

/* ---------- 页脚 ---------- */
footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 22px; padding: 17px 0 24px; border-top: 1px solid var(--line); color: #aeb7ca; font-size: .83rem; }
.footer-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 14px; }
.footer-label strong { color: #e9e5dc; font: 600 1rem/1.4 var(--lobby-ui); letter-spacing: .045em; }
.footer-top { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; border-radius: 5px; font: 600 .84rem/1.5 var(--lobby-ui); letter-spacing: .05em; text-decoration: none; }
.footer-top:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 扫雷对局台 ---------- */
.mine-clock-label { display: none; }
body[data-game="mines"] { background: #101521; }
.mine-room { gap: 18px; }
.mine-room .room-head { align-items: center; padding: clamp(18px, 3vw, 28px); border-radius: 20px; background: #1c3045; box-shadow: 0 16px 32px -20px #0009; }
.mine-room .room-heading { flex-basis: 320px; }
.mine-room h1 { font-size: clamp(1.85rem, 4.5vw, 3rem); }
.mine-room #room-label { color: #9ce2d5; letter-spacing: .025em; }
.mine-room .room-status { color: #ced9e9; }
.mine-room .room-clock { grid-template-columns: 1fr; flex: 0 0 auto; min-width: 124px; border: 0; background: #142235; color: #e7f5ff; }
.mine-room .room-clock span { text-align: left; }
.mine-room .mine-clock-label { display: block; color: #b9cadd; font-size: .74rem; }
body[data-game="mines"][data-phase="choosing"] .room-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 18px;
  padding: 12px clamp(12px, 2vw, 22px); border-radius: 12px;
  box-shadow: 0 9px 22px -10px #000c;
}
body[data-game="mines"][data-phase="choosing"] .room-head h1 {
  font-size: clamp(1.15rem, 2.4vw, 1.75rem); line-height: 1.2; overflow-wrap: anywhere;
}
body[data-game="mines"][data-phase="choosing"] #room-label { margin-bottom: 4px; font-size: .7rem; }
body[data-game="mines"][data-phase="choosing"] .room-status { margin-top: 3px; font-size: .84rem; line-height: 1.4; }
body[data-game="mines"][data-phase="choosing"] .room-clock { min-width: 0; grid-template-columns: 1fr; gap: 4px; padding: 8px 11px; }
body[data-game="mines"][data-phase="choosing"] .room-clock span { font-size: 1.25rem; }
body[data-game="mines"][data-phase="choosing"] .mine-board button { scroll-margin-top: 130px; }
.mine-room .room-layout { gap: 18px; }
.mine-room :is(.roster, .standings, .mine-settings, .waiting-stage, .item-card) {
  border: 0; background: #1a2435; box-shadow: 0 14px 28px -20px #000b;
}
.mine-room .seats li { border: 0; background: #131c2a; }
.mine-room .seats li.current-turn { background: #233c4c; box-shadow: none; }
.mine-room .seats li.current-turn::before { left: 0; }
.mine-room .seat-avatar, .mine-room .mini-avatar img { box-shadow: none; }
.mine-room .standings { padding: 18px; }
.mine-room .standings li { grid-template-columns: 19px auto minmax(0, 1fr) auto; gap: 7px; padding: 10px; background: #131c2a; font-size: .85rem; }
.mine-room .standings .winner { background: #264841; box-shadow: none; }
.mine-room .standings .pts { font-size: .92rem; }
.mine-room .standings .rank { font-size: .92rem; }
body[data-game="mines"][data-phase="finished"] .roster { display: none; }
body[data-game="mines"][data-phase="finished"] .stage { display: contents; }
body[data-game="mines"][data-phase="finished"] .standings { grid-column: 2; grid-row: 1; }

.mine-room #mine-play { gap: 0; }
.mine-room .mine-toolbar { display: grid; grid-template-columns: auto 1fr auto auto; gap: 9px 12px; padding: 12px 16px; border-radius: 18px 18px 0 0; background: #253447; }
.mine-room .led-box { display: flex; gap: 8px; min-width: 0; padding: 6px 10px; border: 0; border-radius: 7px; background: #192638; box-shadow: none; }
.mine-room .led-box small { color: #bfccdb; }
.mine-room .led-box strong { color: #ffc17a; text-shadow: none; font-size: 1.18rem; }
.mine-room .mine-dimensions { color: #beccdc; }
.mine-room .mine-last { grid-column: 1 / -1; grid-row: 2; color: #d4dce9; }
.mine-room .mine-last[data-kind="mine"] { color: #ffc3b1; }
.mine-mode { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; }
.mine-mode-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: #192638; }
.mine-mode-buttons button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding-inline: 14px; border: 0; border-radius: 8px; background: transparent; color: #c8d6e7; touch-action: manipulation; }
.mine-mode-buttons button[aria-pressed="true"] { background: #e8eefa; color: #192638; }
.mine-mode-buttons .flag-toggle[aria-pressed="true"] { background: #ffd3a5; color: #492714; }
#mine-mode-hint { color: #c8d6e7; }
.mine-room .board-wrap { border-radius: 0 0 18px 18px; background: #142032; box-shadow: 0 15px 30px -19px #000a; padding: clamp(10px, 2vw, 20px); }
.mine-room .mine-board:not([data-large]) { width: min(100%, 490px); }
.mine-room .mine-board .cell { background: #c2b9ab; box-shadow: inset 0 -3px #5d554b80; }
.mine-room .mine-board.my-turn .cell:not(.open):not(.flag) { background: #eadcc5; box-shadow: inset 0 -3px #6d523980; }
.mine-room .mine-board.my-turn .cell:not(.open):not(.flag):hover { background: #fff0d5; }
.mine-room .mine-board .cell.open { background: #263447; box-shadow: none; }
.mine-room .mine-board .cell.open[data-value="0"] { background: #1e2b3d; }
.mine-room .mine-board .cell.opponent-target { outline: 3px solid #ffd06f; outline-offset: -3px; }
.mine-room .board-wrap:not(.is-zoomed) .mine-board[data-large] .cell.opponent-target { outline-width: 1px; outline-offset: -1px; }
.mine-room .mine-board .cell.flag { background: #ffd3a5; }
.mine-room .mine-board .cell.flag::after { border-color: #422a28; inset: 25% 29% 23% 30%; }
.mine-room .mine-board .cell.flag::before { left: 30%; top: 25%; width: 45%; height: 37%; background: #a63526; }
.mine-room .mine-board .cell.open[data-value="-1"] { background: #e9ac97; }
.mine-room .mine-board [data-value="-1"]::after { background: #382933; box-shadow: none; }
.mine-room .mine-board [data-value="-1"]::before { background: linear-gradient(#382933, #382933) center / 100% 2px no-repeat, linear-gradient(#382933, #382933) center / 2px 100% no-repeat; }
.mine-room .mine-board [data-value="1"] { color: #a3d5ff; }
.mine-room .mine-board [data-value="2"] { color: #b6ed9b; }
.mine-room .mine-board [data-value="3"] { color: #ffb3a4; }
.mine-room .mine-board [data-value="4"] { color: #dac5ff; }
.mine-room .mine-board [data-value="5"] { color: #ffcf95; }
.mine-room .mine-board [data-value="6"] { color: #9be9e7; }
.mine-room .mine-board :is([data-value="7"], [data-value="8"]) { color: #f1efe8; }
.mine-room .mine-board.defuse-mode .cell:not(.open):not(.flag) { background: #e9bf65; }
.mine-room .mine-board.defuse-mode .cell:not(.open):not(.flag):hover { background: #ffdc8f; }
.mine-room .board-wrap:not(.is-zoomed) .mine-board[data-large] .cell:not(.open) { box-shadow: inset 0 -1px #6d523980; }
.mine-room :is(.mine-cards, .card-help) { margin-top: 12px; }
.mine-room .primary { box-shadow: none; }
@media (max-width: 900px) {
  body[data-game="mines"][data-phase="finished"] .standings { grid-column: 1; }
}
@media (max-width: 520px) {
  .mine-room .room-head { gap: 12px; }
  .mine-room .room-clock { grid-template-columns: auto auto 1fr; flex: 1 1 100%; align-items: center; }
  .mine-room .mine-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: start; }
  .mine-room .mine-last { grid-row: auto; grid-column: 1 / -1; order: 1; }
  .mine-mode { display: grid; width: 100%; order: 2; }
  .mine-mode-buttons { width: 100%; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .room-layout { grid-template-columns: 1fr; }
  .roster { order: -1; padding: 14px; }
  .seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mine-room .seats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site-header, footer, main { width: calc(100% - 32px); }
  .site-header { padding: 14px 0; }
  main { padding: 12px 0 40px; align-content: start; }
  .games { grid-template-columns: 1fr; }
  .card-art { height: 170px; }
  .channels, .spectrum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channels button { min-height: 104px; }
  .band { min-height: 160px; }
  .mine-room .seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .count-picker { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .count-picker button { min-height: 68px; font-size: 1.7rem; padding: 0; flex-direction: column; gap: 0; }
  .count-picker small { align-self: center; margin: 0; }
  .room-clock { min-width: 0; flex: 1 1 100%; grid-template-columns: auto 1fr; align-items: center; padding: 10px 14px; }
  .room-clock span { font-size: 1.3rem; text-align: left; }
  .steps { grid-template-columns: 1fr; }
  .profile-game-stats { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .mine-cards { grid-template-columns: 1fr; }
  .radio-display { grid-template-columns: 1fr 1fr; }
  .vfd-main { grid-column: 1 / -1; grid-row: 1; }
  .vfd-cell:last-child { text-align: left; }
  .seats li { padding: 8px 10px; }
  .seat-avatar { width: 28px; height: 28px; }
  .seat-detail { padding-left: 38px; font-size: .75rem; }
  .seat-exit { margin-left: 38px; }
  .seat-score { font-size: 1.1rem; }
  .mine-board .cell { border-radius: 4px; }
}
@media (max-width: 380px) {
  .brand-name { font-size: 1.16rem; }
  .brand-mark { width: 34px; height: 34px; padding: 6px; }
  .account.account-trigger { gap: 6px; padding-inline: 9px; }
  .verified #account-status { max-width: 9ch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
