/* ============================================================
   AUREA Concierge Widget — Styles (v2 — 2026 AI-native redesign)
   Floating launcher + slide-up panel for Private Inquiry
   Prefix: .acw- (Aurea Concierge Widget)
   ============================================================ */

/* ── Custom easing ────────────────────────────────────────── */

@property --acw-border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ── Backdrop ─────────────────────────────────────────────── */

.acw-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8999;
  border: 0;
  background: rgba(16, 18, 22, 0.36);
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms var(--ease-default);
}

.acw-backdrop.acw-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Launcher — frosted glass squircle ────────────────────── */

.acw-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;

  min-width: 56px;
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;

  /* Frosted glass — matches hero-strip language */
  background: rgba(44, 42, 38, 0.68);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-radius: 999px;
  border: 1px solid rgba(184, 168, 138, 0.3);
  color: var(--gold-light, #D4C4A0);

  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;

  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);

  transition:
    border-color 300ms var(--ease-default),
    box-shadow 300ms var(--ease-default),
    transform 220ms ease,
    padding 400ms cubic-bezier(0.22, 1.0, 0.36, 1);

  animation: acw-breathe 4s ease-in-out infinite;
}

.acw-launcher[hidden] { display: none; }

@keyframes acw-breathe {
  0%, 100% {
    border-color: rgba(184, 168, 138, 0.25);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.18),
      0 2px 8px rgba(0, 0, 0, 0.08),
      0 0 0 0 rgba(184, 168, 138, 0);
  }
  50% {
    border-color: rgba(184, 168, 138, 0.5);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.18),
      0 2px 8px rgba(0, 0, 0, 0.08),
      0 0 12px 2px rgba(184, 168, 138, 0.08);
  }
}

/* Icon */
.acw-launcher-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform 220ms ease;
}

.acw-launcher-label {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition:
    max-width 450ms cubic-bezier(0.22, 1.0, 0.36, 1),
    opacity 300ms ease,
    margin 400ms cubic-bezier(0.22, 1.0, 0.36, 1);
  margin-left: 0;
}

.acw-launcher:focus-visible {
  outline: none;
  border-color: rgba(184, 168, 138, 0.72);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.22),
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 0 18px 3px rgba(184, 168, 138, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.acw-launcher:active {
  transform: scale(1.02);
}

.acw-launcher:active .acw-launcher-icon,
.acw-launcher:focus-visible .acw-launcher-icon {
  transform: scale(1.18);
}

/* ── Tap burst — touch devices ────────────────────────────── */

.acw-launcher::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(184, 168, 138, 0.6), rgba(160, 200, 220, 0.4), rgba(200, 170, 220, 0.3));
  background: conic-gradient(
    from 0deg,
    rgba(184, 168, 138, 0.6),
    rgba(160, 200, 220, 0.5),
    rgba(200, 170, 220, 0.5),
    rgba(220, 190, 140, 0.5),
    rgba(140, 200, 180, 0.5),
    rgba(184, 168, 138, 0.6)
  );
  filter: blur(6px);
  z-index: -1;
  transition: none;
}

.acw-launcher.acw-tap-burst {
  animation: acw-tap-scale 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.acw-launcher.acw-tap-burst::before {
  animation: acw-burst-ring 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.acw-launcher.acw-tap-burst .acw-launcher-icon {
  animation: acw-icon-spin 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes acw-tap-scale {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.25); }
  100% { transform: scale(0.9); opacity: 0; }
}

@keyframes acw-burst-ring {
  0%   { opacity: 0; transform: scale(0.8) rotate(0deg); }
  25%  { opacity: 0.85; transform: scale(1.1) rotate(30deg); }
  60%  { opacity: 0.5; transform: scale(1.8) rotate(80deg); }
  100% { opacity: 0; transform: scale(2.6) rotate(120deg); }
}

@keyframes acw-icon-spin {
  0%   { transform: scale(1) rotate(0deg); }
  35%  { transform: scale(1.3) rotate(60deg); }
  100% { transform: scale(0.8) rotate(180deg); opacity: 0; }
}

@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
  .acw-launcher:hover {
    padding: 0 22px 0 16px;
    border-color: rgba(184, 168, 138, 0.6);
    box-shadow:
      0 12px 40px rgba(0, 0, 0, 0.22),
      0 4px 12px rgba(0, 0, 0, 0.1),
      0 0 16px 3px rgba(184, 168, 138, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: none;
  }

  .acw-launcher:hover .acw-launcher-icon {
    transform: scale(1.18);
  }

  .acw-launcher:hover .acw-launcher-label {
    max-width: 260px;
    opacity: 1;
    margin-left: 10px;
  }
}

@media (max-width: 1024px), (hover: none), (pointer: coarse) {
  .acw-launcher {
    width: 60px;
    min-width: 60px;
    padding: 0;
  }

  .acw-launcher-label {
    display: none;
  }
}

/* ── Panel ────────────────────────────────────────────────── */

.acw-panel {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 400px;
  max-height: min(620px, calc(100dvh - 120px));
  z-index: 9001;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 20px;
  border: 1px solid rgba(212, 207, 198, 0.4);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  overflow: hidden;

  /* Spring open/close */
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 400ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 300ms ease;
}

.acw-panel.acw-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
  transition:
    transform 500ms cubic-bezier(0.22, 1.0, 0.36, 1),
    opacity 300ms ease;
}

