/* ═══════════════════════════════════════════════════════════════════
   SAVVY CANVAS — Localworks Storefront (v2 Canvas)
   Conversational-first commerce. Dark nebula. Gold accent.
   Extracted + refined from canvas-prototype.html for production.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --cv-bg-0: #060418;
  --cv-bg-1: #0d0930;
  --cv-bg-2: #1a1464;
  --cv-bg-3: #2a1f7a;

  --cv-gold: #FF9500;
  --cv-gold-soft: #FFB340;
  --cv-gold-dim: rgba(255, 149, 0, 0.18);
  --cv-gold-glow: 0 0 40px rgba(255, 149, 0, 0.35);

  --cv-violet: #7c5cff;
  --cv-violet-soft: rgba(124, 92, 255, 0.22);

  --cv-glass: rgba(255, 255, 255, 0.05);
  --cv-glass-2: rgba(255, 255, 255, 0.08);
  --cv-glass-border: rgba(255, 255, 255, 0.10);
  --cv-glass-border-hot: rgba(255, 255, 255, 0.22);

  --cv-ink: #ffffff;
  --cv-ink-70: rgba(255, 255, 255, 0.72);
  --cv-ink-45: rgba(255, 255, 255, 0.45);
  --cv-ink-25: rgba(255, 255, 255, 0.25);

  --cv-success: #10dc70;
  --cv-danger: #ff4d6d;

  --cv-ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --cv-ease-inout: cubic-bezier(0.65, 0, 0.35, 1);

  --cv-r-sm: 10px;
  --cv-r-md: 16px;
  --cv-r-lg: 24px;
  --cv-r-xl: 36px;

  /* ── Ghost-blue scrollbars — subtle steel-violet that reads against
     the nebula without stealing focus. Thumb brightens on hover,
     turns gold when actively dragged. ───────────────────────────── */
  --cv-scroll-track:        transparent;
  --cv-scroll-thumb:        rgba(110, 140, 220, 0.22);
  --cv-scroll-thumb-hover:  rgba(150, 175, 240, 0.42);
  --cv-scroll-thumb-active: rgba(255, 149, 0, 0.55);
}

/* ── Ghost-blue scrollbars, site-wide ────────────────────────────
   Applies to every scrollable surface — html, body, overflow
   containers. Designed to whisper against the dark nebula. */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--cv-scroll-thumb) var(--cv-scroll-track);
}
*, *::before, *::after {
  scrollbar-width: thin;
  scrollbar-color: var(--cv-scroll-thumb) var(--cv-scroll-track);
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--cv-scroll-track);
}
::-webkit-scrollbar-thumb {
  background: var(--cv-scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background .2s var(--cv-ease-out);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cv-scroll-thumb-hover);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:active {
  background: var(--cv-scroll-thumb-active);
  background-clip: padding-box;
}
::-webkit-scrollbar-corner { background: transparent; }

/* ── Body guard ─────────────────────────────────────────────── */
body.canvas-active {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--cv-ink);
  background: var(--cv-bg-0);
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

/* ── Animated nebula backdrop ────────────────────────────────── */
.cv-backdrop {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(124,92,255,0.35), transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(255,149,0,0.18), transparent 60%),
    radial-gradient(ellipse 90% 70% at 50% 95%, rgba(124,92,255,0.25), transparent 60%),
    linear-gradient(180deg, var(--cv-bg-0), var(--cv-bg-1) 40%, var(--cv-bg-2) 100%);
  animation: cvNebulaDrift 40s ease-in-out infinite alternate;
}
.cv-backdrop::after {
  content: ""; position: absolute; inset: -20%;
  background-image:
    radial-gradient(2px 2px at 12% 22%, rgba(255,255,255,0.55), transparent 50%),
    radial-gradient(1px 1px at 37% 67%, rgba(255,255,255,0.45), transparent 50%),
    radial-gradient(2px 2px at 58% 18%, rgba(255,255,255,0.35), transparent 50%),
    radial-gradient(1px 1px at 78% 82%, rgba(255,255,255,0.5), transparent 50%),
    radial-gradient(1.5px 1.5px at 88% 38%, rgba(255,255,255,0.4), transparent 50%),
    radial-gradient(2px 2px at 22% 88%, rgba(255,255,255,0.35), transparent 50%);
  background-size: 100% 100%;
  opacity: 0.6;
  animation: cvStarDrift 80s linear infinite;
}
@keyframes cvNebulaDrift {
  0%   { filter: hue-rotate(0deg) brightness(1); }
  50%  { filter: hue-rotate(-8deg) brightness(1.05); }
  100% { filter: hue-rotate(5deg) brightness(0.95); }
}
@keyframes cvStarDrift {
  from { transform: translate(0,0); }
  to   { transform: translate(-40px,-60px); }
}

.cv-grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.6;
  mix-blend-mode: overlay;
}

/* ── Top rail ───────────────────────────────────────────────── */
.cv-top-rail {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 40px;
  gap: 16px;
}
.cv-brand {
  font-weight: 800; font-size: 15px; letter-spacing: 0.22em;
  color: var(--cv-ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
  transition: opacity .2s;
}
.cv-brand:hover { opacity: 0.85; }
.cv-brand img.cv-logo {
  height: 28px; width: auto;
  filter: brightness(0) invert(1);
}
.cv-brand .cv-logo-mark {
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--cv-gold) 0%, var(--cv-gold-soft) 60%, #fff 100%);
  border-radius: 8px;
  box-shadow: var(--cv-gold-glow);
}

.cv-top-rail-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cv-top-btn {
  appearance: none; background: var(--cv-glass); border: 1px solid var(--cv-glass-border);
  color: var(--cv-ink-70); font: inherit; font-size: 12px; font-weight: 500;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  letter-spacing: 0.02em;
  transition: all .25s var(--cv-ease-out);
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.cv-top-btn:hover { background: var(--cv-glass-2); color: var(--cv-ink); border-color: var(--cv-glass-border-hot); }
.cv-top-btn.active { background: var(--cv-gold); color: #1a0e00; border-color: transparent; box-shadow: var(--cv-gold-glow); }
.cv-top-btn i { font-size: 11px; }
.cv-top-btn .cv-badge {
  background: var(--cv-gold); color: #1a0e00;
  font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 999px;
  min-width: 18px; text-align: center;
  line-height: 1.3;
}

/* ── Journey trail ──────────────────────────────────────────── */
.cv-journey {
  position: relative; z-index: 5;
  display: flex; gap: 8px; align-items: center;
  padding: 0 40px 4px;
  min-height: 32px;
  font-size: 12px;
  color: var(--cv-ink-45);
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
}
.cv-journey::-webkit-scrollbar { display: none; }
.cv-crumb {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--cv-glass);
  border: 1px solid var(--cv-glass-border);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s var(--cv-ease-out);
  animation: cvCrumbIn .4s var(--cv-ease-out);
  color: var(--cv-ink-70);
  font-size: 12px;
}
.cv-crumb:hover { background: var(--cv-glass-2); color: var(--cv-ink); border-color: var(--cv-glass-border-hot); }
.cv-crumb .ic { font-size: 10px; color: var(--cv-gold); }
.cv-crumb .cv-crumb-x {
  margin-left: 6px; color: var(--cv-ink-45);
  cursor: pointer; font-size: 10px;
}
.cv-crumb .cv-crumb-x:hover { color: var(--cv-danger); }
.cv-crumb-sep { color: var(--cv-ink-25); font-size: 10px; }
.cv-crumb-hint { color: var(--cv-ink-25); font-style: italic; font-size: 11.5px; }
@keyframes cvCrumbIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Canvas stage ───────────────────────────────────────────── */
.cv-stage {
  position: relative; z-index: 5;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 160px;
}

/* ── Spotlight (hero input) ─────────────────────────────────── */
.cv-spotlight {
  margin-top: 4vh;
  text-align: center;
  animation: cvSpotlightIn .7s var(--cv-ease-out);
}
@keyframes cvSpotlightIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.cv-spotlight.shrunk {
  margin-top: 0;
  transition: margin-top .6s var(--cv-ease-out);
}
.cv-spotlight.shrunk .cv-spotlight-title { font-size: clamp(24px, 3.2vw, 32px); margin-bottom: 4px; }
.cv-spotlight.shrunk .cv-spotlight-sub { display: none; }

.cv-savvy-greeting {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 8px;
  background: var(--cv-glass);
  border: 1px solid var(--cv-glass-border);
  border-radius: 999px;
  font-size: 12.5px; color: var(--cv-ink-70);
  margin-bottom: 28px;
  font-weight: 500;
}
.cv-savvy-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--cv-success); box-shadow: 0 0 12px rgba(16,220,112,.6);
  animation: cvPulse 2s ease-in-out infinite;
}
@keyframes cvPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%     { transform: scale(1.2); opacity: 0.7; }
}

.cv-spotlight-title {
  font-family: 'Instrument Serif', 'Georgia', serif;
  font-weight: 400; font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02; letter-spacing: -0.03em;
  margin-bottom: 10px;
  color: var(--cv-ink);
}
.cv-spotlight-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--cv-gold), var(--cv-gold-soft));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cv-spotlight-sub {
  color: var(--cv-ink-45); font-size: 15px; margin-bottom: 32px;
  max-width: 560px; margin-left: auto; margin-right: auto;
  line-height: 1.5;
}

