/*
 * BOSS Logics tradeshow kiosk — shared stylesheet.
 * Single sheet covers every screen; sections marked by screen.
 *
 * Property order: box → positioning → margin → padding → formatting → text.
 * No !important. State on `[data-*]` attributes, not class names.
 */

:root {
  /* Type */
  --font-display: 'Lora', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, Helvetica, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Color tokens */
  --primary: #0099ff;
  --accent-warm: #ff8a5b;
  --ink: #1a2230;
  --bg-kiosk: #f6f5f1;
  --bg-sub: #fafbfc;
  --surface: #ffffff;
  --subtle: #eaf3fb;
  --border: #e3e8ef;
  --muted: #607080;
  --footer-ink: #f4f1ea;

  /* Motion */
  --ease-soft: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 200ms;
  --t-med: 300ms;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body.kiosk {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  position: relative;
  background: var(--bg-kiosk);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
          user-select: none;
  overflow: hidden;
  touch-action: manipulation;
}

a { color: inherit; text-decoration: none; }

/* === Atmosphere — orbs + ghost watermarks ============================ */

.atmos {
  position: absolute;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
}
.atmos .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.atmos .orb-blue {
  width: 720px;
  height: 720px;
  top: -10%;
  right: -10%;
  background: radial-gradient(circle, rgba(0, 153, 255, 0.32), transparent 65%);
  animation: orb_drift_1 22s ease-in-out infinite alternate;
}
.atmos .orb-peach {
  width: 540px;
  height: 540px;
  bottom: -12%;
  left: -10%;
  background: radial-gradient(circle, rgba(255, 168, 122, 0.25), transparent 65%);
  animation: orb_drift_2 26s ease-in-out infinite alternate;
}
@keyframes orb_drift_1 {
  0%   { transform: translate(0, 0)    scale(1); }
  100% { transform: translate(-7%, 5%) scale(1.1); }
}
@keyframes orb_drift_2 {
  0%   { transform: translate(0, 0)    scale(1); }
  100% { transform: translate(8%, -4%) scale(1.08); }
}

.ghost {
  position: absolute;
  z-index: 0;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  color: rgba(26, 34, 48, 0.04);
  font-family: var(--font-display);
  font-style: italic;
  line-height: 0.85;
  letter-spacing: -0.04em;
}
.ghost.g1 { top: 38%;    left: -6%;  font-size: 220px; transform: rotate(-6deg); }
.ghost.g2 { bottom: 18%; right: -10%; font-size: 180px; font-weight: 500; font-style: normal; }

/* === Top bar ========================================================= */

.topbar {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 5;
  padding: 18px 32px;
  background: rgba(246, 245, 241, 0.7);
  border-bottom: 1px solid rgba(26, 34, 48, 0.08);
  backdrop-filter: blur(8px);
}
.topbar-centered {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.topbar-centered .brand-center {
  justify-self: center;
}
.topbar-centered .brand-center img {
  display: block;
  width: auto;
  object-fit: contain;
}
.topbar-centered .back-link {
  justify-self: start;
}
.topbar .surprise-pill {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(0, 153, 255, 0.35);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 153, 255, 0.10), rgba(255, 138, 91, 0.10));
  color: var(--ink);
  font: 600 13px/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.topbar .surprise-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 153, 255, 0.55);
}
.topbar .surprise-pill-icon {
  font-size: 18px;
  color: var(--primary);
  animation: surprise_pulse 2.4s ease-in-out infinite;
}
.topbar .surprise-pill-label {
  white-space: nowrap;
}
.topbar .brand {
  display: inline-flex;
  align-items: center;
  height: 36px;
}
.topbar .brand img {
  display: block;
  width: auto;
  height: 36px;
  object-fit: contain;
}
.topbar .ticker {
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 22px;
  padding: 0 18px;
  border-right: 1px solid rgba(26, 34, 48, 0.12);
  border-left: 1px solid rgba(26, 34, 48, 0.12);
  color: #4f6377;
  font-family: var(--font-mono);
  font-size: 11px;
}
.topbar .ticker-track {
  display: flex;
  gap: 36px;
  white-space: nowrap;
  animation: ticker_scroll 38s linear infinite;
}
.topbar .ticker-track span b  { color: var(--primary); font-weight: 600; }
.topbar .ticker-track span em { color: var(--ink); font-style: normal; font-weight: 600; }
@keyframes ticker_scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.topbar .pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  background: rgba(234, 243, 251, 0.7);
  border: 1px solid #cfe3f3;
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.topbar .pill .live {
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(0, 153, 255, 0.6);
  animation: live_pulse 1.8s ease-out infinite;
}
@keyframes live_pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 153, 255, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(0, 153, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 153, 255, 0); }
}

/* === Logo lanes ====================================================== */

