:root {
  --black: #050505;
  --black-soft: #0d0d0d;
  --charcoal: #171717;
  --charcoal-2: #242424;
  --paper: #f2f2f0;
  --white: #ffffff;
  --ink: #111111;
  --muted: #6b6b6b;
  --line: #ddddda;
  --border: #ddddda;
  --gold: #f3bd18;
  --gold-deep: #dca700;
  --gold-pale: #fff5cf;
  --success: #246b3d;
  --danger: #a51f1f;
  --panel: #ffffff;
  --shadow: 0 22px 60px rgba(0, 0, 0, .16);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }

.shell { min-height: 100vh; }
.public-shell,
.entry-shell { background: var(--black); color: var(--white); }
.admin-shell { background: var(--paper); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding: .72rem clamp(1rem, 3vw, 2.5rem);
  color: var(--white);
  background: rgba(5, 5, 5, .96);
  border-bottom: 1px solid rgba(255, 255, 255, .13);
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  cursor: pointer;
}
.brand-logo {
  display: block;
  width: clamp(190px, 24vw, 300px);
  height: auto;
}
.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
  flex-wrap: wrap;
}
.top-nav-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: .45rem .25rem;
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: transparent;
  border: 0;
}
.top-nav-link:hover { color: var(--gold); }

.btn {
  appearance: none;
  border: 0;
  border-radius: 6px;
  padding: .82rem 1.05rem;
  font-weight: 800;
  letter-spacing: .025em;
  transition: transform .16s ease, opacity .16s ease, background .16s ease, box-shadow .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid rgba(243, 189, 24, .38); outline-offset: 3px; }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.btn-primary {
  color: var(--black);
  background: var(--gold);
  box-shadow: 0 10px 24px rgba(243, 189, 24, .22);
}
.btn-primary:hover { background: #ffd044; }
.btn-secondary { color: var(--black); background: var(--white); }
.btn-dark { color: var(--white); background: var(--black); }
.btn-dark:hover { background: var(--charcoal-2); }
.btn-gold { color: var(--black); background: var(--gold); }
.btn-ghost { color: inherit; background: transparent; border: 1px solid currentColor; }
.btn-danger { color: var(--danger); background: #fff0f0; border: 1px solid #f2c7c7; }
.btn-small { padding: .58rem .78rem; border-radius: 5px; font-size: .84rem; }

main {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}
.public-main { padding-top: 1.4rem; }
.admin-main { padding-top: 1.6rem; }
.entry-main { padding-top: 2rem; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(250px, .58fr);
  gap: clamp(1.8rem, 5vw, 4.8rem);
  align-items: center;
  min-height: 560px;
  padding: clamp(2rem, 6vw, 5rem);
  background:
    radial-gradient(circle at 82% 26%, rgba(243, 189, 24, .15), transparent 26rem),
    linear-gradient(145deg, #030303 0%, #0a0a0a 62%, #111111 100%);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 2px;
  box-shadow: var(--shadow);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, .06);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 5%, var(--gold) 28%, var(--gold) 72%, transparent 95%);
}
.hero-copy { position: relative; z-index: 2; min-width: 0; }
.hero-logo {
  display: block;
  width: min(650px, 100%);
  margin-bottom: clamp(1.6rem, 4vw, 2.7rem);
}
.kicker {
  color: var(--gold-deep);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .22em;
  line-height: 1.45;
  text-transform: uppercase;
}
h1, h2, h3, h4 {
  margin: 0 0 .72rem;
  line-height: 1.05;
}
h1, h2, h3 { font-family: Oswald, Inter, sans-serif; }
h1 {
  max-width: 820px;
  font-size: clamp(3.2rem, 6.2vw, 6.5rem);
  font-weight: 700;
  letter-spacing: .025em;
  text-transform: uppercase;
}
h2 { font-size: clamp(2.1rem, 4vw, 3.7rem); }
h3 { font-size: 1.55rem; }
h4 { font-size: 1.08rem; }
.hero p {
  max-width: 700px;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  line-height: 1.72;
}
.hero-tagline {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-top: 1rem;
  color: var(--white);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero-tagline::before,
.hero-tagline::after {
  content: "";
  width: min(90px, 14vw);
  height: 1px;
  background: var(--gold);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.7rem;
}
.hero-badge {
  position: relative;
  z-index: 2;
  aspect-ratio: 1;
  width: min(330px, 100%);
  justify-self: center;
  display: grid;
  place-items: center;
  padding: 1.4rem;
  color: var(--white);
  text-align: center;
  background: rgba(0, 0, 0, .72);
  border: 2px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 12px rgba(243, 189, 24, .07), 0 28px 70px rgba(0, 0, 0, .55);
}
.hero-badge::before,
.hero-badge::after {
  content: "★ ★ ★";
  position: absolute;
  left: 0;
  right: 0;
  color: var(--gold);
  font-size: .82rem;
  letter-spacing: .4em;
}
.hero-badge::before { top: 13%; }
.hero-badge::after { bottom: 13%; }
.hero-badge strong {
  display: block;
  color: var(--white);
  font-family: Oswald, sans-serif;
  font-size: clamp(5rem, 10vw, 8.2rem);
  line-height: .86;
}
.hero-badge span {
  display: block;
  margin-top: .55rem;
  color: var(--gold);
  font-family: Oswald, sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero-badge small {
  display: block;
  margin-top: .45rem;
  color: rgba(255, 255, 255, .72);
  font-weight: 700;
  letter-spacing: .08em;
}

.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section { margin-top: 2rem; }

.card {
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.35rem;
  box-shadow: var(--shadow-soft);
}
.card-dark {
  color: var(--white);
  background: var(--black-soft);
  border-color: rgba(255, 255, 255, .12);
}

.entry-options {
  position: relative;
  z-index: 3;
  margin-top: 1.1rem;
}
.entry-card {
  position: relative;
  overflow: hidden;
  min-height: 285px;
  padding: 1.55rem;
  text-align: center;
  border-top: 4px solid var(--gold);
}
.entry-card::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0;
  height: 2px;
  background: var(--gold);
}
.entry-icon {
  width: 68px;
  height: 68px;
  margin: .25rem auto 1rem;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: var(--black);
  border: 1px solid var(--charcoal-2);
  border-radius: 50%;
  font-family: Oswald, sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
}
.entry-card h3 {
  font-size: 1.35rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.entry-card .entry-count {
  color: var(--black);
  font-family: Oswald, sans-serif;
  font-size: 3.65rem;
  font-weight: 700;
  line-height: 1;
}
.entry-card .entry-word {
  margin-top: .25rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.entry-card p { color: var(--muted); line-height: 1.55; }
.entry-card .btn { width: 100%; margin-top: .5rem; }
.entry-card .btn:disabled { opacity: 1; color: #574100; background: #f8e7a5; cursor: default; }
.entry-card small { color: var(--muted); }

.public-stats {
  color: var(--white);
  background: var(--black-soft);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  padding: .4rem;
}
.public-stats .card {
  color: var(--white);
  text-align: center;
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(243, 189, 24, .25);
  border-radius: 0;
  box-shadow: none;
}
.public-stats .card:last-child { border-right: 0; }
.stat strong {
  display: block;
  color: var(--black);
  font-family: Oswald, sans-serif;
  font-size: 2.7rem;
  line-height: 1;
}
.stat span { color: var(--muted); font-size: .88rem; }
.public-stats .stat strong { color: var(--white); }
.public-stats .stat span { color: rgba(255, 255, 255, .66); }

.public-section {
  padding: clamp(1.6rem, 4vw, 3rem);
  color: var(--ink);
  background: var(--white);
  border-radius: 8px;
}
.public-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.3rem;
}
.public-section-header p { max-width: 620px; color: var(--muted); line-height: 1.65; }
.prize-card {
  min-height: 190px;
  border-top: 3px solid var(--gold);
  box-shadow: none;
}
.prize-card .prize-order {
  color: var(--gold-deep);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.prize-card p { color: var(--muted); line-height: 1.55; }
.prize-donor { display: block; margin-top: 1rem; font-size: .86rem; }

.how-grid .card {
  color: var(--white);
  background: var(--charcoal);
  border-color: rgba(255, 255, 255, .1);
  box-shadow: none;
}
.how-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: .9rem;
  color: var(--black);
  background: var(--gold);
  border-radius: 50%;
  font-weight: 900;
}
.how-grid p { color: rgba(255, 255, 255, .67); line-height: 1.55; }

.form-wrap { width: min(720px, 100%); margin: 1rem auto 3rem; }
.form-card {
  padding: clamp(1.35rem, 4vw, 2.35rem);
  border-top: 4px solid var(--gold);
}
.form-brand {
  display: block;
  width: min(360px, 80%);
  margin: 0 auto 1.5rem;
  filter: none;
}
.entry-route-summary {
  margin: 1rem 0 1.5rem;
  padding: 1.1rem;
  text-align: center;
  background: #f6f6f4;
  border: 1px solid var(--line);
}
.entry-route-summary strong {
  display: block;
  color: var(--gold-deep);
  font-family: Oswald, sans-serif;
  font-size: 2.55rem;
  line-height: 1.05;
  text-transform: uppercase;
}
.entry-route-summary span { color: var(--muted); font-size: .88rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: .45rem; font-weight: 800; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .92rem 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #c9c9c5;
  border-radius: 5px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid rgba(243, 189, 24, .22);
  border-color: var(--gold-deep);
}
.field-help { margin-top: .38rem; color: var(--muted); font-size: .83rem; line-height: 1.45; }
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin: 1.15rem 0;
  line-height: 1.5;
}
.checkbox input {
  width: 19px;
  height: 19px;
  margin-top: .15rem;
  accent-color: var(--gold-deep);
  flex: 0 0 auto;
}
.alert { margin: 1rem 0; padding: 1rem; border-radius: 5px; line-height: 1.5; }
.alert-info { color: #5c4700; background: var(--gold-pale); border: 1px solid #ead27a; }
.alert-success { color: var(--success); background: #eef8f1; border: 1px solid #bcdcc6; }
.alert-danger { color: var(--danger); background: #fff0f0; border: 1px solid #efcaca; }
.entry-confirmation-badge {
  width: 220px;
  aspect-ratio: 1;
  margin: 1.5rem auto;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--black);
  border: 5px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 10px var(--gold-pale);
}
.entry-confirmation-badge strong {
  display: block;
  font-family: Oswald, sans-serif;
  font-size: 5.3rem;
  line-height: .85;
}
.entry-confirmation-badge span {
  display: block;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.admin-heading {
  margin-bottom: 1.25rem;
  padding: 1.3rem 1.45rem;
  color: var(--white);
  background: var(--black);
  border-left: 5px solid var(--gold);
  border-radius: 6px;
}
.admin-heading h2 { margin-bottom: .2rem; }
.admin-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 92px;
  padding: .72rem;
  color: var(--white);
  background: var(--black);
  border-color: var(--black);
}
.sidebar button {
  width: 100%;
  margin: .18rem 0;
  text-align: left;
  color: rgba(255, 255, 255, .75);
  background: transparent;
}
.sidebar button:hover { color: var(--white); background: var(--charcoal); }
.sidebar .active {
  color: var(--black);
  background: var(--gold);
}
.admin-panel { min-width: 0; }
.admin-panel > .card,
.admin-panel > .grid .card { border-top: 3px solid var(--gold); }
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
}
table { width: 100%; border-collapse: collapse; background: var(--white); }
th, td {
  padding: .82rem .9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
th {
  color: #555;
  background: #f4f4f2;
  font-size: .75rem;
  letter-spacing: .075em;
  text-transform: uppercase;
}
tr:last-child td { border-bottom: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: .34rem .58rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
}
.badge-free { color: var(--black); background: #e9e9e6; }
.badge-five { color: #6f5200; background: var(--gold-pale); }
.badge-ten { color: var(--white); background: var(--black); }
.badge-live { color: #dff6e6; background: #1d5f35; }
.badge-test { color: var(--black); background: var(--gold); }

.wheel-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1rem, 3vw, 2rem);
  color: var(--white);
  background:
    radial-gradient(circle at 35% 45%, rgba(243, 189, 24, .08), transparent 25rem),
    var(--black);
  border: 1px solid var(--charcoal-2);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.wheel-wrap { position: relative; display: grid; place-items: center; }
#wheelCanvas { width: min(690px, 100%); height: auto; max-height: 72vh; }
.pointer {
  position: absolute;
  right: calc(50% - min(345px, 50%));
  top: 50%;
  transform: translate(55%, -50%);
  width: 0;
  height: 0;
  border-top: 19px solid transparent;
  border-bottom: 19px solid transparent;
  border-right: 38px solid var(--gold);
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .65));
}
.draw-info {
  padding: 1.3rem;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
}
.draw-info .current-prize { color: var(--gold); font-size: 1.05rem; font-weight: 800; }
.draw-info p { color: rgba(255, 255, 255, .7); line-height: 1.5; }
.winner-reveal {
  margin: 1rem 0;
  padding: 1.15rem;
  color: var(--black);
  text-align: center;
  background: var(--white);
  border: 3px solid var(--gold);
  border-radius: 5px;
  animation: winner-pop .4s ease-out;
}
.winner-reveal strong {
  display: block;
  margin: .3rem 0;
  color: var(--black);
  font-family: Oswald, sans-serif;
  font-size: 2.45rem;
}
@keyframes winner-pop {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}

.label-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 1rem;
}
.qr-label {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 6;
  margin: auto;
  padding: 6.5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  color: #000;
  text-align: center;
  background: #fff;
  border: 2px solid #000;
}
.label-logo {
  display: block;
  width: 88%;
  height: auto;
  margin: 0 auto .2rem;
}
.label-kicker {
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.label-rule { width: 100%; height: 3px; background: #000; }
.qr-label .big {
  font-family: Oswald, sans-serif;
  font-size: clamp(3.1rem, 8vw, 5.1rem);
  font-weight: 700;
  line-height: .94;
  text-transform: uppercase;
}
.qr-label .big span {
  display: block;
  margin-top: .25rem;
  font-family: Inter, sans-serif;
  font-size: .76rem;
  letter-spacing: .2em;
}
.qr-box {
  width: 70%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.qr-box img,
.qr-box canvas { max-width: 100%; height: auto; }
.label-scan {
  font-size: .84rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.label-date {
  font-size: .98rem;
  font-weight: 900;
  line-height: 1.2;
}
.label-valid { color: #333; font-size: .68rem; font-weight: 700; }

.print-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.print-action {
  padding: 1.1rem;
  background: #f7f7f5;
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: 6px;
}
.print-action h4 { margin-bottom: .35rem; }
.section-divider { height: 1px; margin: 1.5rem 0; background: var(--border); }
.bulk-print-area { display: none; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, .78);
}
.modal {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 1.5rem;
  background: var(--white);
  border-top: 5px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .48);
}
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.2rem; }

.footer {
  padding: 2.7rem 1rem;
  color: rgba(255, 255, 255, .65);
  text-align: center;
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, .11);
  font-size: .84rem;
}
.footer-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.footer-logo { width: min(280px, 100%); justify-self: start; }
.footer-copy { line-height: 1.65; }
.footer-note { justify-self: end; text-align: right; }
.admin-shell .footer { margin-top: 2rem; }


/* Production UI details */
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.hero-status {
  display: inline-flex;
  margin-top: 1rem;
  padding: .55rem .75rem;
  color: #ffe796;
  background: rgba(243, 189, 24, .1);
  border: 1px solid rgba(243, 189, 24, .32);
  border-radius: 5px;
  font-size: .82rem;
  font-weight: 700;
}

.legal-links-strip {
  padding: 1rem 1.25rem;
  color: rgba(255, 255, 255, .7);
  text-align: center;
  background: var(--black-soft);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 6px;
}
.legal-links-strip p { margin: 0; }
.text-link,
.footer-link {
  appearance: none;
  padding: 0;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .2em;
  background: transparent;
  border: 0;
  font: inherit;
}
.text-link:hover,
.footer-link:hover { color: var(--gold); }

.loading-card { min-height: 360px; display: grid; align-content: center; justify-items: center; }
.loading-spinner {
  width: 46px;
  height: 46px;
  margin: 1.2rem auto;
  border: 4px solid #e3e3df;
  border-top-color: var(--gold-deep);
  border-radius: 50%;
  animation: loading-spin .8s linear infinite;
}
@keyframes loading-spin { to { transform: rotate(360deg); } }
.technical-error { margin-top: 1rem; }

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.confirmation-mode { margin-top: .65rem; }
.wide-form-wrap { width: min(760px, 100%); }
.admin-mode-controls { justify-content: flex-end; }
.row-muted { opacity: .54; text-decoration: line-through; }
.compact-select {
  min-height: 40px;
  padding: .55rem .7rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 5px;
}
.simulation-route-buttons { margin-top: .85rem; }
.draw-lock { margin-bottom: 1rem; }

.legal-main {
  width: min(900px, calc(100% - 2rem));
  padding-top: 2rem;
}
.legal-card {
  padding: clamp(1.4rem, 4vw, 3rem);
  line-height: 1.72;
}
.legal-card .form-brand { margin-bottom: 1.5rem; }
.legal-card h1 {
  color: var(--black);
  font-size: clamp(2.6rem, 6vw, 4.8rem);
}
.legal-card h2 {
  margin-top: 1.8rem;
  font-size: 1.65rem;
}
.legal-card p { color: #3f3f3f; }
.legal-card a { color: #7a5900; font-weight: 700; }
.legal-back { margin-top: 2rem; }

noscript {
  display: block;
  padding: 1rem;
  color: var(--black);
  text-align: center;
  background: var(--gold);
  font-weight: 800;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.spacer { height: 1rem; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-badge { width: min(310px, 80%); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: .2rem;
  }
  .sidebar button { width: auto; white-space: nowrap; }
  .wheel-stage { grid-template-columns: 1fr; }
  .pointer { right: 0; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-logo, .footer-note { justify-self: center; text-align: center; }
}

@media (max-width: 700px) {
  .topbar { align-items: center; }
  .top-nav-link { display: none; }
  .brand-logo { width: 180px; }
  .nav-actions .badge { display: none; }
  main { width: min(100% - 1rem, 1240px); padding-top: .7rem; }
  .hero { padding: 1.55rem; }
  .hero::before { inset: 9px; }
  h1 { font-size: clamp(2.7rem, 12.5vw, 4rem); }
  .hero-tagline { font-size: .75rem; }
  .grid-4,
  .grid-3,
  .grid-2,
  .label-grid,
  .print-action-grid { grid-template-columns: 1fr; }
  .public-stats .card { border-right: 0; border-bottom: 1px solid rgba(243, 189, 24, .2); }
  .public-stats .card:last-child { border-bottom: 0; }
  .public-section-header { display: block; }
  .card { border-radius: 6px; }
  th, td { padding: .65rem; }
}

@media print {
  @page { size: 4in 6in; margin: 0; }
  body.printing-labels * { visibility: hidden !important; }
  body.printing-labels #bulkPrintArea,
  body.printing-labels #bulkPrintArea * { visibility: visible !important; }
  body.printing-labels #bulkPrintArea {
    display: block !important;
    position: absolute;
    inset: 0;
    width: 4in;
    margin: 0;
    padding: 0;
  }
  body.printing-labels .print-page {
    display: block;
    width: 4in;
    height: 6in;
    margin: 0;
    padding: 0;
    overflow: hidden;
    break-after: page;
    page-break-after: always;
  }
  body.printing-labels .print-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  body.printing-labels .qr-label {
    width: 4in !important;
    height: 6in !important;
    max-width: none !important;
    margin: 0 !important;
    padding: .27in !important;
    aspect-ratio: auto !important;
    border: 0 !important;
    box-sizing: border-box;
    box-shadow: none !important;
  }
  body.printing-labels .label-logo { width: 3.35in !important; }
  body.printing-labels .qr-box { width: 2.56in !important; }
  body.printing-labels .qr-label .big { font-size: .62in !important; }
  body.printing-labels .label-date { font-size: .18in !important; }
}
