:root {
  --brand: #7c3aed;
  --brand-ink: #fff;
  /* iOS-style materials: translucent surfaces over a soft colour backdrop */
  --bg: #f2f1f8;
  --surface: rgba(255, 255, 255, .72);        /* frosted card */
  --surface-solid: #ffffff;
  --surface-2: rgba(118, 118, 128, .12);      /* iOS fill (buttons, chips) */
  --glass: rgba(255, 255, 255, .62);          /* blurred bars, sheets */
  --glass-blur: saturate(180%) blur(20px);
  --glass-edge: rgba(255, 255, 255, .7);      /* top highlight */
  --text: #1c1830;
  --muted: #625d79;
  --border: rgba(60, 60, 67, .14);            /* iOS hairline separator */
  --brand-text: #6d28d9;     /* brand-colored text */
  --ok: #15803d;
  --warn: #b45309;
  --bad: #dc2626;
  --ok-ink: #166534;         /* status text on tinted backgrounds */
  --warn-ink: #92400e;
  --bad-ink: #b91c1c;
  --gold: #a16207;
  --field-border: #8e88a3;   /* 3:1 against the surface */
  --focus: #7c3aed;
  --radius: 20px;
  --seg-on: #fff;                             /* selected segment */
  --radius-sm: 12px;
  --shadow: 0 1px 1px rgba(20, 10, 50, .04), 0 10px 30px rgba(20, 10, 50, .08);
  /* SF Pro on Apple devices, the platform font elsewhere; nothing to download */
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0b12;
    --surface: rgba(30, 28, 44, .72);
    --surface-solid: #1a1726;
    --surface-2: rgba(118, 118, 128, .24);
    --seg-on: #636366;
    --glass: rgba(28, 26, 40, .6);
    --glass-edge: rgba(255, 255, 255, .1);
    --text: #f2f0f9;
    --muted: #aba6c0;
    --border: rgba(255, 255, 255, .1);
    --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    --brand-text: #a78bfa;
    --ok-ink: #4ade80;
    --warn-ink: #fbbf24;
    --bad-ink: #f87171;
    --gold: #facc15;
    --field-border: #6f6888;
    --focus: #c4b5fd;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
/* Soft colour blobs behind the glass. Painted once (fixed layer, gradients
   only, no filters), so scrolling stays cheap. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vmax 40vmax at 8% 12%, color-mix(in srgb, var(--brand) 32%, transparent), transparent 70%),
    radial-gradient(38vmax 38vmax at 92% 18%, color-mix(in srgb, #ec4899 22%, transparent), transparent 70%),
    radial-gradient(45vmax 45vmax at 70% 95%, color-mix(in srgb, #0ea5e9 20%, transparent), transparent 70%),
    radial-gradient(35vmax 35vmax at 10% 90%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%);
}
/* Real blur only on a few layers (bars, sheets, sidebar, info cards). */
.glass, .card, .modal, .side, .savebar, .topbar, .page-head {
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
img { max-width: 100%; display: block; }
a { color: var(--brand-text); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 6px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden { display: none !important; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: .75rem; }
.grow { flex: 1; }

/* ----- buttons & inputs ----- */
.btn {
  --b: var(--surface-2);
  appearance: none; border: 1px solid transparent; background: var(--b); color: var(--text);
  font: inherit; font-weight: 600; padding: .6rem 1rem; border-radius: var(--radius-sm); cursor: pointer;
  display: inline-flex; align-items: center; gap: .4rem; justify-content: center;
  transition: transform .18s var(--ease), filter .15s, background-color .15s;
}
.btn:hover { filter: brightness(.96); }
.btn:active { transform: scale(.97); }  /* iOS-style press */
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.btn.danger { background: var(--bad); color: #fff; border-color: transparent; }
.btn.ok { background: var(--ok); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.sm { padding: .35rem .65rem; font-size: .85rem; border-radius: 8px; }
.btn.block { width: 100%; }
.icon-btn { border: 0; background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: .25rem .5rem; }

label.field { display: block; }
label.field > span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }
label.field > small { display: block; color: var(--muted); font-size: .78rem; margin-top: .25rem; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password],
input[type=datetime-local], input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--field-border); border-radius: var(--radius-sm); padding: .6rem .75rem;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--brand); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn:focus-visible, .nav button:focus-visible, .icon-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
input[type=range]:focus-visible { outline-offset: 4px; }
input[aria-invalid=true] { border-color: var(--bad); }
.field-error { display: block; color: var(--bad-ink); font-size: .82rem; font-weight: 600; margin-top: .3rem; }
.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; }
.icon { flex: none; vertical-align: -0.2em; }
.card-title { font-size: 1.05rem; }
.page-title { font-size: 1.5rem; margin: 0; }
input[type=color] { width: 48px; height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 2px; background: var(--surface); }
input[type=range] { width: 100%; accent-color: var(--brand); }
.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.check input { margin-top: .25rem; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.check b { display: block; font-size: .92rem; }
.check small { color: var(--muted); font-size: .8rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem; }

.card { background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--radius); box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow); padding: 1.15rem; }
.card h3 { font-size: 1.05rem; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.badge.open, .badge.approved { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok-ink); }
.badge.closed, .badge.rejected { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad-ink); }
.badge.pending, .badge.draft { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn-ink); }

