/* Armenia AI — unified design system */
:root {
  --wine: #6e1b2d;
  --wine-deep: #4a1120;
  --wine-soft: #f3e3e3;
  --apricot: #e39a5b;
  --apricot-soft: #fbe8d6;
  --ink: #17151a;
  --charcoal: #211d22;
  --charcoal-2: #2c272d;
  --ivory: #f7f2ea;
  --ivory-2: #efe7dc;
  --paper: #fffcf7;
  --text: #1d1a1e;
  --muted: #776f6a;
  --line: rgba(29, 26, 30, 0.09);
  --line-dark: rgba(255, 255, 255, 0.1);
  --on-dark: #f6efe6;
  --on-dark-muted: rgba(246, 239, 230, 0.62);
  --ok: #3f7a55;
  --warn: #b5642a;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: #0e0c0f;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}
/* Icon defaults; Leaflet draws route lines in its own full-size SVG, which must keep its size. */
svg:where(:not(.leaflet-overlay-pane svg)) {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
dl,
dd {
  margin: 0;
}
ol,
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- shell ---------- */
.app-shell {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--ivory);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 40px 120px rgba(0, 0, 0, 0.5);
}
main {
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
}
.screen {
  display: none;
  animation: fadeIn 0.32s var(--ease);
}
.screen.active {
  display: block;
}
.screen-dark {
  background: var(--charcoal);
  color: var(--on-dark);
  min-height: calc(100dvh - var(--nav-h));
}
.screen-pad {
  padding: 20px 20px 32px;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- type ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.eyebrow.on-dark {
  color: var(--on-dark-muted);
}
.eyebrow.apricot {
  color: var(--apricot);
  text-transform: none;
  letter-spacing: 0;
}
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.display-sm {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.06;
  letter-spacing: -0.005em;
}
.lede {
  color: var(--muted);
  margin-top: 8px;
  font-size: 15px;
}
.muted {
  color: var(--muted);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--wine);
  white-space: nowrap;
}
.text-link svg {
  width: 15px;
  height: 15px;
}
.screen-dark .text-link,
.map-sheet .text-link {
  color: var(--apricot);
}

/* ---------- buttons ---------- */
.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  transition:
    transform 0.15s var(--ease),
    background 0.2s;
}
.btn-primary {
  background: var(--wine);
  color: var(--on-dark);
}
.btn-primary:active,
.btn-secondary:active,
.btn-ghost:active {
  transform: scale(0.98);
}
.btn-primary.block {
  width: 100%;
}
.btn-secondary {
  background: var(--ink);
  color: var(--on-dark);
}
.btn-secondary.sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}
.btn-ghost {
  border: 1px solid var(--line-dark);
  color: var(--on-dark);
}
.btn-ghost.dark {
  border-color: var(--line);
  color: var(--text);
}
.glass-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(23, 21, 26, 0.4);
  backdrop-filter: blur(12px);
  color: var(--on-dark);
  border: 1px solid var(--line-dark);
}
.glass-icon.light {
  background: rgba(255, 252, 247, 0.92);
  color: var(--text);
  border-color: var(--line);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* ---------- chips ---------- */
.chip-scroll,
.seg-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chip-scroll::-webkit-scrollbar,
.seg-scroll::-webkit-scrollbar {
  display: none;
}
.ai-chip {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid var(--line-dark);
  color: var(--on-dark);
  background: rgba(255, 255, 255, 0.04);
}
.ai-chip.is-alert {
  border-color: rgba(227, 154, 91, 0.6);
  color: var(--apricot);
}
.ai-chip.light {
  border-color: var(--line);
  color: var(--text);
  background: var(--paper);
}
.ai-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--apricot);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.ai-label svg {
  width: 14px;
  height: 14px;
}
.ai-label.dark {
  color: var(--wine);
}
.seg-chip {
  flex-shrink: 0;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--muted);
}
.seg-chip.active {
  background: var(--ink);
  color: var(--on-dark);
}

/* ---------- status ---------- */
.status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.status-booked {
  background: rgba(63, 122, 85, 0.14);
  color: var(--ok);
}
.status-not {
  background: var(--ivory-2);
  color: var(--muted);
}
.status-flexible {
  background: rgba(110, 27, 45, 0.07);
  color: var(--wine);
}
.status-needs {
  background: var(--apricot-soft);
  color: var(--warn);
}

/* ==========================================================================
   TODAY
   ========================================================================== */
.today-hero {
  position: relative;
  min-height: 470px;
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.today-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: slowZoom 18s ease-out both;
}
@keyframes slowZoom {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1);
  }
}
.today-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(23, 21, 26, 0.55) 0%,
    rgba(23, 21, 26, 0.05) 30%,
    rgba(33, 29, 34, 0.55) 62%,
    var(--charcoal) 100%
  );
}
.today-top,
.today-head,
.next-card {
  position: relative;
}
.today-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-mark {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-mark em {
  font-style: normal;
  color: var(--apricot);
  margin-left: 2px;
}
.today-head {
  margin-top: auto;
  padding-top: 140px;
}
.today-head .display {
  margin-top: 8px;
}
.today-region {
  color: var(--on-dark-muted);
  margin-top: 8px;
  font-size: 14px;
}
.next-card {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: rgba(255, 252, 247, 0.1);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line-dark);
}
.next-label {
  grid-column: 1;
  font-size: 12px;
  color: var(--apricot);
  font-weight: 500;
}
.next-name {
  grid-column: 1;
  font-size: 18px;
  font-weight: 500;
  margin-top: 2px;
}
.next-meta {
  grid-column: 1;
  font-size: 13px;
  color: var(--on-dark-muted);
  margin-top: 2px;
}
.next-go {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--on-dark);
  color: var(--ink);
}

.today-panel {
  padding: 6px 20px 24px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 18px 0 14px;
}
.panel-head h2 {
  font-size: 17px;
  font-weight: 500;
}
.panel-head.light h2 {
  color: var(--text);
}

.route-rail {
  position: relative;
}
.rail-node {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.rail-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--charcoal-2);
  border: 1px solid var(--line-dark);
  color: var(--on-dark);
}
.is-origin .rail-dot {
  width: 12px;
  height: 12px;
  margin: 0 8px;
  background: var(--on-dark);
  border: 0;
  box-shadow: 0 0 0 4px rgba(246, 239, 230, 0.15);
}
.rail-node.is-next .rail-dot {
  background: var(--wine);
  border-color: var(--wine);
  box-shadow: 0 0 0 5px rgba(110, 27, 45, 0.35);
}
.rail-node strong {
  display: block;
  font-weight: 500;
  font-size: 15px;
}
.rail-node small {
  color: var(--on-dark-muted);
  font-size: 13px;
}
.rail-body {
  width: 100%;
  padding: 4px 0;
}
.rail-leg {
  position: relative;
  height: 34px;
  margin-left: 13px;
  border-left: 2px solid rgba(227, 154, 91, 0.5);
}
.rail-leg span {
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--on-dark-muted);
}

.attention-list {
  margin-top: 20px;
  display: grid;
  gap: 8px;
}
.attention-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--charcoal-2);
}
.attention-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(227, 154, 91, 0.14);
  color: var(--apricot);
}
.attention-row strong {
  display: block;
  font-weight: 500;
  font-size: 14px;
}
.attention-row small {
  display: block;
  color: var(--on-dark-muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-strip {
  margin-top: 22px;
}

.explore {
  background: var(--ivory);
  color: var(--text);
  padding: 4px 0 24px;
  border-radius: 22px 22px 0 0;
}
.explore .panel-head,
.explore .seg-scroll {
  padding: 0 20px;
}
.explore-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 14px 20px 4px;
  scroll-padding-inline: 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.explore-row::-webkit-scrollbar {
  display: none;
}
.explore-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
}
.explore-card img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  border-radius: var(--r-md);
}
.explore-copy {
  display: block;
  padding: 10px 2px 0;
}
.explore-copy small {
  color: var(--wine);
  font-size: 12px;
  font-weight: 500;
}
.explore-copy strong {
  display: block;
  font-weight: 500;
  font-size: 15px;
  margin-top: 2px;
}
.explore-copy span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}

