/* Nunito (SIL Open Font License), served from our own site so it also works offline */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/nunito-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --st-red-bg: #fde8e6;
  --st-red: #b42318;
  --st-amber-bg: #fff3e0;
  --st-amber: #8a4b00;
  --st-quiet-bg: #ece9f7;
  --st-quiet: #4b3a8c;
  --st-ok-bg: #e5f5ee;
  --st-ok: #0b5d45;
  --bg: #f4f8f7;
  --surface: #ffffff;
  --text: #13201b;
  --muted: #4f5f58;
  --border: #d5e0dc;
  --accent: #0f766e;
  --accent-soft: #e3f3f1;
  --accent-text: #ffffff;
  --ok-bg: #e5f5ee;
  --ok-text: #0b5d45;
  --warn-bg: #fff3e0;
  --warn-text: #8a4b00;
  --promo-bg: #fff4dc;
  --promo-border: #f59e0b;
  --promo-btn: #c2410c;
  --promo-btn-text: #ffffff;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --st-red-bg: #3d1512;
    --st-red: #ffb4ab;
    --st-amber-bg: #3a2a12;
    --st-amber: #ffd59a;
    --st-quiet-bg: #2a2445;
    --st-quiet: #cfc4ff;
    --st-ok-bg: #12352a;
    --st-ok: #9fe5c9;
    --bg: #0f1513;
    --surface: #18211d;
    --text: #e6eeea;
    --muted: #9fb0a7;
    --border: #2b3833;
    --accent: #3cc49a;
    --accent-soft: #15302a;
    --accent-text: #08130f;
    --ok-bg: #12352a;
    --ok-text: #9fe5c9;
    --warn-bg: #3a2a12;
    --warn-text: #ffd59a;
    --promo-bg: #2e2210;
    --promo-border: #f5b84a;
    --promo-btn: #fbbf24;
    --promo-btn-text: #1f1300;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

h1 { font-size: 1.6rem; margin: 8px 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
p.lead { color: var(--muted); margin: 0 0 20px; }

a { color: var(--accent); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
  color: var(--muted);
}

input, select, button, textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 44px;
}

button {
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 600;
}

button.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  font-weight: 400;
}

.station-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.table-wrap { overflow-x: auto; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

th, td {
  border-bottom: 1px solid var(--border);
  padding: 8px;
  text-align: right;
  white-space: nowrap;
}

th:first-child, td:first-child { text-align: left; }

td input {
  width: 72px;
  min-height: 36px;
  padding: 6px 8px;
  text-align: right;
}

.status {
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.status.ok { background: var(--ok-bg); color: var(--ok-text); }
.status.warn { background: var(--warn-bg); color: var(--warn-text); }
.status ul { margin: 6px 0 0; padding-left: 20px; }

.totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.big { font-size: 1.8rem; font-weight: 700; }
.small { font-size: 0.85rem; color: var(--muted); }

.note { font-size: 0.85rem; color: var(--muted); }

.error { color: var(--warn-text); background: var(--warn-bg); border-radius: 8px; padding: 8px 12px; }

.list { list-style: none; padding: 0; margin: 0 0 12px; }
.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  align-items: end;
}

/* Volunteer screen */
.station-name { font-size: 2.2rem; font-weight: 800; margin: 8px 0; }

.volunteer { max-width: 520px; }

.tap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  margin: 0 0 14px;
  padding: 22px 20px;
  border-radius: 16px;
  text-align: left;
  touch-action: manipulation;
}
.tap:active { transform: scale(0.98); }
.tap-title { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.tap-hint { font-size: 0.95rem; font-weight: 400; opacity: 0.9; }

.tap-swap { min-height: 120px; }
.tap-last { min-height: 110px; background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-text); }
.tap-cups { min-height: 64px; padding: 14px 20px; background: transparent; color: var(--text); border-color: var(--border); }
.tap-cups .tap-title { font-size: 1.2rem; font-weight: 700; }

.feedback { border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; min-height: 48px; }
.feedback:empty { display: none; }
.feedback.ok { background: var(--ok-bg); color: var(--ok-text); }
.feedback.warn { background: var(--warn-bg); color: var(--warn-text); }
.feedback.pending { background: var(--surface); border: 1px solid var(--border); }
.feedback button { margin-top: 8px; display: block; }

.recent-title { font-size: 1rem; color: var(--muted); margin-top: 8px; }

/* Runner screen */
.job-card.new-job { border: 3px solid var(--st-red); }
.job-card.on-way { border: 3px solid var(--accent); }
.job-card .tile-status { color: var(--st-red); }
.job-card.on-way .tile-status { color: var(--accent); }
.job-title { font-size: 2rem; font-weight: 800; line-height: 1.15; margin: 6px 0; }
.tap-done { min-height: 80px; }
.job-chip { display: block; margin-top: 8px; font-weight: 700; color: var(--text); }

.stock-card { border: 2px solid var(--accent); }
.stock-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.stock-row input { font-size: 1.4rem; font-weight: 700; }
.stock-card button[type="submit"] { width: 100%; min-height: 56px; font-size: 1.15rem; }
.stock-done { margin-top: 16px; color: var(--muted); }
.stock-done summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }

