/* Phone screens inside a room (lobby, top bar, menu, the controls around each game) in the shared kostos.party look.
   Chrome only: the table theme (felt, scene backdrop, --gold accent, --panel-rgb tint) still comes from theme.css, so a
   Vegas or beach room keeps its colours. Sizes stay the same as style.css (stationary phone layout): only fonts, colours,
   corners and shadows change here. The TV (body.tv) is not touched. Loaded after theme.css. */
body.phone { font-family: var(--k-font-ui); }

/* top bar: a frosted strip instead of the solid gradient */
body.phone:not(.gr-home) .ph-top { background: rgb(var(--panel-rgb) / .72); backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%); margin: 0 -16px; padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
body.phone .top-game { min-width: 0; white-space: nowrap; overflow: hidden; font: 700 16px/1.1 var(--k-font-display); text-transform: uppercase; letter-spacing: .04em; }
body.phone .code-chip { font: 700 15px/1 var(--k-font-display); letter-spacing: .2em; border-radius: 999px; padding: 9px 14px; }
body.phone .icon-btn { border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); display: inline-grid; place-items: center; }
body.phone .icon-btn .k-i { width: 20px; height: 20px; }
body.phone .icon-btn.small .k-i { width: 15px; height: 15px; }

/* panels: glass tinted by the table theme */
body.phone .panel { background: rgb(var(--panel-rgb) / .58); border: 1px solid rgba(255,255,255,.1); border-radius: 18px;
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
body.phone .lbl { font: 500 11px/1.2 var(--k-font-ui); letter-spacing: .14em; color: var(--mute); }
body.phone .room-code { font-family: var(--k-font-display); font-weight: 700; letter-spacing: .14em; }
body.phone .game-now b, body.phone .menu-h { font-family: var(--k-font-display); text-transform: uppercase; letter-spacing: .03em; }
body.phone .fine a { color: var(--ink); }

/* buttons and chips: flat pills, same sizes */
body.phone .btn { font-family: var(--k-font-ui); font-weight: 700; box-shadow: none; transition: transform .16s cubic-bezier(.2,.8,.2,1), filter .16s; }
body.phone .btn:active { transform: scale(.97); box-shadow: none; }
body.phone .btn.ghost { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); }
body.phone .btn.big { font-family: var(--k-font-display); text-transform: uppercase; letter-spacing: .04em; }
body.phone .btn .k-i, body.phone .chip .k-i { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; }
body.phone .chip { font-family: var(--k-font-ui); font-weight: 600; }
body.phone .chip.on { box-shadow: none; }
@media (hover: hover) { body.phone .btn:hover:not(:disabled) { filter: brightness(1.08); } }

/* lobby selects: dark glass instead of a white box (game inputs keep their own look) */
body.phone .panel select { background: rgba(255,255,255,.08); color: var(--ink); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; }
body.phone .panel select option, body.phone .panel select optgroup { background: var(--panel-solid); color: var(--ink); }

/* menu, confirm and toast */
body.phone .menu-overlay, body.phone .confirm-overlay { background: rgba(5,6,10,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
body.phone .menu-box, body.phone .confirm-box { background: rgb(var(--panel-rgb) / .9); border-radius: 22px; }
/* The menu scrolls inside itself (a long VIP menu never runs off the screen) and ends in Save, which just closes it. */
body.phone .menu-box { max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
body.phone .menu-box .menu-save { background: #2fb457; border-color: #2fb457; color: #fff; margin-top: 16px; }
/* Leave sits at the very bottom of the room's page, quiet, below everything you'd tap during a game. */
body.phone .leave-btn { display: block; width: 100%; margin: 32px 0 8px; color: #ff8a80; }

/* iPhone basics for every room screen (Stephen, 2026-11-02: "follow some of the iphone design rules for uniformity"),
   from Apple's Human Interface Guidelines: taps at least 44 px, small text no smaller than 12 px, inputs at least 16 px so iOS
   doesn't zoom the page when one is tapped, and nothing under the notch or the home bar. */
body.phone .btn, body.phone .chip, body.phone .btn.small { min-height: 44px; }
body.phone .icon-btn { min-width: 44px; min-height: 44px; }
body.phone .lbl { font-size: 12px; }
body.phone input, body.phone textarea, body.phone select { font-size: max(16px, 1em); }
body.phone .ph-top { padding-top: max(12px, env(safe-area-inset-top)); }
body.phone .menu-overlay, body.phone .confirm-overlay { padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
body.phone .toast { background: #14161c; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; font-family: var(--k-font-ui); font-weight: 600; }

/* House Rules (rules.html): not a table, so the plain kostos.party dark, like the Game Room home */
body.rules-page { background: var(--k-bg) !important; }
body.rules-page::before { background: radial-gradient(70% 50% at 85% 0%, #24206b 0%, transparent 70%), var(--k-bg); } /* the fixed full-height layer from theme.css, so it holds still on phones */
body.rules-page .ph-top { --panel-rgb: 20 22 28; }
body.rules-page .panel { --panel-rgb: 28 31 40; }
body.rules-page .r-game h2, body.rules-page .r-title { font-family: var(--k-font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
body.rules-page .r-game h2 .gr-ic { color: var(--k-accent); }
body.rules-page .r-back { border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
