/* ═══════════════════════════════════════════════════════════════
   FLUX & FROTH — Kiosk v2 · "Liquid Editorial"
   Dark cinematic stage × cream editorial sheets × engineering spec
   Tokens: FF-BRAND-001 · Behavior: FF-SOFT-003
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── Urban café palette: espresso + cream + caramel, brand green kept ── */
  --forest: #228B22;
  --forest-deep: #1B6E22;
  --mist: #B7CBA6;
  --lime: #7ED957;
  --caramel: #C6803F;        /* warm accent */
  --caramel-deep: #A5622A;
  --ink: #241812;            /* warm espresso near-black (text/headlines) */
  --froth: #F5EFE4;          /* warm cream paper */
  --graphite: #4A3B31;       /* warm body text */
  --steel: #9C8E7F;          /* warm muted */
  --fog: #E7DECF;            /* warm borders */
  --crit: #C0392B;
  --warn: #D68A2E;

  --night: #241A15;          /* warm espresso stage */
  --night-2: #2E211B;
  --hairline-d: rgba(245, 239, 228, .10);
  --hairline-l: rgba(42, 24, 18, .10);
  --cream-ghost: rgba(245, 239, 228, .72);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-micro: 180ms;
  --t-glide: 450ms;
  --t-scene: 600ms;

  /* Hyper-modern type system (FF-STACK-005 §1.3) — no serif on UI */
  --f-display: "Space Grotesk", system-ui, sans-serif;   /* geometric headlines */
  --f-accent: "Space Grotesk", sans-serif;                /* headline accents (Syne removed) */
  --f-ui: "IBM Plex Sans", system-ui, sans-serif;         /* body / data */
  --f-mono: "IBM Plex Mono", ui-monospace, "Consolas", monospace;

  /* 6-tier elevation ladder (FF-STACK-005 §1.4) */
  --elev-1: 0 1px 2px rgba(10,10,10,.06), 0 1px 3px rgba(10,10,10,.10);
  --elev-2: 0 4px 6px -1px rgba(10,10,10,.10), 0 2px 4px -2px rgba(10,10,10,.08);
  --elev-3: 0 10px 15px -3px rgba(10,10,10,.10), 0 4px 6px -4px rgba(10,10,10,.08);
  --elev-4: 0 20px 25px -5px rgba(10,10,10,.12), 0 8px 10px -6px rgba(10,10,10,.10);
  --elev-5: 0 32px 48px -12px rgba(10,10,10,.24), 0 12px 18px -10px rgba(10,10,10,.14);
  --elev-float: 0 40px 80px -20px rgba(10,10,10,.34);
  --glow-forest: 0 10px 34px -6px rgba(34,139,34,.42);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  background: var(--night);
  color: var(--froth);
  font-family: var(--f-ui);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; border: 0; cursor: pointer; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; }
::selection { background: var(--forest); color: #fff; }

/* film grain — very subtle, sits UNDER content so it never muddies text edges */
#grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* micro-label + mono utilities */
.klabel {
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: 2.6px; text-transform: uppercase;
}
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ───────────────────────── screens ───────────────────────── */
.screen { display: none; min-height: 100dvh; }
.screen.active { display: flex; flex-direction: column; }

/* ───────────────────────── liquid wipe ───────────────────────── */
#wipe {
  position: fixed; inset: 0; z-index: 240; pointer-events: none;
  background: linear-gradient(165deg, var(--forest) 0%, var(--forest-deep) 55%, #0C3D0C 100%);
  transform: translateY(101%);
}
#wipe::after {
  content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent); opacity: .7; filter: blur(4px);
}
#wipe.run { animation: wipeSweep var(--t-scene) var(--ease) both; }
@keyframes wipeSweep {
  0% { transform: translateY(101%); }
  46% { transform: translateY(0); }
  54% { transform: translateY(0); }
  100% { transform: translateY(-102%); }
}

