:root {
  --elia-primary: var(--color-primary, #194185);
  --elia-primary-dark: #153670;
  --elia-primary-tint: #f2f6fc;
  --elia-gold: var(--color-gold, #bf9b3a);
  --elia-ink: var(--color-text, #181d27);
  --elia-muted: var(--color-muted, #535862);
  --elia-soft: var(--color-bg, #f5fbff);
  --elia-border: #dfe5ee;
  --elia-safe-bottom: env(safe-area-inset-bottom, 0px);
  --elia-safe-right: env(safe-area-inset-right, 0px);
}

.elia, .elia * { box-sizing: border-box; }
.elia button, .elia textarea { font: inherit; }
.elia__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;
}

.elia__scrim {
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: rgba(12, 26, 51, .34);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}

.elia__panel {
  position: fixed;
  z-index: 1200;
  top: 0;
  right: 0;
  width: min(430px, 100vw);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--elia-soft);
  box-shadow: -16px 0 48px rgba(25, 65, 133, .2);
  transform: translateX(105%);
  visibility: hidden;
  transition: transform .34s cubic-bezier(.22, .8, .3, 1), visibility .34s;
  font-family: 'Poppins', sans-serif;
  padding-bottom: var(--elia-safe-bottom);
}

.elia--open .elia__panel { transform: translateX(0); visibility: visible; }
.elia--open .elia__scrim { opacity: 1; visibility: visible; }
.elia--open .elia__launcher,
.elia--open .elia__invite { opacity: 0; pointer-events: none; }

.elia__header {
  position: relative;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(191, 155, 58, .18) 0%, transparent 42%),
    linear-gradient(160deg, #1a4a96 0%, var(--elia-primary) 55%, #123366 100%);
  border-bottom: 3px solid var(--elia-gold);
  flex: 0 0 auto;
}

.elia__header::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image: radial-gradient(circle at 1px 1px, #fff 1.2px, transparent 0);
  background-size: 14px 14px;
  pointer-events: none;
}

.elia__brand, .elia__header-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.elia__brand { gap: 11px; min-width: 0; }
.elia__brand > div { display: grid; gap: 2px; min-width: 0; }
.elia__brand strong { font-size: 18px; line-height: 1.25; letter-spacing: .01em; }
.elia__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  opacity: .94;
  white-space: nowrap;
}
.elia__status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64dc8b;
  box-shadow: 0 0 0 2px rgba(255,255,255,.22);
  animation: elia-status-pulse 2.4s ease-in-out infinite;
}

.elia__avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--elia-border);
}
.elia__avatar img { width: 88%; height: 88%; object-fit: contain; }
.elia__avatar--header {
  width: 52px;
  height: 52px;
  border: 3px solid rgba(255,255,255,.75);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
}
.elia__avatar--welcome {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 2px solid #c9d7ec;
  box-shadow: 0 8px 20px rgba(25, 65, 133, .1);
}

.elia__header-actions { gap: 5px; }
.elia__new-chat, .elia__icon-button {
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
}
.elia__new-chat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}
.elia__icon-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 18px;
}
.elia__new-chat:hover,
.elia__icon-button:hover { background: rgba(255,255,255,.16); }
.elia__new-chat:focus-visible,
.elia__icon-button:focus-visible,
.elia__quick-actions button:focus-visible,
.elia__composer button:focus-visible,
.elia__jump-latest:focus-visible,
.elia__launcher:focus-visible,
.elia__invite button:focus-visible,
.elia__rating-actions button:focus-visible,
.elia__skip:focus-visible {
  outline: 2px solid var(--elia-gold);
  outline-offset: 2px;
}

.elia__notice {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  color: var(--elia-muted);
  background: #fdf8ec;
  border-bottom: 1px solid #ece0c4;
  font-size: 10px;
  text-align: center;
  flex: 0 0 auto;
}
.elia__notice i { color: var(--elia-gold); }

