/* Dusk sea around a sandy island. One fixed look: it is a game screen. */
:root {
  --sea-deep: #101a33;
  --sea: #1d3461;
  --foam: #9fd3ec;
  --sand: #f2d49b;
  --ink: #fff8ec;
  --ink-dim: #b9c4dd;
  --panel: rgba(16, 26, 51, 0.86);
  --panel-line: rgba(159, 211, 236, 0.22);
  --fuse: #ffb627;
  --fuse-deep: #e07a10;
  --red: #ff5a4e;
  --blue: #3fa9f5;
  --good: #7cd36a;
  --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--sea-deep); color: var(--ink); font-family: var(--body); font-weight: 600; }
body { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
[hidden] { display: none !important; }
#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font: inherit; color: inherit; }
input { user-select: text; -webkit-user-select: text; }
:focus-visible { outline: 3px solid var(--fuse); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer;
  background: rgba(255, 248, 236, 0.1);
  border: 2px solid rgba(255, 248, 236, 0.22);
  color: var(--ink); border-radius: 14px;
  padding: 12px 18px; font-family: var(--body); font-weight: 900; font-size: 16px; letter-spacing: 0.02em;
  transition: transform 0.08s, background 0.15s;
}
.btn:active { transform: translateY(2px) scale(0.98); }
.btn.primary { background: var(--fuse); border-color: var(--fuse); color: #2a1600; box-shadow: 0 4px 0 var(--fuse-deep); }
.btn.primary:active { box-shadow: 0 1px 0 var(--fuse-deep); transform: translateY(3px); }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(255, 90, 78, 0.6); color: #ffb3ac; }
.btn.wide { width: 100%; }
.icon-btn { appearance: none; border: 0; background: rgba(16, 26, 51, 0.6); width: 44px; height: 44px; border-radius: 12px; font-size: 18px; cursor: pointer; }

/* ---------- home ---------- */
.screen { position: fixed; inset: 0; overflow-y: auto; touch-action: pan-y; display: grid; place-items: center; padding: max(16px, var(--st)) max(16px, var(--sr)) max(16px, var(--sb)) max(16px, var(--sl)); }
.home-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 24px; padding: 24px 20px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.logo { margin: 0; font-family: var(--display); font-weight: 400; line-height: 0.88; font-size: clamp(52px, 15vw, 76px); display: flex; flex-direction: column; letter-spacing: 0.01em; }
.logo span:first-child { color: var(--fuse); text-shadow: 0 5px 0 var(--fuse-deep); transform: rotate(-3deg); transform-origin: left; }
.logo span:last-child { color: var(--ink); text-shadow: 0 5px 0 #4a5f8f; margin-left: 0.5em; }
.tag { margin: 0; color: var(--ink-dim); font-size: 15px; line-height: 1.4; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-dim); font-weight: 800; }
.field input, .join-row input {
  width: 100%; min-width: 0; font: inherit; font-weight: 800; font-size: 18px; color: var(--ink);
  background: rgba(0, 0, 0, 0.25); border: 2px solid var(--panel-line); border-radius: 12px; padding: 11px 14px;
}
.field input:focus, .join-row input:focus { outline: none; border-color: var(--fuse); }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.swatch { aspect-ratio: 1; max-width: 100%; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 -5px 0 rgba(0,0,0,0.22); }
.swatch[aria-pressed="true"] { border-color: var(--ink); transform: scale(1.08); }
.actions { display: flex; flex-direction: column; gap: 10px; }
.actions .btn.primary { font-size: 19px; padding: 14px; }
.join-row { display: flex; gap: 8px; }
.join-row input { text-transform: uppercase; letter-spacing: 0.25em; font-family: var(--display); font-weight: 400; text-align: center; }
.err { margin: 0; color: #ffb3ac; font-size: 14px; }
.look { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; }
.look canvas { width: 92px; height: 92px; border-radius: 18px; background: radial-gradient(circle at 50% 60%, #2a4a7a, #14213d 70%); }
.look-rows { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.look-row { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.look-row > span { font-size: 11px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
.chips { display: flex; gap: 5px; overflow-x: auto; touch-action: pan-x; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; appearance: none; border: 2px solid var(--panel-line); background: transparent; color: var(--ink-dim); border-radius: 999px; padding: 5px 10px; font-weight: 900; font-size: 12.5px; cursor: pointer; }
.chips button[aria-pressed="true"] { border-color: var(--fuse); color: var(--fuse); background: rgba(255, 182, 39, 0.1); }
.emote-btn { pointer-events: auto; appearance: none; border: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--panel); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--panel-line); margin-top: 2px; }
.emote-pop { pointer-events: auto; display: grid; grid-template-columns: repeat(3, auto); gap: 6px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 14px; padding: 8px; z-index: 6; }
.emote-pop button { appearance: none; border: 0; background: rgba(255, 248, 236, 0.08); border-radius: 10px; padding: 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--ink); font-weight: 900; font-size: 11px; }
.emote-pop button b { font-size: 24px; line-height: 1; font-weight: 400; }
.replay { position: absolute; inset: 0; z-index: 7; pointer-events: auto; }
.replay-bar { position: absolute; left: 0; right: 0; height: 9%; background: #05080f; }
.replay-bar.top { top: 0; }
.replay-bar.bottom { bottom: 0; }
.replay-tag { position: absolute; top: calc(9% + 8px); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 999px; padding: 5px 14px; white-space: nowrap; }
.replay-tag b { font-family: var(--display); font-weight: 400; color: #ff5a4e; letter-spacing: 0.06em; }
.replay-tag b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff5a4e; margin-right: 6px; vertical-align: 1px; animation: rec 1s steps(2) infinite; }
@keyframes rec { 50% { opacity: 0; } }
.replay-tag span { font-weight: 900; }
.replay-tag small { color: var(--ink-dim); font-size: 11px; }
.ios-tip { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; line-height: 1.45; color: var(--ink-dim); background: rgba(159, 211, 236, 0.08); border: 1px solid var(--panel-line); border-radius: 14px; padding: 11px 13px; }
.ios-tip > b { color: var(--ink); font-size: 14px; }
.share-ic { display: inline-block; width: 13px; height: 15px; vertical-align: -2px; border: 2px solid var(--foam); border-top: 0; border-radius: 0 0 3px 3px; position: relative; margin: 0 2px; }
.share-ic::before { content: ""; position: absolute; left: 50%; top: -6px; width: 2px; height: 11px; background: var(--foam); transform: translateX(-50%); }
.menu-tip { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-dim); background: var(--panel); border: 1px solid var(--panel-line); border-radius: 12px; padding: 10px 12px; }

/* ---------- HUD ---------- */
#game { position: fixed; inset: 0; }
/* Sideways mode: the page stays portrait but the game is drawn rotated,
   for phones that can't lock landscape (iPhone) or have rotation locked. */
body.side-cw #game, body.side-cw #cv, body.side-ccw #game, body.side-ccw #cv { inset: auto; top: 0; left: 0; transform-origin: 0 0; }
body.side-cw .rotate, body.side-ccw .rotate { display: none !important; }
body.side-cw { --sl: env(safe-area-inset-top, 0px); --sr: env(safe-area-inset-bottom, 0px); --st: env(safe-area-inset-right, 0px); --sb: env(safe-area-inset-left, 0px); }
body.side-ccw { --sl: env(safe-area-inset-bottom, 0px); --sr: env(safe-area-inset-top, 0px); --st: env(safe-area-inset-left, 0px); --sb: env(safe-area-inset-right, 0px); }
#hud { position: absolute; inset: 0; pointer-events: none; padding: max(10px, var(--st)) max(12px, var(--sr)) 0 max(12px, var(--sl)); }
.hud-left { position: absolute; top: max(10px, var(--st)); left: max(12px, var(--sl)); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; z-index: 4; }
.lives { display: flex; gap: 4px; min-height: 18px; }
.lives i { width: 16px; height: 16px; border-radius: 50%; background: #222; box-shadow: inset -3px -3px 0 rgba(0,0,0,0.5), 0 0 0 2px var(--ink); position: relative; }
.lives i::after { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--fuse); top: -4px; right: -2px; }
.lives i.lost { opacity: 0.22; }
.hpbar { width: 130px; height: 10px; border-radius: 6px; background: rgba(0, 0, 0, 0.45); overflow: hidden; border: 1.5px solid rgba(255,248,236,0.35); }
.hpbar i { display: block; height: 100%; width: 100%; background: var(--good); border-radius: 6px; transition: width 0.15s, background 0.2s; }
.buffs { display: flex; gap: 6px; font-size: 11px; font-weight: 900; letter-spacing: 0.06em; }
.buffs span { background: var(--panel); padding: 2px 7px; border-radius: 8px; border: 1px solid var(--panel-line); }
.hud-center { position: absolute; top: max(8px, var(--st)); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; font-weight: 900; font-size: 14px; white-space: nowrap; }
.hud-center .chip { background: var(--panel); border: 1px solid var(--panel-line); padding: 5px 11px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.hud-center .chip.warn { color: var(--fuse); border-color: var(--fuse); }
.hud-center .chip.hot { color: #fff; background: #c62828; border-color: #ff8a80; animation: hotPulse 0.6s ease-in-out infinite alternate; }
@keyframes hotPulse { to { transform: scale(1.06); } }
.hud-center .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.hud-right { position: absolute; top: max(8px, var(--st)); right: max(12px, var(--sr)); display: flex; gap: 8px; align-items: center; pointer-events: auto; z-index: 4; }
.ping { font-size: 11px; color: var(--ink-dim); font-variant-numeric: tabular-nums; background: rgba(16,26,51,0.5); padding: 3px 7px; border-radius: 8px; }
.feed { position: absolute; top: calc(max(8px, var(--st)) + 46px); right: max(12px, var(--sr)); display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.feed div { background: var(--panel); padding: 3px 9px; border-radius: 8px; font-size: 12px; font-weight: 800; animation: feedIn 0.25s ease-out; }
.feed b { font-weight: 900; }
@keyframes feedIn { from { transform: translateX(20px); opacity: 0; } }

/* ---------- lobby ---------- */
.lobby { position: absolute; top: calc(max(8px, var(--st)) + 2px); left: 50%; transform: translateX(-50%); width: min(400px, calc(100% - 210px)); min-width: 260px; max-height: calc(100% - 140px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 18px; padding: 10px 12px; gap: 8px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 5; }
.lobby-top { display: flex; align-items: center; gap: 8px; }
.room { display: flex; flex-direction: column; flex: 1; line-height: 1; }
.room-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); font-weight: 900; }
.room-code { font-family: var(--display); font-size: 26px; letter-spacing: 0.14em; color: var(--fuse); }
.lobby-body { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; touch-action: pan-y; min-height: 0; flex: 1 1 auto; }
.lobby-foot { flex: none; display: flex; align-items: center; gap: 10px; }
.lobby-foot .btn.primary { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby-foot .wait { flex: 1; }
.lobby-foot .btn.primary { padding: 10px 14px; }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.mode { appearance: none; border: 2px solid var(--panel-line); background: transparent; border-radius: 10px; padding: 7px 2px; font-weight: 900; font-size: 12px; white-space: nowrap; cursor: pointer; color: var(--ink-dim); }
.mode[aria-pressed="true"] { border-color: var(--fuse); color: var(--fuse); background: rgba(255, 182, 39, 0.1); }
.mode:disabled { cursor: default; }
.mode-hint { margin: 0; font-size: 12px; color: var(--ink-dim); line-height: 1.35; }
.players { display: flex; flex-wrap: wrap; gap: 5px; }
.pchip { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,248,236,0.07); border-radius: 999px; padding: 3px 9px 3px 4px; font-size: 12.5px; font-weight: 800; }
.pchip i { width: 14px; height: 14px; border-radius: 50%; }
.pchip.me { box-shadow: inset 0 0 0 1.5px var(--ink); }
.pchip small { color: var(--ink-dim); font-weight: 800; }
.bots { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 900; color: var(--ink-dim); }
.bots .btn.small { width: 34px; padding: 4px 0; font-size: 16px; }
.bot-count { min-width: 1.5em; text-align: center; color: var(--ink); font-variant-numeric: tabular-nums; }
.pchip .tagbot { font-size: 9.5px; letter-spacing: 0.08em; background: rgba(255,248,236,0.14); padding: 1px 4px; border-radius: 4px; color: var(--ink-dim); }
.wait { margin: 0; font-size: 12.5px; color: var(--ink-dim); text-align: center; }
.lobby.collapsed .lobby-body { display: none; }

/* ---------- banner / results / menu ---------- */
.banner { position: absolute; top: 34%; left: 50%; transform: translate(-50%, -50%); font-family: var(--display); font-size: clamp(44px, 12vh, 96px); color: var(--fuse); text-shadow: 0 5px 0 var(--fuse-deep), 0 0 30px rgba(0,0,0,0.5); pointer-events: none; white-space: nowrap; animation: pop 0.35s cubic-bezier(.2,1.6,.5,1); }
@keyframes pop { from { transform: translate(-50%, -50%) scale(0.3); opacity: 0; } }
.results { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(10, 16, 34, 0.72); padding: max(16px, var(--st)) max(16px, var(--sr)) max(16px, var(--sb)) max(16px, var(--sl)); z-index: 6; }
.results h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 8vh, 56px); color: var(--fuse); text-shadow: 0 4px 0 var(--fuse-deep); text-align: center; animation: pop2 0.4s cubic-bezier(.2,1.6,.5,1); }
@keyframes pop2 { from { transform: scale(0.4); opacity: 0; } }
.res-table { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 4px 14px; font-size: 14px; font-weight: 800; max-height: 50vh; overflow-y: auto; font-variant-numeric: tabular-nums; background: var(--panel); padding: 10px 14px; border-radius: 14px; }
.res-table .h { color: var(--ink-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.res-table .win { color: var(--fuse); }
.res-table i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.res-next { margin: 0; color: var(--ink-dim); font-size: 13px; }
.res-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: flex-start; max-width: 100%; }
.tour-box { display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid rgba(255, 182, 39, 0.4); border-radius: 14px; padding: 10px 14px; min-width: 0; }
.tour-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fuse); font-weight: 900; }
.tour-table { display: grid; grid-template-columns: auto auto 1fr auto; gap: 4px 10px; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; max-height: 46vh; overflow-y: auto; }
.tour-table .me { color: var(--fuse); }
.tour-table i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.champ { margin: 0; font-family: var(--display); font-size: clamp(22px, 6vh, 34px); color: var(--ink); text-align: center; animation: pop2 0.5s cubic-bezier(.2,1.6,.5,1); }
.menu { position: absolute; inset: 0; background: rgba(10, 16, 34, 0.7); display: grid; place-items: center; z-index: 10; }
.menu-card { display: flex; flex-direction: column; gap: 10px; width: min(300px, 80%); }
.rules-line { margin: 0; font-size: 12px; font-weight: 800; color: var(--fuse); }
.rules-card { width: min(560px, calc(100% - 32px)); max-height: calc(100% - 24px); overflow-y: auto; touch-action: pan-y; background: var(--sea-deep); border: 1px solid var(--panel-line); border-radius: 18px; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.rules-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: -12px; background: var(--sea-deep); padding-block: 4px; }
.rules-head h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--fuse); }
.rules-note { margin: 0; font-size: 12.5px; color: var(--ink-dim); }
.rules-rows { display: flex; flex-direction: column; gap: 10px; }
.rule { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px; align-items: center; }
.rule > span { font-size: 12.5px; font-weight: 900; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.seg { display: flex; flex-wrap: wrap; gap: 5px; }
.seg button { appearance: none; border: 2px solid var(--panel-line); background: transparent; color: var(--ink-dim); border-radius: 10px; padding: 6px 10px; font-weight: 900; font-size: 13px; cursor: pointer; }
.seg button[aria-pressed="true"] { border-color: var(--fuse); color: var(--fuse); background: rgba(255, 182, 39, 0.1); }
.seg button:disabled { cursor: default; }
@media (max-width: 520px) { .rule { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- controls ---------- */
#controls { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
#controls.hide { visibility: hidden !important; }
.stick-zone, .pad { pointer-events: auto; }
.stick-zone { position: absolute; left: 0; top: 60px; bottom: 0; width: 50%; touch-action: none; }
.stick-base { position: absolute; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; border: 3px solid rgba(255,248,236,0.3); background: rgba(16,26,51,0.35); left: calc(max(16px, var(--sl)) + 82px); top: calc(100% - 92px - var(--sb)); pointer-events: none; transition: opacity 0.2s; opacity: 0.55; }
.stick-base.active { opacity: 1; transition: none; }
.stick-knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: var(--ink); box-shadow: inset 0 -5px 0 rgba(0,0,0,0.2), 0 3px 10px rgba(0,0,0,0.35); }
.btns { position: absolute; right: max(18px, calc(var(--sr) + 8px)); bottom: max(18px, calc(var(--sb) + 8px)); width: 210px; height: 190px; }
.pad { position: absolute; appearance: none; border: 0; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 400; letter-spacing: 0.04em; color: #fff; touch-action: none; cursor: pointer; text-shadow: 0 2px 0 rgba(0,0,0,0.3); }
.pad.pressed { transform: scale(0.92); filter: brightness(1.2); }
.pad.bomb { width: 96px; height: 96px; right: 0; bottom: 0; font-size: 19px; background: radial-gradient(circle at 35% 30%, #4a4a52, #15151a 70%); box-shadow: 0 0 0 3px var(--fuse), 0 5px 0 #000; }
.pad.punch { width: 72px; height: 72px; right: 110px; bottom: 6px; font-size: 14px; background: var(--red); box-shadow: 0 5px 0 #a8302a; }
.pad.grab { width: 62px; height: 62px; right: 118px; bottom: 96px; font-size: 12.5px; background: #8b5cf6; box-shadow: 0 5px 0 #5b33b5; }
.pad.grab.holding { background: var(--fuse); color: #2a1600; text-shadow: none; box-shadow: 0 5px 0 var(--fuse-deep); }
.pad.jump { width: 66px; height: 66px; right: 30px; bottom: 112px; font-size: 13px; background: var(--blue); box-shadow: 0 5px 0 #1e6aa8; }

.rotate { position: absolute; inset: 0; background: var(--sea-deep); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 20px; z-index: 20; text-align: center; padding: 24px; }
.rotate p { font-family: var(--display); font-size: 26px; margin: 0; max-width: 16ch; }
.rotate .btn.primary { font-size: 18px; padding: 14px 22px; }
.rotate-hint { color: var(--ink-dim); font-size: 13.5px; max-width: 30ch; line-height: 1.4; }
.phone-icon { width: 54px; height: 90px; border: 5px solid var(--ink); border-radius: 12px; animation: turn 1.8s ease-in-out infinite; }
@keyframes turn { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@media (orientation: portrait) { .rotate { display: flex; } }

.conn { position: absolute; inset: 0; background: rgba(10, 16, 34, 0.75); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; z-index: 15; }
.conn p { margin: 0; font-weight: 800; font-size: 17px; text-align: center; padding: 0 24px; }
.toast { position: fixed; bottom: calc(24px + var(--sb)); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--sea-deep); padding: 9px 16px; border-radius: 12px; font-weight: 900; z-index: 30; max-width: calc(100% - 32px); text-align: center; }

@media (max-height: 380px) {
  .lobby { max-height: calc(100% - 120px); }
  .room-code { font-size: 22px; }
  .btns { transform: scale(0.88); transform-origin: bottom right; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