/* ----- toasts & modal ----- */
#toasts { position: fixed; z-index: 100; pointer-events: none; bottom: calc(16px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: rgba(28, 27, 34, .86); color: #fff; padding: .75rem 1.1rem; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-weight: 500;
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); transition: opacity .4s, transform .4s var(--ease); animation: toast-in .35s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.toast.error { background: var(--bad); color: #fff; }
.toast.success { background: var(--ok); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }
.modal-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(10, 6, 25, .32); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 26px; width: min(560px, 100%); max-height: calc(100dvh - 32px);
  display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); animation: sheet-in .32s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@media (max-width: 600px) {
  /* iOS bottom sheet on phones, with a grabber */
  .modal-wrap { place-items: end center; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .modal { background: color-mix(in srgb, var(--surface-solid) 88%, transparent); }
  .modal::before { content: ''; width: 36px; height: 5px; border-radius: 3px; background: var(--border); margin: 8px auto 0; flex: none; }
  .video-modal::before { background: rgba(255, 255, 255, .25); }
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.1rem .25rem; }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.toast-region { display: grid; gap: 8px; }
.modal-body { padding: .5rem 1.1rem 1rem; overflow: auto; }
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; padding: .75rem 1.1rem 1rem; border-top: 1px solid var(--border); }
@keyframes fade { from { opacity: 0; } }

.center-card { max-width: 520px; margin: 12vh auto; background: var(--glass); border: 1px solid var(--glass-edge); padding: 2rem; border-radius: 26px; box-shadow: var(--shadow); text-align: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--brand); animation: spin .8s linear infinite; margin: 3rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   Voting page
   ===================================================================== */
/* Banner: shown whole at its own shape, full width, never cropped. Capped
   in height; when capped, a blurred copy of the image fills the sides. */
