/* Lora (SIL Open Font License) — self-hosted so the strict CSP needs no third-party font hosts */
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/static/fonts/lora-variable.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-style: italic; font-weight: 400; font-display: swap; src: url('/static/fonts/lora-400-italic.woff2') format('woff2'); }

/* ===== ForwardPlate — warm community-noticeboard palette ===== */
:root {
  --cream: #f6f1e4;
  --paper: #fffaf0;
  --ink: #3d3a2e;
  --ink-soft: #6f6a58;
  --green: #4a6b3f;
  --green-deep: #3a5632;
  --green-tint: #e6ede0;
  --sage: #8aa27a;
  --earth: #b8743f;
  --earth-tint: #f3e4d3;
  --line: #e3dccb;
  --danger: #a24a3b;
  --shadow: 0 2px 12px rgba(61, 58, 46, 0.08);
  --shadow-lift: 0 8px 28px rgba(61, 58, 46, 0.12);
  --radius: 1.25rem;
  --radius-sm: 0.75rem;
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.6; }
h1, h2, h3 { font-family: var(--serif); color: var(--green); font-weight: 600; line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--green); text-underline-offset: 0.15em; }
a:hover { color: var(--green-deep); }
ul, ol { padding-left: 1.25rem; }
img { max-width: 100%; }
button { font: inherit; }
[hidden] { display: none !important; }

.container { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.9rem; }
.tiny { font-size: 0.8rem; }
.center { text-align: center; }
.lead { font-size: 1.15rem; max-width: 36rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.74rem; font-weight: 600; color: var(--earth); margin: 0 0 0.6rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0.5rem; background: var(--paper); padding: 0.5rem 1rem; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 0.5rem; }

