/* Slime Lime — site-specific styles on top of design tokens */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-canvas);
  color: var(--fg-1);
  font-family: var(--font-body);
  overflow-x: hidden;
}

button { font-family: inherit; }
img { display: block; max-width: 100%; }
a { color: inherit; }

/* Theme accents — the active flavor pushes vars onto :root */
:root {
  --accent: var(--lime-400);
  --accent-deep: var(--lime-600);
  --accent-soft: rgba(202, 224, 15, 0.16);
  --accent-glow: rgba(202, 224, 15, 0.55);
}

/* ───────── Buttons ─────────
   Controls are 12px (shape rule). Transitions name their properties — never
   `all` — and hover styles only apply on devices that can actually hover, so
   touch taps don't leave buttons stuck in a hover state. */
.btn {
  font: 600 15px/1 var(--font-ui);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  transition:
    transform 140ms var(--ease-out),
    box-shadow 200ms var(--ease-out),
    background-color 200ms var(--ease-out),
    border-color 200ms var(--ease-out),
    color 200ms var(--ease-out),
    filter 200ms var(--ease-out);
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--accent);
  color: var(--ink-900);
  box-shadow: var(--gloss-pill);
  position: relative;
}
.btn-secondary {
  background: transparent;
  color: var(--fg-1);
  border-color: var(--border-2);
}
.btn-lg { font-size: 16px; padding: 16px 24px; border-radius: var(--radius-md); }
.btn-xl { font-size: 18px; padding: 20px 28px; border-radius: var(--radius-md); }
.btn-ghost { background: transparent; border: 1px solid var(--border-1); color: var(--fg-2); }

.iconbtn {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-2);
  background: var(--surface-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-2);
  cursor: pointer;
  transition:
    transform 140ms var(--ease-out),
    background-color 200ms var(--ease-out),
    border-color 200ms var(--ease-out),
    color 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:not(:disabled):hover {
    filter: brightness(1.08);
    box-shadow: 0 0 0 1px var(--accent), 0 0 32px var(--accent-glow), var(--gloss-pill);
    transform: translateY(-1px);
  }
  .btn-secondary:not(:disabled):hover {
    border-color: var(--border-strong);
    background: var(--surface-card);
  }
  .btn-ghost:not(:disabled):hover { color: var(--fg-1); border-color: var(--border-2); background: var(--surface-card); }
  .iconbtn:not(:disabled):hover { color: var(--fg-1); border-color: var(--border-strong); }
}

/* Press feedback for every button, inline-styled ones included.
   The base transition is wrapped in :where() (zero specificity) so any class
   or inline `transition` overrides it; those should list `transform` to keep
   the press smooth. `.btn-primary` presses the same as every other button.
   Exempt: full-width disclosure rows (plain buttons with aria-controls, e.g.
   FAQ rows) and tabs — list rows get a background highlight instead of a
   scale, and tabs are pressed too often to scale. */
:where(button) { transition: transform 140ms var(--ease-out); }
button:not(:disabled):not([role="tab"]):not([aria-controls]:not(.btn):not(.iconbtn)):active,
.btn:not(:disabled):not([role="tab"]):active,
.iconbtn:not(:disabled):not([role="tab"]):active { transform: scale(0.97); }
/* !important beats the rows' inline `background: transparent`. Not applied
   to tabs: the selected tab carries its own inline background. */
button[aria-controls]:not(.btn):not(.iconbtn):not([role="tab"]):not(:disabled):active {
  background-color: rgba(250, 252, 239, 0.04) !important;
}

/* Disabled: dimmed, inert to hover/press (hover/active rules exclude :disabled). */
.btn:disabled,
.iconbtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

/* ───────── Eyebrow / labels ───────── */
.eyebrow {
  font: 700 12px var(--font-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* ───────── HUD chrome — the gaming-overlay vocabulary ───────── */
.hud {
  font: 500 11px var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--fg-3);
  text-transform: uppercase;
}
.hud-pill {
  font: 600 11px var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-2);
  background: rgba(6, 13, 8, 0.4);
  backdrop-filter: blur(8px);
}
.hud-pill .dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hud-frame-corners {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hud-frame-corners::before,
.hud-frame-corners::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1.5px solid var(--accent);
}
.hud-frame-corners::before {
  top: 0; left: 0;
  border-right: 0; border-bottom: 0;
}
.hud-frame-corners::after {
  bottom: 0; right: 0;
  border-left: 0; border-top: 0;
}

/* ───────── Layout helpers ───────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
.container-prose { max-width: 760px; margin: 0 auto; padding: 0 32px; }
.section { padding: 120px 0; position: relative; }
.section-sm { padding: 64px 0; position: relative; }

/* ───────── Section dividers (HUD-style) ───────── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-2) 10%, var(--border-2) 90%, transparent);
}

/* ───────── Cards ───────── */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

/* ───────── Wordmark drip animation ───────── */
@keyframes drip {
  0% { transform: translateY(-2px); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ───────── Slime morph blob ───────── */
@keyframes slime-morph {
  0%, 100% { border-radius: 42% 58% 70% 30% / 45% 30% 70% 55%; }
  33% { border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%; }
  66% { border-radius: 30% 70% 30% 70% / 70% 30% 70% 30%; }
}
@keyframes slime-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ───────── Marquee ───────── */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ───────── Scrollbar (for cart, etc.) ───────── */
.thin-scroll::-webkit-scrollbar { width: 6px; }
.thin-scroll::-webkit-scrollbar-track { background: transparent; }
.thin-scroll::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 999px; }

/* ───────── Form inputs ───────── */
.input {
  background: var(--bg-sunken);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--fg-1);
  font: 500 15px var(--font-body);
  width: 100%;
  outline: none;
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ───────── Type ───────── */
.display-xl {
  font: 800 clamp(44px, 9vw, 128px)/0.92 var(--font-display);
  letter-spacing: -0.045em;
  margin: 0;
  font-optical-sizing: auto;
  text-wrap: balance;
}
.display-lg {
  font: 800 clamp(36px, 6vw, 88px)/0.96 var(--font-display);
  letter-spacing: -0.04em;
  margin: 0;
  font-optical-sizing: auto;
  text-wrap: balance;
}
.h1 {
  font: 700 clamp(40px, 5vw, 64px)/1.02 var(--font-ui);
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font: 700 clamp(32px, 4vw, 48px)/1.06 var(--font-ui);
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font: 600 clamp(22px, 2.4vw, 28px)/1.2 var(--font-ui);
  letter-spacing: -0.01em;
  margin: 0;
}
.body-lg { font: 400 clamp(17px, 1.4vw, 19px)/1.55 var(--font-body); color: var(--fg-2); }
.body { font: 400 16px/1.6 var(--font-body); color: var(--fg-2); }
.mono { font: 500 13px var(--font-mono); letter-spacing: 0.04em; }
.mono-sm { font: 500 11px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }

/* ───────── Hero canvas ───────── */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/bg-leaves.png');
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  filter: saturate(0.8);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 50%, transparent, var(--ink-800) 90%);
}

/* ───────── Glitchy section transitions ───────── */
.scanline {
  position: relative;
}
.scanline::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(202, 224, 15, 0.015) 3px,
    rgba(202, 224, 15, 0.015) 4px
  );
  opacity: 0.6;
}

/* ───────── Liquid blob (for hero) ───────── */
.liquid-blob {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  filter: blur(40px);
  animation: slime-morph 14s ease-in-out infinite;
  opacity: 0.45;
  pointer-events: none;
}

/* ───────── Sticky bar ───────── */
.sticky-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(6, 13, 8, 0.7);
  border-bottom: 1px solid var(--border-1);
}

/* ───────── Badge ───────── */
.badge {
  font: 700 10px var(--font-ui);
  letter-spacing: 0.16em;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink-900);
  text-transform: uppercase;
  display: inline-block;
}

/* ───────── Focus ───────── */
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ───────── Smooth scroll ───────── */
html { scroll-behavior: smooth; }

/* ───────── Highlight selection ───────── */
::selection { background: var(--accent); color: var(--ink-900); }

/* ───────── Layout grid for product cards ───────── */
.flavor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .flavor-grid { grid-template-columns: repeat(2, 1fr); }
  .container, .container-narrow { padding: 0 20px; }
  .section { padding: 80px 0; }
}
@media (max-width: 600px) {
  .flavor-grid { grid-template-columns: 1fr; }
  .container, .container-narrow, .container-prose { padding: 0 18px; }
  .section { padding: 64px 0; }
  .section-sm { padding: 48px 0; }
}

/* ───────── Reduced motion ─────────
   Gentler than a 0ms nuke: looping/ambient animations (marquee, pulse,
   slime-morph, rotate…) freeze in place, and declared transitions stay but are
   capped short so state changes still read as changes. The duration cap only
   targets elements that declare a transition (classes below or an inline
   style), so elements with the initial `transition-property: all` don't start
   animating. Press scale is dropped. Components should still swap movement
   for opacity under reduced motion (see the revamp rules). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-play-state: paused !important; }
  :where(button), .btn, .iconbtn, .input, [style*="transition"] {
    transition-duration: 120ms !important;
    transition-delay: 0s !important;
  }
  /* Same selectors as the press rule (same specificity, later in source). */
  button:not(:disabled):not([role="tab"]):not([aria-controls]:not(.btn):not(.iconbtn)):active,
  .btn:not(:disabled):not([role="tab"]):active,
  .iconbtn:not(:disabled):not([role="tab"]):active { transform: none; }
}

/* ───────── Home hero (3D stage) ───────── */
.hero-title {
  font: 800 clamp(46px, 6.2vw, 100px)/0.9 var(--font-display);
  letter-spacing: -0.05em;
  margin: 0;
  font-optical-sizing: auto;
  text-wrap: balance;
}
.hero-arrow {
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border-2, rgba(250,252,239,0.16));
  background: rgba(6, 13, 8, 0.55);
  color: var(--fg-1);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: border-color 160ms var(--ease-out, cubic-bezier(0.23,1,0.32,1)), transform 140ms var(--ease-out, cubic-bezier(0.23,1,0.32,1));
}
.hero-dot {
  height: 44px; min-width: 18px; padding: 0 4px;
  display: inline-grid; place-items: center;
  background: none; border: 0; cursor: pointer;
}
.hero-dot > span {
  display: block; height: 10px; border-radius: 999px;
  border: 1.5px solid;
  box-shadow: 0 0 10px color-mix(in srgb, var(--dot) 45%, transparent);
  transition: width 260ms var(--ease-out, cubic-bezier(0.23,1,0.32,1)), background-color 200ms linear;
}
.hero-arrow:focus-visible, .hero-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .hero-arrow:hover { border-color: var(--accent); }
}