/* Live board */
.board { max-width: 1200px; }
.board-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.freshness { font-size: 0.9rem; color: var(--muted); margin: 12px 0 0; }
.freshness.stale { color: var(--st-red); font-weight: 700; }
.summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 16px; }
.chip { display: inline-block; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 0.9rem; margin-top: 6px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 16px; }
.tile { border-radius: 14px; padding: 16px; border: 2px solid transparent; }
.tile-status { font-weight: 800; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.02em; }
.tile-name { font-size: 1.6rem; font-weight: 800; line-height: 1.15; margin: 4px 0 2px; color: var(--text); }
.tile-detail { font-weight: 600; margin: 10px 0 4px; color: var(--text); }

.st-needs_jars { background: var(--st-red-bg); color: var(--st-red); border-color: var(--st-red); }
.tile.st-needs_jars { border-width: 4px; }
.st-quiet { background: var(--st-quiet-bg); color: var(--st-quiet); border-color: var(--st-quiet); }
.st-not_stocked { background: var(--st-red-bg); color: var(--st-red); border-color: var(--st-red); border-style: dashed; }
.st-cups_low { background: var(--st-amber-bg); color: var(--st-amber); border-color: var(--st-amber); }
.st-ok { background: var(--st-ok-bg); color: var(--st-ok); border-color: transparent; }

.sync { font-weight: 600; margin: 0 0 8px; }
.sync:empty { display: none; }
.sync::before { content: "● "; }
.sync.ok { color: var(--ok-text); }
.sync.pending, .sync.warn { color: var(--warn-text); }

/* QR sheet: two cards per row, one card never split across pages */
.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.qr-card {
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  break-inside: avoid;
}
.qr-card svg { width: 100%; max-width: 220px; height: auto; }
.qr-card .station-name { font-size: 1.5rem; }
.qr-card .small { color: #333; word-break: break-all; }
.runner-heading { margin-top: 24px; break-before: page; }

@media print {
  body { background: #fff; }
  .no-print { display: none; }
  main { max-width: none; padding: 0; }
  .qr-grid { grid-template-columns: 1fr 1fr; }
}

/* Simulation page */
.sim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.sim-counter { font-size: 1.6rem; font-weight: 800; margin: 0 0 12px; }
.sim-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.sim-tile { border-radius: 10px; padding: 8px 10px; border: 2px solid transparent; }
.sim-name { font-weight: 700; color: var(--text); font-size: 0.95rem; }
.sim-bar { height: 8px; background: var(--border); border-radius: 4px; margin: 6px 0 4px; overflow: hidden; }
.sim-bar span { display: block; height: 100%; background: var(--accent); }

/* Language switch and keyboard focus */
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lang-btn { min-height: 40px; padding: 6px 14px; font-weight: 600; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: 0.6; cursor: wait; }

/* ---------- Redesign: set up, hub, home ---------- */
main.narrow, main.hub { max-width: 640px; }
.top-nav { margin: 0 0 4px; font-size: 0.95rem; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.primary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-text); border: 1px solid var(--accent);
  border-radius: 12px; padding: 10px 18px; min-height: 48px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.primary-btn.big { display: flex; width: 100%; min-height: 56px; font-size: 1.1rem; margin: 16px 0 8px; }
.primary-btn:active, button:active { transform: scale(0.98); }
.ghost-link { align-self: center; font-weight: 600; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.action-row .ghost, .action-row .primary-btn { min-height: 44px; }
.small-btn { min-height: 40px; padding: 6px 12px; font-size: 0.9rem; }

/* Home */
.home .brand { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 800; margin: 12px 0 18px; }
.home .acct-row .brand { margin-bottom: 18px; }
.home .hero { font-size: 1.9rem; line-height: 1.2; margin: 0 0 8px; }
.event-list { list-style: none; padding: 0; margin: 0; }
.event-list a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; min-height: 56px; }
.event-list a > span:first-child { display: flex; flex-direction: column; }
.how-list { padding-left: 20px; color: var(--muted); }
.how-list strong { color: var(--text); }
.links { margin-top: 20px; line-height: 2; }

/* Set up form */
.q { font-weight: 700; font-size: 1.05rem; margin: 0 0 8px; padding: 0; }
.field { border: 0; padding: 0; margin: 0 0 18px; }
.field > input { width: 100%; font-size: 1.1rem; }
.field-error { color: var(--st-red); font-size: 0.9rem; margin: 6px 0 0; }
input[aria-invalid="true"] { border-color: var(--st-red); border-width: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.chip-opt { position: relative; display: inline-flex; flex-direction: row; color: var(--text); font-size: 1rem; }
.chip-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-opt span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); font-weight: 600; cursor: pointer; }
.chip-opt input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.chip-opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.inline-label { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 0.95rem; }
.inline-label input { width: 130px; }
.template-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 18px; }
.chip-btn { min-height: 40px; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  border: 1px solid transparent; font-weight: 600; }
.chip-btn.on { border-color: var(--accent); }
.switch-row { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; color: var(--text);
  padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 16px; font-size: 1rem; }
input[role="switch"] { appearance: none; -webkit-appearance: none; width: 52px; height: 30px; min-height: 30px; padding: 0; border-radius: 999px;
  background: var(--border); position: relative; cursor: pointer; flex: none; border: 0; }
input[role="switch"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; transition: transform 150ms ease-out; box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); }
input[role="switch"]:checked { background: var(--accent); }
input[role="switch"]:checked::after { transform: translateX(22px); }
.suggest { background: var(--accent-soft); border-radius: 16px; padding: 16px; }
.suggest .eyebrow { color: var(--accent); }
.stepper-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 48px; min-height: 44px; padding: 0; font-size: 1.4rem; line-height: 1; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); }
.stepper output { min-width: 44px; text-align: center; font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.order { font-weight: 800; font-size: 1.15rem; margin: 10px 0 4px; }

/* Event hub */
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px; margin: 14px 0 18px;
  position: sticky; top: 8px; z-index: 10; }