/* ───────────────────────── header (floating dark glass) ───────────────────────── */
header.kiosk {
  position: fixed; top: 14px; left: 16px; right: 16px; z-index: 120;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px 10px 20px;
  background: rgba(12, 17, 11, .58);
  border: 1px solid var(--hairline-d);
  border-radius: 999px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.logo {
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.6px;
  font-size: clamp(17px, 2vw, 21px); color: var(--froth); user-select: none;
}
.logo .amp, .logo .dot { color: var(--lime); }
.wait-chip {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .6px; color: var(--cream-ghost);
  padding: 8px 14px; border: 1px solid var(--hairline-d); border-radius: 999px;
}
.wait-chip .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(126,217,89,.4);} 55% { box-shadow: 0 0 0 7px rgba(126,217,89,0);} }
.hbtn {
  font-weight: 600; font-size: 13px; color: var(--froth);
  border: 1px solid var(--hairline-d); border-radius: 999px; padding: 9px 15px;
  transition: all var(--t-micro) var(--ease); display: inline-flex; align-items: center; gap: 6px;
}
.hbtn:hover { border-color: rgba(126,217,89,.5); }
.hbtn:active { transform: scale(.94); }
.hbtn.cart-btn { background: var(--forest); border-color: transparent; position: relative; }
.hbtn.cart-btn:hover { background: var(--forest-deep); }
.cart-count {
  position: absolute; top: -7px; right: -7px; min-width: 21px; height: 21px; border-radius: 999px;
  background: var(--lime); color: var(--ink); font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.cart-count.bump { animation: bump .4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.5); } }

/* ───────────────────────── S0 HERO ───────────────────────── */
#s0 { position: relative; overflow: hidden; cursor: pointer; }

/* home language switch (two dedicated buttons) */
.lang-switch {
  position: absolute; top: 20px; right: clamp(16px, 4vw, 44px); z-index: 8;
  display: flex; align-items: center; gap: 4px;
  padding: 6px 6px 6px 14px; border-radius: 999px;
  background: rgba(12, 17, 11, .55); border: 1px solid var(--hairline-d);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--elev-3);
}
.lang-globe { color: var(--lime); font-size: 15px; margin-right: 6px; }
.lang-opt {
  font-family: var(--f-display); font-weight: 600; font-size: 13.5px; letter-spacing: .2px;
  color: var(--cream-ghost); padding: 10px 18px; border-radius: 999px;
  transition: color var(--t-micro) var(--ease), background var(--t-micro) var(--ease), transform var(--t-micro) var(--ease);
}
.lang-opt:hover { color: var(--froth); }
.lang-opt:active { transform: scale(.94); }
.lang-opt.on { background: var(--forest); color: #fff; box-shadow: var(--glow-forest); }
.hero-bg { position: absolute; inset: 0; }
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--hairline-d) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline-d) 1px, transparent 1px);
  background-size: 96px 96px; opacity: .35;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 30%, transparent 75%);
}
.glow { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; }
.glow.ga { width: 48vw; height: 48vw; background: rgba(34,139,34,.2); top: -20%; left: -16%; animation: drift1 18s ease-in-out infinite alternate; }
.glow.gb { width: 34vw; height: 34vw; background: rgba(126,217,89,.1); bottom: -14%; right: -8%; animation: drift2 22s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(8vw, 6vh) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-6vw, -5vh) scale(1.08); } }

.hero-grid {
  position: relative; z-index: 2; flex: 1;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center; gap: 20px;
  padding: 120px clamp(20px, 5vw, 72px) 80px;
  max-width: 1440px; width: 100%; margin: 0 auto;
}
.hero-copy .klabel { color: var(--lime); }
.h1 { margin-top: 26px; }
.h1 .l1 {
  display: block; font-family: var(--f-display); font-weight: 600;
  font-size: clamp(34px, 4.8vw, 60px); line-height: 1.05; color: var(--froth); letter-spacing: -1.4px;
}
.h1 .l2 {
  display: block; font-family: var(--f-display); font-weight: 700;
  font-size: clamp(34px, 4.8vw, 60px); line-height: 1.06; letter-spacing: -1.4px;
  color: var(--lime);
}
.hero-sub {
  margin-top: 26px; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.65;
  color: var(--cream-ghost); max-width: 46ch; font-weight: 400;
}
.hero-cta {
  margin-top: 40px; display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--f-display); font-weight: 600; font-size: 15px; letter-spacing: 1.6px;
  color: var(--froth); padding: 20px 34px; border-radius: 999px;
  border: 1.5px solid rgba(126,217,89,.55);
  background: rgba(34,139,34,.12);
  transition: all var(--t-micro) var(--ease);
  animation: ctaBreath 3.2s ease-in-out infinite;
}
.hero-cta:hover { background: var(--forest); border-color: var(--forest); }
.hero-cta .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); animation: pulse 2s infinite; }
@keyframes ctaBreath { 50% { box-shadow: 0 0 46px rgba(34,139,34,.35); } }

