
:root {
  --cream: #fbf7ed;
  --paper: #fffdf8;
  --ink: #173431;
  --muted: #6e7f7b;
  --line: #dce5df;
  --orange: #ed5a3e;
  --orange-dark: #c9452f;
  --yellow: #ffc841;
  --green: #54c84f;
  --sky: #58bff0;
  --brown: #753d25;
  --navy: #0d2928;
  --shadow: 0 22px 60px rgba(29, 68, 60, 0.12);
}

* { box-sizing: border-box; }

html { background: var(--cream); scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 215, 91, 0.18), transparent 28rem),
    var(--cream);
  color: var(--ink);
  font-family: "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  min-width: 320px;
}

button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(70, 188, 234, 0.4);
  outline-offset: 3px;
}

.access-gate { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 0.92fr) minmax(560px, 1.08fr); background: #fffaf0; overflow: hidden; }
.access-gate[hidden] { display: none; }
.access-gate-art { position: relative; min-height: 100vh; background: linear-gradient(155deg, #bff0df, #72cff4 55%, #ffe078); overflow: hidden; }
.access-gate-art::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.2) 1px, transparent 1px); background-size: 58px 58px; mask-image: linear-gradient(135deg, black, transparent 76%); }
.access-gate-art img { position: absolute; width: 140%; height: 100%; left: -20%; object-fit: cover; object-position: center; filter: saturate(1.08) drop-shadow(0 30px 40px rgba(23,52,49,0.2)); }
.access-gate-panel { width: min(690px, calc(100% - 72px)); margin: auto; padding: 55px 0; }
.access-logo { width: 76px; height: 76px; }
.access-gate-panel > span { display: block; margin-top: 18px; color: var(--orange); font-size: 10px; font-weight: 950; letter-spacing: 0.18em; }
.access-gate-panel > h1 { margin: 9px 0 10px; font-size: clamp(36px, 4vw, 58px); line-height: 1.08; letter-spacing: -0.04em; }
.access-gate-panel > p { margin: 0; color: var(--muted); font-size: 15px; }
.access-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 34px; }
.access-choices > button { min-height: 225px; padding: 25px; display: grid; align-content: start; text-align: left; border: 1px solid rgba(23,52,49,0.12); border-radius: 24px; background: white; cursor: pointer; box-shadow: 0 16px 35px rgba(23,52,49,0.08); transition: transform .2s, box-shadow .2s, border-color .2s; }
.access-choices > button:hover { transform: translateY(-5px); box-shadow: 0 24px 45px rgba(23,52,49,0.13); border-color: rgba(237,90,62,0.35); }
.access-choices i { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: #fff0c9; font-size: 25px; font-style: normal; }
.access-choices button:nth-child(2) i { background: #dff5ff; }
.access-choices strong { margin-top: 18px; font-size: 20px; }
.access-choices small { min-height: 42px; margin-top: 7px; color: #71827d; font-size: 11px; line-height: 1.6; }
.access-choices b { align-self: end; margin-top: 15px; color: var(--orange); font-size: 11px; }
.access-choices > .public-license-entry { grid-column: 1 / -1; min-height: 112px; grid-template-columns: 58px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 16px; padding: 19px 22px; background: linear-gradient(105deg, #fff8d8, #eaf9ff); border-color: rgba(237,90,62,0.2); }
.access-choices > .public-license-entry i { grid-row: 1 / 3; }
.access-choices > .public-license-entry strong { margin: 0; font-size: 19px; }
.access-choices > .public-license-entry small { min-height: 0; margin: 0; }
.access-choices > .public-license-entry b { grid-column: 3; grid-row: 1 / 3; align-self: center; margin: 0; white-space: nowrap; }
.control-login { margin-top: 18px; padding: 20px; display: grid; grid-template-columns: 1fr auto; gap: 12px; border-radius: 19px; background: var(--ink); color: white; }
.control-login[hidden] { display: none; }
.control-login label { display: grid; gap: 6px; }
.control-login label span { color: #b8cbc5; font-size: 9px; font-weight: 850; letter-spacing: 0.08em; }
.control-login input { min-width: 0; border: 1px solid rgba(255,255,255,0.18); border-radius: 11px; padding: 12px 14px; background: rgba(255,255,255,0.1); color: white; }
.control-login button { align-self: end; border: 0; border-radius: 11px; padding: 13px 18px; background: var(--yellow); font-size: 11px; font-weight: 900; cursor: pointer; }
.control-login p { grid-column: 1 / -1; margin: 0; color: #ff9c89; font-size: 10px; }
.access-switch { border: 0; background: transparent; cursor: pointer; }

.spectator-root { min-height: 100vh; background: #f6fbf7; }
.spectator-root[hidden] { display: none; }
.audience-topbar { min-height: 78px; padding: 12px clamp(18px, 4vw, 66px); display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 24px; background: rgba(255,255,255,0.92); border-bottom: 1px solid rgba(23,52,49,0.08); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.audience-topbar > div:first-child { display: flex; align-items: center; gap: 11px; }
.audience-topbar img { width: 48px; height: 48px; }
.audience-topbar span { display: grid; gap: 4px; }
.audience-topbar strong { color: var(--orange); font-size: 13px; letter-spacing: 0.11em; }
.audience-topbar small { font-size: 10px; font-weight: 800; color: var(--ink); }
.audience-sync { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; color: #55706a; font-size: 10px; font-weight: 850; }
.audience-sync i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px rgba(84,200,79,0.13); animation: soft-pulse 1.5s infinite; }
.audience-actions { display: flex; align-items: center; gap: 8px; }
.audience-actions button { border: 1px solid rgba(23,52,49,0.15); border-radius: 999px; padding: 10px 15px; background: white; font-size: 10px; font-weight: 850; cursor: pointer; }
.audience-actions .audience-license-button { border-color: var(--orange); background: var(--orange); color: white; box-shadow: 0 8px 20px rgba(237,90,62,0.22); }
.audience-page { width: min(1440px, calc(100% - 42px)); margin: 0 auto; padding: 28px 0 20px; }
.spectator-offline-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  color: #755019;
  background: #fff2bc;
  border: 1px solid #e4c96e;
  border-radius: 13px;
  font-size: 13px;
}
.spectator-offline-note span { color: #7c796e; }
.audience-live-stage { position: relative; isolation: isolate; overflow: hidden; min-height: 570px; padding: 26px 34px 34px; border-radius: 32px; background: linear-gradient(142deg, #edfff6, #dff5ff 48%, #fff1bd); box-shadow: 0 26px 70px rgba(32,91,80,0.14); border: 1px solid rgba(23,52,49,0.1); }
.audience-live-stage::before { content: ""; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(rgba(23,52,49,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(23,52,49,0.06) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(circle at center, black, transparent 75%); }
.audience-live-stage.urgent { background: linear-gradient(140deg, #fff0d1, #ffd9cf 48%, #ffe476); animation: final-bg-pulse .8s infinite alternate; }
.audience-live-stage.last-ten { box-shadow: 0 0 0 8px rgba(237,90,62,0.18), 0 28px 85px rgba(237,90,62,0.25); animation: arena-rumble .12s infinite; }
.audience-live-meta { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; }
.audience-live-meta > span { display: flex; align-items: center; gap: 8px; color: var(--orange); font-size: 10px; font-weight: 950; letter-spacing: 0.08em; }
.audience-live-meta > span i { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 6px rgba(237,90,62,0.12); }
.audience-live-meta > strong { text-align: center; font-size: 17px; }
.audience-live-meta > small { color: #6f817c; font-size: 9px; font-weight: 900; letter-spacing: 0.1em; }
.audience-clock { display: grid; place-items: center; margin: 16px 0 14px; }
.audience-clock small { color: #7b8b86; font-size: 9px; font-weight: 950; letter-spacing: 0.18em; }
.audience-clock strong { font-variant-numeric: tabular-nums; font-size: clamp(105px, 15vw, 205px); line-height: 0.95; letter-spacing: -0.08em; text-shadow: 0 12px 30px rgba(23,52,49,0.13); }
.audience-live-stage.urgent .audience-clock strong { color: var(--orange); animation: heartbeat .72s infinite; }
.audience-live-stage.last-ten .audience-clock strong { font-size: clamp(150px, 22vw, 290px); animation: final-second-slam .8s infinite; }
.audience-clock span { margin-top: 8px; color: #60736d; font-size: 11px; font-weight: 900; letter-spacing: 0.08em; }
.audience-versus { display: grid; grid-template-columns: 1fr 70px 1fr; align-items: stretch; gap: 12px; }
.audience-team { display: grid; grid-template-columns: minmax(130px, .7fr) 1.2fr auto; align-items: center; gap: 20px; min-height: 150px; padding: 20px 22px; border-radius: 23px; background: rgba(255,255,255,0.78); border-top: 5px solid var(--orange); box-shadow: 0 16px 30px rgba(23,52,49,0.08); }
.audience-team.side-1 { border-top-color: var(--sky); }
.audience-team-name small { color: var(--orange); font-size: 8px; font-weight: 950; letter-spacing: .12em; }
.audience-team.side-1 .audience-team-name small { color: #258ab8; }
.audience-team-name h2 { margin: 5px 0 0; font-size: clamp(20px, 2.3vw, 34px); }
.audience-roster { display: flex; justify-content: center; }
.audience-roster > div { display: grid; justify-items: center; gap: 4px; margin-left: -10px; }
.audience-roster img { width: 55px; height: 55px; object-fit: cover; border-radius: 50%; border: 4px solid white; box-shadow: 0 5px 12px rgba(23,52,49,.13); }
.audience-roster strong { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.audience-score { display: grid; justify-items: center; min-width: 82px; }
.audience-score span { color: #82918c; font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.audience-score strong { color: var(--orange); font-size: 70px; line-height: 1; }
.audience-team.side-1 .audience-score strong { color: #258ab8; }
.audience-vs-mark { display: grid; place-items: center; align-content: center; }
.audience-vs-mark span { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-size: 13px; font-weight: 950; }
.audience-vs-mark i { width: 1px; height: 32px; background: rgba(23,52,49,.18); }
.audience-champion { position: relative; overflow: hidden; min-height: 530px; padding: 70px 30px; display: grid; justify-items: center; align-content: center; text-align: center; border-radius: 32px; background: linear-gradient(135deg, #173431, #225c52); color: white; box-shadow: 0 28px 70px rgba(23,52,49,.22); }
.audience-champion > span { color: var(--yellow); font-size: 11px; font-weight: 950; letter-spacing: .16em; }
.audience-champion h1 { margin: 10px 0 25px; font-size: clamp(45px, 7vw, 92px); }
.audience-champion > div:not(.audience-confetti) { display: flex; gap: 16px; position: relative; z-index: 2; }
.audience-champion figure { margin: 0; }
.audience-champion figure img { width: 105px; height: 105px; object-fit: cover; border-radius: 50%; border: 6px solid var(--yellow); }
.audience-champion figure:nth-child(2) img { border-color: var(--sky); }
.audience-champion figure:nth-child(3) img { border-color: var(--green); }
.audience-champion figcaption { margin-top: 7px; font-size: 11px; font-weight: 850; }
.audience-champion p { color: #c8ddd6; }
.audience-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.audience-confetti i { position: absolute; top: -10%; left: var(--x); width: 10px; height: 17px; background: var(--confetti); animation: confetti-fall var(--duration) var(--delay) linear infinite; }
.audience-waiting { min-height: 500px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; overflow: hidden; border-radius: 32px; background: linear-gradient(135deg, #c7f2e2, #dff5ff); box-shadow: 0 24px 65px rgba(23,52,49,.13); }
.audience-waiting img { width: 100%; height: 500px; object-fit: cover; }
.audience-waiting > div { padding: 40px; }
.audience-waiting span, .audience-panel header span { color: var(--orange); font-size: 9px; font-weight: 950; letter-spacing: .15em; }
.audience-waiting h1 { margin: 8px 0 10px; font-size: clamp(38px, 5vw, 68px); line-height: 1.08; }
.audience-waiting p { color: #60746e; line-height: 1.8; }
.audience-dashboard { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; margin-top: 22px; }
.audience-dashboard > section:only-child { grid-column: 1 / -1; }
.audience-panel { overflow: hidden; border: 1px solid rgba(23,52,49,.1); border-radius: 24px; background: white; box-shadow: 0 15px 35px rgba(23,52,49,.07); }
.audience-panel > header { min-height: 76px; padding: 16px 21px; display: flex; justify-content: space-between; align-items: center; background: #fbfdfb; border-bottom: 1px solid rgba(23,52,49,.08); }
.audience-panel header h2 { margin: 4px 0 0; font-size: 20px; }
.audience-panel header > small { color: #70817c; font-size: 9px; font-weight: 850; }
.audience-ranking-list > div { min-height: 48px; padding: 8px 20px; display: grid; grid-template-columns: 32px 1fr repeat(4, auto); align-items: center; gap: 15px; border-bottom: 1px solid rgba(23,52,49,.07); font-size: 10px; }
.audience-ranking-list > div.final-zone { background: linear-gradient(90deg, rgba(255,200,65,.16), transparent); }
.audience-ranking-list b { color: var(--orange); }
.audience-ranking-list strong { font-size: 12px; }
.audience-ranking-list span { color: #71817c; }
.audience-ranking-list em { color: #368d47; font-style: normal; font-weight: 900; }
.audience-schedule > div > article { min-height: 72px; padding: 12px 20px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid rgba(23,52,49,.07); }
.audience-schedule article > b { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--cream); color: var(--orange); font-size: 9px; }
.audience-schedule article > div { display: grid; gap: 3px; }
.audience-schedule article small { color: #899691; font-size: 8px; font-weight: 900; }
.audience-schedule article strong { font-size: 11px; }
.audience-schedule article > span { color: #399b46; font-size: 8px; font-weight: 900; }
.audience-empty { padding: 34px; color: #82918c; text-align: center; font-size: 11px; }
.audience-footer { padding: 22px 8px 0; display: flex; justify-content: space-between; color: #83928d; font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.audience-footer strong { color: var(--orange); }

.app-shell { min-height: 100vh; }

.topbar {
  height: 86px;
  padding: 0 clamp(22px, 4vw, 68px);
  display: flex;
  align-items: center;
  gap: 34px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 247, 237, 0.92);
  border-bottom: 1px solid rgba(111, 85, 56, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  flex: 0 0 auto;
}
.brand img { width: 48px; height: 48px; object-fit: contain; }
.brand span { display: grid; line-height: 1; gap: 6px; }
.brand strong { font-size: 14px; letter-spacing: 0.13em; color: var(--orange); }
.brand small { font-size: 11px; font-weight: 750; letter-spacing: 0.08em; color: var(--ink); }

.topbar nav {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  gap: 2px;
}
.topbar nav button {
  border: 0;
  background: transparent;
  padding: 0 17px;
  font-size: 14px;
  font-weight: 760;
  color: #75827e;
  position: relative;
  cursor: pointer;
}
.topbar nav button::after {
  content: "";
  position: absolute;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--orange);
  left: 18px;
  right: 18px;
  bottom: 0;
  transform: scaleX(0);
  transition: transform 180ms ease;
}
.topbar nav button:hover, .topbar nav button.active { color: var(--ink); }
.topbar nav button.active::after { transform: scaleX(1); }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.save-state {
  font-size: 12px;
  font-weight: 750;
  color: #60756f;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.save-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(84, 200, 79, 0.13); }
.save-state.busy i { background: var(--yellow); animation: soft-pulse 0.8s infinite; }
.round-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  font-weight: 900;
}

.notice {
  position: fixed;
  z-index: 120;
  left: 50%;
  top: 98px;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  padding: 13px 15px 13px 18px;
  border-radius: 15px;
  background: var(--navy);
  color: white;
  box-shadow: 0 18px 50px rgba(11, 38, 36, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  animation: drop-in 220ms ease-out;
}
.notice button { border: 0; color: white; background: transparent; font-size: 21px; cursor: pointer; }

.page { width: min(1480px, calc(100% - clamp(26px, 7vw, 112px))); margin: 0 auto; }
.home-page { padding: 30px 0 70px; }
.inner-page { padding: 64px 0 90px; }

.hero {
  min-height: min(650px, calc(100vh - 130px));
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: #fff4c8;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 249, 226, 1) 2%, rgba(255, 249, 226, 0.96) 24%, rgba(255, 249, 226, 0.58) 45%, rgba(255, 249, 226, 0) 66%);
  z-index: -1;
}
.hero-copy { width: 50%; min-width: 610px; padding: 62px clamp(34px, 5vw, 82px); position: relative; z-index: 2; }
.eyebrow, .kicker {
  color: var(--orange);
  font-weight: 850;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 18px; height: 18px; border: 5px solid var(--yellow); border-radius: 50%; position: relative; }
.eyebrow span::after { content: ""; position: absolute; width: 5px; height: 5px; background: var(--orange); border-radius: 50%; inset: 2px; }
.hero h1 {
  font-size: clamp(58px, 5.3vw, 88px);
  line-height: 1.04;
  letter-spacing: -0.065em;
  margin: 26px 0 22px;
  color: var(--ink);
  font-weight: 900;
}
.hero-copy > p { width: min(520px, 100%); font-size: 17px; line-height: 1.85; color: #647771; margin: 0 0 32px; font-weight: 550; }
.hero-actions { display: flex; align-items: center; gap: 26px; }
.primary-button {
  border: 0;
  background: var(--orange);
  color: white;
  padding: 16px 22px;
  border-radius: 14px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(237, 90, 62, 0.24);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.primary-button:hover { transform: translateY(-2px); background: var(--orange-dark); box-shadow: 0 16px 28px rgba(237, 90, 62, 0.3); }
.primary-button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.primary-button span { margin-right: 7px; }
.primary-button.compact { padding: 13px 18px; }
.practice-button {
  border: 1px solid rgba(11, 52, 49, 0.14);
  background: var(--ink);
  color: white;
  padding: 15px 19px;
  border-radius: 14px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(9, 43, 41, 0.2);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.practice-button:hover { transform: translateY(-2px); background: #174d48; box-shadow: 0 16px 28px rgba(9, 43, 41, 0.26); }
.practice-button span { color: var(--yellow); margin-right: 7px; }
.text-button, .tiny-link { border: 0; background: transparent; font-weight: 820; cursor: pointer; color: var(--ink); }
.text-button { padding: 12px 0; }
.text-button span { color: var(--orange); margin-left: 4px; }
.tiny-link { color: #778783; font-size: 12px; }
.hero-stats { display: flex; gap: 36px; margin-top: 46px; }
.hero-stats div { display: grid; gap: 3px; }
.hero-stats strong { font-size: 26px; letter-spacing: -0.04em; }
.hero-stats span { font-size: 11px; color: #82918c; font-weight: 700; }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art > img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.live-chip {
  position: absolute;
  top: 28px;
  right: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--ink);
  backdrop-filter: blur(9px);
}
.live-chip span { display: inline-block; width: 7px; height: 7px; background: var(--orange); border-radius: 50%; margin-right: 6px; animation: soft-pulse 1.2s infinite; }
.match-chip {
  position: absolute;
  right: 34px;
  bottom: 32px;
  width: 245px;
  padding: 17px 18px;
  background: rgba(10, 42, 40, 0.91);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: white;
  border-radius: 18px;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px rgba(10, 42, 40, 0.25);
}
.match-chip small { display: block; font-size: 9px; letter-spacing: 0.16em; color: #b5cbc5; }
.match-chip strong { display: block; font-size: 14px; margin-top: 7px; padding-right: 56px; }
.match-chip > span { position: absolute; right: 18px; bottom: 17px; font-weight: 900; color: var(--yellow); font-size: 23px; }

.event-session-bar { margin-top: 24px; min-height: 102px; display: grid; grid-template-columns: auto minmax(260px, 1fr) auto auto; align-items: center; gap: 18px; padding: 18px 20px; border: 1px solid rgba(23,52,49,.1); border-radius: 24px; background: linear-gradient(105deg, #ffffff, #fff9e3 56%, #ecfaf7); box-shadow: 0 13px 40px rgba(29,68,60,.07); }
.event-session-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: var(--ink); font-size: 28px; box-shadow: 0 10px 24px rgba(23,52,49,.18); }
.event-session-bar > div:nth-child(2) { display: grid; gap: 4px; }
.event-session-bar > div:nth-child(2) small { color: var(--orange); font-size: 9px; font-weight: 950; letter-spacing: .14em; }
.event-session-bar > div:nth-child(2) strong { font-size: 19px; letter-spacing: -.025em; }
.event-session-bar > div:nth-child(2) span { color: #71837e; font-size: 10px; font-weight: 750; }
.event-vault-status { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid rgba(23,52,49,.09); border-radius: 16px; background: rgba(255,255,255,.75); }
.event-vault-status > i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: #fff0c9; font-style: normal; }
.event-vault-status > span { display: grid; gap: 2px; color: var(--ink); font-size: 11px; font-weight: 850; }
.event-vault-status b { color: var(--orange); font-size: 17px; }
.event-vault-status small { color: #7d8e89; font-size: 8px; }
.new-event-button { min-height: 46px; border: 1px solid var(--ink); border-radius: 14px; padding: 0 18px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 900; cursor: pointer; box-shadow: 0 10px 22px rgba(23,52,49,.16); }
.new-event-button:hover { background: #21534e; transform: translateY(-1px); }

.command-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 22px; margin-top: 24px; }
.checkin-panel, .flow-panel { background: var(--paper); border: 1px solid rgba(29, 76, 68, 0.09); border-radius: 26px; padding: 28px 30px; box-shadow: 0 13px 40px rgba(29, 68, 60, 0.07); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.section-heading h2, .flow-panel h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -0.035em; }
.lookup-form { margin-top: 24px; }
.lookup-form > label { display: block; font-size: 11px; color: #748680; font-weight: 750; margin-bottom: 8px; }
.lookup-form > div { display: grid; grid-template-columns: 50px 1fr auto; border: 1px solid #ccd9d3; border-radius: 14px; overflow: hidden; background: #fff; padding: 5px; }
.lookup-form span { display: grid; place-items: center; border-radius: 9px; background: #f2f5f1; color: var(--orange); font-weight: 900; font-size: 12px; }
.lookup-form input { border: 0; min-width: 0; padding: 10px 13px; font-weight: 750; letter-spacing: 0.06em; background: transparent; }
.lookup-form input:focus { outline: 0; }
.lookup-form button { border: 0; border-radius: 10px; background: var(--ink); color: white; font-weight: 800; padding: 0 18px; cursor: pointer; }
.recent-pilots { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.recent-pilots > p { margin: 0; font-size: 11px; color: #83908c; font-weight: 750; }
.avatar-row { display: flex; align-items: center; }
.avatar-row button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid white; overflow: hidden; padding: 0; margin-left: -7px; background: white; cursor: pointer; box-shadow: 0 2px 7px rgba(23, 52, 49, 0.12); }
.avatar-row button:first-child { margin-left: 0; }
.avatar-row img { width: 100%; height: 100%; object-fit: cover; }
.empty-inline { font-size: 12px; color: #93a09b; }
.flow-panel { position: relative; overflow: hidden; }
.flow-panel::after { content: ""; width: 115px; height: 115px; border: 26px solid rgba(255, 200, 65, 0.12); border-radius: 50%; position: absolute; right: -33px; top: -30px; }
.flow-list { list-style: none; padding: 0; margin: 22px 0 0; }
.flow-list li { position: relative; display: grid; grid-template-columns: 38px 1fr 14px; align-items: center; gap: 12px; padding: 10px 0; }
.flow-list li > span { font-size: 11px; color: #a2aca8; font-weight: 900; }
.flow-list li > div { display: grid; gap: 3px; }
.flow-list strong { font-size: 13px; }
.flow-list small { font-size: 10px; color: #94a09c; }
.flow-list i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #cad4d0; }
.flow-list li.done i { background: var(--green); border-color: var(--green); }
.flow-list li.current i { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 0 5px rgba(255, 200, 65, 0.16); }

.page-title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; padding-bottom: 30px; border-bottom: 1px solid rgba(23, 52, 49, 0.12); }
.page-title-row h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -0.055em; margin: 13px 0 14px; }
.page-title-row p { margin: 0; color: #6f827c; line-height: 1.7; max-width: 690px; font-size: 15px; }

.license-form {
  display: grid;
  grid-template-columns: 230px minmax(320px, 1fr) 320px;
  gap: 28px;
  margin: 30px 0;
  padding: 28px;
  border-radius: 26px;
  background: var(--ink);
  color: white;
  box-shadow: 0 22px 55px rgba(19, 52, 48, 0.2);
}
.photo-drop { border: 2px dashed rgba(255,255,255,0.3); border-radius: 18px; min-height: 225px; cursor: pointer; overflow: hidden; display: grid; place-items: center; }
.photo-drop input { display: none; }
.photo-drop > img { width: 100%; height: 100%; object-fit: cover; }
.photo-drop > div { display: grid; text-align: center; gap: 8px; padding: 20px; }
.photo-drop strong { font-size: 14px; }
.photo-drop span { color: #b9cbc6; font-size: 11px; }
.form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; }
.form-fields label { display: grid; gap: 7px; }
.form-fields label > span { font-size: 10px; color: #bcd0ca; font-weight: 750; }
.form-fields input, .form-fields select { width: 100%; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.08); color: white; padding: 11px 12px; border-radius: 10px; }
.form-fields input::placeholder { color: #8fa59f; }
.form-fields select option { color: var(--ink); }
.form-hint { grid-column: 1 / -1; font-size: 10px; color: #9fb4ae; margin: 1px 0; }
.form-fields .primary-button { justify-self: start; }
.mini-license { border-radius: 19px; background: #fff6cf; color: var(--ink); min-height: 205px; padding: 17px; position: relative; overflow: hidden; display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; box-shadow: 0 12px 28px rgba(0,0,0,0.14); }
.mini-license::before { content: ""; width: 190px; height: 190px; border: 34px solid rgba(237,90,62,0.16); border-radius: 50%; position: absolute; right: -100px; bottom: -100px; }
.mini-logo { position: absolute; width: 38px; height: 38px; right: 13px; top: 12px; }
.mini-photo { width: 92px; height: 118px; border-radius: 15px; overflow: hidden; background: #e9debd; display: grid; place-items: center; color: #a59472; font-size: 11px; position: relative; }
.mini-photo img { width: 100%; height: 100%; object-fit: cover; }
.mini-license > div:last-child { display: grid; gap: 7px; position: relative; }
.mini-license small { font-size: 8px; letter-spacing: 0.12em; color: var(--orange); font-weight: 900; }
.mini-license strong { font-size: 20px; }
.mini-license div > span { font-size: 11px; font-weight: 850; letter-spacing: 0.04em; }

.list-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 18px; gap: 16px; }
.list-toolbar > span { font-size: 12px; color: #84928e; font-weight: 750; }
.search-field { width: min(480px, 100%); display: flex; align-items: center; gap: 8px; border: 1px solid #d3ddd8; background: rgba(255,255,255,0.68); border-radius: 12px; padding: 0 13px; }
.search-field > span { color: #8c9a96; font-size: 19px; }
.search-field input { flex: 1; border: 0; background: transparent; padding: 12px 5px; min-width: 0; }
.search-field input:focus { outline: 0; }
.pilot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.pilot-card { background: var(--paper); border: 1px solid rgba(23,52,49,0.1); border-radius: 20px; padding: 18px; display: grid; gap: 15px; transition: transform 160ms ease, box-shadow 160ms ease; }
.pilot-card:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(23,52,49,0.1); }
.pilot-main { border: 0; background: transparent; display: grid; grid-template-columns: 72px 1fr; gap: 14px; text-align: left; padding: 0; cursor: pointer; min-width: 0; }
.pilot-main > img { width: 72px; height: 82px; border-radius: 15px; object-fit: cover; }
.pilot-main > div { min-width: 0; }
.license-number { color: var(--orange); font-size: 9px; letter-spacing: 0.08em; font-weight: 850; }
.pilot-main h3 { font-size: 18px; margin: 7px 0 4px; }
.pilot-main p { margin: 0; color: #80908b; font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pilot-meta { display: flex; justify-content: space-between; font-size: 10px; color: #87958f; padding-top: 12px; border-top: 1px solid #edf0ed; }
.outline-button, .checked-button { border-radius: 11px; padding: 10px 12px; font-weight: 800; font-size: 12px; cursor: pointer; }
.outline-button { border: 1px solid #c9d5d0; background: white; }
.outline-button:hover { border-color: var(--orange); color: var(--orange); }
.danger-button { border: 1px solid rgba(201,55,42,0.3); border-radius: 11px; padding: 10px 12px; background: rgba(201,55,42,0.08); color: #b73228; font-size: 12px; font-weight: 900; cursor: pointer; }
.danger-button:hover { border-color: #c9372a; background: #c9372a; color: white; }
.danger-button:disabled { opacity: 0.55; cursor: wait; }
.checked-button { border: 1px solid rgba(84,200,79,0.25); background: rgba(84,200,79,0.1); color: #32933a; }
.empty-state { grid-column: 1 / -1; min-height: 330px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state img { width: 94px; height: 94px; border-radius: 50%; object-fit: cover; margin-bottom: 14px; }
.empty-state h3 { margin: 0 0 7px; }
.empty-state p { margin: 0; color: #81908c; font-size: 13px; }

.draw-summary { display: grid; grid-template-columns: 1fr 1fr 1.35fr; margin: 28px 0; background: white; border: 1px solid rgba(23,52,49,0.1); border-radius: 18px; overflow: hidden; }
.draw-summary > div { padding: 20px 24px; border-right: 1px solid #e8ece9; display: flex; align-items: center; gap: 12px; }
.draw-summary strong { font-size: 31px; letter-spacing: -0.05em; }
.draw-summary span { font-size: 11px; color: #778984; font-weight: 700; }
.draw-summary > div:last-child { border: 0; font-size: 13px; font-weight: 800; justify-content: center; }
.draw-summary i { width: 9px; height: 9px; border-radius: 50%; }
.draw-summary .ready { color: #318a3b; background: rgba(84,200,79,0.07); }
.draw-summary .ready i { background: var(--green); box-shadow: 0 0 0 5px rgba(84,200,79,0.13); }
.draw-summary .waiting { color: #a77520; background: rgba(255,200,65,0.1); }
.draw-summary .waiting i { background: var(--yellow); }
.groups-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 19px; }
.group-card { background: white; border-radius: 23px; border: 1px solid rgba(23,52,49,0.11); overflow: hidden; box-shadow: 0 12px 32px rgba(23,52,49,0.07); }
.group-card > header { padding: 20px 21px; display: flex; justify-content: space-between; align-items: center; color: white; }
.group-card > header span { font-size: 22px; font-weight: 900; }
.group-card > header small { font-size: 9px; letter-spacing: 0.12em; font-weight: 800; opacity: 0.75; }
.group-0 > header { background: var(--orange); }
.group-1 > header { background: #36a7d9; }
.group-2 > header { background: #50af47; }
.group-3 > header { background: #a56aca; }
.group-pilots { padding: 8px 20px; }
.group-pilots > div { display: grid; grid-template-columns: 25px 48px 1fr auto; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid #edf0ed; }
.group-pilots > div:last-child { border: 0; }
.seed { font-size: 10px; color: #9ba6a2; font-weight: 900; }
.group-pilots img { width: 48px; height: 48px; object-fit: cover; border-radius: 13px; }
.group-pilots div > div { display: grid; gap: 3px; min-width: 0; }
.group-pilots strong { font-size: 13px; }
.group-pilots small { font-size: 9px; color: #8b9894; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-pilots b { font-size: 9px; color: #78908a; background: #f1f4f1; padding: 5px 7px; border-radius: 999px; }
.group-card > button { width: 100%; border: 0; border-top: 1px solid #edf0ed; background: #fbfcfa; padding: 14px; font-size: 11px; font-weight: 850; cursor: pointer; }
.group-card > button:hover { background: var(--ink); color: white; }
.waiting-board { min-height: 410px; display: grid; place-items: center; align-content: center; text-align: center; padding: 40px; }
.waiting-board h2 { margin: 22px 0 8px; font-size: 25px; }
.waiting-board p { max-width: 460px; margin: 0 0 22px; color: #7e8e89; line-height: 1.65; font-size: 13px; }
.draw-orbit { width: 130px; height: 130px; position: relative; display: grid; place-items: center; }
.draw-orbit::before { content: ""; position: absolute; inset: 0; border: 2px dashed rgba(237,90,62,0.35); border-radius: 50%; animation: orbit 10s linear infinite; }
.draw-orbit img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; position: relative; z-index: 2; }
.draw-orbit span { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); top: 3px; left: 50%; }
.draw-orbit span:nth-of-type(2) { background: var(--sky); top: 80%; left: 9%; }
.draw-orbit span:nth-of-type(3) { background: var(--green); top: 65%; left: 92%; }

.match-rule { flex: 0 0 auto; display: grid; text-align: right; }
.match-rule strong { color: var(--orange); font-size: 31px; letter-spacing: -0.04em; }
.match-rule span { color: #82918d; font-size: 10px; font-weight: 800; }
.champion-banner { margin: 27px 0; min-height: 160px; display: flex; align-items: center; justify-content: center; gap: 23px; background: linear-gradient(105deg, #183f3b, #0a2826); color: white; border-radius: 24px; overflow: hidden; position: relative; }
.champion-banner::before, .champion-banner::after { content: ""; position: absolute; width: 180px; height: 180px; border: 35px solid rgba(255,200,65,0.1); border-radius: 50%; }
.champion-banner::before { left: -70px; top: -80px; }
.champion-banner::after { right: -50px; bottom: -110px; }
.champion-banner > img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 6px solid var(--yellow); position: relative; z-index: 2; }
.champion-team-avatars { display: flex; position: relative; z-index: 2; padding-left: 24px; }
.champion-team-avatars img { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; border: 5px solid var(--yellow); margin-left: -24px; background: white; }
.champion-team-avatars img:nth-child(2) { border-color: var(--sky); }
.champion-team-avatars img:nth-child(3) { border-color: var(--green); }
.champion-banner > div:last-child { position: relative; z-index: 2; }
.champion-banner span { color: var(--yellow); letter-spacing: 0.16em; font-size: 9px; font-weight: 900; }
.champion-banner h2 { margin: 5px 0 2px; font-size: 33px; }
.champion-banner p { margin: 0; color: #bdd0ca; }
.trophy-orbit { font-size: 34px; color: var(--yellow); }
.swiss-standings { margin-top: 28px; overflow: hidden; border: 1px solid rgba(23,52,49,0.11); border-radius: 22px; background: rgba(255,255,255,0.72); box-shadow: 0 16px 38px rgba(31,75,68,0.08); }
.swiss-standings > header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 16px; background: linear-gradient(112deg, rgba(255,200,65,0.18), rgba(88,191,240,0.12)); }
.swiss-standings > header span { color: var(--orange); font-size: 9px; font-weight: 950; letter-spacing: 0.16em; }
.swiss-standings > header h2 { margin: 4px 0 0; font-size: 22px; }
.swiss-standings > header > strong { padding: 9px 13px; border-radius: 999px; background: var(--ink); color: white; font-size: 10px; letter-spacing: 0.1em; }
.standings-head, .standings-row { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(4, 82px); align-items: center; gap: 8px; padding: 0 24px; }
.standings-head { min-height: 38px; color: #8a9994; font-size: 8px; font-weight: 900; letter-spacing: 0.08em; border-top: 1px solid rgba(23,52,49,0.07); border-bottom: 1px solid rgba(23,52,49,0.07); }
.standings-head span:not(:first-child), .standings-row > span { text-align: center; }
.standings-list { display: grid; }
.standings-row { min-height: 52px; border-bottom: 1px solid rgba(23,52,49,0.07); font-size: 11px; }
.standings-row.final-zone { background: linear-gradient(90deg, rgba(255,200,65,0.12), transparent 52%); }
.standings-row > div { display: flex; align-items: center; min-width: 0; }
.standings-row > div > b { width: 30px; color: var(--orange); font-size: 10px; }
.standings-row > div > strong { font-size: 13px; }
.standings-row > div > em { margin-left: 9px; padding: 4px 7px; border-radius: 999px; background: rgba(84,200,79,0.13); color: #32953a; font-size: 7px; font-style: normal; font-weight: 950; letter-spacing: 0.06em; }
.standings-row > span { font-weight: 850; color: #61716c; }
.standings-row > span.wins { color: var(--orange); font-size: 14px; }
.standings-row > span.positive { color: #2f9e45; }
.standings-row > span.negative { color: #d75a43; }
.swiss-standings > footer { padding: 11px 24px 13px; color: #82918c; font-size: 9px; font-weight: 750; text-align: right; background: rgba(245,249,246,0.8); }
.bracket-layout { display: grid; grid-template-columns: 1fr 85px 1fr; gap: 18px; margin-top: 30px; align-items: center; }
.bracket-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.bracket-heading span { font-weight: 900; font-size: 14px; }
.bracket-heading small { font-size: 9px; color: #8d9a96; letter-spacing: 0.1em; }
.match-list { display: grid; gap: 12px; }
.match-row { display: grid; grid-template-columns: 45px 1fr 140px auto; align-items: center; gap: 14px; padding: 15px; background: white; border: 1px solid rgba(23,52,49,0.1); border-radius: 17px; }
.match-row.complete { background: #f6faf5; border-color: rgba(84,200,79,0.25); }
.match-index { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: var(--cream); font-size: 10px; font-weight: 900; color: var(--orange); }
.match-info { display: grid; gap: 3px; min-width: 0; }
.match-info > small, .match-status small { font-size: 8px; color: #94a09c; font-weight: 900; letter-spacing: 0.1em; }
.match-info > strong { font-size: 13px; }
.mini-avatars { display: flex; margin-top: 4px; }
.mini-avatars img { width: 24px; height: 24px; object-fit: cover; border-radius: 50%; border: 2px solid white; margin-left: -5px; }
.mini-avatars img:first-child { margin-left: 0; }
.match-team-pair { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.match-mini-team { display: flex; align-items: center; gap: 5px; position: relative; }
.match-mini-team > b { font-size: 8px; color: var(--orange); white-space: nowrap; }
.match-mini-team:nth-child(2) > b { color: #2388b6; }
.match-mini-team .mini-avatars { margin: 0; }
.match-mini-team em { margin-left: 4px; color: #91a09b; font-size: 7px; font-style: normal; font-weight: 950; }
.match-status { display: grid; gap: 3px; }
.match-status strong { font-size: 10px; line-height: 1.35; }
.match-row > button { border: 0; border-radius: 10px; background: var(--ink); color: white; padding: 10px 12px; font-size: 10px; font-weight: 850; cursor: pointer; }
.match-row > button:disabled { background: transparent; color: #49a44c; border: 1px solid rgba(84,200,79,0.3); }
.bracket-path { height: 200px; position: relative; display: grid; place-items: center; }
.bracket-path span { position: absolute; left: 0; right: 50%; border-top: 1px solid #bdc9c4; }
.bracket-path span:first-child { top: 25%; }
.bracket-path span:last-child { bottom: 25%; }
.bracket-path i { position: absolute; width: 50%; right: 0; border-top: 1px solid #bdc9c4; }
.bracket-path::before { content: ""; position: absolute; top: 25%; bottom: 25%; left: 50%; border-left: 1px solid #bdc9c4; }
.locked-final { min-height: 220px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed #cbd6d1; border-radius: 18px; background: rgba(255,255,255,0.45); }
.locked-final > span { font-size: 28px; color: var(--yellow); }
.locked-final h3 { font-size: 14px; margin: 8px 0 5px; }
.locked-final p { font-size: 11px; margin: 0; color: #8a9894; }
.direct-final-note { min-height: 112px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px dashed rgba(237,90,62,0.28); border-radius: 17px; background: rgba(255,255,255,0.48); text-align: center; }
.direct-final-note span { color: var(--orange); font-size: 10px; font-weight: 950; letter-spacing: 0.16em; }
.direct-final-note strong { font-size: 13px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(8, 32, 30, 0.67); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 24px; overflow: auto; }
.public-license-lookup { width: min(920px, 100%); min-height: 470px; display: grid; grid-template-columns: .82fr 1.18fr; overflow: hidden; position: relative; border-radius: 30px; background: var(--paper); box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.public-license-mascot { min-height: 470px; overflow: hidden; position: relative; background: linear-gradient(145deg, #ffe47b, #8edcf7); }
.public-license-mascot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(20deg, rgba(23,52,49,.18), transparent 48%); }
.public-license-mascot img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.public-license-copy { align-self: center; padding: 48px 50px; }
.public-license-copy > span { color: var(--orange); font-size: 10px; font-weight: 950; letter-spacing: .18em; }
.public-license-copy h2 { margin: 9px 0 12px; font-size: clamp(31px, 4vw, 48px); line-height: 1.08; letter-spacing: -.04em; }
.public-license-copy > p { margin: 0; color: #617671; font-size: 14px; line-height: 1.8; }
.public-license-copy > p strong { color: var(--ink); }
.public-license-copy > small { display: block; margin-top: 13px; color: #7f918c; font-size: 10px; line-height: 1.6; }
.public-license-search { display: grid; gap: 8px; margin-top: 25px; }
.public-license-search label { color: var(--ink); font-size: 10px; font-weight: 900; letter-spacing: .04em; }
.public-license-search > div { display: grid; grid-template-columns: 1fr auto; overflow: hidden; border: 2px solid rgba(23,52,49,.15); border-radius: 14px; background: white; }
.public-license-search input { min-width: 0; border: 0; outline: 0; padding: 15px 16px; color: var(--ink); background: transparent; font-size: 14px; }
.public-license-search button { border: 0; padding: 0 20px; background: var(--orange); color: white; font-size: 11px; font-weight: 900; cursor: pointer; }
.public-license-search button:disabled { opacity: .65; cursor: wait; }
.public-license-error { margin-top: 12px !important; padding: 11px 13px; border-radius: 10px; background: #fff0ec; color: #b63d2c !important; font-size: 11px !important; font-weight: 850; line-height: 1.5 !important; }
.public-license-error[hidden] { display: none; }
.new-event-dialog { width: min(850px, 100%); position: relative; overflow: hidden; border-radius: 30px; padding: 36px; background: var(--paper); box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.new-event-dialog > header { display: grid; grid-template-columns: 68px 1fr; gap: 17px; align-items: start; padding-right: 35px; }
.new-event-dialog > header img { width: 68px; height: 68px; }
.new-event-dialog > header span { color: var(--orange); font-size: 9px; font-weight: 950; letter-spacing: .15em; }
.new-event-dialog > header h2 { margin: 5px 0 7px; font-size: 34px; letter-spacing: -.045em; }
.new-event-dialog > header p { margin: 0; color: #6f817c; font-size: 12px; line-height: 1.6; }
.event-separation-map { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 13px; margin: 27px 0 18px; }
.event-separation-map > article { min-height: 108px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 16px; border: 1px solid rgba(23,52,49,.11); border-radius: 18px; background: #fff; }
.event-separation-map article > i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: #fff1c9; font-size: 21px; font-style: normal; }
.event-separation-map article:nth-of-type(2) > i { background: #dff6ff; }
.event-separation-map article > div { display: grid; gap: 2px; }
.event-separation-map article small { color: var(--orange); font-size: 8px; font-weight: 900; }
.event-separation-map article strong { font-size: 15px; }
.event-separation-map article span { color: #778984; font-size: 9px; line-height: 1.45; }
.event-separation-map article > b { align-self: start; padding: 6px 8px; border-radius: 999px; background: #e8f8e7; color: #3aa248; font-size: 8px; white-space: nowrap; }
.event-separation-map article:nth-of-type(2) > b { background: #fff0e9; color: var(--orange); }
.event-separation-map > em { color: var(--orange); font-size: 22px; font-style: normal; font-weight: 950; }
.new-event-current { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 14px; background: #f1f5f1; }
.new-event-current span { color: #7e8e89; font-size: 9px; font-weight: 850; }
.new-event-current strong { font-size: 12px; }
.new-event-current small { color: #7e8e89; font-size: 9px; }
.new-event-name { display: grid; gap: 7px; margin-top: 18px; }
.new-event-name span { color: var(--ink); font-size: 10px; font-weight: 900; }
.new-event-name input { width: 100%; border: 2px solid rgba(23,52,49,.14); border-radius: 13px; padding: 13px 15px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 800; outline: 0; }
.new-event-name input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(237,90,62,.1); }
.new-event-dialog > ul { margin: 17px 0 0; padding-left: 20px; color: #627570; font-size: 10px; line-height: 1.8; }
.new-event-dialog > footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 21px; }
.license-modal { width: min(1640px, 100%); background: var(--paper); border-radius: 28px; padding: 42px; position: relative; box-shadow: 0 30px 90px rgba(0,0,0,0.3); }
.modal-close { position: absolute; right: 13px; top: 10px; width: 37px; height: 37px; border: 0; background: transparent; font-size: 28px; cursor: pointer; color: #8b9995; z-index: 4; }
.license-preview-label { display: flex; justify-content: space-between; align-items: center; margin: 0 42px 12px 0; }
.license-preview-label span { color: var(--orange); font-size: 16px; font-weight: 950; letter-spacing: 0.1em; }
.license-preview-label strong { color: #536d67; font-size: 15px; font-weight: 850; }
.license-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center; }
.license-card { aspect-ratio: 1.585; border-radius: 18px; color: var(--ink); overflow: hidden; position: relative; isolation: isolate; box-shadow: 0 18px 42px rgba(36,74,68,0.18); border: 1px solid rgba(117,61,37,0.12); }
.license-front { background: linear-gradient(122deg, #fffdf6 0%, #fff7dc 54%, #f2fbf6 100%); padding: 19px 21px 14px; }
.license-front::before { content: ""; position: absolute; z-index: -1; width: 218px; height: 238px; left: -93px; top: 55px; border-radius: 46% 54% 48% 52%; transform: rotate(-10deg); background: linear-gradient(145deg, rgba(237,90,62,0.21), rgba(255,200,65,0.25)); border: 1px solid rgba(237,90,62,0.12); }
.license-color-rail { position: absolute; top: 0; left: 0; right: 0; height: 7px; display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; }
.license-color-rail i:first-child { background: var(--orange); }
.license-color-rail i:nth-child(2) { background: var(--yellow); }
.license-color-rail i:nth-child(3) { background: var(--sky); }
.license-color-rail i:last-child { background: var(--green); }
.license-arena-grid { position: absolute; z-index: -2; inset: 7px 0 0 41%; opacity: 0.24; background-image: linear-gradient(rgba(23,52,49,0.14) 1px, transparent 1px), linear-gradient(90deg, rgba(23,52,49,0.14) 1px, transparent 1px); background-size: 21px 21px; mask-image: linear-gradient(115deg, transparent 5%, black 70%); }
.license-goal-ring { position: absolute; z-index: -1; width: 168px; height: 168px; right: -59px; top: 70px; border: 13px solid rgba(88,191,240,0.18); border-radius: 50%; box-shadow: inset 0 0 0 3px rgba(237,90,62,0.1), 0 0 0 6px rgba(84,200,79,0.08); }
.license-goal-ring i { position: absolute; inset: 20px; border: 2px dashed rgba(23,52,49,0.15); border-radius: 50%; }
.license-goal-ring span { position: absolute; width: 25px; height: 25px; left: 31px; top: 60px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 8px rgba(255,200,65,0.13); }
.license-header { height: 42px; display: flex; align-items: center; position: relative; z-index: 2; padding-top: 3px; }
.license-header img { width: 37px; height: 37px; margin-right: 9px; }
.license-header > div { display: grid; gap: 2px; }
.license-header strong { font-size: 20px; letter-spacing: 0.015em; }
.license-header span { font-size: 10px; letter-spacing: 0.075em; color: var(--orange); font-weight: 950; }
.license-header > b { margin-left: auto; align-self: flex-start; display: flex; align-items: center; gap: 4px; background: var(--ink); color: white; padding: 7px 10px; border-radius: 999px; font-size: 9px; letter-spacing: 0.08em; }
.license-header > b i { width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 2px rgba(255,200,65,0.2); }
.license-front-body { display: grid; grid-template-columns: 130px 1fr; gap: 13px; align-items: center; min-height: 156px; margin-top: 7px; position: relative; z-index: 2; }
.license-pilot-orb { width: 124px; height: 124px; border: 4px solid var(--orange); border-radius: 50%; display: grid; place-items: center; position: relative; background: rgba(255,255,255,0.7); box-shadow: 0 9px 24px rgba(117,61,37,0.2), inset 0 0 0 5px rgba(255,255,255,0.85); }
.license-photo-core { width: 91px; height: 91px; border-radius: 50%; overflow: hidden; position: relative; z-index: 1; background: white; border: 3px solid white; box-shadow: 0 0 0 1px rgba(23,52,49,0.12); }
.license-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.license-pilot-orb .orb-line { position: absolute; z-index: 2; width: 105px; height: 52px; border: 1.5px solid rgba(23,52,49,0.48); border-radius: 50%; pointer-events: none; }
.license-pilot-orb .orb-line-b { transform: rotate(60deg); border-color: rgba(88,160,183,0.52); }
.license-pilot-orb .orb-line-c { transform: rotate(-60deg); border-color: rgba(84,160,79,0.46); }
.license-pilot-orb > span { position: absolute; z-index: 4; left: 15px; right: 15px; bottom: -7px; padding: 5px 4px; border-radius: 999px; background: var(--orange); border: 2px solid #fff8df; color: white; text-align: center; font-size: 10px; font-weight: 950; letter-spacing: 0.06em; box-shadow: 0 4px 10px rgba(237,90,62,0.25); }
.license-fields { min-width: 0; display: grid; align-content: center; }
.license-fields > small, .license-data-row small, .license-footer small { color: #5c5546; font-size: 10px; letter-spacing: 0.055em; font-weight: 950; }
.license-call-sign { width: max-content; max-width: 100%; display: flex; align-items: center; gap: 7px; padding: 4px 8px; margin-bottom: 5px; border-radius: 6px; background: var(--orange); color: white; transform: skewX(-7deg); }
.license-call-sign > * { transform: skewX(7deg); }
.license-call-sign small { color: rgba(255,255,255,0.92); font-size: 8.5px; font-weight: 950; letter-spacing: 0.06em; }
.license-call-sign b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; letter-spacing: 0.02em; }
.license-fields h2 { margin: 2px 0 0; font-size: 38px; line-height: 1; letter-spacing: 0; }
.license-fields > p { color: #3f5b55; font-size: 9.5px; margin: 4px 0 8px; font-weight: 950; letter-spacing: 0.055em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.license-data-row { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 8px; padding: 8px 9px; border: 1px solid rgba(23,52,49,0.1); border-radius: 9px; background: rgba(255,255,255,0.68); backdrop-filter: blur(3px); }
.license-data-row > span { display: grid; gap: 2px; min-width: 0; }
.license-data-row strong { color: var(--ink); font-size: 15px; letter-spacing: 0.015em; white-space: nowrap; }
.license-data-row > span:first-child strong { color: var(--orange); font-size: 16px; }
.license-footer { display: grid; grid-template-columns: 1fr 0.8fr auto; gap: 14px; align-items: end; margin-top: 5px; padding-top: 7px; border-top: 1px solid rgba(23,52,49,0.12); position: relative; z-index: 2; }
.license-footer > span { display: grid; gap: 2px; }
.license-footer strong { color: var(--ink); font-size: 12px; }
.license-footer > b { color: var(--ink); font-size: 9px; letter-spacing: 0.065em; padding: 6px 8px; border-radius: 999px; background: rgba(255,200,65,0.66); white-space: nowrap; }
.active-status { color: #399846 !important; display: flex; align-items: center; gap: 4px; }
.active-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.license-back { background: #0e3431; color: white; padding: 19px 21px 13px; }
.license-back::before { content: ""; position: absolute; z-index: 3; inset: 0; border: 1px solid rgba(255,255,255,0.12); border-radius: inherit; pointer-events: none; }
.license-arena-art { position: absolute; z-index: 0; right: -18px; top: 0; width: 69%; height: 100%; object-fit: cover; object-position: 69% center; filter: saturate(1.06) contrast(1.04); }
.license-arena-shade { position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, #0e3431 0%, #0e3431 43%, rgba(14,52,49,0.93) 52%, rgba(14,52,49,0.38) 75%, rgba(14,52,49,0.08) 100%), linear-gradient(0deg, rgba(5,29,27,0.82) 0%, transparent 34%); }
.license-back-top { display: flex; align-items: center; height: 43px; position: relative; z-index: 2; }
.license-back-top img { width: 36px; height: 36px; margin-right: 9px; }
.license-back-top > div { display: grid; gap: 2px; }
.license-back-top strong { font-size: 17px; }
.license-back-top span { color: var(--yellow); font-size: 9.5px; font-weight: 950; letter-spacing: 0.075em; }
.license-back-top > b { margin-left: auto; color: white; font-size: 10px; letter-spacing: 0.055em; padding: 6px 9px; border-radius: 999px; background: rgba(7,39,37,0.82); border: 1px solid rgba(255,255,255,0.24); backdrop-filter: blur(6px); }
.license-back-body { display: grid; grid-template-columns: 270px 1fr; gap: 13px; margin-top: 8px; min-height: 132px; position: relative; z-index: 2; }
.flight-rules { align-self: start; padding: 9px 10px; border-radius: 11px; background: rgba(4,30,28,0.61); border: 1px solid rgba(255,255,255,0.11); backdrop-filter: blur(6px); }
.flight-rules > small { color: var(--yellow); font-size: 10px; letter-spacing: 0.065em; font-weight: 950; }
.flight-rules ol { list-style: none; padding: 0; margin: 7px 0 0; display: grid; gap: 6px; }
.flight-rules li { display: grid; grid-template-columns: 19px 1fr; gap: 7px; align-items: start; }
.flight-rules li b { width: 22px; height: 22px; border: 1px solid rgba(255,200,65,0.58); border-radius: 50%; display: grid; place-items: center; background: rgba(255,200,65,0.13); color: var(--yellow); font-size: 9px; }
.flight-rules li span { color: #ffffff; font-size: 11.5px; line-height: 1.32; font-weight: 850; }
.license-squad-badge { align-self: end; justify-self: end; width: 150px; padding: 9px 11px; display: grid; gap: 3px; border-radius: 10px; color: white; background: rgba(7,39,37,0.78); border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(6px); position: relative; overflow: hidden; }
.license-squad-badge span { color: var(--yellow); font-size: 8px; font-weight: 950; letter-spacing: 0.06em; }
.license-squad-badge strong { font-size: 13px; letter-spacing: 0.04em; }
.license-squad-badge span, .license-squad-badge strong { white-space: nowrap; }
.license-squad-badge i { position: absolute; width: 31px; height: 31px; right: -8px; bottom: -9px; border: 4px solid rgba(88,191,240,0.52); border-radius: 50%; }
.license-barcode { position: relative; z-index: 2; width: 225px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin-top: 1px; }
.license-barcode i { height: 25px; background: repeating-linear-gradient(90deg, white 0 1px, transparent 1px 3px, white 3px 5px, transparent 5px 8px); opacity: 0.72; }
.license-barcode span { color: #e4efeb; font-family: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 9px; letter-spacing: 0.075em; }
.license-back-footer { position: absolute; z-index: 2; left: 21px; right: 21px; bottom: 10px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.28); color: #e0ebe7; font-size: 9.5px; letter-spacing: 0.015em; display: flex; justify-content: space-between; align-items: center; }
.license-back-footer b { color: var(--yellow); font-size: 9px; letter-spacing: 0.055em; }
.license-modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 11px; margin-top: 22px; }
.license-modal-actions > p { margin: 0 auto 0 0; color: #536d67; font-size: 15px; font-weight: 750; }
.license-modal-actions .delete-warning { display: grid; gap: 3px; color: #7d3029; }
.delete-warning strong { font-size: 15px; }
.delete-warning span { color: #8d6d68; font-size: 11px; font-weight: 700; }

.match-screen { position: fixed; inset: 0; z-index: 100; background: #e8f7f2; color: var(--ink); overflow: auto; display: grid; grid-template-rows: 74px auto 1fr auto; isolation: isolate; scrollbar-color: rgba(23,52,49,0.26) #dff3ee; }
.match-screen::-webkit-scrollbar { width: 8px; }
.match-screen::-webkit-scrollbar-track { background: #dff3ee; }
.match-screen::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(23,52,49,0.26); }
.match-screen::before { content: ""; position: fixed; inset: 0; z-index: -2; background: radial-gradient(circle at -2% 72%, transparent 0 135px, rgba(237,90,62,0.15) 136px 158px, transparent 159px), radial-gradient(circle at 102% 67%, transparent 0 150px, rgba(88,191,240,0.2) 151px 174px, transparent 175px), radial-gradient(circle at 16% 14%, rgba(255,202,58,0.28), transparent 25%), radial-gradient(circle at 82% 18%, rgba(88,191,240,0.3), transparent 28%), linear-gradient(145deg, #fff8df 0%, #e5f8f1 38%, #d9f2fa 72%, #fff2d4 100%); }
.match-screen.crunch { color: white; }
.match-screen.crunch::before { background: repeating-linear-gradient(125deg, rgba(255,94,55,0.035) 0 16px, transparent 16px 42px), radial-gradient(circle at 50% 24%, rgba(255,78,42,0.42), transparent 40%), linear-gradient(160deg, #521d18, #20120f 58%, #100f0d); animation: final-bg-pulse 0.7s ease-in-out infinite alternate; }
.match-screen.crunch::after { content: ""; position: fixed; inset: 0; z-index: 6; pointer-events: none; border: 7px solid rgba(255,92,57,0.75); box-shadow: inset 0 0 90px rgba(255,48,20,0.34), inset 0 0 24px rgba(255,200,65,0.3); animation: urgent-frame 0.7s ease-in-out infinite alternate; }
.match-screen.final-ten { animation: arena-rumble 0.13s steps(2, end) infinite; }
.match-screen.final-ten::before { background: repeating-linear-gradient(125deg, rgba(255,224,74,0.09) 0 12px, rgba(255,45,20,0.04) 12px 30px), radial-gradient(circle at 50% 22%, rgba(255,230,96,0.42), transparent 32%), linear-gradient(160deg, #741a12, #2c0908 62%, #100404); animation-duration: 0.22s; }
.match-screen.final-ten::after { border-width: 12px; border-color: rgba(255,241,178,0.92); box-shadow: inset 0 0 130px rgba(255,30,10,0.58), inset 0 0 34px rgba(255,241,178,0.72); animation: last-ten-frame 0.18s steps(2, end) infinite; }
.arena-net { position: fixed; inset: 74px 0 0; z-index: -1; opacity: 0.2; background-image: linear-gradient(rgba(23,52,49,0.28) 1px, transparent 1px), linear-gradient(90deg, rgba(23,52,49,0.28) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom, black, transparent 78%); }
.match-screen.crunch .arena-net { opacity: 0.1; background-image: linear-gradient(rgba(255,255,255,0.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.6) 1px, transparent 1px); }
.match-topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 32px; border-bottom: 1px solid rgba(255,255,255,0.22); background: linear-gradient(100deg, rgba(22,104,96,0.97), rgba(27,123,115,0.96)); color: white; backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 4; box-shadow: 0 8px 26px rgba(23,88,82,0.16); }
.match-brand { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 900; letter-spacing: 0.08em; }
.match-brand img { width: 38px; height: 38px; }
.match-brand b { color: var(--yellow); }
.match-title { display: grid; text-align: center; gap: 3px; }
.match-title small { color: var(--yellow); font-size: 8px; letter-spacing: 0.18em; font-weight: 900; }
.match-title strong { font-size: 15px; }
.match-controls { justify-self: end; display: flex; gap: 8px; }
.match-controls button { border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.06); color: white; border-radius: 9px; padding: 8px 10px; font-size: 9px; font-weight: 800; cursor: pointer; }
.timer-zone { position: relative; z-index: 2; text-align: center; padding: 18px 20px 4px; }
.round-label { display: flex; align-items: center; justify-content: center; gap: 12px; color: #547b72; font-size: 9px; letter-spacing: 0.18em; font-weight: 900; }
.round-label span { width: 45px; height: 1px; background: #8cb7ad; }
.timer-number { font-family: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace; font-weight: 900; font-size: clamp(92px, 13vw, 190px); line-height: 0.95; letter-spacing: -0.1em; padding-right: 0.08em; color: #164c47; text-shadow: 0 12px 38px rgba(36,123,113,0.16); margin-top: 8px; }
.match-screen.crunch .round-label { opacity: 0.24; }
.match-screen.crunch .timer-number { font-size: clamp(142px, 17vw, 265px); line-height: 0.82; color: #fff6df; text-shadow: 0 0 18px rgba(255,255,255,0.28), 0 0 85px rgba(255,52,25,0.72); }
.match-screen.final-ten .timer-number { font-size: clamp(210px, 25vw, 390px); line-height: 0.68; color: white; text-shadow: 0 0 24px white, 0 0 110px rgba(255,29,8,0.95); }
.final-second-slam { animation: final-second-slam 0.34s cubic-bezier(.16,.9,.28,1.25), heartbeat 0.52s 0.34s infinite !important; }
.timer-caption { font-size: 9px; letter-spacing: 0.25em; color: #5b837a; font-weight: 900; margin-top: 5px; }
.match-screen.crunch .timer-caption { color: var(--yellow); font-size: 12px; animation: caption-flash 0.7s steps(2, end) infinite; }
.match-screen.final-ten .timer-caption { color: white; font-size: 15px; letter-spacing: 0.31em; animation-duration: 0.2s; }
.final-thirty-hud { width: min(560px, calc(100% - 30px)); margin: -5px auto 8px; display: grid; gap: 5px; opacity: 0; max-height: 0; overflow: hidden; transform: translateY(-8px); transition: opacity 180ms ease, transform 180ms ease, max-height 180ms ease; }
.match-screen.crunch .final-thirty-hud { opacity: 1; max-height: 90px; transform: translateY(0); }
.final-thirty-hud > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #fff3ce; font-weight: 950; letter-spacing: 0.11em; }
.final-thirty-hud > div:first-child strong { color: #ff755a; font-size: 13px; animation: caption-flash 0.7s steps(2, end) infinite; }
.final-thirty-hud > div:first-child span { color: white; font-family: "SF Mono", ui-monospace, monospace; font-size: 12px; }
.final-thirty-track { height: 9px; overflow: hidden; border: 1px solid rgba(255,255,255,0.2); border-radius: 999px; background: rgba(0,0,0,0.28); box-shadow: inset 0 2px 4px rgba(0,0,0,0.3); }
.final-thirty-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff3e24, #ff9e3d, #ffe25f); box-shadow: 0 0 16px rgba(255,94,48,0.9); transition: width 1s linear; }
.match-screen.final-ten .final-thirty-track { height: 13px; border-color: rgba(255,255,255,0.62); }
.match-screen.final-ten .final-thirty-track i { background: linear-gradient(90deg, #ff1f0b, #ffffff); box-shadow: 0 0 24px white; }
.match-screen.final-ten .final-thirty-hud > div:first-child strong { color: white; font-size: 17px; animation-duration: 0.18s; }
.final-thirty-hud small { color: #e5b9ac; font-size: 8px; font-weight: 850; letter-spacing: 0.08em; }
.match-screen.crunch .score-pilot { color: white; background: rgba(26,8,6,0.58); border-color: rgba(255,114,82,0.28); box-shadow: 0 0 34px rgba(255,48,20,0.08); }
.match-screen.crunch .team-roster > div { background: rgba(255,255,255,0.055); border-color: rgba(255,255,255,0.1); box-shadow: none; }
.match-screen.crunch .pilot-orb { background: transparent; border-color: rgba(255,255,255,0.3); }
.match-screen.crunch .pilot-orb::after { border-color: rgba(255,255,255,0.2); }
.match-screen.crunch .team-score-heading small, .match-screen.crunch .team-roster small { color: #d0aaa1; }
.match-screen.crunch .score-control strong, .match-screen.crunch .score-team.pilot-color-1 .score-control strong { color: var(--yellow); }
.match-screen.crunch .score-control button { border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.08); color: white; box-shadow: none; }
.scoreboard { width: min(1320px, calc(100% - 54px)); margin: 14px auto 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; align-content: center; }
.scoreboard.team-scoreboard { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1120px; gap: 22px; }
.score-pilot { background: rgba(255,255,255,0.78); border: 1px solid rgba(23,52,49,0.14); border-radius: 22px; padding: 18px; min-width: 0; position: relative; backdrop-filter: blur(12px); box-shadow: 0 20px 55px rgba(42,112,103,0.12), inset 0 1px 0 white; }
.score-pilot::before { content: ""; position: absolute; top: 0; left: 22px; right: 22px; height: 3px; border-radius: 0 0 4px 4px; background: var(--orange); }
.score-pilot.pilot-color-1::before { background: var(--sky); }
.score-pilot.pilot-color-2::before { background: var(--green); }
.pilot-identity { display: flex; gap: 12px; align-items: center; }
.pilot-orb { width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(23,52,49,0.18); padding: 4px; position: relative; flex: 0 0 auto; background: white; }
.pilot-orb::after { content: ""; position: absolute; inset: 6px -7px; border: 1px solid rgba(23,52,49,0.2); border-radius: 50%; transform: rotate(55deg); }
.pilot-orb img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; position: relative; z-index: 2; }
.pilot-identity small { color: #8fa9a2; font-size: 8px; letter-spacing: 0.15em; font-weight: 900; }
.pilot-identity h2 { margin: 3px 0 1px; font-size: 19px; }
.pilot-identity p { margin: 0; color: #8fa9a2; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.score-team { padding: 20px 22px; }
.team-score-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.team-score-heading small { color: #678980; font-size: 8px; letter-spacing: 0.15em; font-weight: 900; }
.team-score-heading h2 { margin: 3px 0 0; font-size: 28px; }
.team-score-heading > span { padding: 6px 8px; border-radius: 999px; color: #ff876d; background: rgba(237,90,62,0.12); font-size: 7px; font-weight: 900; letter-spacing: 0.1em; }
.score-team.pilot-color-1 .team-score-heading > span { color: #7ad5ff; background: rgba(88,191,240,0.12); }
.team-roster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.team-roster > div { min-width: 0; padding: 10px 6px; display: grid; justify-items: center; text-align: center; border-radius: 14px; background: rgba(255,255,255,0.74); border: 1px solid rgba(23,52,49,0.1); box-shadow: 0 8px 22px rgba(42,112,103,0.07); }
.team-roster .pilot-orb { width: 58px; height: 58px; }
.team-roster strong { width: 100%; margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.team-roster small { width: 100%; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #718e87; font-size: 7px; }
.team-score-control { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 16px; margin-top: 2px; }
.team-score-control > .score-label { padding-bottom: 10px; text-align: left; }
.team-score-control .score-control { margin-top: 8px; }
.score-control { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 10px; margin-top: 16px; }
.score-control strong { text-align: center; font-family: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: clamp(48px, 5vw, 72px); line-height: 1; color: #ed593e; }
.score-team.pilot-color-1 .score-control strong { color: #168dc1; }
.score-control button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(23,52,49,0.18); background: white; color: var(--ink); font-size: 24px; cursor: pointer; box-shadow: 0 8px 18px rgba(42,112,103,0.1); }
.score-control button:hover { background: white; color: var(--ink); }
.score-control button:disabled { opacity: 0.25; }
.score-label { display: block; text-align: center; color: #68837c; font-size: 7px; letter-spacing: 0.25em; font-weight: 900; }
.match-footer { min-height: 88px; padding: 14px 28px; border-top: 1px solid rgba(255,255,255,0.2); background: linear-gradient(100deg, rgba(22,104,96,0.98), rgba(16,79,74,0.98)); color: white; display: grid; grid-template-columns: 110px auto 1fr; align-items: center; gap: 16px; box-shadow: 0 -8px 26px rgba(23,88,82,0.13); }
.secondary-match-button { border: 1px solid rgba(255,255,255,0.17); background: transparent; color: white; border-radius: 11px; padding: 12px; font-size: 10px; font-weight: 850; cursor: pointer; }
.start-match-button { min-width: 210px; border: 0; border-radius: 13px; background: var(--orange); color: white; padding: 14px 24px; font-weight: 900; cursor: pointer; box-shadow: 0 12px 30px rgba(237,90,62,0.25); }
.start-match-button span { margin-right: 9px; }
.start-match-button.pause { background: var(--yellow); color: var(--ink); }
.start-match-button.finish { background: var(--green); }
.rule-reminder { justify-self: end; display: flex; gap: 10px; align-items: center; }
.rule-reminder > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,0.16); color: var(--yellow); }
.rule-reminder p { display: grid; gap: 2px; color: #86a09a; font-size: 9px; margin: 0; }
.rule-reminder strong { color: white; font-size: 10px; }
.prestart-overlay { position: fixed; inset: 74px 0 0; z-index: 8; background: radial-gradient(circle at 50% 42%, rgba(88,191,240,0.34), transparent 34%), linear-gradient(145deg, rgba(255,248,223,0.97), rgba(215,244,239,0.98)); display: grid; place-items: center; align-content: center; text-align: center; }
.prestart-overlay span { color: #d94f36; letter-spacing: 0.3em; font-size: 13px; font-weight: 900; }
.prestart-overlay strong { font-family: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: min(46vw, 420px); line-height: 0.9; color: #164c47; text-shadow: 0 12px 40px rgba(22,76,71,0.16); animation: count-pop 0.85s ease-out; }
.prestart-overlay p { color: #52776f; letter-spacing: 0.22em; font-size: 11px; font-weight: 800; }
.prestart-overlay.ready-phase { background: radial-gradient(circle at 50% 42%, rgba(255,202,58,0.4), transparent 32%), linear-gradient(145deg, rgba(255,249,226,0.98), rgba(213,245,239,0.98)); }
.prestart-overlay.ready-phase strong { color: #e2533b; font-size: min(19vw, 190px); letter-spacing: -0.07em; text-shadow: 0 10px 40px rgba(237,90,62,0.2); animation: ready-charge 0.8s ease-out; }
.final-thirty-entry { position: fixed; inset: 74px 0 88px; z-index: 12; pointer-events: none; visibility: hidden; opacity: 0; display: grid; place-items: center; align-content: center; text-align: center; background: radial-gradient(circle, rgba(255,78,42,0.44), rgba(20,5,3,0.94) 64%); }
.final-thirty-entry span { color: var(--yellow); font-size: 16px; font-weight: 950; letter-spacing: 0.24em; }
.final-thirty-entry strong { margin-top: 9px; color: white; font-family: "SF Mono", ui-monospace, monospace; font-size: min(19vw, 270px); line-height: 0.92; letter-spacing: -0.09em; text-shadow: 0 0 50px rgba(255,78,42,0.8); }
.final-thirty-entry p { margin: 15px 0 0; color: white; font-size: 15px; font-weight: 900; letter-spacing: 0.15em; }
.final-thirty-entry.active { visibility: visible; animation: final-thirty-entry 2s ease-out forwards; }
.final-ten-entry { position: fixed; inset: 74px 0 88px; z-index: 13; pointer-events: none; visibility: hidden; opacity: 0; display: grid; place-items: center; align-content: center; text-align: center; background: repeating-linear-gradient(135deg, rgba(255,229,62,0.08) 0 24px, transparent 24px 48px), radial-gradient(circle, rgba(255,205,55,0.42), rgba(74,5,0,0.96) 66%); }
.final-ten-entry span { color: white; padding: 8px 13px; border: 2px solid white; font-size: 18px; font-weight: 950; letter-spacing: 0.23em; animation: caption-flash 0.15s steps(2, end) infinite; }
.final-ten-entry strong { margin-top: 13px; color: white; font-family: "SF Mono", ui-monospace, monospace; font-size: min(22vw, 320px); line-height: 0.86; letter-spacing: -0.11em; text-shadow: 0 0 28px white, 0 0 100px #ff260d; }
.final-ten-entry p { margin: 18px 0 0; color: var(--yellow); font-size: 17px; font-weight: 950; letter-spacing: 0.18em; }
.final-ten-entry.active { visibility: visible; animation: final-ten-entry 1.4s ease-out forwards; }
.finish-flash { position: fixed; inset: 74px 0 88px; z-index: 7; display: grid; place-items: center; background: rgba(237,90,62,0.14); color: white; font-size: min(21vw, 300px); font-weight: 950; letter-spacing: -0.08em; pointer-events: none; animation: finish-away 1.3s ease forwards; }
.heartbeat-number { animation: heartbeat 0.7s infinite; }

.victory-celebration { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; overflow: auto; padding: 24px; background: radial-gradient(circle at 50% 35%, rgba(255,204,62,0.28), transparent 32%), linear-gradient(145deg, rgba(7,42,38,0.97), rgba(4,20,19,0.99)); animation: victory-reveal 0.85s 0.72s both; }
.victory-celebration.tie-result { background: radial-gradient(circle at 50% 35%, rgba(88,191,240,0.24), transparent 32%), linear-gradient(145deg, rgba(10,46,48,0.98), rgba(4,20,22,0.99)); }
.victory-card { position: relative; z-index: 2; width: min(720px, 100%); display: grid; justify-items: center; text-align: center; padding: 31px 38px 29px; overflow: hidden; border: 1px solid rgba(255,255,255,0.2); border-radius: 30px; background: linear-gradient(150deg, rgba(255,255,255,0.14), rgba(255,255,255,0.055)); box-shadow: 0 35px 100px rgba(0,0,0,0.48), inset 0 1px 0 rgba(255,255,255,0.2); backdrop-filter: blur(18px); }
.victory-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 7px; background: linear-gradient(90deg, var(--orange), var(--yellow), var(--sky), var(--green)); }
.victory-kicker { color: var(--yellow); font-size: 10px; font-weight: 950; letter-spacing: 0.24em; }
.tie-result .victory-kicker { color: var(--sky); }
.victory-trophy { margin-top: 8px; font-size: 58px; filter: drop-shadow(0 12px 24px rgba(255,200,65,0.35)); animation: trophy-pop 0.8s 1.1s both; }
.victory-card h2 { margin: 5px 0 12px; color: white; font-size: clamp(38px, 6vw, 66px); line-height: 1.05; letter-spacing: -0.06em; }
.victory-score { width: min(510px, 100%); display: grid; grid-template-columns: 1fr auto 1fr; gap: 15px; align-items: center; padding: 11px 16px; border-radius: 17px; background: rgba(0,0,0,0.23); }
.victory-score span { color: #b8cbc5; font-size: 11px; font-weight: 850; }
.victory-score strong { color: var(--yellow); font-family: "SF Mono", ui-monospace, monospace; font-size: 38px; line-height: 1; }
.victory-score strong i { margin: 0 8px; color: white; font-size: 22px; font-style: normal; }
.victory-team { display: flex; justify-content: center; gap: 11px; margin-top: 17px; }
.victory-team > div { width: 88px; display: grid; justify-items: center; gap: 5px; }
.victory-team img { width: 68px; height: 68px; object-fit: cover; border: 3px solid rgba(255,255,255,0.6); border-radius: 50%; box-shadow: 0 10px 20px rgba(0,0,0,0.25); }
.victory-team strong { width: 100%; overflow: hidden; color: white; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.victory-card > p { max-width: 520px; margin: 16px 0 0; color: #b7cac4; font-size: 11px; line-height: 1.7; font-weight: 700; }
.victory-actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.victory-actions .secondary-match-button, .victory-actions .start-match-button { min-width: 170px; }
.confetti-field { position: fixed; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.confetti-field i { position: absolute; top: -8%; left: var(--x); width: 11px; height: 20px; border-radius: 2px; background: var(--confetti); animation: confetti-fall var(--duration) var(--delay) linear infinite; }

.music-picker-backdrop { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 18px; background: rgba(3,19,18,0.88); backdrop-filter: blur(12px); }
.music-picker { width: min(1080px, 100%); max-height: calc(100vh - 36px); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border: 1px solid rgba(255,255,255,0.16); border-radius: 26px; color: white; background: linear-gradient(145deg, #123a36, #081f1e 70%); box-shadow: 0 32px 90px rgba(0,0,0,0.48); }
.music-picker > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 25px 28px 21px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.music-picker > header > div:first-child { display: grid; gap: 5px; }
.music-picker > header > div:first-child > span { color: var(--yellow); font-size: 9px; font-weight: 950; letter-spacing: 0.18em; }
.music-picker h2 { margin: 0; font-size: 28px; letter-spacing: -0.04em; }
.music-picker header p { margin: 0; color: #9eb6b0; font-size: 11px; font-weight: 700; }
.music-picker > header > div:last-child { display: flex; align-items: center; gap: 8px; }
.music-sound-toggle, .music-picker-close { border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.07); color: white; cursor: pointer; font-weight: 850; }
.music-sound-toggle { padding: 10px 13px; border-radius: 10px; font-size: 9px; }
.music-picker-close { width: 36px; height: 36px; border-radius: 50%; font-size: 21px; }
.music-picker-scroll { min-height: 0; overflow: auto; padding: 22px 28px; display: grid; gap: 25px; }
.music-picker-section { display: grid; gap: 13px; }
.music-section-title { display: flex; align-items: center; gap: 11px; }
.music-section-title > span { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(255,200,65,0.48); border-radius: 50%; color: var(--yellow); background: rgba(255,200,65,0.08); font-size: 10px; font-weight: 950; }
.climax-section .music-section-title > span { border-color: rgba(255,104,75,0.6); color: #ff8066; background: rgba(237,90,62,0.12); }
.music-section-title > div { display: grid; gap: 2px; }
.music-section-title strong { font-size: 15px; }
.music-section-title small { color: #819d96; font-size: 9px; font-weight: 750; }
.music-choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.music-choice-grid.climax-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.music-choice { min-width: 0; min-height: 112px; position: relative; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: 1fr auto; gap: 8px 10px; padding: 15px; text-align: left; border: 1px solid rgba(255,255,255,0.11); border-radius: 16px; color: white; background: rgba(255,255,255,0.055); cursor: pointer; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.music-choice:hover { transform: translateY(-2px); border-color: rgba(255,200,65,0.48); background: rgba(255,255,255,0.09); }
.music-choice.selected { border-color: var(--yellow); background: linear-gradient(145deg, rgba(255,200,65,0.16), rgba(255,255,255,0.06)); box-shadow: inset 0 0 0 1px rgba(255,200,65,0.2); }
.music-choice-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,0.09); font-size: 21px; }
.music-choice-copy { min-width: 0; display: grid; align-content: start; gap: 3px; }
.music-choice-copy strong { font-size: 13px; }
.music-choice-copy small { color: #b2c4bf; font-size: 9px; line-height: 1.35; font-weight: 750; }
.music-choice-copy em { color: #688982; font-size: 8px; font-style: normal; }
.music-choice > b { position: absolute; top: 8px; right: 8px; padding: 4px 6px; border-radius: 999px; color: #173a36; background: var(--yellow); font-size: 7px; }
.music-choice > i { grid-column: 1 / -1; color: var(--yellow); font-size: 8px; font-style: normal; font-weight: 900; letter-spacing: 0.08em; }
.music-picker > footer { min-height: 72px; display: flex; align-items: center; gap: 15px; padding: 13px 28px; border-top: 1px solid rgba(255,255,255,0.1); background: rgba(3,20,19,0.48); }
.music-picker > footer span { color: #78948d; font-size: 9px; font-weight: 750; }
.music-picker > footer strong { margin-left: auto; color: var(--yellow); font-size: 10px; }
.music-picker > footer .primary-button { box-shadow: none; }

.loading-stage { min-height: calc(100vh - 86px); display: grid; place-items: center; align-content: center; gap: 20px; color: #7a8d87; font-size: 13px; font-weight: 750; }
.drone-loader { width: 88px; height: 88px; border-radius: 50%; border: 7px solid var(--orange); display: grid; place-items: center; position: relative; animation: orbit 2s linear infinite; }
.drone-loader::before, .drone-loader::after { content: ""; position: absolute; width: 100%; height: 34%; border: 3px solid var(--brown); border-radius: 50%; }
.drone-loader::after { transform: rotate(90deg); }
.drone-loader span { width: 29px; height: 29px; background: var(--sky); border-radius: 50%; }

@keyframes soft-pulse { 50% { opacity: 0.35; transform: scale(0.85); } }
@keyframes drop-in { from { opacity: 0; transform: translate(-50%, -10px); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes count-pop { 0% { opacity: 0; transform: scale(1.45); } 45% { opacity: 1; transform: scale(0.92); } 100% { transform: scale(1); } }
@keyframes ready-charge { 0% { opacity: 0; transform: scale(0.65); filter: blur(8px); } 65% { opacity: 1; transform: scale(1.06); filter: blur(0); } 100% { transform: scale(1); } }
@keyframes heartbeat { 0%, 32%, 100% { transform: scale(1); } 12% { transform: scale(1.035); } 22% { transform: scale(0.99); } }
@keyframes finish-away { 0% { opacity: 0; transform: scale(1.4); } 25% { opacity: 1; transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes final-bg-pulse { to { filter: saturate(1.35) brightness(1.12); } }
@keyframes urgent-frame { from { opacity: 0.46; } to { opacity: 1; } }
@keyframes caption-flash { 50% { opacity: 0.42; } }
@keyframes final-thirty-entry { 0% { opacity: 0; transform: scale(1.35); } 13% { opacity: 1; transform: scale(0.96); } 24%, 72% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08); visibility: hidden; } }
@keyframes final-ten-entry { 0% { opacity: 0; transform: scale(1.5); } 14% { opacity: 1; transform: scale(0.94); } 28%, 72% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.12); visibility: hidden; } }
@keyframes arena-rumble { 0% { transform: translate(-3px, 2px) scale(1.006); } 50% { transform: translate(3px, -2px) scale(1.008); } 100% { transform: translate(-1px, -3px) scale(1.006); } }
@keyframes last-ten-frame { 0%, 42% { opacity: 1; } 43%, 100% { opacity: 0.35; } }
@keyframes final-second-slam { 0% { opacity: 0.2; transform: scale(1.65) rotate(-2deg); filter: blur(5px); } 68% { opacity: 1; transform: scale(0.9) rotate(1deg); filter: blur(0); } 100% { transform: scale(1); } }
@keyframes victory-reveal { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: scale(1); } }
@keyframes trophy-pop { from { opacity: 0; transform: translateY(25px) scale(0.4) rotate(-18deg); } to { opacity: 1; transform: translateY(0) scale(1) rotate(0); } }
@keyframes confetti-fall { from { transform: translate3d(0, -10vh, 0) rotate(0deg); } to { transform: translate3d(var(--drift), 116vh, 0) rotate(850deg); } }

@media (max-width: 1180px) {
  .topbar { gap: 16px; }
  .topbar nav button { padding: 0 10px; }
  .save-state { display: none; }
  .hero-copy { min-width: 560px; }
  .pilot-grid { grid-template-columns: repeat(3, 1fr); }
  .license-form { grid-template-columns: 200px 1fr; }
  .mini-license { display: none; }
  .groups-board { grid-template-columns: repeat(2, 1fr); }
  .scoreboard { width: calc(100% - 30px); }
}

@media (max-width: 900px) {
  .access-gate { grid-template-columns: 1fr; }
  .access-gate-art { min-height: 300px; height: 300px; }
  .access-gate-art img { height: 420px; top: -60px; }
  .access-gate-panel { width: min(690px, calc(100% - 44px)); padding: 38px 0 55px; }
  .audience-page { width: min(100% - 26px, 760px); }
  .audience-live-stage { min-height: 0; padding: 23px 20px 26px; }
  .audience-clock strong { font-size: clamp(92px, 20vw, 160px); }
  .audience-versus { grid-template-columns: 1fr 50px 1fr; }
  .audience-team { grid-template-columns: 1fr auto; gap: 12px; }
  .audience-roster { grid-column: 1 / -1; grid-row: 2; }
  .audience-dashboard { grid-template-columns: 1fr; }
  .topbar { height: auto; min-height: 76px; padding: 10px 18px; flex-wrap: wrap; }
  .brand { order: 1; }
  .brand img { width: 42px; height: 42px; }
  .top-actions { order: 2; }
  .topbar nav { order: 3; width: 100%; height: 42px; overflow-x: auto; }
  .topbar nav button { white-space: nowrap; flex: 1; }
  .page { width: min(100% - 30px, 760px); }
  .home-page { padding-top: 16px; }
  .hero { min-height: 820px; align-items: flex-start; }
  .hero::after { background: linear-gradient(180deg, rgba(255,249,226,1) 3%, rgba(255,249,226,0.95) 43%, rgba(255,249,226,0.18) 70%); }
  .hero-copy { width: 100%; min-width: 0; padding: 45px 34px; }
  .hero-copy > p { width: 68%; }
  .hero h1 { font-size: clamp(51px, 10vw, 75px); }
  .hero-art img { object-position: 62% center; }
  .match-chip { right: 20px; bottom: 20px; }
  .event-session-bar { grid-template-columns: auto 1fr auto; }
  .event-vault-status { grid-column: 2; }
  .new-event-button { grid-column: 3; grid-row: 1 / span 2; }
  .command-grid { grid-template-columns: 1fr; }
  .page-title-row { align-items: flex-start; }
  .pilot-grid { grid-template-columns: repeat(2, 1fr); }
  .standings-head, .standings-row { grid-template-columns: minmax(160px, 1fr) repeat(4, 64px); padding-left: 16px; padding-right: 16px; }
  .bracket-layout { grid-template-columns: 1fr; }
  .bracket-path { display: none; }
  .scoreboard { grid-template-columns: repeat(3, minmax(220px, 1fr)); overflow-x: auto; justify-content: start; }
  .scoreboard.team-scoreboard { grid-template-columns: repeat(2, minmax(360px, 1fr)); max-width: none; }
  .score-pilot { min-width: 260px; }
  .match-topbar { grid-template-columns: 1fr auto; }
  .match-title { display: none; }
  .music-choice-grid, .music-choice-grid.climax-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .match-footer { grid-template-columns: 90px 1fr; }
  .rule-reminder { display: none; }
}

@media (max-width: 640px) {
  .access-gate-art { display: none; }
  .access-gate-panel { width: min(100% - 32px, 480px); padding: 34px 0; }
  .access-logo { width: 60px; height: 60px; }
  .access-gate-panel > h1 { font-size: 35px; }
  .access-choices { grid-template-columns: 1fr; }
  .access-choices > button { min-height: 188px; }
  .access-choices > .public-license-entry {
    min-height: 0;
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto auto;
    padding: 17px;
  }
  .access-choices > .public-license-entry i {
    grid-row: 1 / 3;
    width: 44px;
    height: 44px;
  }
  .access-choices > .public-license-entry b {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
    margin-top: 8px;
  }
  .control-login { grid-template-columns: 1fr; }
  .audience-topbar { min-height: 68px; padding: 9px 13px; grid-template-columns: 1fr auto; gap: 8px; }
  .audience-topbar img { width: 42px; height: 42px; }
  .audience-topbar strong { font-size: 11px; }
  .audience-sync { display: none !important; }
  .audience-actions button { padding: 8px 10px; font-size: 9px; }
  .audience-actions .audience-license-button { max-width: 124px; }
  .public-license-backdrop { padding: 0; }
  .public-license-lookup {
    min-height: 100vh;
    width: 100%;
    grid-template-columns: 1fr;
    border-radius: 0;
    align-content: start;
  }
  .public-license-mascot { min-height: 210px; height: 210px; }
  .public-license-mascot img { object-position: center 36%; }
  .public-license-copy { padding: 27px 20px 34px; }
  .public-license-copy h2 { font-size: 31px; }
  .public-license-search > div { grid-template-columns: 1fr; }
  .public-license-search button { min-height: 45px; }
  .audience-page { width: calc(100% - 16px); padding-top: 10px; }
  .audience-live-stage, .audience-champion, .audience-waiting { border-radius: 22px; }
  .audience-live-stage { padding: 17px 12px 18px; }
  .audience-live-meta { grid-template-columns: 1fr; justify-items: center; gap: 5px; text-align: center; }
  .audience-live-meta > small { display: none; }
  .audience-clock { margin: 13px 0; }
  .audience-clock strong { font-size: clamp(82px, 29vw, 126px); }
  .audience-live-stage.last-ten .audience-clock strong { font-size: clamp(125px, 42vw, 190px); }
  .audience-versus { grid-template-columns: 1fr; gap: 8px; }
  .audience-team { min-height: 132px; grid-template-columns: 1fr auto; padding: 15px; }
  .audience-team-name h2 { font-size: 24px; }
  .audience-roster { justify-content: flex-start; }
  .audience-score strong { font-size: 60px; }
  .audience-vs-mark { display: flex; justify-content: center; }
  .audience-vs-mark span { width: 42px; height: 42px; }
  .audience-vs-mark i { width: 30px; height: 1px; }
  .audience-champion { min-height: 500px; padding: 45px 15px; }
  .audience-champion h1 { font-size: 45px; }
  .audience-champion figure img { width: 78px; height: 78px; }
  .audience-waiting { min-height: 540px; grid-template-columns: 1fr; }
  .audience-waiting img { height: 300px; }
  .audience-waiting > div { padding: 28px; }
  .audience-ranking-list { overflow-x: auto; }
  .audience-ranking-list > div { min-width: 620px; }
  .brand small { display: none; }
  .brand strong { font-size: 12px; }
  .round-button { width: 34px; height: 34px; }
  .inner-page { padding-top: 42px; }
  .hero { min-height: 760px; border-radius: 25px; }
  .hero-copy { padding: 36px 23px; }
  .swiss-standings { overflow-x: auto; }
  .swiss-standings > header, .swiss-standings > footer { min-width: 620px; }
  .standings-head, .standings-row { min-width: 620px; grid-template-columns: minmax(170px, 1fr) repeat(4, 72px); }
  .hero-copy > p { width: 100%; font-size: 14px; }
  .hero h1 { font-size: 49px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 8px; width: min(100%, 260px); }
  .hero-actions .text-button { text-align: left; padding-left: 3px; }
  .hero-stats { gap: 21px; }
  .hero-stats strong { font-size: 21px; }
  .hero-art img { object-position: 69% center; }
  .live-chip { top: auto; right: 16px; bottom: 151px; }
  .match-chip { left: 16px; right: 16px; width: auto; }
  .event-session-bar { grid-template-columns: 47px 1fr; gap: 11px; padding: 15px; border-radius: 20px; }
  .event-session-icon { width: 47px; height: 47px; border-radius: 15px; font-size: 23px; }
  .event-vault-status { grid-column: 1 / -1; padding: 8px 11px; }
  .new-event-button { grid-column: 1 / -1; grid-row: auto; width: 100%; }
  .new-event-backdrop { padding: 0; }
  .new-event-dialog { width: 100%; min-height: 100vh; border-radius: 0; padding: 27px 18px; }
  .new-event-dialog > header { grid-template-columns: 54px 1fr; gap: 12px; }
  .new-event-dialog > header img { width: 54px; height: 54px; }
  .new-event-dialog > header h2 { font-size: 27px; }
  .event-separation-map { grid-template-columns: 1fr; gap: 8px; margin-top: 20px; }
  .event-separation-map > em { transform: rotate(90deg); justify-self: center; font-size: 17px; }
  .event-separation-map > article { min-height: 90px; }
  .new-event-current { grid-template-columns: 1fr; gap: 4px; }
  .new-event-dialog > footer { flex-direction: column-reverse; }
  .new-event-dialog > footer button { width: 100%; min-height: 45px; }
  .checkin-panel, .flow-panel { padding: 22px 19px; border-radius: 20px; }
  .lookup-form > div { grid-template-columns: 44px 1fr; }
  .lookup-form button { grid-column: 1 / -1; min-height: 43px; margin-top: 5px; }
  .page-title-row { flex-direction: column; }
  .page-title-row h1 { font-size: 45px; }
  .license-form { grid-template-columns: 1fr; padding: 20px; }
  .photo-drop { min-height: 200px; }
  .form-fields { grid-template-columns: 1fr; }
  .pilot-grid { grid-template-columns: 1fr; }
  .list-toolbar { align-items: stretch; flex-direction: column; }
  .draw-summary { grid-template-columns: 1fr; }
  .draw-summary > div { border-right: 0; border-bottom: 1px solid #e8ece9; }
  .groups-board { grid-template-columns: 1fr; }
  .match-row { grid-template-columns: 38px 1fr auto; gap: 9px; padding: 12px; }
  .match-status { grid-column: 2 / 3; }
  .match-row > button { grid-column: 3; grid-row: 1 / span 2; padding: 9px; }
  .match-team-pair { flex-wrap: wrap; gap: 6px; }
  .match-mini-team > b { display: none; }
  .champion-banner { padding: 24px 14px; gap: 14px; }
  .champion-team-avatars img { width: 58px; height: 58px; }
  .license-modal { width: 100%; max-width: 100%; padding: 28px 14px 17px; overflow: hidden; }
  .print-card { width: 100%; min-width: 0; overflow-x: auto; padding-bottom: 8px; }
  .license-preview-label { min-width: 500px; margin-right: 0; }
  .license-sides { grid-template-columns: 500px; width: 500px; }
  .license-card { width: 500px; }
  .license-modal-actions { flex-direction: column; }
  .license-modal-actions > p { margin: 0; text-align: center; }
  .license-modal-actions > button { width: 100%; }
  .match-topbar { height: auto; padding: 10px 13px; }
  .match-brand span { display: none; }
  .match-controls { gap: 5px; }
  .match-controls button { padding: 7px 8px; font-size: 8px; }
  .music-picker-backdrop { padding: 0; }
  .music-picker { width: 100%; max-height: 100vh; height: 100vh; border: 0; border-radius: 0; }
  .music-picker > header { padding: 17px 15px 14px; gap: 10px; }
  .music-picker h2 { font-size: 22px; }
  .music-picker header p { max-width: 230px; font-size: 9px; }
  .music-sound-toggle { padding: 8px; font-size: 0; }
  .music-sound-toggle::first-letter { font-size: 15px; }
  .music-picker-close { width: 32px; height: 32px; }
  .music-picker-scroll { padding: 16px 14px; gap: 20px; }
  .music-choice-grid, .music-choice-grid.climax-grid { grid-template-columns: 1fr; }
  .music-choice { min-height: 92px; }
  .music-picker > footer { padding: 10px 14px; gap: 9px; }
  .music-picker > footer span, .music-picker > footer strong { display: none; }
  .music-picker > footer .primary-button { width: 100%; }
  .timer-zone { padding-top: 28px; }
  .timer-number { font-size: 29vw; }
  .match-screen.crunch .timer-number { font-size: 48vw; }
  .match-screen.final-ten .timer-number { font-size: 70vw; }
  .final-thirty-hud { width: calc(100% - 8px); }
  .final-thirty-entry { inset: 70px 0 70px; }
  .final-thirty-entry span { font-size: 11px; }
  .final-thirty-entry strong { font-size: 29vw; }
  .final-thirty-entry p { padding: 0 20px; font-size: 10px; }
  .final-ten-entry { inset: 70px 0 70px; }
  .final-ten-entry span { font-size: 11px; }
  .final-ten-entry strong { font-size: 34vw; }
  .final-ten-entry p { padding: 0 18px; font-size: 10px; }
  .scoreboard { grid-template-columns: 1fr; overflow: visible; width: calc(100% - 28px); }
  .scoreboard.team-scoreboard { grid-template-columns: 1fr; }
  .score-pilot { min-width: 0; }
  .team-roster .pilot-orb { width: 50px; height: 50px; }
  .match-footer { position: sticky; bottom: 0; grid-template-columns: 76px 1fr; padding: 11px; }
  .start-match-button { min-width: 0; width: 100%; padding: 14px 12px; }
  .secondary-match-button { padding: 12px 7px; }
  .finish-flash { bottom: 74px; }
  .victory-celebration { padding: 12px; }
  .victory-card { padding: 24px 15px 20px; border-radius: 23px; }
  .victory-trophy { font-size: 46px; }
  .victory-card h2 { font-size: 39px; }
  .victory-score { gap: 6px; padding: 10px 8px; }
  .victory-score span { font-size: 8px; }
  .victory-score strong { font-size: 30px; }
  .victory-team > div { width: 70px; }
  .victory-team img { width: 58px; height: 58px; }
  .victory-actions { width: 100%; flex-direction: column; }
  .victory-actions .secondary-match-button, .victory-actions .start-match-button { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

@media print {
  @page { size: A4 portrait; margin: 15mm; }
  .print-license body { background: white !important; }
  .print-license body * { visibility: hidden !important; }
  .print-license .print-card, .print-license .print-card * { visibility: visible !important; }
  .print-license .print-card { position: fixed; inset: 0; display: block; overflow: visible; padding: 18mm 0 0; background: white; }
  .print-license .license-preview-label { display: none; }
  .print-license .license-sides { display: flex; flex-direction: column; gap: 10mm; width: 85.6mm; margin: 0 auto; }
  .print-license .license-card {
    flex: 0 0 auto;
    width: 132.3mm;
    height: 83.5mm;
    margin-right: -46.7mm;
    margin-bottom: -29.52mm;
    transform: scale(0.647);
    transform-origin: top left;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    box-shadow: none;
    border-radius: 4.5mm;
  }
}

/* 站內補充：回營隊首頁連結（沿用 tiny-link 樣式的 <a> 版本） */
a.tiny-link { text-decoration: none; }
.save-state b { font-weight: inherit; }
[hidden] { display: none !important; }
