.path-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

button.secondary {
  background: #252d39;
  color: var(--ink);
  border: 1px solid #374253;
}

dialog {
  width: min(720px, calc(100% - 28px));
  max-height: min(760px, calc(100vh - 40px));
  padding: 0;
  border: 1px solid #384353;
  border-radius: 18px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 30px 100px #000b;
}

dialog::backdrop {
  background: #030508c9;
  backdrop-filter: blur(5px);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.dialog-head .eyebrow { margin: 0 0 7px; }
.dialog-head strong { display: block; overflow-wrap: anywhere; }
.icon-button { font-size: 1.7rem; background: transparent; color: var(--muted); padding: 4px 10px; }
.folder-toolbar { display: flex; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.folder-list { height: min(430px, 50vh); overflow: auto; padding: 8px; }

.folder-item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  border-radius: 9px;
  padding: 11px 12px;
}

.folder-item:hover { background: #ffffff0d; }
.folder-icon { color: var(--lime); }
.folder-arrow { color: var(--muted); font-size: 1.4rem; }
.folder-loading { padding: 30px; text-align: center; color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; padding: 15px 18px; border-top: 1px solid var(--line); }
dialog .notice { padding: 0 18px; }

.history-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.history-head h2 { margin: .4em 0; }
.event-history { display: grid; gap: 8px; margin-top: 18px; max-height: 430px; overflow: auto; }
.event-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.event-row.selected { border-color: var(--lime); background: #c6ff4a0a; }
.event-row.awarding { box-shadow: inset 4px 0 #53b8ff; background: #53b8ff0b; }
.event-row.selected.awarding { border-color: var(--lime); box-shadow: inset 4px 0 #53b8ff; }
.event-actions { display: flex; gap: 8px; }
.event-actions .award-event:not(:disabled) { border-color: #53b8ff66; color: #9dd8ff; }
.cloud-card { display: grid; gap: 20px; }
.cloud-heading, .cloud-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cloud-heading h2 { margin: .35em 0; }
.cloud-fields { display: grid; grid-template-columns: 1.2fr .65fr 1fr; gap: 12px; }
.cloud-fields label { margin: 0; }
.cloud-fields label > span { display: block; margin-bottom: 8px; }
.cloud-links { display: flex; flex-wrap: wrap; gap: 14px; }
.cloud-links a { color: var(--blue); font-weight: 750; text-decoration: none; }
.event-number { color: var(--lime); font-size: 1.35rem; font-weight: 900; text-align: center; }
.event-row strong, .event-row span { display: block; }
.event-row span { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.event-row span.error { color: var(--red); }
.time-detail { color: var(--muted); font-size: .7em; font-weight: 650; white-space: nowrap; }
.page-pill { color: var(--lime); border-color: #c6ff4a55; font-weight: 800; }
.stadium-results tbody tr { display: table-row; height: clamp(54px, 6.4vh, 78px); }
.stadium-results tbody td { display: table-cell; }
.stadium-results.relay-event th:nth-child(4), .stadium-results.relay-event td:nth-child(4) { display: none; }
.event-title { transition: opacity .28s ease, transform .28s ease, filter .28s ease; }
.event-title.title-out { opacity: 0; transform: translateY(7px); filter: blur(2px); }

.clock-control { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.clock-control h2 { margin: .4em 0; }
.clock-control > div:last-child { text-align: right; }
.clock-control #clockTime { display: block; color: var(--lime); font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: .9; font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
.clock-control #clockStatus { display: block; margin-top: 9px; color: var(--muted); font-size: .72rem; font-weight: 850; letter-spacing: .16em; }
.scale-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.scale-card h2 { margin: .4em 0; }
.scale-controls { display: grid; grid-template-columns: auto minmax(180px, 300px) 58px auto auto; align-items: center; gap: 10px; }
.scale-controls input[type="range"] { width: 100%; height: 8px; padding: 0; border: 0; background: #29384a; accent-color: var(--lime); cursor: pointer; }
.scale-controls strong { color: var(--lime); text-align: center; font-variant-numeric: tabular-nums; }
.scale-controls button { min-width: 48px; }

.race-clock { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 14px 20px; border: 1px solid #c6ff4a55; border-radius: 16px; background: linear-gradient(100deg, #c6ff4a0d, #53b8ff0a); }
.race-clock[hidden] { display: none; }
.race-clock span { color: var(--lime); font-size: .78rem; font-weight: 900; letter-spacing: .17em; padding-bottom: 9px; }
.race-clock strong { font-size: clamp(3.2rem, 8vw, 7rem); line-height: .78; font-variant-numeric: tabular-nums; letter-spacing: -.055em; }
.race-clock[data-status="stopped"] strong, .race-clock[data-status="paused"] strong { color: var(--lime); }
.race-clock + .results { margin-top: 18px; }

@media (max-width: 760px) {
  .path-row { grid-template-columns: 1fr 1fr; }
  .path-row input { grid-column: 1 / -1; }
  .history-head { align-items: flex-start; flex-direction: column; }
  .clock-control { align-items: stretch; flex-direction: column; }
  .clock-control > div:last-child { text-align: left; }
  .scale-card { align-items: stretch; flex-direction: column; }
  .scale-controls { grid-template-columns: auto minmax(110px, 1fr) 54px auto; }
  .scale-controls #scaleReset { grid-column: 1 / -1; }
  .race-clock { align-items: flex-start; flex-direction: column; }
  .event-row { grid-template-columns: 44px minmax(0, 1fr); }
  .event-actions { grid-column: 1 / -1; }
  .event-actions button { flex: 1; }
  .cloud-heading, .cloud-footer { align-items: flex-start; flex-direction: column; }
  .cloud-fields { grid-template-columns: 1fr; }
}

/* Broadcast visual system */
.display-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, #c6ff4a12 0, transparent 29%),
    radial-gradient(circle at 92% 18%, #53b8ff18 0, transparent 31%),
    linear-gradient(145deg, #070a0f 0%, #0c121a 48%, #101c2a 100%);
  overflow-x: hidden;
}

.display-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  background: repeating-linear-gradient(112deg, transparent 0 118px, #ffffff08 119px 120px);
  mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 80%, transparent);
}

.display-page .shell { width: min(1460px, calc(100% - 44px)); position: relative; }
.display-page .livebar {
  margin: 18px 0 14px;
  padding: 12px 18px;
  border: 1px solid #ffffff12;
  border-radius: 999px;
  background: #080c12b8;
  box-shadow: 0 15px 45px #0006;
  backdrop-filter: blur(16px);
}
.display-page .brand { font-size: .92rem; letter-spacing: .12em; }
.display-page #live { font-weight: 750; letter-spacing: .06em; }

.display-page #content {
  position: relative;
  padding: clamp(20px, 2.3vw, 34px);
  border: 1px solid #ffffff12;
  border-radius: 26px;
  background: linear-gradient(145deg, #0b1017e8, #121c29dc);
  box-shadow: 0 30px 90px #0008, inset 0 1px #ffffff0a;
  overflow: hidden;
}
.display-page #content::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--lime), #72ffbe 42%, var(--blue) 76%, transparent);
  box-shadow: 0 0 28px #c6ff4a88;
}
.display-page #content::after {
  content: "LIVE";
  position: absolute;
  right: -18px;
  bottom: -50px;
  color: #ffffff035;
  font-size: clamp(10rem, 24vw, 24rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.1em;
  pointer-events: none;
}
.display-page #content > * { position: relative; z-index: 1; }
.display-page .eyebrow { margin: 0; color: var(--lime); text-shadow: 0 0 24px #c6ff4a33; }
.display-page .event-title {
  width: fit-content;
  max-width: 1180px;
  margin: 14px 0 16px;
  font-size: clamp(2.8rem, 6vw, 6.4rem);
  line-height: .9;
  text-wrap: balance;
  text-shadow: 0 8px 32px #0008;
}
.display-page .event-meta { gap: 8px; }
.display-page .pill { background: #060a10a6; border-color: #ffffff16; color: #c8d2df; font-size: .82rem; }
.display-page .page-pill { color: var(--lime); border-color: #c6ff4a66; background: #c6ff4a0b; }

.display-page .race-clock {
  margin-top: 18px;
  padding: 13px 20px 15px;
  border-color: #c6ff4a69;
  background: linear-gradient(95deg, #c6ff4a13, #091018 56%, #53b8ff0c);
  box-shadow: inset 4px 0 var(--lime), 0 16px 40px #0004;
}
.display-page .race-clock strong {
  font-size: clamp(3.3rem, 6.5vw, 6.3rem);
  text-shadow: 0 0 36px #c6ff4a22;
}
.display-page .race-clock[data-status="running"] strong { animation: clock-glow 2s ease-in-out infinite; }
@keyframes clock-glow { 50% { color: var(--lime); text-shadow: 0 0 42px #c6ff4a44; } }

.display-page .results { border-collapse: separate; border-spacing: 0 7px; margin-top: 18px; }
.display-page .results th { padding: 5px 14px 7px; color: #8ea1b7; }
.display-page .results td {
  height: clamp(50px, 5.6vh, 68px);
  padding: 10px 14px;
  border-top: 1px solid #ffffff0c;
  border-bottom: 1px solid #0007;
  background: linear-gradient(90deg, #111925e8, #0e151fe8);
}
.display-page .results td:first-child { border-radius: 12px 0 0 12px; border-left: 3px solid #526174; }
.display-page .results td:last-child { border-radius: 0 12px 12px 0; }
.display-page .results td strong { font-weight: 820; letter-spacing: -.015em; }
.display-page .results td.team { color: #b6c2d0; font-size: clamp(.86rem, 1.5vw, 1.08rem); font-weight: 700; letter-spacing: .025em; }
.display-page .results .place { width: 76px; font-size: clamp(1.15rem, 2vw, 1.55rem); }
.display-page .results .time { font-size: clamp(1.08rem, 2.2vw, 1.55rem); color: #fff; }
.display-page .results tr.podium td { background: linear-gradient(90deg, #182116e8, #101821e8 72%); }
.display-page .results tr.place-1 td:first-child { border-left-color: #ffd64a; color: #ffd64a; }
.display-page .results tr.place-2 td:first-child { border-left-color: #c7d0db; color: #dce4ed; }
.display-page .results tr.place-3 td:first-child { border-left-color: #d28b50; color: #eaa76e; }
.display-page .results tr.result-status td { opacity: .78; }
.display-page .results tr.result-status td:first-child { border-left-color: var(--amber); color: var(--amber); }
.display-page .results tbody tr:hover td { background: linear-gradient(90deg, #1a2735, #111d2a); }
.display-page .livebar .brand span {
  display: inline-block;
  padding: 5px 10px;
  margin-left: 5px;
  border-radius: 999px;
  background: var(--lime);
  color: #071006;
  box-shadow: 0 0 24px #c6ff4a45;
}
.display-page .empty {
  margin-top: 14px;
  min-height: 68vh;
  display: grid;
  place-content: center;
  border: 1px solid #ffffff10;
  border-radius: 26px;
  background: linear-gradient(145deg, #0b1017d9, #121c29c9);
  box-shadow: 0 30px 90px #0007;
}
.display-page .empty[hidden] { display: none; }

/* Control room polish */
.control-page { background: radial-gradient(circle at 82% -8%, #2a415e 0, transparent 34%), #080b10; }
.control-page .shell { width: min(1320px, calc(100% - 40px)); }
.control-page .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-bottom: 18px;
  padding: 18px 0;
  background: #080b10d9;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #ffffff0c;
}
.control-page .control-title { font-size: clamp(2.5rem, 5vw, 4.6rem); letter-spacing: -.055em; margin-bottom: .7em; }
.control-page .card {
  border-color: #ffffff12;
  background: linear-gradient(145deg, #151b24f2, #111720ed);
  box-shadow: 0 18px 55px #0004, inset 0 1px #ffffff08;
}
.control-page .card:hover { border-color: #ffffff1e; }
.control-page input { height: 48px; background: #080c12; }
.control-page button { min-height: 44px; box-shadow: inset 0 -2px #0002; }
.control-page .details strong { font-size: 1.02rem; }
.control-page .event-row { background: #0b101777; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.control-page .event-row:hover { transform: translateY(-1px); border-color: #ffffff28; background: #121a25; }

@media (max-width: 760px) {
  .display-page .shell, .control-page .shell { width: min(100% - 18px, 1460px); }
  .display-page #content { padding: 18px 12px; border-radius: 18px; }
  .display-page .results { border-spacing: 0 5px; }
  .display-page .results td { padding: 9px 8px; }
  .display-page .event-title { font-size: clamp(2.45rem, 12vw, 4.8rem); }
}

@media (prefers-reduced-motion: reduce) {
  .display-page *, .control-page * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Stadium blue broadcast layout */
.display-page {
  background:
    radial-gradient(ellipse at 50% 115%, #147bd14a 0, transparent 48%),
    radial-gradient(circle at 12% 12%, #124a814f 0, transparent 30%),
    linear-gradient(155deg, #020711 0%, #061425 52%, #020812 100%);
}
.display-page::before {
  opacity: .34;
  background:
    linear-gradient(115deg, transparent 0 14%, #35a9ff0a 14.2% 14.5%, transparent 14.7% 84%, #35a9ff0a 84.2% 84.5%, transparent 84.7%),
    repeating-linear-gradient(0deg, transparent 0 54px, #ffffff055 55px 56px);
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}
.display-page .livebar { display: none; }
.display-page .shell {
  width: min(1180px, calc(100% - 34px));
  min-height: 100vh;
  display: grid;
  align-content: start;
  padding: 24px 0;
}
.display-page #viewLabel { display: none; }
.display-page #source { display: none; }
.display-page #content {
  padding: 0 18px 20px;
  border: 1px solid #36aaf78c;
  border-radius: 0;
  background: linear-gradient(160deg, #07396ae8 0%, #05294fe8 25%, #031a35f2 100%);
  box-shadow: 0 35px 110px #000c, 0 0 70px #168ee62b, inset 0 1px #7bd1ff7a;
  clip-path: polygon(3% 0, 97% 0, 100% 5.5%, 100% 100%, 0 100%, 0 5.5%);
}
.display-page #content::before {
  height: 100%;
  z-index: 0;
  background:
    linear-gradient(120deg, transparent 0 28%, #ffffff09 28.2% 29%, transparent 29.2% 67%, #ffffff07 67.2% 68%, transparent 68.2%),
    linear-gradient(90deg, #0878c9 0%, #075999 45%, #063965 100%);
  box-shadow: none;
  clip-path: polygon(0 0, 100% 0, 100% 19%, 0 19%);
}
.display-page #content::after { content: none; }
.display-page #content > * { z-index: 1; }
.display-page .event-title-box {
  display: flex;
  align-items: center;
  height: 158px;
  overflow: hidden;
  width: 100%;
}
.display-page .event-title {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 18px clamp(22px, 4vw, 54px) 15px;
  color: #fff;
  font-family: "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 5.2rem;
  line-height: .92;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-shadow: 0 4px 0 #00152c88, 0 10px 28px #0008;
}
.display-page .event-meta {
  min-height: 42px;
  margin: 0 10px 12px;
  padding: 7px 26px;
  align-items: center;
  border-radius: 4px;
  background: linear-gradient(90deg, #f8fbff 0%, #cbd9e7 70%, #7c99b5 100%);
  box-shadow: 0 3px 0 #02162b, inset 0 1px #fff;
}
.display-page .event-meta .pill {
  padding: 0;
  border: 0;
  background: transparent;
  color: #10273d;
  font-size: clamp(.8rem, 1.5vw, 1.08rem);
  font-style: italic;
  font-weight: 900;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.display-page .event-meta .pill + .pill::before { content: "•"; margin: 0 9px 0 2px; color: #36769e; }
.display-page .event-meta .page-pill { margin-left: auto; color: #073d69; }
.display-page .event-meta .page-pill[hidden] { display: none; }

.display-page .race-clock {
  margin: 0 10px 12px;
  padding: 10px 22px 13px;
  border: 1px solid #36aaf7aa;
  border-radius: 4px;
  background: linear-gradient(90deg, #062748, #031a31 65%, #082f50);
  box-shadow: inset 6px 0 #26aaf7, 0 4px 16px #0005;
}
.display-page .race-clock span { color: #76ccff; }
.display-page .race-clock strong { color: #fff; font-size: clamp(3rem, 6vw, 5.8rem); text-shadow: 0 0 28px #37b8ff66; }
.display-page .race-clock[data-status="running"] strong { animation: blue-clock-glow 2s ease-in-out infinite; }
@keyframes blue-clock-glow { 50% { text-shadow: 0 0 38px currentColor; } }

.display-page .results {
  width: calc(100% - 20px);
  margin: 0 10px;
  border-spacing: 0 4px;
}
.display-page .results th {
  height: 30px;
  padding: 3px 15px;
  color: #b8d8ed;
  font-size: .66rem;
}
.display-page .results td {
  height: clamp(47px, 5.35vh, 64px);
  padding: 7px 15px;
  border-top: 1px solid #2b87c8;
  border-bottom: 1px solid #00162e;
  background: linear-gradient(90deg, #07345f 0%, #05294e 42%, #031d3c 100%);
  box-shadow: inset 0 1px #ffffff08;
}
.display-page .results tbody tr:nth-child(even) td { background: linear-gradient(90deg, #0a3b6a, #062d54 42%, #032040); }
.display-page .results td:first-child {
  width: 76px;
  border-left: 5px solid #28b5ff;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(110deg, #1489d5, #0863aa) !important;
  color: #fff !important;
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  font-style: italic;
  text-align: center;
  text-shadow: 0 2px #00315d;
}
.display-page .results td:last-child { border-radius: 0 3px 3px 0; }
.display-page .results td strong {
  color: #fff;
  font-family: "Arial Narrow", "Segoe UI", sans-serif;
  font-size: clamp(1.05rem, 2.1vw, 1.6rem);
  font-style: italic;
  font-weight: 850;
  text-transform: uppercase;
  text-shadow: 0 2px #00152c;
}
.display-page .results td.team { color: #8ed2f8; }
.display-page .results .time { color: #fff; font-style: italic; text-shadow: 0 0 18px #46c0ff4d; }
.display-page .stadium-results {
  table-layout: fixed;
}
.display-page .stadium-results th:nth-child(1),
.display-page .stadium-results td:nth-child(1) { width: 8%; }
.display-page .stadium-results th:nth-child(2),
.display-page .stadium-results td:nth-child(2) { width: 11%; }
.display-page .stadium-results th:nth-child(3),
.display-page .stadium-results td:nth-child(3) { width: 39%; }
.display-page .stadium-results th:nth-child(4),
.display-page .stadium-results td:nth-child(4) { width: 24%; }
.display-page .stadium-results th:nth-child(5),
.display-page .stadium-results td:nth-child(5) { width: 18%; }
.display-page .stadium-results.start-list-mode th:nth-child(1),
.display-page .stadium-results.start-list-mode td:nth-child(1) { width: 12%; }
.display-page .stadium-results.start-list-mode th:nth-child(3),
.display-page .stadium-results.start-list-mode td:nth-child(3) { width: 45%; }
.display-page .stadium-results.start-list-mode th:nth-child(4),
.display-page .stadium-results.start-list-mode td:nth-child(4) { width: 25%; }
.display-page .stadium-results.relay-event:not(.start-list-mode) th:nth-child(1),
.display-page .stadium-results.relay-event:not(.start-list-mode) td:nth-child(1) { width: 9%; }
.display-page .stadium-results.relay-event:not(.start-list-mode) th:nth-child(2),
.display-page .stadium-results.relay-event:not(.start-list-mode) td:nth-child(2) { width: 12%; }
.display-page .stadium-results.relay-event:not(.start-list-mode) th:nth-child(3),
.display-page .stadium-results.relay-event:not(.start-list-mode) td:nth-child(3) { width: 61%; }
.display-page .stadium-results.relay-event.start-list-mode th:nth-child(1),
.display-page .stadium-results.relay-event.start-list-mode td:nth-child(1) { width: 14%; }
.display-page .stadium-results.relay-event.start-list-mode th:nth-child(3),
.display-page .stadium-results.relay-event.start-list-mode td:nth-child(3) { width: 68%; }
.display-page .results tr.podium td,
.display-page .results tr.result-status td { background: linear-gradient(90deg, #07345f 0%, #05294e 42%, #031d3c 100%); }
.display-page .results tr.place-1 td:first-child,
.display-page .results tr.place-2 td:first-child,
.display-page .results tr.place-3 td:first-child { border-left-color: #79d8ff; color: #fff; }
.display-page .stadium-results.start-list-mode th:nth-child(2),
.display-page .stadium-results.start-list-mode td:nth-child(2) { display: none; }
.display-page .stadium-results tr.empty-slot { visibility: hidden; }
.display-page .empty {
  min-height: 64vh;
  border-color: #208dcc72;
  border-radius: 0;
  background: linear-gradient(155deg, #07365fc7, #03162be8);
  clip-path: polygon(4% 0, 96% 0, 100% 9%, 100% 100%, 0 100%, 0 9%);
}
.display-page .empty .eyebrow { display: none; }

@media (max-width: 760px) {
  .display-page .shell { width: min(100% - 12px, 1180px); padding: 8px 0; }
  .display-page #content { padding: 0 7px 10px; clip-path: polygon(2% 0, 98% 0, 100% 2%, 100% 100%, 0 100%, 0 2%); }
  .display-page .event-title-box { height: 126px; }
  .display-page .event-title { padding-inline: 18px; }
  .display-page .event-meta, .display-page .race-clock, .display-page .results { margin-inline: 4px; }
  .display-page .results { width: calc(100% - 8px); }
}

/* Control localization and awards */
.section-gap { margin-top: 16px; }
.history-section { margin-bottom: 32px; }
.control-page .nav { align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.control-page .language-toggle { min-height: 36px; padding: 7px 13px; border-color: #53b8ff66; color: #9dd8ff; }
.control-page .brand span:first-child { color: var(--ink); }

.awards-page {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 105%, #0879c65c, transparent 44%),
    radial-gradient(circle at 14% 12%, #0b5a9545, transparent 28%),
    radial-gradient(circle at 86% 8%, #41320c42, transparent 25%),
    linear-gradient(155deg, #020711, #06182a 55%, #02070f);
}
.awards-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background:
    repeating-linear-gradient(118deg, transparent 0 138px, #5bc5ff0c 139px 141px),
    linear-gradient(to bottom, #ffffff05, transparent 30%);
}
.awards-shell { width: 1450px; height: 900px; margin: 0; padding: 28px 0; position: fixed; left: 50%; top: 50%; transform-origin: center center; }
#awardsContent { width: 100%; }
.awards-header { height: 270px; margin-bottom: 48px; padding: 20px 34px 18px; overflow: hidden; text-align: center; border: 1px solid #58c3ff61; clip-path: polygon(2.2% 0,97.8% 0,100% 16%,100% 100%,0 100%,0 16%); background: linear-gradient(120deg,#07588ee8,#0878bbec 48%,#064a7de8); box-shadow: 0 24px 65px #0008, inset 0 1px #ffffff2c; }
.awards-header > p { height: 18px; margin: 0 0 8px; color: #c6eaff; font-size: .76rem; font-weight: 900; letter-spacing: .3em; }
.awards-title-box { height: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.awards-header h1 { flex: 0 0 auto; width: max-content; max-width: none; margin: 0; color: #fff; font-family: "Arial Narrow", "Segoe UI", sans-serif; font-size: 99px; font-style: italic; font-weight: 950; line-height: .92; white-space: nowrap; text-transform: uppercase; text-shadow: 0 8px 34px #000b; }
.awards-header h2 { flex: 0 0 auto; max-width: 100%; margin: 8px 0 0; overflow: hidden; color: #d6edfa; font-size: clamp(.9rem, 1.8vw, 1.45rem); font-style: italic; font-weight: 650; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: clamp(14px, 2.5vw, 34px); perspective: 1200px; }
.medal-card {
  position: relative;
  min-height: 360px;
  padding: 72px 25px 30px;
  overflow: hidden;
  border: 1px solid #ffffff24;
  clip-path: polygon(9% 0, 91% 0, 100% 9%, 100% 100%, 0 100%, 0 9%);
  text-align: center;
  background: linear-gradient(155deg, #0d3152f0, #061a30f5 72%);
  box-shadow: 0 35px 80px #0009, inset 0 1px #ffffff1f;
  animation: awards-rise .65s cubic-bezier(.2,.8,.2,1) both;
}
.medal-card::before { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(120deg,transparent 20%,#ffffff0d 21%,transparent 38%); }
.medal-card.gold { min-height: 430px; padding-top: 88px; border-color: #ffe57b7a; background: linear-gradient(155deg, #493b12f0, #14243af5 65%); animation-delay: .08s; }
.medal-card.silver { border-color: #dfeaf47a; animation-delay: .18s; }
.medal-card.bronze { border-color: #e4a37070; background: linear-gradient(155deg, #3a2218ed, #102039f5 68%); animation-delay: .28s; }
.medal { position: absolute; top: 18px; left: 50%; width: 68px; height: 68px; transform: translateX(-50%); display: grid; place-items: center; border-radius: 50%; color: #201800; font-size: 2rem; font-weight: 950; box-shadow: 0 12px 30px #0008, inset 0 3px #fff8; }
.gold .medal { width: 82px; height: 82px; background: linear-gradient(145deg,#fff5a8,#f5bd27 55%,#8f5d00); box-shadow: 0 0 42px #ffd84d55, 0 14px 30px #0008, inset 0 3px #fff9; }
.silver .medal { background: linear-gradient(145deg,#fff,#b8c6d2 56%,#667583); }
.bronze .medal { background: linear-gradient(145deg,#ffd0a4,#bb6c32 56%,#653019); color:#271006; }
.winner-name { min-height: 2.1em; margin: 32px 0 8px; color: #fff; font-family: "Arial Narrow", "Segoe UI", sans-serif; font-size: clamp(1.55rem, 3vw, 2.8rem); font-style: italic; font-weight: 950; line-height: 1.02; text-transform: uppercase; text-shadow: 0 4px 16px #0009; }
.winner-team { min-height: 1.5em; margin: 0; color: #8dccf2; font-size: clamp(.9rem, 1.5vw, 1.15rem); font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.winner-mark { display: block; width: fit-content; margin: 28px auto 0; padding: 10px 20px; border-radius: 999px; background: #020a13b8; color: #fff; font-size: clamp(1.5rem, 3.3vw, 3rem); font-style: italic; font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1px #ffffff1c; }
.gold .winner-mark { color: #ffe479; box-shadow: inset 0 0 0 1px #ffd84d47, 0 0 28px #ffd84d17; }
.medal-card.pending-winner { opacity: .32; filter: grayscale(.7); }
.awards-empty { min-height: 65vh; display: grid; place-content: center; text-align: center; border: 1px solid #258ac46b; clip-path: polygon(4% 0,96% 0,100% 9%,100% 100%,0 100%,0 9%); background: linear-gradient(145deg,#07385fc9,#031428e8); }
.awards-empty[hidden], #awardsContent[hidden] { display: none; }
.awards-empty span { color: #78cfff; font-size: .72rem; font-weight: 900; letter-spacing: .24em; }
.awards-empty h1 { margin: 12px; font-size: clamp(2.2rem,5vw,5rem); font-style: italic; text-transform: uppercase; }
@keyframes awards-rise { from { opacity:0; transform:translateY(35px) rotateX(5deg); } to { opacity:1; transform:translateY(0) rotateX(0); } }

@media (max-width: 850px) {
  .control-page .topbar { align-items:flex-start; gap:14px; flex-direction:column; }
  .control-page .nav { justify-content:flex-start; }
}

/* Competition identity */
.branding-control { display:grid; grid-template-columns:minmax(240px,.65fr) minmax(420px,1.35fr); align-items:center; gap:28px; }
.branding-copy h2 { margin:.35rem 0; }
.branding-editor { min-width:0; }
.logo-editor { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:12px; }
.logo-scale-setting { display:grid; grid-template-columns:auto minmax(180px,1fr) 64px auto; align-items:center; gap:12px; margin-top:14px; }
.logo-scale-setting label { margin:0; white-space:nowrap; }
.logo-scale-setting input[type="range"] { width:100%; }
.logo-scale-setting strong { color:var(--lime); font-variant-numeric:tabular-nums; text-align:right; }
.logo-scale-help { margin:.45rem 0 0; }
.logo-preview { width:112px; height:72px; flex:0 0 112px; display:grid; place-items:center; overflow:hidden; border:1px solid #3c4b5d; border-radius:10px; background:#070b11; }
.logo-preview img { width:100%; height:100%; padding:6px; object-fit:contain; }
.logo-preview span { color:var(--muted); font-size:.75rem; }
.logo-preview.empty img { display:none; }
.file-button { min-height:44px; margin:0; display:inline-flex; align-items:center; padding:11px 16px; border:1px solid #44566b; border-radius:10px; color:#dcecff; background:#17202c; font-weight:800; cursor:pointer; }
.file-button:hover { border-color:#64c3ff; }
.file-button input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }

.competition-branding[hidden] { display:none !important; }
.display-page .competition-branding {
  height:72px; margin:0 0 10px; padding:8px 22px; display:flex; align-items:center; justify-content:center; gap:18px;
  overflow:visible; border:1px solid #36aaf76e; background:linear-gradient(90deg,#03182dd9,#07558ce8 48%,#03182dd9);
  box-shadow:0 12px 38px #0007, inset 0 1px #ffffff1c;
}
.display-page .competition-branding img { width:auto; max-width:var(--competition-logo-max-width,180px); height:var(--competition-logo-height,54px); flex:0 0 auto; object-fit:contain; }
.display-page .competition-branding strong { min-width:0; overflow:hidden; color:#fff; font-family:"Arial Narrow","Segoe UI",sans-serif; font-size:clamp(1.15rem,3vw,2.35rem); font-style:italic; font-weight:900; letter-spacing:.025em; line-height:1; text-align:center; text-overflow:ellipsis; text-transform:uppercase; white-space:nowrap; text-shadow:0 4px 18px #000a; }

.awards-branding { width:min(1100px,88%); height:38px; margin:0 auto 4px; display:flex; align-items:center; justify-content:center; gap:12px; overflow:visible; }
.awards-branding img { width:auto; max-width:var(--competition-logo-max-width,130px); height:var(--competition-logo-height,36px); flex:0 0 auto; object-fit:contain; }
.awards-branding strong { min-width:0; overflow:hidden; color:#eaf8ff; font-size:1.15rem; font-style:italic; font-weight:850; letter-spacing:.06em; text-overflow:ellipsis; text-transform:uppercase; white-space:nowrap; }

.control-tabs { position:sticky; top:0; z-index:20; display:flex; gap:8px; margin:0 0 18px; padding:8px; overflow-x:auto; border:1px solid #29506c; border-radius:14px; background:#071521ee; box-shadow:0 12px 30px #0005; backdrop-filter:blur(14px); }
.control-tabs .control-tab { flex:1 0 auto; min-width:120px; }
.control-tabs .control-tab.active { color:#06111b; background:linear-gradient(135deg,#63d1ff,#b8ff4a); box-shadow:0 5px 18px #49c8ff3b; }
.control-tab-panel[hidden] { display:none !important; }
.color-control { display:grid; grid-template-columns:minmax(230px,.7fr) minmax(420px,1.3fr); gap:24px; align-items:start; }
.color-control h2 { margin:.35em 0; }
.color-grid { display:grid; grid-template-columns:repeat(4,minmax(110px,1fr)); gap:12px; }
.color-grid label { margin:0; padding:12px; border:1px solid #2d4258; border-radius:12px; background:#081522; }
.color-grid label span { display:block; min-height:2em; margin-bottom:8px; color:#b9d8ed; }
.color-grid input[type="color"] { width:100%; height:48px; padding:4px; cursor:pointer; }
.color-actions { grid-column:2; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.color-actions .notice { margin:0; }
.field-help { display:block; margin-top:7px; color:#7fa3bc; font-size:.72rem; font-weight:500; line-height:1.35; }

.display-page .stadium-results th { color:var(--display-headers-color,#9cc4e6); }
.display-page .stadium-results td:nth-child(1) { color:var(--display-place-color,#fff) !important; }
.display-page .stadium-results.start-list-mode td:nth-child(1) { color:var(--display-lane-color,#b9ddf4) !important; }
.display-page .stadium-results td:nth-child(2) { color:var(--display-lane-color,#b9ddf4); }
.display-page .stadium-results td:nth-child(3),
.display-page .stadium-results td:nth-child(3) strong { color:var(--display-athlete-color,#fff); }
.display-page .stadium-results td:nth-child(4) { color:var(--display-team-color,#8ed2f8); }
.display-page .stadium-results td:nth-child(5) { color:var(--display-time-color,#fff); }
.display-page .race-clock strong,
.display-page .race-clock[data-status="stopped"] strong,
.display-page .race-clock[data-status="paused"] strong { color:var(--display-clock-color,#fff); }

@media(max-width:760px) {
  .control-tabs .control-tab { min-width:105px; }
  .color-control { grid-template-columns:1fr; }
  .color-grid { grid-template-columns:repeat(2,minmax(110px,1fr)); }
  .color-actions { grid-column:1; }
}

@media (max-width:850px) {
  .branding-control { grid-template-columns:1fr; gap:12px; }
  .logo-scale-setting { grid-template-columns:1fr 64px auto; }
  .logo-scale-setting label { grid-column:1/-1; }
  .display-page .competition-branding { height:58px; margin-bottom:6px; padding-inline:10px; }
  .display-page .competition-branding img { max-width:min(var(--competition-logo-max-width,110px),55vw); height:var(--competition-logo-height,42px); }
}
