@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Outfit:wght@500;600;700&display=swap");

:root {
  --ink: #243044;
  --ink-soft: #66758c;
  --paper: #f6f8fb;
  --paper-2: #eef2f7;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --line: rgba(36, 48, 68, 0.1);
  --field: #3d9b84;
  --field-2: #2a6f5f;
  --volt: #7ec8b3;
  --volt-soft: #d8f0e8;
  --signal: #e5736a;
  --sky: #5b8fd9;
  --good: #2f8f72;
  --warn: #c47a2a;
  --bad: #c94b57;
  --shadow: 0 14px 36px rgba(36, 48, 68, 0.07);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: Outfit, Nunito, system-ui, sans-serif;
  --body: Nunito, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(820px 380px at 90% -8%, rgba(126, 200, 179, 0.28), transparent 55%),
    radial-gradient(640px 340px at -8% 18%, rgba(91, 143, 217, 0.12), transparent 52%),
    linear-gradient(180deg, #fbfcfe 0%, var(--paper) 45%, #eef3f8 100%);
  min-height: 100%;
  line-height: 1.5;
  font-weight: 500;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(36, 48, 68, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 48, 68, 0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at 50% 18%, black, transparent 72%);
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

a { color: inherit; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.15;
}

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 22px 0 8px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display);
  font-size: 22px; font-weight: 700; text-decoration: none;
  letter-spacing: -0.02em;
}
.brand-text { line-height: 1.15; }
.brand-logo {
  display: block;
  width: auto;
  height: 36px;
  max-width: 140px;
  object-fit: contain;
}
.brand-logo-lg { height: 64px; max-width: 220px; }
.brand-logo-print { height: 28px; max-width: 120px; }
.brand-preview { align-items: center; gap: 16px; }
.brand-lockup {
  display: flex; align-items: center; gap: 14px;
}
.brand-lockup-name {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.brand-lockup-tag {
  margin-top: 2px;
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 600;
}
.brand-lockup-sm .brand-logo { height: 40px; max-width: 120px; }
.brand-lockup-sm .brand-lockup-name { font-size: 18px; }
.brand-lockup-md .brand-logo { height: 48px; max-width: 160px; }
.brand-lockup-md .brand-lockup-name { font-size: 22px; }
.brand-lockup-lg .brand-logo { height: 72px; max-width: 240px; }
.brand-lockup-lg .brand-lockup-name { font-size: 28px; }
.runner-hero-brand { margin-bottom: 16px; }
.runner-hero .brand-lockup-name,
.runner-hero .brand-lockup-tag { color: rgba(255,255,255,0.95); }
.runner-hero .brand-lockup-tag { opacity: 0.85; }
.side .brand-logo {
  height: 32px;
  max-width: 110px;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
}
.bib-a5-brand { font-weight: 700; font-size: 14px; }
.bib-a5-event {
  font-size: 14px; font-weight: 700; color: var(--ink-soft);
  margin-top: 4px;
}
.brand-oval {
  width: 34px; height: 22px; border: 2.5px solid var(--ink);
  border-radius: 999px; position: relative;
  background: linear-gradient(120deg, var(--volt), transparent 65%);
  animation: lap 4.5s var(--ease) infinite;
  flex: 0 0 auto;
}
.brand-oval::after {
  content: ""; position: absolute; width: 7px; height: 7px;
  background: var(--signal); border-radius: 50%; right: 4px; top: 4px;
  box-shadow: 0 0 0 0 rgba(229, 115, 106, 0.4);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes lap {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(3deg) translateY(-1px); }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(229, 115, 106, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(229, 115, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 115, 106, 0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 0.65s var(--ease) both; }
.rise-2 { animation: rise 0.65s var(--ease) 0.08s both; }
.rise-3 { animation: rise 0.65s var(--ease) 0.16s both; }

.nav-links { display: flex; gap: 18px; align-items: center; font-weight: 700; }
.nav-links a { text-decoration: none; opacity: 0.72; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }

.hero {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px;
  padding: 36px 0 64px; align-items: end;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px;
  font-weight: 800; color: var(--field); margin-bottom: 14px;
}
.hero h1 { font-size: clamp(40px, 6.5vw, 64px); max-width: 12ch; font-weight: 700; }
.lead { font-size: 18px; line-height: 1.55; color: var(--ink-soft); max-width: 36rem; margin: 16px 0 0; }

.panel, .card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

label { font-weight: 700; font-size: 13px; display: block; letter-spacing: 0.01em; }
input, select, textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--surface-solid);
  border-radius: 14px; padding: 12px 14px; color: var(--ink); margin-top: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--field);
  box-shadow: 0 0 0 4px rgba(61, 155, 132, 0.14);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; text-decoration: none; border-radius: 999px;
  padding: 12px 18px; font-weight: 700; letter-spacing: 0;
  transition: transform 0.18s var(--ease), filter 0.18s, background 0.18s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: #f7f9fc; }
.btn-accent { background: var(--signal); color: white; }
.btn-volt { background: var(--field); color: #fff; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); }
.btn-gold { background: #ffe08a; color: var(--ink); }

.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
  padding: 6px 12px; font-size: 12px; font-weight: 700; background: var(--paper-2);
}
.pill.live { background: var(--volt-soft); color: var(--good); }
.pill.frozen { background: #fff0d9; color: var(--warn); }
.pill.bad { background: #ffe4e7; color: var(--bad); }
.pill.volt { background: var(--volt-soft); color: var(--field-2); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }

.orga {
  display: grid;
  grid-template-columns: 268px 1fr;
  min-height: 100vh;
}
.admin-body {
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(126, 200, 179, 0.22), transparent 55%),
    radial-gradient(700px 380px at -5% 30%, rgba(91, 143, 217, 0.1), transparent 50%),
    linear-gradient(180deg, #fbfcfe 0%, var(--paper) 50%, #eef3f8 100%);
}
.side {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 22px 16px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side-brand { padding: 4px 8px 12px; }
.side-kicker {
  margin: 4px 10px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--field);
}
.side-user {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 6px 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--volt-soft);
  color: var(--field-2);
}
.side-user strong { display: block; font-size: 14px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  opacity: 0.78;
  transition: background 0.2s, opacity 0.2s, transform 0.2s, color 0.2s;
}
.nav-item:hover {
  background: rgba(61, 155, 132, 0.08);
  opacity: 1;
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(61, 155, 132, 0.16), rgba(91, 143, 217, 0.12));
  color: var(--field-2);
  opacity: 1;
  box-shadow: inset 0 0 0 1px rgba(61, 155, 132, 0.18);
}
.nav-item-logout {
  margin-top: 12px;
  border: 1.5px solid var(--line);
  opacity: 0.9;
}
.nav-icon { flex: 0 0 auto; opacity: 0.9; }
.main { padding: 28px 32px 48px; max-width: 1180px; }

.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
  padding: 22px 24px;
  border-radius: calc(var(--radius) + 2px);
  background:
    radial-gradient(480px 180px at 100% 0%, rgba(255,255,255,0.35), transparent 55%),
    linear-gradient(135deg, #3d9b84 0%, #4aa3c0 55%, #5b8fd9 100%);
  color: #fff;
  box-shadow: var(--shadow);
}
.page-hero .kicker { color: rgba(255,255,255,0.88); margin-bottom: 6px; }
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); color: #fff; }
.page-hero .muted { color: rgba(255,255,255,0.8); }
.page-hero .pill { background: rgba(255,255,255,0.18); color: #fff; }

.stat {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  transition: transform 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.stat:hover { transform: translateY(-2px); }
.stat b {
  display: block; font-family: var(--display);
  font-size: clamp(24px, 3.6vw, 30px); margin-top: 4px; font-weight: 700;
}
.stat .muted { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-with-icon { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--volt-soft);
  color: var(--field-2);
}
.stat-icon .icon { width: 22px; height: 22px; }

.link-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.link-tile {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
  min-height: 120px;
}
.link-tile:hover { transform: translateY(-2px); }
.link-tile-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--volt-soft); color: var(--field-2);
}
.link-tile strong { font-family: var(--display); font-size: 17px; }
.link-tile .small { word-break: break-all; opacity: 0.75; }

.action-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
}
.btn .icon { width: 18px; height: 18px; }

