/* ARBLAST operator console — design system and shell.
   A console-game front end over painted art: dark glass panels, chunky rounded shapes, thick white selection frames,
   saturated yellow primary buttons, team blue / red accents and heavy italic condensed display type.
   Type scales with the screen (rem follows the viewport), so it reads on a 4K TV across a hall and fits a 720p laptop. */

@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 800; font-display: swap; src: url("fonts/barlow-condensed-latin-800-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 900; font-display: swap; src: url("fonts/barlow-condensed-latin-900-italic.woff2") format("woff2"); }

:root {
  --yellow: #ffd21a;
  --yellow-hi: #ffe766;
  --yellow-lo: #f5b400;
  --blue: #2f7bff;
  --blue-hi: #5fa0ff;
  --cyan: #33e6ff;
  --red: #ff3b4a;
  --red-hi: #ff6b77;
  --amber: #ffb020;
  --green: #35e07c;
  --ink: #0a0d1f;
  --ink-2: #12163a;
  --text: #f5f7ff;
  --muted: rgba(226, 232, 255, 0.68);
  --faint: rgba(226, 232, 255, 0.42);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.28);
  --glass: linear-gradient(180deg, rgba(24, 28, 70, 0.74), rgba(10, 12, 34, 0.82));
  --glass-flat: rgba(12, 15, 40, 0.72);
  --glass-hi: rgba(255, 255, 255, 0.08);
  --radius: 1rem;
  --radius-lg: 1.4rem;
  --shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.42);
  --focus: 0 0 0 0.22rem #fff, 0 0 0 0.48rem rgba(255, 210, 26, 0.55), 0 0.8rem 2.2rem rgba(0, 0, 0, 0.45);
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Impact, sans-serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --topbar-h: 4.7rem;
  --gutter: clamp(1rem, 2.6vw, 3.6rem);
  --ease-out: cubic-bezier(0.2, 0.9, 0.25, 1.1);
  color-scheme: dark;
  /* rem follows the screen: ≈14px on a 1280×720 laptop, ≈16.5px at 1080p, ≈24.5px on a 4K TV. */
  font-size: clamp(13px, calc(0.42 * min(1vw, 1.8vh) + 8.4px), 30px);
  font-family: var(--ui);
  color: var(--text);
  background: #070918;
}
html.big { font-size: clamp(15px, calc(0.56 * min(1vw, 1.8vh) + 8.6px), 38px); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { line-height: 1.4; -webkit-font-smoothing: antialiased; background: #070918; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cyan); }
img { user-select: none; -webkit-user-drag: none; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Display type: heavy italic condensed caps. */
.display, .btn, .tab, .chip, .kicker, .keycap, .page-title, .pill {
  font-family: var(--display);
  font-style: italic;
  text-transform: uppercase;
}
.display { font-weight: 800; letter-spacing: 0.01em; line-height: 0.92; }
.kicker { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.14em; color: var(--yellow); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* MARK: Buttons */

.btn {
  --btn-bg: rgba(255, 255, 255, 0.1);
  --btn-fg: var(--text);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 2.75rem;
  padding: 0.45em 1.25em 0.4em;
  border: 0.16rem solid rgba(255, 255, 255, 0.16);
  border-radius: 0.8rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: 0.05em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.14s var(--ease-out), box-shadow 0.18s, background 0.18s, border-color 0.18s, filter 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover:not(:disabled) { border-color: rgba(255, 255, 255, 0.55); filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(0.12rem) scale(0.985); }
.btn:focus-visible { outline: none; border-color: #fff; box-shadow: var(--focus); }
.btn:disabled { cursor: not-allowed; filter: saturate(0.25) brightness(0.75); opacity: 0.7; }
.btn .icon { width: 1.05em; height: 1.05em; }

.btn-yellow {
  --btn-bg: linear-gradient(180deg, var(--yellow-hi), var(--yellow) 48%, var(--yellow-lo));
  --btn-fg: #1b1500;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 -0.28rem 0 rgba(120, 70, 0, 0.32), inset 0 0.14rem 0 rgba(255, 255, 255, 0.6), 0 0.5rem 1.6rem rgba(255, 190, 0, 0.32);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-yellow:focus-visible { box-shadow: inset 0 -0.28rem 0 rgba(120, 70, 0, 0.32), var(--focus); }
.btn-red {
  --btn-bg: linear-gradient(180deg, #ff6470, var(--red) 50%, #d4162a);
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 -0.28rem 0 rgba(90, 0, 10, 0.35), inset 0 0.14rem 0 rgba(255, 255, 255, 0.35), 0 0.5rem 1.6rem rgba(255, 40, 60, 0.35);
  text-shadow: 0 1px 2px rgba(80, 0, 10, 0.5);
}
.btn-green {
  --btn-bg: linear-gradient(180deg, #7dffb0, var(--green) 50%, #17b357);
  --btn-fg: #032412;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 -0.28rem 0 rgba(0, 60, 20, 0.3), inset 0 0.14rem 0 rgba(255, 255, 255, 0.5), 0 0.5rem 1.6rem rgba(40, 220, 120, 0.3);
}
.btn-blue {
  --btn-bg: linear-gradient(180deg, #6aa8ff, var(--blue) 55%, #1b56d6);
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-ghost {
  --btn-bg: rgba(8, 10, 30, 0.55);
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.22);
}
.btn-plain { --btn-bg: transparent; border-color: transparent; }
.btn-sm { min-height: 2.1rem; font-size: 1.02rem; padding: 0.35em 0.85em 0.3em; border-radius: 0.6rem; }
.btn-lg { min-height: 3.3rem; font-size: 1.5rem; padding: 0.4em 1.4em 0.34em; border-radius: 0.95rem; }
.btn-xl { min-height: 4.6rem; font-size: 2.35rem; font-weight: 900; padding: 0.3em 1.35em 0.24em; border-radius: 1.15rem; letter-spacing: 0.04em; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 2.75rem; }
.btn .keycap { margin-left: 0.35em; }

/* Keyboard / controller hints. */
.keycap {
  display: inline-grid;
  place-items: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.35rem;
  border-radius: 0.45rem;
  border: 0.12rem solid rgba(255, 255, 255, 0.5);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  box-shadow: 0 0.16rem 0 rgba(0, 0, 0, 0.45);
  font-family: var(--ui);
  font-size: 0.92rem;
  font-weight: 800;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff;
}
.btn .keycap { height: auto; min-height: 1.5em; padding: 0.15em 0.4em; font-size: 0.42em; border-radius: 0.35em; }
.btn-yellow .keycap { border-color: rgba(40, 30, 0, 0.45); background: rgba(40, 30, 0, 0.12); color: #2a2000; box-shadow: none; }
.pad-hint { display: none; }
html.has-gamepad .key-hint { display: none; }
html.has-gamepad .pad-hint { display: inline-grid; }

/* MARK: Panels, chips, badges */

.panel {
  position: relative;
  background: var(--glass);
  border: 0.1rem solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(1.25);
}
.panel-pad { padding: 1.4rem 1.6rem; }
.panel-title { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1.6rem; letter-spacing: 0.03em; line-height: 1; }
.panel-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.panel-head .spacer { flex: 1; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.32em 0.8em 0.28em;
  border-radius: 999px;
  border: 0.1rem solid var(--line-strong);
  background: rgba(8, 10, 30, 0.6);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}
button.chip { cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.12s; }
button.chip:hover { border-color: #fff; }
button.chip:focus-visible { outline: none; box-shadow: var(--focus); border-color: #fff; }
.chip .chip-label { color: var(--muted); font-weight: 700; }
.chip-lobby { color: var(--cyan); border-color: rgba(51, 230, 255, 0.5); }
.chip-countdown { color: var(--amber); border-color: rgba(255, 176, 32, 0.6); background: rgba(80, 50, 0, 0.45); }
.chip-playing { color: #fff; border-color: rgba(255, 59, 74, 0.8); background: rgba(150, 10, 25, 0.6); }
.chip-playing::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--red); box-shadow: 0 0 0.6em var(--red); animation: pulse 1.4s ease-in-out infinite; }
.chip-ended { color: var(--yellow); border-color: rgba(255, 210, 26, 0.6); background: rgba(70, 55, 0, 0.5); }
.chip-paused { color: #fff; border-color: #ff8a93; background: repeating-linear-gradient(-45deg, #c81d2c 0 0.5rem, #9e1422 0.5rem 1rem); }
.chip-blue { color: #cfe0ff; border-color: rgba(47, 123, 255, 0.7); background: rgba(20, 60, 160, 0.5); }
.chip-red { color: #ffd3d7; border-color: rgba(255, 59, 74, 0.7); background: rgba(150, 20, 35, 0.5); }
.chip-gold { color: #241a00; border-color: rgba(255, 255, 255, 0.6); background: linear-gradient(180deg, var(--yellow-hi), var(--yellow)); }

.team-blue { color: var(--blue-hi); }
.team-red { color: var(--red-hi); }

/* MARK: Forms */

.field { display: grid; gap: 0.4rem; margin-bottom: 1.1rem; }
.field > label, .field-label {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 1rem;
  color: var(--muted);
}
.input {
  width: 100%;
  min-height: 3rem;
  padding: 0.6rem 0.95rem;
  border-radius: 0.8rem;
  border: 0.14rem solid rgba(255, 255, 255, 0.16);
  background: rgba(4, 6, 20, 0.62);
  font-size: 1.1rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: #fff; box-shadow: 0 0 0 0.3rem rgba(255, 210, 26, 0.4); }
.input[readonly] { color: var(--muted); }
.check { display: flex; align-items: center; gap: 0.7rem; color: var(--muted); font-size: 1rem; margin: 0.2rem 0 1.2rem; cursor: pointer; }
.check input { width: 1.3rem; height: 1.3rem; accent-color: var(--yellow); }
.form-error { min-height: 1.4em; margin: 0 0 0.7rem; color: var(--red-hi); font-weight: 600; }

/* Segmented choices (lengths, score limits). */
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice {
  min-width: 4.2rem;
  padding: 0.5rem 0.9rem 0.42rem;
  border-radius: 0.75rem;
  border: 0.14rem solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: 1.3rem;
  text-transform: uppercase;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.choice:hover { border-color: rgba(255, 255, 255, 0.6); }
.choice:focus-visible { outline: none; box-shadow: var(--focus); border-color: #fff; }
.choice[aria-pressed="true"] { background: linear-gradient(180deg, var(--yellow-hi), var(--yellow)); color: #1b1500; border-color: #fff; }

/* Toggle switch rows (settings). */
.toggle-row { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.toggle-row:first-child { border-top: 0; }
.toggle-row .grow { flex: 1; }
.toggle-row h3 { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1.35rem; letter-spacing: 0.03em; }
.toggle-row p { color: var(--muted); margin-top: 0.15rem; }
.switch {
  position: relative;
  width: 4.2rem;
  height: 2.3rem;
  flex: none;
  border-radius: 999px;
  border: 0.14rem solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s, border-color 0.2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.25rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0.15rem 0.4rem rgba(0, 0, 0, 0.4);
  transform: translateY(-50%);
  transition: left 0.2s var(--ease-out);
}
.switch[aria-checked="true"] { background: linear-gradient(180deg, var(--yellow-hi), var(--yellow)); border-color: #fff; }
.switch[aria-checked="true"]::after { left: calc(100% - 1.85rem); }
.switch:focus-visible { outline: none; box-shadow: var(--focus); }

/* MARK: Dialogs */

dialog.sheet {
  max-width: min(92vw, 60rem);
  max-height: 90vh;
  padding: 0;
  border: 0.14rem solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(28, 32, 82, 0.96), rgba(10, 12, 34, 0.97));
  color: var(--text);
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: auto;
  animation: sheet-in 0.24s var(--ease-out);
}
dialog.sheet::backdrop { background: rgba(3, 4, 14, 0.66); backdrop-filter: blur(6px); }
dialog.sheet.sheet-out { animation: sheet-out 0.14s ease-in forwards; }
.sheet-confirm { width: 34rem; }
.sheet-confirm.sheet-red { border-color: rgba(255, 90, 100, 0.65); }
.confirm { padding: 2rem 2.2rem 1.8rem; }
.confirm-title { font-size: 2.7rem; }
.sheet-red .confirm-title { color: #ffd6da; }
.confirm-message { margin-top: 0.8rem; color: var(--muted); font-size: 1.15rem; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 0.8rem; margin-top: 1.8rem; }
.sheet-head { padding: 1.6rem 2rem 0.4rem; }
.sheet-head h2 { font-size: 2.6rem; }
.sheet-body { padding: 0.8rem 2rem 1rem; }
.sheet-foot { display: flex; align-items: center; justify-content: flex-end; gap: 0.8rem; padding: 1rem 2rem 1.6rem; }
.sheet-foot .spacer { flex: 1; }

@keyframes sheet-in { from { opacity: 0; transform: translateY(1.2rem) scale(0.97); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(0.6rem) scale(0.98); } }

/* MARK: Toasts */

.toasts { position: fixed; left: 50%; top: 5.2rem; z-index: 100; display: grid; gap: 0.6rem; justify-items: center; transform: translateX(-50%); pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: min(90vw, 44rem);
  padding: 0.75rem 1.2rem;
  border-radius: 0.9rem;
  border: 0.12rem solid rgba(255, 255, 255, 0.25);
  background: rgba(14, 17, 44, 0.94);
  box-shadow: var(--shadow);
  font-weight: 600;
  font-size: 1.05rem;
  animation: toast-in 0.25s var(--ease-out);
}
.toast-ok { border-color: rgba(53, 224, 124, 0.7); }
.toast-ok .icon { color: var(--green); }
.toast-error { border-color: rgba(255, 90, 100, 0.8); background: rgba(70, 10, 20, 0.95); }
.toast-error .icon { color: var(--red-hi); }
.toast-out { opacity: 0; transform: translateY(0.5rem); transition: opacity 0.3s, transform 0.3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(1rem); } }

/* MARK: Backdrop art (cross-fading layers; each loads only once it's first shown) */

.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #070918; }
.bg-layer { position: absolute; inset: 0; opacity: 0; background-position: center; background-size: cover; transition: opacity 0.7s ease; }
.bg-layer.on { opacity: 1; }
.bg-layer[data-bg="play"].seen { background-image: url("art/bg_play.webp"); }
.bg-layer[data-bg="lobby"].seen { background-image: url("art/bg_lobby.webp"); }
.bg-layer[data-bg="results"].seen { background-image: url("art/bg_results.webp"); }
.bg-layer[data-bg="utility"].seen { background-image: url("art/bg_utility.webp"); }
.bg-layer[data-bg="wall"] { background: #03050b; }

/* MARK: App shell */

.app { position: fixed; inset: 0; z-index: 1; }
.page-host { position: absolute; inset: var(--topbar-h) 0 0 0; overflow-x: hidden; overflow-y: auto; }
.page-host:focus { outline: none; }

.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  height: var(--topbar-h);
  padding: 0 var(--gutter);
  background: linear-gradient(180deg, rgba(4, 6, 20, 0.82), rgba(4, 6, 20, 0.45) 70%, rgba(4, 6, 20, 0));
  transition: transform 0.35s var(--ease-out), opacity 0.35s;
}
.topbar-brand { display: flex; align-items: center; text-decoration: none; color: inherit; border-radius: 0.6rem; }
.topbar-brand:focus-visible { outline: none; box-shadow: var(--focus); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 0.7rem; }

.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 2.15rem;
  line-height: 1;
  letter-spacing: 0.01em;
  filter: drop-shadow(0 0.14rem 0 rgba(0, 0, 0, 0.55));
}
.wordmark-ar { background: linear-gradient(180deg, #a6f4ff, var(--cyan) 45%, var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.04em; }
.wordmark-blast { background: linear-gradient(180deg, #fff3a8, var(--yellow) 45%, #ff8a1a); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.08em; }
.wordmark-sub {
  margin-left: 0.55em;
  padding: 0.22em 0.5em 0.18em;
  border-radius: 0.35em;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.36em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #fff;
  align-self: center;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 1.2rem;
  padding: 0.3rem 0.45rem;
  border-radius: 999px;
  background: rgba(4, 6, 22, 0.5);
  border: 0.1rem solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}
.tabs .keycap { margin: 0 0.25rem; }
.tab {
  position: relative;
  padding: 0.42rem 1.05rem 0.36rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, transform 0.15s var(--ease-out);
}
.tab:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.tab:focus-visible { outline: none; box-shadow: 0 0 0 0.18rem #fff; }
.tab[aria-selected="true"] {
  background: linear-gradient(180deg, #ffffff, #dfe6ff);
  color: #0b1030;
  box-shadow: 0 0.3rem 1rem rgba(0, 0, 0, 0.35), 0 0 1.2rem rgba(255, 255, 255, 0.25);
}
.tab-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.15rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 800;
  box-shadow: 0 0 0 0.12rem #0b0e24;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.6rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 0.12rem solid rgba(255, 255, 255, 0.16);
  background: rgba(6, 8, 26, 0.62);
  backdrop-filter: blur(12px);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.pill b { font-size: 1.3rem; font-weight: 900; }
.pill .pill-label { color: var(--muted); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.1em; }
.pill-sep { width: 0.12rem; height: 1.2rem; background: rgba(255, 255, 255, 0.2); border-radius: 1px; }
.live-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--faint); }
.live-dot.on { background: var(--red); box-shadow: 0 0 0.7rem var(--red); animation: pulse 1.4s ease-in-out infinite; }

.status-dot { position: relative; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: rgba(6, 8, 26, 0.62); border: 0.12rem solid rgba(255, 255, 255, 0.16); }
.status-dot::after { content: ""; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0.6rem var(--amber); }
.status-dot[data-status="live"]::after { background: var(--green); box-shadow: 0 0 0.7rem var(--green); }
.status-dot[data-status="offline"]::after { background: var(--red); box-shadow: 0 0 0.7rem var(--red); }
.status-dot:not([data-status="live"])::after { animation: pulse 1s ease-in-out infinite; }

.stop-all { height: 2.6rem; min-height: 0; border-radius: 999px; font-size: 1.2rem; padding: 0 1.05rem; }

.avatar {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border-radius: 50%;
  border: 0.18rem solid rgba(255, 255, 255, 0.85);
  background: radial-gradient(circle at 30% 25%, #8fb8ff, var(--blue) 45%, #3b1f9e);
  color: #fff;
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: 0 0.3rem 1rem rgba(0, 0, 0, 0.45), 0 0 0 0.2rem rgba(47, 123, 255, 0.35);
}
.avatar:focus-visible { outline: none; box-shadow: var(--focus); }
.avatar-lg { width: 4.4rem; height: 4.4rem; font-size: 1.9rem; }
.menu { position: relative; }
.menu-panel {
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
  z-index: 40;
  width: 19rem;
  padding: 0.6rem;
  border-radius: 1.1rem;
  animation: sheet-in 0.18s var(--ease-out);
}
.menu-who { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0.6rem 0.9rem; border-bottom: 1px solid var(--line); margin-bottom: 0.4rem; }
.menu-who strong { display: block; font-size: 1.1rem; }
.menu-who .muted { font-size: 0.92rem; overflow-wrap: anywhere; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.75rem 0.8rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.2rem;
  text-align: left;
}
.menu-item:hover, .menu-item:focus-visible { outline: none; background: rgba(255, 255, 255, 0.12); }

/* The STOPPED strip: impossible to miss while any game is paused. */
.alert-bar {
  position: absolute;
  top: var(--topbar-h);
  left: 50%;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: calc(100vw - 2 * var(--gutter));
  padding: 0.5rem 0.6rem 0.5rem 1.2rem;
  border-radius: 1rem;
  border: 0.16rem solid #ffb3b9;
  background: repeating-linear-gradient(-45deg, #d01f30 0 0.9rem, #a8121f 0.9rem 1.8rem);
  box-shadow: 0 0.8rem 2.4rem rgba(200, 10, 30, 0.5);
  transform: translateX(-50%);
  animation: alert-in 0.3s var(--ease-out);
}
.alert-bar .display { font-size: 1.7rem; text-shadow: 0 0.12rem 0 rgba(80, 0, 10, 0.6); white-space: nowrap; }
.alert-bar p { font-weight: 600; text-shadow: 0 1px 2px rgba(60, 0, 8, 0.7); }
.alert-bar .icon { width: 1.8rem; height: 1.8rem; }
@keyframes alert-in { from { opacity: 0; transform: translate(-50%, -0.8rem); } }

/* MARK: Utility pages (MATCHES, ARENAS, STAFF, SETTINGS): a dark scrim over the hexagon art. */

.page { position: relative; min-height: 100%; padding: 1.6rem var(--gutter) 3rem; }
.page-head { display: flex; align-items: flex-end; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.page-head .spacer { flex: 1; }
.page-title { font-weight: 900; font-size: 5rem; line-height: 0.86; letter-spacing: 0.005em; text-shadow: 0 0.3rem 1.4rem rgba(0, 0, 0, 0.45); }
.page-sub { margin-top: 0.5rem; color: var(--muted); font-size: 1.15rem; max-width: 52rem; }
.page-actions { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.empty-state { display: grid; justify-items: center; gap: 0.8rem; padding: 4rem 1rem; text-align: center; }
.empty-state .display { font-size: 3rem; }
.empty-state p { color: var(--muted); max-width: 36rem; font-size: 1.15rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 0.6rem; }

/* MARK: Big-screen (TV) mode: on the lobby and wall the operator chrome hides until the mouse moves. */

body.tv .topbar, body.tv [data-operator] { opacity: 0; pointer-events: none; transform: translateY(-0.6rem); transition: opacity 0.35s, transform 0.35s var(--ease-out); }
body.tv .page-host { top: 0; }
body.tv.tv-reveal .topbar, body.tv.tv-reveal [data-operator] { opacity: 1; pointer-events: auto; transform: none; }
body.tv .topbar { background: linear-gradient(180deg, rgba(4, 6, 20, 0.96), rgba(4, 6, 20, 0.88)); backdrop-filter: blur(14px); box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.45); }
body.tv .alert-bar { top: 1rem; }

@keyframes pulse { 50% { opacity: 0.45; transform: scale(0.85); } }
@keyframes blink { 50% { opacity: 0.35; } }

/* Reduced motion: the system setting or the console's own switch. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }

/* Narrow laptop windows: tighten the bar. */
@media (max-width: 1400px) {
  .tabs { margin-left: 0.4rem; }
  .tab { padding: 0.4rem 0.75rem 0.34rem; font-size: 1.22rem; }
  .pill .pill-label { display: none; }
  .wordmark-sub { display: none; }
}
@media (max-width: 1100px) {
  .tabs .keycap { display: none; }
  .tab { padding: 0.4rem 0.55rem 0.34rem; font-size: 1.1rem; }
  .counter-pill { display: none; }
}