/* ───────── GSAP motion layer (motion.js) ───────── */
/* Motion rides on individual `translate` / CSS vars so it never fights React's inline transforms. */
.btn { --mx: 0px; --my: 0px; translate: var(--mx) var(--my); }
.sl-rv { --rv: 0px; translate: 0 var(--rv); }
.sl-tilt {
  --tx: 0deg; --ty: 0deg; --gx: 50%; --gy: 50%; --ga: 0;
  transform: perspective(900px) rotateX(var(--tx)) rotateY(var(--ty));
}
.sl-tilt::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,255,255,0.22), transparent 55%);
  opacity: var(--ga); mix-blend-mode: soft-light;
}
.sl-curtain { position: fixed; inset: 0; z-index: 300; pointer-events: auto; overflow: hidden; }
.sl-curtain-panel { position: absolute; inset: 0; will-change: transform; }
.sl-curtain-accent { background: var(--accent); }
.sl-curtain-ink {
  background: radial-gradient(ellipse at 50% 55%, var(--ink-800), var(--ink-900) 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.sl-curtain-mark { width: 72px; height: 72px; filter: drop-shadow(0 0 18px var(--accent-glow)); }
.sl-curtain-label { font: 500 11px var(--font-mono); letter-spacing: 0.22em; color: var(--fg-3); }
.nav-ind {
  position: absolute; left: 0; bottom: -2px; height: 2px; width: 100px;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
  transform-origin: left center; pointer-events: none;
}

/* ───────── Game layer (game.js) ───────── */
.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; }
.sl-skew { transform: skewY(var(--sl-skew, 0deg)); transform-origin: 50% 50%; }
.sl-glitch { animation: sl-rgb 520ms steps(2, end) 1; }
@keyframes sl-rgb {
  0%   { text-shadow: 3px 0 #ff2a6d, -3px 0 #05d9e8; }
  40%  { text-shadow: -2px 1px #ff2a6d, 2px -1px #05d9e8; }
  80%  { text-shadow: 1px 0 #ff2a6d, -1px 0 #05d9e8; }
  100% { text-shadow: none; }
}
.sl-ch { display: inline-block; transform-origin: 50% 100%; backface-visibility: hidden; }

.sl-hud {
  position: fixed; left: 16px; bottom: 16px; z-index: 70; width: 248px; box-sizing: border-box;
  padding: 10px 12px; border: 1px solid var(--border-2); border-radius: 12px;
  background: rgba(6, 13, 8, 0.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 500 10px/1 var(--font-mono); letter-spacing: 0.12em; color: var(--fg-3);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.sl-hud::before, .sl-hud::after { content: ""; position: absolute; width: 8px; height: 8px; border-color: var(--accent); border-style: solid; pointer-events: none; }
.sl-hud::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-top-left-radius: 12px; }
.sl-hud::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-bottom-right-radius: 12px; }
.sl-hud-top { display: flex; align-items: center; gap: 8px; padding-right: 64px; }
.sl-hud-lvl { padding: 3px 6px; border-radius: 4px; background: var(--accent); color: #0E0F0A; font-weight: 700; white-space: nowrap; }
.sl-hud-lvl b, .sl-hud-xp b { font-weight: 700; }
.sl-hud-name { flex: 1; min-width: 0; color: var(--fg-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-hud-xp { position: absolute; right: 12px; top: 13px; }
.sl-hud-xp b { color: var(--accent); }
.sl-hud-bar { margin-top: 9px; height: 6px; border-radius: 2px; background: var(--border-1); overflow: hidden;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 9px, transparent 9px 11px); mask: repeating-linear-gradient(90deg, #000 0 9px, transparent 9px 11px); }
.sl-hud-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #fff); transform-origin: left; transform: scaleX(0); }
.sl-hud-trophy {
  position: absolute; right: -1px; top: -34px; display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 999px; border: 1px solid var(--border-2); background: rgba(6,13,8,0.88);
  color: var(--accent); font: 700 10px/1 var(--font-mono); letter-spacing: 0.1em; cursor: pointer;
}
.sl-ach-panel {
  position: absolute; left: 0; bottom: calc(100% + 44px); width: 280px; box-sizing: border-box; padding: 12px;
  border: 1px solid var(--border-2); border-radius: 12px; background: rgba(6,13,8,0.95);
  display: grid; gap: 8px; box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.sl-ach-panel[hidden] { display: none; }
.sl-ach-h { color: var(--accent); margin-bottom: 2px; }
.sl-ach { display: flex; gap: 10px; align-items: center; opacity: 0.45; }
.sl-ach.is-on { opacity: 1; }
.sl-ach-code { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border-2); color: var(--fg-2); font-weight: 700; }
.sl-ach.is-on .sl-ach-code { background: var(--accent); color: #0E0F0A; border-color: transparent; box-shadow: 0 0 14px var(--accent-glow); }
.sl-ach b { display: block; color: var(--fg-1); font: 600 12px/1.2 var(--font-ui); letter-spacing: 0; }
.sl-ach small { display: block; margin-top: 3px; font-size: 10px; letter-spacing: 0.04em; }

.sl-toasts { position: fixed; right: 16px; bottom: 80px; z-index: 95; display: grid; gap: 10px; pointer-events: none; }
.sl-toast {
  display: flex; gap: 12px; align-items: center; width: 290px; box-sizing: border-box; padding: 12px 14px;
  border: 1px solid var(--accent); border-radius: 12px; background: rgba(6,13,8,0.94);
  box-shadow: 0 0 28px var(--accent-glow), 0 18px 40px rgba(0,0,0,0.5);
}
.sl-toast-code { flex: 0 0 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: #0E0F0A; font: 800 14px var(--font-mono); }
.sl-toast small { display: block; font: 500 9px var(--font-mono); letter-spacing: 0.18em; color: var(--accent); }
.sl-toast b { display: block; min-height: 1.2em; margin-top: 4px; font: 700 16px/1.2 var(--font-ui); color: var(--fg-1); }
.sl-toast em { display: block; margin-top: 2px; font: 400 12px var(--font-body); font-style: normal; color: var(--fg-3); }

.sl-banner {
  position: fixed; left: 50%; top: 118px; z-index: 95; transform: translateX(-50%); visibility: hidden;
  display: flex; gap: 14px; align-items: center; padding: 12px 26px; overflow: hidden; pointer-events: none;
  border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent);
  background: linear-gradient(90deg, transparent, rgba(6,13,8,0.94) 12%, rgba(6,13,8,0.94) 88%, transparent);
  font: 700 13px/1 var(--font-mono); letter-spacing: 0.24em; white-space: nowrap;
}
.sl-banner-k { color: #0E0F0A; background: var(--accent); padding: 4px 8px; border-radius: 3px; }
.sl-banner-t { color: var(--fg-1); min-width: 10ch; }
.sl-banner-scan { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--accent-glow), transparent); mix-blend-mode: screen; }

.sl-speed {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(202,224,15,0.08) 46px 47px, transparent 47px 140px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55));
  -webkit-mask: linear-gradient(90deg, #000, transparent 22%, transparent 78%, #000); mask: linear-gradient(90deg, #000, transparent 22%, transparent 78%, #000);
}
.sl-loot { position: fixed; z-index: 120; height: auto; pointer-events: none; filter: drop-shadow(0 0 12px var(--accent-glow)); }
.sl-plus { position: absolute; right: -6px; top: -12px; font: 800 14px var(--font-mono); color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); pointer-events: none; }
.sl-rain { position: fixed; inset: 0; z-index: 250; pointer-events: none; overflow: hidden; }
.sl-rain-b { position: absolute; width: 60px; height: auto; }
.sl-slime-flash { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, rgba(202,224,15,0.22), transparent 60%); }
.sl-slime-flash b { font: 800 clamp(48px, 10vw, 140px)/1 var(--font-display); letter-spacing: -0.04em; color: var(--accent); text-shadow: 4px 0 #ff2a6d, -4px 0 #05d9e8, 0 0 60px var(--accent-glow); }

@media (max-width: 599px) {
  .sl-hud { left: 10px; bottom: 10px; width: 200px; padding: 8px 10px; }
  .sl-hud-top { padding-right: 52px; }
  .sl-hud-xp { right: 10px; top: 11px; }
  .sl-toasts { right: 10px; left: 10px; top: 104px; bottom: auto; }   /* top on phones: the bottom holds the HUD + sticky controls */
  .sl-toast { width: auto; }
  .sl-banner { top: 92px; font-size: 11px; padding: 10px 16px; }
}
@media (prefers-reduced-motion: reduce) { .sl-speed { display: none; } .sl-glitch { animation: none; } }

/* Character select (Lineup, GSAP mode) */
.cs { --cw: clamp(170px, min(62vw, calc((100svh - 560px) * 0.8)), 330px); position: relative; height: 100svh; box-sizing: border-box;
  padding-top: 112px; padding-bottom: 20px; display: flex; flex-direction: column; overflow: hidden; }
.cs-top { width: 100%; box-sizing: border-box; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; }
.cs-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; perspective: 1400px; }
.cs-track { display: flex; gap: 28px; padding: 0 calc(50vw - var(--cw) / 2); will-change: transform; }
.cs-slot { flex: 0 0 var(--cw); transform-style: preserve-3d; }
.cs-frame { position: absolute; left: 50%; top: 50%; width: calc(var(--cw) + 30px); height: calc(var(--cw) * 1.25 + 136px); transform: translate(-50%, -50%); pointer-events: none; z-index: 2; }
.cs-frame i { position: absolute; width: 22px; height: 22px; border: 0 solid var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); }
.cs-frame i:nth-child(1) { left: 0; top: 0; border-width: 2px 0 0 2px; }
.cs-frame i:nth-child(2) { right: 0; top: 0; border-width: 2px 2px 0 0; }
.cs-frame i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 2px 2px; }
.cs-frame i:nth-child(4) { right: 0; bottom: 0; border-width: 0 2px 2px 0; }
.cs-frame b { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); font: 700 10px var(--font-mono); letter-spacing: 0.2em; color: #0E0F0A; background: var(--accent); padding: 4px 8px; border-radius: 3px; white-space: nowrap; }
.cs-panel { min-width: min(100%, 340px); }
.cs-name { font: 800 clamp(22px, 2.4vw, 32px)/1 var(--font-display); letter-spacing: -0.03em; color: var(--fg-1); min-height: 1em; margin-bottom: 12px; }
.cs-stats { display: grid; grid-template-columns: 48px 1fr 26px; gap: 7px 12px; align-items: center; font: 500 10px var(--font-mono); letter-spacing: 0.14em; color: var(--fg-3); }
.cs-stats span:nth-child(3n) { color: var(--fg-1); text-align: right; }
.cs-stat-bar { height: 6px; border-radius: 2px; background: var(--border-1); overflow: hidden; }
.cs-stat-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; box-shadow: 0 0 8px var(--accent-glow); }
.cs-pips { display: flex; gap: 2px; margin-top: 10px; }
.cs-pips button { width: 30px; height: 24px; padding: 0; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.cs-pips span { width: 18px; height: 5px; border-radius: 2px; background: var(--border-2); transition: background-color 200ms, width 200ms; }
.cs-pips [aria-current="true"] span { width: 26px; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.cs-hint { font: 500 10px var(--font-mono); letter-spacing: 0.2em; color: var(--fg-4); text-align: center; margin-top: 8px; }
.cs-top .display-lg { font-size: clamp(30px, min(5.6vw, 7.5svh), 84px); }
@media (max-width: 899px) {
  .cs { --cw: clamp(170px, min(64vw, calc((100svh - 600px) * 0.8)), 290px); padding-top: 88px; }
  .cs-track { gap: 14px; }
  .cs-top .display-lg { font-size: 30px; }
  .cs-top .eyebrow { margin-bottom: 8px !important; }
  .cs-name { font-size: 20px; margin-bottom: 8px; }
  .cs-stats { gap: 5px 10px; }
}

/* ───────── Presence: players online + ghost cursors (presence.js) ───────── */
.sl-online {
  display: inline-flex; align-items: center; gap: 8px; padding: 2px 8px 2px 6px; margin: -2px 0;
  border: 1px solid transparent; border-radius: 999px; background: transparent; cursor: pointer;
  font: 500 11px/1.4 var(--font-mono); letter-spacing: 0.12em; color: var(--fg-2); white-space: nowrap;
  transition: border-color 160ms var(--ease-out, ease-out), background-color 160ms var(--ease-out, ease-out);
}
.sl-online:hover, .sl-online[aria-expanded="true"] { border-color: var(--border-2); background: rgba(250,252,239,0.04); }
.sl-online:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sl-online b { color: var(--fg-1); font-weight: 700; font-variant-numeric: tabular-nums; }
.sl-live-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #3BEA7C; box-shadow: 0 0 8px rgba(59,234,124,0.8); flex: none; }
.sl-live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid #3BEA7C; opacity: 0; animation: sl-live-ping 2.4s cubic-bezier(0.23,1,0.32,1) infinite; }
@keyframes sl-live-ping { 0% { transform: scale(0.4); opacity: 0.9; } 70%, 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sl-live-dot::after { animation: none; } }

.sl-online-pop {
  position: fixed; z-index: 90; width: 268px; box-sizing: border-box; padding: 14px;
  border: 1px solid var(--border-2); border-radius: 12px; background: rgba(6,13,8,0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.6); font: 500 10px/1.4 var(--font-mono); letter-spacing: 0.12em; color: var(--fg-3);
}
.sl-online-pop::before { content: ""; position: absolute; top: -1px; left: -1px; width: 8px; height: 8px; border: solid #3BEA7C; border-width: 2px 0 0 2px; border-top-left-radius: 12px; }
.sl-online-big { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 2px; font: 700 30px/1 var(--font-mono); letter-spacing: -0.02em; color: var(--fg-1); font-variant-numeric: tabular-nums; }
.sl-online-big small { font: 500 10px var(--font-mono); letter-spacing: 0.14em; color: #3BEA7C; }
.sl-online-spark { display: block; width: 100%; height: 34px; margin: 8px 0 10px; }
.sl-online-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border-1); color: var(--fg-2); }
.sl-online-row b { color: var(--fg-1); font-variant-numeric: tabular-nums; }
.sl-online-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0 0; margin-top: 2px;
  border: 0; border-top: 1px solid var(--border-1); background: none; color: var(--fg-1); cursor: pointer; text-align: left; font: 600 12px/1.3 var(--font-ui); letter-spacing: 0; }
.sl-online-toggle small { display: block; margin-top: 3px; font: 400 11px/1.35 var(--font-body); color: var(--fg-3); }
.sl-online-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sl-switch { position: relative; flex: none; width: 34px; height: 20px; border-radius: 999px; background: var(--border-2); transition: background-color 180ms var(--ease-out, ease-out); }
.sl-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--fg-1); transition: transform 220ms cubic-bezier(0.23,1,0.32,1); }
.sl-switch.is-on { background: var(--accent); }
.sl-switch.is-on::after { transform: translateX(14px); background: #0E0F0A; }

.sl-ghosts { position: fixed; inset: 0; z-index: 75; pointer-events: none; overflow: hidden; }
.sl-ghost { position: absolute; left: 0; top: 0; will-change: transform; pointer-events: none; user-select: none; }
/* pointer + bubble: ported from the shadcn Cursor component (CursorPointer / CursorBody / CursorName / CursorMessage) */
.sl-ghost-arrow { display: block; color: var(--g); filter: drop-shadow(0 0 1px rgba(6,13,8,0.9)) drop-shadow(0 2px 6px rgba(0,0,0,0.5)); transform-origin: 1px 1px; }
.sl-ghost-body {
  position: absolute; left: 14px; top: 17px; display: flex; flex-direction: column; white-space: nowrap;
  padding: 4px 12px 4px 10px; border-radius: 12px;
  background: color-mix(in srgb, var(--g) 22%, #fff); color: color-mix(in srgb, var(--g) 45%, #0E0F0A);
  font: 600 12px/1.35 var(--font-ui); box-shadow: 0 6px 18px rgba(0,0,0,0.4); transform-origin: 0 0;
}
.sl-ghost-name { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.01em; }
.sl-ghost-msg { display: none; font-weight: 500; }
.sl-ghost-body.has-msg { border-top-left-radius: 4px; padding-top: 5px; padding-bottom: 6px; }
.sl-ghost-body.has-msg .sl-ghost-name { opacity: 0.7; }
.sl-ghost-body.has-msg .sl-ghost-msg { display: block; }
.sl-ghost.is-flip .sl-ghost-body { left: auto; right: -2px; transform-origin: 100% 0; }
.sl-ghost.is-flip .sl-ghost-body.has-msg { border-top-left-radius: 12px; border-top-right-radius: 4px; }
.sl-ghost-ring { position: absolute; left: 1px; top: 1px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--g); opacity: 0; transform: translate(-50%,-50%); }

/* ───────── Fridge (cart) — fridge.jsx ───────── */
.fr-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 540px; max-width: 100%; box-sizing: border-box;
  display: flex; flex-direction: column; padding: clamp(18px, 4.5vw, 26px) clamp(16px, 4.5vw, 28px) clamp(16px, 4vw, 24px);
  background:
    radial-gradient(120% 50% at 50% 0%, rgba(205,255,232,0.07), transparent 60%),
    linear-gradient(180deg, #0c1611 0%, #08110d 55%, #060c09 100%);
  border-left: 1px solid var(--border-2);
  box-shadow: -30px 0 80px rgba(0,0,0,0.6), inset 14px 0 30px -18px rgba(0,0,0,0.9), inset -14px 0 30px -18px rgba(0,0,0,0.9);
}
.fr-led { position: absolute; top: 0; left: 12%; right: 12%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(230,255,244,0.95), transparent); box-shadow: 0 0 18px 2px rgba(200,255,230,0.45); opacity: 0.9; }
.fr-led.is-on { animation: fr-flicker 900ms steps(1, end) both; }
@keyframes fr-flicker { 0% { opacity: 0; } 12% { opacity: 0.9; } 20% { opacity: 0.15; } 32% { opacity: 0.9; } 40% { opacity: 0.35; } 52%, 100% { opacity: 0.9; } }
@media (prefers-reduced-motion: reduce) { .fr-led.is-on { animation: none; } }
.fr-head { display: flex; justify-content: space-between; align-items: center; }
.fr-status { display: flex; align-items: center; gap: 8px; margin: 16px 0 10px; padding: 8px 12px; border: 1px solid var(--border-1); border-radius: 12px; background: var(--ink-900); font: 500 11px var(--font-mono); letter-spacing: 0.08em; color: var(--fg-3); }
.fr-status-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); flex: none; }
.fr-empty-btn { margin: -4px -6px -4px auto; flex: none; padding: 6px 10px; border: 1px solid var(--border-1); border-radius: 8px; background: none; color: var(--fg-2); font: 500 11px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: color 160ms ease-out, border-color 160ms ease-out; }
.fr-empty-btn:hover:not(:disabled) { color: var(--fg-1); border-color: var(--fg-3); }
.fr-empty-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fr-empty-btn:disabled { opacity: 0.4; cursor: default; }
.fr-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 -8px; padding: 6px 8px 10px; overscroll-behavior: contain; }

