/* ==========================================================================
   AGP — AI Assistant chat + consultation booking
   ========================================================================== */

/* --------------------------------------------------------------------------
   Sheet containers
   -------------------------------------------------------------------------- */
.ai-sheet,
.booking-sheet {
  overflow: hidden;
}

.ai-sheet .sheet__body,
.booking-sheet .sheet__body {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

@media (max-width: 860px) {
  .ai-sheet {
    bottom: var(--ai-keyboard, 0px);
    height: calc(100dvh - var(--safe-top) - 24px - var(--ai-keyboard, 0px));
    max-height: none;
  }
}

/* --------------------------------------------------------------------------
   Chat shell
   -------------------------------------------------------------------------- */
.ai-chat {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background: var(--card);
}

.ai-chat .ai-chat__header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.ai-chat--inline .ai-chat__header {
  padding-top: 16px;
}

.ai-chat__avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 16px 6px 16px 6px;
  background: var(--surface-gold);
  font-family: var(--font-mark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #2a1f12;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), var(--shadow-gold);
}

[data-theme="dark"] .ai-chat__avatar {
  color: var(--gold-200);
  box-shadow: inset 0 0 0 1px rgba(207, 165, 101, 0.35);
}

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

.ai-chat__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-chat__status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--muted);
}

.ai-chat__status .badge {
  padding: 2px 9px;
  font-size: 0.66rem;
}

.ai-chat__dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(47, 125, 87, 0.45);
  animation: ai-online 2.4s ease-out infinite;
}

@keyframes ai-online {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 125, 87, 0.45);
  }

  70%,
  100% {
    box-shadow: 0 0 0 7px rgba(47, 125, 87, 0);
  }
}

.ai-chat__lang {
  flex: none;
}

.ai-chat__lang button {
  min-width: 36px;
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.74rem;
}

.ai-chat__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--ink-soft);
  transition: transform var(--dur-fast) var(--ease-spring), background-color var(--dur-base) ease;
}

.ai-chat__icon:active {
  transform: scale(0.92);
}

.ai-chat__icon svg {
  width: 18px;
  height: 18px;
}

.ai-chat__close svg {
  width: 15px;
  height: 15px;
}

.ai-chat__menu {
  position: relative;
  flex: none;
}

.ai-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  right: 0;
  min-width: 232px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px 6px 18px 18px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--backdrop-blur);
  backdrop-filter: var(--backdrop-blur);
  box-shadow: var(--shadow-float);
  transform-origin: top right;
  animation: ai-pop var(--dur-base) var(--ease-spring);
}

.ai-menu[hidden] {
  display: none;
}

.ai-menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}

.ai-menu__item:hover,
.ai-menu__item:focus-visible {
  background: var(--bg-2);
}

.ai-menu__item svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

@keyframes ai-pop {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-4px);
  }
}

/* --------------------------------------------------------------------------
   Disclaimer ribbon
   -------------------------------------------------------------------------- */
.ai-disclaimer {
  flex: none;
  display: grid;
  grid-template-rows: auto 1fr;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--gold-100), var(--gold-50));
  transition: grid-template-rows var(--dur-base) var(--ease-ios);
}

[data-theme="dark"] .ai-disclaimer {
  background: linear-gradient(90deg, var(--card-tint), var(--bg-2));
}

.ai-disclaimer.is-collapsed {
  grid-template-rows: auto 0fr;
}

.ai-disclaimer__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-strong);
  text-align: left;
}

.ai-disclaimer__toggle svg {
  flex: none;
  width: 16px;
  height: 16px;
}

.ai-disclaimer__toggle span {
  flex: 1;
}

.ai-disclaimer__chevron {
  transform: rotate(180deg);
  transition: transform var(--dur-base) var(--ease-spring);
}

.is-collapsed .ai-disclaimer__chevron {
  transform: none;
}

.ai-disclaimer__body {
  overflow: hidden;
  min-height: 0;
}

.ai-disclaimer__body p {
  margin: 0;
  padding: 0 16px 12px 40px;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.ai-disclaimer__body a {
  font-weight: 700;
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Message log
   -------------------------------------------------------------------------- */
.ai-chat__log {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 18px 16px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at 100% 0%, rgba(207, 165, 101, 0.12), transparent 42%),
    var(--bg);
}

.ai-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: min(88%, 540px);
  min-width: 0;
}

.ai-msg--user {
  align-self: flex-end;
  align-items: flex-end;
  animation: ai-send 380ms var(--ease-spring);
}

.ai-msg--card,
.ai-msg:has(.ai-card) {
  width: 100%;
  max-width: min(100%, 440px);
}