.cv-input-wrap {
  position: relative;
  max-width: 780px;
  margin: 0 auto 20px;
  display: flex; align-items: center;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--cv-glass-border);
  border-radius: 28px;
  padding: 6px 6px 6px 22px;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transition: all .3s var(--cv-ease-out);
}
.cv-input-wrap:focus-within {
  border-color: rgba(255,149,0,0.55);
  box-shadow:
    0 0 0 6px rgba(255,149,0,0.12),
    0 12px 48px rgba(255,149,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.08);
}
.cv-input-wrap .ic {
  color: var(--cv-ink-45); font-size: 18px; margin-right: 10px;
  transition: color .25s var(--cv-ease-out);
}
.cv-input-wrap:focus-within .ic { color: var(--cv-gold); }
.cv-input {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--cv-ink); font: inherit; font-size: 16px;
  padding: 18px 10px; font-weight: 400;
  letter-spacing: -0.01em;
  font-family: inherit;
  min-width: 0;
}
.cv-input::placeholder { color: var(--cv-ink-45); }
.cv-input-spinner {
  width: 22px; height: 22px; margin-right: 6px;
  border: 2px solid rgba(255,149,0,0.25);
  border-top-color: var(--cv-gold);
  border-radius: 50%;
  animation: cvSpin 0.7s linear infinite;
  display: none;
}
.cv-input-spinner.active { display: block; }
@keyframes cvSpin { to { transform: rotate(360deg); } }
.cv-submit {
  appearance: none; background: linear-gradient(135deg, var(--cv-gold), #ff7a00);
  color: #1a0e00; border: 0; border-radius: 22px;
  width: 44px; height: 44px; cursor: pointer;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 700;
  box-shadow: 0 8px 20px rgba(255,149,0,0.35);
  transition: transform .2s var(--cv-ease-out), box-shadow .2s var(--cv-ease-out);
  flex-shrink: 0;
}
.cv-submit:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 12px 30px rgba(255,149,0,0.5); }
.cv-submit:active { transform: translateY(0) scale(0.98); }

.cv-chips {
  display: flex; gap: 8px; justify-content: center;
  flex-wrap: wrap; margin-top: 8px;
}
.cv-chip {
  appearance: none; background: var(--cv-glass); color: var(--cv-ink-70);
  border: 1px solid var(--cv-glass-border);
  font: inherit; font-size: 13px; font-weight: 500;
  padding: 10px 18px; border-radius: 999px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .25s var(--cv-ease-out);
  animation: cvChipIn .5s var(--cv-ease-out) backwards;
  text-decoration: none;
  font-family: inherit;
}
.cv-chip:nth-child(1) { animation-delay: .1s; }
.cv-chip:nth-child(2) { animation-delay: .18s; }
.cv-chip:nth-child(3) { animation-delay: .26s; }
.cv-chip:nth-child(4) { animation-delay: .34s; }
.cv-chip:nth-child(5) { animation-delay: .42s; }
.cv-chip:nth-child(6) { animation-delay: .5s; }
.cv-chip:hover {
  background: var(--cv-glass-2); color: var(--cv-ink);
  border-color: var(--cv-glass-border-hot);
  transform: translateY(-1px);
}
.cv-chip .ic { font-size: 12px; color: var(--cv-gold); }
@keyframes cvChipIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ── Answer Surface ─────────────────────────────────────────── */
.cv-answer {
  margin-top: 48px;
  display: none;
}
.cv-answer.active { display: block; animation: cvSurfaceIn .5s var(--cv-ease-out); }
@keyframes cvSurfaceIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.cv-answer-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}
.cv-answer-title {
  font-family: 'Instrument Serif', 'Georgia', serif;
  font-size: 28px; line-height: 1.1; font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--cv-ink);
}
.cv-answer-title em {
  color: var(--cv-gold); font-style: italic;
}
.cv-answer-meta {
  color: var(--cv-ink-45); font-size: 12.5px;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.cv-answer-meta .ic { color: var(--cv-gold); }

.cv-answer-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 960px) {
  .cv-answer-body { grid-template-columns: 1fr; }
}

/* Product grid */
.cv-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.cv-card {
  position: relative;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--cv-glass-border);
  border-radius: var(--cv-r-md);
  padding: 14px;
  cursor: pointer;
  transition: all .3s var(--cv-ease-out);
  overflow: hidden;
  animation: cvCardIn .45s var(--cv-ease-out) backwards;
  text-decoration: none;
  color: var(--cv-ink);
  display: flex; flex-direction: column;
}
.cv-card:nth-child(1){animation-delay:.05s}
.cv-card:nth-child(2){animation-delay:.1s}
.cv-card:nth-child(3){animation-delay:.15s}
.cv-card:nth-child(4){animation-delay:.2s}
.cv-card:nth-child(5){animation-delay:.25s}
.cv-card:nth-child(6){animation-delay:.3s}
.cv-card:nth-child(7){animation-delay:.35s}
.cv-card:nth-child(8){animation-delay:.4s}
@keyframes cvCardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.cv-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--cv-glass-border-hot);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}
.cv-card .cv-img {
  aspect-ratio: 4/3;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  margin-bottom: 12px;
  display: grid; place-items: center;
  font-size: 44px;
  color: var(--cv-ink-45);
  overflow: hidden;
}
.cv-card .cv-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.cv-card .cv-brand {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cv-gold);
  margin-bottom: 4px;
  min-height: 1.2em;
}
.cv-card .cv-title {
  font-size: 13.5px; font-weight: 500; line-height: 1.35;
  color: var(--cv-ink);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
  min-height: 2.7em;
}
.cv-card .cv-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px;
  margin-top: auto;
}
.cv-card .cv-price {
  font-size: 16px; font-weight: 700; color: var(--cv-ink);
  font-variant-numeric: tabular-nums;
}
.cv-card .cv-price-hidden {
  font-size: 11px; color: var(--cv-ink-45);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.cv-card .cv-add {
  appearance: none; background: var(--cv-gold); color: #1a0e00;
  border: 0; border-radius: 10px;
  width: 34px; height: 34px; cursor: pointer;
  display: grid; place-items: center; font-size: 13px;
  transition: all .2s var(--cv-ease-out);
  flex-shrink: 0;
}
.cv-card .cv-add:hover { transform: scale(1.1); }
.cv-card .cv-add:disabled { opacity: 0.6; cursor: wait; }
.cv-card .cv-proof {
  margin-top: 10px; font-size: 11px; color: var(--cv-ink-45);
  display: flex; align-items: center; gap: 6px;
}
.cv-card .cv-proof .ic { color: var(--cv-success); font-size: 9px; }

/* Empty state */
.cv-empty {
  padding: 48px 24px;
  text-align: center;
  background: rgba(255,255,255,0.035);
  border: 1px dashed var(--cv-glass-border);
  border-radius: var(--cv-r-lg);
}
.cv-empty .ic { font-size: 36px; color: var(--cv-gold); margin-bottom: 14px; }
.cv-empty h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; color: var(--cv-ink); }
.cv-empty p { color: var(--cv-ink-45); font-size: 13.5px; max-width: 420px; margin: 0 auto 16px; line-height: 1.5; }

/* Context rail */
.cv-context {
  display: flex; flex-direction: column; gap: 14px;
}
.cv-ctx-card {
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--cv-glass-border);
  border-radius: var(--cv-r-md);
  padding: 16px;
  animation: cvCardIn .5s var(--cv-ease-out) backwards;
}
.cv-ctx-card h4 {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cv-ink-45); font-weight: 600; margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.cv-ctx-card h4 .ic { color: var(--cv-gold); }
.cv-ctx-card .cv-ctx-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  font-size: 13px; color: var(--cv-ink-70);
  border-bottom: 1px solid var(--cv-glass-border);
  line-height: 1.45;
}
.cv-ctx-card .cv-ctx-row:last-child { border-bottom: 0; padding-bottom: 0; }
.cv-ctx-card .cv-ctx-row strong { color: var(--cv-ink); }
.cv-ctx-card .cv-ctx-row .ic { color: var(--cv-gold); font-size: 12px; flex-shrink: 0; }
.cv-ctx-card.urgency {
  background: linear-gradient(135deg, rgba(255,149,0,0.12), rgba(255,149,0,0.04));
  border-color: rgba(255,149,0,0.3);
}
.cv-ctx-card.urgency h4 { color: var(--cv-gold); }
.cv-ctx-card .cv-ctx-brand-chips {
  display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px;
}
.cv-ctx-card .cv-ctx-brand-chip {
  font-size: 11.5px; color: var(--cv-ink-70);
  background: var(--cv-glass);
  border: 1px solid var(--cv-glass-border);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
}
.cv-ctx-card .cv-ctx-brand-chip:hover { background: var(--cv-glass-2); color: var(--cv-ink); }

/* Answer footer (pagination / view-all) */
.cv-answer-foot {
  margin-top: 18px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
}

/* Buttons */
.cv-btn-gold {
  appearance: none; background: linear-gradient(135deg, var(--cv-gold), #ff7a00);
  color: #1a0e00; font: inherit; font-size: 14px; font-weight: 600;
  padding: 12px 22px; border: 0; border-radius: 999px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 20px rgba(255,149,0,0.3);
  transition: all .2s var(--cv-ease-out);
  text-decoration: none;
}
.cv-btn-gold:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(255,149,0,0.45); }
.cv-btn-ghost {
  appearance: none; background: var(--cv-glass); color: var(--cv-ink-70);
  border: 1px solid var(--cv-glass-border);
  font: inherit; font-size: 13px; font-weight: 500;
  padding: 12px 20px; border-radius: 999px; cursor: pointer;
  transition: all .2s var(--cv-ease-out);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.cv-btn-ghost:hover { background: var(--cv-glass-2); color: var(--cv-ink); }

/* ── Savvy co-pilot (corner) ────────────────────────────────── */
.cv-savvy {
  position: fixed; z-index: 20;
  right: 28px; bottom: 28px;
  display: flex; align-items: flex-end; gap: 12px;
  pointer-events: none;
}
.cv-savvy > * { pointer-events: auto; }

.cv-savvy-bubble {
  max-width: 260px;
  background: rgba(20, 15, 55, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--cv-glass-border-hot);
  border-radius: 18px 18px 4px 18px;
  padding: 12px 14px;
  font-size: 12.5px; line-height: 1.5; color: var(--cv-ink-70);
  opacity: 0; transform: translateY(6px) scale(0.95);
  transition: all .35s var(--cv-ease-out);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  pointer-events: none;
}
.cv-savvy-bubble.visible { opacity: 1; transform: none; pointer-events: auto; }
.cv-savvy-bubble strong { color: var(--cv-ink); font-weight: 600; }
.cv-savvy-bubble em { color: var(--cv-gold); font-style: normal; font-weight: 500; }

.cv-savvy-avatar {
  position: relative;
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cv-gold), #ff7a00);
  box-shadow: var(--cv-gold-glow), 0 8px 24px rgba(0,0,0,0.3);
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .3s var(--cv-ease-out);
  overflow: hidden;
  border: 0; padding: 0;
}
.cv-savvy-avatar::before {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--cv-gold), var(--cv-violet), var(--cv-gold));
  z-index: -1;
  opacity: 0.5;
  animation: cvSpin2 8s linear infinite;
}
@keyframes cvSpin2 { to { transform: rotate(360deg); } }
.cv-savvy-avatar:hover { transform: scale(1.06); }
.cv-savvy-avatar.excited { animation: cvBob 0.8s ease-in-out infinite; }
@keyframes cvBob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.cv-savvy-avatar img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}
.cv-savvy-avatar svg { width: 44px; height: 44px; }

