/* Activa links site — 24 BLVD member design ("3B Ticket Hall Soft").
   Tokens are the Flutter BlvdTheme values (24blvd/app/lib/theme.dart) one to one.
   Mobile first; max width 480 px centred on desktop; light + dark. */

:root {
  --bg: #F7F5EF; --card: #FFFFFE; --border: #E5DFD3; --hair: #EDEAE2; --perf: #D8C7B2; --ring: #C9B99F;
  --text: #413739; --text2: #5C4F52; --text3: #6B5E60; --muted: #9A9186; --sageDeep: #66753F; --sage: #7E8F58;
  --pBg: #413739; --pFg: #FDFAF3; --shadow: rgba(65, 55, 57, .10); --danger: #AA6666; --skel: #EDE8DD;
  /* shared in both modes */
  --sageFill: #6B7A44; --punch: #94A46B; --cream: #FDFAF3; --qrInk: #241D1F; --qrSagePale: #D6E0BC;
  --splashTop: #9AAA72; --splashBottom: #7E8F58;
  --archivo: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --hk: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bodoni: 'Bodoni Moda', Didot, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1B1718; --card: #262122; --border: #3A3335; --hair: #332D2F; --perf: #4A4144; --ring: #5A5054;
    --text: #F1ECE3; --text2: #D8D0C6; --text3: #C9C0B6; --muted: #948B82; --sageDeep: #AEBE85; --sage: #AEBE85;
    --pBg: #F1ECE3; --pFg: #1B1718; --shadow: rgba(0, 0, 0, .45); --danger: #D98B8B; --skel: #302A2C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1B1718; --card: #262122; --border: #3A3335; --hair: #332D2F; --perf: #4A4144; --ring: #5A5054;
  --text: #F1ECE3; --text2: #D8D0C6; --text3: #C9C0B6; --muted: #948B82; --sageDeep: #AEBE85; --sage: #AEBE85;
  --pBg: #F1ECE3; --pFg: #1B1718; --shadow: rgba(0, 0, 0, .45); --danger: #D98B8B; --skel: #302A2C;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  min-height: 100vh; min-height: 100dvh; overflow-x: hidden;
  background: var(--bg); color: var(--text);
  font-family: var(--archivo); font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.g { flex: none; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 359px) { .wrap { padding: 0 16px; } }

/* ---------- type ---------- */
.hk { font-family: var(--hk); letter-spacing: .05em; }
.lbl { font-family: var(--hk); letter-spacing: .05em; font-size: 10.5px; font-weight: 600; color: var(--sageDeep); }
.muted { color: var(--muted); }
.hd { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 18px; }
.hd .hk { font-size: 10.5px; }
.greet { font-weight: 800; font-size: 30px; line-height: 1.06; letter-spacing: -.3px; color: var(--text); margin-top: 14px; overflow-wrap: anywhere; }
.greet span { color: var(--sage); }
.tagline { display: flex; gap: 8px; align-items: center; margin-top: 9px; font-size: 13px; font-weight: 500; color: var(--text2); line-height: 1.35; }
.pd { width: 6px; height: 6px; border-radius: 50%; background: var(--punch); flex: none; }

/* ---------- ticket card (3B notches) ---------- */
.ticket {
  position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 12px 32px var(--shadow);
}
.notch { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); }
.notch.l { left: -9px; } .notch.r { right: -9px; }
.tk-info { padding: 16px 18px 15px; }
.tk-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-row .hk { font-size: 10px; }
.tk-name { font-weight: 700; font-size: 18px; line-height: 1.18; color: var(--text); margin-top: 10px; overflow-wrap: anywhere; }
.tk-sub { font-family: var(--hk); letter-spacing: .05em; font-size: 10.5px; color: var(--muted); margin-top: 6px; }
.perf-h { position: relative; height: 1.5px; margin: 0 14px; background-image: linear-gradient(to right, var(--perf) 50%, transparent 50%); background-size: 8px 1.5px; }
.perf-h .notch { top: -8px; }
.perf-h .notch.l { left: -24px; } .perf-h .notch.r { right: -24px; }
.tk-foot { position: relative; display: flex; gap: 10px; padding: 12px 16px 14px; border-top: 1px solid var(--hair); }
.tk-foot .notch { top: -8px; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-family: var(--hk); font-size: 9.5px; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.chip.on { background: var(--sageFill); color: #fff; }
.chip.line { border: 1px solid var(--perf); color: var(--sageDeep); }
.chip.bad { border: 1px solid var(--danger); color: var(--danger); }
.chip.dim { border: 1px solid var(--perf); color: var(--muted); }
.soon { display: inline-block; font-family: var(--hk); font-size: 8.5px; font-weight: 700; letter-spacing: .06em; border: 1px solid var(--perf); border-radius: 5px; padding: 1px 5px; color: var(--muted); white-space: nowrap; }

/* buttons */
.bt {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 46px; padding: 12px 16px; border-radius: 12px;
  font-family: var(--archivo); font-weight: 700; font-size: 14px; text-decoration: none; text-align: center;
  transition: transform .12s, opacity .2s;
}
.bt:active { transform: scale(.97); }
.bt.primary { background: var(--pBg); color: var(--pFg); }
.bt.ghost { border: 1px solid var(--perf); color: var(--text3); }
.bt.block { width: 100%; }

/* key / value rows */
.kvm { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; padding: 14px 18px 16px; border-top: 1px solid var(--hair); font-size: 13.5px; }
.kvm dt { font-family: var(--hk); letter-spacing: .05em; font-size: 10px; font-weight: 700; color: var(--sageDeep); align-self: center; }
.kvm dd { color: var(--text); font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.policy { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; font-family: var(--hk); font-size: 11px; letter-spacing: .02em; color: var(--muted); line-height: 1.5; }
.policy .g { margin-top: 1px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 16px; }
.card h2, .sechd { font-weight: 800; font-size: 16px; color: var(--text); line-height: 1.25; }
.card p { font-size: 13px; color: var(--text2); line-height: 1.5; margin-top: 5px; }
.card .bt { margin-top: 14px; }
.card > .bt:first-child { margin-top: 0; }
.sechd { margin: 26px 0 10px; }
.fine { font-family: var(--hk); font-size: 10.5px; letter-spacing: .03em; color: var(--muted); line-height: 1.55; margin-top: 10px; }

/* feature rows */
.rows { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; }
.row .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--punch) 18%, transparent); color: var(--sageDeep); }
.row b { display: block; font-size: 14px; font-weight: 700; color: var(--text); }
.row small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