.tabs button { flex: 1; min-height: 44px; background: transparent; color: var(--muted); border: 0; border-radius: 10px; font-weight: 700; }
.tabs button.on { background: var(--accent); color: var(--accent-text); }
.progress { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin: 0 0 12px; }
#progressDots { color: var(--accent); letter-spacing: 0.2em; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.step h2 { font-size: 1.05rem; margin: 0; }
.step p { margin: 6px 0 0; }
.step-head { display: flex; align-items: center; gap: 10px; }
.step-mark { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; border: 2px solid var(--border); color: var(--muted); }
.step.done .step-mark { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.step.next { border: 2px solid var(--accent); box-shadow: 0 2px 10px rgb(15 118 110 / 0.12); }
.step.next .step-mark { border-color: var(--accent); color: var(--accent); }
.step.done { opacity: 0.85; }
.keep-link h2 { font-size: 1rem; margin: 0 0 4px; }
.finetune summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.check-row { flex-direction: row; align-items: center; gap: 10px; color: var(--text); min-height: 44px; font-size: 1rem; }
.check-row input { width: 22px; height: 22px; min-height: 22px; }

/* Stations sheet */
dialog#stationsSheet { width: min(560px, 100vw); max-height: 92vh; margin: auto auto 0; border: 0; border-radius: 22px 22px 0 0; padding: 20px;
  background: var(--surface); color: var(--text); }
dialog#stationsSheet::backdrop { background: rgb(0 0 0 / 0.5); }
@media (min-width: 700px) { dialog#stationsSheet { margin: auto; border-radius: 22px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; }
.station-list { padding-left: 22px; }
.station-list { padding-left: 0; list-style: none; }
.station-edit { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.station-edit input:not([type]) { grid-column: 1 / -1; width: 100%; font-size: 1.05rem; }
.runner-list { list-style: none; padding: 0; }
.runner-list li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.inline-add { display: flex; gap: 8px; margin-bottom: 8px; }
.inline-add input { flex: 1; }

/* Live board groups */
.group-title { font-size: 1.05rem; margin: 6px 0 10px; }
.all-calm { font-weight: 700; color: var(--st-ok); }
.all-good { margin-top: 8px; }
.all-good summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tile-head { display: flex; align-items: center; gap: 6px; }
.st-icon { display: inline-flex; line-height: 1; }
.st-svg { --icon-cut: var(--bg); width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.15em; }
.chip .st-svg { margin-right: 2px; }
.st-icon.big .st-svg { width: 32px; height: 32px; }
.job-line { margin-top: 2px; }
.stat .big { font-variant-numeric: tabular-nums; }

/* Volunteer first visit */
.intro { border: 2px solid var(--accent); }
.intro h2 { margin-top: 0; font-size: 1.35rem; line-height: 1.25; }
.intro ol { padding-left: 22px; font-size: 1.05rem; font-weight: 600; }
.intro li { margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Compact tiles on phones; one calm card before the start */
.pre-start { border: 2px dashed var(--border); }
.pre-start .group-title { margin: 0 0 6px; }
@media (max-width: 699px) {
  .tiles { grid-template-columns: 1fr; gap: 10px; }
  .tile { padding: 12px 14px; }
  .tile-name { font-size: 1.25rem; margin: 2px 0; }
  .tile-detail { margin: 4px 0 2px; }
}

/* Fold-outs show they can open */
.finetune summary, .all-good summary { list-style: none; }
.finetune summary::-webkit-details-marker, .all-good summary::-webkit-details-marker { display: none; }
.finetune summary::after, .all-good summary::after { content: "▸"; margin-left: auto; color: var(--muted); transition: transform 150ms ease-out; }
.finetune[open] summary::after, .all-good[open] summary::after { transform: rotate(90deg); }

/* ---------- Space and illustrations ---------- */
:root { --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 4px 16px rgb(16 24 40 / 0.05); }
main { padding: var(--s5) var(--s4) var(--s7); }
h1 { line-height: 1.2; letter-spacing: -0.01em; }
.small { line-height: 1.45; }
.card, .step, .q-card, .suggest, .progress-card, .hero-card { border-radius: 20px; }
.card, .step, .q-card { padding: var(--s5); box-shadow: var(--shadow); border: 1px solid var(--border); background: var(--surface); margin-bottom: var(--s4); }
.stack > * + * { margin-top: var(--s4); }
.stack > .q-card, .stack > .suggest { margin-bottom: 0; }

/* Illustration sizes */
.art { display: inline-block; width: 48px; height: 48px; flex: none; }
.art svg { width: 100%; height: 100%; display: block; }
.art.sm { width: 32px; height: 32px; }
.art.lg { width: 72px; height: 72px; }
.art.xl { width: 112px; height: 112px; }

/* Page header with mascot */
.page-head { display: flex; align-items: center; gap: var(--s4); margin: var(--s3) 0 var(--s5); }
.page-head h1 { margin: 0 0 var(--s1); font-size: 1.6rem; }
.lead-sm { margin: 0; color: var(--muted); }
.template-row { margin: 0 0 var(--s5); }

/* Set up: one question per card */
.q-card { display: grid; grid-template-columns: 48px 1fr; gap: var(--s4); align-items: start; }
fieldset.q-card { margin: 0; min-width: 0; }
.q-card .field { margin: 0; min-width: 0; }
.q-card .q { margin-bottom: var(--s3); display: block; }
.q-card .chips { margin-bottom: var(--s3); }
.q-card .chips:last-child { margin-bottom: 0; }
.switch-card { grid-template-columns: 48px 1fr auto; align-items: center; cursor: pointer; color: var(--text); font-size: 1rem; }
.switch-text { display: flex; flex-direction: column; }
.switch-text .q { margin: 0; }
.suggest { padding: var(--s5); }
.suggest-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.suggest-head .eyebrow { margin: 0; }
.stepper-row { padding: var(--s2) 0; }
.order { font-size: 1.25rem; line-height: 1.35; margin: var(--s4) 0 var(--s2); }
details.how summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.95rem; min-height: 40px; display: flex; align-items: center; }
details.how p { margin: var(--s2) 0 0; }
.primary-btn.big { margin: var(--s5) 0 var(--s2); }

/* Hub */
.hub h1 { font-size: 1.7rem; margin: var(--s2) 0 var(--s1); }
.tabs { margin: var(--s5) 0; }
.progress-card { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); background: var(--accent-soft); margin-bottom: var(--s5); }
.progress-body { flex: 1; }
.progress-title { font-weight: 800; margin: 0 0 var(--s2); }
.progress-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.progress-bar span { height: 10px; border-radius: 99px; background: var(--border); transition: background 200ms ease-out; }
.progress-bar span.on { background: var(--accent); }
.step { display: grid; grid-template-columns: 48px 1fr; gap: var(--s4); align-items: start; }
.step-body { min-width: 0; }
.step-head { margin-bottom: var(--s2); }
.step h2 { font-size: 1.1rem; }
.step-main { font-weight: 600; margin: 0 0 var(--s1); }
.step .action-row { margin-top: var(--s4); }
.step-mark { width: 26px; height: 26px; font-size: 0.85rem; }
.order-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin: var(--s2) 0; }
.order-stat { display: flex; align-items: center; gap: var(--s2); background: var(--bg); border-radius: 14px; padding: var(--s3); }
.order-stat > span:last-child { display: flex; flex-direction: column; }
.order-stat strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.mini-bar { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; margin: var(--s2) 0; }
.mini-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 300ms ease-out; }
.keep-link { background: transparent; box-shadow: none; }
@media (max-width: 520px) {
  .step { grid-template-columns: 1fr; }
  .step > .art { width: 44px; height: 44px; }
  .step .action-row { flex-direction: column; }
  .step .action-row > * { width: 100%; }
}

