/* See app/DESIGN.md for the reason behind each choice. */

:root {
  /* Black and yellow. Yellow is a fill only (buttons, highlights); it is too
     light for text on white, so text and icons use --accent-text instead. */
  --paper: #FFFFFF;
  --paper-2: #FAFAF7;      /* tickets and sheets */
  --ink: #141414;
  --ink-2: #3A3A3A;
  --ink-3: #5E5E5E;        /* 6.5:1 on white */
  --rule: #E6E6E6;
  --tile: #FFF1C2;         /* pale yellow tint */
  --stamp: #FFC83D;        /* yellow: button and highlight fill */
  --stamp-ink: #141414;    /* text on yellow, 11.9:1 */
  --accent-text: #141414;  /* accent used as text or line */
  --tab-fill: #FFC83D;
  --danger: #B3261E;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --sans: 'Archivo', system-ui, -apple-system, sans-serif;
  --r: 4px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tabs-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111111; --paper-2: #1A1A1A; --ink: #F4F4F0; --ink-2: #CFCFC8; --ink-3: #A0A098;
    --rule: #2B2B2B; --tile: #3A3115; --stamp: #FFC83D; --stamp-ink: #141414; --accent-text: #FFC83D;
    --tab-fill: #3A3115; --danger: #FF8A7A; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111111; --paper-2: #1A1A1A; --ink: #F4F4F0; --ink-2: #CFCFC8; --ink-3: #A0A098;
  --rule: #2B2B2B; --tile: #3A3115; --stamp: #FFC83D; --stamp-ink: #141414; --accent-text: #FFC83D;
  --tab-fill: #3A3115; --danger: #FF8A7A; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
h2 { font-size: 13px; font-weight: 600; color: var(--ink-3); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted { color: var(--ink-3); }

.app {
  max-width: 460px; margin: 0 auto; min-height: 100dvh;
  padding: calc(var(--safe-t) + 20px) 20px calc(var(--tabs-h) + var(--safe-b) + 32px);
}
.app.no-tabs { padding-bottom: calc(var(--safe-b) + 24px); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; min-height: 40px; margin-bottom: 28px; }
.brand-row { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.city-btn { display: inline-flex; align-items: center; gap: 2px; min-height: 30px; padding: 0 8px 0 10px; border-radius: 999px; background: var(--tile); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.city-caret { rotate: 90deg; color: var(--ink-2); }
.city-search { margin-top: 16px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--ink) 22%, var(--paper)); border-radius: var(--r); position: sticky; top: 0; z-index: 1; background: var(--paper-2); box-shadow: 0 -18px 0 var(--paper-2), 0 8px 0 var(--paper-2); }
.city-search input { min-height: 42px; }
.city-search .ic { flex: none; }
.city-rows [hidden] { display: none; }
.mark { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-stretch: 125%; font-size: 15px; letter-spacing: .02em; }
.mark .brand { color: var(--ink); }
.mark .brand .f { fill: var(--stamp); }
.mark .brand path:last-child { stroke: var(--ink); }
.avatar { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 500; color: var(--ink-2); }
.top-title { font-size: 15px; font-weight: 600; }

/* Ticket: used on Home and at the counter only */
.ticket { background: var(--paper-2); border-radius: var(--r); border: 1px solid var(--rule); position: relative; }
.ticket-body { padding: 22px 20px 20px; }
.ticket-stub {
  border-top: 1.5px dashed var(--rule); padding: 14px 20px 16px; position: relative;
  border-radius: 0 0 var(--r) var(--r);
}
.ticket-stub::before, .ticket-stub::after {
  content: ''; position: absolute; top: -9px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--rule);
}
.ticket-stub::before { left: -9px; clip-path: inset(0 0 0 50%); }
.ticket-stub::after { right: -9px; clip-path: inset(0 50% 0 0); }
.ticket-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.count { font-size: 72px; font-weight: 600; line-height: 1; margin-top: 18px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.count-label { font-size: 15px; color: var(--ink-2); margin-top: 6px; }
.stub-row { display: flex; gap: 10px; }
.stub-row .btn { flex: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 14px; border-radius: var(--r); font-weight: 600; font-size: 15px; white-space: nowrap;
}
.btn:disabled { opacity: .4; pointer-events: none; }
.btn-primary { background: var(--stamp); color: var(--stamp-ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-line { border: 1px solid var(--ink); }
.btn .ic { flex: none; }
.btn-text { color: var(--ink-2); min-height: 44px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.btn-block { width: 100%; }

/* Status line */
.status { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--ink-2); margin-top: 16px; }
.status .ic { flex: none; margin-top: 1px; color: var(--ink-3); }
.status.open { color: var(--ink); }
.status.open .ic { color: var(--accent-text); }

.section { margin-top: 40px; }
.section > h2 { margin-bottom: 8px; }
.summary { font-size: 15px; color: var(--ink-2); margin-top: 14px; }
.summary b { color: var(--ink); font-weight: 600; }

/* Rows */
.rows { border-top: 1px solid var(--rule); }
.row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--rule); width: 100%;
}
.row-title { font-weight: 600; }
.row-sub { font-size: 14px; color: var(--ink-3); grid-column: 1; }
.row-end { text-align: right; font-size: 15px; }
.row-end small { display: block; font-size: 13px; color: var(--ink-3); }
.row.off { opacity: .45; pointer-events: none; }
.chev { color: var(--ink-3); }
.row-tile { grid-template-columns: 44px 1fr auto auto; align-items: center; gap: 0 14px; }
.row-tile .row-title, .row-tile .row-sub { display: block; }
.row-tile .row-sub { margin-top: 1px; }
.row-tile .chev { margin-right: -4px; }
.row-menu { grid-template-columns: 1fr auto; align-items: center; padding: 11px 0; min-height: 48px; }
.row-menu .row-title { font-weight: 500; }
.menu-end { display: inline-flex; align-items: center; gap: 10px; }
.menu-price { font-size: 15px; color: var(--ink-2); min-width: 44px; text-align: right; }

/* Café tile: sand tint with the café's initials */
.tile {
  width: 44px; height: 44px; border-radius: var(--r); display: grid; place-items: center; flex: none;
  background: var(--tile); color: var(--ink);
  font-weight: 700; font-stretch: 112%; font-size: 15px; letter-spacing: .02em;
}
.tile-ink { background: var(--paper-2); color: var(--ink); border: 1px solid var(--rule); }

/* Café page */
.cafe-head { display: flex; align-items: center; gap: 14px; }
.cafe-head .tile { flex: none; width: 52px; height: 52px; font-size: 17px; }
.cafe-head .grow { flex: 1; min-width: 0; }
.dir-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; color: var(--ink); }
.dir-btn .ic { color: var(--ink); }
.cafe-head h1 { font-size: 24px; }
.cafe-head p { color: var(--ink-2); margin-top: 2px; font-size: 15px; }
.facts { font-size: 14px; color: var(--ink-3); margin-top: 10px; }
.tabs-cat { display: flex; gap: 20px; overflow-x: auto; margin: 28px -20px 0; padding: 0 20px; scrollbar-width: none; border-bottom: 1px solid var(--rule); }
.tabs-cat::-webkit-scrollbar { display: none; }
.tabs-cat button { flex: none; padding: 10px 0; font-size: 14px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs-cat button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.search { display: flex; align-items: center; gap: 10px; margin-top: 20px; border-bottom: 1px solid var(--rule); color: var(--ink-3); }
.search:focus-within { border-color: var(--ink); }
.search input { flex: 1; min-height: 44px; border: 0; background: none; outline: none; padding: 0; color: var(--ink); }
.menu-group { font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 24px 0 6px; border-bottom: 1px solid var(--rule); }
.menu .row { grid-template-columns: 1fr auto; }
.key { font-size: 13px; color: var(--ink-3); margin-top: 12px; }

/* Sheet */
.scrim { position: fixed; inset: 0; background: rgb(20 16 12 / .4); z-index: 40; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 460px; margin: 0 auto;
  background: var(--paper-2); border-top: 1px solid var(--rule); border-radius: 10px 10px 0 0;
  padding: 18px 20px calc(var(--safe-b) + 20px); max-height: 92dvh; overflow-y: auto;
  animation: up .25s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes up { from { transform: translateY(100%); } }
.sheet.sheet-short { max-height: 75dvh; }
.sheet-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet-top .x { width: 44px; height: 44px; display: grid; place-items: center; margin-right: -12px; color: var(--ink-2); }
.sheet h1 { font-size: 24px; }
.sheet .lede { color: var(--ink-2); margin-top: 6px; }
.sheet-actions { display: grid; gap: 8px; margin-top: 24px; }

.note { font-size: 14px; color: var(--ink-2); margin-top: 16px; padding-left: 12px; border-left: 2px solid var(--ink-3); }
.note.warn { border-color: var(--stamp); }
.facts-list { margin-top: 18px; border-top: 1px solid var(--rule); }
.facts-list p { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); font-size: 15px; }
.facts-list .ic { color: var(--ink); flex: none; }
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 20px; border-radius: var(--r); background: var(--ink); color: var(--paper); font-size: 15px; }
.banner span { flex: 1; }
.banner .ic { color: var(--stamp); }

/* Packs */
.packs { margin-top: 18px; border-top: 1px solid var(--rule); }
.pack { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--ink-3); display: grid; place-items: center; }
.pack[aria-checked="true"] .radio { border-color: var(--ink); }
.pack[aria-checked="true"] .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.pack b { font-weight: 600; display: block; }
.pack small { color: var(--ink-3); font-size: 14px; }
.pack .num { font-size: 18px; }
.upi { display: flex; gap: 20px; margin-top: 14px; font-size: 15px; }
.upi button { min-height: 44px; color: var(--ink-3); border-bottom: 2px solid transparent; }
.upi button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); font-weight: 600; }