.elia__conversation-shell {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.elia__conversation {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 18px 28px;
  scrollbar-width: thin;
  scrollbar-color: #b9c5d8 transparent;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(25, 65, 133, .05), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(191, 155, 58, .06), transparent 50%),
    var(--elia-soft);
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}
.elia__conversation::-webkit-scrollbar { width: 6px; }
.elia__conversation::-webkit-scrollbar-thumb {
  background: #b9c5d8;
  border-radius: 999px;
}

.elia__date {
  margin: 0 auto 18px;
  width: fit-content;
  padding: 5px 12px;
  color: var(--elia-muted);
  background: rgba(228, 236, 247, .92);
  border: 1px solid #d5e0ef;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  backdrop-filter: blur(4px);
  position: sticky;
  top: 0;
  z-index: 2;
}

.elia__welcome {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 16px;
  padding: 18px 16px;
  border: 1px solid #d5e0ef;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #fff 0%, #f7fafd 100%);
  box-shadow: 0 8px 24px rgba(25, 65, 133, .06);
  animation: elia-message-in .35s ease both;
}
.elia__welcome-copy h2 {
  margin: 0 0 6px;
  color: var(--elia-primary);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}
.elia__welcome-copy p {
  margin: 0;
  color: var(--elia-muted);
  font-size: 12px;
  line-height: 1.55;
}

.elia__message {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0 0 14px;
  animation: elia-message-in .28s cubic-bezier(.22, .8, .3, 1) both;
}
.elia__message--user { justify-content: flex-end; }
.elia__message--stacked { margin-top: -6px; }
.elia__message--stacked .elia__avatar { visibility: hidden; }
.elia__message-body { max-width: min(78%, 320px); min-width: 0; }
.elia__bubble {
  padding: 11px 13px;
  border-radius: 7px 18px 18px 18px;
  color: var(--elia-ink);
  background: #fff;
  border: 1px solid var(--elia-border);
  box-shadow: 0 2px 10px rgba(10, 13, 18, .05);
  font-size: 12.5px;
  line-height: 1.55;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.elia__message--user .elia__bubble {
  color: #fff;
  background: linear-gradient(160deg, #1f4f9a 0%, var(--elia-primary) 100%);
  border-color: var(--elia-primary);
  border-radius: 18px 7px 18px 18px;
  box-shadow: 0 4px 14px rgba(25, 65, 133, .2);
}
.elia__bubble p { margin: 0; }
.elia__bubble p + p { margin-top: 8px; }
.elia__bubble ul, .elia__bubble ol {
  margin: 6px 0 0;
  padding-left: 1.15em;
}
.elia__bubble li + li { margin-top: 4px; }
.elia__message time {
  display: block;
  margin-top: 5px;
  color: #8b909a;
  font-size: 9px;
  letter-spacing: .01em;
}
.elia__message--user time { text-align: right; }
.elia__bubble a {
  color: var(--elia-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.elia__message--user .elia__bubble a { color: #fff; }

.elia__checkout-action {
  margin-top: 10px !important;
}

.elia__checkout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--elia-primary);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(191, 155, 58, 0.28);
}

.elia__checkout-btn:hover {
  filter: brightness(1.05);
}

.elia__schedule-modal-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--elia-primary);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.elia__schedule-modal-link:hover {
  color: var(--elia-primary-dark);
}

.elia__schedule-modal {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: end center;
  padding: 16px;
}

.elia__schedule-modal[hidden] {
  display: none !important;
}

.elia__schedule-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 26, 51, .42);
  backdrop-filter: blur(2px);
}

.elia__schedule-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  max-height: min(72vh, 520px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--elia-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(25, 65, 133, .24);
  animation: elia-message-in .24s ease both;
}

.elia__schedule-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--elia-border);
  background: linear-gradient(180deg, #fff 0%, #f7fafd 100%);
}

.elia__schedule-modal-header h3 {
  margin: 0;
  color: var(--elia-primary);
  font-size: 16px;
  font-weight: 700;
}

.elia__schedule-modal-meta {
  margin: 4px 0 0;
  color: var(--elia-muted);
  font-size: 11px;
  line-height: 1.4;
}

.elia__schedule-modal-close {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  color: var(--elia-muted);
  background: #eef3fa;
  cursor: pointer;
}

.elia__schedule-modal-close:hover {
  color: var(--elia-ink);
  background: #e4ebf6;
}

.elia__schedule-modal-list {
  list-style: none;
  margin: 0;
  padding: 12px;
  display: grid;
  gap: 8px;
  overflow-y: auto;
}

.elia__schedule-modal-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(191, 155, 58, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--elia-ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.elia__schedule-modal-item:hover {
  background: rgba(191, 155, 58, 0.1);
  border-color: rgba(191, 155, 58, 0.5);
  transform: translateY(-1px);
}

.elia__schedule-modal-time {
  min-width: 64px;
  color: var(--elia-primary);
  font-size: 13px;
  font-weight: 700;
}

.elia__schedule-modal-details {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.elia__schedule-modal-route {
  color: var(--elia-ink);
  font-size: 12px;
  font-weight: 600;
}

.elia__schedule-modal-bus {
  color: var(--elia-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.elia__schedule-modal-fare {
  color: var(--elia-primary);
  font-size: 12px;
  font-weight: 700;
}

.elia__seats-modal-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--elia-primary);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.elia__seats-modal-link:hover {
  color: var(--elia-primary-dark);
}

.elia__seats-modal {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 8px;
}

.elia__seats-modal[hidden] {
  display: none !important;
}

.elia__seats-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 26, 51, .42);
  backdrop-filter: blur(2px);
}

.elia__seats-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  max-height: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--elia-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(25, 65, 133, .24);
  animation: elia-message-in .24s ease both;
}