/* hero trio of renders */
.hero-stage { position: relative; height: min(72vh, 680px); }
.hero-stage .ffv { position: absolute; filter: drop-shadow(0 30px 60px rgba(0,0,0,.5)); }
.hero-stage .ffv svg { width: 100%; height: auto; display: block; }
.hero-stage .p1 { width: 56%; left: 22%; top: 2%; z-index: 3; }
.hero-stage .p2 { width: 44%; left: -4%; top: 22%; z-index: 2; opacity: .92; }
.hero-stage .p3 { width: 46%; right: -3%; top: 30%; z-index: 1; opacity: .88; }

.ffv-float { animation: floaty 7s ease-in-out infinite alternate; }
.hero-stage .p2.ffv-float { animation-duration: 8.5s; animation-delay: .8s; }
.hero-stage .p3.ffv-float { animation-duration: 9.5s; animation-delay: 1.6s; }
@keyframes floaty { to { transform: translateY(-16px) rotate(-1.2deg); } }

/* liquid blob + bubble life inside SVGs */
.liq-blob.la { animation: blobA 15s ease-in-out infinite alternate; }
.liq-blob.lb { animation: blobB 19s ease-in-out infinite alternate; }
@keyframes blobA { to { transform: translate(34px, -46px) scale(1.18); } }
@keyframes blobB { to { transform: translate(-30px, -30px) scale(.9); } }
.bub { animation: bubRise var(--bd, 7s) linear infinite; animation-delay: var(--bdel, 0s); }
@keyframes bubRise { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: .8; } 100% { transform: translateY(-268px); opacity: 0; } }

/* hero entrance */
.hero-in { opacity: 0; transform: translateY(28px); animation: heroIn .9s var(--ease) forwards; }
.hero-in.d1 { animation-delay: .08s; } .hero-in.d2 { animation-delay: .2s; }
.hero-in.d3 { animation-delay: .34s; } .hero-in.d4 { animation-delay: .5s; } .hero-in.d5 { animation-delay: .66s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

/* marquee */
.marquee {
  position: relative; z-index: 2; overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--hairline-d); border-bottom: 1px solid var(--hairline-d);
  padding: 16px 0; user-select: none;
}
.marquee-track { display: inline-flex; gap: 48px; padding-right: 48px; animation: mq 22s linear infinite; will-change: transform; }
@keyframes mq { to { transform: translateX(-50%); } }
.mq-serif { font-family: var(--f-display); font-weight: 500; font-size: 16px; letter-spacing: -.3px; color: var(--froth); }
.mq-sans { font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: 3px; color: var(--lime); align-self: center; }
.mq-dot { color: var(--steel); align-self: center; font-size: 10px; }

/* ───────────────────────── cream sheet base ───────────────────────── */
.sheet {
  flex: 1; background: var(--froth); color: var(--graphite);
  border-radius: 34px 34px 0 0;
  padding: 118px clamp(18px, 4vw, 56px) 150px;
  position: relative;
}
.sheet-inner { max-width: 1280px; margin: 0 auto; }

/* ───────────────────────── S1 MENU ───────────────────────── */
.menu-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.menu-head .klabel { color: var(--forest); }
.menu-title {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(34px, 4.6vw, 58px); color: var(--ink); letter-spacing: -1.5px; margin-top: 10px;
}
.filters { display: flex; gap: 26px; padding-bottom: 8px; flex-wrap: wrap; }
.pill {
  font-family: var(--f-display); font-weight: 600; font-size: 12.5px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--steel); padding: 8px 2px; border-bottom: 2px solid transparent;
  transition: all var(--t-micro) var(--ease);
}
.pill:hover { color: var(--ink); }
.pill.on { color: var(--ink); border-bottom-color: var(--forest); }

.rule { height: 1px; background: var(--hairline-l); margin: 18px 0 34px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 20px; }

