:root {
  --bg: #070707;
  --shell: #0b0b0b;
  --cream: #f2efe6;
  --gold: oklch(0.78 0.13 88);
  --gold-hot: oklch(0.86 0.12 92);
  --green: #1d8838;
  --green-soft: oklch(0.70 0.16 148);
  --red: oklch(0.62 0.17 30);
  --muted: rgba(242, 239, 230, 0.5);
  --line: rgba(255, 255, 255, 0.12);
  --input-bg: #161616;
  --input-bg-hover: #1c1c1c;
  --option-bg: #121212;
  --font: "Work Sans", system-ui, sans-serif;
  --display: Anton, Impact, sans-serif;
  --pad: clamp(16px, 4vw, 28px);
  --pad-top: max(12px, env(safe-area-inset-top));
  --pad-bottom: max(16px, env(safe-area-inset-bottom));
  --phone-max: 430px;
  --control-max: 1180px;
  --fs-label: clamp(9px, 2.4vw, 11px);
  --fs-body: clamp(14px, 3.6vw, 16px);
  --fs-title: clamp(28px, 9vw, 48px);
  --fs-hero: clamp(44px, 14vw, 76px);
  --fs-rank: clamp(72px, 28vw, 140px);
  --fs-stop: clamp(15px, 4vw, 20px);
  --red-deep: oklch(0.48 0.14 30);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
}
html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.player-body {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
a { color: var(--gold); }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
input, textarea, select, button { max-width: 100%; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold) !important; }
::placeholder { color: rgba(242, 239, 230, 0.38); }

