:root {
  --bg: #07111f;
  --bg-soft: #0f1b31;
  --card: rgba(9, 16, 29, 0.9);
  --card-border: rgba(153, 180, 255, 0.18);
  --text: #eff4ff;
  --muted: #a7b7d3;
  --accent: #ff4f2e;
  --accent-2: #2bb7ff;
  --accent-3: #ffe21f;
  --danger: #ff8a80;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

@font-face {
  font-family: "Expressway";
  src: url("/assets/fonts/Expressway-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 79, 46, 0.12), transparent 24%),
    radial-gradient(circle at top right, rgba(43, 183, 255, 0.12), transparent 22%),
    radial-gradient(circle at bottom center, rgba(255, 226, 31, 0.06), transparent 18%),
    linear-gradient(160deg, #03070d, #0b1220 58%, #05070c);
}

.shell {
  min-height: 100vh;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  padding: 48px;
  align-items: center;
}

.shell.admin-unlocked {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
  margin: 0 auto;
}

.shell.page-result,
.shell.page-admin {
  grid-template-columns: minmax(0, 1fr);
  max-width: none;
  margin: 0;
}

.shell.page-home {
  max-width: 1280px;
  margin: 0 auto;
}

.result-page {
  grid-column: 1 / -1;
  min-height: 100vh;
  margin: -48px;
  background: #000;
  overflow: hidden;
}

.result-page-shell {
  width: 100%;
  display: grid;
  gap: 20px;
  justify-items: center;
  align-content: center;
}

.result-page {
  cursor: pointer;
}

.result-page-shell {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
}

.kiosk-entry {
  width: min(calc(100vw - 48px), 520px);
  position: fixed;
  left: 50%;
  bottom: clamp(18px, 4vh, 40px);
  transform: translateX(-50%);
  display: grid;
  gap: 14px;
  z-index: 2;
  margin-top: 0;
  background: rgba(9, 16, 29, 0.96);
}

.kiosk-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  z-index: 1;
}

.kiosk-entry-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  max-width: 640px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(140deg, rgba(255, 79, 46, 0.96), rgba(43, 183, 255, 0.92));
  color: #06101d;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent-3);
}

.hero .logo-mark {
  background: linear-gradient(140deg, rgba(255, 79, 46, 0.96), rgba(255, 226, 31, 0.92));
}

.hero .eyebrow {
  color: var(--accent-2);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-copy {
  max-width: 54ch;
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.auth-card {
  max-width: 560px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.muted {
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 16px;
}

.auth-card .stack {
  gap: 20px;
}

.auth-card .status {
  margin-top: 8px;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
button {
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 16px;
  padding: 16px 18px;
  outline: none;
}

input:focus {
  border-color: rgba(43, 183, 255, 0.78);
  box-shadow: 0 0 0 4px rgba(43, 183, 255, 0.14);
}

button {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 700;
  cursor: pointer;
  color: #06101d;
  background: linear-gradient(140deg, rgba(255, 79, 46, 0.96), rgba(255, 226, 31, 0.92));
}

button:hover {
  filter: brightness(1.05);
}

button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(43, 183, 255, 0.22);
}

button.ghost.danger {
  border-color: rgba(255, 138, 128, 0.32);
  color: var(--danger);
}

.password-toggle {
  min-width: 84px;
}

.admin-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-card .status {
  margin-top: 12px;
}

a.ghost.link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.status {
  min-height: 1.2em;
  color: var(--danger);
}

.status.error {
  color: var(--danger);
}

.status:not(.error) {
  color: var(--accent-3);
}

.result {
  margin-top: 24px;
  border-radius: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.helper-copy {
  margin-top: 8px;
}

.back-button,
.secondary-button {
  width: auto;
}

.runner-card {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  width: min(100%, 1360px);
  min-height: 780px;
  padding: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  column-gap: 48px;
  align-content: center;
  gap: 28px;
  background:
    radial-gradient(circle at top left, rgba(255, 79, 46, 0.24), transparent 28%),
    radial-gradient(circle at bottom right, rgba(43, 183, 255, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(7, 15, 56, 0.98), rgba(6, 16, 53, 0.98));
  border: 1px solid rgba(43, 183, 255, 0.24);
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.5);
}

.runner-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 4px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 79, 46, 0) 0%,
      rgba(43, 183, 255, 0.06) 26%,
      rgba(255, 226, 31, 1) 50%,
      rgba(43, 183, 255, 0.06) 74%,
      rgba(255, 79, 46, 0) 100%
    ) 0 0 / 320% 100%,
    linear-gradient(180deg, rgba(255, 79, 46, 0.98), rgba(43, 183, 255, 0.7));
  animation: border-sweep 5.5s linear infinite;
  filter: drop-shadow(0 0 24px rgba(43, 183, 255, 0.68));
  opacity: 1;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
}

.runner-card::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
  width: 260px;
  height: 260px;
  right: -80px;
  top: -90px;
  background: rgba(255, 226, 31, 0.13);
  filter: blur(8px);
}

.runner-card:focus-within {
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(43, 183, 255, 0.2);
}

.runner-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  z-index: 1;
}

