/* =========================================================================
   VENDING — premium vape kiosk design system
   Tokens are driven by data-* attributes on .kiosk (theme/accent/font/density/radius)
   ========================================================================= */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Hanken+Grotesk:wght@400;500;600;700;800&family=Sora:wght@400;500;600;700&family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700&family=Archivo:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* =========================================================================
   THEME TOKENS
   ========================================================================= */
.kiosk {
  /* dark (default) */
  --bg:        oklch(0.165 0.012 274);
  --bg-2:      oklch(0.205 0.014 274);
  --surface:   oklch(0.235 0.016 274);
  --surface-2: oklch(0.285 0.018 274);
  --border:    oklch(0.34 0.018 274);
  --border-2:  oklch(0.45 0.02 274);
  --text:      oklch(0.975 0.004 274);
  --text-dim:  oklch(0.74 0.012 274);
  --text-mute: oklch(0.56 0.014 274);

  /* accent — Plasma violet by default */
  --accent:    oklch(0.66 0.205 292);
  --accent-2:  oklch(0.74 0.18 292);
  --accent-ink: oklch(0.18 0.04 292);
  --on-accent: oklch(0.99 0 0);

  --good:  oklch(0.78 0.17 158);
  --warn:  oklch(0.82 0.16 78);
  --bad:   oklch(0.66 0.21 25);

  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 28px;
  --gap: 20px;
  --pad: 28px;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --shadow: 0 24px 60px -28px oklch(0 0 0 / 0.75);
  --glow: 0 0 0 1px color-mix(in oklch, var(--accent) 40%, transparent), 0 18px 50px -18px color-mix(in oklch, var(--accent) 55%, transparent);
}

/* ---- Light theme ---- */
.kiosk[data-theme="light"] {
  --bg:        oklch(0.965 0.006 274);
  --bg-2:      oklch(0.99 0.003 274);
  --surface:   oklch(1 0 0);
  --surface-2: oklch(0.955 0.008 274);
  --border:    oklch(0.89 0.01 274);
  --border-2:  oklch(0.82 0.012 274);
  --text:      oklch(0.22 0.02 274);
  --text-dim:  oklch(0.42 0.018 274);
  --text-mute: oklch(0.58 0.016 274);
  --accent-ink: oklch(0.97 0.02 292);
  --shadow: 0 24px 60px -30px oklch(0.4 0.02 274 / 0.35);
}

/* ---- Accent variants ---- */
.kiosk[data-accent="aqua"]    { --accent: oklch(0.74 0.14 200); --accent-2: oklch(0.82 0.12 200); --accent-ink: oklch(0.18 0.04 200); }
.kiosk[data-accent="voltage"] { --accent: oklch(0.86 0.20 128); --accent-2: oklch(0.90 0.17 128); --accent-ink: oklch(0.20 0.06 128); --on-accent: oklch(0.16 0.05 128); }
.kiosk[data-accent="ember"]   { --accent: oklch(0.72 0.18 52);  --accent-2: oklch(0.80 0.15 52);  --accent-ink: oklch(0.18 0.05 52); }
.kiosk[data-accent="magenta"] { --accent: oklch(0.66 0.24 358); --accent-2: oklch(0.74 0.20 358); --accent-ink: oklch(0.18 0.05 358); }
.kiosk[data-accent="plasma"]  { --accent: oklch(0.66 0.205 292); --accent-2: oklch(0.74 0.18 292); --accent-ink: oklch(0.18 0.04 292); }

/* ---- Font personalities ---- */
.kiosk[data-font="sora"]       { --font-display: 'Sora', sans-serif; }
.kiosk[data-font="bricolage"]  { --font-display: 'Bricolage Grotesque', sans-serif; }
.kiosk[data-font="archivo"]    { --font-display: 'Archivo', sans-serif; }

/* ---- Density ---- */
.kiosk[data-density="compact"] { --gap: 14px; --pad: 18px; }
.kiosk[data-density="comfy"]   { --gap: 26px; --pad: 38px; }

/* =========================================================================
   BASE
   ========================================================================= */
* { box-sizing: border-box; }
.kiosk {
  position: relative;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}