/* Native controls inherit the dark hunt theme (fixes white-on-white option lists) */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]),
textarea,
select {
  background-color: var(--input-bg);
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 0;
  color-scheme: dark;
}
select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px !important;
  cursor: pointer;
}
select:hover,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]):hover,
textarea:hover {
  background-color: var(--input-bg-hover);
}
select option,
select optgroup {
  background-color: var(--option-bg);
  color: var(--cream);
}
select option:checked,
select option:hover,
select option:focus {
  background-color: var(--green);
  color: #fff;
}
input[type="checkbox"],
input[type="radio"] {
  width: 1.15em;
  height: 1.15em;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--green);
  color-scheme: dark;
  cursor: pointer;
  vertical-align: middle;
}
input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  cursor: not-allowed;
  opacity: 0.85;
  accent-color: var(--green-soft);
}
img, video, canvas { max-width: 100%; height: auto; }
img, video { display: block; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes stamp { 0% { transform: scale(1.6); opacity: 0; } 60% { transform: scale(0.96); opacity: 1; } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes scan { 0% { top: 6%; } 50% { top: 90%; } 100% { top: 6%; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes wipe { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes numPop {
  0% { opacity: 0; transform: scaleY(0.45) scaleX(1.12); }
  55% { opacity: 1; transform: scaleY(1.12) scaleX(0.94); }
  100% { opacity: 1; transform: scaleY(1) scaleX(1); }
}
@keyframes wordIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* —— Player shell —— */
.phone {
  min-height: 100dvh;
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  max-width: var(--phone-max);
  margin: 0 auto;
  background: var(--shell);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  container-type: inline-size;
  container-name: phone;
  /* Size type/padding to the phone column, not the desktop viewport */
  --pad: clamp(16px, 5.5cqi, 28px);
  --fs-label: clamp(9px, 2.8cqi, 11px);
  --fs-body: clamp(14px, 4.2cqi, 16px);
  --fs-title: clamp(28px, 10cqi, 48px);
  --fs-hero: clamp(44px, 16cqi, 76px);
  --fs-rank: clamp(72px, 30cqi, 140px);
  --fs-stop: clamp(15px, 4.6cqi, 20px);
}
.phone,
.screen-root,
.phone-pad {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.phone::-webkit-scrollbar,
.screen-root::-webkit-scrollbar,
.phone-pad::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.phone:not(:has(> .screen-root)) {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}
.phone-pad {
  padding: calc(48px + var(--pad-top)) var(--pad) calc(18px + var(--pad-bottom) + var(--cookie-notice-h, 0px));
  animation: fadein 0.5s;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}
.screen-root {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  /* Static so overlays/drawers position against .phone, not this scroller */
  position: static;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  padding-bottom: var(--cookie-notice-h, 0px);
}

/* Pull-to-refresh on GPS check / stops / finale (not lobby).
   Keep the fixed phone shell so overlays stay viewport-bound; only relax
   overscroll containment and let the gesture chain to the document. */
body.player-body.ptr-enabled {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}
.phone.ptr-enabled:not(:has(> .screen-root)),
.phone.ptr-enabled .screen-root,
.phone.ptr-enabled .phone-pad {
  overscroll-behavior-y: auto;
}
.site-footer {
  margin-top: 0;
  padding: 10px 0 calc(18px + var(--pad-bottom));
  text-align: center;
}
.event-foot {
  margin-top: auto;
  padding: 18px var(--pad) 0;
  text-align: center;
  line-height: 1;
}
.event-foot-name {
  font-family: var(--display);
  font-size: clamp(13px, 3.6vw, 17px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 0.85px rgba(212, 175, 55, 0.42);
  paint-order: stroke fill;
  opacity: 0.72;
  line-height: 1.05;
}
.event-foot-meta {
  margin-top: 7px;
  font-family: var(--font);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 239, 230, 0.32);
  line-height: 1;
}
.footer-brand {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(242, 239, 230, 0.4);
}
.footer-legal {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.footer-legal a {
  color: rgba(242, 239, 230, 0.55);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-legal a:hover {
  color: var(--gold);
}
.footer-sep {
  color: rgba(242, 239, 230, 0.25);
}

/* Legal pages */
.legal-shell {
  max-width: 720px;
}
.legal-back {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-soft);
  text-decoration: none;
}
.legal-prose {
  margin-top: 18px;
  color: rgba(242, 239, 230, 0.82);
  font-size: 14px;
  line-height: 1.55;
}
.legal-prose h2 {
  margin: 22px 0 8px;
  font-family: Anton, sans-serif;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--cream);
}
.legal-prose p,
.legal-prose li {
  margin: 0 0 10px;
}
.legal-prose ul {
  padding-left: 1.15em;
  margin: 0 0 12px;
}
.legal-prose a {
  color: var(--gold);
}
.legal-updated {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 12px 0 16px;
}
.legal-table th,
.legal-table td {
  border: 1px solid rgba(242, 239, 230, 0.12);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.legal-table th {
  color: var(--green-soft);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 10px;
}
.legal-table code {
  font-size: 11px;
  color: var(--gold);
}

/* Essential-cookies information banner (not a marketing CMP) */
.cookie-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10050;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: transparent;
  pointer-events: none;
}
.cookie-notice-inner {
  pointer-events: auto;
  max-width: 560px;
  margin: 0 auto;
  /* Extra ~1 line under the copy so text isn't flush to the banner edge */
  padding: 14px 16px calc(14px + 1.45em);
  border: 0;
  background: var(--gold);
  opacity: 1;
  color: #0b0b0b;
  display: flex;
  gap: 14px;
  align-items: center;
  animation: rise 0.35s ease both;
}
@media (max-width: 430px) {
  .cookie-notice-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 14px calc(14px + 1.45em);
  }
  .cookie-notice-btn {
    width: 100%;
  }
}
.cookie-notice-inner p {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #0b0b0b;
  opacity: 1;
}
.cookie-notice-inner strong {
  color: #0b0b0b;
  font-weight: 700;
}
.cookie-notice-inner a {
  color: #0b0b0b;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-notice-btn,
.btn.cookie-notice-btn {
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
  min-height: 44px;
  padding: 12px 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
  border: 2px solid #0b0b0b;
  color: #0b0b0b;
  opacity: 1;
  box-shadow: none;
}
.cookie-notice-btn:hover,
.btn.cookie-notice-btn:hover {
  background: #0b0b0b;
  color: var(--gold);
  border-color: #0b0b0b;
}
.cookie-notice-btn:active,
.btn.cookie-notice-btn:active {
  transform: scale(0.98);
}

/* Google Maps embed consent gate (Game Master) */
.maps-consent-gate {
  padding: 14px;
  border: 1px dashed rgba(242, 239, 230, 0.2);
  background: rgba(0, 0, 0, 0.35);
  font-size: 12px;
  line-height: 1.45;
  color: rgba(242, 239, 230, 0.75);
}
.maps-consent-gate p {
  margin: 0 0 10px;
}
.maps-consent-gate .btn {
  width: 100%;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  padding: calc(10px + var(--pad-top)) var(--pad) 10px;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  gap: 8px 10px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.topbar-play { gap: 8px 10px; }
.topbar-left, .topbar-center, .topbar-right {
  display: flex;
  min-width: 0;
}
.topbar-left {
  grid-column: 1;
  justify-self: start;
  justify-content: flex-start;
  align-items: flex-start;
  align-self: start;
}
.topbar-center {
  grid-column: 2;
  justify-self: center;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  align-self: end;
  gap: 5px;
  flex-shrink: 0;
  width: max-content;
}
.topbar-right {
  grid-column: 3;
  justify-self: end;
  justify-content: flex-end;
  align-items: flex-end;
  align-self: end;
}
.topbar-left-spacer {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.topbar-team-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: end;
  column-gap: 8px;
  row-gap: 3px;
  min-width: 0;
  max-width: min(48vw, 190px);
  position: relative;
}
.topbar-team-row {
  display: contents;
}
.topbar .team-name {
  grid-column: 1;
  grid-row: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
  word-break: break-word;
  min-width: 0;
  text-align: right;
  font-size: 10px;
  letter-spacing: 0.12em;
  line-height: 1.15;
  justify-self: end;
  align-self: end;
}
.topbar-team-block .btn-notif {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: end;
  width: 32px;
  height: 32px;
}
.topbar-score {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-end;
  justify-self: end;
  gap: 0;
  font-family: var(--display);
  line-height: 1;
  letter-spacing: 0.02em;
  background: transparent;
  border-radius: 0;
  padding: 0;
  min-width: 0;
  height: 14px;
  box-sizing: border-box;
}
.topbar-score-digits {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: inherit;
  line-height: 14px;
  height: 14px;
  display: block;
}
.topbar-score-unit {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  align-self: end;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font);
  font-weight: 700;
  opacity: 0.65;
  line-height: 14px;
  height: 14px;
  color: var(--muted);
  padding: 0;
  display: inline-flex;
  align-items: flex-end;
}
.topbar-score.is-pos { color: var(--green-soft); }
.topbar-score.is-neg { color: var(--red); }
.topbar-score.is-zero { color: var(--cream); }
.score-ghosts {
  position: absolute;
  right: 0;
  left: auto;
  top: -2px;
  transform: none;
  pointer-events: none;
}
.score-ghost {
  position: absolute;
  right: 0;
  left: auto;
  top: 0;
  transform: none;
  font-family: var(--display);
  font-size: clamp(12px, 3.2vw, 16px);
  white-space: nowrap;
  animation: score-float 0.95s ease-out forwards;
}
.score-ghost.is-pos { color: var(--green-soft); }
.score-ghost.is-neg { color: var(--red); }
@keyframes score-float {
  0% { opacity: 0; transform: translateY(8px) scale(0.92); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-28px) scale(1); }
}
.timer-roll {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.18em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
  font-family: var(--display);
  font-size: clamp(18px, 5vw, 24px);
  line-height: 1;
  height: auto;
  min-height: 0;
  width: max-content;
  align-self: center;
  text-transform: none;
}
.timer-seg {
  display: inline-flex;
  align-items: baseline;
  gap: 0.1em;
}
.timer-unit {
  display: inline-block;
  flex: 0 0 auto;
  width: 0.78em;
  font-size: 0.52em;
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: lowercase;
  opacity: 0.75;
  text-align: left;
  margin: 0;
  line-height: 1;
}
.timer-digits {
  display: inline-flex;
  gap: 0;
}
.roll-digit {
  display: inline-block;
  overflow: hidden;
  height: 1em;
  line-height: 1;
  width: 0.7em;
  text-align: center;
  flex: 0 0 0.7em;
}
.roll-digit-inner {
  display: inline-block;
  width: 100%;
  text-align: center;
}
.roll-digit.is-roll .roll-digit-inner {
  animation: digit-roll 0.35s cubic-bezier(0.2, 0.85, 0.25, 1);
}
@keyframes digit-roll {
  0% { transform: translateY(0.55em); opacity: 0.15; }
  100% { transform: translateY(0); opacity: 1; }
}
.btn-progress {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  touch-action: manipulation;
  text-align: left;
  max-width: min(42vw, 148px);
}
.btn-progress-icon {
  position: relative;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  margin-top: 0;
}
.btn-progress-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.btn-progress-label {
  font-family: var(--display);
  font-size: clamp(11px, 3vw, 13px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--cream);
  padding-top: 2px;
}
.btn-progress[aria-expanded="true"] .btn-progress-icon {
  border-color: var(--gold);
  color: var(--gold);
  background: color-mix(in oklab, var(--gold) 12%, transparent);
}
.btn-progress[aria-expanded="true"] .btn-progress-label {
  color: var(--gold);
}
.timer {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
  text-transform: none;
}

.label {
  font-size: var(--fs-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.display {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.92;
}
.gold { color: var(--gold); }
.green { color: var(--green-soft); }

.hero-title { font-size: var(--fs-hero); margin-top: 14px; }
.page-title { font-size: var(--fs-title); margin-top: 8px; }

.section-title { font-size: clamp(28px, 8vw, 40px); }
.stop-num {
  font-size: clamp(15px, 4.2vw, 18px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 0.7px var(--gold);
  flex-shrink: 0;
  transform-origin: center bottom;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  height: 1em;
}
.stop-num-word,
.stop-num-val {
  font-size: 1em;
  letter-spacing: 0.1em;
  line-height: 1;
  display: inline-block;
}
.stop-num.intro-pop {
  animation: numPop 0.55s cubic-bezier(0.2, 0.85, 0.25, 1) both;
}
.stop-title {
  font-size: clamp(26px, 7.5vw, 38px);
  margin-top: 6px;
  line-height: 0.95;
}
.rank-num {
  font-size: var(--fs-rank);
  line-height: 0.85;
  margin-top: 10px;
  animation: stamp 0.7s ease-out;
}
.clue-text {
  margin: 22px var(--pad) 0;
  font-size: clamp(15px, 4vw, 17px);
  line-height: 1.5;
  font-weight: 500;
  text-wrap: pretty;
}
.clue-text strong {
  font-weight: 700;
}
.clue-text em {
  font-style: italic;
}
.clue-text u {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.clue-text.clue-words .clue-word {
  display: inline-block;
  opacity: 0;
  animation: wordIn 0.38s ease forwards;
  animation-delay: calc(var(--i) * 0.055s);
}
.clue-glyph {
  margin: 32px var(--pad) 8px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.clue-glyph img.stop-glyph-foot {
  width: auto;
  height: 26px;
  max-width: 132px;
  opacity: 0.9;
  object-fit: contain;
}
.clue-glyph.is-reveal img.stop-glyph-foot {
  animation: glyphMorph 1.05s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: 0.55s;
}
.glyph-scramble-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  font-family: ui-monospace, "Cascadia Code", Menlo, monospace;
  font-size: 15px;
  letter-spacing: 0.18em;
  color: var(--gold);
  opacity: 0.85;
  pointer-events: none;
}
.glyph-scramble-text.is-done {
  animation: fadeout 0.35s ease forwards;
}
@keyframes glyphMorph {
  0% {
    opacity: 0;
    filter: blur(6px) contrast(2.2);
    transform: translateY(8px) scale(0.82) skewX(10deg);
    clip-path: inset(0 92% 0 0);
  }
  45% {
    opacity: 1;
    filter: blur(1px) contrast(1.4);
    transform: translateY(0) scale(1.06) skewX(-6deg);
    clip-path: inset(0 28% 0 0);
  }
  70% {
    filter: none;
    transform: scale(0.97) skewX(2deg);
    clip-path: inset(0 0 0 0);
  }
  100% {
    opacity: 0.9;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}
@keyframes fadeout {
  to { opacity: 0; }
}
.body-text {
  font-size: var(--fs-body);
  line-height: 1.55;
  color: rgba(242, 239, 230, 0.75);
  text-wrap: pretty;
}
.gold-rule {
  height: 1px;
  background: var(--gold);
  margin-top: 18px;
  transform-origin: left;
  animation: wipe 0.8s ease-out;
}

.pad-x { padding-left: var(--pad); padding-right: var(--pad); }
.pad-block { padding: 22px var(--pad) 0; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.lobby-actions {
  gap: 20px;
  margin-top: 22px;
  padding: 0;
  position: static;
  z-index: auto;
  background: none;
}
.row-between {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.stop-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 18px var(--pad) 0;
  min-width: 0;
}
.stop-head-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}
.stop-head-line .stop-area {
  line-height: 1;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.stop-head-meta { padding-bottom: 2px; min-width: 0; flex: 1; }
.stop-head-meta .label {
  line-height: 1.15;
}
.qr-glyph-preview {
  width: auto;
  height: 56px;
  max-width: 220px;
  background: #fff;
  padding: 8px 10px;
  flex-shrink: 0;
  object-fit: contain;
}
.qr-print-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin: 8px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.qr-preview {
  width: 140px;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  background: #fff;
  flex-shrink: 0;
}
.scroll-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 14px;
  padding: 0 var(--pad) 16px;
  min-height: 0;
}
.actions-wrap {
  margin: 28px var(--pad) 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
}
.action-primary {
  width: 100%;
}
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: transparent;
}
.action-grid.action-grid-utility {
  margin-top: 4px;
}
.action-grid button {
  border: 1px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
  padding: 14px 8px;
  background: #0b0b0b;
  color: var(--cream);
  font-weight: 600;
  font-size: clamp(10px, 2.8vw, 11px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  touch-action: manipulation;
  min-height: 44px;
}
.action-grid button:disabled { opacity: 0.35; }
.action-grid button.hint {
  color: rgba(242, 239, 230, 0.78);
  border-color: rgba(255, 255, 255, 0.32);
}
.action-grid button.hint .penalty {
  color: rgba(242, 239, 230, 0.62);
  font-weight: 600;
}
.action-grid button.skip {
  color: var(--red-deep);
  border-color: color-mix(in oklab, var(--red-deep) 65%, transparent);
  font-weight: 800;
}
.action-grid button.skip .penalty {
  color: var(--red-deep);
  font-weight: 800;
}

.btn {
  border: 0;
  cursor: pointer;
  padding: clamp(14px, 3.5vw, 18px) clamp(14px, 4vw, 18px);
  background: var(--gold);
  color: #0b0b0b;
  font-weight: 700;
  font-size: clamp(11px, 3vw, 13px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  touch-action: manipulation;
}
.btn:hover { background: var(--gold-hot); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--cream);
}
.btn-green { background: var(--green); color: #fff; }
.btn-block { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.btn-block.btn-go {
  position: relative;
  justify-content: center;
  text-align: center;
  padding-top: clamp(18px, 4.5vw, 24px);
  padding-bottom: clamp(18px, 4.5vw, 24px);
  padding-left: clamp(40px, 10vw, 52px);
  padding-right: clamp(40px, 10vw, 52px);
}
.btn-block.btn-go .btn-start-label {
  flex: 0 1 auto;
  text-align: center;
  font-size: clamp(22px, 7vw, 32px);
  letter-spacing: 0.12em;
  line-height: 1;
  font-family: var(--display);
  font-weight: 400;
}
.btn-block.btn-go .btn-start-arrow {
  position: absolute;
  right: clamp(14px, 4vw, 18px);
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(16px, 4.5vw, 22px);
  line-height: 1;
}
.btn-sm {
  padding: 6px 10px;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.location-stop {
  margin: 18px var(--pad) 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.map-guide {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(242, 239, 230, 0.68);
  font-weight: 500;
}
.map-lead {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0 8px;
  padding: 0 var(--pad);
}
.location-stop .map-lead {
  margin: 0 0 4px;
  padding: 0;
}
.map-lead .arrive-meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--cream);
  text-transform: none;
  letter-spacing: 0.02em;
}
.map-lead .arrive-meta strong {
  color: var(--gold);
  font-weight: 700;
}
.map-lead .arrive-meta .dist-metric {
  color: rgba(242, 239, 230, 0.55);
  font-weight: 500;
}
.map-section {
  margin: 16px 0 0;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: color-mix(in oklab, var(--cream) 4%, transparent);
}
.map-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px var(--pad);
  border: 0;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  font-family: var(--font);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  touch-action: manipulation;
  min-height: 48px;
}
.map-section-toggle-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.map-section-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
  opacity: 0.9;
}
.map-section-chevron {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
  opacity: 0.7;
  transition: transform 0.28s ease;
}
.map-section.is-open .map-section-chevron {
  transform: rotate(180deg);
}
.map-section .map-collapse {
  padding: 0 var(--pad);
}
.map-section.is-open .map-collapse {
  padding-bottom: 14px;
}
.map-collapse {
  display: grid;
  transition: grid-template-rows 0.42s cubic-bezier(0.2, 0.85, 0.25, 1);
}
.map-collapse.is-open {
  grid-template-rows: 1fr;
}
.map-collapse.is-closed {
  grid-template-rows: 0fr;
}
.map-collapse-inner {
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.map-collapse.is-closed .map-collapse-inner {
  pointer-events: none;
}
.location-stop > .btn-arrive {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.map-toggle {
  display: none;
}
.view-map-row {
  padding: 10px var(--pad) 0;
}
.view-map-row .btn {
  letter-spacing: 0.12em;
}
.btn-arrive {
  position: relative;
  z-index: 1;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease, opacity 0.2s ease;
}
.btn-arrive-ready {
  background: var(--green);
  color: #fff;
  box-shadow:
    0 0 0 0 rgba(29, 136, 56, 0.55),
    0 0 28px rgba(29, 136, 56, 0.45);
  animation: arrive-heartbeat 1.25s ease-in-out infinite;
}
@keyframes arrive-heartbeat {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(29, 136, 56, 0.45),
      0 0 16px rgba(29, 136, 56, 0.35);
  }
  35% {
    transform: scale(1.03);
    box-shadow:
      0 0 0 12px rgba(29, 136, 56, 0),
      0 0 34px rgba(29, 136, 56, 0.7);
  }
  55% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(29, 136, 56, 0.35),
      0 0 20px rgba(29, 136, 56, 0.4);
  }
  75% {
    transform: scale(1.02);
    box-shadow:
      0 0 0 8px rgba(29, 136, 56, 0),
      0 0 28px rgba(29, 136, 56, 0.55);
  }
}
.arrive-meta {
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.map-frame {
  width: 100%;
  height: min(36vh, 270px);
  border: 1px solid var(--line);
  overflow: hidden;
  background: #111;
  position: relative;
  /* Keep Leaflet pane z-indexes (400–1000) inside this frame so Rules/overlays stay on top */
  z-index: 0;
  isolation: isolate;
}
.map-frame iframe,
.map-frame .live-map {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.live-map-frame .leaflet-container {
  z-index: 0;
}
.live-map-frame .leaflet-control-attribution {
  font-size: 9px;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(242, 239, 230, 0.55);
}
.live-map-frame .leaflet-control-attribution a {
  color: var(--gold);
}
/* Darken free OSM tiles without a paid/keyed basemap provider */
.live-map-osm .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9) saturate(0.35);
}
.live-map-osm .leaflet-control-attribution {
  filter: none;
}
.map-pin-you,
.map-pin-target {
  background: transparent;
  border: 0;
}
.map-pin-you span,
.map-pin-target span {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-sizing: border-box;
}
.map-pin-you span {
  width: 18px;
  height: 18px;
  background: #3b82f6;
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.28);
}
.map-pin-target span {
  width: 16px;
  height: 16px;
  background: var(--green);
  border: 2px solid #fff;
  box-shadow: 0 0 12px rgba(29, 136, 56, 0.55);
}
.route-editor-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 8px;
}
.route-map-block {
  min-width: 0;
}
.route-map-note {
  margin: 4px 0 8px;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.35;
}
.route-map-walk {
  margin: 6px 0 2px;
  font-family: var(--display);
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.1;
  color: var(--gold);
}
.route-map-walk.is-loading {
  color: var(--muted);
  font-size: clamp(16px, 3vw, 20px);
}
.route-map-legs {
  margin: 4px 0 6px;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.45;
  color: var(--cream);
  opacity: 0.88;
  max-height: 6.5rem;
  overflow: auto;
}
.route-map {
  width: 100%;
  height: min(42vh, 360px);
  min-height: 220px;
  border: 1px solid var(--line);
  background: #111;
  z-index: 0;
}
.route-map.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}
.route-map .leaflet-container {
  width: 100%;
  height: 100%;
  background: #111;
  font: inherit;
}
.route-map-pin {
  background: transparent;
  border: 0;
}
.route-map-pin span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-family: var(--display);
  font-size: 13px;
  line-height: 1;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(29, 136, 56, 0.35);
}
.route-map-pin-home span {
  width: auto;
  min-width: 36px;
  padding: 0 6px;
  background: var(--gold);
  color: #111;
  font-size: 12px;
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--gold) 45%, transparent);
}
.route-map .leaflet-popup-content {
  margin: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
  color: #111;
}
.route-map .leaflet-popup-content a {
  color: #1D8838;
}
@media (min-width: 900px) {
  .route-editor-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
  }
  .route-map {
    height: 100%;
    min-height: 320px;
    position: sticky;
    top: 12px;
  }
}
.maps-nav-link {
  margin-top: 2px;
}
.gmaps-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.btn-gmaps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid rgba(212, 175, 55, 0.42);
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  color: rgba(242, 239, 230, 0.62);
  background: #0a0a0a;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.4),
    0 0 14px rgba(212, 175, 55, 0.2);
  font-family: var(--font);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: none;
  touch-action: manipulation;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn-gmaps:active {
  transform: scale(0.98);
  color: rgba(242, 239, 230, 0.78);
  border-color: rgba(212, 175, 55, 0.62);
}
.btn-gmaps.is-gps-missing {
  animation: gmaps-glow-breathe 4.2s ease-in-out infinite;
}
.btn-gmaps.is-gps-missing .btn-gmaps-label,
.btn-gmaps.is-gps-missing .btn-gmaps-logo {
  animation: gmaps-label-breathe 4.2s ease-in-out infinite;
}
@keyframes gmaps-glow-breathe {
  0%, 100% {
    border-color: rgba(212, 175, 55, 0.32);
    box-shadow:
      0 6px 18px rgba(0, 0, 0, 0.4),
      0 0 10px rgba(212, 175, 55, 0.14);
  }
  50% {
    border-color: rgba(212, 175, 55, 0.72);
    box-shadow:
      0 6px 18px rgba(0, 0, 0, 0.4),
      0 0 22px rgba(212, 175, 55, 0.38);
  }
}
@keyframes gmaps-label-breathe {
  0%, 100% {
    color: rgba(160, 158, 150, 0.7);
    filter: drop-shadow(0 0 0 transparent);
    opacity: 0.78;
  }
  50% {
    color: var(--gold);
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.55));
    opacity: 1;
  }
}
.btn-gmaps-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
  opacity: 0.72;
}
.btn-gmaps-label {
  line-height: 1.1;
}
.gmaps-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(242, 239, 230, 0.5);
  font-weight: 500;
  text-align: center;
  text-wrap: pretty;
}
.gmaps-hint-link {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  font: inherit;
  font-size: inherit;
  font-weight: 700;
  letter-spacing: inherit;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  touch-action: manipulation;
}
.arrive-meta .gmaps-hint-link {
  display: inline;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.gps-help-panel {
  max-height: min(92dvh, 720px);
}
.gps-help-scroll {
  overflow: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}
.gps-help-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(242, 239, 230, 0.78);
}
.gps-help-map-wrap {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0a0a0a;
  overflow: hidden;
}
.gps-help-map {
  width: 100%;
  height: 180px;
  background: #121212;
}
.gps-help-map .leaflet-container {
  width: 100%;
  height: 100%;
  background: #121212;
}
.gps-help-status {
  margin: 0;
  min-height: 1.2em;
  color: rgba(242, 239, 230, 0.62);
}
.gps-help-panel .access-iphone {
  margin-top: 0;
}
.action-grid-2 {
  grid-template-columns: 1fr 1fr;
}
.maps-pin-row,
.coord-row {
  display: grid;
  gap: 8px;
}
.maps-pin-row {
  grid-template-columns: 1fr auto;
  align-items: end;
}
.coord-row {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 8px;
}
.admin-map-preview {
  margin-top: 12px;
  height: 180px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.admin-map-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field input, .field textarea {
  padding: 15px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--cream);
  font-size: clamp(16px, 4.2vw, 18px);
  font-weight: 600;
  width: 100%;
  color-scheme: dark;
}
.field select {
  padding: 12px;
  background-color: var(--input-bg);
  border: 1px solid var(--line);
  color: var(--cream);
  font-size: clamp(16px, 4.2vw, 18px);
  font-weight: 600;
  width: 100%;
  color-scheme: dark;
}
.field input.event-code {
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.join-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 34px;
}

