:root {
  --bg: #141816;
  --bg-deep: #0e110f;
  --surface: #1b201d;
  --surface-elevated: #222824;
  --border: rgba(212, 175, 122, 0.24);
  --border-strong: rgba(212, 175, 122, 0.5);
  --gold: #d4af7a;
  --gold-bright: #e7c992;
  --ivory: #f5f2eb;
  --ivory-muted: #c8c1b4;
  --stone: #989082;
  --emerald: #4caf7d;
  --danger: #e26d5c;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ivory);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overscroll-behavior-y: none;
}

.serif {
  font-family: "Georgia", "Iowan Old Style", "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hidden {
  display: none !important;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.muted-copy {
  color: var(--ivory-muted);
  font-size: 14px;
  margin: 0;
}

.stack-12 {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-16 {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Auth Gate */
.auth-gate {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-top)) 20px calc(24px + var(--safe-bottom));
  background: radial-gradient(circle at top, #232824 0%, #111412 72%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-card h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.crest-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--bg-deep);
  border: 1.5px solid var(--gold);
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Shell */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(14, 17, 15, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: calc(10px + var(--safe-top)) 14px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.brand-crest-sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-deep);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-text {
  min-width: 0;
}

.brand-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 11px;
  color: var(--ivory-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--ivory);
  font-size: 20px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.avatar-btn {
  min-width: 44px;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.screen-root {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px calc(144px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Bottom Tab Bar */
.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  background: rgba(14, 17, 15, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  padding: 6px 6px calc(6px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}

.tab-item {
  min-height: 50px;
  border: none;
  background: transparent;
  color: var(--stone);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}

.tab-item.active {
  background: var(--surface-elevated);
  color: var(--gold);
}

.tab-icon {
  font-size: 17px;
  line-height: 1;
}

.tab-label {
  font-size: 11px;
  font-weight: 600;
}

/* Cards & Components */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-elevated {
  background: var(--surface-elevated);
  border-color: var(--border-strong);
}

.card-deep {
  background: var(--bg-deep);
}

.hero-card {
  background: linear-gradient(155deg, #272219 0%, #141816 65%, #0e110f 100%);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-card h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.18;
}

.banner-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: linear-gradient(145deg, #2b2418, #141715);
  cursor: pointer;
}

.banner-card img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

.banner-inner {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  width: fit-content;
}

.pill-gold {
  background: rgba(212, 175, 122, 0.16);
  color: var(--gold-bright);
  border: 1px solid rgba(212, 175, 122, 0.35);
}

.pill-emerald {
  background: rgba(76, 175, 125, 0.16);
  color: #7ee0ad;
  border: 1px solid rgba(76, 175, 125, 0.35);
}

.pill-muted {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ivory-muted);
}

.chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.chips-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ivory-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.chip.active {
  background: var(--gold);
  color: #141816;
  border-color: var(--gold);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.metric-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

.metric-figure {
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--gold);
}

.metric-label {
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}

.metric-detail {
  font-size: 11px;
  color: var(--stone);
  margin-top: 2px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  color: var(--ivory);
  text-decoration: none;
}

.contact-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(212, 175, 122, 0.14);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.service-cover {
  display: block;
  width: 100%;
  height: 176px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #101311;
}

.bullet-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bullet-list li {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--ivory);
}

.bullet-dot {
  color: var(--gold);
  font-weight: 700;
}

.stars {
  color: var(--gold);
  letter-spacing: 2px;
  font-size: 15px;
}

.reply-box {
  background: rgba(212, 175, 122, 0.08);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

/* Buttons & Forms */
.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex: 1;
}

.btn-full {
  width: 100%;
  flex: none;
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  flex: none;
}

.btn-gold {
  background: var(--gold);
  color: #141816;
}

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--gold);
}

.btn-ghost {
  background: transparent;
  color: var(--ivory-muted);
}

.btn-danger {
  background: rgba(226, 109, 92, 0.16);
  border-color: rgba(226, 109, 92, 0.45);
  color: #ff9c8e;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ivory-muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--ivory);
  font-size: 15px;
  font-family: inherit;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.alert-box {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
}

.alert-error {
  background: rgba(226, 109, 92, 0.14);
  border: 1px solid rgba(226, 109, 92, 0.45);
  color: #ffb1a6;
}

.alert-success {
  background: rgba(76, 175, 125, 0.14);
  border: 1px solid rgba(76, 175, 125, 0.45);
  color: #96ebc0;
}

/* Side Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.6);
}

.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(84vw, 320px);
  z-index: 55;
  background: var(--bg-deep);
  border-right: 1px solid var(--border);
  transform: translateX(-105%);
  transition: transform 0.24s ease;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.side-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-header > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.drawer-user {
  font-size: 13px;
  color: var(--ivory-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-group {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gold);
  margin: 10px 8px 4px;
}

.drawer-link {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--ivory);
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

.drawer-link:active,
.drawer-link.active {
  background: var(--surface);
  color: var(--gold);
}

/* Bottom Sheet */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.68);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-box {
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  background: var(--surface);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  margin: 10px auto 0;
}

.sheet-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sheet-header h3 {
  margin: 0;
  font-size: 19px;
}

.sheet-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sheet-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(82px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 90;
  max-width: calc(100vw - 32px);
  background: #252b27;
  color: var(--ivory);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

/* Official Crest Image Badges */
.crest-badge-img {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  border: 1.5px solid var(--gold);
  object-fit: cover;
  display: block;
}

.brand-crest-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--gold);
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

/* Luxury Photo Hero Card */
.hero-card-photo {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  min-height: 230px;
  display: flex;
  align-items: flex-end;
  background: var(--bg-deep);
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.52);
}

.hero-scrim {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 24px 20px 22px;
  background: linear-gradient(180deg, rgba(14, 17, 15, 0.15) 0%, rgba(14, 17, 15, 0.88) 70%, rgba(14, 17, 15, 0.96) 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-scrim h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.18;
  color: var(--ivory);
}

/* Free iPhone Install Banner */
.install-banner {
  background: linear-gradient(135deg, rgba(212, 175, 122, 0.18), rgba(27, 32, 29, 0.96));
  border-bottom: 1px solid var(--border-strong);
  padding: 10px 12px 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.install-banner-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--gold);
  flex-shrink: 0;
}

.install-banner-copy {
  flex: 1;
  min-width: 0;
}

.install-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ivory);
  line-height: 1.2;
}

.install-banner-sub {
  font-size: 11px;
  color: var(--ivory-muted);
  margin-top: 2px;
}

.install-dismiss-btn {
  min-width: 36px;
  min-height: 36px;
  font-size: 15px;
  color: var(--stone);
}

/* 3-Step Visual Install Guide */
.install-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
}