.kiosk h1, .kiosk h2, .kiosk h3, .kiosk .display {
  font-family: var(--font-display);
  margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.02;
}
.kiosk .mono { font-family: var(--font-mono); letter-spacing: 0; }
.kiosk button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.kiosk img { display: block; max-width: 100%; }

/* The fixed-size screen surface */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in oklch, var(--accent) 10%, transparent), transparent 55%),
    radial-gradient(100% 70% at 0% 100%, color-mix(in oklch, var(--accent) 7%, transparent), transparent 50%),
    var(--bg);
  overflow: hidden;
}

/* =========================================================================
   STATUS / TOP BAR
   ========================================================================= */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--bg) 80%, transparent);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; user-select: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  color: var(--on-accent);
  box-shadow: var(--glow);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; }
.brand-name .thin { color: var(--text-mute); font-weight: 400; }
.topbar-spacer { flex: 1; }

.statchip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-dim); font-weight: 500;
}
.statchip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.statchip.bad .dot { background: var(--bad); box-shadow: 0 0 8px var(--bad); }

.iconbtn {
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--text-dim);
  transition: .15s; font-size: 18px;
}
.iconbtn:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-2); }

/* wifi bars */
.wifi { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.wifi i { width: 3px; border-radius: 2px; background: var(--text-mute); display: block; }
.wifi i.on { background: var(--good); }
.wifi i:nth-child(1){ height: 5px; } .wifi i:nth-child(2){ height: 8px; }
.wifi i:nth-child(3){ height: 11px; } .wifi i:nth-child(4){ height: 15px; }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 60px; padding: 0 30px; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border-2);
  transition: transform .12s, filter .15s, background .15s;
  user-select: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent); border: none; box-shadow: var(--glow);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.lg { height: 72px; font-size: 21px; }
.btn:disabled { opacity: .4; pointer-events: none; }

/* =========================================================================
   CARDS / GENERIC
   ========================================================================= */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent-2); font-weight: 500;
}
.muted { color: var(--text-dim); }
.price { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }

/* image placeholder */
.imgph {
  position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, color-mix(in oklch, var(--text) 5%, transparent) 0 10px, transparent 10px 20px),
    var(--bg-2);
  display: grid; place-items: center;
}
.imgph span {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-mute);
  border: 1px dashed var(--border-2); padding: 5px 10px; border-radius: 8px;
  background: color-mix(in oklch, var(--bg) 60%, transparent);
}

/* =========================================================================
   ANIMATIONS
   ========================================================================= */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulseGlow { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes scanline { 0% { top: 6%; } 100% { top: 94%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes ledpulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--good) 70%, transparent); } 50% { box-shadow: 0 0 22px 4px color-mix(in oklch, var(--good) 70%, transparent); } }
.anim-up { animation: fadeUp .5s cubic-bezier(.2,.7,.3,1) both; }
.anim-in { animation: fadeIn .45s ease both; }

.spinner { width: 56px; height: 56px; border-radius: 50%; border: 4px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }

/* =========================================================================
   STANDBY
   ========================================================================= */
.standby { position: absolute; inset: 0; cursor: pointer; }
.standby .stage { position: absolute; inset: 0; }
.standby .hero-fallback { position: absolute; inset: 0; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, color-mix(in oklch, var(--text) 4%, transparent) 0 14px, transparent 14px 28px),
    radial-gradient(120% 90% at 70% 30%, color-mix(in oklch, var(--accent) 22%, transparent), transparent 60%),
    var(--bg-2);
  display: grid; place-items: center; }
.standby .hero-orb { position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--accent-2), var(--accent) 45%, transparent 72%);
  filter: blur(6px); opacity: .55; animation: floaty 6s ease-in-out infinite; }
.standby .hero-cap { position: relative; font-size: 12px; letter-spacing: .22em; color: var(--text-mute);
  border: 1px dashed var(--border-2); padding: 8px 16px; border-radius: 10px;
  background: color-mix(in oklch, var(--bg) 50%, transparent); }
