/* Rubik i Rubik Dirt (SIL Open Font License), hostowane lokalnie */
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/rubik-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/rubik-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik Dirt'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/rubik-dirt-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Rubik Dirt'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/rubik-dirt-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --ink: #1d1433;
  --ink-2: #2a1f4d;
  --ink-3: #3a2c66;
  --line: #4f3f85;
  --paper: #fbf1e1;
  --muted: #b9abd6;
  --flare: #ffc93c;
  --flare-ink: #3a1d00;
  --rose: #ff5a6e;
  --press: #e8487a;
  --f-ui: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-display: 'Rubik Dirt', 'Rubik', system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ink);
  color: var(--paper);
  font: 400 15px/1.45 var(--f-ui);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--flare); outline-offset: 2px; }

#cv {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: block;
  touch-action: none;
}

.screen { position: fixed; inset: 0; z-index: 2; }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--ink-3);
  color: var(--paper);
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 60ms, box-shadow 60ms;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-primary { background: var(--flare); color: var(--flare-ink); }
.btn-ghost { background: transparent; border-color: var(--line); box-shadow: none; }
.btn-small { min-height: 38px; padding: 6px 14px; font-size: 15px; }
.btn-big { min-height: 54px; font-size: 18px; padding: 12px 28px; }

.chip, .seg-btn {
  min-height: 36px;
  padding: 6px 12px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-weight: 500;
  font-size: 14px;
}
.chip:active { background: var(--ink-3); }