.acw-panel[hidden] { display: none; }

/* ── Header — frosted sticky ─────────────────────────────── */

.acw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(212, 207, 198, 0.5);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}

.acw-header-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}

/* Persistent Contact pill in the header — visible from message 1.
   Styled as a quiet outlined chip in the brand gold, distinct from the
   close X but not loud enough to compete with the chat itself. */
.acw-header-contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin-right: 4px;
  background: transparent;
  border: 1px solid rgba(184, 168, 138, 0.5);
  border-radius: 999px;
  color: var(--gold-dark, #8a7a4d);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background 200ms ease,
    border-color 200ms ease,
    color 200ms ease;
}

.acw-header-contact svg {
  width: 14px;
  height: 14px;
}

.acw-header-contact:hover {
  background: rgba(184, 168, 138, 0.08);
  border-color: var(--gold);
  color: var(--dark);
}

.acw-header-contact:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .acw-header-contact-label {
    /* On narrow screens collapse to icon only — the aria-label is still set. */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .acw-header-contact {
    padding: 8px;
  }
}

/* Inline contact card — rendered in the message stream when the user
   clicks the header pill. Static data, no AI roundtrip. */
.acw-msg-contact {
  align-self: stretch;
  max-width: 100%;
  background: var(--white, #ffffff);
  border: 1px solid rgba(184, 168, 138, 0.45);
  border-radius: 14px;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acw-contact-brand {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--dark);
  text-transform: uppercase;
}

.acw-contact-intro {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--text-caption);
  color: var(--charcoal);
  line-height: 1.45;
}

.acw-contact-list {
  margin: 4px 0 0;
  display: grid;
  grid-template-columns: minmax(72px, auto) 1fr;
  gap: 6px 12px;
  font-family: var(--sans);
  font-size: var(--text-caption);
}

.acw-contact-dt {
  margin: 0;
  color: var(--warm-gray, #8a8278);
  font-weight: 500;
}

.acw-contact-dd {
  margin: 0;
  color: var(--dark);
  word-break: break-word;
}

.acw-contact-link {
  color: var(--gold-dark, #8a7a4d);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.acw-contact-link:hover {
  color: var(--dark);
}

/* Gold status dot — signals AI active */
.acw-header-title::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(184, 168, 138, 0.4);
  animation: acw-header-pulse 3s ease-in-out infinite;
}

@keyframes acw-header-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.acw-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--warm-gray);
  font-size: 1.3rem;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: color 200ms ease, background 200ms ease;
}

.acw-close:hover {
  color: var(--dark);
  background: var(--offwhite);
}

/* ── Gate (email + consent) ───────────────────────────────── */

.acw-gate {
  padding: var(--space-6) var(--space-4) var(--space-4);
  flex: 1;
  overflow-y: auto;
}

.acw-gate[hidden] { display: none; }

.acw-gate-intro {
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--charcoal);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.acw-gate-label {
  display: block;
  font-family: var(--sans);
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--warm-gray);
  margin-bottom: var(--space-2);
}

.acw-gate-email {
  width: 100%;
  padding: 10px 14px;
  background: var(--offwhite);
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--dark);
  outline: none;
  transition:
    border-color 200ms ease,
    background 200ms ease,
    box-shadow 200ms ease;
}

.acw-gate-email:focus {
  border-color: rgba(184, 168, 138, 0.5);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(184, 168, 138, 0.1);
}