/* tile */
.tile {
  position: relative; text-align: left; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--acc, #228B22) 13%, #FDFCF9) 0%, color-mix(in srgb, var(--acc, #228B22) 4%, #F6F5F1) 100%);
  border: 1px solid rgba(10, 10, 10, .07);
  box-shadow: var(--elev-2);
  transition: transform var(--t-glide) var(--ease), box-shadow var(--t-glide) var(--ease), opacity var(--t-glide) var(--ease);
  display: flex; flex-direction: column;
}
.tile:hover { transform: translateY(-8px); box-shadow: var(--elev-4), 0 30px 60px -22px color-mix(in srgb, var(--acc, #228B22) 55%, transparent); }
.tile:active { transform: scale(.98); }
.tile.vanish { opacity: 0; transform: scale(.94); pointer-events: none; }
.tile.hidden { display: none; }

.ghost-num {
  position: absolute; top: 6px; right: 16px; z-index: 1;
  font-family: var(--f-display); font-weight: 800; font-size: 104px; line-height: 1;
  color: rgba(10, 10, 10, .055); letter-spacing: -4px; pointer-events: none;
}
.tile-stage { position: relative; aspect-ratio: 4 / 4.4; z-index: 2; }
.tile-stage .ffv { position: absolute; inset: 4% 8% 0; transition: transform var(--t-glide) var(--ease); }
.tile-stage .ffv svg { width: 100%; height: 100%; }
.tile:hover .tile-stage .ffv { transform: translateY(-8px) scale(1.035); }
.tile-stage img.real { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 3; }
.tile-stage.has-photo .ffv, .tile-stage.has-photo ~ * .photo-chip { display: none; }
.photo-chip {
  position: absolute; z-index: 4; left: 14px; top: 14px;
  font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 1.4px; color: rgba(10,10,10,.45);
  border: 1px dashed rgba(10,10,10,.25); border-radius: 999px; padding: 4px 10px;
  background: rgba(255,255,255,.5); backdrop-filter: blur(4px);
}
.tile-stage.has-photo .photo-chip { display: none; }

.tile-info { position: relative; z-index: 2; padding: 2px 20px 20px; }
.tile-sku { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 2px; color: var(--steel); }
.tile-name { font-family: var(--f-display); font-weight: 600; font-size: 21px; color: var(--ink); margin-top: 5px; letter-spacing: -.7px; }
.tile-row { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.tile-tag { font-family: var(--f-mono); font-size: 10px; letter-spacing: 1.2px; color: var(--graphite); }
.tile-tag::before { content: "◦ "; color: var(--acc, var(--forest)); }
.tag-alc {
  font-family: var(--f-display); font-weight: 700; font-size: 10px; letter-spacing: 1px;
  color: var(--crit); border: 1.5px solid var(--crit); border-radius: 999px; padding: 2px 8px;
}
.tile-price { margin-left: auto; font-family: var(--f-display); font-weight: 700; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile-price small { font-size: 11px; font-weight: 600; color: var(--steel); }

/* ───────────────────────── S2 DETAIL (stage × spec panel) ───────────────────────── */
#s2 { background: var(--night); }
#s2 .split { flex: 1; display: grid; grid-template-columns: minmax(0, 45%) minmax(0, 55%); }
@media (max-width: 900px) { #s2 .split { grid-template-columns: 1fr; } }

.stage {
  position: relative; overflow: hidden; min-height: 460px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 44%, color-mix(in srgb, var(--acc, #228B22) 26%, transparent), transparent 70%),
    var(--night);
}
.stage::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--hairline-d) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline-d) 1px, transparent 1px);
  background-size: 84px 84px; opacity: .4;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 25%, transparent 78%);
}
.stage-render {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: clamp(60px, 9vh, 110px) 12% clamp(40px, 7vh, 80px);
}
.stage-render .ffv { width: min(380px, 88%); filter: drop-shadow(0 40px 70px rgba(0,0,0,.55)); }
.stage-render .ffv svg { width: 100%; height: auto; }
.stage-render img.real {
  width: 100%; height: 100%; object-fit: cover; border-radius: 30px; position: absolute; inset: 0; z-index: 3;
}
.stage-corner { position: absolute; width: 22px; height: 22px; border: 1.5px solid rgba(244,243,239,.3); z-index: 4; }
.stage-corner.tl { top: 96px; left: 26px; border-right: 0; border-bottom: 0; }
.stage-corner.tr { top: 96px; right: 26px; border-left: 0; border-bottom: 0; }
.stage-corner.bl { bottom: 26px; left: 26px; border-right: 0; border-top: 0; }
.stage-corner.br { bottom: 26px; right: 26px; border-left: 0; border-top: 0; }
.stage-meta {
  position: absolute; left: 34px; bottom: 34px; z-index: 5;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 2px; color: rgba(244,243,239,.5);
}
.stage-meta b { color: var(--lime); font-weight: 600; display: block; margin-top: 4px; letter-spacing: 3px; }
.stage-ver { position: absolute; right: 34px; bottom: 34px; z-index: 5; font-family: var(--f-mono); font-size: 10px; letter-spacing: 2px; color: rgba(244,243,239,.35); }

.panel {
  background: var(--froth); color: var(--graphite);
  padding: 110px clamp(22px, 3.6vw, 64px) 170px;
  border-radius: 34px 0 0 34px;
}
@media (max-width: 900px) { .panel { border-radius: 34px 34px 0 0; margin-top: -30px; position: relative; z-index: 6; padding-top: 44px; } }

.stagger { opacity: 0; transform: translateY(22px); transition: opacity 420ms var(--ease), transform 420ms var(--ease); }
#s2.reveal .stagger { opacity: 1; transform: none; }

.back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-display); font-weight: 600; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--graphite); padding: 11px 20px; border: 1px solid var(--hairline-l); border-radius: 999px;
  margin-bottom: 26px; transition: all var(--t-micro) var(--ease);
}
.back-btn:hover { border-color: var(--forest); color: var(--forest); }

