:root {
  --bg: #182022; --panel: rgba(22, 31, 33, .92); --panel-solid: #1e2a2c; --line: rgba(255,255,255,.12);
  --text: #f3f6f5; --muted: #b3c2c0; --accent: #9cc1bd; --accent-2: #d3ebe7; --danger: #e5574d;
  --brand: #809695; --brand-dark: #5d7372;  /* from the Faithful to the Call logo */
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font: 15px/1.4 system-ui, -apple-system, Segoe UI, sans-serif; }
#app canvas { display: block; }
button { font: inherit; color: var(--text); background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; cursor: pointer; }
button:hover { background: rgba(255,255,255,.16); }
button.primary { background: var(--accent); color: #10201f; border-color: transparent; font-weight: 650; }
button.primary:hover { background: var(--accent-2); }
button.accent { border-color: var(--accent); color: var(--accent-2); }
button.danger { color: #ffb3ad; border-color: rgba(229,87,77,.5); }
button.active { background: var(--accent); color: #10201f; }
input, select { font: inherit; color: var(--text); background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
input[type=color] { padding: 0; width: 38px; height: 30px; border: none; background: none; vertical-align: middle; }
label { display: block; margin: 8px 0; color: var(--muted); font-size: 13px; }
label input:not([type=color]), label select { display: block; width: 100%; margin-top: 4px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 4px 10px 4px 0; }
.label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 6px; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.center { justify-content: center; }
.row h2, .row h3 { flex: 1; margin: 0; }

#hud { position: fixed; top: 0; left: 0; right: 0; display: flex; gap: 6px; align-items: center; padding: 10px 14px; background: linear-gradient(rgba(18,28,30,.88), rgba(18,28,30,0)); flex-wrap: wrap; }
#hud .brand { font-weight: 700; letter-spacing: .02em; margin-right: 10px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
#hud .brand img { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
#hud #roomName { color: var(--accent-2); font-weight: 600; }
#hud .spacer { flex: 1; }
#online { position: fixed; top: 58px; right: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 13px; max-width: 220px; }
#online b { color: var(--accent-2); }
#online div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#prompt { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--accent); border-radius: 999px; padding: 8px 18px; font-weight: 600; pointer-events: none; }
#prompt kbd { background: var(--accent); color: #10201f; border-radius: 6px; padding: 1px 7px; margin-right: 8px; font-family: inherit; }
#emotes { position: fixed; right: 14px; bottom: 14px; display: flex; gap: 6px; }
#emotes button { font-size: 20px; padding: 6px 10px; }
#chat { position: fixed; left: 14px; bottom: 36px; width: min(380px, calc(100vw - 28px)); }
#chatLog { max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; margin-bottom: 6px; font-size: 14px; text-shadow: 0 1px 3px #000; }
#chatLog .sys { color: var(--accent-2); font-style: italic; }
#chatLog b { color: var(--accent-2); }
#chatInput { width: 100%; background: var(--panel); }
#help { position: fixed; left: 14px; bottom: 10px; font-size: 12px; color: var(--muted); text-shadow: 0 1px 3px #000; }
#toast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); background: var(--panel-solid); border: 1px solid var(--accent); padding: 8px 16px; border-radius: 10px; }

.modal { position: fixed; inset: 0; background: rgba(10,8,14,.55); display: grid; place-items: center; z-index: 10; padding: 16px; }
.modal[hidden], [hidden] { display: none !important; }
.card { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.card h1 { margin: 0 0 4px; }
.x { padding: 4px 10px; }
.swatches, .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; padding: 0; border: 2px solid transparent; }
.swatches button.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.chips button.on { background: var(--accent); color: #10201f; }
#setupGo { width: 100%; margin-top: 18px; padding: 11px; }

#homesList { display: flex; flex-direction: column; gap: 8px; }
.home-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(255,255,255,.05); border-radius: 12px; }
.home-row div { flex: 1; } .home-row small { color: var(--muted); display: block; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #6bd16b; margin-right: 4px; }
#inviteLink { flex: 1; min-width: 0; }

#edit { position: fixed; top: 58px; left: 14px; width: 300px; max-height: calc(100vh - 120px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; z-index: 5; }
#edit h3 { margin: 0; }
#palette { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; }
#palette button { font-size: 13px; padding: 6px 8px; text-align: left; }
#editDone { width: 100%; margin-top: 12px; }
body.editing #chat, body.editing #help { display: none; }

.c4card { width: min(480px, 100%); }
.seats { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0; }
.seat { min-width: 150px; font-weight: 600; }
.seat.red { border-color: #e4413a; } .seat.yellow { border-color: #f2c230; }
.seat.turn { box-shadow: 0 0 0 3px var(--accent-2); }
#c4status { text-align: center; min-height: 22px; margin-bottom: 8px; font-weight: 600; color: var(--accent-2); }
#c4grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; background: #2552c4; padding: 10px; border-radius: 14px; margin-bottom: 12px; }
#c4grid .cell { aspect-ratio: 1; border-radius: 50%; background: #132c6e; cursor: pointer; transition: transform .1s; }
#c4grid .cell.p1 { background: #e4413a; } #c4grid .cell.p2 { background: #f2c230; }
#c4grid .cell.win { box-shadow: 0 0 0 3px #fff, 0 0 14px #fff; }
#c4grid.can .col-hover { filter: brightness(1.35); }

.pbwrap { display: flex; gap: 18px; align-items: stretch; max-height: calc(100vh - 32px); }
#pbCanvas { height: min(720px, calc(100vh - 40px)); aspect-ratio: 400/720; border-radius: 14px; border: 2px solid #4ef0ff55; box-shadow: 0 0 40px #b46bff55; background: #0d0824; }
.pbside { background: var(--panel-solid); border-radius: 16px; padding: 16px 18px; width: 220px; display: flex; flex-direction: column; }
.pbside h2 { margin: 0; color: #ffd84e; letter-spacing: .08em; }
#pbScore { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; }
#pbScores { margin: 0; padding-left: 22px; font-size: 13px; flex: 1; overflow: auto; }
#pbScores li span { color: var(--muted); }
.touch { display: none; gap: 6px; margin: 8px 0; } .touch button { flex: 1; padding: 14px 4px; }
#pbClose { margin-top: 8px; }
@media (pointer: coarse) { .touch { display: flex; } }
@media (max-width: 700px) {
  #help, #online { display: none; }
  .pbwrap { flex-direction: column; align-items: center; }
  #pbCanvas { height: min(560px, 62vh); }
  .pbside { width: 100%; max-width: 340px; }
  #pbScores, .pbside .small, .pbside h2 { display: none; }
  #edit { width: calc(100vw - 28px); max-height: 46vh; }
}

/* game table menu */
#tableGames { display: flex; flex-direction: column; gap: 10px; }
.tg { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 14px; }
.tg .ico { font-size: 28px; width: 36px; text-align: center; }
.tg div { flex: 1; } .tg small { display: block; color: var(--muted); }
.tg .live { color: #7dff8a; font-weight: 600; }
.tg-clear { background: none; border: none; color: var(--muted); text-decoration: underline; padding: 4px 0; font-size: 13px; align-self: flex-start; }
/* full game over the world */
#gameFrame { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; background: #000; }
.gf-bar { display: flex; align-items: center; gap: 12px; padding: 6px 10px; background: var(--panel-solid); border-bottom: 1px solid var(--line); }
.gf-bar b { color: var(--accent-2); }
#gfFrame { flex: 1; border: 0; width: 100%; background: #111; }

/* accounts */
.authcard { width: min(400px, 100%); }
.tabs { display: flex; gap: 6px; margin: 14px 0 6px; }
.tabs button { flex: 1; }
.tabs button.on { background: var(--accent); color: #10201f; border-color: transparent; font-weight: 650; }
#authForm .primary { width: 100%; margin-top: 10px; padding: 11px; }
.err { color: #ffb3ad; margin: 6px 0 0; font-size: 14px; }
.linkish { background: none; border: none; padding: 0; color: var(--accent-2); text-decoration: underline; font-size: inherit; }
.setup-foot { justify-content: space-between; margin-top: 10px; }

/* pop-up cards */
#cards { position: fixed; top: 58px; right: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 30; width: min(320px, calc(100vw - 28px)); }
.ncard { background: var(--panel-solid); border: 1px solid var(--accent); border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: ncin .25s ease-out; }
.ncard .row { margin-top: 10px; }
@keyframes ncin { from { transform: translateY(-8px); opacity: 0; } }
body:has(#cards .ncard) #online { display: none; }

/* table menu sections */
.tg-head { margin: 8px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* checkers & chess */
.boardcard { width: min(520px, 100%); }
.seat.side2 { border-color: #888; }
#bdStatus { text-align: center; min-height: 22px; margin-bottom: 8px; font-weight: 600; color: var(--accent-2); }
#bdGrid { display: grid; grid-template-columns: repeat(8, 1fr); border-radius: 10px; overflow: hidden; margin-bottom: 12px; border: 3px solid #5b3d26; }
.sq { aspect-ratio: 1; border: 0; border-radius: 0; padding: 0; display: grid; place-items: center; position: relative; font-size: clamp(22px, 6vw, 40px); line-height: 1; }
.sq.light { background: #ecd9b9; } .sq.dark { background: #ad7e55; }
.sq.last { box-shadow: inset 0 0 0 100px rgba(255, 220, 90, .35); }
.sq.sel { box-shadow: inset 0 0 0 4px #ffcf6b; }
.sq.check { box-shadow: inset 0 0 0 100px rgba(229, 87, 77, .65); }
.sq.target::after { content: ''; width: 28%; height: 28%; border-radius: 50%; background: rgba(30, 20, 10, .35); }
.sq.cap::after { content: ''; position: absolute; inset: 6%; border-radius: 50%; border: 4px solid rgba(30, 20, 10, .4); }
.sq.movable { cursor: pointer; }
.pc.w { color: #fff; text-shadow: 0 0 2px #000, 0 1px 2px #000; } .pc.b { color: #1d1612; text-shadow: 0 0 1px #fff8; }
.disc { width: 78%; height: 78%; border-radius: 50%; display: grid; place-items: center; font-size: .55em; color: #ffd84e; box-shadow: inset 0 -4px 0 rgba(0,0,0,.35), 0 2px 4px rgba(0,0,0,.4); }
.disc.red { background: #c9342c; } .disc.black { background: #26222a; }

/* texas hold'em */
.pokercard { width: min(720px, 100%); }
.felt { background: radial-gradient(ellipse at center, #2f7a4f, #1e5236); border-radius: 120px; padding: 18px; text-align: center; margin: 8px 0 12px; border: 6px solid #5b3d26; }
#pkBoard { display: flex; gap: 6px; justify-content: center; min-height: 64px; }
#pkPot { font-weight: 700; color: #ffd84e; margin-top: 6px; min-height: 20px; }
#pkMsg { font-size: 14px; min-height: 20px; }
.pcard { display: inline-grid; place-items: center; width: 42px; height: 60px; background: #fff; color: #1d1a24; border-radius: 6px; font-weight: 800; font-size: 17px; line-height: 1; box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.pcard i { font-style: normal; display: block; font-size: 18px; }
.pcard.red { color: #c9342c; }
.pcard.back { background: repeating-linear-gradient(45deg, #7a2e3e, #7a2e3e 4px, #9c3b4f 4px, #9c3b4f 8px); border: 2px solid #fff; }
.pcard.empty { background: rgba(255,255,255,.12); box-shadow: none; border: 1px dashed rgba(255,255,255,.3); }
#pkSeats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px; }
.pseat { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 12px; padding: 8px; font-size: 13px; }
.pseat.acting { border-color: var(--accent-2); box-shadow: 0 0 0 2px var(--accent-2); }
.pseat.mine { background: rgba(156,193,189,.14); }
.pseat.out { opacity: .5; }
.pseat .pcard { width: 32px; height: 46px; font-size: 13px; } .pseat .pcard i { font-size: 13px; }
.pname { font-weight: 650; } .pname em { font-style: normal; color: var(--muted); font-size: 12px; } .pname em.won { color: #7dff8a; }
.chip-d { background: #fff; color: #000; border-radius: 50%; padding: 0 5px; font-size: 11px; }
.pcards { display: flex; gap: 4px; margin: 4px 0; min-height: 46px; }
.phand { color: var(--accent-2); font-size: 12px; }
.raise { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.raise input { width: 140px; }
#pkLog { font-size: 12px; color: var(--muted); max-height: 140px; overflow: auto; }

.ok { color: #9be89b; margin: 6px 0 0; font-size: 14px; }
.auth-links { justify-content: space-between; margin-top: 10px; }
.email-box { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.email-box .row { justify-content: space-between; }

/* brand: logo on the sign-in screen */
.authcard { padding-top: 0; overflow: hidden; }
.auth-hero { background: linear-gradient(160deg, #8ea3a1, var(--brand) 55%, var(--brand-dark)); margin: 0 -24px 14px; padding: 22px 24px 18px; display: grid; place-items: center; }
.auth-hero img { width: min(260px, 70%); height: auto; filter: drop-shadow(0 3px 6px rgba(0,0,0,.25)); }
.auth-tag { text-align: center; margin-top: 0; }
#auth { background: radial-gradient(ellipse at center, rgba(93,115,114,.55), rgba(10,14,14,.8)); }

/* Signed out (sign-in and avatar screens): none of the in-world controls show */
body.signed-out #hud, body.signed-out #chat, body.signed-out #help, body.signed-out #emotes,
body.signed-out #online, body.signed-out #prompt, body.signed-out #cards, body.signed-out #edit { display: none !important; }
body.signed-out #app canvas { filter: blur(3px) brightness(.6); }

/* computer opponents */
.botrow { gap: 6px; margin: 4px 0 8px; font-size: 13px; color: var(--muted); }
.botrow:empty { display: none; }
.botrow button { padding: 4px 10px; font-size: 13px; }
.botrow button.on { background: var(--accent); color: #10201f; border-color: transparent; }

/* jukebox */
.jbcard { width: min(460px, 100%); }
#jbNow { background: linear-gradient(135deg, rgba(128,150,149,.35), rgba(93,115,114,.2)); border-radius: 14px; padding: 12px 14px; }
#jbNow .title { font-weight: 700; font-size: 17px; }
.jb-bar { height: 6px; background: rgba(255,255,255,.12); border-radius: 3px; margin: 8px 0 4px; overflow: hidden; }
.jb-bar i { display: block; height: 100%; background: var(--accent); width: 0; }
.jb-song { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.04); margin-bottom: 5px; }
.jb-song div { flex: 1; } .jb-song small { color: var(--muted); display: block; }
.jb-song.playing { outline: 1px solid var(--accent); }
.jb-foot { justify-content: space-between; margin-top: 10px; }
#nowPlaying { position: fixed; top: 58px; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; z-index: 4; max-width: calc(100vw - 260px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#nowPlaying.blocked { border-color: var(--accent); }
body.signed-out #nowPlaying { display: none !important; }
@media (max-width: 700px) { #nowPlaying { top: auto; bottom: 64px; max-width: calc(100vw - 28px); } }

.pb-tables { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.pb-tables button { padding: 4px 8px; font-size: 12px; }
.pb-tables button.on { background: var(--accent); color: #10201f; border-color: transparent; }
#pbBlurb { margin: 2px 0 6px; }

/* air hockey / table tennis / shuffleboard */
.arenacard { width: min(460px, 100%); }
.arenacard:has(canvas.wide) { width: min(820px, 100%); }
#arCanvas { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: 12px; background: #0f1718; touch-action: none; }
#arCanvas.wide { max-height: 40vh; }
#arStatus { text-align: center; min-height: 22px; margin-bottom: 6px; font-weight: 600; color: var(--accent-2); }
.seat.blue { border-color: #3a6bd9; }
.center-text { text-align: center; }

/* wall art */
#artThumbs, #myArtThumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0; }
#artPick [data-art] { padding: 2px; aspect-ratio: 1; overflow: hidden; border: 2px solid transparent; }
#artPick [data-art].on { border-color: var(--accent); }
#artPick [data-art] img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 4px; }
#artSizes { align-items: center; gap: 6px; }
#artSizes button.on, #pbTables button.on { background: var(--accent); color: #102020; }
.artcard { max-width: min(92vw, 900px); }
.artcard h2 { margin: 0; }
#artImg { display: block; max-width: 100%; max-height: 72vh; margin: 8px auto 0; border-radius: 6px; box-shadow: 0 6px 30px rgba(0,0,0,.5); }
#artUpload { width: 100%; margin-top: 4px; }
#myArtThumbs p { grid-column: 1 / -1; margin: 2px 0; }
#myArtTools { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.jb-lights { width: 100%; margin-top: 8px; }
/* voice chat button: a level bar under it shows your mic is picking you up */
.voice-btn { position: relative; overflow: hidden; }
.voice-btn.active { background: #2f6b4f; border-color: #4fae7f; color: #fff; }
.voice-btn.muted { background: #6b3a3a; border-color: #a85a5a; color: #fff; }
.voice-btn.active::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--lvl, 0) * 100%); background: #8dffc0; transition: width .08s; }
/* Champions */
.lbcard { max-width: min(94vw, 860px); }
#leadersList { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; max-height: 70vh; overflow-y: auto; }
.lb-game { background: rgba(255,255,255,.04); border-radius: 10px; padding: 8px 12px; }
.lb-game h3 { margin: 2px 0 6px; font-size: 15px; }
.lb-game ol { list-style: none; margin: 0; padding: 0; }
.lb-game li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; font-size: 14px; }
/* playing on the real table: one slim bar at the top; the table itself is the board */
.modal.docked { background: transparent; pointer-events: none; place-items: start center; padding: 50px 10px 0; }
.modal.docked .card { pointer-events: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px;
  width: auto; max-width: min(720px, 100%); padding: 5px 8px 5px 12px; border-radius: 12px; background: rgba(20, 28, 30, .72); backdrop-filter: blur(6px); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.modal.docked .card > .row:first-child { display: contents; }
.modal.docked h2 { font-size: 14px; margin: 0; color: var(--accent); }
.modal.docked .x { order: 99; padding: 2px 8px; font-size: 13px; }
.modal.docked #arCanvas { display: none; }
.modal.docked .seats, .modal.docked #arBot, .modal.docked #arShuffle, .modal.docked .row.center { margin: 0; gap: 6px; }
.modal.docked .seats button { padding: 3px 10px; font-size: 13px; }
.modal.docked #arBot { font-size: 12px; }
.modal.docked #arBot button { padding: 2px 8px; font-size: 12px; }
.modal.docked #arStatus { font-size: 13px; white-space: nowrap; }
.modal.docked #arShuffle input[type=range] { width: 90px; }
.modal.docked #arShuffle label, .modal.docked #arShuffle button, .modal.docked .row.center button { font-size: 13px; padding: 3px 10px; }
.modal.docked #arHelp { flex-basis: 100%; margin: 0; font-size: 11px; text-align: center; }

/* ---- tighter, lighter panels everywhere (smaller boxes, less of the world covered) ---- */
html, body { font-size: 14px; }
button { padding: 5px 10px; border-radius: 8px; }
input, select { padding: 5px 8px; }
#hud { padding: 6px 10px; gap: 5px; }
#hud button { padding: 4px 10px; font-size: 13px; }
#hud .brand { font-size: 15px; }
#hud .brand img { height: 22px; width: auto; }
.modal { background: rgba(10, 8, 14, .28); }
.card { padding: 14px 16px; border-radius: 14px; width: min(380px, 100%); background: rgba(26, 36, 38, .94); box-shadow: 0 10px 32px rgba(0,0,0,.4); }
.card h1 { font-size: 20px; } .card h2 { font-size: 17px; } .card h3 { font-size: 15px; }
.card p { margin: 6px 0; }
.label { margin: 10px 0 4px; font-size: 11px; }
.c4card { width: min(400px, 100%); }
.boardcard { width: min(440px, 100%); }
.pokercard { width: min(640px, 100%); }
.jbcard { width: min(400px, 100%); }
.soundcard { width: min(460px, 100%); }
.lbcard { max-width: min(94vw, 760px); }
#online { top: 46px; right: 10px; padding: 5px 9px; font-size: 12px; max-width: 180px; border-radius: 10px; }
#cards { top: 46px; right: 10px; width: min(290px, calc(100vw - 20px)); }
#nowPlaying { top: 46px; padding: 4px 12px; font-size: 12px; }
#toast { top: 50px; padding: 6px 14px; font-size: 13px; }
#prompt { padding: 6px 14px; font-size: 14px; bottom: 100px; }
#chat { width: min(320px, calc(100vw - 20px)); left: 10px; bottom: 30px; }
#chatLog { font-size: 13px; max-height: 140px; }
#help { left: 10px; bottom: 8px; font-size: 11px; }
#emotes { right: 10px; bottom: 10px; gap: 4px; }
#emotes button { font-size: 17px; padding: 4px 8px; }
.modal.docked #arHelp { order: 100; }
.modal.docked { padding-top: 44px; }
/* the Sound panel */
.snd-row { display: grid; grid-template-columns: 110px 1fr auto auto; gap: 8px; align-items: center; margin: 6px 0; }
.snd-row label { font-size: 13px; margin: 0; color: var(--text); }
.snd-row input[type=range] { width: 100%; }
.snd-row select { max-width: 140px; }
@media (max-width: 520px) { .snd-row { grid-template-columns: 1fr auto auto; } .snd-row label { grid-column: 1 / -1; } }

.modal.docked #bdGrid, .modal.docked #c4grid { display: none; }
.modal.docked #bdStatus, .modal.docked #c4status { font-size: 13px; }
.modal.docked #bdPromo { flex-basis: 100%; justify-content: center; }

/* ---- phones and tablets ---- */
#app canvas { touch-action: none; }
.touch-ui { display: none; }
body.touch .touch-ui { display: block; }
body.signed-out .touch-ui { display: none !important; }
#stick { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom)); width: 120px; height: 120px; border-radius: 50%;
  background: rgba(20, 30, 32, .35); border: 2px solid rgba(255,255,255,.25); z-index: 6; touch-action: none; }
#stickKnob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(156,193,189,.85); box-shadow: 0 2px 8px rgba(0,0,0,.4); pointer-events: none; }
#actBtn { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: 74px; width: 66px; height: 66px; border-radius: 50%; font-size: 22px; font-weight: 800;
  background: rgba(156,193,189,.9); color: #10201f; border: none; z-index: 6; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
body.touch #help { display: none; }
body.touch #chat { left: 150px; bottom: 18px; width: calc(100vw - 250px); min-width: 140px; }
body.touch #chatLog { max-height: 72px; font-size: 12px; }
body.touch #emotes { bottom: 150px; flex-direction: column; }
body.touch #prompt { bottom: 150px; }
@media (max-width: 700px) {
  #hud { gap: 4px; padding: 4px 6px; }
  #hud button { padding: 3px 7px; font-size: 12px; }
  #hud .brand span { display: none; }
  #online { display: none; }
  .modal.docked { padding-top: 70px; }
  .modal.docked .card { gap: 3px 6px; padding: 4px 6px; }
}
#viewBtn { position: fixed; right: 10px; top: 96px; z-index: 11; background: rgba(20,28,30,.8); backdrop-filter: blur(6px); font-size: 13px; }
@media (max-width: 700px) { #viewBtn { top: auto; bottom: 150px; right: 90px; } }
@media (max-width: 700px) {
  #hud { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #hud::-webkit-scrollbar { display: none; }
  #hud button, #hud .brand, #roomName { white-space: nowrap; flex-shrink: 0; }
}
#jumpBtn { position: fixed; right: max(92px, calc(env(safe-area-inset-right) + 92px)); bottom: 40px; width: 54px; height: 54px; border-radius: 50%; font-size: 24px; font-weight: 800;
  background: rgba(20,30,32,.55); color: #fff; border: 2px solid rgba(255,255,255,.35); z-index: 6; touch-action: none; }
.modal.docked .felt #pkBoard, .modal.docked #pkSeats, .modal.docked details { display: none; }
.modal.docked .felt { background: none; padding: 0; margin: 0; display: flex; gap: 8px; align-items: center; min-height: 0; border: 0; }
.modal.docked #pkPot, .modal.docked #pkMsg { font-size: 13px; margin: 0; }
.modal.docked #pkActions { gap: 6px; }
.modal.docked #pkActions input[type=range] { width: 110px; }
/* backpack */
.bpcard { width: min(400px, 100%); }
#bpItems { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.bp-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; font-size: 11px; line-height: 1.2; }
.bp-item .bp-ico { font-size: 24px; }
.bp-item.on { background: var(--accent); color: #10201f; }
#bpPutAway { width: 100%; }
/* nerf & paint wars */
#warBoard { position: fixed; left: 10px; top: 46px; z-index: 5; background: rgba(20,28,30,.8); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 12px; min-width: 170px; }
#warBoard .row { gap: 8px; margin-bottom: 4px; } #warBoard button { padding: 2px 8px; font-size: 11px; }
#warRows div { display: flex; gap: 8px; align-items: baseline; } #warRows span { flex: 1; } #warRows b { color: var(--accent-2); }
#fireBtn { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: 152px; width: 60px; height: 60px; border-radius: 50%; font-size: 26px; background: rgba(228,65,58,.85); border: none; z-index: 6; display: none !important; }
body.touch.armed #fireBtn { display: block !important; }
body.armed #app canvas { cursor: crosshair; }
/* RC cars */
#rcPanel { position: fixed; left: 0; right: 0; margin: 0 auto; width: fit-content; bottom: 12px; z-index: 6; background: rgba(20,28,30,.82); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; max-width: calc(100vw - 20px); }
#rcPanel button, #rcPanel select { padding: 3px 8px; font-size: 12px; }
#rcInfo { font-size: 12px; text-align: center; margin-bottom: 4px; color: var(--accent-2); }
.rc-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
#raceCount { position: fixed; left: 0; right: 0; text-align: center; top: 30%; font-size: 96px; font-weight: 900; color: #fff; text-shadow: 0 4px 20px rgba(0,0,0,.6); pointer-events: none; z-index: 8; }
body.touch #rcPanel { bottom: 150px; }
/* video chat when seated together */
#callPanel { position: fixed; right: 10px; top: 96px; z-index: 7; background: rgba(20,28,30,.85); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; padding: 6px; max-width: min(420px, calc(100vw - 20px)); }
#callTiles { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.call-tile { position: relative; width: 150px; height: 188px; border-radius: 10px; overflow: hidden; background: #0f1718; cursor: pointer; }
#callTiles.focus .call-tile { width: 72px; height: 90px; align-self: flex-end; }
#callTiles.focus .call-tile.big { width: 220px; height: 275px; order: -1; }
#callGrip { display: flex; align-items: center; gap: 8px; cursor: grab; user-select: none; touch-action: none; padding: 0 2px 6px; font-size: 12px; }
#callGrip.dragging { cursor: grabbing; }
#callGrip .muted { flex: 1; text-align: right; font-size: 10px; }
#callGrip button { padding: 0 6px; }
#callPanel.full { left: 0 !important; top: 0 !important; right: 0 !important; bottom: 0 !important; max-width: none; border-radius: 0; z-index: 60; display: flex; flex-direction: column; padding: 10px; background: rgba(12,18,20,.97); }
#callPanel.full #callGrip { cursor: default; font-size: 14px; }
#callPanel.full #callTiles { flex: 1; align-items: center; align-content: center; gap: 12px; }
#callPanel.full .call-tile { width: auto; height: min(78vh, 44vw * 1.25); aspect-ratio: 4 / 5; }
#callPanel.full #callTiles.focus .call-tile { height: 22vh; align-self: flex-end; }
#callPanel.full #callTiles.focus .call-tile.big { height: 80vh; align-self: center; }
#callPanel.full .call-name { font-size: 14px; }
#callPanel.full button { font-size: 14px; padding: 5px 12px; }
.call-tile video, .call-tile canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.call-name { position: absolute; left: 4px; bottom: 4px; font-size: 11px; background: rgba(0,0,0,.55); padding: 1px 6px; border-radius: 6px; }
.call-wait { display: grid; place-items: center; height: 100%; font-size: 12px; color: var(--muted); }
#callPanel .row { margin-top: 6px; gap: 6px; } #callPanel button { padding: 3px 8px; font-size: 12px; }
@media (max-width: 700px) { #callPanel { top: auto; bottom: 150px; left: 10px; right: auto; } .call-tile { width: 110px; height: 138px; } #callTiles.focus .call-tile { width: 60px; height: 75px; } #callTiles.focus .call-tile.big { width: 150px; height: 188px; } }
#bpFloat { width: 100%; margin-bottom: 6px; }

/* the retro console: the game full screen (sharp pixels), and the slim bar over it */
#retroFull { position: fixed; inset: 0; z-index: 40; background: #000; display: flex; align-items: center; justify-content: center; }
#retroFull[hidden] { display: none; }
#retroFull canvas { width: min(100vw, 177.78vh); height: auto; max-height: 100vh; image-rendering: pixelated; image-rendering: crisp-edges; }
#retro { position: fixed; left: 0; right: 0; top: 8px; margin: 0 auto; width: fit-content; max-width: calc(100vw - 16px); z-index: 45; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
  background: rgba(20,28,30,.86); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; padding: 5px 8px; font-size: 12px; }
#retro[hidden] { display: none; }
#retro button { padding: 3px 8px; font-size: 12px; }
#retro button.on { outline: 2px solid #f2d98a; }
#retro .rt-title { margin-right: 4px; }
#retro .rt-carts, #retro .rt-opts { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
#retro label { display: inline-flex; gap: 3px; align-items: center; color: var(--muted); }
#retro select, #retro input { font-size: 12px; padding: 1px 3px; }
#retro .rt-how { max-width: 520px; }
body.retro-on.touch #stick, body.retro-on.touch #jumpBtn { z-index: 46; }
body.retro-on #prompt { display: none; }

/* ---- the phone (phone.js): pulled out, it fills the screen; a real-phone look inside ---- */
#btnPhone { position: relative; }
#phoneBadge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #ff3b30; color: #fff; font: bold 10px/16px system-ui; font-style: normal; }
#phoneBadge[hidden] { display: none; }
#phone { position: fixed; inset: 0; z-index: 60; background: rgba(8,12,14,.62); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; }
#phone[hidden] { display: none; }
.ph-device { --ph-bg: #f2f2f7; --ph-card: #fff; --ph-ink: #111; --ph-sub: #6b6b72; --ph-line: #e3e3e8; --ph-blue: #0a84ff;
  width: min(430px, 100vw); height: min(920px, 100dvh); background: var(--ph-bg); color: var(--ph-ink); border-radius: 44px; border: 10px solid #111; box-shadow: 0 20px 80px rgba(0,0,0,.6);
  display: flex; flex-direction: column; overflow: hidden; font: 15px/1.35 -apple-system, system-ui, sans-serif; }
@media (max-width: 520px), (max-height: 640px) { .ph-device { border-radius: 0; border: 0; width: 100vw; height: 100dvh; } }
.ph-status { display: flex; justify-content: space-between; padding: 10px 22px 6px; font-size: 13px; font-weight: 600; }
.ph-carrier { color: var(--ph-sub); font-weight: 500; }
.ph-screen { flex: 1; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; }
.ph-bottom { height: 26px; display: flex; align-items: center; justify-content: center; }
.ph-homebar { width: 130px; height: 5px; border-radius: 3px; background: #111; border: 0; padding: 0; cursor: pointer; }
.ph-device button { font: inherit; color: inherit; cursor: pointer; }
/* home screen */
.ph-homescreen { flex: 1; display: flex; flex-direction: column; padding: 18px 18px 10px; background: linear-gradient(160deg, #7f989b, #3b5254 60%, #1e2a2c); color: #fff; }
.ph-greet { font-size: 22px; font-weight: 700; margin: 8px 6px 22px; }
.ph-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; }
.ph-app { background: none; border: 0; color: #fff !important; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px !important; }
.ph-icon { position: relative; width: 60px; height: 60px; border-radius: 15px; background: var(--c); display: grid; place-items: center; font-size: 30px; box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.ph-badge { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #ff3b30; color: #fff; font: bold 12px/20px system-ui; font-style: normal; }
.ph-putaway { margin-top: auto; align-self: center; background: rgba(255,255,255,.18); border: 0; border-radius: 20px; padding: 8px 18px; color: #fff !important; }
/* app chrome */
.ph-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(242,242,247,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ph-line); min-height: 44px; }
.ph-head b { flex: 1; font-size: 17px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-back { background: none; border: 0; font-size: 30px !important; line-height: 1; color: var(--ph-blue) !important; padding: 0 6px; }
.ph-right { min-width: 40px; display: flex; justify-content: flex-end; }
.ph-right button { background: none; border: 0; font-size: 20px; color: var(--ph-blue) !important; }
.ph-filter { max-width: 120px; font-size: 13px; border: 1px solid var(--ph-line); border-radius: 8px; padding: 3px; background: #fff; color: #111; }
.ph-list { display: flex; flex-direction: column; }
.ph-pad { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.ph-empty { color: var(--ph-sub); text-align: center; padding: 30px 16px; margin: 0; }
.ph-hint { color: var(--ph-sub); font-size: 13px; margin: 0; }
.ph-h4 { margin: 12px 14px 4px; font-size: 13px; color: var(--ph-sub); text-transform: uppercase; letter-spacing: .04em; }
.ph-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--ph-card); border: 0; border-bottom: 1px solid var(--ph-line); text-align: left; width: 100%; color: var(--ph-ink) !important; }
.ph-check { cursor: pointer; }
.ph-check input { width: 20px; height: 20px; accent-color: var(--ph-blue); }
.ph-rowmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-rowmain b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-sub { color: var(--ph-sub); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--ph-sub); font-size: 12px; }
.ph-dot { background: var(--ph-blue); color: #fff; border-radius: 10px; min-width: 20px; height: 20px; font: bold 12px/20px system-ui; text-align: center; padding: 0 5px; font-style: normal; }
.ph-on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #34c759; margin-right: 5px; }
.ph-face { flex: none; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.3); width: 38px; height: 38px; }
.ph-groupface { font-size: 15px; }
.ph-acts { display: flex; gap: 6px; align-items: center; }
.ph-acts button { background: #e9e9ef; border: 0; border-radius: 16px; padding: 5px 10px; font-size: 14px; }
.ph-acts button.on { background: #ffe1e6; }
.ph-acts.ph-wide { margin-top: 8px; }
.ph-acts.ph-wide button { flex: 1; }
.ph-yes { background: var(--ph-blue) !important; color: #fff !important; }
.ph-tabs { display: flex; gap: 4px; padding: 8px 12px; background: var(--ph-bg); }
.ph-tabs button { flex: 1; border: 0; border-radius: 9px; padding: 6px; background: #e3e3e8; font-size: 13px; }
.ph-tabs button.on { background: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ph-input { width: 100%; box-sizing: border-box; border: 1px solid var(--ph-line); border-radius: 12px; padding: 9px 12px; font: inherit; background: #fff; color: #111; }
textarea.ph-input { resize: vertical; }
.ph-primary { background: var(--ph-blue); color: #fff !important; border: 0; border-radius: 12px; padding: 11px; font-weight: 600 !important; }
.ph-primary[disabled] { opacity: .45; }
.ph-secondary { background: #e3e3e8; border: 0; border-radius: 12px; padding: 9px; }
.ph-danger { background: none; border: 0; color: #ff3b30 !important; padding: 10px; }
.ph-card { background: var(--ph-card); border-radius: 14px; padding: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.ph-cardtop { display: flex; align-items: center; gap: 8px; }
.ph-cardtop > b { flex: 1; }
.ph-cardtop button { background: none; border: 0; font-size: 16px; }
.ph-ring { width: 16px; height: 16px; border-radius: 50%; border: 4px solid var(--c); box-sizing: border-box; }
.ph-faces { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.ph-swatches { display: flex; gap: 8px; }
.ph-swatches button { width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--ph-line); }
.ph-swatches button.on { box-shadow: 0 0 0 3px var(--c); }
.ph-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.ph-chip { border: 2px solid var(--c); background: #fff; border-radius: 16px; padding: 4px 10px; font-size: 13px; }
.ph-chip.on { background: var(--c); color: #fff !important; }
.ph-composer .ph-sub { margin-top: 8px; }
.ph-post .ph-posttext { margin: 10px 2px 2px; white-space: pre-wrap; word-wrap: break-word; }
.ph-comments { margin-top: 8px; border-top: 1px solid var(--ph-line); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ph-comment b { margin-right: 4px; }
/* texting */
.ph-chat { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; background: #fff; }
.ph-stamp { text-align: center; color: var(--ph-sub); font-size: 11px; margin: 10px 0 4px; }
.ph-from { color: var(--ph-sub); font-size: 11px; margin: 6px 0 0 12px; }
.ph-bubble { max-width: 75%; padding: 8px 13px; border-radius: 19px; white-space: pre-wrap; word-wrap: break-word; }
.ph-bubble.me { align-self: flex-end; background: var(--ph-blue); color: #fff; border-bottom-right-radius: 6px; }
.ph-bubble.them { align-self: flex-start; background: #e9e9eb; color: #111; border-bottom-left-radius: 6px; }
.ph-send { display: flex; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--ph-line); background: var(--ph-bg); }
.ph-send .ph-input { border-radius: 20px; }
.ph-sendbtn { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 0; background: var(--ph-blue); color: #fff !important; font-size: 20px !important; font-weight: 700; }
/* backpack, champions, settings */
.ph-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ph-item { background: #fff; border: 2px solid transparent; border-radius: 16px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px !important; text-align: center; }
.ph-item span { font-size: 30px; }
.ph-item.on { border-color: var(--ph-blue); }
.ph-ol { margin: 6px 0 0; padding: 0; list-style: none; }
.ph-ol li { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; }
.ph-toggle { width: 46px; height: 28px; border-radius: 14px; background: #e3e3e8; position: relative; flex: none; transition: background .2s; }
.ph-toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .2s; }
.ph-toggle.on { background: #34c759; }
.ph-toggle.on::after { left: 20px; }

/* ---- the rocket pad (rocket.js): workshop, flight readout, banners, results ---- */
#rocketShop { position: fixed; inset: 4vh 4vw; z-index: 55; max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
#rocketShop[hidden], #rocketResult[hidden], #rocketHud[hidden], #rocketBanner[hidden] { display: none; }
#rocketShop .rk-head { display: flex; align-items: center; justify-content: space-between; }
#rocketShop h2 { margin: 0; }
.rk-x { background: none; border: 0; font-size: 20px; }
.rk-body { flex: 1; min-height: 0; display: flex; gap: 14px; }
.rk-parts { flex: 1.4; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.rk-cat h4 { margin: 4px 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.rk-cat { display: flex; flex-wrap: wrap; gap: 6px; }
.rk-cat h4 { flex-basis: 100%; }
.rk-cat button { flex: 1 1 180px; max-width: 260px; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 6px 9px; }
.rk-cat button span { font-size: 11px; color: #f2d98a; }
.rk-cat button i { font-size: 11px; color: var(--muted); font-style: normal; }
.rk-stack { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.rk-stack canvas { align-self: center; border-radius: 10px; }
.rk-stack ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.rk-stack li { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.05); border-radius: 8px; padding: 3px 6px; font-size: 13px; }
.rk-dot { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,.4); }
.rk-acts { margin-left: auto; display: flex; gap: 2px; }
.rk-acts button { padding: 0 6px; font-size: 11px; }
.rk-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.rk-stats b { color: #fff; }
@media (max-width: 760px) { #rocketShop { inset: 0; border-radius: 0; } .rk-body { flex-direction: column; overflow-y: auto; } .rk-parts { flex: none; overflow: visible; } }
#rocketHud { position: fixed; top: 60px; left: 0; right: 0; margin: 0 auto; width: fit-content; z-index: 30; background: rgba(10,8,24,.75); border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: 6px 14px; display: flex; gap: 14px; font-size: 14px; }
#rocketHud b { color: #ffd86b; font-size: 18px; }
#rocketBanner { position: fixed; top: 30%; left: 0; right: 0; text-align: center; z-index: 31; font: 800 clamp(26px, 5vw, 52px) system-ui; color: #fff; text-shadow: 0 3px 12px rgba(0,0,0,.7); pointer-events: none; }
#rocketBanner.pop { animation: rkpop .5s ease-out; }
@keyframes rkpop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#rocketResult { position: fixed; left: 0; right: 0; bottom: 70px; margin: 0 auto; width: min(520px, calc(100vw - 24px)); z-index: 32; text-align: center; }
#rocketResult h2 { margin: 4px 0 8px; }
#rocketResult .big { font-size: 16px; }
#rocketResult .row { justify-content: center; }

.rk-panel { background: #1e2a2c; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 14px 16px; box-shadow: 0 16px 60px rgba(0,0,0,.6); color: #f4efe6; }

.ph-join { display: block; margin-top: 6px; width: 100%; border: 0; border-radius: 12px; padding: 7px 10px; background: #fff; color: #0a84ff !important; font-weight: 700 !important; }
.ph-row[disabled] { opacity: .55; }
.ph-right button + button { margin-left: 4px; }
/* the portal gun's panel */
#portalPanel { position: fixed; left: 0; right: 0; bottom: 70px; margin: 0 auto; width: fit-content; max-width: calc(100vw - 16px); z-index: 20; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: center;
  background: rgba(20,28,30,.86); backdrop-filter: blur(6px); border: 1px solid rgba(62,230,255,.35); border-radius: 12px; padding: 6px 10px; font-size: 12px; }
#portalPanel[hidden] { display: none; }
#portalPanel label { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); }
#portalPanel select { font-size: 12px; padding: 1px 3px; }
#portalPanel button { padding: 3px 8px; font-size: 12px; }

.ph-section { margin: 14px 6px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.75); }
.ph-where { margin: -14px 6px 4px; font-size: 13px; color: rgba(255,255,255,.8); }
.ph-homescreen { overflow-y: auto; }

.iso-mark { font: 800 54px/1.1 system-ui, sans-serif; letter-spacing: .02em; background: linear-gradient(90deg, #7af0ff, #b07aff, #ff9ec7); -webkit-background-clip: text; background-clip: text; color: transparent; text-align: center; padding: 18px 0 6px; }
.iso-tag { text-align: center; letter-spacing: .22em; font: 600 13px system-ui, sans-serif; color: #cfd8ff; margin-bottom: 6px; }
.iso-logo { width: 100%; max-width: 520px; border-radius: 14px; display: block; margin: 0 auto; }
body.iso .authcard { background: #0d1530; border-color: rgba(122,140,255,.35); box-shadow: 0 0 60px rgba(90,110,255,.25); }
body.iso .authcard .tabs button.on, body.iso .authcard button.primary { background: linear-gradient(90deg, #5b8cff, #a06bff); color: #fff; }
body.iso .auth-hero { margin: -6px -6px 4px; background: #0d1530 !important; }
/* Isoverse sign-up: the logo is the whole page, the card sits to the side of it (below it on a phone) */
body.iso #auth { background: #060a1a url(/iso/logo-full.jpg) center center / cover no-repeat; place-items: center; padding: 24px; }
body.iso #auth.iso-splash-on .authcard { display: none; }
body.iso #auth:not(.iso-splash-on) { background-color: #060a1a; box-shadow: inset 0 0 0 100vmax rgba(4,6,18,.45); }
.iso-splash { display: none; }
body.iso #auth.iso-splash-on .iso-splash { display: flex; gap: 14px; position: absolute; left: 0; right: 0; bottom: 7vh; justify-content: center; }
.iso-splash button { font: 700 17px system-ui, sans-serif; padding: 12px 26px; border-radius: 30px; border: 1px solid rgba(160,180,255,.5); background: rgba(14,20,48,.6); color: #e8edff; backdrop-filter: blur(6px); cursor: pointer; }
.iso-splash button:first-child { background: linear-gradient(90deg, #5b8cff, #a06bff); border-color: transparent; }
.iso-back { display: none; }
body.iso .iso-back { display: block; background: none; border: 0; color: #9fb0ff; font-size: 13px; padding: 0 0 6px; cursor: pointer; }
body.iso #auth .authcard { background: rgba(10,16,40,.72); backdrop-filter: blur(10px); max-width: 360px; }
body.iso .auth-hero { margin: 0 0 2px; background: none !important; text-align: center; }
.iso-small { font: 800 18px system-ui, sans-serif; letter-spacing: .3em; color: #dfe6ff; }
@media (max-aspect-ratio: 1/1) {
  body.iso #auth { background-size: 190% auto; background-position: center 35%; }
}