.standby .hero-img { position: absolute; inset: 0; }
.ad-slide { position: absolute; inset: 0; transition: opacity .8s ease; }
.ad-slide .hero-fallback { position: absolute; inset: 0; }
.carousel-dots { position: absolute; top: 7%; left: 8%; display: flex; gap: 10px; z-index: 5; }
.carousel-dots .cdot { width: 34px; height: 5px; border-radius: 3px; background: color-mix(in oklch, var(--text) 28%, transparent); transition: .3s; }
.carousel-dots .cdot.on { background: var(--accent); width: 52px; box-shadow: 0 0 10px var(--accent); }
.standby .scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in oklch, var(--bg) 32%, transparent) 0%, transparent 16%, transparent 60%, color-mix(in oklch, var(--bg) 72%, transparent) 100%);
}
.standby .content {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 7% 8%;
  display: flex; flex-direction: column; gap: 22px;
}
.standby .kicker { display: flex; align-items: center; gap: 14px; }
.standby h1 { font-size: clamp(48px, 7vw, 96px); max-width: 16ch; }
.standby .tap {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-display); font-weight: 600; font-size: 22px;
  animation: pulseGlow 2.2s ease-in-out infinite;
}
.standby .tap .ring {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--accent); position: relative;
}
.standby .age-badge {
  position: absolute; top: 7%; right: 8%;
  display: flex; align-items: center; gap: 12px;
  border: 2px solid var(--accent); color: var(--text);
  border-radius: 999px; padding: 12px 22px;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  background: color-mix(in oklch, var(--bg) 55%, transparent);
  backdrop-filter: blur(4px);
}
.standby .age-ring {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid var(--accent); display: grid; place-items: center;
  font-size: 18px; font-weight: 800;
}
.lang-row { display: flex; gap: 10px; flex-wrap: wrap; }
.lang-pill {
  height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border-2); background: color-mix(in oklch, var(--bg) 50%, transparent);
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  color: var(--text-dim);
}

/* =========================================================================
   CATALOG
   ========================================================================= */
.body { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.cat-head { padding: 22px var(--pad) 6px; display: flex; align-items: flex-end; gap: 20px; }
.cat-head h2 { font-size: 30px; }
.tabs { display: flex; gap: 10px; padding: 14px var(--pad); overflow-x: auto; flex-shrink: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  height: 44px; padding: 0 20px; border-radius: 999px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border);
  font-weight: 600; font-size: 15px; color: var(--text-dim); transition: .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tab .count { font-family: var(--font-mono); font-size: 12px; opacity: .7; }

.grid {
  flex: 1; min-height: 0; overflow-y: auto;
  display: grid; gap: var(--gap);
  grid-auto-rows: max-content;
  padding: 6px var(--pad) var(--pad);
  align-content: start;
  scrollbar-width: none; -ms-overflow-style: none;
}
.grid::-webkit-scrollbar { display: none; width: 0; height: 0; }
.kiosk[data-orientation="landscape"] .grid { grid-template-columns: repeat(4, 1fr); }
.kiosk[data-orientation="portrait"]  .grid { grid-template-columns: repeat(3, 1fr); }

.prod {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: .18s; cursor: pointer;
  display: flex; flex-direction: column;
}
.prod.reveal { opacity: 0; transition: opacity .55s ease; }
.prod.reveal.reveal-in { opacity: 1; }
.prod.out.reveal.reveal-in { opacity: .55; }
.grid-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; pointer-events: none; z-index: 5;
  background: linear-gradient(to top, var(--bg) 8%, color-mix(in oklch, var(--bg) 60%, transparent) 55%, transparent);
  opacity: 1; transition: opacity .3s ease; }
.grid-fade.hide { opacity: 0; }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; z-index: 6;
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text-dim);
  font-family: var(--font-display); font-size: 13px; font-weight: 600; box-shadow: var(--shadow);
  animation: cueBounce 1.7s ease-in-out infinite; }