.elia__seats-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px 4px;
  border-bottom: 1px solid var(--elia-border);
  background: linear-gradient(180deg, #fff 0%, #f7fafd 100%);
  flex: 0 0 auto;
}

.elia__seats-modal-header h3 {
  margin: 0;
  color: var(--elia-primary);
  font-size: 13px;
  font-weight: 700;
}

.elia__seats-modal-meta {
  margin: 1px 0 0;
  color: var(--elia-muted);
  font-size: 10px;
  line-height: 1.25;
}

.elia__seats-modal-close {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  color: var(--elia-muted);
  background: #eef3fa;
  cursor: pointer;
}

.elia__seats-modal-close:hover {
  color: var(--elia-ink);
  background: #e4ebf6;
}

.elia__seats-modal-body {
  min-height: 0;
  flex: 1 1 auto;
  padding: 4px 6px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.elia__seats-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  color: var(--elia-muted);
  font-size: 9px;
  font-weight: 600;
  flex: 0 0 auto;
  line-height: 1.2;
}

.elia__seats-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.elia__seat-swatch {
  width: 11px;
  height: 12px;
  display: inline-block;
  border: 0;
  border-radius: 3px 3px 2px 2px;
  position: relative;
  color: transparent;
  vertical-align: middle;
  box-shadow:
    -2px 3px 0 -1px currentColor,
    2px 3px 0 -1px currentColor;
}

.elia__seat-swatch::after {
  content: '';
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 0;
  height: 3px;
  border-radius: 0 0 2px 2px;
  background: rgba(255, 255, 255, .25);
}

.elia__seat-swatch--priority {
  background: #c9a227;
  color: #c9a227;
}

.elia__seat-swatch--available {
  background: #2f3542;
  color: #2f3542;
}

.elia__seat-swatch--selected {
  background: var(--elia-primary);
  color: var(--elia-primary);
}

.elia__seat-swatch--taken {
  background: #d5dbe6;
  color: #d5dbe6;
}

.elia__bus-deck {
  border: 1px solid var(--elia-border);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
  padding: 4px 6px 6px;
  min-height: 0;
  flex: 0 1 auto;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.elia__bus-front {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  padding: 0 2px 3px;
  border-bottom: 1px dashed #c9d4e4;
  flex: 0 0 auto;
  width: min(100%, 236px);
}

.elia__bus-driver {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #dfe7f3;
  color: var(--elia-primary);
  font-size: 8px;
  font-weight: 800;
}

.elia__bus-front-label {
  color: var(--elia-muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
}

.elia__seats-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  flex: 0 0 auto;
  width: min(100%, 236px);
}

.elia__seat-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  width: 100%;
}

.elia__seat-row--back {
  gap: 4px;
}

.elia__seat-aisle,
.elia__seat-spacer {
  width: 18px;
  min-width: 18px;
  flex: 0 0 18px;
  height: 1px;
}

.elia__seat {
  --elia-seat-fill: #2f3542;
  --elia-seat-arm: #3d4554;
  --elia-seat-cushion: rgba(255, 255, 255, .16);
  --elia-seat-size: 40px;
  box-sizing: border-box;
  flex: 0 0 var(--elia-seat-size);
  width: var(--elia-seat-size);
  height: calc(var(--elia-seat-size) * 1.12);
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  position: relative;
  display: inline-grid;
  place-items: center;
}

.elia__seat-icon {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

.elia__seat-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.elia__seat-svg-body {
  fill: var(--elia-seat-fill);
}

.elia__seat-svg-arm {
  fill: var(--elia-seat-arm);
}

.elia__seat-svg-cushion {
  fill: var(--elia-seat-cushion);
}

.elia__seat-number {
  position: relative;
  z-index: 1;
  transform: translateY(-1px);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}

.elia__seat:hover:not(:disabled) {
  filter: brightness(1.08);
}

.elia__seat:focus-visible {
  outline: 2px solid #9ec0ff;
  outline-offset: 1px;
  border-radius: 6px;
}

.elia__seat--priority {
  --elia-seat-fill: #c9a227;
  --elia-seat-arm: #a8861a;
  --elia-seat-cushion: rgba(255, 255, 255, .22);
}

.elia__seat--selected {
  --elia-seat-fill: var(--elia-primary);
  --elia-seat-arm: #163a7a;
  --elia-seat-cushion: rgba(255, 255, 255, .2);
}

.elia__seat--selected::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid #9ec0ff;
  border-radius: 8px;
  pointer-events: none;
}