.d-sku { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 2.4px; color: var(--forest); }
.d-name {
  font-family: var(--f-display); font-weight: 600; font-size: clamp(36px, 4.4vw, 58px);
  line-height: 1.0; color: var(--ink); letter-spacing: -2px; margin-top: 10px;
}
.d-tagline { font-size: clamp(15px, 1.5vw, 17.5px); line-height: 1.65; color: var(--graphite); margin-top: 14px; max-width: 58ch; }

.spec-head {
  display: flex; align-items: center; gap: 14px; margin: 34px 0 6px;
}
.spec-head .klabel { color: var(--forest); }
.spec-head .line { flex: 1; height: 1px; background: var(--hairline-l); }

.spec { list-style: none; }
.spec li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hairline-l); }
.spec .idx { font-family: var(--f-mono); font-size: 10px; color: var(--steel); width: 20px; }
.spec .sw { width: 20px; height: 20px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px rgba(10,10,10,.12), 0 1px 4px rgba(10,10,10,.15); }
.spec .nm { font-weight: 500; font-size: 15px; color: var(--ink); }
.spec .lead { flex: 1; border-bottom: 1.5px dotted rgba(10,10,10,.22); margin: 0 4px; transform: translateY(4px); }
.spec .qty { font-family: var(--f-mono); font-weight: 600; font-size: 13.5px; color: var(--ink); white-space: nowrap; }