.fr-row { margin-top: 18px; }
.fr-row-bottles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 3vw, 22px); padding: 0 clamp(4px, 2vw, 14px); align-items: end; }
.fr-bottle { position: relative; display: block; width: 100%; aspect-ratio: 800 / 975; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; }
.fr-bottle img { position: absolute; left: 0; top: 0; width: 100%; height: auto; pointer-events: none; user-select: none; }
.fr-front { z-index: 2; filter: drop-shadow(0 10px 14px rgba(0,0,0,0.45)); transition: transform 220ms var(--ease-out, ease-out), filter 220ms var(--ease-out, ease-out); }
.fr-back { z-index: 1; transform-origin: 50% 91%; filter: brightness(0.36) saturate(0.85); }
.fr-back-1 { transform: translate(-17%, -3%) scale(0.86); }
.fr-back-2 { transform: translate(17%, -3%) scale(0.86); }
.fr-bottle.is-empty .fr-front { opacity: 0.2; filter: grayscale(0.6) brightness(0.8); }
.fr-plus { position: absolute; z-index: 3; left: 50%; top: 58%; width: 30px; height: 30px; transform: translate(-50%, -50%); display: grid; place-items: center; border-radius: 50%; border: 1px dashed var(--border-strong); color: var(--fg-2); background: rgba(6,13,8,0.6); }
@media (hover: hover) and (pointer: fine) {
  .fr-bottle:hover .fr-front { transform: translateY(-5px); filter: drop-shadow(0 16px 18px rgba(0,0,0,0.5)) drop-shadow(0 0 18px var(--accent-glow)); }
  .fr-bottle.is-empty:hover .fr-front { opacity: 0.4; }
  .fr-bottle:hover .fr-plus { color: var(--accent); border-color: var(--accent); }
}
.fr-bottle:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.fr-bottle:active .fr-front { transform: scale(0.97); }

/* glass shelf: lit top face, bright front edge, shadow on the wall below */
.fr-shelf { position: relative; height: 12px; margin: -2px -4px 0; border-radius: 3px;
  background: linear-gradient(180deg, rgba(215,255,238,0.18), rgba(215,255,238,0.05) 55%, rgba(215,255,238,0.14));
  box-shadow: inset 0 1px 0 rgba(236,255,246,0.4), 0 1px 0 rgba(236,255,246,0.22), 0 16px 26px -10px rgba(0,0,0,0.85); }
.fr-shelf::after { content: ""; position: absolute; left: 6%; right: 6%; top: 100%; height: 26px; background: radial-gradient(50% 100% at 50% 0%, rgba(200,255,230,0.06), transparent); }
.fr-tags { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 3vw, 22px); padding: 10px clamp(4px, 2vw, 14px) 0; text-align: center; }
.fr-tag b { display: block; font: 600 13px/1.2 var(--font-ui); color: var(--fg-1); }
.fr-tag span { display: block; margin-top: 3px; font: 500 10px var(--font-mono); letter-spacing: 0.08em; color: var(--accent); }
.fr-tag.is-empty b { color: var(--fg-3); }
.fr-tag.is-empty span { color: var(--fg-4); }

.fr-crisper { margin-top: 26px; padding: 12px; border-radius: 14px; border: 1px solid rgba(215,255,238,0.16);
  background: linear-gradient(180deg, rgba(215,255,238,0.07), rgba(215,255,238,0.02)); box-shadow: inset 0 1px 0 rgba(236,255,246,0.18); }
.fr-crisper.is-top { margin: 0 0 22px; }
.fr-crisper-h { display: flex; justify-content: space-between; gap: 10px; font: 600 10px var(--font-mono); letter-spacing: 0.12em; color: var(--accent); margin-bottom: 8px; }
.fr-crisper-h span:last-child { color: var(--fg-3); font-weight: 500; }
.fr-crisper ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fr-crisper li { display: flex; align-items: center; gap: 10px; }
.fr-crisper img { width: 30px; height: 40px; object-fit: cover; object-position: 50% 45%; }
.fr-crisper-name { flex: 1; font: 600 13px var(--font-ui); }

.fr-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 26px; padding: 22px; border: 1px dashed var(--border-2); border-radius: 16px; text-align: center; font: 400 14px var(--font-body); color: var(--fg-3); }
.fr-hint-line { margin: 22px 0 0; text-align: center; font: 500 10px var(--font-mono); letter-spacing: 0.16em; color: var(--fg-4); }

/* steppers + packs */
.fr-step { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--border-2); border-radius: 999px; padding: 3px; background: var(--ink-900); }
.fr-step button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 999px; background: transparent; color: var(--fg-1); cursor: pointer; transition: background-color 140ms var(--ease-out, ease-out), transform 140ms var(--ease-out, ease-out); }
.fr-step button:hover:not(:disabled) { background: rgba(250,252,239,0.06); }
.fr-step button:active:not(:disabled) { transform: scale(0.92); }
.fr-step button:disabled { color: var(--fg-4); cursor: default; }
.fr-step b { min-width: 30px; text-align: center; font: 700 15px var(--font-mono); font-variant-numeric: tabular-nums; }
.fr-step-sm button { width: 24px; height: 24px; }
.fr-step-sm b { min-width: 20px; font-size: 12px; }

/* close-up */
.fr-detail { padding-top: 4px; }
.fr-backbtn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px 6px 4px; margin-left: -4px; border: 0; border-radius: 8px; background: none; color: var(--fg-1); font: 600 14px var(--font-ui); cursor: pointer; }
.fr-backbtn:hover { color: var(--accent); }
.fr-backbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fr-stage { position: relative; height: clamp(250px, 40vh, 400px); margin-top: 10px; border-radius: 18px; overflow: hidden;
  background: radial-gradient(60% 60% at 50% 62%, color-mix(in srgb, var(--g) 22%, transparent), transparent 70%), rgb(9,17,13);
  box-shadow: inset 0 0 0 1px rgba(215,255,238,0.08); }
.fr-stage-img { position: absolute; z-index: 2; left: 50%; bottom: 0; height: 99%; width: auto; transform: translateX(-50%); pointer-events: none; transition: opacity 260ms var(--ease-out, ease-out); filter: drop-shadow(0 14px 18px rgba(0,0,0,0.5)); }
.fr-stage-3d { position: absolute; inset: 0; z-index: 1; transition: opacity 260ms var(--ease-out, ease-out); }
.fr-stage-shelf { position: absolute; z-index: 0; left: 8%; right: 8%; bottom: 7%; height: 10px; border-radius: 3px;
  background: linear-gradient(180deg, rgba(215,255,238,0.16), rgba(215,255,238,0.04)); box-shadow: inset 0 1px 0 rgba(236,255,246,0.35), 0 14px 24px -10px rgba(0,0,0,0.8); }
