﻿/* Friday Night Tandem race bracket — default client only. */
@font-face {
  font-family: "Kanit";
  src: url("../fonts/kanit/kanit-600-latin.woff2?v=f8612ca8607c") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kanit";
  src: url("../fonts/kanit/kanit-600-latin-ext.woff2?v=f8612ca8607c") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
  font-family: "Kanit";
  src: url("../fonts/kanit/kanit-600-italic-latin.woff2?v=f8612ca8607c") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Kanit";
  src: url("../fonts/kanit/kanit-600-italic-latin-ext.woff2?v=f8612ca8607c") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
  font-family: "Kanit";
  src: url("../fonts/kanit/kanit-800-latin.woff2?v=f8612ca8607c") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kanit";
  src: url("../fonts/kanit/kanit-800-latin-ext.woff2?v=f8612ca8607c") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
  font-family: "Kanit";
  src: url("../fonts/kanit/kanit-800-italic-latin.woff2?v=f8612ca8607c") format("woff2");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Kanit";
  src: url("../fonts/kanit/kanit-800-italic-latin-ext.woff2?v=f8612ca8607c") format("woff2");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
/* Atmospheric and Bad Coma are included for the approved local design only.
   Their web/commercial licences are NOT confirmed; see the Phase 5 report. */
@font-face {
  font-family: "Atmospheric";
  src: url("../fonts/atmospheric.ttf?v=f8612ca8607c") format("truetype");
  font-display: block;
}
@font-face {
  font-family: "Bad Coma";
  src: url("../fonts/bad-coma.ttf?v=f8612ca8607c") format("truetype");
  font-display: block;
}

:root {
  --race-ink: #141712;
  --race-paper: #f1ede0;
  --race-card: #fbf9f2;
  --race-red: #b0121f;
  --race-red-deep: #6a0912;
  --race-yellow: #e9edf5;
  --race-coral: #ff5a4f;
  --race-line: #3b3d38;
  --race-muted: #c9b4b6;
  --race-veil: rgba(18, 20, 17, .86);
  --race-title: "Atmospheric", "Kanit", sans-serif;
  --race-body: "Kanit", "Barlow Condensed", sans-serif;
  --race-label: "Bad Coma", "Kanit", sans-serif;
}

/* The approved board supplies its own masthead; keep only the rule alert
   that sits above the lower board. */
#view-bracket.race-bracket-active .main-bracket-header .bracket-header-center { display: none; }
#view-bracket.race-bracket-active .bracket-live-header-bar { display: none; }
#view-bracket.race-bracket-active .main-bracket-panel { padding-top: 0; }
#view-bracket.race-bracket-active .main-bracket-header { min-height: 0; margin: 0; padding: 0; }
#view-bracket.race-bracket-active #lowerBracketRuleAlert { margin: 10px 0 0; }
#view-bracket.race-bracket-active .main-bracket-board { overflow: visible; }
#view-bracket.race-bracket-active .bracket-alert-banner {
  position: relative;
  margin: 0 0 12px;
  padding: 12px 18px 12px 24px;
  overflow: hidden;
  color: var(--race-ink);
  background: #121212;
  border: 0;
  border-left: 10px solid var(--race-yellow);
  font-family: var(--race-body);
}
#view-bracket.race-bracket-active .bracket-alert-banner::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px;
  background: repeating-linear-gradient(-60deg, #d3262b 0 11px, #f4f1e6 11px 22px);
}
#view-bracket.race-bracket-active .bracket-alert-banner strong {
  display: block; color: var(--race-yellow); font-size: 25px; font-style: italic; font-weight: 800; letter-spacing: .02em;
}
#view-bracket.race-bracket-active .bracket-alert-banner small {
  display: block; margin-top: 3px; color: #f4f1e6; font-size: 13px; font-weight: 600;
}