.scroll-cue:hover { color: var(--text); border-color: var(--accent); }
@keyframes cueBounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }
.prod:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.prod.sel { border-color: var(--accent); box-shadow: var(--glow); }
.prod .badge-sel { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center; box-shadow: var(--glow); z-index: 3; }
.prod .pic { position: relative; aspect-ratio: 1/1; width: 100%; flex-shrink: 0; display: grid; place-items: center; padding: 12px; background: var(--bg-2); }
.prod .pic .shot { position: relative; height: 100%; aspect-ratio: 400/800; max-width: calc(100% - 6px); border-radius: 10px; overflow: hidden; }
.prod .pic .shot .shot-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod .pic .shot .imgph { position: absolute; inset: 0; }
.prod .meta { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.prod .pname { font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.15; }
.prod .pflav { font-size: 13px; color: var(--text-dim); }
.prod .prow { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; padding-top: 8px; gap: 8px; }
.prod .price { font-size: 22px; }
.prod .lane { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
.prod .lanetag { position: absolute; top: 12px; left: 12px; font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  background: color-mix(in oklch, var(--bg) 70%, transparent); border: 1px solid var(--border-2); padding: 4px 8px; border-radius: 7px;
  backdrop-filter: blur(4px); color: var(--text-dim); z-index: 2; }
.prod .badge-status { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  color: var(--good); background: color-mix(in oklch, var(--good) 16%, transparent); border: 1px solid color-mix(in oklch, var(--good) 45%, transparent); z-index: 2; }
.prod .prices { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; line-height: 1.1; }
.prod .price-orig { font-size: 12px; color: var(--text-mute); text-decoration: line-through; white-space: nowrap; }
.prod .stock { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.prod .stock svg { opacity: .7; }
.prod .stock.low { color: var(--warn); }
.prod .nic { position: absolute; top: 12px; left: 12px; font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  background: color-mix(in oklch, var(--bg) 70%, transparent); border: 1px solid var(--border-2);
  padding: 4px 8px; border-radius: 7px; backdrop-filter: blur(4px); }
.prod.out { opacity: .55; pointer-events: none; }
.prod .badge-out, .prod .badge-lock {
  position: absolute; top: 12px; right: 12px; white-space: nowrap;
  font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; padding: 6px 11px; border-radius: 8px;
}
.prod .badge-out { background: var(--bad); color: white; }
.prod .badge-lock { background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border-2); }

/* selection / cart bar */
.cartbar {
  flex-shrink: 0; border-top: 1px solid var(--border);
  background: color-mix(in oklch, var(--bg-2) 92%, transparent);
  backdrop-filter: blur(10px);
  padding: 16px var(--pad); display: flex; align-items: center; gap: 18px;
  animation: fadeUp .3s ease both;
}
.cartbar .thumb { width: 44px; height: 72px; border-radius: 10px; flex-shrink: 0; position: relative; overflow: hidden; }
.cartbar .thumb .imgph, .cartbar .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cartbar .ci-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.cartbar .ci-sub { font-size: 13px; color: var(--text-dim); }

/* =========================================================================
   SLIDE-OVER / DETAIL & DIALOGS
   ========================================================================= */
.overlay { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center;
  background: color-mix(in oklch, oklch(0 0 0) 55%, transparent); backdrop-filter: blur(6px);
  animation: fadeIn .2s ease both; padding: 40px; }
.dialog { width: min(560px, 92%); background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); animation: fadeUp .25s ease both; overflow: hidden; }
.dialog .dhead { padding: 26px var(--pad) 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog .dbody { padding: 18px var(--pad) var(--pad); }
.dialog h3 { font-size: 24px; }

/* product detail sheet */
.sheet { position: absolute; inset: 0; z-index: 60; display: flex; animation: fadeIn .2s ease both; }
.sheet .sscrim { position: absolute; inset: 0; background: color-mix(in oklch, oklch(0 0 0) 50%, transparent); backdrop-filter: blur(4px); }
.sheet .spanel { position: relative; margin-left: auto; height: 100%; width: min(560px, 80%);
  background: var(--bg-2); border-left: 1px solid var(--border-2); box-shadow: var(--shadow);
  display: flex; flex-direction: column; animation: slideIn .3s cubic-bezier(.2,.7,.3,1) both; }
@keyframes slideIn { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* =========================================================================
   AGE VERIFICATION
   ========================================================================= */
.center-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--pad); gap: 18px; text-align: center; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.center-wrap::-webkit-scrollbar { display: none; width: 0; }
.center-wrap .big-icon { width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border-2); font-size: 44px; box-shadow: var(--shadow); }
.center-wrap h2 { font-size: 34px; max-width: 18ch; }
.center-wrap p { color: var(--text-dim); font-size: 17px; max-width: 42ch; line-height: 1.5; }

.steps { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 16px; }
.steps .s { width: 34px; height: 5px; border-radius: 3px; background: var(--border); transition: .3s; }
.side-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-mute); font-weight: 600; font-size: 14px; }
.side-chip.active { border-color: var(--accent); color: var(--text); box-shadow: var(--glow); }
.side-chip.done { border-color: var(--good); color: var(--good); }
.side-chip .mono { font-family: var(--font-mono); opacity: .8; }
.steps .s.done { background: var(--accent-2); }
.steps .s.active { background: var(--accent); width: 50px; }