/* Counter */
.counter { padding-top: 4px; }
.counter .ticket-body { text-align: center; padding: 28px 20px 24px; }
.counter-cafe { font-size: 14px; color: var(--ink-3); }
.counter-drink { font-size: 22px; font-weight: 600; margin-top: 4px; }
.code { font-family: var(--mono); font-size: 64px; font-weight: 500; letter-spacing: .08em; color: var(--accent-text); margin-top: 22px; line-height: 1; }
.clock { font-family: var(--mono); font-size: 15px; color: var(--ink-2); margin-top: 12px; }
.bar { height: 3px; background: var(--rule); margin: 20px auto 0; max-width: 220px; border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; }
.left { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.counter .ticket-stub { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; padding: 16px 20px 18px; }
.counter .ticket-stub > div:last-child:not(:first-child) { text-align: right; }
.counter .ticket-stub > div:nth-child(2):not(:last-child) { text-align: center; }
.counter .ticket-stub span { display: block; font-size: 13px; color: var(--ink-3); }
.counter .ticket-stub b { font-size: 22px; font-weight: 600; }
.counter .ticket-stub .b-small { font-size: 15px; font-weight: 500; display: block; margin-top: 6px; }
.counter-hint { font-size: 14px; color: var(--ink-3); text-align: center; margin-top: 14px; }
.stamp {
  display: inline-block; margin-top: 14px; rotate: -8deg;
  border: 3px solid var(--stamp-ink); color: var(--stamp-ink); background: var(--stamp); border-radius: 6px; padding: 4px 14px;
  font-weight: 800; font-stretch: 125%; font-size: 24px; letter-spacing: .06em;
  animation: stamp .35s cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes stamp { from { scale: 1.8; opacity: 0; } }
.saved-line { text-align: center; margin-top: 22px; font-size: 17px; }

/* Welcome */
.welcome { min-height: calc(100dvh - 44px); display: flex; flex-direction: column; }
.welcome h1 { font-size: 34px; margin-top: 8px; }
.welcome .lede { color: var(--ink-2); margin-top: 14px; font-size: 17px; }
.welcome .ticket { margin-top: 32px; }
.field { margin-top: 32px; }
.field label { font-size: 14px; color: var(--ink-2); }
.field input { width: 100%; min-height: 48px; border: 0; border-bottom: 1.5px solid var(--ink-3); background: none; outline: none; font-size: 18px; padding: 0; }
.field input:focus { border-color: var(--ink); }
.field textarea { width: 100%; border: 1.5px solid var(--ink-3); border-radius: var(--r); background: none; outline: none; font: inherit; font-size: 16px; padding: 10px 12px; color: var(--ink); resize: vertical; }
.field textarea:focus { border-color: var(--ink); }
/* Create an event */
.ev-form { margin-top: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ev-form input[type="date"], .ev-form input[type="time"] { font-size: 16px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.ev-form .err:empty { display: none; }
/* Email domain suggestions, shown after "@" */
.email-sugs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.email-sugs[hidden] { display: none; }
.email-sug { min-height: 36px; padding: 0 12px; border: 1px solid var(--rule); border-radius: var(--r); font-size: 14px; color: var(--ink); background: var(--paper); }
.email-sug:active { background: var(--tile); }
.email-sug .ic { vertical-align: -2px; color: var(--ink-2); }
/* Dropdown styled like the text fields: underline and a caret */
.select { position: relative; }
.select select {
  -webkit-appearance: none; appearance: none; width: 100%; min-height: 48px; border: 0; border-radius: 0;
  border-bottom: 1.5px solid var(--ink-3); background: none; outline: none; font: inherit; font-size: 18px;
  color: var(--ink); padding: 0 28px 0 0; cursor: pointer;
}
.select select:focus { border-color: var(--ink); }
.select select:invalid, .select select:has(option[value=""]:checked) { color: var(--ink-3); }
.select select[aria-invalid="true"] { border-color: var(--danger); }
.select-caret { position: absolute; right: 2px; top: 50%; translate: 0 -50%; rotate: 90deg; pointer-events: none; color: var(--ink-2); }
.select option { color: var(--ink); background: var(--paper); }
.welcome .actions { margin-top: auto; padding-top: 28px; display: grid; gap: 4px; }

/* Settings */
.seg { display: inline-flex; gap: 14px; }
.seg button { min-height: 32px; font-size: 14px; color: var(--ink-3); border-bottom: 2px solid transparent; }
.seg button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.switch { width: 44px; height: 26px; border-radius: 13px; background: var(--rule); position: relative; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper-2); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.setting .ic { flex: none; color: var(--ink-2); }
.setting .grow { flex: 1; text-align: left; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); width: 100%; min-height: 56px; }
.setting small { display: block; color: var(--ink-3); font-size: 14px; }
.setting.danger, .setting.danger .ic { color: var(--danger); font-weight: 600; }
.setting.danger small { color: var(--ink-3); font-weight: 400; }
.prose p { color: var(--ink-2); margin-top: 10px; }
.prose p b { color: var(--ink); font-weight: 600; }

.empty { padding: 40px 0; color: var(--ink-3); }
.empty b { display: block; color: var(--ink); font-weight: 600; font-size: 17px; margin-bottom: 4px; }

/* Bottom tabs */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--paper); border-top: 1px solid var(--rule);
  padding-bottom: var(--safe-b);
}
.tabs-in { max-width: 460px; margin: 0 auto; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: var(--tabs-h); }
.tab { display: grid; place-items: center; align-content: center; gap: 3px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
/* Five tabs on very narrow phones: shrink labels so "Community" fits */
@media (max-width: 359px) { .tab { font-size: 11px; } }
.tab .f { fill: none; }
.tab[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tab[aria-current="page"] .ic { color: var(--accent-text); }
.tab[aria-current="page"] .f { fill: var(--tab-fill); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-b) + var(--tabs-h) + 16px); translate: -50% 8px; z-index: 60;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r); font-size: 14px;
  opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100% - 40px); text-align: center;
}
.toast.show { opacity: 1; translate: -50% 0; }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Loading skeletons: flat grey blocks in the shape of the coming screen */
.sk { display: block; background: var(--sk); border-radius: var(--r); }
.sk-block { background: var(--sk); border-radius: var(--r); }
.sk-screen .sk, .sk-screen .sk-block { animation: sk-pulse 1.2s ease-in-out infinite alternate; }
@keyframes sk-pulse { from { opacity: 1; } to { opacity: .45; } }
.sk-line { height: 12px; }
.sk-sub { height: 10px; margin-top: 8px; }
.sk-h1 { display: block; width: 52%; height: 28px; background: var(--sk); border-radius: var(--r); }
.sk-tile { width: 44px; height: 44px; }
.sk-tile-lg { width: 52px; height: 52px; flex: none; }
.sk-avatar { width: 36px; height: 36px; border-radius: 50%; }
.sk-row { min-height: 48px; align-items: center; }
.sk-head { display: flex; gap: 14px; align-items: center; }
.sk-head > span:last-child { flex: 1; }
.sk-bar { display: flex; gap: 12px; margin: 22px 0 8px; }
.sk-pill { width: 40%; height: 40px; }
.sk-grow { flex: 1; }
.sk-tabs { margin: 28px 0 16px; gap: 24px; }
:root { --sk: color-mix(in srgb, var(--ink) 8%, var(--paper)); }

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