/* ── Cart tally (conversation) ──────────────────────────────── */
.cv-cart-tally {
  position: fixed; z-index: 18;
  left: 28px; bottom: 28px;
  background: rgba(20, 15, 55, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--cv-glass-border-hot);
  border-radius: 18px;
  padding: 16px 18px;
  max-width: 340px;
  opacity: 0; transform: translateY(10px);
  pointer-events: none;
  transition: all .4s var(--cv-ease-out);
  box-shadow: 0 20px 48px rgba(0,0,0,0.4);
}
.cv-cart-tally.visible { opacity: 1; transform: none; pointer-events: auto; }
.cv-cart-tally .cv-tally-h {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cv-gold); font-weight: 600;
}
.cv-cart-tally .cv-tally-msg {
  font-size: 13.5px; line-height: 1.5; color: var(--cv-ink); margin-bottom: 12px;
}
.cv-cart-tally .cv-tally-msg strong { color: var(--cv-gold); font-weight: 600; }
.cv-cart-tally .cv-tally-cta {
  display: flex; gap: 8px;
}
.cv-cart-tally .cv-tally-cta button, .cv-cart-tally .cv-tally-cta a {
  flex: 1; appearance: none; font: inherit; cursor: pointer;
  border-radius: 10px; padding: 10px 14px; font-size: 12.5px; font-weight: 600;
  text-decoration: none; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit;
}
.cv-cart-tally .cv-tally-ck {
  background: var(--cv-gold); color: #1a0e00; border: 0;
}
.cv-cart-tally .cv-tally-cont {
  background: transparent; color: var(--cv-ink-70); border: 1px solid var(--cv-glass-border-hot);
}
.cv-cart-tally .cv-tally-close {
  position: absolute; top: 6px; right: 8px;
  background: transparent; border: 0; color: var(--cv-ink-45);
  width: 22px; height: 22px; cursor: pointer;
  font-size: 12px; border-radius: 50%;
  display: grid; place-items: center;
}
.cv-cart-tally .cv-tally-close:hover { background: var(--cv-glass); color: var(--cv-ink); }

/* Toast for transient messages */
.cv-toast {
  position: fixed; z-index: 30;
  bottom: 110px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: rgba(20, 15, 55, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--cv-glass-border-hot);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px; color: var(--cv-ink);
  opacity: 0; pointer-events: none;
  transition: all .3s var(--cv-ease-out);
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}
.cv-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.cv-toast.ok { border-color: rgba(16,220,112,0.4); }
.cv-toast.err { border-color: rgba(255,77,109,0.4); }

/* Skeleton loading */
.cv-skel {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: cvShimmer 1.2s ease-in-out infinite;
  border-radius: var(--cv-r-md);
}
@keyframes cvShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.cv-skel-card {
  height: 280px;
}

/* ── Annotations overlay ────────────────────────────────────── */
.cv-anno-overlay {
  position: fixed; inset: 0; z-index: 50;
  pointer-events: none;
  display: none;
}
.cv-anno-overlay.visible { display: block; }
.cv-anno-overlay .cv-anno-scrim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(1px);
  pointer-events: auto;
}
.cv-anno-pin {
  position: absolute;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--cv-gold);
  color: #1a0e00;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px;
  box-shadow: 0 0 0 6px rgba(255,149,0,0.2), 0 8px 20px rgba(0,0,0,0.3);
  pointer-events: auto;
  animation: cvPinPulse 2s ease-in-out infinite;
  cursor: pointer;
  border: 0;
}
@keyframes cvPinPulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255,149,0,0.2), 0 8px 20px rgba(0,0,0,0.3); }
  50%     { transform: scale(1.12); box-shadow: 0 0 0 12px rgba(255,149,0,0.12), 0 10px 22px rgba(0,0,0,0.3); }
}

.cv-anno-legend {
  position: absolute;
  left: 40px; top: 100px;
  width: 360px; max-height: calc(100vh - 140px);
  overflow-y: auto;
  background: rgba(12, 8, 36, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--cv-glass-border-hot);
  border-radius: var(--cv-r-lg);
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  pointer-events: auto;
}
.cv-anno-legend h3 {
  font-family: 'Instrument Serif', 'Georgia', serif;
  font-size: 22px; font-weight: 400; line-height: 1.2; margin: 0 0 6px; color: var(--cv-ink);
}
.cv-anno-legend h3 em { color: var(--cv-gold); font-style: italic; }
.cv-anno-legend .cv-anno-lead {
  font-size: 12.5px; color: var(--cv-ink-45); margin-bottom: 16px; line-height: 1.5;
}
.cv-anno-item {
  display: flex; gap: 12px; padding: 12px 0;
  border-top: 1px solid var(--cv-glass-border);
}
.cv-anno-item:first-of-type { border-top: 0; padding-top: 0; }
.cv-anno-item .cv-anno-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--cv-gold); color: #1a0e00;
  display: grid; place-items: center;
  font-weight: 800; font-size: 11.5px;
  flex-shrink: 0;
}
.cv-anno-item h5 {
  font-size: 13px; font-weight: 600; margin: 0 0 2px;
  color: var(--cv-ink);
}
.cv-anno-item .cv-anno-lever {
  font-size: 11px; color: var(--cv-gold); font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.cv-anno-item p {
  font-size: 12px; line-height: 1.55; color: var(--cv-ink-70); margin: 0;
}
.cv-anno-legend::-webkit-scrollbar { width: 6px; }
.cv-anno-legend::-webkit-scrollbar-track { background: var(--cv-scroll-track); }
.cv-anno-legend::-webkit-scrollbar-thumb { background: var(--cv-scroll-thumb); border-radius: 999px; }
.cv-anno-legend::-webkit-scrollbar-thumb:hover { background: var(--cv-scroll-thumb-hover); }

/* Tiny utility */
.cv .ic { display: inline-flex; }
.cv-hidden { display: none !important; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cv-top-rail { padding: 16px 20px; }
  .cv-stage { padding: 24px 20px 140px; }
  .cv-journey { padding: 0 20px 4px; }
  .cv-anno-legend { left: 16px; right: 16px; width: auto; max-width: calc(100vw - 32px); }
  .cv-spotlight-sub { font-size: 14px; padding: 0 8px; }
  .cv-input { font-size: 15px; padding: 16px 6px; }
  .cv-chips { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; scrollbar-width: none; }
  .cv-chips::-webkit-scrollbar { display: none; }
  .cv-chip { white-space: nowrap; }
  .cv-savvy { right: 16px; bottom: 16px; }
  .cv-cart-tally { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .cv-savvy-bubble { display: none; }
}

@media (max-width: 560px) {
  .cv-top-btn .cv-top-btn-label { display: none; }
  .cv-products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cv-card { padding: 10px; }
  .cv-card .cv-img { margin-bottom: 8px; }
  .cv-card .cv-title { font-size: 12.5px; }
  .cv-card .cv-price { font-size: 14px; }
  .cv-card .cv-add { width: 30px; height: 30px; }
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 2 — Inline chat, cart drawer, resume banner
   ═══════════════════════════════════════════════════════════════════ */

/* ── Returning-user resume banner ───────────────────────────── */
.cv-resume {
  position: relative;
  z-index: 4;
  padding: 12px 24px 0;
}
.cv-resume[hidden] { display: none !important; }
.cv-resume-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(255,149,0,0.12), rgba(124,92,255,0.08));
  border: 1px solid rgba(255,149,0,0.28);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: cvResumeIn .5s var(--cv-ease-out) both;
}
@keyframes cvResumeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.cv-resume-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cv-gold); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(255,149,0,0.6);
  animation: cvResumePulse 2s ease-out infinite;
}
@keyframes cvResumePulse { 0%,100%{ box-shadow:0 0 0 0 rgba(255,149,0,0.6);} 50%{ box-shadow:0 0 0 8px rgba(255,149,0,0);}}
.cv-resume-text { flex: 1; font-size: 13.5px; color: var(--cv-ink-70); line-height: 1.45; }
.cv-resume-text strong { color: var(--cv-ink); font-weight: 600; }
.cv-resume-cta {
  background: var(--cv-gold); color: #1a0e00;
  border: 0; padding: 9px 16px; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .18s var(--cv-ease-out), box-shadow .18s;
}
.cv-resume-cta:hover { transform: translateY(-1px); box-shadow: var(--cv-gold-glow); }
.cv-resume-dismiss {
  background: transparent; border: 0; color: var(--cv-ink-45);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px;
  border-radius: 6px; transition: color .15s, background .15s;
}
.cv-resume-dismiss:hover { color: var(--cv-ink); background: rgba(255,255,255,0.06); }