.login-shell {
  min-height: calc(100vh - 40px);
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(440px, 100%);
  padding: 28px;
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.login-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--field), #5b8fd9);
  color: #fff;
  margin-bottom: 14px;
}

.side .brand { color: var(--ink); }
.side .brand-oval { border-color: var(--ink); }
.side .brand-logo {
  height: 32px;
  max-width: 110px;
  background: transparent;
  border-radius: 8px;
  padding: 0;
}
.main { padding: 28px 32px 48px; }
.flash { padding: 14px 16px; border-radius: 14px; background: var(--volt-soft); color: var(--field-2); font-weight: 700; }
.flash.bad { background: #ffe4e7; color: var(--bad); }
.flash.warn { background: #fff0d9; color: var(--warn); }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  border: 1.5px solid var(--line); background: transparent; border-radius: 999px;
  padding: 9px 14px; cursor: pointer; font-weight: 700; text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.tab:hover { transform: translateY(-1px); }
.tab.on { background: var(--field); color: #fff; border-color: var(--field); }

/* Runner hub */
.runner-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(26px, 4.5vw, 42px);
  background:
    radial-gradient(520px 240px at 100% 0%, rgba(255,255,255,0.35), transparent 55%),
    linear-gradient(135deg, #3d9b84 0%, #4aa3c0 55%, #5b8fd9 100%);
  color: #fff;
  margin: 12px 0 28px;
  box-shadow: var(--shadow);
}
.runner-hero .kicker { color: rgba(255,255,255,0.88); }
.runner-hero h1 { font-size: clamp(36px, 7vw, 58px); max-width: none; font-weight: 700; }
.runner-hero .lead { color: rgba(255, 255, 255, 0.88); }
.runner-hero .btn-ghost {
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.bib-chip {
  display: inline-flex; align-items: baseline; gap: 10px;
  margin-top: 18px; padding: 10px 16px; border-radius: 16px;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.22);
}
.bib-chip strong {
  font-family: var(--display);
  font-size: 34px; letter-spacing: -0.02em; color: #fff; font-weight: 700;
}
.share-rail {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center;
  margin-top: 22px; padding: 16px; border-radius: 18px;
  background: rgba(255,255,255,0.16);
}
.share-rail img { border-radius: 12px; background: #fff; padding: 8px; }
.sponsor-list { display: flex; flex-direction: column; gap: 10px; }
.sponsor-item {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 15px 17px; border-radius: 16px;
  background: var(--surface-solid); border: 1px solid var(--line);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.sponsor-item:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.sponsor-item .amount {
  font-family: var(--display);
  font-size: 20px; font-weight: 700; letter-spacing: -0.01em;
}
.empty-state {
  padding: 28px; border-radius: 18px; text-align: center;
  border: 1.5px dashed var(--line); background: rgba(255,255,255,0.55);
}

.section-head {
  display: flex; justify-content: space-between; align-items: end; gap: 12px;
  margin: 8px 0 14px;
}
.section-head h2 { font-size: 26px; }

/* Station pages — light & calm */
.keypad-page {
  min-height: 100vh;
  background:
    radial-gradient(600px 280px at 80% -10%, rgba(126, 200, 179, 0.25), transparent 55%),
    linear-gradient(180deg, #f4f8f9 0%, #e8eef3 100%);
  color: var(--ink);
  padding: 16px;
}
.keypad-wrap { width: min(520px, 100%); margin: 0 auto; }
.bib-display {
  font-family: var(--display); font-size: 72px; line-height: 1;
  text-align: center; letter-spacing: 0.02em; min-height: 88px; font-weight: 700;
}
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.key {
  height: 70px; border: 0; border-radius: 16px; background: #fff;
  color: var(--ink); font-size: 26px; font-weight: 700;
  box-shadow: 0 1px 0 rgba(36,48,68,0.06), var(--shadow);
  transition: transform 0.12s;
}
.key:active { transform: scale(0.97); }
.key.ok { background: var(--field); color: #fff; }
.count-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 120px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: background 0.2s, border-color 0.2s;
}
.count-stage.is-ok {
  background: var(--volt-soft);
  border-color: transparent;
}
.count-stage.is-warn { background: #fff0d9; border-color: transparent; }
.count-stage.is-bad { background: #ffe4e7; border-color: transparent; }
.count-check {
  position: absolute;
  right: 18px;
  top: 14px;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--field);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  animation: rise 0.35s var(--ease) both;
}
.count-stage .bib-display { min-height: 88px; }
.feedback {
  min-height: 64px; border-radius: 18px; padding: 14px 16px;
  background: #fff; font-size: 22px; font-family: var(--display);
  font-weight: 600; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.feedback.good { background: var(--volt-soft); border-color: transparent; color: var(--field-2); }
.feedback.bad { background: #ffe4e7; border-color: transparent; color: var(--bad); }
.feedback.warn { background: #fff0d9; border-color: transparent; color: var(--warn); }
.keypad-page .btn-ghost { color: var(--ink); border-color: var(--line); }
.keypad-page .muted { color: var(--ink-soft); }
.keypad-page .tab { color: var(--ink); border-color: var(--line); background: #fff; }
.keypad-page .tab.on { background: var(--field); border-color: var(--field); color: #fff; }
.scan-field {
  width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 15px;
  background: #fff; color: var(--ink); font-size: 17px;
  box-shadow: var(--shadow);
}
.camera-box {
  border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
}
.camera-box[hidden] { display: none !important; }
.camera-box video {
  width: 100%; max-height: 220px; object-fit: cover;
  border-radius: 14px; background: #0f1a22;
  display: none;
}
.camera-box.is-live video { display: block; }
.assign-steps {
  margin: 0;
  padding-left: 1.2em;
  line-height: 1.45;
}
.assign-steps li + li { margin-top: 4px; }
.assign-person-card {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.assign-search-wrap { position: relative; }
.assign-suggest {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 6px);
  z-index: 20;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  max-height: 280px;
  overflow-y: auto;
}
.assign-suggest-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
}
.assign-suggest-item:hover,
.assign-suggest-item.is-active { background: var(--volt-soft); }
.assign-suggest-main { font-weight: 700; }
.assign-suggest-meta { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.assign-suggest-empty {
  padding: 14px;
  color: var(--ink-soft);
  font-size: 14px;
}
.assign-list { display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow: auto; }
.assign-row {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px;
}
.assign-row .btn { padding: 8px 12px; }
.assign-row-meta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.beamer {
  min-height: 100vh;
  background: linear-gradient(180deg, #f4f8f9 0%, #e7eef4 100%);
  color: var(--ink);
  padding: 28px;
}
.beamer .muted { color: var(--ink-soft); }
.beamer-section { margin-top: 28px; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.runner-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px; padding: 18px;
  box-shadow: var(--shadow);
  animation: rise 0.6s var(--ease) both;
}
.runner-card .laps {
  font-family: var(--display);
  font-size: 44px; color: var(--field); font-weight: 700;
}
.class-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.class-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.class-card.is-lead {
  border-color: var(--field);
  box-shadow: 0 0 0 2px rgba(61, 155, 132, 0.18), var(--shadow);
}
.class-card-rank {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  width: 36px; height: 36px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--volt-soft);
  color: var(--field-2);
}
.class-card.is-lead .class-card-rank {
  background: var(--field);
  color: #fff;
}
.class-card-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
}
.class-card-meta { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.class-card-stats { text-align: right; }
.class-card-stats .laps {
  font-family: var(--display);
  font-size: 36px; color: var(--field); font-weight: 700; line-height: 1;
}

.bib-sheet { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.bib-card {
  background: white; border: 2.5px solid var(--ink); border-radius: 14px;
  padding: 18px; min-height: 280px; display: flex; flex-direction: column; justify-content: space-between;
}
.bib-num {
  font-family: var(--display);
  font-size: 84px; line-height: 0.95; color: var(--field); font-weight: 700;
}

/* Print: Infobrief + A5-on-A4 Startnummern */
.print-docs { max-width: 820px; }
.print-page {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.print-half {
  position: relative;
  min-height: 360px;
  padding: 28px 28px 36px;
  box-sizing: border-box;
  background: #fff;
}
.print-cut {
  position: absolute;
  left: 16px; right: 16px; bottom: 10px;
  border-top: 1.5px dashed rgba(36, 48, 68, 0.28);
  padding-top: 6px;
  font-size: 11px;
  color: var(--ink-soft);
  text-align: center;
  letter-spacing: 0.04em;
}
.info-brief-head {
  display: flex; justify-content: space-between; gap: 16px; align-items: start;
  margin-bottom: 18px;
}
.info-brief-meta { text-align: right; font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.info-brief h2 {
  font-size: 28px; margin-bottom: 8px;
}
.info-brief-lead { color: var(--ink-soft); margin: 0 0 16px; max-width: 40rem; }
.info-brief-body {
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start;
}
.info-brief-copy ol,
.info-brief-steps { margin: 0 0 14px; padding-left: 1.2em; line-height: 1.45; font-size: 13.5px; }
.info-brief-steps li + li { margin-top: 6px; }
.info-brief-steps strong { color: var(--field-2); }
.info-brief-qr { text-align: center; }
.info-brief-qr img {
  display: block; border-radius: 12px; background: #fff;
  border: 1px solid var(--line); padding: 6px;
}
.info-brief-link {
  word-break: break-all; color: var(--ink-soft); margin: 8px 0 0;
}
.info-brief-code {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 10px 0 4px; padding: 10px 14px;
  border-radius: 12px; background: var(--volt-soft);
  font-size: 15px; font-weight: 700;
}
.teacher-slip-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--volt-soft);
  color: var(--field-2);
  font-size: 13px;
  font-weight: 800;
}
.teacher-slip .info-brief-code strong {
  letter-spacing: 0.12em;
}
.info-brief-code strong {
  font-family: var(--display);
  font-size: 28px; letter-spacing: 0.18em;
}
.access-code-input {
  font-family: var(--display);
  font-size: 28px; letter-spacing: 0.28em; text-align: center;
  font-weight: 700;
}
.access-code-display {
  font-family: var(--display);
  font-size: 22px; letter-spacing: 0.16em;
}
tr.is-editing { background: var(--volt-soft); }
.bib-a5 {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px; min-height: 380px; padding-bottom: 48px;
}
.bib-a5-top {
  width: 100%; display: flex; justify-content: space-between;
  font-size: 14px; font-weight: 700; color: var(--ink-soft);
}
.bib-a5-num {
  font-family: var(--display);
  font-size: clamp(96px, 22vw, 160px);
  line-height: 0.9; font-weight: 700; color: var(--ink);
  letter-spacing: -0.03em;
}
.bib-a5-name { font-size: 28px; margin-top: 4px; }
.bib-a5-name span { font-weight: 500; color: var(--ink-soft); }

.hidden-scan { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }

@media (max-width: 860px) {
  .hero, .grid-3, .grid-2, .orga, .bib-sheet, .share-rail, .info-brief-body, .link-tiles { grid-template-columns: 1fr; }
  .side {
    position: static;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .side-nav, .side { display: flex; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px; align-items: center; }
  .side { flex-wrap: wrap; }
  .side-nav { flex: 1 1 100%; }
  .nav-item { white-space: nowrap; }
  .side-kicker, .side-user { display: none; }
  .main { padding: 20px 16px; }
  .sponsor-item { grid-template-columns: 1fr; }
  .page-hero { flex-direction: column; align-items: start; }
}
@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body::before { display: none !important; }
  .no-print, .side, .flash { display: none !important; }
  .orga { display: block !important; }
  .main { padding: 0 !important; margin: 0 !important; }
  .print-docs { max-width: none; }
  .print-page {
    width: 210mm;
    height: 297mm;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    page-break-after: always;
    break-after: page;
    overflow: hidden;
    background: #fff;
  }
  .print-page:last-child { page-break-after: auto; break-after: auto; }
  .print-half {
    width: 210mm;
    height: 148.5mm;
    min-height: 0;
    padding: 12mm 14mm 10mm;
    overflow: hidden;
  }
  .bib-a5 { min-height: 0; height: 100%; padding-bottom: 12mm; }
  .bib-a5-num { font-size: 72mm; }
  .info-brief h2 { font-size: 22pt; }
  .info-brief-qr img { width: 38mm; height: 38mm; }
  .print-cut { font-size: 8pt; }
  .bib-card { break-inside: avoid; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