.fr-hint { margin: 8px 0 0; text-align: center; font: 500 10px var(--font-mono); letter-spacing: 0.18em; color: var(--fg-4); }
.fr-info { margin-top: 14px; }
.fr-new { margin-left: 8px; padding: 2px 6px; border-radius: 4px; background: var(--accent); color: #0E0F0A; font-weight: 700; }
.fr-name { margin: 6px 0 0; font: 800 clamp(26px, 6vw, 34px)/1.05 var(--font-display); letter-spacing: -0.02em; }
.fr-tagline { margin: 6px 0 0; font: 400 15px/1.45 var(--font-body); color: var(--fg-2); }
.fr-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin-top: 14px; font: 400 13px var(--font-body); color: var(--fg-3); }
.fr-price b { font: 700 22px var(--font-mono); color: var(--fg-1); }
.fr-price em { font-style: normal; margin-left: auto; font: 500 11px var(--font-mono); letter-spacing: 0.06em; color: var(--accent); }
.fr-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.fr-packs { display: flex; gap: 6px; flex: 1; min-width: 0; }
.fr-packs button { flex: 1; min-width: 0; height: 42px; padding: 0 8px; border-radius: 12px; border: 1px solid var(--border-2); background: transparent; color: var(--fg-2); font: 600 13px var(--font-ui); cursor: pointer; white-space: nowrap; transition: border-color 140ms var(--ease-out, ease-out), color 140ms var(--ease-out, ease-out), background-color 140ms var(--ease-out, ease-out); }
.fr-packs button:hover { border-color: var(--border-strong); color: var(--fg-1); }
.fr-packs button.is-on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.fr-clear { margin-top: 10px; padding: 4px 0; border: 0; background: none; color: var(--fg-3); font: 500 12px var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fr-clear:hover { color: var(--fg-1); }
.fr-desc { margin: 16px 0 0; font: 400 14px/1.55 var(--font-body); color: var(--fg-2); }
.fr-specs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; padding: 0; }
.fr-specs li { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border-1); font: 500 11px var(--font-mono); letter-spacing: 0.04em; color: var(--fg-3); }
.fr-specs b { color: var(--fg-1); }
.fr-foot { border-top: 1px solid var(--border-1); padding-top: 16px; margin-top: 8px; }

