/* 大逃杀 — game client */

body {
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(86, 58, 150, .22), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(216, 181, 106, .08), transparent 60%),
    repeating-linear-gradient(135deg, rgba(216, 181, 106, .022) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(45deg, rgba(216, 181, 106, .022) 0 1px, transparent 1px 22px),
    var(--bg);
  background-attachment: fixed;
}
#app { min-height: 100dvh; }
.grow { flex: 1; }
.only-mobile { display: none !important; }

/* ───────── boot ───────── */
.boot { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; }
.boot-star { width: 84px; height: 84px; animation: starPulse 2.2s ease-in-out infinite; filter: drop-shadow(0 0 28px rgba(216, 181, 106, .45)); }
.boot-name { font-family: var(--display); letter-spacing: .34em; font-size: 15px; color: var(--gold); padding-left: .34em; }
@keyframes starPulse { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.07) rotate(45deg); } }

/* ───────── logo / avatars ───────── */
.logo { display: flex; align-items: center; gap: 10px; }
.logo-star { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(216, 181, 106, .35)); }
.logo-word { font-family: var(--display); font-weight: 700; letter-spacing: .2em; font-size: 17px; white-space: nowrap; }
.logo-word em { font-style: normal; font-weight: 400; color: var(--ivory); margin-left: .45em; }
.logo.big { flex-direction: column; gap: 14px; }
.logo.big .logo-star { width: 76px; height: 76px; }
.logo.big .logo-word { font-size: 30px; letter-spacing: .26em; padding-left: .26em; }
.logo.big .logo-word { text-align: center; }
.logo.big .logo-word em { display: block; margin: 6px 0 0; font-size: 13px; letter-spacing: .42em; color: var(--muted); }

.av {
  --s: 44px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: inline-grid; place-items: center; overflow: hidden; position: relative;
  background: linear-gradient(140deg, hsl(var(--h) 45% 38%), hsl(calc(var(--h) + 40) 50% 18%));
  box-shadow: 0 0 0 1.5px rgba(216, 181, 106, .55), 0 3px 10px rgba(0, 0, 0, .5);
}
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-i { font-family: var(--display); font-weight: 700; font-size: calc(var(--s) * .36); color: #fff; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.av.av-bot { background: radial-gradient(circle at 50% 35%, #223463, #0a1126); }
.av.av-bot .av-i { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.av.xs { --s: 28px; } .av.sm { --s: 30px; } .av.xl { --s: 92px; }
.avs { display: flex; align-items: center; }
.avs .av { margin-left: -9px; } .avs .av:first-child { margin-left: 0; }
.avs-more { margin-left: 6px; font-size: 12px; color: var(--muted); }

/* ───────── auth ───────── */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-art {
  position: relative; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 55%, var(--felt-hi), var(--felt) 45%, var(--felt-lo) 85%);
  border-right: 1px solid var(--line-strong);
}
.auth-art::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 16px), repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 16px); }
.auth-art::after { content: ""; position: absolute; inset: 22px; border: 1px solid rgba(216, 181, 106, .35); border-radius: 18px; pointer-events: none; }
.auth-glow { position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(247, 230, 173, .22), transparent 65%); filter: blur(10px); }
.auth-fan { position: relative; width: min(60%, 420px); aspect-ratio: 1.5; z-index: 1; }
.auth-side { display: grid; place-items: center; padding: 28px 20px; }
.auth-box { width: min(400px, 100%); display: grid; gap: 18px; }
.auth-tag { text-align: center; color: var(--muted); margin: 0; }
.auth-tag b { color: var(--gold-hi); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: #0a0e14; border: 1px solid var(--line); }
.auth-tabs button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 600; }
.auth-tabs button.on { background: rgba(216, 181, 106, .16); color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--line-strong); }
.auth-form { display: grid; gap: 14px; }
.auth-bonus { margin: 0; text-align: center; font-size: 14px; color: var(--text); }
.auth-bonus b { color: var(--gold-hi); }
.auth-fine { margin: 0; text-align: center; font-size: 12px; color: var(--faint); }

