:root {
  --bg: #0C0E14; --card: #161A23; --line: #252B38; --text: #E9ECF2; --muted: #9AA1B5;
  --blue: #478FCD; --blue2: #1C75BC; --green: #3DBE8B; --red: #E5675F;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
a { color: var(--blue); }
.hidden { display: none !important; }
.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.brand b { color: var(--blue); }
.dot { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--blue2)); }
.area { color: var(--muted); font-size: 14px; }
.pad { padding: 16px; max-width: 560px; margin: 0 auto; }
.center { text-align: center; }
h1 { font-size: 26px; margin: 8px 0; }
h2 { font-size: 20px; margin: 4px 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--red); min-height: 1.2em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0; }
label { display: block; margin: 10px 0; font-size: 14px; color: var(--muted); }
input:not([type=checkbox]) { display: block; width: 100%; margin-top: 6px; padding: 12px; font-size: 16px; color: var(--text);
  background: #0F1219; border: 1px solid var(--line); border-radius: 10px; }
label.check { display: flex; gap: 10px; align-items: center; color: var(--text); }
label.check input { width: 20px; height: 20px; }
fieldset { border: 0; padding: 0; margin: 10px 0; }
legend { color: var(--muted); font-size: 14px; }
.btn { display: block; width: 100%; padding: 13px; margin-top: 12px; font-size: 16px; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, var(--blue), var(--blue2)); border: 0; border-radius: 12px; cursor: pointer; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.danger { background: transparent; border: 1px solid #4a2523; color: var(--red); }
.btn:disabled { opacity: .6; }
.search { margin: 4px 0 10px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.chip { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 14px; }
.chip.on { background: var(--blue2); border-color: var(--blue2); }
.shop { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 10px 0; cursor: pointer; }
.shop .ico { width: 48px; height: 48px; border-radius: 12px; background: #1E2430; display: grid; place-items: center; font-size: 24px; flex: none; overflow: hidden; }
.shop .ico img { width: 100%; height: 100%; object-fit: cover; }
.shop .info { flex: 1; min-width: 0; }
.shop .name { font-weight: 600; }
.shop .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pct { flex: none; background: rgba(61,190,139,.15); color: var(--green); font-weight: 700; padding: 6px 10px; border-radius: 10px; }
.biz { background: linear-gradient(135deg, #14243A, #161A23); border: 1px solid #23406a; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; cursor: pointer; font-size: 14px; }
.biz u { color: var(--blue); }
.detail img.hero { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; }
.detail .offer { font-size: 18px; color: var(--green); font-weight: 600; margin: 10px 0; }
.qrbox { background: #fff; padding: 14px; border-radius: 16px; width: min(78vw, 300px); margin: 10px auto; }
.qrbox svg { width: 100%; height: auto; display: block; }
.code6 { font-size: 34px; letter-spacing: 8px; font-weight: 700; margin: 6px 0; }
.total { display: flex; justify-content: space-between; align-items: center; }
.total b { font-size: 26px; color: var(--green); }
.row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #10131A; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.tabs button { flex: 1; background: none; border: 0; color: var(--muted); padding: 8px 0 10px; font-size: 12px; cursor: pointer; }
.tabs button span { display: block; font-size: 20px; }
.tabs button.on { color: var(--blue); }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); background: #222937; color: var(--text);
  padding: 12px 14px; border-radius: 12px; text-align: center; z-index: 10; }