/* ==========================================================================
   PLANNER / SHARED SCREEN HEADS
   ========================================================================== */
.screen-head {
  padding: 8px 0 18px;
}
.screen-head .display-sm {
  margin-top: 8px;
}
.head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.plan-form {
  display: grid;
  gap: 22px;
}
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 10px;
}
.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.date-input {
  min-height: 46px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--paper);
  font: inherit;
  color: var(--text);
  width: 100%;
  min-width: 0;
}
.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--r-md);
  padding: 0 4px;
}
.stepper button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 18px;
  border-radius: 10px;
}
.stepper span {
  min-width: 60px;
  text-align: center;
  font-size: 14px;
}
.stepper strong {
  font-weight: 600;
}
.segmented {
  display: flex;
  padding: 3px;
  background: var(--ivory-2);
  border-radius: 12px;
}
.segmented button {
  flex: 1;
  min-height: 40px;
  border-radius: 10px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  transition:
    background 0.2s,
    color 0.2s;
}
.segmented button.active {
  background: var(--paper);
  color: var(--text);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pick {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 14px;
  transition: all 0.2s;
}
.pick.active {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--on-dark);
}
.more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--wine);
  font-weight: 500;
  font-size: 14px;
}
.more-toggle svg {
  transform: rotate(90deg);
  transition: transform 0.2s;
}
.more-toggle[aria-expanded="true"] svg {
  transform: rotate(-90deg);
}
.sticky-cta {
  position: sticky;
  bottom: calc(var(--nav-h) + var(--safe-b) + 10px);
  margin-top: 28px;
  z-index: 5;
}
.sticky-cta .btn-primary {
  box-shadow: 0 12px 30px rgba(110, 27, 45, 0.35);
  min-height: 52px;
}

.building {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 12px;
  padding: 0 12px;
}
.building-route {
  width: 200px;
  height: 120px;
  margin: 0 auto 10px;
  stroke: var(--wine);
  stroke-width: 2.5;
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
  animation: draw 1s var(--ease) forwards;
}
.building .eyebrow {
  justify-content: center;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.stat-row span {
  font-size: 12px;
  color: var(--muted);
}
.stat-row strong {
  display: block;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
}
.modifier-row {
  margin: 4px 0 20px;
}

/* ---------- day chapters ---------- */
.chapters {
  position: relative;
}
.chapter {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
}
.chapter-rail {
  position: relative;
  display: flex;
  justify-content: center;
}
.chapter-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(110, 27, 45, 0.18);
}
.chapter:first-child .chapter-rail::before {
  top: 18px;
}
.chapter:last-child .chapter-rail::before {
  bottom: calc(100% - 18px);
}
.chapter-dot {
  position: relative;
  margin-top: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--wine);
  color: var(--wine);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 600;
}
.chapter.is-today .chapter-dot {
  background: var(--wine);
  color: var(--on-dark);
}
.chapter-body {
  padding-bottom: 20px;
  min-width: 0;
}
.chapter-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
}
.chapter-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}
.chapter-title {
  min-width: 0;
}
.chapter-title small {
  font-size: 12px;
  color: var(--muted);
}
.chapter-title strong {
  display: block;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.25;
}
.chapter-title span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}
.chapter-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  background: var(--apricot-soft);
  color: var(--warn);
  font-size: 12px;
  font-weight: 500;
}
.flag svg {
  width: 13px;
  height: 13px;
}
.stop-list {
  margin-top: 12px;
  padding: 4px 14px;
  background: var(--paper);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  animation: fadeIn 0.25s var(--ease);
}
.stop-list li {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.stop-list li:last-child {
  border-bottom: 0;
}
.stop-leg {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 2px;
  padding-left: 56px;
}
.stop-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  align-items: baseline;
}
.stop-time {
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--wine);
}
.stop-name {
  font-size: 14.5px;
}
.stop-name small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.chapter-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.chapter-foot > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

/* ==========================================================================
   MY TRIP
   ========================================================================== */
.trip-head {
  padding: 8px 0 8px;
}
.trip-head .display-sm {
  margin-top: 6px;
}
.trip-route {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  border-radius: var(--r-lg);
  background: var(--paper);
  border: 1px solid var(--line);
}
.trip-route > svg {
  width: 100%;
  height: 120px;
  stroke-width: 0;
}
.trip-route polyline {
  fill: none;
  stroke: rgba(110, 27, 45, 0.3);
  stroke-width: 2;
  stroke-linejoin: round;
}
.trip-route polyline.is-today {
  stroke: var(--wine);
  stroke-width: 2.8;
}
.trip-route circle {
  fill: var(--wine);
}
.trip-route circle.base {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 2;
}
.trip-route > span {
  white-space: nowrap;
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--wine);
}
.block {
  margin-top: 28px;
}
.block-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.block-title svg {
  color: var(--wine);
  width: 15px;
  height: 15px;
}
.block-title .count {
  margin-left: auto;
  font-weight: 400;
}
.issue-list {
  border-radius: var(--r-md);
  background: var(--paper);
  border: 1px solid var(--line);
}
.issue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}
.issue:last-child {
  border-bottom: 0;
}
.issue-text {
  font-size: 14px;
}
.booking-list {
  display: grid;
}
.booking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.booking-main strong {
  display: block;
  font-weight: 500;
  font-size: 14.5px;
}
.booking-main small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}
.saved-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.saved-item {
  position: relative;
  flex: 0 0 132px;
}
.saved-item img {
  width: 132px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
}
.saved-item span {
  display: block;
  font-size: 13px;
  margin-top: 6px;
}
.saved-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(23, 21, 26, 0.55);
  color: var(--on-dark);
}
.saved-remove svg {
  width: 13px;
  height: 13px;
}
.trip-foot {
  margin-top: 32px;
  text-align: center;
}
.trip-foot .text-link {
  color: var(--muted);
  font-weight: 400;
}
.empty {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 12px;
}

/* ==========================================================================
   DEALS
   ========================================================================== */
.deal-list {
  display: grid;
  gap: 14px;
}
.deal {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.deal-media img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: var(--r-md);
}
.deal-body {
  min-width: 0;
}
.deal-context {
  font-size: 12px;
  font-weight: 500;
  color: var(--wine);
}
.deal-name {
  display: block;
  font-weight: 500;
  font-size: 16px;
  margin-top: 2px;
  line-height: 1.25;
}
.deal-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin: 3px 0 10px;
}

/* ==========================================================================
   MAP
   ========================================================================== */
.map-screen {
  position: relative;
  height: calc(100dvh - var(--nav-h) - var(--safe-b));
  overflow: hidden;
  background: var(--ivory-2);
}
.map-screen.active ~ * {
}
body[data-screen="mapScreen"] main {
  padding-bottom: 0;
}
.map-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.map-error {
  display: grid;
  place-items: center;
  height: 60%;
  color: var(--muted);
  padding: 24px;
  text-align: center;
}
.map-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.map-top > * {
  pointer-events: auto;
}
.map-actions {
  display: flex;
  gap: 8px;
}
.map-actions .is-busy svg {
  animation: pulse-soft 1s ease-in-out infinite alternate;
}
@keyframes pulse-soft {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.35;
  }
}
.map-seg {
  display: flex;
  padding: 3px;
  background: rgba(255, 252, 247, 0.94);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.map-seg button {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--muted);
}
.map-seg button.active {
  background: var(--ink);
  color: var(--on-dark);
  font-weight: 500;
}