.choice-grid { display: grid; gap: 14px; width: 100%; max-width: 720px; }
.kiosk[data-orientation="portrait"] .choice-grid { grid-template-columns: 1fr; }
.kiosk[data-orientation="landscape"] .choice-grid { grid-template-columns: 1fr 1fr; }
.choice {
  display: flex; align-items: center; gap: 16px; text-align: left;
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); transition: .15s;
}
.choice:hover { border-color: var(--accent); background: var(--surface-2); }
.choice .ci { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px;
  background: var(--bg-2); border: 1px solid var(--border-2); flex-shrink: 0; }
.choice .ct { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.choice .cs { font-size: 13px; color: var(--text-dim); }
.choice .chev { margin-left: auto; color: var(--text-mute); font-size: 22px; }

/* country list */
.country-list { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 8px; }
.country {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); transition: .12s;
}
.country:hover { border-color: var(--accent); }
.country .flag { font-size: 26px; }
.country .cn { font-weight: 600; font-size: 16px; flex: 1; }
.country .ca { margin-left: auto; font-family: var(--font-mono); font-size: 13px; color: var(--accent-2); white-space: nowrap; }

/* camera */
.camera { position: relative; flex: 0 1 auto; min-height: 0; width: 100%; display: grid; place-items: center; padding: 10px var(--pad); }
.camera-body { align-items: center; justify-content: center; gap: 18px; }
.kiosk[data-orientation="portrait"] .viewfinder { width: min(620px, 82%); }
.viewfinder {
  position: relative; width: min(460px, 66%); aspect-ratio: 1.586/1; border-radius: var(--radius-lg);
  overflow: hidden; background: oklch(0.12 0.01 274);
  box-shadow: inset 0 0 0 2px var(--border-2), var(--shadow);
}
.viewfinder .vbg { position: absolute; inset: 0; background:
  repeating-linear-gradient(90deg, color-mix(in oklch, var(--text) 4%, transparent) 0 2px, transparent 2px 5px), oklch(0.14 0.01 274); }
.viewfinder .frameguide { position: absolute; inset: 9%; border-radius: 16px;
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--accent) 70%, transparent); }
.viewfinder .corner { position: absolute; width: 34px; height: 34px; border: 4px solid var(--accent); }
.viewfinder .corner.tl { top: 7%; left: 7%; border-right: none; border-bottom: none; border-radius: 14px 0 0 0; }
.viewfinder .corner.tr { top: 7%; right: 7%; border-left: none; border-bottom: none; border-radius: 0 14px 0 0; }
.viewfinder .corner.bl { bottom: 7%; left: 7%; border-right: none; border-top: none; border-radius: 0 0 0 14px; }
.viewfinder .corner.br { bottom: 7%; right: 7%; border-left: none; border-top: none; border-radius: 0 0 14px 0; }
.viewfinder .scan { position: absolute; left: 7%; right: 7%; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 16px var(--accent); animation: scanline 2.4s ease-in-out infinite alternate; }
.viewfinder .doc { position: absolute; inset: 14%; border-radius: 12px; }
.cam-hint { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--border); padding: 10px 18px; border-radius: 999px; }
.shutter { width: 84px; height: 84px; border-radius: 50%; background: var(--accent); box-shadow: var(--glow);
  display: grid; place-items: center; border: 5px solid var(--bg-2); }
.shutter .inner { width: 60px; height: 60px; border-radius: 50%; border: 3px solid var(--on-accent); }
.capture-steps { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-dim); flex-wrap: wrap; justify-content: center; }
.capture-steps span { display: inline-flex; align-items: center; gap: 8px; }
.capture-steps b { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-2);
  display: inline-grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--accent-2); }
