/* CityBoard — smart search hero + AI session (reference glass style) */

:root {
  --cb-ai-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Stronger, centered photo overlay */
.cb-home-hero--agent.cb-home-hero--photo .cb-home-hero__backdrop {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.58) 0%, rgba(15, 23, 42, 0.22) 42%, rgba(15, 23, 42, 0.78) 100%),
    var(--cb-home-hero-photo) center / cover no-repeat;
}

.cb-home-hero--agent {
  align-items: stretch;
  justify-content: center;
  overflow: visible;
  min-height: clamp(560px, 62vh, 680px);
}

.cb-home-hero--agent .cb-home-hero__inner {
  justify-items: center;
  text-align: center;
  align-content: end;
  gap: clamp(22px, 3.5vw, 36px);
  position: relative;
  min-height: clamp(480px, 54vh, 580px);
  transition: gap 0.32s ease;
}

.cb-home-hero--agent .cb-home-hero__headline {
  max-width: 820px;
  width: 100%;
}

.cb-home-hero--agent .cb-home-hero__title-sub {
  max-width: 52ch;
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.9);
}

.cb-home-hero--agent:not(.cb-home-hero--photo) .cb-home-hero__title-sub {
  color: #475569;
}

.cb-home-hero--agent.cb-home-hero--photo .cb-home-hero__title-main {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.cb-home-hero--agent.cb-home-hero--photo .cb-home-hero__title-sub {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.cb-home-hero__search-panel--ai {
  width: min(920px, 100%);
  gap: 14px;
  margin-inline: auto;
}

/* ── Hero slot: crossfade idle ↔ session (no height jump) ─────── */
.cb-home-hero--agent.is-ai-active .cb-home-hero__headline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

.cb-home-hero--agent.is-ai-active {
  height: clamp(560px, 62vh, 680px);
  min-height: clamp(560px, 62vh, 680px);
  max-height: clamp(560px, 62vh, 680px);
  overflow: hidden;
}

.cb-home-hero--agent.is-ai-active .cb-home-hero__inner {
  align-content: stretch;
  justify-items: stretch;
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cb-home-hero--agent.is-ai-active .cb-home-hero__search-panel--ai {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.cb-city-ai-root {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: clamp(340px, 38vh, 420px);
}

.cb-home-hero--agent.is-ai-active .cb-city-ai-root {
  min-height: 0;
  height: 100%;
  max-height: 100%;
}

.cb-city-ai-idle {
  display: grid;
  gap: 14px;
  transition: opacity 0.34s ease, visibility 0.34s ease;
}

.cb-home-hero--agent.is-ai-active .cb-city-ai-idle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.cb-city-ai-session[hidden] {
  display: none !important;
}

/* Glass chat panel — reference style */
.cb-city-ai-session {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(30, 41, 82, 0.82) 0%, rgba(15, 23, 42, 0.88) 48%, rgba(30, 27, 75, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(1.35);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  transition: opacity 0.38s var(--cb-ai-ease), visibility 0.38s;
}

.cb-home-hero--agent.is-ai-active .cb-city-ai-session {
  position: absolute;
  inset: 0;
  height: 100%;
  max-height: 100%;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

html.cb-city-ai-active {
  overflow: hidden;
}

@media (min-width: 768px) {
  html.cb-city-ai-active {
    overflow: auto;
  }
}

.cb-city-ai-session__back {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  appearance: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.cb-city-ai-session__back:hover {
  background: rgba(255, 255, 255, 0.14);
}

.cb-city-ai-session__back svg {
  width: 20px;
  height: 20px;
}

.cb-city-ai-session__intro {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 24px 10px;
  text-align: center;
  transition: padding 0.28s ease, flex-direction 0.28s ease;
}

.cb-city-ai-session.has-thread .cb-city-ai-session__intro {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 10px 56px 6px 20px;
  text-align: left;
}

.cb-city-ai-session__intro-text {
  min-width: 0;
}

.cb-city-ai-session__orb-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  flex-shrink: 0;
  transition: width 0.28s ease, height 0.28s ease, margin 0.28s ease;
}

.cb-city-ai-session.has-thread .cb-city-ai-session__orb-wrap {
  width: 44px;
  height: 44px;
  margin: 0;
}

.cb-city-ai-session__orb-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.55) 0%, transparent 70%);
  animation: cb-ai-glow 2.8s ease-in-out infinite;
}

@keyframes cb-ai-glow {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.cb-city-ai-session__orb-img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.cb-city-ai-session__title {
  margin: 0 0 4px;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.cb-city-ai-session.has-thread .cb-city-ai-session__title {
  margin: 0;
  font-size: 1rem;
}

.cb-city-ai-session__subtitle {
  margin: 0 auto;
  max-width: 42ch;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

.cb-city-ai-session.has-thread .cb-city-ai-session__subtitle {
  display: none;
}

.cb-city-ai-session__thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 20px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.cb-city-ai-session__thread::-webkit-scrollbar {
  width: 6px;
}

.cb-city-ai-session__thread::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

.cb-city-ai-session__thread::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
}

.cb-city-ai-session__thread::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.36);
}

.cb-city-ai-session.has-thread .cb-city-ai-session__thread {
  padding-top: 0;
}

.cb-city-ai-session__thinking {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 10px;
  flex-shrink: 0;
}

.cb-city-ai-session__thinking[hidden] {
  display: none !important;
}

.cb-city-ai-session__thinking-bar {
  width: 48px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, #6366f1, #06b6d4, #6366f1);
  background-size: 200% 100%;
  animation: cb-ai-bar 1.4s linear infinite;
}

@keyframes cb-ai-bar {
  to { background-position: 200% 0; }
}

.cb-city-ai-session__thinking-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

.cb-city-ai-session__error {
  margin: 0;
  padding: 8px 20px;
  font-size: 0.8125rem;
  color: #fecaca;
  flex-shrink: 0;
}

.cb-city-ai-session__submit-request {
  display: none !important;
}

.cb-city-ai-session__error[hidden] {
  display: none !important;
}

.cb-city-ai-session__composer {
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 12, 28, 0.45);
  flex-shrink: 0;
}

.cb-city-ai-session__composer-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 4px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

main .cb-city-ai-session .cb-city-ai-session__composer-input {
  flex: 1;
  min-width: 0;
  min-height: 44px !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  font: inherit;
  font-size: 0.9375rem;
  color: #fff !important;
  outline: none !important;
  box-shadow: none !important;
}

main .cb-city-ai-session .cb-city-ai-session__composer-input::placeholder {
  color: rgba(255, 255, 255, 0.55) !important;
}

.cb-city-ai-session__composer-send {
  appearance: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.cb-city-ai-session__composer-send svg {
  width: 18px;
  height: 18px;
}

.cb-city-ai-session__composer-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* Premium pill search bar (idle state) */
.cb-home-hero__search--ai .cb-home-hero__search-bar {
  padding: 7px 7px 7px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.97);
  box-shadow:
    0 22px 48px rgba(15, 23, 42, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset;
}

.cb-home-hero:not(.cb-home-hero--photo) .cb-home-hero__search--ai .cb-home-hero__search-bar {
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: var(--cb-home-shadow);
}

.cb-home-hero__search--ai .cb-home-hero__search-input {
  padding-left: 10px;
}

.cb-home-hero__search--ai input {
  min-height: 54px;
  font-size: 18px;
}

.cb-home-hero__search-icon--ai {
  width: 22px;
  height: 22px;
  background-size: 22px 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232563eb' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456z'/%3E%3C/svg%3E");
}

.cb-home-hero__search-btn--ai {
  flex-direction: row;
  gap: 8px;
  min-width: 132px;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 16px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.42);
}

.cb-home-hero__search-btn--ai .cb-home-hero__search-btn-text {
  font-size: 16px;
}

.cb-home-hero__search-btn--ai::before {
  content: "";
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23fff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-4.35-4.35M11 18a7 7 0 100-14 7 7 0 000 14z'/%3E%3C/svg%3E");
}

/* Scenario chips — glass on photo, light on gradient */
.cb-city-ai-scenarios__loading {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.62);
}

.cb-city-ai-scenarios__chip--skeleton {
  display: inline-block;
  width: 7.5rem;
  height: 38px;
  border-radius: 999px;
  border: none;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0.14) 100%
  );
  background-size: 200% 100%;
  animation: cb-city-ai-scenarios-skeleton 1.2s ease-in-out infinite;
}

