@import url("../assets/fonts/fonts.css");
/* FLOOR 20: one look for every menu. A 1920s grand hotel: walnut and lacquer surfaces, brass for "do this",
   cream type, oxblood velvet, team colours only for teams. Display type is Limelight, labels are Josefin Sans caps.
   Sizes are thumb-first (48 px targets, 16 px+ text) so the old iPad reads and taps everything.
   Order: tokens, base, controls, top bar, the elevator (home), locker, lobby, overlays, results, small screens. */
:root {
  --font-body: 'Barlow', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Limelight', 'Josefin Sans', Georgia, serif;
  --font-deco: 'Josefin Sans', 'Barlow', system-ui, sans-serif;
  --bg: #140d09;
  --surface: #1f150f;
  --raised: #2a1c14;
  --raised-2: #36251a;
  --hover: #463022;
  --line: rgba(226, 184, 92, 0.16);
  --line-2: rgba(226, 184, 92, 0.34);
  --text: #f6ecd8;
  --muted: #cdb995;
  --dim: #8f7a5e;
  --accent: #e2b85c;
  --accent-2: #f3d58f;
  --accent-deep: #8a6526;
  --accent-ink: #24170c;
  --accent-soft: rgba(226, 184, 92, 0.14);
  --oxblood: #6b1e2e;
  --oxblood-2: #8c2c40;
  --electric: #4f8cff;
  --good: #4ade80;
  --bad: #ff6b81;
  --blue: #3a9bff;
  --red: #ff4a4a;
  --r-lg: 14px;
  --r: 10px;
  --r-sm: 8px;
  --brass: linear-gradient(180deg, #f7e2a8 0%, #e2b85c 45%, #b8862f 100%);
  --shadow: 0 24px 60px rgba(8, 4, 2, 0.65);
  --panel-bg: linear-gradient(180deg, rgba(44, 29, 20, 0.97) 0%, rgba(25, 16, 11, 0.98) 100%);
  --card-bg: linear-gradient(180deg, #2f2017 0%, #23170f 100%);
  --card-hi: inset 0 1px 0 rgba(255, 230, 180, 0.08);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  /* kept for older game screens that read these names */
  --bg2: var(--surface); --card: var(--raised); --card2: var(--raised-2); --yellow: var(--accent); --ink: var(--accent-ink);
  --green: var(--good); --pink: #ff64d8;
}

/* ---------- base ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none;
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; font-weight: 500; line-height: 1.4;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none;
  -webkit-font-smoothing: antialiased;
}
body {
  background:
    radial-gradient(1100px 700px at 12% -10%, rgba(140, 44, 64, 0.45) 0%, transparent 60%),
    radial-gradient(900px 700px at 105% 110%, rgba(226, 184, 92, 0.18) 0%, transparent 60%),
    linear-gradient(165deg, #2a1810 0%, #140d09 60%, #0c0806 100%);
}
/* faint deco sunburst rays behind every menu screen */
#app::before { content: ''; position: fixed; inset: 0; pointer-events: none; opacity: 0.6;
  background: repeating-conic-gradient(from 0deg at 50% 120%, rgba(226, 184, 92, 0.035) 0deg 3deg, transparent 3deg 9deg); }
input { -webkit-user-select: text; user-select: text; touch-action: manipulation; font-family: inherit; }
button { font-family: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.screen { flex: 1; min-height: 0; padding: 20px calc(24px + var(--safe-r)) calc(24px + var(--safe-b)) calc(24px + var(--safe-l)); }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.spacer { flex: 1; min-width: 0; }
.small { font-size: 14px; color: var(--muted); }
.eyebrow { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.label { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.row { display: flex; gap: 10px; align-items: center; justify-content: center; }
.row.wrap { flex-wrap: wrap; }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--raised-2); color: var(--text);
  font-size: 16px; font-weight: 700; line-height: 1.15; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}
.btn:hover { background: var(--hover); border-color: #6b6058; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 800; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--raised); color: var(--text); }
.btn.danger { border-color: #7a2f38; color: #ffb4b4; background: #2a161b; }
.btn.big { font-size: 18px; padding: 12px 22px; min-height: 54px; }
.btn.huge { font-size: 22px; min-height: 64px; width: 100%; border-radius: var(--r); letter-spacing: 0.01em; }
.icon-btn { min-width: 48px; padding: 8px; font-size: 20px; }
select {
  font: inherit; font-size: 16px; color: var(--text); background-color: var(--raised-2);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
  appearance: none; -webkit-appearance: none; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  min-height: 48px; padding: 10px 36px 10px 14px; max-width: 100%; touch-action: manipulation;
}
.text-input {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 17px; font-weight: 600;
}
.text-input:focus { border-color: var(--accent); outline: none; }
/* segmented choice row: chips that wrap */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--raised); color: var(--text); font-size: 15px; font-weight: 700;
}
.seg button:hover { border-color: #6b6058; background: var(--hover); }
.seg button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.seg button:disabled { opacity: 0.4; }
/* underline tabs */
.tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); flex: none; }
.tab {
  position: relative; min-height: 50px; padding: 10px 16px; border: 0; background: none;
  color: var(--muted); font-size: 16px; font-weight: 800; letter-spacing: 0.01em;
}
.tab:hover { color: var(--text); }
.tab.on, .tab[aria-selected="true"] { color: var(--text); }
.tab.on::after, .tab[aria-selected="true"]::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--raised-2); color: var(--muted); }
.badge.gold { background: var(--accent-soft); color: var(--accent); }

/* ---------- top bar ---------- */
#topbar {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0; z-index: 5;
  min-height: 64px; padding: calc(8px + var(--safe-t)) calc(16px + var(--safe-r)) 8px calc(20px + var(--safe-l));
  background: rgba(19, 16, 14, 0.92); border-bottom: 1px solid var(--line);
}
body.playing #topbar { display: none; }
.brand { font-weight: 900; font-size: 20px; letter-spacing: 0.16em; white-space: nowrap; color: var(--text); margin-right: 18px; }
.brand::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 3px; background: var(--accent); transform: rotate(45deg) translateY(-2px); }
.brand .app-version { display: block; font: 600 10px/1 ui-monospace, monospace; letter-spacing: 0.06em; color: var(--dim); margin: 3px 0 0 21px; }
.nav { display: flex; gap: 4px; align-self: stretch; }
.nav-tab {
  position: relative; display: flex; align-items: center; padding: 0 16px; min-height: 48px; border: 0; background: none;
  color: var(--muted); font-size: 16px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}
