/* === Viewer AI demo: overlay styling ===
   Cream-glass / ember design language from the Figma "Realistic — Web" page
   (tokens mirror demo/styles.css + the viewer-ai-realistic-chrome memory).
   Light-only. State via `.is-*` classes. The root is pointer-events:none so the
   3D canvas stays interactive; only the interactive surfaces re-enable pointers. */

.vai-root {
  --vai-ember: #d2622e;
  --vai-ember-soft: rgba(210, 98, 46, 0.12);
  --vai-ink: rgba(46, 30, 16, 0.92);
  --vai-muted: rgba(46, 30, 16, 0.55);
  --vai-cream: rgba(250, 244, 236, 0.97);
  --vai-cream-solid: #faf4ec;
  --vai-line: rgba(46, 30, 16, 0.12);
  --vai-shadow: 0 12px 40px rgba(20, 14, 6, 0.22);
  --vai-radius: 18px;
  --vai-font: 'Century Gothic', 'Futura', 'Josefin Sans', system-ui, -apple-system, sans-serif;

  position: fixed;
  inset: 0;
  z-index: 4000;               /* above viewer chrome, below nothing we own */
  pointer-events: none;        /* canvas stays interactive… */
  font-family: var(--vai-font);
  color: var(--vai-ink);
  -webkit-font-smoothing: antialiased;
}
.vai-root * { box-sizing: border-box; }
.vai-root button { font-family: inherit; cursor: pointer; }

/* The `hidden` attribute MUST win over the flex/inline-flex display rules below.
   setMode() hides the idle bar with `barEl.hidden = true` when an arc opens, and the
   Reimagine badge/preview toggle `.hidden` too — but `.vai-bar { display:flex }` (an
   author rule) otherwise overrides the UA `[hidden]{display:none}`, so the bar stayed
   visible ON TOP of every arc. This makes `hidden` authoritative overlay-wide. */
.vai-root [hidden] { display: none !important; }

/* Any interactive surface opts back into pointer events. */
.vai-surface { pointer-events: auto; }

/* Host layer the active arc mounts into (no pointer capture of its own). */
.vai-surface-host { position: absolute; inset: 0; pointer-events: none; }

/* Floating "My visit · N" affordance (top-right, below the viewer's Share tour).
   Shown only when the visit has items, so it never clutters the idle scene. */
.vai-myvisit-tab {
  position: absolute;
  top: 84px;
  right: 26px;
  pointer-events: auto;
  border: 1.5px solid var(--vai-ember);
  background: var(--vai-cream);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--vai-ember);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 8px 15px;
  border-radius: 999px;
  box-shadow: var(--vai-shadow);
  animation: vai-fade-in 0.3s ease both;
}
.vai-myvisit-tab:hover { background: var(--vai-ember-soft); }

/* Reusable cream-glass panel. */
.vai-glass {
  background: var(--vai-cream);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  box-shadow: var(--vai-shadow);
  border-radius: var(--vai-radius);
}

/* ── Idle AI bar (Figma C1): bottom-centre pill ───────────────────────────────
   Stacked ABOVE the viewer's own bottom navbar (#v06RoomNavbar, bottom: 22px,
   ~52px tall → top edge ≈ 74px) so the two bottom-centre pills never overlap.
   bottom: 94px leaves a clean ~20px gap above the navbar. */
.vai-bar {
  position: absolute;
  left: 50%;
  bottom: 94px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border-radius: 999px;
  animation: vai-rise 0.4s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes vai-rise {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.vai-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--vai-ink);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 9px 16px;
  border-radius: 999px;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.vai-bar-btn:hover { background: rgba(46, 30, 16, 0.06); }

.vai-bar-plus {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--vai-ember);
  font-size: 18px;
  line-height: 1;
}

.vai-bar-sep {
  width: 1px;
  align-self: stretch;
  margin: 6px 2px;
  background: var(--vai-line);
}

/* The Reimagine chip carries the ember outline. */
.vai-bar-btn.is-reimagine {
  color: var(--vai-ember);
  border: 1.5px solid var(--vai-ember);
  padding: 7px 16px;
  margin-left: 2px;
}
.vai-bar-btn.is-reimagine:hover { background: var(--vai-ember-soft); }
.vai-bar-btn.is-reimagine .vai-bar-icon { width: 15px; height: 15px; }

.vai-bar-icon { display: inline-block; width: 16px; height: 16px; }
.vai-bar-icon svg { width: 100%; height: 100%; display: block; }

