@import url("/css/hub.css");
/* GAMES HUB: true black with white ink, and small pops of RGB like the lighting inside a gaming PC:
   a slow colour sweep on hairlines, tiny glows on hover, each game in its own colour. Colour is an accent, never a fill. */
:root {
  --bg: #000;
  --panel: #101012;
  --panel2: #18181b;
  --line: #2c2c32;
  --line2: #484850;
  --ink: #f4f4f5;
  --dim: #8b8b94;
  --white: #fff;
  /* the RGB set */
  --red: #ff3d6e;
  --amber: #ffb02e;
  --lime: #3dff9a;
  --cyan: #2de2ff;
  --blue: #6a7bff;
  --violet: #c05cff;
  /* older names used around the pages */
  --pink: var(--red);
  --yellow: var(--amber);
  --green: var(--lime);
  --rgb: linear-gradient(90deg, var(--red), var(--amber), var(--lime), var(--cyan), var(--blue), var(--violet), var(--red));
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, 'Courier New', monospace;
  --display: 'Segoe UI Variable Display', 'Segoe UI', 'Helvetica Neue', Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  line-height: 1.5;
  background: var(--bg);
}
/* a faint dot grid, so the black is not flat */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}

a { color: var(--white); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--white); text-underline-offset: 4px; }
::selection { background: var(--white); color: #000; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

.wrap { width: min(1080px, 100% - 32px); margin: 0 auto; }

/* the colour sweep: a hairline that slowly slides through the RGB set */
@keyframes sweep { to { background-position: 200% 0; } }

/* ---- the top bar ---- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(0, 0, 0, 0.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 30px; }
.brand { display: flex; align-items: center; gap: 7px; font-family: var(--display); font-weight: 900; font-size: 12px; letter-spacing: 3px; color: var(--white); }
.brand:hover { text-decoration: none; }
.brand svg { width: 16px; height: 16px; transition: transform 0.4s; }
.brand:hover svg { transform: rotate(90deg); }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a, .navbtn { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); padding: 2px 8px; border: 1px solid transparent; border-radius: 0; background: none; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.nav a:hover, .navbtn:hover { color: var(--white); text-decoration: none; border-color: var(--line2); }
.nav a.on { color: #000; background: var(--white); }

/* ---- headings, filters, buttons ---- */
h2 { margin: 18px 0 8px; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--dim); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); background: none; border: 1px solid var(--line); border-radius: 0; padding: 6px 14px; cursor: pointer; transition: all 0.15s; }
.chip:hover { color: var(--white); border-color: var(--line2); }
.chip.on { color: #000; background: var(--white); border-color: var(--white); }

.btn { display: inline-block; font-family: inherit; font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: #000; padding: 7px 16px; border: 0; border-radius: 0; background: var(--white); cursor: pointer; position: relative; transition: transform 0.12s, box-shadow 0.2s; }
.btn:hover { text-decoration: none; background: #d8d8dc; }
.btn:active { transform: translateY(1px); }
.btn.off { background: var(--panel2); color: var(--dim); box-shadow: none; cursor: default; transform: none; }

.badge { font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; padding: 2px 8px; border-radius: 0; color: #000; background: var(--white); }
.badge.live { background: var(--lime); }
.badge.built { background: var(--amber); }
.badge.coming-soon { background: transparent; color: var(--dim); border: 1px solid var(--line2); }
.pill { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: var(--dim); border: 1px solid var(--line); border-radius: 0; padding: 1px 9px; }

/* ---- game cards (the /games/<id> page and anywhere a card is used) ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { --c: var(--violet); position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 0; color: var(--ink); transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--c); box-shadow: 0 8px 30px -10px var(--c); }
.card h3 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 800; }
.card .tag { color: var(--c); font-family: var(--mono); font-size: 12px; }
.card p { margin: 0; color: var(--dim); font-size: 13px; flex: 1; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.card.soon { opacity: 0.7; }

.detail { --c: var(--violet); margin: 28px 0 40px; padding: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 0; position: relative; overflow: hidden; }
.detail::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--c); box-shadow: 0 0 20px var(--c); }
.detail h1 { margin: 0 0 4px; font-family: var(--display); font-weight: 900; font-size: clamp(30px, 6vw, 46px); letter-spacing: -0.5px; color: var(--white); }
.detail .tag { color: var(--c); font-family: var(--mono); margin-bottom: 14px; }
.detail .facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.note { margin: 16px 0 0; padding: 10px 14px; border: 1px dashed var(--line2); border-radius: 0; color: var(--dim); font-family: var(--mono); font-size: 12px; }

/* ---- the 404 page and the footer ---- */
.lost { text-align: center; padding: 80px 0; }
.lost .big { font-family: var(--display); font-weight: 900; font-size: clamp(72px, 20vw, 160px); line-height: 1; letter-spacing: -4px; color: var(--white); text-shadow: -3px 0 var(--red), 3px 0 var(--cyan); }
footer { margin: 50px 0 30px; text-align: center; color: var(--dim); font-family: var(--mono); font-size: 11px; letter-spacing: 3px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .rgbline, .top::after { animation: none; } .card, .btn, .brand svg { transition: none; } }

/* =====================================================================================================
   MOBILE
   "Compact" = a phone: a screen narrower than 760px, or a short touch screen (a phone on its side, e.g. 844x390).
   js/common.js has the same query (COMPACT_QUERY); keep the two in step.
   Tablets and desktops keep the floating, draggable panels; they only get touch-sized controls.
   Nothing here changes a desktop with a mouse.
   ===================================================================================================== */
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; }
body.app { height: 100vh; height: 100dvh; }
.top { padding-top: env(safe-area-inset-top); }
.menubtn, .hchat, .hactions, .sheetclose, .chatbtn { display: none; }

/* every touch screen: no 300ms tap delay or double-tap zoom, no grey tap flash, inputs at 16px so iOS does not zoom in, 44px targets */
@media (pointer: coarse) {
  html, body { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  input:not([type='checkbox']):not([type='radio']), textarea, select { font-size: 16px !important; min-height: 44px; }
  .btn, .chip, .mini, .ptab { min-height: 44px; }
  .btn { display: inline-flex; align-items: center; justify-content: center; }
  .pbtn { width: 44px; height: 44px; }
  .pbar { height: 48px; }
  .schead { height: 48px; }
  .mini { padding: 0 14px; }
  .switch input { width: 24px; height: 24px; }
  .log, .side, .sclog, .stocks .sgrid, .pbody { overscroll-behavior: contain; }
}
/* no sticky hover on a screen that cannot hover: a tap must not leave a card lifted or a button lit */
@media (hover: none) {
  .tile:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 6px 8px -2px rgba(0, 0, 0, 0.9), 0 18px 22px -8px color-mix(in srgb, var(--c) 55%, #000); }
  .tile:hover .art { transform: none; filter: none; }
  .tile.soon:hover .art { filter: grayscale(0.7) brightness(0.7); }
  .tile:active { transform: translateY(-1px) scale(0.98); }
  .card:hover { transform: none; border-color: var(--line); box-shadow: none; }
  .btn:hover { background: var(--white); }
  .btn:active { background: #d8d8dc; }
  .btn.off:hover { background: var(--panel2); }
  .nav a:hover, .navbtn:hover { color: var(--dim); border-color: transparent; }
  .nav a.on:hover { color: #000; }
  .chip:hover { color: var(--dim); border-color: var(--line); }
  .chip.on:hover { color: #000; border-color: var(--white); }
  .mini:hover { background: none; color: var(--ink); }
  .mini:active { background: var(--white); color: #000; }
  .pbtn:hover, .scmin:hover { color: var(--dim); background: none; }
  .ptab:hover { color: var(--dim); }
  .ptab.on:hover { color: #000; }
  .msg:hover { background: none; }
  .msg.mine:hover { background: rgba(255, 255, 255, 0.04); }
  .mdel { opacity: 0.8; }
  .board tr:hover td { background: none; }
  .stocks .scard:hover { border-color: #2f353c; }
  .stocks .scard.owned:hover { border-color: rgba(234, 179, 8, 0.38); }
  .stocks .schip:hover { border-color: #262b31; }
  .stocks .schip.on:hover { border-color: #2a85e0; }
  .stocks .daily:hover { background: #2a85e0; }
  .stocks .buyBtn:hover:not(:disabled) { background: #16a34a; }
  .stocks .sellBtn:hover:not(:disabled) { background: #dc2626; }
  .stocks .ghostBtn:hover:not(:disabled) { background: #2a2f36; }
}

/* a tablet (wide, but touch): the desktop layout, with a roomier header */
@media (pointer: coarse) and (min-width: 761px) and (min-height: 501px) {
  .top .wrap { height: 48px; }
  .nav a, .navbtn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; font-size: 11px; }
  .ticker { height: 26px; }
}

/* ---------- the phone layout ---------- */
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  html, body { max-width: 100%; overflow-x: clip; }
  .wrap, .narrow { width: calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)); }
  footer { margin: 28px 0 calc(20px + env(safe-area-inset-bottom)); font-size: 10px; letter-spacing: 2px; }

  /* the header: logo, then Chat (lobby only) and a menu button; the links fold into a dropdown */
  .top .wrap { height: 48px; gap: 8px; }
  .brand { font-size: 13px; min-height: 44px; }
  .brand svg { width: 20px; height: 20px; }
  .hactions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
  .menubtn { display: grid; place-content: center; gap: 5px; width: 44px; height: 44px; padding: 0; background: none; border: 1px solid var(--line2); cursor: pointer; }
  .menubtn i { display: block; width: 18px; height: 2px; background: var(--white); transition: transform 0.18s, opacity 0.18s; }
  .top.menuopen .menubtn { border-color: var(--white); }
  .top.menuopen .menubtn i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .top.menuopen .menubtn i:nth-child(2) { opacity: 0; }
  .top.menuopen .menubtn i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hchat { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink); background: none; border: 1px solid var(--line2); cursor: pointer; }
  .hchat.on { color: #000; background: var(--white); border-color: var(--white); }
  .hactions ~ .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; flex-direction: column; align-items: stretch; gap: 0; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow-y: auto; padding: 4px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: rgba(6, 6, 8, 0.98); border-bottom: 1px solid var(--line2); box-shadow: 0 24px 40px rgba(0, 0, 0, 0.8); }
  .top.menuopen .hactions ~ .nav { display: flex; animation: drop 0.16s ease-out; }
  .top .nav a, .top .nav .navbtn { display: inline-flex; align-items: center; min-height: 44px; }
  .hactions ~ .nav a, .hactions ~ .nav .navbtn { display: flex; align-items: center; min-height: 52px; padding: 0 6px; font-size: 13px; letter-spacing: 2px; border: 0; border-bottom: 1px solid var(--line); text-align: left; color: var(--ink); }
  .hactions ~ .nav a.on { background: none; color: var(--cyan); }
  .hactions ~ .nav .navbtn { color: var(--red); }
  .hactions ~ .nav a:last-child, .hactions ~ .nav .navbtn:last-child { border-bottom: 0; }
  .ticker { height: 28px; font-size: 11px; }
  .tlabel { font-size: 10px; padding: 0 10px; }
  @keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

  /* the lobby: the games are the page; the chat is a full-screen sheet from the header button */
  body.app { overscroll-behavior: none; }
  .lobby { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  .side { padding: 0 10px 16px; -webkit-overflow-scrolling: touch; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 12px; padding: 14px 4px 20px; }
  .tile .players { font-size: 12px; padding: 3px 10px 3px 8px; }
  .tname { font-size: 16px; }
  .tstat { font-size: 10px; }
  .online li { font-size: 15px; min-height: 32px; }
  .side h2 { margin-top: 4px; }

  .chatcol { position: fixed; z-index: 55; left: 0; right: 0; top: var(--vvt, 0px); height: 100vh; height: var(--vvh, 100dvh); border: 0; padding-top: env(safe-area-inset-top); transform: translateY(100%); visibility: hidden; transition: transform 0.22s ease, visibility 0s linear 0.22s; }
  .chatcol.sheetopen { transform: none; visibility: visible; transition: transform 0.22s ease; }
  .chathead { flex: none; height: 52px; padding: 0 0 0 max(14px, env(safe-area-inset-left)); gap: 8px; }
  .chathead h2 { margin: 0 auto 0 0; font-size: 13px; }
  .chathead .status { margin: 0; font-size: 11px; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sheetclose { display: grid; place-items: center; flex: none; width: 52px; height: 52px; padding: 0 0 4px; font-size: 30px; line-height: 1; color: var(--white); background: none; border: 0; border-left: 1px solid var(--line); cursor: pointer; }
  .msg { align-items: flex-start; flex-wrap: wrap; gap: 2px 8px; padding: 8px max(14px, env(safe-area-inset-left)); font-size: 15px; }
  .mdel { width: 44px; height: 32px; margin-top: -6px; }
  .say { gap: 8px; padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  .say input { padding: 0 16px; }
  .say .btn { padding: 0 20px; min-height: 44px; font-size: 12px; }

  /* a game opens FULL SCREEN: the whole visible area, a slim bar on top with the title, tabs, Chat and a big close button */
  body.panelopen { overflow: hidden; }
  .panel { left: 0 !important; top: var(--vvt, 0px) !important; width: 100% !important; max-width: none; height: 100vh !important; height: var(--vvh, 100dvh) !important; border: 0; overflow: hidden; box-shadow: none; animation: sheetup 0.2s ease-out; }
  .pbar { height: calc(48px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 max(12px, env(safe-area-inset-left)); gap: 4px; cursor: default; touch-action: manipulation; }
  .ptitle { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
  .ptabs { margin-left: auto; flex: none; }
  .ptab { padding: 0 10px; font-size: 10px; letter-spacing: 0.5px; }
  .pbtn { width: 48px; height: 48px; font-size: 28px; }
  .pmin { display: none; }
  .pclose { color: var(--white); border-left: 1px solid var(--line); }
  .chatbtn { display: flex; align-items: center; justify-content: center; gap: 6px; width: auto; padding: 0 10px; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
  .chatbtn[hidden] { display: none; }
  .chatbtn.on { color: #000; background: var(--white); }
  .pbody { padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); padding-bottom: env(safe-area-inset-bottom); -webkit-overflow-scrolling: touch; }
  .pbody:has(> .embed) { padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); background: #0b0d0f; }
  @keyframes sheetup { from { opacity: 0; transform: translateY(16px); } }

  /* a game's side chat: a sheet over the bottom of the game, opened by the Chat button */
  .sidechat, .sidechat.left, .sidechat.mini { display: none; left: 0; right: 0; top: auto; bottom: 0; width: auto; height: min(70%, 460px); border: 0; border-top: 1px solid var(--line2); z-index: 5; box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.7); padding-bottom: env(safe-area-inset-bottom); }
  .panel.chatopen .sidechat { display: flex; animation: sheetup 0.18s ease-out; }
  .panel.chatopen .sidechat.mini .schead { display: flex; }
  .panel.chatopen .sidechat.mini .sclog { display: block; }
  .panel.chatopen .sidechat.mini .scsay { display: flex; }
  .panel.chatopen .sidechat.mini .scopen { display: none; }
  .schead { padding-left: max(12px, env(safe-area-inset-left)); }
  .scmin { width: 48px; height: 48px; font-size: 0; }
  .scmin::after { content: '\00d7'; font-size: 28px; color: var(--white); }
  .scmsg { padding: 7px max(12px, env(safe-area-inset-left)); font-size: 14px; }
  .scsay { gap: 8px; padding: 8px max(8px, env(safe-area-inset-right)) 8px max(8px, env(safe-area-inset-left)); }
  .scsay input { padding: 0 16px; }
  .scsay .btn { padding: 0 18px; min-height: 44px; font-size: 12px; }

  /* the Stocks panel and its charts */
  .stocks { gap: 10px; font-size: 13px; }
  .stocks .summary { padding: 12px; }
  .stocks .label, .stocks .priceLabel { font-size: 11px; }
  .stocks .total { font-size: 24px; }
  .stocks .total span, .stocks .overall, .stocks .pending { font-size: 12px; }
  .stocks .cash { font-size: 16px; }
  .stocks .daily { min-height: 36px; padding: 0 12px; font-size: 12px; }
  .stocks .guestNote, .stocks .hint { font-size: 12px; }
  .stocks .qtyRow { gap: 8px; font-size: 12px; }
  .stocks .qtyRow input { width: 92px; padding: 0 8px; }
  .stocks .chips { gap: 6px; }
  .stocks .schip { min-height: 44px; min-width: 52px; padding: 0 10px; font-size: 13px; }
  .stocks .timeframes { gap: 6px; font-size: 12px; }
  .stocks .sgrid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; padding-bottom: 14px; -webkit-overflow-scrolling: touch; }
  .stocks .scard { padding: 12px; gap: 8px; }
  .stocks .name { font-size: 16px; }
  .stocks .name small { font-size: 11px; }
  .stocks .change { font-size: 14px; }
  .stocks .chart { touch-action: pan-y; padding: 5px 6px; }
  .stocks .axis { height: 100px; font-size: 10px; min-width: 44px; padding-bottom: 10px; }
  .stocks .plot svg { height: 100px; }
  .stocks .readout { height: 32px; font-size: 11px; line-height: 16px; }
  .stocks .price { font-size: 19px; }
  .stocks .unit { font-size: 11px; }
  .stocks .tradeRow { gap: 8px; }
  .stocks .tbtn { min-height: 46px; font-size: 14px; }
  .stocks .confirmText { font-size: 13px; padding: 4px 0; }
  .stocks .stake { font-size: 12px; }
  .stocks .toast { font-size: 13px; padding: 8px 12px; bottom: 12px; }

  /* single-column pages: sign in, profile, admin, a game's page */
  .authbox { margin: 20px 0 28px; padding: 24px 18px; gap: 18px; }
  .authbox h1 { font-size: 34px; }
  .authbox .btn, .editform .btn { width: 100%; min-height: 50px; font-size: 14px; }
  label { font-size: 12px; }
  label small { font-size: 12px; }
  input, textarea, select { padding: 0 12px; }
  textarea { padding: 10px 12px; }
  .alt { font-size: 14px; }
  .alt a { display: inline-block; padding: 8px 2px; }
  .err { font-size: 14px; }
  .editform { max-width: none; }
  .editform input[type='color'] { width: 100%; height: 50px; padding: 4px; }
  .phero { flex-direction: column; text-align: center; margin: 14px 0 10px; padding: 22px 16px; gap: 14px; }
  .ptags { justify-content: center; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat b { font-size: 30px; }
  .card2 { padding: 2px 14px 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .recent li { flex-wrap: wrap; gap: 4px 12px; padding: 12px 0; }
  .adminview { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .board { font-size: 14px; }
  .board th, .board td { padding: 10px 8px; white-space: nowrap; }
  .board td.wrapcell { white-space: normal; min-width: 160px; }
  .wrapcell { max-width: 240px; }
  .acts { flex-wrap: nowrap; }
  .mini { min-height: 40px; font-size: 12px; white-space: nowrap; }
  .filters { gap: 6px; }
  .chip { padding: 0 16px; font-size: 12px; }
  .search { margin-bottom: 12px; }
  .keybox { font-size: 12px; }
  .detail { margin: 16px 0 28px; padding: 20px 16px; }
  .lost { padding: 48px 0; }
}

/* a phone on its side: short screens get a thinner header, and the chat sheet fills the panel below the bar */
@media (max-height: 500px) and (pointer: coarse) {
  .ticker { height: 24px; }
  .authbox { margin: 12px 0 20px; }
  .chathead { height: 44px; }
  .sheetclose { height: 44px; }
  .sidechat, .sidechat.left, .sidechat.mini { top: calc(48px + env(safe-area-inset-top)); height: auto; }
}
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  .msg { position: relative; padding-right: 48px; }
  .mdel { position: absolute; right: 0; top: 0; margin: 0; }
}
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  .stats .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* a game opened from its own address: full screen over the lobby, with a small close button in the corner */
.fullgame { position: fixed; inset: 0; z-index: 200; background: #0b0d0f; }
.fullframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #0b0d0f; }
.fullclose { position: absolute; top: calc(8px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(8, 8, 10, 0.72); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 2px; opacity: 0.55; }
.fullclose:hover, .fullclose:focus-visible { opacity: 1; border-color: #fff; }
body.fullopen { overflow: hidden; }