.nav-tab:hover { color: var(--text); }
.nav-tab.on { color: var(--text); }
.nav-tab.on::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -9px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.nav-tab .dot-new { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 6px; }
.party-chip, .me-chip {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 6px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--raised); font-size: 14px; font-weight: 700; white-space: nowrap;
}
.party-chip:hover, .me-chip:hover { background: var(--hover); }
.party-chip { padding-left: 12px; }
.party-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); flex: none; }
.party-chip.ok i { background: var(--good); box-shadow: 0 0 8px var(--good); }
.party-chip.wait i { background: var(--accent); }
.party-chip.bad i { background: var(--bad); }
.party-chip.bad { color: #ffc2c2; }
.party-chip em { font-style: normal; color: var(--accent); }
.me-chip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: var(--raised-2); }
.me-chip b { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.me-chip small { color: var(--accent); font-weight: 800; font-size: 12px; }
.lock-btn {
  position: relative; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px;
  border: 1px solid var(--line-2); background: var(--raised); border-radius: var(--r-sm); font-weight: 800; font-size: 15px;
}
.lock-btn .hold-ring {
  position: absolute; inset: -1px; border-radius: var(--r-sm); pointer-events: none;
  background: conic-gradient(var(--accent) calc(var(--p, 0) * 360deg), transparent 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 3px;
}
body.locked .lock-btn { background: #33290f; border-color: var(--accent); }
body.locked .lock-label::after { content: " (hold)"; font-weight: 600; opacity: 0.7; }

/* ---------- the elevator (home): directory, arrival card, riding pill ---------- */
#home { position: relative; padding: 0; overflow: hidden; background: #000; }
#home #game-3d, #hub-hud { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#hub-hud { z-index: 1; touch-action: none; }
.hub-chooser {
  position: absolute; z-index: 3; top: 16px; right: calc(16px + var(--safe-r)); bottom: 16px; width: 380px;
  display: flex; flex-direction: column; padding: 0; border-radius: 16px 16px 10px 10px; overflow: hidden;
  background: linear-gradient(180deg, rgba(32, 21, 14, 0.94), rgba(18, 11, 7, 0.95)); border: 1px solid rgba(226, 184, 92, 0.45);
  box-shadow: inset 0 0 0 4px rgba(18, 11, 7, 0.9), inset 0 0 0 5px rgba(226, 184, 92, 0.3), var(--shadow);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.dir-head { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border-bottom: 1px solid var(--line);
  background: radial-gradient(120% 140% at 50% 0%, rgba(226, 184, 92, 0.16), transparent 70%); }
.dir-title { flex: 1; min-width: 0; }
.dir-title .eyebrow { font-size: 11px; white-space: nowrap; }
.dir-title h3 { white-space: nowrap; margin-top: 4px; font-family: var(--font-display); font-weight: 400; font-size: 26px; letter-spacing: 0.02em; text-transform: none; color: var(--text); }
/* a little brass floor indicator: the floor you're on, an arrow while you ride */
.dir-dial { position: relative; flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #2a1a0e, #0d0805 70%); box-shadow: 0 0 0 3px #b8862f, 0 0 0 5px #3a2610, 0 0 0 6px rgba(226, 184, 92, 0.5), inset 0 2px 8px #000; }
.dir-dial b { font: 400 22px/1 var(--font-display); color: #ffe7a8; text-shadow: 0 0 10px rgba(255, 200, 100, 0.8); }
.dir-arrow { position: absolute; top: 6px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 8px solid #3a2a10; }
.dir-dial.moving .dir-arrow { border-bottom-color: #ffd77a; filter: drop-shadow(0 0 4px #ffb84a); animation: dir-blink 0.6s steps(2) infinite; }
.dir-dial.down .dir-arrow { top: auto; bottom: 6px; transform: rotate(180deg); }
@keyframes dir-blink { 50% { opacity: 0.3; } }
.dir-music { font-size: 22px; min-width: 44px; min-height: 44px; color: var(--accent); }
.dir-music.off { color: var(--dim); text-decoration: line-through; }
.dir-hide { min-height: 44px; padding: 8px 8px 6px; font-size: 13px; }
.dir-services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.dir-list { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; padding: 4px 10px 12px; scroll-padding: 40px 0 12px; }
.dir-section { position: relative; }
.dir-section .label { position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; gap: 8px; margin: 0 -10px 4px; padding: 12px 14px 6px;
  background: linear-gradient(180deg, rgba(22, 14, 9, 0.98) 70%, rgba(22, 14, 9, 0)); }
.dir-section .label b { font: 400 18px/1 var(--font-display); letter-spacing: 0.04em; text-transform: none; color: var(--accent); }
.dir-section .label small { font: 700 11px/1 var(--font-deco); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.dir-section.creepy .label b { color: #d77a66; text-shadow: 0 0 10px rgba(200, 40, 30, 0.45); }
.dir-hint { padding: 8px 14px 10px; font: 600 12px var(--font-body); color: var(--dim); border-top: 1px solid var(--line); text-align: center; }
.dir-hint kbd { display: inline-block; min-width: 20px; padding: 1px 5px; margin: 0 1px; border-radius: 5px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.35); font: 700 11px var(--font-deco); color: var(--muted); }
@media (pointer: coarse) { .dir-hint { display: none; } }
/* a floor: a round brass button with the number, the name and the hotel's plaque name */
.floor-btn { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 6px 10px 6px 8px; margin: 3px 0;
  border: 1px solid transparent; border-radius: 12px; background: transparent; text-align: left; color: var(--text); transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.floor-btn:hover, .floor-btn:focus-visible { background: linear-gradient(90deg, rgba(226, 184, 92, 0.16), rgba(226, 184, 92, 0.04)); border-color: rgba(226, 184, 92, 0.35); outline: none; }
.floor-btn:active { transform: scale(0.985); }
.floor-btn:disabled { opacity: 0.4; }
.floor-num { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  font: 400 18px/1 var(--font-display); color: #3a2708; background: radial-gradient(circle at 35% 30%, #fff4cf, #e2b85c 45%, #9a6f28 100%);
  box-shadow: inset 0 -2px 3px rgba(60, 35, 5, 0.6), inset 0 2px 2px rgba(255, 255, 255, 0.6), 0 0 0 2px #5a3e12, 0 3px 6px rgba(0, 0, 0, 0.5); transition: box-shadow 0.2s, color 0.2s; }
.floor-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.floor-text b { font: 700 17px/1.15 var(--font-deco); letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.floor-text small { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.floor-peers { display: flex; gap: 3px; }
.floor-peers i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font: 800 11px var(--font-deco); font-style: normal; color: #24170c; background: #9fe6c0; box-shadow: 0 0 8px rgba(159, 230, 192, 0.7); }
/* lit: where you are (a warm glow) and where you're going (a pulse) */
.floor-btn.here .floor-num, .floor-btn.going .floor-num { color: #5a2a00; background: radial-gradient(circle at 40% 35%, #fffbe8, #ffe39a 40%, #f0b850 100%);
  box-shadow: 0 0 0 2px #ffcf6a, 0 0 18px 4px rgba(255, 200, 90, 0.75), inset 0 -2px 3px rgba(120, 70, 0, 0.4); }
.floor-btn.here { background: linear-gradient(90deg, rgba(226, 184, 92, 0.22), rgba(226, 184, 92, 0.05)); border-color: rgba(226, 184, 92, 0.5); }
.floor-btn.here::after { content: 'YOU ARE HERE'; position: absolute; right: 10px; top: 6px; font: 700 9px var(--font-deco); letter-spacing: 0.14em; color: var(--accent); }
.floor-btn.going .floor-num { animation: lit-pulse 0.9s ease-in-out infinite; }
@keyframes lit-pulse { 50% { box-shadow: 0 0 0 2px #ffcf6a, 0 0 6px 1px rgba(255, 200, 90, 0.4); } }
/* the basement: dimmer, a little red, a little wrong */
.floor-btn.creepy .floor-num { color: #f0d0c0; background: radial-gradient(circle at 35% 30%, #6a3a30, #3a1a14 60%, #1a0806); box-shadow: inset 0 -2px 3px #000, 0 0 0 2px #4a1a10, 0 3px 6px #000; font-family: var(--font-display); }
.floor-btn.creepy b { color: #e8cfc0; }
.floor-btn.creepy:hover b, .floor-btn.creepy:focus-visible b { animation: creep-jit 0.25s steps(2) infinite; color: #ffb3a0; }
.floor-btn.creepy:hover, .floor-btn.creepy:focus-visible { background: linear-gradient(90deg, rgba(140, 30, 30, 0.3), rgba(140, 30, 30, 0.04)); border-color: rgba(200, 60, 50, 0.4); }
.floor-btn.creepy.here .floor-num, .floor-btn.creepy.going .floor-num { color: #fff; background: radial-gradient(circle at 40% 35%, #ffb0a0, #e0402a 50%, #6a1008); box-shadow: 0 0 0 2px #ff6a50, 0 0 18px 4px rgba(255, 60, 40, 0.6); }
@keyframes creep-jit { 0% { transform: translate(0.5px, 0); } 100% { transform: translate(-0.5px, 0.5px); } }
.floor-btn.ghost13 { opacity: 0.55; min-height: 40px; }
.floor-btn.ghost13 .floor-num { width: 32px; height: 32px; font-size: 13px; margin: 0 6px; background: #2a1c12; color: #8a6a48; box-shadow: inset 0 1px 3px #000, 0 0 0 1px #3a2a18; text-decoration: line-through; }
.floor-btn.ghost13 b { font-size: 14px; color: var(--dim); }
.floor-btn.ghost13:hover { opacity: 0.6; background: transparent; border-color: transparent; }
/* the service buttons up top: compact plates */
.floor-btn.compact { flex-direction: column; gap: 4px; min-height: 0; padding: 8px 4px; margin: 0; text-align: center; border-color: var(--line); background: rgba(0, 0, 0, 0.25); }
.floor-btn.compact .floor-num { width: 34px; height: 34px; font-size: 14px; }
.floor-btn.compact .floor-text b { font-size: 12px; white-space: normal; line-height: 1.1; }
.floor-btn.compact .floor-text small, .floor-btn.compact .floor-peers { display: none; }
.floor-btn.compact.here::after { content: none; }
/* the card that greets you when the doors open */
.arrival { position: absolute; z-index: 3; left: calc(16px + var(--safe-l)); right: calc(412px + var(--safe-r)); bottom: 16px; margin: 0 auto; max-width: 500px;
  padding: 14px 20px 14px; border-radius: 14px; text-align: center;
  background: linear-gradient(180deg, rgba(36, 24, 16, 0.94), rgba(20, 13, 8, 0.96)); border: 1px solid rgba(226, 184, 92, 0.5);
  box-shadow: inset 0 0 0 4px rgba(20, 13, 8, 0.9), inset 0 0 0 5px rgba(226, 184, 92, 0.25), 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: arrive 0.45s cubic-bezier(.2, 1.3, .4, 1) both; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.arrival::before { content: ''; position: absolute; left: 50%; top: -1px; width: 120px; height: 3px; transform: translateX(-50%); background: var(--c, var(--accent)); box-shadow: 0 0 14px var(--c, var(--accent)); border-radius: 0 0 3px 3px; }
@keyframes arrive { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
.arrival .eyebrow { font: 700 12px var(--font-deco); letter-spacing: 0.2em; color: var(--accent); }
.arrival h2 { margin: 4px 0 4px; font: 400 34px/1 var(--font-display); text-transform: none; letter-spacing: 0.01em;
  background: linear-gradient(180deg, #fff6dc 20%, #e8c77a 70%, #b8862f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.arrival-blurb { color: var(--muted); font-size: 15px; line-height: 1.3; max-width: 46ch; margin: 0 auto; }
@media (max-height: 820px) { .arrival-blurb { display: none; } .arrival-meta { margin: 6px 0 10px; } }
.arrival-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.chip-lite { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); font: 700 12px var(--font-deco); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.chip-lite.friends { color: #9fe6c0; border-color: rgba(159, 230, 192, 0.5); }
.arrival .row { gap: 10px; }
.arrival-extra { text-align: left; margin: 0 auto 12px; max-width: 420px; }
.arrival.creepy { border-color: rgba(200, 60, 50, 0.5); background: linear-gradient(180deg, rgba(20, 8, 6, 0.95), rgba(8, 3, 2, 0.97)); }
.arrival.creepy::before { background: #d0402a; box-shadow: 0 0 16px #ff3a20; }
.arrival.creepy h2 { background: linear-gradient(180deg, #f0d8c8, #b88870); -webkit-background-clip: text; background-clip: text; animation: creep-flicker 4s steps(1) infinite; }
.arrival.creepy .eyebrow { color: #d77a66; }
@keyframes creep-flicker { 0%, 61%, 64%, 100% { opacity: 1; } 62% { opacity: 0.2; } 63% { opacity: 0.8; } }
.riding-pill { position: absolute; z-index: 3; left: calc(16px + var(--safe-l)); right: calc(412px + var(--safe-r)); bottom: 26px; margin: 0 auto; width: max-content; max-width: 90%;
  padding: 10px 18px; border-radius: 999px; background: rgba(14, 9, 6, 0.85); border: 1px solid rgba(226, 184, 92, 0.5); font: 700 15px var(--font-deco); letter-spacing: 0.1em; text-transform: uppercase; color: #ffe7a8; }
.elevator-fade { position: absolute; inset: 0; z-index: 2; background: #000; opacity: 0; pointer-events: none; }
.floors-fab { display: none; }
#home-progress {
  position: absolute; z-index: 2; left: calc(16px + var(--safe-l)); top: 16px; width: 290px;
  padding: 12px 14px; border-radius: var(--r-lg); background: rgba(20, 13, 8, 0.86); border: 1px solid var(--line-2);
}
#home-progress .daily { display: none; }
#home-progress:hover .daily, #home-progress:focus-within .daily { display: block; }
#admin-stop { position: absolute; left: 50%; transform: translateX(-50%); bottom: 28px; z-index: 4; }
/* level + daily tasks (home card) */
.xp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.xp-head b { font-size: 15px; font-weight: 900; letter-spacing: 0.06em; color: var(--accent); }
.xp-head span { font-size: 13px; color: var(--muted); font-weight: 700; }
.xp-track { height: 6px; background: var(--raised-2); border-radius: 6px; margin: 8px 0 0; overflow: hidden; }
.xp-track div { height: 100%; background: var(--accent); border-radius: 6px; }
.daily { margin-top: 14px; }
.daily-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.daily-head strong { font-size: 16px; font-weight: 800; letter-spacing: 0.04em; color: var(--muted); }
.daily-head var { font-style: normal; font-weight: 800; color: var(--accent); font-size: 16px; }
.daily ul { list-style: none; margin: 8px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.daily li { display: flex; align-items: center; gap: 10px; min-height: 28px; font-size: 16px; }
.daily li i { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-2); display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 13px; color: var(--accent-ink); }
.daily li.done i { background: var(--good); border-color: var(--good); }
.daily li.done p { color: var(--dim); text-decoration: line-through; }
.daily li p { flex: 1; line-height: 1.2; }
.daily li em { flex: none; font-style: normal; font-weight: 800; color: var(--muted); font-size: 16px; }
.daily small { display: block; font-size: 16px; color: var(--dim); }

/* ---------- locker ---------- */
#custom { overflow: hidden; padding-top: 18px; animation: rise 0.16s ease-out; }
.locker { display: flex; gap: 24px; height: 100%; min-height: 0; max-width: 1500px; margin: 0 auto; }
.locker-side { flex: 0 0 320px; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; touch-action: pan-y; }
#locker-stage {
  position: relative; flex: none; height: 360px; border-radius: var(--r-lg); overflow: hidden; touch-action: none;
  border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 85%, #433932 0%, #231d19 70%);
}
#locker-stage #game-3d { position: absolute; inset: 0; width: 100%; height: 100%; }
.locker-hint { position: absolute; bottom: 10px; left: 0; right: 0; z-index: 2; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: var(--dim); pointer-events: none; }
#locker-character-info { padding: 2px 4px; }
.locker-equipped { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; color: var(--accent); }
#locker-character-name { font-size: 26px; margin: 4px 0 4px; overflow-wrap: anywhere; }
#locker-character-desc { font-size: 14px; color: var(--muted); line-height: 1.45; }
.selection-flash { animation: rise 0.25s ease-out; }
#locker-power {
  display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px; border-radius: var(--r);
  background: var(--raised); border: 1px solid var(--line); text-align: left; width: 100%; font-size: 14px;
}
#locker-power:hover { border-color: var(--accent); }
#locker-power .pw-icon { font-style: normal; font-size: 26px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--raised-2); flex: none; }
#locker-power b { display: block; font-size: 15px; }
#locker-power span { color: var(--muted); font-size: 13px; }
.locker-name-row { display: flex; gap: 8px; }
#name { flex: 1; min-width: 0; }
.locker-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.locker-main .tabs { margin-bottom: 14px; }
.locker-main .tabs .btn { margin-left: auto; min-height: 44px; }
#locker-roster { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.roster-tools { display: flex; gap: 10px; align-items: center; flex: none; margin-bottom: 12px; min-width: 0; }
#roster-search { flex: 0 0 240px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 15px; }
#roster-search:focus { border-color: var(--accent); outline: none; }
#roster-filters { display: flex; flex: 1; gap: 8px; min-width: 0; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; -webkit-overflow-scrolling: touch; padding: 2px; }
.roster-filter {
  display: flex; flex: none; align-items: center; gap: 7px; min-height: 40px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--raised); color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap;
}
.roster-filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.roster-count { font-size: 12px; opacity: 0.75; }
.roster-hint { display: none; }
#roster-grid { flex: 1 1 0; min-height: 0; overflow-x: hidden; padding: 2px 6px 16px 2px; overscroll-behavior: contain; }
.roster-collection + .roster-collection { margin-top: 20px; }
.roster-collection-heading { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.roster-collection-heading::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.roster-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.roster-card {
  position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 8px 8px 10px; gap: 4px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--raised); color: var(--text); transition: border-color 0.12s, transform 0.1s;
}
.roster-card b { font-size: 14px; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.roster-portrait { position: relative; display: block; width: 100%; height: 118px; border-radius: 10px; background: radial-gradient(ellipse at 50% 90%, #493f37, transparent 70%); }
.roster-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.roster-silhouette { position: absolute; left: 50%; top: 20px; width: 34px; height: 34px; transform: translateX(-50%); border-radius: 50%; background: #5a5048; }
.roster-silhouette::after { content: ''; position: absolute; top: 40px; left: -18px; width: 70px; height: 50px; border-radius: 36px 36px 10px 10px; background: #5a5048; }
.roster-card .roster-state { display: none; }
.roster-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: #221f1a; }
.roster-card.selected::after { content: '✓'; position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 900; }
@media (hover: hover) { .roster-card:hover { border-color: #6b6058; transform: translateY(-2px); } }
.roster-card:active { transform: scale(0.97); }
.roster-empty { padding: 22px 12px; color: var(--muted); text-align: center; }
.custom-options { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 20px; padding-bottom: 24px; }
.opt-group h4 { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.opt-row { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; width: 48px; height: 48px; border-radius: 50%; border: 3px solid transparent; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25); }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.chip { position: relative; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--raised); font-size: 15px; font-weight: 700; text-transform: capitalize; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip:disabled, .swatch:disabled { opacity: 0.42; }
.chip small, .swatch small { font-size: 10px; padding: 1px 4px; background: var(--bg); color: #fff; border-radius: 4px; margin-left: 4px; }
.swatch small { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); margin: 0; }
.new-badge { color: var(--accent) !important; }
#locker-gear { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ---------- lobby ---------- */
#lobby { padding-top: 18px; animation: rise 0.16s ease-out; }
.lobby { max-width: 1240px; margin: 0 auto; }
.lobby-stage { position: relative; height: 340px; margin-bottom: 20px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #241e19; touch-action: pan-y; }
.lobby-stage #game-3d { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-head { position: absolute; z-index: 3; left: 0; top: 0; right: 0; display: flex; align-items: flex-start; gap: 16px; padding: 16px 18px 40px; background: linear-gradient(180deg, rgba(19, 16, 14, 0.85), rgba(19, 16, 14, 0)); pointer-events: none; }
.stage-head > * { pointer-events: auto; }
.stage-head h2 { font-size: 30px; margin: 3px 0 3px; }
.stage-head p { color: #dcd6d1; font-size: 14px; max-width: 560px; }
.stage-plates { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.stage-plate {
  position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 120px; max-width: 200px;
  padding: 6px 14px 7px; border-radius: 12px; background: rgba(23, 20, 17, 0.9); border: 1px solid var(--line-2); border-top: 3px solid var(--tc, var(--line-2));
  font-size: 13px; white-space: nowrap; will-change: transform;
}
.stage-plate b { font-size: 15px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.stage-plate span { color: var(--muted); font-weight: 700; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.stage-plate.you { border-color: var(--accent); border-top-color: var(--tc, var(--accent)); }
.stage-plate.ready span { color: var(--good); }
.stage-plate.empty { pointer-events: auto; cursor: pointer; min-width: 96px; min-height: 96px; justify-content: center; border-radius: 50%; border: 2px dashed var(--line-2); background: rgba(23, 20, 17, 0.55); color: var(--muted); }
.stage-plate.empty:hover { border-color: var(--accent); color: var(--text); }
.stage-plate.empty .plus { font-size: 30px; line-height: 1; color: inherit; text-transform: none; }
.stage-plate.empty b { font-size: 13px; }
.lobby-body { display: flex; gap: 22px; align-items: flex-start; }
.lobby-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.lobby-side { flex: 0 0 340px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; }
.lobby-section > .label { display: flex; align-items: center; gap: 10px; }
.lobby-section > .label .seg { margin-left: auto; text-transform: none; letter-spacing: 0; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pick {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 84px; padding: 12px 14px;
  text-align: left; border-radius: var(--r); border: 1px solid var(--line); background: var(--raised); color: var(--text); transition: border-color 0.12s, background 0.12s;
}
.pick:hover { border-color: #6b6058; background: var(--hover); }
.pick .pick-icon { font-size: 22px; line-height: 1; }
.pick b { font-size: 15px; line-height: 1.2; }
.pick small { font-size: 12.5px; color: var(--muted); line-height: 1.3; font-weight: 600; }
.pick.on { border-color: var(--accent); background: #231f17; box-shadow: 0 0 0 1px var(--accent) inset; }
.pick.on::after { content: '✓'; position: absolute; top: 9px; right: 10px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 900; }
.pick:disabled { opacity: 0.45; cursor: default; }
.map-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.pick.map { min-height: 96px; justify-content: flex-end; padding: 0; overflow: hidden; }
.pick.map .map-art { position: absolute; inset: 0; }
.pick.map .map-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(15, 13, 11, 0.88) 100%); }
.pick.map b, .pick.map small { position: relative; padding: 0 12px; }
.pick.map b { font-size: 15px; }
.pick.map small { padding-bottom: 10px; color: #d8d1cc; }
.pick.map.on .map-art::after { background: linear-gradient(180deg, rgba(212, 165, 72, 0.1) 30%, rgba(24, 19, 8, 0.92) 100%); }
.rules { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 4px 16px; }
.rule { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rule:last-child { border-bottom: 0; }
.rule > span { flex: 0 0 170px; font-size: 15px; font-weight: 700; }
.rule > span small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.rule .seg { flex: 1; }
.rule .seg button { min-height: 40px; padding: 6px 12px; font-size: 14px; }
#options { display: flex; flex-direction: column; gap: 22px; }
#options:empty { display: none; }
#roles { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
#roles:empty { display: none; }
.role { flex: 1 1 200px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--raised); }
.role.mine { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.role .rname { font-size: 20px; font-weight: 800; }
.role .rwho { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.role .rdesc { font-size: 14px; color: var(--muted); margin-top: 4px; }
#swap-roles { align-self: center; }
#kit-section > .label { margin-bottom: 10px; }
.kits { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.kit { position: relative; text-align: left; padding: 14px; min-height: 112px; border-radius: var(--r); border: 1px solid var(--line); background: var(--raised); color: var(--text); }
.kit:hover { border-color: #6b6058; }
.kit .icon { font-size: 28px; }
.kit .kname { font-size: 17px; font-weight: 800; margin-top: 4px; }
.kit .kdesc { font-size: 13px; color: var(--muted); line-height: 1.3; }
.kit.mine { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: #231f17; }
.kit .theirs { position: absolute; top: 8px; right: 10px; font-size: 11px; font-weight: 800; background: var(--blue); padding: 1px 8px; border-radius: 999px; }
.side-card { padding: 16px; border-radius: var(--r-lg); background: var(--raised); border: 1px solid var(--line); }
.side-card .label { display: flex; justify-content: space-between; align-items: center; }
#players-ready { display: flex; flex-direction: column; gap: 8px; }
.pr { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 56px; padding: 6px 10px 6px 6px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-weight: 700; }
.pr .pr-face { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; object-position: 50% 10%; background: var(--raised-2); flex: none; }
.pr .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); flex: none; }
.pr.ready .dot { background: var(--good); box-shadow: 0 0 8px var(--good); }
.pr .player-name { flex: 1; min-width: 48px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.pr .st { flex: none; font-size: 13px; color: var(--muted); }
.pr.ready .st { color: var(--good); }
.pr.sitting { opacity: 0.6; }
.team-chip { min-height: 34px; padding: 4px 10px; border-radius: 999px; border: 0; background: var(--tc); color: #14110f; font-size: 13px; font-weight: 800; white-space: nowrap; flex: none; }
.team-chip:not([disabled])::after { content: ' ⇄'; }
.team-chip[disabled] { opacity: 1; cursor: default; }
#seat-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#seat-controls:empty { display: none; }
#seat-controls .btn { flex: 1; min-height: 44px; font-size: 14px; padding: 8px 10px; }
.kick-menu { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0 4px 52px; }
.kick-menu .kick-title { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.kick-menu .btn { min-height: 36px; padding: 4px 12px; font-size: 13px; }
.kick-menu input { width: 72px; min-height: 36px; padding: 4px 8px; font: inherit; font-size: 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: #fff; }
.kick-menu input.bad { border-color: var(--bad); }
.kick-btn { min-height: 34px !important; padding: 4px 10px !important; font-size: 13px !important; }
/* the Gun Game loadout summary in the lobby */
.gear-sum { display: flex; flex-direction: column; gap: 10px; }
.gear-sum .gear-line { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.gear-sum .gear-line img { width: 64px; height: 34px; object-fit: contain; flex: none; }
.gear-sum .gear-line .pw-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--raised-2); font-size: 18px; flex: none; margin: 0 15px; }
.gear-sum .gear-line b { display: block; font-size: 15px; }
.gear-sum .gear-line small { color: var(--muted); font-size: 12.5px; }
.gear-sum .btn { width: 100%; }
#ready.on { background: var(--good); border-color: var(--good); color: #062012; }
#lobby-status { font-size: 14px; color: var(--muted); text-align: center; line-height: 1.45; }
.howto { padding: 0 16px; border-radius: var(--r-lg); background: var(--raised); border: 1px solid var(--line); }
.howto summary { cursor: pointer; min-height: 52px; padding: 15px 0; font-size: 15px; font-weight: 800; }
.howto[open] { padding-bottom: 14px; }
.howto h4 { margin: 10px 0 6px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.howto ul { margin: 0; padding-left: 18px; color: #d9d3ce; font-size: 14px; line-height: 1.5; }
.ctl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; color: var(--muted); font-size: 14px; }
.ctl b { color: var(--text); }

/* ---------- game ---------- */
#game { padding: 0; position: relative; background: #000; }
#game-3d, #game-canvas {
  position: absolute; top: var(--safe-t); left: var(--safe-l); display: block;
  width: calc(100% - var(--safe-l) - var(--safe-r)); height: calc(100% - var(--safe-t) - var(--safe-b));
}
#game-canvas { touch-action: none; }

/* ---------- overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(11, 9, 8, 0.82);
}
.overlay:not([hidden]) { animation: rise 0.14s ease-out; }
.panel {
  display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center;
  min-width: 340px; max-width: min(92vw, 760px); max-height: calc(100% - 8px); overflow-y: auto;   /* 100% of the overlay, not 100vh (iPad Safari's bars) */ -webkit-overflow-scrolling: touch; touch-action: pan-y;
  padding: 28px 30px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.panel h2 { font-size: 28px; }
.panel p { color: var(--muted); }
.panel .row { width: 100%; }
.panel .row .btn { flex: 1; }
#pause .panel { width: 380px; align-items: stretch; }
#pause .panel .btn { width: 100%; }
#pause .lock-btn { justify-content: center; }
.locked-note { display: none; color: var(--accent); font-weight: 700; }
body.locked .locked-note { display: block; }
body.locked #quit-game { opacity: 0.4; pointer-events: none; }
#fs-return { z-index: 50; }
#device-pick { z-index: 40; }
#cant-join { z-index: 35; }
#unlock-popup { z-index: 36; }
.device-row { gap: 14px; }
.device-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 170px; padding: 18px 20px; font-size: 22px; font-weight: 800; border-radius: var(--r-lg); }
.device-btn .dev-icon { font-size: 48px; line-height: 1.1; }
.device-btn .dev-sub { font-size: 14px; color: var(--muted); font-weight: 700; }
.device-btn.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.join-card { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.join-card h3 { font-size: 24px; }
.join-url { font-size: 26px; font-weight: 900; color: var(--accent); -webkit-user-select: text; user-select: text; }
.join-card img { background: #fff; border-radius: 12px; padding: 8px; }
/* Locker → Move my progress, and the import screen a profile code opens (above the first-visit device picker) */
.overlay.transfer { z-index: 45; }
.transfer .panel { width: 620px; }
.transfer-send { display: flex; gap: 18px; align-items: center; width: 100%; text-align: left; }
.transfer-qr { flex: none; width: 206px; min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.transfer-qr img { background: #fff; border-radius: 12px; padding: 8px; }
.transfer-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.transfer-code { width: 100%; font: 12px ui-monospace, monospace; resize: none; }
.transfer-h { align-self: stretch; text-align: left; font-size: 18px; margin-top: 4px; }
.transfer .row .text-input { flex: 2; min-width: 0; }
.transfer-err { color: #ffb4b4 !important; }
#locker-transfer { font-size: 15px; }
@media (max-width: 700px) { .transfer-send { flex-direction: column; text-align: center; } }
.list-panel { width: 820px; align-items: stretch; text-align: left; }
.list-panel > .row { justify-content: space-between; }
#game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#game-grid .mode-head { grid-column: 1 / -1; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 10px 0 0; }
.list-game { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px; border-radius: var(--r); border: 1px solid var(--line); background: var(--raised); color: var(--text); min-width: 0; }
.list-game:hover { border-color: var(--accent); }
.list-game canvas { width: 84px; height: 60px; object-fit: cover; border-radius: 8px; flex: none; }
.list-game > div { flex: 1; min-width: 0; }
.list-game b { font-size: 16px; }
.list-game p { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
#toast {
  position: fixed; left: 50%; top: calc(76px + var(--safe-t)); transform: translateX(-50%); z-index: 60; max-width: 90vw;
  padding: 12px 18px; border-radius: var(--r); background: var(--raised-2); border: 1px solid var(--line-2); font-weight: 700; box-shadow: var(--shadow);
}

/* ---------- results ---------- */
#results .panel { width: min(760px, 94vw); }
.result-big { font-size: 64px; font-weight: 900; line-height: 1; letter-spacing: 0.02em; }
.result-big.win { color: var(--accent); }
.result-big.lose { color: #ff9a9a; }
.result-title { font-size: 22px; font-weight: 800; }
#result-detail { margin: 0; color: var(--muted); font-size: 17px; white-space: pre-line; }
#result-xp { color: var(--accent); font-size: 18px; font-weight: 700; }
#result-board { width: 100%; overflow-x: auto; }
#result-board table { width: 100%; border-collapse: collapse; font-size: 15px; }
#result-board td, #result-board th { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
#result-board th { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
#rematch-vote { width: min(720px, 100%); display: flex; flex-direction: column; gap: 10px; }
.vote-head { display: flex; justify-content: space-between; align-items: center; font-size: 20px; }
.vote-head b { color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.vote-timer { font-weight: 800; font-size: 18px; color: var(--text); min-width: 64px; text-align: right; }
.vote-hint { margin: 0; font-size: 16px; color: #d9d3ce; text-align: left; }
.vote-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vote-grid.mode { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vote-card, .vote-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 100px; padding: 12px 10px; font-size: 18px; background: var(--raised); color: var(--text); text-align: center; white-space: normal; }
.vote-chip { min-height: 74px; }
.vote-card small, .vote-chip small { font-size: 16px; font-weight: 700; color: var(--muted); min-height: 20px; }
.vote-card.banned { background: #2b1619; border-color: #7a2f38; }
.vote-card.banned b { text-decoration: line-through; opacity: 0.7; }
.vote-card.banned small { color: #ffb4b4; }
.vote-card.mine, .vote-chip.mine { box-shadow: 0 0 0 2px var(--accent) inset; }
.vote-card.picked { background: #231f17; border-color: var(--accent); }
.vote-card.picked small { color: var(--accent); }
.vote-card:disabled, .vote-chip:disabled { opacity: 1; }

/* ---------- admin (settings tab) ---------- */
.admin-settings { display: flex; flex-direction: column; gap: 14px; padding: 14px 0; }
.admin-code-form { display: flex; gap: 12px; flex-wrap: wrap; }
.admin-code-form input { flex: 1; min-width: 160px; border: 1px solid var(--line-2); background: var(--surface); color: #fff; border-radius: var(--r-sm); padding: 14px; font-size: 17px; }
.admin-effect-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-effect { display: flex; flex-direction: column; gap: 8px; text-align: left; background: var(--raised); color: #fff; border: 1px solid var(--line-2); border-radius: var(--r); padding: 16px; min-height: 96px; }
.admin-effect:hover { border-color: var(--accent); }
.admin-effect b { font-size: 16px; color: var(--accent); }
.admin-effect span { font-size: 13px; line-height: 1.45; color: var(--muted); }

/* ---------- iPad and smaller ---------- */
@media (max-width: 1100px) {
  .brand { margin-right: 6px; font-size: 18px; letter-spacing: 0.12em; }
  .nav-tab { padding: 0 12px; }
  .me-chip b { max-width: 90px; }
  .hub-chooser { width: 340px; }
  .dir-title h3 { font-size: 22px; }
  .dir-title .eyebrow { letter-spacing: 0.1em; }
  .arrival, .riding-pill { right: calc(372px + var(--safe-r)); }
  .locker-side { flex-basis: 270px; }
  #locker-stage { height: 300px; }
  .lobby-side { flex-basis: 300px; }
  .rule > span { flex-basis: 140px; }
}
@media (max-width: 860px) {
  .lobby-body { flex-direction: column; }
  .lobby-side { position: static; flex: none; width: 100%; }
  .hub-chooser { width: 310px; }
  .arrival, .riding-pill { right: calc(342px + var(--safe-r)); }
  .arrival h2 { font-size: 32px; }
  #home-progress { display: none; }
  .locker { gap: 16px; }
  .locker-side { flex-basis: 220px; }
  #locker-stage { height: 240px; }
  #roster-search { flex-basis: 160px; }
  .rule { flex-direction: column; align-items: stretch; gap: 8px; }
  .rule > span { flex: none; }
}
@media (max-width: 640px) {
  #topbar { flex-wrap: wrap; gap: 6px; padding: calc(6px + var(--safe-t)) 10px 6px; min-height: 0; }
  .brand { font-size: 16px; }
  .brand .app-version { display: none; }
  .me-chip b, .lock-label { display: none; }
  .party-chip { font-size: 13px; }
  .screen { padding: 12px calc(12px + var(--safe-r)) calc(14px + var(--safe-b)) calc(12px + var(--safe-l)); }
  .hub-chooser { left: 8px; right: 8px; top: 8px; bottom: 8px; width: auto; display: none; z-index: 5; }
  .hub-chooser.sheet-open { display: flex; animation: arrive 0.25s ease-out; }
  .floors-fab { display: inline-flex; position: absolute; z-index: 4; right: calc(12px + var(--safe-r)); bottom: 12px; }
  .arrival, .riding-pill { left: 10px; right: 10px; bottom: 74px; }
  .arrival { padding: 14px; }
  .arrival h2 { font-size: 28px; }
  .arrival-blurb { font-size: 14px; }
  .locker { flex-direction: column; }
  .locker-side { flex: none; display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; overflow: visible; }
  #locker-stage { height: 150px; grid-row: 1 / 4; }
  #locker-character-desc, #locker-power span { display: none; }
  .roster-tools { flex-direction: column; align-items: stretch; }
  #roster-search { flex: none; }
  .roster-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lobby-stage { height: 260px; }
  .stage-head h2 { font-size: 22px; }
  .stage-head p { display: none; }
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 18px; min-width: 0; }
  .panel h2 { font-size: 24px; }
  #game-grid { grid-template-columns: 1fr; }
  .vote-grid { grid-template-columns: 1fr; }
  .result-big { font-size: 46px; }
  .device-btn { min-width: 0; flex: 1 1 120px; padding: 12px; font-size: 18px; }
  .admin-effect-grid { grid-template-columns: 1fr; }
}
@media (max-height: 560px) and (min-width: 641px) {
  #topbar { min-height: 0; padding-top: 4px; padding-bottom: 4px; }
  .nav-tab.on::after { bottom: -5px; }
  #locker-stage { height: 180px; }
  .hub-chooser { top: 8px; bottom: 8px; }
  .dir-hint { display: none; }
  .arrival { padding: 12px 16px; bottom: 10px; }
  .arrival h2 { font-size: 30px; margin: 2px 0; }
  .arrival-meta { margin: 6px 0 8px; }
  .lobby-stage { height: 230px; margin-bottom: 12px; }
}
@media (orientation: portrait) and (pointer: coarse) {
  body.playing::after {
    content: "↻ Turn your iPad or iPhone sideways"; position: fixed; inset: 0; z-index: 40; display: flex; text-align: center; padding: 24px;
    align-items: center; justify-content: center; font-size: 30px; font-weight: 800; background: rgba(11, 9, 8, 0.94);
  }
}


/* =====================================================================================================
   THEME: the grand hotel. Display type is Limelight; labels and buttons are Josefin Sans caps with wide tracking.
   Buttons are lacquered walnut with a brass edge; the main actions are polished brass. Cards are walnut panels with
   a hairline brass inlay that lights up when touched. Nothing is skewed: deco is about symmetry.
   ===================================================================================================== */
h1, h2, .stage-head h2, .hub-chooser h3, .panel h2, #locker-character-name, .result-title, .join-card h3 {
  font-family: var(--font-display); font-style: normal; font-weight: 400; text-transform: none; letter-spacing: 0.01em; line-height: 1.05;
}
.eyebrow, .label, .opt-group h4, .roster-collection-heading, .locker-equipped, .daily-head strong, .xp-head b, .howto summary, #result-board th {
  font-family: var(--font-deco); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}
.label { font-size: 13px; color: var(--muted); }
.eyebrow { font-size: 13px; color: var(--accent); }
/* buttons */
.btn { font-family: var(--font-deco); font-weight: 700; font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 12px;
  background: var(--card-bg); border: 1px solid var(--line-2); box-shadow: var(--card-hi), 0 2px 0 rgba(0, 0, 0, 0.6); border-radius: 8px; }
.btn:hover { background: linear-gradient(180deg, #3e2a1d, #2c1d13); border-color: rgba(226, 184, 92, 0.6); }
.btn:active { transform: translateY(1px); box-shadow: var(--card-hi); }
.btn.primary { background: var(--brass); color: var(--accent-ink); border: 1px solid #f7e2a8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 0 rgba(120, 80, 20, 0.5), 0 3px 0 #6a4a18, 0 10px 24px rgba(226, 184, 92, 0.2); }
.btn.primary:hover { background: linear-gradient(180deg, #fff1c8 0%, #ecc775 45%, #c8953a 100%); }
.btn.primary:active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 1px 0 #6a4a18; }
.btn.huge { font-size: 24px; min-height: 68px; border-radius: 10px; letter-spacing: 0.14em; }
.btn.big { font-size: 18px; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: rgba(226, 184, 92, 0.1); color: var(--text); }
.btn.danger { background: linear-gradient(180deg, #5a1a24, #3a0f18); border-color: #8c2c40; color: #ffd0d6; }
.icon-btn { font-size: 20px; text-transform: none; letter-spacing: 0; }
.seg button, .chip, .roster-filter { font-family: var(--font-deco); font-weight: 700; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 10px;
  background: var(--card-bg); border-color: var(--line-2); box-shadow: var(--card-hi); }
.seg button.on, .chip.on, .roster-filter[aria-pressed="true"] { background: var(--brass); color: var(--accent-ink); border-color: transparent; box-shadow: 0 0 0 3px rgba(226, 184, 92, 0.2); }
/* top bar: a walnut header with a brass rule */
#topbar { background: linear-gradient(180deg, rgba(26, 17, 11, 0.98), rgba(18, 11, 7, 0.96)); border-bottom: 0; min-height: 64px;
  box-shadow: 0 1px 0 rgba(226, 184, 92, 0.55), 0 3px 0 rgba(10, 6, 4, 0.9), 0 4px 0 rgba(226, 184, 92, 0.22), 0 8px 30px rgba(0, 0, 0, 0.5); }
.brand { display: flex; flex-direction: column; font-family: var(--font-display); font-style: normal; font-weight: 400; font-size: 30px; letter-spacing: 0.06em; line-height: 0.9;
  background: linear-gradient(180deg, #fff3cf 20%, #e2b85c 65%, #a67a2c); -webkit-background-clip: text; background-clip: text; color: transparent; padding-left: 40px; position: relative; }
.brand::before { content: ''; display: block; position: absolute; left: 0; top: 50%; width: 32px; height: 32px; margin: -16px 0 0; border-radius: 0; transform: none;
  background: url("../icons/icon.svg") center / contain no-repeat; }
.brand .app-version { -webkit-text-fill-color: var(--dim); color: var(--dim); font-style: normal; margin: 4px 0 0 2px; letter-spacing: 0.1em; }
.nav-tab { font-family: var(--font-deco); font-style: normal; font-weight: 700; font-size: 17px; letter-spacing: 0.16em; color: rgba(230, 210, 170, 0.6); padding: 4px 16px 0; }
.nav-tab.on { color: #fff3d6; text-shadow: 0 0 16px rgba(226, 184, 92, 0.6); }
.nav-tab.on::after { left: 14px; right: 14px; bottom: -8px; height: 3px; border-radius: 2px; transform: none; background: var(--accent); box-shadow: 0 0 12px rgba(226, 184, 92, 0.8); }
.party-chip, .me-chip, .lock-btn { background: rgba(42, 28, 20, 0.9); border-color: var(--line-2); box-shadow: var(--card-hi); font-weight: 700; }
.me-chip small { font-family: var(--font-deco); font-size: 13px; letter-spacing: 0.08em; }
.me-chip img { border: 2px solid rgba(226, 184, 92, 0.8); }
/* panels and cards: walnut with a brass inlay */
.panel, .hub-chooser, #home-progress, .side-card, .howto, .rules, .card, #set2 .s2-panel { background: var(--panel-bg); border: 1px solid var(--line-2); box-shadow: var(--card-hi), inset 0 0 0 4px rgba(10, 6, 4, 0.5), inset 0 0 0 5px rgba(226, 184, 92, 0.14), var(--shadow); }
.pick, .roster-card, .kit, .role, .list-game, .vote-card, .vote-chip, .pr, #locker-power, .device-btn {
  background: var(--card-bg); border-color: var(--line-2); box-shadow: var(--card-hi), 0 2px 0 rgba(0, 0, 0, 0.5);
}
.pick b, .roster-card b, .kit .kname, .role .rname, .list-game b, .vote-card b, .vote-chip b, .stage-plate b, #locker-power b {
  font-family: var(--font-deco); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.pick b { font-size: 16px; }
.roster-card b { font-size: 14px; }
.pick:hover, .list-game:hover, .kit:hover { border-color: rgba(226, 184, 92, 0.7); background: linear-gradient(180deg, #3a271b, #2a1c13); transform: translateY(-2px); box-shadow: var(--card-hi), 0 10px 24px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(226, 184, 92, 0.35); }
.pick.on, .kit.mine, .role.mine, .roster-card.selected, .vote-card.picked {
  background: linear-gradient(180deg, #4a2a22 0%, #33181a 100%); border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 0 24px rgba(226, 184, 92, 0.3), var(--card-hi);
}
.pick.on::after, .roster-card.selected::after { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.pick .pick-icon { font-size: 26px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4)); }
.pick small { color: var(--muted); }
.roster-portrait { background: radial-gradient(ellipse at 50% 92%, rgba(226, 184, 92, 0.35), transparent 70%); }
.tabs { border-bottom-color: var(--line-2); }
.tab { font-family: var(--font-deco); font-style: normal; font-weight: 700; font-size: 16px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(230, 210, 170, 0.55); padding-top: 14px; }
.tab.on, .tab[aria-selected="true"] { color: #fff3d6; }
.tab.on::after, .tab[aria-selected="true"]::after { height: 3px; transform: none; box-shadow: 0 0 12px rgba(226, 184, 92, 0.7); }
/* stages: a spotlight on oxblood velvet */
.lobby-stage, #locker-stage { background: radial-gradient(ellipse at 50% 100%, #9a3a3a 0%, #5a1a24 35%, #1e0c0c 75%); border-color: var(--line-2); box-shadow: var(--card-hi), var(--shadow); }
.stage-head { background: linear-gradient(180deg, rgba(14, 8, 5, 0.85), rgba(14, 8, 5, 0)); }
.stage-head h2 { font-size: 46px; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.6); color: #fff1d0; }
.stage-plate { background: linear-gradient(180deg, rgba(44, 29, 20, 0.95), rgba(22, 14, 9, 0.95)); border-color: var(--line-2); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); }
.stage-plate b { font-size: 16px; }
.stage-plate.you { border-color: var(--accent); }
.stage-plate.ready span { color: var(--good); text-shadow: 0 0 10px rgba(74, 222, 128, 0.5); }
#locker-character-name { font-size: 40px; }
#ready { font-size: 28px; }
#ready.on { background: linear-gradient(180deg, #7dfbab, var(--good)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 0 #1f9a4d; color: #062012; border-color: #b8ffd0; }
.result-big { font-family: var(--font-display); font-style: normal; font-weight: 400; font-size: 92px; text-transform: none; letter-spacing: 0.02em; }
.result-big.win { background: linear-gradient(180deg, #fff6d8, var(--accent) 55%, #a8742a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 rgba(60, 30, 0, 0.6)); }
.result-big.lose { color: #e8a0a8; text-shadow: 0 4px 0 rgba(60, 10, 20, 0.6); }
.xp-track { height: 8px; background: rgba(0, 0, 0, 0.5); }
.xp-track div { background: linear-gradient(90deg, #a8742a, var(--accent-2)); box-shadow: 0 0 10px rgba(226, 184, 92, 0.6); }
#toast { background: var(--panel-bg); border-color: var(--line-2); font-family: var(--font-deco); font-size: 17px; font-weight: 700; letter-spacing: 0.06em; }
.overlay { background: radial-gradient(ellipse at 50% 40%, rgba(60, 30, 20, 0.78), rgba(8, 4, 2, 0.93)); }
@media (max-width: 1100px) { .brand { font-size: 26px; } .nav-tab { font-size: 15px; padding: 4px 12px 0; } }
@media (max-width: 640px) { .brand { font-size: 22px; padding-left: 30px; } .brand::before { width: 24px; height: 24px; margin-top: -12px; } .nav-tab { font-size: 14px; } .stage-head h2 { font-size: 28px; } .result-big { font-size: 56px; } }

/* ---------- admin menu ---------- */
.admin-btn { color: var(--accent); font-size: 22px; }
.admin-menu { z-index: 9500; }
.admin-panel { width: min(860px, 96vw); align-items: stretch; text-align: left; gap: 12px; }
.admin-head { display: flex; align-items: center; gap: 14px; }
.admin-head h2 { font-size: 40px; background: linear-gradient(180deg, #fbecc4, var(--accent) 60%, #c98a3a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.admin-head .small { flex: 1; }
.admin-body { overflow-y: auto; touch-action: pan-y; min-height: 0; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; padding: 4px 2px 6px; }
.admin-power {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 104px; padding: 12px 14px; text-align: left;
  border-radius: var(--r); border: 1px solid var(--line-2); background: var(--card-bg); color: var(--text); box-shadow: var(--card-hi), 0 3px 0 rgba(26, 18, 12, 0.6);
  transition: transform 0.1s, border-color 0.12s;
}
.admin-power:hover { transform: translateY(-3px); border-color: rgba(226, 184, 92, 0.7); }
.admin-power .ap-icon { font-size: 28px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4)); }
.admin-power b { font-family: var(--font-display); font-weight: 800; font-size: 19px; text-transform: uppercase; letter-spacing: 0.02em; }
.admin-power .ap-desc { font-size: 13.5px; color: #ded1c7; line-height: 1.3; }
.admin-power .ap-state { position: absolute; top: 10px; right: 10px; font-style: normal; font-family: var(--font-display); font-weight: 900; font-size: 14px; padding: 2px 9px; border-radius: 999px; background: rgba(30, 22, 15, 0.6); color: var(--dim); }
.admin-power.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 0 22px rgba(226, 184, 92, 0.35); background: linear-gradient(180deg, #67584d, #534439); }
.admin-power.on .ap-state { background: var(--accent); color: var(--accent-ink); }

/* ---------- the elevator with the menus hidden (H): just look around ---------- */
body.hall-clear #home-progress, body.hall-clear #hub-chooser, body.hall-clear .arrival, body.hall-clear .riding-pill, body.hall-clear .floors-fab { display: none !important; }
.hall-menus { position: absolute; z-index: 4; left: calc(20px + var(--safe-l)); bottom: 20px; }
.hall-menus kbd { font: 700 12px var(--font-body); padding: 2px 6px; border-radius: 6px; background: rgba(30, 22, 15, 0.6); border: 1px solid var(--line-2); margin-left: 4px; }
@media (pointer: coarse) { .hall-menus kbd { display: none; } }

/* ---------- arcade shows: letterbox bars, flash, title cards, Pokémon text box, glitch (hub/shows/kit.js) ---------- */
.show-overlay { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity 0.3s; }
.show-overlay.on { opacity: 1; }
.show-bar { position: absolute; left: 0; right: 0; height: 12vh; background: #000; transition: transform 0.6s cubic-bezier(.2,.8,.2,1); }
.show-bar.top { top: 0; transform: translateY(-100%); }
.show-bar.bottom { bottom: 0; transform: translateY(100%); }
.show-overlay.bars .show-bar { transform: none; }
.show-flash { position: absolute; inset: 0; opacity: 0; }
.show-title { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%) scale(0.6); opacity: 0; text-align: center; transition: transform 0.5s cubic-bezier(.2,1.6,.4,1), opacity 0.25s; padding: 0 5vw; }
.show-title.in { transform: translateY(-50%) scale(1); opacity: 1; }
.show-title h1 { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 900; text-transform: uppercase; font-size: clamp(44px, 8vw, 120px); line-height: 0.95; letter-spacing: 0.01em; }
.show-title p { margin: 10px 0 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(18px, 2.4vw, 32px); letter-spacing: 0.06em; text-transform: uppercase; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5); }
.show-title.hero h1 { background: linear-gradient(180deg, #ffffff 20%, #e0cdbe 60%, #c79975); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 0 #433022) drop-shadow(0 0 30px rgba(204, 163, 131, 0.7)); }
.show-title.gold h1 { background: linear-gradient(180deg, #fff6c2 15%, #e2b85c 55%, #ff9a1a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 0 #6b3a00) drop-shadow(0 0 28px rgba(212, 165, 72, 0.7)); }
.show-title.circus h1 { font-style: normal; letter-spacing: 0.02em; background: linear-gradient(90deg, #ff3b5c, #ffb02e, #efcf7a, #3ddc84, #c79975, #da90a2, #ff3b5c); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: circus-slide 2s linear infinite; filter: drop-shadow(0 5px 0 #4a0f2a) drop-shadow(0 0 22px rgba(255, 80, 160, 0.6)); }
.show-title.circus p { color: #efcf7a; }
@keyframes circus-slide { to { background-position: 200% 0; } }
.show-title.royal h1 { font-style: normal; background: linear-gradient(180deg, #faf7f5 10%, #e6d7cc 50%, #b3967f); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 0 #44352a) drop-shadow(0 0 26px rgba(218, 195, 177, 0.7)); }
.show-title.green h1 { background: linear-gradient(180deg, #eaffd8 10%, #4dff9a 55%, #12a860); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 0 #063a22) drop-shadow(0 0 28px rgba(60, 255, 150, 0.7)); }
.show-title.glitch h1 { color: #f3e9a2; text-shadow: -4px 0 #ff2a6a, 4px 0 #2ae4ff; animation: glitch-jit 0.18s steps(2) infinite; font-style: normal; }
.show-title.pixel h1 { font-family: ui-monospace, 'Courier New', monospace; font-style: normal; letter-spacing: 0.08em; color: #7dfbff; text-shadow: 4px 4px 0 #ff3bd4, 8px 8px 0 #2c2118; }
@keyframes glitch-jit { 0% { transform: translate(2px, -1px) skewX(4deg); } 50% { transform: translate(-3px, 1px) skewX(-6deg); } 100% { transform: translate(1px, 2px); } }
.show-box { position: absolute; left: 50%; bottom: calc(12vh + 18px); width: min(860px, 88vw); transform: translate(-50%, 30px); opacity: 0; transition: transform 0.3s, opacity 0.25s;
  background: #f8f8f0; border: 5px solid #746152; border-radius: 14px; box-shadow: inset 0 0 0 4px #e0cdbe, 0 10px 30px rgba(0, 0, 0, 0.5); padding: 18px 26px 22px; }
.show-box.in { transform: translate(-50%, 0); opacity: 1; }
.show-box p { margin: 0; font: 700 clamp(18px, 2.2vw, 28px)/1.35 var(--font-body); color: #35322f; min-height: 2.7em; }
.show-box i { position: absolute; right: 20px; bottom: 12px; width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 12px solid #e8433a; animation: box-arrow 0.7s ease-in-out infinite; }
@keyframes box-arrow { 50% { transform: translateY(4px); } }
.show-glitch { position: absolute; inset: 0; opacity: 0; mix-blend-mode: screen; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 5px); }
.show-glitch.on { opacity: 1; animation: glitch-bars 0.25s steps(3) infinite; }
.show-glitch.on::before, .show-glitch.on::after { content: ''; position: absolute; left: 0; right: 0; height: 9%; background: rgba(255, 40, 120, 0.35); animation: glitch-slice 0.4s steps(4) infinite; }
.show-glitch.on::after { background: rgba(40, 220, 255, 0.35); animation-duration: 0.33s; animation-direction: reverse; }
@keyframes glitch-bars { 0% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 100% { transform: translateX(-2px); } }
@keyframes glitch-slice { 0% { top: 10%; } 25% { top: 64%; } 50% { top: 33%; } 75% { top: 82%; } 100% { top: 48%; } }
/* while a show plays the hall's cards step aside (the overlay and End animation stay) */
body.show-on #home-progress, body.show-on #hub-chooser, body.show-on #hall-menus, body.show-on .arrival, body.show-on .riding-pill, body.show-on .floors-fab { display: none !important; }
#admin-stop { z-index: 6; }
body.show-on #topbar { display: none; }

/* ---- lobby who's-who (games with a lineup, e.g. Bounty Hunter): each side, its people and bots, pick a side ---- */
#roles:has(.lineup) { display: block; }
.lineup { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; }
@media (max-width: 760px) { .lineup { grid-template-columns: 1fr; } }
.lineup-side { position: relative; padding: 14px 16px 16px; border-radius: 16px; background: linear-gradient(180deg, rgba(58, 47, 38, .92), rgba(33, 26, 21, .92)); border: 1px solid rgba(224, 205, 191, .16); box-shadow: inset 0 3px 0 var(--c); }
.lineup-side.mine { border-color: var(--c); box-shadow: inset 0 3px 0 var(--c), 0 0 0 2px color-mix(in srgb, var(--c) 45%, transparent); }
.ls-head { display: flex; align-items: center; gap: 8px; font: 800 22px/1 "Barlow Condensed", Barlow, sans-serif; text-transform: uppercase; letter-spacing: .04em; color: var(--c); }
.ls-count { margin-left: auto; font-size: 15px; color: #ccc1b8; }
.ls-desc { margin: 6px 0 10px; font: 500 14px/1.35 Barlow, sans-serif; color: #e3d9d2; }
.ls-list { display: flex; flex-direction: column; gap: 6px; }
.ls-chip { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); font: 700 15px Barlow, sans-serif; color: #f5f4e9; }
.ls-chip.you { background: color-mix(in srgb, var(--c) 22%, rgba(255, 255, 255, .04)); }
.ls-chip.bot span { color: #e3d9d2; }
.ls-chip em { margin-left: auto; font: 500 12px Barlow, sans-serif; color: #b6a99f; font-style: normal; }
.ls-pick { width: 100%; margin-top: 10px; }
.ls-you { margin-top: 10px; text-align: center; font: 800 13px "Barlow Condensed", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }

/* per-game rank + gear (lobby) */
.kit.locked { opacity: 0.55; filter: grayscale(0.6); }
.kit .theirs.lock { background: #5f5751; }
#rank-section .rank-body { display: flex; flex-direction: column; gap: 8px; padding: 6px 2px 4px; }
#rank-section .rank-bar { width: 100%; height: 12px; accent-color: #facc15; }
#rank-section .rank-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; font-size: 15px; color: var(--muted); }
#rank-section .rank-list li.got { color: #d9f99d; }

/* ---------- one-line help: bubble (hub/help.js), the small "i", captions under lobby choices ---------- */
#help-bubble { position:fixed; z-index:10000; max-width:300px; padding:9px 12px; border-radius:10px; border:1px solid #756a61; background:linear-gradient(135deg,var(--card2),var(--card)); color:var(--text); font:600 14px/1.35 var(--font-body); text-align:left; box-shadow:0 8px 24px #0009; pointer-events:none; animation:help-in .12s ease-out; }
#help-bubble::before { content:''; position:absolute; left:calc(var(--ax,50%) - 6px); top:-6px; width:10px; height:10px; background:var(--card2); border:1px solid #756a61; border-width:1px 0 0 1px; transform:rotate(45deg); }
#help-bubble.up::before { top:auto; bottom:-6px; border-width:0 1px 1px 0; background:var(--card); }
#help-bubble p { margin:0; padding:2px 0; color:var(--muted); }
#help-bubble p b { color:var(--text); }
#help-bubble p.on b { color:var(--yellow); }
#help-bubble p.on { color:var(--text); }
@keyframes help-in { from { opacity:0; transform:translateY(2px); } }
.help-i, #ggm button.help-i, #set2 button.help-i, #ggm button.help-i:hover { position:relative; display:inline-grid; place-items:center; flex:none; width:20px; height:20px; min-width:0; min-height:0; margin:0 0 0 6px; padding:0; border-radius:50%; border:1.5px solid var(--muted); background:transparent; color:var(--muted); font:italic 800 13px/1 Georgia,serif; vertical-align:middle; cursor:help; box-shadow:none; }
.help-i::after { content:''; position:absolute; inset:-12px; }
.help-i:hover, .help-i[aria-describedby], #ggm button.help-i[aria-describedby] { color:var(--yellow); border-color:var(--yellow); }
.opt-line .opt-name { display:flex; align-items:center; }
.opt-help { display:block; margin-top:-2px; font-size:13px; font-weight:600; line-height:1.3; color:var(--muted); }
#hub-play small { display:block; font-size:13px; font-weight:700; line-height:1.25; color:inherit; opacity:.85; margin-top:2px; white-space:normal; }

/* ---------- Arcade Night: a session of several games in a row (hub/night-panel.js, arcade-night.js) ---------- */
.hub-chooser .night-launch, .night-launch { width: 100%; margin-bottom: 14px; padding: 14px; text-align: left; font-size: 20px; color: var(--accent-2); border: 1px solid var(--accent-deep); background: linear-gradient(120deg, var(--raised-2), #1c4a62); }
.night-launch span { display: block; margin-top: 4px; font-size: 16px; color: var(--muted); font-weight: 500; }
#rejoin-crew { width: 100%; margin-bottom: 14px; }
#night-screen { z-index: 45; animation: none; }
.night-panel { width: 860px; max-width: 96vw; min-width: 0; align-items: stretch; text-align: left; padding: 24px; gap: 16px; max-height: 94vh; overflow-y: auto; }
.night-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.night-heading h2 { font-size: 30px; }
.night-form { display: flex; flex-direction: column; gap: 16px; }
.night-copy { font-size: 16px; line-height: 1.5; color: var(--muted); margin: 0; }
.night-field { display: flex; justify-content: space-between; gap: 16px; align-items: center; font-size: 18px; font-weight: 700; }
.night-field select { padding: 12px; min-height: 48px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--raised); color: var(--text); font: inherit; }
.night-check { display: flex; gap: 12px; align-items: center; min-height: 48px; font-size: 18px; cursor: pointer; }
.night-check input { width: 24px; height: 24px; flex: none; accent-color: var(--accent); }
.night-game-pool { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.night-game-choice { padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--raised); font-size: 16px; }
.night-game-choice.on { border-color: var(--accent); background: var(--accent-soft); }
.night-game-choice small { display: block; margin-top: 5px; color: var(--muted); font-size: 14px; }
.night-lobby { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; padding: 12px 16px; border: 1px solid var(--accent-deep); border-radius: var(--r); background: var(--accent-soft); font-size: 16px; }
.night-lobby span { flex: 1; }
#night-results { display: flex; flex-direction: column; align-items: stretch; gap: 16px; width: 100%; min-width: 0; }
.night-standings { width: 100%; border-collapse: collapse; font-size: 16px; text-align: left; }
.night-standings td, .night-standings th { padding: 10px 8px; border-bottom: 1px solid var(--line-2); overflow-wrap: anywhere; }
.night-standings td:nth-child(2) { max-width: 190px; }
.night-standings th { color: var(--muted); }
.night-vote-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.night-vote { min-height: 90px; font-size: 18px; border: 2px solid var(--line-2); background: var(--raised); }
.night-vote small { display: block; font-size: 16px; margin-top: 8px; color: var(--muted); }
.night-vote.on { border-color: var(--accent); background: var(--accent-soft); }
.night-countdown { color: var(--accent-2); font-size: 20px; font-weight: 800; }
.night-trophy { color: var(--accent-2); font-size: 24px; }
.night-cup { animation: night-celebrate 0.65s ease-out; }
@keyframes night-celebrate { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .night-cup { animation: none; } }
body.party-playing #game-3d, body.party-playing #game-canvas { top: calc(32px + var(--safe-t)); height: calc(100% - 32px - var(--safe-t) - var(--safe-b)); }
#party-badge { position: fixed; pointer-events: none; top: var(--safe-t); left: var(--safe-l); width: calc(100% - var(--safe-l) - var(--safe-r)); height: 32px; padding: 5px 10px; background: #102b3d; color: #b1fff0; z-index: 10; font-size: 16px; line-height: 22px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) { .night-game-pool { grid-template-columns: repeat(2, minmax(0, 1fr)); } .night-panel { padding: 16px; max-width: 96vw; } .night-vote-grid { grid-template-columns: 1fr; } .night-vote { min-height: 64px; } .night-standings td, .night-standings th { padding: 8px 5px; } .night-field { flex-wrap: wrap; } }

/* ---------- the elevator on short screens (iPhone sideways): the directory becomes a sheet behind a Floors button ---------- */
@media (max-height: 500px) {
  .hub-chooser { left: 8px; right: 8px; top: 8px; bottom: 8px; width: auto; display: none; z-index: 5; }
  .hub-chooser.sheet-open { display: flex; animation: arrive 0.25s ease-out; }
  .floors-fab { display: inline-flex; position: absolute; z-index: 4; right: calc(12px + var(--safe-r)); bottom: 10px; }
  .arrival, .riding-pill { left: calc(10px + var(--safe-l)); right: calc(150px + var(--safe-r)); bottom: 10px; max-width: 460px; }
  .arrival { padding: 8px 12px; }
  .arrival h2 { font-size: 24px; margin: 2px 0 6px; }
  .arrival .eyebrow { font-size: 10px; }
  .arrival-meta { display: none; }
  .arrival .btn.big { min-height: 44px; font-size: 15px; }
  #home-progress { display: none; }
  .dir-services .floor-btn.compact .floor-text b { font-size: 11px; }
  .lock-label, .me-chip b, .brand .app-version { display: none; }
  .nav-tab { padding: 4px 10px 0; }
}

/* Arcade Night and Rejoin sit under the floor directory's heading (hub/directory.js keeps them in the panel) */
.hub-chooser.directory > .night-launch, .hub-chooser.directory > #rejoin-crew { flex: none; width: auto; margin: 0 0 10px; padding: 10px 14px; font-size: 16px; text-align: left; white-space: normal; overflow: visible; text-overflow: clip; letter-spacing: .04em; line-height: 1.25; }
.hub-chooser.directory > .night-launch span { margin-top: 3px; font-size: 13px; white-space: normal; letter-spacing: 0; text-transform: none; }
/* ---------- the hotel on foot: the Check In banner, being on fire, splashes, the stairwell blink ---------- */
/* the arrival card becomes a slim banner at the top: what floor you're on and one button to play */
.arrival { top: 14px; bottom: auto; max-width: 460px; padding: 10px 16px 12px; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "eye go" "title go" "meta go" "extra extra"; column-gap: 14px; align-items: center; text-align: left; }
.arrival .eyebrow { grid-area: eye; font-size: 11px; }
.arrival h2 { grid-area: title; font-size: 28px; margin: 2px 0; }
.arrival-blurb { display: none; }
.arrival-meta { grid-area: meta; justify-content: flex-start; margin: 4px 0 0; }
.arrival-extra { grid-area: extra; margin: 10px 0 0; max-width: none; }
.arrival .row { grid-area: go; }
.arrival::before { top: auto; bottom: -1px; border-radius: 3px 3px 0 0; }
.arrival .btn.big { min-height: 52px; }
.riding-pill { top: 18px; bottom: auto; }
.arrival-extra .tips { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.tips strong { font: 700 13px var(--font-deco); letter-spacing: .14em; color: var(--accent); }
.tips ol { margin: 6px 0 0; padding-left: 20px; }
.tips li { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.tips li em { font-style: normal; color: var(--muted); }
/* where the elevator car is right now, in the directory */
.floor-btn.car .floor-num::after { content: ''; position: absolute; width: 10px; height: 10px; margin: 30px 0 0 30px; border-radius: 2px; background: #9fe6c0; box-shadow: 0 0 8px #9fe6c0; }
.floor-btn .floor-num { position: relative; }
/* your screen: on fire, splashed, blinking through a stairwell door */
.hub-fx { position: absolute; inset: 0; z-index: 2; pointer-events: none; transition: background .4s, box-shadow .4s; }
.hub-fx.burning { box-shadow: inset 0 0 120px 30px rgba(255, 110, 20, .75); animation: burn .35s steps(2) infinite; }
@keyframes burn { 50% { box-shadow: inset 0 0 150px 40px rgba(255, 70, 0, .8); } }
.hub-fx.blink { background: #000; transition: background .15s; }
.hub-splash { position: absolute; inset: -10%; background: radial-gradient(circle at 30% 40%, var(--c) 0 18%, transparent 19%), radial-gradient(circle at 62% 55%, var(--c) 0 24%, transparent 25%), radial-gradient(circle at 45% 70%, var(--c) 0 14%, transparent 15%), radial-gradient(circle at 75% 30%, var(--c) 0 10%, transparent 11%); animation: splash 2.6s ease-in forwards; }
@keyframes splash { 0% { opacity: 1; transform: scale(.9); } 15% { transform: scale(1); } 70% { opacity: .9; } 100% { opacity: 0; transform: translateY(12%); } }
/* on a touch screen the directory lives behind the Floors button, leaving the right side for your thumbs */
body.touch-hub .hub-chooser { left: 8px; right: 8px; top: 8px; bottom: 8px; width: auto; display: none; z-index: 5; }
body.touch-hub .hub-chooser.sheet-open { display: flex; }
body.touch-hub .floors-fab { display: inline-flex; position: absolute; z-index: 4; right: calc(12px + var(--safe-r)); top: 12px; bottom: auto; }
body.touch-hub .arrival, body.touch-hub .riding-pill { left: calc(12px + var(--safe-l)); right: auto; top: 12px; margin: 0; max-width: min(420px, 46vw); }
body.touch-hub #home-progress { display: none; }
#home-progress { top: auto; bottom: 16px; }
.hub-hint { position: absolute; z-index: 3; left: calc(16px + var(--safe-l)); right: calc(412px + var(--safe-r)); bottom: 18px; margin: 0 auto; width: max-content; max-width: 90%; padding: 8px 14px; border-radius: 999px; background: rgba(14, 9, 6, .78); border: 1px solid var(--line-2); font: 600 13px var(--font-body); color: var(--muted); pointer-events: none; }
.hub-hint b { color: var(--accent); }
.hub-hint kbd { padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-2); font: 700 11px var(--font-deco); color: var(--text); }
body.show-on .hub-hint, body.hall-clear .hub-hint { display: none; }
.arrival { max-width: 540px; }
.arrival h2 { white-space: nowrap; font-size: 26px; }
.arrival .eyebrow { white-space: nowrap; }
@media (max-width: 1100px) { .hub-hint { right: calc(372px + var(--safe-r)); } }