.capture-steps .capture-arrow { color: var(--text-mute); }
.capture-btn { min-width: 280px; animation: capPulse 1.8s ease-in-out infinite; }
@keyframes capPulse { 0%, 100% { box-shadow: var(--glow); } 50% { box-shadow: 0 0 0 1px color-mix(in oklch, var(--accent) 40%, transparent), 0 0 0 8px color-mix(in oklch, var(--accent) 18%, transparent), 0 18px 50px -18px color-mix(in oklch, var(--accent) 55%, transparent); } }

/* result */
.result-icon { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; font-size: 60px; }
.result-icon.ok { background: color-mix(in oklch, var(--good) 18%, transparent); color: var(--good); box-shadow: 0 0 0 6px color-mix(in oklch, var(--good) 12%, transparent); }
.result-icon.no { background: color-mix(in oklch, var(--bad) 18%, transparent); color: var(--bad); box-shadow: 0 0 0 6px color-mix(in oklch, var(--bad) 12%, transparent); }

/* =========================================================================
   PAYMENT
   ========================================================================= */
.pay-wrap { flex: 1; min-height: 0; display: flex; gap: var(--gap); padding: var(--pad); }
.kiosk[data-orientation="portrait"] .pay-wrap { flex-direction: column; }
.pay-summary { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pay-methods { width: 340px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.kiosk[data-orientation="portrait"] .pay-methods { width: 100%; }

.order-card { padding: 24px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.order-line { display: flex; align-items: center; gap: 16px; }
.order-line .thumb { width: 64px; height: 104px; border-radius: 12px; flex-shrink: 0; position: relative; overflow: hidden; }
.order-line .thumb .imgph, .order-line .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.order-tot { margin-top: auto; border-top: 1px dashed var(--border-2); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.order-tot .tl { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 15px; color: var(--text-dim); }
.order-tot .tl > span { white-space: nowrap; }
.order-tot .tl.grand { font-size: 15px; }
.order-tot .grand .price { font-size: 34px; color: var(--text); }
.order-tot .grand .lbl { align-self: flex-end; }

.method {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface); border: 2px solid var(--border); transition: .15s; text-align: left; width: 100%;
}
.method:hover { border-color: var(--border-2); }
.method.sel { border-color: var(--accent); background: var(--surface-2); box-shadow: var(--glow); }
.method .mi { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 22px;
  background: var(--bg-2); border: 1px solid var(--border-2); flex-shrink: 0; }
.method .mt { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.method .ms { font-size: 13px; color: var(--text-dim); }
.method .radio { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-2); flex-shrink: 0; }
.method.sel .radio { border-color: var(--accent); background: radial-gradient(circle at center, var(--accent) 0 6px, transparent 7px); }

/* QR */
.qr-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; }
.qr-box { width: 280px; height: 280px; border-radius: 20px; background: white; padding: 18px; box-shadow: var(--glow); }
.qr-box svg { width: 100%; height: 100%; }

/* viva pos handoff */
.viva-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center; }
.viva-card { width: min(560px, 94%); padding: 28px; border-radius: var(--radius-lg); display: flex; flex-direction: column; align-items: center; gap: 18px;
  background: var(--surface); border: 1px solid var(--border-2); box-shadow: var(--shadow); }
.viva-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.viva-logo .vmark { width: 36px; height: 36px; border-radius: 10px; background: oklch(0.55 0.2 25); display: grid; place-items: center; color: white; }
.reader { width: 200px; height: 130px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--border-2);
  display: grid; place-items: center; position: relative; }
.reader .wave { width: 60px; height: 60px; border-radius: 50%; border: 3px solid var(--accent); animation: pulseGlow 1.2s infinite; }

/* =========================================================================
   PICKUP / DISPENSE
   ========================================================================= */
.pickup { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; text-align: center; padding: var(--pad); }
.dispense-vis { position: relative; width: 200px; height: 200px; display: grid; place-items: center; }
.coil { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed var(--border-2); }
.coil.spin { animation: spin 1.5s linear infinite; border-top-color: var(--accent); border-right-color: var(--accent); }
.drop-pkg { font-size: 72px; animation: floaty 2s ease-in-out infinite; }