/* ═════════════════════════════════════════════════════════════════════
   INLINE CHAT — Savvy inside the Canvas
   "Every pixel matters, every interaction delights."
   ═════════════════════════════════════════════════════════════════════ */

/* ── Thread shell ───────────────────────────────────────────────── */
.cv-chat {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  gap: 10px;
  padding: 4px 2px 0;
}
.cv-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 140px;
  padding: 12px 4px 8px;
  position: relative;
}

/* ── Message row ────────────────────────────────────────────────── */
.cv-msg {
  display: flex;
  align-items: flex-end;            /* bubble tail lines up with avatar */
  gap: 12px;
  position: relative;
  animation: cvMsgIn .42s var(--cv-ease-out) both;
}
@keyframes cvMsgIn {
  0%   { opacity: 0; transform: translateY(10px) scale(.97); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.cv-msg.from-user { justify-content: flex-end; }

/* Grouped — consecutive same-sender messages hide the avatar and tighten
   spacing so threads read like real dialogue rather than a ping-pong log. */
.cv-msg.is-grouped           { margin-top: -12px; }
.cv-msg.is-grouped .cv-msg-avatar { visibility: hidden; }

/* ── Avatars ─────────────────────────────────────────────────────── */
.cv-msg-avatar {
  flex-shrink: 0;
  width: 42px; height: 42px; border-radius: 50%;
  position: relative;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--cv-gold) 0%, #ff6a00 100%);
  color: #1a0e00;
  box-shadow:
    0 0 0 2px rgba(255,149,0,0.18),
    0 6px 18px rgba(255,149,0,0.28);
  transition: transform .25s var(--cv-ease-out), box-shadow .25s;
}
.cv-msg-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.cv-msg-avatar::after {
  /* Presence dot — only visible on Savvy avatars */
  content: '';
  position: absolute;
  right: 0; bottom: 0;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--cv-success);
  border: 2px solid var(--cv-bg-0);
  opacity: 0;
  box-shadow: 0 0 0 0 rgba(16,220,112,0.7);
}
.cv-msg.from-savvy .cv-msg-avatar::after {
  opacity: 1;
  animation: cvPresencePulse 2s ease-out infinite;
}
@keyframes cvPresencePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,220,112,0.55); }
  50%      { box-shadow: 0 0 0 5px rgba(16,220,112,0); }
}

.cv-msg.from-user .cv-msg-avatar {
  background: linear-gradient(135deg, #7c5cff 0%, #5a3fd4 70%, #3a1fb8 100%);
  color: #fff;
  order: 2;
  box-shadow:
    0 0 0 2px rgba(124,92,255,0.22),
    0 6px 18px rgba(124,92,255,0.3);
}

/* ── Bubble body ─────────────────────────────────────────────────── */
.cv-msg-body {
  position: relative;
  max-width: min(680px, calc(100% - 60px));
  padding: 13px 18px;
  border-radius: 20px 20px 20px 6px;   /* tail corner into the Savvy avatar */
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,149,0,0.22);
  color: var(--cv-ink);
  font-size: 14.5px; line-height: 1.58;
  word-break: break-word;
  white-space: pre-wrap;
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),     /* glass top highlight */
    0 8px 24px rgba(0,0,0,0.28);
}
.cv-msg-body::before {
  /* Inner radial gold/violet accent */
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at 22% 0%, rgba(255,149,0,0.14), transparent 55%);
  pointer-events: none;
}
.cv-msg-body > * { position: relative; z-index: 1; }

.cv-msg-body strong { font-weight: 600; color: var(--cv-ink); }
.cv-msg-body em     { color: var(--cv-gold-soft); font-style: italic; }
.cv-msg-body code {
  background: rgba(255,255,255,0.1);
  padding: 2px 7px; border-radius: 5px;
  font-size: 12.5px; letter-spacing: 0.01em;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}
.cv-msg-body a {
  color: var(--cv-gold-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color .15s, text-decoration-thickness .15s;
}
.cv-msg-body a:hover { color: var(--cv-gold); text-decoration-thickness: 2px; }
.cv-msg-body ul, .cv-msg-body ol { margin: 8px 0 4px; padding-left: 22px; }
.cv-msg-body li { margin: 4px 0; }
.cv-msg-body p  { margin: 6px 0; }
.cv-msg-body p:first-child { margin-top: 0; }
.cv-msg-body p:last-child  { margin-bottom: 0; }

/* User bubble — violet gradient, tail on the right */
.cv-msg.from-user .cv-msg-body {
  background: linear-gradient(135deg, rgba(124,92,255,0.24) 0%, rgba(124,92,255,0.12) 100%);
  border-color: rgba(124,92,255,0.42);
  border-radius: 20px 20px 6px 20px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 8px 24px rgba(124,92,255,0.22);
}
.cv-msg.from-user .cv-msg-body::before {
  background: radial-gradient(circle at 80% 0%, rgba(150,125,255,0.2), transparent 55%);
}

/* First Savvy welcome — bigger mascot + richer bubble */
.cv-msg.from-savvy.is-first .cv-msg-avatar {
  width: 56px; height: 56px;
  box-shadow:
    0 0 0 3px rgba(255,149,0,0.25),
    0 10px 28px rgba(255,149,0,0.35);
}
.cv-msg.from-savvy.is-first .cv-msg-body {
  padding: 18px 22px;
  font-size: 15.5px; line-height: 1.65;
  background: linear-gradient(135deg, rgba(255,149,0,0.10), rgba(255,255,255,0.04) 55%);
  border-color: rgba(255,149,0,0.4);
}
.cv-msg.from-savvy.is-first .cv-msg-body::before {
  background: radial-gradient(circle at 18% 0%, rgba(255,149,0,0.22), transparent 60%);
}

/* Delivered tick — subtle glyph under a user bubble once the server acks */
.cv-msg.from-user .cv-msg-body::after {
  content: '\f560';                            /* fa-check-double */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 8px; bottom: -18px;
  font-size: 10.5px;
  color: rgba(124,92,255,0.65);
  opacity: 0;
  transition: opacity .35s .1s var(--cv-ease-out);
}
.cv-msg.from-user.delivered .cv-msg-body::after { opacity: 1; }

/* Hover-to-reveal timestamp */
.cv-msg-time {
  position: absolute;
  bottom: -20px;
  font-size: 10.5px;
  color: var(--cv-ink-45);
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cv-msg.from-user  .cv-msg-time { right: 60px; }
.cv-msg.from-savvy .cv-msg-time { left: 60px;  }
.cv-msg:hover .cv-msg-time { opacity: 0.9; }

/* ── Typing indicator ────────────────────────────────────────────── */
.cv-msg-typing .cv-msg-body {
  padding: 14px 20px;
  display: inline-flex; align-items: center; gap: 12px;
  max-width: max-content;
}
.cv-msg-typing .cv-msg-body::before {
  /* Brighten the radial glow while Savvy is thinking */
  background: radial-gradient(circle at 50% 50%, rgba(255,149,0,0.22), transparent 60%);
  animation: cvTypingGlow 1.8s ease-in-out infinite;
}
@keyframes cvTypingGlow {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}
.cv-msg-typing .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cv-gold);
  box-shadow: 0 0 8px rgba(255,149,0,0.5);
  animation: cvTyping 1.3s infinite;
}
.cv-msg-typing .dot:nth-child(2) { animation-delay: 0.18s; }
.cv-msg-typing .dot:nth-child(3) { animation-delay: 0.36s; }
.cv-msg-typing .thinking {
  font-size: 12px; font-style: italic;
  color: var(--cv-ink-45);
  letter-spacing: 0.01em;
  margin-left: 2px;
}
@keyframes cvTyping {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0)   scale(0.85); }
  30%           { opacity: 1;   transform: translateY(-5px) scale(1.1);  }
}

/* ── Inline products inside Savvy's reply ────────────────────────
   Horizontal mini-cards — image-left, copy-right — feel native to chat:
   you scan them like list items and jump back to the conversation. */
