/* Voting site and leaderboard: page layout, built on tokens.css and the design system's gz- components (gz.css).
   Follows the final clickable mockup (design-mockup/index.html, 19 Oct 2026). Component styles stay in gz.css; this file adds
   the page frame, the dialogs and the pieces the live pages need. Colours, radii, fonts and timings all come from the tokens. */

/* The leaderboard climb's glide. The design system's Leaderboard component sets it (600ms); tokens.json has no slot for it. */
:root { --dur-climb: 600ms; }

[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: var(--ink); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Headings: a numbered label, then a Bodoni title, left-aligned */
.gz-eyebrow { margin-bottom: 12px; }
.gz-section-title { font-size: clamp(30px, 7vw, 48px); line-height: 1.08; }
.sec-head { margin-bottom: 28px; }
.gz-icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.gz-tag.pop-in { animation: tag-in var(--dur-slow) var(--ease-pop) both; }
@keyframes tag-in { from { opacity: 0; transform: scale(0.8); } }

/* Top bar: clear frosted glass */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--glass-bar); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand img { width: auto; height: 38px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; color: var(--ink); font: 500 12px/1 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--gold); }
.nav-link .i { width: 1.15em; height: 1.15em; }
.hide-sm { display: none; }
@media (min-width: 860px) {
  .hide-sm { display: inline-flex; }
  .nav { gap: 6px; }
  .nav .gz-btn { margin-left: 8px; }
  .brand img { height: 44px; }
}

/* Hero: left-aligned, the title in Bodoni, one gold rule, glitter behind the words */
.hero { position: relative; padding: 40px 0 0; }
.hero-in { position: relative; z-index: 1; }
.glitter { position: absolute; top: 0; left: 0; z-index: 0; width: 100%; height: calc(100% + 64px); pointer-events: none; }
.hero-title { margin: 4px 0 0; font-weight: 400; }
.hero-title::after { content: ""; display: block; width: 72px; height: 2px; margin-top: 22px; background: var(--gold); }
.t-trinity { display: block; font: 400 clamp(64px, 19vw, 150px)/0.95 var(--font-display); letter-spacing: -0.02em; padding-bottom: 0.06em; }
.t-sub { display: block; margin-top: 10px; font: 500 clamp(12px, 3.2vw, 15px)/1.3 var(--font-ui); letter-spacing: 0.18em; text-transform: uppercase; }
.hero-lede { margin: 20px 0 0; max-width: 30ch; font: 400 clamp(19px, 4.6vw, 24px)/1.4 var(--font-display); }
.hero-notice { margin: 22px 0 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
@media (max-width: 859px) { .hero-cta { display: grid; grid-template-columns: 1fr 1fr; } .hero-cta .gz-btn { padding: 0 12px; } }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 24px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13.5px; }
.hero-facts li { display: inline-flex; align-items: center; gap: 7px; }
.hero-facts .i { width: 1.15em; height: 1.15em; color: var(--ink); }
.hero-facts strong { color: var(--ink); font-weight: 500; }
@media (min-width: 860px) { .hero { padding-top: 72px; } }

/* Sections */
.section { padding: 64px 0; }
.band { background: var(--wash); }
@media (min-width: 860px) { .section { padding: 96px 0; } }
.section.tight { padding-top: 0; }

/* Title tabs: placed without animating on first paint */
.gz-tabs { max-width: 520px; }
.gz-tabs.still .gz-tabs__thumb { transition: none; }

.cat-bar { display: grid; gap: 16px; margin: 28px 0 24px; }
@media (min-width: 760px) { .cat-bar { grid-template-columns: 1fr auto; align-items: end; } .cat-bar .search { width: 320px; } }
.cat-title { margin: 0; font: 400 clamp(22px, 5vw, 28px)/1.2 var(--font-display); }
.cat-sub { margin: 6px 0 0; color: var(--muted); font: 500 12px/1.35 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; }
.search { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 420px; height: 46px; padding: 0 14px; border: 1px solid var(--line-control); border-radius: var(--radius-control); background: var(--paper); color: var(--muted); transition: border-color var(--dur-instant) var(--ease-out), box-shadow var(--dur-instant) var(--ease-out); }
.search:focus-within { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.search .i { width: 1.15em; height: 1.15em; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); }
.search input::placeholder { color: var(--faint); }