/* Live */
.pre-start { display: flex; gap: var(--s4); align-items: center; border-style: dashed; }
.calm { text-align: center; padding: var(--s6) var(--s4); }
.calm .all-calm { font-size: 1.15rem; margin: var(--s3) 0 var(--s1); }
.tiles { gap: var(--s4); }
.tile { border-radius: 18px; padding: var(--s4) var(--s5); }

/* Summary */
.totals { gap: var(--s4); }
.stat { display: flex; align-items: center; gap: var(--s3); background: var(--bg); border-radius: 16px; padding: var(--s4); }
.stat .big { font-size: 1.5rem; line-height: 1.2; }
.action-row.no-print { margin: var(--s5) 0; }

/* Home */
.hero-card { background: var(--accent-soft); padding: var(--s5); margin-bottom: var(--s6); }
.hero-art { display: flex; align-items: flex-end; gap: var(--s2); margin-bottom: var(--s4); }
.home .hero { font-size: 1.75rem; margin: 0 0 var(--s2); }
.home h2.q { margin: var(--s6) 0 var(--s3); }
.how-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s4); }
.how-list li { display: flex; gap: var(--s4); align-items: center; }
.how-list li > span:last-child { display: flex; flex-direction: column; }
.how-list strong { font-size: 1.05rem; }
.event-list a { gap: var(--s3); padding: var(--s4); border-radius: 16px; box-shadow: var(--shadow); }
.event-list .grow { flex: 1; display: flex; flex-direction: column; }
.links { margin-top: var(--s6); }

/* Volunteer: illustrated buttons */
#buttons .tap { flex-direction: row; align-items: center; gap: var(--s4); }
.tap-text { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.tap-badge { flex: none; width: 64px; height: 64px; border-radius: 18px; background: rgb(255 255 255 / 0.92); display: grid; place-items: center; }
.tap-badge .art { width: 48px; height: 48px; }
.tap-badge.small-badge { width: 44px; height: 44px; border-radius: 12px; }
.tap-badge.small-badge .art { width: 32px; height: 32px; }
.tap-cups .tap-badge { background: var(--accent-soft); }
.card-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s2); }
.card-head h2 { margin: 0; }
.intro { text-align: center; }
.intro ol { text-align: left; }
.volunteer .station-name { margin-bottom: var(--s4); }
#buttons > * + * { margin-top: var(--s4); }
#buttons .tap { margin: 0; }

/* Runner */
.idle { text-align: center; }
.job-row { display: flex; align-items: center; gap: var(--s3); }
.job-row .job-title { margin: 0; }

