/* Match screens: LOBBY (line-up + SCAN TO JOIN), LIVE (scoreboard, overview, wall) and RESULTS (podium). */

/* MARK: Lobby */

/* Title top-left, settings top-right, the SCAN TO JOIN panel down the middle, BLUE and RED either side, controls along
   the bottom. Every track is bounded, so nothing spills under the footer whatever the screen size. */
.lobby {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "titles join chips" "blue join red" "foot foot foot";
  column-gap: clamp(0.6rem, 1.6vw, 2.2rem);
  padding: 0 var(--gutter);
  overflow: hidden;
}
.lobby-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 6, 34, 0.7) 0%, rgba(10, 6, 34, 0.15) 26%, transparent 45%),
    linear-gradient(0deg, rgba(6, 10, 20, 0.88) 0%, rgba(6, 10, 20, 0.35) 22%, transparent 42%),
    radial-gradient(60% 50% at 50% 55%, rgba(255, 255, 255, 0.05), transparent 70%);
}
.lobby.is-paused .lobby-shade { box-shadow: inset 0 0 0 0.5rem rgba(255, 59, 74, 0.85), inset 0 0 6rem rgba(255, 30, 50, 0.45); }
.lobby-titles { grid-area: titles; position: relative; min-width: 0; padding-top: 0.9rem; }
body.tv .lobby-titles { padding-top: 2rem; }
.lobby-kicker { font-size: 1.2rem; text-shadow: 0 0.1rem 0.5rem rgba(0, 0, 0, 0.6); }
.lobby-title { font-size: clamp(3.2rem, 4.6vw, 6rem); font-weight: 900; text-shadow: 0 0.3rem 0 rgba(30, 8, 70, 0.5), 0 0.6rem 2rem rgba(0, 0, 0, 0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 0.1em; }
.lobby-sub { margin-top: 0.3rem; font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.3rem; color: rgba(255, 255, 255, 0.88); text-shadow: 0 0.1rem 0.4rem rgba(0, 0, 0, 0.7); }
.lobby-chips { grid-area: chips; position: relative; align-self: start; display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: flex-start; gap: 0.5rem; padding-top: 1rem; }
.lobby-chip { font-size: 1.1rem; padding: 0.5em 0.85em 0.45em; background: rgba(8, 6, 30, 0.66); backdrop-filter: blur(10px); }
.lobby-chip .icon:last-child:not(:first-child) { width: 0.85em; opacity: 0.65; }

/* The line-up: each team's half, heroes on pedestals in a V, sized from the half's own box (container units). */
.lineup { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; padding-top: 0.6rem; }
.lineup-blue { grid-area: blue; }
.lineup-red { grid-area: red; }
.lineup-head { display: flex; align-items: baseline; justify-content: center; gap: 0.8rem; text-shadow: 0 0.12rem 0.6rem rgba(0, 0, 0, 0.7); }
.lineup-team { font-size: 2.2rem; font-weight: 900; }
.lineup-blue .lineup-team { color: #8cc0ff; }
.lineup-red .lineup-team { color: #ff9aa2; }
.lineup-count { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.35rem; color: rgba(255, 255, 255, 0.85); }
.lineup-field { position: relative; min-height: 0; margin-bottom: 4.4rem; container-type: size; }
.lineup-figures, .lineup-plates { position: absolute; inset: 0; }
.lineup-plates { z-index: 30; pointer-events: none; }
.lineup-field { --hero-h: min(90cqh, 76cqw); }
.lineup[data-rows="2"] .lineup-field { --hero-h: min(66cqh, 56cqw); }
body.tv .lobby { grid-template-rows: auto minmax(0, 1fr) 1.2rem; }
body.tv .lobby-foot { position: absolute; left: 0; right: 0; bottom: 0; }
body.tv .lobby-chips { position: absolute; top: 0; right: 0; }

.slot-figure {
  position: absolute;
  left: calc(var(--x) * 1%);
  bottom: calc(var(--lift) * 1%);
  z-index: var(--z);
  height: calc(var(--hero-h) * var(--scale));
  aspect-ratio: 0.5;
  transform: translateX(-50%);
  cursor: pointer;
}
.slot-figure.is-open { cursor: default; }
.slot-body { position: absolute; inset: 0 0 4% 0; display: flex; justify-content: center; align-items: flex-end; }
.slot-hero {
  height: 100%;
  width: auto;
  max-width: none;
  filter: drop-shadow(0 0.8rem 1rem rgba(0, 0, 0, 0.45));
  animation: slot-in 0.5s var(--ease-out) both, hero-float 5.5s ease-in-out infinite;
  animation-delay: 0s, var(--delay);
  transform-origin: 50% 100%;
}
/* A glowing disc: bright top, team-coloured rim, and a dark band below (box-shadow) for the cylinder's side. */
.slot-pedestal {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 108%;
  aspect-ratio: 3.3;
  border-radius: 50%;
  transform: translate(-50%, 30%);
  background: radial-gradient(ellipse at 50% 42%, rgba(255, 255, 255, 0.95) 0%, rgba(225, 236, 255, 0.6) 32%, var(--team) 64%, rgba(10, 12, 40, 0.9) 76%);
  box-shadow:
    0 0 0 0.14rem rgba(255, 255, 255, 0.75),
    0 0.55rem 0 -0.02rem rgba(12, 14, 44, 0.92),
    0 0.55rem 0 0.12rem var(--team),
    0 0 2rem 0.4rem var(--team-glow);
}
.slot-glow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 120%;
  height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(50% 100% at 50% 100%, var(--team-glow), transparent 70%);
  opacity: 0.55;
  pointer-events: none;
}
.slot-figure.team-blue, .slot-plate.team-blue { --team: #4c9bff; --team-glow: rgba(47, 123, 255, 0.75); }
.slot-figure.team-red, .slot-plate.team-red { --team: #ff5260; --team-glow: rgba(255, 59, 74, 0.75); }
.slot-figure.is-ready { --team-glow: rgba(255, 210, 26, 0.8); }
.slot-figure.is-ready { --team: var(--yellow); }
.slot-figure.is-ready .slot-glow { opacity: 0.8; animation: ready-pulse 2.2s ease-in-out infinite; }
.slot-figure.is-disconnected .slot-hero { filter: grayscale(1) brightness(0.45) drop-shadow(0 0.8rem 1rem rgba(0, 0, 0, 0.45)); }
.slot-figure.is-disconnected .slot-pedestal, .slot-figure.is-disconnected .slot-glow { opacity: 0.3; }
.slot-figure.is-scanning .slot-hero { filter: drop-shadow(0 0 0.6rem rgba(51, 230, 255, 0.7)) saturate(0.85); }
.slot-figure.is-open .slot-pedestal { opacity: 0.38; background: radial-gradient(ellipse at 50% 42%, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.06) 60%, rgba(10, 12, 40, 0.6) 76%); box-shadow: 0 0 0 0.12rem rgba(255, 255, 255, 0.35), 0 0.55rem 0 -0.02rem rgba(12, 14, 44, 0.7); }
.slot-figure.is-open .slot-glow { opacity: 0.12; }
.slot-figure.is-focus .slot-hero, .slot-figure:hover:not(.is-open) .slot-hero { filter: drop-shadow(0 0 0.35rem #fff) drop-shadow(0 0 1.2rem var(--team-glow)); }
@keyframes slot-in { from { opacity: 0; transform: translateY(6%) scale(0.94); } }
@keyframes ready-pulse { 50% { opacity: 0.45; } }

.slot-plate {
  position: absolute;
  left: calc(var(--x) * 1%);
  bottom: calc(var(--lift) * 1% - 4.4rem);
  z-index: calc(var(--z) + 30);
  display: grid;
  justify-items: center;
  gap: 0.18rem;
  min-width: 6.6rem;
  max-width: 12rem;
  padding: 0.4rem 0.9rem 0.35rem;
  border: 0.14rem solid rgba(255, 255, 255, 0.35);
  border-radius: 0.6rem;
  background: linear-gradient(180deg, rgba(10, 12, 36, 0.92), rgba(6, 8, 24, 0.92));
  box-shadow: 0 0.5rem 1.2rem rgba(0, 0, 0, 0.5), inset 0 0.22rem 0 var(--team);
  transform: translateX(-50%) scale(clamp(0.82, var(--scale), 1));
  transform-origin: 50% 0;
  pointer-events: auto;
  color: #fff;
}
.slot-plate:disabled { cursor: default; background: rgba(8, 10, 30, 0.4); border-style: dashed; border-color: rgba(255, 255, 255, 0.2); box-shadow: none; }
.slot-plate:focus-visible { outline: none; border-color: #fff; box-shadow: var(--focus); }
.slot-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 1.45rem; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; }
.slot-status { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 0.98rem; letter-spacing: 0.12em; line-height: 1; }
.slot-plate.is-ready .slot-status { color: var(--yellow); }
.slot-plate.is-notReady .slot-status { color: var(--red-hi); }
.slot-plate.is-scanning .slot-status { color: var(--cyan); animation: blink 1.6s ease-in-out infinite; }
.slot-plate.is-disconnected .slot-status { color: var(--faint); }
.slot-plate.is-disconnected .slot-name { color: var(--muted); }
.slot-plate.is-open .slot-name { color: rgba(255, 255, 255, 0.35); font-size: 1.15rem; }
.slot-plate.is-open .slot-status { display: none; }
.slot-tag { display: inline-flex; align-items: center; gap: 0.25em; font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.1em; color: var(--yellow); }
.slot-tag .icon { width: 0.9em; height: 0.9em; }

/* SCAN TO JOIN */
/* The panel's column has a fixed width and the QR takes whatever height is left (container units), so the panel always
   fits between the top bar and the footer: as big as possible for phones across the hall. */
.join-wrap {
  grid-area: join;
  position: relative;
  z-index: 35;
  width: clamp(20rem, 27vw, 38rem);
  min-height: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 1rem 0 0.4rem;
  container-type: size;
}
.join-panel {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  width: 100%;
  max-height: 100%;
  padding: 1.1rem 1.3rem 1.2rem;
  border-radius: 1.6rem;
  border: 0.22rem solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(180deg, rgba(26, 22, 78, 0.9), rgba(10, 10, 36, 0.94));
  box-shadow: 0 0 0 0.35rem rgba(255, 210, 26, 0.55), 0 1.6rem 4rem rgba(0, 0, 0, 0.55), 0 0 4rem rgba(120, 90, 255, 0.35);
  backdrop-filter: blur(14px);
  animation: panel-in 0.5s var(--ease-out);
}
@keyframes panel-in { from { opacity: 0; transform: translateY(1.2rem) scale(0.96); } }
.join-title { font-size: min(3.6rem, 11cqw); font-weight: 900; color: var(--yellow); text-shadow: 0 0.2rem 0 rgba(90, 50, 0, 0.6); white-space: nowrap; }
.join-qr { width: min(100%, calc(100cqh - 17rem)); aspect-ratio: 1; flex: none; border-radius: 0.9rem; overflow: hidden; background: #fff; box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.45); }
.join-qr svg { display: block; width: 100%; height: 100%; }
.join-code-label { margin-top: 0.15rem; font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: 0.24em; font-size: 1rem; color: var(--muted); }
.join-code { font-family: var(--display); font-style: italic; font-weight: 900; font-size: min(4.8rem, 17cqw); line-height: 0.85; letter-spacing: 0.08em; color: #fff; text-shadow: 0 0.25rem 0 rgba(20, 10, 60, 0.7); white-space: nowrap; }
.join-help { max-width: 26rem; text-align: center; font-size: 1rem; line-height: 1.35; color: rgba(255, 255, 255, 0.8); }
.join-help b { font-family: var(--display); font-style: italic; text-transform: uppercase; color: #fff; letter-spacing: 0.04em; white-space: nowrap; }
.join-warning { max-width: 28rem; padding: 0.45rem 0.7rem; border-radius: 0.6rem; background: rgba(255, 176, 32, 0.16); border: 0.1rem solid rgba(255, 176, 32, 0.55); color: #ffd99a; font-size: 0.82rem; line-height: 1.3; }
.join-wrap:has(.join-warning:not([hidden])) .join-qr { width: min(100%, calc(100cqh - 21rem)); }
.lobby-paused {
  position: absolute;
  top: 46%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.6rem;
  border-radius: 1rem;
  border: 0.25rem solid #fff;
  background: repeating-linear-gradient(-45deg, #d01f30 0 0.9rem, #a8121f 0.9rem 1.8rem);
  box-shadow: 0 1rem 3rem rgba(200, 10, 30, 0.6);
  transform: translate(-50%, -50%) rotate(-6deg);
}
.lobby-paused .display { font-size: 4.5rem; }
.lobby-paused .icon { width: 3rem; height: 3rem; }

.lobby-foot {
  grid-area: foot;
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0 1.4rem;
}
.lobby-foot-left, .lobby-foot-right { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.lobby-foot-right { gap: 1.1rem; }
.lobby-start { min-width: clamp(15rem, 21vw, 26rem); }
.lobby-start-note { display: inline-flex; align-items: center; gap: 0.45rem; max-width: 24rem; font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.15rem; line-height: 1.1; text-align: right; color: #fff; text-shadow: 0 0.1rem 0.4rem rgba(0, 0, 0, 0.7); }
.lobby-start-note.is-blocked { color: #ffb4ba; }
.lobby-start-note.is-go { color: var(--yellow); }

/* MARK: Live */

.live { position: absolute; inset: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; }
.live::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 6, 20, 0.35), rgba(4, 6, 20, 0.7)); pointer-events: none; }
.live-head { position: relative; display: grid; justify-items: center; gap: 0.45rem; padding: 0.4rem var(--gutter) 0.8rem; }
.live-meta { text-align: center; }
.scorebar { display: flex; align-items: stretch; height: 4.8rem; filter: drop-shadow(0 0.8rem 1.6rem rgba(0, 0, 0, 0.5)); }
.score-side {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 15rem;
  padding: 0 1.6rem;
  transform: skewX(-14deg);
}
.score-side > * { transform: skewX(14deg); }
.score-blue { justify-content: space-between; background: linear-gradient(90deg, rgba(20, 60, 170, 0.6), #2f7bff); border-radius: 0.9rem 0 0 0.9rem; border: 0.16rem solid rgba(160, 200, 255, 0.8); border-right: 0; }
.score-red { justify-content: space-between; background: linear-gradient(270deg, rgba(170, 20, 40, 0.6), #ff3b4a); border-radius: 0 0.9rem 0.9rem 0; border: 0.16rem solid rgba(255, 170, 178, 0.8); border-left: 0; }
.score-team { font-size: 1.9rem; font-weight: 900; letter-spacing: 0.06em; }
.score-num { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 4.3rem; line-height: 1; text-shadow: 0 0.2rem 0 rgba(0, 0, 0, 0.35); min-width: 1.4em; text-align: center; }
.score-clock {
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 10rem;
  padding: 0 1.4rem;
  background: linear-gradient(180deg, #11163c, #070a1f);
  border-top: 0.16rem solid rgba(255, 255, 255, 0.5);
  border-bottom: 0.16rem solid rgba(255, 255, 255, 0.5);
}
.score-time { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 3.2rem; line-height: 0.95; font-variant-numeric: tabular-nums; }
.score-caption { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.score-clock[data-mode="countdown"] .score-time { color: var(--amber); }
.score-clock[data-mode="paused"] { background: repeating-linear-gradient(-45deg, #b81a2a 0 0.7rem, #8e1020 0.7rem 1.4rem); }
.score-clock[data-mode="paused"] .score-time { animation: blink 1.2s steps(2, jump-none) infinite; }
.score-clock[data-mode="paused"] .score-caption { color: #fff; }
.score-clock.is-urgent .score-time { color: var(--red-hi); }

.live-bar { position: relative; z-index: 2; display: flex; align-items: center; gap: 1rem; padding: 0 var(--gutter) 0.8rem; }
.subtabs { display: flex; gap: 0.35rem; padding: 0.3rem; border-radius: 999px; background: rgba(4, 6, 22, 0.6); border: 0.1rem solid rgba(255, 255, 255, 0.1); }
.subtab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1.1rem 0.4rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.25rem;
}
.subtab:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.subtab:focus-visible { outline: none; box-shadow: 0 0 0 0.18rem #fff; }
.subtab[aria-selected="true"] { background: #fff; color: #0b1030; }
.live-controls { margin-left: auto; display: flex; align-items: center; gap: 0.7rem; }
.live-stop { min-width: 10rem; }
.live-body { position: relative; min-height: 0; padding: 0 var(--gutter) 1.4rem; }
.live-wall { position: absolute; inset: 0 var(--gutter) 1.4rem; border-radius: 1rem; overflow: hidden; border: 0.12rem solid rgba(255, 255, 255, 0.14); }
body.tv .live-wall { inset: 0; border-radius: 0; border: 0; }
body.tv .live { grid-template-rows: minmax(0, 1fr); }
body.tv .live-head { display: none; }
body.tv .live-bar { position: absolute; top: var(--topbar-h); left: 0; right: 0; z-index: 40; padding: 0.7rem var(--gutter); background: rgba(4, 6, 20, 0.9); backdrop-filter: blur(14px); box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.45); }
body.tv .lobby-foot { padding: 0.8rem 0 1.2rem; }
body.tv.tv-reveal .lobby-foot::before { content: ""; position: absolute; inset: -1rem calc(-1 * var(--gutter)) 0; z-index: -1; background: linear-gradient(0deg, rgba(4, 6, 20, 0.92), rgba(4, 6, 20, 0.6) 70%, transparent); }
body.tv .live-body { padding: 0; }

.overview {
  display: grid;
  height: 100%;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas: "map blue red" "map feed feed";
  gap: 1rem;
}
.ov-map { grid-area: map; display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 1rem 1.1rem 1.1rem; }
.ov-blue { grid-area: blue; }
.ov-red { grid-area: red; }
.ov-feed { grid-area: feed; padding: 1rem 1.2rem; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.ov-canvas-wrap { position: relative; min-height: 0; border-radius: 0.8rem; background: radial-gradient(circle at 50% 50%, rgba(51, 230, 255, 0.06), rgba(0, 0, 0, 0.3)); }
.ov-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.9rem; font-size: 0.92rem; color: var(--muted); }
.map-legend i { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 50%; margin-right: -0.4rem; }
.lg-blue { background: #268cff; }
.lg-red { background: #ff404d; }
.lg-close { border: 0.15rem dashed #ff9f1a; }
.lg-boundary { border: 0.15rem solid #33e6ff; border-radius: 0.15rem !important; }
.lg-marker { background: #ffd21a; border-radius: 0.1rem !important; height: 0.45rem !important; }
.lg-noplay { background: #ff222266; border: 0.1rem solid #ff4444; border-radius: 0.15rem !important; }

.ov-team { display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 0.9rem 0.8rem 0.6rem; overflow: hidden; }
.roster-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 0.4rem 0.6rem; }
.roster-head .display { font-size: 1.8rem; }
.roster-count { font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: 0.08em; }
.roster-rows { display: grid; align-content: start; gap: 0.35rem; overflow-y: auto; }
.roster-empty { padding: 0.4rem; }
.roster-row {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) 5.5rem auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.35rem 0.6rem 0.35rem 0.35rem;
  border-radius: 0.7rem;
  border: 0.12rem solid transparent;
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
}
.roster-row:hover { border-color: rgba(255, 255, 255, 0.35); }
.roster-row:focus-visible { outline: none; border-color: #fff; box-shadow: var(--focus); }
.roster-face { width: 2.4rem; height: 2.4rem; object-fit: cover; object-position: 50% 8%; border-radius: 0.5rem; background: rgba(0, 0, 0, 0.35); }
.ov-blue .roster-face { box-shadow: inset 0 0 0 0.12rem #4c9bff; }
.ov-red .roster-face { box-shadow: inset 0 0 0 0.12rem #ff5260; }
.roster-name { display: grid; min-width: 0; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.3rem; text-transform: uppercase; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster-state { font-size: 0.8rem; letter-spacing: 0.12em; color: var(--amber); }
.roster-row.is-down { opacity: 0.6; }
.roster-row.is-down .roster-state { color: var(--red-hi); }
.roster-row.is-offline { opacity: 0.45; }
.roster-row.is-offline .roster-state { color: var(--faint); }
.roster-row.is-shield .roster-state { color: var(--cyan); }
.roster-kd { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.25rem; white-space: nowrap; }
.hp { display: block; height: 0.55rem; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.hp i { display: block; height: 100%; border-radius: inherit; transition: width 0.3s; }
.hp-good { background: linear-gradient(90deg, #2bd46d, #6dffa6); }
.hp-mid { background: linear-gradient(90deg, #f0a000, #ffd25a); }
.hp-low { background: linear-gradient(90deg, #e0202e, #ff6b75); }

.feed-list { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; gap: 0.3rem; overflow-y: auto; }
.feed-item { display: flex; align-items: center; gap: 0.8rem; padding: 0.35rem 0.6rem; border-radius: 0.6rem; background: rgba(255, 255, 255, 0.04); }
.feed-item.is-new { animation: feed-in 0.3s var(--ease-out); }
.roster-callsign { overflow: hidden; text-overflow: ellipsis; }
.feed-time { font-family: var(--mono); font-size: 0.85rem; color: var(--faint); }
.feed-text { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1.2rem; }
.feed-verb .icon { width: 1rem; height: 1rem; color: var(--yellow); vertical-align: -0.1rem; }
.feed-result .feed-text { color: var(--yellow); }
.feed-respawn .feed-text { color: var(--muted); font-weight: 700; }
.feed-empty { padding: 0.4rem; }
@keyframes feed-in { from { opacity: 0; transform: translateX(-0.6rem); } }

.live-countdown {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  justify-items: center;
  pointer-events: none;
  background: radial-gradient(circle, rgba(10, 6, 34, 0.78), rgba(10, 6, 34, 0.5) 70%);
  backdrop-filter: blur(6px);
}
.live-countdown .kicker { font-size: 1.8rem; }
.countdown-number { font-size: 16rem; font-weight: 900; line-height: 0.9; color: #fff; text-shadow: 0 0.6rem 0 rgba(255, 140, 0, 0.6), 0 0 4rem rgba(255, 210, 26, 0.55); animation: count-pop 1s ease-out infinite; }
@keyframes count-pop { 0% { transform: scale(1.25); opacity: 0.4; } 25% { transform: scale(1); opacity: 1; } }

.live-paused {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  background: rgba(60, 0, 10, 0.55);
  backdrop-filter: blur(3px);
  box-shadow: inset 0 0 0 0.6rem #ff3b4a;
  animation: alert-fade 0.25s ease-out;
}
@keyframes alert-fade { from { opacity: 0; } }
.live-paused-card {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  padding: 2.2rem 3rem 2.4rem;
  border-radius: 1.6rem;
  border: 0.3rem solid #fff;
  background: repeating-linear-gradient(-45deg, #d01f30 0 1.2rem, #a8121f 1.2rem 2.4rem);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.55);
  text-align: center;
}
.live-paused-icon { display: grid; place-items: center; width: 5rem; height: 5rem; border-radius: 50%; background: #fff; color: #c41a2a; }
.live-paused-icon .icon { width: 2.4rem; height: 2.4rem; }
.live-paused-title { font-size: 7rem; font-weight: 900; text-shadow: 0 0.4rem 0 rgba(80, 0, 10, 0.6); }
.live-paused-card p { font-size: 1.4rem; font-weight: 600; max-width: 30rem; }
.live.is-paused .live-paused-card { animation: stop-pulse 2s ease-in-out infinite; }
@keyframes stop-pulse { 50% { box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.55), 0 0 0 1rem rgba(255, 59, 74, 0.35); } }

/* MARK: Results */

.results { position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.results-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(10, 6, 40, 0.6), transparent 32%), linear-gradient(0deg, rgba(10, 6, 40, 0.85), transparent 30%); }
.results-head { position: relative; display: grid; justify-items: center; padding: 0.6rem var(--gutter) 0; text-align: center; }
.results-banner {
  font-size: clamp(5rem, 9vw, 11rem);
  font-weight: 900;
  line-height: 0.82;
  background: linear-gradient(180deg, #fff 10%, #ffe36b 55%, #ff9d1a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0.35rem 0 rgba(60, 20, 90, 0.8)) drop-shadow(0 0.8rem 2rem rgba(0, 0, 0, 0.45));
  animation: banner-in 0.7s var(--ease-out) both;
  padding: 0 0.1em;
}
.winner-blue .results-banner { background-image: linear-gradient(180deg, #fff 10%, #9fd0ff 50%, #2f7bff); }
.winner-red .results-banner { background-image: linear-gradient(180deg, #fff 10%, #ffb0b6 50%, #ff3b4a); }
@keyframes banner-in { from { opacity: 0; transform: scale(1.3); } }
.results-score { display: flex; align-items: center; gap: 1.2rem; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 4.2rem; line-height: 1; text-shadow: 0 0.25rem 0 rgba(0, 0, 0, 0.4); }
.results-score-blue { color: #8cc0ff; }
.results-score-red { color: #ff9aa2; }
.results-score-dash { color: rgba(255, 255, 255, 0.7); }
.results-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.8fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 1.6rem; padding: 1.4rem var(--gutter) 0.6rem; min-height: 0; align-items: end; }
.results-team { padding: 1rem 1.1rem; align-self: center; max-height: 100%; overflow: auto; }
.results-team.is-winner { border-color: rgba(255, 210, 26, 0.7); box-shadow: var(--shadow), 0 0 0 0.2rem rgba(255, 210, 26, 0.35); }
.results-team-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.results-team-head .display { font-size: 2rem; }
.results-empty { padding: 0.5rem 0; }
.stats { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.stats th { padding: 0.35rem 0.5rem; font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.9rem; color: var(--muted); text-align: right; }
.stats th:first-child, .stats td:first-child { text-align: left; }
.stats td { padding: 0.45rem 0.5rem; text-align: right; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; font-weight: 600; }
.stats-name { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1.25rem; }
.stats-name .icon { color: var(--yellow); width: 0.95em; height: 0.95em; margin-right: 0.3em; vertical-align: -0.1em; }
.stats tr.is-mvp td { background: rgba(255, 210, 26, 0.1); }
.results-mvp { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; align-self: stretch; min-height: 0; height: 100%; }
.results-mvp-hero { flex: 0 1 auto; min-height: 0; max-height: min(44vh, calc(100% - 6rem)); width: auto; margin-bottom: -1.2rem; object-fit: contain; filter: drop-shadow(0 0 1.6rem rgba(255, 210, 26, 0.55)) drop-shadow(0 1rem 1rem rgba(0, 0, 0, 0.4)); animation: slot-in 0.6s var(--ease-out) 0.2s both, hero-float 5s ease-in-out 1s infinite; }
.results-mvp-plate { position: relative; display: grid; justify-items: center; gap: 0.2rem; padding: 0.6rem 1.6rem 0.7rem; border-radius: 0.9rem; border: 0.2rem solid #fff; background: linear-gradient(180deg, rgba(20, 16, 60, 0.95), rgba(8, 8, 30, 0.95)); box-shadow: 0 0 0 0.3rem rgba(255, 210, 26, 0.6), 0 1rem 2rem rgba(0, 0, 0, 0.5); }
.results-mvp-tag { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.6rem; border-radius: 0.4rem; background: linear-gradient(180deg, var(--yellow-hi), var(--yellow)); color: #1b1500; font-family: var(--display); font-style: italic; font-weight: 900; letter-spacing: 0.1em; }
.results-mvp-tag .icon { width: 1em; height: 1em; }
.results-mvp-name { font-size: 2.8rem; }
.results-mvp-plate.team-blue .results-mvp-name { color: #9fd0ff; }
.results-mvp-plate.team-red .results-mvp-name { color: #ffb0b6; }
.results-mvp-stats { color: var(--muted); font-weight: 600; }
.results-actions { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.4rem var(--gutter) 1.6rem; }
.results-auto { font-weight: 600; text-shadow: 0 1px 0.4rem rgba(0, 0, 0, 0.8); }

/* MARK: Player menu */

.sheet-player { width: min(92vw, 46rem); }
.player-menu { display: grid; grid-template-columns: 13rem minmax(0, 1fr); }
.player-menu-art { position: relative; display: grid; place-items: end center; padding-top: 1rem; background: radial-gradient(70% 60% at 50% 90%, var(--team-glow, rgba(47, 123, 255, 0.5)), transparent 70%); }
.player-menu.team-blue { --team-glow: rgba(47, 123, 255, 0.55); }
.player-menu.team-red { --team-glow: rgba(255, 59, 74, 0.55); }
.player-menu-art img { height: 20rem; width: auto; }
.player-menu-main { padding: 1.8rem 2rem 1.6rem 0.6rem; display: grid; align-content: start; gap: 0.6rem; }
.player-menu-name { font-size: 3.6rem; }
.player-menu-status { justify-self: start; }
.player-menu-status.is-ready { color: var(--yellow); }
.player-menu-status.is-notReady { color: var(--red-hi); }
.player-menu-status.is-scanning { color: var(--cyan); }
.player-menu-actions { display: grid; gap: 0.6rem; margin-top: 0.6rem; }
.player-menu-help { font-size: 0.95rem; }

@media (max-width: 1400px) {
  .score-side { min-width: 12rem; }
  .overview { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
  .lineup-team { font-size: 1.9rem; }
  .slot-name { font-size: 1.35rem; }
}