.map-sheet {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 600;
  background: var(--charcoal);
  color: var(--on-dark);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.25);
  transition: transform 0.38s var(--ease);
  display: flex;
  flex-direction: column;
}
.map-sheet[data-state="peek"] {
  transform: translateY(calc(100% - 132px));
}
.map-sheet[data-state="half"] {
  transform: translateY(52%);
}
.map-sheet[data-state="full"] {
  transform: translateY(72px);
}
.map-sheet.dragging {
  transition: none;
}
.sheet-handle {
  flex-shrink: 0;
  height: 26px;
  display: grid;
  place-items: center;
  cursor: grab;
  touch-action: none;
}
.sheet-handle span {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: rgba(246, 239, 230, 0.3);
}
.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 18px 120px;
  overscroll-behavior: contain;
}
.sheet-title h2 {
  font-size: 19px;
  font-weight: 500;
  margin-top: 4px;
}
.sheet-sub {
  color: var(--on-dark-muted);
  font-size: 13.5px;
  margin-top: 2px;
}
.route-ribbon {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 14px -18px 4px;
  padding: 0 18px;
}
.route-ribbon::-webkit-scrollbar {
  display: none;
}
.ribbon-now {
  font-size: 13px;
  color: var(--on-dark-muted);
  flex-shrink: 0;
}
.ribbon-arrow {
  color: rgba(246, 239, 230, 0.3);
  font-size: 12px;
  flex-shrink: 0;
}
.ribbon-stop {
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--charcoal-2);
  font-size: 13px;
  transition: background 0.2s;
}
.ribbon-stop.is-next {
  box-shadow: inset 0 0 0 1px var(--apricot);
}
.ribbon-stop.active {
  background: var(--wine);
  box-shadow: none;
}

.sheet-timeline {
  margin-top: 14px;
}
.sheet-timeline li {
  position: relative;
  padding-left: 0;
}
.tl-leg {
  display: block;
  margin-left: 15px;
  padding: 6px 0 6px 24px;
  border-left: 2px dashed rgba(246, 239, 230, 0.18);
  font-size: 12px;
  color: var(--on-dark-muted);
}
.tl-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 6px;
  margin: 0 -6px;
  border-radius: 12px;
  transition: background 0.2s;
}
.sheet-timeline li.active .tl-row {
  background: rgba(255, 255, 255, 0.06);
}
.tl-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--wine);
}
.tl-num.is-next {
  box-shadow: 0 0 0 4px rgba(227, 154, 91, 0.35);
}
.tl-copy strong {
  display: block;
  font-weight: 500;
  font-size: 15px;
}
.tl-copy small {
  color: var(--on-dark-muted);
  font-size: 12.5px;
}
.sheet-ai {
  margin-top: 22px;
}
.suggest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: var(--r-md);
  border: 1px dashed rgba(227, 154, 91, 0.45);
}
.suggest-row strong {
  display: block;
  font-weight: 500;
  font-size: 14.5px;
}
.suggest-row small {
  color: var(--on-dark-muted);
  font-size: 12.5px;
}
.suggest-row.is-alert {
  border-style: solid;
  background: rgba(227, 154, 91, 0.08);
}
.suggest-badge {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--apricot);
  white-space: nowrap;
}
.sheet-days {
  margin-top: 14px;
  display: grid;
  gap: 4px;
}
.sheet-day {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-dark);
}
.sheet-day-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--wine);
  font-weight: 600;
  font-size: 13px;
}
.sheet-day strong {
  display: block;
  font-weight: 500;
}
.sheet-day small {
  color: var(--on-dark-muted);
  font-size: 12.5px;
}

.sel-card,
.preview-card {
  margin-top: 14px;
  border-radius: var(--r-lg);
  background: var(--charcoal-2);
  overflow: hidden;
  animation: fadeIn 0.28s var(--ease);
}
.sel-media {
  display: block;
  width: 100%;
}
.sel-media img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.sel-body {
  padding: 14px 16px 16px;
}
.sel-body h3,
.preview-card h3 {
  font-size: 19px;
  font-weight: 500;
  margin-top: 4px;
}
.sel-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.sel-facts dt {
  font-size: 11.5px;
  color: var(--on-dark-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sel-facts dd {
  font-size: 15px;
  font-weight: 500;
}
.sel-note {
  font-size: 13px;
  color: var(--on-dark-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.sel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.sel-actions svg {
  width: 16px;
  height: 16px;
}
.adjust-menu {
  display: grid;
  margin-top: 10px;
  border-top: 1px solid var(--line-dark);
}
.adjust-menu button {
  padding: 12px 2px;
  border-bottom: 1px solid var(--line-dark);
  font-size: 14px;
}
.adjust-menu button:disabled {
  opacity: 0.35;
}
.adjust-menu .danger {
  color: #f0a08f;
  border-bottom: 0;
}
.preview-card {
  padding: 16px;
  border: 1px solid rgba(227, 154, 91, 0.4);
}
.preview-sub {
  color: var(--on-dark-muted);
  font-size: 13.5px;
  margin-top: 2px;
}
.preview-place {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  width: 100%;
}
.preview-place img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}
.preview-place small {
  display: block;
  color: var(--on-dark-muted);
  font-size: 12px;
}
.preview-changes {
  margin-top: 12px;
  border-top: 1px solid var(--line-dark);
}
.preview-changes li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-dark);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.preview-changes s {
  color: var(--on-dark-muted);
  margin-right: 4px;
}

/* map markers */
.mk {
  background: none;
  border: 0;
}
.pin-stop {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--wine);
  color: var(--on-dark);
  font: 600 13px var(--font);
  box-shadow: 0 4px 12px rgba(74, 17, 32, 0.4);
  border: 2px solid var(--paper);
  transition: transform 0.25s var(--ease);
}
.pin-stop.is-next {
  box-shadow:
    0 0 0 6px rgba(227, 154, 91, 0.4),
    0 4px 12px rgba(74, 17, 32, 0.4);
}
.pin-stop.is-selected {
  transform: scale(1.22);
  background: var(--ink);
}
.pin-stop.is-dim {
  opacity: 0.5;
}
.pin-saved {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--wine);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.pin-saved svg {
  width: 13px;
  height: 13px;
  fill: var(--wine);
}
.pin-suggest {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--apricot);
  background: rgba(255, 252, 247, 0.85);
  transition: transform 0.2s;
}
.pin-suggest.is-active {
  transform: scale(1.4);
  background: var(--apricot);
}
.pin-you {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2f6fd6;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.pin-you i {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: rgba(47, 111, 214, 0.22);
  animation: pulse 2.4s ease-out infinite;
}
.pin-you.is-live {
  width: 22px;
  height: 22px;
  background: #1a73e8;
}
@keyframes pulse {
  from {
    transform: scale(0.6);
    opacity: 1;
  }
  to {
    transform: scale(1.6);
    opacity: 0;
  }
}
.leg .leg-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--text);
  font: 500 11.5px var(--font);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  white-space: nowrap;
}
.leaflet-tile-pane {
  filter: sepia(0.18) saturate(0.85) brightness(1.02);
}
.leaflet-container {
  font-family: var(--font);
  background: var(--ivory-2);
}
.leaflet-control-attribution {
  font-size: 10px;
}