/* Step state shown on the illustration (done = green tick badge, next = accent ring); number kept for screen readers */
.step > .art { position: relative; width: 48px; height: 48px; }
.step.done > .art::after { content: "✓"; position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%;
  background: #16a34a; color: #fff; font-size: 0.8rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.step.next > .art { outline: 3px solid var(--accent); outline-offset: 6px; border-radius: 14px; }
.step .step-mark { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 520px) {
  .step { grid-template-columns: 40px 1fr; gap: var(--s3); padding: var(--s4); }
  .step > .art { width: 40px; height: 40px; }
  .order-stat strong { font-size: 1.02rem; }
}

/* ---------- Hi-fi: one type family, one card, chunky buttons (matches the Figma design system) ---------- */
body { font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif; }
h1, h2, h3, .q, .tile-name, .station-name, .job-title, .tap-title { font-weight: 800; }
.primary-btn, button.primary-btn { border-radius: 16px; font-weight: 800; letter-spacing: 0.01em; box-shadow: 0 4px 0 #0b5a53; }
.primary-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #0b5a53; }
button.ghost { border-radius: 14px; font-weight: 700; box-shadow: 0 3px 0 var(--border); }
button.ghost:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--border); }
.chip-btn { font-weight: 700; }
.icon-tile { flex: none; width: 56px; height: 56px; border-radius: 16px; background: var(--surface); display: grid; place-items: center; }
.icon-tile .art { width: 40px; height: 40px; }

/* ---------- Set up flow ---------- */
main.flow { max-width: 520px; min-height: 100dvh; display: flex; flex-direction: column; padding: var(--s4) var(--s4) 0; }
.flow-top { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s5); }
.flow-back { flex: none; width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800;
  color: var(--muted); text-decoration: none; border-radius: 12px; }
.flow-progress { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.flow-progress span { height: 12px; border-radius: 99px; background: var(--border); transition: background 250ms ease-out; }
.flow-progress span.on { background: var(--accent); }
.flow-form { flex: 1; display: flex; flex-direction: column; }
.flow-step { border: 0; margin: 0; padding: 0; min-width: 0; flex: 1; animation: step-in 220ms ease-out; }
@keyframes step-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.flow-step > * + * { margin-top: var(--s4); }

/* Mascot asks the question */
.ask { display: flex; align-items: center; gap: var(--s3); padding: 0; margin: 0 0 var(--s5); width: 100%; float: none; }
.ask .art.lg { width: 72px; height: 72px; }
.bubble { position: relative; flex: 1; margin: 0; padding: var(--s3) var(--s4); background: var(--surface); border: 2px solid var(--border);
  border-radius: 18px; font-size: 1.35rem; font-weight: 800; line-height: 1.25; color: var(--text); }
.bubble::before { content: ""; position: absolute; left: -9px; top: 50%; width: 14px; height: 14px; background: var(--surface);
  border-left: 2px solid var(--border); border-bottom: 2px solid var(--border); transform: translateY(-50%) rotate(45deg); }
legend.ask + * { margin-top: 0; }

.big-input { width: 100%; font-size: 1.2rem; font-weight: 700; min-height: 56px; padding: 0 var(--s4); border-radius: 16px;
  border: 2px solid var(--border); background: var(--surface); color: var(--text); font-family: inherit; }
.big-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.field-label { display: block; font-weight: 800; font-size: 1.05rem; color: var(--text); margin: var(--s5) 0 var(--s2); }
.field-label + * { margin-top: 0; }
.flow-step .template-row { margin: var(--s2) 0 0; }
.flow-step .small { margin-bottom: 0; }

/* Big illustrated answers */
.options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.option { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: var(--s4);
  background: var(--surface); border: 2px solid var(--border); border-radius: 20px; box-shadow: 0 4px 0 var(--border);
  color: var(--text); cursor: pointer; font-size: 1rem; min-height: 132px; transition: transform 120ms ease-out, background 150ms; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option .art { width: 48px; height: 48px; margin-bottom: var(--s2); }
.option strong { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.option .small { line-height: 1.3; }
.option:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 4px 0 var(--accent); }
.option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.option:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--border); }
.option-hidden { display: none; }
.link-btn { display: block; width: 100%; background: transparent; border: 0; color: var(--accent); font-weight: 800; font-size: 1rem;
  min-height: 48px; padding: 0; box-shadow: none; }
.exact { flex-direction: row; align-items: center; gap: var(--s2); font-weight: 700; color: var(--text); font-size: 1.05rem; }
.exact input { width: 150px; font-size: 1.2rem; font-weight: 800; min-height: 52px; border-radius: 14px; }
.flow-step .chips { gap: var(--s2); margin: 0; }
.flow-step .chip-opt span { min-height: 48px; padding: 0 20px; border-radius: 999px; border-width: 2px; font-weight: 800; }