.banner {
  position: absolute;
  top: calc(48px + var(--pad-top));
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  z-index: 20;
  padding: 12px 14px;
  background: var(--green);
  color: #fff;
  font-size: clamp(12px, 3.2vw, 13px);
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: rise 0.4s ease-out;
  cursor: pointer;
  display: flex;
  gap: 10px;
}

.toast {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  z-index: 55;
  padding: 12px 14px;
  background: var(--green);
  color: #fff;
  font-size: clamp(12px, 3.2vw, 13px);
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: rise 0.35s ease-out;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  pointer-events: auto;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%;
  max-height: min(36vh, 220px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.toast > span {
  min-width: 0;
}
.toast > span:first-child {
  flex: 0 0 auto;
  max-width: 38%;
}
.toast > span:last-child {
  flex: 1 1 auto;
}
.toast.toast-out {
  animation: toastfade 0.35s ease-in forwards;
}
@keyframes toastfade {
  to { opacity: 0; transform: translateY(-8px); }
}

.btn-notif {
  position: relative;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.btn-notif svg {
  width: 20px;
  height: 20px;
  display: block;
}
.btn-notif .notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-soft);
  box-shadow: 0 0 0 2px #0b0b0b;
}
.btn-rules {
  display: inline-flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: rgba(242, 239, 230, 0.88);
  cursor: pointer;
  padding: 0;
  margin: 0;
  border-radius: 0;
  flex-shrink: 0;
  touch-action: manipulation;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  transition: color 0.15s ease;
  line-height: 1;
  width: 100%;
  box-sizing: border-box;
  min-height: 14px;
}
.btn-rules svg {
  width: 14px;
  height: 14px;
  display: block;
  flex-shrink: 0;
  opacity: 0.9;
  align-self: flex-end;
}
.btn-rules span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(242, 239, 230, 0.45);
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-rules:hover {
  color: var(--cream);
}
.btn-rules:hover span {
  text-decoration-color: rgba(242, 239, 230, 0.75);
}
.btn-rules:active {
  color: var(--gold);
}
.btn-rules:active span {
  text-decoration-color: var(--gold);
}

.notif-panel {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: rgba(7, 7, 7, 0.72);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: calc(48px + var(--pad-top)) var(--pad) var(--pad);
  animation: fadein 0.2s ease-out;
}
.notif-sheet {
  background: #121212;
  border: 1px solid rgba(255,255,255,.12);
  max-height: min(70dvh, 520px);
  display: flex;
  flex-direction: column;
  animation: rise 0.3s ease-out;
}
.notif-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.notif-sheet-head h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--cream);
}
.notif-list {
  overflow: auto;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.notif-item:last-child { border-bottom: 0; }
.notif-item .notif-time {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.notif-item .notif-body {
  font-size: 14px;
  line-height: 1.45;
  color: var(--cream);
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.notif-item .notif-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.notif-item .notif-main {
  flex: 1;
  min-width: 0;
}
.notif-thumb-btn {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  cursor: pointer;
}
.notif-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.notif-pts {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.notif-pts-ok { color: var(--green-soft); }
.notif-pts-no { color: var(--red); }
#toast .toast-pts {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
#toast .toast-pts-ok {
  background: color-mix(in oklab, var(--green-soft) 28%, transparent);
  color: #fff;
}
#toast .toast-pts-no {
  background: color-mix(in oklab, var(--red) 28%, transparent);
  color: #fff;
}
.notif-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.ticks {
  display: flex;
  gap: 3px;
  margin: 14px var(--pad) 0;
}
.ticks span { flex: 1; height: 3px; background: rgba(255,255,255,.12); min-width: 0; }
.ticks span.done { background: var(--gold); }
.ticks span.hint { background: oklch(0.55 0.06 88); }
.ticks span.photo-wait { background: oklch(0.70 0.12 80); }
.ticks span.skip { background: var(--red); }
.ticks span.curr { background: var(--green-soft); }

.route-row {
  display: flex;
  align-items: center;
  gap: clamp(10px, 3vw, 16px);
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  width: 100%;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}
button.route-row[data-open="1"] {
  cursor: pointer;
}
button.route-row:disabled {
  opacity: 1;
  cursor: default;
}
.route-row .num {
  font-family: var(--display);
  font-size: clamp(24px, 7vw, 30px);
  width: clamp(36px, 10vw, 44px);
  line-height: 1;
  flex-shrink: 0;
}
.route-row .meta { flex: 1; min-width: 0; }
.route-row .title {
  font-size: clamp(14px, 3.8vw, 15px);
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}
.route-row .tag {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 3px;
}
.route-row-icon {
  flex-shrink: 0;
  min-width: 1em;
  text-align: right;
  color: var(--muted);
}

.progress-panel {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  pointer-events: none;
}
.progress-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(7, 7, 7, 0.55);
  cursor: pointer;
  pointer-events: auto;
  animation: fadein 0.2s ease-out;
  z-index: 0;
}
.progress-drawer {
  position: relative;
  z-index: 1;
  width: min(86%, 340px);
  height: 100%;
  background: #0f0f0f;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  animation: progress-peek 0.32s cubic-bezier(0.2, 0.85, 0.25, 1);
  padding: calc(10px + var(--pad-top)) 0 var(--pad-bottom);
  will-change: transform;
}
@keyframes progress-peek {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}
@keyframes progress-peek-out {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.progress-panel.is-closing {
  pointer-events: none;
}
.progress-panel.is-closing .progress-drawer {
  animation: progress-peek-out 0.28s cubic-bezier(0.4, 0, 0.7, 0.2) forwards;
}
.progress-panel.is-closing .progress-backdrop {
  animation: progress-backdrop-out 0.28s ease forwards;
}
@keyframes progress-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
.progress-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 16px 12px;
}
.progress-drawer-intro {
  min-width: 0;
  max-width: 100%;
  width: fit-content;
}
.btn-progress-x {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  touch-action: manipulation;
}
.btn-progress-x svg {
  width: 18px;
  height: 18px;
  display: block;
}
.btn-sheet-x {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  touch-action: manipulation;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn-sheet-x svg {
  width: 18px;
  height: 18px;
  display: block;
}
.btn-sheet-x:hover {
  color: var(--gold);
  border-color: rgba(212, 175, 55, 0.45);
}
.btn-sheet-x:active {
  transform: scale(0.96);
}
.progress-panel.is-static .progress-drawer,
.progress-panel.is-static .progress-backdrop {
  animation: none;
}
.progress-drawer-list .route-row.is-current .route-row-icon {
  color: var(--cream);
}
.progress-drawer-list .route-row.is-past .route-row-icon {
  opacity: 0.45;
}
.progress-drawer-title {
  font-size: clamp(28px, 8vw, 36px);
  margin-top: 4px;
  line-height: 0.95;
}
.progress-drawer-meta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.progress-drawer-route-name {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(242, 239, 230, 0.62);
  line-height: 1.3;
}
.progress-drawer-walk {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(242, 239, 230, 0.45);
  font-weight: 500;
  line-height: 1.35;
}
.progress-drawer-summary {
  padding: 0 16px 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.progress-drawer-count {
  font-size: clamp(34px, 10vw, 44px);
  line-height: 0.9;
}
.progress-drawer-count span {
  font-size: 0.42em;
  color: var(--muted);
}
.progress-drawer .ticks {
  margin: 0 16px 8px;
}
.progress-drawer-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px 16px;
  min-height: 0;
}
.progress-drawer-list .route-row:last-child {
  border-bottom: 0;
}

.answer-entry {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.answer-wrong {
  display: block;
  margin: 0 0 2px;
  padding: 0;
  color: #ff4d4d;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-transform: none;
}
.actions-wrap .answer-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
}
.actions-wrap .answer-row input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  min-height: 56px;
  box-sizing: border-box;
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-right: 0;
  color: var(--cream);
  font-size: 16px; /* avoids iOS zoom */
  color-scheme: dark;
  line-height: 1.25;
}
.actions-wrap .answer-row .btn-submit-answer {
  border: 0;
  cursor: pointer;
  flex: 0 0 auto;
  min-width: 76px;
  width: 76px;
  align-self: stretch;
  height: auto;
  min-height: 56px;
  box-sizing: border-box;
  padding: 6px 8px;
  background: var(--gold);
  color: #0b0b0b;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  touch-action: manipulation;
  font-family: var(--font);
}
.btn-submit-arrow {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}
.btn-submit-text {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
  text-align: center;
}
.answer-row { display: flex; gap: 0; width: 100%; }
.answer-row input {
  flex: 1;
  min-width: 0;
  padding: 16px;
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-right: 0;
  color: var(--cream);
  font-size: 16px; /* avoids iOS zoom */
  color-scheme: dark;
}
.answer-row button {
  border: 0;
  cursor: pointer;
  width: 58px;
  flex-shrink: 0;
  background: var(--gold);
  color: #0b0b0b;
  font-weight: 700;
  font-size: 18px;
  touch-action: manipulation;
}
.action-grid button:disabled { opacity: 0.35; }

/* legacy duplicate block removed — see earlier .action-grid */

.overlay {
  position: absolute;
  inset: 0;
  /* Above Leaflet (≤1000), below cookie notice (10050) */
  z-index: 5000;
  background: rgba(7,7,7,.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) var(--pad) max(16px, env(safe-area-inset-bottom));
  animation: fadein .25s;
}
.sheet {
  width: 100%;
  max-width: 420px;
  max-height: min(85dvh, 640px);
  overflow-y: auto;
  background: #141414;
  border-top: 2px solid var(--gold);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: rise .35s ease-out;
  position: relative;
  z-index: 1;
}
.sheet.confirm-sheet {
  gap: 16px;
  text-align: center;
}
.sheet.confirm-hint {
  border-top-color: rgba(242, 239, 230, 0.55);
}
.sheet.confirm-skip {
  border-top-color: var(--red-deep);
}
.confirm-title {
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.05;
  text-wrap: balance;
  color: var(--cream);
}
.confirm-hint .confirm-title {
  color: rgba(242, 239, 230, 0.92);
}
.confirm-skip .confirm-title {
  color: color-mix(in oklab, var(--cream) 82%, var(--red-deep));
}
.confirm-penalty {
  margin: 2px 0 0;
  font-size: clamp(14px, 3.6vw, 16px);
  line-height: 1.45;
  color: rgba(242, 239, 230, 0.72);
  text-wrap: balance;
}
.confirm-penalty-num {
  color: var(--red);
  font-family: var(--display);
  font-size: clamp(28px, 8vw, 40px);
  letter-spacing: 0.02em;
  line-height: 1;
  display: inline-block;
  padding: 0 0.12em;
  vertical-align: -0.12em;
}
.confirm-note {
  margin: -4px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(242, 239, 230, 0.5);
}
.confirm-score-box {
  margin-top: 2px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
  text-align: left;
}
.confirm-hint .confirm-score-box {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
}
.confirm-skip .confirm-score-box {
  border-color: color-mix(in oklab, var(--red-deep) 45%, transparent);
  background: color-mix(in oklab, var(--red-deep) 8%, transparent);
}
.confirm-score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 12px 14px;
}
.confirm-score-row + .confirm-score-row {
  border-top: 1px solid var(--line);
}
.confirm-hint .confirm-score-row + .confirm-score-row {
  border-top-color: rgba(255, 255, 255, 0.12);
}
.confirm-skip .confirm-score-row + .confirm-score-row {
  border-top-color: color-mix(in oklab, var(--red-deep) 28%, transparent);
}
.confirm-score-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(242, 239, 230, 0.55);
}
.confirm-score-value {
  font-family: var(--display);
  font-size: clamp(22px, 6vw, 28px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}
.confirm-score-after .confirm-score-value {
  color: var(--red);
}
.confirm-hint .confirm-score-after {
  background: rgba(255, 255, 255, 0.03);
}
.confirm-skip .confirm-score-after {
  background: color-mix(in oklab, var(--red-deep) 12%, transparent);
}
.btn.btn-confirm-hint {
  background: rgba(242, 239, 230, 0.92);
  color: #0b0b0b;
}
.btn.btn-confirm-hint:hover {
  background: #fff;
}
.btn.btn-confirm-skip {
  background: var(--red-deep);
  color: #fff;
}
.btn.btn-confirm-skip:hover {
  background: color-mix(in oklab, var(--red-deep) 82%, #000);
}
.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.sheet-bottom {
  position: absolute;
  inset: 0;
  z-index: 5000;
  background: rgba(7,7,7,.7);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.sheet-bottom .panel {
  background: #141414;
  border-top: 1px solid var(--gold);
  padding: 24px var(--pad) calc(34px + var(--pad-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: rise .4s ease-out;
  max-height: 90dvh;
  overflow-y: auto;
}
.camera-wrap {
  position: relative;
  width: 100%;
}
.camera-wrap video {
  width: 100%;
  height: clamp(180px, 40vh, 280px);
  object-fit: cover;
  background: #000;
  border: 1px dashed rgba(255, 200, 80, 0.4);
}

/* Full-screen photo capture / review — fills the phone shell, no scroll */
.photo-cam-overlay {
  position: absolute;
  inset: 0;
  z-index: 5000;
  background: #000;
  overflow: hidden;
  display: block;
}
.photo-cam-overlay .photo-cam-video,
.photo-cam-overlay #photo-preview,
.photo-cam-overlay .photo-cam-review-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  background: #000;
  border: 0;
}
.photo-cam-video.is-mirrored {
  transform: scaleX(-1);
}
.photo-cam-scrim {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 1;
}
.photo-cam-scrim-top {
  top: 0;
  height: 28%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent);
}
.photo-cam-scrim-bottom {
  bottom: 0;
  height: 32%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent);
}
.photo-cam-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + var(--pad-top)) var(--pad) 0;
}
.photo-cam-copy {
  min-width: 0;
  flex: 1;
}
.photo-cam-prompt {
  margin-top: 6px;
  font-size: var(--fs-body);
  line-height: 1.35;
  color: var(--cream);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.photo-cam-cancel {
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(8px);
}
.photo-cam-status {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: calc(118px + var(--pad-bottom));
  z-index: 2;
  text-align: center;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}
.photo-cam-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 var(--pad) calc(22px + var(--pad-bottom));
}
.photo-cam-flip {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px !important;
  background: rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(8px);
}
.photo-cam-flip svg {
  display: block;
  flex-shrink: 0;
}
.photo-cam-flip-spacer {
  width: 1px;
  height: 1px;
  justify-self: end;
}
.photo-cam-shutter {
  justify-self: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 3px solid rgba(242, 239, 230, 0.95);
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  touch-action: manipulation;
}
.photo-cam-shutter-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.12s ease;
}
.photo-cam-shutter:active .photo-cam-shutter-ring {
  transform: scale(0.9);
}
.photo-cam-shutter:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.photo-cam-review-controls {
  grid-template-columns: 1fr 1fr;
}
.photo-cam-review-controls .btn {
  width: 100%;
  background: rgba(212, 175, 55, 0.95);
}
.photo-cam-review-controls .btn-ghost {
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(8px);
  border-color: rgba(255, 255, 255, 0.35);
}

