:root {
  --black: #111111;
  --panel: #1b1b1b;
  --line: #2e2e2e;
  --gold: #C9A227;
  --gold-soft: rgba(201, 162, 39, .14);
  --white: #ffffff;
  --muted: #b5b5b5;
  --ok: #4caf7a;
  --warn: #e0a84a;
  --radius: 14px;
  --nav-h: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--black); color: var(--white); }
body {
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.45;
  min-height: 100vh; min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); }
button, input, select { font: inherit; }

.app { max-width: 520px; margin: 0 auto; padding: 0 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }

header.top {
  position: sticky; top: 0; z-index: 5;
  background: var(--black); border-bottom: 1px solid var(--line);
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
header.top img { height: 34px; width: auto; display: block; }
header.top .who { font-size: 12px; color: var(--muted); text-align: right; }
.demo-badge {
  background: var(--gold); color: var(--black); font-weight: 700; font-size: 11px;
  letter-spacing: .08em; text-align: center; padding: 4px 8px;
}

h1, h2, h3 { margin: 18px 0 8px; line-height: 1.2; }
h1 { font-size: 24px; color: var(--gold); letter-spacing: .02em; }
h2 { font-size: 19px; color: var(--gold); }
h3 { font-size: 16px; }
p.sub { color: var(--muted); margin: 0 0 14px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.card.gold { border-color: var(--gold); }

label.field { display: block; margin: 12px 0; font-weight: 600; font-size: 14px; }
label.field input, select {
  display: block; width: 100%; margin-top: 6px; padding: 14px; border-radius: 10px;
  border: 1px solid #444; background: #0a0a0a; color: var(--white); font-size: 17px;
}
input:focus, select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

.consent { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; font-size: 13px; color: #ddd; }
.consent input { width: 24px; height: 24px; flex: 0 0 24px; margin-top: 2px; accent-color: var(--gold); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 12px; border: 0;
  background: var(--gold); color: var(--black); font-weight: 700; font-size: 16px; letter-spacing: .03em;
  text-decoration: none; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--gold); border: 1.5px solid var(--gold); }
.btn.small { width: auto; min-height: 40px; font-size: 14px; padding: 8px 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.fine { font-size: 12px; color: var(--muted); }
.tbc { display: inline-block; background: var(--warn); color: #111; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; letter-spacing: .05em; vertical-align: middle; }

/* Order status tracker */
.order-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.order-head .num { font-weight: 800; font-size: 18px; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--gold-soft); color: var(--gold); white-space: nowrap; }
.pill.ready { background: var(--ok); color: #06190e; }
.steps { display: flex; margin: 16px 0 6px; }
.step { flex: 1; text-align: center; font-size: 11px; color: var(--muted); position: relative; }
.step .dot { width: 22px; height: 22px; margin: 0 auto 6px; border-radius: 50%; border: 2px solid #555; background: var(--black); position: relative; z-index: 1; }
.step::before { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: #555; }
.step:first-child::before { display: none; }
.step.done .dot { background: var(--gold); border-color: var(--gold); }
.step.done::before { background: var(--gold); }
.step.done { color: var(--white); }
.step.now .dot { box-shadow: 0 0 0 4px var(--gold-soft); }

/* Coupons */
.coupon { border: 2px solid var(--gold); border-radius: var(--radius); padding: 16px; margin: 12px 0; background: linear-gradient(135deg, #1b1b1b, #141414); }
.coupon .who { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.coupon .title { font-size: 21px; font-weight: 800; color: var(--gold); margin: 4px 0; }
.coupon .code { display: inline-block; margin-top: 8px; padding: 6px 12px; border: 1px solid var(--gold); border-radius: 6px; font-weight: 800; letter-spacing: .15em; }

/* Store */
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; }

/* Bottom nav */
nav.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: #0b0b0b; border-top: 1px solid var(--line);
  display: flex; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
}
nav.tabs .inner { display: flex; width: 100%; max-width: 520px; }
nav.tabs button {
  flex: 1; height: var(--nav-h); background: none; border: 0; color: var(--muted);
  font-size: 11px; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
}
nav.tabs button svg { width: 22px; height: 22px; }
nav.tabs button.active { color: var(--gold); }
nav.tabs button.soon { opacity: .45; }

.hidden { display: none !important; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--gold); color: var(--black); font-weight: 700; padding: 12px 18px; border-radius: 10px; z-index: 20; max-width: 90vw;
}
.install { display: flex; gap: 12px; align-items: center; }
.install img { width: 44px; height: 44px; border-radius: 10px; }

/* Staff page */
.staff table { width: 100%; border-collapse: collapse; font-size: 14px; }
.staff td, .staff th { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.staff .log { font-size: 13px; white-space: pre-wrap; }
.warnbox { background: #3a2a05; border: 1px solid var(--warn); color: #ffe2a8; border-radius: 10px; padding: 12px; font-size: 13px; margin: 12px 0; }
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand span { color: var(--gold); font-weight: 800; font-size: 22px; letter-spacing: .32em; }
.brand small { color: var(--white); font-size: 9.5px; font-weight: 600; letter-spacing: .2em; margin-top: 4px; }

/* ---- Staff sign-in (staff.html) - big PIN pad for a counter tablet ---- */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pinwrap { max-width: 420px; padding-top: 12px; padding-bottom: 32px; }
.pin-title { text-align: center; font-size: 30px; margin-top: 24px; }
.pin-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0 8px; min-height: 22px; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--gold); }
.pin-dots span.on { background: var(--gold); }
.pin-err { text-align: center; color: #ff8a80; font-weight: 700; min-height: 1.5em; margin: 6px 0 12px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pinpad button {
  min-height: 76px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--panel);
  color: var(--white); font-size: 30px; font-weight: 700; cursor: pointer; touch-action: manipulation;
}
.pinpad button:active { background: var(--gold); color: var(--black); border-color: var(--gold); }
.pinpad button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.pinpad .pk-alt { font-size: 18px; color: var(--gold); }
.pin-go { margin-top: 16px; min-height: 64px; font-size: 20px; }
#pinForm.shake { animation: pinshake .35s; }
@keyframes pinshake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { #pinForm.shake { animation: none; } }
header.top #logout { flex: 0 0 auto; }
.pinpad button[data-k="back"] { font-size: 28px; }
