/* Full-screen play layout (desktop, tablet, non-touch): the arena owns the screen, the HUD
   floats on top and the old side panel becomes a drawer that only opens on request.
   Phones keep their dedicated touch layout (body.mobile-game). */
body:not(.mobile-game) { overflow: hidden; background: #120d2a; }
body:not(.mobile-game) main { max-width: none; padding: 0; margin: 0; height: 100dvh; }
body:not(.mobile-game) main > header { position: fixed; top: 12px; right: 16px; z-index: 30; margin: 0; display: flex; gap: 8px; pointer-events: none; }
body:not(.mobile-game) main > header > * { pointer-events: auto; }
body:not(.mobile-game) main > header .brand, body:not(.mobile-game) main > header .edition, body:not(.mobile-game) main > header .tagline,
body:not(.mobile-game) main > header > p, body:not(.mobile-game) main > header > a { display: none; }
body:not(.mobile-game) main > header .header-side { display: flex; align-items: center; gap: 8px; }
body:not(.mobile-game) main > header button { width: auto; margin: 0; min-height: 40px; padding: 8px 14px; border-radius: 14px; border: 3px solid #fff; background: rgba(20, 16, 44, .82); color: #fff; font-weight: 800; font-size: 13px; box-shadow: 0 4px 0 rgba(0,0,0,.35); }
body:not(.mobile-game) #status { position: fixed; left: 16px; bottom: 16px; z-index: 25; max-width: 40vw; padding: 6px 12px; border-radius: 12px; background: rgba(20, 16, 44, .7); color: #fff; font-size: 12px; font-weight: 700; pointer-events: none; }
body:not(.mobile-game) #status:empty { display: none; }
body:not(.mobile-game) .layout { display: block; position: fixed; inset: 0; }
body:not(.mobile-game) .stage { position: absolute; inset: 0; max-width: none; width: auto; height: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; overflow: hidden; }
body:not(.mobile-game) .board-wrap { position: absolute; inset: 0; background: transparent; }
body:not(.mobile-game) .stage canvas#game { width: 100%; height: 100%; aspect-ratio: auto; }
body:not(.mobile-game) .stage-footer, body:not(.mobile-game) main > footer { display: none; }

/* HUD: timer pill top centre, player cards along the top edge */
body:not(.mobile-game) .arena-top { position: absolute; z-index: 10; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 6px 10px 6px 18px;
  background: rgba(20, 16, 44, .84); border: 3px solid #fff; border-radius: 22px; box-shadow: 0 6px 0 rgba(0,0,0,.3); color: #fff; backdrop-filter: blur(6px); }
body:not(.mobile-game) .arena-top h2 { font-size: 16px; font-weight: 900; text-transform: uppercase; margin: 0; }
body:not(.mobile-game) .arena-top .eyebrow { font-size: 10px; letter-spacing: .14em; opacity: .75; }
body:not(.mobile-game) .timer-wrap strong { font-size: 32px; font-weight: 900; color: #ffd34d; text-shadow: 0 3px 0 rgba(0,0,0,.4); }
body:not(.mobile-game) .arena-top button { width: auto; margin: 0; padding: 6px 12px; border-radius: 12px; border: 2px solid #fff; background: #ff9f43; color: #1a1030; font-weight: 900; }
body:not(.mobile-game) .player-cards { position: absolute; z-index: 9; left: 16px; right: 16px; top: 84px; display: flex !important; justify-content: space-between; gap: 12px; padding: 0; pointer-events: none; }
body:not(.mobile-game) .player-card { width: min(230px, 22vw); padding: 8px 12px; border-radius: 16px; border: 3px solid var(--player); background: rgba(20, 16, 44, .82); color: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.3); backdrop-filter: blur(4px); }
body:not(.mobile-game) .player-card strong { font-size: 14px; font-weight: 900; }
body:not(.mobile-game) .player-card .score { color: #ffd34d; font-size: 18px; font-weight: 900; }
body:not(.mobile-game) .player-card small { opacity: .8; }
body:not(.mobile-game) .player-card.out { opacity: .45; filter: grayscale(.7); }
body:not(.mobile-game) #countdown { font-size: 110px; font-weight: 900; color: #fff; -webkit-text-stroke: 4px #1a1030; paint-order: stroke fill; text-shadow: 0 8px 0 #ff9f43; letter-spacing: -.02em; }
body:not(.mobile-game) #objective { bottom: 18px; background: rgba(20, 16, 44, .85); border: 3px solid #fff; color: #fff; font-weight: 800; font-size: 14px; }
body:not(.mobile-game) #sudden { position: absolute; top: 140px; left: 50%; transform: translateX(-50%); padding: 6px 16px; border-radius: 14px; background: #ff4d6d; color: #fff; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; animation: arc-blink 1s infinite; }

/* the side panel as an on-demand drawer */
body:not(.mobile-game) aside#game-menu { position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; width: min(400px, 94vw); max-height: none; border-radius: 26px 0 0 26px; border: 3px solid #fff; border-right: 0;
  background: rgba(24, 19, 52, .96); color: #fff; transform: translateX(105%); transition: transform .28s cubic-bezier(.2, 1.2, .4, 1); box-shadow: -18px 0 40px rgba(0,0,0,.45); overflow-y: auto; }
body:not(.mobile-game).drawer-open aside#game-menu { transform: none; }
body:not(.mobile-game) .drawer-backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(8, 6, 20, .45); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .2s; }
body:not(.mobile-game).drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
body.mobile-game .drawer-backdrop, body.mobile-game .drawer-close { display: none; }
body:not(.mobile-game) aside#game-menu nav { background: rgba(24, 19, 52, .98); padding-right: 52px; }
body:not(.mobile-game) aside#game-menu nav button.active { color: #ffd34d; box-shadow: inset 0 -3px #ffd34d; }
body:not(.mobile-game) aside#game-menu section { padding: 18px 20px; }
body:not(.mobile-game) aside#game-menu select, body:not(.mobile-game) aside#game-menu input:not([type=checkbox]):not([type=range]) { background: rgba(0,0,0,.35); color: #fff; border: 2px solid rgba(255,255,255,.35); border-radius: 12px; min-height: 42px; font-weight: 700; }
body:not(.mobile-game) aside#game-menu section button:not(.secondary):not([data-tab]) { background: #ff9f43; color: #1a1030; border: 3px solid #fff; border-radius: 14px; font-weight: 900; font-size: 15px; min-height: 46px; box-shadow: 0 5px 0 rgba(0,0,0,.35); }
body:not(.mobile-game) aside#game-menu button.secondary { border-radius: 12px; }
.drawer-close { position: fixed; z-index: 41; top: 10px; right: 12px; width: 40px !important; height: 40px; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border-radius: 50% !important; border: 3px solid #fff !important; background: #1a1030 !important; color: #fff !important; font-size: 18px !important; font-weight: 900; transform: translateX(450px); transition: transform .28s; }
body.drawer-open .drawer-close { transform: none; }

dialog { border: 3px solid #fff !important; border-radius: 24px !important; background: rgba(24, 19, 52, .97) !important; color: #fff !important; box-shadow: 0 10px 0 rgba(0,0,0,.35), 0 30px 80px rgba(0,0,0,.5) !important; }
dialog::backdrop { background: rgba(8, 6, 20, .55); backdrop-filter: blur(3px); }

body.drawer-open:not(.mobile-game) main > header { display: none; }

/* phones keep TeeBoom's own touch layout (styles.css); the arcade menu is reached from the pause dialog */

/* short windows without touch (small laptops, phones with a mouse/pad): compact HUD on the left */
@media (max-height: 520px) {
  body:not(.mobile-game) .arena-top { left: 12px; transform: none; top: 8px; padding: 4px 8px 4px 12px; gap: 10px; }
  body:not(.mobile-game) .arena-top h2 { font-size: 13px; }
  body:not(.mobile-game) .timer-wrap strong { font-size: 24px; }
  body:not(.mobile-game) main > header { top: 8px; }
  body:not(.mobile-game) .player-cards { top: 64px; left: 12px; right: auto; flex-direction: column; gap: 6px; }
  body:not(.mobile-game) .player-card { width: 150px; padding: 4px 8px; border-width: 2px; }
  body:not(.mobile-game) .player-card strong { font-size: 12px; }
  body:not(.mobile-game) .player-card small { display: none; }
}