.photo-review-img {
  width: 100%;
  max-height: min(70vh, 640px);
  height: auto;
  object-fit: contain;
  object-position: center;
  background: #000;
  border: 1px solid var(--line);
  display: block;
}
.photo-thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  margin: 10px 0 12px;
  border: 0;
  background: #000;
  cursor: zoom-in;
  position: relative;
  text-align: center;
}
.photo-thumb-btn .photo-thumb-hint {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: #0b0b0b;
  background: var(--gold);
  pointer-events: none;
}
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.92);
  box-sizing: border-box;
}
.photo-lightbox.is-open {
  display: flex;
}
.photo-lightbox img {
  max-width: min(100%, 1100px);
  max-height: calc(100dvh - 48px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #000;
}
.photo-lightbox-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 1;
}
#scan-status, #camera-status, #photo-send-status {
  text-align: center;
  margin: 0;
}

.scan-overlay {
  position: absolute;
  inset: 0;
  z-index: 5000;
  background: rgba(7,7,7,.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: var(--pad);
}
.scan-frame {
  width: min(220px, 70cqi);
  height: min(220px, 70cqi);
  border: 1px solid var(--gold);
  position: relative;
  overflow: hidden;
  background: #000;
}
.scan-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scan-line {
  position: absolute;
  left: 6%; right: 6%;
  height: 2px;
  background: var(--green-soft);
  box-shadow: 0 0 16px var(--green-soft);
  animation: scan 1.6s ease-in-out infinite;
  pointer-events: none;
}
.scan-wrong-popup {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pad);
  background: rgba(7, 7, 7, 0.72);
  animation: fadein 0.2s;
}
.scan-wrong-popup.hidden { display: none; }
.scan-wrong-card {
  width: min(340px, 100%);
  background: #121212;
  border: 1px solid var(--line);
  padding: 22px 18px;
  text-align: left;
}

.reveal-stamp {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: var(--gold);
  color: #0b0b0b;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: max(20px, env(safe-area-inset-top)) var(--pad) max(24px, env(safe-area-inset-bottom));
  animation: fadein .25s;
  cursor: pointer;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.reveal-stamp-inner {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.reveal-stamp.reveal-skip {
  background: var(--red);
  color: var(--cream);
}
.reveal-stamp.reveal-skip .reveal-rule {
  background: var(--cream);
}
.reveal-stamp.reveal-photo {
  background: var(--cream);
}
.reveal-stamp .reveal-outcome {
  font-family: var(--display);
  font-size: clamp(28px, 8.5vw, 48px);
  line-height: 1.05;
  margin-top: 8px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.reveal-stamp .reveal-kicker,
.reveal-stamp .reveal-tap,
.reveal-stamp .label {
  color: inherit;
  opacity: 0.72;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.reveal-rule {
  height: 2px;
  background: #0b0b0b;
  margin-top: 20px;
  transform-origin: left;
  max-width: 100%;
}
.reveal-pts {
  font-size: clamp(18px, 5vw, 26px);
  font-weight: 700;
  margin-top: 16px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.reveal-answer {
  margin-top: 14px;
  text-align: center;
  max-width: 100%;
}
.reveal-answer-text {
  margin-top: 6px;
  font-size: clamp(20px, 5.5vw, 32px);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.reveal-answer-info {
  margin-top: 8px;
  opacity: 0.85;
  font-size: 14px;
  line-height: 1.4;
}
.reveal-stamp .display {
  font-size: clamp(28px, 8.5vw, 48px);
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.reveal-stamp .stop-title {
  font-size: clamp(16px, 4.4vw, 24px);
  line-height: 1.15;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hint-box {
  margin: 14px var(--pad) 0;
  padding: 12px 14px;
  border-left: 2px solid var(--green-soft);
  color: var(--green-soft);
  font-size: 13px;
  line-height: 1.5;
}
.hint-box.hint-box-enter {
  animation: rise .4s;
}

/* Rules panel — dark sheet matching the player UI */
.overlay.rules-overlay {
  background: rgba(7, 7, 7, 0.88);
  padding: max(18px, env(safe-area-inset-top)) var(--pad) max(18px, env(safe-area-inset-bottom));
}
.rules-panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: min(88dvh, 680px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%),
    #0f0f0f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.65);
  animation: rise 0.35s ease-out;
  min-height: 0;
}
.rules-panel-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}
.rules-panel::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--green));
  opacity: 0.9;
}
.rules-panel-header {
  text-align: left;
  padding: 0 40px 2px 8px;
}
.rules-panel-kicker {
  color: var(--green-soft);
  letter-spacing: 0.2em;
}
.rules-panel-title {
  margin-top: 6px;
  font-size: clamp(28px, 8vw, 38px);
  color: var(--cream);
  line-height: 0.95;
}
.rules-panel-rule {
  height: 1px;
  width: 56%;
  margin: 12px 0 0;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.rules-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  color: rgba(242, 239, 230, 0.82);
  font-size: 14px;
  line-height: 1.55;
  padding: 2px 2px 4px 8px;
  text-align: left;
}
.rules-time-system {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: rgba(212, 175, 55, 0.08);
  border-left: 2px solid var(--gold);
}
.rules-time-system-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(242, 239, 230, 0.55);
}
.rules-time-system-name {
  font-family: var(--display);
  font-size: clamp(18px, 5vw, 22px);
  letter-spacing: 0.04em;
  color: var(--gold);
  line-height: 1.1;
}
.rules-panel .rules-list,
.rules-body .rules-list,
.rules-body ul,
.rules-body ol {
  margin: 0 0 12px;
  padding-left: 1.15em;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(242, 239, 230, 0.82);
}
.rules-panel .rules-list li + li,
.rules-body .rules-list li + li,
.rules-body li + li { margin-top: 7px; }
.rules-panel .rules-list em,
.rules-panel .rules-list strong,
.rules-body em,
.rules-body strong {
  color: var(--gold);
  font-style: normal;
  font-weight: 700;
}
.rules-panel h3,
.rules-body h3,
.rules-body h2 {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 14px 0 8px;
  color: var(--cream);
}
.rules-panel h3:first-child,
.rules-body h3:first-child,
.rules-body h2:first-child { margin-top: 0; }
.rules-panel .body-text,
.rules-body p,
.rules-body .body-text {
  color: rgba(242, 239, 230, 0.78);
  margin: 0 0 10px;
}
.rules-body a {
  color: var(--green-soft);
}
.btn.btn-rules-done {
  width: 100%;
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(255, 255, 255, 0.28);
  margin-top: 2px;
  flex-shrink: 0;
  margin-left: 8px;
  width: calc(100% - 8px);
}
.btn.btn-rules-done:hover,
.btn.btn-rules-done:active {
  border-color: var(--gold);
  color: var(--gold);
  background: color-mix(in oklab, var(--gold) 10%, transparent);
}

/* Legacy booklet selectors (inactive) */
.rules-booklet { display: none; }

/* Legacy sheet rules (unused booklet path keep-alive) */
.sheet.rules-sheet {
  gap: 12px;
  background: #0f0f0f;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
.sheet .rules-list {
  margin: 0 0 14px;
  padding-left: 1.15em;
  font-size: 15px;
  line-height: 1.5;
  color: var(--cream);
}
.sheet .rules-list li + li { margin-top: 8px; }
.sheet .rules-list em,
.sheet .rules-list strong { color: var(--gold); font-style: normal; font-weight: 700; }
.sheet h3 {
  font-family: var(--font-display), Anton, sans-serif;
  font-size: 17px;
  letter-spacing: 0.02em;
  margin: 16px 0 8px;
  color: var(--gold);
}
.sheet h3:first-child { margin-top: 0; }
.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0 0 12px;
}
.rules-table th,
.rules-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--cream);
}
.rules-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.rules-table td:last-child,
.rules-table th:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  white-space: nowrap;
}
.rules-note {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0;
}
.reject-box {
  margin: 14px var(--pad) 0;
  padding: 12px 14px;
  border-left: 2px solid var(--red);
  color: oklch(0.76 0.13 30);
  font-size: 13px;
}
.pending-box {
  margin: 16px var(--pad);
  padding: 16px;
  border: 1px solid var(--gold);
  animation: pulse 2.4s ease-in-out infinite;
}
.finale {
  padding: clamp(48px, 12vw, 90px) var(--pad) 0;
  animation: fadein .8s;
  flex: 1;
}
.event-description {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(242, 239, 230, 0.88);
}
.event-start-notes {
  opacity: 0.85;
  font-size: 13px;
}
.finale-ranking-note {
  margin-top: 14px;
  color: var(--gold);
  font-weight: 600;
}
.finale-place {
  margin-top: 22px;
  padding: 18px 0 8px;
  border-top: 1px solid var(--line);
}
.finale-place-num {
  font-size: clamp(48px, 16vw, 88px);
  line-height: 0.95;
  color: var(--gold);
  margin-top: 6px;
}
.finale-place.is-first .finale-place-num {
  color: var(--green);
}
.finale-place-sub {
  margin-top: 10px;
  opacity: 0.9;
}
.finale-standings .standings-row.is-you {
  color: var(--cream);
  background: color-mix(in oklab, var(--gold) 10%, transparent);
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
}
.results-panel {
  margin-top: 22px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--line);
}
.results-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.results-row.is-incomplete {
  opacity: 0.72;
}
.results-rank {
  font-family: "Anton", Impact, sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
  color: var(--gold);
  min-width: 3.2ch;
}
.results-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
  font-size: 13px;
}
.results-stats .label {
  margin-right: 4px;
}
.thanks-block {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.thanks-block .body-text {
  margin: 0;
  line-height: 1.55;
}
.thanks-link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.answer-row {
  align-items: flex-start;
}
.answer-num {
  display: inline-block;
  min-width: 1.6em;
  margin-right: 4px;
  color: var(--gold);
  font-weight: 700;
}
.answer-detail {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: none;
  font-weight: 500;
}
.standings-list { margin-top: 24px; }
.standings-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.metrics-block {
  margin-top: 22px;
  padding-top: 4px;
}
.metrics-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-bottom: 8px;
}
.metric-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.metric-chip span:last-child {
  font-family: "Anton", sans-serif;
  font-size: clamp(20px, 5vw, 26px);
  letter-spacing: 0.02em;
  color: var(--cream);
}
.metrics-list {
  margin-top: 8px;
  max-height: 40vh;
  overflow: auto;
}
.metrics-row span:first-child {
  color: var(--muted);
  font-size: 13px;
}
.note-box {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.sent-note-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.sent-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(0,0,0,.06);
}
.access-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  border: 1px solid var(--line);
}
.access-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.access-list li:last-child { border-bottom: 0; }
.access-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.access-why {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(242, 239, 230, 0.78);
}
.access-perm-status {
  margin-top: 2px;
  min-height: 1.2em;
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.access-perm-status:not(:empty) {
  color: var(--muted);
}
.access-troubleshoot {
  margin-top: 16px;
}
.access-tip {
  margin-top: 14px;
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1.45;
  color: var(--muted);
}
.access-gate {
  padding-top: calc(28px + var(--pad-top));
}
.access-iphone {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0;
}
.access-iphone summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  touch-action: manipulation;
}
.access-iphone > summary::-webkit-details-marker { display: none; }
.access-iphone > summary::after {
  content: '+';
  float: right;
  color: var(--gold);
}
.access-iphone[open] > summary::after { content: '–'; }
.gps-help-body {
  padding: 0 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gps-os {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
}
.gps-os summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(242, 239, 230, 0.9);
  touch-action: manipulation;
}
.gps-os > summary::-webkit-details-marker { display: none; }
.gps-os > summary::after {
  content: '+';
  float: right;
  color: var(--gold);
}
.gps-os[open] > summary::after { content: '–'; }
.access-iphone-steps {
  margin: 0;
  padding: 0 14px 14px 32px;
  color: rgba(242, 239, 230, 0.78);
  font-size: 13px;
  line-height: 1.5;
}
.access-iphone-steps li {
  margin: 0 0 8px;
}
.access-iphone-steps li:last-child { margin-bottom: 0; }
.gps-check-map-wrap {
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0a0a0a;
  overflow: hidden;
}
.gps-check-map {
  width: 100%;
  height: min(42vh, 280px);
  min-height: 200px;
  background: #121212;
}
.gps-check-map .leaflet-container {
  width: 100%;
  height: 100%;
  background: #121212;
}
.gps-check-note {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(242, 239, 230, 0.78);
}

.hidden { display: none !important; }
.shake { animation: shake 0.35s ease-in-out; }
.err { color: oklch(0.76 0.13 30); font-size: 12px; }
.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}