.cv-msg-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255,149,0,0.22);
}
.cv-msg-pcard {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.12));
  border: 1px solid var(--cv-glass-border);
  border-radius: 12px;
  padding: 8px;
  text-decoration: none;
  color: inherit;
  transition: transform .2s var(--cv-ease-out), border-color .2s, box-shadow .2s, background .2s;
}
.cv-msg-pcard:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255,149,0,0.08), rgba(0,0,0,0.12));
  border-color: rgba(255,149,0,0.55);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,149,0,0.2);
}
.cv-msg-pcard .img {
  width: 64px; height: 64px;
  border-radius: 9px;
  background: rgba(255,255,255,0.06);
  display: grid; place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.cv-msg-pcard .img img { max-width: 88%; max-height: 88%; object-fit: contain; }
.cv-msg-pcard .meta {
  display: flex; flex-direction: column;
  gap: 4px;
  min-width: 0;
  /* Pad right so text doesn't overlap the 44px add-to-cart button */
  padding-right: 38px;
  position: relative;
}
/* Subtle chevron hint that card links somewhere */
.cv-msg-pcard .meta::after {
  content: '\f054'; /* fa-chevron-right */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 9px;
  color: var(--cv-ink-45);
  opacity: 0.5;
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  transition: opacity .2s, transform .2s;
}
.cv-msg-pcard:hover .meta::after {
  opacity: 0.85;
  transform: translateY(-50%) translateX(2px);
}
.cv-msg-pcard .ttl {
  font-size: 12.5px; line-height: 1.35;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  color: var(--cv-ink);
  word-break: break-word;
}
.cv-msg-pcard .pr {
  font-size: 12.5px; font-weight: 700;
  color: var(--cv-gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 6px;
  /* Subtle pill background so price pops on busy backgrounds */
  background: rgba(255,149,0,0.10);
  padding: 3px 8px;
  border-radius: 999px;
  width: fit-content;
}
.cv-msg-pcard .pr::before {
  /* Little gold dot precedes the price — reads as a tag, not a link */
  content: '';
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--cv-gold);
  opacity: 0.85;
}

/* Mobile UX: generous touch targets, clear active states, tighter but legible */
@media (max-width: 640px) {
  .cv-msg-products {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
  }
  .cv-msg-pcard {
    grid-template-columns: 48px 1fr;
    gap: 8px;
    padding: 10px 12px 10px 10px;
  }
  .cv-msg-pcard .img { width: 48px; height: 48px; border-radius: 7px; }
  .cv-msg-pcard .ttl { font-size: 12px; }
  .cv-msg-pcard .pr { font-size: 12px; padding: 2px 6px; }
}
@media (max-width: 480px) {
  .cv-msg-products { grid-template-columns: 1fr; }
}

/* Touch feedback for mobile tap */
.cv-msg-pcard:active {
  transform: scale(0.995);
  border-color: rgba(255,149,0,0.65);
  background: linear-gradient(180deg, rgba(255,149,0,0.12), rgba(0,0,0,0.15));
}

/* ── Suggestion chips below Savvy's latest reply ─────────────────── */
.cv-chat-sugs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-left: 54px; margin-top: -2px;
  animation: cvMsgIn .45s var(--cv-ease-out) both;
  animation-delay: .15s;
}
.cv-chat-sug {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,149,0,0.22);
  color: var(--cv-ink-70);
  padding: 8px 14px;
  border-radius: 999px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all .22s var(--cv-ease-out);
}
.cv-chat-sug::before {
  content: '\f061';                           /* fa-arrow-right */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 10px;
  color: var(--cv-gold);
  opacity: 0.6;
  transition: transform .22s, opacity .22s;
}
.cv-chat-sug:hover {
  background: rgba(255,149,0,0.1);
  border-color: var(--cv-gold);
  color: var(--cv-ink);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255,149,0,0.15);
}
.cv-chat-sug:hover::before { opacity: 1; transform: translateX(3px); }

/* ── Follow-up composer ────────────────────────────────────────────
   Deliberately subordinate to the hero input. No framed shelf — just
   a thin divider, a slim pill, a small send, and a ghost "Start over".
   The hero gets to be the star. */
.cv-chat-form {
  position: sticky; bottom: 0;
  display: flex; gap: 8px; align-items: center;
  padding: 10px 2px 8px;
  margin-top: 14px;
  /* No background — sits transparent on the nebula. Just a hairline divider. */
  border-top: 1px solid var(--cv-glass-border);
  transition: border-color .2s;
}
.cv-chat-form:focus-within {
  border-top-color: rgba(255,149,0,0.35);
}
.cv-chat-in-wrap {
  flex: 1; position: relative;
  display: flex; align-items: center;
}
.cv-chat-in-wrap .prefix {
  position: absolute; left: 14px;
  color: var(--cv-ink-45);
  font-size: 11.5px;
  pointer-events: none;
  transition: color .2s;
}
.cv-chat-in-wrap:focus-within .prefix { color: var(--cv-gold); }
.cv-chat-in {
  flex: 1; width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--cv-glass-border);
  border-radius: 999px;
  padding: 10px 16px 10px 36px;
  color: var(--cv-ink);
  font: inherit; font-size: 13.5px;
  outline: 0;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.cv-chat-in::placeholder { color: var(--cv-ink-45); font-size: 13px; }
.cv-chat-in:focus {
  border-color: rgba(255,149,0,0.55);
  box-shadow: 0 0 0 2px rgba(255,149,0,0.1);
  background: rgba(255,255,255,0.06);
}

/* Ghost "Start over" — tertiary action, dim by default, warms on hover */
.cv-chat-reset {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--cv-ink-45);
  cursor: pointer;
  font: inherit; font-size: 12px;
  letter-spacing: 0.01em;
  transition: color .18s, background .18s, border-color .18s;
  white-space: nowrap;
}
.cv-chat-reset i { font-size: 11px; transition: transform .3s var(--cv-ease-out); }
.cv-chat-reset:hover {
  color: var(--cv-ink);
  background: rgba(255,255,255,0.05);
  border-color: var(--cv-glass-border);
}
.cv-chat-reset:hover i { transform: rotate(-120deg); }
.cv-chat-reset:active { transform: scale(0.97); }
.cv-chat-reset-label {
  /* Label collapses on very narrow composers — icon remains */
  display: inline;
}
@media (max-width: 480px) {
  .cv-chat-reset { padding: 0 8px; }
  .cv-chat-reset-label { display: none; }
}

.cv-chat-send {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cv-gold) 0%, #ff6a00 100%);
  color: #1a0e00;
  border: 0; cursor: pointer;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 3px 10px rgba(255,149,0,0.28);
  transition: transform .18s var(--cv-ease-out), box-shadow .18s;
  position: relative;
  flex-shrink: 0;
}
.cv-chat-send:hover {
  transform: scale(1.06);
  box-shadow: 0 5px 16px rgba(255,149,0,0.42);
}
.cv-chat-send:active { transform: scale(0.95); }
.cv-chat-send:disabled {
  opacity: 0.5; cursor: not-allowed;
  transform: none; box-shadow: none;
}
.cv-chat-send::after {
  /* Gold ring pulse when the composer has text ready to send */
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(255,149,0,0.5);
  opacity: 0;
  pointer-events: none;
}
.cv-chat-form.has-text .cv-chat-send::after {
  animation: cvSendPulse 1.6s ease-out infinite;
}
@keyframes cvSendPulse {
  0%   { opacity: 0.6; transform: scale(0.9);  }
  100% { opacity: 0;   transform: scale(1.35); }
}

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .cv-chat { gap: 8px; }
  .cv-chat-thread { gap: 14px; }
  .cv-msg-avatar { width: 36px; height: 36px; font-size: 14px; }
  .cv-msg.from-savvy.is-first .cv-msg-avatar { width: 48px; height: 48px; }
  .cv-msg-body   { font-size: 14px; padding: 12px 16px; }
  .cv-msg.from-savvy.is-first .cv-msg-body { padding: 14px 18px; font-size: 14.5px; }
  .cv-chat-sugs  { margin-left: 46px; }
  .cv-chat-in    { font-size: 13px; padding: 9px 14px 9px 34px; }
  .cv-chat-send  { width: 36px; height: 36px; font-size: 12px; }
}

/* ── Cart drawer (progressive disclosure) ───────────────────── */
.cv-drawer {
  position: fixed; inset: 0;
  z-index: 300;
  pointer-events: none;
  visibility: hidden;
}
.cv-drawer.open { pointer-events: auto; visibility: visible; }
.cv-drawer-scrim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .3s var(--cv-ease-out);
}
.cv-drawer.open .cv-drawer-scrim { opacity: 1; }
.cv-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(440px, 100vw);
  background: linear-gradient(180deg, #0d0930 0%, #060418 100%);
  border-left: 1px solid var(--cv-glass-border);
  display: flex; flex-direction: column;
  transform: translateX(110%);
  transition: transform .4s var(--cv-ease-out);
  box-shadow: -20px 0 60px rgba(0,0,0,0.6);
}
.cv-drawer.open .cv-drawer-panel { transform: translateX(0); }
.cv-drawer-panel:focus { outline: none; }
.cv-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--cv-glass-border);
  flex-shrink: 0;
}
.cv-drawer-kicker {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--cv-gold); font-weight: 700; margin-bottom: 4px;
}
.cv-drawer-title {
  font-family: 'Instrument Serif', 'Inter', serif;
  font-size: 26px; margin: 0;
  font-style: italic; line-height: 1.1;
  color: var(--cv-ink);
}
.cv-drawer-x {
  background: transparent; border: 0; color: var(--cv-ink-45);
  font-size: 30px; line-height: 1; cursor: pointer; padding: 2px 10px;
  border-radius: 8px; transition: color .15s, background .15s;
}
.cv-drawer-x:hover { color: var(--cv-ink); background: rgba(255,255,255,0.06); }

.cv-drawer-body {
  flex: 1; overflow-y: auto;
  padding: 18px 24px;
  scrollbar-width: thin;
}
.cv-drawer-body::-webkit-scrollbar { width: 8px; }
.cv-drawer-body::-webkit-scrollbar-track { background: var(--cv-scroll-track); }
.cv-drawer-body::-webkit-scrollbar-thumb { background: var(--cv-scroll-thumb); border-radius: 999px; }
.cv-drawer-body::-webkit-scrollbar-thumb:hover { background: var(--cv-scroll-thumb-hover); }

.cv-drawer-empty {
  text-align: center;
  padding: 40px 12px;
  color: var(--cv-ink-45);
}
.cv-drawer-empty .ic {
  font-size: 40px; color: var(--cv-ink-25);
  margin-bottom: 14px;
}
.cv-drawer-empty h3 { margin: 0 0 8px; font-size: 16px; color: var(--cv-ink); font-weight: 600; }
.cv-drawer-empty p { font-size: 13px; line-height: 1.5; margin: 0 0 16px; }