/* ---------- menu ---------- */
#menu {
  display: flex;
  align-items: center;
  padding: calc(16px + var(--safe-t)) calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
  overflow-y: auto;
}
.menu-panel {
  width: min(400px, 100%);
  margin-left: clamp(0px, 5vw, 72px);
  padding: 26px 24px 22px;
  background: rgba(42, 31, 77, 0.93);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 9px 9px 0 var(--ink);
}
.logo {
  margin: 0 0 6px;
  font: 400 clamp(46px, 8vw, 78px)/0.95 var(--f-display);
  color: var(--flare);
  text-shadow: 3px 3px 0 var(--press), 6px 6px 0 var(--ink);
  letter-spacing: 0.01em;
}
.tagline { margin: 0 0 18px; color: var(--muted); max-width: 34ch; }
.field { display: grid; gap: 4px; margin-bottom: 14px; }
.field span { font-size: 13px; color: var(--muted); }
input {
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--ink);
  font-size: 16px;
  -webkit-user-select: text;
  user-select: text;
}
input:focus { border-color: var(--flare); outline: none; }
.menu-actions { display: grid; gap: 10px; }
.join { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.join input { text-transform: uppercase; letter-spacing: 0.2em; font-weight: 600; }
.join input::placeholder { letter-spacing: normal; text-transform: none; font-weight: 400; }
.hint { margin: 16px 0 0; font-size: 13px; color: var(--muted); }

@media (max-height: 480px) {
  .menu-panel { padding: 14px 16px; box-shadow: 6px 6px 0 var(--ink); }
  .logo { font-size: 40px; margin-bottom: 2px; }
  .tagline { font-size: 13px; margin-bottom: 8px; }
  .field { margin-bottom: 8px; }
  .field span { display: none; }
  .menu-actions { gap: 7px; }
  .btn { min-height: 40px; padding: 6px 14px; }
  input { min-height: 40px; }
  .hint { display: none; }
}

/* ---------- lobby ---------- */
#lobby {
  overflow-y: auto;
  padding: calc(14px + var(--safe-t)) calc(14px + var(--safe-r)) calc(14px + var(--safe-b)) calc(14px + var(--safe-l));
  background: rgba(20, 13, 38, 0.55);
}
.lobby-panel {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px;
  background: var(--ink-2);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 8px 8px 0 var(--ink);
}
.lobby-head h2 { margin: 0; font: 600 24px/1.2 var(--f-ui); }
.lobby-head p { margin: 4px 0 10px; color: var(--muted); max-width: 60ch; }
.code {
  display: inline-block;
  padding: 0 10px;
  margin-left: 4px;
  border-radius: 8px;
  background: var(--flare);
  color: var(--flare-ink);
  letter-spacing: 0.14em;
  font-weight: 700;
}
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; margin-top: 16px; }
.lobby-grid h3 { margin: 0 0 8px; font: 600 15px var(--f-ui); color: var(--muted); }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.prow {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 4px 6px 4px 8px;
  border-radius: 10px;
  background: var(--ink);
  border-left: 5px solid var(--c);
}
.prow .pname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow input.pname { min-height: 36px; padding: 4px 8px; border-color: transparent; background: var(--ink-2); }
.prow input.pname:focus { border-color: var(--flare); }
.ptags { font-size: 13px; color: var(--muted); white-space: nowrap; }
.prow .x {
  width: 36px; height: 36px;
  border: 0; border-radius: 8px;
  background: transparent;
  font-size: 22px; line-height: 1;
  color: var(--muted);
}
.prow .x:active { background: var(--ink-3); }
.prow.off { opacity: 0.55; }
.tankico { width: 34px; height: 19px; filter: drop-shadow(1.5px 1.5px 0 var(--ink)); }
.tankico .w { fill: rgba(255,255,255,0.35); }
.tankico .h { fill: var(--c); }
.tankico .b { stroke: #120c22; stroke-width: 3; stroke-linecap: round; fill: none; }
.tankico .t { fill: #120c22; }
.addrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.addrow span { font-size: 14px; color: var(--muted); margin-right: 2px; }
.spec { margin-top: 10px; font-size: 13px; color: var(--muted); }
.sets { display: grid; gap: 10px; }
.set { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 8px; }
.set-label { font-size: 14px; color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg-btn { min-height: 32px; padding: 3px 10px; font-size: 13px; border-radius: 8px; }
.seg-btn.on { background: var(--paper); color: var(--ink); border-color: var(--paper); font-weight: 600; }
.seg-btn:disabled { cursor: default; }
.seg-btn:disabled:not(.on) { opacity: 0.5; }
.lobby-foot {
  position: sticky;
  bottom: -14px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 20px -20px -20px;
  padding: 14px 20px calc(14px + var(--safe-b));
  background: var(--ink-2);
  border-top: 2px solid var(--ink);
  border-radius: 0 0 12px 12px;
}
.lobby-foot .note { margin: 0; color: var(--muted); flex: 1 1 200px; }
.lobby-foot .btn-ghost { margin-left: auto; }

@media (max-width: 720px) {
  .lobby-grid { grid-template-columns: 1fr; gap: 16px; }
  .set { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-height: 480px) and (min-width: 600px) {
  .lobby-panel { padding: 14px; }
  .lobby-head h2 { font-size: 20px; }
  .lobby-head p { display: none; }
  .lobby-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); margin-top: 10px; }
  .set { grid-template-columns: 96px minmax(0, 1fr); }
  .prow { min-height: 40px; }
  .lobby-foot { margin: 12px -14px -14px; padding: 8px 14px calc(8px + var(--safe-b)); }
  .lobby-foot .btn-big { min-height: 44px; font-size: 17px; }
  .seg-btn { min-height: 30px; padding: 2px 9px; }
  .sets { gap: 7px; }
}

/* ---------- gra: HUD ---------- */
#game { pointer-events: none; }
#game > * { pointer-events: auto; }
.hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: calc(8px + var(--safe-t)) calc(10px + var(--safe-r)) 0 calc(10px + var(--safe-l));
  pointer-events: none !important;
}
.hud > * { pointer-events: auto; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(20, 13, 38, 0.72);
  border: 2px solid rgba(20, 13, 38, 0.9);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.hud-turn .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--muted)); box-shadow: 1.5px 1.5px 0 var(--ink); }