/* ----- cards & buttons ----- */
.card { background: var(--paper); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); border: 1px solid rgba(227, 220, 203, 0.6); }
.card-centered { max-width: 30rem; text-align: center; padding: 2.5rem 2rem; }
.page-centered { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border-radius: 999px; padding: 0.7rem 1.4rem; text-decoration: none; font-weight: 600; border: 2px solid var(--green); cursor: pointer; font-size: 1rem; line-height: 1.2; transition: background 0.15s, color 0.15s, transform 0.1s; background: transparent; color: var(--green); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.btn-secondary { background: var(--paper); }
.btn-secondary:hover { background: var(--green-tint); }
.btn-lg { padding: 0.95rem 1.9rem; font-size: 1.1rem; }
.btn-block { width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.5rem; }
.cta-row--tight { margin-top: 1rem; justify-content: flex-start; }
@media (max-width: 480px) { .cta-row .btn { width: 100%; } }

/* ----- top bar ----- */
.topbar { background: rgba(246, 241, 228, 0.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(6px); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; }
.wordmark { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--green); text-decoration: none; display: inline-flex; align-items: center; gap: 0.45rem; margin: 0; }
.plate-icon { width: 1.1em; height: 1.1em; border-radius: 50%; border: 2px solid currentColor; position: relative; display: inline-block; }
.plate-icon::after { content: ''; position: absolute; inset: 22%; border-radius: 50%; border: 1.5px solid currentColor; }
.topbar__nav { display: flex; gap: 1.1rem; font-size: 0.92rem; flex-wrap: wrap; justify-content: flex-end; }
.topbar__nav a { text-decoration: none; color: var(--ink-soft); }
.topbar__nav a:hover { color: var(--green); }
.topbar__portal { color: var(--green) !important; font-weight: 600; }
@media (max-width: 640px) { .topbar__nav a:not(.topbar__portal) { display: none; } }

/* ----- hero ----- */
.hero { padding: 2.75rem 0 3rem; background: radial-gradient(ellipse at top, #fbf7ec 0%, var(--cream) 60%); }
/* latest plates the fund paid for: three across on a desktop, a sideways-scrolling strip on a phone */
.recent { padding: 0 0 2.5rem; }
.recent .eyebrow.center { text-align: center; margin-bottom: 0.9rem; }
.recent__strip { list-style: none; margin: 0; padding: 0.25rem 0 0.75rem; display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.recent-card { flex: 0 0 min(85%, 19rem); scroll-snap-align: start; }
.recent__strip:has(.recent-card:nth-child(3):last-child) { justify-content: center; }
.recent__strip:has(.recent-card:nth-child(2):last-child) { justify-content: center; }
.recent__strip:has(.recent-card:only-child) { justify-content: center; }
.recent-card__link { display: block; height: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; text-decoration: none; color: inherit; box-shadow: 0 1px 2px rgba(61, 58, 46, 0.06); transition: transform 0.12s, box-shadow 0.12s; }
.recent-card__link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.recent-card p { margin: 0; }
.recent-card__amount { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--earth); }
.recent-card__item { font-family: 'Lora', Georgia, serif; font-size: 1.25rem; color: var(--green); margin: 0.2rem 0 0.35rem; line-height: 1.25; }
.recent-card__where { font-size: 0.92rem; }
@media (max-width: 640px) { .recent__strip { padding-left: 1rem; padding-right: 1rem; margin: 0 -1rem; justify-content: flex-start !important; } }
.hero__inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero h1 { max-width: 26ch; }
.fund-total { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 2rem; margin: 0.5rem 0 0; box-shadow: var(--shadow); min-width: min(100%, 20rem); }
.fund-total__label { margin: 0; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; color: var(--ink-soft); font-weight: 600; }
.fund-total__amount { font-family: var(--serif); font-size: clamp(2.4rem, 8vw, 3.2rem); color: var(--green); margin: 0.1rem 0; line-height: 1.1; font-weight: 600; transition: color 0.4s; }
.fund-total__amount.is-updated { color: var(--earth); }
.fund-total__note { margin: 0; font-size: 0.85rem; color: var(--ink-soft); max-width: 24rem; }

/* ----- sections ----- */
.section { padding: 3.5rem 0; }
.section--tint { background: var(--green-tint); }
.steps { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .steps { grid-template-columns: 1fr 1fr; } }
.steps__list { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps__list li { position: relative; padding-left: 2.6rem; margin-bottom: 0.9rem; counter-increment: step; }
.steps__list li::before { content: counter(step); position: absolute; left: 0; top: 0.05rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--green-tint); color: var(--green); font-weight: 700; display: grid; place-items: center; font-family: var(--serif); }

.venue-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.venue-card { text-decoration: none; color: inherit; display: block; transition: transform 0.15s, box-shadow 0.15s; }
.venue-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.venue-card h3 { margin-bottom: 0.2rem; }
.venue-card__where { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 0.6rem; }
.venue-card__blurb { margin: 0; }
.empty-state { text-align: center; }
.empty-state p { margin: 0; }

/* ----- find a venue ----- */
.search-bar { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1rem 0 0.5rem; }
.search-bar input { flex: 1 1 14rem; font: inherit; padding: 0.8rem 1rem; border-radius: 999px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); min-width: 0; }
.search-bar input:focus { outline: none; border-color: var(--green); }
.search-status { min-height: 1.5rem; color: var(--ink-soft); margin: 0.25rem 0 1rem; }
.map { height: 300px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--green-tint); }
@media (min-width: 720px) { .map { height: 380px; } }
.venue-list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 1rem; }
.venue-item { padding: 1.25rem 1.5rem; }
.venue-item__head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.venue-item__head h3 { margin: 0; }
.venue-item__distance { color: var(--earth); font-weight: 600; white-space: nowrap; }
.venue-item__where { color: var(--ink-soft); margin: 0.15rem 0 0.5rem; font-size: 0.92rem; }
.plate-list { list-style: none; padding: 0; margin: 0.75rem 0 0; display: grid; gap: 0.5rem; }
/* text column shrinks and wraps; the button keeps its column so every row's button lines up */
.plate { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.plate > div { min-width: 0; }
.plate .btn { white-space: nowrap; }
.plate__name .badge { margin-left: 0.4rem; vertical-align: middle; font-weight: 500; }
.wallet-buttons { margin-top: 1rem; }
.wallet-or { display: flex; align-items: center; gap: 0.75rem; color: var(--ink-soft); font-size: 0.85rem; margin: 0 0 0.75rem; }
.wallet-or::before, .wallet-or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.wallet-button { margin-bottom: 0.6rem; height: 44px; }
.wallet-button:empty { display: none; }
.wallet-button > * { width: 100%; height: 44px; }
.open-status { font-weight: 600; margin: 0.25rem 0 0.5rem; }
.open-status.is-open { color: var(--green); }
.open-status.is-closed { color: var(--earth); }
.hours summary { cursor: pointer; color: var(--ink-soft); font-size: 0.9rem; }
.hours-list { list-style: none; padding: 0; margin: 0.5rem 0 0.75rem; font-size: 0.9rem; max-width: 22rem; }
.hours-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.2rem 0; border-bottom: 1px solid var(--line); }
.hours-table { display: grid; gap: 0.45rem; margin-top: 0.5rem; }
.hours-row { display: grid; grid-template-columns: 6.5rem auto 1fr auto 1fr; gap: 0.5rem; align-items: center; }
.hours-row__day { font-weight: 600; font-size: 0.95rem; }
.hours-row .check, .field .hours-row label.check { margin: 0; }
.hours-row input[type="time"] { width: 100%; padding: 0.45rem 0.5rem; border: 2px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: #fff; color: var(--ink); }
.hours-row input[type="time"]:disabled { opacity: 0.45; }
.hours-row__to { color: var(--ink-soft); font-size: 0.9rem; }
.hours-row--holiday { margin-top: 0.35rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .hours-row { grid-template-columns: 1fr auto 1fr; } .hours-row__day { grid-column: 1 / -1; margin-top: 0.25rem; } .hours-row__closed { grid-column: 1 / -1; } }
.btn-card { background: #f3c74a; border-color: #f3c74a; color: var(--ink); }
.btn-card:hover, .btn-card:focus-visible { background: #e9b82d; border-color: #e9b82d; color: var(--ink); }
.card-pay { margin-top: 0.25rem; }
.pay-with { margin-top: 1rem; }
.card-form { margin-top: 0.9rem; text-align: left; }
/* built in the background, out of sight, so the fields are ready before the button is pressed */
.card-form--preparing { position: absolute; left: -10000px; top: 0; width: 24rem; visibility: hidden; pointer-events: none; }
.card-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); margin: 0 0 0.35rem; }
/* the box is ours, identical for all four fields; PayPal's borderless input sits inside it */
.card-field { height: 44px; margin-bottom: 0.9rem; overflow: hidden; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
.card-field iframe { height: 40px !important; display: block; }
.card-field.is-focus { border-color: var(--green); }
.card-field.is-invalid { border-color: var(--danger); }
.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.card-form .btn { margin-top: 0.25rem; }
apple-pay-button { --apple-pay-button-width: 100%; --apple-pay-button-height: 44px; --apple-pay-button-border-radius: 22px; --apple-pay-button-padding: 0; display: block; }
.staging-banner { background: #b8743f; color: #fff; text-align: center; font-size: 0.85rem; font-weight: 600; padding: 0.4rem 1rem; }
.redeem-drinks { margin: 1.25rem 0 1.5rem; text-align: left; }
.redeem-drinks .field__label { margin-bottom: 0.6rem; }
.redeem-drinks .radio-row { gap: 0.65rem; }
.panel .cta-row { margin-top: 1.5rem; } /* same gap below the notice as above it */
.plate__name { font-weight: 600; }
.plate__desc { color: var(--ink-soft); font-size: 0.9rem; margin: 0; }
.plate__price { color: var(--ink-soft); font-size: 0.9rem; }
.plate .btn { padding: 0.45rem 1rem; font-size: 0.92rem; }
.venue-item__empty { color: var(--ink-soft); font-style: italic; margin: 0.5rem 0 0; }

.partner { text-align: center; display: flex; flex-direction: column; align-items: center; }

/* ----- footer ----- */
.footer { padding: 3rem 0 2rem; border-top: 1px solid var(--line); }
.footer__inner { display: grid; gap: 1.5rem; }
@media (min-width: 720px) { .footer__inner { grid-template-columns: 2fr 1fr; } .footer__credits { grid-column: 1 / -1; } }
.footer__about p:last-child { max-width: 34rem; }
.wordmark--footer { font-size: 1.1rem; }
.footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }

/* ----- panels (dialogs) ----- */
.panel { border: 0; border-radius: var(--radius); padding: 0; max-width: 28rem; width: calc(100% - 2rem); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lift); margin: auto; }
.panel::backdrop { background: rgba(61, 58, 46, 0.5); }
.panel__inner { padding: 1.75rem 1.5rem; position: relative; }
.panel__close { position: absolute; top: 0.6rem; right: 0.7rem; border: 0; background: transparent; font-size: 1.8rem; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 0.25rem 0.5rem; border-radius: 50%; }
.panel__close:hover { background: var(--green-tint); color: var(--green); }
.panel h2 { font-size: 1.5rem; }
.amount-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr)); gap: 0.6rem; margin: 0.5rem 0 1rem; }
.amount { border: 2px solid var(--line); background: #fff; border-radius: var(--radius-sm); padding: 0.85rem 0.5rem; font-size: 1.15rem; font-weight: 600; cursor: pointer; color: var(--ink); font-family: var(--serif); }
.amount:hover { border-color: var(--sage); }
.amount.is-selected { border-color: var(--green); background: var(--green-tint); color: var(--green); }
.custom-amount label { display: block; font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 0.3rem; }
.input-prefix { display: flex; align-items: center; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 0 0.9rem; margin-bottom: 1rem; }
.input-prefix span { color: var(--ink-soft); font-weight: 600; }
.input-prefix input { border: 0; background: transparent; font: inherit; font-size: 1.2rem; padding: 0.7rem 0.4rem; width: 100%; color: var(--ink); }
.input-prefix input:focus, .input-prefix:focus-within { outline: none; }
.input-prefix:focus-within { border-color: var(--green); }
.notice { background: var(--earth-tint); border-radius: var(--radius-sm); padding: 0.8rem 1rem; font-size: 0.92rem; }
.form-error { color: var(--danger); font-weight: 600; margin: 0 0 0.75rem; }
.spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -0.15em; margin-right: 0.4em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- prose pages ----- */
.prose { padding: 2.5rem 1.25rem 4rem; max-width: 44rem; }
.prose h2 { font-size: 1.45rem; margin-top: 2rem; }
.prose h3 { font-size: 1.1rem; margin-top: 1.25rem; color: var(--ink); }

/* ----- map (MapLibre, self-hosted) ----- */
.maplibregl-map { font-family: var(--sans); }
.fp-pin { width: 30px; height: 38px; cursor: pointer; }
.fp-pin svg { display: block; filter: drop-shadow(0 3px 4px rgba(61, 58, 46, 0.3)); }
.fp-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--earth); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(61, 58, 46, 0.35); }
.maplibregl-popup-content { background: var(--paper); color: var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow-lift); padding: 0.7rem 1rem; font-size: 0.95rem; line-height: 1.45; }
.maplibregl-popup-content strong { font-family: var(--serif); color: var(--green); font-size: 1.05rem; }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--paper); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--paper); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--paper); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--paper); }
.maplibregl-ctrl-group { background: var(--paper) !important; border: 1px solid var(--line); box-shadow: var(--shadow) !important; border-radius: var(--radius-sm) !important; }
.maplibregl-ctrl-group button + button { border-top-color: var(--line) !important; }
.maplibregl-ctrl-attrib { background: rgba(255, 250, 240, 0.85) !important; color: var(--ink-soft); font-size: 10px; }
.maplibregl-ctrl-attrib a { color: var(--ink-soft); }
.maplibregl-cooperative-gesture-screen { font-family: var(--sans); }