.elia__seat--taken,
.elia__seat:disabled {
  --elia-seat-fill: #d5dbe6;
  --elia-seat-arm: #c0c8d6;
  --elia-seat-cushion: rgba(255, 255, 255, .35);
  color: #8a97ab;
  cursor: not-allowed;
  filter: none;
}

.elia__seats-footer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 8px;
  padding-top: 0;
}

.elia__seats-selected {
  margin: 0;
  color: var(--elia-ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.elia__seats-error {
  margin: 0;
  grid-column: 1 / -1;
  color: #b42318;
  font-size: 11px;
}

.elia__seats-error[hidden] {
  display: none !important;
}

.elia__seats-submit {
  width: auto;
  min-width: 118px;
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--elia-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  justify-self: end;
}

.elia__seats-submit:hover {
  background: var(--elia-primary-dark);
}

.elia__details-modal-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--elia-primary);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.elia__details-modal-link:hover {
  color: var(--elia-primary-dark);
}

.elia__confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}

.elia__confirm-btn {
  flex: 1 1 110px;
  min-width: 96px;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
}

.elia__confirm-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.elia__confirm-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.elia__confirm-btn--yes {
  background: var(--elia-primary);
  color: #fff;
}

.elia__confirm-btn--yes:hover:not(:disabled) {
  background: var(--elia-primary-dark);
}

.elia__confirm-btn--no {
  background: #eef2f7;
  color: #5b6b82;
  border: 1px solid #c9d4e4;
}

.elia__confirm-btn--no:hover:not(:disabled) {
  background: #e4ebf6;
  color: var(--elia-ink);
}

.elia__details-modal {
  position: absolute;
  inset: 0;
  z-index: 11;
  display: grid;
  place-items: end center;
  padding: 16px;
}

.elia__details-modal[hidden] {
  display: none !important;
}

.elia__details-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 26, 51, .42);
  backdrop-filter: blur(2px);
}

.elia__details-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  max-height: min(78vh, 560px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--elia-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(25, 65, 133, .24);
  animation: elia-message-in .24s ease both;
}

.elia__details-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--elia-border);
  background: linear-gradient(180deg, #fff 0%, #f7fafd 100%);
}

.elia__details-modal-header h3 {
  margin: 0;
  color: var(--elia-primary);
  font-size: 16px;
  font-weight: 700;
}

.elia__details-modal-meta {
  margin: 4px 0 0;
  color: var(--elia-muted);
  font-size: 11px;
  line-height: 1.4;
}

.elia__details-modal-close {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  color: var(--elia-muted);
  background: #eef3fa;
  cursor: pointer;
}

.elia__details-modal-close:hover {
  color: var(--elia-ink);
  background: #e4ebf6;
}

.elia__details-form {
  overflow-y: auto;
  padding: 14px 16px 16px;
  display: grid;
  gap: 14px;
}

.elia__details-section h4 {
  margin: 0 0 10px;
  color: var(--elia-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.elia__details-field {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

.elia__details-field span {
  color: var(--elia-muted);
  font-size: 11px;
  font-weight: 600;
}

.elia__details-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d5d7da;
  border-radius: 10px;
  color: var(--elia-ink);
  background: #fff;
  font: inherit;
  font-size: 13px;
}

.elia__details-field input:focus {
  outline: 0;
  border-color: var(--elia-primary);
  box-shadow: 0 0 0 3px rgba(25, 65, 133, .12);
}

.elia__details-passenger {
  padding: 12px;
  border: 1px solid rgba(191, 155, 58, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
}

.elia__details-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #d5d7da;
  border-radius: 12px;
  background: #fff;
}

.elia__details-count-label {
  color: var(--elia-ink);
  font-size: 12px;
  font-weight: 600;
}

.elia__details-count-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.elia__details-count-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #d5d7da;
  border-radius: 999px;
  background: #f7f8fa;
  color: var(--elia-ink);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.elia__details-count-btn:hover {
  border-color: var(--elia-primary);
  color: var(--elia-primary);
}

.elia__details-count-value {
  min-width: 1.5em;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--elia-ink);
}

.elia__details-passenger + .elia__details-passenger {
  margin-top: 8px;
}

.elia__details-passenger-title {
  margin: 0 0 8px;
  color: var(--elia-ink);
  font-size: 12px;
  font-weight: 700;
}

.elia__details-passenger-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.elia__details-passenger-grid .elia__details-field {
  margin-bottom: 0;
}

.elia__details-error {
  margin: 0;
  color: #b42318;
  font-size: 11px;
  font-weight: 600;
}

.elia__details-submit {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--elia-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(25, 65, 133, .18);
}

.elia__details-submit:hover {
  background: var(--elia-primary-dark);
}

.elia__schedule-list-wrap {
  margin: 0 0 16px 42px;
  animation: elia-message-in .28s ease both;
}

.elia__schedule-list-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #667085;
}