.cv-drawer-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cv-glass-border);
  align-items: center;
  animation: cvMsgIn .3s var(--cv-ease-out) both;
}
.cv-drawer-item:last-child { border-bottom: 0; }
.cv-drawer-item.removing { opacity: 0.4; pointer-events: none; }
.cv-drawer-item .ci-img {
  width: 60px; height: 60px; border-radius: 10px;
  background: rgba(255,255,255,0.05);
  display: grid; place-items: center;
  overflow: hidden; color: var(--cv-ink-25);
}
.cv-drawer-item .ci-img img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 4px; }
.cv-drawer-item .ci-info { min-width: 0; }
.cv-drawer-item .ci-title {
  font-size: 13px; line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  color: var(--cv-ink); font-weight: 500;
}
.cv-drawer-item .ci-brand {
  font-size: 11px; color: var(--cv-ink-45);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 3px;
}
.cv-drawer-item .ci-ctrls {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 6px;
}
.cv-drawer-item .ci-price {
  font-size: 14px; font-weight: 700;
  color: var(--cv-gold);
  font-variant-numeric: tabular-nums;
}
.cv-drawer-item .ci-qty {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--cv-glass-border);
  border-radius: 999px; overflow: hidden;
  font-size: 12px;
}
.cv-drawer-item .ci-qty button {
  background: transparent; border: 0;
  color: var(--cv-ink-70);
  width: 26px; height: 26px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.cv-drawer-item .ci-qty button:hover { background: rgba(255,149,0,0.12); color: var(--cv-gold); }
.cv-drawer-item .ci-qty button:disabled { opacity: 0.35; cursor: not-allowed; }
.cv-drawer-item .ci-qty .n {
  min-width: 22px; text-align: center; padding: 0 4px;
  font-weight: 600; color: var(--cv-ink);
  font-variant-numeric: tabular-nums;
}
.cv-drawer-item .ci-remove {
  background: transparent; border: 0;
  color: var(--cv-ink-25); font-size: 11px;
  cursor: pointer; padding: 2px 4px;
  transition: color .15s;
}
.cv-drawer-item .ci-remove:hover { color: var(--cv-danger); }

.cv-drawer-banner {
  margin: 12px 0 16px;
  padding: 10px 14px;
  background: rgba(16,220,112,0.08);
  border: 1px solid rgba(16,220,112,0.24);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--cv-ink-70);
  line-height: 1.45;
}
.cv-drawer-banner strong { color: var(--cv-ink); font-weight: 600; }
.cv-drawer-banner.warn {
  background: rgba(255,149,0,0.08);
  border-color: rgba(255,149,0,0.28);
}

.cv-drawer-foot {
  flex-shrink: 0;
  padding: 20px 24px;
  border-top: 1px solid var(--cv-glass-border);
  background: linear-gradient(180deg, rgba(6,4,24,0.5), rgba(6,4,24,0.95));
}
.cv-drawer-foot[hidden] { display: none !important; }
.cv-drawer-totals {
  margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.cv-drawer-row {
  display: flex; justify-content: space-between;
  font-size: 13.5px; color: var(--cv-ink-70);
  font-variant-numeric: tabular-nums;
}
.cv-drawer-row.cv-dim { color: var(--cv-ink-45); font-size: 12.5px; }
.cv-drawer-row strong { color: var(--cv-ink); font-weight: 600; }
.cv-drawer-total-wrap {
  display: flex; justify-content: space-between;
  align-items: center;
  padding-top: 10px; margin-top: 4px;
  border-top: 1px dashed var(--cv-glass-border);
  font-size: 15px; color: var(--cv-ink);
}
.cv-drawer-total-wrap strong {
  font-size: 22px; font-weight: 700;
  color: var(--cv-gold);
  font-variant-numeric: tabular-nums;
}
.cv-drawer-checkout {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 14px 18px;
  font-size: 14px; margin-bottom: 8px;
}
.cv-drawer-keep {
  width: 100%; padding: 11px;
  font-size: 13px;
}

/* Drawer mobile */
@media (max-width: 560px) {
  .cv-drawer-panel { width: 100vw; }
  .cv-drawer-head { padding: 18px 18px 14px; }
  .cv-drawer-title { font-size: 22px; }
  .cv-drawer-body { padding: 14px 18px; }
  .cv-drawer-foot { padding: 16px 18px 24px; }
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 3 — Streaming chat, drawer tabs, savings, nudges
   ═══════════════════════════════════════════════════════════════════ */

/* ── Streaming chat cursor ──────────────────────────────────── */
.cv-msg-streaming .cv-msg-body::after {
  content: '▋';
  display: inline-block;
  color: var(--cv-gold);
  animation: cvCursor 1s steps(2) infinite;
  margin-left: 2px;
  font-weight: 300;
}
@keyframes cvCursor { 50% { opacity: 0; } }

/* ── Chat product card add-to-cart button ───────────────────── */
.cv-msg-pcard-wrap {
  position: relative;
}
.cv-msg-padd {
  position: absolute;
  top: 50%; right: 10px;
  transform: translateY(-50%) scale(0.9);
  opacity: 1;
  transition: opacity .2s, transform .2s var(--cv-ease-out), box-shadow .2s;

  /* 44px touch target minimum for mobile compliance */
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--cv-gold);
  border: 0;
  color: #0b0016;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.cv-msg-pcard-wrap:hover .cv-msg-padd,
.cv-msg-padd:focus {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
.cv-msg-padd:hover,
.cv-msg-padd:active {
  box-shadow: 0 4px 16px rgba(255,149,0,0.55);
  transform: translateY(-50%) scale(1.08);
}
.cv-msg-padd:active {
  background: #ffb84d;
  transform: translateY(-50%) scale(0.96);
}
.cv-msg-padd:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* Success state: green checkmark with pop animation */
.cv-msg-padd.cv-msg-padd--success {
  background: #2ecc71;
  box-shadow: 0 4px 16px rgba(46,204,113,0.4);
  animation: cvPop .3s var(--cv-ease-out);
}
@keyframes cvPop {
  0% { transform: translateY(-50%) scale(0.8); }
  60% { transform: translateY(-50%) scale(1.15); }
  100% { transform: translateY(-50%) scale(1); }
}

/* Mobile: always show button, reposition if needed */
@media (max-width: 640px) {
  .cv-msg-padd {
    right: 8px;
    transform: translateY(-50%) scale(0.95);
  }
  /* Adjust meta padding for mobile */
  .cv-msg-pcard .meta { padding-right: 34px; }
  /* Slightly shrink on very small screens */
  @media (max-width: 380px) {
    .cv-msg-padd {
      width: 40px; height: 40px;
      right: 6px;
      font-size: 13px;
    }
    .cv-msg-pcard .meta { padding-right: 30px; }
  }
}

/* ── Drawer tabs (Cart / Saved) ─────────────────────────────── */
.cv-drawer-tabs {
  display: flex;
  gap: 2px;
  padding: 0 24px;
  margin-top: -6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--cv-glass-border);
  flex-shrink: 0;
}
.cv-drawer-tab {
  background: transparent;
  border: 0;
  color: var(--cv-ink-45);
  padding: 12px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .15s;
}
.cv-drawer-tab:hover { color: var(--cv-ink-70); }
.cv-drawer-tab.active { color: var(--cv-gold); }
.cv-drawer-tab.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--cv-gold);
  border-radius: 2px;
}
.cv-drawer-tab-count {
  background: rgba(255,255,255,0.08);
  color: var(--cv-ink-70);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}
.cv-drawer-tab.active .cv-drawer-tab-count {
  background: var(--cv-gold-dim);
  color: var(--cv-gold);
}

/* ── RRP strikethrough + savings pill in drawer rows ────────── */
.cv-drawer-item .ci-price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.cv-drawer-item .ci-rrp {
  font-size: 11px;
  color: var(--cv-ink-25);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}
.cv-drawer-item .ci-save-pill {
  display: inline-block;
  background: rgba(16,220,112,0.14);
  color: var(--cv-success);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Saved-row variant (muted, with move-to-cart CTA instead of qty) */
.cv-drawer-item.saved .ci-ctrls {
  gap: 4px;
}
.cv-drawer-item .ci-move {
  background: transparent;
  border: 1px solid var(--cv-glass-border);
  color: var(--cv-ink-70);
  padding: 5px 10px;
  border-radius: 999px;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
}
.cv-drawer-item .ci-move:hover {
  background: var(--cv-gold-dim);
  border-color: var(--cv-gold);
  color: var(--cv-gold);
}
.cv-drawer-item .ci-save {
  background: transparent;
  border: 0;
  color: var(--cv-ink-25);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  transition: color .15s;
}
.cv-drawer-item .ci-save:hover { color: var(--cv-ink-70); }

/* Savings summary in drawer footer totals */
.cv-drawer-row.savings {
  color: var(--cv-success);
  font-weight: 600;
}
.cv-drawer-row.savings strong { color: var(--cv-success); }

/* Contract-pricing header banner in drawer body */
.cv-drawer-banner.contract {
  background: linear-gradient(135deg, rgba(255,149,0,0.10), rgba(16,220,112,0.05));
  border-color: rgba(255,149,0,0.35);
}
.cv-drawer-banner.contract strong { color: var(--cv-gold-soft); }

/* ── Last-viewed / returning-user starter chip ──────────────── */
.cv-chip-memory {
  background: linear-gradient(135deg, rgba(255,149,0,0.14), rgba(124,92,255,0.10));
  border-color: rgba(255,149,0,0.4);
  position: relative;
}
.cv-chip-memory::before {
  content: '';
  position: absolute;
  top: -3px; right: -3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cv-gold);
  box-shadow: 0 0 8px rgba(255,149,0,0.8);
}
.cv-chip-memory:hover {
  background: linear-gradient(135deg, rgba(255,149,0,0.22), rgba(124,92,255,0.14));
  border-color: var(--cv-gold);
}