.lane {
  overflow: hidden;
  position: relative;
  z-index: 1;
  mask-image: linear-gradient(90deg, transparent 0, black 4%, black 96%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 4%, black 96%, transparent 100%);
}
.lane.lane-1 {
  padding: 22px 0;
  background: rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(26, 34, 48, 0.05);
  border-bottom: 1px solid rgba(26, 34, 48, 0.05);
}
.lane.lane-3 {
  padding: 16px 0;
  background: rgba(26, 34, 48, 0.04);
  border-top: 1px solid rgba(26, 34, 48, 0.05);
}
.lane-track {
  display: flex;
  align-items: center;
  gap: 64px;
  white-space: nowrap;
  will-change: transform;
}
.lane-1 .lane-track { gap: 80px; animation: lane_drift 70s linear infinite; }
.lane-3 .lane-track { gap: 56px; animation: lane_drift 50s linear infinite; }
@keyframes lane_drift {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.lane:hover .lane-track,
.lane[data-paused="true"] .lane-track {
  animation-play-state: paused;
}
.lane .logo {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.lane .logo img {
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: grayscale(1) contrast(1.05) brightness(0.82);
  opacity: 0.82;
  transition: filter 500ms, opacity 500ms, transform 500ms;
}
.lane-1 .logo img { max-width: 200px; max-height: 56px; }
.lane-3 .logo img { max-width: 130px; max-height: 30px; }
.lane .logo:hover img {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.05);
}
.lane .wordmark {
  flex-shrink: 0;
  color: #5a6878;
  opacity: 0.82;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
}
.lane-1 .wordmark { font-size: 34px; letter-spacing: -0.01em; }
.lane-3 .wordmark { font-size: 18px; }

/* === Stage (headline + cards) ======================================== */

.stage {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  position: relative;
  z-index: 2;
  gap: 36px;
  padding: 22px 44px 18px;
}

.headline { position: relative; }
.headline .kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.headline .kicker::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--primary);
}
.headline h1 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 76px;
  line-height: 0.94;
  letter-spacing: -0.035em;
}
.headline h1 .l1 { display: block; }
.headline h1 .l2 {
  display: block;
  transform: translateX(28px);
  color: var(--primary);
  font-style: italic;
  font-weight: 400;
}
.headline h1 .l3 { display: block; font-weight: 700; }
.headline h1 .l3 .stop { color: var(--accent-warm); }
.headline .deck {
  max-width: 380px;
  margin-top: 18px;
  color: #4f6377;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
}

/* Stats */
.stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(26, 34, 48, 0.1);
}
.stats .stat .n {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stats .stat .n em {
  color: var(--primary);
  font-style: italic;
  font-weight: 400;
}
.stats .stat .l {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* === Cards =========================================================== */

.cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card {
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  gap: 18px;
  padding: 16px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 0 rgba(26, 34, 48, 0.04);
  cursor: pointer;
  transition:
    transform var(--t-med) var(--ease-soft),
    border-color var(--t-med),
    box-shadow var(--t-med);
}
.card:hover,
.card:focus-visible {
  transform: translateY(-3px) rotate(-0.3deg);
  border-color: var(--primary);
  box-shadow: 0 22px 50px -22px rgba(0, 153, 255, 0.5);
  outline: none;
}
.card .num {
  flex-shrink: 0;
  position: relative;
  width: 44px;
  color: var(--primary);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 42px;
  line-height: 1;
  text-align: center;
}
.card .num .sup {
  position: absolute;
  top: 4px;
  right: -10px;
  color: var(--accent-warm);
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.1em;
}
.card .text { flex: 1; min-width: 0; }
.card .label {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.014em;
}
.card .sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.card .arr {
  flex-shrink: 0;
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
  transition: transform var(--t-med);
}
.card:hover .arr { transform: translateX(6px); }

/* Photobooth card */
.card.fun {
  overflow: visible;
  background: linear-gradient(135deg, #ffffff 0%, #f4faff 50%, #fff3eb 100%);
}
.card.fun::before {
  content: '';
  position: absolute;
  top: -36px;
  right: -20px;
  z-index: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 168, 122, 0.35), transparent 65%);
  pointer-events: none;
}
.card.fun .preview {
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  background: var(--ink);
  border: 1.5px solid var(--primary);
  border-radius: 14px;
  box-shadow: 0 12px 26px -12px rgba(0, 153, 255, 0.55);
}
.card.fun .preview .feed {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 38%, #c4d6e6 0%, #5a6e85 35%, #2a3548 70%, #1a2230 100%);
}
.card.fun .preview .feed::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  transform: translateX(-50%);
  filter: blur(4px);
}
.card.fun .preview .feed::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 60px;
  height: 26px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 30px 30px 0 0;
  transform: translateX(-50%);
  filter: blur(5px);
}
.card.fun .preview .scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 153, 255, 0.22) 50%, transparent 60%);
  animation: preview_scan 3s linear infinite;
}
@keyframes preview_scan {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}
.card.fun .preview .live-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 5px;
  background: var(--primary);
  border-radius: 3px;
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 7.5px;
  line-height: 1;
  letter-spacing: 0.14em;
}
.card.fun .orbit {
  position: absolute;
  top: 50%;
  left: 84px;
  z-index: 2;
  width: 0;
  height: 0;
  pointer-events: none;
}
.card.fun .orbit .theme {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -11px;
  left: -11px;
  width: 22px;
  height: 22px;
  background: #fff;
  border: 1.5px solid var(--primary);
  border-radius: 50%;
  box-shadow: 0 4px 10px -2px rgba(0, 153, 255, 0.35);
  font-size: 12px;
}
.card.fun .orbit .theme:nth-child(1) {
  transform: translate(8px, -28px);
  animation: theme_bob 3.4s ease-in-out infinite alternate;
}
.card.fun .orbit .theme:nth-child(2) {
  transform: translate(20px, 0);
  animation: theme_bob 4.1s ease-in-out -1s infinite alternate;
}
.card.fun .orbit .theme:nth-child(3) {
  background: #fff3eb;
  border-color: var(--accent-warm);
  transform: translate(8px, 28px);
  animation: theme_bob 3.7s ease-in-out -2s infinite alternate;
}
@keyframes theme_bob {
  0%   { translate: 0 0; }
  100% { translate: 0 -6px; }
}
.card.fun .text { position: relative; z-index: 1; }
.card.fun .label .pop {
  background: linear-gradient(120deg, var(--primary) 0%, var(--accent-warm) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font-style: italic;
  font-weight: 600;
}
.card.fun .arr { color: var(--accent-warm); }

/* Attract loop — gentle breathing on the photobooth card after idle. */
.card[data-attract="true"] {
  animation: attract_breathe 4s ease-in-out infinite;
}
@keyframes attract_breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.02); }
}

