/* ============================================================================
   Snowy — floating AI agent (Frost design). One widget, two modes:
   customer (logged-out) + admin workspace (signed-in staff), plus voice + memory.
   Design handoff: design_handoff_samoyed_agent/. Self-contained Frost tokens below
   (kept separate from the site theme vars so the widget renders identically anywhere).
   ============================================================================ */

.snowy-root {
  /* Snowy follows the active site theme: a single accent (--color-snowy-accent, injected per
     theme by the Theme Manager; "Frost" #3C7FC4 for Midnight & Silver) drives the whole palette
     via color-mix(). The hex after each var() is the Frost fallback if the theme var is absent. */
  --sn-accent: var(--color-snowy-accent, #3C7FC4);
  --sn-accent-light: color-mix(in srgb, var(--sn-accent) 72%, #fff);
  --sn-accent-deep: color-mix(in srgb, var(--sn-accent) 82%, #000);
  --sn-tint: color-mix(in srgb, var(--sn-accent) 11%, #fff);
  --sn-tint-border: color-mix(in srgb, var(--sn-accent) 30%, #fff);
  --sn-active-thread: color-mix(in srgb, var(--sn-accent) 13%, #fff);
  --sn-white: #ffffff;
  --sn-offwhite: color-mix(in srgb, var(--sn-accent) 4%, #fff);
  --sn-panel-fill: color-mix(in srgb, var(--sn-accent) 7%, #fff);
  --sn-rail: color-mix(in srgb, var(--sn-accent) 5%, #fff);
  --sn-border: color-mix(in srgb, var(--sn-accent) 16%, #fff);
  --sn-border-2: color-mix(in srgb, var(--sn-accent) 20%, #fff);
  --sn-border-3: color-mix(in srgb, var(--sn-accent) 13%, #fff);
  --sn-divider: color-mix(in srgb, var(--sn-accent) 9%, #fff);
  --sn-divider-2: color-mix(in srgb, var(--sn-accent) 6%, #fff);
  --sn-ink: color-mix(in srgb, var(--sn-accent) 22%, #14202c);
  --sn-body: color-mix(in srgb, var(--sn-accent) 16%, #29333d);
  --sn-secondary: color-mix(in srgb, var(--sn-accent) 14%, #56646f);
  --sn-secondary-2: color-mix(in srgb, var(--sn-accent) 14%, #66737f);
  --sn-muted: color-mix(in srgb, var(--sn-accent) 12%, #8693a0);
  --sn-muted-2: color-mix(in srgb, var(--sn-accent) 12%, #9aa7b3);
  --sn-faint: color-mix(in srgb, var(--sn-accent) 10%, #aebccb);
  /* Live-voice overlay dark — derived from the accent so it tints with the theme. */
  --sn-call-1: color-mix(in srgb, var(--sn-accent) 30%, #0a1320);
  --sn-call-2: color-mix(in srgb, var(--sn-accent) 46%, #0d1c2e);
  /* Staff badge + status colours are intentionally theme-independent. */
  --sn-slate: #334155;
  --sn-green: #46c98b;
  --sn-red: #EE6352;
  --sn-red-bg: #FDEBE9;
  --sn-amber: #C98A00;
  --sn-amber-bg: #FBF1DA;
  --sn-success: #1F8A5B;
  --sn-success-bg: #E4F4EC;
  --sn-sales: #9A7A2E;

  --sn-font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sn-brand: 'Baloo 2', var(--sn-font);
  --sn-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --sn-shadow-customer: 0 20px 50px -20px rgba(57,103,150,.4);
  --sn-shadow-admin: 0 26px 64px -22px rgba(40,70,110,.5);
  --sn-shadow-launcher: 0 10px 24px -8px rgba(57,103,150,.5);
  --sn-shadow-card: 0 14px 30px -18px rgba(57,103,150,.4);

  font-family: var(--sn-font);
  -webkit-font-smoothing: antialiased;
}
.snowy-root, .snowy-root * { box-sizing: border-box; }
/* The `hidden` attribute must win over component `display` rules (the voice overlay, memory
   manager and waitlist form all default to hidden and toggle via [hidden]). Without this, their
   `display:flex` overrides the UA [hidden] rule and they stay on top of everything — which left
   the memory overlay covering the chat + close button ("stuck open"). */
.snowy-root [hidden] { display: none !important; }

/* ── Launcher (fixed bottom-right) ─────────────────────────────────────── */
.snowy-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.snowy-launcher-row { display: flex; align-items: center; gap: 10px; }

/* Hover pop-out action pills (stack above the bubble, Copilot-style). */
.snowy-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.snowy-launcher:hover .snowy-actions,
.snowy-launcher:focus-within .snowy-actions {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
/* Hide the pop-out once the panel is open (the chat has its own chips). */
.snowy-launcher[data-open="true"] .snowy-actions { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.snowy-action {
  font-family: var(--sn-font);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sn-accent-deep);
  background: var(--sn-white);
  border: 1px solid var(--sn-border);
  border-radius: 999px;
  padding: 9px 16px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(57,103,150,.45);
  transform: translateY(6px);
  opacity: 0;
  transition: transform .14s ease, color .14s ease, border-color .14s ease, background .14s ease;
}
.snowy-launcher:hover .snowy-action,
.snowy-launcher:focus-within .snowy-action { transform: translateY(0); opacity: 1; }
/* Staggered reveal (top pill last) so they cascade up from the bubble. */
.snowy-launcher:hover .snowy-action:nth-last-child(1),
.snowy-launcher:focus-within .snowy-action:nth-last-child(1) { transition-delay: .02s; }
.snowy-launcher:hover .snowy-action:nth-last-child(2),
.snowy-launcher:focus-within .snowy-action:nth-last-child(2) { transition-delay: .07s; }
.snowy-launcher:hover .snowy-action:nth-last-child(3),
.snowy-launcher:focus-within .snowy-action:nth-last-child(3) { transition-delay: .12s; }
.snowy-launcher:hover .snowy-action:nth-last-child(4),
.snowy-launcher:focus-within .snowy-action:nth-last-child(4) { transition-delay: .17s; }
.snowy-action:hover { background: var(--sn-panel-fill); border-color: var(--sn-tint-border); transform: translateX(-3px); }
.snowy-launcher--admin .snowy-action { color: var(--sn-accent); }
/* Primary (conversion) action — accent-filled to stand out, e.g. "Join the waitlist".
   Scoped under .snowy-launcher so it out-specifies the `.snowy-launcher--admin .snowy-action`
   color rule above — otherwise the admin accent colour wins and the white label vanishes
   into the accent-filled background. */
.snowy-launcher .snowy-action--primary { color: #fff; background: var(--sn-accent); border-color: var(--sn-accent); }
.snowy-launcher .snowy-action--primary:hover { color: #fff; background: var(--sn-accent-deep); border-color: var(--sn-accent-deep); }
.snowy-pill {
  background: var(--sn-white);
  border: 1px solid var(--sn-border);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sn-accent-deep);
  box-shadow: 0 6px 16px -6px rgba(57,103,150,.4);
  white-space: nowrap;
  cursor: pointer;
}
.snowy-launcher--admin .snowy-pill {
  background: var(--sn-slate);
  border-color: var(--sn-slate);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(40,70,110,.5);
}
.snowy-bubble {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--sn-white);
  border: 1px solid var(--sn-border);
  box-shadow: var(--sn-shadow-launcher);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 0;
}
.snowy-bubble { animation: snowy-bob 4.5s ease-in-out infinite; transition: transform .18s ease, box-shadow .18s ease; }
.snowy-launcher--customer .snowy-bubble { animation: snowy-bob 4.5s ease-in-out infinite, snowy-softpulse 3s infinite; }

/* ── Draggable launcher ──────────────────────────────────────────────────
   The bubble can be dragged to reposition Snowy (handled in snowy.js). Block
   touch-scroll while dragging from it, and freeze the bob mid-drag. When Snowy
   is pinned to the left half or near the top, flip the pill stack so it opens
   on-screen instead of off the edge. */
.snowy-launcher .snowy-bubble { touch-action: none; }
/* Block the browser's native image drag / text selection so our pointer drag owns the gesture. */
.snowy-launcher .snowy-bubble,
.snowy-launcher .snowy-bubble img { -webkit-user-drag: none; -khtml-user-drag: none; user-select: none; -webkit-user-select: none; }
.snowy-launcher.is-dragging { transition: none; }
.snowy-launcher.is-dragging .snowy-bubble { cursor: grabbing; animation: none; transform: none; }
.snowy-launcher--left { align-items: flex-start; }
.snowy-launcher--left .snowy-actions { align-items: flex-start; }
.snowy-launcher--top { flex-direction: column-reverse; }
/* Settle the bob and lift on hover/focus so it feels responsive to the pointer. */
.snowy-launcher:hover .snowy-bubble,
.snowy-launcher:focus-within .snowy-bubble {
  animation-play-state: paused;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 14px 30px -10px rgba(57,103,150,.55);
}
.snowy-bubble:active { transform: scale(.97); }
.snowy-bubble img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; display: block; }
@keyframes snowy-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.snowy-bubble-badge {
  position: absolute;
  right: 2px; top: 2px;
  min-width: 24px; height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sn-red);
  border: 2px solid #fff;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
}
.snowy-bubble-badge[data-count]:not([data-count="0"]):not([data-count=""]) { display: flex; }
@keyframes snowy-softpulse {
  0%   { box-shadow: 0 0 0 0 rgba(79,147,214,.45); }
  70%  { box-shadow: 0 0 0 9px rgba(79,147,214,0); }
  100% { box-shadow: 0 0 0 0 rgba(79,147,214,0); }
}

/* ── Panel (shared shell) ──────────────────────────────────────────────── */
.snowy-panel {
  position: fixed;
  right: 24px;
  bottom: 150px;
  z-index: 99999;
  background: var(--sn-white);
  border-radius: 18px;
  overflow: hidden;
  display: none;
  flex-direction: column;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease-out, transform .18s ease-out;
}
.snowy-panel.is-open { display: flex; opacity: 1; transform: translateY(0); }
.snowy-panel--customer {
  width: 372px;
  height: 560px;
  max-height: calc(100vh - 174px);
  border: 1px solid var(--sn-border);
  box-shadow: var(--sn-shadow-customer);
}
.snowy-panel--admin {
  width: 660px;
  height: 600px;
  max-height: calc(100vh - 174px);
  border: 1px solid var(--sn-border-2);
  box-shadow: var(--sn-shadow-admin);
  transition: opacity .18s ease-out, transform .18s ease-out, width .2s ease, height .2s ease;
}
/* ⤡ Expand → a large workspace that scales to the available screen, leaving a
   24px margin on every side. Capped generously so it stays usable on ultra-wide
   monitors but fills the viewport on normal screens. The base panel anchors at
   bottom:150px; expanded re-anchors to bottom:24px so it can claim full height. */
.snowy-panel--admin.is-expanded {
  width: min(1600px, calc(100vw - 48px));
  height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);
  right: 24px;
  bottom: 24px;
}

/* avatar + online dot */
.snowy-ava { position: relative; flex: none; }
.snowy-ava img { border-radius: 50%; object-fit: cover; border: 1px solid var(--sn-border); display: block; }
.snowy-ava-dot {
  position: absolute; right: -1px; bottom: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--sn-green); border: 2px solid #fff;
}

/* ── Customer header ───────────────────────────────────────────────────── */
.snowy-head {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--sn-divider);
}
.snowy-head .snowy-ava img { width: 40px; height: 40px; }
.snowy-head-titles { flex: 1; min-width: 0; }
.snowy-head-name { font-weight: 800; font-size: 16px; color: var(--sn-ink); line-height: 1; letter-spacing: -.01em; }
.snowy-head-sub { font-size: 12px; color: var(--sn-muted); margin-top: 4px; }
.snowy-x { background: none; border: none; color: var(--sn-faint); font-size: 15px; cursor: pointer; padding: 4px; line-height: 1; }
.snowy-x:hover { color: var(--sn-secondary); }

/* ── Customer body ─────────────────────────────────────────────────────── */
.snowy-body {
  flex: 1;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.snowy-msg { max-width: 88%; font-size: 14px; line-height: 1.5; padding: 11px 14px; }
.snowy-msg--bot { align-self: flex-start; background: var(--sn-panel-fill); color: var(--sn-body); border-radius: 14px 14px 14px 4px; }
.snowy-msg--user { align-self: flex-end; max-width: 82%; background: var(--sn-accent); color: #fff; border-radius: 14px 14px 4px 14px; }

.snowy-quick { display: flex; flex-direction: column; gap: 8px; margin: 4px 0; }
.snowy-quick-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  font-size: 13.5px; font-weight: 600; color: var(--sn-accent-deep);
  background: #fff; border: 1px solid var(--sn-tint-border);
  padding: 10px 14px; border-radius: 11px; cursor: pointer;
  font-family: var(--sn-font);
}
.snowy-quick-btn:hover { background: var(--sn-panel-fill); }
.snowy-quick-btn .snowy-arrow { color: var(--sn-muted-2); }

/* litter availability card */
.snowy-litter {
  align-self: flex-start; width: 92%;
  background: #fff; border: 1px solid var(--sn-border-3); border-radius: 14px;
  padding: 12px; box-shadow: 0 8px 20px -10px rgba(57,103,150,.3);
}
.snowy-litter-status { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sn-green); margin-bottom: 7px; }
.snowy-litter-row { display: flex; gap: 10px; align-items: center; }
.snowy-litter-thumb {
  width: 46px; height: 46px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 21px;
  background: repeating-linear-gradient(45deg,#EAF3FB,#EAF3FB 7px,#DCEBF8 7px,#DCEBF8 14px);
}
.snowy-litter-title { font-weight: 800; font-size: 14px; color: var(--sn-ink); }
.snowy-litter-meta { font-size: 12px; color: var(--sn-muted); margin-top: 2px; }
.snowy-btn-primary {
  margin-top: 10px; display: block; width: 100%;
  font-size: 13px; font-weight: 800; color: #fff; background: var(--sn-accent);
  text-align: center; padding: 9px; border-radius: 10px; cursor: pointer;
  border: none; font-family: var(--sn-font);
}
.snowy-btn-primary:hover { background: var(--sn-accent-deep); }

/* waitlist capture (customer) */
.snowy-waitlist {
  align-self: stretch;
  background: var(--sn-panel-fill); border: 1px solid var(--sn-border-3);
  border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.snowy-waitlist-title { font-weight: 800; font-size: 14px; color: var(--sn-ink); }
.snowy-waitlist-sub { font-size: 12.5px; color: var(--sn-secondary); line-height: 1.45; }
.snowy-waitlist input {
  width: 100%; font-family: var(--sn-font); font-size: 13.5px; color: var(--sn-body);
  background: #fff; border: 1px solid var(--sn-border-3); border-radius: 9px; padding: 9px 11px; outline: none;
}
.snowy-waitlist input:focus { border-color: var(--sn-tint-border); }
.snowy-waitlist .snowy-btn-primary { margin-top: 2px; }
.snowy-wl-msg { font-size: 12px; color: var(--sn-secondary); min-height: 14px; }

/* ── Composer (shared) ─────────────────────────────────────────────────── */
.snowy-composer { padding: 14px 16px; border-top: 1px solid var(--sn-divider); }
.snowy-composer-row { display: flex; gap: 8px; align-items: center; }
.snowy-input {
  flex: 1; border: none; outline: none; background: none;
  font-family: var(--sn-font); font-size: 14px; color: var(--sn-body); resize: none;
  max-height: 90px; line-height: 1.4;
  /* Single-row textareas report scrollHeight > clientHeight, so the default
     overflow:auto paints a phantom vertical scrollbar (a grey box beside the
     mic). Hide it; the auto-grow JS re-enables scrolling once content tops the
     90px cap. */
  overflow-y: hidden;
}
.snowy-input::placeholder { color: var(--sn-muted-2); }
.snowy-icon-btn {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #5C7180; cursor: pointer; background: none; border: none; padding: 0;
}
.snowy-icon-btn:hover { background: var(--sn-divider-2); }
.snowy-icon-btn--voice { color: var(--sn-accent); background: var(--sn-tint); }
.snowy-send {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: var(--sn-accent); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.snowy-send:hover { background: var(--sn-accent-deep); }
.snowy-send svg { width: 18px; height: 18px; }

/* ── Admin: header ─────────────────────────────────────────────────────── */
.snowy-panel--admin .snowy-head { padding: 14px 18px; background: var(--sn-offwhite); }
.snowy-panel--admin .snowy-head .snowy-ava img { width: 38px; height: 38px; }
.snowy-staff {
  font-size: 10px; font-weight: 800; letter-spacing: .06em; color: #fff;
  background: var(--sn-slate); padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}
.snowy-head-namerow { display: flex; align-items: center; gap: 8px; }
.snowy-rail-toggle {
  flex: none; background: none; border: none; cursor: pointer; padding: 4px 7px;
  color: var(--sn-secondary); font-size: 23px; line-height: 1; border-radius: 7px;
}
.snowy-rail-toggle:hover { background: var(--sn-divider-2); color: var(--sn-ink); }
.snowy-panel--admin.is-rail-collapsed .snowy-rail-toggle { color: var(--sn-muted); }
.snowy-head-ctrls { display: flex; align-items: center; gap: 16px; color: var(--sn-faint); font-size: 21px; }
.snowy-head-ctrls button { background: none; border: none; color: inherit; font-size: inherit; cursor: pointer; padding: 0; line-height: 1; }
.snowy-head-ctrls button:hover { color: var(--sn-secondary); }

/* ── Admin: two-pane body ──────────────────────────────────────────────── */
.snowy-admin-body { flex: 1; display: flex; min-height: 0; }
.snowy-rail {
  width: 198px; flex: none;
  border-right: 1px solid var(--sn-divider);
  background: var(--sn-rail);
  display: flex; flex-direction: column; padding: 12px 10px; min-height: 0;
}
.snowy-panel--admin.is-rail-collapsed .snowy-rail { display: none; }
.snowy-newchat {
  font-size: 13px; font-weight: 800; color: #fff; background: var(--sn-accent);
  border: none; border-radius: 9px; padding: 9px; text-align: center; cursor: pointer;
  margin-bottom: 14px; font-family: var(--sn-font);
}
.snowy-newchat:hover { background: var(--sn-accent-deep); }
.snowy-rail-label { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sn-muted-2); padding: 0 6px 8px; }
.snowy-threads { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; flex: 1; min-height: 0; }
.snowy-thread { display: flex; align-items: center; border-radius: 8px; border: 1px solid transparent; }
.snowy-thread:hover { background: #EEF4FA; }
.snowy-thread.is-active { background: var(--sn-active-thread); border-color: var(--sn-tint-border); }
.snowy-thread-open {
  flex: 1; min-width: 0; font-size: 12.5px; color: var(--sn-secondary); padding: 8px 10px;
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: none; border: none; text-align: left; font-family: var(--sn-font);
}
.snowy-thread.is-active .snowy-thread-open { font-weight: 700; color: var(--sn-ink); }
.snowy-thread-acts { display: none; gap: 2px; padding-right: 6px; flex: none; }
.snowy-thread:hover .snowy-thread-acts, .snowy-thread.is-active .snowy-thread-acts { display: flex; }
.snowy-thread-btn { background: none; border: none; cursor: pointer; font-size: 11px; color: var(--sn-muted); padding: 2px 3px; line-height: 1; }
.snowy-thread-btn:hover { color: var(--sn-accent); }
.snowy-thread-search {
  font-family: var(--sn-font); font-size: 12px; color: var(--sn-body);
  background: var(--sn-white); border: 1px solid var(--sn-border-3); border-radius: 8px;
  padding: 7px 10px; margin-bottom: 8px; outline: none; width: 100%;
}
.snowy-thread-search:focus { border-color: var(--sn-tint-border); }
.snowy-rail-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--sn-divider); }
.snowy-mem-link {
  display: flex; align-items: center; gap: 8px; width: 100%;
  font-size: 12.5px; font-weight: 700; color: var(--sn-accent); padding: 8px 10px;
  cursor: pointer; background: none; border: none; border-radius: 8px; font-family: var(--sn-font);
}
.snowy-mem-link:hover { background: #EEF4FA; }
.snowy-user-row { margin-top: 10px; display: flex; align-items: center; gap: 9px; padding: 10px 6px 2px; border-top: 1px solid var(--sn-divider); }
.snowy-user-ava { width: 28px; height: 28px; border-radius: 50%; background: var(--sn-slate); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.snowy-user-name { font-size: 12.5px; font-weight: 700; color: var(--sn-ink); line-height: 1.2; }
.snowy-user-role { font-size: 10.5px; color: var(--sn-muted-2); line-height: 1.2; }

/* main column */
.snowy-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.snowy-subhead { padding: 10px 16px; border-bottom: 1px solid var(--sn-divider); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.snowy-subhead-title { font-weight: 800; font-size: 13.5px; color: var(--sn-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snowy-subhead-meta { font-size: 11px; color: var(--sn-muted-2); white-space: nowrap; flex: none; }
.snowy-main .snowy-body { padding: 16px; gap: 11px; }

/* admin composer (bordered box w/ attach + slash) */
.snowy-panel--admin .snowy-composer { padding: 12px 14px; }
.snowy-composer-box {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--sn-border-2); border-radius: 12px;
  padding: 6px 8px 6px 12px; background: #fff;
}
.snowy-attach { font-size: 16px; color: #7A8D9C; cursor: pointer; background: none; border: none; padding: 0; }
.snowy-composer-box .snowy-icon-btn { width: 32px; height: 32px; border-radius: 8px; }
.snowy-composer-box .snowy-send { width: 34px; height: 34px; border-radius: 9px; }
.snowy-slash-hint { font-family: var(--sn-mono); color: var(--sn-accent); font-weight: 700; }

/* ── Admin chat messages + markdown (server-rendered reply_html) ───────── */
.snowy-main .snowy-msg { max-width: 90%; font-size: 13.5px; }
.snowy-main .snowy-msg--user { max-width: 82%; }
.snowy-msg--bot p { margin: 0 0 8px; }
.snowy-msg--bot p:last-child { margin-bottom: 0; }
.snowy-msg--bot a { color: var(--sn-accent); font-weight: 700; text-decoration: none; }
.snowy-msg--bot a:hover { text-decoration: underline; }
.snowy-msg--bot ul, .snowy-msg--bot ol { margin: 6px 0; padding-left: 20px; }
.snowy-msg--bot li { margin: 2px 0; }
.snowy-msg--bot code { font-family: var(--sn-mono); font-size: 12px; background: #fff; border: 1px solid var(--sn-divider); border-radius: 5px; padding: 1px 5px; }
.snowy-msg--bot strong { color: var(--sn-ink); }
/* Markdown images (Parsedown emits bare <img>) must stay inside the bubble —
   gallery/photo replies were overflowing well past the message width. */
.snowy-msg--bot img { display: block; max-width: 100%; height: auto; border-radius: 10px; margin: 4px 0; }
.snowy-msg--bot table {
  width: 100%; border-collapse: collapse; margin: 9px 0 2px;
  background: #fff; border: 1px solid var(--sn-border-3); border-radius: 10px; overflow: hidden;
  font-size: 12.5px;
}
.snowy-msg--bot th {
  text-align: left; font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--sn-muted-2); background: var(--sn-rail);
  padding: 8px 12px; border-bottom: 1px solid var(--sn-divider);
}
.snowy-msg--bot td { padding: 9px 12px; border-bottom: 1px solid var(--sn-panel-fill); color: var(--sn-body); }
.snowy-msg--bot tr:last-child td { border-bottom: none; }
.snowy-err { color: var(--sn-red); margin: 0; }

/* typing indicator */
.snowy-typing { display: inline-flex; gap: 4px; align-items: center; }
.snowy-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--sn-muted-2); display: inline-block; animation: snowy-typing 1.2s infinite ease-in-out; }
.snowy-typing i:nth-child(2) { animation-delay: .15s; }
.snowy-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes snowy-typing { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* slash palette */
.snowy-composer { position: relative; }
.snowy-slash {
  position: absolute; left: 14px; right: 14px; bottom: calc(100% - 6px);
  background: #fff; border: 1px solid var(--sn-border-2); border-radius: 14px;
  box-shadow: var(--sn-shadow-card); overflow: hidden; display: none; z-index: 5;
}
.snowy-slash-head { padding: 9px 13px; border-bottom: 1px solid var(--sn-divider); font-size: 11px; font-family: var(--sn-mono); color: var(--sn-muted-2); }
.snowy-slash-row { display: flex; gap: 10px; align-items: baseline; padding: 9px 13px; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--sn-panel-fill); cursor: pointer; font-family: var(--sn-font); }
.snowy-slash-row:last-child { border-bottom: none; }
.snowy-slash-row:hover { background: var(--sn-panel-fill); }
.snowy-slash-cmd { font-family: var(--sn-mono); font-size: 12px; font-weight: 700; color: var(--sn-accent); min-width: 78px; }
.snowy-slash-desc { font-size: 12.5px; color: var(--sn-secondary); }

/* ── Quick-action chips (admin welcome) ────────────────────────────────── */
.snowy-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 4px; }
.snowy-chip {
  font-family: var(--sn-font); font-size: 12.5px; font-weight: 600; color: var(--sn-accent-deep);
  background: #fff; border: 1px solid var(--sn-tint-border); border-radius: 999px;
  padding: 7px 13px; cursor: pointer; white-space: nowrap;
}
.snowy-chip:hover { background: var(--sn-panel-fill); }

/* ── Attached-photo preview + in-bubble image ──────────────────────────── */
.snowy-attach-preview { padding: 0 2px 8px; }
.snowy-attach-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--sn-panel-fill); border: 1px solid var(--sn-border-3); border-radius: 10px; padding: 5px 8px; max-width: 100%; }
.snowy-attach-chip img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; flex: none; }
.snowy-attach-name { font-size: 12px; color: var(--sn-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snowy-attach-x { background: none; border: none; color: var(--sn-muted); font-size: 15px; cursor: pointer; line-height: 1; padding: 0 2px; flex: none; }
.snowy-attach-x:hover { color: var(--sn-red); }
.snowy-msg-img { display: block; max-width: 100%; border-radius: 10px; margin-bottom: 6px; }
.snowy-body.snowy-dragover { outline: 2px dashed var(--sn-accent); outline-offset: -6px; border-radius: 10px; }

/* ── "Remember this?" scope card ───────────────────────────────────────── */
.snowy-mem-prompt { max-width: 96%; }
.snowy-mem-prompt-q { font-weight: 800; color: var(--sn-ink); margin: 0 0 4px; }
.snowy-mem-prompt-text { margin: 0 0 9px; color: var(--sn-body); }
.snowy-mem-prompt-btns { display: flex; gap: 7px; flex-wrap: wrap; }
.snowy-btn-sm { font-family: var(--sn-font); font-size: 12.5px; font-weight: 700; color: #fff; background: var(--sn-accent); border: none; border-radius: 8px; padding: 7px 13px; cursor: pointer; }
.snowy-btn-sm:hover { background: var(--sn-accent-deep); }
.snowy-btn-ghost { color: var(--sn-secondary); background: #fff; border: 1px solid var(--sn-border-2); }
.snowy-btn-ghost:hover { background: var(--sn-panel-fill); }

/* ── Add-dog-from-pedigree review card ─────────────────────────────────── */
.snowy-ped-review { max-width: 96%; }
.snowy-ped-h { font-size: 14px; font-weight: 800; color: var(--sn-ink); margin: 0 0 8px; }
.snowy-ped-h a { color: var(--sn-accent); }
.snowy-ped-fields { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0 0 9px; }
.snowy-ped-fields dt { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--sn-muted-2); align-self: center; }
.snowy-ped-fields dd { margin: 0; font-size: 13px; color: var(--sn-body); }
.snowy-ped-flag { font-size: 10px; font-weight: 800; color: var(--sn-amber); background: var(--sn-amber-bg); border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.snowy-ped-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.snowy-ped-badge { font-size: 10.5px; font-weight: 800; color: var(--sn-accent); background: var(--sn-tint); border-radius: 999px; padding: 2px 9px; }
.snowy-ped-tree { background: #fff; border: 1px solid var(--sn-border-3); border-radius: 10px; padding: 8px 12px; margin-bottom: 9px; }
.snowy-ped-tree ul { margin: 0; padding-left: 16px; }
.snowy-ped-tree li { font-size: 12px; color: var(--sn-body); margin: 2px 0; }
.snowy-ped-link { color: var(--sn-accent); }
.snowy-ped-note { font-size: 12px; color: var(--sn-amber); margin: 0 0 9px; }
.snowy-ped-actions { display: flex; align-items: center; gap: 10px; }
.snowy-ped-hint { font-size: 11.5px; color: var(--sn-muted); }

/* ── Memory manager (overlay over the admin panel) ─────────────────────── */
.snowy-memory {
  position: absolute; inset: 0; z-index: 6;
  background: #fff; display: flex; flex-direction: column;
}
.snowy-memory .snowy-head { background: var(--sn-offwhite); }
.snowy-mem-back { font-size: 18px; color: var(--sn-secondary); }
.snowy-mem-add { margin: 0; padding: 8px 14px; }
.snowy-mem-tabs { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--sn-divider); }
.snowy-mem-tab {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: none; cursor: pointer; font-family: var(--sn-font);
  font-size: 13.5px; font-weight: 700; color: var(--sn-muted); padding: 12px 6px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.snowy-mem-tab.is-active { color: var(--sn-ink); border-bottom-color: var(--sn-accent); }
.snowy-mem-count { font-size: 11px; font-weight: 800; color: var(--sn-accent); background: var(--sn-tint); border-radius: 999px; padding: 1px 7px; }
.snowy-mem-toolbar { display: flex; gap: 10px; align-items: center; padding: 12px 18px; }
.snowy-mem-search {
  flex: 1; font-family: var(--sn-font); font-size: 13px; color: var(--sn-body);
  background: var(--sn-panel-fill); border: 1px solid var(--sn-border-3); border-radius: 9px;
  padding: 9px 12px; outline: none;
}
.snowy-mem-search:focus { border-color: var(--sn-tint-border); }
.snowy-mem-scope { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sn-secondary); background: var(--sn-tint); border: 1px solid var(--sn-tint-border); padding: 8px 11px; border-radius: 9px; white-space: nowrap; }
.snowy-mem-scope b { color: var(--sn-ink); }
.snowy-mem-list { flex: 1; overflow-y: auto; padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 10px; }

.snowy-mem-card {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--sn-border-3); border-radius: 12px; padding: 12px 14px; background: #fff;
}
.snowy-mem-card.is-off { opacity: .6; }
.snowy-mem-card.is-off .snowy-mem-text { text-decoration: line-through; }
.snowy-mem-ico { width: 32px; height: 32px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--sn-tint); color: var(--sn-accent); }
.snowy-mem-card.is-off .snowy-mem-ico { background: var(--sn-divider); color: var(--sn-muted-2); }
.snowy-mem-main { flex: 1; min-width: 0; }
.snowy-mem-text { font-size: 14px; font-weight: 600; color: var(--sn-ink); line-height: 1.45; }
.snowy-mem-meta { display: flex; align-items: center; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.snowy-mem-tag { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.snowy-mem-tag--kennel_facts { color: var(--sn-accent); background: var(--sn-tint); }
.snowy-mem-tag--policy { color: var(--sn-success); background: var(--sn-success-bg); }
.snowy-mem-tag--sales { color: var(--sn-sales); background: var(--sn-amber-bg); }
.snowy-mem-tag--outdated { color: var(--sn-muted); background: var(--sn-divider); }
.snowy-mem-src { font-size: 11px; color: var(--sn-muted-2); }
.snowy-mem-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.snowy-toggle { width: 34px; height: 19px; border-radius: 999px; background: var(--sn-border-2); border: none; cursor: pointer; position: relative; padding: 0; transition: background .15s; }
.snowy-toggle.is-on { background: var(--sn-accent); }
.snowy-toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .15s; }
.snowy-toggle.is-on::after { transform: translateX(15px); }
.snowy-mem-btn { background: none; border: none; cursor: pointer; color: var(--sn-faint); font-size: 14px; padding: 2px; }
.snowy-mem-btn:hover { color: var(--sn-secondary); }
.snowy-mem-empty { font-size: 13px; color: var(--sn-muted); text-align: center; padding: 28px 12px; }
.snowy-mem-edit { width: 100%; font-family: var(--sn-font); font-size: 14px; color: var(--sn-body); border: 1px solid var(--sn-tint-border); border-radius: 8px; padding: 8px 10px; outline: none; resize: vertical; }
.snowy-mem-editrow { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.snowy-mem-editrow select { font-family: var(--sn-font); font-size: 12px; border: 1px solid var(--sn-border-3); border-radius: 8px; padding: 6px 8px; }

/* ── Live voice overlay (dark Frost) ───────────────────────────────────── */
.snowy-call {
  position: fixed; right: 24px; bottom: 150px; z-index: 100000;
  width: 372px; height: 466px; max-height: calc(100vh - 174px);
  border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, var(--sn-call-1, #0E2238) 0%, var(--sn-call-2, #15324F) 100%);
  display: flex; flex-direction: column; color: #fff;
  box-shadow: 0 26px 64px -22px rgba(10,25,45,.7);
}
.snowy-call-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.snowy-call-live { font-size: 12.5px; color: #BFD6EC; display: inline-flex; align-items: center; gap: 7px; }
.snowy-call-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sn-green); display: inline-block; animation: snowy-dotpulse 2s infinite; }
@keyframes snowy-dotpulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.snowy-call-x { background: none; border: none; color: #9FBBD6; font-size: 15px; cursor: pointer; padding: 4px; }
.snowy-call-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 24px; }
.snowy-call-orb { position: relative; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.snowy-call-orb img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; position: relative; z-index: 2; box-shadow: 0 0 0 3px rgba(127,181,230,.5); }
.snowy-call-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(127,181,230,.5); animation: snowy-ring 2.6s ease-out infinite; }
.snowy-call-ring:nth-child(2) { animation-delay: 1.3s; }
@keyframes snowy-ring { 0% { transform: scale(.85); opacity: .55; } 100% { transform: scale(1.9); opacity: 0; } }
.snowy-call-status { font-size: 18px; font-weight: 800; color: #fff; }
.snowy-call-hint { font-size: 12.5px; color: #9FBBD6; }
.snowy-eq { display: flex; align-items: center; gap: 4px; height: 36px; margin-top: 6px; }
.snowy-eq i { width: 5px; height: 100%; border-radius: 3px; background: #9DCBEF; transform-origin: center; animation: snowy-eq .9s ease-in-out infinite; }
.snowy-eq i:nth-child(1) { background: #7FB5E6; animation-delay: 0s; }
.snowy-eq i:nth-child(2) { background: #9DCBEF; animation-delay: .15s; }
.snowy-eq i:nth-child(3) { background: #BFE0F7; animation-delay: .3s; }
.snowy-eq i:nth-child(4) { background: #9DCBEF; animation-delay: .45s; }
.snowy-eq i:nth-child(5) { background: #BFE0F7; animation-delay: .6s; }
.snowy-eq i:nth-child(6) { background: #9DCBEF; animation-delay: .75s; }
.snowy-eq i:nth-child(7) { background: #7FB5E6; animation-delay: .9s; }
@keyframes snowy-eq { 0%,100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.snowy-call-orb.is-speaking ~ .snowy-eq i { animation-duration: .5s; }
.snowy-call:not(.is-speaking) .snowy-eq { opacity: .5; }
.snowy-call.is-speaking .snowy-eq i { animation-duration: .5s; }
.snowy-call-transcript { background: rgba(255,255,255,.12); color: #D6E6F4; border-radius: 999px; padding: 8px 14px; font-size: 13px; max-width: 100%; text-align: center; }
.snowy-call-controls { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 22px; }
.snowy-call-btn { border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; border-radius: 50%; background: rgba(255,255,255,.14); }
.snowy-call-mute, .snowy-call-kb { width: 50px; height: 50px; }
.snowy-call-mute.is-muted { background: rgba(238,99,82,.3); }
.snowy-call-hang { width: 62px; height: 62px; background: var(--sn-red); }
.snowy-call-hang:hover { background: #e0513f; }

@media (max-width: 720px) {
  .snowy-call { right: 0; left: 0; bottom: 0; width: 100%; height: 88vh; border-radius: 18px 18px 0 0; }
  .snowy-panel { right: 0; bottom: 0; left: 0; border-radius: 18px 18px 0 0; max-height: 92vh; }
  .snowy-panel--customer, .snowy-panel--admin, .snowy-panel--admin.is-expanded { width: 100%; height: 88vh; }
  .snowy-launcher { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .snowy-bubble, .snowy-launcher--customer .snowy-bubble { animation: none; }
  .snowy-panel, .snowy-actions, .snowy-action, .snowy-bubble { transition: none; }
  .snowy-launcher:hover .snowy-bubble, .snowy-launcher:focus-within .snowy-bubble { transform: none; }
}