.acw-gate-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-family: var(--sans);
  font-size: var(--text-caption);
  color: var(--charcoal);
  line-height: 1.5;
  cursor: pointer;
}

.acw-gate-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--gold);
}

.acw-gate-consent + .acw-gate-consent {
  margin-top: var(--space-3);
}

.acw-gate-start {
  display: block;
  width: 100%;
  margin-top: var(--space-6);
  padding: 12px;
  background: var(--dark);
  color: var(--gold-light, #D4C4A0);
  border: none;
  border-radius: 12px;
  font-family: var(--sans);
  font-size: var(--text-body);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background 300ms var(--ease-default),
    color 300ms var(--ease-default);
}

.acw-gate-start:hover { background: var(--gold); color: var(--dark); }
.acw-gate-start:disabled { opacity: 0.5; cursor: default; }

.acw-gate-note {
  margin-top: var(--space-3);
  font-family: var(--sans);
  font-size: var(--text-caption);
  color: var(--warm-gray);
  line-height: 1.5;
}

.acw-gate-verify {
  margin-top: 0;
  padding: var(--space-4);
  background: var(--offwhite);
  border: 1px solid var(--stone);
  border-radius: var(--radius-lg);
}

.acw-gate-verify-text {
  margin: 0 0 var(--space-3);
  font-family: var(--sans);
  font-size: var(--text-caption);
  color: var(--charcoal);
  line-height: 1.55;
}

.acw-gate-code {
  width: 100%;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dark);
  outline: none;
  transition: border-color 300ms var(--ease-default);
}

.acw-gate-code:focus {
  border-color: var(--gold);
}

.acw-gate-error {
  font-family: var(--sans);
  font-size: var(--text-caption);
  color: #b44;
  margin-top: var(--space-3);
  min-height: 1em;
}

/* ── Chat area ────────────────────────────────────────────── */

.acw-chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.acw-chat[hidden] { display: none; }

/* ── Messages ─────────────────────────────────────────────── */

.acw-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.acw-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-family: var(--sans);
  font-size: var(--text-body);
  line-height: 1.55;
  word-break: break-word;
  animation: acw-msg-appear 350ms cubic-bezier(0.22, 1.0, 0.36, 1) both;
}

@keyframes acw-msg-appear {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.acw-msg-user {
  align-self: flex-end;
  background: var(--dark);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 14px 14px 4px 14px;
  white-space: pre-wrap;
}

.acw-msg-assistant {
  align-self: flex-start;
  background: var(--offwhite);
  color: #1a1a1a;
  border: 1px solid rgba(212, 207, 198, 0.6);
  border-radius: 14px 14px 14px 4px;
}

/* Structured assistant prose inside assistant bubbles */
.acw-msg-assistant p { margin: 0; }
.acw-msg-assistant p + p { margin-top: 0.6em; }
.acw-msg-assistant ul {
  margin: 0.5em 0;
  padding-left: 1.3em;
  list-style: disc;
}
.acw-msg-assistant li { margin-top: 0.25em; }
.acw-msg-assistant strong { font-weight: 600; color: #111; }
.acw-msg-assistant em { font-style: italic; }
.acw-msg-assistant a {
  color: var(--gold-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.acw-msg-assistant h3, .acw-msg-assistant h4, .acw-msg-assistant h5 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--dark);
  margin: 0.8em 0 0.3em;
  font-size: 0.95em;
}
.acw-msg-assistant h3 { font-size: 1.05em; }
.acw-msg-assistant hr {
  border: none;
  border-top: 1px solid rgba(212, 207, 198, 0.5);
  margin: 0.8em 0;
}

/* ── Markdown tables in chat ─────────────────────────────── */
.acw-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.6em -12px;
  padding: 0 12px;
}
.acw-msg-assistant table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  line-height: 1.4;
}
.acw-msg-assistant thead th {
  background: var(--dark, #1a1a1a);
  color: var(--gold-light, #D4C4A0);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.acw-msg-assistant tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(212, 207, 198, 0.4);
  vertical-align: top;
  color: var(--charcoal, #333);
}
.acw-msg-assistant tbody tr:last-child td {
  border-bottom: none;
}
.acw-msg-assistant tbody tr:nth-child(even) td {
  background: rgba(250, 248, 245, 0.5);
}

.acw-msg-system {
  align-self: center;
  max-width: 90%;
  background: transparent;
  color: var(--warm-gray);
  font-size: var(--text-caption);
  text-align: center;
  padding: var(--space-2) var(--space-3);
}

.acw-msg-handoff {
  align-self: center;
  max-width: 90%;
  background: rgba(74, 122, 62, 0.06);
  border: 1px solid rgba(74, 122, 62, 0.2);
  color: var(--color-success);
  font-size: var(--text-caption);
  text-align: center;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
}

.acw-msg-handoff a {
  color: var(--color-success);
  font-weight: 600;
}

.acw-msg-error {
  align-self: center;
  max-width: 90%;
  background: rgba(180, 68, 68, 0.06);
  border: 1px solid rgba(180, 68, 68, 0.15);
  color: #944;
  font-size: var(--text-caption);
  text-align: center;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
}

/* ── Inline email gate (in-stream) ─────────────────────────── */

.acw-msg-inline-gate {
  align-self: stretch;
  max-width: 100%;
  background: var(--offwhite);
  border: 1px solid rgba(184, 168, 138, 0.45);
  border-radius: 14px;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Pending state — visitor's message that was rejected at the email gate.
   Dimmed + line-through so they realise it didn't actually go through. */
.acw-msg-user.acw-msg-pending {
  opacity: 0.55;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255, 255, 255, 0.55);
}

/* Visually hidden but readable by screen readers. */
.acw-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.acw-inline-gate-link {
  color: var(--gold-dark, #8a7a4d);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.acw-inline-gate-link:hover {
  color: var(--dark);
}

.acw-inline-gate-intro {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--text-caption);
  color: var(--charcoal);
  line-height: 1.5;
}

.acw-inline-gate-email {
  width: 100%;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: 12px;
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--dark);
  outline: none;
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease;
}

.acw-inline-gate-email:focus {
  border-color: rgba(184, 168, 138, 0.6);
  box-shadow: 0 0 0 3px rgba(184, 168, 138, 0.1);
}

.acw-inline-gate-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: var(--sans);
  font-size: var(--text-caption);
  color: var(--charcoal);
  line-height: 1.45;
  cursor: pointer;
}

.acw-inline-gate-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--gold);
}