/* === Footer ========================================================== */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 4;
  padding: 10px 32px;
  background: var(--ink);
  color: rgba(244, 241, 234, 0.55);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* === Booth shots grid (replaces lane 3 footer) ======================= */

.booth-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 96px;
  grid-template-rows: 96px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  position: relative;
  z-index: 1;
  gap: 8px;
  padding: 14px 24px;
  background: rgba(26, 34, 48, 0.04);
  border-top: 1px solid rgba(26, 34, 48, 0.05);
  mask-image: linear-gradient(90deg, transparent 0, black 4%, black 96%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 4%, black 96%, transparent 100%);
}
.booth-grid::-webkit-scrollbar { display: none; }
.booth-grid[data-dragging="true"] { cursor: grabbing; }
.booth-grid[data-dragging="true"] .shot { pointer-events: none; }
.booth-grid:empty::before {
  content: 'Booth shots will appear here as visitors take them.';
  display: block;
  grid-column: 1 / -1;
  width: 100%;
  padding: 18px 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
}
.booth-grid .shot {
  overflow: hidden;
  width: 96px;
  height: 96px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(26, 34, 48, 0.04);
}
.booth-grid .shot {
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.booth-grid .shot:hover,
.booth-grid .shot:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 18px -8px rgba(26, 34, 48, 0.35);
}
.booth-grid .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Polaroid lightbox — tap a booth thumb to expand. */
.polaroid-pop {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 32px;
  background: rgba(15, 22, 34, 0);
  opacity: 0;
  transition: opacity 220ms ease, background-color 220ms ease;
}
.polaroid-pop[data-open="true"] {
  opacity: 1;
  background: rgba(15, 22, 34, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.polaroid-pop-card {
  width: min(78vmin, 520px);
  padding: 18px 18px 56px 18px;
  background: #fdfcf7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  box-shadow: 0 32px 80px -20px rgba(0, 0, 0, 0.6),
              0 8px 18px -4px rgba(0, 0, 0, 0.32);
  transform: rotate(var(--tilt, 0deg)) scale(0.7);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.22, 0.85, 0.4, 1),
              opacity 220ms ease;
}
.polaroid-pop[data-open="true"] .polaroid-pop-card {
  transform: rotate(var(--tilt, 0deg)) scale(1);
  opacity: 1;
}
/* Active drag — follow the finger horizontally without the easing curve. */
.polaroid-pop-card[data-dragging="true"] {
  transition: none;
  transform: rotate(var(--tilt, 0deg)) translateX(var(--drag-dx, 0));
  cursor: grabbing;
  touch-action: pan-y;
}
.polaroid-pop-card img {
  transition: opacity 140ms ease;
}
.polaroid-pop-card[data-swapping="true"] img {
  opacity: 0;
}
.polaroid-pop-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #1a2230;
  border-radius: 2px;
}
.polaroid-pop-cap {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  font-weight: 500;
  color: #2a2218;
  text-align: center;
  letter-spacing: -0.01em;
  min-height: 1em;
}
@media (prefers-reduced-motion: reduce) {
  .polaroid-pop,
  .polaroid-pop-card { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .atmos .orb,
  .topbar .ticker-track,
  .topbar .pill .live,
  .lane-1 .lane-track,
  .lane-3 .lane-track,
  .card.fun .preview .scan,
  .card.fun .preview .orbit .theme,
  .card[data-attract="true"] {
    animation: none;
  }
}

/* ====================================================================
 * BOOTH FLOW — theme.html, capture.html, result.html, sent.html
 * ==================================================================== */

/* ---- shared ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 12px 16px;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
}
.back-link .chev {
  color: var(--primary);
  font-size: 18px;
  line-height: 1;
}
.back-link.on-dark { color: #fff; }
.back-link.on-dark .chev { color: #fff; }

/* ---- theme.html ---- */
body[data-screen="theme"] {
  grid-template-rows: auto 1fr auto;
  min-height: 0;
}
body[data-screen="theme"] .topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}
body[data-screen="theme"] .atmos .orb-blue,
body[data-screen="theme"] .atmos .orb-peach {
  opacity: 0.5;
}

.theme-stage {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: stretch;
  position: relative;
  z-index: 2;
  min-height: 0;
  gap: 14px;
  padding: 14px 32px;
}