/* ── Proactive nudge bubble variant ─────────────────────────── */
.cv-savvy-bubble.nudge {
  border-color: var(--cv-gold);
  background: linear-gradient(135deg, rgba(255,149,0,0.12), rgba(255,255,255,0.05));
  animation: cvBubblePulse 2.5s var(--cv-ease-out);
}
@keyframes cvBubblePulse {
  0%   { transform: scale(0.85); opacity: 0; }
  15%  { transform: scale(1.04); opacity: 1; }
  25%  { transform: scale(1); }
  100% { transform: scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 4 — The Wall (endless product grid + sidebar + banners)
   ═══════════════════════════════════════════════════════════════════ */

/* When Canvas is showing the homepage-wall-mode, compress the hero so
   the wall is visible above the fold. Hero expands back on input focus. */
.cv-stage { padding-bottom: 0; }
body.canvas-active .cv-spotlight.compact {
  padding: 28px 24px 22px;
  min-height: 0;
  background: transparent;
}
body.canvas-active .cv-spotlight.compact .cv-spotlight-title {
  font-size: clamp(28px, 4.2vw, 44px);
  margin-bottom: 6px;
}
body.canvas-active .cv-spotlight.compact .cv-spotlight-sub {
  font-size: 14px;
  margin-bottom: 16px;
  opacity: 0.75;
}
body.canvas-active .cv-spotlight.compact .cv-savvy-greeting { margin-bottom: 10px; }
body.canvas-active .cv-spotlight.compact .cv-chips {
  margin-top: 12px;
}

/* ── Wall section ───────────────────────────────────────────── */
.cv-wall {
  position: relative;
  z-index: 2;
  padding: 24px 24px 96px;
}
.cv-wall-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Head: title + sort */
.cv-wall-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--cv-glass-border);
}
.cv-wall-title {
  font-family: 'Instrument Serif', 'Inter', serif;
  font-weight: 400;
  font-size: clamp(24px, 3vw, 34px);
  margin: 0 0 6px;
  color: var(--cv-ink);
  letter-spacing: -0.01em;
}
.cv-wall-title em {
  color: var(--cv-gold);
  font-style: italic;
}
.cv-wall-count {
  font-size: 13px;
  color: var(--cv-ink-45);
  letter-spacing: 0.01em;
}
.cv-wall-count #cvWallTotal {
  color: var(--cv-ink-70);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cv-wall-sort-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--cv-glass-border);
  border-radius: 999px;
  padding: 8px 12px 8px 16px;
  transition: border-color .18s;
}
.cv-wall-sort-wrap:hover { border-color: rgba(255,149,0,0.35); }
.cv-wall-sort-wrap:focus-within { border-color: var(--cv-gold); }
.cv-wall-sort-label {
  font-size: 12px;
  color: var(--cv-ink-45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.cv-wall-sort {
  background: transparent;
  border: 0;
  color: var(--cv-ink);
  font: inherit;
  font-size: 13.5px;
  padding: 0 18px 0 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: 0;
  min-width: 140px;
}
.cv-wall-sort option { background: #0d0930; color: var(--cv-ink); }
.cv-wall-sort-chev {
  position: absolute;
  right: 12px;
  font-size: 10px;
  color: var(--cv-ink-45);
  pointer-events: none;
}

/* Active filter chip row */
.cv-wall-active {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(255,149,0,0.06);
  border: 1px solid rgba(255,149,0,0.22);
  border-radius: 12px;
}
.cv-wall-active[hidden] { display: none !important; }
.cv-wall-active-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cv-gold-soft);
}
.cv-wall-active-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.cv-wall-active-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,149,0,0.14);
  border: 1px solid rgba(255,149,0,0.4);
  color: var(--cv-ink);
  padding: 5px 10px 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
}
.cv-wall-active-chip .x {
  cursor: pointer;
  color: var(--cv-ink-45);
  background: transparent;
  border: 0;
  padding: 0 2px;
  font-size: 15px;
  line-height: 1;
  transition: color .15s;
}
.cv-wall-active-chip .x:hover { color: var(--cv-danger); }
.cv-wall-clear {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--cv-ink-45);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px 6px;
}
.cv-wall-clear:hover { color: var(--cv-gold); }

/* Body layout: grid | sidebar */
.cv-wall-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: flex-start;
}
.cv-wall-main { min-width: 0; }
.cv-wall-grid {
  grid-template-columns: repeat(3, 1fr);
}
@media (min-width: 1200px) {
  .cv-wall-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1440px) {
  .cv-wall-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
  .cv-wall-body { grid-template-columns: 1fr; }
  .cv-wall-sidebar { order: -1; position: static !important; }
  .cv-wall-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .cv-wall-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .cv-wall { padding: 18px 14px 80px; }
  .cv-wall-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Wall tiles inherit .cv-card + add an SEO-friendly tweak */
.cv-wall-tile {
  scroll-margin-top: 80px; /* keep hash-scroll under top rail */
}

/* Full-width promo banners interleaved in the grid */
.cv-wall-banner {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px 26px;
  border-radius: 18px;
  border: 1px solid var(--cv-glass-border);
  position: relative;
  overflow: hidden;
  animation: cvBannerIn .5s var(--cv-ease-out) both;
}
@keyframes cvBannerIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cv-wall-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 15% 50%, rgba(255,149,0,0.25) 0%, transparent 55%),
              radial-gradient(ellipse at 85% 50%, rgba(124,92,255,0.20) 0%, transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}
.cv-wall-banner > * { position: relative; z-index: 1; }
.cv-wall-banner-icon {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: rgba(255,149,0,0.16);
  border: 1px solid rgba(255,149,0,0.35);
  color: var(--cv-gold);
  font-size: 24px;
  flex-shrink: 0;
}
.cv-wall-banner-body { min-width: 0; }
.cv-wall-banner h3 {
  font-family: 'Instrument Serif', 'Inter', serif;
  font-weight: 400;
  font-size: clamp(19px, 2vw, 26px);
  margin: 0 0 4px;
  color: var(--cv-ink);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.cv-wall-banner h3 em {
  font-style: italic;
  color: var(--cv-gold);
}
.cv-wall-banner p {
  font-size: 13.5px;
  color: var(--cv-ink-70);
  margin: 0;
  line-height: 1.5;
}
.cv-wall-banner-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cv-gold);
  color: #1a0e00;
  text-decoration: none;
  border: 0;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s var(--cv-ease-out), box-shadow .18s;
  white-space: nowrap;
}
.cv-wall-banner-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--cv-gold-glow);
  color: #1a0e00;
}
.cv-wall-banner--savvy::before {
  background: radial-gradient(ellipse at 20% 50%, rgba(124,92,255,0.28) 0%, transparent 55%),
              radial-gradient(ellipse at 85% 50%, rgba(255,149,0,0.12) 0%, transparent 55%);
}
.cv-wall-banner--savvy .cv-wall-banner-icon {
  background: rgba(124,92,255,0.18);
  border-color: rgba(124,92,255,0.4);
  color: var(--cv-violet);
}
.cv-wall-banner--trust::before {
  background: radial-gradient(ellipse at 20% 50%, rgba(16,220,112,0.22) 0%, transparent 55%);
}
.cv-wall-banner--trust .cv-wall-banner-icon {
  background: rgba(16,220,112,0.14);
  border-color: rgba(16,220,112,0.4);
  color: var(--cv-success);
}

@media (max-width: 640px) {
  .cv-wall-banner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 18px 20px;
  }
  .cv-wall-banner-icon { margin: 0 auto; }
  .cv-wall-banner-cta { justify-self: center; }
}

/* Wall status + sentinel */
.cv-wall-status {
  margin: 20px 0 4px;
  text-align: center;
  font-size: 13px;
  color: var(--cv-ink-45);
  min-height: 18px;
}
.cv-wall-status.loading::before {
  content: '';
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid var(--cv-gold);
  border-top-color: transparent;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: -2px;
  animation: cvWallSpin .9s linear infinite;
}
.cv-wall-status.end {
  color: var(--cv-ink-25);
  font-style: italic;
}
@keyframes cvWallSpin { to { transform: rotate(360deg); } }
.cv-wall-sentinel { height: 20px; }

/* ── Right sidebar ──────────────────────────────────────────── */
.cv-wall-sidebar {
  position: sticky;
  top: 80px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.cv-wall-sidebar::-webkit-scrollbar { width: 8px; }
.cv-wall-sidebar::-webkit-scrollbar-track { background: var(--cv-scroll-track); }
.cv-wall-sidebar::-webkit-scrollbar-thumb { background: var(--cv-scroll-thumb); border-radius: 999px; }
.cv-wall-sidebar::-webkit-scrollbar-thumb:hover { background: var(--cv-scroll-thumb-hover); }

.cv-wall-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--cv-glass-border);
  border-radius: 14px;
  padding: 14px 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cv-wall-card h4 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cv-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cv-wall-card h4 i { font-size: 11px; opacity: 0.8; }

/* Mini search */
.cv-wall-mini-search {
  position: relative;
}
.cv-wall-mini-search input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--cv-glass-border);
  border-radius: 10px;
  padding: 10px 34px 10px 14px;
  color: var(--cv-ink);
  font: inherit;
  font-size: 13.5px;
  outline: 0;
  transition: border-color .15s;
}
.cv-wall-mini-search input:focus { border-color: var(--cv-gold); }
.cv-wall-mini-search input::placeholder { color: var(--cv-ink-45); }
.cv-wall-mini-clear {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--cv-ink-45);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  visibility: hidden;
}
.cv-wall-mini-clear.visible { visibility: visible; }
.cv-wall-mini-clear:hover { color: var(--cv-ink); }
.cv-wall-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--cv-ink-45);
  line-height: 1.45;
}
.cv-link-btn {
  background: transparent; border: 0; color: var(--cv-gold-soft);
  font: inherit; font-size: 12px; cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cv-link-btn:hover { color: var(--cv-gold); }

/* Facet lists */
.cv-wall-facet {
  display: flex; flex-direction: column; gap: 2px;
}
.cv-wall-facet-scroll {
  max-height: 240px;
  overflow-y: auto;
  padding-right: 2px;
}
.cv-wall-facet-scroll::-webkit-scrollbar { width: 6px; }
.cv-wall-facet-scroll::-webkit-scrollbar-track { background: var(--cv-scroll-track); }
.cv-wall-facet-scroll::-webkit-scrollbar-thumb { background: var(--cv-scroll-thumb); border-radius: 999px; }
.cv-wall-facet-scroll::-webkit-scrollbar-thumb:hover { background: var(--cv-scroll-thumb-hover); }
.cv-wall-facet-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: transparent;
  border: 0;
  color: var(--cv-ink-70);
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background .14s, color .14s;
}
.cv-wall-facet-btn:hover {
  background: rgba(255,149,0,0.08);
  color: var(--cv-ink);
}
.cv-wall-facet-btn .l {
  flex: 1; min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv-wall-facet-btn .n {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--cv-ink-45);
  font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,0.05);
  padding: 1px 7px;
  border-radius: 999px;
}
.cv-wall-facet-btn.active {
  background: var(--cv-gold-dim);
  color: var(--cv-gold);
  font-weight: 600;
}
.cv-wall-facet-btn.active .n {
  background: rgba(255,149,0,0.16);
  color: var(--cv-gold-soft);
}