.elia__schedule-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.elia__schedule-item,
.elia__schedule-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(191, 155, 58, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--elia-primary);
  text-align: left;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.elia__schedule-link {
  display: inline-flex;
  width: auto;
  margin-top: 4px;
}

.elia__schedule-item:hover,
.elia__schedule-link:hover {
  background: rgba(191, 155, 58, 0.1);
  border-color: rgba(191, 155, 58, 0.5);
  transform: translateY(-1px);
}

.elia__schedule-item-label {
  flex: 1 1 auto;
}

.elia__schedule-item-meta,
.elia__schedule-item-fare {
  flex: 0 0 auto;
  font-size: 12px;
  color: #667085;
}

.elia__schedule-item-fare {
  font-weight: 700;
  color: var(--elia-primary);
}

.elia__quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -2px 0 16px 42px;
  animation: elia-message-in .28s ease both;
}
.elia__quick-actions--welcome {
  margin: 0 0 8px;
  display: grid;
  gap: 8px;
}
.elia__quick-actions button {
  padding: 8px 11px;
  border: 1px solid #b5c6e0;
  border-radius: 999px;
  color: var(--elia-primary);
  background: #fff;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.elia__quick-actions button:hover {
  transform: translateY(-1px);
  background: var(--elia-primary-tint);
  border-color: var(--elia-gold);
  box-shadow: 0 4px 12px rgba(25, 65, 133, .08);
}
.elia__quick-actions--welcome button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  text-align: left;
  background: #fff;
  border: 1px solid #d0dceb;
  box-shadow: 0 2px 8px rgba(25, 65, 133, .04);
}
.elia__chip-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--elia-primary-tint);
  font-size: 16px;
}
.elia__chip-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.elia__chip-text strong {
  font-size: 12px;
  font-weight: 650;
  color: var(--elia-ink);
  font-style: normal;
}
.elia__chip-text em {
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
  color: var(--elia-muted);
}

.elia__jump-latest {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 3;
  transform: translateX(-50%) translateY(8px);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid #c5d3e8;
  border-radius: 999px;
  color: var(--elia-primary);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 22px rgba(25, 65, 133, .16);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.elia__jump-latest:not([hidden]) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.elia__jump-latest i { font-size: 11px; }

.elia__typing .elia__message-body {
  max-width: none;
  overflow: visible;
}
.elia__typing .elia__bubble {
  position: relative;
  display: block;
  width: max-content;
  max-width: min(240px, calc(100vw - 140px));
  padding: 12px 16px;
  overflow: visible;
  margin-right: 58px;
}

/* Rocket waiting scene */
.elia-wait {
  --elia-wait-cycle: 2.5s;
  min-height: 20px;
}
.elia-wait__text {
  display: block;
  white-space: nowrap;
  color: var(--elia-ink);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
  clip-path: inset(0 100% 0 0);
  animation: elia-wait-reveal var(--elia-wait-cycle) cubic-bezier(.33, .05, .2, 1) infinite;
}
.elia-wait__rocket {
  position: absolute;
  top: 50%;
  left: 0;
  width: 86px;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 3px 5px rgba(25, 65, 133, .22));
  transform: translate(-58%, -52%) rotate(-18deg);
  animation: elia-wait-fly var(--elia-wait-cycle) cubic-bezier(.33, .05, .2, 1) infinite;
  will-change: left, transform, opacity;
}

.elia--waiting .elia__quick-actions {
  opacity: .4;
  pointer-events: none;
}

.elia__typing-dots::after { content: ""; animation: elia-dots 1.2s steps(4, end) infinite; }

@keyframes elia-wait-fly {
  0% {
    left: 0;
    opacity: 0;
    transform: translate(-58%, -52%) rotate(-18deg);
  }
  4% {
    left: 0;
    opacity: 1;
    transform: translate(-58%, -52%) rotate(-18deg);
  }
  68% {
    left: 100%;
    opacity: 1;
    transform: translate(-18%, -52%) rotate(-18deg);
  }
  82% {
    left: 100%;
    opacity: 1;
    transform: translate(-12%, -52%) rotate(-18deg);
  }
  90% {
    left: 100%;
    opacity: 0;
    transform: translate(-12%, -52%) rotate(-18deg);
  }
  91%, 100% {
    left: 0;
    opacity: 0;
    transform: translate(-58%, -52%) rotate(-18deg);
  }
}

@keyframes elia-wait-reveal {
  0%, 3% { clip-path: inset(0 100% 0 0); }
  68%, 90% { clip-path: inset(0 0 0 0); }
  91%, 100% { clip-path: inset(0 100% 0 0); }
}