/* ==========================================================================
   DIALOGS (place details, concierge)
   ========================================================================== */
.dialog {
  width: 100%;
  max-width: 440px;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: var(--ivory);
  color: var(--text);
  overflow: hidden;
}
.dialog[open] {
  animation: sheetUp 0.36s var(--ease);
  display: flex;
  flex-direction: column;
}
.dialog::backdrop {
  background: rgba(14, 12, 15, 0.55);
  backdrop-filter: blur(2px);
}
@keyframes sheetUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(23, 21, 26, 0.5);
  color: var(--on-dark);
  font-size: 20px;
  backdrop-filter: blur(8px);
}
.dialog > form {
  position: relative;
  height: 0;
}
.dialog-scroll {
  overflow-y: auto;
  max-height: 92dvh;
}
.detail-media img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}
.detail-thumbs {
  display: flex;
  gap: 6px;
  padding: 6px 20px 0;
  overflow-x: auto;
}
.detail-thumbs img {
  width: 64px;
  height: 48px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
}
.detail-content {
  padding: 18px 20px 8px;
}
.detail-content .display-sm {
  margin-top: 6px;
}
.fit-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--wine-soft);
}
.fit-box.in-plan {
  background: var(--paper);
  border: 1px solid var(--line);
}
.fit-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 13.5px;
  color: var(--wine);
  margin-bottom: 6px;
}
.fit-title svg {
  width: 15px;
  height: 15px;
}
.fit-box li {
  font-size: 14px;
  padding: 2px 0;
}
.detail-why {
  margin-top: 16px;
  font-size: 15px;
}
.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-top: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.detail-facts dt {
  font-size: 12px;
  color: var(--muted);
}
.detail-facts dd {
  font-size: 14.5px;
  font-weight: 500;
}
.detail-practical {
  margin-top: 14px;
  font-size: 14px;
  display: grid;
  gap: 4px;
}
.detail-practical .muted {
  font-size: 13px;
}
.status-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: 14px;
}
.status-line .muted {
  font-size: 12.5px;
}
.detail-actions {
  position: sticky;
  bottom: 0;
  padding: 14px 20px calc(16px + var(--safe-b));
  background: linear-gradient(transparent, var(--ivory) 22%);
  display: grid;
  gap: 8px;
}
.detail-actions .btn-primary {
  width: 100%;
}
.detail-secondary {
  display: flex;
  gap: 8px;
}
.detail-secondary > * {
  flex: 1;
  min-height: 42px;
  font-size: 14px;
  padding: 0 10px;
}

.concierge {
  padding: 24px 20px calc(20px + var(--safe-b));
}
.chat-log {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  max-height: 46dvh;
  overflow-y: auto;
}
.message {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14.5px;
  max-width: 88%;
}
.message.assistant {
  background: var(--paper);
  border: 1px solid var(--line);
}
.message.user {
  background: var(--wine);
  color: var(--on-dark);
  justify-self: end;
}
.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.chat-form input {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font: inherit;
  min-width: 0;
}
.chat-form button {
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-dark);
  font-weight: 500;
}