/* ───────── Subscribe: "Stock the fridge" mini game — subscribe.jsx ───────── */
.sb-hero { position: relative; padding: 72px 0 28px; overflow: hidden; }
.sb-k-stack { color: var(--accent); font-family: var(--font-mono); letter-spacing: 0.04em; }
.sb-k-rainbow { font-family: var(--font-mono); letter-spacing: 0.04em; background: linear-gradient(90deg, #FF3D5C, #FF9A1F, #CAE00F, #3D8BFF, #B96BFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sb-section { padding-bottom: 80px; }
.sb-stage { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 899px) { .sb-stage { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.sb-left, .sb-right { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* fridge shell */
.sb-fridge { position: relative; padding: 14px; border-radius: 24px; border: 1px solid var(--border-2);
  background: linear-gradient(180deg, #121d17, #0b130f); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.9), inset 0 1px 0 rgba(236,255,246,0.08); }
.sb-fridge-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 2px 4px 12px; }
.sb-models { display: grid; grid-template-columns: repeat(4, auto); gap: 6px; }
.sb-models button { display: flex; align-items: baseline; gap: 6px; padding: 7px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-1); background: var(--ink-900); color: var(--fg-2); transition: border-color 160ms var(--ease-out, ease-out), background-color 160ms var(--ease-out, ease-out), color 160ms var(--ease-out, ease-out); }
.sb-models b { font: 700 14px var(--font-mono); }
.sb-models span { font: 500 11px var(--font-ui); color: var(--fg-3); }
.sb-models button.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.sb-models button.is-on span { color: var(--fg-2); }
@media (max-width: 600px) { .sb-models { grid-template-columns: repeat(4, 1fr); width: 100%; } .sb-models button { flex-direction: column; align-items: center; gap: 0; padding: 6px 4px; border-radius: 12px; } }

.sb-cabinet { position: relative; perspective: 1600px; border-radius: 16px; padding: 20px clamp(10px, 2.4vw, 22px) 14px;
  background: radial-gradient(120% 60% at 50% 0%, rgba(205,255,232,0.09), transparent 60%), linear-gradient(180deg, #0d1813, #08100c);
  box-shadow: inset 0 0 0 1px rgba(215,255,238,0.08), inset 0 18px 40px -20px rgba(0,0,0,0.9); min-height: 220px; }
.sb-led { position: absolute; top: 0; left: 10%; right: 10%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(230,255,244,0.95), transparent); box-shadow: 0 0 18px 2px rgba(200,255,230,0.45); animation: fr-flicker 900ms steps(1, end) both; }
.sb-shelves { display: flex; flex-direction: column; gap: 14px; }
.sb-row { position: relative; }
.sb-row-slots { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, var(--slot))); justify-content: center; gap: clamp(4px, 1.2vw, 10px); align-items: end; padding: 0 4px; }
.sb-shelf { position: relative; height: 10px; margin: -3px 0 0; border-radius: 3px;
  background: linear-gradient(180deg, rgba(215,255,238,0.18), rgba(215,255,238,0.05) 55%, rgba(215,255,238,0.14));
  box-shadow: inset 0 1px 0 rgba(236,255,246,0.4), 0 1px 0 rgba(236,255,246,0.22), 0 14px 24px -10px rgba(0,0,0,0.85);
  transition: box-shadow 260ms var(--ease-out, ease-out), background 260ms var(--ease-out, ease-out); }
.sb-row.is-stack .sb-shelf { background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 70%, #fff), color-mix(in srgb, var(--rc) 30%, transparent)); box-shadow: 0 0 18px 1px color-mix(in srgb, var(--rc) 60%, transparent), 0 14px 24px -10px rgba(0,0,0,0.85); }
.sb-row.is-rainbow .sb-shelf { background: linear-gradient(90deg, #FF3D5C, #FF9A1F, #CAE00F, #2ED3B7, #3D8BFF, #B96BFF); box-shadow: 0 0 18px 1px rgba(255,255,255,0.25), 0 14px 24px -10px rgba(0,0,0,0.85); }
.sb-row.is-flash .sb-row-slots { animation: sb-rowflash 1000ms ease-out; }
@keyframes sb-rowflash { 0% { filter: brightness(1); } 18% { filter: brightness(1.8) saturate(1.3); } 100% { filter: brightness(1); } }
.sb-row-badge { position: absolute; right: 2px; bottom: 5px; transform: translateY(50%); padding: 2px 7px; border-radius: 999px;
  font: 700 9px var(--font-mono); letter-spacing: 0.12em; background: var(--ink-900); border: 1px solid var(--border-2); color: var(--fg-2); }
.sb-row.is-stack .sb-row-badge { color: var(--rc); border-color: color-mix(in srgb, var(--rc) 60%, transparent); }
.sb-row.is-rainbow .sb-row-badge { color: #fff; border-color: rgba(255,255,255,0.35); }

.sb-slot { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; padding: 0; cursor: pointer; border-radius: 9px;
  border: 1px dashed rgba(215,255,238,0.1); background: rgba(215,255,238,0.015); touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  animation: sb-slot-in 320ms var(--ease-out, ease-out) both; transition: border-color 160ms ease-out, background-color 160ms ease-out, transform 160ms ease-out; }
@keyframes sb-slot-in { from { opacity: 0; transform: translateY(8px) scale(0.92); } }
.sb-slot.is-full { border-color: transparent; background: none; }
.sb-slot img { position: absolute; inset: -6% -10% 0; width: 120%; height: 106%; object-fit: contain; object-position: 50% 100%; pointer-events: none; user-select: none; -webkit-user-drag: none;
  transform-origin: 50% 100%; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.5)); }
.sb-slot.is-reel img { filter: blur(1.2px) brightness(1.15); transform: translateY(-3px); }
.sb-slot-plus { position: absolute; inset: 0; display: grid; place-items: center; color: var(--fg-4); opacity: 0; transition: opacity 160ms ease-out, color 160ms ease-out; }
.sb-slot.is-next { border: 1px solid color-mix(in srgb, var(--g) 70%, transparent); background: color-mix(in srgb, var(--g) 8%, transparent); }
.sb-slot.is-next .sb-slot-plus { opacity: 1; color: var(--g); animation: sb-next 1.4s ease-in-out infinite; }
@keyframes sb-next { 50% { transform: scale(1.25); opacity: 0.55; } }
.sb-slot.is-hover { border: 1px solid var(--accent); background: var(--accent-soft); transform: scale(1.06); }
.sb-slot.is-hover.is-full { box-shadow: 0 0 0 2px var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .sb-slot:not(.is-full):hover { border-color: color-mix(in srgb, var(--g) 60%, transparent); }
  .sb-slot:not(.is-full):hover .sb-slot-plus { opacity: 1; color: var(--g); }
  .sb-slot.is-full:hover img { transform: translateY(-4px); filter: drop-shadow(0 12px 14px rgba(0,0,0,0.55)) drop-shadow(0 0 12px color-mix(in srgb, var(--g) 45%, transparent)); }
  .sb-slot.is-full { cursor: grab; }
}
.sb-slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* door */
.sb-door { position: absolute; inset: 0; z-index: 4; border-radius: 16px; padding: 0; cursor: pointer; transform-origin: 0 50%;
  border: 1px solid rgba(215,255,238,0.22); color: var(--fg-1);
  background: linear-gradient(115deg, rgba(220,255,240,0.16), rgba(220,255,240,0.05) 38%, rgba(220,255,240,0.11) 52%, rgba(220,255,240,0.03)), rgba(8,16,12,0.7);
  backdrop-filter: blur(5px) saturate(1.2); -webkit-backdrop-filter: blur(5px) saturate(1.2);
  box-shadow: inset 0 0 0 6px rgba(8,16,12,0.55), 0 20px 50px -20px rgba(0,0,0,0.9);
  transition: transform 620ms cubic-bezier(0.32, 0.72, 0, 1), opacity 420ms ease-out; }
.sb-cabinet:not(.is-shut) .sb-door { transform: rotateY(-100deg); opacity: 0; pointer-events: none; transition: transform 520ms cubic-bezier(0.32, 0.72, 0, 1), opacity 300ms ease-in 120ms; }
.sb-door-handle { position: absolute; right: 16px; top: 50%; width: 8px; height: 34%; transform: translateY(-50%); border-radius: 6px;
  background: linear-gradient(90deg, #c7d3cc, #f2f7f4 45%, #8d9a93); box-shadow: 0 6px 14px rgba(0,0,0,0.5); }
.sb-door-stamp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-4deg); display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 26px; border-radius: 16px; border: 2px solid var(--accent); background: rgba(6,12,9,0.78); color: var(--accent); white-space: nowrap; }
.sb-cabinet.is-shut .sb-door-stamp { animation: sb-stamp 520ms cubic-bezier(0.34, 1.56, 0.64, 1) 360ms both; }
@keyframes sb-stamp { from { opacity: 0; transform: translate(-50%, -50%) rotate(-14deg) scale(1.6); } }
.sb-door-score { font: 600 12px var(--font-mono); letter-spacing: 0.08em; color: var(--fg-1); }
.sb-door-open { color: var(--fg-3); }
.sb-rank { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; font: 800 44px/1 var(--font-display); color: var(--ink-900); background: var(--accent); box-shadow: 0 0 30px var(--accent-glow); }
.sb-rank-S { background: linear-gradient(135deg, #FF3D5C, #FF9A1F, #CAE00F, #3D8BFF, #B96BFF); color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.45); }
.sb-rank-B { background: #3D8BFF; color: #fff; box-shadow: 0 0 24px rgba(61,139,255,0.5); }
.sb-rank-C { background: var(--fg-3); box-shadow: none; }
.sb-rank-sm { width: 34px; height: 34px; font-size: 19px; }
.sb-rank-none { background: var(--ink-900); color: var(--fg-4); border: 1px dashed var(--border-2); box-shadow: none; }

/* floating feedback */
.sb-pops { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: visible; }
.sb-pop { position: absolute; transform: translate(-50%, 0); white-space: nowrap; font: 800 13px var(--font-mono); letter-spacing: 0.08em; padding: 3px 9px; border-radius: 999px;
  background: rgba(6,12,9,0.85); color: var(--accent); border: 1px solid currentColor; animation: sb-pop 950ms cubic-bezier(0.23, 1, 0.32, 1) forwards; }
@keyframes sb-pop { 0% { opacity: 0; transform: translate(-50%, 8px) scale(0.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -30px) scale(1); } }
.sb-pop-rainbow { color: #fff; border-color: transparent; background: linear-gradient(90deg, #FF3D5C, #FF9A1F, #b3c60a, #3D8BFF, #B96BFF); font-size: 15px; }
.sb-pop-stack { font-size: 15px; }
.sb-pop-combo { color: #FF9A1F; }
.sb-pop-warn { color: #FF6B8A; }
.sb-pop-info { color: var(--fg-1); }

/* bottom bar */
.sb-fridge-bar { display: flex; align-items: center; gap: 10px; padding: 12px 4px 2px; flex-wrap: wrap; }
.sb-lever { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 999px; cursor: pointer; border: 1px solid var(--border-2);
  background: linear-gradient(180deg, #1a2620, #0f1813); color: var(--fg-1); text-align: left; transition: border-color 160ms ease-out, transform 140ms ease-out; }
.sb-lever b { display: block; font: 700 12px var(--font-ui); letter-spacing: 0.04em; }
.sb-lever small { display: block; font: 500 9px var(--font-mono); letter-spacing: 0.12em; color: var(--fg-3); }
.sb-lever-arm { position: relative; width: 26px; height: 30px; flex: none; }
.sb-lever-arm::before { content: ""; position: absolute; left: 50%; bottom: 2px; width: 14px; height: 6px; transform: translateX(-50%); border-radius: 3px; background: #2a3830; }
.sb-lever-arm i { position: absolute; left: calc(50% - 2px); bottom: 5px; width: 4px; height: 22px; border-radius: 2px; background: linear-gradient(90deg, #9aa8a0, #e6eee9); transform-origin: 50% 100%; transform: rotate(18deg); transition: transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.sb-lever-arm i::after { content: ""; position: absolute; left: 50%; top: -6px; width: 11px; height: 11px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8aa0, #FF3D5C 60%, #a8132b); box-shadow: 0 0 10px rgba(255,61,92,0.6); }
.sb-lever.is-pulled .sb-lever-arm i { transform: rotate(160deg); transition-duration: 140ms; transition-timing-function: ease-in; }
.sb-lever:disabled { opacity: 0.45; cursor: default; }
@media (hover: hover) and (pointer: fine) { .sb-lever:not(:disabled):hover { border-color: #FF3D5C; } .sb-lever:not(:disabled):hover .sb-lever-arm i { transform: rotate(40deg); } }
.sb-count { margin-left: auto; font: 700 20px var(--font-mono); color: var(--fg-3); display: flex; align-items: baseline; gap: 4px; }
.sb-count b { color: var(--accent); }
.sb-count small { margin-left: 6px; font: 500 10px var(--font-mono); letter-spacing: 0.12em; color: var(--fg-3); }
.sb-ghostbtn { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border-1); background: transparent; color: var(--fg-2); font: 500 12px var(--font-ui); cursor: pointer; }
.sb-ghostbtn:disabled { opacity: 0.4; cursor: default; }
@media (hover: hover) and (pointer: fine) { .sb-ghostbtn:not(:disabled):hover { color: var(--fg-1); border-color: var(--border-2); } }

/* dispenser */
.sb-disp { display: flex; gap: 14px; padding: 12px; border-radius: 20px; border: 1px solid var(--border-2); background: linear-gradient(180deg, #111b15, #0b130f); }
@media (max-width: 899px) { .sb-disp { position: sticky; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 6; box-shadow: 0 -10px 30px rgba(0,0,0,0.6), 0 10px 30px rgba(0,0,0,0.6); padding: 10px; } }
.sb-disp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.sb-disp-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 0 2px; }
.sb-disp-hint { color: var(--fg-4); }
@media (max-width: 600px) { .sb-disp-hint { display: none; } .sb-disp { bottom: 78px; } }   /* clears the level HUD */
.sb-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 899px) { .sb-chips { grid-template-columns: repeat(6, 1fr); gap: 6px; } }
.sb-chip { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 14px; cursor: grab;
  border: 1px solid var(--border-1); background: var(--ink-900); color: var(--fg-1); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  transition: border-color 160ms ease-out, background-color 160ms ease-out, transform 140ms ease-out; }
.sb-chip img { width: 34px; height: 46px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5)); transition: transform 160ms ease-out; }
.sb-chip-name { font: 600 13px var(--font-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-chip-key { margin-left: auto; font: 600 10px var(--font-mono); color: var(--fg-4); border: 1px solid var(--border-1); border-radius: 5px; padding: 1px 5px; }
.sb-chip-n { position: absolute; top: -7px; right: -5px; font: 700 10px var(--font-mono); padding: 2px 6px; border-radius: 999px; background: var(--g); color: var(--ink-900); }
.sb-chip.is-armed { border-color: var(--g); background: color-mix(in srgb, var(--g) 12%, var(--ink-900)); box-shadow: 0 0 16px -4px var(--g); }
.sb-chip:active { transform: scale(0.95); }
.sb-chip:active img { transform: translateY(-4px) rotate(-6deg); }
.sb-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .sb-chip:hover { border-color: var(--g); } .sb-chip:hover img { transform: translateY(-3px); } }
@media (max-width: 899px) {
  .sb-chip { flex-direction: column; gap: 2px; padding: 6px 2px 5px; }
  .sb-chip img { width: 30px; height: 40px; }
  .sb-chip-name { font-size: 10px; max-width: 100%; }
  .sb-chip-key { display: none; }
}
.sb-pedestal { position: relative; flex: none; width: 150px; height: 206px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(60% 55% at 50% 64%, color-mix(in srgb, var(--g) 26%, transparent), transparent 72%), rgb(10,18,14); box-shadow: inset 0 0 0 1px rgba(215,255,238,0.08); transition: background 400ms ease-out; }
.sb-pedestal-img { position: absolute; z-index: 2; left: 50%; bottom: 6px; height: 88%; transform: translateX(-50%); pointer-events: none; transition: opacity 260ms ease-out; }
.sb-pedestal-3d { position: absolute; inset: 0; z-index: 1; transition: opacity 260ms ease-out; cursor: grab; }
.sb-pedestal-base { position: absolute; left: 14%; right: 14%; bottom: 8%; height: 8px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--g) 50%, transparent), transparent); }
.sb-pedestal-tag { position: absolute; z-index: 3; left: 8px; top: 8px; display: flex; flex-direction: column; font: 600 9px var(--font-mono); letter-spacing: 0.12em; color: var(--fg-3); pointer-events: none; }
.sb-pedestal-tag b { font: 700 12px var(--font-ui); letter-spacing: 0; }

/* right column */
.sb-card { padding: 18px; border-radius: 20px; border: 1px solid var(--border-1); background: var(--bg-raised, #0c140f); }
.sb-card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.sb-score { color: var(--fg-3); }
.sb-score b { color: var(--accent); font-size: 15px; margin-left: 4px; }
.sb-loadout-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: center; }
@media (max-width: 400px) { .sb-loadout-body { grid-template-columns: 120px minmax(0, 1fr); } }
.sb-radar { width: 100%; height: auto; color: var(--fg-1); overflow: visible; }
.sb-radar-l { font: 600 7.5px var(--font-mono); letter-spacing: 0.08em; fill: var(--fg-3); }
.sb-loadout-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sb-class { font: 800 24px/1.1 var(--font-display); }
.sb-rankrow { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; }
.sb-patterns { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 3px; }
.sb-patterns li { font: 500 10px var(--font-mono); letter-spacing: 0.1em; color: var(--fg-4); }
.sb-patterns li b { color: var(--fg-3); font-size: 12px; margin-right: 2px; }
.sb-patterns li.is-on { color: var(--fg-2); }
.sb-patterns li.is-on b { color: var(--accent); }
.sb-mix { display: flex; height: 8px; border-radius: 999px; overflow: hidden; margin-top: 14px; background: var(--ink-900); gap: 2px; }
.sb-mix i { display: block; flex-basis: 0; transition: flex-grow 320ms var(--ease-out, ease-out); }
.sb-mix i.is-empty { background: transparent; }
.sb-tip { margin: 10px 0 0; color: var(--fg-3); }
.sb-cad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sb-cad button { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border-radius: 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--border-1); background: var(--ink-900); color: var(--fg-1); transition: border-color 160ms ease-out, background-color 160ms ease-out; }
.sb-cad b { font: 700 18px var(--font-mono); }
.sb-cad span { font: 500 11px var(--font-ui); color: var(--fg-3); }
.sb-cad small { font: 600 10px var(--font-mono); letter-spacing: 0.08em; color: var(--fg-3); margin-top: 4px; }
.sb-cad em { position: absolute; top: -8px; right: 8px; font: 700 9px var(--font-ui); font-style: normal; letter-spacing: 0.12em; padding: 2px 7px; border-radius: 999px; background: var(--accent); color: var(--ink-900); }
.sb-cad button.is-on { border-color: var(--accent); background: var(--accent-soft); }
.sb-cad button.is-on small, .sb-cad button.is-on b { color: var(--accent); }
.sb-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; font: 400 13px var(--font-body); color: var(--fg-3); }
.sb-line.is-save { color: var(--accent); }
.sb-line.is-total { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border-1); color: var(--fg-1); font-size: 16px; }
.sb-line.is-total b { font: 700 28px var(--font-mono); color: var(--accent); }
.sb-cta { width: 100%; margin-top: 16px; border-radius: 12px; justify-content: center; }
.sb-cta:disabled { background: var(--bg-sunken); color: var(--fg-3); border: 1px dashed var(--border-2); box-shadow: none; cursor: not-allowed; }
.sb-fine { text-align: center; margin-top: 10px; font-size: 10px; color: var(--fg-4); }

/* flying / dragged bottles */
.sb-fly, .sb-ghost { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; object-fit: contain; will-change: transform; filter: drop-shadow(0 12px 16px rgba(0,0,0,0.55)); }
.sb-ghost { filter: drop-shadow(0 18px 22px rgba(0,0,0,0.6)) drop-shadow(0 0 14px rgba(202,224,15,0.35)); }

@media (prefers-reduced-motion: reduce) {
  .sb-led, .sb-slot, .sb-slot.is-next .sb-slot-plus, .sb-cabinet.is-shut .sb-door-stamp, .sb-row.is-flash .sb-row-slots { animation: none; }
  .sb-door, .sb-cabinet:not(.is-shut) .sb-door { transform: none; transition: opacity 200ms ease-out; }
  .sb-pop { animation-duration: 1200ms; animation-name: sb-pop-fade; }
  @keyframes sb-pop-fade { 0%, 100% { opacity: 0; } 15%, 80% { opacity: 1; } }
}

/* ─────────────────────────────────────────────────────────────
   FLAVOR CONCIERGE (concierge.jsx): AI chat that builds a pack and starts PayPal checkout
   ───────────────────────────────────────────────────────────── */
.cc-launch {
  position: fixed; right: 16px; bottom: 16px; z-index: 94; display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 14px 12px 16px; border-radius: 999px; border: 1px solid var(--border-2);
  background: rgba(6, 13, 8, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--fg-1); font: 600 14px/1 var(--font-ui); cursor: pointer; box-shadow: 0 14px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--accent-soft);
  transition: transform 160ms var(--ease-out), opacity 160ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.cc-launch:hover { box-shadow: 0 14px 40px rgba(0,0,0,0.5), 0 0 24px var(--accent-glow); }
.cc-launch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cc-launch.is-hidden { opacity: 0; transform: translateY(8px) scale(0.96); pointer-events: none; }
.cc-launch-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.cc-ai { padding: 4px 6px; border-radius: 6px; background: var(--accent); color: var(--ink-900); font: 700 10px/1 var(--font-mono); letter-spacing: 0.08em; }

.cc-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 97; width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100svh - 120px));
  display: flex; flex-direction: column; box-sizing: border-box; border: 1px solid var(--border-2); border-radius: 16px;
  background: rgba(6, 13, 8, 0.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--accent-soft); overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(0.98); transform-origin: bottom right; pointer-events: none; visibility: hidden;
  transition: opacity 220ms var(--ease-out), transform 260ms var(--ease-out), visibility 0s linear 260ms;
}
.cc-panel.is-open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.cc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 16px 12px; border-bottom: 1px solid var(--border-1); }
.cc-title { margin: 4px 0 0; font: 800 22px/1.1 var(--font-display); letter-spacing: -0.03em; color: var(--fg-1); }

.cc-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.cc-intro p { margin: 0 0 12px; font: 400 14px/1.5 var(--font-body); color: var(--fg-2); }
.cc-starters { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-chip { padding: 9px 12px; border-radius: 999px; border: 1px solid var(--border-2); background: transparent; color: var(--fg-1);
  font: 500 13px/1.2 var(--font-ui); cursor: pointer; text-align: left; transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out); }
.cc-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.cc-chip.is-usual { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.cc-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.cc-msg { display: flex; flex-direction: column; gap: 8px; max-width: 92%; }
.cc-msg.is-user { align-self: flex-end; align-items: flex-end; }
.cc-msg.is-assistant { align-self: flex-start; }
.cc-bubble { padding: 10px 13px; border-radius: 14px; font: 400 14px/1.45 var(--font-body); white-space: pre-wrap; overflow-wrap: anywhere; }
.cc-msg.is-user .cc-bubble { background: var(--accent); color: var(--ink-900); border-bottom-right-radius: 4px; font-weight: 500; }
.cc-msg.is-user.is-auto .cc-bubble { background: transparent; color: var(--fg-3); border: 1px dashed var(--border-2); font: 500 11px/1.4 var(--font-mono); letter-spacing: 0.04em; }
.cc-msg.is-assistant .cc-bubble { background: var(--surface-card); color: var(--fg-1); border: 1px solid var(--border-1); border-bottom-left-radius: 4px; }
.cc-msg.is-error .cc-bubble { border-color: rgba(255, 61, 92, 0.5); color: var(--fg-2); }
.cc-typing { display: inline-flex; gap: 5px; align-items: center; min-height: 20px; }
.cc-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.35; animation: cc-blink 1.1s infinite; }
.cc-typing i:nth-child(2) { animation-delay: 0.18s; } .cc-typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes cc-blink { 40% { opacity: 1; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .cc-typing i { animation: none; opacity: 0.8; } .cc-panel, .cc-launch { transition: opacity 160ms linear; transform: none; } }

.cc-card { width: 300px; max-width: 100%; box-sizing: border-box; padding: 12px; border-radius: 14px; border: 1px solid var(--border-2); background: rgba(14, 26, 15, 0.9); }
.cc-pack-bottles { display: flex; gap: 4px; justify-content: center; margin-bottom: 8px; }
.cc-pack-bottle { position: relative; width: 56px; }
.cc-pack-bottle img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.5)); }
.cc-pack-bottle b { position: absolute; right: 2px; bottom: 6px; min-width: 22px; padding: 3px 5px; box-sizing: border-box; border-radius: 6px;
  background: var(--accent); color: var(--ink-900); font: 700 11px/1 var(--font-mono); text-align: center; }
.cc-pack-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; font: 400 13px/1.3 var(--font-body); color: var(--fg-2); }
.cc-pack-list li { display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.cc-pack-foot { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--border-1); }
.cc-pack-foot b { font: 700 18px var(--font-mono); color: var(--accent); }
.cc-mini-btn { width: 100%; margin-top: 10px; padding: 10px 14px; font-size: 13px; }
.cc-pay { display: grid; gap: 10px; }
.cc-pay-btn { width: 100%; }
.cc-paid { padding: 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font: 700 13px/1.2 var(--font-mono); letter-spacing: 0.04em; text-align: center; }
.cc-pay-msg { font: 500 12px/1.4 var(--font-mono); color: var(--fg-2); text-align: center; }
.cc-sandbox { font: 400 10px var(--font-mono); color: var(--fg-4); text-align: center; letter-spacing: 0.06em; }
/* Pause / resume / cancel waiting for the shopper's confirm (DAR-702). */
.cc-confirm { display: grid; gap: 10px; border-color: var(--accent); }
.cc-confirm-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.cc-confirm-btn { padding: 11px 14px; font-size: 13px; justify-content: center; }
.cc-confirm-btn.is-danger { border-color: rgba(255, 61, 92, 0.6); color: #ff8fa3; }
.cc-confirm-btn.is-danger:hover { background: rgba(255, 61, 92, 0.12); }

.cc-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border-1); }
.cc-input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid var(--border-2); background: var(--ink-900);
  color: var(--fg-1); font: 400 16px/1.2 var(--font-body); }
.cc-input::placeholder { color: var(--fg-4); }
.cc-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cc-send { padding: 0 14px; }

@media (max-width: 599px) {
  .cc-launch { right: 10px; bottom: 10px; padding: 12px; }
  .cc-launch > span:nth-child(2) { display: none; }
  .cc-panel { right: 8px; left: 8px; bottom: 8px; width: auto; height: min(78svh, calc(100svh - 96px)); }
}

/* VOICE (voice.jsx): compact mic status + "Tap to talk" inside the concierge panel, Hands-free only. */
.vc-bar { display: flex; align-items: center; gap: 10px; min-height: 56px; box-sizing: border-box; padding: 9px 12px;
  border-top: 1px solid var(--border-1); background: rgba(14, 26, 15, 0.7); }
.vc-mic { position: relative; display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  border: 1px solid var(--border-2); background: var(--ink-900); color: var(--fg-3);
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.vc-bar.is-listening .vc-mic, .vc-bar.is-hearing .vc-mic { border-color: transparent; background: var(--accent); color: var(--ink-900); box-shadow: 0 0 16px var(--accent-glow); }
.vc-bar.is-listening .vc-mic::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: vc-ping 1.8s var(--ease-out) infinite; }
.vc-bar.is-speaking .vc-mic, .vc-bar.is-unsupported .vc-mic { color: var(--accent); border-color: var(--accent-soft); }
.vc-bar.is-blocked .vc-mic, .vc-bar.is-nomic .vc-mic, .vc-bar.is-error .vc-mic { color: var(--warning); border-color: rgba(255, 200, 61, 0.4); }
.vc-wave { display: inline-flex; align-items: center; gap: 2px; height: 16px; }
.vc-wave i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform: scaleY(0.35); animation: mp-wave 0.9s ease-in-out infinite; }
.vc-wave i:nth-child(2) { animation-delay: 0.12s; } .vc-wave i:nth-child(3) { animation-delay: 0.24s; } .vc-wave i:nth-child(4) { animation-delay: 0.36s; }
.vc-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.vc-label { font: 700 11px/1.2 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-2); }
.vc-bar.is-listening .vc-label, .vc-bar.is-hearing .vc-label, .vc-bar.is-speaking .vc-label { color: var(--accent); }
.vc-sub { font: 400 13px/1.35 var(--font-body); color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-sub.is-interim { color: var(--fg-1); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vc-sub.is-warn { color: var(--warning); white-space: normal; }
.vc-sub.is-note { color: var(--fg-2); white-space: normal; }
.vc-talk { flex-shrink: 0; padding: 10px 14px; gap: 6px; font-size: 13px; white-space: nowrap; }
.vc-talk:focus-visible, .vc-stop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vc-stop { flex-shrink: 0; width: 36px; height: 36px; }
@keyframes vc-ping { 0% { transform: scale(0.85); opacity: 0.7; } 100% { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .vc-bar.is-listening .vc-mic::after { animation: none; opacity: 0.35; transform: none; }
  .vc-wave i { animation: none; transform: scaleY(0.6); }
  .vc-wave i:nth-child(2), .vc-wave i:nth-child(3) { transform: scaleY(0.95); }
}

/* ─────────────────────────────────────────────────────────────
   MODE PICKER (mode.jsx): Hands-free vs Legacy, first visit only.
   z-index 110: above the Fridge (100) and the concierge panel (97),
   below the loot flight (120), confetti rain (250) and the route curtain (300).
   ───────────────────────────────────────────────────────────── */
.mp-root { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 16px; box-sizing: border-box; }
.mp-backdrop {
  position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 30%, var(--accent-soft), transparent 60%), rgba(2, 6, 4, 0.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
/* Enter/exit motion is WAAPI in mode.jsx: the reduced-motion rule above pauses CSS animations. */
.mp-dialog {
  position: relative; width: min(880px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  box-sizing: border-box; padding: clamp(22px, 4vw, 44px); border-radius: var(--radius-xl);
  border: 1px solid var(--border-2); background: rgba(6, 13, 8, 0.94);
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--accent-soft), 0 0 80px var(--accent-soft);
}
.mp-dialog > .hud-frame-corners { inset: 14px; }
.mp-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.mp-ready { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-3); }
.mp-ready-dot { width: 7px; height: 7px; border-radius: 50%; background: #3BEA7C; box-shadow: 0 0 8px rgba(59, 234, 124, 0.7); animation: pulse 1.6s infinite; }
.mp-title { margin-top: 18px; font-size: clamp(32px, 4.6vw, 60px); color: var(--fg-1); }
.mp-desc { margin: 14px 0 0; max-width: 560px; font: 400 clamp(15px, 1.3vw, 17px)/1.55 var(--font-body); color: var(--fg-2); }

.mp-cards { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin-top: clamp(22px, 3vw, 32px); }
.mp-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 248px; box-sizing: border-box;
  padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--border-2); background: var(--surface-card);
  color: var(--fg-1); font: inherit; text-align: left; cursor: pointer; overflow: hidden;
  transition: transform 160ms var(--ease-out), border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out), background-color 200ms var(--ease-out);
}
.mp-card.is-handsfree {
  border-color: var(--border-lime); border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: radial-gradient(120% 100% at 0% 0%, var(--accent-soft), transparent 65%), var(--surface-card);
  box-shadow: 0 0 0 1px var(--accent-soft), 0 18px 48px rgba(0, 0, 0, 0.45);
}
.mp-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mp-card-top { display: flex; align-items: center; gap: 12px; width: 100%; }
.mp-icon { display: grid; place-items: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: var(--radius-md);
  border: 1px solid var(--border-2); background: var(--ink-900); color: var(--fg-2); }
.mp-card.is-handsfree .mp-icon { background: var(--accent); border-color: transparent; color: var(--ink-900); box-shadow: 0 0 24px var(--accent-glow), var(--gloss-pill); }
.mp-tag { margin-left: auto; padding: 5px 9px; border-radius: var(--radius-pill); border: 1px solid var(--border-2);
  font: 600 10px/1 var(--font-mono); letter-spacing: 0.12em; color: var(--fg-3); }
.mp-card.is-handsfree .mp-tag { border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.mp-wave { display: inline-flex; align-items: center; gap: 3px; height: 28px; }
.mp-wave i { width: 3px; height: 100%; border-radius: 2px; background: var(--accent); transform: scaleY(0.3); animation: mp-wave 1.2s ease-in-out infinite; }
.mp-wave i:nth-child(2) { animation-delay: 0.12s; } .mp-wave i:nth-child(3) { animation-delay: 0.24s; }
.mp-wave i:nth-child(4) { animation-delay: 0.36s; } .mp-wave i:nth-child(5) { animation-delay: 0.48s; }
.mp-card-name { display: block; margin-top: 10px; font: 800 clamp(28px, 3vw, 38px)/1 var(--font-display); letter-spacing: -0.035em; }
.mp-card-line { display: block; font: 400 15px/1.5 var(--font-body); color: var(--fg-2); max-width: 36ch; }
.mp-note { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 200, 61, 0.4); color: var(--warning); font: 600 10px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.mp-card-cta { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 8px; font: 600 14px/1 var(--font-ui); color: var(--fg-2);
  transition: color 200ms var(--ease-out), gap 200ms var(--ease-out); }
.mp-card.is-handsfree .mp-card-cta { color: var(--accent); }

.mp-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; }
.mp-hint { color: var(--fg-4); }
.mp-skip { padding: 12px 22px; }

@media (hover: hover) and (pointer: fine) {
  .mp-card:hover { transform: translateY(-2px); border-color: var(--border-strong); background-color: var(--surface-card-hover); }
  .mp-card.is-handsfree:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 40px var(--accent-glow), 0 18px 48px rgba(0, 0, 0, 0.45); }
  .mp-card:hover .mp-card-cta { gap: 12px; color: var(--fg-1); }
  .mp-card.is-handsfree:hover .mp-card-cta { color: var(--accent); }
}
.mp-card:active { transform: scale(0.985); }