/* Bus sketch loader */
.elia-bus {
  --elia-bus-cycle: 3.6s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.elia-bus__art {
  width: 132px;
  height: auto;
  overflow: visible;
}
.elia-bus--page {
  --elia-bus-cycle: 1s;
}
.elia-bus--page .elia-bus__art {
  width: min(220px, 64vw);
}
.elia-bus--page .elia-bus__line {
  animation-timing-function: cubic-bezier(.33, .12, .2, 1);
}
/* Page loader: finish the bus early, then hold — readable in ~0.5s */
.elia-bus--page .elia-bus__line--roof { animation-name: elia-bus-page-roof; }
.elia-bus--page .elia-bus__line--front { animation-name: elia-bus-page-front; }
.elia-bus--page .elia-bus__line--body { animation-name: elia-bus-page-body; }
.elia-bus--page .elia-bus__line--window { animation-name: elia-bus-page-window; }
.elia-bus--page .elia-bus__line--door { animation-name: elia-bus-page-door; }
.elia-bus--page .elia-bus__line--wheel { animation-name: elia-bus-page-wheel; }
.elia-bus--page .elia-bus__line--detail { animation-name: elia-bus-page-detail; }
.elia-bus--page .elia-bus__road {
  animation: elia-bus-road-shift 1s linear infinite,
             elia-bus-page-road-fade var(--elia-bus-cycle) ease-out infinite;
}
.elia-bus__line {
  fill: none;
  stroke: var(--elia-primary);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation-duration: var(--elia-bus-cycle);
  animation-timing-function: cubic-bezier(.45, .05, .25, 1);
  animation-iteration-count: infinite;
}
.elia-bus__line--glass { stroke: #6a8bc0; stroke-width: 2; }
.elia-bus__line--accent { stroke: var(--elia-gold); stroke-width: 2.2; }

.elia-bus__line--roof { animation-name: elia-bus-roof; }
.elia-bus__line--front { animation-name: elia-bus-front; }
.elia-bus__line--body { animation-name: elia-bus-body; }
.elia-bus__line--window { animation-name: elia-bus-window; }
.elia-bus__line--door { animation-name: elia-bus-door; }
.elia-bus__line--wheel { animation-name: elia-bus-wheel; }
.elia-bus__line--detail { animation-name: elia-bus-detail; }

.elia-bus__road {
  fill: none;
  stroke: #c3cede;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 9 13;
  animation: elia-bus-road-shift 1.1s linear infinite,
             elia-bus-road-fade var(--elia-bus-cycle) ease-in-out infinite;
}
.elia-bus__label {
  margin: 0;
  color: var(--elia-muted);
  font-size: 11px;
  font-weight: 500;
}

.elia__booking-card {
  margin-top: 9px;
  padding: 10px;
  border: 1px solid var(--elia-border);
  border-left: 3px solid var(--elia-gold);
  border-radius: 12px;
  background: var(--elia-primary-tint);
}
.elia__booking-card strong { display: block; margin-bottom: 4px; color: var(--elia-primary); font-size: 11px; }
.elia__booking-card span { display: block; color: var(--elia-muted); font-size: 10px; }
.elia__booking-card a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  text-decoration: none;
}

.elia__composer-wrap {
  padding: 12px 16px calc(10px + var(--elia-safe-bottom) / 2);
  background: linear-gradient(180deg, rgba(245, 251, 255, 0) 0%, #fff 18%);
  border-top: 1px solid var(--elia-border);
  flex: 0 0 auto;
}
.elia__composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 8px 8px 14px;
  border: 1px solid #d5d7da;
  border-radius: 18px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.elia__composer:focus-within {
  border-color: var(--elia-primary);
  box-shadow: 0 0 0 3px rgba(25, 65, 133, .12);
}
.elia__composer textarea {
  flex: 1;
  max-height: 112px;
  padding: 7px 0;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--elia-ink);
  background: transparent;
  font-size: 13px;
  line-height: 1.45;
}
.elia__composer textarea::placeholder { color: #9ba1ab; }
.elia__composer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: 0 0 auto;
}
.elia__char-count {
  font-size: 9px;
  font-weight: 600;
  color: #9ba1ab;
  letter-spacing: .02em;
}
.elia__char-count--warn { color: #b45309; }
.elia__char-count--limit { color: #b42318; }
.elia__composer button[type="submit"] {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--elia-primary);
  cursor: pointer;
  transition: transform .18s, opacity .18s, background .18s, box-shadow .18s;
}
.elia__composer button[type="submit"]:hover:not(:disabled) {
  transform: scale(1.05);
  background: var(--elia-primary-dark);
  box-shadow: 0 4px 12px rgba(25, 65, 133, .25);
}
.elia__composer button[type="submit"]:disabled { opacity: .32; cursor: default; }
.elia__composer-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
  margin: 8px 0 0;
  color: #9ba1ab;
  font-size: 9px;
  text-align: center;
  line-height: 1.35;
}
.elia__composer-note span:first-child {
  opacity: .85;
}

.elia__launcher {
  position: fixed;
  right: calc(28px + var(--elia-safe-right));
  bottom: calc(26px + var(--elia-safe-bottom));
  z-index: 1180;
  width: 70px;
  height: 70px;
  padding: 8px;
  border: 3px solid var(--elia-gold);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(25, 65, 133, .28);
  cursor: pointer;
  transition: transform .2s ease, opacity .2s, box-shadow .2s;
  animation: elia-launcher-in .5s .2s ease both;
}
.elia__launcher:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(25, 65, 133, .32);
}
.elia__launcher:active { transform: translateY(-1px) scale(.97); }
.elia__launcher img { width: 100%; height: 100%; object-fit: contain; }
.elia__launcher-status {
  position: absolute;
  right: -1px;
  bottom: 2px;
  width: 15px;
  height: 15px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #34c66b;
}
.elia__launcher-ping {
  position: absolute;
  inset: -6px;
  border-radius: 30px;
  border: 2px solid rgba(191, 155, 58, .55);
  animation: elia-launcher-ping 2.8s ease-out infinite;
  pointer-events: none;
}
.elia--invite-dismissed .elia__launcher-ping { display: none; }