/* The payoff */
.plan-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s1); }
.plan-hero h1 { margin: var(--s2) 0 0; font-size: 1.7rem; }
.plan-hero .art.xl { animation: cheer 600ms ease-out; }
@keyframes cheer { 0% { transform: scale(0.6); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.order-card { background: var(--accent-soft); border-radius: 20px; padding: var(--s5); display: grid; gap: var(--s3); }
.order-card .eyebrow { color: var(--accent); margin: 0; }
.order-item { display: flex; align-items: center; gap: var(--s4); }
.order-item > span:last-child { display: flex; flex-direction: column; }
.order-item strong { font-size: 1.45rem; font-weight: 900; line-height: 1.15; font-variant-numeric: tabular-nums; }
.team-card { background: var(--surface); border: 2px solid var(--border); border-radius: 20px; padding: var(--s2) var(--s5); }
.team-card .stepper-row + .stepper-row { border-top: 1px solid var(--border); }
.flow-step details.how summary { justify-content: center; }

/* Sticky Continue */
.flow-foot { position: sticky; bottom: 0; padding: var(--s3) 0 var(--s5); background: linear-gradient(transparent, var(--bg) 24%); margin-top: var(--s5); }
.flow-foot .primary-btn.big { margin: 0; }
.flow-foot #createStatus { margin: 0 0 var(--s3); }
.flow-foot #createStatus:empty { display: none; }
@media (max-width: 360px) { .bubble { font-size: 1.15rem; } .option { min-height: 120px; padding: var(--s3); } }

/* Cup type: steer organisers to cups that are really plastic-free */
.cup-tip { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border-radius: 12px; padding: 10px 14px; }
.cup-tip strong { font-weight: 800; }
.cup-line { margin: var(--s2) 0 0; }
.cup-find { display: flex; flex-direction: column; gap: 6px; margin-top: var(--s2); }
.cup-find-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cup-find .chip-btn { display: inline-flex; align-items: center; text-decoration: none; }
.cup-promo { background: var(--promo-bg); border: 2px solid var(--promo-border); border-radius: 20px; padding: var(--s5); display: grid; gap: var(--s4); }
.cup-promo-head { display: flex; align-items: center; gap: var(--s3); }
.cup-promo-head .art { flex: none; }
.cup-promo h2 { margin: 0; font-size: 1.25rem; font-weight: 900; line-height: 1.25; }
.cup-promo .nowrap { white-space: nowrap; }
.cup-promo-head .art { width: 52px; height: 52px; }
.cup-promo p { margin: 2px 0 0; }
.cup-promo-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.cup-promo-btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 6px var(--s3); text-align: center; line-height: 1.2;
  border-radius: 14px; background: var(--promo-btn); color: var(--promo-btn-text); font-weight: 800; text-decoration: none; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.cup-promo-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.cup-promo-btn:focus-visible { outline: 3px solid var(--promo-border); outline-offset: 2px; }
.not-counted { display: flex; align-items: center; gap: var(--s3); background: var(--st-red-bg); border: 2px dashed var(--st-red); margin-bottom: var(--s3); }
.not-counted-title { margin: 0; font-size: 1.1rem; font-weight: 800; color: var(--st-red); }
.not-counted .small { margin: 4px 0 0; color: var(--text); }
.not-counted-card { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-text); }
.not-counted-card p { margin: 2px 0 0; color: inherit; }
.not-counted-card button { flex: none; }
.stock-card .link-btn { margin-top: var(--s3); }
.summary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin: var(--s5) 0; }
.summary-actions > * { min-height: 48px; }
.summary-actions .primary-btn { grid-column: 1 / -1; }
.summary-actions .ghost-link { grid-column: 1 / -1; justify-self: center; display: inline-flex; align-items: center; }
.summary-empty .small { max-width: 34ch; margin-left: auto; margin-right: auto; }
.legend { margin-top: var(--s5); border-top: 1px solid var(--border); padding-top: var(--s4); }
.legend-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-item .chip { margin-top: 0; font-size: 0.85rem; padding: 2px 10px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.legend .how { margin-top: var(--s3); }

/* ---------- Desktop (organiser pages on a laptop) ---------- */
@media (min-width: 1024px) {
  /* Hub: wider, checklist in two columns, tabs stay compact. */
  main.hub { max-width: 1120px; }
  main.hub .tabs { max-width: 520px; }
  /* Steps flow down two columns (1-2 left, 3-4 right), so a short card never leaves a gap. */
  #tab-setup { columns: 2; column-gap: var(--s5); }
  #tab-setup > .progress-card, #tab-setup > #viewOnly, #tab-setup > .keep-link, #tab-setup > .finetune { column-span: all; }
  #tab-setup > .step { break-inside: avoid; margin-bottom: var(--s5); }
  #tab-setup > .keep-link { margin-top: var(--s2); }
  #tab-live .tiles { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }


  /* Summary: stats three across, wider page. */
  #summaryMount .totals, #mount .totals { grid-template-columns: repeat(3, 1fr); }

  /* Set up: still centred, but roomier, and option cards share one row. */
  main.flow { max-width: 760px; }
  main.flow .options { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* ---------- First-time help: welcome slides and hub tour (onboarding.js) ---------- */
body.ob-open { overflow: hidden; }
.ob-sheet { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; }
.ob-card { flex: 1; display: flex; flex-direction: column; padding: var(--s4) var(--s4) var(--s5); overflow-y: auto; }
.ob-top { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.ob-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.ob-skip { background: transparent; border: 0; box-shadow: none; color: var(--muted); font-weight: 700; font-size: 1rem; padding: 8px 4px; min-height: 44px; }
.ob-stage { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s4); padding-top: 6vh; max-width: 520px; width: 100%; margin: 0 auto; }
.ob-art { position: relative; width: 260px; height: 220px; flex: none; border-radius: 40px; background: var(--accent-soft); display: flex; align-items: flex-end; justify-content: center; gap: 6px; padding-bottom: 28px; }
.ob-art .art { width: 96px; height: 96px; }
.ob-art .art.big { width: 128px; height: 128px; }
.ob-art .art.sm { width: 64px; height: 64px; }
.ob-art .spark { position: absolute; }
.ob-art .s1 { width: 10px; height: 10px; border-radius: 3px; background: #FBBF24; left: 28px; top: 30px; transform: rotate(20deg); }
.ob-art .s2 { width: 8px; height: 8px; border-radius: 99px; background: #FB7185; right: 34px; top: 44px; }
.ob-art .s3 { width: 9px; height: 9px; border-radius: 3px; background: #38BDF8; right: 52px; bottom: 30px; transform: rotate(-15deg); }
.ob-step { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0; }
.ob-title { font-size: 1.75rem; font-weight: 900; line-height: 1.15; margin: 0; }
.ob-text { font-size: 1.1rem; line-height: 1.45; color: var(--muted); margin: 0; max-width: 32ch; }
.ob-dots { display: flex; gap: 8px; justify-content: center; margin: var(--s4) 0; }
.ob-dots span { width: 8px; height: 8px; border-radius: 99px; background: var(--border); transition: width 150ms ease-out; }
.ob-dots span.on { width: 28px; background: var(--accent); }
.ob-foot { max-width: 520px; width: 100%; margin: 0 auto; display: grid; gap: var(--s2); }
.ob-foot .primary-btn { width: 100%; min-height: 56px; font-size: 1.1rem; display: flex; justify-content: center; align-items: center; }
.ob-foot .link-btn { text-align: center; text-decoration: none; padding: var(--s2); }
@media (min-width: 1024px) {
  .ob-sheet { background: rgb(15 21 19 / 0.45); align-items: center; justify-content: center; }
  .ob-card { flex: none; background: var(--bg); border-radius: 28px; width: 520px; min-height: 640px; padding: var(--s5); box-shadow: 0 20px 60px rgb(0 0 0 / 0.25); }
}
.ob-shield { position: fixed; inset: 0; z-index: 40; }
.ob-spot { position: fixed; z-index: 41; border-radius: 22px; pointer-events: none; box-shadow: 0 0 0 4px var(--accent), 0 0 0 9999px rgb(15 21 19 / 0.6); }
.ob-tip { position: fixed; z-index: 42; display: flex; gap: 10px; align-items: flex-start; width: min(340px, calc(100vw - 32px)); }
.ob-tip .art { width: 56px; height: 56px; flex: none; }
.ob-tip-body { flex: 1; background: var(--surface); border-radius: 18px; padding: var(--s3) var(--s4); box-shadow: 0 10px 30px rgb(0 0 0 / 0.25); }
.ob-tip-body p#obTipText { margin: 4px 0 var(--s3); font-size: 1.02rem; line-height: 1.4; color: var(--text); }
.ob-tip-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ob-tip-row .primary-btn { min-height: 44px; padding: 0 18px; font-size: 0.95rem; }
.ob-tip-row .ob-skip { font-size: 0.9rem; }
.replay-link { background: transparent; border: 0; box-shadow: none; padding: 0; color: var(--accent); font-weight: 700; font-size: 0.95rem; text-decoration: underline; min-height: 44px; }
.cup-promo-row > .cup-promo-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.cup-promo .cup-promo-note { margin: 0; }

/* ---------- Home ---------- */
.home .hero-card { display: flex; flex-direction: column-reverse; gap: var(--s4); margin-bottom: var(--s4); }
.home .hero-art { margin: 0; align-items: flex-end; }
.home .hero { font-size: 2rem; line-height: 1.12; letter-spacing: -0.02em; }
.home .hero-sub { font-size: 1.05rem; line-height: 1.45; color: var(--muted); margin: 0 0 var(--s4); max-width: 34ch; }
.home .hero-actions { display: flex; flex-direction: column; gap: var(--s2); }
.home .hero-actions .primary-btn.big { margin: 0; justify-content: center; align-items: center; text-decoration: none; }
.secondary-btn { display: inline-flex; justify-content: center; align-items: center; min-height: 56px; padding: 0 var(--s5); border-radius: 16px;
  background: var(--surface); color: var(--accent); border: 2px solid var(--accent); font-weight: 800; font-size: 1.05rem; text-decoration: none; }
.secondary-btn:active { transform: translateY(2px); }
.hero-fact { margin: 0 0 var(--s5); padding: var(--s3) var(--s4); border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; color: var(--muted); }
.hero-fact strong { color: var(--text); }
.how-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.how-head h2.q { margin-bottom: var(--s3); }
.how-list li { position: relative; }
.how-n { flex: none; width: 26px; height: 26px; border-radius: 99px; background: var(--accent); color: var(--accent-text); font-weight: 900; font-size: 0.9rem; display: grid; place-items: center; }
.how-list li .art { flex: none; width: 44px; height: 44px; }
.home-foot { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); justify-content: center; margin: var(--s6) 0 var(--s4); padding-top: var(--s4); border-top: 1px solid var(--border); color: var(--muted); }
.home-foot a { font-weight: 700; }
@media (max-width: 520px) { .home-foot > span { display: none; } .home-foot { gap: var(--s2) var(--s5); font-size: 0.95rem; } }

/* Home: why it matters */
.why { margin-top: var(--s6); }
.why-photo { position: relative; margin: 0; border-radius: 20px; overflow: hidden; }
.why-photo img { display: block; width: 100%; height: 260px; object-fit: cover; object-position: center 60%; }
.why-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: var(--s5);
  background: linear-gradient(to top, rgb(8 19 15 / 0.85), rgb(8 19 15 / 0.15) 60%, transparent); }
.why-overlay .eyebrow { color: #a7f3d0; margin: 0 0 6px; }
.why-overlay h2 { color: #fff; font-size: 1.7rem; line-height: 1.15; font-weight: 900; margin: 0 0 var(--s4); }
.why-photo figcaption { position: absolute; right: 10px; bottom: 6px; font-size: 0.62rem; color: rgb(255 255 255 / 0.45); transition: color 150ms; }
.why-photo figcaption:hover, .why-photo figcaption:focus-within { color: rgb(255 255 255 / 0.9); }
.why-photo figcaption a { color: inherit; text-decoration-color: rgb(255 255 255 / 0.3); }
.why-facts { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s3); }
.why-facts li { display: flex; gap: var(--s3); align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: var(--s4); }
.why-facts li .art { flex: none; width: 40px; height: 40px; }
.why-facts li > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.why-facts strong { font-size: 1.02rem; line-height: 1.3; }

@media (min-width: 1024px) {
  /* Home: text and big illustrations side by side; steps as 4 numbered cards. */
  main.home { max-width: 1120px; }
  .home .hero-card { flex-direction: row; align-items: center; gap: var(--s6); padding: var(--s6) var(--s7); }
  .home .hero-text { flex: 1.2; }
  .home .hero { font-size: 3rem; }
  .home .hero-sub { font-size: 1.25rem; }
  .home .hero-art { flex: 1; justify-content: center; margin: 0; }
  .home .hero-art .art.xl { width: 190px; height: 190px; }
  .home .hero-art .art.lg { width: 130px; height: 130px; }
  .home .hero-art .art:not(.xl):not(.lg) { width: 96px; height: 96px; }
  .home .hero-actions { flex-direction: row; }
  .home .hero-actions > * { flex: none; width: auto; padding-left: var(--s6); padding-right: var(--s6); }
  .home .hero-actions .primary-btn.big { display: inline-flex; width: auto; min-height: 56px; }
  .home #mine .event-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s4); }
  .home .how-list { grid-template-columns: repeat(4, 1fr); }
  .home .how-list li { flex-direction: column; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: var(--s4); gap: var(--s2); }
  .why-photo img { height: 340px; }
  .why-overlay { padding: var(--s6) var(--s7); }
  .why-overlay h2 { font-size: 2.4rem; }
  .why-facts { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Accounts: sign-in sheet (auth-ui.js) ---------- */
.au-back { position: fixed; inset: 0; z-index: 60; background: rgb(15 21 19 / 0.5); display: flex; align-items: flex-end; justify-content: center; }
.au-sheet { background: var(--bg); width: 100%; max-width: 480px; max-height: 92dvh; overflow-y: auto; border-radius: 24px 24px 0 0; padding: var(--s5) var(--s5) var(--s6); box-shadow: 0 -10px 40px rgb(0 0 0 / 0.25); }
@media (min-width: 700px) { .au-back { align-items: center; } .au-sheet { border-radius: 24px; } }
.au-head { display: flex; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s4); }
.au-head .art { width: 48px; height: 48px; flex: none; }
.au-head h2 { margin: 0; font-size: 1.3rem; font-weight: 900; line-height: 1.15; }
.au-head p { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }
.au-close { margin-left: auto; background: transparent; border: 0; box-shadow: none; font-size: 1.5rem; line-height: 1; color: var(--muted); min-width: 44px; min-height: 44px; }
.au-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px; margin: 0 0 var(--s3); }
.au-tabs button { background: transparent; border: 0; box-shadow: none; border-radius: 10px; min-height: 42px; font-weight: 800; color: var(--muted); }
.au-tabs button.on { background: var(--accent); color: var(--accent-text); }
.au-sheet label { display: block; font-weight: 700; font-size: 0.92rem; margin: var(--s3) 0 6px; color: var(--text); }
.au-sheet input { width: 100%; min-height: 50px; border: 1.5px solid var(--border); border-radius: 12px; padding: 0 14px; font: inherit; font-size: 1.05rem; background: var(--surface); color: var(--text); }
.au-sheet .au-code-input { letter-spacing: 0.4em; font-size: 1.4rem; font-weight: 900; text-align: center; }
.au-sheet .hint { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0; }
.au-sheet .primary-btn { width: 100%; min-height: 54px; margin-top: var(--s4); display: flex; justify-content: center; align-items: center; font-size: 1.05rem; }
.au-error { color: var(--warn-text); background: var(--warn-bg); border-radius: 10px; padding: 8px 12px; margin: var(--s3) 0 0; font-size: 0.92rem; }
.au-demo { margin-top: var(--s4); padding: var(--s3) var(--s4); border-radius: 14px; background: var(--accent-soft); font-size: 0.9rem; }
.au-demo b { display: block; margin-bottom: 2px; }
.au-demo button, .au-link { background: transparent; border: 0; box-shadow: none; padding: 0; min-height: 0; color: var(--accent); font: inherit; font-weight: 800; text-decoration: underline; }
.au-demo button { margin-top: 6px; }
/* Small account control in page headers */
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.signin-link { background: transparent; border: 1.5px solid var(--accent); box-shadow: none; color: var(--accent); font-weight: 800; font-size: 0.85rem; border-radius: 99px; padding: 4px 12px; min-height: 32px; }
.acct-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); box-shadow: none; border-radius: 99px; padding: 3px 10px 3px 3px; min-height: 32px; font-weight: 800; font-size: 0.85rem; color: var(--text); }
.acct-chip i { width: 26px; height: 26px; border-radius: 99px; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 0.8rem; }