.race-board-canvas {
  display: block;
  position: relative;
  width: 1672px;
  min-width: 1672px;
  margin: 0;
  background: #141712;
  overflow: hidden;
  border: 0;
  box-shadow: none;
  font-family: var(--race-body);
  color: var(--race-ink);
  container-type: inline-size;
}
.race-board {
  position: relative;
  width: 1672px;
  min-height: 941px;
  overflow: hidden;
  background: #141712;
  isolation: isolate;
}
.race-bg-media,
.race-bg-media img,
.race-bg-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.race-bg-media { z-index: 0; overflow: hidden; background: #1d1f1a; }
.race-bg-media img { filter: saturate(1.05) contrast(1.05); animation: race-kb 22s ease-in-out infinite alternate; transform-origin: 60% 40%; }
.race-bg-media video { filter: saturate(1.05) contrast(1.05); }
.race-paper {
  position: absolute;
  inset: 90px 0 0 412px;
  z-index: 1;
  /* R3: the board ground is a heavy ink veil. The reel/photo behind it is
     ambient texture only, so labels and connectors always have a dark, even
     ground to sit on (measured mean luminance well under .25). */
  background: var(--race-veil, rgba(18, 20, 17, .86));
}
.race-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .05;
  background-image: radial-gradient(#d8d3c4 0.7px, transparent 0.8px);
  background-size: 4px 4px;
  pointer-events: none;
}
.race-header {
  position: absolute;
  z-index: 5;
  inset: 0 0 auto 0;
  height: 90px;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 0 28px;
  color: var(--race-ink);
  background: linear-gradient(180deg, rgba(241,237,224,.96), rgba(241,237,224,.76) 72%, rgba(241,237,224,0));
}
.race-header-logo { width: 252px; height: 100px; object-fit: contain; object-position: left top; margin: -6px 0 0 -14px; }
.race-header h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: var(--race-title);
  font-size: 62px;
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.01em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.race-header-top {
  flex: 0 0 auto;
  padding-top: 14px;
  font-family: var(--race-body);
  font-size: 46px;
  font-style: italic;
  font-weight: 800;
  line-height: 1;
}
.race-header-rule { position: absolute; left: 28px; right: 28px; bottom: 11px; height: 3.5px; background: var(--race-ink); }

.race-layout { position: absolute; inset: 90px 0 0; z-index: 2; }
.race-left {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 412px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, var(--race-red-deep) 0%, #32080d 38%, #0b0a0a 100%);
}
.race-photo {
  position: absolute;
  left: 0; top: 0; width: 412px; height: 500px;
  overflow: hidden;
  background: #4c060d;
}
.race-photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.25) contrast(1.08) saturate(1.05);
  animation: race-zoom 22s ease-in-out infinite alternate;
}
.race-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0 100%, rgba(50,3,7,.88), transparent 58%),
    linear-gradient(180deg, transparent 48%, rgba(50,10,14,.35) 68%, #320a0e 100%),
    repeating-linear-gradient(0deg, rgba(43,3,7,.16) 0 1px, transparent 1px 4px);
  pointer-events: none;
}
.race-left-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 22px 14px; }
.race-on-track { display: flex; align-items: center; gap: 10px; color: var(--race-yellow); font-size: 31px; font-style: italic; font-weight: 800; line-height: 1; white-space: nowrap; }
.race-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--race-yellow); box-shadow: 0 0 12px rgba(233,237,245,.8); animation: race-dot 1s steps(2) infinite; }
.race-on-pair { margin: 10px 0 0; display: grid; gap: 3px; }
.race-on-row { display: grid; grid-template-columns: 58px 1fr auto; align-items: baseline; gap: 8px; }
.race-on-seed { font-size: 39px; font-style: italic; font-weight: 800; line-height: 1; }
.race-on-name { font-size: 31px; font-style: italic; font-weight: 800; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race-on-role { color: var(--race-yellow); font-size: 19px; font-style: italic; font-weight: 800; letter-spacing: .02em; }
.race-on-row.is-chase .race-on-role { color: #fff; }
.race-divider { height: 2px; margin: 10px 0 8px; background: rgba(255,255,255,.35); }
.race-next { display: flex; gap: 8px; align-items: baseline; min-height: 24px; font-size: 21px; font-style: italic; font-weight: 600; white-space: nowrap; overflow: hidden; }
.race-next b { color: var(--race-yellow); font-size: 21px; font-weight: 800; }
.race-next span { overflow: hidden; text-overflow: ellipsis; }
.race-progress { margin-top: 10px; }
.race-progress-head { display: flex; justify-content: space-between; align-items: baseline; text-transform: uppercase; font-size: 23px; font-style: italic; font-weight: 800; line-height: 1.1; }
.race-progress-head span:first-child { letter-spacing: .01em; }
.race-progress-count { font-size: 26px; }
.race-progress-count b { font-size: 38px; }
.race-progress-count small { font-size: 18px; font-style: italic; font-weight: 600; color: #e8dedf; }
.race-segments { display: flex; gap: 4px; margin-top: 7px; height: 32px; }
.race-seg { position: relative; flex: 1; min-width: 0; display: grid; place-items: center; font-size: 16px; font-style: italic; font-weight: 800; color: #fff; background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.2); }
.race-seg.is-done { color: var(--race-ink); background: repeating-linear-gradient(-60deg, #d3262b 0 7px, #f4f1e6 7px 14px); border-color: #f4f1e6; }
.race-seg.is-live { color: var(--race-ink); background: var(--race-yellow); border-color: var(--race-yellow); box-shadow: 0 0 14px rgba(233,237,245,.55); animation: race-pulse 1.3s ease-in-out infinite; }
.race-seg.is-next { color: #fff; border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.13); }
.race-seg.is-todo { color: rgba(255,255,255,.48); }
.race-legend { display: flex; justify-content: space-between; margin-top: 4px; color: #e8dedf; font-size: 11px; font-weight: 600; letter-spacing: .12em; }
.race-legend b { color: var(--race-yellow); font-weight: 600; }

.race-tree { position: absolute; left: 412px; top: 0; right: 0; bottom: 0; overflow: hidden; }
.race-tree-heads { position: absolute; left: 24px; right: 24px; top: 10px; display: grid; gap: 0; }
.race-round-head { height: 42px; display: flex; align-items: center; padding: 0 18px; background: #121212; color: #fff; font-size: 30px; font-style: italic; font-weight: 800; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race-stage { position: absolute; left: 24px; right: 24px; top: 86px; }
.race-match {
  position: absolute;
  display: grid;
  grid-template-rows: 1fr 1fr;
  background: var(--race-card);
  border: 1.6px solid var(--race-ink);
  box-shadow: 0 4px 7px rgba(20,23,18,.23);
  overflow: visible;
  animation: race-in .55s cubic-bezier(.2,.8,.2,1) both;
}
.race-match-label { position: absolute; left: 8px; top: -36px; color: var(--race-ink); font-size: 22px; font-style: italic; font-weight: 800; line-height: 1; white-space: nowrap; }
.race-match.is-live { border-color: var(--race-red); box-shadow: 0 0 0 3px rgba(176,18,31,.2), 0 0 22px rgba(176,18,31,.55); animation: race-live 1.3s ease-in-out infinite; }
.race-live-tag {
  position: absolute; right: -4px; top: -15px; z-index: 3;
  padding: 4px 10px 4px 17px;
  color: var(--race-ink); background: var(--race-yellow);
  font-size: 21px; font-style: italic; font-weight: 800; line-height: 1;
  transform: skewX(-13deg);
  box-shadow: 0 0 14px rgba(233,237,245,.55);
  pointer-events: none;
}
.race-live-tag::before, .race-live-tag::after { content: ""; position: absolute; top: 2px; bottom: 2px; width: 3px; background: var(--race-red); transform: skewX(13deg); animation: race-slash .9s linear infinite; }
/* F2: a forfeited battle says so on the card. */
.race-forfeit-tag {
  position: absolute; right: -4px; top: -26px; z-index: 3;
  padding: 3px 10px; color: #fff; background: var(--race-red);
  font-size: 14px; font-style: italic; font-weight: 800; line-height: 1.2;
  letter-spacing: .02em; pointer-events: none;
}
.race-live-tag::before { left: 5px; }
.race-live-tag::after { left: 11px; animation-delay: -.3s; }
.race-slot { position: relative; min-height: 0; display: flex; align-items: stretch; border-bottom: 1.6px solid var(--race-ink); }
.race-slot:last-child { border-bottom: 0; }
.race-slot .slot-button {
  flex: 1; min-width: 0; min-height: 0; display: flex; align-items: center; gap: 8px;
  padding: 0 12px 0 64px; border: 0; border-radius: 0; background: transparent; color: var(--race-ink);
  font-family: var(--race-body); font-size: 24px; font-style: normal; font-weight: 600; line-height: 1; text-align: left;
  box-shadow: none; cursor: pointer; overflow: hidden;
}
.race-slot .slot-button:hover { background: rgba(176,18,31,.06); }
.race-match.is-live .race-slot .slot-button { padding-right: 78px; }
.race-slot .slot-button:disabled { cursor: default; opacity: 1; }
.race-slot .slot-button.selected { background: rgba(176,18,31,.045); }
#view-bracket .race-slot .slot-button,
#view-bracket .race-slot .slot-button.selected,
#view-bracket .race-slot .slot-button.loser {
  min-height: 0; padding: 0 12px 0 64px; border: 0; border-radius: 0;
  background: transparent; color: var(--race-ink); box-shadow: none;
  font-family: var(--race-body); font-size: 24px; font-weight: 600; font-style: normal;
  text-align: left; text-shadow: none; transform: none;
}
#view-bracket .race-slot .slot-button.selected { background: rgba(176,18,31,.045); }
#view-bracket .race-slot .slot-button.selected .slot-name,
#view-bracket .race-slot .slot-button .slot-name { color: var(--race-ink) !important; text-shadow: none; font-weight: 600; }
#view-bracket .race-slot .slot-button.selected .slot-team,
#view-bracket .race-slot .slot-button .slot-team { color: var(--race-ink); }
#view-bracket .race-match.is-live .race-slot .slot-button { padding-right: 78px; }
.race-slot .slot-button.loser { opacity: .55; }
.race-seed {
  position: absolute; left: 0; top: 0; bottom: 0; width: 52px; z-index: 1;
  display: grid; place-items: center;
  background: var(--race-ink); color: #fff;
  font-family: var(--race-body); font-size: 27px; font-style: italic; font-weight: 800;
}
.race-slot:last-child .race-seed { border-top: 0; }
.race-slot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.race-slot.is-empty .slot-button { padding-left: 18px; color: rgba(20,23,18,.55); font-style: italic; font-weight: 600; }
.race-slot.is-empty .race-seed { display: none; }
.race-check {
  flex: 0 0 auto; margin-left: auto; width: 31px; height: 24px;
  color: var(--race-red); opacity: 0; transform: scale(.4) rotate(-12deg);
  transition: opacity .2s, transform .25s;
}
.race-slot.is-winner .race-check { opacity: 1; transform: none; }
.race-check svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 4.5; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }

.race-connectors { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: visible; }
.race-connectors path { fill: none; stroke-linecap: square; stroke-linejoin: miter; }
.race-connectors path.is-pending { stroke: var(--race-line); stroke-width: 2.4; }
.race-connectors path.is-decided { stroke: var(--race-red); stroke-width: 4.5; filter: drop-shadow(0 0 3px rgba(176,18,31,.85)); }
.race-connectors path.is-live { stroke: var(--race-yellow); stroke-width: 3.5; filter: drop-shadow(0 0 4px rgba(233,237,245,.55)); }
.race-connectors .race-travel { fill: #ffd0c2; filter: drop-shadow(0 0 5px rgba(255,208,194,.9)); }

/* Mobile: compact top strip, current round, explicit round switcher. */
.race-mobile { display: none; }
.race-mobile { position: relative; z-index: 3; }
.race-mobile-strip { padding: 13px 16px 10px; color: #fff; background: linear-gradient(180deg, var(--race-red-deep), #170a0b); }
.race-mobile-strip .race-on-track { font-size: 22px; }
.race-mobile-strip .race-on-row { grid-template-columns: 44px 1fr auto; }
.race-mobile-strip .race-on-seed { font-size: 28px; }
.race-mobile-strip .race-on-name { font-size: 22px; }
.race-mobile-strip .race-on-role { font-size: 15px; }
.race-mobile-strip .race-progress-head { font-size: 17px; }
.race-mobile-strip .race-progress-count b { font-size: 28px; }
.race-mobile-strip .race-segments { height: 24px; }
.race-mobile-strip .race-legend { font-size: 9px; }
.race-mobile-switch { display: flex; gap: 6px; padding: 12px 16px 8px; }
.race-mobile-switch button { flex: 1; padding: 8px 4px; border: 1.5px solid var(--race-ink); background: transparent; color: var(--race-ink); font: italic 800 14px/1 var(--race-body); }
.race-mobile-switch button.is-active { background: var(--race-ink); color: #fff; }
.race-mobile-round { padding: 0 16px 18px; }
.race-mobile-round .race-match { position: relative; inset: auto; width: 100% !important; height: 76px; margin: 40px 0 0; left: auto; top: auto; }
.race-mobile-round .race-match-label { top: -24px; font-size: 16px; }

@media (max-width: 720px) {
  #view-bracket.race-bracket-active .main-bracket-board { overflow: hidden; }
  .race-board-canvas { width: 100% !important; min-width: 0 !important; height: auto !important; }
  .race-board { width: 100%; min-height: 0; }
  .race-header, .race-tree, .race-paper, .race-left { display: none; }
  .race-mobile { display: block; }
  .race-board-canvas { overflow: hidden; }
  body { overflow-x: hidden; }
  #competitionDecisionPanel.competition-decision-panel { padding: 12px; }
  #competitionDecisionPanel .competition-result-reveal { width: calc(100vw - 24px); min-width: 0; }
  #competitionDecisionPanel .competition-result-reveal-head { grid-template-columns: 1fr auto; gap: 8px; padding: 11px 15px 10px; }
  #competitionDecisionPanel .competition-result-reveal .competition-result-label { font-size: clamp(34px, 12vw, 52px); }
  #competitionDecisionPanel .competition-result-reveal h3 { font-size: clamp(26px, 9vw, 38px); }
  #competitionDecisionPanel .competition-result-countdown-dial { width: 70px; height: 70px; }
  #competitionDecisionPanel .competition-result-countdown strong { font-size: 25px; }
  #competitionDecisionPanel .competition-result-context,
  #competitionDecisionPanel .competition-decision-copy,
  #competitionDecisionPanel .competition-vote-tally,
  #competitionDecisionPanel .competition-decision-actions { margin-left: 15px; margin-right: 15px; }
  #competitionDecisionPanel .competition-vote-tally { flex-wrap: wrap; }
  #competitionDecisionPanel .competition-vote-pill { flex-basis: 45%; }
  #competitionDecisionPanel .competition-decision-actions { flex-direction: column; }
  #competitionDecisionPanel .competition-decision-actions .button { width: 100%; }
  #competitionDecisionPanel .competition-decision-card.is-review-hold { width: calc(100vw - 24px); min-width: 0; }
}

/* Result card: same markup/actions, approved visual language. */
#competitionDecisionPanel.competition-decision-panel {
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at center, rgba(30,6,9,.55), rgba(6,3,3,.88));
  backdrop-filter: blur(2px);
}
#competitionDecisionPanel.competition-decision-panel::before {
  background: radial-gradient(ellipse at center, rgba(30,6,9,.55), rgba(6,3,3,.88));
  backdrop-filter: blur(3px) saturate(.8);
  -webkit-backdrop-filter: blur(3px) saturate(.8);
}
#competitionDecisionPanel.competition-decision-panel::after {
  background: radial-gradient(circle at center, rgba(176,18,31,.2), transparent 46%);
}
#competitionDecisionPanel .competition-result-reveal {
  position: relative;
  width: min(52vw, 820px);
  min-width: 560px;
  padding: 0;
  color: #fff;
  background: linear-gradient(180deg, #1c0c0d, #0b0a0a 72%);
  border: 2px solid var(--race-red);
  border-radius: 4px;
  box-shadow: 0 22px 54px rgba(0,0,0,.65), 0 0 34px rgba(176,18,31,.4);
  overflow: hidden;
  font-family: var(--race-body);
  animation: race-result-card .5s cubic-bezier(.2,1.3,.3,1) both;
}
#competitionDecisionPanel .competition-result-reveal.is-omt { border-color: var(--race-coral); }
#competitionDecisionPanel .competition-result-reveal.is-review-hold,
#competitionDecisionPanel .competition-decision-card.is-review-hold {
  border-color: #8d8487; color: #fff; background: linear-gradient(180deg, #241e20, #0b0a0a);
}
#competitionDecisionPanel .competition-result-reveal::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.17) 50%, transparent 62%);
  transform: translateX(-130%);
  animation: race-result-sweep 1.1s .25s ease-out both;
}
#competitionDecisionPanel .competition-result-band {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 9px 25px; background: linear-gradient(90deg, var(--race-red-deep), var(--race-red));
  color: #fff; font-size: 12px; font-weight: 800; font-style: italic; letter-spacing: .04em; text-transform: uppercase;
}
#competitionDecisionPanel .competition-result-band span:last-child { font-weight: 600; letter-spacing: .02em; opacity: .9; text-align: right; }
#competitionDecisionPanel .competition-result-reveal.is-omt .competition-result-band { background: linear-gradient(90deg, #7a1410, #d2392e); }
#competitionDecisionPanel .competition-result-reveal.is-omt .competition-result-reveal-head { background: transparent; }
#competitionDecisionPanel .competition-result-reveal-head > div:first-child { justify-items: start; text-align: left; width: 100%; justify-self: start; }
#competitionDecisionPanel .competition-result-body { position: relative; z-index: 1; text-align: left; }
#competitionDecisionPanel .competition-result-reveal-head {
  display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center;
  margin: 0; padding: 16px 25px 0;
  background: transparent;
  border-bottom: 0;
  text-align: left;
}
#competitionDecisionPanel .competition-result-reveal.is-omt .competition-result-reveal-head { background: linear-gradient(90deg, #7a1410, #d2392e); }
#competitionDecisionPanel .competition-result-reveal.is-review .competition-result-reveal-head { background: linear-gradient(90deg, #2a2425, #4a4144); }
#competitionDecisionPanel .competition-result-reveal .section-kicker { display: none; }
#competitionDecisionPanel .competition-result-label {
  display: block; color: var(--race-yellow); margin: 0; padding: 0; border: 0; border-radius: 0; background: none;
  font-family: var(--race-label); font-size: clamp(42px, 4.8vw, 76px); line-height: .9;
  font-weight: 400; letter-spacing: .02em; text-transform: uppercase; text-align: left;
  text-shadow: 0 3px 0 rgba(0,0,0,.35);
}
#competitionDecisionPanel .competition-result-reveal.is-omt .competition-result-label { color: #ffb3a8; }
#competitionDecisionPanel .competition-result-reveal h3 {
  margin: 6px 0 0; color: #fff; font-family: var(--race-body);
  font-size: clamp(34px, 4.2vw, 64px); font-style: italic; font-weight: 800;
  line-height: .98; text-transform: uppercase; letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
#competitionDecisionPanel .competition-result-reveal.is-long-name h3 { font-size: clamp(25px, 3.1vw, 44px); }
#competitionDecisionPanel .competition-result-countdown { position: relative; display: grid; justify-items: center; gap: 3px; opacity: 1; }
#competitionDecisionPanel .competition-result-countdown-dial { width: 92px; height: 92px; }
#competitionDecisionPanel .competition-result-countdown-ring { stroke: var(--race-yellow); stroke-width: 6; stroke-linecap: round; }
#competitionDecisionPanel .competition-result-reveal.is-omt .competition-result-countdown-ring { stroke: var(--race-coral); }
#competitionDecisionPanel .competition-result-countdown strong { font-family: var(--race-body); font-size: 33px; font-style: italic; font-weight: 800; color: #fff; }
#competitionDecisionPanel .competition-result-countdown.is-final strong { animation: race-count-pulse 1s ease-in-out infinite; }
#competitionDecisionPanel .competition-result-countdown > span { color: var(--race-muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-align: center; line-height: 1.2; text-transform: uppercase; }
#competitionDecisionPanel .competition-result-context { margin: 17px 25px 0; color: var(--race-muted); font-size: 15px; font-weight: 600; letter-spacing: .02em; }
#competitionDecisionPanel .competition-decision-copy { margin: 12px 25px 0; color: #ece3e4; font-size: 16px; font-weight: 600; line-height: 1.4; }
#competitionDecisionPanel .competition-vote-tally { display: flex; gap: 9px; margin: 14px 25px 0; justify-content: stretch; }
#competitionDecisionPanel .competition-vote-pill {
  flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 3px;
  background: rgba(255,255,255,.055); color: #fff;
  font-size: 14px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis;
}
#competitionDecisionPanel .competition-vote-pill:nth-child(1) { border-color: var(--race-yellow); background: rgba(233,237,245,.08); }
#competitionDecisionPanel .competition-vote-pill.is-omt { flex: .55; border-color: var(--race-coral); color: var(--race-coral); }
#competitionDecisionPanel .race-tally-pill {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  align-items: center; column-gap: 8px; padding: 9px 12px;
}
#competitionDecisionPanel .race-tally-pill b { grid-row: span 2; font-size: 36px; font-style: italic; font-weight: 800; line-height: 1; }
#competitionDecisionPanel .race-tally-pill small { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--race-muted); }
#competitionDecisionPanel .race-tally-pill span { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#competitionDecisionPanel .race-tally-pill.is-lead { border-color: var(--race-yellow); background: rgba(233,237,245,.08); }
#competitionDecisionPanel .race-tally-pill.is-lead b { color: var(--race-yellow); }
#competitionDecisionPanel .race-tally-pill.is-chase b { color: #fff; }
#competitionDecisionPanel .race-tally-pill.is-omt b { color: var(--race-coral); }
#competitionDecisionPanel .race-tally-pill.is-omt span { display: none; }
/* R13: a long driver name in a tally chip stays inside the chip at 390. */
#competitionDecisionPanel .race-tally-pill { overflow: hidden; }
#competitionDecisionPanel .race-tally-pill span { min-width: 0; max-width: 100%; }
#competitionDecisionPanel .race-tally-pill b { flex: 0 0 auto; }
#competitionDecisionPanel .race-tally-pill.is-vs { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; overflow-wrap: anywhere; }
#competitionDecisionPanel .competition-decision-actions { display: flex; gap: 10px; margin: 16px 25px 23px; }
#competitionDecisionPanel .competition-decision-actions .button {
  flex: 1; min-width: 0; border-radius: 3px; padding: 12px 15px;
  font-family: var(--race-body); font-size: 17px; font-style: italic; font-weight: 800;
  letter-spacing: .02em; text-transform: uppercase;
}
#competitionDecisionPanel .button[data-action="continue-competition-flow"] { background: var(--race-yellow); border-color: var(--race-yellow); color: var(--race-ink); }
#competitionDecisionPanel .button[data-action="review-competition-decision"] { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
#competitionDecisionPanel .competition-result-reveal.is-omt .button[data-action="continue-competition-flow"] { background: var(--race-coral); border-color: var(--race-coral); }
#competitionDecisionPanel .competition-result-reveal::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 11px; padding: 0; border-radius: 0;
  z-index: 2; pointer-events: none; -webkit-mask: none; mask: none;
  background: repeating-linear-gradient(-60deg, #d3262b 0 12px, #f4f1e6 12px 24px);
  animation: race-kerb 1.2s linear infinite;
}
#competitionDecisionPanel .competition-result-reveal.is-omt::before { background: repeating-linear-gradient(-60deg, var(--race-coral) 0 12px, #141712 12px 24px); }
#competitionDecisionPanel .competition-result-reveal.is-review::before { background: repeating-linear-gradient(-60deg, #6d6568 0 12px, #2a2425 12px 24px); animation: none; }
#competitionDecisionPanel .competition-result-reveal-glow { display: none; }
#competitionDecisionPanel .competition-result-smoke { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
#competitionDecisionPanel .competition-result-smoke span {
  position: absolute; left: 44%; top: 48%; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(240,236,230,.44), rgba(240,236,230,0) 68%);
  opacity: 0; animation: race-smoke 2s .2s ease-out both;
}
#competitionDecisionPanel .competition-result-smoke span:nth-child(2) { animation-delay: .34s; --sx: -200px; --sy: -40px; }
#competitionDecisionPanel .competition-result-smoke span:nth-child(3) { animation-delay: .28s; --sx: 200px; --sy: -25px; }
#competitionDecisionPanel .competition-result-smoke span:nth-child(4) { animation-delay: .42s; --sx: -120px; --sy: 90px; }
#competitionDecisionPanel .competition-result-smoke span:nth-child(5) { animation-delay: .38s; --sx: 140px; --sy: 75px; }
#competitionDecisionPanel .competition-result-label { animation: race-label-slam .45s cubic-bezier(.2,1.35,.3,1) both; }
#competitionDecisionPanel .competition-result-reveal h3 { animation: race-name-rise .5s .12s cubic-bezier(.2,.8,.2,1) both; }
#competitionDecisionPanel .competition-result-context,
#competitionDecisionPanel .competition-decision-copy,
#competitionDecisionPanel .competition-vote-tally,
#competitionDecisionPanel .competition-decision-actions { animation: race-content-in .45s .3s ease both; }
#competitionDecisionPanel .competition-vote-tally { animation-delay: .42s; }
#competitionDecisionPanel .competition-decision-actions { animation-delay: .5s; }
@keyframes race-smoke { 0% { opacity: .9; transform: translate(0,0) scale(.3); } 100% { opacity: 0; transform: translate(var(--sx,0),var(--sy,-90px)) scale(2.2); } }
@keyframes race-label-slam { from { opacity: 0; transform: scale(2.2); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes race-name-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes race-content-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#competitionDecisionPanel .competition-result-reveal.is-review-hold,
#competitionDecisionPanel .competition-decision-card.is-review-hold {
  border-color: #8d8487; color: #fff; background: linear-gradient(180deg, #241e20, #0b0a0a);
}
#competitionDecisionPanel .competition-decision-card.is-review-hold {
  width: min(52vw, 740px); min-width: 480px; padding: 0 0 18px;
  border: 2px solid #8d8487; border-radius: 4px; overflow: hidden;
}
#competitionDecisionPanel.is-review .competition-decision-card.is-review-hold {
  width: min(52vw, 740px); min-width: 480px; padding: 0 0 18px;
  border: 2px solid #8d8487; border-radius: 4px; overflow: hidden;
  background: linear-gradient(180deg, #241e20, #0b0a0a);
  color: #fff;
}
#competitionDecisionPanel.is-review .competition-decision-card.is-review-hold .competition-decision-head {
  padding: 15px 25px; background: linear-gradient(90deg, #2a2425, #4a4144); color: #fff;
}
#competitionDecisionPanel.is-review .competition-decision-card.is-review-hold .section-kicker,
#competitionDecisionPanel.is-review .competition-decision-card.is-review-hold h3 { color: #fff; }
#competitionDecisionPanel.is-review .competition-decision-card.is-review-hold .section-kicker { color: var(--race-yellow); }
#competitionDecisionPanel.is-review .competition-decision-card.is-review-hold > .competition-decision-copy { color: #fff; }
#competitionDecisionPanel.is-review .competition-decision-card.is-review-hold::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px;
  background: repeating-linear-gradient(-60deg, #d3262b 0 11px, #f4f1e6 11px 22px);
}
#competitionDecisionPanel.is-review .competition-decision-card.is-review-hold .status-pill {
  border-radius: 3px; background: var(--race-red); color: #fff; border-color: var(--race-red);
}
#competitionDecisionPanel.is-review .competition-decision-card.is-review-hold .competition-decision-copy { color: var(--race-muted); }
#competitionDecisionPanel.is-review .competition-decision-card.is-review-hold .button {
  border-radius: 3px; background: var(--race-yellow); border-color: var(--race-yellow); color: var(--race-ink);
  font-family: var(--race-body); font-style: italic; font-weight: 800;
}
#competitionDecisionPanel .competition-decision-card.is-review-hold .competition-decision-head { padding: 16px 25px; background: linear-gradient(90deg, #2a2425, #4a4144); }
#competitionDecisionPanel .competition-decision-card.is-review-hold .competition-decision-copy { margin: 18px 25px 0; }
#competitionDecisionPanel .competition-decision-card.is-review-hold .competition-decision-actions { margin: 18px 25px 0; }