/* ---------- bottom nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  width: 100%;
  max-width: 440px;
  height: calc(var(--nav-h) + var(--safe-b));
  padding: 0 6px var(--safe-b);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 252, 247, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
body[data-screen="homeScreen"] .bottom-nav {
  background: rgba(33, 29, 34, 0.94);
  border-top-color: var(--line-dark);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
}
.nav-item svg {
  width: 21px;
  height: 21px;
}
.nav-item.active {
  color: var(--wine);
}
body[data-screen="homeScreen"] .nav-item {
  color: var(--on-dark-muted);
}
body[data-screen="homeScreen"] .nav-item.active {
  color: var(--apricot);
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: calc(16px + env(safe-area-inset-top, 0px));
  transform: translate(-50%, -12px);
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-dark);
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s var(--ease);
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* HAIQ / Ara-first — palette inherited from the original travel app */
:root {
  --r-sm: 8px;
  --r-md: 8px;
  --r-lg: 8px;
  --nav-h: 76px;
  --haiq-shadow: 0 8px 30px color-mix(in srgb, var(--ink) 7%, transparent);
  --haiq-backdrop: color-mix(in srgb, var(--charcoal) 55%, transparent);
}
body {
  background: var(--ivory);
}
.app-shell {
  max-width: 1160px;
  box-shadow: none;
}
main {
  padding-bottom: calc(var(--nav-h) + 44px);
}
.haiq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 98px;
  margin: 0 42px;
  border-bottom: 1px solid var(--line);
}
.haiq-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.haiq-logo-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 43px;
  background: var(--wine);
  color: var(--ivory);
  border-radius: 8px 8px 18px 18px;
  font-size: 25px;
  font-weight: 600;
}
.haiq-logo strong {
  display: block;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
}
.haiq-logo small {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: 4px;
}
.haiq-header-right {
  display: flex;
  align-items: center;
  gap: 25px;
}
.location-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--muted);
}
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 8px;
}
.lang-switch button {
  font-size: 12px;
  min-width: 36px;
  height: 29px;
  text-align: center;
  border-radius: 5px;
  color: var(--muted);
}
.lang-switch button.active {
  color: var(--on-dark);
  background: var(--wine);
}
.ara-welcome {
  position: relative;
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 20px;
  padding: 38px 42px 28px;
  min-height: 410px;
  align-items: center;
}
.ara-intro {
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--wine);
  font-weight: 600;
}
.ara-intro span {
  color: var(--apricot);
  margin-left: 7px;
}
.ara-welcome h1 {
  font-size: 51px;
  font-weight: 500;
  line-height: 1.06;
  margin: 13px 0 22px;
  letter-spacing: 0;
}
.ara-welcome h1 em {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--wine);
}
.ara-speech {
  position: relative;
  max-width: 455px;
  padding: 18px 22px;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--haiq-shadow);
  border: 1px solid var(--line);
}
.ara-speech::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  right: -10px;
  top: 30px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.ara-speech strong {
  font-size: 15px;
  font-weight: 500;
}
.ara-speech p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 7px 0 12px;
}
.weather-line {
  display: block;
  font-size: 11px;
  color: var(--wine);
}
.ara-greeting {
  font-size: 12px;
  color: var(--wine);
  font-weight: 500;
  margin: 18px 0 0 3px;
}
.ara-portrait {
  position: relative;
  display: grid;
  place-items: center;
  align-self: stretch;
}
.ara-portrait img {
  width: 345px;
  height: 345px;
  object-fit: contain;
  animation: araIdle 4s ease-in-out infinite;
  filter: drop-shadow(0 18px 12px color-mix(in srgb, var(--ink) 9%, transparent));
}
.ara-name {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-top: 4px;
}
@keyframes araIdle {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}
@keyframes araWave {
  0%,
  100% {
    transform: rotate(0);
  }
  25%,
  75% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(12deg);
  }
}
@keyframes araTalk {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.03);
  }
}
.haiq-content {
  padding: 0 42px;
}
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 5px 0 32px;
}
.quick-actions button {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 16px 16px 16px 70px;
  min-height: 77px;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s;
}
.quick-actions button:hover {
  background: var(--wine-soft);
}
.quick-actions button > span {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 39px;
  height: 39px;
  border-radius: 50%;
  background: var(--wine-soft);
  color: var(--wine);
  display: grid;
  place-items: center;
  font-size: 27px;
}
.quick-actions button:nth-child(2) > span {
  background: var(--apricot-soft);
}
.quick-actions img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.quick-actions small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
}
.today-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 25px;
}
.haiq-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.haiq-section-head h2 {
  font-size: 17px;
  font-weight: 500;
}
.haiq-section-head > span {
  font-size: 11px;
  color: var(--muted);
}
.haiq-section-head .text-link {
  font-size: 11px;
}
.top-deal {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
}
.top-deal > img {
  width: 100%;
  height: 205px;
  object-fit: cover;
}
.discount-stamp {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--wine);
  color: var(--on-dark);
  font-size: 30px;
  box-shadow: var(--haiq-shadow);
}
.discount-stamp small {
  font-size: 17px;
}
.top-deal-copy {
  padding: 18px;
}
.top-deal .eyebrow {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--wine);
}
.top-deal h3 {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.1;
  margin: 7px 0 12px;
}
.top-deal-copy > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.top-deal-copy > div > span {
  font-size: 11px;
  color: var(--muted);
}
.btn-primary,
.btn-secondary,
.btn-ghost {
  border-radius: 6px;
  min-height: 40px;
  font-size: 12px;
  padding: 0 15px;
}
.daily-card {
  padding: 22px;
  background: var(--charcoal);
  color: var(--on-dark);
  border-radius: 8px;
  min-height: 339px;
}
.daily-card > .eyebrow {
  color: var(--apricot);
  font-size: 10px;
}
.daily-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 29px;
  margin: 9px 0 4px;
}
.daily-card > p:not(.eyebrow) {
  font-size: 12px;
  color: var(--on-dark-muted);
}
.daily-card ol {
  margin: 18px 0;
}
.daily-card li {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 0 15px;
}
.daily-card li:not(:last-child)::before {
  position: absolute;
  content: "";
  left: 10px;
  top: 22px;
  bottom: 0;
  width: 1px;
  background: var(--line-dark);
}
.daily-card li > span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 10px;
  background: var(--wine);
}
.daily-card li strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
}
.daily-card li small {
  display: block;
  font-size: 10px;
  color: var(--on-dark-muted);
  margin-top: 3px;
}
.daily-card > .text-link {
  font-size: 11px;
  color: var(--apricot);
}
.nearby-section {
  margin-top: 32px;
}
.nearby-card {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  overflow: hidden;
  touch-action: pan-y;
}
.nearby-photo {
  position: relative;
}
.nearby-photo img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.nearby-photo > span {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 10px;
  background: var(--paper);
  color: var(--wine);
  font-size: 11px;
  border-radius: 4px;
}
.nearby-copy {
  padding: 25px;
}
.nearby-copy .eyebrow {
  font-size: 10px;
  color: var(--wine);
}
.nearby-copy h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 29px;
  margin: 9px 0 7px;
}
.nearby-copy p {
  font-size: 12px;
  color: var(--muted);
}
.nearby-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}
.skip-nearby {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 23px;
}
.first-day-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 30px;
}
.first-day-symbol {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  background: var(--wine-soft);
  color: var(--wine);
  border-radius: 8px;
  font-size: 30px;
}
.first-day-banner small {
  display: block;
  font-size: 9px;
  color: var(--wine);
  letter-spacing: 1px;
}
.first-day-banner strong {
  font-size: 16px;
  font-weight: 500;
}
.first-day-banner p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.first-day-banner > svg {
  margin-left: auto;
}
.prototype-note {
  font-size: 10px;
  text-align: center;
  color: var(--muted);
  padding: 20px 0;
}
.bottom-nav {
  max-width: 600px;
  bottom: 14px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--haiq-shadow);
}
body[data-screen="homeScreen"] .bottom-nav {
  background: var(--paper);
  border-color: var(--line);
}
body[data-screen="homeScreen"] .nav-item {
  color: var(--muted);
}
body[data-screen="homeScreen"] .nav-item.active {
  color: var(--wine);
}
.nav-item.active {
  background: var(--wine-soft);
  border-radius: 8px;
  margin: 5px;
}
.ara-float {
  position: fixed;
  bottom: 99px;
  right: max(24px, calc((100vw - 1160px) / 2 - 22px));
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 5px 12px color-mix(in srgb, var(--ink) 12%, transparent));
}
.ara-float img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  animation: araIdle 4s ease-in-out infinite;
}
.ara-float span {
  display: block;
  font-size: 10px;
  background: var(--wine);
  color: var(--on-dark);
  padding: 4px 12px;
  border-radius: 12px;
}
.ara-float i {
  position: absolute;
  right: 8px;
  bottom: 26px;
  width: 8px;
  height: 8px;
  background: var(--ok);
  border: 2px solid var(--ivory);
  border-radius: 50%;
}
.ara-float.waving img {
  animation: araWave 0.8s ease-in-out;
}
.ara-chat-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 24px;
}
.ara-chat-head img {
  width: 73px;
  height: 73px;
  object-fit: contain;
}
.ara-chat-head .display-sm {
  font-size: 27px;
}
.ara-chat-head.talking img {
  animation: araTalk 0.4s ease-in-out infinite;
}
.mock-note {
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0;
  line-height: 1.6;
}
.message.assistant {
  background: transparent;
  border: none;
  padding-left: 0;
}
.screen-pad {
  max-width: 1000px;
  margin: auto;
  padding: 32px 42px 90px;
}
.screen-head .display-sm {
  font-size: 38px;
}
.plan-form {
  max-width: 650px;
}
.sticky-cta {
  max-width: 650px;
}
.coupon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.coupon-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.coupon-media {
  position: relative;
}
.coupon-media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.coupon-discount {
  position: absolute;
  left: 14px;
  top: 14px;
  background: var(--wine);
  color: var(--on-dark);
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 500;
}
.coupon-copy {
  padding: 20px;
}
.coupon-copy h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  margin: 7px 0;
}
.coupon-copy .eyebrow {
  font-size: 11px;
  color: var(--wine);
}
.coupon-copy > p:not(.eyebrow) {
  font-size: 13px;
  color: var(--muted);
}
.coupon-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px dashed var(--line);
}
.coupon-foot small {
  font-size: 10px;
  color: var(--muted);
}
.wallet-section {
  margin-bottom: 35px;
}
.wallet-section h2 span {
  font-size: 13px;
  color: var(--wine);
  margin-left: 6px;
}
.wallet-empty {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 20px;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.wallet-empty p {
  font-size: 14px;
  flex: 1;
}
.wallet-empty small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.wallet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.wallet-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.wallet-card img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}
.wallet-card strong,
.wallet-card b,
.wallet-card small {
  display: block;
}
.wallet-card b {
  font-size: 20px;
  color: var(--wine);
  font-weight: 500;
}
.wallet-card small {
  font-size: 10px;
  color: var(--muted);
}
.wallet-card > svg {
  margin-left: auto;
}
.coupon-modal {
  padding: 40px 28px;
  text-align: center;
}
.coupon-modal .eyebrow {
  justify-content: center;
}
.coupon-modal h2 {
  font-size: 30px;
  font-family: var(--serif);
  margin: 10px 0;
}
.coupon-big {
  display: block;
  color: var(--wine);
  font-size: 38px;
  font-weight: 500;
}
.qr-image {
  width: 220px;
  height: 220px;
  margin: 20px auto;
}
.coupon-modal > p:not(.mock-note) {
  color: var(--ok);
  font-size: 14px;
  margin-bottom: 8px;
}
.coupon-modal > small {
  font-size: 12px;
  color: var(--muted);
}
.coupon-modal .btn-primary {
  margin-top: 12px;
}
.guide-content {
  padding: 35px 24px;
}
.guide-content h2 {
  margin-top: 10px;
}
.guide-list article {
  display: flex;
  gap: 15px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.guide-list article > span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  flex-shrink: 0;
  background: var(--wine-soft);
  color: var(--wine);
  border-radius: 6px;
  font-size: 21px;
}
.guide-list h3 {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 5px;
}
.guide-list p,
.guide-list small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.guide-list .text-link {
  font-size: 12px;
  margin-top: 8px;
}
.phrases > div {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.phrases dt {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.phrases dd {
  color: var(--wine);
  font-size: 11px;
  margin-top: 2px;
}
.map-screen {
  height: calc(100dvh - 180px);
  min-height: 560px;
}
.dialog {
  margin: auto;
  border-radius: 12px;
  box-shadow: var(--haiq-shadow);
}
* {
  letter-spacing: 0;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}
@media (max-width: 700px) {
  .haiq-header {
    height: 78px;
    margin: 0 20px;
  }
  .haiq-header-right {
    gap: 10px;
  }
  .location-label {
    font-size: 10px;
  }
  .haiq-logo strong {
    font-size: 24px;
  }
  .haiq-logo small {
    font-size: 8px;
    letter-spacing: 0.5px;
  }
  .haiq-logo-mark {
    width: 29px;
    height: 35px;
    font-size: 20px;
  }
  .haiq-logo {
    gap: 8px;
  }
  .ara-welcome {
    padding: 27px 20px 20px;
    grid-template-columns: 1fr 130px;
    gap: 0;
    min-height: 332px;
    align-items: start;
  }
  .ara-intro {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .ara-welcome h1 {
    font-size: 29px;
    margin: 12px 0 17px;
    width: 205px;
  }
  .ara-welcome-copy {
    position: relative;
    z-index: 1;
  }
  .ara-portrait {
    position: absolute;
    right: 0;
    top: 15px;
    width: 155px;
    height: 200px;
    z-index: 0;
  }
  .ara-portrait img {
    width: 175px;
    height: 200px;
  }
  .ara-name {
    display: none;
  }
  .ara-speech {
    width: calc(100vw - 40px);
    padding: 17px;
    max-width: none;
    margin-top: 47px;
  }
  .ara-speech::after {
    right: 25px;
    top: -9px;
    transform: rotate(-45deg);
  }
  .ara-speech strong {
    font-size: 13px;
  }
  .ara-speech p {
    font-size: 12px;
  }
  .ara-greeting {
    margin-top: 14px;
    font-size: 11px;
  }
  .haiq-content {
    padding: 0 20px;
  }
  .quick-actions {
    gap: 8px;
    margin: 10px 0 26px;
  }
  .quick-actions button {
    padding: 13px 4px;
    min-height: 85px;
    text-align: center;
    font-size: 12px;
  }
  .quick-actions button > span {
    position: static;
    margin: 0 auto 8px;
    width: 30px;
    height: 30px;
    font-size: 23px;
  }
  .quick-actions small {
    display: none;
  }
  .quick-actions img {
    width: 35px;
    height: 35px;
  }
  .today-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .haiq-section-head h2 {
    font-size: 15px;
  }
  .haiq-section-head > span {
    font-size: 10px;
  }
  .top-deal > img {
    height: 190px;
  }
  .top-deal h3 {
    font-size: 27px;
  }
  .top-deal-copy {
    padding: 16px;
  }
  .top-deal-copy > div > span {
    font-size: 10px;
  }
  .top-deal-copy .btn-primary {
    padding: 0 10px;
    font-size: 11px;
  }
  .daily-card {
    min-height: 0;
    padding: 20px;
  }
  .daily-card h3 {
    font-size: 29px;
  }
  .daily-card li strong {
    font-size: 13px;
  }
  .daily-card li small {
    font-size: 11px;
  }
  .daily-card > .text-link {
    font-size: 12px;
  }
  .nearby-section .haiq-section-head {
    align-items: flex-start;
  }
  .nearby-section .haiq-section-head > span {
    max-width: 140px;
    text-align: right;
  }
  .nearby-card {
    grid-template-columns: 1fr;
  }
  .nearby-photo img {
    height: 165px;
  }
  .nearby-copy {
    padding: 18px;
  }
  .nearby-copy h3 {
    font-size: 27px;
  }
  .nearby-controls {
    margin-top: 15px;
  }
  .first-day-banner {
    gap: 12px;
  }
  .first-day-banner strong {
    font-size: 14px;
  }
  .first-day-banner p {
    font-size: 10px;
  }
  .first-day-symbol {
    width: 39px;
    height: 42px;
    flex-shrink: 0;
  }
  .bottom-nav {
    bottom: 0;
    max-width: 100%;
    height: calc(70px + var(--safe-b));
    border-radius: 0;
    padding-bottom: var(--safe-b);
  }
  .ara-float {
    right: 12px;
    bottom: 85px;
  }
  .ara-float img {
    width: 58px;
    height: 58px;
  }
  .ara-float span {
    font-size: 9px;
    padding: 3px 9px;
  }
  .ara-float i {
    bottom: 23px;
  }
  .screen-pad {
    padding: 26px 20px 95px;
  }
  .screen-head .display-sm {
    font-size: 33px;
  }
  .coupon-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .coupon-media img {
    height: 190px;
  }
  .coupon-copy {
    padding: 18px;
  }
  .coupon-foot .btn-primary {
    font-size: 11px;
  }
  .coupon-foot small {
    font-size: 10px;
  }
  .wallet-grid {
    grid-template-columns: 1fr;
  }
  .wallet-empty {
    flex-wrap: wrap;
    gap: 10px;
  }
  .wallet-empty p {
    font-size: 12px;
  }
  .wallet-empty .text-link {
    font-size: 11px;
  }
  .display-sm {
    font-size: 30px;
  }
  .field-row {
    gap: 5px;
  }
  .stepper span {
    min-width: 47px;
  }
  .stepper button {
    width: 30px;
  }
  .segmented button {
    font-size: 12px;
  }
  .map-screen {
    height: calc(100dvh - 148px);
    min-height: 400px;
  }
  .dialog {
    margin: auto auto 0;
    border-radius: 15px 15px 0 0;
  }
  .haiq-dialog {
    max-height: 88dvh;
  }
  .guide-content .display-sm {
    font-size: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ara-portrait img,
  .ara-float img,
  .ara-chat-head.talking img {
    animation: none;
  }
}

.logo-dot {
  color: var(--wine);
}
@media (max-width: 360px) {
  .location-label {
    display: none;
  }
  .ara-welcome h1 {
    font-size: 27px;
    width: 180px;
  }
  .ara-portrait {
    right: -4px;
    width: 135px;
  }
  .ara-portrait img {
    width: 150px;
    height: 180px;
  }
  .top-deal-copy > div {
    flex-wrap: wrap;
  }
}

.app-shell {
  overflow-x: clip;
}

@media (max-width: 700px) {
  body[data-screen="plannerScreen"] .ara-float {
    bottom: 155px;
  }
}

/* Today: local deal stories and Ara's discovery stack */
.deal-stories {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.deal-stories .haiq-section-head {
  margin: 12px 0 18px;
}
.story-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 3px 3px 12px;
  scroll-snap-type: x mandatory;
}
.deal-circle {
  flex: 0 0 94px;
  text-align: center;
  scroll-snap-align: start;
}
.story-ring {
  position: relative;
  display: block;
  width: 86px;
  height: 86px;
  margin: 0 auto 10px;
  padding: 4px;
  border: 2px solid var(--wine);
  border-radius: 50%;
  transition: transform 0.2s var(--ease);
}
.deal-circle:nth-child(even) .story-ring {
  border-color: var(--apricot);
}
.story-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--paper);
}
.story-ring b {
  position: absolute;
  right: -6px;
  bottom: -3px;
  background: var(--wine);
  color: var(--on-dark);
  border: 2px solid var(--ivory);
  border-radius: 12px;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 500;
}
.story-partner {
  display: block;
  font-size: 11px;
  min-height: 32px;
  overflow-wrap: anywhere;
}
.deal-circle:hover .story-ring {
  transform: translateY(-3px);
}
#homeScreen .today-grid {
  display: block;
  margin-top: 30px;
}
#homeScreen .today-route {
  max-width: 600px;
  margin: auto;
}
#homeScreen .nearby-section {
  max-width: 600px;
  margin: 22px auto 0;
}
.nearby-ara {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}
.nearby-ara img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}
.nearby-ara p {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--wine);
}
.nearby-stack {
  position: relative;
  margin: 0 8px 24px;
  isolation: isolate;
}
.stack-under {
  position: absolute;
  inset: 0;
  background: var(--wine-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  transform: translateY(10px) scale(0.97);
  z-index: -1;
}
.stack-under-back {
  background: var(--apricot-soft);
  transform: translateY(20px) scale(0.94);
  z-index: -2;
}
#homeScreen .nearby-card {
  display: block;
  box-shadow: var(--haiq-shadow);
  will-change: transform;
  user-select: none;
}
#homeScreen .nearby-photo img {
  height: 280px;
  pointer-events: none;
}
.nearby-distance {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: var(--paper);
  color: var(--wine);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
#homeScreen .nearby-copy {
  padding: 20px;
  min-height: 145px;
}
#homeScreen .nearby-copy h3 {
  font-size: 29px;
  line-height: 1.15;
}
#homeScreen .nearby-controls {
  justify-content: center;
  gap: 18px;
  margin: 20px 0 28px;
}
.nearby-controls > span {
  font-size: 11px;
  color: var(--muted);
  max-width: 150px;
  text-align: center;
}
#homeScreen .skip-nearby,
.add-nearby {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 28px;
  box-shadow: var(--haiq-shadow);
}
#homeScreen .skip-nearby {
  color: var(--wine);
  background: var(--paper);
  border: 1px solid var(--line);
}
.add-nearby {
  background: var(--wine);
  color: var(--on-dark);
}
#homeScreen .quick-actions {
  max-width: 600px;
  margin: 0 auto 28px;
}
.deal-story-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--charcoal);
  color: var(--on-dark);
  overflow: hidden;
}
.deal-story-dialog::backdrop {
  background: var(--charcoal);
}
.deal-story-body {
  position: relative;
  height: 100%;
  max-width: 600px;
  margin: auto;
  overflow: auto;
  animation: storyReveal 0.25s var(--ease);
}
.story-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--charcoal) 50%, transparent),
    transparent 30%,
    color-mix(in srgb, var(--charcoal) 85%, transparent) 70%,
    var(--charcoal)
  );
}
.story-header {
  position: absolute;
  inset: 0 0 auto;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 22px 0;
}
.story-progress {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
}
.story-progress span {
  height: 3px;
  flex: 1;
  background: var(--on-dark-muted);
  opacity: 0.45;
  border-radius: 2px;
}
.story-progress .seen {
  background: var(--on-dark);
  opacity: 1;
}
.story-partner-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 48px;
}
.story-partner-head img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--on-dark-muted);
}
.story-partner-head strong,
.story-partner-head small {
  display: block;
  font-size: 13px;
}
.story-partner-head small {
  font-size: 11px;
  color: var(--on-dark-muted);
  margin-top: 3px;
}
.story-close {
  position: absolute;
  right: max(20px, calc((100vw - 600px) / 2 + 20px));
  top: calc(40px + env(safe-area-inset-top, 0px));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--haiq-backdrop);
  color: var(--on-dark);
  font-size: 28px;
}
.story-prev,
.story-next {
  position: absolute;
  top: 40%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 60px;
  font-size: 38px;
  background: var(--haiq-backdrop);
  border-radius: 6px;
  color: var(--on-dark);
}
.story-prev {
  left: 12px;
}
.story-next {
  right: 12px;
}
.story-copy {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 28px calc(24px + var(--safe-b));
}
.story-off {
  display: block;
  font-size: 64px;
  font-weight: 500;
  color: var(--apricot);
  line-height: 1.1;
}
.story-copy h2 {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
  line-height: 1.1;
  margin: 14px 0;
}
.story-copy p {
  font-size: 14px;
  color: var(--on-dark-muted);
  margin-bottom: 14px;
}
.story-copy > small {
  font-size: 11px;
  color: var(--on-dark-muted);
}
.story-copy .btn-primary {
  display: block;
  width: 100%;
  text-align: center;
  margin: 22px 0 12px;
  min-height: 50px;
  font-size: 14px;
}
.story-copy .story-disclaimer {
  font-size: 10px;
  text-align: center;
  margin: 0;
}
@keyframes storyReveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 700px) {
  .story-row {
    gap: 10px;
  }
  .deal-circle {
    flex-basis: 78px;
  }
  .story-ring {
    width: 70px;
    height: 70px;
  }
  .story-ring b {
    font-size: 10px;
  }
  .story-partner {
    font-size: 10px;
  }
  #homeScreen .nearby-photo img {
    height: 230px;
  }
  #homeScreen .nearby-copy {
    padding: 18px;
    min-height: 150px;
  }
  #homeScreen .nearby-copy h3 {
    font-size: 27px;
  }
  .story-copy {
    padding-right: 24px;
    padding-left: 24px;
  }
  .story-copy h2 {
    font-size: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .deal-story-body {
    animation: none;
  }
  .story-ring {
    transition: none;
  }
  #homeScreen .nearby-card {
    will-change: auto;
  }
}