.install-step-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--bg-deep);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.install-step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ivory);
}

.install-step-desc {
  font-size: 13px;
  color: var(--ivory-muted);
  margin-top: 2px;
}

/* MILA AI Concierge Floating Pill FAB & Full-Screen Chat */
body.ai-modal-open {
  overflow: hidden;
}

.ai-fab {
  position: fixed;
  right: 16px;
  bottom: calc(74px + var(--safe-bottom));
  z-index: 42;
  min-height: 52px;
  padding: 6px 16px 6px 8px;
  border-radius: 999px;
  border: 1.25px solid rgba(212, 175, 122, 0.85);
  background: linear-gradient(125deg, #0e110f 0%, #222824 100%);
  color: var(--ivory);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(212, 175, 122, 0.16);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.ai-fab:active {
  transform: scale(0.97);
}

.ai-crest-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ai-crest-wrap.ai-crest-lg {
  width: 40px;
  height: 40px;
}

.ai-crest-img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(212, 175, 122, 0.85);
  display: block;
}

.ai-online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--emerald);
  border: 2px solid var(--bg-deep);
}

.ai-fab-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.ai-fab-eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--gold);
}

.ai-fab-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ivory);
  letter-spacing: 0.2px;
}

.ai-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

.ai-modal-header {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
  padding: calc(10px + var(--safe-top)) 10px 10px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ai-header-copy {
  flex: 1;
  min-width: 0;
}

.ai-header-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ivory);
  line-height: 1.2;
}