/* numbered steps */
.steps { list-style: none; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 2px 16px; counter-reset: s; }
.steps li { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; counter-increment: s; }
.steps li + li { border-top: 1px solid var(--hair); }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--hk); letter-spacing: .05em; font-size: 12px; font-weight: 600; color: var(--sageDeep); flex: none; }
.steps b { font-size: 14px; font-weight: 700; color: var(--text); }
.steps small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }

.foot { padding: 30px 0 calc(34px + env(safe-area-inset-bottom)); text-align: center; font-family: var(--hk); font-size: 10px; letter-spacing: .06em; color: var(--muted); line-height: 1.8; }
.foot a { text-decoration: none; border-bottom: 1px solid var(--perf); }

/* backend marker (only when ?backend=local) */
.envtag { position: fixed; top: 10px; right: 10px; z-index: 50; font-family: var(--hk); font-size: 9px; font-weight: 700; letter-spacing: .08em; padding: 3px 8px; border-radius: 99px; background: var(--qrInk); color: var(--qrSagePale); box-shadow: 0 0 0 1px rgba(214, 224, 188, .35); }

/* entrance */
.rise { animation: rise .55s var(--ease) both; }
.rise.d1 { animation-delay: .06s; } .rise.d2 { animation-delay: .12s; } .rise.d3 { animation-delay: .18s; } .rise.d4 { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } .bt { transition: none; } }