/* Contestant grid (card C): 2, 3, 4 then 5 columns */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 16px; } }
@media (min-width: 940px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1140px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 36px 18px; } }
.gz-card { -webkit-tap-highlight-color: transparent; }
.gz-card .gz-btn { pointer-events: none; }
.gz-card:active .gz-card__photo img { transform: scale(0.985); }
/* The curtain (M1) animates clip-path to this resting value; "none" would not animate. */
.gz-card__photo img { clip-path: inset(0); }
.empty { grid-column: 1 / -1; margin: 0; padding: 40px 0; color: var(--muted); }

/* How it works: four icons with short labels; the numbers stay because the order matters */
.how-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .how-steps { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
.how-step { display: grid; justify-items: start; gap: 12px; padding: 18px; background: var(--paper); }
.how-n { color: var(--gold); font: 300 28px/1 var(--font-ui); }
.how-i { display: grid; place-items: center; width: var(--touch-min); height: var(--touch-min); border-radius: var(--radius-round); background: var(--wash); }
.how-i .i { width: 22px; height: 22px; }
.how-step strong { font-weight: 500; font-size: 15px; line-height: 1.3; }
.sub-title { margin: 48px 0 18px; font: 400 24px/1.2 var(--font-display); }

/* Package tickets: the notches show the ground they sit on */
.band .gz-ticket__bot::before, .band .gz-ticket__bot::after { background: var(--wash); }
.tickets-home { max-width: 860px; }
@media (min-width: 760px) { .tickets-home { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.tickets-home .gz-ticket { cursor: default; }
.tickets-home .gz-ticket:hover { box-shadow: inset 0 0 0 1px var(--line-control); }
.tickets-home .gz-ticket:hover .gz-ticket__bot::before, .tickets-home .gz-ticket:hover .gz-ticket__bot::after { box-shadow: inset 0 0 0 1px var(--line-control); }
.tickets-home .gz-ticket:active { transform: none; }

.trust { display: flex; gap: 12px; align-items: flex-start; max-width: 680px; margin: 28px 0 0; padding: 16px 18px; background: var(--paper); color: var(--muted); font-size: 14px; }
.trust .i { color: var(--ok); width: 22px; height: 22px; margin-top: 1px; }

/* Common questions: the title beside the list on desktop */
.faq { display: grid; gap: 8px 56px; }
@media (min-width: 860px) { .faq { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); align-items: start; } }
.faq .gz-notice { margin: 18px 0 0; }

/* Pageant night */
.event { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .event { grid-template-columns: 0.9fr 1.1fr; gap: 56px; } }
.date-big { margin: 0; display: grid; line-height: 0.95; }
.date-big .d { font: 300 clamp(110px, 30vw, 190px)/0.9 var(--font-ui); letter-spacing: -0.04em; }
.date-big .m { font: 400 clamp(40px, 10vw, 64px)/1 var(--font-display); margin-top: 8px; }
.date-big .y { margin-top: 16px; color: var(--muted); font: 500 12px/1.35 var(--font-ui); letter-spacing: 0.18em; text-transform: uppercase; }
.event-list { margin: 0; display: grid; border-top: 1px solid var(--ink); }
.event-list > div { display: grid; grid-template-columns: 30px 1fr; gap: 2px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.event-list .i { grid-row: span 2; width: 22px; height: 22px; margin-top: 2px; }
.event-list dt { color: var(--muted); font: 500 12px/1.35 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; }
.event-list dd { margin: 0; font-size: 15.5px; }
.event-cta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }

/* Check your votes */
.panel { padding: 26px 20px; border: 1px solid var(--line); background: var(--paper); }
.status { display: grid; gap: 20px; }
@media (min-width: 860px) { .status { grid-template-columns: 1fr 1.2fr; align-items: center; padding: 36px 40px; gap: 40px; } }
.status .gz-section-title { font-size: clamp(28px, 6vw, 38px); }
.status p { margin: 8px 0 0; }
.status-form { display: grid; gap: 10px; }
@media (min-width: 560px) { .status-form { grid-template-columns: 1fr 1fr auto; } }
.status-out:empty { display: none; }
.status-out { grid-column: 1 / -1; }
.status-out .gz-error { margin: 0; }
/* Photo, what was voted, then the status: under the words on phones, beside them from 560px. */
.result { display: grid; grid-template-columns: 44px 1fr; gap: 8px 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--paper); }
.result-photo { grid-row: span 2; width: 44px; height: 58px; object-fit: cover; object-position: 50% 15%; border-radius: var(--radius-thumb); background: var(--wash); }
.result > div { min-width: 0; display: grid; font-size: 14px; }
.result strong { font-weight: 500; }
.result small { color: var(--muted); font-size: 13px; }
.result .gz-status { justify-self: start; }
@media (min-width: 560px) {
  .result { grid-template-columns: 44px 1fr auto; }
  .result-photo { grid-row: auto; }
}
.result-more { display: grid; justify-items: start; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.status .result-more p { margin: 0; }

/* Voting terms */
.terms-list { max-width: 720px; margin: 0; padding-left: 1.2em; display: grid; gap: 10px; color: var(--muted); }

/* Footer */
.foot { padding: 40px 0 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot img { height: 48px; width: auto; margin: 0 0 14px; }
.foot nav { display: flex; gap: 18px; margin-top: 10px; }
.foot a { color: var(--ink); }

/* Leaderboard page */
.lb { padding: 28px 0 72px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 22px; color: var(--ink); font: 500 12px/1 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; }
.back .i { width: 1.15em; height: 1.15em; }
.back:hover { color: var(--gold); }
.lb .sec-head { margin-bottom: 18px; }
.lb .sec-head p:last-child { margin: 10px 0 0; }
.podium { display: grid; grid-template-columns: 1fr 1.18fr 1fr; align-items: end; gap: 12px; max-width: 560px; margin: 52px 0 30px; }
/* Ranks 1, 2, 3 in reading order; second place stands on the left. */
.podium > :nth-child(1) { order: 2; }
.podium > :nth-child(2) { order: 1; }
.podium > :nth-child(3) { order: 3; }
.pod { display: flex; flex-direction: column; align-items: flex-start; }
.pod-photo { position: relative; width: 100%; }
.pod-photo img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius-photo); background: var(--wash); }
.pod-crown { position: absolute; left: 50%; top: -38px; width: var(--icon-xl); height: var(--icon-xl); color: var(--gold); transform: translateX(-50%); }
/* The rank sits on a white tab cut into the photo's corner, with the same rounded notch as the contestant cards */
.pod-rank { position: relative; margin-top: -24px; padding: 6px 10px 0 0; border-top-right-radius: var(--radius-photo); background: var(--paper); color: var(--gold); font: 300 30px/1 var(--font-ui); }
.pod-rank::before, .pod-rank::after { content: ""; position: absolute; width: var(--radius-photo); height: var(--radius-photo); background: radial-gradient(circle at 100% 0, transparent calc(var(--radius-photo) - 0.5px), var(--paper) var(--radius-photo)); pointer-events: none; }
.pod-rank::before { left: 0; bottom: 100%; }
.pod-rank::after { left: 100%; top: calc(24px - var(--radius-photo)); }
.pod-name { margin-top: 6px; font: 500 12px/1.35 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; }
.pod-votes { margin-top: 4px; font: 300 20px/1.1 var(--font-ui); font-variant-numeric: tabular-nums; }
.pod-votes small { color: var(--muted); font: 400 12px var(--font-ui); }
.pod .gz-badge { margin-top: 8px; }
.lb .gz-lb { max-width: 560px; }
.lb .gz-lb li:first-child .gz-lb__rank { color: var(--muted); }
.lb-bar { grid-column: 3 / -1; height: 2px; margin-top: -4px; overflow: hidden; background: var(--line); }
.lb-bar i { display: block; height: 100%; background: var(--gold); transition: width var(--dur-climb) var(--ease-out); }
.lb-updated { margin-top: 18px; color: var(--muted); font-size: 12.5px; }
.lb .empty { padding: 32px 0 0; }

/* Dialogs: a native <dialog> covering the viewport holds a white panel over the frosted page (gz-dialog).
   A bottom sheet on phones, a centred dialog from 720px. */
.sheet, .mine { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: hidden; }
.sheet[open], .mine[open] { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.sheet::backdrop { animation: gz-fade var(--dur-sheet) var(--ease-sheet); }
.sheet.closing::backdrop { animation: fade-out var(--dur-slow) var(--ease-sheet) forwards; }
.sheet .gz-sheet { position: relative; max-height: 94vh; max-height: 94dvh; }
.sheet[open] .gz-sheet { animation: gz-sheet-in var(--dur-sheet) var(--ease-sheet); }
.sheet.closing .gz-sheet { animation: sheet-out var(--dur-slow) var(--ease-sheet) forwards; }
.sheet.settling .gz-sheet { transition: transform var(--dur-slow) var(--ease-sheet); }
.sheet.measure .gz-sheet { animation: none !important; }
@keyframes sheet-out { to { transform: translateY(100%); } }
@keyframes modal-in { from { opacity: 0; transform: scale(0.96); } }
@keyframes modal-out { to { opacity: 0; transform: scale(0.96); } }
@keyframes fade-out { to { opacity: 0; } }
.gz-fly { object-position: 50% 15%; }
.gz-sheet__grab { flex: none; cursor: grab; touch-action: none; }
.sheet.dragging .gz-sheet__grab { cursor: grabbing; }
.gz-sheet__head { flex: none; gap: 12px; padding: 4px 12px 14px 18px; }
.gz-sheet__head img { flex: none; object-position: 50% 15%; }
.sh-txt { flex: 1; min-width: 0; }
.gz-sheet__name { flex-wrap: wrap; gap: 4px 10px; font-size: 23px; }
/* The heading takes focus only so screen readers start there; it is not a control. */
.gz .gz-sheet__name:focus-visible { outline: 0; }
.gz-sheet__head .gz-icon-btn + .gz-icon-btn { margin-left: -6px; }
@media (min-width: 720px) {
  .sheet[open], .mine[open] { justify-content: center; }
  .sheet .gz-sheet { max-height: 88vh; }
  .sheet[open] .gz-sheet { animation: modal-in var(--dur-base) var(--ease-out); }
  .sheet.closing .gz-sheet { animation: modal-out var(--dur-fast) var(--ease-out) forwards; }
  .sheet.closing::backdrop { animation-duration: var(--dur-fast); }
  .gz-sheet__grab { display: none; }
  .gz-sheet__head { padding-top: 18px; }
}
/* Two steps for a remembered voter, three for a first vote */
.sheet .gz-steps { flex: none; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 0 18px 2px; }
.gz-sheet__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
/* Step changes: the old step fades out against the direction of travel, the height glides, the new content slides in. */
.gz-sheet__body.gliding { overflow: hidden; transition: height var(--dur-slow) var(--ease-out); }
.gz-sheet__body.leaving > * { animation: gz-step-out var(--dur-fast) ease forwards; }
.gz-sheet__body.entering > * { animation: gz-step-in var(--dur-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
.gz-sheet__foot { flex: none; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.gz-sheet__foot.entering > * { animation: gz-fade var(--dur-base) ease both; }
.q { margin: 0 0 16px; font: 400 20px/1.2 var(--font-display); }
/* The gold button names the next move; its label swaps with a short blur */
.lbl { display: inline-block; transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out), filter var(--dur-base) var(--ease-out); }
.lbl.lbl-out { transform: translateY(-6px); opacity: 0; filter: blur(2px); }
.lbl.lbl-in { transform: translateY(6px); opacity: 0; filter: blur(2px); transition: none; }

/* Step 1: a remembered voter, the packages, and any other amount with its digits rolling over the field */
.voteas { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 12px; background: var(--wash); font-size: 14px; }
.voteas b { font-weight: 500; }
.voteas .gz-link { margin-left: auto; }
.custom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 8px 8px 8px 16px; border: 1px solid var(--line-control); border-radius: var(--radius-control); background: var(--paper); transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.custom.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); background: var(--gold-soft); }
.custom > label { font: 500 12px/1.35 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; }
.qty-field { position: relative; width: 70px; height: var(--touch-min); }
.gz-qty .qty-field input { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: var(--radius-control); outline: 0; }
.gz-qty .qty-field input:focus-visible { box-shadow: inset 0 0 0 2px var(--gold); }
.gz-qty .qty-field input::placeholder { color: var(--faint); font-size: 15px; }
.qty-field .gz-roll { position: absolute; inset: 0; justify-content: center; align-items: center; font-size: 18px; pointer-events: none; }
.qty-field.has-value:not(:focus-within) input { color: transparent; }
.qty-field:not(.has-value) .gz-roll, .qty-field:focus-within .gz-roll { visibility: hidden; }
.step-hint { min-height: 20px; margin: 8px 2px 0; color: var(--muted); font-size: 12.5px; }
.step-hint.err { color: var(--error); }

/* Step 2: details, saved on the phone for next time */
.gz-sheet__body .gz-field { margin-bottom: 16px; }
.gz-check:has([aria-invalid="true"]) { border-color: var(--error); }
.gz-check + .gz-error { margin-top: 8px; }
.terms-inline { margin: 10px 0 0; padding: 14px 14px 14px 32px; display: grid; gap: 8px; background: var(--wash); color: var(--muted); font-size: 13px; }
.saved { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; padding: 10px 12px; background: var(--gold-soft); color: var(--gold-deep); font-size: 13px; }
.saved .i { width: var(--icon-sm); height: var(--icon-sm); }

/* Step 3: pay, with the receipt panel sliding up over the QR */
.pay-amt { text-align: center; margin-bottom: 18px; }
.pay-amt > span:first-child { display: block; color: var(--muted); font: 500 12px/1.35 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; }
.pay-amt strong { font: 300 44px/1.1 var(--font-ui); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
/* The amount stays centred; its copy button hangs off to the right. */
.amt-row { position: relative; display: inline-block; }
.amt-row .gz-copy { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); }
/* The payment-method switch: the tab track with a raised gold thumb */
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 18px; border-radius: var(--radius-pill); background: var(--wash); }
.seg button { min-height: 40px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink); font: 500 14px/1 var(--font-ui); letter-spacing: 0.01em; transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.seg button[aria-selected="true"] { background: var(--gold); color: var(--on-gold); box-shadow: var(--leaf-gold); }
.qr-wrap { display: grid; justify-items: center; gap: 12px; }
.qr-img { width: min(240px, 70%); height: auto; }
.qr-slot { display: grid; place-items: center; align-content: center; gap: 6px; width: min(200px, 60%); aspect-ratio: 1; padding: 16px; text-align: center; border: 1px dashed var(--line-control); border-radius: var(--radius-control); color: var(--muted); font-size: 12.5px; }
.qr-slot .i { width: 64px; height: 64px; }
.qr-slot strong { color: var(--ink); font-weight: 500; font-size: 14px; }
.acct { width: 100%; margin: 0; display: grid; border-top: 1px solid var(--ink); }
.acct div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.acct dt { color: var(--muted); }
.acct dd { display: flex; align-items: center; gap: 2px; margin: 0; text-align: right; }
/* How to pay, as three icons */
.paysteps { display: flex; align-items: flex-start; justify-content: center; gap: 4px; margin-top: 18px; text-align: center; }
.paysteps > span { display: grid; justify-items: center; gap: 6px; width: 92px; font-size: 12.5px; line-height: 1.3; }
.ps-i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-round); background: var(--wash); }
.ps-i .i { width: var(--icon-md); height: var(--icon-md); }
.paysteps .ps-arr { width: 14px; height: 14px; margin-top: 13px; color: var(--muted); }
.ref { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 12px 8px 12px 16px; border: 1px solid var(--gold); border-radius: var(--radius-control); background: var(--gold-soft); }
.ref-label { display: block; color: var(--gold-deep); font: 500 12px/1.35 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; }
.ref-code { font: 500 21px/1.3 var(--font-ui); letter-spacing: 0.22em; font-variant-numeric: tabular-nums; -webkit-user-select: all; user-select: all; }
.ref .gz-copy:hover { background: var(--paper); }
.ref-note { margin: 8px 2px 0; color: var(--muted); font-size: 12.5px; }
.ref-note:empty { display: none; }
.ref-note.warn { color: var(--gold-deep); }
/* The receipt panel: frosted glass over the QR, then a white card rising from the foot of the sheet */
.rcpt { position: absolute; inset: 0; z-index: 3; }
.rcpt-dim { position: absolute; inset: 0; background: var(--frost); -webkit-backdrop-filter: blur(10px) saturate(150%); backdrop-filter: blur(10px) saturate(150%); }
.rcpt-card { position: absolute; left: 0; right: 0; bottom: 0; max-height: 90%; overflow-y: auto; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; background: var(--paper); box-shadow: var(--shadow-sheet); }
.rcpt-grab { width: 36px; height: 4px; margin: 4px auto 14px; border-radius: 4px; background: var(--line-control); opacity: 0.45; }
.rcpt .q { outline: 0; }
.rcpt-foot { margin-top: 18px; }
.rcpt.in .rcpt-dim { animation: gz-fade var(--dur-slow) ease both; }
.rcpt.in .rcpt-card { animation: gz-sheet-in var(--dur-slow) var(--ease-sheet) both; }
.rcpt.closing .rcpt-dim { animation: fade-out var(--dur-base) ease forwards; }
.rcpt.closing .rcpt-card { animation: sheet-out var(--dur-base) var(--ease-sheet) forwards; }
.resubmit-note { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--error); border-radius: var(--radius-control); background: var(--error-soft); color: var(--error); font-size: 13.5px; }
.gz-drop:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }
.gz-file.invalid { border-color: var(--error); animation: gz-shake 0.4s var(--ease-pop); }
.gz-file__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gz-file__thumb.doc { display: grid; place-items: center; }
.gz-file__thumb.doc .i { width: 26px; height: 26px; }
.gz-file .gz-link { cursor: pointer; }
.gz-file .gz-link:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }
#fileErr { margin-top: 10px; }
/* What the receipt should show, as icon pills */
.shows { margin: 16px 0 8px; color: var(--muted); font: 500 12px/1.35 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; }
.shows-pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* Step 4: done */
.done { text-align: center; padding-top: 4px; }
.done .gz-seal { margin-bottom: 14px; }
.done h3 { margin: 0; font: 400 28px/1.15 var(--font-display); }
.done > p { margin: 10px auto 0; max-width: 34ch; color: var(--muted); }
.done > p.done-kicker { margin: 0 0 8px; color: var(--ink); font: 500 12px/1.35 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; }
.done > p b { color: var(--ink); font-weight: 500; }