.ai-msg.is-entering {
  animation: ai-arrive 460ms var(--ease-spring);
}

.ai-bubble {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 6px 22px 22px 22px;
  background: var(--card);
  box-shadow: 0 10px 24px -20px rgba(60, 40, 15, 0.5);
  font-size: 0.94rem;
  line-height: 1.62;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.ai-bubble strong {
  color: var(--ink);
}

.ai-bubble--user {
  border-color: transparent;
  border-radius: 22px 22px 6px 22px;
  background: var(--gold-gradient);
  color: #15120e;
  box-shadow: var(--shadow-gold);
}

.ai-bubble--offer {
  border-color: rgba(169, 122, 60, 0.35);
  background: var(--card-tint);
  color: var(--ink);
  font-weight: 600;
}

.ai-word {
  animation: ai-word 320ms var(--ease-out) both;
}

.ai-msg__reveal {
  display: grid;
  gap: 10px;
  width: 100%;
  animation: ai-arrive 420ms var(--ease-spring) both;
}

.ai-msg__reveal.is-pending,
.ai-bubble.is-pending {
  display: none;
}

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

.ai-msg__meta .badge {
  white-space: normal;
}

@keyframes ai-arrive {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

@keyframes ai-send {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
  }
}

@keyframes ai-word {
  from {
    opacity: 0;
    filter: blur(3px);
  }
}

/* Welcome */
.ai-welcome__hint {
  margin: 2px 4px 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.ai-welcome__chips {
  gap: 7px;
}

.ai-welcome__chips .chip {
  text-align: left;
  line-height: 1.3;
  padding-block: 7px;
}

/* Typing indicator */
.ai-typing {
  flex-direction: row;
  gap: 5px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 6px 22px 22px 22px;
  background: var(--card);
  animation: ai-arrive 320ms var(--ease-spring);
}

.ai-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-500);
  animation: ai-dot 1.1s var(--ease-spring) infinite;
}

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

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

@keyframes ai-dot {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0) scale(0.9);
  }

  30% {
    opacity: 1;
    transform: translateY(-5px) scale(1.1);
  }
}

/* Sources */
.ai-sources__label,
.ai-related__label {
  margin: 0 0 6px 2px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.ai-sources ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-source {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px 9px 9px;
  border: 1px solid var(--line);
  border-radius: 16px 5px 16px 5px;
  background: var(--card);
  text-align: left;
  transition: transform var(--dur-fast) var(--ease-spring), border-color var(--dur-base) ease;
}

.ai-sources li:nth-child(even) .ai-source {
  border-radius: 5px 16px 5px 16px;
}

.ai-source:hover {
  border-color: rgba(169, 122, 60, 0.45);
}

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

.ai-source__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--card-tint);
  color: var(--accent);
}

.ai-source__icon svg {
  width: 18px;
  height: 18px;
}

.ai-source__text {
  display: grid;
  min-width: 0;
  line-height: 1.35;
}

.ai-source__text strong {
  font-size: 0.82rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.ai-source__text small {
  font-size: 0.72rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.ai-source > svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

/* Follow-ups */
.ai-actions {
  gap: 7px;
}

.ai-related__list {
  display: grid;
  border-top: 1px solid var(--line);
}

.ai-related__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--accent-strong);
  text-align: left;
}

.ai-related__item svg {
  flex: none;
  width: 16px;
  height: 16px;
  transition: transform var(--dur-base) var(--ease-spring);
}

.ai-related__item:hover svg {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Cards inside the chat (gate, intake steps, summary, handoff, ticket)
   -------------------------------------------------------------------------- */
.ai-card {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px 8px 22px 8px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.ai-form {
  display: grid;
  gap: 14px;
}

.ai-form .input {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
}

.ai-form .select-trigger {
  min-height: 48px;
  border-radius: 14px;
}

.ai-form .switch-row {
  font-size: 0.78rem;
}

.ai-form__submit {
  justify-self: stretch;
}

.ai-segmented button {
  min-height: 40px;
  padding: 4px 8px;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: normal;
}

.ai-choice .chip,
.ai-form .chip {
  line-height: 1.3;
  padding-block: 7px;
}

.ai-gate__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 800;
}

.ai-gate__title svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.ai-gate__lead {
  margin: -6px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Summary */
.ai-summary__title {
  margin: 0 0 6px;
  font-size: 1.3rem;
}

.ai-summary__list {
  margin: 0 0 14px;
}

.ai-summary__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.ai-summary__row dt {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.ai-summary__row dd {
  grid-column: 1;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.ai-summary__edit {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.ai-summary__actions,
.ai-handoff__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-summary__actions .btn,
.ai-handoff__actions .btn {
  flex: 1 1 180px;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}

/* Handoff */
.ai-handoff {
  display: grid;
  gap: 14px;
  background: var(--night-gold-glow), var(--card);
}

.ai-handoff__head {
  display: flex;
  gap: 12px;
}

.ai-handoff__icon,
.ai-ticket__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 14px 5px 14px 5px;
  background: var(--night);
  color: var(--gold-300);
}

.ai-handoff__icon svg,
.ai-ticket__icon svg {
  width: 22px;
  height: 22px;
}

.ai-handoff__head h3,
.ai-ticket__head h3 {
  margin: 0 0 2px;
  font-size: 1.3rem;
}

.ai-handoff__head p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

.ai-person {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 16px;
  background: var(--bg-2);
  text-align: left;
  transition: transform var(--dur-fast) var(--ease-spring);
}

.ai-person:active {
  transform: scale(0.98);
}

.ai-person > svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--muted);
}

.ai-person__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-gold);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #2a1f12;
}