/* ----- keyboard focus ----- */
:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }
.panel__inner:focus { outline: none; }

/* ----- portal & forms ----- */
.portal-main { padding: 2rem 1.25rem 4rem; }
.portal-main.narrow { max-width: 40rem; }
.portal-head { margin-bottom: 1.5rem; }
.portal-head h1 { margin-bottom: 0.2rem; }
.wordmark__tag { font-family: var(--sans); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--earth); margin-left: 0.2rem; font-weight: 600; }
.portal-nav a.is-active { color: var(--green); font-weight: 600; }
.inline-form { display: inline; margin: 0; }
.linklike { border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: 0.92rem; cursor: pointer; padding: 0; }
.linklike:hover { color: var(--green); }
.flash { margin: 1rem 0 0; padding: 0.8rem 1rem; border-radius: var(--radius-sm); background: var(--green-tint); color: var(--green-deep); }
.flash--error { background: #f6e3df; color: var(--danger); }
.flash--info { background: var(--earth-tint); color: var(--ink); }
.banner { padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem; border: 1px solid var(--line); background: var(--paper); }
.banner--ok { background: var(--green-tint); border-color: var(--sage); }
.banner--info { background: var(--earth-tint); }
.banner--warn { background: #f6e3df; }
.form h2 { font-size: 1.2rem; margin: 1.25rem 0 0.75rem; }
.form h2:first-of-type { margin-top: 0; }
.field { margin-bottom: 1rem; }
.field label, .field__label { display: block; font-weight: 600; margin: 0 0 0.3rem; }
.field__hint { margin: -0.15rem 0 0.4rem; font-size: 0.85rem; color: var(--ink-soft); }
.field input:not([type="radio"]):not([type="checkbox"]), .field textarea, .field select { width: 100%; font: inherit; padding: 0.7rem 0.9rem; border-radius: var(--radius-sm); border: 2px solid var(--line); background: #fff; color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--green); }
.field--error input, .field--error textarea { border-color: var(--danger); }
.field__error { margin: 0.3rem 0 0; color: var(--danger); font-size: 0.9rem; font-weight: 600; }
.field-row { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .field-row { grid-template-columns: 2fr 1fr; } .field-row--3 { grid-template-columns: 1.2fr 1.6fr 0.8fr; } }
.form .btn-block { margin-top: 0.5rem; }
.stat-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 2rem; }
@media (min-width: 720px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
.stat { padding: 1.25rem 1.5rem; }
.stat__label { margin: 0 0 0.25rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); font-weight: 600; }
.stat__value { font-family: var(--serif); font-size: 2rem; color: var(--green); margin: 0 0 0.25rem; }
.stat p:last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin-bottom: 2rem; }
.table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius-sm); overflow: hidden; font-size: 0.95rem; }
.table th, .table td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); background: var(--green-tint); }
.table tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: var(--line); color: var(--ink-soft); white-space: nowrap; }
.badge--ok { background: var(--green-tint); color: var(--green-deep); }
.badge--info { background: var(--earth-tint); color: var(--earth); }
.badge--warn { background: #f6e3df; color: var(--danger); }
.badge--muted { background: var(--line); color: var(--ink-soft); }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: #f6e3df; }
.item-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.item-card { padding: 1.25rem 1.5rem; }
.item-card--hidden { opacity: 0.85; }
.item-card__head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.item-card__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.item-card__actions .btn { padding: 0.5rem 1rem; font-size: 0.92rem; }
.qr-layout { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .qr-layout { grid-template-columns: 1fr 1.4fr; } }
.qr-preview { text-align: center; }
.qr-preview img { border-radius: var(--radius-sm); background: var(--paper); }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 0 0 1rem; }
.dl dt { color: var(--ink-soft); font-size: 0.9rem; }
.dl dd { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--green-tint); padding: 0.1rem 0.4rem; border-radius: 0.3rem; font-size: 0.9em; }