/* ---------- Onboarding ---------- */
.small { font-size: 14px; }
.center { text-align: center; }
.mt { margin-top: 18px; }
.mt-s { margin-top: 8px; }
.link { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.step { font-size: 14px; color: var(--ink-3); }
.lede { color: var(--ink-2); font-size: 16px; }

.intro { min-height: calc(100dvh - var(--safe-t) - 44px); display: flex; flex-direction: column; }
.intro-top { margin-bottom: 8px; }
/* Invite greeting on the welcome screen (opened from a friend's link) */
.invite { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin: 4px 0 4px; background: var(--tile); border-radius: var(--r); }
.invite-ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--stamp); color: var(--stamp-ink); }
.invite b { display: block; font-weight: 600; }
.invite small { display: block; font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -20px; flex: 1; }
.cards::-webkit-scrollbar { display: none; }
.cards:focus-visible { outline-offset: -2px; }
.card { flex: 0 0 100%; scroll-snap-align: start; padding: 0 20px; display: flex; flex-direction: column; }
.card-art { flex: 1; min-height: 260px; display: grid; place-items: center; padding: 20px 0 28px; }
.card h1 { font-size: 30px; }
.card .lede { margin-top: 10px; font-size: 17px; min-height: 3em; }
.art-ticket { width: 100%; max-width: 280px; }
.art-big { font-size: 44px; font-weight: 700; font-stretch: 112%; line-height: 1; margin-top: 18px; letter-spacing: -.02em; }
.dots { display: flex; gap: 8px; justify-content: center; margin: 24px 0 4px; }
.dots button { width: 8px; height: 8px; border-radius: 50%; background: var(--rule); padding: 0; position: relative; }
.dots button::after { content: ''; position: absolute; inset: -10px; }
.dots button[aria-selected="true"] { background: var(--ink); width: 22px; border-radius: 4px; transition: width .2s; }
.intro .actions { display: grid; gap: 8px; padding-top: 18px; padding-bottom: 4px; }