/* ================= install page ================= */
.splash {
  position: relative; overflow: hidden; text-align: center; color: var(--cream);
  background: linear-gradient(172deg, var(--splashTop), var(--splashBottom));
  padding: calc(46px + env(safe-area-inset-top)) 20px 70px;
}
.splash::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 36%, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0)); pointer-events: none; }
.splash img { position: relative; display: block; width: 196px; max-width: 60%; height: auto; margin: 0 auto; }
.motto { position: relative; display: flex; justify-content: center; align-items: center; margin-top: 16px; font-family: var(--bodoni); font-weight: 800; font-size: 12.5px; letter-spacing: .14em; }
.motto i { width: 4px; height: 4px; border-radius: 50%; background: var(--cream); margin: 0 9px; }
.loc { position: relative; margin-top: 22px; font-family: var(--hk); font-size: 9.5px; letter-spacing: .06em; color: rgba(253, 250, 243, .62); }
.install { margin-top: -40px; }
.install .tk-info { padding: 18px 18px 16px; }
.install h1 { font-weight: 800; font-size: 27px; line-height: 1.08; letter-spacing: -.3px; color: var(--text); margin-top: 12px; }
.install h1 span { color: var(--sage); }
.install p.lead { font-size: 13.5px; color: var(--text2); line-height: 1.5; margin-top: 8px; }
.invite { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-family: var(--hk); font-size: 10.5px; font-weight: 600; letter-spacing: .05em; color: var(--sageDeep); }
.invite code { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--text); }
.stores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.store { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; color: var(--text3); cursor: default; }
.store .g { color: var(--muted); }
.store span { min-width: 0; }
.store small { display: block; font-family: var(--hk); font-size: 9px; letter-spacing: .05em; color: var(--muted); }
.store b { display: block; font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; }
.store .soon { margin-top: 4px; }

/* ================= guest pass ================= */
.pass { margin-top: 18px; }
.qr-stub { position: relative; display: flex; flex-direction: column; align-items: center; padding: 22px 16px 18px; }
.qrtile { position: relative; width: 100%; max-width: 256px; aspect-ratio: 1 / 1; background: var(--cream); border-radius: 20px; padding: 14px; box-shadow: 0 0 0 1px var(--border), 0 18px 40px -18px var(--shadow); }
.qrtile > svg { display: block; width: 100%; height: 100%; }
.qr-stub.off .qrtile > svg { opacity: .14; }
.qr-stamp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-8deg); display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 10px; border: 2px solid currentColor; font-family: var(--hk); font-size: 13px; font-weight: 800; letter-spacing: .1em; background: var(--cream); white-space: nowrap; }
.qr-stamp.ok { color: var(--sageFill); }
.qr-stamp.bad { color: #AA6666; }
.qr-stamp.dim { color: #7A7169; }
.code { margin-top: 14px; font-family: var(--mono); font-size: 18px; font-weight: 600; letter-spacing: .14em; color: var(--text); }
.qr-note { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-family: var(--hk); font-size: 10.5px; letter-spacing: .04em; color: var(--muted); }

.skel { background: var(--skel); border-radius: 8px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

.empty { text-align: left; }
.empty .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--punch) 18%, transparent); color: var(--sageDeep); margin-bottom: 12px; }
.empty .ic.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.codeform { display: grid; gap: 10px; margin-top: 14px; }
.codeform label { font-family: var(--hk); font-size: 10px; font-weight: 700; letter-spacing: .05em; color: var(--sageDeep); }
.codefield {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg);
  font-family: var(--mono); font-size: 17px; letter-spacing: .12em; text-transform: uppercase; color: var(--text);
}
.codefield::placeholder { color: var(--ring); }
.codefield:focus { outline: 2px solid var(--sage); outline-offset: 1px; }
.formerr { font-family: var(--hk); font-size: 11px; letter-spacing: .03em; color: var(--danger); }

/* utilities + skeleton (no inline styles: the CSP has no 'unsafe-inline') */
.mt12 { margin-top: 12px; } .mt14 { margin-top: 14px; } .mt18 { margin-top: 18px; }
.mono { font-family: var(--mono); letter-spacing: .08em; }
.card.join { margin-top: 22px; }
.card.empty { margin-top: 18px; }
.empty-t { font-weight: 800; font-size: 20px; line-height: 1.2; color: var(--text); }
.codeform.flush { margin-top: 0; }
.sk-card { padding: 18px; }
.sk-h1a { height: 30px; width: 72%; margin-top: 18px; }
.sk-h1b { height: 30px; width: 46%; margin-top: 8px; }
.sk-chip { height: 14px; width: 34%; }
.sk-title { height: 20px; width: 70%; margin-top: 14px; }
.sk-sub { height: 12px; width: 52%; margin-top: 10px; }
.sk-qr { aspect-ratio: 1 / 1; width: 100%; max-width: 256px; margin: 26px auto 8px; border-radius: 20px; }
