/* The Unofficial CrossFit Aftermath Christmas Party
   Black & white, Aftermath style. One accent colour (red) is reserved for warnings. */
:root {
  --bg: #0a0a0a;
  --surface: rgba(20, 20, 20, 0.86);
  --surface-solid: #141414;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.28);
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --faint: #6b6b6b;
  --white: #ffffff;
  --black: #0a0a0a;
  --danger: #e5484d;
  --xmas-red: #ff4d5e;
  --xmas-green: #2fd27a;
  --xmas-gold: #ffc247;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  /* thin top rule */
  content: ''; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40;
  background: linear-gradient(90deg, var(--xmas-red) 0 25%, var(--xmas-green) 25% 50%, var(--xmas-gold) 50% 75%, #fff 75%);
}

a { color: var(--white); text-underline-offset: 3px; }
a:hover { color: var(--muted); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--white); color: var(--black); padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { left: 8px; }

/* ---------- Animated gym-gear network background ---------- */
#bg-net { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-glow { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 75% 15%, rgba(255, 255, 255, 0.07), transparent 70%),
              radial-gradient(50% 40% at 10% 90%, rgba(255, 255, 255, 0.04), transparent 70%); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(10, 10, 10, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1160px; margin: 0 auto; padding: 12px 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; }
.brand:hover { color: var(--white); }
.brand-text { line-height: 1.15; font-weight: 700; font-size: 15px; padding-left: 12px; border-left: 1px solid var(--line-strong); }
.brand-text small { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.logo-badge { flex: none; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.logo-badge img { width: 100%; height: 100%; object-fit: cover; }

.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; padding: 9px 14px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; border: 1px solid transparent; }
.nav a:hover { color: var(--white); }
.nav a[aria-current='page'] { color: var(--white); border-color: var(--line-strong); }
.nav a.cta { background: var(--white); color: var(--black); font-weight: 600; margin-left: 6px; }
.nav a.cta:hover { background: #dcdcdc; }
@media (max-width: 760px) { .nav .hide-sm { display: none; } .brand-text { display: none; } .nav a { padding: 9px 11px; } }

/* ---------- Layout ---------- */
main { max-width: 1160px; margin: 0 auto; padding: 0 20px 56px; position: relative; z-index: 2; }
@media (max-width: 480px) { main { padding: 0 16px 48px; } }
section { margin: 64px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@media (max-width: 480px) { .card { padding: 20px; } }
.card h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 12px; color: var(--white); }
.card h3 { font-size: 17px; font-weight: 600; margin: 26px 0 10px; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--white); flex: none; }
.eyebrow.plain::before { display: none; }
.section-head { margin-bottom: 22px; }
.section-head h2, .page-title { font-size: clamp(28px, 4.2vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 0; color: var(--white); }
.page-head { margin: 48px 0 24px; }
.lead { font-size: 18px; color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.grid-2 { display: grid; gap: 20px; }
@media (min-width: 880px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.divider { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 10px; border: 1px solid var(--white);
  background: var(--white); color: var(--black); font: 600 16px/1.1 var(--font-body);
  text-decoration: none; cursor: pointer; text-align: center; transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { background: #dcdcdc; border-color: #dcdcdc; color: var(--black); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.outline { background: transparent; color: var(--white); border-color: var(--line-strong); }
.btn.outline:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.06); color: var(--white); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { min-height: 42px; padding: 8px 14px; font-size: 14.5px; }
.btn.big { min-height: 56px; font-size: 17px; padding: 14px 28px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.text-link { font-family: var(--font-mono); font-size: 13.5px; letter-spacing: 0.06em; color: var(--white); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding: 6px 0; }
.text-link:hover { border-color: var(--white); color: var(--white); }

/* ---------- Hero ---------- */
.hero { display: grid; gap: 36px; align-items: center; padding: 56px 0 8px; margin-top: 0; }
@media (min-width: 960px) { .hero { grid-template-columns: 1.25fr 1fr; padding-top: 88px; } }
.hero h1 {
  font-size: clamp(38px, 6vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 6px 0 20px;
  background: linear-gradient(100deg, var(--xmas-red) 0%, #ff7a52 45%, var(--xmas-gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .tagline { font-size: clamp(18px, 2.2vw, 22px); color: var(--text); margin: 0 0 22px; font-weight: 500; }
.facts { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.facts li { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: baseline; }
.facts b { font-family: var(--font-mono); font-weight: 600; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.facts li:nth-child(1) b { color: var(--xmas-red); }
.facts li:nth-child(2) b { color: var(--xmas-green); }
.facts li:nth-child(3) b { color: var(--xmas-gold); }
.facts li:nth-child(4) b { color: #fff; }
.facts li:nth-child(5) b { color: var(--xmas-red); }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--xmas-green); box-shadow: 0 0 0 4px rgba(47, 210, 122, 0.2); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 20px; }
.countdown div { --c: var(--xmas-red); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 12px; padding: 12px 4px 10px; text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, transparent), rgba(255, 255, 255, 0.02)); }
.countdown div:nth-child(2) { --c: var(--xmas-green); }
.countdown div:nth-child(3) { --c: var(--xmas-gold); }
.countdown div:nth-child(4) { --c: #ffffff; }
.countdown strong { display: block; font-family: var(--font-mono); font-size: 28px; font-weight: 600; line-height: 1.1; color: var(--c); }
.countdown small { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.counter { display: flex; align-items: baseline; gap: 10px; margin: 0; font-weight: 600; }
.counter .num { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; color: var(--white); }
.counter-sub { color: var(--muted); margin: 2px 0 0; font-size: 14.5px; }

.carlos-line { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--danger); background: rgba(229, 72, 77, 0.08); border-radius: 0 10px 10px 0; font-weight: 600; font-size: 15px; }
.carlos-line small { display: block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.countdown-note { margin: -8px 0 18px; font-size: 14.5px; color: var(--text); }
.countdown-note::before { content: 'Carlos: '; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--danger); }
.verdict { display: inline-block; margin-left: 0; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); vertical-align: middle; white-space: nowrap; }
.verdict.v-approved, .verdict.v-nodded { border-color: var(--xmas-green); color: var(--xmas-green); }
.verdict.v-weak { border-color: rgba(229, 72, 77, 0.6); color: #ff8a8d; }
.verdict.v-coach { border-color: var(--xmas-gold); color: var(--xmas-gold); }
.leaderboard tr.ghost td { color: var(--xmas-gold); font-style: italic; }
.carlos-quote small { display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.carlos-quote { margin: 14px 0 16px; padding: 16px 18px; border-left: 3px solid var(--danger); background: rgba(229, 72, 77, 0.08); border-radius: 0 12px 12px 0; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; min-height: 64px; }
.pay-notice { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px 16px; margin: 18px 0; background: rgba(255, 255, 255, 0.04); }
.pay-notice .icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--black); font-weight: 800; font-family: var(--font-mono); }
.pay-notice strong { display: block; font-size: 16px; color: var(--white); }
.pay-notice span { color: var(--muted); font-size: 15px; }
.rsvp-pill { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; color: var(--text); }

/* ---------- Slideshow ---------- */
.slideshow { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 4 / 3; border: 1px solid var(--line); }
@media (min-width: 880px) { .slideshow { aspect-ratio: 21 / 9; } }
.slideshow figure { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.2s ease; }
.slideshow figure.active { opacity: 1; }
.slideshow img { width: 100%; height: 100%; object-fit: cover; }
.slideshow figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 16px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.8)); font-weight: 600; }
.slideshow .placeholder { display: grid; place-items: center; height: 100%; text-align: center; padding: 20px; color: var(--muted);
  background: repeating-linear-gradient(135deg, #0f0f0f 0 22px, #141414 22px 44px); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
.slide-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 20px; cursor: pointer; z-index: 3; }
.slide-nav.prev { left: 12px; } .slide-nav.next { right: 12px; }
.slide-pause { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgba(0, 0, 0, 0.55) !important; }

/* ---------- Leaderboard ---------- */
.leaderboard { width: 100%; border-collapse: collapse; font-size: 15px; }
.leaderboard th, .leaderboard td { padding: 11px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.leaderboard th { font-family: var(--font-mono); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.leaderboard td.rank { font-family: var(--font-mono); color: var(--muted); width: 44px; }
.leaderboard tbody tr:nth-child(-n + 3) td.rank { color: var(--white); font-weight: 700; }
.leaderboard td.time { font-family: var(--font-mono); text-align: right; white-space: nowrap; color: var(--white); }
.leaderboard .name { overflow-wrap: anywhere; font-weight: 600; }
.leaderboard .empty { text-align: center; color: var(--muted); padding: 22px; }

/* ---------- WOD generator ---------- */
.radio-pills { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0 0 16px; }
.radio-pills legend { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; padding: 0; }
.radio-pills label { position: relative; }
.radio-pills input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-pills span { display: inline-flex; min-height: 44px; align-items: center; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 600; font-size: 15px; cursor: pointer; color: var(--text); }
.radio-pills input:checked + span { background: var(--white); color: var(--black); border-color: var(--white); }
.radio-pills input[value='carlos']:checked + span { background: var(--danger); border-color: var(--danger); color: #fff; }
.radio-pills input[value='jamie']:checked + span { background: var(--xmas-gold); border-color: var(--xmas-gold); color: var(--black); }
.wod-out .carlos-says.jamie { border-left-color: var(--xmas-gold); background: rgba(255, 194, 71, 0.08); }
.radio-pills input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 2px; }
.wod-out { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 18px; margin: 16px 0; min-height: 120px; }
.wod-out h3 { margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.wod-out .format { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; text-transform: uppercase; }
.wod-out ul { margin: 0; padding-left: 20px; }
.wod-out li { margin: 4px 0; }
.wod-out .flavour { color: var(--muted); margin: 12px 0 0; font-size: 15px; }
.wod-out .carlos-says { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--danger); background: rgba(229, 72, 77, 0.08); border-radius: 0 10px 10px 0; font-weight: 600; }
.wod-out .carlos-says small { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.wod-out .wod-music { margin: 10px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 4px; }
.wod-out .wod-music small { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--xmas-gold); }
.wod-out .wod-music .links { display: flex; gap: 16px; font-family: var(--font-mono); font-size: 13px; }
.carlos-warning { display: none; background: var(--danger); color: #fff; border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; font-weight: 800; font-size: 18px; border: 2px solid #fff; align-items: center; gap: 12px; }
.carlos-warning.show { display: flex; }
.carlos-warning .sign { font-size: 30px; line-height: 1; }
.risk-note { font-size: 13.5px; color: var(--muted); margin: 8px 0 0; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
label.field { display: block; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
label.field .hint { text-transform: none; letter-spacing: 0; font-family: var(--font-body); color: var(--faint); font-size: 13px; }
input[type='text'], input[type='email'], input[type='password'], input[type='date'], input[type='time'], input[type='url'], select, textarea {
  width: 100%; min-height: 48px; margin-top: 8px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: rgba(0, 0, 0, 0.45); color: var(--white); font: 400 16px var(--font-body); letter-spacing: 0; text-transform: none; color-scheme: dark;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--white); outline: 3px solid rgba(255, 255, 255, 0.15); outline-offset: 0; }
select option { background: #141414; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; cursor: pointer; padding: 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03); }
.check input { width: 22px; height: 22px; flex: none; accent-color: #fff; margin: 1px 0 0; }
.guest-row { display: grid; grid-template-columns: 1fr 150px auto; gap: 10px; align-items: end; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.guest-row label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.guest-row input, .guest-row select { margin-top: 6px; }
@media (max-width: 520px) { .guest-row { grid-template-columns: 1fr 1fr; } .guest-row .remove { grid-column: 1 / -1; } }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: rgba(229, 72, 77, 0.12); color: #ffc2c4; border: 1px solid rgba(229, 72, 77, 0.5); padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.form-ok { background: rgba(255, 255, 255, 0.06); color: var(--white); border: 1px solid var(--line-strong); padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.notice { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 12px 14px; font-size: 15px; }

/* ---------- Confirmation ---------- */
.confetti-burst { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti-burst i { position: absolute; top: -20px; width: 7px; height: 12px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.big-tick { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; background: var(--white); color: var(--black); font-size: 30px; font-weight: 800; animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }
.manage-box { border: 1px dashed var(--line-strong); border-radius: 10px; padding: 12px; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 13.5px; color: var(--text); background: rgba(0, 0, 0, 0.35); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 12px; background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal.open { display: flex; }
.modal-box { background: var(--surface-solid); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 24px; max-width: 460px; width: 100%; box-shadow: var(--shadow); max-height: calc(100vh - 24px); overflow: auto; }
.modal-box h2 { margin-top: 0; font-size: 22px; letter-spacing: -0.02em; }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 2; border-top: 1px solid var(--line); background: rgba(10, 10, 10, 0.85); }
.site-footer .inner { max-width: 1160px; margin: 0 auto; padding: 24px 20px 96px; /* room for Netlify's badge bottom-right */ display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; color: var(--muted); font-size: 14px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--text); }

/* ---------- Sound toggle ---------- */
.mute-btn { position: fixed; bottom: 16px; left: 16px; z-index: 70; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(20, 20, 20, 0.9); color: #fff; cursor: pointer; display: grid; place-items: center; }
.mute-btn:hover { border-color: #fff; }
.mute-btn svg { width: 20px; height: 20px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: var(--white); color: var(--black); padding: 12px 18px; border-radius: 10px; z-index: 90; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }

/* ---------- Venue ---------- */
.map { width: 100%; min-height: 320px; height: 100%; border: 1px solid var(--line); border-radius: 12px; background: #111; filter: grayscale(1) contrast(1.05); }
dl.details { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 18px; margin: 0 0 18px; }
dl.details dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
dl.details dd { margin: 0; overflow-wrap: anywhere; }
.pre-line { white-space: pre-line; }
.info-block { margin: 0 0 16px; }
.info-block b { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }

/* Netlify adds a "Powered by Netlify" badge fixed to the bottom-right corner on the
   free plan. On phones, keep the game controls clear of it. */
@media (max-width: 760px) {
  .fran-modal { align-items: flex-start; padding: 8px 8px 62px; }
  .fran-modal .modal-box { max-height: calc(100vh - 70px); max-height: calc(100dvh - 70px); }
}
/* Small phones (e.g. iPhone SE): keep the whole game window on screen */
.fran-modal .modal-box { min-width: 0; overflow-x: hidden; }
.fran-modal .fran-top h2 { min-width: 0; flex: 1; }
.fran-modal .fran-close { flex: none; }
.fran-modal .fran-hud { grid-template-columns: auto minmax(0, 1fr); }
.fran-modal .fran-set, .fran-modal .fran-norep-count { overflow-wrap: anywhere; }
@media (max-width: 380px), (max-height: 700px) {
  .fran-modal .modal-box { padding: 10px; }
  .fran-modal .fran-top { margin-bottom: 4px; }
  .fran-modal .fran-clock { font-size: 22px; }
  .fran-modal .fran-hud { font-size: 10.5px; margin-bottom: 6px; }
  .fran-modal .fran-tap { min-height: 62px; font-size: 20px; }
  .fran-modal .fran-meter { margin: 8px 0 6px; height: 22px; }
  .fran-modal .fran-help { font-size: 12.5px; margin-bottom: 6px; }
  .fran-modal .bench-stats b, .fran-modal .du-stats b { font-size: 18px; }
  .fran-modal .bench-stats { margin-bottom: 6px; }
}

/* Very narrow phones (320–380px wide) */
.grid-2 > * { min-width: 0; }
@media (max-width: 380px) {
  .site-header .inner { padding: 10px 12px; gap: 6px; }
  .brand .logo-badge { width: 38px !important; height: 38px !important; }
  .nav a { padding: 8px 7px; font-size: 14px; }
  .nav a.cta { margin-left: 2px; padding: 8px 11px; }
  .leaderboard { font-size: 13.5px; }
  .leaderboard th, .leaderboard td { padding: 9px 4px; }
  .leaderboard td.rank { width: 26px; }
  .leaderboard th { font-size: 10px; letter-spacing: .08em; }
  .verdict { white-space: normal; font-size: 9px; line-height: 1.25; padding: 2px 6px; }
}