.mp-root.is-closing { pointer-events: none; }

@keyframes mp-wave { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

@media (max-width: 599px) {
  .mp-root { padding: 10px; align-items: end; }
  .mp-dialog { max-height: calc(100dvh - 20px); padding: 22px 18px 18px; border-radius: var(--radius-lg); }
  .mp-dialog > .hud-frame-corners { inset: 8px; }
  .mp-cards { grid-template-columns: 1fr; gap: 12px; }
  .mp-card { min-height: 0; padding: 18px; gap: 8px; }
  .mp-icon { width: 44px; height: 44px; }
  .mp-card-name { margin-top: 4px; }
  .mp-card-line { font-size: 14px; }
  .mp-hint { display: none; }
  .mp-skip { width: 100%; }
}

/* Reduced motion: fades only (mode.jsx drops the rise), static wave, no lift on hover. */
@media (prefers-reduced-motion: reduce) {
  .mp-wave i { animation: none; transform: scaleY(0.6); }
  .mp-wave i:nth-child(2), .mp-wave i:nth-child(4) { transform: scaleY(0.9); }
  .mp-ready-dot { animation: none; }
  .mp-card, .mp-card:active { transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out), background-color 200ms var(--ease-out); transform: none; }
}
@media (prefers-reduced-motion: reduce) and (hover: hover) and (pointer: fine) {
  .mp-card:hover { transform: none; }
}