.hud-turn.mine { background: var(--flare); color: var(--flare-ink); border-color: var(--ink); }
.hud-wind svg { width: 34px; height: 12px; overflow: visible; }
.hud-wind path { stroke: var(--paper); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hud-wind .calm { color: var(--muted); font-weight: 500; }
.hud-side { display: flex; gap: 6px; align-items: center; }
.hud-timer.warn { background: var(--rose); color: #fff; }
.icon-btn {
  width: 38px; height: 34px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  border: 2px solid rgba(20, 13, 38, 0.9);
  background: rgba(20, 13, 38, 0.72);
}
.icon-btn svg { width: 18px; height: 18px; stroke: var(--paper); stroke-width: 2.4; fill: none; stroke-linecap: round; }

@media (max-width: 560px) {
  .hud-round { display: none; }
}

/* ---------- gra: sterowanie ---------- */
.controls {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  padding: 8px calc(10px + var(--safe-r)) calc(8px + var(--safe-b)) calc(10px + var(--safe-l));
  background: rgba(20, 13, 38, 0.84);
  border-top: 2px solid var(--ink);
  transition: transform 160ms ease-out, opacity 160ms;
}
.controls[data-state='off'] { transform: translateY(100%); opacity: 0; pointer-events: none !important; }
.ctl {
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--ink-3);
  box-shadow: 0 3px 0 var(--ink);
  font-weight: 600;
}
.ctl:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.ctl:disabled { opacity: 0.4; }
.ctl-weapon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 168px;
  padding: 4px 12px;
  text-align: left;
}
.ctl-weapon .wn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctl-weapon .wc { font-size: 13px; color: var(--muted); }
.ctl-pair { display: flex; align-items: stretch; gap: 4px; }
.ctl-step { width: 46px; display: grid; place-items: center; padding: 0; }
.ctl-step svg { width: 20px; height: 20px; stroke: var(--paper); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ctl-val { display: grid; place-content: center; min-width: 62px; text-align: center; line-height: 1.1; }
.ctl-val small { font-size: 11px; color: var(--muted); }
.ctl-val b { font-size: 19px; font-variant-numeric: tabular-nums; }
.ctl-gear { padding: 4px 14px; }
.ctl-fire {
  min-width: 118px;
  padding: 4px 18px;
  background: var(--flare);
  color: var(--flare-ink);
  font-size: 18px;
  font-weight: 700;
}
@media (max-width: 760px) {
  .controls { gap: 5px; padding-left: calc(6px + var(--safe-l)); padding-right: calc(6px + var(--safe-r)); }
  .ctl-weapon { width: 118px; padding: 4px 8px; font-size: 14px; }
  .ctl-step { width: 40px; }
  .ctl-val { min-width: 52px; }
  .ctl-val b { font-size: 17px; }
  .ctl-gear { padding: 4px 9px; font-size: 14px; }
  .ctl-fire { min-width: 86px; font-size: 16px; padding: 4px 10px; }
}
@media (max-width: 600px) and (orientation: portrait) {
  .controls { flex-wrap: wrap; }
  .ctl-fire { flex: 1 1 100%; min-height: 52px; }
}

/* ---------- popover broni i sprzętu ---------- */
.pop {
  position: absolute;
  left: calc(10px + var(--safe-l));
  bottom: calc(78px + var(--safe-b));
  width: min(420px, calc(100vw - 20px));
  max-height: calc(100dvh - 140px);
  overflow-y: auto;
  padding: 12px;
  background: var(--ink-2);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--ink);
  z-index: 5;
}
.pop.right { left: auto; right: calc(10px + var(--safe-r)); width: min(300px, calc(100vw - 20px)); }
.pop-title { font-weight: 600; color: var(--muted); font-size: 13px; margin: 0 0 8px 2px; }
.pop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.pop-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--ink-3);
  text-align: left;
  font-weight: 500;
}
.pop-item + .pop-item { margin-top: 0; }
.pop .stack { display: grid; gap: 6px; }
.pop-item.on { background: var(--paper); color: var(--ink); }
.pop-item.on .pi-ico svg { stroke: var(--ink); }
.pop-item:disabled { opacity: 0.4; }
.pi-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pop-item.on .pi-count { color: var(--ink-3); }
.pop-note { margin: 8px 2px 0; font-size: 13px; color: var(--muted); }
.pop-drive {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  text-align: center;
}
.pop-drive small { display: block; font-size: 12px; color: var(--muted); }
.pop-drive .ctl { min-height: 46px; }
.ico { width: 24px; height: 24px; stroke: var(--paper); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ico .f { fill: currentColor; stroke: none; }
.pi-ico, .sicon { display: grid; place-items: center; color: var(--flare); }

/* ---------- banner tury ---------- */
.banner {
  position: absolute;
  left: 50%;
  top: calc(64px + var(--safe-t));
  transform: translateX(-50%);
  padding: 8px 22px;
  border-radius: 12px;
  background: var(--flare);
  color: var(--flare-ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font: 700 20px var(--f-ui);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none !important;
}
.banner.show { animation: banner 1.6s ease-out forwards; }
.banner.plain { background: var(--ink-2); color: var(--paper); }
@keyframes banner {
  0% { opacity: 0; transform: translate(-50%, -8px) scale(0.96); }
  12% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- arkusze: sklep, wyniki, menu ---------- */
.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: calc(10px + var(--safe-t)) calc(10px + var(--safe-r)) calc(10px + var(--safe-b)) calc(10px + var(--safe-l));
  background: rgba(12, 8, 24, 0.55);
}
.sheet {
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: 100%;
  background: var(--ink-2);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 8px 8px 0 var(--ink);
  overflow: hidden;
}
.sheet.small { width: min(380px, 100%); }
.sheet-head { padding: 16px 18px 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.sheet-head h2 { margin: 0; font: 600 24px/1.15 var(--f-ui); }
.sheet-head p { margin: 0; color: var(--muted); }
.sheet-head .money { margin-left: auto; font: 700 22px var(--f-ui); color: var(--flare); font-variant-numeric: tabular-nums; }
.sheet-body { overflow-y: auto; padding: 0 18px 12px; -webkit-overflow-scrolling: touch; }
.sheet-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 18px calc(12px);
  border-top: 2px solid var(--ink);
}
.sheet-foot .grow { flex: 1 1 160px; color: var(--muted); font-size: 14px; }
.sheet .display {
  font: 400 clamp(30px, 5vw, 44px)/1 var(--f-display);
  color: var(--flare);
  text-shadow: 2px 2px 0 var(--press), 4px 4px 0 var(--ink);
}
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 10px; }
.tab { min-height: 36px; padding: 4px 12px; border: 2px solid var(--line); border-left: 6px solid var(--c); border-radius: 8px; background: transparent; font-weight: 500; }
.tab.on { background: var(--paper); color: var(--ink); border-color: var(--paper); border-left-color: var(--c); }
.slist { display: grid; gap: 6px; }
.srow {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 10px;
  border-radius: 10px;
  background: var(--ink);
}
.sinfo b { display: block; font-weight: 600; }
.sinfo small { display: block; color: var(--muted); font-size: 13px; line-height: 1.3; }
.sprice { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sprice small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.sqty { display: flex; align-items: center; gap: 4px; }
.qbtn {
  width: 40px; height: 40px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--ink-3);
  box-shadow: 0 3px 0 #120c22;
  font-size: 22px; line-height: 1; font-weight: 600;
}
.qbtn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #120c22; }
.qbtn:disabled { opacity: 0.35; }
.owned { min-width: 34px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.owned.zero { color: var(--muted); font-weight: 400; }
@media (max-width: 560px) {
  .srow { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .sprice { grid-column: 2; text-align: left; }
  .sqty { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-height: 480px) {
  .sheet-head { padding: 10px 14px 6px; }
  .sheet-head h2 { font-size: 20px; }
  .sheet-body { padding: 0 14px 8px; }
  .sheet-foot { padding: 8px 14px; }
  .srow { padding: 5px 8px; }
  .sinfo small { display: none; }
  .qbtn { width: 38px; height: 36px; }
  .sheet .display { font-size: 30px; }
}
table.score { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.score th { text-align: right; font-weight: 500; color: var(--muted); font-size: 13px; padding: 4px 6px; }
.score td { text-align: right; padding: 7px 6px; border-top: 2px solid var(--ink); }
.score th:nth-child(-n+2), .score td:nth-child(-n+2) { text-align: left; }
.score td.rank { width: 30px; color: var(--muted); }
.score td.who { font-weight: 600; }
.score td.who i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 8px; box-shadow: 1.5px 1.5px 0 var(--ink); }
.score tr.win td { color: var(--flare); }
.menu-list { display: grid; gap: 8px; padding: 0 18px 18px; }
.menu-list .btn { width: 100%; }

/* ---------- drobiazgi ---------- */
.toasts {
  position: fixed;
  z-index: 20;
  left: 50%;
  top: calc(52px + var(--safe-t));
  transform: translateX(-50%);
  display: grid;
  gap: 6px;
  justify-items: center;
  pointer-events: none;
  width: min(92vw, 440px);
}
.toast {
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 500;
  text-align: center;
  transition: opacity 0.4s, transform 0.4s;
}
.toast.error { background: var(--rose); color: #fff; }
.toast.out { opacity: 0; transform: translateY(-6px); }
.conn {
  position: fixed;
  z-index: 21;
  left: 50%;
  bottom: calc(90px + var(--safe-b));
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-weight: 600;
  border: 2px solid var(--ink);
}
.rotate { display: none; }
@media (orientation: portrait) and (max-width: 600px) {
  body[data-view='game']:not(.rotate-ok) .rotate {
    position: fixed;
    z-index: 30;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 16px;
    padding: 24px;
    text-align: center;
    background: rgba(20, 13, 38, 0.94);
    font: 600 20px/1.3 var(--f-ui);
  }
  .rotate svg { width: 72px; height: 72px; margin: 0 auto; stroke: var(--flare); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
}

@media (prefers-reduced-motion: reduce) {
  .banner.show { animation-duration: 2.2s; }
  .controls { transition: none; }
}
