/* Crypto Underground Pinball — UI layer
   Layout: the table canvas fills the screen; overlays float above it.
   Visual language: London Underground signage (roundel, enamel panels,
   amber departure boards) lit like a neon server room. */
:root {
  --void: #05060d;
  --panel: rgba(11, 13, 32, 0.86);
  --panel-solid: #0b0e22;
  --edge: rgba(150, 160, 255, 0.22);
  --ink: #eef0ff;
  --dim: #a3abd2;
  --red: #e3241b;
  --red-hot: #ff4a36;
  --blue: #1c2bb8;
  --amber: #ffa21f;
  --amber-dim: #6b3b05;
  --cyan: #2be4ff;
  --magenta: #ff2fd2;
  --purple: #9b5cff;
  --cta: #00ff88;            /* conversion actions only (Discord) */
  --display: 'Orbitron', 'Rajdhani', 'Arial Narrow', sans-serif;
  --body: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; background: var(--void); color: var(--ink); font-family: var(--body); font-size: 17px; }
body { overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(120% 90% at 50% 20%, #120c2e 0%, var(--void) 60%); touch-action: none; user-select: none; -webkit-user-select: none; }
.table { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; outline: none; }

/* 2D mode: DMD panel */
.dmd-wrap { position: absolute; padding: 6px; border-radius: 10px; background: linear-gradient(#1a1d33, #0a0b14); box-shadow: 0 0 0 1px #2a2f55, 0 10px 40px rgba(0,0,0,0.6), 0 0 30px rgba(255,140,20,0.15); }
.dmd { display: block; width: 100%; height: 100%; border-radius: 4px; background: #000; }
/* 3D, close camera: the DMD floats at the top of the screen */
.dmd-wrap.dmd-float { left: 10px; top: 10px; left: max(10px, env(safe-area-inset-left, 0px)); top: max(10px, env(safe-area-inset-top, 0px)); z-index: 4; padding: 5px; border-radius: 9px; background: linear-gradient(rgba(26,29,51,0.9), rgba(10,11,20,0.9)); box-shadow: 0 0 0 1px rgba(60,66,120,0.8), 0 8px 30px rgba(0,0,0,0.55), 0 0 26px rgba(255,140,20,0.18); pointer-events: none; }

/* HUD */
.hud { position: absolute; top: max(10px, env(safe-area-inset-top, 0px)); right: var(--gutter-r); display: flex; gap: 8px; z-index: 5; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--edge); background: rgba(8, 9, 22, 0.66); display: grid; place-items: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.icon-btn svg { width: 20px; height: 20px; fill: var(--ink); stroke: var(--ink); }
.icon-btn.off .wave { display: none; }
.icon-btn.off svg { opacity: 0.55; }
.icon-btn:hover { border-color: var(--cyan); box-shadow: 0 0 14px rgba(43,228,255,0.35); }
.app[data-mode="attract"] .hud, .app[data-mode="boot"] .hud { display: none; }

.replay-bar { position: absolute; z-index: 6; left: 50%; transform: translateX(-50%); top: max(10px, env(safe-area-inset-top, 0px)); display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 14px; border-radius: 999px; background: rgba(8,9,22,0.82); border: 1px solid var(--edge); font-family: var(--display); font-size: 13px; letter-spacing: 0.04em; max-width: calc(100% - 140px); white-space: nowrap; }
.replay-tag { color: var(--red-hot); font-weight: 900; }
#replayWho { overflow: hidden; text-overflow: ellipsis; color: var(--amber); }
.replay-ctrls { display: flex; gap: 6px; }

/* touch */
.touch { position: absolute; inset: 0; z-index: 2; display: none; }
.app.is-touch[data-mode="play"] .touch, .app.is-touch[data-mode="replay"] .touch { display: block; }
.app.is-touch[data-mode="replay"] .tz { display: none; }
.tz { position: absolute; top: 0; bottom: 0; width: 50%; display: flex; align-items: flex-end; justify-content: center; padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)); }
.tz-left { left: 0; } .tz-right { right: 0; }
.tz span { font-family: var(--display); font-size: 11px; letter-spacing: 0.2em; color: rgba(255,255,255,0.22); padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.08); transition: color .1s, border-color .1s, background .1s; }
.tz.on span { color: #fff; border-color: var(--cyan); background: rgba(43,228,255,0.18); }
.tz-right.on span { border-color: var(--magenta); background: rgba(255,47,210,0.18); }
.launch { position: absolute; right: var(--gutter-r); bottom: calc(max(14px, env(safe-area-inset-bottom, 0px)) + 54px); width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--red); background: radial-gradient(circle at 50% 38%, #2a1020, #120614); color: #fff; font-family: var(--display); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; line-height: 1.25; overflow: hidden; box-shadow: 0 0 22px rgba(227,36,27,0.55); z-index: 3; }
.launch span { position: relative; z-index: 2; }
.launch i { position: absolute; left: 0; right: 0; bottom: 0; height: 0%; background: linear-gradient(0deg, rgba(255,162,31,0.9), rgba(255,47,210,0.6)); z-index: 1; }
.launch.on { transform: scale(0.96); }

/* overlays */
.overlay { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-bottom, 0px)); background: radial-gradient(80% 70% at 50% 45%, rgba(5,6,13,0.35), rgba(5,6,13,0.82)); overflow-y: auto; touch-action: pan-y; user-select: text; -webkit-user-select: text; }
.overlay[hidden] { display: none; }
.panel { width: min(560px, 100%); background: var(--panel); border: 1px solid var(--edge); border-radius: 18px; padding: 26px 26px 22px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 30px 80px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06); display: grid; gap: 16px; }
.panel-narrow { width: min(400px, 100%); }
.panel-wide { width: min(820px, 100%); }
.panel-title { margin: 0; font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: 0.06em; text-transform: uppercase; text-wrap: balance; }
.panel-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.stack { display: grid; gap: 10px; }
.stack-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.btn { min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--edge); background: rgba(255,255,255,0.04); font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; transition: border-color .15s, background .15s, box-shadow .15s; }
.btn:hover { border-color: var(--cyan); background: rgba(43,228,255,0.08); }
.btn-primary { background: linear-gradient(180deg, #2437d6, #15209a); border-color: #4a5cff; box-shadow: 0 0 0 2px rgba(227,36,27,0.85), 0 8px 24px rgba(28,43,184,0.45); }
.btn-primary:hover { background: linear-gradient(180deg, #2e43ee, #1a27b4); box-shadow: 0 0 0 2px var(--red-hot), 0 0 26px rgba(43,228,255,0.35); }
.btn-ghost { background: transparent; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--edge); background: rgba(255,255,255,0.04); font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }
.chip[aria-selected="true"], .chip.on { border-color: var(--amber); color: var(--amber); background: rgba(255,162,31,0.1); }
.chip-red { border-color: rgba(227,36,27,0.7); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* start screen */
.start { width: min(560px, 100%); display: grid; justify-items: center; gap: 18px; text-align: center; }
.start-head { display: grid; justify-items: center; gap: 6px; }
.start-logo { width: min(200px, 46vw); height: auto; filter: drop-shadow(0 0 22px rgba(227,36,27,0.45)) drop-shadow(0 0 40px rgba(155,92,255,0.35)); }
.title { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(22px, 5.4vw, 34px); letter-spacing: 0.04em; line-height: 1.1; text-transform: uppercase; text-wrap: balance; }
.title span { display: block; color: var(--amber); font-size: 0.72em; letter-spacing: 0.42em; text-shadow: 0 0 14px rgba(255,162,31,0.55); padding-left: 0.42em; }
.start-hint { margin: -6px 0 0; color: var(--dim); font-size: 15px; letter-spacing: 0.04em; }
.start-links { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; }
.link-btn { border: 0; background: none; padding: 6px 2px; font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); border-bottom: 2px solid rgba(155,92,255,0.6); }
.link-btn:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
.start-foot { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: center; }
.back-link { color: var(--dim); font-size: 15px; text-decoration: none; border-bottom: 1px solid rgba(163,171,210,0.4); }
.back-link:hover { color: var(--ink); }
.cta-discord { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px; background: var(--cta); color: #00140a; font-family: var(--display); font-weight: 900; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; box-shadow: 0 0 22px rgba(0,255,136,0.35); }

/* the roundel PLAY button */
.roundel-btn { position: relative; width: 210px; height: 150px; border: 0; background: none; padding: 0; display: grid; place-items: center; }
.rb-ring { position: absolute; width: 150px; height: 150px; border-radius: 50%; border: 26px solid var(--red); background: radial-gradient(circle, #170a26 0%, #0b0716 70%); box-shadow: 0 0 30px rgba(227,36,27,0.55), inset 0 0 20px rgba(0,0,0,0.6); transition: box-shadow .2s, transform .2s; }
.rb-bar { position: relative; width: 210px; padding: 10px 0 9px; background: linear-gradient(180deg, #2437d6, #13208f); border: 1px solid rgba(255,255,255,0.35); font-family: var(--display); font-weight: 900; font-size: 24px; letter-spacing: 0.32em; padding-left: 0.32em; color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
.roundel-btn:hover .rb-ring { box-shadow: 0 0 46px rgba(255,74,54,0.8), inset 0 0 20px rgba(0,0,0,0.6); transform: scale(1.04); }
.roundel-btn:focus-visible { outline: none; }
.roundel-btn:focus-visible .rb-ring { box-shadow: 0 0 0 4px var(--amber), 0 0 46px rgba(255,74,54,0.8), inset 0 0 20px rgba(0,0,0,0.6); }
.roundel-btn:active .rb-ring { transform: scale(0.97); }
@media (prefers-reduced-motion: no-preference) {
  .roundel-btn .rb-ring { animation: breathe 2.6s ease-in-out infinite; }
  @keyframes breathe { 50% { box-shadow: 0 0 44px rgba(255,74,54,0.75), inset 0 0 20px rgba(0,0,0,0.6); } }
}

/* departure-board leaderboard */
.board { position: relative; background: #050302; border-radius: 10px; border: 1px solid #2b1a08; padding: 10px 14px; font-family: var(--display); font-weight: 700; color: var(--amber); text-shadow: 0 0 8px rgba(255,140,20,0.55); overflow: hidden; min-height: 120px; }
.board::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle, rgba(0,0,0,0) 52%, rgba(0,0,0,0.42) 62%) 0 0 / 3px 3px; }
.board-mini { width: min(420px, 100%); font-size: 13px; min-height: 0; }
.brow { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed rgba(255,162,31,0.16); font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.brow:last-child { border-bottom: 0; }
.brow .rk { color: #ffcf7a; }
.brow .nm { display: flex; align-items: center; gap: 7px; min-width: 0; text-align: left; }
.brow .nm .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.brow .sc { text-align: right; }
.brow .watch { pointer-events: auto; position: relative; z-index: 2; font-family: var(--display); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; color: #ffdca8; background: rgba(255,162,31,0.12); border: 1px solid rgba(255,162,31,0.45); border-radius: 999px; padding: 4px 9px; }
.brow .watch:hover { background: rgba(255,162,31,0.25); }
.brow .watch svg { display: none; width: 10px; height: 10px; fill: currentColor; }
.brow .watch[disabled] { visibility: hidden; }
.brow.me { color: #fff3d6; }
.board-empty { padding: 18px 4px; color: #c97b18; letter-spacing: 0.06em; }
.board-head { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto auto; gap: 10px; font-size: 10px; color: #b56d10; letter-spacing: 0.18em; padding-bottom: 6px; border-bottom: 1px solid rgba(255,162,31,0.3); }
.board-note { margin: 0; color: var(--dim); font-size: 14px; text-align: center; }
.verified { flex: none; color: #ffd38a; font-size: 9px; letter-spacing: 0.1em; opacity: 0.8; }
.board-cap { font-size: 9.5px; letter-spacing: 0.2em; color: #b56d10; padding-bottom: 5px; margin-bottom: 2px; border-bottom: 1px solid rgba(255,162,31,0.3); text-align: left; }
.tabs-wrap { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }

/* members: picture, name and role badge, the way the site's chat shows people */
.av { flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #22253f; color: #fff; font-family: var(--display); font-weight: 800; font-size: 15px; text-shadow: none; box-shadow: 0 0 0 1px rgba(255,255,255,0.14); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.guest { background: #151a2e; }
.av.guest svg { width: 62%; height: 62%; fill: #8d9ab8; }
.brow .av { position: relative; z-index: 2; width: 22px; height: 22px; font-size: 11px; }
.board-mini .brow .av { width: 20px; height: 20px; font-size: 10px; }
.badge { flex: none; display: inline-block; padding: 2px 8px; border-radius: 999px; font-family: var(--body); font-size: 12px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.35; white-space: nowrap; text-shadow: none; }
.badge.guest { background: none; color: #9fb3c7; box-shadow: inset 0 0 0 1px rgba(227,244,248,0.3); font-weight: 600; }
.brow .badge { position: relative; z-index: 2; font-size: 10px; padding: 1px 6px; }
.who { width: min(420px, 100%); display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(8,9,22,0.62); border: 1px solid var(--edge); text-align: left; }
.who-text { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.who-line { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; font-size: 16px; color: var(--dim); }
.who-line > span:first-child { white-space: nowrap; }
.who-line b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: 0.03em; }
.who-sub { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.3; }
.who-over { width: 100%; }
.btn-login { flex: none; min-height: 40px; padding: 0 16px; border-color: rgba(255,162,31,0.6); color: #ffd38a; }
.btn-login:hover { border-color: var(--amber); background: rgba(255,162,31,0.12); box-shadow: 0 0 16px rgba(255,162,31,0.25); }
.btn-link { display: inline-flex; align-items: center; text-decoration: none; }
.post { display: grid; gap: 10px; }

/* member login over the game */
.login-ov { z-index: 14; }
.login-panel { width: min(480px, 100%); gap: 12px; }
.login-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.login-head .icon-btn svg { fill: none; stroke: var(--ink); }
.login-sub { margin: 0; color: var(--dim); font-size: 15px; line-height: 1.35; }
.login-frame { position: relative; height: min(500px, 58vh); min-height: 300px; border-radius: 12px; overflow: hidden; background: #070812; border: 1px solid var(--edge); }
.login-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.login-wait { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; margin: 0; padding: 20px; color: var(--dim); font-size: 15px; text-align: center; pointer-events: none; }

/* game over */
.final-score { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(30px, 8vw, 48px); color: var(--amber); text-shadow: 0 0 22px rgba(255,162,31,0.55); text-align: center; font-variant-numeric: tabular-nums; }
.final-sub { margin: -8px 0 0; text-align: center; color: var(--dim); }
.name-form { display: grid; gap: 8px; }
.name-form label { font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--cyan); text-transform: uppercase; }
.name-row { display: flex; flex-wrap: wrap; gap: 10px; }
.name-row input { flex: 1 1 180px; min-width: 0; min-height: 46px; border-radius: 12px; border: 1px solid #4a3010; background: #050302; color: var(--amber); font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: 0.12em; text-transform: uppercase; padding: 0 14px; }
.name-row input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,162,31,0.25); }
.form-note { margin: 0; min-height: 1.2em; color: var(--dim); font-size: 15px; }
.form-note.err { color: #ff8a7a; }
.form-note.ok { color: #ffd38a; }

/* help */
.help h3 { margin: 0 0 8px; font-family: var(--display); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px 28px; }
.help-grid > div { min-width: 0; }
.keys { border-collapse: collapse; width: 100%; font-size: 16px; }
.keys th { text-align: left; font-weight: 700; padding: 6px 12px 6px 0; vertical-align: top; color: var(--dim); white-space: nowrap; }
.keys td { padding: 6px 0; }
kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--edge); background: rgba(255,255,255,0.06); font-family: var(--display); font-size: 11px; text-align: center; }
.rules { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 16px; line-height: 1.35; max-width: 62ch; }
.rules b { color: #fff; }

/* settings */
.settings { display: grid; gap: 12px; }
.tog { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.tog input { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: 999px; background: #22253f; border: 1px solid var(--edge); position: relative; flex: none; transition: background .15s; }
.tog input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #9aa3c8; transition: transform .15s, background .15s; }
.tog input:checked { background: #13208f; border-color: #4a5cff; }
.tog input:checked::after { transform: translateX(20px); background: #fff; }
.seg { border: 1px solid var(--edge); border-radius: 12px; padding: 10px 12px 12px; display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.seg legend { font-family: var(--display); font-size: 11px; letter-spacing: 0.14em; color: var(--dim); padding: 0 6px; text-transform: uppercase; }
.seg label { flex: 1 1 auto; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--edge); font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; cursor: pointer; }
.seg input:checked + span { border-color: var(--amber); color: var(--amber); background: rgba(255,162,31,0.1); }
.seg input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.seg-gfx label { flex: 1 1 28%; }
.set-note { margin: -4px 2px 2px; font-size: 14px; line-height: 1.35; color: var(--dim); }
/* Settings → Show frame rate */
.perf-hud { position: absolute; z-index: 9; left: max(8px, env(safe-area-inset-left, 0px)); bottom: max(8px, env(safe-area-inset-bottom, 0px)); padding: 4px 9px; border-radius: 8px; background: rgba(4,5,14,0.72); border: 1px solid rgba(255,255,255,0.08); font: 600 12px/1.3 var(--body, sans-serif); color: #9fe8b4; letter-spacing: 0.02em; pointer-events: none; font-variant-numeric: tabular-nums; }

.toast { position: absolute; z-index: 20; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); padding: 10px 16px; border-radius: 12px; background: rgba(8,9,22,0.9); border: 1px solid var(--edge); font-size: 16px; max-width: calc(100% - 32px); text-align: center; }

.boot { position: absolute; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--void); font-family: var(--display); font-size: 12px; letter-spacing: 0.18em; color: var(--dim); text-transform: uppercase; transition: opacity .4s; }
.boot.done { opacity: 0; pointer-events: none; }
.boot-ring { width: 64px; height: 64px; border-radius: 50%; border: 10px solid var(--red); position: relative; }
.boot-ring::after { content: ""; position: absolute; left: -16px; right: -16px; top: 50%; height: 12px; transform: translateY(-50%); background: var(--blue); }
@media (prefers-reduced-motion: no-preference) { .boot-ring { animation: spin 1.6s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } }
@media (max-width: 480px) { .panel { padding: 20px 16px 18px; } .roundel-btn { transform: scale(0.88); } .who { padding: 8px 10px; gap: 10px; } .btn-login { padding: 0 12px; } }
/* phones: a member's role badge goes under their name, so the name always shows */
@media (max-width: 600px) {
  .board { font-size: 14px; padding: 10px 12px; }
  .board-mini { font-size: 13px; }
  .brow { gap: 8px; }
  .brow .nm { flex-wrap: wrap; row-gap: 3px; }
  .brow .nm .t { flex: 1 1 calc(100% - 29px); }
  .brow .verified { display: none; }
  .brow .watch { padding: 6px 10px; }
  .brow .watch svg { display: block; }
  .brow .watch .wl { display: none; }
}

/* ---- The Crypto Underground site, from the title screen (as in Shrimp to Whale and Cage Chaos) ----
   A bar along the top: the site's main links (the ones that don't fit move to the menu), MENU,
   Become a member for guests, and who is playing with their picture and role badge. MENU opens
   a sheet with every link, grouped like Cage Chaos's. Links open in a new tab. */
.cu-bar { position: absolute; z-index: 12; top: max(8px, env(safe-area-inset-top, 0px)); left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px));
  height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 8px; border-radius: 14px;
  background: rgba(8, 10, 26, 0.8); border: 1px solid rgba(150, 160, 255, 0.2); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cu-brand { display: flex; align-items: center; gap: 8px; flex: none; min-width: 0; text-decoration: none; color: var(--ink); padding: 4px 4px 4px 2px; border-radius: 10px; }
.cu-logo { width: 34px; height: auto; flex: none; filter: drop-shadow(0 0 8px rgba(227, 36, 27, 0.45)); }
.cu-brand-t { display: grid; line-height: 1.08; }
.cu-brand-t b { font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(90deg, #ff7a5c, #ffa21f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cu-brand-t i { font-style: normal; font-size: 12px; color: var(--dim); white-space: nowrap; }
.cu-links { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 2px; overflow: hidden; white-space: nowrap; }
.cu-link { flex: none; padding: 8px 8px; border-radius: 8px; font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #c9cff3; text-decoration: none; }
.cu-link:hover, .cu-link:focus-visible { color: var(--cyan); background: rgba(43, 228, 255, 0.08); outline: none; }
.cu-link.off { visibility: hidden; position: absolute; pointer-events: none; }
.cu-menu { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(150, 160, 255, 0.35);
  background: rgba(255, 255, 255, 0.04); color: var(--ink); font-family: var(--display); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.cu-menu svg { width: 18px; height: 18px; }
.cu-menu:hover, .cu-menu:focus-visible, .cu-bar.sheet-open .cu-menu { border-color: var(--amber); color: var(--amber); outline: none; }
.cu-join { flex: none; display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(0, 255, 136, 0.55); color: var(--cta);
  background: rgba(0, 255, 136, 0.07); font-family: var(--display); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.cu-join:hover, .cu-join:focus-visible { background: rgba(0, 255, 136, 0.15); outline: none; }
.cu-chip { flex: none; display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 320px; height: 40px; padding: 0 6px 0 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(150, 160, 255, 0.16); }
.cu-chip .av { width: 30px; height: 30px; font-size: 13px; }
.cu-chip-t { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cu-name { min-width: 0; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-size: 12px; font-weight: 800; letter-spacing: 0.03em; color: var(--ink); }
.cu-chip .badge { font-size: 11px; padding: 1px 7px; }
.cu-chip:not(.is-guest) { padding-right: 10px; }
.cu-login { flex: none; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255, 162, 31, 0.6); background: rgba(255, 162, 31, 0.12); color: #ffd38a;
  font-family: var(--display); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.cu-login:hover, .cu-login:focus-visible { border-color: var(--amber); background: rgba(255, 162, 31, 0.2); outline: none; }
.app.has-bar .overlay:not(.login-ov) { padding-top: calc(max(8px, env(safe-area-inset-top, 0px)) + 66px); }
@media (max-width: 1100px) { .cu-brand-t i { display: none; } }
@media (max-width: 760px) { .cu-links { display: none; } }
@media (max-width: 600px) { .cu-brand-t { display: none; } .cu-join { display: none; } .cu-name { max-width: 96px; } .cu-chip .badge { display: none; } .cu-bar { height: 48px; } }
@media (max-width: 380px) { .cu-menu span { display: none; } .cu-menu { padding: 0 9px; } .cu-name { max-width: 72px; } }

.cu-sheet { position: absolute; inset: 0; z-index: 13; display: grid; place-items: center; padding: max(12px, env(safe-area-inset-top, 0px)) var(--gutter-r) max(12px, env(safe-area-inset-bottom, 0px)) var(--gutter-l);
  background: rgba(2, 3, 10, 0.66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cu-sheet-card { width: min(980px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; border-radius: 18px; background: var(--panel-solid);
  border: 1px solid var(--edge); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); padding: 14px 18px 20px; }
.cu-sheet-head { display: flex; align-items: center; gap: 12px; }
.cu-sheet-head .cu-logo { width: 40px; }
.cu-sheet-ttl { margin: 0; flex: 1; font-family: var(--display); font-size: 16px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.cu-x svg { fill: none; stroke: var(--ink); }
.cu-sec h3 { margin: 16px 2px 8px; font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.cu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.cu-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(150, 160, 255, 0.14); background: rgba(255, 255, 255, 0.03);
  color: var(--ink); text-decoration: none; text-align: left; font: inherit; cursor: pointer; }
.cu-card:hover, .cu-card:focus-visible { border-color: rgba(43, 228, 255, 0.5); background: rgba(43, 228, 255, 0.06); outline: none; }
.cu-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, 0.05); font-size: 18px; line-height: 1; }
.cu-tx { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cu-tx b { font-family: var(--display); font-size: 12px; font-weight: 800; letter-spacing: 0.05em; }
.cu-tx span { font-size: 14px; line-height: 1.2; color: var(--dim); }
.cu-go { flex: none; width: 18px; height: 18px; color: var(--dim); }
.cu-go svg { width: 18px; height: 18px; display: block; }
.cu-card:hover .cu-go { color: var(--cyan); }
@media (max-width: 480px) { .cu-sheet-card { padding: 12px 12px 16px; } .cu-grid { grid-template-columns: 1fr; } }