.acw-inline-gate-btn {
  align-self: stretch;
  padding: 10px 14px;
  background: var(--dark);
  color: var(--gold-light, #D4C4A0);
  border: none;
  border-radius: 12px;
  font-family: var(--sans);
  font-size: var(--text-body);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background 300ms var(--ease-default),
    color 300ms var(--ease-default);
}

.acw-inline-gate-btn:hover:not(:disabled) {
  background: var(--gold);
  color: var(--dark);
}

.acw-inline-gate-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.acw-inline-gate-error {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--text-caption);
  color: #b44;
  min-height: 1em;
}

/* ── Suggestion chips ────────────────────────────────────── */

.acw-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: flex-start;
  padding: 2px 0;
  animation: acw-msg-appear 400ms cubic-bezier(0.22, 1.0, 0.36, 1) both;
}

.acw-chip {
  display: inline-block;
  padding: 9px 16px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--gold-dark, #8B7D5E);
  background: rgba(184, 168, 138, 0.06);
  border: 1px solid rgba(184, 168, 138, 0.35);
  border-radius: 20px;
  cursor: pointer;
  white-space: normal;
  word-break: keep-all;
  transition:
    background 200ms ease,
    border-color 200ms ease,
    color 200ms ease,
    box-shadow 200ms ease;
}

.acw-chip:hover {
  background: rgba(184, 168, 138, 0.14);
  border-color: rgba(184, 168, 138, 0.6);
  color: var(--dark, #2C2A26);
  box-shadow: 0 2px 8px rgba(184, 168, 138, 0.12);
}

.acw-chip:active {
  transform: scale(0.97);
  background: rgba(184, 168, 138, 0.22);
}

/* ── Typing indicator — shimmer bar ──────────────────────── */

.acw-typing {
  align-self: flex-start;
  width: 64px;
  height: 28px;
  padding: 0;
  background: var(--offwhite);
  border: 1px solid rgba(212, 207, 198, 0.6);
  border-radius: 14px 14px 14px 4px;
  overflow: hidden;
  position: relative;
  animation: acw-msg-appear 300ms cubic-bezier(0.22, 1.0, 0.36, 1) both;
}

.acw-typing::after {
  content: '';
  position: absolute;
  inset: 8px 10px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    rgba(184, 168, 138, 0.12) 0%,
    rgba(184, 168, 138, 0.4) 50%,
    rgba(184, 168, 138, 0.12) 100%
  );
  background-size: 200% 100%;
  animation: acw-shimmer 1.8s ease-in-out infinite;
}