/* The status pill (gz-toast): hidden pills can't be reached by keyboard */
.gz-toast { visibility: hidden; transition: transform var(--dur-slow) var(--ease-out), visibility 0s linear var(--dur-slow); }
.gz-toast.is-shown { visibility: visible; transition: transform var(--dur-slow) var(--ease-out), visibility 0s; }
.gz-toast.is-error .gz-toast__icon { background: var(--error); }
.toast-go { margin-left: 4px; text-decoration: underline; text-underline-offset: 3px; }
body:has(.gz-toast.is-shown) .foot, body:has(.resume:not([hidden])) .foot { padding-bottom: 120px; }

/* Your votes: every vote sent from this phone, with its real state */
.mine-panel { width: 100%; max-width: 540px; max-height: 82vh; max-height: 82dvh; overflow-y: auto; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; background: var(--paper); box-shadow: var(--shadow-sheet); animation: gz-sheet-in var(--dur-slow) var(--ease-sheet); }
.mine-head { display: flex; align-items: center; justify-content: space-between; padding-top: 6px; }
.mine-head .q { margin: 0; }
.mine-list { display: grid; gap: 10px; margin: 14px 0; padding: 0; list-style: none; }
.mine-row { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); }
.mine-row img { width: 40px; height: 53px; flex: none; object-fit: cover; object-position: 50% 15%; border-radius: var(--radius-thumb); background: var(--wash); }
.mine-txt { flex: 1; min-width: 0; }
.mine-txt b { display: block; font-weight: 500; }
.mine-txt small { color: var(--muted); font-size: 12.5px; }
.mine-more { display: grid; justify-items: start; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.mine-more p { margin: 0; }
.mine-note { margin: 0; color: var(--muted); font-size: 12.5px; }
.track { display: grid; grid-template-columns: repeat(3, 1fr); margin: 12px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 12px; text-align: center; }
.track li { position: relative; display: grid; justify-items: center; gap: 5px; }
.track li + li::before { content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 1px; background: var(--line-control); }
.track .n { position: relative; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line-control); border-radius: var(--radius-round); background: var(--paper); color: var(--faint); }
.track .n .i { width: 12px; height: 12px; }
.track .d { color: var(--ink); }
.track .d .n { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.track .now { color: var(--gold-deep); }
.track .now .n { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.track .bad { color: var(--error); }
.track .bad .n { border-color: var(--error); color: var(--error); box-shadow: 0 0 0 3px var(--error-soft); }
@media (min-width: 720px) {
  .mine-panel { border-radius: var(--radius-sheet); box-shadow: var(--shadow-modal); animation: modal-in var(--dur-base) var(--ease-out); }
}

/* An unfinished payment, waiting at the foot of the page */
.resume { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 35; display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 32px); padding: 6px 4px 6px 16px; border: 1px solid var(--line-control); border-radius: var(--radius-pill); background: var(--paper); font-size: 13px; line-height: 1.3; transform: translateX(-50%); }
.resume > div { display: grid; min-width: 0; }
.resume strong { font-weight: 500; }
.resume span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.resume .gz-btn { min-height: 34px; padding: 0 14px; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gz-card:hover .gz-card__photo img, .gz-card:active .gz-card__photo img { transform: none; }
  .gz-tag.pop-in, .mine-panel, .rcpt.in .rcpt-dim, .rcpt.in .rcpt-card, .rcpt.closing .rcpt-dim, .rcpt.closing .rcpt-card { animation: none; }
  .lbl { transition: none; }
}