[data-theme="dark"] .ai-person__avatar {
  color: var(--gold-200);
}

.ai-person__text {
  display: grid;
  min-width: 0;
  line-height: 1.35;
}

.ai-person__text strong {
  font-size: 0.9rem;
  color: var(--ink);
}

.ai-person__text small {
  font-size: 0.74rem;
  color: var(--muted);
}

.ai-handoff__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.ai-handoff__status > span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ai-handoff__status svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.ai-handoff__summary,
.ai-ticket__details {
  display: grid;
  gap: 10px;
  margin: 0;
}

.ai-handoff__summary dt,
.ai-ticket__details dt {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.ai-handoff__summary dd,
.ai-ticket__details dd {
  margin: 2px 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.ai-ticket__details small {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

/* Compact ticket in chat */
.ai-ticket {
  display: grid;
  gap: 14px;
  border-top: 3px solid var(--gold-400);
}

.ai-ticket__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-ticket__eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--success);
}

.ai-ticket__details {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.ai-ticket__code {
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* Source detail sheet */
.ai-source-detail {
  display: grid;
  gap: 16px;
}

.ai-source-detail__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.ai-source-detail__meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-2);
}

.ai-source-detail__meta dt {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.ai-source-detail__meta dd {
  margin: 2px 0 0;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.ai-source-detail__quote {
  margin: 0;
  padding: 16px 18px;
  border-left: 2px solid var(--gold-500);
  border-radius: 0 18px 6px 0;
  background: var(--card-tint);
}

.ai-source-detail__quote figcaption {
  margin-bottom: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.ai-source-detail__quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}

.ai-source-detail__note,
.booking__note {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--warning-bg);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--warning-ink);
}

.ai-source-detail__note svg,
.booking__note svg {
  flex: none;
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   Composer
   -------------------------------------------------------------------------- */
.ai-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex: none;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: var(--backdrop-blur);
  backdrop-filter: var(--backdrop-blur);
}

.ai-chat--inline .ai-composer,
.ai-sheet.is-keyboard .ai-composer {
  padding-bottom: 12px;
}

.ai-composer__input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 140px;
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--bg-2);
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  resize: none;
  transition: border-color var(--dur-base) ease, box-shadow var(--dur-base) ease;
}

.ai-composer__input::placeholder {
  color: var(--muted);
}

.ai-composer__input:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(193, 145, 78, 0.16);
}

.ai-composer__mic,
.ai-composer__send {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  transition: transform var(--dur-fast) var(--ease-spring), opacity var(--dur-base) ease;
}

.ai-composer__mic {
  background: transparent;
  color: var(--muted);
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-composer__send {
  background: var(--gold-gradient);
  color: #15120e;
  box-shadow: var(--shadow-gold);
}

.ai-composer__send:active {
  transform: scale(0.9);
}

.ai-composer__send:disabled {
  opacity: 0.45;
  box-shadow: none;
}

.ai-composer svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   Booking
   ========================================================================== */
.booking {
  --booking-cut: var(--card);
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  background: var(--card);
}

.booking .booking__nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 8px 16px 12px;
  border-bottom: 0;
}

.booking-sheet .booking__nav {
  padding-top: 6px;
}

.booking__back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  justify-self: start;
  min-height: 40px;
  padding: 0 8px 0 0;
  border: 0;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.booking__back[hidden] {
  visibility: hidden;
  display: inline-flex;
}

.booking__back svg {
  width: 20px;
  height: 20px;
}

.booking__heading {
  text-align: center;
  min-width: 0;
}

.booking__step {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.booking__step:empty {
  display: none;
}

.booking__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0;
}

