@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;700;800&family=Manrope:wght@400;600;700;800&display=swap');

:root {
  --bg: #150a2e;
  --bg-alt: #1f1147;
  --card: #ffffff;
  --card-text: #1a1130;
  --accent: #ff2fb0;
  --accent-2: #4b2fff;
  --text-on-dark: #f4f0ff;
  --muted: #b6a9e0;
  --success: #1fae6e;
  --error: #e0304a;
  --warning: #c98a12;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', sans-serif;
  background: radial-gradient(circle at top, var(--bg-alt), var(--bg) 70%);
  color: var(--text-on-dark);
  padding: 24px 16px 48px;
}

h1, h2 { line-height: 1.05; font-family: 'Barlow Condensed', sans-serif; letter-spacing: .01em; }

.card {
  background: var(--card);
  color: var(--card-text);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 720px;
  margin: 0 auto 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.link-list { list-style: none; padding: 0; }
.link-list li { margin: 6px 0; }
.link-list a { color: var(--accent-2); text-decoration: none; font-weight: 600; }
.link-list a:hover { text-decoration: underline; }

label { display: block; margin-bottom: 14px; font-weight: 600; }
input, select {
  width: 100%;
  padding: 10px 12px;
  margin-top: 4px;
  border: 1px solid #d3cce8;
  border-radius: 8px;
  font-size: 16px;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  background: #e5e0f5;
  color: #2a1a55;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.btn-large { padding: 14px 28px; font-size: 18px; width: 100%; }
.btn-small { padding: 6px 14px; font-size: 13px; }
.btn-danger { background: var(--error); color: #fff; }

.notice { padding: 12px 16px; border-radius: 8px; font-weight: 600; }
.notice-error { background: #fde4e7; color: var(--error); }
.notice-success { background: #e2f7ec; color: var(--success); }
.notice-warning { background: #fdf1dc; color: var(--warning); }

/* Voting page background video */
.bg-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.bg-video-overlay {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at top, rgba(31,17,71,.72), rgba(21,10,46,.93) 70%);
}
@media (max-width: 820px), (prefers-reduced-motion: reduce) {
  .bg-video { display: none; }
  .bg-video-overlay { background: radial-gradient(circle at top, var(--bg-alt), var(--bg) 70%); }
}

/* Voting ballot */
.pin-input { font-size: 28px; letter-spacing: 6px; text-align: center; }
.year-group { border: 1px solid #e4dff2; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.year-group legend { font-weight: 800; padding: 0 6px; color: var(--accent-2); }
.song-option { display: flex; gap: 8px; align-items: baseline; padding: 8px 4px; border-bottom: 1px solid #f0edf8; cursor: pointer; }
.song-option:last-child { border-bottom: none; }
.song-option input { width: 22px; height: 22px; margin: 0 4px 0 0; accent-color: var(--accent); flex: 0 0 auto; }
.song-artist { font-weight: 700; }
.song-title { color: #5a4b85; }
.song-country { margin-left: auto; color: var(--muted); font-size: 13px; }
.vote-shell { max-width: 820px; margin: 0 auto; }
.vote-card { max-width: none; padding: clamp(20px, 4vw, 38px); }
.vote-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.vote-heading h1 { margin: 0; font-size: clamp(42px, 8vw, 74px); }
.vote-subtitle { margin: 5px 0 0; color: #6d6287; font-size: 15px; }
.vote-badge { padding: 7px 11px; border-radius: 999px; background: #e2f7ec; color: var(--success); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.ballot-intro { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; padding: 14px; border-radius: 10px; background: #f8f3ff; }
.ballot-intro strong, .ballot-intro span { display: block; }
.ballot-intro div span { margin-top: 3px; color: #6d6287; font-size: 13px; }
.ballot-icon { display: grid !important; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #ffd447; color: #4b2fff; font-size: 18px; }
.vote-summary { position: sticky; top: 12px; z-index: 3; margin: 0 0 18px; padding: 14px 16px; border: 2px solid var(--accent); border-radius: 10px; background: rgba(255,255,255,.97); box-shadow: 0 8px 24px rgba(46,31,96,.12); }
.vote-summary-heading { display: flex; justify-content: space-between; gap: 12px; color: var(--accent-2); }
.vote-summary-heading span { color: var(--muted); font-size: 13px; }
.vote-summary ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 22px; margin: 9px 0 0; padding-left: 24px; }
.vote-summary li { padding: 2px 0; font-size: 13px; }
.vote-summary-empty { grid-column: 1 / -1; color: var(--muted); }
.points-choice { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid #f0edf8; }
.points-choice strong { color: var(--accent-2); }
.points-choice select { min-width: 0; padding: 10px 12px; border: 1px solid #dcd4ef; border-radius: 8px; background: #fff; color: var(--text); font: inherit; }
.song-copy { display: grid; gap: 3px; min-width: 0; }
.song-option { align-items: center; min-height: 48px; padding: 7px 8px; border-radius: 8px; }
.song-option { box-shadow: inset 4px 0 0 var(--country-color, var(--accent-2)); }
.song-option:hover { background: #faf7ff; }
.song-option.has-points { background: #fff7d6; outline: 2px solid #f0c928; }
.song-points { flex: 0 0 86px; min-width: 86px; padding: 8px 5px; border: 1px solid #dcd4ef; border-radius: 7px; background: #fff; color: var(--accent-2); font: inherit; font-weight: 700; }
.song-option.has-points .song-points { border-color: #d19d00; background: #fff1ad; }
.song-option:has(input:checked) { background: #f4eaff; outline: 2px solid var(--accent); }
.country-flag { width: 28px; flex: 0 0 28px; font-size: 20px; line-height: 1; text-align: center; }
.country-flag img { display: block; width: 26px; height: 20px; object-fit: cover; border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.year-group { padding: 12px; }
.year-group legend { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; }
.song-youtube { flex: 0 0 auto; padding: 4px 7px; border: 1px solid #e0d4ff; border-radius: 999px; color: var(--accent-2); font-size: 10px; font-weight: 800; text-decoration: none; }
.song-youtube:hover { border-color: var(--accent); color: var(--accent); }
.ballot-form .btn-large { position: sticky; bottom: 14px; z-index: 2; box-shadow: 0 8px 24px rgba(75,47,255,.3); }
.modal-open { overflow: hidden; }
.confirm-ballot { margin: 12px 0 0; padding-left: 22px; text-align: left; }
.confirm-ballot li { padding: 3px 0; font-size: 14px; }
.vote-modal[hidden] { display: none; }
.vote-modal { position: fixed !important; inset: 0 !important; z-index: 9999 !important; display: grid; place-items: center; padding: 18px; }
.vote-modal-backdrop { position: absolute; inset: 0; background: rgba(12, 4, 31, .78); backdrop-filter: blur(6px); }
.vote-modal-card { position: relative; width: min(100%, 470px); padding: 28px; border: 3px solid #ffd447; border-radius: 16px; background: #fff; color: var(--card-text); box-shadow: 0 20px 60px rgba(0,0,0,.45); animation: modal-in .22s ease-out; }
.vote-modal-card h2 { margin: 4px 0 18px; font-size: 42px; }
.vote-modal-question, .vote-modal-note { color: #6d6287; }
.vote-choice-preview { display: grid; gap: 5px; padding: 16px; border-left: 4px solid var(--accent); border-radius: 8px; background: #f8f3ff; }
.vote-choice-preview strong { font-size: 22px; }
.vote-choice-preview span { color: #5a4b85; font-size: 16px; }
.vote-choice-preview small { color: var(--accent-2); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.vote-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Admin */
.admin-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  max-width: 1100px; margin: 0 auto 24px; padding: 12px 20px;
  background: rgba(255,255,255,.08); border-radius: 999px;
}
.admin-nav-brand { font-weight: 800; margin-right: 8px; }
.admin-nav a { color: var(--text-on-dark); text-decoration: none; opacity: .75; font-weight: 600; }
.admin-nav a.active, .admin-nav a:hover { opacity: 1; text-decoration: underline; }
.admin-nav-user { margin-left: auto; opacity: .8; font-size: 14px; }
.admin-main { max-width: 1100px; margin: 0 auto; }
.admin-main h1 { color: var(--text-on-dark); }
.admin-main .card { max-width: none; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 20px 0; }
.stat-card { background: var(--card); color: var(--card-text); border-radius: var(--radius); padding: 18px; }
.stat-card-national { border: 2px solid var(--accent); }
.stat-number { font-size: 32px; font-weight: 800; margin: 4px 0; }
.stat-number span { font-size: 14px; font-weight: 600; color: var(--muted); }
.stat-sub { margin: 2px 0; color: #5a4b85; font-size: 14px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-not_started { background: #eee; color: #666; }
.badge-in_progress { background: #fdf1dc; color: var(--warning); }
.badge-done, .badge-voted { background: #e2f7ec; color: var(--success); }
.badge-checked_in { background: #e6e0fb; color: var(--accent-2); }

.data-table { width: 100%; border-collapse: collapse; background: var(--card); color: var(--card-text); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; }
.data-table input { margin: 0; padding: 6px 8px; font-size: 14px; }
.input-narrow { width: 80px; }
.row-actions { display: flex; gap: 6px; }
.inline-form { display: inline-block; }
.testing-danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 16px 0; padding: 14px 18px; border: 1px solid #f0b7bf; border-radius: var(--radius); background: #fff5f6; color: var(--card-text); }
.testing-danger-zone strong, .testing-danger-zone span { display: block; }
.testing-danger-zone span { margin-top: 3px; color: #8a5962; font-size: 13px; }
.audit-table { font-size: 13px; }
.audit-table td:last-child { max-width: 420px; color: #6d6287; }

.songs-table td form { display: contents; }

.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.checkbox-label input { width: auto; }

.add-song-form, .add-admin-form, .checkin-form, .filter-form {
  background: var(--card); color: var(--card-text); border-radius: var(--radius); padding: 18px; margin-top: 16px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: end;
}
.add-song-form label, .add-admin-form label { flex: 1 1 140px; margin-bottom: 0; }

.checkin-result { text-align: center; }
.pin-display { font-size: 32px; }
.hint { color: var(--muted); font-size: 13px; }

/* Big-screen Top 12 reveal board */
.reveal-board-stage { max-width: 780px; padding-bottom: 90px; }
.reveal-board-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin: 8px 0 4px; }
.reveal-board-header h1 { margin: 0; font-size: clamp(38px, 7vw, 64px); }
.reveal-progress-pill {
  padding: 7px 16px; border-radius: 999px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18); font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px; font-weight: 700; letter-spacing: .08em; color: var(--text-on-dark);
}
.reveal-status-line { min-height: 1.4em; margin: 6px 0 26px; color: #ffd447; font-family: 'Barlow Condensed', sans-serif; font-size: clamp(18px, 3vw, 26px); text-transform: uppercase; letter-spacing: .04em; }

.reveal-board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.reveal-row {
  display: grid; grid-template-columns: 2.4em 1.8em 1fr auto; align-items: center; gap: 12px;
  padding: 10px 18px; border-radius: 10px; font-size: clamp(15px, 2vw, 19px);
  background: linear-gradient(90deg, rgba(120,20,50,.55), rgba(80,15,40,.3));
  border: 1px solid rgba(255,255,255,.08); transition: background .3s ease, border-color .3s ease, transform .2s ease;
}
.reveal-row.slot-mystery { opacity: .55; background: rgba(255,255,255,.04); }
.reveal-row.slot-mystery .reveal-row-artist { letter-spacing: .3em; color: var(--muted); }
.reveal-row-rank { font-weight: 800; font-family: 'Barlow Condensed', sans-serif; color: var(--muted); }
.reveal-row-flag { font-size: 20px; line-height: 1; text-align: center; }
.reveal-row-flag img { display: block; width: 30px; height: 22px; object-fit: cover; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.reveal-row-copy { display: grid; gap: 1px; min-width: 0; text-align: left; }
.reveal-row-artist { font-weight: 800; overflow-wrap: anywhere; }
.reveal-row-title { color: var(--muted); font-size: .78em; overflow-wrap: anywhere; }
.reveal-row-score { font-weight: 800; font-family: 'Barlow Condensed', sans-serif; font-size: 1.2em; white-space: nowrap; }
.reveal-row.slot-revealed { background: linear-gradient(90deg, rgba(120,20,55,.65), rgba(70,12,35,.45)); border-color: rgba(255,255,255,.14); }
.reveal-row.slot-active { background: linear-gradient(90deg, #ff9d1a, #ff5f9d); border-color: #ffd447; color: #201033; transform: scale(1.025); box-shadow: 0 8px 26px rgba(255,140,20,.4); }
.reveal-row.slot-active .reveal-row-title, .reveal-row.slot-active .reveal-row-rank { color: #4a2a12; }
.reveal-row.slot-winner { background: linear-gradient(90deg, rgba(255,212,71,.35), rgba(255,47,176,.22)); border-color: #ffd447; box-shadow: 0 0 24px rgba(255,212,71,.25); }
.reveal-row.slot-winner .reveal-row-rank::before { content: '👑 '; }
.reveal-board.leaderboard-mode .slot-mystery { display: none; }

.reveal-stars {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff, transparent),
    radial-gradient(2px 2px at 80% 10%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 60% 70%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 30% 80%, #fff, transparent),
    radial-gradient(2px 2px at 90% 60%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 45% 35%, #fff, transparent);
  background-size: 100% 100%; opacity: .35; animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .2; } to { opacity: .5; } }

.presenter-toolbar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 999px;
  background: rgba(10, 5, 22, .78); border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 30px rgba(0,0,0,.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.presenter-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border: none; border-radius: 50%;
  background: transparent; color: var(--text-on-dark); font-size: 17px; cursor: pointer; transition: background .15s ease;
}
.presenter-btn:hover { background: rgba(255,255,255,.12); }
.presenter-btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.presenter-btn-accent:hover { filter: brightness(1.1); }
.presenter-btn-active { background: rgba(255,212,71,.25); color: #ffd447; }
.presenter-divider { width: 1px; height: 22px; background: rgba(255,255,255,.16); margin: 0 4px; }

.passcode-card { text-align: center; }
.passcode-input { text-align: center; font-size: 22px; letter-spacing: .08em; }

@media (max-width: 700px) {
  .reveal-row { grid-template-columns: 2em 1.6em 1fr auto; gap: 8px; padding: 9px 12px; }
  .presenter-toolbar { bottom: 12px; gap: 2px; padding: 6px 8px; }
  .presenter-btn { width: 34px; height: 34px; font-size: 15px; }
  .reveal-board-stage { padding-bottom: 76px; }
}

.site-footer { text-align: center; margin-top: 40px; color: var(--muted); font-size: 13px; }
.reveal-body .site-footer { display: none; }

.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.headline-mark { color: #ffd447; }
.event-strip { display: flex; align-items: center; gap: 14px; margin: 18px 0 24px; padding: 14px 16px; border-left: 4px solid var(--accent); background: #f8f3ff; border-radius: 8px; color: var(--card-text); }
.event-strip span:not(.countdown) { color: #6d6287; font-size: 13px; }
.countdown { margin-left: auto; color: var(--accent-2); font-family: 'Barlow Condensed', sans-serif; font-size: 28px; letter-spacing: .06em; }
.event-closed, .event-upcoming { border-color: var(--warning); }
.city-link { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: #fff; border-radius: 10px; box-shadow: 0 6px 18px rgba(28, 9, 69, .14); }
.city-link-copy { display: grid; gap: 4px; }
.city-link small { color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.city-countdown { color: #6d6287; font-size: 12px; font-style: normal; }
.city-arrow { color: var(--accent); font-size: 24px; font-weight: 800; }
.city-link-open { border: 2px solid var(--accent); box-shadow: 0 8px 22px rgba(255,47,176,.2); }
.fake-reveal-link { display: inline-block; margin: 10px 0 28px; color: var(--accent-2); font-weight: 800; text-decoration: none; }
.fake-reveal-link:hover { color: var(--accent); }

/* City setup */
.admin-lede { color: var(--muted); }
.city-setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px; }
.city-setup-card { margin: 0; }
.city-setup-heading { display: flex; justify-content: space-between; align-items: start; }
.city-setup-heading h2 { margin: 0; font-size: 34px; }
.city-setup-heading .eyebrow { margin: 0 0 5px; }
.countdown-label { margin-bottom: 2px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.setup-countdown { margin-bottom: 16px; color: var(--accent-2); font-family: 'Barlow Condensed', sans-serif; font-size: 42px; letter-spacing: .06em; }
.voting-form { display: grid; gap: 10px; }
.voting-duration { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.voting-duration[hidden] { display: none; }
.voting-duration label { margin: 0; font-size: 13px; }
.voting-duration select { display: block; width: 100%; margin-top: 4px; }
.qr-builder { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #ece7f5; }
.qr-builder img { width: 120px; height: 120px; image-rendering: pixelated; }
.qr-builder p { word-break: break-all; color: #6d6287; font-size: 11px; }
.voting-toggle { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px; border: 1px solid #e4dff2; border-radius: 10px; background: #faf8ff; cursor: pointer; }
.toggle-copy { flex: 1; }
.toggle-copy strong, .toggle-copy small { display: block; }
.toggle-copy small { margin-top: 3px; color: #6d6287; font-size: 12px; font-weight: 400; }
.toggle-input { position: absolute; width: 1px !important; height: 1px; opacity: 0; }
.toggle-track { position: relative; width: 48px; height: 26px; flex: 0 0 48px; border-radius: 999px; background: #c8c1d7; transition: background .2s ease; }
.toggle-thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: transform .2s ease; }
.toggle-input:checked + .toggle-track { background: var(--success); }
.toggle-input:checked + .toggle-track .toggle-thumb { transform: translateX(22px); }
.toggle-input:focus-visible + .toggle-track { outline: 3px solid rgba(255,47,176,.35); outline-offset: 3px; }
.toggle-state { min-width: 26px; color: #6d6287; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.badge-upcoming { background: #fdf1dc; color: var(--warning); }
.badge-open { background: #e2f7ec; color: var(--success); }
.badge-closed, .badge-unscheduled { background: #eee; color: #666; }

.reveal-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.reveal-card-heading h2 { margin: 0; }

/* Presenter reveal */
.reveal-stage { max-width: 1000px; margin: 0 auto; position: relative; z-index: 1; text-align: center; }
.reveal-stage h1 { margin: 10px 0; font-size: clamp(64px, 12vw, 140px); text-transform: uppercase; }
.reveal-stage h1 span { color: #ffd447; }
.reveal-kicker { color: var(--muted); font-size: 15px; }
.reveal-console { max-width: 780px; margin: 38px auto 0; }
.reveal-state { color: #ffd447; font-family: 'Barlow Condensed', sans-serif; font-size: 26px; text-transform: uppercase; letter-spacing: .08em; }
.reveal-result { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 24px; min-height: 190px; padding: 28px; text-align: left; background: rgba(255,255,255,.96); color: var(--card-text); border: 4px solid #ffd447; border-radius: 16px; box-shadow: 0 0 60px rgba(255,47,176,.3); }
.reveal-result.is-hidden { visibility: hidden; }
.reveal-pop { animation: reveal-pop .7s cubic-bezier(.2, .8, .2, 1); }
.reveal-rank { color: var(--accent); font-family: 'Barlow Condensed', sans-serif; font-size: 112px; font-weight: 800; line-height: .8; }
.reveal-country { margin: 0; color: var(--accent-2); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.reveal-result h2 { margin: 6px 0; font-size: 42px; }
.reveal-song { margin: 0; color: #6d6287; font-size: 18px; }
.reveal-votes { color: var(--accent-2); font-family: 'Barlow Condensed', sans-serif; font-size: 24px; white-space: nowrap; }
.reveal-controls { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.reveal-controls .btn-large { width: auto; }
.reveal-progress { color: var(--muted); font-size: 12px; }
.reveal-flag-stage { position: fixed; left: 50%; top: 72%; z-index: 2; display: grid; place-items: center; width: min(42vw, 360px); aspect-ratio: 3 / 2; transform: translate(-50%, -50%); pointer-events: none; animation: reveal-flag-in .45s ease-out both; }
.reveal-flag-stage img { display: block; width: 100%; height: 100%; object-fit: cover; border: 6px solid rgba(255,255,255,.9); border-radius: 8px; box-shadow: 0 16px 50px rgba(0,0,0,.42); }
.reveal-flag-stage > span { font-size: clamp(100px, 20vw, 220px); line-height: 1; filter: drop-shadow(0 16px 28px rgba(0,0,0,.4)); }
.reveal-flag-winner { width: min(54vw, 500px); }
.fireworks { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
@keyframes reveal-flag-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.7); } to { opacity: .95; transform: translate(-50%, -50%) scale(1); } }
@keyframes reveal-pop { from { opacity: 0; transform: scale(.86) translateY(24px); } to { opacity: 1; transform: scale(1) translateY(0); } }

@media (max-width: 600px) {
  body { padding: 12px 10px 32px; }
  .vote-card { border-radius: 12px; }
  .vote-heading h1 { font-size: 48px; }
  .vote-badge { font-size: 9px; }
  .event-strip { margin-top: 14px; }
  .song-option { gap: 6px; min-height: 44px; padding: 6px 4px; }
  .points-choice { grid-template-columns: 92px minmax(0, 1fr); gap: 8px; }
  .vote-summary { top: 6px; padding: 12px; }
  .vote-summary ol { grid-template-columns: 1fr; gap: 2px; }
  .song-option { flex-wrap: wrap; }
  .song-points { margin-left: auto; flex-basis: 82px; min-width: 82px; }
  .reveal-flag-stage { top: 76%; width: min(62vw, 300px); }
  .country-flag { width: 24px; flex-basis: 24px; font-size: 17px; }
  .country-flag img { width: 23px; height: 17px; }
  .song-country { margin-left: 0; font-size: 11px; }
  .song-copy { flex: 1; }
  .song-title { font-size: 13px; overflow-wrap: anywhere; }
  .song-youtube { font-size: 9px; padding: 3px 5px; }
  .ballot-intro { align-items: start; }
  .vote-modal-card { padding: 22px; }
  .vote-modal-card h2 { font-size: 36px; }
  .vote-modal-actions { flex-direction: column-reverse; }
  .vote-modal-actions .btn { width: 100%; }
  .admin-nav { border-radius: var(--radius); }
  .admin-nav-user { margin-left: 0; width: 100%; }
  .testing-danger-zone { align-items: stretch; flex-direction: column; }
  .testing-danger-zone .btn { width: 100%; }
  .voting-toggle { align-items: start; }
  .event-strip { align-items: start; flex-wrap: wrap; }
  .countdown { width: 100%; margin-left: 0; }
  .city-setup-grid { grid-template-columns: 1fr; }
  .reveal-result { grid-template-columns: 70px 1fr; padding: 18px; gap: 14px; }
  .reveal-rank { font-size: 70px; }
  .reveal-result h2 { font-size: 30px; }
  .reveal-votes { grid-column: 2; }
}

/* Big-screen "voting is open" overlay: covers the reveal board until voting closes. */
.voting-overlay { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px 16px 96px; background: radial-gradient(circle at top, rgba(75,47,255,.55), rgba(21,10,46,.94) 70%); backdrop-filter: blur(6px); text-align: center; animation: voting-overlay-in .5s ease-out both; }
.voting-overlay[hidden] { display: none; }
.voting-overlay-leaving { animation: voting-overlay-out .9s ease-in both; }
.voting-overlay-card { display: grid; justify-items: center; gap: 4px; width: 100%; max-width: 900px; min-width: 0; }
.voting-overlay-card .eyebrow { margin: 0; color: #ffd447; letter-spacing: .18em; }
.voting-overlay-card h2 { margin: 6px 0 0; color: #fff; font-size: clamp(34px, 6vw, 72px); text-transform: uppercase; }
.voting-overlay-countdown { color: #fff; font-family: 'Barlow Condensed', sans-serif; font-size: clamp(96px, 22vw, 260px); font-weight: 800; line-height: .95; letter-spacing: .02em; font-variant-numeric: tabular-nums; text-shadow: 0 0 40px rgba(255,47,176,.55); }
.voting-overlay-final .voting-overlay-countdown { color: #ffd447; animation: voting-overlay-pulse 1s ease-in-out infinite; }
.voting-overlay-caption { margin: 0 0 18px; color: var(--muted); font-family: 'Barlow Condensed', sans-serif; font-size: clamp(20px, 3vw, 32px); text-transform: uppercase; letter-spacing: .08em; }
.voting-overlay-qr { display: flex; align-items: center; gap: 20px; max-width: 100%; padding: 16px 22px; border-radius: 16px; background: rgba(255,255,255,.96); color: var(--card-text); text-align: left; }
.voting-overlay-qr img { display: block; width: clamp(110px, 16vw, 180px); height: auto; }
.voting-overlay-qr p { min-width: 0; margin: 0; font-size: clamp(16px, 2vw, 22px); }
.voting-overlay-qr strong { color: var(--accent-2); overflow-wrap: anywhere; }
@keyframes voting-overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes voting-overlay-out { from { opacity: 1; } to { opacity: 0; transform: scale(1.04); } }
@keyframes voting-overlay-pulse { 50% { transform: scale(1.04); } }
@media (max-width: 560px) {
  .voting-overlay-qr { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .voting-overlay, .voting-overlay-leaving, .voting-overlay-final .voting-overlay-countdown { animation: none; }
}