.art-ticket.gift { margin-top: 0; }
.art-gift-sub { margin-top: 6px; opacity: .8; }
/* Card 3: three numbered steps */
.steps-art { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 300px; display: grid; gap: 0; }
.steps-art li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.steps-art li:first-child { border-top: 1px solid var(--rule); }
.steps-art b { display: block; font-weight: 600; }
.steps-art small { display: block; font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.step-ic { position: relative; flex: none; width: 48px; height: 48px; display: grid; place-items: center; background: var(--tile); border-radius: var(--r); color: var(--ink); }
.step-n { position: absolute; top: -6px; left: -6px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 500; }
/* Forms */
.form { margin-top: 24px; display: grid; gap: 22px; }
.form .field { margin: 0; border: 0; padding: 0; min-width: 0; }
.form .field label, .form legend { display: block; font-size: 14px; color: var(--ink-2); padding: 0; margin-bottom: 4px; }
.form input:not([type=radio]) {
  width: 100%; min-height: 48px; border: 0; border-bottom: 1.5px solid var(--ink-3); background: none; outline: none;
  font-size: 18px; padding: 0; border-radius: 0;
}
.form input:not([type=radio]):focus { border-color: var(--ink); }
.form input[aria-invalid="true"] { border-color: var(--danger); }
.form input.short { max-width: 120px; }
.prefix { display: flex; align-items: center; gap: 10px; border-bottom: 1.5px solid var(--ink-3); }
.prefix:focus-within { border-color: var(--ink); }
.prefix:has([aria-invalid="true"]) { border-color: var(--danger); }
.prefix span { font-size: 18px; color: var(--ink-2); font-family: var(--mono); }
.prefix input { border: 0 !important; }
.err { color: var(--danger); font-size: 14px; margin-top: 6px; min-height: 0; }
.err:empty { display: none; }
.form-err { margin-top: -8px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.choice span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--rule); border-radius: var(--r); font-size: 15px; color: var(--ink-2); cursor: pointer; }
.choice input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.choice input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.code-input { font-size: 30px !important; letter-spacing: .4em; }
.resend { display: flex; justify-content: space-between; margin-top: 12px; }
.resend .btn-text:disabled { text-decoration: none; opacity: .7; }
.testbox { margin-top: 32px; padding: 14px; border: 1px dashed var(--rule); border-radius: var(--r); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); }
.testbox .btn { min-height: 40px; flex: none; }
.form + .sheet-actions, .packs + .sheet-actions { margin-top: 24px; }

/* Netlify injects a "Powered by Netlify" badge on free sites as an iframe with
   one of these ids. It covers the bottom of the screen on phones, so hide it. */
#nl-badge-frame, #nl-hud-frame { display: none !important; }

/* Home */
.nudge {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%;
  margin-top: 14px; padding: 14px 16px; border-radius: var(--r); background: var(--tile); text-align: left;
}
.nudge b { display: block; font-weight: 600; }
.nudge small { display: block; font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.nudge-cta { flex: none; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.see-all { font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.empty-line { display: flex; align-items: center; gap: 12px; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--ink-3); font-size: 15px; }
.empty-line .ic { flex: none; }
.is-open { color: var(--ink); font-weight: 600; }

/* Welcome gift: the one yellow ticket */
.ticket.gift { margin-top: 14px; background: var(--stamp); border-color: var(--stamp); color: var(--stamp-ink); }
.ticket.gift .ticket-head, .ticket.gift .count-label { color: var(--stamp-ink); opacity: .8; }
.ticket.gift .ticket-stub { border-top-color: rgb(0 0 0 / .25); }
.ticket.gift .ticket-stub::before, .ticket.gift .ticket-stub::after { border-color: var(--stamp); }
.ticket.gift .btn-ink { background: var(--stamp-ink); color: var(--stamp); }
.gift-big { font-size: 48px; font-weight: 700; font-stretch: 112%; line-height: 1; margin-top: 14px; letter-spacing: -.02em; }
.gift-chip { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: var(--r); background: var(--stamp); color: var(--stamp-ink); }
.gift-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: var(--r); background: var(--tile); font-size: 14px; }
.gift-note .ic { flex: none; margin-top: 1px; }
.choose-label { font-size: 14px; color: var(--ink-2); margin-top: 18px; }
.packs.choose { margin-top: 6px; }

/* My vouchers */
.vlist { margin-top: 8px; }
.vbadge {
  width: 44px; height: 44px; border-radius: var(--r); display: grid; place-items: center; flex: none;
  border: 1.5px dashed var(--ink-3); font-family: var(--mono); font-size: 13px; font-weight: 500;
}
.vbadge.is-gift { background: var(--stamp); color: var(--stamp-ink); border-color: var(--stamp); }
.row-end small + small { margin-top: 1px; }
.is-soon { color: var(--danger) !important; font-weight: 600; }
.is-dim { opacity: .6; }
.tabs-cat button .num { color: var(--ink-3); font-size: 13px; margin-left: 2px; }

/* Custom pack slider */
.custom { padding: 16px 0 6px; border-bottom: 1px solid var(--rule); }
.custom-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.custom-top b { font-size: 22px; font-weight: 700; }
.custom-top .num { font-size: 15px; color: var(--ink-2); }
.custom input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: none; margin: 6px 0 0; cursor: pointer;
}
.custom input[type=range]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--ink) var(--fill, 0%), var(--rule) var(--fill, 0%));
}
.custom input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--rule); }
.custom input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--ink); }
.custom input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; margin-top: -11px;
  background: var(--stamp); border: 2px solid var(--stamp-ink);
}
.custom input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--stamp); border: 2px solid var(--stamp-ink); }
.custom-scale { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-3); font-family: var(--mono); margin-top: -4px; }
.custom-rates { font-size: 13px; color: var(--ink-3); margin-top: 10px; }
.custom-hint { font-size: 14px; margin-top: 10px; padding: 10px 12px; background: var(--tile); border-radius: var(--r); }
.custom-hint .link { font: inherit; }
.custom-days { font-size: 14px; color: var(--ink-2); margin-top: 2px; }