/* —— Control room —— */
body:has(> .control) {
  overflow-x: hidden;
}
.control {
  width: 100%;
  max-width: var(--control-max);
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) clamp(14px, 3vw, 28px) calc(40px + env(safe-area-inset-bottom));
}
.control-top {
  margin-bottom: 14px;
}
.event-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0;
  margin-top: 12px;
  padding-left: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.event-tab {
  font-family: var(--display);
  font-size: clamp(18px, 4.2vw, 28px);
  letter-spacing: 0.02em;
  line-height: 1.1;
  padding: 12px 16px 10px;
  min-height: 44px;
  margin-right: 4px;
  margin-bottom: -1px;
  border: 1px solid transparent;
  border-bottom-color: transparent;
  background: transparent;
  color: rgba(242, 239, 230, 0.5);
  cursor: pointer;
  touch-action: manipulation;
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  white-space: nowrap;
}
.event-tab:hover {
  color: var(--cream);
  border-color: rgba(255, 255, 255, 0.18);
  border-bottom-color: transparent;
}
.event-tab.active {
  color: var(--gold);
  border-color: var(--gold);
  border-bottom-color: var(--bg);
  background: var(--bg);
  z-index: 3;
}
.event-tab.is-archived {
  opacity: 0.55;
  font-style: italic;
}
.event-tab-add {
  width: 40px;
  height: 40px;
  min-height: 40px;
  margin: 0 0 4px 6px;
  padding: 0;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--cream);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  align-self: center;
}
.event-tab-add:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.event-tabs .btn-ghost {
  margin: 0 0 6px 8px;
  align-self: center;
}
.control-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 16px 0 18px;
  border-top: 1px solid var(--gold);
  margin-bottom: 18px;
}
.control-header-main {
  min-width: min(100%, 280px);
  flex: 1 1 240px;
}
.control-title { font-size: clamp(32px, 8vw, 54px); margin-top: 2px; }
.control-event-meta {
  margin-top: 4px;
  text-transform: none;
  letter-spacing: 0.02em;
  opacity: 0.9;
}
.event-empty-hint {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}
.event-manage {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 0;
  max-width: 560px;
}
.event-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.event-code-row .label {
  display: block;
  margin-bottom: 6px;
}
.event-code-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.event-code-edit input {
  flex: 1;
  min-width: 140px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 18px;
  font-weight: 700;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--cream);
}
.event-code-hint {
  margin-top: 6px;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.8;
}
.event-join-qr {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.event-join-qr > .label {
  margin-bottom: 8px;
}
.event-join-qr-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
}
.event-join-qr-img {
  width: 148px;
  height: auto;
  aspect-ratio: 74 / 105;
  flex: 0 0 auto;
  background: #fff;
  border-radius: 4px;
  object-fit: contain;
  image-rendering: auto;
}
.event-join-qr-meta {
  flex: 1 1 180px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.event-join-qr-blurb {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  opacity: 0.85;
  line-height: 1.35;
}
.event-join-url {
  color: var(--gold);
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-decoration: underline;
  text-underline-offset: 2px;
  max-width: 100%;
}
.event-join-qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.event-desc-row .label {
  display: block;
  margin-bottom: 4px;
}
.event-desc-hint {
  margin: 0 0 8px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  opacity: 0.8;
}
.event-desc-row textarea {
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;
  background-color: var(--input-bg);
  border: 1px solid var(--line);
  color: var(--cream);
  font-size: 15px;
  line-height: 1.45;
  resize: vertical;
  min-height: 96px;
  color-scheme: dark;
}
.control-stats {
  display: flex;
  gap: clamp(16px, 4vw, 28px);
  align-items: flex-end;
  flex-wrap: wrap;
  padding-top: 8px;
}
.live-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 10px;
}
.live-toolbar .live-controls {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}
.live-stats {
  flex: 0 0 auto;
  padding-top: 0;
  margin-left: auto;
  gap: clamp(14px, 3vw, 24px);
}
.live-stats .stat span:last-child {
  font-size: clamp(20px, 4.5vw, 28px);
}
@media (max-width: 720px) {
  .live-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .live-stats {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }
}
.stat { display: flex; flex-direction: column; min-width: 64px; }
.stat span:first-child {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.stat span:last-child {
  font-family: var(--display);
  font-size: clamp(22px, 5vw, 30px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.live-controls {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 10px;
  width: 100%;
}
.live-ctrl {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 3px;
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: 104px;
  min-height: 96px;
  padding: 10px 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  touch-action: manipulation;
  text-align: left;
}
.live-ctrl:hover {
  border-color: rgba(255, 255, 255, 0.4);
}
.live-ctrl.is-on {
  border-color: var(--green);
  color: #fff;
  background: color-mix(in oklab, var(--green) 22%, transparent);
}
.live-ctrl.is-on.is-pause {
  border-color: oklch(0.72 0.12 75);
  background: color-mix(in oklab, oklch(0.72 0.12 75) 18%, transparent);
}
.live-ctrl.is-on.is-reveal {
  border-color: var(--gold);
  background: color-mix(in oklab, var(--gold) 16%, transparent);
  color: var(--cream);
}
.live-ctrl:disabled,
.live-ctrl.is-locked {
  opacity: 0.38;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
}
.live-ctrl:disabled:hover,
.live-ctrl.is-locked:hover {
  border-color: rgba(255, 255, 255, 0.1);
}
.live-ctrl-ico {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 2px;
}
.live-ico {
  width: 20px;
  height: 20px;
  display: block;
}
.live-ctrl-label {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.live-ctrl-hint {
  display: block;
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.3;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}
.live-ctrl.is-on .live-ctrl-hint {
  color: rgba(255, 255, 255, 0.75);
}
.live-controls-note {
  margin: 0 0 18px;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.4;
}
.live-ops {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 22px;
}
.live-board-grid {
  margin-top: 4px;
}

/* Connected tab strip + outlined panel */
.control-workspace {
  margin-top: 4px;
}
.tabs {
  display: flex;
  gap: 0;
  margin: 0;
  flex-wrap: nowrap;
  padding: 0 8px;
  position: relative;
  z-index: 2;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.tabs button {
  border: 1px solid transparent;
  cursor: pointer;
  padding: 10px 12px 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  color: rgba(242, 239, 230, 0.55);
  touch-action: manipulation;
  min-height: 52px;
  margin: 0 4px -1px 0;
  border-radius: 0;
  position: relative;
  text-align: left;
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-start;
  flex: 0 0 auto;
}
.tabs button .tab-label {
  display: block;
  text-align: left;
  line-height: 1.2;
  white-space: normal;
}
.tabs button .tab-live-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff2d2d;
  box-shadow:
    0 0 0 2px color-mix(in oklab, var(--bg) 75%, #111),
    0 0 8px rgba(255, 45, 45, 0.85);
  animation: pulse 1.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 4;
}
.tabs button:hover {
  color: var(--cream);
  border-color: rgba(255, 255, 255, 0.18);
  border-bottom-color: transparent;
}
.tabs button.active {
  background: var(--bg);
  color: var(--gold);
  border-color: var(--gold);
  border-bottom-color: var(--bg);
  z-index: 3;
}
.tabs.tabs-outline {
  gap: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.tabs.tabs-outline button {
  background: transparent;
  color: rgba(242, 239, 230, 0.55);
  border: 1px solid transparent;
  border-radius: 0;
}
.tabs.tabs-outline button:hover {
  color: var(--cream);
  border-color: rgba(255, 255, 255, 0.18);
  border-bottom-color: transparent;
}
.tabs.tabs-outline button.active {
  background: var(--bg);
  color: var(--gold);
  border-color: var(--gold);
  border-bottom-color: var(--bg);
}
.tab-panels {
  border: 1px solid var(--gold);
  padding: clamp(16px, 3vw, 22px);
  min-height: 220px;
  position: relative;
  z-index: 1;
  background: color-mix(in oklab, var(--bg) 92%, #111);
}
.tab-panel {
  animation: tab-panel-in 180ms ease-out;
}
@keyframes tab-panel-in {
  from { opacity: 0.55; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.control-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.board-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px 14px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
.board-main {
  min-width: 0;
}
.board-row .board-score {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
.board-row .board-score .score-val {
  text-align: left;
}
.board-row .board-score .reset-team {
  margin-left: auto;
  flex-shrink: 0;
}
.board-rank {
  font-family: var(--display);
  font-size: clamp(32px, 8vw, 44px);
  line-height: 0.9;
  color: var(--gold);
}
.board-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  flex-wrap: wrap;
  font-size: clamp(13px, 3.2vw, 15px);
}
.board-meta .board-route {
  color: var(--gold);
  font-weight: 600;
}
.board-cells {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(36px, 1fr));
  gap: 4px;
  margin-top: 10px;
}
.board-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: stretch;
}
.board-cells i,
.board-cell > i {
  display: block;
  height: 8px;
  background: rgba(255,255,255,.12);
  min-width: 0;
}
.board-cell-title {
  display: block;
  font-size: 8px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  max-width: 100%;
}
.score-val {
  min-width: 72px;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(20px, 4vw, 24px);
}
.team-delete-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.team-delete-dialog {
  width: min(420px, 100%);
  background: var(--bg, #14120f);
  border: 1px solid var(--line, rgba(255,255,255,.18));
  padding: 20px;
  box-shadow: 0 18px 48px rgba(0,0,0,.45);
}
.team-delete-dialog h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}
.team-delete-dialog p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255,255,255,.78);
}
.team-delete-dialog label {
  display: block;
  margin-bottom: 8px;
}
.team-delete-dialog input {
  width: 100%;
  margin-bottom: 16px;
  padding: 10px 12px;
  font: inherit;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18);
  color: inherit;
}
.team-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.team-delete-actions [data-act="delete"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.panel-box {
  border: 1px solid var(--line);
  padding: clamp(12px, 3vw, 16px);
  margin-bottom: 16px;
}
.tab-panels .panel-box {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 0;
  margin-bottom: 0;
  background: transparent;
}
.tab-panels .panel-box:first-child {
  border-top: none;
  padding-top: 0;
}
.tab-panels .photo-card {
  border-left: none;
  border-right: none;
  border-radius: 0;
}
.panel-box h3 {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.photo-card {
  border: 1px solid var(--gold);
  padding: 14px;
  margin-bottom: 12px;
}
.photo-card img {
  width: 100%;
  max-height: min(70vh, 640px);
  object-fit: contain;
  background: #111;
}
.photo-bank-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.photo-bank-title {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.photo-bank-blurb {
  margin: 8px 0 0;
  max-width: 36rem;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(242, 239, 230, 0.72);
}
.photo-bank-actions .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.photo-bank-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.photo-bank-filters .bank-filter.is-on {
  color: var(--gold);
  border-color: var(--gold);
}
.photo-bank-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 720px) {
  .photo-bank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .photo-bank-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.bank-card {
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 80%, #101010);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bank-card .bank-thumb {
  border-radius: 0;
}
.bank-card .photo-review-img {
  max-height: 220px;
  width: 100%;
  object-fit: cover;
  background: #111;
}
.bank-card-meta {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.bank-card-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--cream);
}
.bank-status {
  display: inline-block;
  align-self: flex-start;
  margin-top: 8px;
  margin-bottom: 6px;
  padding: 3px 8px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: rgba(242, 239, 230, 0.7);
}
.bank-status-pending {
  border-color: oklch(0.70 0.12 80);
  color: oklch(0.82 0.12 88);
}
.bank-status-approved {
  border-color: var(--green, #1D8838);
  color: #7dcea0;
}
.bank-status-rejected {
  border-color: var(--red, #c45c5c);
  color: #e8a0a0;
}
.bank-msg {
  margin-bottom: 6px;
  opacity: 0.85;
}
.bank-card .bank-dl {
  margin-top: auto;
  align-self: stretch;
}
.photo-card .photo-msg,
.panel-box input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.panel-box textarea,
.panel-box select,
.q-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.q-card textarea,
.q-card select,
.control input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.control textarea,
.control select {
  width: 100%;
  margin: 6px 0 10px;
  padding: 12px;
  background-color: var(--input-bg);
  border: 1px solid var(--line);
  color: var(--cream);
  font-size: 16px;
  color-scheme: dark;
}
.panel-box select,
.q-card select,
.control select {
  padding-right: 36px;
}

/* Custom dropdown — native option hover is OS blue and unreadable on dark UI */
.theme-select {
  position: relative;
  width: 100%;
  margin: 6px 0 10px;
}
.theme-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.theme-select-trigger {
  width: 100%;
  margin: 0;
  padding: 12px 36px 12px 12px;
  text-align: left;
  font: inherit;
  font-size: 16px;
  color: var(--cream);
  background-color: var(--input-bg);
  border: 1px solid var(--line);
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.theme-select-trigger:hover,
.theme-select.is-open .theme-select-trigger {
  background-color: var(--input-bg-hover);
  border-color: var(--gold);
  color: var(--cream);
}
.theme-select-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: var(--option-bg);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  max-height: 240px;
  overflow: auto;
}
.theme-select-menu li {
  padding: 11px 14px;
  color: var(--cream);
  cursor: pointer;
  font-size: 15px;
  line-height: 1.3;
}
.theme-select-menu li:hover,
.theme-select-menu li:focus {
  background: var(--green);
  color: #fff;
  outline: none;
}
.theme-select-menu li.is-selected {
  background: rgba(29, 136, 56, 0.35);
  color: var(--cream);
  font-weight: 600;
}
.theme-select-menu li.is-selected:hover {
  background: var(--green);
  color: #fff;
}
.theme-select-menu li.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.designer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.designer-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.designer-sub {
  margin-top: 6px;
  text-transform: none;
  letter-spacing: 0.02em;
  opacity: 0.75;
  font-weight: 500;
}
.q-card {
  border: 1px solid var(--line);
  padding: 0;
  margin-bottom: 12px;
  overflow: hidden;
  background: color-mix(in oklab, var(--cream) 2.5%, transparent);
  transition: border-color 0.15s ease, opacity 0.15s ease;
}
.q-card.is-inactive {
  opacity: 0.72;
}
.q-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.stop-ord-badge {
  flex-shrink: 0;
  min-width: 34px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: color-mix(in oklab, var(--gold) 10%, transparent);
}
.q-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--cream);
}
.q-card-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.q-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 239, 230, 0.7);
  background: rgba(255, 255, 255, 0.03);
}
.q-chip.is-on {
  color: var(--green-soft);
  border-color: rgba(29, 136, 56, 0.45);
  background: color-mix(in oklab, var(--green) 14%, transparent);
}
.q-chip.is-off {
  color: rgba(242, 239, 230, 0.4);
}
.q-chip.is-type {
  color: var(--gold);
  border-color: rgba(212, 175, 55, 0.35);
}
.q-chip.is-answer {
  color: var(--cream);
  border-color: rgba(255, 255, 255, 0.22);
}
.q-chip.is-area {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 600;
  color: rgba(242, 239, 230, 0.65);
}
.accordion-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.accordion-body {
  display: none;
  padding: 14px 14px 16px;
  border-top: 1px solid var(--line);
  flex-direction: column;
  gap: 14px;
}
.accordion-card.is-open > .accordion-body {
  display: flex;
}
.q-section {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.q-section-answer {
  border-color: rgba(212, 175, 55, 0.22);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--gold) 7%, transparent), transparent 48%),
    rgba(0, 0, 0, 0.22);
}
.q-section-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.q-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--gold);
  opacity: 0.9;
}
.q-section-title {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cream);
  line-height: 1;
}
.q-section-sub {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(242, 239, 230, 0.48);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.q-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.q-field.is-primary label {
  color: var(--gold);
}
.q-field.is-primary input,
.q-field.is-primary textarea,
.q-field.is-primary select {
  border-color: rgba(212, 175, 55, 0.35);
  background: color-mix(in oklab, var(--gold) 6%, var(--input-bg));
}
.q-field.is-emphasis label {
  color: var(--green-soft);
}
.q-field.is-secondary {
  opacity: 0.92;
}
.q-field.is-secondary label {
  color: rgba(242, 239, 230, 0.55);
}
.q-grid {
  display: grid;
  gap: 10px;
}
.q-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.q-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 720px) {
  .q-grid-2,
  .q-grid-3 {
    grid-template-columns: 1fr;
  }
}
.q-help {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(242, 239, 230, 0.48);
}
.clue-fmt-toolbar {
  display: flex;
  gap: 6px;
  margin: 0 0 8px;
}
.clue-fmt-btn {
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(242, 239, 230, 0.18);
  background: rgba(242, 239, 230, 0.06);
  color: #f2efe6;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
}
.clue-fmt-btn:hover {
  background: rgba(242, 239, 230, 0.12);
  border-color: rgba(242, 239, 230, 0.28);
}
.clue-fmt-btn em {
  font-style: italic;
  font-weight: 600;
}
.clue-fmt-btn .clue-fmt-u {
  text-decoration: underline;
  text-underline-offset: 0.12em;
  font-weight: 600;
}
.q-maps-link {
  margin: 0;
}
.q-answer-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
}
.q-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
@media (max-width: 720px) {
  .q-status-row {
    grid-template-columns: 1fr;
  }
}
.q-active-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(29, 136, 56, 0.35);
  background: color-mix(in oklab, var(--green) 10%, transparent);
  cursor: pointer;
}
.q-active-toggle input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.q-active-ui {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.q-active-label {
  font-weight: 700;
  color: var(--cream);
  font-size: 13px;
}
.q-active-help {
  font-size: 11px;
  color: rgba(242, 239, 230, 0.5);
  line-height: 1.35;
}
.q-allows {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}
.accordion-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.accordion-row .drag-handle {
  display: flex;
  align-items: center;
  padding: 0 8px 0 12px;
}
.accordion-row .accordion-toggle {
  flex: 1;
  min-width: 0;
  padding-left: 6px;
}
.accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.accordion-toggle:hover {
  background: rgba(255,255,255,.03);
}
.accordion-chevron {
  color: var(--gold);
  width: 1em;
  flex-shrink: 0;
  font-size: 14px;
}
.drag-handle {
  cursor: grab;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: -0.12em;
  padding: 4px 2px;
  user-select: none;
  flex-shrink: 0;
  touch-action: none;
}
.drag-handle:hover { color: var(--gold); }
.drag-handle:active { cursor: grabbing; }
.q-card.is-dragging {
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.q-card.drag-over {
  border-color: var(--green-soft);
}
.question-list {
  display: flex;
  flex-direction: column;
}
.accordion-main .swatch {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  display: inline-block;
}
.accordion-meta {
  flex-shrink: 0;
  margin-left: auto;
}
.accordion-card.is-open > .accordion-toggle,
.accordion-card.is-open > .accordion-row .accordion-toggle {
  background: rgba(255,255,255,.04);
}
.accordion-card.panel-box {
  padding: 0;
}

/* Teams manager — compact form */
.team-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  align-items: end;
}
.team-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.team-field > .label {
  margin: 0;
}
.team-field-color {
  max-width: 88px;
}
.team-card .team-fields input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.team-card .team-fields select,
.team-card .team-fields .theme-select {
  width: 100%;
  margin: 0;
}
.team-card .team-fields input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.team-card .team-fields select,
.team-card .team-fields .theme-select-trigger {
  padding: 8px 10px;
  font-size: 14px;
  min-height: 36px;
}
.team-card .team-fields input[type="color"] {
  padding: 4px;
  height: 36px;
  cursor: pointer;
}
.team-card .team-fields .theme-select {
  margin: 0;
}
.team-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.team-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.team-actions-danger {
  padding-top: 2px;
}
.team-actions-progress {
  padding-top: 2px;
}
.team-actions-progress .team-adjust-progress {
  min-width: 9.5rem;
}
.team-actions .btn-sm {
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  min-height: 32px;
}
.team-actions .team-delete {
  color: var(--red);
  border-color: color-mix(in oklab, var(--red) 45%, var(--line));
}

/* Teams manager — Adjust progress sheet */
.team-progress-sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 2px 2px;
}
.team-progress-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.team-progress-sheet-title {
  font-family: "Anton", sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--cream, #f2efe6);
  line-height: 1.15;
  margin-top: 2px;
}
.team-progress-sheet-lead {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: color-mix(in oklab, var(--cream, #f2efe6) 72%, transparent);
  max-width: 36rem;
}
.team-progress-empty {
  margin: 0;
}
.team-progress-stops {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(42vh, 360px);
  overflow: auto;
  padding-right: 2px;
}
.team-progress-stop {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: inherit;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.team-progress-stop:hover {
  background: rgba(255,255,255,.06);
}
.team-progress-stop.is-selected {
  border-color: color-mix(in oklab, var(--gold, oklch(0.78 0.13 88)) 70%, var(--line));
  background: color-mix(in oklab, var(--gold, oklch(0.78 0.13 88)) 12%, transparent);
}
.team-progress-stop.is-here:not(.is-selected) {
  border-color: color-mix(in oklab, var(--green, #1D8838) 55%, var(--line));
}
.team-progress-stop-num {
  font-family: "Anton", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--gold, oklch(0.78 0.13 88));
  min-width: 2rem;
}
.team-progress-stop-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
  flex: 1;
}
.team-progress-stop-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}
.team-progress-chip {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: color-mix(in oklab, var(--cream, #f2efe6) 80%, transparent);
}
.team-progress-chip.is-current {
  border-color: color-mix(in oklab, var(--green, #1D8838) 60%, var(--line));
  color: #9be0ae;
}
.team-progress-chip.is-cleared {
  border-color: color-mix(in oklab, var(--gold, oklch(0.78 0.13 88)) 55%, var(--line));
  color: var(--gold, oklch(0.78 0.13 88));
}
.team-progress-chip.is-hint {
  border-color: color-mix(in oklab, var(--gold, oklch(0.78 0.13 88)) 35%, var(--line));
  color: color-mix(in oklab, var(--gold, oklch(0.78 0.13 88)) 75%, var(--cream));
}
.team-progress-chip.is-skipped,
.team-progress-chip.is-rejected {
  border-color: color-mix(in oklab, var(--red, #e11d48) 45%, var(--line));
  color: color-mix(in oklab, var(--red, #e11d48) 85%, var(--cream));
}
.team-progress-chip.is-photo {
  border-color: color-mix(in oklab, oklch(0.70 0.12 80) 50%, var(--line));
  color: oklch(0.82 0.1 80);
}
.team-progress-modes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.team-progress-modes.is-disabled {
  opacity: 0.55;
}
.team-progress-mode {
  display: block;
  cursor: pointer;
  margin: 0;
}
.team-progress-mode input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.team-progress-mode-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  transition: border-color .15s ease, background .15s ease;
}
.team-progress-mode-card strong {
  font-size: 14px;
  font-weight: 650;
}
.team-progress-mode-card span {
  font-size: 12.5px;
  line-height: 1.4;
  color: color-mix(in oklab, var(--cream, #f2efe6) 70%, transparent);
}
.team-progress-mode.is-on .team-progress-mode-card {
  border-color: color-mix(in oklab, var(--green, #1D8838) 65%, var(--line));
  background: color-mix(in oklab, var(--green, #1D8838) 14%, transparent);
}
.team-progress-preview {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: color-mix(in oklab, var(--cream, #f2efe6) 78%, transparent);
  padding: 8px 0 0;
  border-top: 1px solid var(--line);
}
.team-progress-confirm-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.team-progress-confirm-row .btn {
  min-height: 40px;
  padding: 8px 16px;
}
.team-progress-lobby-row {
  padding-top: 2px;
}
.team-progress-lobby {
  background: none;
  border: none;
  padding: 0;
  color: color-mix(in oklab, var(--cream, #f2efe6) 55%, transparent);
  font: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.team-progress-lobby:hover {
  color: var(--cream, #f2efe6);
}
.qr-print-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.qr-download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.download-fallback {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: #111;
  border: 1px solid var(--line, #444);
  color: #f2efe6;
  font-size: 14px;
}
.download-fallback a {
  color: var(--gold, #d4af37);
  font-weight: 600;
}
.apca-save-panel {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(7, 7, 7, 0.78);
  animation: fadein .2s ease;
}
.apca-save-card {
  width: min(420px, 100%);
  background: #0b0b0b;
  border: 1px solid var(--line);
  padding: 22px 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.apca-save-card .btn {
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.qr-payload-ro {
  display: block;
  font-size: 11px;
  word-break: break-all;
  color: var(--muted);
  background: rgba(0,0,0,.35);
  padding: 8px 10px;
  border: 1px solid var(--line);
}
.check-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 8px 0;
  align-items: center;
}
.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cream);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.check-row label:has(input:disabled) {
  cursor: default;
  color: rgba(242, 239, 230, 0.72);
}
.check-row input[type="checkbox"] {
  width: 1.15em;
  height: 1.15em;
  margin: 0;
}
.login-shell {
  padding: calc(64px + var(--pad-top)) var(--pad) 0;
  max-width: 420px;
  width: 100%;
}

/* —— Breakpoints —— */
@media (min-width: 400px) {
  .action-grid:not(.action-grid-utility) { grid-template-columns: 1fr 1fr; }
  .action-grid button { padding: 13px 6px; font-size: 10px; letter-spacing: 0.14em; }
}

@media (min-width: 600px) {
  :root { --phone-max: 480px; }
  .board-row {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
  }
  .board-row .board-score {
    grid-column: auto;
    justify-content: flex-start;
    gap: 28px;
    width: auto;
    min-width: 160px;
  }
  .board-row .board-score .score-val {
    text-align: center;
  }
  .topbar-team-block { max-width: 240px; }
}

@media (min-width: 768px) {
  :root {
    --phone-max: 430px;
    --control-max: 1180px;
  }
  body.player-body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
    background:
      radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.08), transparent 55%),
      var(--bg);
  }
  body.player-body.ptr-enabled {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
  }
  .phone {
    width: min(100% - 32px, var(--phone-max));
    height: min(100dvh - 32px, 920px);
    min-height: min(100dvh - 32px, 920px);
    max-height: min(100dvh - 32px, 920px);
    margin: 16px auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 8px #141414;
    border-radius: 28px;
    overflow: hidden;
  }
  .control-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 28px;
  }
  .live-ops {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
  }
  .live-board-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  :root {
    --phone-max: 430px;
    --control-max: 1280px;
  }
  .control { padding-top: 28px; }
  .live-board-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1280px) {
  :root {
    --phone-max: 460px;
    --control-max: 1400px;
  }
  .control-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  }
}

@media (min-width: 1600px) {
  :root {
    --phone-max: 480px;
    --control-max: 1560px;
  }
}

@media (max-width: 720px) {
  .control-grid,
  .live-ops,
  .live-board-grid {
    grid-template-columns: 1fr;
  }
  .tabs {
    padding-bottom: 2px;
  }
  .tabs button {
    min-height: 46px;
    padding: 8px 10px 8px;
    font-size: 10px;
  }
  .control {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .control-title {
    font-size: clamp(26px, 9vw, 40px);
  }
  .event-code-edit {
    flex-direction: column;
    align-items: stretch;
  }
  .event-code-edit input,
  .event-code-edit .btn {
    width: 100%;
  }
  .event-join-qr-row {
    flex-direction: column;
  }
  .control textarea,
  .control input[type="text"],
  .control input[type="number"] {
    max-width: 100%;
  }
}

@media (max-height: 700px) {
  .gps-check-map {
    height: min(28dvh, 180px);
    min-height: 140px;
  }
  .hero-title {
    font-size: clamp(36px, 12cqi, 56px);
  }
}

@container phone (max-width: 380px) {
  .page-title { font-size: clamp(24px, 11cqi, 34px); }
  .stop-title { font-size: clamp(22px, 8cqi, 30px); }
  .tour-card-title { font-size: 20px; }
  .tour-card-body { font-size: 13px; }
}

.phone.tour-running {
  overflow: hidden;
  overscroll-behavior: none;
}
.phone.tour-running .screen-root {
  overflow: hidden;
  touch-action: none;
}
.phone.tour-running .tour-card,
.phone.tour-running .tour-step-nav,
.phone.tour-running .tour-nav-btn,
.phone.tour-running .tour-skip {
  touch-action: manipulation;
}
.phone.tour-running .tour-mock-stop-screen,
.phone.tour-running .progress-drawer-list,
.phone.tour-running .tour-card-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.phone.tour-running .tour-mock-stop-screen::-webkit-scrollbar,
.phone.tour-running .progress-drawer-list::-webkit-scrollbar,
.phone.tour-running .tour-card-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

@media (hover: none) {
  .btn:hover { background: var(--gold); }
  .btn-green:hover { background: var(--green); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ——— Route designer (stepping-stone path) ——— */
.route-path-hint {
  margin: 12px 0 10px;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.35;
}
.route-path {
  --stone-size: 28px;
  --stagger: clamp(1.1rem, 6vw, 2rem);
  position: relative;
  margin: 0 0 10px;
  padding: 6px var(--stagger) 10px;
  min-height: 48px;
  overflow: visible;
}
.route-path-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.route-path-trail {
  stroke: color-mix(in oklab, var(--gold) 55%, transparent);
  stroke-width: 1.75;
  stroke-dasharray: 5 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.route-stones {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.route-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--stone-size) minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  width: min(100%, 20rem);
  padding: 4px 0;
  transition: transform 0.18s ease;
}
/* Vertical snake: stones themselves stagger left/right like stepping stones */
.route-path[data-layout="vertical"] .route-step[data-side="left"] {
  transform: translateX(calc(-1 * var(--stagger)));
}
.route-path[data-layout="vertical"] .route-step[data-side="right"] {
  transform: translateX(var(--stagger));
}
.route-stone {
  grid-column: 2;
  grid-row: 1;
  width: var(--stone-size);
  height: calc(var(--stone-size) - 2px);
  border-radius: 48% 52% 50% 50% / 46% 48% 52% 54%;
  border: 1.5px solid var(--gold);
  background:
    radial-gradient(ellipse at 32% 28%, #3a382c 0%, #1a1914 55%, #0e0e0c 100%);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  z-index: 2;
  flex-shrink: 0;
}
.route-stone-num {
  font-family: var(--display);
  font-size: 12px;
  line-height: 1;
  color: var(--gold-hot);
  letter-spacing: 0.02em;
}
.route-step-card {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 7px 9px;
  margin: 0;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.route-step-card:hover {
  border-color: color-mix(in oklab, var(--gold) 45%, var(--line));
  background: rgba(255, 255, 255, 0.055);
}
.route-step-card:active,
.route-step.is-dragging .route-step-card {
  cursor: grabbing;
}
.route-step-grip {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: -0.12em;
  flex-shrink: 0;
  user-select: none;
}
.route-step-card:hover .route-step-grip { color: var(--gold); }
.route-step-text {
  min-width: 0;
  flex: 1;
}
.route-step-card .theme-select {
  margin: 0;
  width: 100%;
  z-index: 2;
}
.route-step-card .theme-select,
.route-step-card select,
.route-step-card .theme-select-trigger,
.route-step-card .theme-select-menu {
  touch-action: auto;
  user-select: auto;
  cursor: pointer;
}
.route-step-card .theme-select-trigger {
  padding: 8px 30px 8px 10px;
  font-size: 13px;
  line-height: 1.3;
  min-height: 40px;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}
.route-step-card .theme-select-menu {
  z-index: 60;
  left: 0;
  right: auto;
  width: max(100%, min(22rem, calc(100vw - 2rem)));
  min-width: min(22rem, calc(100vw - 2rem));
  max-width: min(28rem, calc(100vw - 1.5rem));
  max-height: min(320px, 55vh);
}
.route-step-card .theme-select-menu li {
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* Keep open menus readable even in the narrow snake columns */
.route-step:has(.theme-select.is-open) {
  z-index: 12;
  position: relative;
}
.route-path[data-layout="horizontal"] .route-step:has(.theme-select.is-open) .theme-select-menu {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}
.route-path[data-layout="vertical"] .route-step[data-side="left"] .theme-select-menu {
  left: auto;
  right: 0;
}
.route-path[data-layout="vertical"] .route-step[data-side="right"] .theme-select-menu {
  left: 0;
  right: auto;
}
.route-step.is-empty .route-step-card {
  border-style: dashed;
  background: transparent;
}
.route-step.is-empty .route-stone {
  opacity: 0.42;
}
.route-step.is-empty .theme-select-trigger {
  color: var(--muted);
}
.route-step-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.route-step-text .label {
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.route-step[data-side="left"] .route-step-card {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  text-align: right;
  flex-direction: row-reverse;
}
.route-step[data-side="right"] .route-step-card {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
  text-align: left;
}
.route-step.is-dragging .route-stone {
  border-color: var(--gold-hot);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--gold) 28%, transparent);
}
.route-step.drag-over .route-stone {
  border-color: var(--green-soft);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--green-soft) 30%, transparent);
}
.route-step.drag-over .route-step-card {
  border-color: var(--green-soft);
}
.route-path.is-reordering .route-path-trail {
  opacity: 0.35;
}

.route-team-assign-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 8px 0 4px;
}
.route-team-assign-list label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}
.route-inline-editor {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Wide: horizontal snake — row N ends on a side, row N+1 continues from that side */
@media (min-width: 720px) {
  .route-path {
    --stone-size: 30px;
    padding: 10px 4px 18px;
  }
  .route-path[data-layout="vertical"] .route-step[data-side="left"],
  .route-path[data-layout="vertical"] .route-step[data-side="right"] {
    transform: none;
  }
  .route-stones {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 14px;
    max-width: 56rem;
    margin: 0 auto;
    align-items: start;
  }
  .route-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    max-width: none;
    min-width: 0;
    padding: 0;
    gap: 8px;
    transform: none !important;
  }
  .route-step[data-side] .route-step-card {
    grid-column: auto;
    justify-self: auto;
    width: 100%;
    min-width: 0;
    flex-direction: row;
    text-align: left;
  }
  .route-step-text strong {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (min-width: 980px) {
  .route-stones {
    grid-template-columns: repeat(5, minmax(11rem, 1fr));
    max-width: 64rem;
  }
}

@media (min-width: 1200px) {
  .route-stones {
    grid-template-columns: repeat(5, minmax(12rem, 1fr));
  }
}

.qr-designer-panel .qr-designer-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}
.qr-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 4px;
  vertical-align: -1px;
  border: 2px solid currentColor;
  box-sizing: border-box;
}
.qr-legend-qr { color: #ff3b3b; background: transparent; }
.qr-legend-link { color: #3b6bff; background: rgba(59, 107, 255, 0.18); }
.qr-legend-glyphs { color: #1d8838; background: rgba(29, 136, 56, 0.18); }
.qr-template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  align-items: center;
}
.btn-icon-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-icon-action .btn-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}
.btn-icon-action .btn-icon-label {
  white-space: nowrap;
}
@media (max-width: 720px) {
  .qr-designer-panel .btn-icon-action .btn-icon-label {
    display: none;
  }
  .qr-designer-panel .btn-icon-action {
    padding-left: 10px;
    padding-right: 10px;
    min-width: 40px;
    justify-content: center;
  }
}
.qr-template-preview-wrap {
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.qr-template-preview-wrap .qr-template-loading {
  margin: 18px 12px;
  color: #666;
  text-transform: none;
  letter-spacing: 0;
}
.qr-template-preview-svg,
.qr-template-preview-wrap > svg {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
  background: #fff;
}
.qr-designer-draft-note {
  color: var(--gold);
  text-transform: none;
  letter-spacing: 0;
  margin: 0 0 10px;
}
.qr-pack-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.qr-pack-label {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.qr-pack-scope {
  min-width: 180px;
  max-width: 100%;
  background: #111;
  color: inherit;
  border: 1px solid var(--line);
  padding: 6px 8px;
  font: inherit;
}
.qr-pack-laser-btn {
  background: var(--gold);
  color: #0b0b0b;
  border: 1px solid var(--gold);
}
.qr-pack-laser-btn:hover,
.qr-pack-laser-btn:focus-visible {
  background: var(--gold-hot);
  color: #0b0b0b;
  border-color: var(--gold-hot);
}
.qr-pack-laser-hint {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  margin: -6px 0 14px;
  opacity: 0.85;
  max-width: 52rem;
  line-height: 1.35;
}
.qr-assign-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .qr-assign-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.qr-assign-card {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qr-assign-card.is-disabled {
  opacity: 0.72;
}
.qr-assign-card.is-disabled .qr-assign-sheet {
  filter: grayscale(0.45);
}
.qr-assign-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qr-assign-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.qr-assign-chevron {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(242, 239, 230, 0.55);
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}
.qr-assign-card.is-expanded .qr-assign-chevron {
  transform: rotate(180deg);
}
.qr-assign-toggle .qr-glyph-preview {
  width: auto;
  height: 36px;
  flex: 0 0 auto;
}
.qr-assign-summary-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.qr-assign-name {
  font-size: 15px;
  letter-spacing: 0.02em;
}
.qr-assign-pin-summary {
  font-size: 12px;
  line-height: 1.25;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-transform: none;
  letter-spacing: 0;
}
.qr-assign-pin-summary.is-free {
  color: rgba(242, 239, 230, 0.45);
}
.qr-assign-card.is-pinned .qr-enable-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.qr-assign-details[hidden] {
  display: none !important;
}
.qr-assign-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.qr-assign-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.qr-enable-btn {
  min-width: 88px;
  flex: 0 0 auto;
}
.qr-assign-card.is-disabled .qr-enable-btn {
  opacity: 1;
  color: var(--gold);
}
.qr-assign-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
@media (max-width: 560px) {
  .qr-assign-body {
    grid-template-columns: 1fr;
  }
}
.qr-assign-sheet {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
}
.qr-assign-side {
  min-width: 0;
}
.qr-assign-side .qr-assign-pin {
  border-top: 0;
  padding-top: 0;
  height: 100%;
}
.qr-assign-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.qr-assign-pin {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.18);
}
.qr-assign-pin-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.qr-assign-pin-body a {
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
}
.qr-assign-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* —— Lobby guided tour —— */
.tour-root {
  --tour-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tour-spring: cubic-bezier(0.34, 1.35, 0.45, 1);
  --tour-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --tour-mask: oklch(0.82 0.14 92 / 0.95);
  /* Bound to the phone shell — not the viewport — so desktop framing stays aligned */
  position: absolute;
  inset: 0;
  width: auto;
  max-width: none;
  z-index: 12000;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.tour-catch {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  background: transparent;
  opacity: 0;
  touch-action: none;
  transition: opacity 0.45s var(--tour-soft);
}
.tour-root.is-ready .tour-catch,
.tour-root.is-entering.is-ready .tour-catch {
  opacity: 1;
}
.tour-root.is-leaving .tour-catch {
  opacity: 0;
  transition-duration: 0.32s;
}
.tour-spotlight {
  position: absolute;
  border-radius: 14px;
  box-shadow:
    0 0 0 9999px var(--tour-mask),
    0 0 0 1.5px rgba(90, 70, 10, 0.35),
    0 0 28px rgba(212, 175, 55, 0.22);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transform: scale(0.86);
  transform-origin: center center;
  transition:
    top 0.58s var(--tour-spring),
    left 0.58s var(--tour-spring),
    width 0.58s var(--tour-spring),
    height 0.58s var(--tour-spring),
    border-radius 0.58s var(--tour-spring),
    opacity 0.4s var(--tour-soft),
    transform 0.55s var(--tour-spring),
    box-shadow 0.45s var(--tour-soft);
}
.tour-spotlight.is-on {
  opacity: 1;
  transform: scale(1);
}
.tour-spotlight.is-stretch {
  transform: scale(1.06, 0.92);
  box-shadow:
    0 0 0 9999px oklch(0.82 0.14 92 / 0.86),
    0 0 0 2px rgba(90, 70, 10, 0.45),
    0 0 36px rgba(212, 175, 55, 0.32);
}
.tour-spotlight.is-brim {
  opacity: 1 !important;
  transform: scale(1) !important;
  box-shadow:
    0 0 0 9999px var(--tour-mask),
    0 0 0 2px rgba(90, 70, 10, 0.42),
    0 0 32px rgba(212, 175, 55, 0.28);
}
.tour-spotlight.is-veiled,
.tour-root.is-stage-reveal .tour-spotlight {
  opacity: 0 !important;
  box-shadow:
    0 0 0 9999px oklch(0.82 0.14 92 / 0.08),
    0 0 0 0 transparent,
    0 0 0 transparent;
  transform: scale(1);
}
.tour-root.is-leaving .tour-spotlight {
  opacity: 0;
  transform: scale(0.9);
  transition-duration: 0.32s;
}
.tour-arrow.is-veiled,
.tour-root.is-stage-reveal .tour-arrow {
  opacity: 0 !important;
  transition-duration: 0.28s;
}
.tour-card.is-veiled,
.tour-root.is-stage-reveal .tour-card {
  opacity: 0 !important;
  pointer-events: none;
  transition-duration: 0.28s;
}
.tour-target-live {
  position: relative;
  z-index: 0;
  border-radius: 10px;
  animation: tour-target-glow 1.8s var(--tour-soft) infinite;
}
@keyframes tour-target-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}
.tour-arrow {
  position: absolute;
  width: 16px;
  height: 13px;
  z-index: 6;
  pointer-events: none;
  color: #1a1408;
  opacity: 0;
  transform: translate(-50%, 6px) scale(0.6);
  transition:
    top 0.55s var(--tour-spring),
    left 0.55s var(--tour-spring),
    opacity 0.3s var(--tour-soft),
    transform 0.5s var(--tour-spring);
  filter: drop-shadow(0 1px 0 rgba(255, 230, 140, 0.35));
}
.tour-arrow svg {
  display: block;
  width: 100%;
  height: 100%;
}
.tour-arrow.is-on {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.tour-arrow.points-up.is-on {
  transform: translate(-50%, 0) scale(1) rotate(0deg);
}
.tour-arrow.points-down.is-on {
  transform: translate(-50%, 0) scale(1) rotate(180deg);
}
.tour-arrow.is-hopping {
  opacity: 0.35;
  transform: translate(-50%, 4px) scale(0.7);
}
.tour-root.is-leaving .tour-arrow {
  opacity: 0;
  transform: translate(-50%, 8px) scale(0.5);
  transition-duration: 0.28s;
}
.tour-card {
  position: absolute;
  z-index: 7;
  pointer-events: auto;
  background: transparent;
  border: 0;
  padding: 4px 2px 0;
  box-shadow: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transform-origin: center top;
  transition:
    top 0.55s var(--tour-spring),
    left 0.55s var(--tour-spring),
    width 0.45s var(--tour-ease),
    opacity 0.4s var(--tour-soft),
    transform 0.5s var(--tour-spring);
  border-radius: 0;
  max-width: calc(100% - 24px);
  height: auto !important;
}
.tour-card-scroll {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding-right: 0;
}
.tour-step-nav {
  position: absolute;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 9;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 36px;
  margin: 0;
  width: auto;
  flex-shrink: 0;
  flex-direction: row;
}
.tour-step-nav.is-beside {
  left: auto;
  bottom: auto;
  transform: none;
  flex-direction: column;
  gap: 8px;
}
.tour-step-nav.is-beside .tour-step {
  min-width: 0;
}
.tour-card.is-last {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 0 2px;
}
.tour-card.is-last .tour-step-nav {
  position: relative;
  inset: auto;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  transform: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  z-index: 1;
  width: auto;
}
.tour-card.is-last .tour-step-nav .tour-step {
  min-width: 0;
  letter-spacing: 0.08em;
}
.tour-card.is-last .tour-card-scroll {
  flex: 1 1 auto;
  min-width: 0;
}
.tour-card.is-last .tour-card-title,
.tour-card.is-last .tour-card-body {
  text-align: left;
}
.tour-card.is-on {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.tour-card.is-swapping {
  opacity: 0.45;
  transform: translateY(6px) scale(0.99);
}
.tour-card.is-settling {
  animation: tour-card-settle 0.55s var(--tour-spring) both;
}
@keyframes tour-card-settle {
  0% { transform: translateY(6px) scale(0.99); }
  100% { transform: translateY(0) scale(1); }
}
.tour-card-shine {
  display: none;
}
.tour-root.is-leaving .tour-card {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition-duration: 0.3s;
}
.tour-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 38px;
  padding: 0;
  margin: 0;
  border: 1.5px solid rgba(26, 20, 8, 0.38);
  background: transparent;
  color: rgba(26, 20, 8, 0.55);
  cursor: pointer;
  touch-action: manipulation;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.2s var(--tour-ease), opacity 0.2s ease;
}
.tour-nav-btn svg {
  display: block;
  width: 22px;
  height: 14px;
  pointer-events: none;
}
.tour-nav-btn:hover,
.tour-nav-btn:focus-visible {
  background: rgba(20, 16, 10, 0.06);
  border-color: rgba(26, 20, 8, 0.5);
  color: rgba(26, 20, 8, 0.72);
  outline: none;
}
.tour-nav-btn:active {
  transform: scale(0.94);
}
.tour-nav-btn[hidden] {
  display: none !important;
}
.tour-nav-btn.tour-next,
.tour-nav-btn.tour-prev {
  background: transparent;
  color: rgba(26, 20, 8, 0.55);
}
.tour-card-title {
  font-family: var(--display);
  font-size: clamp(18px, 6.4cqi, 24px);
  letter-spacing: 0.04em;
  color: #14100a;
  line-height: 1.05;
  margin: 0 0 8px;
  transition: opacity 0.28s var(--tour-soft), transform 0.35s var(--tour-ease);
  text-wrap: balance;
  text-shadow:
    0 0 14px oklch(0.82 0.14 92 / 1),
    0 0 28px oklch(0.82 0.14 92 / 0.95),
    0 1px 0 rgba(255, 236, 160, 0.7);
}
.tour-card-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(20, 16, 10, 0.88);
  font-weight: 600;
  transition: opacity 0.28s var(--tour-soft), transform 0.35s var(--tour-ease);
  text-shadow:
    0 0 12px oklch(0.82 0.14 92 / 1),
    0 0 24px oklch(0.82 0.14 92 / 0.95),
    0 1px 0 rgba(255, 236, 160, 0.55);
}
.tour-card.is-tight .tour-card-title {
  font-size: 18px;
  margin-bottom: 6px;
}
.tour-card.is-tight .tour-card-body {
  font-size: 13px;
  line-height: 1.35;
}
.tour-card.is-swapping .tour-card-title,
.tour-card.is-swapping .tour-card-body {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}
.tour-step {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(26, 20, 8, 0.62);
  font-weight: 700;
  transition: opacity 0.25s var(--tour-soft);
  min-width: 5.2em;
  text-align: center;
}
.tour-skip {
  position: absolute;
  top: 10px;
  right: 12px;
  left: auto;
  z-index: 9;
  pointer-events: auto;
  border: 0;
  background: transparent;
  color: rgba(26, 20, 8, 0.72);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 2px;
  margin: 0;
  touch-action: manipulation;
  transition: color 0.2s ease, transform 0.2s var(--tour-ease), left 0.28s var(--tour-soft), right 0.28s var(--tour-soft);
}
.tour-skip.is-left {
  right: auto;
  left: 12px;
}
.tour-skip:hover { color: #0b0904; }
.tour-skip:active { transform: scale(0.96); }
.tour-skip[hidden] { display: none !important; }
.tour-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  isolation: isolate;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s var(--tour-soft), visibility 0.28s;
}
.tour-stage.is-active {
  opacity: 1;
  visibility: visible;
}
.tour-mock-progress {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 4;
  pointer-events: none;
}
.tour-mock-progress .tour-mock-backdrop {
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
  cursor: default;
}
.tour-mock-progress.is-open .tour-mock-backdrop {
  opacity: 1;
}
.tour-mock-progress.is-closing .tour-mock-backdrop {
  opacity: 0;
}
.tour-mock-progress .tour-mock-drawer {
  animation: none;
  transform: translateX(-100%);
  transition: transform 0.48s cubic-bezier(0.2, 0.85, 0.25, 1);
  pointer-events: none;
}
.tour-mock-progress.is-open .tour-mock-drawer {
  transform: translateX(0);
}
.tour-mock-progress.is-closing .tour-mock-drawer {
  transform: translateX(-100%);
  transition-timing-function: cubic-bezier(0.4, 0, 0.7, 0.2);
}
.tour-mock-caveat {
  margin: auto 16px 12px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(242, 239, 230, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 500;
}
.tour-mock-stop {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  transform: translateX(110%);
  transition: transform 1s cubic-bezier(0.2, 0.88, 0.22, 1);
  will-change: transform;
}
.tour-mock-stop.is-in {
  transform: translateX(0);
}
.tour-mock-stop.is-instant {
  transition: none !important;
}
.tour-mock-stop-scrim {
  display: none;
}
.tour-mock-stop-screen {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--shell, #070707);
  display: flex;
  flex-direction: column;
  box-shadow:
    -12px 0 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}
.tour-mock-topbar {
  position: sticky;
  top: 0;
  pointer-events: none;
}
.tour-mock-topbar .btn-progress,
.tour-mock-topbar .btn-rules,
.tour-mock-topbar .btn-notif {
  pointer-events: none;
}
.tour-mock-map {
  margin-top: 4px;
}
.tour-mock-map .map-section-toggle {
  display: none;
}
.tour-mock-map .map-collapse.is-open {
  margin-top: 0;
}
.tour-mock-map .map-frame {
  height: min(20vh, 128px);
}
.tour-mock-map-canvas {
  min-height: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: #1a1f1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tour-mock-map-svg {
  display: block;
  width: 100%;
  height: 100%;
  vertical-align: top;
}
.tour-mock-stop .btn-arrive.btn-arrive-ready,
.tour-mock-stop .btn-arrive.tour-reveal-hot {
  pointer-events: auto;
  cursor: pointer;
  position: relative;
  z-index: 6;
}
.tour-mock-clue {
  opacity: 1;
}
.tour-mock-actions {
  margin-top: 16px;
  padding-bottom: 24px;
}
.tour-mock-stop .action-grid button:disabled,
.tour-mock-stop .btn-submit-answer:disabled,
.tour-mock-stop .btn.action-primary:disabled,
.tour-mock-stop input:disabled {
  opacity: 0.82;
}
.tour-mock-stop .action-grid button.hint:disabled {
  color: rgba(242, 239, 230, 0.92);
}
.tour-mock-stop .action-grid button.skip:disabled {
  color: color-mix(in oklab, var(--red) 85%, white);
}
.tour-mock-stop .btn-submit-answer,
.tour-mock-stop .answer-entry,
.tour-mock-stop .action-grid,
.tour-mock-stop .actions-wrap {
  position: relative;
  z-index: 0;
}
.tour-target-live.tour-mock-drawer,
.tour-target-live.progress-drawer-intro,
.tour-target-live.progress-drawer-list,
.tour-target-live.stop-title,
.tour-target-live.stop-head,
.tour-target-live.tour-mock-map,
.tour-target-live.answer-entry,
.tour-target-live.tour-mock-qr-block,
.tour-target-live.tour-mock-clue,
.tour-target-live.action-grid {
  outline: none;
}
.tour-progress-pop {
  animation: tour-progress-pop 0.55s var(--tour-spring) both;
}
@keyframes tour-progress-pop {
  0% { opacity: 0; transform: scale(0.5); }
  70% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}
.phone.tour-running {
  overflow: hidden;
  overscroll-behavior: none;
}
.phone.tour-running .screen-root {
  overflow: hidden;
  touch-action: none;
  transition: transform 1s cubic-bezier(0.2, 0.88, 0.22, 1);
  will-change: transform;
}
.phone.tour-running.is-tour-pushed .screen-root {
  transform: translateX(-110%);
}
.tabs button[hidden] {
  display: none !important;
}

/* Results Dashboard */
.rd-shell { display: flex; flex-direction: column; gap: 28px; }
.rd-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.rd-kicker { letter-spacing: 0.22em; }
.rd-title {
  font-family: Anton, Impact, sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0.02em;
  margin: 6px 0 8px;
  color: var(--cream);
}
.rd-sub {
  max-width: 62ch;
  color: rgba(242, 239, 230, 0.7);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}
.rd-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rd-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.rd-kpi {
  border: 1px solid rgba(196, 163, 90, 0.35);
  background: color-mix(in oklab, var(--bg) 80%, #111);
  padding: 12px 14px;
}
.rd-kpi span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.rd-kpi strong {
  font-family: Anton, sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--cream);
}
.rd-podium {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.rd-podium-card {
  border: 1px solid var(--team);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: color-mix(in oklab, var(--team) 12%, transparent);
}
.rd-place {
  font-family: Anton, sans-serif;
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
}
.rd-podium-card strong { font-size: 16px; }
.rd-podium-card em { font-style: normal; color: var(--cream); }
.rd-podium-card small { color: rgba(242, 239, 230, 0.55); }
.rd-place-1 { min-height: 132px; }
.rd-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.rd-chart-card {
  border: 1px solid rgba(196, 163, 90, 0.28);
  padding: 16px;
  background: color-mix(in oklab, var(--bg) 88%, #111);
}
.rd-chart-card h3,
.rd-table-wrap h3,
.rd-awards h3,
.rd-map-sec h3,
.rd-stops h3,
.rd-notes h3,
.rd-routes h3 {
  font-family: Anton, sans-serif;
  font-size: 20px;
  font-weight: 400;
  margin: 0 0 6px;
  letter-spacing: 0.03em;
}
.rd-chart-wrap { height: 260px; position: relative; }
.rd-chart-radar { height: 300px; }
.rd-table-scroll { overflow-x: auto; }
.rd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rd-table th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 8px 10px;
  border-bottom: 1px solid rgba(196, 163, 90, 0.4);
  white-space: nowrap;
}
.rd-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(242, 239, 230, 0.08);
  white-space: nowrap;
}
.rd-table td small {
  color: rgba(242, 239, 230, 0.5);
  font-size: 11px;
}
.rd-routes ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rd-routes li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  border-left: 3px solid var(--gold);
  padding: 8px 12px;
  background: color-mix(in oklab, var(--bg) 82%, #111);
}
.rd-routes li span { color: rgba(242, 239, 230, 0.72); }
.rd-heat { margin: 0 0 10px; }
.rd-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.rd-award-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.rd-award {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: start;
  border-left: 3px solid var(--team);
  padding: 14px 16px;
  background: color-mix(in oklab, var(--bg) 82%, #111);
}
.rd-award-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in oklab, var(--team) 55%, #c4a35a);
  background: color-mix(in oklab, var(--team) 16%, transparent);
  color: var(--gold);
}
.rd-award-svg { width: 44px; height: 44px; display: block; }
.rd-award-copy { min-width: 0; }
.rd-award h4 { margin: 4px 0 6px; font-size: 16px; }
.rd-award-team { color: var(--team); font-weight: 700; margin: 0 0 8px; }
.rd-map { height: min(62vh, 560px); border: 1px solid rgba(196, 163, 90, 0.35); background: #1a1814; }
.rd-photo-icon { background: none; border: none; }
.rd-photo-pin {
  width: 76px;
  text-align: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.45));
}
.rd-photo-pin img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 3px solid var(--pin);
  border-radius: 8px;
  background: #111;
  display: block;
  margin: 0 auto;
}
.rd-photo-pin span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  color: #f4efe4;
  background: #161410;
  padding: 1px 4px;
  border-radius: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rd-pop { max-width: 200px; }
.rd-pop img { width: 100%; height: 120px; object-fit: cover; display: block; margin-bottom: 6px; }
.rd-pop-meta { color: #6b6356; font-size: 11px; }
.rd-stop {
  border-top: 1px solid rgba(196, 163, 90, 0.28);
  padding: 22px 0;
}
.rd-stop h4 { margin: 4px 0 8px; font-size: 20px; }
.rd-lore-head { color: var(--gold); font-weight: 700; margin: 0 0 8px; }
.rd-famous { margin: 12px 0; padding-left: 18px; color: rgba(242,239,230,.8); font-size: 13px; line-height: 1.45; }
.rd-gag { font-style: italic; color: rgba(242,239,230,.62); margin-top: 10px; }
.rd-stop-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.rd-plate img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 3px solid var(--team);
  display: block;
}
.rd-plate figcaption { padding: 6px 2px 0; font-size: 12px; }
.rd-plate figcaption span { display: block; color: rgba(242,239,230,.5); font-size: 11px; }
.rd-note { margin-bottom: 18px; }
.rd-note h4 { color: var(--gold); margin: 0 0 8px; }
.rd-lock { max-width: 62ch; }
.rd-lock-title { font-family: Anton, sans-serif; font-size: 28px; margin: 8px 0 12px; }
.rd-draft {
  margin: 10px 0 0;
  color: var(--gold);
  font-size: 13px;
  max-width: 62ch;
}
@media (max-width: 900px) {
  .rd-charts, .rd-podium { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-spotlight,
  .tour-arrow,
  .tour-card,
  .tour-catch,
  .tour-stage,
  .tour-mock-stop,
  .tour-mock-progress .tour-mock-drawer,
  .phone.tour-running .screen-root,
  .tour-card-body,
  .tour-card-title {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}