.elia__invite {
  position: fixed;
  right: calc(28px + var(--elia-safe-right));
  bottom: calc(108px + var(--elia-safe-bottom));
  z-index: 1170;
  max-width: 280px;
  opacity: 0;
  transform: translateY(8px);
  animation: elia-invite-in .4s 1.15s ease forwards;
  transition: opacity .2s;
}
.elia__invite button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 34px 12px 12px;
  border: 0;
  border-radius: 16px 16px 4px 16px;
  color: var(--elia-ink);
  background: #fff;
  border-bottom: 2px solid var(--elia-gold);
  box-shadow: 0 10px 28px rgba(25, 65, 133, .2);
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.elia__invite button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(25, 65, 133, .24);
}
.elia__invite-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--elia-primary-tint);
  border: 1px solid #d5e0ef;
}
.elia__invite-avatar img { width: 86%; height: 86%; object-fit: contain; }
.elia__invite-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.elia__invite-copy strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--elia-primary);
}
.elia__invite-copy span {
  color: var(--elia-muted);
  font-size: 11px;
}
.elia__invite i {
  position: absolute;
  top: 10px;
  right: 11px;
  color: var(--elia-muted);
  font-size: 11px;
  padding: 2px;
  border-radius: 4px;
}
.elia__invite i:hover { color: var(--elia-ink); background: #f0f3f8; }
.elia__invite--hidden { display: none; }

.elia__rating {
  padding: 6px 2px 2px;
  text-align: center;
}
.elia__rating p {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--elia-ink);
}
.elia__rating-actions { display: flex; justify-content: center; gap: 8px; }
.elia__rating-actions button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--elia-border);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  transition: transform .15s ease, border-color .15s, background .15s, box-shadow .15s;
}
.elia__rating-actions button:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: var(--elia-primary);
  background: var(--elia-primary-tint);
  box-shadow: 0 4px 12px rgba(25, 65, 133, .1);
}
.elia__skip {
  display: block;
  margin: 10px auto 0;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  color: #777;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.elia__skip:hover { color: var(--elia-ink); background: #f0f3f8; }

.elia__error-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.elia__retry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid #b5c6e0;
  border-radius: 999px;
  color: var(--elia-primary);
  background: #fff;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}
.elia__retry:hover {
  background: var(--elia-primary-tint);
  border-color: var(--elia-gold);
}

@keyframes elia-message-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes elia-status-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255,255,255,.22); }
  50% { box-shadow: 0 0 0 4px rgba(100, 220, 139, .28); }
}
@keyframes elia-launcher-ping {
  0% { transform: scale(.92); opacity: .7; }
  70%, 100% { transform: scale(1.18); opacity: 0; }
}
/* Each part shares one cycle length, so the sketch order repeats identically.
   The dash reset happens between 97% and 100%, while every part is faded out. */