/* ==========================================================================
   HAIQ polish pass — fixes from the first phone review
   ========================================================================== */

/* Floating Ara: Today already has Ara at the top, and on the map he covered the
   itinerary sheet. Elsewhere he gets smaller and the content gets room below. */
body[data-screen="homeScreen"] .ara-float,
body[data-screen="mapScreen"] .ara-float {
  display: none;
}
.ara-float img {
  width: 60px;
  height: 60px;
}
.ara-float span {
  display: none;
}
.ara-float i {
  right: 4px;
  bottom: 4px;
}
main {
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 96px);
}

/* Weather line stays readable without a sample label. */
.weather-line {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

/* Swipe controls: say what the two buttons do. */
.nearby-hint {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}
.nearby-hint b {
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
}
.nearby-hint b:last-child {
  color: var(--wine);
}

/* Planner: explain the empty date field. */
.date-hint {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

/* My Trip: a readable list of days instead of an abstract zig-zag drawing. */
.trip-days {
  padding: 14px 16px 44px;
}
.trip-days ol {
  display: grid;
  gap: 2px;
}
.trip-days li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.trip-days li:last-child {
  border-bottom: 0;
}
.trip-days li span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--wine);
  border: 1.5px solid var(--wine);
}
.trip-days li.is-today span {
  background: var(--wine);
  color: var(--on-dark);
}
.trip-days li strong {
  font-weight: 500;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trip-days li small {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 700px) {
  /* The big HAIQ header belongs on Today; other screens get a slim bar, the map none. */
  body:not([data-screen="homeScreen"]) .haiq-header {
    height: 56px;
  }
  body:not([data-screen="homeScreen"]) .haiq-logo small,
  body:not([data-screen="homeScreen"]) .location-label {
    display: none;
  }
  body[data-screen="mapScreen"] .haiq-header {
    display: none;
  }

  /* Ara at the top of Today: keep the whole figure inside the screen. */
  .ara-portrait {
    right: 8px;
    width: 140px;
    overflow: visible;
  }
  .ara-portrait img {
    width: 140px;
    height: 190px;
  }

  /* Near me now: a shorter card without the empty band under the text. */
  #homeScreen .nearby-photo img {
    height: 200px;
  }
  #homeScreen .nearby-copy {
    min-height: 0;
    padding: 16px 18px 18px;
  }
  #homeScreen .nearby-copy h3 {
    font-size: 24px;
  }
}