/* ----- venue page ----- */
.venue-main { padding: 2rem 1.25rem 4rem; max-width: 44rem; }
.venue-hero { margin-bottom: 2rem; }
.venue-hero h1 { margin-bottom: 0.2rem; }
.venue-hero .cta-row { justify-content: flex-start; margin-top: 1.25rem; }
.venue-plates .plate-list { margin-top: 1rem; }

/* ----- voucher ----- */
.voucher-page { background: var(--green-tint); }
.voucher { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 1.25rem 1rem 2rem; gap: 1rem; }
.wordmark--small { font-size: 1.1rem; }
.voucher__card { width: 100%; max-width: 26rem; text-align: center; padding: 1.75rem 1.5rem 1.5rem; }
.voucher__card h1 { font-size: 2.1rem; margin-bottom: 0.5rem; }
.voucher__venue { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 0.15rem; color: var(--ink); }
.voucher__item { color: var(--ink-soft); margin: 0 0 1rem; font-size: 1.05rem; }
.countdown { position: relative; width: 12rem; height: 12rem; margin: 0.5rem auto 1rem; }
.countdown__ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.countdown__track { fill: none; stroke: var(--line); stroke-width: 8; }
.countdown__progress { fill: none; stroke: var(--green); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke 0.5s; }
.is-urgent .countdown__progress { stroke: var(--earth); }
.countdown__time { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%); font-family: var(--serif); font-size: 2.6rem; color: var(--green); font-weight: 600; font-variant-numeric: tabular-nums; }
.countdown__label { position: absolute; top: 50%; left: 50%; transform: translate(-50%, 70%); margin: 0; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); }
.voucher__instruction { font-size: 1.15rem; margin: 0 0 0.75rem; }
.voucher__code { margin: 0 0 1.25rem; color: var(--ink-soft); }
.voucher__code span { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.5rem; letter-spacing: 0.12em; color: var(--ink); background: var(--cream); padding: 0.25rem 0.8rem; border-radius: var(--radius-sm); border: 1px dashed var(--sage); }