@keyframes race-in { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes race-kb { from { transform: scale(1.08); } to { transform: scale(1.22) translate(-3%, 2%); } }
@keyframes race-zoom { from { transform: scale(1.02); } to { transform: scale(1.14); } }
@keyframes race-dot { 50% { opacity: .2; } }
@keyframes race-pulse { 50% { opacity: .55; } }
@keyframes race-live { 50% { box-shadow: 0 0 0 5px rgba(176,18,31,.14), 0 0 30px rgba(176,18,31,.7); } }
@keyframes race-slash { from { transform: translateX(-4px) skewX(13deg); } to { transform: translateX(4px) skewX(13deg); } }
@keyframes race-result-card { from { opacity: 0; transform: scale(.86) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes race-result-sweep { to { transform: translateX(130%); } }
@keyframes race-count-pulse { 50% { transform: scale(1.15); } }
@keyframes race-kerb { to { background-position: -24px 0; } }

@media (prefers-reduced-motion: reduce) {
  .race-board *,
  #competitionDecisionPanel .competition-result-reveal,
  #competitionDecisionPanel .competition-result-reveal::after,
  #competitionDecisionPanel .competition-result-reveal::before {
    animation: none !important;
    transition: none !important;
  }
  .race-board .race-check { opacity: 1; transform: none; }
  #competitionDecisionPanel .competition-result-reveal::after { display: none; }
  #competitionDecisionPanel .competition-result-smoke { display: none; }
}

/* Visibility is the default. The entrance animation may decorate the first
   paint, but no card may stay at the keyframe start when a pane is hidden,
   throttled or reloaded. */
.race-match { animation-fill-mode: none !important; }

/* B2: the loser stays legible on cream while the winner is full ink. */
.race-slot .slot-button.loser { opacity: .72; }

/* D1: both names are vertically centred; the check is fully inside the row. */
.race-slot .slot-button {
  align-items: center !important;
  padding-right: 10px !important;
  overflow: hidden !important;
}
.race-slot .slot-button .slot-name {
  display: flex !important;
  align-items: center !important;
  width: auto !important;
  height: 100% !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
  line-height: 1 !important;
}
.race-check {
  width: 31px !important;
  height: 24px !important;
  flex: 0 0 31px !important;
  margin-left: 8px !important;
  align-self: center !important;
}
/* D3/R2: round labels sit fully above their card, never under it, and carry
   no chip or plate of their own (the ink veil is the ground). */
.race-match-label {
  top: -36px !important;
  z-index: 9 !important;
  padding: 0 !important;
  background: none !important;
  white-space: nowrap !important;
  opacity: 1 !important;
}
.race-slot .slot-button .slot-name {
  height: auto !important;
  min-height: 1.05em !important;
  flex: 0 0 auto !important;
}
.race-slot .slot-button .slot-name {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 1.05em !important;
  flex: 1 1 auto !important;
  line-height: 1.05 !important;
}
.race-check { min-height: 0 !important; max-height: 24px !important; overflow: hidden !important; }
.race-check svg { max-width: 31px !important; max-height: 24px !important; }
.race-slot .slot-button .slot-name { transform: translateY(0.45em) !important; }
.race-slot .slot-button { position: relative !important; }
.race-slot .slot-button .slot-name {
  position: absolute !important;
  left: 64px !important;
  right: 42px !important;
  top: 50% !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  transform: translateY(-50%) !important;
  display: block !important;
  line-height: 1.05 !important;
  text-align: left !important;
  overflow: hidden !important;
}
.race-slot.is-empty .slot-button .slot-name { left: 18px !important; right: 10px !important; }
.race-slot .slot-button .slot-name { line-height: 1.18 !important; right: 38px !important; }
.race-check { width: 26px !important; height: 20px !important; flex: 0 0 26px !important; margin-left: 4px !important; max-height: 20px !important; }
.race-check svg { max-width: 26px !important; max-height: 20px !important; }
.race-check {
  position: absolute !important;
  right: 8px !important;
  top: 8px !important;
  margin: 0 !important;
  transform: none !important;
}
.race-slot .slot-button .slot-name { line-height: 1.1 !important; }
.race-slot .slot-button .slot-name { font-size: 24px !important; }
.race-slot .slot-button .slot-name { top: calc(50% - 2px) !important; }
.race-slot .slot-button .slot-name { overflow: visible !important; }
.race-slot .slot-button .slot-name { line-height: 1.35 !important; top: 50% !important; }
.race-slot .slot-button .slot-name { font-size: 22px !important; }
#competitionDecisionPanel .competition-result-smoke { display: none !important; }
#competitionDecisionPanel .competition-result-label { outline: 0 !important; box-shadow: none !important; border: 0 !important; background: none !important; }
#competitionDecisionPanel .competition-result-reveal.is-omt .competition-result-reveal-head { background: transparent !important; }
/* N3: keep the base live-card padding; lower cards must not truncate names. */
/* N3/R6: the tag sits in the gap above the live card and never touches any
   card rect. The gap is 34px (28px above 16-driver brackets), the tag is 22px,
   so the clearance is 8px / 2px respectively. */
.race-live-tag { top: -26px !important; font-size: 16px !important; padding: 3px 8px 3px 14px !important; }