.booking__close,
.booking__spacer {
  justify-self: end;
}

.booking__progress {
  flex: none;
  height: 3px;
  margin: 0 16px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.booking__progress span {
  display: block;
  height: 100%;
  background: var(--gold-gradient);
  transform: scaleX(var(--booking-progress, 0.25));
  transform-origin: left;
  transition: transform var(--dur-sheet) var(--ease-ios);
}

.booking__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.booking--inline .booking__stage {
  overflow: hidden;
}

.booking__screen {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 20px;
  background: var(--card);
}

.booking__screen.is-leaving {
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  pointer-events: none;
}

.booking__screen.is-leaving--back {
  z-index: 2;
  box-shadow: -20px 0 40px -30px rgba(0, 0, 0, 0.4);
}

.booking__footer {
  flex: none;
  padding: 12px 20px calc(14px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--card);
}

.booking--inline .booking__footer {
  padding: 4px 24px 24px;
  border-top: 0;
}

.booking--inline .booking__screen {
  padding: 24px;
}

.booking__actions {
  display: grid;
  gap: 10px;
}

.booking__lead {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Type options */
.booking-options {
  display: grid;
  gap: 10px;
}

.booking-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 20px 6px 20px 6px;
  background: var(--card);
  text-align: left;
  transition: border-color var(--dur-base) ease, background-color var(--dur-base) ease, transform var(--dur-fast) var(--ease-spring);
}

.booking-option:nth-child(even) {
  border-radius: 6px 20px 6px 20px;
}

.booking-option:active {
  transform: scale(0.98);
}

.booking-option[aria-checked="true"] {
  border-color: var(--gold-500);
  background: var(--card-tint);
}

.booking-option__radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  transition: border-color var(--dur-base) ease, box-shadow var(--dur-base) var(--ease-spring), background-color var(--dur-base) ease;
}

[aria-checked="true"] > .booking-option__radio {
  border-color: var(--gold-500);
  background: var(--gold-500);
  box-shadow: inset 0 0 0 3px var(--card-tint);
}

.booking-option__main {
  display: grid;
  min-width: 0;
  line-height: 1.4;
}

.booking-option__main strong {
  font-size: 0.95rem;
  color: var(--ink);
}

.booking-option__main small {
  font-size: 0.76rem;
  color: var(--muted);
}

.booking-option__price {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  text-align: right;
}

.booking-option__price.is-free {
  color: var(--accent);
}

/* Calendar */
.calendar {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px 8px 24px 8px;
  background: var(--bg);
}

.calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.calendar__month {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  text-transform: capitalize;
}

.calendar__nav {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--accent-strong);
  transition: transform var(--dur-fast) var(--ease-spring), opacity var(--dur-base) ease;
}

.calendar__nav:active {
  transform: scale(0.9);
}

.calendar__nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.calendar__nav svg {
  width: 18px;
  height: 18px;
}

.calendar__weekdays,
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.calendar__weekdays span {
  padding: 4px 0 8px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
}

.calendar__viewport {
  overflow: hidden;
}

.calendar__day {
  position: relative;
  justify-self: center;
  width: min(44px, 100%);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  opacity: 0.45;
  transition: background-color var(--dur-base) ease, color var(--dur-base) ease, transform var(--dur-fast) var(--ease-spring);
}

.calendar__day.is-available {
  font-weight: 700;
  color: var(--ink);
  opacity: 1;
}

.calendar__day.is-available::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--gold-500);
}

.calendar__day.is-available:hover {
  background: var(--bg-2);
}

.calendar__day.is-available:active {
  transform: scale(0.9);
}

.calendar__day.is-today {
  box-shadow: inset 0 0 0 1px var(--gold-400);
}

.calendar__day[aria-pressed="true"] {
  background: var(--gold-gradient);
  color: #15120e;
  box-shadow: var(--shadow-gold);
}

.calendar__day[aria-pressed="true"]::after {
  background: #15120e;
}

.calendar__legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.calendar__legend span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-500);
}

/* Slots */
.slots {
  display: grid;
  gap: 10px;
}

.slots__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
}

.slots__zone {
  display: flex;
  gap: 8px;
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--muted);
}

.slots__zone svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.slots__empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  font-size: 0.84rem;
  text-align: center;
  color: var(--muted);
}

.slots__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}

.slot {
  display: grid;
  place-content: center;
  gap: 1px;
  min-height: 52px;
  padding: 6px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 14px 5px 14px 5px;
  background: var(--card);
  text-align: center;
  line-height: 1.2;
  transition: background-color var(--dur-base) ease, border-color var(--dur-base) ease, transform var(--dur-fast) var(--ease-spring);
}