/* ---------- Explore (live places by category) ---------- */
.explore-section {
  margin-top: 28px;
}
.explore-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.explore-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--text);
  font: 500 13px/1.2 var(--font);
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.explore-tile span {
  font-size: 26px;
  line-height: 1;
}
.explore-tile:hover,
.explore-tile:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--haiq-shadow);
}
.explore-tile:active {
  transform: scale(0.97);
}
.explore-sheet .display-sm {
  margin-bottom: 14px;
}
.explore-list {
  display: grid;
  gap: 12px;
}
.explore-place {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.explore-photo {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ivory-2);
}
.explore-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.explore-copy h3 {
  margin: 2px 0 4px;
  font: 600 15px/1.25 var(--font);
}
.explore-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0;
  font-size: 13px;
  color: var(--text);
}
.explore-meta small,
.explore-meta span,
.explore-address {
  color: var(--muted);
}
.explore-meta .open {
  color: var(--ok);
  font-weight: 600;
}
.explore-meta .closed {
  color: var(--warn);
  font-weight: 600;
}
.explore-address {
  margin: 4px 0 0;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.explore-links {
  display: flex;
  gap: 14px;
  margin-top: 6px;
}
.explore-loading,
.explore-empty {
  padding: 24px 0;
  color: var(--muted);
  text-align: center;
}
.money-tip {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--apricot-soft);
  color: var(--text);
}
.money-tip h3 {
  margin: 0 0 6px;
  font: 600 15px/1.3 var(--font);
}
.money-tip ul {
  margin: 0 0 6px;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.45;
}
.money-tip small {
  color: var(--muted);
}
@media (min-width: 760px) {
  .explore-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}