/* Nav: Hands-free toggle (shell.jsx) */
.sl-mode-toggle.is-on { color: var(--ink-900); background: var(--accent); border-color: transparent; box-shadow: 0 0 0 1px var(--accent), 0 0 18px var(--accent-glow); }
@media (hover: hover) and (pointer: fine) { .sl-mode-toggle.is-on:not(:disabled):hover { color: var(--ink-900); border-color: transparent; } }
.sl-mode-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ───────── Hands-free stage (handsfree-fx.jsx, DAR-698) ─────────
   z-index 90: over the Legacy page, header (80) and HUD, under the concierge launcher (94),
   the concierge panel (97), the Fridge (100) and the mode picker (110).
   The Legacy chrome is hidden (visibility also takes it out of tab order and the a11y tree). The
   page stays mounted and keeps its layout (scroll triggers stay valid) but is moved off-screen,
   so IntersectionObserver reports it hidden and the 3D bottle's render loop stops. The game
   layer's body-level overlays are display:none, which beats GSAP's inline visibility. */
html[data-mode="handsfree"] body { overflow: hidden; }
html[data-mode="handsfree"] #root > div > header,
html[data-mode="handsfree"] #root > div > footer,
html[data-mode="handsfree"] .sl-page { visibility: hidden; }
html[data-mode="handsfree"] .sl-page { transform: translateX(-300vw); }
html[data-mode="handsfree"] .sl-hud,
html[data-mode="handsfree"] .sl-toasts,
html[data-mode="handsfree"] .sl-banner,
html[data-mode="handsfree"] .sl-ghosts,
html[data-mode="handsfree"] .sl-speed,
html[data-mode="handsfree"] .sl-loot { display: none; }

.hf-stage {
  --hf-accent: var(--accent);
  --hf-gutter: clamp(20px, 5vw, 72px);
  --hf-panel-w: min(400px, calc(100vw - 32px));
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 0%, var(--forest-900), var(--ink-900) 70%);
  color: var(--fg-1);
}
.hf-bg { position: absolute; inset: 0; pointer-events: none; }
.hf-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(55% 60% at 26% 46%, color-mix(in srgb, var(--g, var(--hf-accent)) 20%, transparent), transparent 70%),
    radial-gradient(40% 40% at 90% 0%, color-mix(in srgb, var(--g, var(--hf-accent)) 9%, transparent), transparent 70%);
}
/* HUD corner ticks framing the stage, in the flavor accent. */
.hf-frame { position: absolute; inset: 14px; pointer-events: none; }
.hf-frame i { position: absolute; width: 22px; height: 22px; border: 0 solid color-mix(in srgb, var(--hf-accent) 70%, transparent); }
.hf-frame i:nth-child(1) { left: 0; top: 0; border-width: 2px 0 0 2px; }
.hf-frame i:nth-child(2) { right: 0; top: 0; border-width: 2px 2px 0 0; }
.hf-frame i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 2px 2px; }
.hf-frame i:nth-child(4) { right: 0; bottom: 0; border-width: 0 2px 2px 0; }

.hf-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: clamp(18px, 3vh, 30px) var(--hf-gutter) 0; }
.hf-brand { display: inline-flex; align-items: center; gap: 10px; font: 600 15px/1 var(--font-ui); color: var(--fg-1); white-space: nowrap; }
.hf-brand img { width: 30px; height: 30px; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--hf-accent) 55%, transparent)); }
.hf-brand em { font-style: normal; color: var(--fg-3); font-weight: 500; margin-left: 4px; }
.hf-actions { display: inline-flex; align-items: center; gap: 8px; }
.hf-pill, .hf-exit {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; box-sizing: border-box;
  border-radius: var(--radius-pill); border: 1px solid var(--border-2); background: rgba(2, 6, 4, 0.55);
  color: var(--fg-2); font: 500 14px/1 var(--font-ui); cursor: pointer; white-space: nowrap;
  transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.hf-pill b { min-width: 24px; height: 24px; padding: 0 7px; box-sizing: border-box; display: inline-grid; place-items: center;
  margin-right: -8px; border-radius: var(--radius-pill); background: var(--hf-accent); color: var(--ink-900);
  font: 700 12px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.hf-pill:focus-visible, .hf-exit:focus-visible, .hf-orb:focus-visible { outline: 2px solid var(--hf-accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .hf-pill:hover, .hf-exit:hover { border-color: var(--border-strong); color: var(--fg-1); }
}

/* Main column: visual, then the words, then the mic. Clears the concierge panel on the right. */
.hf-main {
  position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center;
  gap: clamp(18px, 3.4vh, 36px); padding: clamp(16px, 3vh, 32px) var(--hf-gutter) clamp(24px, 5vh, 56px);
}
.hf-stage.is-panel .hf-main { padding-right: calc(var(--hf-panel-w) + 16px + var(--hf-gutter)); }
/* The visual keeps its height: the agent's line is the part that fits itself to what is left. */
.hf-visual { flex: 0 0 auto; display: flex; align-items: flex-end; }
.hf-visual:empty { display: none; }
.hf-words { display: grid; gap: clamp(10px, 1.6vh, 18px); min-width: 0; }

.hf-you { margin: 0; max-width: 46ch; font: 500 clamp(16px, 1.35vw, 20px)/1.4 var(--font-ui); color: var(--fg-3);
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.hf-you.is-live { color: var(--fg-1); }
.hf-you.is-live::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -0.12em; background: var(--hf-accent); }
.hf-you.is-hint { color: var(--fg-4); }

.hf-say {
  margin: 0; max-width: 19ch; font: 800 clamp(36px, 4.6vw, 72px)/1.02 var(--font-display); letter-spacing: -0.035em;
  font-optical-sizing: auto; text-wrap: balance; color: var(--fg-1);
  overflow-wrap: break-word;
  /* No line clamp: HFSay fits the whole line to the room, or keeps the last sentence (DAR-712). */
}
.hf-say.is-long { max-width: 26ch; font-size: clamp(28px, 3vw, 46px); line-height: 1.08; letter-spacing: -0.028em; }
.hf-say.is-xlong { max-width: 36ch; font-size: clamp(22px, 2.1vw, 32px); line-height: 1.16; letter-spacing: -0.02em; }
.hf-say.is-error { color: var(--fg-2); }

/* Mic / status */
.hf-mic { display: flex; align-items: center; gap: 22px; }
.hf-orb {
  position: relative; flex-shrink: 0; width: 68px; height: 68px; padding: 0; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid color-mix(in srgb, var(--hf-accent) 50%, transparent); cursor: pointer;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--hf-accent) 26%, transparent), rgba(2, 6, 4, 0.85) 72%);
  color: var(--fg-1); box-shadow: 0 0 32px color-mix(in srgb, var(--hf-accent) 22%, transparent);
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.hf-orb:disabled { cursor: default; }
.hf-orb.is-off { color: var(--fg-3); border-color: var(--border-2); box-shadow: none; background: rgba(2, 6, 4, 0.7); }
.hf-orb.is-listening, .hf-orb.is-speaking { background: var(--hf-accent); color: var(--ink-900); border-color: transparent; }
.hf-orb-ring, .hf-orb-spin { position: absolute; inset: -1px; border-radius: 50%; pointer-events: none; opacity: 0; }
.hf-orb-ring { border: 2px solid var(--hf-accent); }
.hf-orb.is-listening .hf-orb-ring { animation: hf-ring 1.9s cubic-bezier(0.2, 0.6, 0.3, 1) infinite; }
.hf-orb.is-listening .hf-orb-ring + .hf-orb-ring { animation-delay: 0.95s; }
.hf-orb.is-hearing .hf-orb-ring { animation-duration: 1.1s; }
.hf-orb.is-hearing .hf-orb-ring + .hf-orb-ring { animation-delay: 0.55s; }
.hf-orb-spin { inset: -6px; border: 2px solid transparent; border-top-color: var(--hf-accent); border-right-color: color-mix(in srgb, var(--hf-accent) 35%, transparent); }
.hf-orb.is-thinking .hf-orb-spin { opacity: 1; animation: hf-spin 0.9s linear infinite; }
.hf-wave { display: inline-flex; align-items: center; gap: 4px; height: 28px; }
.hf-wave i { width: 4px; height: 100%; border-radius: 2px; background: currentColor; transform: scaleY(0.35); animation: hf-wave 0.9s ease-in-out infinite; }
.hf-wave i:nth-child(2) { animation-delay: 0.12s; } .hf-wave i:nth-child(3) { animation-delay: 0.24s; }
.hf-wave i:nth-child(4) { animation-delay: 0.36s; } .hf-wave i:nth-child(5) { animation-delay: 0.48s; }
.hf-mic-label { font: 500 16px/1.3 var(--font-ui); color: var(--fg-2); }
@keyframes hf-ring { 0% { transform: scale(1); opacity: 0.75; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes hf-spin { to { transform: rotate(360deg); } }
@keyframes hf-wave { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

/* Visual 1: pack */
.hf-pack { display: grid; gap: 10px; }
.hf-bottles { display: flex; align-items: flex-end; gap: clamp(14px, 2.4vw, 36px); }
.hf-bottle { position: relative; margin: 0; display: grid; justify-items: center; gap: 2px; transition: opacity 360ms var(--ease-out); }
/* The renders carry wide transparent margins: --h sizes the bottle, the negative margins crop the air. */
.hf-bottle { --h: clamp(150px, 30vh, 290px); }
.hf-bottle img { display: block; height: var(--h); width: calc(var(--h) * 0.75); max-width: none;
  margin: calc(var(--h) * -0.16) calc(var(--h) * -0.17) calc(var(--h) * -0.08);
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 18px color-mix(in srgb, var(--b) 30%, transparent)); }
.hf-qty { position: absolute; top: 8%; right: -4px; min-width: 40px; padding: 6px 9px; box-sizing: border-box; text-align: center;
  border-radius: var(--radius-pill); background: var(--b); color: var(--ink-900); font: 800 clamp(14px, 1.3vw, 18px)/1 var(--font-display);
  letter-spacing: -0.01em; box-shadow: 0 0 18px color-mix(in srgb, var(--b) 45%, transparent); }
.hf-bottle figcaption { margin-top: 6px; font: 500 13px/1.2 var(--font-ui); color: var(--fg-3); white-space: nowrap; }
.hf-pack-sum { margin: 0; font: 500 14px/1.3 var(--font-mono); letter-spacing: 0.02em; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.hf-pack.is-stored .hf-bottle { opacity: 0.38; }

/* Visual 4a: waiting for PayPal */
.hf-wait { display: flex; align-items: center; gap: clamp(18px, 2vw, 28px); padding-left: 10px; }
.hf-wait-disc { position: relative; flex-shrink: 0; width: clamp(64px, 7vw, 92px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--hf-accent) 60%, transparent); background: rgba(2, 6, 4, 0.7);
  font: 700 clamp(26px, 2.6vw, 36px)/1 var(--font-mono); color: var(--hf-accent); }
.hf-wait-halo { position: absolute; inset: -10px; border-radius: 50%; pointer-events: none; opacity: 0.4;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hf-accent) 45%, transparent), 0 0 36px color-mix(in srgb, var(--hf-accent) 40%, transparent); }
.hf-wait-copy p { margin: 0; }
.hf-wait-title { font: 700 clamp(22px, 2.2vw, 32px)/1.1 var(--font-ui); letter-spacing: -0.02em; color: var(--fg-1); }
.hf-wait-copy .hf-wait-sub { margin-top: 6px; font: 400 clamp(15px, 1.2vw, 18px)/1.4 var(--font-body); color: var(--fg-2); }
.hf-wait-arrow::after { content: "→"; display: inline-block; margin-left: 10px; color: var(--hf-accent); font-weight: 700; }

/* Visual 4b: success burst */
.hf-ok { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 30px); }
.hf-ok-mark { position: relative; flex-shrink: 0; width: clamp(72px, 7.5vw, 100px); aspect-ratio: 1; display: grid; place-items: center; }
.hf-ok-disc { position: relative; z-index: 1; width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%;
  background: var(--hf-accent); color: var(--ink-900); box-shadow: 0 0 48px color-mix(in srgb, var(--hf-accent) 55%, transparent); }
