/* Street Grind Rewards — black & white, one narrow phone column */
:root {
  --bg: #f4f4f4; --surface: #ffffff; --ink: #0a0a0a; --muted: #5f5f5f; --line: #d9d9d9;
  --card: #000000; --on-card: #ffffff; --btn: #0a0a0a; --on-btn: #ffffff; --soft: #ebebeb;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b; --surface: #161616; --ink: #f5f5f5; --muted: #a3a3a3; --line: #2e2e2e;
    --card: #000000; --on-card: #ffffff; --btn: #f5f5f5; --on-btn: #0a0a0a; --soft: #232323;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(40px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
.wrap { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.15; text-wrap: balance; }
h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0; }
.flush { margin: 0; }
.grow { flex: 1; min-width: 0; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo { display: block; background: var(--ink); -webkit-mask: url("logo.png") center / contain no-repeat; mask: url("logo.png") center / contain no-repeat; aspect-ratio: 640 / 277; max-width: 100%; }
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand .logo { width: 120px; }
.brand small { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
label { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }
input, select, textarea { font: 16px var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; -webkit-appearance: none; appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn { font: 600 15px var(--body); border: 0; border-radius: 10px; padding: 13px 16px; cursor: pointer; background: var(--btn); color: var(--on-btn); text-align: center; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; } .row > * { flex: 1 1 140px; min-width: 0; }
.muted { color: var(--muted); font-size: 13px; }
.note { font-size: 13px; background: var(--soft); border-radius: 10px; padding: 10px 12px; }
.err { font-size: 13px; font-weight: 700; border-left: 3px solid var(--ink); padding-left: 8px; }
.seg { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { flex: 1; border: 0; background: none; font: 600 14px var(--body); color: var(--muted); padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* member card */
.card { background: var(--card); color: var(--on-card); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; }
.card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; border: 26px solid #fff; opacity: .1; }
.card .logo { width: 140px; background: #fff; position: relative; z-index: 1; }
.card .who { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.card .name { font-family: var(--display); font-size: 22px; font-weight: 800; }
.pts { display: flex; align-items: baseline; gap: 8px; }
.pts b { font-family: var(--display); font-size: 52px; line-height: 1; font-variant-numeric: tabular-nums; }
.qrbox { background: #fff; border-radius: 14px; padding: 14px; align-self: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
#qr { width: 210px; height: 210px; }
#qr svg { width: 100%; height: 100%; display: block; }
.code { font-family: var(--mono); font-size: 12px; color: #000; letter-spacing: .06em; }

/* promos */
.ads { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.ad { flex: 0 0 85%; scroll-snap-align: start; border-radius: 14px; padding: 16px; background: var(--ink); color: var(--bg); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ads .ad:only-child { flex-basis: 100%; }
.ad .tag { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.ad h3 { font-size: 18px; }
.promo { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.promo:first-child { border-top: 0; padding-top: 0; }
.chip { font: 600 12px var(--body); padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--ink); white-space: nowrap; }
.chip.today { background: var(--ink); color: var(--bg); }
.list { display: flex; flex-direction: column; }
.li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.li:first-child { border-top: 0; }
.li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.li > span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.plus { color: var(--ink); } .minus { color: var(--muted); }

/* staff */
.found { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--soft); border-radius: 10px; padding: 12px; }
.found b { font-family: var(--display); font-size: 18px; }
.big { font-family: var(--display); font-size: 28px; font-variant-numeric: tabular-nums; }
#reader { width: 100%; border-radius: 12px; overflow: hidden; background: #000; }
#reader video { border-radius: 12px; }

.visit { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.visit-label { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.visit address { font-style: normal; font-weight: 600; }
.visit a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

.tip { display: flex; gap: 10px; align-items: flex-start; }
.tip p { flex: 1; }
.tip button { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 4px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); text-align: center; z-index: 20; }
@media (prefers-reduced-motion: no-preference) { .card { animation: rise .4s ease-out; } @keyframes rise { from { transform: translateY(8px); } to { transform: none; } } }