/* ── Shared pill button (used by arcs) ──────────────────────────────────────── */
.vai-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--vai-line);
  background: transparent;
  color: var(--vai-ink);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.vai-pill:hover { background: rgba(46, 30, 16, 0.05); }
.vai-pill.is-ember {
  background: var(--vai-ember);
  border-color: var(--vai-ember);
  color: #fff;
}
.vai-pill.is-ember:hover { background: #c0561f; }

/* Disclaimer line (always shown under the concierge surface). */
.vai-disclaimer {
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--vai-muted);
  pointer-events: none;
}

/* Small helper animation reused by arc surfaces. */
@keyframes vai-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Concierge arc (Figma C1-C7) ──────────────────────────────────────────────
   Anchored at the same bottom offset as the idle bar (94px) so the Ask→Concierge
   transition stays visually in place AND the composer clears the viewer's own
   bottom navbar (#v06RoomNavbar, bottom: 22px). */
.vai-cc {
  position: absolute;
  left: 50%;
  bottom: 94px;
  transform: translateX(-50%);
  width: min(680px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.vai-cc-stack { width: 100%; display: flex; flex-direction: column; gap: 10px; }

/* Suggestion chips row. */
.vai-cc-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.vai-cc-chip {
  background: var(--vai-cream);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(20, 14, 6, 0.14);
  animation: vai-fade-in 0.3s ease both;
}
.vai-cc-chip:hover { background: #fff; }

/* Input bar. */
.vai-cc-inputbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
}
.vai-cc-plus {
  display: inline-grid; place-items: center;
  width: 20px; height: 20px; flex: 0 0 auto;
  color: var(--vai-ember);
}
.vai-cc-plus svg { width: 18px; height: 18px; }
.vai-cc-input {
  flex: 1 1 auto;
  border: 0; background: transparent; outline: none;
  font-family: inherit; font-size: 15px; font-weight: 500;
  color: var(--vai-ink); caret-color: var(--vai-ember);
  padding: 8px 0;
}
.vai-cc-input::placeholder { color: var(--vai-muted); }
.vai-cc-send {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--vai-ember); color: #fff;
  transition: background 0.15s ease, transform 0.1s ease;
}
.vai-cc-send svg { width: 19px; height: 19px; }
.vai-cc-send:hover { background: #c0561f; }
.vai-cc-send:active { transform: scale(0.94); }
.vai-cc-close {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border: 0; background: transparent;
  color: var(--vai-muted); font-size: 22px; line-height: 1;
  border-radius: 50%;
}
.vai-cc-close:hover { background: rgba(46, 30, 16, 0.06); color: var(--vai-ink); }

/* Answer / deflect / error card. */
.vai-cc-card {
  position: relative;
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  animation: vai-fade-in 0.28s ease both;
}
.vai-cc-card-close {
  position: absolute; top: 10px; right: 12px;
  width: 24px; height: 24px;
  border: 0; background: transparent;
  color: var(--vai-muted); font-size: 19px; line-height: 1; border-radius: 50%;
}
.vai-cc-card-close:hover { background: rgba(46, 30, 16, 0.06); color: var(--vai-ink); }
.vai-cc-card-body { display: flex; gap: 12px; align-items: flex-start; }
.vai-cc-card-plus {
  flex: 0 0 auto; margin-top: 1px;
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--vai-ember); color: #fff;
}
.vai-cc-card-plus svg { width: 14px; height: 14px; }
.vai-cc-card-content { flex: 1 1 auto; padding-right: 14px; }

.vai-cc-answer {
  margin: 2px 0 0;
  font-size: 15px; line-height: 1.5; color: var(--vai-ink);
}

.vai-cc-cite {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--vai-ember); text-transform: uppercase;
}
.vai-cc-cite-ico { display: inline-grid; place-items: center; width: 13px; height: 13px; }
.vai-cc-cite-ico svg { width: 13px; height: 13px; }

.vai-cc-actions { display: flex; gap: 8px; margin-top: 12px; }
.vai-cc-save-ico { display: inline-grid; place-items: center; width: 13px; height: 13px; }
.vai-cc-save.is-done { color: var(--vai-ember); border-color: var(--vai-ember); }

/* Thinking dots. */
.vai-cc-thinking { display: flex; gap: 5px; padding: 4px 0; }
.vai-cc-thinking span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--vai-ember); opacity: 0.4;
  animation: vai-dot 1.1s ease-in-out infinite;
}
.vai-cc-thinking span:nth-child(2) { animation-delay: 0.18s; }
.vai-cc-thinking span:nth-child(3) { animation-delay: 0.36s; }
@keyframes vai-dot {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* Inline lead form (deflect). */
.vai-cc-lead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.vai-cc-lead-in {
  flex: 1 1 130px; min-width: 110px;
  border: 1px solid var(--vai-line); border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  padding: 8px 14px; font-family: inherit; font-size: 13px; color: var(--vai-ink);
  outline: none;
}
.vai-cc-lead-in:focus { border-color: var(--vai-ember); }
.vai-cc-lead-in::placeholder { color: var(--vai-muted); }
.vai-cc-lead-send { flex: 0 0 auto; }
.vai-cc-lead-no {
  flex: 0 0 auto; border: 0; background: transparent;
  color: var(--vai-muted); font-size: 13px; padding: 6px 8px;
}
.vai-cc-lead-no:hover { color: var(--vai-ink); }

/* ── Reimagine arc (Figma R1-R10) ───────────────────────────────────────────── */
.vai-rm {
  position: absolute; inset: 0;
  pointer-events: auto;            /* captures clicks so the scene isn't walked */
  animation: vai-fade-in 0.25s ease both;
}

/* Ember "SELECTED VIEW" capture frame over the scene. Geometry (left/top/width/height)
   is JS-owned so the buyer can drag or resize it across the complete viewport. */
.vai-rm-frame {
  position: absolute;
  border: 2px solid var(--vai-ember);
  border-radius: 6px;
  box-shadow: 0 0 0 100vmax rgba(11, 10, 9, 0.14);  /* subtle scrim outside the frame */
  cursor: move;
  touch-action: none;
}
/* Frozen once generating/compare mounts — the slider takes over pointer events. */
.vai-rm-frame.is-frozen { cursor: default; touch-action: auto; }
.vai-rm-frame.is-result {
  border: 0;
  /* Gentle radius, and NO drop shadow — a shadow would read as a floating card
     pasted over the room. The FOV-locked restyle blends into the live scene instead. */
  border-radius: 12px;
  box-shadow: none;
}
.vai-rm-frame.is-result .vai-rm-frame-body { border-radius: 12px; }

/* ── Reimagine focus mode ────────────────────────────────────────────────────
   The reimagine stage takes over cleanly: a dim + blurred scrim pushes the live
   tour back so the comparison is the hero (not a photo pasted over a busy room),
   and the viewer chrome (property/agent cards, rails, navbar) is hidden so it
   never half-covers the feature. Restores on close. */
.vai-rm-scrim {
  position: fixed;
  inset: 0;
  background: rgba(14, 11, 8, 0.5);
  backdrop-filter: blur(16px) saturate(0.88) brightness(0.92);
  -webkit-backdrop-filter: blur(16px) saturate(0.88) brightness(0.92);
  pointer-events: auto;
  animation: vai-fade-in 0.24s ease both;
}

body.ui-v06.vai-reimagine-active #v06PropertyCard,
body.ui-v06.vai-reimagine-active #v06AgentCard,
body.ui-v06.vai-reimagine-active #v06InspectionCard,
body.ui-v06.vai-reimagine-active #v06TopRight,
body.ui-v06.vai-reimagine-active #v06HelpButton,
body.ui-v06.vai-reimagine-active #v06MobileTopBar,
body.ui-v06.vai-reimagine-active #v06MobileHelp,
body.ui-v06.vai-reimagine-active #v06FeatureBar,
body.ui-v06.vai-reimagine-active #v06FirstSteps,
body.ui-v06.vai-reimagine-active .v06-stick,
body.ui-v06.vai-reimagine-active #v06DPad,
body.ui-v06.vai-reimagine-active .vai-myvisit-tab {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease;
}
@media (prefers-reduced-motion: reduce) {
  .vai-rm-scrim { animation: none; }
}

/* Move hint (above the box) + corner resize grip. Both only while interactive. */
.vai-rm-move-hint {
  position: absolute; left: 50%; top: -30px; transform: translateX(-50%);
  white-space: nowrap; font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  color: #fff; background: rgba(11, 10, 9, 0.62);
  padding: 4px 11px; border-radius: 999px; pointer-events: none;
}
.vai-rm-resize {
  position: absolute; right: -8px; bottom: -8px; width: 20px; height: 20px;
  border-radius: 6px; background: var(--vai-ember); cursor: nwse-resize;
  box-shadow: 0 2px 8px rgba(20, 14, 6, 0.35); touch-action: none;
}
.vai-rm-frame.is-frozen .vai-rm-move-hint,
.vai-rm-frame.is-frozen .vai-rm-resize { display: none; }
.vai-rm-badge {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--vai-ember); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  padding: 5px 11px; border-radius: 999px;
}
.vai-rm-badge-ico { display: inline-grid; place-items: center; width: 13px; height: 13px; }
.vai-rm-badge-ico svg { width: 13px; height: 13px; }
.vai-rm-frame-body { position: absolute; inset: 0; overflow: hidden; border-radius: 4px; }