.runner-copy {
  display: grid;
  gap: 22px;
  align-content: center;
  z-index: 1;
}

.runner-side {
  position: relative;
  display: grid;
  align-content: end;
  gap: 18px;
  min-height: 100%;
  padding: 16px 0 12px;
  z-index: 1;
}

.runner-side::before {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(43, 183, 255, 0.3), transparent);
}

.runner-side-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.82rem;
  color: rgba(255, 226, 31, 0.92);
}

.runner-side-title {
  margin: 0;
  max-width: 9ch;
  font-size: clamp(1.9rem, 3.8vw, 3.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  color: rgba(247, 251, 255, 0.82);
  font-weight: 800;
}

.runner-side-copy {
  margin: 0;
  max-width: 18ch;
  font-size: 1.15rem;
  line-height: 1.45;
  color: rgba(239, 244, 255, 0.82);
}

.runner-badge {
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: #08111e;
  background: linear-gradient(140deg, var(--accent), var(--accent-3));
}

.runner-distance {
  margin: 0;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--accent-2);
  z-index: 1;
}

.runner-name {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: #ffe870;
  z-index: 1;
}

.runner-number {
  z-index: 1;
  font-size: clamp(5.4rem, 12vw, 9rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.08em;
  color: #f7fbff;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.runner-note {
  z-index: 1;
  margin: -2px 0 0;
  max-width: 46ch;
  color: rgba(239, 244, 255, 0.82);
  font-size: 1.22rem;
  line-height: 1.45;
}

.runner-meta {
  z-index: 1;
  max-width: 28ch;
  margin-bottom: 0;
  color: rgba(239, 244, 255, 0.8);
  font-size: 1.03rem;
}

.runner-card.found {
  border-color: rgba(43, 183, 255, 0.34);
}

.runner-card.not-found {
  border-color: rgba(255, 138, 128, 0.34);
}

.runner-card.empty {
  border-color: rgba(255, 226, 31, 0.18);
}

.tv-board {
  position: relative;
  width: min(100%, 1560px);
  min-height: 100vh;
  padding: 0 clamp(30px, 5vw, 84px) 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  background: #000;
  color: #fff;
  overflow: hidden;
}

.tv-board::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 12%, rgba(255, 97, 0, 0.14), transparent 16%);
  pointer-events: none;
}

.tv-board > * {
  position: relative;
  z-index: 1;
}

.tv-board-top,
.tv-board-bottom {
  width: 100%;
  display: flex;
  justify-content: center;
}

.tv-board-top {
  align-items: flex-start;
  padding-top: clamp(4px, 1vh, 12px);
}

.tv-board-bottom {
  align-items: flex-end;
  padding-bottom: clamp(4px, 1vh, 12px);
}

.tv-logo {
  display: block;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.tv-logo-darklane {
  width: min(85.5vw, 765px);
  max-height: clamp(220px, 29.25vw, 328px);
  margin-top: 0;
}

.tv-logo-7k {
  width: min(70.875vw, 635px);
  max-height: clamp(216px, 27vw, 330px);
  margin-bottom: 0;
}

.tv-board-body {
  position: absolute;
  inset: 50% 0 auto;
  transform: translateY(-50%);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(10px, 2vh, 18px);
  width: 100%;
  padding: 0 clamp(24px, 4vw, 48px);
}

.tv-board-number {
  margin: 0;
  align-self: center;
  font-family: Expressway, "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(10.5rem, 25.5vw, 19.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.tv-board-number--empty {
  letter-spacing: 0;
  font-family: Expressway, "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(4rem, 10vw, 7rem);
}

.tv-board-name {
  margin: 0;
  font-family: Expressway, "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(3rem, 7.2vw, 6rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
}

@keyframes border-sweep {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 420% 0, 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .runner-card::before {
    animation: none;
  }
}

[v-cloak] {
  display: none;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .runner-card {
    min-height: auto;
    width: 100%;
    padding: 30px;
    grid-template-columns: 1fr;
  }

  .runner-side {
    padding-top: 4px;
  }

  .runner-side::before {
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
  }

  .runner-name {
    max-width: none;
  }

  .result-page {
    margin: -20px;
  }

  .tv-board {
    width: 100%;
    min-height: 100vh;
    padding: 0 14px 0;
  }

  .tv-logo-darklane {
    width: min(100vw, 630px);
  }

  .tv-logo-7k {
    width: min(100vw, 540px);
  }

  .tv-board-body {
    padding: 0 10px;
  }

  .tv-board-number {
    font-size: clamp(6.3rem, 31.5vw, 12rem);
    letter-spacing: -0.02em;
  }

  .tv-board-name {
    font-size: clamp(2rem, 9vw, 3.6rem);
  }

  .kiosk-entry {
    width: calc(100vw - 32px);
    bottom: 16px;
  }

  .card {
    border-radius: 22px;
  }

  h1 {
    font-size: clamp(2.6rem, 14vw, 4.4rem);
  }

  .kiosk-entry-actions {
    flex-direction: column;
  }
}
