:root {
  --blue: #0057b7;
  --blue-2: #0b63ce;
  --blue-soft: #eaf3ff;
  --gold: #ffd700;
  --gold-2: #f4c430;
  --gold-soft: #fff4bd;
  --ink: #0b1220;
  --ink-2: #202b3d;
  --muted: #667085;
  --line: #e7ebf2;
  --surface: rgba(255,255,255,.76);
  --surface-solid: #fff;
  --shadow: 0 24px 70px rgba(15, 23, 42, .08);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --safe: max(20px, env(safe-area-inset-left));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, rgba(0,87,183,.13), transparent 30%),
    radial-gradient(circle at 92% 0%, rgba(255,215,0,.20), transparent 26%),
    linear-gradient(135deg, #fbfcff 0%, #fffdf8 46%, #f8fbff 100%);
  overflow-x: hidden;
}
body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
}
body::before {
  width: 480px; height: 480px;
  left: -230px; bottom: -180px;
  background: radial-gradient(circle, rgba(0,87,183,.12), transparent 62%);
}
body::after {
  width: 420px; height: 420px;
  right: -200px; top: -170px;
  background: radial-gradient(circle, rgba(255,215,0,.18), transparent 65%);
}
button, input { font: inherit; }
button { cursor: pointer; }

.app-shell,
.results-shell {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 22px var(--safe) 34px;
}
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.festival-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 22px;
  filter: drop-shadow(0 12px 28px rgba(0, 87, 183, .12));
}
.festival-logo.small { width: 54px; height: 54px; border-radius: 16px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy span { color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.brand-copy strong { font-size: 18px; letter-spacing: .02em; }
.glass-panel {
  background: var(--surface);
  border: 1px solid rgba(231,235,242,.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.hero-card {
  border-radius: var(--radius-xl);
  padding: clamp(28px, 8vw, 74px);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,87,183,.09), transparent 42%),
    radial-gradient(circle at 78% 20%, rgba(255,215,0,.18), transparent 25%);
  opacity: .9;
  pointer-events: none;
}
.hero-card > * { position: relative; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-weight: 760;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 18px 0 0 var(--blue);
}
h1 {
  font-size: clamp(36px, 8vw, 74px);
  line-height: .96;
  letter-spacing: -.065em;
  margin: 18px 0 20px;
  max-width: 880px;
}
.lead {
  font-size: clamp(17px, 2.5vw, 22px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 760px;
  margin: 0;
}
.mini-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 28px;
}
.mini-notes span,
.pill {
  border: 1px solid rgba(0,87,183,.16);
  background: rgba(255,255,255,.68);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 650;
  font-size: 14px;
}
.primary-btn,
.soft-btn,
.ghost-btn,
.choose-btn {
  border: 0;
  border-radius: 999px;
  min-height: 54px;
  padding: 0 26px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #01418c);
  box-shadow: 0 18px 38px rgba(0,87,183,.22);
}
.primary-btn:hover,
.choose-btn:hover,
.soft-btn:hover,
.ghost-btn:hover { transform: translateY(-1px); }
.primary-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.primary-btn.compact { min-height: 46px; padding-inline: 20px; }
.soft-btn {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.ghost-btn,
.ghost-link {
  background: transparent;
  color: var(--blue);
  border: 1px solid rgba(0,87,183,.18);
  text-decoration: none;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 750;
}
.choose-btn {
  background: var(--gold);
  color: #362900;
  box-shadow: 0 12px 26px rgba(255,215,0,.22);
}
.choose-btn.active {
  background: linear-gradient(135deg, var(--blue), #004494);
  color: #fff;
}
.hidden { display: none !important; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 18px;
}
.step-indicator {
  color: var(--muted);
  font-weight: 800;
  letter-spacing: .05em;
}
.vote-screen { min-height: 100svh; padding-top: 14px; }
.option-card {
  min-height: 500px;
  border-radius: var(--radius-xl);
  padding: clamp(24px, 5vw, 46px);
  position: relative;
  overflow: hidden;
}
.option-card::before {
  content: "";
  position: absolute;
  width: 280px; height: 280px;
  right: -110px; top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,215,0,.18), transparent 68%);
}
.option-inner { position: relative; display: grid; gap: 22px; }
.option-logo-row { display: flex; align-items: center; gap: 18px; }
.option-symbol {
  width: 76px; height: 76px;
  flex: 0 0 auto;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #fff, var(--blue-soft));
  border: 1px solid rgba(0,87,183,.16);
  box-shadow: 0 18px 36px rgba(0,87,183,.11);
  position: relative;
  overflow: hidden;
}
.option-symbol span {
  font-size: 32px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: -.08em;
}
.option-symbol::after {
  content: "";
  width: 30px; height: 6px;
  border-radius: 999px;
  background: var(--gold);
  position: absolute;
  bottom: 16px; left: 50%; transform: translateX(-50%);
}
.option-title h2 {
  margin: 0;
  font-size: clamp(44px, 12vw, 92px);
  letter-spacing: -.06em;
  line-height: .88;
}
.option-title p { margin: 8px 0 0; color: var(--blue); font-weight: 800; }
.option-description {
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1.48;
  color: var(--ink-2);
  max-width: 720px;
}
.domain-list { display: grid; gap: 8px; color: var(--muted); font-weight: 650; }
.domain-list code {
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 12px;
  color: var(--ink);
}
.vote-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 10px;
  margin: 14px 0;
}
.selection-panel {
  background: rgba(255,255,255,.65);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: grid;
  gap: 14px;
}
.selection-panel p { margin: 5px 0 0; color: var(--muted); line-height: 1.45; }
.selected-chips,
.chosen-list { display: flex; flex-wrap: wrap; gap: 8px; }
.selected-chips span,
.chosen-list span {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
}
.form-message { margin: 0; color: var(--muted); font-weight: 650; }
.form-message.error { color: #b42318; }
.already-box {
  display: flex;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  max-width: 760px;
  margin-top: 28px;
}
.already-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}
.closed-box .already-icon { background: #7a5b00; }
.already-box h2 { margin: 0 0 5px; }
.already-box p { margin: 0 0 12px; color: var(--muted); line-height: 1.5; }
.thanks-screen { min-height: 100svh; display: grid; place-items: center; }
.thanks-card { border-radius: var(--radius-xl); padding: clamp(34px, 8vw, 72px); text-align: center; max-width: 760px; }
.thanks-card h1 { font-size: clamp(42px, 7vw, 72px); margin: 12px auto 14px; }
.thanks-card p { color: var(--ink-2); line-height: 1.55; font-size: 19px; }
.thanks-mark {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  display: grid;
  place-items: center;
  margin: 0 auto;
  font-size: 26px;
  font-weight: 900;
}

/* Results */
.admin-body .results-shell { max-width: 1240px; }
.login-shell {
  width: min(520px, calc(100% - 40px));
  margin: 10vh auto;
  border-radius: var(--radius-xl);
  padding: 34px;
  text-align: center;
}
.login-logo { width: 96px; height: 96px; object-fit: contain; border-radius: 26px; }
.login-shell h1 { font-size: 42px; letter-spacing: -.04em; margin: 18px 0 10px; }
.login-shell p { color: var(--muted); line-height: 1.5; }
.login-form { display: grid; gap: 12px; margin-top: 22px; }
input[type="password"], input[type="datetime-local"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 50px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
}
.results-header {
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.compact-brand .brand-copy strong { font-size: 17px; }
.leader-card { border-radius: var(--radius-xl); padding: 28px; margin-bottom: 18px; }
.leader-card h1 { font-size: clamp(42px, 8vw, 92px); margin: 10px 0 8px; }
.leader-card p { color: var(--muted); margin: 0; }
.admin-grid { display: grid; grid-template-columns: 370px 1fr; gap: 18px; margin-bottom: 18px; }
.settings-card { border-radius: var(--radius-lg); padding: 22px; display: grid; gap: 14px; }
.settings-card h2,
.chart-card h2 { margin: 0; letter-spacing: -.02em; }
.settings-card label { display: grid; gap: 8px; color: var(--muted); font-weight: 700; }
.toggle-row { display: flex !important; align-items: center; gap: 12px; color: var(--ink) !important; }
.toggle-row input { width: 22px; height: 22px; accent-color: var(--blue); }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card { background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.stat-card span { color: var(--muted); font-size: 13px; font-weight: 750; }
.stat-card strong { display: block; font-size: 34px; margin-top: 8px; letter-spacing: -.04em; }
.chart-card { border-radius: var(--radius-lg); padding: 22px; margin-bottom: 18px; }
.section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title span { color: var(--muted); font-size: 13px; }
.bar-chart { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(104px, 170px) 1fr 54px; align-items: center; gap: 12px; }
.bar-name { font-weight: 850; color: var(--blue); }
.bar-track { height: 16px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--gold)); min-width: 3px; transition: width .35s ease; }
.bar-value { font-weight: 850; text-align: right; }
.small-charts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.mini-chart { display: grid; gap: 10px; margin-top: 14px; }
.mini-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.mini-label { color: var(--ink-2); font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-value { color: var(--muted); font-weight: 800; }
.mini-track { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: #edf1f7; overflow: hidden; }
.mini-fill { height: 100%; background: var(--blue); border-radius: 99px; }
.last-votes { display: grid; gap: 10px; margin-top: 14px; }
.last-vote { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.last-vote strong { color: var(--ink); }
.last-vote span { color: var(--muted); }

@media (max-width: 980px) {
  .admin-grid { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .small-charts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .app-shell, .results-shell { padding: 16px max(16px, env(safe-area-inset-left)) 24px; }
  .hero { justify-content: flex-start; padding-top: 12px; }
  .festival-logo { width: 58px; height: 58px; border-radius: 18px; }
  .brand-copy span { font-size: 10px; }
  .brand-copy strong { font-size: 16px; }
  .hero-card { padding: 24px; border-radius: 28px; }
  h1 { font-size: clamp(40px, 12vw, 56px); }
  .lead { font-size: 16px; }
  .mini-notes span { width: 100%; }
  .option-card { min-height: 440px; padding: 24px; border-radius: 28px; }
  .option-logo-row { align-items: flex-start; flex-direction: column; gap: 14px; }
  .option-symbol { width: 68px; height: 68px; border-radius: 22px; }
  .option-title h2 { font-size: clamp(50px, 17vw, 78px); }
  .vote-actions { grid-template-columns: 1fr 1fr; }
  .choose-btn { grid-column: 1 / -1; order: -1; }
  .selection-panel { padding: 16px; }
  .already-box { flex-direction: column; }
  .results-header { align-items: flex-start; gap: 14px; }
  .stat-cards { grid-template-columns: 1fr; }
  .small-charts { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr 46px; }
  .bar-track { grid-column: 1 / -1; }
  .last-vote { flex-direction: column; }
}