/* Café menu: sticky search and category jump bar */
.menu-bar {
  position: sticky; top: 0; z-index: 5; background: var(--paper); margin: 16px -20px 0;
  padding: calc(var(--safe-t) + 8px) 20px 8px; display: flex; gap: 12px; align-items: center;
  border-bottom: 1px solid var(--rule);
}
.menu-bar .search {
  margin-top: 0; flex: 1; min-width: 0; padding: 0 10px; gap: 8px;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, var(--paper)); border-radius: var(--r); color: var(--ink-2);
}
.menu-bar .search:focus-within { border-color: var(--ink); }
.menu-bar .search input { min-height: 38px; min-width: 0; }
.search .ic { flex: none; }
.cat-pick { position: relative; flex: none; max-width: 52%; }
.cat-pick select {
  -webkit-appearance: none; appearance: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink);
  background: var(--tile); border: 0; border-radius: var(--r); min-height: 40px; padding: 0 34px 0 12px;
  max-width: 100%; text-overflow: ellipsis; cursor: pointer;
}
.cat-pick select:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.cat-caret { position: absolute; right: 10px; top: 50%; translate: 0 -50%; rotate: 90deg; pointer-events: none; color: var(--ink); }
.menu-sec { scroll-margin-top: 70px; }
.menu-sec .menu-group { padding-top: 20px; }

/* Waiting for café approval */
.counter-off { font-size: 44px; font-weight: 700; font-stretch: 112%; line-height: 1; margin-top: 16px; letter-spacing: -.02em; }
.waiting { margin-top: 18px; }
.waiting p { font-size: 15px; }
.waiting .muted { font-size: 14px; margin-top: 4px; }
.pulse { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--stamp); margin: 0 auto 10px; animation: pulse-dot 1.4s ease-in-out infinite; }
@keyframes pulse-dot { 50% { transform: scale(1.6); opacity: .4; } }
.is-void .counter-drink, .is-void .ticket-stub b { opacity: .4; text-decoration: line-through; }
.cafe-side { margin-top: 20px; padding: 14px; border: 1.5px dashed var(--rule); border-radius: var(--r); }
.cafe-side-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.req-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

/* Refer a friend */
.refer-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  margin-top: 14px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper-2);
}
.refer-card .ic:first-child { color: var(--ink); }
.refer-card b { display: block; font-weight: 600; }
.refer-card small { display: block; font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.refer-ticket { margin-top: 22px; }
.refer-code { font-size: 38px; font-weight: 500; letter-spacing: .08em; margin-top: 12px; }
.btn-small { min-height: 36px; padding: 0 10px; font-size: 13px; }
.form input.short-wide { max-width: 220px; text-transform: uppercase; letter-spacing: .06em; }
.ic.flip { rotate: 180deg; }
.nudge .ic { flex: none; }
.nudge .grow { flex: 1; }

/* Done button that fills up before going Home on its own */
.btn-timer { position: relative; overflow: hidden; isolation: isolate; }
.btn-timer::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, currentColor 28%, transparent);
  transform-origin: left; transform: scaleX(0); animation: fill-up var(--timer, 3000ms) linear forwards;
}
@keyframes fill-up { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .btn-timer::before { animation: none; transform: scaleX(1); opacity: .35; } }