/* Surprise-me lives as the first tile in .theme-grid. It uses the same
 * card chrome as a theme card but swaps the photo thumb for an animated
 * gradient + sparkle so it reads as "different" without breaking the row. */
.theme-card.surprise .surprise-thumb {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(135deg, var(--primary) 0%, var(--accent-warm) 100%);
}
.theme-card.surprise .surprise-icon {
  color: rgba(255, 255, 255, 0.95);
  font-size: 56px;
  line-height: 1;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  animation: surprise_pulse 2.4s ease-in-out infinite;
}
@keyframes surprise_pulse {
  0%, 100% { transform: rotate(-6deg) scale(1); opacity: 0.9; }
  50%      { transform: rotate(6deg)  scale(1.08); opacity: 1; }
}
.theme-card.surprise:hover .surprise-thumb {
  filter: brightness(1.05);
}
.theme-stage .kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.theme-stage .kicker::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--primary);
}

.theme-grid {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  gap: 18px;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.theme-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.theme-row-h {
  padding: 0 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.012em;
}
.theme-row-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  grid-template-rows: 200px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 32px;
  gap: 14px;
  padding: 6px 32px 8px;
  margin: 0 -32px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, transparent 0, black 3%, black 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 3%, black 97%, transparent 100%);
}
.theme-row-strip::-webkit-scrollbar { display: none; }
.theme-row-strip > .theme-card {
  scroll-snap-align: start;
  height: 200px;
}

/* Featured row — Industry sits at the top with hero-sized cards. */
.theme-row[data-category="industry"] .theme-row-h {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
}
.theme-row[data-category="industry"] .theme-row-h::after {
  content: 'FEATURED';
  padding: 4px 10px;
  background: var(--primary);
  border-radius: 999px;
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 9.5px;
  letter-spacing: 0.22em;
}
.theme-row[data-category="industry"] .theme-row-strip {
  grid-auto-columns: 360px;
  grid-template-rows: 260px;
}
.theme-row[data-category="industry"] .theme-row-strip > .theme-card {
  height: 260px;
  border-color: rgba(0, 153, 255, 0.18);
}
.theme-row[data-category="industry"] .theme-card .label {
  font-size: 26px;
}
.theme-row[data-category="industry"] .theme-card:hover,
.theme-row[data-category="industry"] .theme-card:focus-visible {
  box-shadow: 0 28px 60px -22px rgba(0, 153, 255, 0.55);
}

/* "More" tile — terminal card on rows that have hidden themes. */
.theme-card.more-tile {
  border: 1px dashed rgba(26, 34, 48, 0.18);
  background: var(--bg-sub);
  cursor: pointer;
}
.theme-card.more-tile .thumb.more-thumb {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(0, 153, 255, 0.08), rgba(255, 138, 91, 0.08));
}
.theme-card.more-tile .more-icon {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 80px;
  line-height: 1;
  opacity: 0.55;
}
.theme-card.more-tile .cap {
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.92) 60%);
  color: var(--ink);
}
.theme-card.more-tile .meta { color: var(--muted); }
.theme-card.more-tile .label { color: var(--ink); }
.theme-card.more-tile .sublabel { color: var(--muted); }
.theme-card.more-tile:hover .more-icon { opacity: 0.85; }
.theme-card {
  display: block;
  overflow: hidden;
  position: relative;
  min-height: 0;
  background: var(--ink);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(26, 34, 48, 0.04);
  transition:
    transform var(--t-med) var(--ease-soft),
    border-color var(--t-med),
    box-shadow var(--t-med);
  animation: card_in 280ms var(--ease-soft) backwards;
  animation-delay: calc(var(--i, 0) * 30ms);
}
@keyframes card_in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.theme-card .thumb {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--primary), var(--accent-warm));
  transition: filter 320ms, transform 320ms;
}
.theme-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.theme-card .cap {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(26, 34, 48, 0.78) 100%);
  color: #fff;
}
.theme-card .meta {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.theme-card .label {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.theme-card .sublabel {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.15;
  letter-spacing: 0;
}
.theme-card:hover,
.theme-card:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 22px 50px -22px rgba(0, 153, 255, 0.5);
  transform: translateY(-3px);
  outline: none;
}
.theme-card:hover .thumb,
.theme-card:focus-visible .thumb {
  transform: scale(1.04);
}

/* ---- capture.html ---- */
body[data-screen="capture"],
body[data-screen="result"] {
  grid-template-rows: 1fr;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}

.capture-stage,
.result-stage {
  display: block;
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100vh;
}

.capture-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: cover;
  transform: scaleX(-1);
}
.capture-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
}

.capture-topbar,
.result-topbar {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 5;
  gap: 18px;
  padding: 18px 24px;
  pointer-events: none;
}
.capture-topbar > *,
.result-topbar > * { pointer-events: auto; }
.capture-topbar .brand img,
.result-topbar .brand img {
  display: block;
  width: auto;
  height: 32px;
}
.scene-pill {
  justify-self: end;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.theme-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.shutter-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  right: 0;
  bottom: 32px;
  left: 0;
  z-index: 4;
  gap: 20px;
}
.shutter-btn {
  min-width: 240px;
  height: 88px;
  padding: 0 36px;
  background: var(--primary);
  border: none;
  border-radius: 999px;
  box-shadow: 0 18px 40px -12px rgba(0, 153, 255, 0.55);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    transform 200ms var(--ease-soft),
    box-shadow 200ms;
}
.shutter-btn:active {
  transform: translateY(1px);
  box-shadow: 0 12px 24px -8px rgba(0, 153, 255, 0.55);
}
.shutter-caption {
  position: absolute;
  right: 0;
  bottom: 12px;
  left: 0;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
}

.countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 280px;
  line-height: 1;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.55);
  animation: count_pop 1s var(--ease-soft) forwards;
}
@keyframes count_pop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  25%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.04); }
}

.flash {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: #fff;
  pointer-events: none;
  animation: flash_fade 320ms ease-out forwards;
}
@keyframes flash_fade {
  from { opacity: 0.92; }
  to   { opacity: 0; }
}

.review-still {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  max-width: 86vw;
  max-height: 76vh;
  border-radius: 14px;
  box-shadow: 0 30px 60px -16px rgba(0, 0, 0, 0.6);
  /* Mirror display only — the underlying snapshot stays un-mirrored
     in sessionStorage so FAL gets correct orientation. */
  transform: translate(-50%, -56%) scaleX(-1);
}
.review-still .overlay-mark {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 12%;
  min-width: 60px;
  opacity: 0.7;
  pointer-events: none;
}

.review-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  right: 0;
  bottom: 28px;
  left: 0;
  z-index: 4;
  gap: 16px;
}
.review-progress {
  position: absolute;
  bottom: 100px;
  left: 50%;
  width: 360px;
  max-width: 70vw;
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 1px;
  overflow: hidden;
  transform: translateX(-50%);
}
.review-progress::after {
  content: '';
  display: block;
  width: 0;
  height: 100%;
  background: var(--primary);
  animation: progress_4s 4s linear forwards;
}
@keyframes progress_4s { to { width: 100%; } }

.btn-secondary {
  min-width: 200px;
  height: 72px;
  padding: 0 32px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  cursor: pointer;
  transition: background 200ms;
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.08); }
.btn-primary {
  min-width: 220px;
  height: 72px;
  padding: 0 32px;
  background: var(--primary);
  border: none;
  border-radius: 999px;
  box-shadow: 0 12px 28px -10px rgba(0, 153, 255, 0.55);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  cursor: pointer;
}

/* state-machine on capture <main data-state> */
.capture-stage > .countdown,
.capture-stage > .flash,
.capture-stage > .review-still,
.capture-stage > .review-bar,
.capture-stage > .review-progress { display: none; }
.capture-stage[data-state="counting"] > .countdown { display: block; }
.capture-stage[data-state="flashing"] > .flash { display: block; }
.capture-stage[data-state="reviewing"] > .review-still,
.capture-stage[data-state="reviewing"] > .review-bar,
.capture-stage[data-state="reviewing"] > .review-progress { display: flex; }
.capture-stage[data-state="reviewing"] > .review-still { display: block; }
.capture-stage[data-state="reviewing"] > .shutter-bar,
.capture-stage[data-state="reviewing"] > .shutter-caption,
.capture-stage[data-state="reviewing"] > .gender-bar,
.capture-stage[data-state="counting"]  > .gender-bar,
.capture-stage[data-state="flashing"]  > .gender-bar { display: none; }
.capture-stage[data-state="reviewing"] > .capture-vignette { opacity: 0.6; }
/* committing = "Use This" tapped; keep the still on screen but drop the
   action bar immediately so the tap feels instant while the (slow)
   sessionStorage writes + navigation happen behind it. */
.capture-stage[data-state="committing"] > .review-still { display: block; }
.capture-stage[data-state="committing"] > .capture-vignette { opacity: 0.6; }

/* ---- result.html ---- */
.result-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0b0d12;
  transition: opacity 200ms;
}
.result-overlay {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 4;
  width: 12vw;
  max-width: 180px;
  opacity: 0.7;
  pointer-events: none;
}