/* ----- admin ----- */
.topbar--admin { background: rgba(230, 237, 224, 0.95); }
.stat-grid--4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .stat-grid--4 { grid-template-columns: repeat(4, 1fr); } }
.filter-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 1.25rem; }
.chip { display: inline-block; padding: 0.3rem 0.85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; color: var(--ink-soft); font-size: 0.9rem; }
.chip.is-active { background: var(--green); color: #fff; border-color: var(--green); }
.two-col { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-bottom: 1.25rem; }
@media (min-width: 800px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col .card, .portal-main > .card { margin-bottom: 1.25rem; }
.action-list { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.action-list form { margin: 0; }
.details { margin: 0.5rem 0 1.25rem; }
.details summary { cursor: pointer; color: var(--danger); font-weight: 600; margin-bottom: 0.5rem; }
.admin-map { height: 320px; border-radius: var(--radius-sm); border: 1px solid var(--line); margin-bottom: 0.75rem; }
.inline-fields { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.inline-fields label { display: flex; gap: 0.35rem; align-items: center; font-size: 0.9rem; color: var(--ink-soft); }
.inline-fields input { font: inherit; padding: 0.45rem 0.6rem; border-radius: var(--radius-sm); border: 2px solid var(--line); background: #fff; width: 10rem; max-width: 100%; }
.inline-fields .btn { padding: 0.5rem 1rem; font-size: 0.92rem; }
.json { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; max-width: 18rem; word-break: break-all; }
.neg { color: var(--danger); }
.pos { color: var(--green-deep); }

/* ----- venue confirmation ----- */
.portal-nav__primary { color: var(--green) !important; font-weight: 600; }
.confirm-banner { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.confirm-form label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.code-input { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 2rem; letter-spacing: 0.15em; text-align: center; text-transform: uppercase; padding: 0.8rem 1rem; border-radius: var(--radius-sm); border: 2px solid var(--line); background: #fff; color: var(--ink); margin-bottom: 1rem; }
.code-input:focus { outline: none; border-color: var(--green); }
.confirm-result { border-color: var(--sage); background: var(--green-tint); margin-bottom: 1.25rem; }
.confirm-result h2 { margin-bottom: 0.25rem; }
.confirm-result p:last-child { margin-bottom: 0; }
/* .field label sets display:block; label.check below must win, hence the extra specificity */
.check, .field label.check { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: center; font-size: 0.95rem; line-height: 1.35; margin: 0.25rem 0 1rem; color: var(--ink-soft); }
.check > span { display: block; }
.voucher__staff { background: var(--green-tint); border-radius: var(--radius-sm); padding: 0.8rem 1rem; font-weight: 600; color: var(--green-deep); }

.voucher__qr { margin: 0 0 1rem; }
.voucher__qr img { display: block; margin: 0 auto 0.3rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--paper); }
.voucher__qr p { margin: 0; }

.details--inline { margin: 0.4rem 0 0; }
.details--inline summary { color: var(--ink-soft); font-weight: normal; font-size: 0.85rem; margin-bottom: 0.3rem; }

.radio-row { display: grid; gap: 0.5rem; }
.radio-row .check, .field .radio-row label.check { margin: 0; cursor: pointer; padding: 0.65rem 0.9rem; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); }
.radio-row .check:has(input:checked) { border-color: var(--green); background: var(--green-tint); }
.check input[type="radio"], .check input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--green); }
.radio-row + [data-payout] { margin-top: 0.75rem; }
.batch { margin-bottom: 1rem; }
.batch p { margin-bottom: 0.4rem; }

.venue-item__link { color: var(--green); text-decoration: none; }
.venue-item__link:hover { text-decoration: underline; }
.venue-item__foot { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.75rem; }
.venue-item__foot .btn { padding: 0.5rem 1.1rem; font-size: 0.95rem; }
.inline-fields select { font: inherit; padding: 0.45rem 0.6rem; border-radius: var(--radius-sm); border: 2px solid var(--line); background: #fff; }