.slot:active {
  transform: scale(0.95);
}

.slot span {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.slot small {
  font-size: 0.66rem;
  color: var(--muted);
}

.slot.is-full {
  border-style: dashed;
  background: transparent;
  opacity: 0.5;
  cursor: default;
}

.slot.is-full span {
  text-decoration: line-through;
}

.slot[aria-pressed="true"] {
  border-color: var(--night);
  background: var(--night);
}

.slot[aria-pressed="true"] span {
  color: var(--gold-200);
}

.slot[aria-pressed="true"] small {
  color: var(--gold-300);
}

[data-theme="dark"] .slot[aria-pressed="true"] {
  border-color: transparent;
  background: var(--gold-gradient);
}

[data-theme="dark"] .slot[aria-pressed="true"] span,
[data-theme="dark"] .slot[aria-pressed="true"] small {
  color: #15120e;
}

/* Details & review */
.booking-form {
  display: grid;
  gap: 14px;
}

.booking-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-2);
}

.booking-identity svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.booking-identity p {
  display: grid;
  min-width: 0;
  margin: 0;
  line-height: 1.4;
}

.booking-identity small {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.booking-identity strong {
  color: var(--ink);
}

.booking-identity span {
  font-size: 0.84rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.booking-review {
  margin: 0;
  padding: 4px 16px;
  border: 1px solid var(--line);
  border-radius: 20px 6px 20px 6px;
}

.booking-review div {
  display: grid;
  grid-template-columns: minmax(72px, 32%) minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.booking-review div:last-child {
  border-bottom: 0;
}

.booking-review dt {
  font-size: 0.8rem;
  color: var(--muted);
}

.booking-review dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  text-align: right;
  overflow-wrap: anywhere;
}

.booking-review small {
  display: block;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted);
}

/* Ticket — perforated stub with side notches */
.ticket {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--bg);
  box-shadow: var(--shadow-float);
  animation: ticket-in 620ms var(--ease-spring) both;
}

.ticket__top {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 20px;
  border-radius: 25px 25px 0 0;
  background: var(--surface-gold);
  color: var(--ink);
}

.ticket__top::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
}

.ticket__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.ticket__eyebrow svg {
  width: 15px;
  height: 15px;
}

.ticket__title {
  margin: 0 0 4px;
  font-size: 1.7rem;
  overflow-wrap: anywhere;
}

.ticket__type {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.ticket__tear {
  position: relative;
  height: 24px;
  margin: -12px 0;
  z-index: 1;
}

.ticket__tear::before,
.ticket__tear::after {
  content: "";
  position: absolute;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--booking-cut);
  box-shadow: inset 0 0 0 1px var(--line);
}

.ticket__tear::before {
  left: -13px;
  clip-path: inset(0 0 0 50%);
}

.ticket__tear::after {
  right: -13px;
  clip-path: inset(0 50% 0 0);
}

.ticket__details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 26px 22px 18px;
  border-top: 2px dashed var(--line-strong);
}

.ticket__details dt {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.ticket__details dd {
  margin: 3px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.ticket__details small {
  display: block;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--muted);
}

.ticket__details > div:last-child {
  grid-column: 1 / -1;
}

.ticket__link {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--accent-strong);
}

.ticket__link svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.ticket__stub {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 16px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
}

.ticket__stub > span:first-child {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.ticket__stub strong {
  grid-row: 2;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.ticket__barcode {
  grid-row: 1 / span 2;
  grid-column: 2;
  justify-self: end;
  width: min(140px, 100%);
  height: 38px;
  opacity: 0.75;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 9px, var(--ink) 9px 12px, transparent 12px 14px);
}

@keyframes ticket-in {
  from {
    opacity: 0;
    transform: translateY(28px) rotate(-1.5deg) scale(0.94);
  }
}

@media (max-width: 480px) {
  .booking-option {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .booking-option__price {
    grid-column: 2;
    text-align: left;
  }

  .ai-chat .ai-chat__header {
    gap: 6px;
    padding-inline: 12px;
  }

  .ai-chat__avatar {
    width: 38px;
    height: 38px;
    margin-right: 2px;
  }

  .ai-chat__title {
    font-size: 0.92rem;
  }

  .ai-chat__lang button {
    min-width: 32px;
    padding: 0 7px;
  }

  .ai-chat__icon {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 640px) {
  .booking--inline .booking__screen {
    padding: 20px 16px;
  }

  .booking--inline .booking__footer {
    padding: 4px 16px 20px;
  }
}

@media (max-width: 380px) {
  .ticket__details,
  .ai-ticket__details {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-chat__dot {
    animation: none;
  }
}