.doser-block {
  position: relative; margin-top: 26px; border: 1.5px solid var(--forest); border-radius: 20px;
  background: color-mix(in srgb, var(--forest) 4%, #FFF); padding: 20px 20px 8px;
}
.doser-block .spec li:last-child { border-bottom: 0; }
.stamp {
  position: absolute; top: -14px; right: 18px; transform: rotate(-3.5deg);
  font-family: var(--f-display); font-weight: 700; font-size: 10.5px; letter-spacing: 2px;
  color: var(--forest); background: var(--froth);
  border: 2px solid var(--forest); border-radius: 8px; padding: 6px 12px;
}
.doser-cap { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 2.4px; color: var(--forest-deep); margin-bottom: 4px; }
.can-note {
  margin-top: 26px; border: 1.5px dashed var(--forest); border-radius: 20px; padding: 18px 20px;
  font-size: 14.5px; line-height: 1.6; color: var(--forest-deep);
  background: color-mix(in srgb, var(--forest) 4%, #FFF);
}

.stats { display: flex; gap: 0; margin-top: 32px; border-top: 1px solid var(--hairline-l); border-bottom: 1px solid var(--hairline-l); flex-wrap: wrap; }
.stat { flex: 1; min-width: 130px; padding: 18px 18px 18px 0; }
.stat + .stat { border-left: 1px solid var(--hairline-l); padding-left: 22px; }
.stat .klabel { color: var(--steel); }
.stat .val { font-family: var(--f-display); font-weight: 700; font-size: clamp(20px, 2.2vw, 27px); color: var(--ink); margin-top: 6px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat .val.green { color: var(--forest); }
.stat .sub { font-size: 11.5px; color: var(--steel); margin-top: 3px; }

.allergen-line { margin-top: 20px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 1px; color: var(--steel); }
.allergen-line b { color: var(--graphite); }
.alc-warn { margin-top: 10px; font-size: 13px; color: var(--crit); font-weight: 500; }

/* CTA bar */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
  padding: 16px clamp(16px, 4vw, 44px) 22px;
  background: linear-gradient(180deg, transparent, rgba(244,243,239,.94) 44%);
  display: none; pointer-events: none;
}
.cta-bar.show { display: block; }
.cta-btn {
  pointer-events: auto; position: relative; overflow: hidden;
  width: 100%; max-width: 700px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--forest); color: #fff;
  font-family: var(--f-display); font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase;
  font-size: clamp(14px, 1.6vw, 17px); padding: 23px 30px; border-radius: 999px;
  box-shadow: var(--glow-forest), var(--elev-3);
  transition: transform var(--t-micro) var(--ease), background var(--t-micro) var(--ease);
}
.cta-btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 60px;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  animation: shine 3.4s var(--ease) infinite; left: -80px;
}
@keyframes shine { 30%, 100% { transform: translateX(calc(100vw)); } }
.cta-btn:active { transform: scale(.97); background: var(--forest-deep); }
.cta-btn.added { background: var(--forest-deep); }

/* fly-to-cart */
.fly { position: fixed; z-index: 260; width: 64px; height: 84px; pointer-events: none;
  transition: transform var(--t-glide) var(--ease), opacity var(--t-glide) var(--ease); }
.fly svg { width: 100%; height: 100%; }

/* FLIP clone */
.flip-clone { position: fixed; z-index: 230; overflow: hidden; border-radius: 26px;
  transition: all var(--t-glide) var(--ease); pointer-events: none; }
.flip-clone .ffv { position: absolute; inset: 4% 8% 0; }
.flip-clone .ffv svg { width: 100%; height: 100%; }
.flip-clone.to-stage { background: transparent; }

/* ───────────────────────── S3 CART ───────────────────────── */
.cart-head { display: flex; align-items: baseline; gap: 16px; }
.cart-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(32px, 4.4vw, 52px); color: var(--ink); letter-spacing: -1.8px; }
.cart-lines { margin-top: 26px; }
.cart-line { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--hairline-l); }
.cart-thumb { width: 64px; height: 84px; flex: none; position: relative; }
.cart-thumb .ffv, .cart-thumb .ffv svg { width: 100%; height: 100%; }
.cl-name { font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--ink); letter-spacing: -.5px; }
.cl-price { font-family: var(--f-mono); font-size: 12px; color: var(--steel); margin-top: 4px; }
.stepper { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.step-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(10,10,10,.2);
  font-size: 20px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-micro) var(--ease);
}
.step-btn:hover { border-color: var(--forest); color: var(--forest); }
.step-btn:active { transform: scale(.88); }
.step-qty { min-width: 34px; text-align: center; font-family: var(--f-mono); font-weight: 600; font-size: 16px; }
.cl-total { min-width: 100px; text-align: right; font-family: var(--f-display); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--ink); }
.cart-empty { color: var(--steel); font-size: 15px; padding: 46px 0; font-family: var(--f-ui); }

.upsell-rail { margin-top: 30px; }
.upsell-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 1.5px dashed rgba(34,139,34,.5); border-radius: 18px; padding: 16px 20px;
  transition: all var(--t-micro) var(--ease); color: var(--graphite);
}
.upsell-card:hover { background: color-mix(in srgb, var(--forest) 5%, transparent); }
.upsell-card .u-name { font-family: var(--f-display); font-weight: 600; font-size: 16px; color: var(--ink); letter-spacing: -.4px; }
.upsell-card .u-price { margin-left: auto; font-family: var(--f-mono); font-weight: 600; color: var(--forest); }

.paybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
  padding: 16px clamp(16px, 4vw, 44px) 22px;
  background: linear-gradient(180deg, transparent, rgba(244,243,239,.94) 44%);
}
.paybar-inner { max-width: 900px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.ghost-btn {
  font-family: var(--f-display); font-weight: 600; font-size: 12.5px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--graphite); padding: 21px 26px; border: 1.5px solid rgba(10,10,10,.22); border-radius: 999px;
  transition: all var(--t-micro) var(--ease); white-space: nowrap;
}
.ghost-btn:hover { border-color: var(--ink); }
.pay-btn {
  flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: var(--ink); color: var(--froth);
  font-family: var(--f-display); font-weight: 600; font-size: 15.5px; letter-spacing: 1.6px; text-transform: uppercase;
  padding: 22px 28px; border-radius: 999px;
  transition: transform var(--t-micro) var(--ease), background var(--t-micro);
}
.pay-btn:hover { background: #000; }
.pay-btn:active { transform: scale(.98); }
.pay-btn .mono { font-size: 17px; }

/* ───────────────────────── modals (dark glass) ───────────────────────── */
.modal-veil {
  position: fixed; inset: 0; z-index: 250; display: none; align-items: center; justify-content: center;
  background: rgba(7, 10, 6, .7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: 22px;
}
.modal-veil.open { display: flex; }
.modal {
  background: var(--night-2); color: var(--froth);
  border: 1px solid var(--hairline-d); border-radius: 30px;
  padding: clamp(28px, 4.4vw, 48px); max-width: 540px; width: 100%; text-align: center;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
  animation: modalIn 360ms var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(34px) scale(.96); } }
.age-badge {
  width: 86px; height: 86px; border-radius: 50%; margin: 0 auto 20px;
  border: 3px solid var(--crit); color: var(--crit);
  font-family: var(--f-display); font-weight: 800; font-size: 25px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 44px rgba(215,38,61,.3);
}
.modal h2 { font-family: var(--f-display); font-weight: 600; font-size: 26px; letter-spacing: -1px; }
.modal p { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--cream-ghost); }
.age-check { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 24px; font-weight: 500; font-size: 14.5px; cursor: pointer; user-select: none; }
.age-check input { width: 24px; height: 24px; accent-color: var(--forest); }
.modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.m-primary {
  background: var(--forest); color: #fff;
  font-family: var(--f-display); font-weight: 600; font-size: 14px; letter-spacing: 2px; text-transform: uppercase;
  padding: 19px; border-radius: 999px; transition: all var(--t-micro) var(--ease);
}
.m-primary:hover { background: var(--forest-deep); }
.m-primary:active { transform: scale(.97); }
.m-primary[disabled] { opacity: .3; pointer-events: none; }
.m-ghost { color: var(--steel); font-weight: 500; font-size: 13.5px; padding: 10px; }
.m-ghost:hover { color: var(--froth); }
.idle-count { font-family: var(--f-display); font-weight: 800; font-size: 58px; color: var(--crit); margin-top: 12px; }