.swap-thumb {
  display: block;
  overflow: hidden;
  position: absolute;
  top: 84px;
  left: 24px;
  z-index: 5;
  width: 140px;
  height: 140px;
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 12px;
  box-shadow: 0 12px 26px -10px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform 200ms var(--ease-soft);
}
.swap-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.swap-thumb .mini-overlay {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 28px;
  opacity: 0.85;
  pointer-events: none;
}
.swap-thumb .swap-hint {
  position: absolute;
  bottom: 6px;
  left: 8px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.swap-thumb:active { transform: scale(0.97); }

.result-loader {
  display: grid;
  place-content: center;
  position: absolute;
  inset: 0;
  z-index: 6;
  gap: 22px;
  background: var(--bg-kiosk);
  color: var(--ink);
  text-align: center;
}
.result-loader .lora {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 36px;
  letter-spacing: -0.02em;
}
.polaroid-stack {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.result-loader > .lora,
.result-loader > .dot-trio,
.result-loader > .cancel { position: relative; z-index: 1; }
.polaroid {
  /* --x, --y, --tilt, --drift-dur set inline by JS — see render_polaroids() */
  position: absolute;
  top: var(--y, 50%);
  left: var(--x, 50%);
  width: 168px;
  padding: 10px 10px 28px 10px;
  background: #fdfcf7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 3px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.5),
              0 4px 10px -2px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--tilt, 0deg)) scale(0.85);
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  animation:
    polaroid_appear 2200ms cubic-bezier(0.22, 0.85, 0.4, 1) forwards,
    polaroid_drift  var(--drift-dur, 20s) ease-in-out infinite;
  animation-delay:
    calc(var(--i, 0) * 1000ms),
    calc(var(--i, 0) * 1000ms + 2200ms);
}
.polaroid[data-kicked="true"] {
  animation: polaroid_kick 1500ms cubic-bezier(0.18, 0.7, 0.3, 1) forwards;
  animation-delay: 0s;
}
@keyframes polaroid_kick {
  0% {
    transform: translate(-50%, -50%) rotate(var(--tilt, 0deg)) scale(1);
  }
  18% {
    transform:
      translate(calc(-50% + var(--kx, 0px) * 0.55), calc(-50% + var(--ky, 0px) * 0.55))
      rotate(calc(var(--tilt, 0deg) + var(--kr, 0deg) * 0.4))
      scale(1.08);
  }
  60% {
    transform:
      translate(calc(-50% + var(--kx, 0px) * 0.15), calc(-50% + var(--ky, 0px) * 0.15))
      rotate(calc(var(--tilt, 0deg) + var(--kr, 0deg) * 0.85))
      scale(1.02);
  }
  100% {
    transform:
      translate(-50%, -50%)
      rotate(calc(var(--tilt, 0deg) + var(--kr, 0deg)))
      scale(1);
  }
}
.polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #1a2230;
  border-radius: 2px;
  transform: scaleX(-1);
}
@keyframes polaroid_appear {
  0%   { opacity: 0; transform: translate(-50%, -50%) rotate(var(--tilt, 0deg)) scale(0.2); }
  35%  { opacity: 1; }
  55%  { opacity: 1; transform: translate(-50%, -50%) rotate(var(--tilt, 0deg)) scale(1.85); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--tilt, 0deg)) scale(1); }
}
@keyframes polaroid_drift {
  0%, 100% { transform: translate(-50%, -50%) rotate(var(--tilt, 0deg)) translateY(0); }
  50%      { transform: translate(-50%, -50%) rotate(calc(var(--tilt, 0deg) + 3deg)) translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  .polaroid { animation: none; opacity: 1; transform: translate(-50%, -50%) rotate(var(--tilt, 0deg)); }
}

.gender-bar {
  display: flex;
  position: absolute;
  bottom: 144px;
  left: 50%;
  z-index: 5;
  gap: 6px;
  padding: 4px;
  background: rgba(15, 18, 26, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  transform: translateX(-50%);
}
.gender-pill {
  padding: 8px 18px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms, color 160ms;
}
.gender-pill[data-active] {
  background: var(--primary);
  color: #fff;
}

.upload-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.upload-link:hover { color: #fff; }

.dot-trio {
  display: inline-flex;
  justify-content: center;
  gap: 14px;
}
.dot-trio .dot {
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.25;
  animation: dot_pulse 1.4s var(--ease-soft) infinite;
}
.dot-trio .dot:nth-child(2) { animation-delay: 0.2s; }
.dot-trio .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot_pulse {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  30%      { opacity: 1;    transform: scale(1.25); }
}
.result-loader .cancel {
  visibility: hidden;
  padding: 8px 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.result-loader[data-stalled="true"] .cancel { visibility: visible; }

.glass-form {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 5;
  padding: 0;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  opacity: 0;
  transform: translateY(14px);
  backdrop-filter: blur(20px);
  transition:
    opacity 320ms,
    transform 320ms var(--ease-soft),
    border-radius 280ms var(--ease-soft),
    left 320ms var(--ease-soft),
    padding 280ms var(--ease-soft);
  transition-delay: 240ms;
}
.glass-form[data-ready="true"] {
  opacity: 1;
  transform: translateY(0);
}
.glass-form[data-expanded="true"] {
  /* Clear the QR badge in the bottom-left (~374px wide at left: 28px,
     so it ends at ~402px). 420px leaves a small visual gap. */
  left: 420px;
  padding: 18px 22px;
  border-radius: 18px;
}
.glass-form .h {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 14px 22px;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
}
.glass-form .h .h-chev {
  transition: transform 220ms var(--ease-soft);
  font-size: 18px;
  opacity: 0.6;
}
.glass-form[data-expanded="true"] .h {
  width: auto;
  padding: 0;
  font-size: 22px;
}
.glass-form[data-expanded="true"] .h .h-chev {
  transform: rotate(90deg);
}
.email-row,
.consent-row {
  display: none;
}
.glass-form[data-expanded="true"] .email-row {
  display: grid;
  grid-template-columns: 1fr auto;
  margin-top: 10px;
  gap: 10px;
}
.glass-form[data-expanded="true"] .consent-row {
  display: flex;
}
.email-field {
  height: 64px;
  padding: 0 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  outline-color: var(--primary);
}
.send-btn {
  min-width: 180px;
  height: 64px;
  padding: 0 28px;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  cursor: pointer;
}
.send-btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
}
.consent-row {
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.consent-row .check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* state machine on result <main data-state> */
.result-stage[data-state="loading"] .result-image,
.result-stage[data-state="loading"] .result-overlay,
.result-stage[data-state="loading"] .swap-thumb,
.result-stage[data-state="loading"] .glass-form { display: none; }
.result-stage[data-state="done"] .result-loader { display: none; }

/* Staff panel — hidden by default, revealed by 5-tap on the topbar brand
 * (see #wire_staff_mode in result.js). Lets the team share/save/copy from
 * the iPad without exposing controls to visitors. */
.staff-panel {
  display: grid;
  position: absolute;
  right: 28px;
  bottom: 200px;
  z-index: 6;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(26, 34, 48, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #fff;
  font-family: var(--font-body);
}
.staff-panel[hidden] { display: none; }
.staff-panel .staff-h {
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.staff-panel .staff-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.staff-panel .staff-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
}
.staff-panel .staff-btn:hover { background: rgba(255, 255, 255, 0.14); }
.staff-panel .staff-btn[disabled] { opacity: 0.55; pointer-events: none; }
.staff-panel .staff-btn[data-loading="true"] {
  display: inline-flex;
  gap: 8px;
}
.staff-panel .staff-btn[data-loading="true"]::before {
  content: '';
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: staff_spin 700ms linear infinite;
}
@keyframes staff_spin {
  to { transform: rotate(360deg); }
}
.staff-status {
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.staff-status[hidden] { display: none; }

/* QR badge — visible through the whole result flow so visitors can scan
 * during the wait or after the image lands. Pinned top-right under the
 * topbar; restrained on-brand styling, not a billboard. */
.qr-badge {
  display: flex;
  align-items: center;
  position: absolute;
  bottom: 28px;
  left: 28px;
  z-index: 6;
  gap: 14px;
  padding: 14px 18px 14px 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(26, 34, 48, 0.12);
  backdrop-filter: blur(14px);
}
.qr-canvas {
  display: block;
  width: 132px;
  height: 132px;
  padding: 8px;
  background: #fff;
  border-radius: 10px;
}
.qr-canvas svg {
  display: block;
  width: 100%;
  height: 100%;
}
.qr-cap {
  max-width: 180px;
}
.qr-cap-h {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.qr-cap-sub {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.qr-cap-extra {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.result-error {
  display: grid;
  place-content: center;
  position: absolute;
  inset: 0;
  z-index: 7;
  gap: 18px;
  padding: 24px;
  background: var(--bg-kiosk);
  color: var(--ink);
  text-align: center;
}

/* ---- sent.html ---- */
body[data-screen="sent"] {
  grid-template-rows: auto 1fr auto;
  background: var(--bg-kiosk);
  color: var(--ink);
}
body[data-screen="sent"] .atmos .orb-blue { display: none; }
body[data-screen="sent"] .atmos .orb-peach { opacity: 0.4; }

.sent-stage {
  display: grid;
  place-content: center;
  position: relative;
  z-index: 2;
  gap: 24px;
  padding: 32px;
  text-align: center;
}
.sent-thumb {
  display: block;
  overflow: hidden;
  position: relative;
  width: 360px;
  height: 360px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 22px 50px -22px rgba(26, 34, 48, 0.25);
}
.sent-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sent-thumb .overlay-mark {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 12%;
  min-width: 50px;
  opacity: 0.85;
  pointer-events: none;
}
.sent-h {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 42px;
  letter-spacing: -0.025em;
}
.sent-sub {
  max-width: 380px;
  margin: 0 auto;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
}
.countdown-line {
  width: 220px;
  height: 2px;
  margin: 12px auto;
  overflow: hidden;
  background: var(--border);
  border-radius: 1px;
}
.countdown-line::after {
  content: '';
  display: block;
  width: 0;
  height: 100%;
  background: var(--primary);
  animation: countdown_8s 8s linear forwards;
}
@keyframes countdown_8s { to { width: 100%; } }
.sent-tap-hint {
  position: fixed;
  right: 0;
  bottom: 22px;
  left: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
}


/* === Vendor intro · interactive grid ================================= */

.vi-stage {
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
  z-index: 1;
  width: min(1180px, 92vw);
  margin: 0 auto;
  padding: 24px 0 24px;
  gap: 22px;
  overflow: hidden;
}

.vi-intro {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity var(--t-med) var(--ease-soft), transform var(--t-med) var(--ease-soft);
}
.vi-stage[data-view="detail"] .vi-intro {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}
.vi-kicker {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.vi-h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 48px;
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.vi-h1 em { color: var(--primary); font-style: italic; font-weight: 500; }
.vi-deck-p {
  max-width: 640px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

/* --- Topic grid ------------------------------------------------------- */

.vi-grid-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-content: start;
  gap: 16px;
  transition: opacity var(--t-med) var(--ease-soft), transform var(--t-med) var(--ease-soft);
}
.vi-stage[data-view="detail"] .vi-grid-wrap {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.vi-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  padding: 22px 22px 24px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px -50px rgba(26, 34, 48, 0.35);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-soft), border-color var(--t-fast) var(--ease-soft), box-shadow var(--t-fast) var(--ease-soft);
}
.vi-card:hover,
.vi-card[data-attract="true"] {
  border-color: rgba(0, 153, 255, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 28px 70px -40px rgba(0, 153, 255, 0.35);
}
.vi-card:active { transform: scale(0.99); }
.vi-card[data-attract="true"]::after {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: 0 0 0 2px rgba(0, 153, 255, 0.35) inset;
  animation: vi_pulse 1400ms var(--ease-soft) 2;
}
@keyframes vi_pulse {
  0%   { opacity: 0; }
  40%  { opacity: 1; }
  100% { opacity: 0; }
}

.vi-card-num {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.vi-card-h {
  margin: 2px 0 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.vi-card-s {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
}
.vi-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.vi-card-foot .arr {
  margin-left: auto;
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 18px;
}

/* --- Detail view ------------------------------------------------------ */

.vi-detail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: absolute;
  inset: 0;
  padding: 24px 0;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease-soft), transform var(--t-med) var(--ease-soft);
}
.vi-stage[data-view="detail"] .vi-detail {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.vi-detail-close {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-soft), border-color var(--t-fast) var(--ease-soft);
}
.vi-detail-close:hover { background: var(--subtle); border-color: rgba(0, 153, 255, 0.4); }
.vi-detail-close .chev { color: var(--primary); font-family: var(--font-body); font-size: 14px; }

.vi-detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  flex: 1;
  min-height: 0;
}

.vi-detail-shot {
  display: flex;
  position: relative;
  overflow: hidden;
  background: var(--bg-sub);
  border: 1px solid var(--border);
  border-radius: 18px;
  background-size: cover;
  background-position: center;
}
/* CSS-only mock for when no real screenshot is wired up yet. */
.vi-detail-shot::before {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 153, 255, 0.06), rgba(0, 153, 255, 0) 40%),
    repeating-linear-gradient(0deg, var(--border) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px 28px);
  opacity: 0.7;
}
.vi-detail-shot[data-has-image="true"]::before { display: none; }
.vi-detail-shot::after {
  content: attr(data-shot-label);
  display: block;
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.vi-detail-shot[data-has-image="true"]::after { display: none; }

.vi-detail-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: center;
}
.vi-detail-tag {
  align-self: flex-start;
  padding: 5px 10px;
  background: var(--subtle);
  border-radius: 999px;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.vi-detail-h {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.vi-detail-h em { color: var(--primary); font-style: italic; font-weight: 500; }
.vi-detail-p {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
}
.vi-detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.vi-detail-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-sub);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.vi-detail-list li::before {
  content: counter(vi-bullet, decimal-leading-zero);
  counter-increment: vi-bullet;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
}
.vi-detail-list { counter-reset: vi-bullet; }
.vi-detail-list strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
}
.vi-detail-list span {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
}

/* --- Footer ---------------------------------------------------------- */

.vi-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 22px;
}
.vi-foot-hint {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.vi-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: var(--ink);
  border-radius: 999px;
  color: var(--surface);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background var(--t-fast) var(--ease-soft), transform var(--t-fast) var(--ease-soft);
}
.vi-cta:hover { background: var(--primary); }
.vi-cta:active { transform: scale(0.98); }
.vi-cta-a { font-size: 18px; }

@media (max-width: 900px) {
  .vi-grid-wrap { grid-template-columns: repeat(2, 1fr); }
  .vi-detail-grid { grid-template-columns: 1fr; }
  .vi-detail-h { font-size: 38px; }
}

/* === Tier-aware cards (hero + list) ================================== */

/* Hero cards stay at the existing vi-card scale — they're the wow trio.
   List cards drop the teaser line, shrink the headline, and pack tighter
   so six of them sit in one viewport without competing with the heroes. */
.vi-card[data-tier="list"] {
  padding: 16px 20px 18px;
  gap: 6px;
  background: var(--bg-sub);
  box-shadow: 0 8px 24px -22px rgba(26, 34, 48, 0.25);
}
.vi-card[data-tier="list"] .vi-card-h {
  font-size: 19px;
  line-height: 1.18;
}
.vi-card[data-tier="list"] .vi-card-num {
  display: none;
}
.vi-card[data-tier="list"] .vi-card-foot {
  padding-top: 6px;
  font-size: 10px;
  letter-spacing: 0.16em;
}
.vi-card[data-tier="list"] .vi-card-foot .arr {
  font-size: 15px;
}

.vi-tier-divider {
  grid-column: 1 / -1;
  margin: 14px 4px 2px;
  padding-bottom: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

/* === Retailer intro — brands strip ==================================== */

/* Reuses .lane / .lane-track. The label is just the kicker, sitting above
   the drifting logos so the visitor understands what they're looking at. */
.ri-brands {
  display: grid;
  grid-template-rows: auto auto;
  gap: 8px;
  padding: 14px 0 22px;
}
.ri-brands-label {
  margin: 0 28px;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
@media (max-width: 600px) {
  .vi-grid-wrap { grid-template-columns: 1fr; }
  .vi-h1 { font-size: 36px; }
}

/* reduced-motion additions */
@media (prefers-reduced-motion: reduce) {
  .theme-card,
  .countdown,
  .flash,
  .dot-trio .dot,
  .glass-form,
  .review-progress::after,
  .countdown-line::after,
  .vi-card,
  .vi-detail { animation: none; transition: none; }
  .glass-form { opacity: 1; transform: none; }
}