/* Bottom dock. */
.vai-rm-dock {
  position: absolute; left: 50%; bottom: 94px; transform: translateX(-50%);  /* clears #v06RoomNavbar, matches the idle bar */
  width: min(760px, 94vw);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}

/* Style chips (with thumbnails/swatches). */
.vai-rm-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.vai-rm-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: 12px;
  background: var(--vai-cream); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 14px; font-size: 13px; font-weight: 500; color: var(--vai-ink);
  box-shadow: 0 4px 16px rgba(20, 14, 6, 0.14);
}
.vai-rm-chip:hover { background: #fff; }
.vai-rm-chip.is-active { border-color: var(--vai-ember); }
.vai-rm-chip-sw {
  width: 20px; height: 20px; border-radius: 5px; flex: 0 0 auto;
  background: linear-gradient(135deg, #e8dcc8, #c9a97e);
}
.vai-rm-chip:nth-child(2) .vai-rm-chip-sw { background: linear-gradient(135deg, #f2efe9, #cfd8d6); }
.vai-rm-chip:nth-child(3) .vai-rm-chip-sw { background: linear-gradient(135deg, #b98a5e, #6a4a34); }
.vai-rm-chip.is-describe { border-style: dashed; border-color: var(--vai-line); background: transparent; }
.vai-rm-chip-ico { display: inline-grid; place-items: center; width: 16px; height: 16px; color: var(--vai-muted); }
.vai-rm-chip-ico svg { width: 16px; height: 16px; }

/* Action bar. */
.vai-rm-bar {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 8px 8px 16px; border-radius: 999px;
}
.vai-rm-bar-plus { color: var(--vai-ember); font-size: 18px; font-weight: 500; flex: 0 0 auto; }
.vai-rm-input {
  flex: 1 1 auto; border: 0; background: transparent; outline: none;
  font-family: inherit; font-size: 14px; color: var(--vai-ink); caret-color: var(--vai-ember);
  padding: 8px 0;
}
.vai-rm-input::placeholder { color: var(--vai-muted); }
.vai-rm-go { flex: 0 0 auto; }
.vai-rm-cancel {
  border: 0; background: transparent; color: var(--vai-muted);
  font-size: 13px; padding: 8px 12px; border-radius: 999px;
}
.vai-rm-cancel:hover { color: var(--vai-ink); background: rgba(46, 30, 16, 0.06); }

/* Generating card. */
.vai-rm-generating { display: grid; place-items: center; }
.vai-rm-gen-card {
  width: min(360px, 74%); padding: 24px 26px; border-radius: 18px; text-align: center;
}
.vai-rm-spinner {
  width: 34px; height: 34px; margin: 0 auto 14px;
  border: 3px solid rgba(210, 98, 46, 0.2); border-top-color: var(--vai-ember);
  border-radius: 50%; animation: vai-spin 0.8s linear infinite;
}
@keyframes vai-spin { to { transform: rotate(360deg); } }
.vai-rm-gen-title { font-size: 15px; font-weight: 600; color: var(--vai-ink); }
.vai-rm-gen-bar {
  height: 5px; border-radius: 999px; background: rgba(46, 30, 16, 0.1);
  margin: 14px 0 10px; overflow: hidden;
}
.vai-rm-gen-fill {
  height: 100%; width: 30%; border-radius: 999px; background: var(--vai-ember);
  animation: vai-gen 2.4s ease-in-out infinite;
}
@keyframes vai-gen {
  0% { width: 8%; margin-left: 0; }
  50% { width: 60%; }
  100% { width: 92%; margin-left: 0; }
}
.vai-rm-gen-sub { font-size: 12px; color: var(--vai-muted); }
.vai-rm-err-actions { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }

/* Before/after compare. */
.vai-rm-compare { cursor: ew-resize; touch-action: none; }
.vai-rm-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  user-select: none; -webkit-user-drag: none;
}
.vai-rm-after { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
/* Understated neutral Before/After — matched glass pills, no ember "AI" shout. */
.vai-rm-label {
  position: absolute; bottom: 12px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(11, 10, 9, 0.5); color: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.vai-rm-label-cur { left: 12px; }
.vai-rm-label-after { top: 12px; bottom: auto; right: 12px; }
.vai-rm-mark {
  position: absolute; bottom: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(11, 10, 9, 0.72); color: #f5f0e8;
  font-size: 11px; padding: 6px 11px; border-radius: 999px;
}
.vai-rm-mark-ico { display: inline-grid; place-items: center; width: 13px; height: 13px; }
.vai-rm-mark-ico svg { width: 13px; height: 13px; }
.vai-rm-handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; margin-left: -1px; background: rgba(255, 255, 255, 0.9);
  pointer-events: none;
}
.vai-rm-handle-grip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; color: var(--vai-ink);
  display: grid; place-items: center; font-size: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); pointer-events: auto; cursor: ew-resize;
}

/* Result action bar. */
.vai-rm-actions {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  padding: 8px 10px; border-radius: 999px;
}
.vai-rm-stylepill { pointer-events: none; }
.vai-rm-caption { font-size: 11px; color: var(--vai-muted); text-align: center; }

/* ── My Visit arc (Figma D1-D10) ────────────────────────────────────────────── */
.vai-mv {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(11, 10, 9, 0.28);
  pointer-events: auto;
  animation: vai-fade-in 0.22s ease both;
}
.vai-mv-panel {
  width: min(880px, 94vw);
  max-height: min(80vh, 760px);
  display: flex; flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
}
.vai-mv-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--vai-line);
}
.vai-mv-book { color: var(--vai-ember); margin-top: 2px; display: inline-grid; place-items: center; width: 18px; height: 18px; }
.vai-mv-book svg { width: 18px; height: 18px; }
.vai-mv-title { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; }
.vai-mv-title strong { font-size: 18px; font-weight: 600; color: var(--vai-ink); }
.vai-mv-sub { font-size: 12px; color: var(--vai-muted); }
.vai-mv-close {
  width: 30px; height: 30px; border: 1px solid var(--vai-line);
  background: transparent; color: var(--vai-muted); font-size: 18px;
  border-radius: 50%; flex: 0 0 auto;
}
.vai-mv-close:hover { background: rgba(46, 30, 16, 0.06); color: var(--vai-ink); }

.vai-mv-body { padding: 16px 22px; overflow-y: auto; flex: 1 1 auto; }
.vai-mv-seclabel {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--vai-muted); text-transform: uppercase;
  margin: 8px 0 10px;
}
.vai-mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
@media (max-width: 560px) { .vai-mv-grid { grid-template-columns: 1fr; } }
.vai-mv-card {
  border: 1px solid var(--vai-line); border-radius: 14px; overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
}
.vai-mv-thumb { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.vai-mv-cardmeta { padding: 10px 12px; }
.vai-mv-cardtitle { font-size: 14px; font-weight: 600; color: var(--vai-ink); }
.vai-mv-cardsub { font-size: 11px; color: var(--vai-muted); margin-top: 2px; }
.vai-mv-cardactions { display: flex; gap: 6px; margin-top: 10px; }
.vai-mv-pill { font-size: 12px; padding: 5px 12px; }

.vai-mv-answer {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--vai-line); border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  padding: 14px 16px; margin-bottom: 10px;
}
.vai-mv-answer-plus {
  flex: 0 0 auto; margin-top: 1px;
  display: inline-grid; place-items: center; width: 20px; height: 20px;
  border-radius: 50%; background: var(--vai-ember); color: #fff;
}
.vai-mv-answer-plus svg { width: 13px; height: 13px; }
.vai-mv-answer-content { flex: 1 1 auto; }
.vai-mv-answer-q { font-size: 12px; color: var(--vai-muted); margin-bottom: 2px; }
.vai-mv-answer-text { font-size: 14px; line-height: 1.5; color: var(--vai-ink); }
.vai-mv-answer-sub { font-size: 11px; color: var(--vai-muted); margin-top: 6px; }
.vai-mv-answer-remove { flex: 0 0 auto; }

.vai-mv-empty { text-align: center; padding: 30px 10px; color: var(--vai-ink); }
.vai-mv-empty p { margin: 0; font-size: 15px; }
.vai-mv-empty-sub { margin-top: 6px !important; font-size: 13px !important; color: var(--vai-muted); }

.vai-mv-footer {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--vai-line);
  display: flex; flex-direction: column; gap: 12px;
}
.vai-mv-note { font-size: 11px; color: var(--vai-muted); line-height: 1.5; }
.vai-mv-footer-actions { display: flex; justify-content: flex-end; gap: 8px; }
.vai-mv-sendform { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.vai-mv-sent { font-size: 13px; color: var(--vai-ember); font-weight: 500; text-align: right; width: 100%; }

/* ── Production shell integration ────────────────────────────────────────────
   The demo established the approved AI visual language. Production uses a
   stricter capture/results state machine, so these selectors adapt its extra
   semantic classes without creating a second, generic modal design. */
.vai-turnstile-host {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.vai-rm-results {
  width: auto;
  max-height: none;
  overflow: visible;
  padding: 0;
  font-family: inherit;
}
.vai-rm-results.is-scene-result { pointer-events: none; }
.vai-rm-results.is-scene-result .vai-rm-dock { pointer-events: auto; }
.vai-rm-custom-indicator {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--vai-ember-soft);
  color: var(--vai-ember);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.vai-rm-scene-controls {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px 7px 12px;
  border-radius: 999px;
  pointer-events: auto;
}
.vai-rm-scene-side {
  border: 0;
  background: transparent;
  color: var(--vai-muted);
  padding: 7px 4px;
  font-size: 12px;
}
.vai-rm-scene-hint {
  color: var(--vai-ink);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.vai-rm-scene-disclosure {
  order: -1;
  color: var(--vai-muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.vai-rm-scene-status {
  width: min(360px, calc(100vw - 32px));
  padding: 18px 20px;
  pointer-events: auto;
}

.vai-rm-capture { font-family: inherit; }
.vai-rm-capture-shade {
  position: absolute;
  inset: 0;
  background: rgba(11, 10, 9, 0.14);
}
.vai-rm-capture-label { left: auto; }
body.vai-reimagine-capturing #overlay {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.vai-rm-capture-use {
  position: absolute;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  z-index: 3;
  transform: translateX(-50%);
  min-height: 44px;
  padding: 10px 20px;
  white-space: nowrap;
  border: 1px solid var(--vai-ember) !important;
  border-radius: 999px !important;
  background: var(--vai-ember) !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(20, 14, 6, 0.28);
}
.vai-rm-capture-close {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(46, 30, 16, 0.14);
  border-radius: 50%;
  background: var(--vai-cream);
  color: var(--vai-ink);
  box-shadow: var(--vai-shadow);
  font-size: 24px;
  line-height: 1;
}
.vai-rm-capture-use:disabled,
.vai-rm-capture-close:disabled {
  opacity: 0.6;
  cursor: wait;
}
.vai-rm-capture-cancel,
.vai-rm-recapture,
.vai-rm-close,
.vai-rm-done { font-family: inherit; }
.vai-rm-gen-card.vai-rm-message { padding: 24px 26px; }
.vai-rm-original { background: rgba(11, 10, 9, 0.2); }

/* Debug-only, server-gated Reimagine capture evidence panel. */
.vai-capture-probe {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  z-index: 90;
  width: min(300px, calc(100vw - 24px));
  padding: 10px;
  display: grid;
  gap: 8px;
  pointer-events: auto;
  color: #f5f0e8;
  background: rgba(22, 19, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  font: 12px/1.35 system-ui, sans-serif;
}
.vai-capture-probe button {
  padding: 8px 10px;
  color: inherit;
  background: #a64e2a;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}
.vai-capture-probe output { overflow-wrap: anywhere; }
.vai-capture-probe img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
}

@media (max-width: 700px) {
  .vai-bar { bottom: 82px; max-width: calc(100vw - 16px); }
  .vai-rm-dock { bottom: 82px; }
  .vai-rm-capture-use { bottom: max(20px, env(safe-area-inset-bottom)); }
  .vai-rm-chips { flex-wrap: nowrap; justify-content: flex-start; width: 100%; overflow-x: auto; padding: 2px; }
  .vai-rm-chip { flex: 0 0 auto; }
  .vai-rm-bar { flex-wrap: wrap; border-radius: 18px; padding: 10px; }
  .vai-rm-input { flex-basis: calc(100% - 28px); }
  .vai-rm-scene-controls {
    width: min(94vw, 520px);
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 18px;
  }
  .vai-rm-scene-disclosure { flex-basis: 100%; text-align: center; }
}