.cv-wall-facet-price {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.cv-wall-facet-price .cv-wall-facet-btn {
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--cv-glass-border);
  font-size: 12.5px;
}

/* Trust card */
.cv-wall-trust-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 9px;
}
.cv-wall-trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--cv-ink-70);
  line-height: 1.45;
}
.cv-wall-trust-list li i {
  color: var(--cv-gold);
  font-size: 12px;
  margin-top: 3px;
  flex-shrink: 0;
}
.cv-wall-trust-list li strong {
  color: var(--cv-ink);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   MODE ARCHITECTURE — Conversation (default) vs Classic (wall)
   ═══════════════════════════════════════════════════════════════════ */

/* Real logo image in the top rail */
.cv-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cv-ink);
  text-decoration: none;
}
.cv-brand-logo {
  height: 30px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  /* Render the real Localworks wordmark in its natural colours — a soft
     drop shadow keeps it crisp on the nebula without flattening it. */
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
  transition: transform .2s var(--cv-ease-out);
}
.cv-brand:hover .cv-brand-logo { transform: scale(1.03); }
.cv-brand-text {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 15px;
}

/* Savvy mini avatar in the hero greeting */
.cv-savvy-mini {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cv-gold) 0%, #ff6a00 100%);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,149,0,0.25), 0 0 12px rgba(255,149,0,0.25);
}
.cv-savvy-mini img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.cv-savvy-mini-dot {
  position: absolute;
  right: -1px; bottom: -1px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cv-success);
  border: 2px solid var(--cv-bg-0);
  box-shadow: 0 0 0 0 rgba(16,220,112,0.7);
  animation: cvSavvyDotPulse 2s ease-out infinite;
}
@keyframes cvSavvyDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,220,112,0.6); }
  50%      { box-shadow: 0 0 0 5px rgba(16,220,112,0); }
}

/* Mode toggle button — shows one icon/label based on current mode */
.cv-mode-toggle { position: relative; }
.cv-mode-on { display: inline-flex; align-items: center; gap: 6px; }
body[data-mode="conversation"] .cv-mode-toggle .cv-mode-on--conversation,
body[data-mode="classic"]      .cv-mode-toggle .cv-mode-on--classic {
  display: none;
}
body[data-mode="conversation"] .cv-mode-toggle:hover,
body[data-mode="conversation"] .cv-mode-toggle:focus-visible {
  background: rgba(255,149,0,0.12);
  color: var(--cv-gold);
}
body[data-mode="classic"] .cv-mode-toggle {
  background: rgba(255,149,0,0.18);
  color: var(--cv-gold);
  border-color: rgba(255,149,0,0.45);
}
body[data-mode="classic"] .cv-mode-toggle:hover {
  background: rgba(255,149,0,0.25);
}

/* ── Default (conversation) mode: centre the hero, hide the wall ── */
body[data-mode="conversation"] .cv-stage {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 24px 60px;
}
body[data-mode="conversation"] .cv-spotlight {
  padding: 0 16px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}
body[data-mode="conversation"] .cv-spotlight .cv-savvy-greeting {
  justify-content: center;
}
body[data-mode="conversation"] .cv-spotlight-title {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
}
body[data-mode="conversation"] .cv-spotlight-sub {
  font-size: 16px;
  max-width: 620px;
  margin: 14px auto 28px;
}
body[data-mode="conversation"] .cv-input-wrap { margin: 0 auto; }
body[data-mode="conversation"] .cv-chips { justify-content: center; }
body[data-mode="conversation"] .cv-wall { display: none !important; }

/* Active-search state inside conversation mode — keep the spotlight
   visible above but give the answer surface more vertical room. */
body[data-mode="conversation"] .cv-spotlight.shrunk {
  padding: 28px 16px 18px;
}
body[data-mode="conversation"] .cv-spotlight.shrunk .cv-spotlight-title {
  font-size: clamp(24px, 3.4vw, 34px);
}
body[data-mode="conversation"] .cv-spotlight.shrunk .cv-spotlight-sub {
  font-size: 13.5px;
  opacity: 0.7;
  margin: 6px auto 14px;
}

/* ── Classic mode: hero becomes a slim sticky header, wall is primary ─
   The search pill floats on a barely-there glass shelf so the nebula
   bleeds through. The input itself is the visual protagonist. */
body[data-mode="classic"] .cv-stage {
  min-height: 0;
  padding: 0;
}
body[data-mode="classic"] .cv-spotlight {
  position: sticky;
  top: 62px;                 /* sit just below the top rail */
  z-index: 20;
  padding: 16px 24px 18px;
  /* Soft gradient fade — darkens toward the bottom edge so the input
     reads clearly without a hard slab behind it. */
  background:
    linear-gradient(180deg,
      rgba(6,4,24,0) 0%,
      rgba(6,4,24,0.35) 45%,
      rgba(6,4,24,0.65) 100%);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border-bottom: 1px solid rgba(255,149,0,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  text-align: left;
}
/* Soft gold ambient behind the input — the jewel on the glass shelf */
body[data-mode="classic"] .cv-spotlight::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, 80%); height: 80px;
  background: radial-gradient(ellipse at center, rgba(255,149,0,0.12), transparent 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(8px);
}
body[data-mode="classic"] .cv-savvy-greeting {
  order: 1;
  margin: 0;
  font-size: 11.5px;
  padding: 5px 12px 5px 6px;
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
}
body[data-mode="classic"] .cv-spotlight-title,
body[data-mode="classic"] .cv-spotlight-sub,
body[data-mode="classic"] .cv-chips {
  display: none !important;
}
body[data-mode="classic"] .cv-input-wrap {
  order: 2;
  margin: 0;
  max-width: 720px;
  padding: 5px 6px 5px 20px;
  /* Override the default 8-32px shadow with a softer, larger halo
     so the pill reads as illuminated rather than boxed. */
  box-shadow:
    0 0 0 1px rgba(255,149,0,0.08),
    0 12px 30px rgba(0,0,0,0.3),
    0 0 40px rgba(255,149,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
body[data-mode="classic"] .cv-input-wrap:focus-within {
  box-shadow:
    0 0 0 2px rgba(255,149,0,0.35),
    0 16px 40px rgba(255,149,0,0.2),
    0 0 50px rgba(255,149,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.1);
}
body[data-mode="classic"] .cv-input { font-size: 14px; padding: 12px 8px; }
body[data-mode="classic"] .cv-submit { width: 38px; height: 38px; }
body[data-mode="classic"] .cv-answer.active {
  margin-top: 8px;
}

/* Classic mode: surface the wall prominently */
body[data-mode="classic"] .cv-wall { display: block; }
body[data-mode="classic"] .cv-wall-sidebar { top: 128px; }

/* ── Smooth body-wide transitions between modes ────────────────── */
.cv-stage,
.cv-spotlight,
.cv-spotlight-title,
.cv-spotlight-sub,
.cv-chips,
.cv-input-wrap {
  transition:
    padding .35s var(--cv-ease-out),
    max-width .35s var(--cv-ease-out),
    font-size .3s var(--cv-ease-out),
    opacity .25s var(--cv-ease-out),
    transform .3s var(--cv-ease-out),
    background .3s var(--cv-ease-out);
}

/* Mobile tweaks for classic header mode */
@media (max-width: 720px) {
  body[data-mode="classic"] .cv-spotlight {
    grid-template-columns: 1fr;
    padding: 10px 14px;
  }
  body[data-mode="classic"] .cv-savvy-greeting { display: none; }
  body[data-mode="classic"] .cv-wall-sidebar { top: auto; }
}

/* ── Mascot touches elsewhere ──────────────────────────────────── */
/* First Savvy welcome bubble styling now lives in the Inline Chat section above. */

/* Wave on initial mount for the top-right co-pilot */
@keyframes cvMascotWave {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(12deg); }
  30%  { transform: rotate(-8deg); }
  45%  { transform: rotate(10deg); }
  60%  { transform: rotate(-4deg); }
  100% { transform: rotate(0deg); }
}
body.canvas-active .cv-savvy-avatar.wave {
  animation: cvMascotWave 1.4s var(--cv-ease-out) 1;
  transform-origin: 50% 85%;
}

/* Empty state gets a Savvy thinking pose */
.cv-empty .cv-empty-mascot {
  width: 78px; height: 78px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cv-gold) 0%, #ff6a00 100%);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(255,149,0,0.25), 0 0 0 4px rgba(255,149,0,0.10);
  position: relative;
}
.cv-empty .cv-empty-mascot img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.cv-empty .cv-empty-mascot::after {
  content: '?';
  position: absolute;
  right: -8px; top: -6px;
  width: 28px; height: 28px;
  background: var(--cv-violet);
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(124,92,255,0.4);
  font-family: 'Instrument Serif', serif;
  font-style: italic;
}