/* Hide the dot spans — shimmer replaces them */
.acw-typing span { display: none; }

@keyframes acw-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Location map card ────────────────────────────────────── */

.acw-map-card {
  align-self: flex-start;
  width: 100%;
  max-width: 320px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(212, 207, 198, 0.6);
  background: var(--offwhite);
  animation: acw-msg-appear 400ms cubic-bezier(0.22, 1.0, 0.36, 1) both;
}

.acw-map-link {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  cursor: pointer;
}

.acw-map-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 100%;
  height: 100%;
}

.acw-map-tiles img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.acw-map-marker {
  position: absolute;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--gold, #B8A88A);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 1;
}

.acw-map-caption {
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--dark, #2C2A26);
  line-height: 1.4;
}

/* ── Media cards ──────────────────────────────────────────── */

.acw-media-cards {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.acw-media-card {
  flex: 1;
  min-width: 0;
  background: var(--offwhite);
  border: 1px solid rgba(212, 207, 198, 0.6);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 300ms var(--ease-default);
}

.acw-media-card:hover { box-shadow: var(--shadow-2); }

.acw-media-card-img {
  display: block;
  text-decoration: none;
}

.acw-media-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.acw-media-card-info {
  padding: var(--space-2) var(--space-3) var(--space-3);
}

.acw-media-card-name {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 2px;
}

.acw-media-card-status {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}
.acw-status-live { background: rgba(74,122,62,0.1); color: var(--color-success); }
.acw-status-sold-out { background: rgba(180,68,68,0.1); color: #944; }
.acw-status-coming-soon { background: rgba(184,168,138,0.15); color: var(--gold-dark); }

.acw-media-card-link {
  display: block;
  font-family: var(--sans);
  font-size: var(--text-caption);
  color: var(--gold-dark);
  text-decoration: none;
  margin-top: 4px;
}
.acw-media-card-link:hover { text-decoration: underline; }

/* ── Handoff buttons ─────────────────────────────────────── */

.acw-handoff-buttons {
  display: flex;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-2);
  flex-wrap: wrap;
}

.acw-handoff-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-family: var(--sans);
  font-size: var(--text-caption);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}

.acw-handoff-whatsapp {
  background: #25D366;
  color: #fff;
}
.acw-handoff-whatsapp:hover { background: #1DA851; }

.acw-handoff-wechat {
  background: #07C160;
  color: #fff;
}
.acw-handoff-wechat:hover { background: #059B4C; }

.acw-handoff-id {
  font-weight: 400;
  opacity: 0.9;
  margin-left: 4px;
}

/* ── Comparison table ─────────────────────────────────────── */

.acw-comparison {
  padding: var(--space-2) 0;
}

.acw-comparison-title {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin-bottom: var(--space-2);
}

.acw-comparison-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(212, 207, 198, 0.6);
  border-radius: 12px;
  background: var(--white);
}

.acw-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: var(--text-caption);
  color: #1a1a1a;
  line-height: 1.4;
  table-layout: fixed;
}

.acw-comparison-table th,
.acw-comparison-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(212, 207, 198, 0.4);
  vertical-align: middle;
  text-align: left;
}

.acw-comparison-table tr:last-child th,
.acw-comparison-table tr:last-child td { border-bottom: none; }

/* Label column (first col) */
.acw-ct-label {
  background: var(--offwhite);
  color: var(--warm-gray);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  width: 90px;
  min-width: 90px;
}

/* Project header cells */
.acw-ct-project {
  vertical-align: top;
  padding: 0;
  min-width: 120px;
}

.acw-ct-img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
}

.acw-ct-name {
  padding: 6px 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--dark);
}

.acw-ct-subtitle {
  padding: 0 10px 4px;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--warm-gray);
}

.acw-ct-highlight {
  display: inline-block;
  margin: 0 10px 8px;
  padding: 2px 8px;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--gold-dark, #8B7D5E);
  background: rgba(184, 168, 138, 0.12);
  border: 1px solid rgba(184, 168, 138, 0.3);
  border-radius: var(--radius-sm, 4px);
}