.hf-spoke { position: absolute; left: calc(50% - 2px); top: calc(50% - 14px); width: 4px; height: 28px; border-radius: 2px;
  background: var(--hf-accent); opacity: 0; transform-origin: 50% 50%; pointer-events: none; }
.hf-ok-copy p { margin: 0; }
.hf-ok-title { font: 700 clamp(24px, 2.4vw, 36px)/1.1 var(--font-ui); letter-spacing: -0.02em; color: var(--fg-1); }
.hf-ok-copy .hf-ok-id { margin-top: 8px; font: 400 14px/1.3 var(--font-body); color: var(--fg-3); }
.hf-ok-id span { font: 500 14px var(--font-mono); color: var(--hf-accent); letter-spacing: 0.02em; overflow-wrap: anywhere; }

/* Visual 2: the wipe. Effects never take clicks. */
.hf-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hf-wipe { position: absolute; left: 0; right: 0; top: 46%; height: 72px; overflow: hidden; pointer-events: none; }
.hf-wipe-accent, .hf-wipe-ink { position: absolute; inset: 0; transform: translateX(-101%); will-change: transform; }
.hf-wipe-accent { background: var(--hf-accent); }
.hf-wipe-ink { display: flex; align-items: center; padding-left: var(--hf-gutter);
  background: rgba(2, 6, 4, 0.94); border-top: 1px solid var(--hf-accent); border-bottom: 1px solid var(--hf-accent); }
.hf-wipe-label { display: inline-flex; align-items: center; gap: 14px; font: 700 18px/1 var(--font-mono); letter-spacing: 0.24em; color: var(--fg-1); }
.hf-wipe-label img { width: 28px; height: 28px; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--hf-accent) 60%, transparent)); }
.hf-fly { position: fixed; z-index: 120; pointer-events: none; object-fit: contain; will-change: transform, opacity;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5)); }

/* Phones: the concierge panel takes the bottom half; the stage lives above it. */
@media (max-width: 599px) {
  html[data-mode="handsfree"] .cc-panel { height: min(50svh, calc(100svh - 96px)); }
  .hf-stage { --hf-gutter: 18px; }
  .hf-stage.is-panel .hf-main { padding-right: var(--hf-gutter); padding-bottom: calc(min(50svh, 100svh - 96px) + 22px); }
  .hf-main { justify-content: flex-end; gap: 14px; padding-top: 10px; }
  .hf-frame { inset: 8px; }
  .hf-brand em { display: none; }
  .hf-pill-name { display: none; }
  .hf-pill, .hf-exit { height: 36px; padding: 0 12px; font-size: 13px; }
  .hf-pill b { margin-right: -6px; }
  .hf-say { font-size: clamp(28px, 8vw, 34px); max-width: none; }
  .hf-say.is-long { font-size: 22px; }
  .hf-say.is-xlong { font-size: 18px; }
  .hf-you { font-size: 15px; -webkit-line-clamp: 1; }
  .hf-orb { width: 52px; height: 52px; }
  .hf-orb svg { width: 22px; height: 22px; }
  .hf-mic { gap: 18px; }
  .hf-mic-label { font-size: 14px; }
  .hf-bottle { --h: clamp(96px, 15svh, 132px); }
  .hf-bottle figcaption { display: none; }
  .hf-qty { min-width: 30px; padding: 4px 6px; font-size: 13px; right: -6px; }
  .hf-pack-sum { font-size: 12px; }
  .hf-wait-disc, .hf-ok-mark { width: 56px; }
  .hf-wait-title, .hf-ok-title { font-size: 20px; }
  .hf-wait-copy .hf-wait-sub { font-size: 14px; }
  .hf-wait-arrow::after { content: "↓"; }
  .hf-wipe { height: 56px; top: 24%; }
  .hf-wipe-label { font-size: 13px; }
}
/* Short desktop windows: smaller bottles so the words keep their room. */
@media (min-width: 600px) and (max-height: 720px) {
  .hf-bottle { --h: clamp(110px, 24vh, 170px); }
  .hf-say { font-size: clamp(30px, 3.6vw, 52px); }
}

/* Reduced motion: no rings, spinner or waveform movement; fades are WAAPI (opacity, < 200 ms). */
@media (prefers-reduced-motion: reduce) {
  .hf-orb.is-listening .hf-orb-ring, .hf-orb.is-thinking .hf-orb-spin, .hf-wave i { animation: none; }
  .hf-orb.is-listening .hf-orb-ring:first-child { opacity: 0.5; transform: scale(1.18); }
  .hf-orb.is-thinking .hf-orb-spin { opacity: 0.8; }
  .hf-wave i:nth-child(odd) { transform: scaleY(0.55); }
  .hf-wave i:nth-child(even) { transform: scaleY(0.9); }
  .hf-bottle, .hf-pill, .hf-exit, .hf-orb { transition-duration: 160ms; }
}

/* ---------- Hybrid AI (Firebase AI Logic): badge, Nano status, #/hybrid page ---------- */
.sl-hy-page { padding: 120px 0 96px; min-height: 70vh; }
.sl-hy-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.sl-hy-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 9px; border-radius: var(--radius-pill); border: 1px solid var(--border-2);
}
.sl-hy-badge.is-device { color: var(--lime-400); border-color: var(--border-lime); background: var(--surface-pill); }
.sl-hy-badge.is-cloud { color: #8FB8FF; border-color: rgba(61, 139, 255, 0.45); background: rgba(61, 139, 255, 0.12); }
.sl-hy-status {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font: 500 13px/1.3 var(--font-ui); color: var(--fg-2);
  padding: 8px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border-1); background: var(--bg-sunken);
  margin-bottom: 24px; max-width: 100%;
}
.sl-hy-status.tone-good .sl-hy-dot { color: var(--lime-400); }
.sl-hy-status.tone-busy .sl-hy-dot { color: var(--warning); animation: pulse 1.4s ease-in-out infinite; }
.sl-hy-status.tone-idle .sl-hy-dot { color: var(--fg-4); }
.sl-hy-status.tone-bad .sl-hy-dot { color: var(--danger); }
.sl-hy-bar { position: relative; width: 96px; height: 4px; border-radius: 2px; background: var(--border-2); overflow: hidden; }
.sl-hy-bar > span { position: absolute; inset: 0 auto 0 0; background: var(--warning); border-radius: 2px; transition: width 300ms var(--ease-out); }
.sl-hy-bar > span.is-indeterminate { animation: sl-hy-slide 1.2s ease-in-out infinite; }
@keyframes sl-hy-slide { from { left: -35%; } to { left: 100%; } }
.sl-hy-link { background: none; border: 0; padding: 0; color: var(--fg-link); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sl-hy-form { display: grid; gap: 10px; margin-bottom: 24px; }
.sl-hy-form textarea {
  width: 100%; box-sizing: border-box; resize: vertical;
  font: 400 16px/1.5 var(--font-body); color: var(--fg-1);
  background: var(--bg-sunken); border: 1px solid var(--border-2); border-radius: var(--radius-md); padding: 12px 14px;
}
.sl-hy-form textarea:focus-visible { outline: none; border-color: var(--border-lime); box-shadow: var(--glow-lime-sm); }
.sl-hy-error { color: var(--danger); font: 500 14px/1.5 var(--font-body); margin: 0 0 16px; overflow-wrap: anywhere; }
.sl-hy-answers { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sl-hy-answer { background: var(--surface-card); border: 1px solid var(--border-1); border-radius: var(--radius-lg); padding: 16px 18px; }
.sl-hy-answer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sl-hy-q { margin: 0 0 6px; font: 400 13px/1.5 var(--font-body); color: var(--fg-3); }
.sl-hy-a { margin: 0; font: 400 16px/1.6 var(--font-body); color: var(--fg-1); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  .sl-hy-status.tone-busy .sl-hy-dot, .sl-hy-bar > span.is-indeterminate { animation: none; }
}
.sl-hy-switch { display: inline-flex; align-items: center; gap: 8px; font: 500 14px/1 var(--font-ui); color: var(--fg-2); cursor: pointer; }
.sl-hy-switch input { width: 16px; height: 16px; accent-color: var(--lime-400); margin: 0; }
.sl-hy-note { margin: 8px 0 0; font: 400 13px/1.5 var(--font-body); color: var(--warning); }

/* Vibe to Pack (home page, vibe-pack.jsx) */
.sl-vp-form { display: flex; gap: 10px; margin: 20px 0 14px; }
.sl-vp-form input {
  flex: 1; min-width: 0; box-sizing: border-box;
  font: 400 17px/1.4 var(--font-body); color: var(--fg-1);
  background: var(--bg-sunken); border: 1px solid var(--border-2); border-radius: var(--radius-md); padding: 12px 16px;
}
.sl-vp-form input:focus-visible { outline: none; border-color: var(--border-lime); box-shadow: var(--glow-lime-sm); }
.sl-vp-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.sl-vp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sl-vp-chip {
  font: 500 13px/1 var(--font-ui); color: var(--fg-2); background: transparent;
  border: 1px solid var(--border-2); border-radius: 999px; padding: 8px 12px; cursor: pointer;
  transition: border-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
.sl-vp-chip:not(:disabled):hover { border-color: var(--border-lime); color: var(--fg-1); }
.sl-vp-chip:disabled { opacity: .5; cursor: default; }
.sl-vp-result { margin-top: 24px; background: var(--surface-card); border: 1px solid var(--border-1); border-radius: var(--radius-lg); padding: 18px 20px; }
.sl-vp-lines { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.sl-vp-lines li { display: inline-flex; align-items: center; gap: 8px; font: 600 16px/1.3 var(--font-ui); color: var(--fg-1); }
.sl-vp-dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg-sunken); flex: none; }
.sl-vp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; color: var(--fg-3); }
@media (max-width: 560px) {
  .sl-vp-form { flex-direction: column; }
  .sl-vp-form .btn { width: 100%; }
}