/* lane LED strip */
.lane-strip { display: flex; gap: 10px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.led { width: 26px; height: 40px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--border-2); position: relative; }
.led.on { background: var(--good); animation: ledpulse 1s infinite; }
/* dispensing lane grid */
.lane-grid-vis { display: grid; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); max-width: min(560px, 88vw); }
.lane-cell-vis { width: 52px; height: 44px; border-radius: 9px; display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--border-2); font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--text-mute); transition: .2s; }
.lane-cell-vis.empty { opacity: .35; }
.lane-cell-vis.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 0 22px -2px var(--accent); animation: ledpulse 1s infinite; transform: scale(1.08); }
.tray { width: min(520px, 92%); height: 16px; border-radius: 0 0 14px 14px; background: var(--bg-2); border: 1px solid var(--border-2); border-top: none; box-shadow: inset 0 6px 12px -6px oklch(0 0 0/.6); }
.collect-slot { width: min(520px, 92%); height: 90px; border-radius: 14px; background: oklch(0.1 0.01 274);
  box-shadow: inset 0 10px 24px -6px oklch(0 0 0/.8); border: 1px solid var(--border-2); display: grid; place-items: center; }
.collect-slot .ph { font-family: var(--font-mono); font-size: 12px; color: var(--text-mute); letter-spacing: .1em; }

.countback { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; color: var(--text-dim); }
.countback b { font-family: var(--font-mono); color: var(--text); }

/* =========================================================================
   ADMIN / BACKDOOR
   ========================================================================= */
.admin { position: absolute; inset: 0; z-index: 100; display: flex; flex-direction: column; background: var(--bg); }
.admin-top { display: flex; align-items: center; gap: 14px; padding: 16px var(--pad); border-bottom: 1px solid var(--border); }
.admin-top h2 { font-size: 20px; }
.admin-top .tag { font-family: var(--font-mono); font-size: 12px; color: var(--warn); border: 1px solid var(--warn); padding: 4px 9px; border-radius: 7px; }
.admin-body { flex: 1; min-height: 0; overflow-y: auto; padding: var(--pad); display: grid; gap: var(--gap); align-content: start; scrollbar-width: none; -ms-overflow-style: none; }
.admin-body::-webkit-scrollbar { display: none; width: 0; }
.kiosk[data-orientation="landscape"] .admin-body { grid-template-columns: 1.3fr 1fr; }
.admin-section h3 { font-size: 15px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--text-mute); margin-bottom: 12px; font-weight: 500; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv .k { color: var(--text-dim); white-space: nowrap; }
.kv .v { font-family: var(--font-mono); text-align: right; }
.kv .v.ok { color: var(--good); } .kv .v.bad { color: var(--bad); }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px,1fr)); gap: 8px; }
.lanecell { aspect-ratio: 1; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: var(--surface); border: 1px solid var(--border); font-family: var(--font-mono); font-size: 12px; }
.lanecell .n { color: var(--text-dim); }
.lanecell .q { font-weight: 600; font-size: 15px; }
.lanecell.low { border-color: var(--warn); } .lanecell.low .q { color: var(--warn); }
.lanecell.empty { border-color: var(--bad); opacity: .6; } .lanecell.empty .q { color: var(--bad); }
.lanecell.debug { cursor: pointer; transition: .12s; }
.lanecell.debug .q { color: var(--text-mute); font-family: var(--font-mono); }
.lanecell.debug:hover { border-color: var(--accent); background: var(--surface-2); }
.lanecell.debug:active { transform: scale(.96); }
.lanecell.debug.active { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 20%, transparent); animation: ledpulse 1s infinite; }
.lanecell.debug.active .q, .lanecell.debug.active .n { color: var(--accent-2); }
.ctrl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ctrl { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); text-align: left; transition: .12s; }
.ctrl .col { min-width: 0; }
.ctrl:hover { border-color: var(--border-2); background: var(--surface-2); }
.ctrl .cic { font-size: 22px; flex-shrink: 0; } .ctrl .ctt { font-weight: 600; font-size: 14px; white-space: nowrap; } .ctrl .cst { font-size: 11px; color: var(--text-mute); white-space: nowrap; }
.ctrl.danger:hover { border-color: var(--bad); }