.cb-home-hero--agent:not(.cb-home-hero--photo) .cb-city-ai-scenarios__chip--skeleton {
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.06) 0%,
    rgba(15, 23, 42, 0.12) 50%,
    rgba(15, 23, 42, 0.06) 100%
  );
  background-size: 200% 100%;
}

@keyframes cb-city-ai-scenarios-skeleton {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.cb-city-ai-scenarios[hidden] {
  display: none !important;
}

.cb-city-ai-scenarios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.cb-city-ai-scenarios__chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.cb-city-ai-scenarios__chip-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  flex-shrink: 0;
}

.cb-city-ai-scenarios__chip-icon svg {
  width: 14px;
  height: 14px;
  color: #fff;
}

.cb-city-ai-scenarios__chip-icon--gas { background: linear-gradient(145deg, #8b5cf6, #6366f1); }
.cb-city-ai-scenarios__chip-icon--master { background: linear-gradient(145deg, #f59e0b, #f97316); }
.cb-city-ai-scenarios__chip-icon--real_estate { background: linear-gradient(145deg, #3b82f6, #2563eb); }
.cb-city-ai-scenarios__chip-icon--job { background: linear-gradient(145deg, #14b8a6, #0d9488); }
.cb-city-ai-scenarios__chip-icon--transport { background: linear-gradient(145deg, #06b6d4, #0891b2); }
.cb-city-ai-scenarios__chip-icon--land { background: linear-gradient(145deg, #22c55e, #16a34a); }
.cb-city-ai-scenarios__chip-icon--service { background: linear-gradient(145deg, #6366f1, #4f46e5); }

.cb-home-hero--agent.cb-home-hero--photo .cb-city-ai-scenarios__chip {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cb-home-hero--agent.cb-home-hero--photo .cb-city-ai-scenarios__chip:hover,
.cb-home-hero--agent.cb-home-hero--photo .cb-city-ai-scenarios__chip:focus-visible {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.24);
  outline: none;
  transform: translateY(-1px);
}

.cb-home-hero--agent:not(.cb-home-hero--photo) .cb-city-ai-scenarios__chip {
  border: 1px solid #dbeafe;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.cb-home-hero--agent:not(.cb-home-hero--photo) .cb-city-ai-scenarios__chip:hover,
.cb-home-hero--agent:not(.cb-home-hero--photo) .cb-city-ai-scenarios__chip:focus-visible {
  border-color: #2563eb;
  background: #eff6ff;
  outline: none;
}

/* ── Chat messages (dark glass theme) ──────────────────────────── */
.cb-city-ai-chat__msg {
  display: flex;
  gap: 8px;
  max-width: 100%;
  animation: cb-city-ai-msg-in 0.32s var(--cb-ai-ease) both;
  animation-delay: var(--cb-ai-stagger, 0ms);
}

@keyframes cb-city-ai-msg-in {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.cb-city-ai-chat__msg-label {
  display: none;
}

.cb-city-ai-chat__msg--user {
  justify-content: flex-end;
}

.cb-city-ai-chat__msg--user .cb-city-ai-chat__avatar {
  display: none;
}

.cb-city-ai-chat__msg--user .cb-city-ai-chat__bubble {
  max-width: min(78%, 420px);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  padding: 10px 14px;
}

.cb-city-ai-chat__avatar {
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.cb-city-ai-chat__avatar--ai {
  background: linear-gradient(145deg, #6366f1, #2563eb);
  color: #fff;
}

.cb-city-ai-chat__avatar--user {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

.cb-ai-icon {
  width: 14px;
  height: 14px;
  display: block;
}

.cb-city-ai-chat__avatar--ai .cb-ai-icon {
  width: 15px;
  height: 15px;
}

.cb-city-ai-chat__quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.cb-city-ai-chat__quick-action {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cb-city-ai-chat__quick-action:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.cb-city-ai-chat__quick-action-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  flex-shrink: 0;
}

.cb-city-ai-chat__quick-action-icon svg {
  width: 13px;
  height: 13px;
  color: #fff;
}

.cb-city-ai-chat__quick-action-icon--master { background: linear-gradient(145deg, #f59e0b, #f97316); }
.cb-city-ai-chat__quick-action-icon--service { background: linear-gradient(145deg, #6366f1, #4f46e5); }
.cb-city-ai-chat__quick-action-icon--request { background: linear-gradient(145deg, #22c55e, #16a34a); }
.cb-city-ai-chat__quick-action-icon--compare { background: linear-gradient(145deg, #06b6d4, #0891b2); }
.cb-city-ai-chat__quick-action-icon--unknown { background: linear-gradient(145deg, #64748b, #475569); }

.cb-city-ai-chat__msg--user .cb-city-ai-chat__text {
  color: #fff;
}

.cb-city-ai-chat__msg--agent {
  align-items: stretch;
}

.cb-city-ai-chat__msg--agent .cb-city-ai-chat__avatar {
  display: none;
}

.cb-city-ai-chat__msg--agent .cb-city-ai-chat__bubble {
  max-width: 100%;
  width: 100%;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.cb-city-ai-chat__msg--agent:not(.cb-city-ai-chat__msg--welcome):not(.cb-city-ai-chat__msg--has-results) .cb-city-ai-chat__bubble {
  max-width: min(92%, 640px);
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px 18px 18px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cb-city-ai-chat__msg--welcome .cb-city-ai-chat__bubble,
.cb-city-ai-chat__msg--has-results .cb-city-ai-chat__bubble {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.cb-city-ai-chat__msg--success .cb-city-ai-chat__bubble {
  max-width: min(92%, 640px);
  padding: 12px 14px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.28);
  border-radius: 14px;
}

.cb-city-ai-chat__bubble {
  padding: 10px 13px;
  font-size: 0.9375rem;
  line-height: 1.45;
  word-break: break-word;
}

.cb-city-ai-chat__text {
  margin: 0;
  white-space: pre-line;
}

.cb-city-ai-chat__inline-link {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.cb-city-ai-chat__inline-link:hover {
  color: #bfdbfe;
}

.cb-city-ai-chat__ai-badge {
  display: none;
}

.cb-city-ai-chat__dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 18px;
}

.cb-city-ai-chat__dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  animation: cb-city-ai-dot 1.2s infinite ease-in-out;
}

.cb-city-ai-chat__dots i:nth-child(2) { animation-delay: 0.15s; }
.cb-city-ai-chat__dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes cb-city-ai-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.cb-city-ai-chat__question {
  margin-top: 10px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.cb-city-ai-chat__question-label {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}

.cb-city-ai-chat__options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cb-city-ai-chat__option {
  appearance: none;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.cb-city-ai-chat__option:disabled {
  opacity: 0.45;
  cursor: default;
}

.cb-city-ai-chat__option:hover,
.cb-city-ai-chat__option:focus-visible {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.cb-city-ai-chat__option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

main .cb-city-ai-session .cb-city-ai-chat__option-input {
  flex: 1;
  min-width: 0;
  width: auto;
  min-height: 40px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #0f172a !important;
  font: inherit;
  font-size: 0.875rem;
  outline: none !important;
  box-shadow: none !important;
}

main .cb-city-ai-session .cb-city-ai-chat__option-input::placeholder {
  color: #64748b !important;
}

main .cb-city-ai-session .cb-city-ai-chat__option-input:focus {
  border-color: #93c5fd !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
}

.cb-city-ai-chat__option-send {
  appearance: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.cb-city-ai-chat__option-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cb-city-ai-chat__option-send svg {
  width: 16px;
  height: 16px;
}

.cb-city-ai-chat__results {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.cb-city-ai-chat__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.cb-city-ai-chat__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

main .cb-city-ai-session a.cb-city-ai-chat__action,
main .cb-city-ai-session a.cb-city-ai-chat__action:visited {
  color: #fff !important;
}

.cb-city-ai-chat__action:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff !important;
}

.cb-city-ai-chat__action--primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: transparent;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
  font-weight: 700;
}

.cb-city-ai-chat__action--primary:hover {
  filter: brightness(1.05);
  color: #fff !important;
}

.cb-city-ai-chat__action.is-disabled,
.cb-city-ai-chat__action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  filter: none;
  box-shadow: none;
}

/* Result cards — reference horizontal carousel */
.cb-city-ai-result__select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.cb-city-ai-result__select input {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
}

.cb-city-ai-chat__master-submit {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.cb-city-ai-chat__master-submit[hidden] {
  display: none !important;
}

.cb-city-ai-chat__master-submit-hint {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
}

.cb-city-ai-result__reason,
.cb-city-ai-result__geo {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.68);
}

.cb-city-ai-result {
  flex: 0 0 168px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 148px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.cb-city-ai-result:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
}

.cb-city-ai-result.is-selected {
  display: none;
}

.cb-city-ai-result__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
}

.cb-city-ai-result__icon svg {
  width: 22px;
  height: 22px;
}

.cb-city-ai-result--purple .cb-city-ai-result__icon { background: linear-gradient(145deg, #8b5cf6, #6366f1); }
.cb-city-ai-result--blue .cb-city-ai-result__icon { background: linear-gradient(145deg, #3b82f6, #2563eb); }
.cb-city-ai-result--teal .cb-city-ai-result__icon { background: linear-gradient(145deg, #14b8a6, #0d9488); }
.cb-city-ai-result--orange .cb-city-ai-result__icon { background: linear-gradient(145deg, #f59e0b, #f97316); }

.cb-city-ai-result__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.cb-city-ai-result__subtitle {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.72);
}

.cb-city-ai-result__photo {
  width: 100%;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.cb-city-ai-result__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cb-city-ai-chain {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.cb-city-ai-chain__stage {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cb-city-ai-chain__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.cb-city-ai-chain__order {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #6366f1, #4f46e5);
}

.cb-city-ai-chain__titles {
  min-width: 0;
}

.cb-city-ai-chain__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
}

.cb-city-ai-chain__stage--turnkey {
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(99, 102, 241, 0.12);
}

.cb-city-ai-chain__stage--turnkey .cb-city-ai-chain__order {
  background: linear-gradient(145deg, #22c55e, #16a34a);
}

.cb-city-ai-chain__subtitle {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.82);
}

.cb-city-ai-chain__meta {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
}

.cb-city-ai-chain__results {
  margin-top: 0;
}

.cb-city-ai-chain__empty {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
}

.cb-city-ai-result__reason {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #c4b5fd;
}

.cb-city-ai-result__geo {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.78);
}

.cb-city-ai-result__meta {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.65);
}

.cb-city-ai-result__meta li span {
  color: rgba(255, 255, 255, 0.45);
}

.cb-city-ai-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.cb-city-ai-result__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
}

.cb-city-ai-result__btn--ghost {
  background: transparent;
}

.cb-city-ai-result__btn--accent {
  background: rgba(99, 102, 241, 0.35);
  border-color: rgba(129, 140, 248, 0.55);
}

.cb-city-ai-result__btn--call {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(74, 222, 128, 0.45);
  color: #ecfdf5;
}

.cb-city-ai-result__price {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.cb-city-ai-result__footer {
  margin: auto 0 0;
  padding-top: 6px;
  font-size: 0.6875rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.55);
}

.cb-city-ai-result__badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.cb-city-ai-result__link {
  margin-top: auto;
  padding-top: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #93c5fd;
  text-decoration: none;
}

.cb-city-ai-result__link:hover {
  color: #bfdbfe;
}

/* Mobile: fullscreen between header & tabbar */
@media (max-width: 767px) {
  .cb-home-hero--agent,
  .cb-home-hero--agent.is-ai-active {
    min-height: 0;
  }

  .cb-home-hero--agent.is-ai-active {
    position: fixed;
    top: calc(var(--cb-m-header-h, 52px) + env(safe-area-inset-top, 0px));
    right: 0;
    bottom: calc(var(--cb-m-tabbar-h, 56px) + env(safe-area-inset-bottom, 0px));
    left: 0;
    z-index: 1050;
    margin: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    border-radius: 0;
    border: 0;
  }

  .cb-home-hero--agent.is-ai-active .cb-home-hero__backdrop {
    display: none;
  }

  .cb-home-hero--agent.is-ai-active .cb-home-hero__inner {
    padding: 0;
    min-height: 0;
    height: 100%;
  }

  .cb-home-hero--agent.is-ai-active .cb-home-hero__search-panel--ai,
  .cb-home-hero--agent.is-ai-active .cb-city-ai-root {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
  }

  .cb-home-hero--agent.is-ai-active .cb-city-ai-session {
    border-radius: 0;
    height: 100%;
  }

  .cb-city-ai-session__composer {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .cb-home-hero__search--ai .cb-home-hero__search-bar {
    grid-template-columns: 1fr;
    border-radius: 20px;
    padding: 10px;
    gap: 8px;
  }

  .cb-home-hero__search-btn--ai {
    width: 100%;
    justify-content: center;
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cb-home-hero--agent,
  .cb-city-ai-idle,
  .cb-city-ai-session,
  .cb-city-ai-session__intro,
  .cb-city-ai-chat__msg,
  .cb-city-ai-session__orb-glow,
  .cb-city-ai-session__thinking-bar {
    transition: none !important;
    animation: none !important;
  }
}