.hero { position: relative; overflow: hidden; background: #000; }
.hero .banner-img { position: relative; z-index: 1; display: block; width: 100%; height: auto; max-height: min(72vh, 680px); object-fit: contain; margin: 0 auto; }
.hero .banner-fill { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; filter: blur(40px) saturate(140%); opacity: .7; }
.hero.plain { height: calc(150px + env(safe-area-inset-top)); background:
  radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--brand) 70%, #fff 30%), transparent 60%),
  linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 45%, #000)); }

/* Event title card overlapping the bottom of the banner (iOS large title) */
.event-head { position: relative; z-index: 2; max-width: 1080px; margin: -44px auto 0; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.event-card { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem; border-radius: 26px; background: var(--glass); border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 12px 40px rgba(20, 10, 50, .14); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.event-card .logo { width: 72px; height: 72px; flex: none; border-radius: 18px; object-fit: contain; background: #fff; padding: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
.event-text { min-width: 0; flex: 1; }
.event-text h1 { font-size: clamp(1.45rem, 4.2vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; margin: 0; overflow-wrap: anywhere; }
.event-text .subtitle { color: var(--muted); margin: .2rem 0 0; font-size: .98rem; }
.pills { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.pill { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-text); white-space: nowrap; }
.pill.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.status.open { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok-ink); }
.pill.status.open i { box-shadow: 0 0 0 0 currentColor; animation: pulse 2s infinite; }
.pill.status.closed, .pill.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad-ink); }
@keyframes pulse { 70% { box-shadow: 0 0 0 6px transparent; } }

.wrap { max-width: 1080px; margin: 0 auto; padding: 1.25rem max(16px, env(safe-area-inset-right)) 3rem max(16px, env(safe-area-inset-left)); }
.info { margin-bottom: 1.25rem; }
.lead { font-size: 1rem; margin: 0 4px .9rem; }

/* iOS inset grouped list with disclosure rows */
.group { background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 18px; overflow: hidden; box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.disclosure + .disclosure { border-top: 1px solid var(--border); }
.disclosure > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1.1rem; min-height: 50px; cursor: pointer; font-weight: 600; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary .icon { color: var(--muted); transition: transform .25s var(--ease); }
.disclosure[open] > summary .icon { transform: rotate(180deg); }
.disclosure > summary:focus-visible { outline-offset: -3px; }
.disclosure-body { padding: 0 1.1rem 1rem; }
.rules { margin: 0; padding-left: 1.1rem; font-size: .92rem; color: var(--muted); }
.rules li { margin-bottom: .35rem; }
.criteria-list { display: grid; gap: .5rem; }
.criterion { display: grid; grid-template-columns: 1fr auto; gap: .1rem .75rem; padding: .65rem .8rem; background: var(--surface-2); border-radius: 12px; }
.criterion b { font-size: .95rem; }
.criterion .pct { font-weight: 800; color: var(--brand-text); }
.criterion p { grid-column: 1 / -1; margin: 0; font-size: .85rem; color: var(--muted); }

/* iOS segmented control */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 2px; margin: 0 0 1rem; border-radius: 12px; background: var(--surface-2); max-width: 420px; }
.segmented button { appearance: none; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 600; font-size: .92rem; padding: .5rem .75rem; min-height: 38px; border-radius: 10px; cursor: pointer;
  transition: background-color .2s, box-shadow .2s; }
.segmented button[aria-selected=true] { background: var(--seg-on); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04); }

/* iOS search field */
.search { display: flex; align-items: center; gap: .5rem; padding: 0 .8rem; margin-bottom: 1rem; border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.search input[type=search] { border: 0; background: transparent; padding: .65rem 0; outline: none; font-size: 1rem; }
.search:focus-within { box-shadow: 0 0 0 2px var(--focus); }
.empty { text-align: center; padding: 2rem 0; }

/* Contestant cards: two columns on phones */
.contestants { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fill, minmax(min(46%, 220px), 1fr)); }
.contestant { background: var(--surface); border: 1px solid var(--glass-edge); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.contestant[hidden] { display: none; }
@media (hover: hover) { .contestant:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 var(--glass-edge), 0 18px 40px rgba(20, 10, 50, .14); } }
.contestant.is-voted { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.contestant .photo { aspect-ratio: 4 / 5; background: var(--surface-2) center / cover no-repeat; position: relative; overflow: hidden; }
.contestant .photo > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.contestant .photo .no { position: absolute; top: 8px; left: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-weight: 800; border-radius: 999px; padding: .12rem .55rem; font-size: .8rem;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.contestant .photo .voted { display: inline-flex; align-items: center; gap: .25rem; position: absolute; top: 8px; right: 8px; background: var(--ok); color: #fff; font-weight: 700; border-radius: 999px; padding: .12rem .55rem; font-size: .75rem; }
.contestant .photo .voted.pending { background: var(--warn); }
.contestant .body { padding: .75rem .8rem .8rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.contestant h3 { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.25; }
.contestant .desc { font-size: .82rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.contestant .btn.vote { margin-top: auto; width: 100%; min-height: 44px; border-radius: 12px; }
.contestant .body h3 + .btn.vote, .contestant .desc + .btn.vote { margin-top: .5rem; }
.contestant .btn.vote:not(.primary) { color: var(--muted); }
.contestant.is-voted .btn.vote:disabled { opacity: 1; color: var(--ok-ink); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.initials { width: 100%; height: 100%; display: grid; place-items: center; font-size: 3rem; font-weight: 800; color: var(--muted); }
@media (min-width: 700px) {
  .contestants { gap: 1.1rem; }
  .contestant h3 { font-size: 1.08rem; }
  .contestant .body { padding: .9rem; }
}
/* "Please use a computer" screen */
.event-card.computer-only { flex-direction: column; align-items: center; text-align: center; padding: 1.75rem 1.25rem; }
.computer-only h1 { font-size: 1.5rem; margin: 0; }
.computer-only p { color: var(--muted); margin: 0; }
.computer-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; color: var(--brand-text); background: color-mix(in srgb, var(--brand) 14%, transparent); }

@media (max-width: 600px) {
  .event-head { margin-top: -18px; }  /* short banners: keep most of the artwork visible */
}
@media (max-width: 420px) {
  .event-card { padding: 1rem; gap: .8rem; align-items: flex-start; }
  .event-card .logo { width: 56px; height: 56px; border-radius: 14px; }
}

.score-row { padding: .6rem 0; border-bottom: 1px solid var(--border); }
.score-row:last-child { border: 0; }
.score-row .row { justify-content: space-between; }
.score-val { font-weight: 800; font-size: 1.2rem; color: var(--brand-text); min-width: 2.5ch; text-align: right; }
.pay-box { background: var(--surface-2); border-radius: 12px; padding: .85rem; }
.pay-box img { max-width: 220px; margin: .5rem auto; border-radius: 10px; background: #fff; }
.total { font-size: 1.15rem; font-weight: 800; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 2rem 16px calc(2rem + env(safe-area-inset-bottom)); }

/* standings (public + admin + screenshot) */
.standings { display: grid; gap: .55rem; }
.standing { display: grid; grid-template-columns: 2.4rem 48px 1fr auto; align-items: center; gap: .75rem; padding: .55rem .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.standing .rank { font-weight: 900; font-size: 1.15rem; text-align: center; color: var(--muted); }
.standing.top1 .rank { color: var(--gold); } .standing.top2 .rank, .standing.top3 .rank { color: var(--text); }
.standing .pic { width: 48px; height: 48px; border-radius: 10px; background: var(--surface-2) center / cover; display: grid; place-items: center; font-weight: 800; color: var(--muted); }
.standing .bar { height: 6px; border-radius: 6px; background: var(--surface-2); margin-top: .3rem; overflow: hidden; }
.standing .bar i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.standing .val { font-weight: 800; text-align: right; }
.standing .val small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; }

/* =====================================================================
   Admin
   ===================================================================== */
.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100dvh; }
.side { background: var(--glass); border-right: 1px solid var(--border); padding: 1rem; display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 0; height: 100dvh; overflow: auto; }
.side .brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; }
.side .brand img { width: 36px; height: 36px; border-radius: 10px; object-fit: contain; background: var(--surface-2); }
.nav { display: grid; gap: 2px; }
.nav button { text-align: left; border: 0; background: none; color: var(--text); font: inherit; padding: .55rem .7rem; border-radius: 9px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.nav button:hover { background: var(--surface-2); }
.nav button { transition: background-color .15s; }
.nav button.active { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand-text); font-weight: 700; }
.nav-label { display: inline-flex; align-items: center; gap: .6rem; }
.brand-icon { color: var(--brand-text); display: inline-flex; }
.login-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: var(--brand-text); background: color-mix(in srgb, var(--brand) 14%, transparent); margin-bottom: .75rem; }
.nav .count { background: var(--warn); color: #fff; font-size: .7rem; font-weight: 800; border-radius: 999px; padding: 0 .45rem; }
.main { padding: 1.5rem; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  /* sticky glass title bar, like an iOS navigation bar */
  position: sticky; top: 0; z-index: 20; margin: -1.5rem -1.5rem 1.25rem; padding: 1rem 1.5rem;
  background: var(--glass); border-bottom: 1px solid var(--border); }
.page-head h2 { margin: 0; }
.section + .section { margin-top: 1rem; }
.upload { display: flex; gap: 1rem; align-items: center; }
.upload .preview { width: 96px; height: 96px; border-radius: 14px; border: 1px dashed var(--border); background: var(--surface-2) center / contain no-repeat; flex: none; display: grid; place-items: center; color: var(--muted); font-size: .75rem; }
.upload .preview.wide { width: 180px; background-size: cover; }
.list-item { display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; align-items: center; padding: .75rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.list-item + .list-item { margin-top: .5rem; }
.list-item .thumb { width: 64px; height: 64px; border-radius: 10px; background: var(--surface-2) center / cover; display: grid; place-items: center; font-weight: 800; color: var(--muted); }
.list-item .actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.weight-total { font-weight: 800; }
.weight-total.bad { color: var(--bad-ink); }
.weight-total.good { color: var(--ok-ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: transparent; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .mono { font-family: ui-monospace, Menlo, monospace; font-size: .78rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; }
.stat b { display: block; font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: .8rem; }
.share { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.share .qr { background: #fff; padding: 8px; border-radius: 10px; }
.proof-thumb { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; cursor: zoom-in; background: var(--surface-2); }
.menu-toggle { display: none; }

/* screenshot stage */
.shot-tools { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 1rem; }
.stage-scroll { overflow: auto; border-radius: 16px; }
.stage { width: 1080px; padding: 48px; color: #fff; background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--brand) 85%, #fff 15%), color-mix(in srgb, var(--brand) 35%, #000) 70%); font-family: var(--font); }
.stage.light { color: #1c1830; background: linear-gradient(160deg, #fff, color-mix(in srgb, var(--brand) 12%, #fff)); }
.stage-head { display: flex; align-items: center; gap: 24px; margin-bottom: 32px; }
.stage-head img { width: 110px; height: 110px; object-fit: contain; border-radius: 24px; background: #fff; padding: 10px; }
.stage-head h1 { font-size: 46px; margin: 0; }
.stage-head p { font-size: 20px; opacity: .85; margin: 4px 0 0; }
.stage .podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 20px; align-items: end; margin-bottom: 28px; }
.stage .pod { text-align: center; background: rgba(255,255,255,.12); border-radius: 22px; padding: 22px 14px; }
.stage.light .pod { background: rgba(255,255,255,.85); box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.stage .pod .pp { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 12px; background: rgba(255,255,255,.25) center / cover; border: 4px solid rgba(255,255,255,.7); display: grid; place-items: center; font-size: 42px; font-weight: 900; }
.stage .pod.first .pp { width: 150px; height: 150px; border-color: #facc15; }
.stage .pod .place { font-size: 34px; font-weight: 900; }
.stage .pod .nm { font-size: 22px; font-weight: 800; }
.stage .pod .sc { font-size: 18px; opacity: .85; }
.stage .rest { display: grid; gap: 10px; }
.stage .rest .r { display: grid; grid-template-columns: 60px 56px 1fr auto; gap: 16px; align-items: center; background: rgba(255,255,255,.1); border-radius: 14px; padding: 10px 16px; font-size: 20px; }
.stage.light .rest .r { background: rgba(255,255,255,.85); }
.stage .rest .r .pp { width: 56px; height: 56px; border-radius: 12px; background: rgba(255,255,255,.25) center / cover; display: grid; place-items: center; font-weight: 900; }
.stage .rest .r b { font-size: 24px; }
.stage .stage-foot { margin-top: 28px; display: flex; justify-content: space-between; opacity: .75; font-size: 16px; }

@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; inset: 0 30% 0 0; transform: translateX(-105%); transition: transform .2s; height: 100dvh; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .menu-toggle { display: inline-flex; }
  .page-head { margin: -1rem -16px 1rem; padding: .75rem 16px; }
  .main { padding: 1rem 16px; }
  .list-item { grid-template-columns: 52px 1fr; }
  .list-item .thumb { width: 52px; height: 52px; }
  .list-item .actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.page-head select { width: auto; }

.icon-btn { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; border-radius: 10px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.btn.icon-only { padding-inline: .5rem; }

/* ----- touch targets: 44px on touch screens ----- */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn.sm { min-height: 40px; padding-inline: .8rem; }
  .btn.icon-only { min-width: 44px; }
  .icon-btn { min-width: 44px; min-height: 44px; }
  .nav button { min-height: 44px; }
  input[type=range] { height: 32px; }
  .check input { width: 22px; height: 22px; }
}

/* ----- respect reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .spinner { animation: none; border-top-color: var(--brand); }
}

/* ----- Voting rules page ----- */
.rules-jump { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.rules-jump a { font-size: .85rem; font-weight: 600; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .35rem .8rem; }
.rules-jump a:hover { border-color: var(--brand); color: var(--brand-text); }
.rules-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.rules-summary { position: sticky; top: 1rem; }
.rules-summary .rules { padding-left: 1.1rem; margin: .5rem 0 0; }
.rules-section { scroll-margin-top: 1rem; }
.section-head { display: flex; gap: .75rem; align-items: flex-start; }
.section-head p { margin: .15rem 0 0; }
.step { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: var(--brand-ink); background: var(--brand); }
.group-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: .5rem 0 0; }
.indent { margin-left: 1.9rem; }
.notice { color: var(--warn-ink); background: color-mix(in srgb, var(--warn) 12%, transparent); padding: .5rem .75rem; border-radius: 10px; margin: 0; }

.choices { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; }
.choice { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem .9rem; border: 1px solid var(--field-border); border-radius: 12px; cursor: pointer; background: var(--surface); }
.choice input { margin-top: .2rem; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.choice b { display: block; font-size: .95rem; }
.choice small { color: var(--muted); font-size: .82rem; }
.choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }

.presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; }
.preset { text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--field-border); border-radius: 12px; padding: .75rem .85rem; cursor: pointer; }
.preset b { display: block; font-size: .92rem; }
.preset small { color: var(--muted); font-size: .8rem; }
.preset:hover { border-color: var(--brand); }
.preset[aria-pressed=true] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
details.more > summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--brand-text); }

.savebar { position: sticky; bottom: 0; z-index: 5; margin-top: 1rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 18px; padding: .7rem .9rem; box-shadow: var(--shadow);
  margin-bottom: env(safe-area-inset-bottom); }
.unsaved { color: var(--warn-ink); font-weight: 700; }

@media (max-width: 1100px) {
  .rules-layout { grid-template-columns: 1fr; }
  .rules-summary { position: static; order: -1; }
  .indent { margin-left: 0; }
}

/* ----- contestant video / link ----- */
.photo.media { display: block; width: 100%; padding: 0; border: 0; margin: 0; font: inherit; color: inherit; text-decoration: none; cursor: pointer; background: var(--surface-2); }
.photo.media img, .photo.media .initials { transition: transform .25s ease, filter .25s ease; }
.photo.media:hover img, .photo.media:focus-visible img { transform: scale(1.03); filter: brightness(.85); }
.photo.media:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.media-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: .35rem;
  color: #fff; font-weight: 700; font-size: .85rem; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); pointer-events: none; }
.media-badge .play-circle { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35); padding-left: 4px; transition: transform .2s ease, background .2s ease; }
.photo.media:hover .play-circle { transform: scale(1.08); background: var(--brand); }
.media-badge.link { left: auto; right: 8px; top: auto; bottom: 8px; transform: none; display: inline-flex; align-items: center; gap: .3rem;
  background: rgba(0, 0, 0, .65); padding: .3rem .6rem; border-radius: 999px; text-shadow: none; font-size: .8rem; }

.video-modal { width: min(960px, 100%); background: #0b0a10; color: #fff; }
.video-modal .modal-head .icon-btn { color: #fff; }
.video-modal .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.player-wrap { display: flex; flex-direction: column; align-items: flex-start; }
.player { display: block; width: 100%; max-height: 72vh; background: #000; border-radius: 12px; }
.player-error { padding: 2rem 1rem; text-align: center; width: 100%; background: #000; border-radius: 12px; margin: 0; }

.media-box { border: 1px solid var(--border); border-radius: 12px; padding: .9rem; }
.media-box p { margin: 0; }
.field-label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }
.video-box { display: grid; gap: .5rem; }
.video-box video { width: 100%; max-height: 220px; background: #000; border-radius: 10px; }

/* ----- voting page: compact glass bar once the big header scrolls away ----- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; gap: .6rem;
  padding: calc(.55rem + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) .55rem max(16px, env(safe-area-inset-left));
  background: var(--glass); border-bottom: 1px solid var(--border);
  transform: translateY(-110%); transition: transform .3s var(--ease); }
.topbar.show { transform: none; }
.topbar img { width: 28px; height: 28px; border-radius: 8px; object-fit: contain; background: #fff; }
.topbar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.topbar .pill { font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand-text); white-space: nowrap; }

/* ----- no blur support, or "Reduce transparency" turned on: solid surfaces ----- */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  :root { --glass: var(--surface-solid); --surface: var(--surface-solid); }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: var(--surface-solid); --surface: var(--surface-solid); }
  .glass, .card, .modal, .side, .savebar, .topbar, .page-head, .modal-wrap, .toast, .event-card, .group { -webkit-backdrop-filter: none; backdrop-filter: none; }
  body::before { display: none; }
}

/* ----- voting page: out of votes, buy credits ----- */
.credits-notice { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; margin-bottom: 1rem; padding: .85rem 1rem;
  border-radius: 18px; border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
  background: color-mix(in srgb, var(--brand) 10%, var(--glass)); box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); animation: sheet-in .35s var(--ease); }
.credits-icon { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); }
.credits-text { flex: 1; min-width: 180px; display: grid; gap: .1rem; }
.credits-text b { font-size: .98rem; }
.credits-text span { color: var(--muted); font-size: .86rem; }
.credits-notice .btn { white-space: nowrap; }
.credits { display: grid; gap: .9rem; }
.credits-hero { display: flex; align-items: center; gap: .8rem; }
.rate-chip { justify-self: start; display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand-text); font-weight: 800; font-size: 1rem; }
.rate-chip i { font-style: normal; opacity: .6; }
.qty-stepper { display: grid; grid-template-columns: 48px 1fr 48px; gap: .5rem; align-items: center; }
.qty-stepper input[type=number] { text-align: center; font-size: 1.4rem; font-weight: 800; padding: .5rem; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step-btn { height: 48px; border: 0; border-radius: 14px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 1.4rem; font-weight: 700; cursor: pointer;
  transition: transform .15s var(--ease); }
.step-btn:active { transform: scale(.92); }
.credits-sum { display: flex; justify-content: space-between; align-items: baseline; padding-top: .6rem; border-top: 1px dashed var(--border); }
.credits-total { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.checkout-btn { display: flex; align-items: center; justify-content: center; gap: .55rem; width: 100%; min-height: 54px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 1.05rem; color: #fff;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 40%, #ec4899));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: checkout-pop .45s cubic-bezier(.34, 1.56, .64, 1); transition: transform .18s var(--ease), box-shadow .18s; }
.checkout-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px color-mix(in srgb, var(--brand) 50%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
.checkout-btn:active { transform: scale(.97); }
.checkout-btn .checkout-arrow { transition: transform .2s var(--ease); }
.checkout-btn:hover .checkout-arrow { transform: translateX(4px); }
@keyframes checkout-pop { from { opacity: 0; transform: translateY(10px) scale(.9); } }
.pay-summary { display: flex; justify-content: space-between; align-items: baseline; padding: .75rem 1rem; border-radius: 14px; background: var(--surface-2); }
.pay-summary b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.qr-frame { display: grid; justify-items: center; gap: .5rem; padding: 1rem; border-radius: 20px; background: #fff; color: #444;
  border: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.qr-frame img { width: min(240px, 100%); aspect-ratio: 1; object-fit: contain; }
@media (max-width: 420px) { .credits-notice .btn { width: 100%; } }
.confirm-note { display: flex; gap: .6rem; align-items: flex-start; margin: 0; padding: .75rem .9rem; border-radius: 14px;
  font-size: .9rem; font-weight: 700; color: var(--warn-ink);
  background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.confirm-note .icon { margin-top: .1rem; }
.subsection { margin-top: .25rem; padding: .9rem; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.pending-chip { display: inline-flex; align-items: center; gap: .35rem; justify-self: start; margin-top: .3rem; padding: .2rem .6rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700; color: var(--warn-ink); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.credits-text .pending-chip { color: var(--warn-ink); font-size: .78rem; }
.credits-done { display: grid; justify-items: center; text-align: center; gap: .5rem; padding: 1rem 0 .5rem; }
.credits-done b { font-size: 1.2rem; }
.credits-done p { margin: 0; max-width: 34ch; }
.done-icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--ok);
  animation: checkout-pop .45s cubic-bezier(.34, 1.56, .64, 1); }
.checkout-btn:disabled { opacity: .6; cursor: progress; }
.credit-tag { display: inline-block; margin-top: .3rem; font-size: .75rem; font-weight: 700; color: var(--brand-text);
  background: color-mix(in srgb, var(--brand) 12%, transparent); padding: .1rem .5rem; border-radius: 999px; }
.badge.credit { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-text); }
.credits-actions { display: flex; align-items: center; gap: .5rem; }
.notify-btn { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 1px solid var(--border);
  border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; transition: transform .15s var(--ease); }
.notify-btn:hover { border-color: var(--brand); color: var(--brand-text); }
.notify-btn:active { transform: scale(.94); }
.notify-dot { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center;
  background: var(--warn); color: #fff; font-size: .7rem; font-weight: 800; box-shadow: 0 0 0 2px var(--surface-solid); }
.purchase-list { display: grid; gap: .55rem; }
.purchase { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem .85rem; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.purchase-icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.purchase-main { flex: 1; min-width: 0; display: grid; gap: .15rem; }
.purchase-top { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.purchase-status { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .55rem; border-radius: 999px; }
.purchase-help { color: var(--muted); }
.purchase.pending .purchase-icon, .purchase.pending .purchase-status { color: var(--warn-ink); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.purchase.approved .purchase-icon, .purchase.approved .purchase-status { color: var(--ok-ink); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.purchase.rejected .purchase-icon, .purchase.rejected .purchase-status { color: var(--bad-ink); background: color-mix(in srgb, var(--bad) 12%, transparent); }
@media (max-width: 420px) { .credits-actions { width: 100%; } .credits-actions .btn { flex: 1; } }
.buy-pill { display: inline-flex; align-items: center; gap: .3rem; font: inherit; font-size: .8rem; font-weight: 800; white-space: nowrap;
  padding: .3rem .75rem; border: 0; border-radius: 999px; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 40%, #ec4899));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 35%, transparent); transition: transform .15s var(--ease); }
.buy-pill:hover { transform: translateY(-1px); }
.buy-pill:active { transform: scale(.95); }
.topbar .buy-pill { padding: .2rem .65rem; font-size: .78rem; }
.credit-use { display: grid; gap: .4rem; padding: .85rem; border-radius: 14px; background: color-mix(in srgb, var(--brand) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.credit-use .field-label { margin: 0; }
/* Voting rules: list of sections, each opens in a window */
.rules-list { display: grid; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface); }
.rules-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: .85rem; width: 100%; text-align: left;
  padding: .9rem 1rem; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; cursor: pointer;
  transition: background-color .15s; }
.rules-row:first-child { border-top: 0; }
.rules-row:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.rules-row:focus-visible { outline-offset: -3px; }
.rules-row-text { display: grid; gap: .1rem; min-width: 0; }
.rules-row-text b { font-size: .98rem; }
.rules-row-text .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rules-row > .icon { color: var(--muted); transform: rotate(-90deg); }
.rules-modal { width: min(680px, 100%); }
.rules-modal .rules-section { background: none; border: 0; box-shadow: none; padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.rules-modal .rules-section .section-head .step, .rules-modal .rules-section .section-head .card-title { display: none; }
.rules-modal .rules-section .section-head p { margin: 0; }
.usage-line { margin-top: .3rem; color: var(--brand-text); font-weight: 600; }
.pay-table td:nth-child(2) { min-width: 240px; }
.pay-table td:nth-child(3) { min-width: 150px; }
.match-tag { margin-top: .3rem; font-size: .75rem; font-weight: 700; line-height: 1.3; }
.match-tag.ok { color: var(--ok-ink); }
.match-tag.warn { color: var(--warn-ink); }
p.match-tag { margin: 0; font-size: .88rem; padding: .5rem .7rem; border-radius: 10px; }
p.match-tag.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); }
p.match-tag.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); }
.device-compare { width: min(760px, 100%); }
.device-compare td.same { color: var(--ok-ink); }
.device-compare td.differs { color: var(--warn-ink); font-weight: 700; }
/* Simple settings rows (Voting rules) */
.setting-list { display: grid; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; min-height: 60px; }
.setting-row + .setting-row { border-top: 1px solid var(--border); }
.setting-label { display: grid; gap: .1rem; font-weight: 600; }
.setting-note { font-size: .8rem; font-weight: 500; color: var(--muted); }
.setting-note:empty { display: none; }
.mini-stepper { display: flex; align-items: center; gap: .35rem; flex: none; }
.mini-stepper button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.mini-stepper button:active { transform: scale(.92); }
.mini-stepper input[type=number] { width: 64px; text-align: center; font-weight: 700; padding: .45rem .3rem; -moz-appearance: textfield; font-variant-numeric: tabular-nums; }
.mini-stepper input::-webkit-outer-spin-button, .mini-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
label.setting-row { cursor: pointer; }
.switch { position: relative; flex: none; width: 50px; height: 30px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2); transition: background-color .2s; pointer-events: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Payments: select mode */
.select-bar { position: sticky; top: 76px; z-index: 15; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem;
  padding: .6rem .8rem; border-radius: 14px; background: color-mix(in srgb, var(--brand) 12%, var(--surface-solid));
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); box-shadow: var(--shadow); }
.select-cell { width: 44px; text-align: center; }
.select-cell input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
tr.is-selected td { background: color-mix(in srgb, var(--brand) 7%, transparent); }