/* PIN keypad */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 300px; }
.key { height: 72px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border-2);
  font-family: var(--font-display); font-size: 26px; font-weight: 600; transition: .1s; }
.key:active { background: var(--accent); color: var(--on-accent); transform: scale(.97); }
.pin-dots { display: flex; gap: 16px; justify-content: center; }
.pin-dots .pd { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-2); }
.pin-dots .pd.f { background: var(--accent); border-color: var(--accent); }

/* session countdown ring in topbar */
.session { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-mute); font-family: var(--font-mono); white-space: nowrap; }

/* ---- hardware guide (mirrors device bottom panel) ---- */
.hwguide { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hwg-cap { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--text); text-align: center; max-width: none; white-space: nowrap; }
.hwpanel { display: flex; gap: 14px; width: 396px; max-width: 92vw; height: 168px; padding: 14px;
  background: oklch(0.16 0.008 274); border: 1px solid var(--border-2); border-radius: 18px;
  box-shadow: inset 0 2px 10px oklch(0 0 0 / .5); }
.kiosk[data-orientation="portrait"] .hwpanel { width: 534px; }
.hw-push { position: relative; flex: 1 1 0; min-width: 0; border-radius: 12px; display: flex; align-items: flex-end; justify-content: center; padding: 0 6px; }
.hw-push::before { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 270px; height: 58%; border-radius: 10px;
  background: radial-gradient(120% 90% at 50% 0%, oklch(0.04 0.004 274), oklch(0.02 0 0));
  box-shadow: inset 0 10px 22px -4px oklch(0 0 0 / .9), inset 0 2px 4px oklch(0 0 0 / .8); }
.hw-push .hw-door { position: relative; z-index: 2; width: 100%; max-width: 270px; height: 58%; border-radius: 10px; background: linear-gradient(180deg, #f4f3f7, #d7d5e0);
  display: grid; place-items: center; box-shadow: 0 6px 14px -2px oklch(0 0 0 / .7), 0 2px 4px oklch(0 0 0 / .5); transform-origin: top center; transition: transform .5s cubic-bezier(.3,.7,.3,1); }
.hw-pushtxt { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: .16em; color: #2a2733; }
.hw-push.opening .hw-door { animation: pushIn 1.3s ease-in-out infinite alternate; }
@keyframes pushIn { 0% { transform: perspective(560px) rotateX(0deg); filter: none; } 100% { transform: perspective(560px) rotateX(-68deg); filter: brightness(.42); } }
.hw-window { flex: 0 0 118px; display: flex; flex-direction: column; gap: 10px; background: oklch(0.11 0.006 274);
  border-radius: 12px; border: 1px solid var(--border); padding: 12px; }
.hw-cam { position: relative; flex: 2.1; display: grid; place-items: center; border-radius: 8px; }
.hw-lens { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 38% 35%, #3a3550, #0a0810 70%);
  box-shadow: inset 0 0 0 2px oklch(0.4 0.02 274), 0 0 0 4px oklch(0.16 0.008 274); }
.hw-card { position: relative; flex: 1; display: grid; place-items: center; color: var(--text-mute); }
.hw-nfc { width: 40px; height: 40px; }
/* active highlight */
.hw-cam.on, .hw-card.on { color: var(--accent); }
.hw-cam.on { box-shadow: 0 0 0 2px var(--accent), 0 0 18px -2px var(--accent); }
.hw-card.on { box-shadow: 0 0 0 2px var(--accent), 0 0 18px -2px var(--accent); border-radius: 8px; }
.hw-cam.on .hw-lens { box-shadow: inset 0 0 0 2px var(--accent), 0 0 14px var(--accent); animation: pulseGlow 1.3s infinite; }
.hw-push.on { box-shadow: none; }
.hw-push.on .hw-door { box-shadow: 0 2px 6px oklch(0 0 0 / .4), 0 0 0 2px var(--accent), 0 0 22px -2px var(--accent); }
.hw-arrow { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); color: var(--accent);
  font-size: 26px; font-weight: 700; animation: cueBounce2 1.1s ease-in-out infinite; }
@keyframes cueBounce2 { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }

/* generic helpers */
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.scrolly { overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.scrolly::-webkit-scrollbar { display: none; width: 0; }
.divider { height: 1px; background: var(--border); width: 100%; }