/* Terms */
.terms-sec { margin-top: 28px; }
/* Sign-up step 2: terms with a slide-to-agree bar pinned to the bottom */
.agree-terms { padding-bottom: 120px; }
.agree-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 12px 20px calc(var(--safe-b) + 16px); background: var(--paper);
  border-top: 1px solid var(--rule);
}
.agree-bar > * { max-width: 520px; margin-left: auto; margin-right: auto; }
.agree-bar .err:empty { display: none; }
.slide {
  --x: 0px; position: relative; height: 60px; border-radius: 999px; background: var(--tile);
  overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
}
.slide-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--x) + 56px); background: var(--stamp); border-radius: 999px; }
.slide-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; color: var(--ink); padding-left: 40px; pointer-events: none;
}
.slide-knob {
  position: absolute; top: 4px; left: 4px; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--paper);
  transform: translateX(var(--x)); cursor: grab; touch-action: none;
}
.slide-knob:active { cursor: grabbing; }
.slide.snap .slide-knob, .slide.snap .slide-fill { transition: transform .25s ease, width .25s ease; }
.slide.is-done .slide-text { padding-left: 0; padding-right: 56px; color: var(--stamp-ink); }
.slide.nudge .slide-knob { animation: knob-nudge .5s ease; }
.agree-hint { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.agree-hint[hidden] { display: none; }
.agree-hint .down { rotate: 90deg; }
.slide.is-locked { background: color-mix(in srgb, var(--ink) 8%, var(--paper)); }
.slide.is-locked .slide-fill { display: none; }
.slide.is-locked .slide-text { color: var(--ink-3); font-weight: 500; }
.slide.is-locked .slide-knob { background: color-mix(in srgb, var(--ink) 25%, var(--paper)); cursor: not-allowed; }
@keyframes knob-nudge { 30% { transform: translateX(18px); } 60% { transform: translateX(0); } 80% { transform: translateX(6px); } }
.terms-sec h2 { font-size: 15px; color: var(--ink); font-weight: 600; margin-bottom: 8px; }
.terms-sec ol { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 15px; }
.terms-sec li { margin-top: 6px; padding-left: 2px; }

/* Your data */
/* On/off switch (Admin) */
.switch { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 18%, var(--paper)); transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.setting .tile { width: 36px; height: 36px; font-size: 12px; }
/* Community */
.c-head { font-size: 15px; font-weight: 600; margin: 24px 0 8px; }
.top-cafe { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px; background: var(--tile); border-radius: var(--r); }
.top-cafe .grow { flex: 1; }
.top-cafe small { display: block; font-size: 13px; color: var(--ink-2); }
.top-cafe b { display: block; font-size: 17px; font-weight: 600; margin-top: 1px; }
.top-cafe .tile { background: var(--paper); }
.rank { width: 44px; height: 44px; display: grid; place-items: center; font-size: 18px; font-weight: 500; color: var(--ink); border: 1px solid var(--rule); border-radius: var(--r); }
.row-tile:first-child .rank { background: var(--stamp); border-color: var(--stamp); color: var(--stamp-ink); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 16px -20px 0; padding: 0 20px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 999px; font-size: 14px; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.posts { display: grid; gap: 12px; margin-top: 16px; }
.filter-bar { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 15px; font-weight: 600; }
.filter-bar .grow { flex: 1; }
.filter-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px 0 14px; border-radius: 999px; background: var(--tile); color: var(--ink); font-size: 14px; font-weight: 600; }
.filter-pill .ic { color: var(--ink-2); }
.icon-btn { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: var(--r); color: var(--ink); }
.create-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600; }
.icon-btn.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
/* Updates: a plain feed separated by rules, like the rest of the app */
.feed { margin-top: 12px; }
.update { padding: 18px 0 20px; border-bottom: 1px solid var(--rule); }
.update-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.update-meta .tile { width: 28px; height: 28px; font-size: 10px; }
.update-meta b { font-weight: 600; }
.update-when { margin-left: auto; color: var(--ink-3); font-size: 13px; }
.update-tag { margin-top: 14px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.update-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--stamp); }
.update h3 { font-size: 18px; font-weight: 600; margin-top: 4px; line-height: 1.3; }
.update-text { color: var(--ink-2); font-size: 15px; margin-top: 6px; }
.post { border: 1px solid var(--rule); border-radius: var(--r); padding: 16px; }
.post-head { display: flex; align-items: center; gap: 12px; }
.post-head .tile { width: 36px; height: 36px; font-size: 12px; }
.post-head b { display: block; font-weight: 600; font-size: 15px; }
.post-head small { display: block; font-size: 13px; color: var(--ink-3); }
.tag { flex: none; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: var(--r); background: var(--tile); color: var(--ink); }
.post h3 { font-size: 17px; font-weight: 600; margin-top: 14px; }
.post p { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.post-link { display: inline-block; margin-top: 10px; font-size: 15px; }
/* Events: plain rows, date column on the left, small action on the right */
.ev { display: grid; grid-template-columns: 40px 1fr auto; gap: 0 14px; align-items: start; padding: 16px 0 18px; border-bottom: 1px solid var(--rule); cursor: pointer; }
.ev-date { text-align: center; padding-top: 2px; }
.ev-date b { display: block; font-size: 22px; font-weight: 500; line-height: 1; }
.ev-date small { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin-top: 4px; }
.ev-main { min-width: 0; }
.ev-main h3 { font-size: 17px; font-weight: 600; line-height: 1.25; }
.ev-main small { display: block; font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.ev-main p { font-size: 15px; color: var(--ink-2); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-main .ev-count { margin-top: 6px; }
.pill-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--stamp); color: var(--stamp-ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill-btn.is-going { background: none; border: 1px solid var(--ink); color: var(--ink); }
.ev-full { margin-top: 16px; color: var(--ink-2); }
.ev-main .ev-fee { margin-top: 6px; font-weight: 600; color: var(--ink-2); }
/* one event's page */
.ev-head { display: flex; gap: 16px; align-items: flex-start; }
.ev-date-lg { width: 52px; flex: none; border: 1px solid var(--rule); border-radius: var(--r); padding: 8px 0; }
.ev-date-lg b { font-size: 26px; }
.ev-head h1 { margin: 0; }
.ev-when { color: var(--ink-2); margin-top: 6px; }
.ev-sub { display: flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--ink-3); font-size: 14px; }
.ev-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.ev-in { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ev-about { color: var(--ink-2); white-space: pre-line; }
.ev-fee-pick { margin-top: 4px; }
/* organiser: guest list and check-in */
.ev-scan-btn { margin-top: 16px; }
.is-arrived { color: var(--ok, #3fa66a); font-weight: 600; }
.tile.tile-in { background: var(--ok, #3fa66a); color: #fff; }
.guests-bar { position: static; margin-top: 20px; padding: 0; }
.guests-bar .search { flex: 1; }
.guests-seg { margin-top: 12px; }
.scan-box { position: relative; margin-top: 20px; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: #000; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid var(--stamp); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }
.scan-msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; color: #fff; background: #111; font-size: 15px; }
.scan-msg[hidden] { display: none; }
.scan-result:empty { display: none; }
.scan-result { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--rule); }
.scan-result b { display: block; font-size: 17px; }
.scan-result small { display: block; color: var(--ink-2); margin-top: 2px; }
.scan-result.is-ok { background: rgba(63,166,106,.14); border-color: rgba(63,166,106,.5); }
.scan-result.is-ok .ic { color: #3fa66a; }
.scan-result.is-warn { background: rgba(255,200,61,.14); border-color: rgba(255,200,61,.55); }
.scan-result.is-bad { background: rgba(214,69,65,.12); border-color: rgba(214,69,65,.5); }
.scan-result.is-bad .ic { color: var(--danger); }
.code-entry { margin-top: 20px; }
.code-entry label { display: block; font-size: 14px; color: var(--ink-3); margin-bottom: 8px; }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; min-width: 0; font-size: 16px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--r); background: transparent; color: var(--ink); text-transform: uppercase; }
.ev-maps { display: grid; gap: 8px; margin-top: 12px; font-size: 15px; }
.event-top { display: flex; gap: 14px; align-items: center; }
.event-top h3 { margin-top: 0; }
.event-top small { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.date-block { flex: none; width: 52px; height: 56px; display: grid; place-items: center; align-content: center; border-radius: var(--r); background: var(--stamp); color: var(--stamp-ink); }
.date-block b { font-size: 22px; line-height: 1; font-weight: 500; }
.date-block small { font-size: 12px; font-weight: 600; text-transform: uppercase; margin-top: 2px; }
.event-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); }
/* Member card (long press the avatar) */
.member-card { margin-top: 8px; }
.mark-sm { font-size: 12px; gap: 6px; }
.mc-name { font-size: 26px; font-weight: 700; font-stretch: 112%; margin-top: 18px; line-height: 1.1; }
.mc-since { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.mc-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.mc-stat { flex: none; text-align: right; }
.mc-stat b { display: block; font-size: 34px; font-weight: 500; line-height: 1; }
.mc-stat small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.mc-stub { display: flex; align-items: center; gap: 16px; }
.mc-qr { flex: none; width: 76px; height: 76px; padding: 6px; background: #fff; border-radius: var(--r); }
.mc-qr svg { width: 100%; height: 100%; display: block; }
.mc-qr svg rect[fill="#ffffff"], .mc-qr svg path[fill="#ffffff"] { fill: #fff; }
.mc-stub small { display: block; font-size: 12px; color: var(--ink-3); }
.mc-stub b { display: block; font-size: 20px; font-weight: 500; letter-spacing: .04em; margin-top: 2px; }
.kv-list { margin-top: 16px; border-top: 1px solid var(--rule); }
button.row { text-align: left; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.kv span { color: var(--ink-3); flex: none; }
.kv b { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.ua { margin-top: 12px; font-size: 14px; color: var(--ink-3); }
.ua summary { cursor: pointer; min-height: 32px; }
.ua p { font-size: 12px; overflow-wrap: anywhere; margin-top: 6px; }

/* Distance to cafés */
.loc-ask { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 18px; padding: 13px 14px; border-radius: var(--r); background: var(--tile); font-weight: 600; text-align: left; }
.loc-ask .grow { flex: 1; }
.loc-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--ink-3); }
.loc-line span { flex: 1; }
.loc-line .link { font-size: 14px; }
.cafe-where { font-size: 14px; color: var(--ink-3) !important; margin-top: 4px !important; }

/* "You're at a café" on Home */
.here {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 12px 12px 14px;
  border-radius: var(--r); background: var(--ink); color: var(--paper);
}
.here > .ic { flex: none; color: var(--stamp); }
.here-btn .ic { color: var(--stamp-ink); }
.here .grow { flex: 1; min-width: 0; }
.here small { display: block; font-size: 13px; opacity: .75; }
.here b { display: block; font-weight: 600; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.here-btn { min-height: 40px; padding: 0 12px; font-size: 14px; flex: none; }

/* Café map */
.cafe-map {
  height: 240px; margin-top: 16px; border-radius: var(--r); border: 1px solid var(--rule); overflow: hidden;
  background: var(--paper-2); z-index: 0; position: relative;
}
.cafe-map.map-failed { display: grid; place-items: center; color: var(--ink-3); font-size: 14px; }
/* .leaflet-container in the selector so these beat Leaflet's own white background
   (its CSS loads later). The OpenStreetMap credit must stay readable in both themes. */
.cafe-map.leaflet-container .leaflet-control-attribution { font-size: 10px; background: color-mix(in srgb, var(--paper) 88%, transparent); color: var(--ink-2); }
.cafe-map.leaflet-container .leaflet-control-attribution a { color: var(--ink); }
.cafe-map .leaflet-control-zoom a { background: var(--paper); color: var(--ink); border-color: var(--rule); }
.cafe-map .leaflet-control-zoom a { width: 40px; height: 40px; line-height: 40px; font-size: 20px; }
.pin { background: none; border: 0; }
.pin-in { position: absolute; left: 0; top: 0; translate: -50% -100%; display: block; }
/* When two pins would overlap, they lean away from each other (tail stays on the café). */
.pin-in.lean-w { translate: calc(-100% + 14px) -100%; }
.pin-in.lean-w .pin-tail { margin: -1px 8px 0 auto; }
.pin-in.lean-e { translate: -14px -100%; }
.pin-in.lean-e .pin-tail { margin: -1px auto 0 8px; }
.pin-tile {
  display: grid; place-items: center; height: 34px; padding: 0 10px; white-space: nowrap; border-radius: var(--r);
  background: var(--stamp); color: var(--stamp-ink); border: 2px solid var(--stamp-ink);
  font: 700 13px var(--sans); letter-spacing: .01em; box-shadow: 0 2px 6px rgb(0 0 0 / .25);
}
.pin-tail { display: block; width: 0; height: 0; margin: -1px auto 0; border: 6px solid transparent; border-top: 8px solid var(--stamp-ink); }
.me-dot span { display: block; width: 18px; height: 18px; border-radius: 50%; background: #3B82F6; border: 3px solid #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .15), 0 1px 4px rgb(0 0 0 / .3); }
.cafe-map .leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.04); }
.cafe-map.is-dark .leaflet-tile-pane { filter: grayscale(1) invert(1) brightness(.85) contrast(.9); }

/* Saved drinks: coffee brown, the one place this colour is used */
:root { --fav: #6B4226; --fav-ink: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --fav: #C08A5B; --fav-ink: #1A120C; } }
:root[data-theme="dark"] { --fav: #C08A5B; --fav-ink: #1A120C; }
.ic.fav { color: var(--fav); flex: none; }
.ic.fav .cup-fill { fill: var(--fav); }
.ic.fav .cup-tick { stroke: var(--fav-ink); }
.sheet-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.sheet-sub .choose-label { margin-top: 0; }
.save-btn { gap: 6px; min-height: 36px; padding: 0 14px 0 12px; font-size: 14px; line-height: 1; }
/* The cup sits low in its box, so lift it to line up with the text. */
.save-btn .ic { translate: 0 -1.5px; }
.save-btn.is-on { border-color: var(--fav); color: var(--fav); }
.saved-sec .menu-group { display: flex; align-items: center; gap: 6px; color: var(--fav); }

/* Saved drinks on Home */
.favs { margin-top: 22px; }
.favs h2 { display: flex; align-items: center; gap: 6px; color: var(--fav); margin-bottom: 10px; }
.fav-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; scrollbar-width: none; }
.fav-chips::-webkit-scrollbar { display: none; }
.fav-chip {
  flex: none; display: block; min-width: 120px; max-width: 180px; padding: 10px 12px;
  border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--fav) 40%, var(--rule)); background: var(--paper-2);
}
.fav-chip b { display: block; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-chip small { display: block; font-size: 13px; color: var(--ink-3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favs .section-head { margin-bottom: 10px; }
.favs .section-head h2 { margin: 0; }
.saved-group { margin-top: 24px; }
.saved-cafe { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; }
.saved-cafe .grow { flex: 1; }
.saved-cafe b { display: block; font-weight: 600; }
.saved-cafe small { display: block; font-size: 13px; color: var(--ink-3); }

/* Compact welcome gift and slim refer row on Home */
.gift-strip {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px;
  border-radius: var(--r); background: var(--stamp); color: var(--stamp-ink);
}
.gift-strip .grow { flex: 1; min-width: 0; }
.gift-strip b { display: block; font-weight: 700; font-size: 16px; }
.gift-strip small { display: block; font-size: 13px; opacity: .8; }
.gift-strip .ic { flex: none; }
.refer-row {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 15px;
}
.refer-row .grow { flex: 1; }
.refer-row .ic:first-child { flex: none; }

/* Install help: Home card and the steps sheet */
.install-card { display: flex; align-items: center; margin-top: 14px; border: 1px solid var(--rule); border-radius: var(--r); }
.install-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 0 12px 14px; text-align: left; }
.install-open .ic { flex: none; }
.install-open .grow { flex: 1; min-width: 0; }
.install-open b { display: block; font-weight: 600; font-size: 15px; }
.install-open small { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.install-x { flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink-3); }
.install-lede { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.isteps { list-style: none; margin: 16px 0 0; padding: 0; }
.istep { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-top: 1px solid var(--rule); }
.istep:last-child { border-bottom: 1px solid var(--rule); }
.istep .grow { flex: 1; min-width: 0; }
.istep b { display: block; font-weight: 600; }
.istep small { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.istep-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 700; }
/* Little look-alikes of what the member will see on screen (iOS blue on purpose). */
.imock { flex: none; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.imock-key { width: 40px; height: 40px; justify-content: center; border-radius: 12px; background: var(--paper); border: 1px solid var(--rule); color: #0A84FF; }
.imock-row { padding: 8px 10px; border-radius: 10px; background: var(--paper); border: 1px solid var(--rule); white-space: nowrap; }
.imock-add { padding: 6px 0; color: #0A84FF; font-weight: 600; font-size: 15px; }
.imock-add.android { color: #1A73E8; }
.imock-wrap { display: flex; margin-top: 10px; }
.imock-key { width: 44px; height: 44px; }

/* Free vouchers from Coffee Club: Home strip, Admin forms, promo links */
.bonus-strip { background: var(--ink); color: var(--paper); }
.promo-invite { border-color: var(--stamp); }
.promo-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--tile); font-size: 14px; }
.promo-note .ic { flex: none; margin-top: 1px; }
.admin-sub { font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 20px 0 4px; }
.stepper { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.stepper .btn { width: 44px; min-height: 44px; padding: 0; font-size: 20px; }
.stepper input { width: 56px !important; text-align: center; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.opt { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); }
.opt[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 600; }
.pct-other { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pct-other input { width: 64px !important; }
.preview { margin-top: 20px; font-size: 14px; color: var(--ink-2); }
.status-pill { flex: none; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-3); }
.status-pill.is-live { background: var(--stamp); border-color: var(--stamp); color: var(--stamp-ink); }
.promo-link { margin-top: 14px; padding: 12px 14px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--rule); font-size: 14px; overflow-wrap: anywhere; }
.danger-text { color: var(--danger); }

/* Rate a drink */
.stars { position: relative; display: inline-block; font-size: 16px; line-height: 1; letter-spacing: 2px; color: var(--rule); white-space: nowrap; }
.stars .on { position: absolute; inset: 0 auto 0 0; overflow: hidden; width: calc(var(--v) / 5 * 100%); color: var(--stamp); }
.stars.big { font-size: 26px; letter-spacing: 3px; }
.rate-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rate-top b { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rate.custom { border-bottom: 0; }
.kv .stars { font-size: 14px; letter-spacing: 1px; margin-right: 4px; vertical-align: -1px; }
.rate-card { display: flex; align-items: center; margin-top: 14px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper-2); }
.rate-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 0 12px 14px; text-align: left; }
.rate-open .grow { flex: 1; min-width: 0; }
.rate-open b { display: block; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rate-open small { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }

/* Drink sheet: what they pay with each voucher */
.opt-pay { font-size: 16px; font-weight: 600; white-space: nowrap; }
.pay-line b { font-size: 17px; font-weight: 700; }
.pay-line s { margin-left: 6px; color: var(--ink-3); font-size: 14px; }
.setting[hidden] { display: none; }
.guest-tap { cursor: pointer; }
.scan-result .grow { flex: 1; }
/* community Home */
.hello { margin-top: 8px; }
.next-ev { margin-top: 20px; padding: 16px; border: 1px solid var(--rule); border-radius: var(--r); }
.next-label { font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.next-main { display: flex; align-items: center; gap: 14px; margin: 12px 0 16px; }
.next-main b { display: block; font-size: 19px; font-weight: 600; line-height: 1.25; }
.next-main small { display: block; color: var(--ink-2); margin-top: 4px; }
.next-ev .btn-text { margin-top: 4px; }
.next-empty { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 16px; border: 1px solid var(--rule); border-radius: var(--r); }
.next-empty b { display: block; }
.next-empty small { display: block; color: var(--ink-3); font-size: 14px; }
.ev.ev-link { color: inherit; }
/* My events tickets */
.tickets { display: grid; gap: 14px; }
.ev-ticket .ticket-body { display: block; color: inherit; padding: 18px 18px 16px; }
.evt-title { font-size: 22px; font-weight: 600; line-height: 1.2; margin-top: 10px; }
.evt-line { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.ticket.gift .evt-line { color: var(--stamp-ink); opacity: .85; }
.evt-stub { display: grid; grid-template-columns: 1.3fr 1.2fr .6fr; gap: 10px; padding: 14px 18px; }
.evt-stub small { display: block; font-size: 12px; color: var(--ink-3); }
.ticket.gift .evt-stub small { color: var(--stamp-ink); opacity: .7; }
.evt-stub b { display: block; font-size: 15px; font-weight: 600; margin-top: 2px; }
.evt-stub > div:last-child { text-align: right; }
.evt-act { padding: 0 18px 18px; }