.explore-sheet {
  padding: 20px 20px 24px;
}
.explore-photo {
  position: relative;
  display: grid;
  place-items: center;
}
.explore-photo span {
  font-size: 32px;
  opacity: 0.5;
}
.explore-photo img {
  position: absolute;
  inset: 0;
}
.money-tip ul {
  list-style: disc;
}

/* ---------- Coupon merchandising (savings in dram, terms, counts) ---------- */
.savings-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--charcoal);
  color: var(--on-dark);
}
.savings-bar img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.savings-bar span {
  display: grid;
  flex: 1;
}
.savings-bar small {
  color: var(--on-dark-muted);
  font-size: 12px;
}
.savings-bar strong {
  font: 600 22px/1.2 var(--font);
  color: var(--apricot);
}
.savings-bar .text-link {
  color: var(--on-dark);
}
.chip-count {
  margin-left: 4px;
  padding: 0 7px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 14%, transparent);
  font-size: 12px;
}
.coupon-media {
  position: relative;
}
.coupon-ends {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 70%, transparent);
  color: #fff;
  font: 600 12px/1.2 var(--font);
}
.coupon-ends.soon {
  background: #b3261e;
}
.coupon-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 8px 0 0;
}
.coupon-price s {
  color: var(--muted);
  font-size: 14px;
}
.coupon-price b {
  font: 600 20px/1.2 var(--font);
  color: var(--text);
}
.coupon-save {
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok);
  font: 600 13px/1.3 var(--font);
}
.coupon-price-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.coupon-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.coupon-terms li {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
}
.coupon-trust {
  margin: 10px 0 0;
  color: var(--ok);
  font-size: 13px;
}
.coupon-modal-save {
  margin: 4px 0 0;
  color: var(--ok);
  font-weight: 600;
}
.coupon-modal .coupon-terms {
  justify-content: center;
  margin-bottom: 12px;
}

/* bottom nav: 4 tabs */
.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  overflow: visible;
  background: color-mix(in srgb, var(--ivory) 88%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.bottom-nav .nav-item {
  height: 100%;
  margin: 0;
  padding: 6px 0;
  color: var(--muted);
  background: transparent;
}
.bottom-nav .nav-item.active {
  margin: 0;
  color: var(--text);
  background: transparent;
}
.bottom-nav .nav-item.active svg {
  stroke: var(--wine);
  color: var(--wine);
}
.nav-ara {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 0 0 8px;
  border: 0;
  background: none;
  color: var(--text);
  font: 600 11px/1 var(--font);
  cursor: pointer;
  align-self: start;
  margin-top: -26px;
}
.nav-ara img {
  width: 62px;
  height: 62px;
  padding: 4px;
  border-radius: 50%;
  object-fit: contain;
  background: radial-gradient(circle at 50% 35%, var(--wine) 0%, var(--wine-deep) 70%);
  box-shadow:
    0 0 0 4px var(--ivory),
    0 8px 24px rgba(168, 50, 76, 0.55);
  transition: transform 0.2s var(--ease);
}
.nav-ara:active img {
  transform: scale(0.94);
}
.ara-float {
  display: none !important;
}

/* Explore page */
.explore-head h1 {
  margin-bottom: 4px;
}
.explore-chips {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  margin: 12px -20px 16px;
  padding: 10px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  background: color-mix(in srgb, var(--ivory) 92%, transparent);
  backdrop-filter: blur(12px);
}
.explore-chips::-webkit-scrollbar {
  display: none;
}
.explore-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--text);
  font: 500 14px/1 var(--font);
  cursor: pointer;
}
.explore-chip.active {
  border-color: var(--wine);
  background: var(--wine);
  color: #fff;
}
.explore-chip span {
  font-size: 17px;
}
.explore-place {
  background: var(--paper);
}
.money-tip {
  background: var(--apricot-soft);
  border: 1px solid rgba(227, 154, 91, 0.25);
}

/* My Trip: map / edit plan switch */
.trip-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.trip-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--text);
  font: 600 14px/1 var(--font);
  cursor: pointer;
}
.trip-switch svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.seg-chip.active {
  background: var(--wine);
  border-color: var(--wine);
  color: #fff;
}
.chat-form input {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
}
.chat-form button {
  background: var(--wine);
  color: #fff;
}
.message.user {
  background: var(--wine);
  color: #fff;
}

/* Ara button in the header */
.header-ara {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--text);
  font: 600 13px/1 var(--font);
  cursor: pointer;
}
.header-ara img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--wine-soft);
}
@media (max-width: 520px) {
  .haiq-header .location-label {
    display: none;
  }
}
/* Just landed: prominent card at the top of Today */
.first-day-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0 0 20px;
  padding: 16px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-deep) 100%);
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(110, 27, 45, 0.25);
}
.first-day-card .first-day-icon {
  display: grid;
  flex: 0 0 48px;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 24px;
}
.first-day-card span {
  display: grid;
  gap: 3px;
  flex: 1;
}
.first-day-card small {
  font: 600 11px/1.2 var(--font);
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.first-day-card strong {
  font: 600 18px/1.2 var(--font);
}
.first-day-card em {
  font-style: normal;
  font-size: 13px;
  opacity: 0.85;
}
.first-day-card svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  fill: none;
}
.explore-body {
  min-height: 70vh;
}