/* ───────────────────────── S5 PAYMENT (dark stage) ───────────────────────── */
.pay-wrap { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 120px 26px 60px; text-align: center; }
.pay-wrap .klabel { color: var(--lime); }
.pay-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(30px, 4vw, 44px); letter-spacing: -1.5px; margin-top: 12px; }
.pay-total {
  font-family: var(--f-display); font-weight: 700; font-size: clamp(44px, 6.5vw, 72px); letter-spacing: -2px; margin: 8px 0 4px;
  color: var(--lime); font-variant-numeric: tabular-nums;
}
.pay-sub { color: var(--cream-ghost); font-size: 13.5px; font-family: var(--f-mono); letter-spacing: 1px; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 40px; width: 100%; max-width: 620px; }
.pm {
  background: rgba(244,243,239,.04); border: 1px solid var(--hairline-d); border-radius: 22px;
  padding: 28px 16px; font-weight: 600; font-size: 15.5px; color: var(--froth);
  display: flex; flex-direction: column; gap: 12px; align-items: center;
  transition: all var(--t-micro) var(--ease);
}
.pm .pm-ico { font-size: 30px; }
.pm:hover, .pm.picked { border-color: var(--lime); background: rgba(34,139,34,.14); transform: translateY(-3px); }
.pay-methods:has(.pm.big) { grid-template-columns: repeat(2, 1fr); max-width: 560px; }
.pm.big { padding: 40px 20px; font-size: 20px; gap: 16px; border-radius: 26px; }
.pm.big .pm-ico { font-size: 44px; }
.spinner { width: 52px; height: 52px; border-radius: 50%; border: 4px solid rgba(244,243,239,.12); border-top-color: var(--lime); animation: spin .9s linear infinite; margin: 36px auto 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.demo-note { margin-top: 30px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 1.4px; color: var(--steel); }

/* ───────────────────────── S6 CONFIRMATION ───────────────────────── */
.confirm-wrap { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 120px 26px 60px; overflow: hidden; }
.ring { position: absolute; left: 50%; top: 50%; border: 1.5px solid rgba(34,139,34,.4); border-radius: 50%; transform: translate(-50%, -50%); animation: ringPulse 3.2s var(--ease) infinite; pointer-events: none; }
.ring.r1 { width: 420px; height: 420px; }
.ring.r2 { width: 620px; height: 620px; animation-delay: .9s; }
.ring.r3 { width: 860px; height: 860px; animation-delay: 1.8s; }
@keyframes ringPulse { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.85); } 35% { opacity: .8; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.12); } }
.confirm-label { font-family: var(--f-mono); font-size: 12px; letter-spacing: 4px; text-transform: uppercase; color: var(--lime); }
.order-num {
  font-family: var(--f-display); font-weight: 700; font-size: clamp(110px, 20vw, 210px); line-height: 1;
  letter-spacing: -6px; color: var(--froth);
  text-shadow: 0 0 80px rgba(126, 217, 89, .35);
}
.confirm-status { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 500; color: var(--cream-ghost); margin-top: 14px; }
.confirm-status .dotp { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); animation: pulse 1.6s infinite; }
.confirm-status.ready {
  color: var(--lime); font-family: var(--f-display); font-weight: 800; font-size: 30px; letter-spacing: 1px;
  animation: readyFlash .6s var(--ease);
}
@keyframes readyFlash { 0% { transform: scale(.7); opacity: 0; } }
.confirm-id { margin-top: 14px; font-size: 14px; color: #FF7285; font-weight: 500; }
.confirm-fiscal { margin-top: 26px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 1.2px; color: var(--steel); }
.confirm-new { margin-top: 42px; min-width: 280px; }

/* ───────────────────────── footer note ───────────────────────── */
.kfooter { padding: 26px 18px 120px; text-align: center; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 1.4px; color: var(--steel); }
.kfooter b { color: var(--forest); font-weight: 600; }

/* ───────────────────────── responsive ───────────────────────── */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; padding-top: 100px; padding-bottom: 24px; gap: 0; }
  .hero-stage { height: 40vh; min-height: 300px; margin-top: 18px; }
  .hero-stage .p2, .hero-stage .p3 { display: none; }
  .hero-stage .p1 { width: min(280px, 58%); left: 50%; transform: translateX(-50%); top: 0; }
  .hero-stage .p1.ffv-float { animation-name: floatyC; }
  @keyframes floatyC { to { transform: translateX(-50%) translateY(-16px) rotate(-1.2deg); } }
  .h1 .l1, .h1 .l2 { font-size: clamp(38px, 11vw, 56px); }
  .h1 { margin-top: 18px; }
  .hero-sub { margin-top: 20px; }
  .hero-cta { margin-top: 28px; }
}
@media (max-width: 480px) {
  .h1 .l1, .h1 .l2 { font-size: 34px; line-height: 1.05; }
  .hero-sub { font-size: 14px; }
  .hero-stage { height: 34vh; min-height: 250px; }
  .lang-switch { top: 14px; right: 12px; padding: 5px 5px 5px 10px; }
  .lang-globe { margin-right: 3px; font-size: 13px; }
  .lang-opt { padding: 9px 13px; font-size: 12.5px; }
  .hero-grid { padding-top: 116px; }   /* clear the switch */
}
@media (max-width: 640px) {
  #kdsLink, .wait-chip { display: none; }
  header.kiosk { left: 10px; right: 10px; }
  .cl-total { display: none; }
  .paybar-inner .ghost-btn { padding: 20px 16px; font-size: 11px; letter-spacing: 1px; }
  .pay-btn { padding: 20px 22px; font-size: 14px; letter-spacing: 1px; }
  .pay-btn .mono { font-size: 15px; }
  .stats .stat { min-width: 46%; }
  .stat + .stat { border-left: 0; padding-left: 0; }
  .sheet { padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}