@keyframes elia-bus-roof {
  0% { stroke-dashoffset: 1; opacity: 1; }
  12%, 90% { stroke-dashoffset: 0; opacity: 1; }
  97%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes elia-bus-front {
  0%, 10% { stroke-dashoffset: 1; opacity: 1; }
  24%, 90% { stroke-dashoffset: 0; opacity: 1; }
  97%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes elia-bus-body {
  0%, 22% { stroke-dashoffset: 1; opacity: 1; }
  40%, 90% { stroke-dashoffset: 0; opacity: 1; }
  97%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes elia-bus-window {
  0%, 38% { stroke-dashoffset: 1; opacity: 1; }
  52%, 90% { stroke-dashoffset: 0; opacity: 1; }
  97%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes elia-bus-door {
  0%, 50% { stroke-dashoffset: 1; opacity: 1; }
  62%, 90% { stroke-dashoffset: 0; opacity: 1; }
  97%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes elia-bus-wheel {
  0%, 60% { stroke-dashoffset: 1; opacity: 1; }
  74%, 90% { stroke-dashoffset: 0; opacity: 1; }
  97%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes elia-bus-detail {
  0%, 72% { stroke-dashoffset: 1; opacity: 1; }
  82%, 90% { stroke-dashoffset: 0; opacity: 1; }
  97%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes elia-bus-road-shift {
  to { stroke-dashoffset: -22; }
}
@keyframes elia-bus-road-fade {
  0%, 66% { opacity: 0; }
  78%, 90% { opacity: 1; }
  97%, 100% { opacity: 0; }
}
@keyframes elia-bus-page-roof {
  0% { stroke-dashoffset: 1; opacity: 1; }
  16%, 100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes elia-bus-page-front {
  0%, 6% { stroke-dashoffset: 1; opacity: 1; }
  22%, 100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes elia-bus-page-body {
  0%, 12% { stroke-dashoffset: 1; opacity: 1; }
  30%, 100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes elia-bus-page-window {
  0%, 18% { stroke-dashoffset: 1; opacity: 1; }
  36%, 100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes elia-bus-page-door {
  0%, 24% { stroke-dashoffset: 1; opacity: 1; }
  42%, 100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes elia-bus-page-wheel {
  0%, 30% { stroke-dashoffset: 1; opacity: 1; }
  48%, 100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes elia-bus-page-detail {
  0%, 36% { stroke-dashoffset: 1; opacity: 1; }
  52%, 100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes elia-bus-page-road-fade {
  0%, 40% { opacity: 0; }
  55%, 100% { opacity: 1; }
}
@keyframes elia-dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}
@keyframes elia-launcher-in {
  from { opacity: 0; transform: scale(.7); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes elia-invite-in {
  to { opacity: 1; transform: translateY(0); }
}

html.page-loading,
html.page-loading body {
  overflow: hidden;
  height: 100%;
}
html.page-loading .elia {
  visibility: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--color-bg, #f5fbff);
  opacity: 1;
  visibility: visible;
  transition: opacity .4s cubic-bezier(.22, 1, .36, 1),
              visibility .4s cubic-bezier(.22, 1, .36, 1);
}
.page-loader .elia-bus {
  gap: 12px;
  will-change: opacity, transform;
  transition: opacity .36s cubic-bezier(.22, 1, .36, 1),
              transform .4s cubic-bezier(.22, 1, .36, 1);
}
.page-loader--done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.page-loader--done .elia-bus {
  opacity: 0;
  transform: translateY(-6px) scale(.97);
}
.page-loader .elia-bus__label {
  font-size: 14px;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .elia__panel { width: 100vw; }
  .elia__scrim { display: none; }
  .elia__header { min-height: 78px; padding: 11px 14px; }
  .elia__avatar--header { width: 48px; height: 48px; }
  .elia__new-chat span { display: none; }
  .elia__conversation { padding: 16px 14px 24px; }
  .elia__welcome { padding: 16px 14px; }
  .elia__welcome-copy h2 { font-size: 16px; }
  .elia__composer-note span:first-child { display: none; }
  .elia__launcher {
    right: calc(18px + var(--elia-safe-right));
    bottom: calc(22px + var(--elia-safe-bottom));
    width: 56px;
    height: 56px;
    border-radius: 20px;
  }
  .elia__invite { display: none; }
  .elia__launcher-ping { display: none; }
}

@media (max-width: 600px) {
  .elia__launcher {
    right: calc(18px + var(--elia-safe-right));
    bottom: calc(18px + var(--elia-safe-bottom));
    width: 56px;
    height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .elia *, .elia *::before, .elia *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  /* Show the finished sketch instead of a collapsed animation frame. */
  .elia-bus__line, .elia-bus__road {
    animation: none !important;
    stroke-dashoffset: 0;
    opacity: 1;
  }
  .elia-bus__road { stroke-dasharray: 9 13; }

  .elia-wait__text {
    animation: none !important;
    clip-path: none;
  }
  .elia-wait__rocket {
    animation: none !important;
    left: 100%;
    opacity: 1;
    transform: translate(-12%, -52%) rotate(-18deg);
  }

  .elia__launcher-ping,
  .elia__status i { animation: none !important; }
}