/* ───────── top bar ───────── */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 20px;
  background: rgba(7, 9, 13, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.balance { display: flex; align-items: center; height: 40px; padding: 0 14px 0 10px; border-radius: 999px; background: linear-gradient(180deg, #1a1608, #0f0d07); border: 1px solid var(--line-strong); font-size: 15px; }
.balance .star { width: 22px; height: 22px; }
.me-btn { display: flex; align-items: center; gap: 9px; padding: 3px 12px 3px 3px; border-radius: 999px; background: transparent; border: 1px solid transparent; }
.me-btn:hover { border-color: var(--line-strong); background: rgba(216, 181, 106, .06); }
.me-btn .av { --s: 38px; }
.me-name { font-weight: 600; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────── lobby ───────── */
.lobby-body { max-width: 1440px; margin: 0 auto; padding: 22px 20px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.lobby-main { display: grid; gap: 20px; min-width: 0; }
.hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px;
  padding: 30px 34px; border-radius: 22px; border: 1px solid var(--line-strong);
  background:
    radial-gradient(520px 300px at 88% 50%, rgba(86, 58, 150, .55), transparent 70%),
    linear-gradient(120deg, #131925 0%, #0b1017 55%, #1a0f36 100%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.hero::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(216, 181, 106, .14); border-radius: 16px; pointer-events: none; }
.hero-kicker { font-family: var(--display); letter-spacing: .22em; text-transform: uppercase; font-size: 13px; color: var(--muted); }
.hero-name { font-family: var(--serif); font-weight: 700; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; margin: 2px 0 8px; overflow-wrap: anywhere; }
.hero-sub { margin: 0 0 20px; color: var(--muted); }
.hero-sub .dot { margin-right: 9px; vertical-align: 1px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(69, 192, 140, .18); display: inline-block; flex: none; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }

.resume { display: grid; gap: 8px; }
.resume-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--gold); background: linear-gradient(90deg, rgba(216, 181, 106, .16), rgba(216, 181, 106, .04)); }

.tabs { display: flex; gap: 8px; padding: 5px; border-radius: 999px; background: rgba(10, 14, 20, .8); border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.tabs button { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font-weight: 600; white-space: nowrap; position: relative; }
.tabs button i { font-style: normal; font-size: 12px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: rgba(255, 255, 255, .07); color: var(--muted); }
.tabs button.on { background: rgba(216, 181, 106, .15); color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tabs button.on i { background: rgba(216, 181, 106, .25); color: var(--gold-hi); }
.badge { background: var(--crimson) !important; color: #fff !important; }

.list { display: grid; gap: 12px; }
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 4px; flex-wrap: wrap; }
.list-head h2 { font-size: 20px; color: var(--ivory); }
.list-head p { margin: 4px 0 0; font-size: 14px; max-width: 60ch; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

.row {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto auto; align-items: center; gap: 16px; padding: 12px 16px 12px 12px;
  border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(22, 28, 39, .9), rgba(15, 19, 27, .9)); transition: border-color .15s, transform .15s;
}
.row:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.row.house { border-color: rgba(216, 181, 106, .3); }
.row-felt {
  width: 76px; height: 52px; border-radius: 50%; display: grid; place-content: center; text-align: center; line-height: 1.05;
  background: radial-gradient(ellipse at 50% 40%, var(--felt-hi), var(--felt-lo)); box-shadow: 0 0 0 3px #2a1b0e, 0 0 0 4px rgba(216, 181, 106, .6), 0 6px 14px rgba(0, 0, 0, .5);
}
.row-felt b { font-size: 13px; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.row-felt small { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.row-main h3 { font-size: 16px; color: var(--ivory); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-main p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.row-main .star { width: 1em; height: 1em; }
.row-seats { text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 48px; }
.row-seats b { color: var(--ivory); font-size: 17px; }
.row-seats small { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.row-act { display: flex; gap: 8px; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 0; }
.facts.three { grid-template-columns: repeat(3, 1fr); }
.facts dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin: 1px 0 0; font-weight: 600; color: var(--text); font-size: 14px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; color: var(--gold-hi); font-weight: 700; }

.lobby-chat { position: sticky; top: 86px; height: calc(100dvh - 108px); display: flex; flex-direction: column; overflow: hidden; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.side-head h2 { font-size: 14px; color: var(--gold-hi); }
.online { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

/* ───────── chat ───────── */
.chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-list { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; overscroll-behavior: contain; }
.chat-empty { margin: auto; color: var(--faint); font-size: 14px; text-align: center; padding: 20px; }
.chat-msg { display: flex; gap: 8px; align-items: flex-start; animation: fade .2s; }
.chat-bubble { background: rgba(255, 255, 255, .05); border-radius: 4px 14px 14px 14px; padding: 6px 11px 7px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.chat-bubble b { display: block; font-size: 12px; color: var(--gold); font-weight: 600; }
.chat-msg.mine .chat-bubble { background: rgba(216, 181, 106, .13); }
.chat-sys { font-size: 12.5px; color: var(--muted); text-align: center; padding: 2px 8px; }
.chat-sys.win { color: var(--gold-hi); } .chat-sys.gift { color: #f3a6b6; } .chat-sys.info { color: #9fc4ff; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom) * .3); border-top: 1px solid var(--line); }
.chat-form .input { min-height: 42px; border-radius: 999px; }


/* ───────── lobby extras ───────── */
.hero-pitch { margin: -8px 0 20px; max-width: 54ch; color: var(--text); }
.hero-art { position: relative; width: 236px; height: 180px; margin-right: 6px; display: flex; align-items: flex-end; justify-content: center; gap: 12px; }
.hero-door { position: relative; flex: none; width: 66px; height: 132px; border-radius: 40px 40px 6px 6px; border: 2px solid var(--gold); background: linear-gradient(180deg, #33215f, #0d0819); box-shadow: 0 16px 34px rgba(0, 0, 0, .6), inset 0 0 0 5px rgba(0, 0, 0, .35); }
.hero-door i { position: absolute; right: 12px; top: 56%; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-grad); }
.hero-door.d2 { height: 156px; background: linear-gradient(180deg, #7a1428, #1a060c); border-color: #ff9c8f; box-shadow: 0 0 40px rgba(194, 32, 61, .5), inset 0 0 0 5px rgba(0, 0, 0, .35); }
.hero-door .killer { position: absolute; left: 50%; top: 40%; width: 54px; height: 54px; transform: translate(-50%, -50%); }
.arena-row { grid-template-columns: 76px minmax(0, 1fr) auto auto; }
.last { display: flex; gap: 5px; align-items: center; }
.last i, .history-list i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--sans); font-style: normal; font-variant-numeric: tabular-nums; color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.last i.new, .history-list i.new { background: var(--crimson); border-color: #ff9c8f; color: #fff; }
.fine { margin: 6px 2px 0; font-size: 12.5px; color: var(--faint); }
.auth-fan .door-card { position: absolute; left: 32%; bottom: 0; width: 36%; aspect-ratio: 100 / 140; border-radius: 9% / 6.4%; display: grid; place-items: center; background: linear-gradient(160deg, #33215f, #0d0819); border: 1px solid var(--gold); transform-origin: 50% 175%; transform: rotate(calc(var(--i) * 12deg)); box-shadow: 0 16px 40px rgba(0, 0, 0, .55); }
.auth-fan .door-card svg { width: 62%; }

/* ───────── arena screen ───────── */
.tbl { height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: radial-gradient(ellipse 80% 70% at 50% 40%, rgba(86, 58, 150, .2), transparent 70%); }
.tbl-top { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px; border-bottom: 1px solid var(--line); background: rgba(7, 9, 13, .7); backdrop-filter: blur(10px); z-index: 20; }
.tbl-title { min-width: 0; }
.tbl-title h1 { font-family: var(--display); font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-title p { margin: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-top .balance { height: 34px; font-size: 14px; }
.chat-toggle { position: relative; }
.chat-toggle .badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 9px; font: 700 11px/18px var(--sans); text-align: center; padding: 0 4px; font-style: normal; }
.tbl-main { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 0; }
.tbl-side { margin: 10px 10px 10px 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.info { padding: 10px 14px; display: grid; gap: 6px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); }
.info-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.winners { display: grid; gap: 5px; padding-top: 8px; margin-top: 2px; border-top: 1px dashed var(--line); }
.winners small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.winner { display: flex; align-items: center; gap: 8px; }
.winner span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.winner b { color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.winner .av.xs { --s: 22px; }

.stage { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 10px; padding: 12px 14px; min-width: 0; min-height: 0; width: 100%; max-width: 1180px; margin: 0 auto; }
.status { position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 11px 16px 14px; border-radius: 16px; border: 1px solid var(--line-strong); background: linear-gradient(120deg, #151b28, #0d1118 60%, #1a0f36); }
.clock { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--gold); background: radial-gradient(circle at 50% 35%, #33215f, #0d0819); box-shadow: 0 0 22px rgba(216, 181, 106, .25); }
.clock b { font: 700 26px/1 var(--serif); color: var(--gold-hi); }
.clock .killer { width: 42px; height: 42px; }
.status.low .clock { border-color: var(--danger); box-shadow: 0 0 24px rgba(224, 87, 79, .5); }
.status.low .clock b { color: #ffb3ad; }
.status.ph-hunt .clock, .status.ph-result .clock { border-color: var(--crimson); box-shadow: 0 0 24px rgba(194, 32, 61, .55); }
.status.ph-hunt .clock { animation: throb .7s ease-in-out infinite; }
.status-text { min-width: 0; }
.status-text h2 { font-family: var(--serif); font-size: clamp(16px, 2.2vw, 24px); line-height: 1.2; color: var(--ivory); }
.status-text p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.status.ph-result .status-text h2 { color: #ffb3ad; }
.pool { display: grid; justify-items: end; line-height: 1.25; white-space: nowrap; }
.pool small { font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.pool .stars { font: 700 22px/1.2 var(--serif); }
.status-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .06); }
.status-bar i { display: block; height: 100%; background: var(--gold-grad); transition: width .2s linear; }
.status.low .status-bar i, .status.ph-hunt .status-bar i { background: linear-gradient(90deg, #ff8a5c, #ff4d4d); }
@keyframes throb { 50% { transform: scale(1.08); } }

.history { display: flex; align-items: center; gap: 10px; min-width: 0; }
.history-label { flex: none; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.history-list { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.history-list::-webkit-scrollbar { display: none; }
.history-list i.miss, .history-list i.void { border-style: dashed; color: var(--muted); }

.manor { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px; min-height: 0; }
.room {
  position: relative; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) auto auto auto; justify-items: center; align-items: center; gap: 3px;
  padding: 12px 8px 10px; min-height: 0; border-radius: 16px; border: 1px solid var(--line); color: var(--text); text-align: center; cursor: default;
  background: linear-gradient(180deg, rgba(51, 33, 95, .55), rgba(13, 9, 26, .92));
  transition: transform .12s, border-color .15s, box-shadow .2s, filter .3s, background .2s;
}
.room.open { cursor: pointer; }
.room.open:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .5), 0 0 0 1px rgba(216, 181, 106, .3); }
.room.open:active { transform: scale(.98); }
.room:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.room-no { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--sans); background: rgba(0, 0, 0, .45); border: 1px solid var(--line-strong); color: var(--gold-hi); }
.room-icon { height: min(100%, 68px); width: auto; aspect-ratio: 1; min-height: 0; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.room-name { font-family: var(--serif); font-size: clamp(14px, 1.5vw, 18px); line-height: 1.2; color: var(--ivory); }
.room-total .stars { font-size: clamp(14px, 1.5vw, 18px); }
.room-people { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 24px; color: var(--muted); font-size: 12px; }
.room-people .av.xs { --s: 22px; }
.room-people .avs .av { margin-left: -7px; } .room-people .avs .av:first-child { margin-left: 0; }
.room-mine { position: absolute; top: 8px; right: 8px; padding: 3px 8px; border-radius: 999px; font: 700 11.5px/1.2 var(--sans); background: var(--gold-grad); color: #2a1d05; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.room.mine { border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(216, 181, 106, .35), 0 0 22px rgba(216, 181, 106, .14); }
.manor.ph-hunt .room:not(.prowl) { filter: brightness(.7); }
.room.prowl { border-color: var(--crimson); background: linear-gradient(180deg, rgba(120, 20, 40, .62), rgba(26, 6, 12, .95)); box-shadow: 0 0 0 2px rgba(194, 32, 61, .7), 0 0 34px rgba(194, 32, 61, .55); }
.room.killed { border-color: #ff5a4d; background: linear-gradient(180deg, rgba(150, 22, 40, .78), rgba(30, 6, 10, .96)); box-shadow: 0 0 0 2px #ff5a4d, 0 0 44px rgba(255, 70, 60, .6); }
.room.prowl .room-icon, .room.killed .room-icon { opacity: .12; }
.room.safe { border-color: rgba(69, 192, 140, .45); }
.room.safe.mine { border-color: var(--gold-hi); box-shadow: 0 0 0 2px var(--gold-hi), 0 0 30px rgba(247, 230, 173, .4); }
.room-killer { position: absolute; left: 50%; top: 8%; height: 46%; width: auto; aspect-ratio: 1; transform: translateX(-50%); filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .8)); pointer-events: none; }
.room.killed .room-killer { animation: pounce .45s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes pounce { from { transform: translateX(-50%) scale(1.7); } }
.room-fx { position: absolute; left: 50%; top: 34%; font: 700 15px/1 var(--sans); font-style: normal; color: var(--gold-hi); text-shadow: 0 1px 4px #000; pointer-events: none; animation: floatUp 1.15s ease-out forwards; }
@keyframes floatUp { from { opacity: 1; transform: translate(-50%, 8px); } to { opacity: 0; transform: translate(-50%, -34px); } }

.betbar { position: relative; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(12, 16, 23, .92), #080a0f); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); z-index: 22; }
.betbar.open { border-top-color: var(--gold); box-shadow: 0 -14px 40px rgba(216, 181, 106, .1); }
.betbar-in { max-width: 1180px; margin: 0 auto; min-height: 68px; display: flex; align-items: center; gap: 16px; }
.chips { display: flex; gap: 10px; flex: none; }
.chip { width: 62px; height: 62px; border-radius: 50%; display: grid; place-content: center; justify-items: center; gap: 1px; border: 2px dashed rgba(216, 181, 106, .5); background: radial-gradient(circle at 50% 35%, #33215f, #0d0819); color: var(--gold-hi); transition: transform .12s, box-shadow .15s; }
.chip b { font-size: 14px; font-variant-numeric: tabular-nums; } .chip .star { width: 16px; height: 16px; }
.chip.on { border-style: solid; border-color: #fff3c4; background: var(--gold-grad); color: #2a1d05; transform: translateY(-4px); box-shadow: 0 8px 22px rgba(216, 181, 106, .4); }
.chip[disabled] { opacity: .35; cursor: not-allowed; }
.bet-note { display: grid; gap: 2px; min-width: 0; }
.bet-note b { color: var(--ivory); font-size: 15px; } .bet-note span { color: var(--muted); font-size: 12.5px; }
.wait { flex: 1; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 14.5px; text-align: center; }
.outcome { flex: 1; display: grid; gap: 3px; text-align: center; }
.outcome-me { font: 700 clamp(18px, 2.4vw, 24px)/1.2 var(--serif); color: var(--ivory); }
.outcome.win .outcome-me { color: var(--gold-hi); text-shadow: 0 0 22px rgba(247, 230, 173, .5); }
.outcome.lose .outcome-me { color: #ffb3ad; }
.outcome-sub { color: var(--muted); font-size: 13px; }

/* rules & fairness */
.rules { font-size: 14.5px; } .rules p { margin: 0; } .rules ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; } .rules b { color: var(--gold-hi); }
.fair-now { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(216, 181, 106, .06); }
.fair-now small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fair-list { display: grid; gap: 6px; }
.fair-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .035); font-size: 14px; }
.fair-row code { grid-column: 1 / -1; }
.fair-now code, .fair-row code { font: 500 11.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); overflow-wrap: anywhere; }


/* menu */
.menu-back { position: fixed; inset: 0; z-index: 70; }
.menu { position: absolute; top: 54px; right: 10px; min-width: 240px; display: grid; padding: 6px; border-radius: 16px; background: #141a25; border: 1px solid var(--line-strong); box-shadow: var(--shadow); animation: rise .16s; }
.menu button { text-align: left; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-weight: 500; }
.menu button:hover { background: rgba(216, 181, 106, .12); color: var(--gold-hi); }
.menu button.danger { color: #ffb3ad; }

/* modal bits */
.profile-top { display: flex; align-items: center; gap: 18px; }
.avatar-edit { display: grid; justify-items: center; gap: 6px; border: 0; background: none; color: var(--gold); font-size: 12.5px; font-weight: 600; padding: 0; }
.avatar-edit:hover .av { box-shadow: 0 0 0 2px var(--gold-hi), 0 0 24px rgba(216, 181, 106, .5); }
.profile-name { font-family: var(--serif); font-size: 24px; color: var(--ivory); overflow-wrap: anywhere; }
.profile-top p { margin: 2px 0; } .profile-bal .stars { font-size: 20px; }
.confirm-text { margin: 0; color: var(--text); }


/* ───────── responsive ───────── */
@media (max-width: 1179px) {
  .tbl-main { grid-template-columns: minmax(0, 1fr); }
  .tbl-side { display: none; position: fixed; z-index: 60; right: 10px; top: 64px; bottom: 10px; width: min(360px, calc(100% - 20px)); margin: 0; box-shadow: var(--shadow); background: linear-gradient(180deg, #171d29, #0e131b); }
  .tbl.chat-open .tbl-side { display: flex; animation: rise .2s; }
}
@media (min-width: 1180px) { .chat-toggle { display: none; } }

@media (max-width: 1023px) {
  .lobby-body { grid-template-columns: minmax(0, 1fr); padding: 14px 12px calc(96px + env(safe-area-inset-bottom)); }
  .lobby-chat { display: none; position: static; height: calc(100dvh - 64px - 78px - env(safe-area-inset-bottom)); }
  .lobby.tab-chat .lobby-chat { display: flex; }
  .lobby.tab-chat .hero, .lobby.tab-chat .resume, .lobby.tab-chat .tab-body { display: none; }
  .lobby.tab-chat .lobby-body { padding-top: 10px; gap: 0; }
  .lobby.tab-chat .lobby-main { display: block; }
  .only-mobile { display: flex !important; }
  .tabs { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; width: auto; border-radius: 0; border: 0; border-top: 1px solid var(--line-strong); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 2px; background: rgba(8, 10, 15, .96); backdrop-filter: blur(12px); display: grid; grid-template-columns: repeat(3, 1fr); }
  .tabs button { flex-direction: column; gap: 3px; min-height: 54px; padding: 4px 2px; font-size: 12.5px; border-radius: 12px; justify-content: center; }
  .tabs button i { position: absolute; top: 3px; left: calc(50% + 14px); font-size: 10px; min-width: 16px; height: 16px; padding: 0 4px; }
  .hero { grid-template-columns: 1fr; padding: 22px 20px; }
  .hero-art { display: none; }
  .hero-cta .btn { flex: 1 1 140px; }
  .hero-cta .btn.lg { padding: 0 14px; font-size: 15px; }
  .ver { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .tbl ~ .ver { display: none; }
}
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: 200px auto; }
  .auth-art { border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .auth-art::after { inset: 10px; }
  .auth-fan { width: 210px; }
  .auth-side { place-items: start center; padding-top: 22px; }
  .logo.big .logo-star { width: 54px; height: 54px; } .logo.big .logo-word { font-size: 24px; }
  .topbar { padding: 0 12px; height: 58px; gap: 8px; }
  .topbar .logo-word em { display: none; }
  .topbar .logo-word { font-size: 15px; letter-spacing: .12em; }
  .me-name { display: none; } .me-btn { padding: 3px; }
  .row.arena-row { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 10px 12px; padding: 12px; }
  .row-felt { width: 60px; height: 42px; } .row-felt b { font-size: 11.5px; }
  .arena-row .last { grid-column: 1 / 3; grid-row: 2; }
  .arena-row .row-act { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .row-main p { font-size: 12.5px; }
  .modal { padding: 18px; border-radius: 18px; }
  .modal-back { align-items: end; padding: 0; }
  .modal-back .modal { width: 100%; border-radius: 22px 22px 0 0; max-height: 92dvh; padding-bottom: calc(18px + env(safe-area-inset-bottom)); animation: sheet .25s cubic-bezier(.2, .9, .3, 1); }
  .tbl-top { padding: 0 8px; gap: 6px; height: 52px; }
  .only-wide { display: none !important; }
  .back { padding: 0 10px; }
  .stage { padding: 8px; gap: 7px; }
  .status { gap: 10px; padding: 8px 10px 11px; border-radius: 14px; }
  .clock { width: 44px; height: 44px; } .clock b { font-size: 21px; } .clock .killer { width: 32px; height: 32px; }
  .status-text p { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pool .stars { font-size: 17px; } .pool small { font-size: 10px; }
  .history { gap: 7px; } .history-label { display: none; }
  .last i, .history-list i { width: 22px; height: 22px; font-size: 11.5px; }
  .manor { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 7px; }
  .room { padding: 7px 6px 6px; gap: 1px; border-radius: 13px; }
  .room-no { top: 6px; left: 6px; width: 21px; height: 21px; font-size: 11px; }
  .room-mine { top: 6px; right: 6px; font-size: 11px; padding: 2px 7px; }
  .room-icon { height: min(100%, 40px); }
  .room-people { min-height: 20px; font-size: 11px; } .room-people .av.xs { --s: 18px; }
  .betbar { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
  .betbar-in { gap: 10px; min-height: 60px; }
  .chips { gap: 7px; } .chip { width: 52px; height: 52px; } .chip b { font-size: 12.5px; } .chip .star { width: 13px; height: 13px; }
  .bet-note b { font-size: 13px; } .bet-note span { font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .outcome-sub { font-size: 12px; }
}
@keyframes sheet { from { transform: translateY(40%); opacity: 0; } }
@media (max-height: 560px) and (min-width: 761px) {
  .tbl-top { height: 46px; } .stage { padding: 6px 12px; gap: 6px; }
  .status { padding: 6px 12px 9px; } .clock { width: 40px; height: 40px; } .clock b { font-size: 19px; } .clock .killer { width: 30px; height: 30px; }
  .room { padding: 6px; } .room-icon { display: none; }
  .betbar { padding-top: 6px; padding-bottom: 6px; } .betbar-in { min-height: 52px; } .chip { width: 48px; height: 48px; }
}

/* language switch */
.lang { display: inline-flex; padding: 3px; border-radius: 999px; background: #0a0e14; border: 1px solid var(--line); flex: none; }
.lang button { min-height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.lang button.on { background: rgba(216, 181, 106, .18); color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--line-strong); }
.auth-side { position: relative; }
.lang.corner { position: absolute; top: 16px; right: 16px; }
@media (max-width: 760px) { .topbar .lang button { padding: 0 8px; font-size: 12px; } }