.ai-header-sub {
  font-size: 12px;
  color: var(--gold);
  line-height: 1.2;
  margin-top: 2px;
}

.ai-feed {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

.ai-welcome-card {
  background: var(--surface);
  border: 1px solid rgba(212, 175, 122, 0.34);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-welcome-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--gold);
}

.ai-welcome-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
  color: var(--ivory);
}

.ai-welcome-body {
  margin: 0;
  font-size: 14px;
  color: var(--ivory-muted);
  line-height: 1.5;
}

.ai-welcome-divider {
  height: 1px;
  background: rgba(212, 175, 122, 0.16);
}

.ai-welcome-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--gold);
}

.ai-starter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-starter-chip {
  text-align: left;
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 122, 0.38);
  background: var(--surface-elevated);
  color: var(--ivory);
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}

.ai-starter-chip:active {
  border-color: var(--gold);
  background: rgba(212, 175, 122, 0.14);
}

.ai-bubble-row {
  display: flex;
  width: 100%;
}

.ai-bubble-row.is-user {
  justify-content: flex-end;
}

.ai-bubble-row.is-assistant {
  justify-content: flex-start;
}

.ai-bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-bubble-user {
  background: var(--surface-elevated);
  border: 1px solid rgba(212, 175, 122, 0.55);
  border-bottom-right-radius: 4px;
}

.ai-bubble-assistant {
  background: var(--surface);
  border: 1px solid rgba(212, 175, 122, 0.24);
  border-bottom-left-radius: 4px;
}

.ai-bubble-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--gold);
}

.ai-user-text {
  font-size: 14.5px;
  color: var(--ivory);
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-msg-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14.5px;
  line-height: 1.52;
  color: var(--ivory);
  word-break: break-word;
}

.ai-msg-para {
  margin: 0;
}

.ai-msg-spacer {
  height: 2px;
}

.ai-msg-bullet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ai-msg-bullet-dot {
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
}

.ai-msg-bullet-text {
  flex: 1;
}

.ai-typing-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--gold);
  animation: aiPulse 1.2s infinite ease-in-out;
}

.ai-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

.ai-typing-label {
  font-size: 12.5px;
  color: var(--stone);
  margin-left: 4px;
}

@keyframes aiPulse {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.85);
  }
  40% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.ai-cta-btn {
  margin-top: 4px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--gold);
  background: rgba(212, 175, 122, 0.1);
  color: var(--gold-bright);
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.ai-cta-btn:active {
  background: rgba(212, 175, 122, 0.22);
}

.ai-error-banner {
  margin: 0 14px 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(226, 109, 92, 0.16);
  border: 1px solid rgba(226, 109, 92, 0.45);
  color: #ffb8ad;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.ai-error-text {
  font-size: 12.5px;
  line-height: 1.4;
}

.ai-error-actions {
  display: flex;
  gap: 8px;
}

.ai-error-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 184, 173, 0.5);
  background: transparent;
  color: var(--ivory);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ai-error-retry {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg-deep);
}

.ai-composer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 10px 12px calc(10px + var(--safe-bottom));
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.ai-input {
  flex: 1;
  min-height: 44px;
  max-height: 112px;
  padding: 11px 15px;
  border-radius: 22px;
  border: 1px solid rgba(152, 144, 130, 0.45);
  background: var(--surface);
  color: var(--ivory);
  font-size: 15px;
  font-family: inherit;
  line-height: 1.35;
  resize: none;
  outline: none;
}

.ai-input:focus {
  border-color: var(--gold);
}

.ai-send-btn {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: none;
  background: var(--gold);
  color: var(--bg-deep);
  font-size: 17px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.ai-send-btn:disabled {
  background: var(--surface-elevated);
  color: var(--stone);
  cursor: not-allowed;
}