.acw-comparison-link {
  color: var(--gold-dark);
  text-decoration: none;
  font-size: var(--text-caption);
  font-weight: 500;
}
.acw-comparison-link:hover { text-decoration: underline; }

/* ── Block: paragraph & list ─────────────────────────────── */

.acw-block-paragraph {
  padding: 0 var(--space-4) var(--space-2);
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--dark);
  line-height: 1.55;
}

.acw-block-list {
  padding: 0 var(--space-4) var(--space-2);
  padding-left: calc(var(--space-4) + 1.2em);
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--dark);
  line-height: 1.55;
}

.acw-block-list li + li {
  margin-top: var(--space-1);
}

/* ── Quota meter ─────────────────────────────────────────── */
/* Sits between message stream and input bar — communicates how many
   anonymous messages remain before the email gate. Quiet by design. */

.acw-input-meter {
  padding: 4px 18px 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--warm-gray, #8a8278);
  letter-spacing: 0.02em;
  text-align: right;
  flex-shrink: 0;
}

.acw-input-meter[hidden] {
  display: none;
}

/* ── Input bar — frosted ─────────────────────────────────── */

.acw-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(212, 207, 198, 0.4);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.acw-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--offwhite);
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--dark);
  outline: none;
  resize: none;
  field-sizing: content;
  max-height: 100px;
  line-height: 1.4;
  transition:
    border-color 200ms ease,
    background 200ms ease,
    box-shadow 200ms ease;
}

.acw-input:focus {
  border-color: rgba(184, 168, 138, 0.5);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(184, 168, 138, 0.1);
}
.acw-input::placeholder { color: var(--warm-gray); opacity: 0.7; }
.acw-input:disabled { opacity: 0.4; }

.acw-send {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  color: var(--gold-light, #D4C4A0);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background 200ms ease,
    color 200ms ease,
    transform 150ms ease;
}

.acw-send:hover:not(:disabled) {
  background: var(--gold);
  color: var(--dark);
  transform: scale(1.05);
}
.acw-send:active:not(:disabled) { transform: scale(0.95); }
.acw-send:disabled { opacity: 0.25; cursor: default; }

/* ── Session ended banner ─────────────────────────────────── */

.acw-ended-bar {
  padding: var(--space-3) var(--space-4);
  text-align: center;
  font-family: var(--sans);
  font-size: var(--text-caption);
  color: var(--warm-gray);
  border-top: 1px solid rgba(212, 207, 198, 0.4);
  background: var(--offwhite);
  flex-shrink: 0;
}

/* ── Mobile — bottom sheet ────────────────────────────────── */

@media (max-width: 768px) {
  .acw-backdrop {
    background: rgba(10, 12, 16, 0.45);
  }

  /* Icon-only on mobile, no label */
  .acw-launcher {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    min-width: 56px;
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 999px;
  }

  .acw-launcher-label { display: none; }

  .acw-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: none;
    height: min(88vh, calc(100vh - env(safe-area-inset-top, 0px)));
    height: min(88dvh, calc(100dvh - env(safe-area-inset-top, 0px)));
    border-radius: 20px 20px 0 0;
    border: none;
    border-top: 1px solid rgba(212, 207, 198, 0.3);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);

    /* Slide only, no opacity/scale on mobile */
    transform: translateY(100%);
    opacity: 1;
    transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .acw-panel.acw-open {
    transform: translateY(0);
    transition: transform 500ms cubic-bezier(0.22, 1.0, 0.36, 1);
  }

  /* Drag handle */
  .acw-panel::before {
    content: '';
    display: block;
    width: 40px;
    height: 5px;
    border-radius: 2.5px;
    background: var(--stone);
    margin: 10px auto 4px;
    flex-shrink: 0;
    opacity: 0.6;
  }

  .acw-input-bar {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .acw-ended-bar {
    padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Reduced motion ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .acw-launcher {
    animation: none !important;
  }

  .acw-msg {
    animation: none !important;
  }

  .acw-panel {
    transition: opacity 300ms ease !important;
    transform: none !important;
  }

  .acw-panel.acw-open {
    transition: opacity 300ms ease !important;
  }

  .acw-typing::after {
    animation: none !important;
    opacity: 0.5;
  }
}

/* ── Scroll lock (applied to body by JS) ──────────────────── */

body.acw-scroll-locked {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

/* Prevent pinch-zoom on widget elements */
.acw-panel,
.acw-launcher,
.acw-backdrop {
  touch-action: manipulation;
}
