/* ============================================================
   Singgah — warm tropical editorial design system
   Display: Fraunces · Body: Plus Jakarta Sans
   ============================================================ */

:root {
  /* Warm paper / sand base */
  --paper:        #F7F0E3;
  --paper-2:      #FCF7EC;
  --card:         #FFFDF8;
  --card-2:       #FBF4E7;

  /* Ink */
  --ink:          #221A13;
  --ink-soft:     #574B3E;
  --warm-mute:    #93826F;   /* referenced inline by app.js — keep this name */
  --line:         rgba(34, 26, 19, 0.10);
  --line-strong:  rgba(34, 26, 19, 0.16);

  /* Tropical teal-green (primary / sea + jungle) */
  --primary:      #0F6B5E;
  --primary-deep: #0A4F46;
  --primary-soft: #2C8C7E;
  --primary-tint: rgba(15, 107, 94, 0.10);
  --primary-tint-2: rgba(15, 107, 94, 0.16);

  /* Sunset terracotta (accent) */
  --accent:       #D9663B;
  --accent-deep:  #BC5028;
  --accent-tint:  rgba(217, 102, 59, 0.12);

  /* Warm gold + supporting */
  --gold:         #C49A48;
  --instagram:    #C13584;
  --tiktok:       #111;

  /* Radii */
  --r-xs: 8px;  --r-sm: 12px;  --r-md: 16px;  --r-lg: 22px;  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadows — warm, layered */
  --sh-sm:  0 1px 2px rgba(40,28,16,.06), 0 2px 6px rgba(40,28,16,.05);
  --sh-md:  0 2px 4px rgba(40,28,16,.06), 0 8px 22px rgba(40,28,16,.08);
  --sh-lg:  0 8px 18px rgba(40,28,16,.10), 0 24px 60px rgba(40,28,16,.12);
  --sh-primary: 0 6px 18px rgba(15,107,94,.28);

  /* Motion */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --fast: 140ms var(--ease);
  --med:  260ms var(--ease);

  --banner-h: 0px;
  --header-h: 68px;

  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* fixes attribute-vs-CSS override (banner/badge/modal) */

html, body { height: 100%; margin: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
}
h1,h2,h3,h4 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--primary-tint-2); }

/* Scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(34,26,19,.16); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(34,26,19,.28); background-clip: content-box; }

/* ── Ambient atmosphere ────────────────────────────────────── */
.ambient-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.orb-1 { width: 46vw; height: 46vw; top: -14vw; right: -8vw; background: radial-gradient(circle, rgba(217,102,59,.42), transparent 70%); }
.orb-2 { width: 40vw; height: 40vw; bottom: -16vw; left: -10vw; background: radial-gradient(circle, rgba(15,107,94,.40), transparent 70%); }
.orb-3 { width: 30vw; height: 30vw; top: 36%; left: 42%; background: radial-gradient(circle, rgba(196,154,72,.30), transparent 70%); }
.grain {
  position: absolute; inset: 0; opacity: .035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Header ────────────────────────────────────────────────── */
.app-header {
  position: relative; z-index: 10; height: var(--header-h);
  background: linear-gradient(180deg, rgba(252,247,236,.92), rgba(247,240,227,.78));
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; max-width: 1600px; margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-icon {
  position: relative; width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(150deg, var(--primary), var(--primary-deep));
  display: grid; place-items: center; box-shadow: var(--sh-primary);
  overflow: hidden;
}
.brand-glyph { font-family: 'Fraunces', serif; font-weight: 600; font-size: 24px; color: #FCF7EC; line-height: 1; }
.brand-plane { position: absolute; right: 4px; top: 4px; font-size: 11px; color: var(--accent); transform: rotate(8deg); opacity: .92; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 22px; letter-spacing: -0.02em; }
.brand-tagline { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--warm-mute); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle { display: inline-flex; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; }
.lang-opt { font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 5px 11px; border-radius: var(--r-pill); color: var(--warm-mute); transition: var(--fast); }
.lang-opt.active { background: var(--ink); color: var(--paper-2); box-shadow: var(--sh-sm); }
.lang-opt:not(.active):hover { color: var(--ink); }

.cost-meter { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: var(--r-pill);
  background: var(--primary-tint); color: var(--primary-deep); font-size: 13px; font-weight: 600; white-space: nowrap; }
.cost-meter i { font-size: 15px; }

.btn-icon { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--paper-2); font-size: 13px; font-weight: 600; transition: var(--fast); box-shadow: var(--sh-sm); }
.btn-icon:hover { transform: translateY(-1px); box-shadow: var(--sh-md); }
.btn-icon i { font-size: 16px; }

/* ── API banner ────────────────────────────────────────────── */
.api-banner { position: relative; z-index: 9; display: flex; align-items: center; gap: 10px;
  padding: 10px 22px; font-size: 13.5px; font-weight: 500;
  background: linear-gradient(90deg, var(--accent-tint), rgba(196,154,72,.14));
  color: var(--accent-deep); border-bottom: 1px solid var(--line); }
.api-banner code { font-family: 'Plus Jakarta Sans', monospace; background: rgba(188,80,40,.14); padding: 1px 6px; border-radius: 5px; font-weight: 700; }
.api-banner > span { flex: 1; }
.banner-close { color: var(--accent-deep); opacity: .65; display: grid; place-items: center; padding: 4px; border-radius: 6px; transition: var(--fast); }
.banner-close:hover { opacity: 1; background: rgba(188,80,40,.12); }

/* ── Layout ────────────────────────────────────────────────── */
.app-main {
  position: relative; z-index: 5;
  height: calc(100vh - var(--header-h) - var(--banner-h));
  max-width: 1600px; margin: 0 auto; padding: 18px;
  display: grid; grid-template-columns: minmax(380px, 460px) 1fr; gap: 18px;
}
.pane { min-height: 0; border-radius: var(--r-lg); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--sh-md); display: flex; flex-direction: column; overflow: hidden; }

/* ── Chat pane ─────────────────────────────────────────────── */
.pane-chat { background:
  radial-gradient(120% 60% at 0% 0%, var(--card-2), transparent 60%), var(--card); }

.chips-panel { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.chips-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.chips-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--warm-mute); }
.chips-edit-btn { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--warm-mute); transition: var(--fast); }
.chips-edit-btn:hover { background: var(--primary-tint); color: var(--primary-deep); }
.chips-grid { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: var(--r-pill);
  background: var(--card-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  transition: var(--fast); animation: chipIn .45s var(--ease) both;
}
.chip i { font-size: 14px; color: var(--primary); }
.chip:hover { border-color: var(--primary-soft); background: var(--primary-tint); transform: translateY(-1px); }
.chip-placeholder { color: var(--warm-mute); cursor: default; }
.chip-placeholder i { color: var(--warm-mute); }
.chip-placeholder:hover { transform: none; background: var(--card-2); border-color: var(--line); }
@keyframes chipIn { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }

.chat-window { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 18px; }
.chat-messages { display: flex; flex-direction: column; gap: 16px; }

.message { display: flex; gap: 11px; max-width: 100%; animation: msgIn .4s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg-avatar { flex-shrink: 0; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 16px; }
.message.assistant .msg-avatar { background: linear-gradient(150deg, var(--primary), var(--primary-deep)); color: var(--paper-2); box-shadow: var(--sh-primary); }
.message.user .msg-avatar { background: var(--card-2); color: var(--ink-soft); border: 1px solid var(--line); }
.msg-bubble { padding: 12px 15px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; max-width: 82%; }
.message.assistant .msg-bubble { background: var(--card-2); border: 1px solid var(--line); border-top-left-radius: 5px; }
.message.user { flex-direction: row-reverse; }
.message.user .msg-bubble { background: var(--ink); color: var(--paper-2); border-top-right-radius: 5px; }
.msg-bubble p { margin: 0 0 8px; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-bubble strong { font-weight: 700; }
.msg-bubble em { font-style: italic; color: var(--primary-deep); }
.message.user .msg-bubble em { color: var(--card-2); }

.typing-dots { display: inline-flex; gap: 5px; padding: 3px 2px; }
.typing-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--primary-soft); animation: typing 1.2s var(--ease) infinite; }
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.streaming-cursor { display: inline-block; width: 2px; height: 1.05em; background: var(--primary); margin-left: 2px; vertical-align: text-bottom; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.chat-input-wrap { flex-shrink: 0; padding: 14px 18px 16px; border-top: 1px solid var(--line); background: var(--card); }
.chat-input-shell { display: flex; align-items: flex-end; gap: 9px; padding: 8px 8px 8px 16px; border-radius: var(--r-lg);
  background: var(--card-2); border: 1.5px solid var(--line); transition: var(--fast); }
.chat-input-shell:focus-within { border-color: var(--primary-soft); box-shadow: 0 0 0 4px var(--primary-tint); background: var(--card); }
.chat-input { flex: 1; border: none; background: none; resize: none; outline: none; font-size: 14.5px; line-height: 1.5; max-height: 160px; padding: 6px 0; transition: height 200ms var(--ease); }
.chat-input::placeholder { color: var(--warm-mute); }
.send-btn { flex-shrink: 0; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--primary), var(--primary-deep)); color: var(--paper-2); font-size: 18px; transition: var(--fast); box-shadow: var(--sh-primary); }
.send-btn:hover:not(:disabled) { transform: translateY(-1px) scale(1.04); }
.send-btn:disabled { opacity: .45; cursor: not-allowed; }
.chat-hint { margin: 9px 4px 0; font-size: 11.5px; color: var(--warm-mute); text-align: center; }
kbd { font-family: inherit; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--card-2); border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line); }

/* ── Results pane / tabs ───────────────────────────────────── */
.pane-results { background: var(--paper-2); }
.tabs-bar { display: flex; gap: 4px; padding: 12px 14px 0; border-bottom: 1px solid var(--line); flex-shrink: 0; background: var(--card); }
.tab-btn { display: inline-flex; align-items: center; gap: 7px; padding: 11px 16px 13px; font-size: 14px; font-weight: 600;
  color: var(--warm-mute); border-bottom: 2.5px solid transparent; margin-bottom: -1px; transition: var(--fast); border-radius: 8px 8px 0 0; }
.tab-btn i { font-size: 17px; }
.tab-btn:hover { color: var(--ink); background: var(--card-2); }
.tab-btn.active { color: var(--primary-deep); border-bottom-color: var(--primary); }
.tab-badge { font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; display: inline-grid; place-items: center; }

.tab-panel { display: none; flex: 1; min-height: 0; flex-direction: column; }
.tab-panel.active { display: flex; }

/* Filter bar */
.filter-bar { display: flex; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; background: var(--card); }
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--warm-mute); }
.filter-select { padding: 7px 28px 7px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--fast); -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2393826F'%3E%3Cpath d='M3 4.5L6 8l3-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.filter-select:hover { border-color: var(--primary-soft); }
.filter-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }

/* Lists */
.hotels-list, .hyped-list { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; }
.hyped-list { display: flex; flex-direction: column; gap: 16px; }
/* Stays: two-column grid.
   grid-auto-rows: max-content is REQUIRED — cards have overflow:hidden, which gives
   grid items an automatic min-size of 0, letting auto rows collapse and clip the
   card body. Forcing rows to max-content sizes each row to the full card height. */
.hotels-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-content: start; grid-auto-rows: max-content; }
/* Full-width rows inside the Stays grid (empty state, progress) */
.hotels-list > .empty-state, .hotels-list > .search-progress { grid-column: 1 / -1; }

/* Empty state */
.empty-state { margin: auto; text-align: center; padding: 40px 28px; max-width: 380px; }
.empty-icon { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center;
  background: var(--primary-tint); color: var(--primary); font-size: 34px; }
.empty-state h3 { font-size: 21px; margin-bottom: 8px; }
.empty-state p { color: var(--warm-mute); font-size: 14px; line-height: 1.6; }

/* Search progress */
.search-progress { display: flex; align-items: center; gap: 11px; padding: 14px 18px; margin: 0 0 4px;
  background: var(--primary-tint); border-radius: var(--r-md); color: var(--primary-deep); font-size: 13.5px; font-weight: 600; }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--primary-tint-2); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Hotel card ────────────────────────────────────────────── */
.hotel-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-sm); transition: box-shadow var(--med), transform var(--med), border-color var(--med);
  cursor: pointer; animation: cardIn .5s var(--ease) both; flex-shrink: 0; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hotel-card:hover { box-shadow: var(--sh-lg); transform: translateY(-2px); border-color: var(--line-strong); }
.hotel-card.selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-tint-2), var(--sh-md); }

.hotel-photo-wrap { position: relative; height: 210px; background: var(--card-2); overflow: hidden; }

/* Photo carousel (native swipe + dots) */
.carousel { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.carousel::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; }
/* Taller than the frame so vertical parallax never reveals an edge */
.hotel-photo { width: 100%; height: calc(100% + 40px); margin-top: -20px; object-fit: cover; display: block; will-change: transform; }
.hotel-photo-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--warm-mute); font-size: 38px;
  background: linear-gradient(135deg, var(--card-2), var(--primary-tint)); }
.carousel-dots { position: absolute; bottom: 10px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 6px; }
.cdot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 1px 2px rgba(0,0,0,.45); cursor: pointer; transition: var(--fast); }
.cdot.active { background: #fff; width: 18px; border-radius: 3px; }

/* Top-left overlay: rank + score, stacked */
.hotel-photo-overlay { position: absolute; top: 12px; left: 12px; z-index: 4; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hotel-rank-badge { padding: 4px 10px; border-radius: var(--r-pill); background: rgba(34,26,19,.72); color: var(--paper-2);
  font-size: 12px; font-weight: 700; backdrop-filter: blur(4px); }
.hotel-score-badge { padding: 5px 11px; border-radius: var(--r-pill);
  background: linear-gradient(150deg, var(--accent), var(--accent-deep)); color: #fff; font-size: 12px; font-weight: 800; box-shadow: var(--sh-md); }

/* Top-right overlay: save + rating (matched height) */
.hotel-photo-actions { position: absolute; top: 12px; right: 12px; z-index: 4; display: flex; align-items: center; gap: 8px; }
.hotel-photo-actions .save-btn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,253,248,.95); color: var(--warm-mute); font-size: 15px; box-shadow: var(--sh-sm); backdrop-filter: blur(4px); transition: var(--fast); }
.hotel-photo-actions .save-btn:hover { color: var(--accent); transform: scale(1.08); }
.hotel-photo-actions .save-btn.saved { background: var(--accent); color: #fff; }
.hotel-photo-actions .hotel-rating { height: 30px; padding: 0 11px; box-sizing: border-box; display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,253,248,.95); border-radius: var(--r-pill); font-size: 13px; font-weight: 700; color: var(--ink); box-shadow: var(--sh-sm); backdrop-filter: blur(4px); }
.hotel-photo-actions .hotel-rating i { color: var(--gold); font-size: 14px; }
.hotel-photo-actions .hotel-rating.no-rating { color: var(--warm-mute); font-weight: 600; }

.hotel-body { padding: 15px 16px 16px; }
.hotel-header-row { margin-bottom: 8px; }
.hotel-name { font-size: 18px; line-height: 1.25; }
.hotel-loc { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--warm-mute); margin-bottom: 10px; }
.hotel-loc i { font-size: 13px; flex-shrink: 0; color: var(--primary); }
.hotel-loc span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Price above the name */
.hotel-price-top { font-family: 'Fraunces', serif; font-weight: 600; font-size: 17px; color: var(--primary-deep); line-height: 1.1; margin-bottom: 3px; }
.hotel-price-top .per-night { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; font-size: 11px; color: var(--warm-mute); margin-left: 3px; }

/* OTA booking cards */
.booking-row { margin-bottom: 14px; }
.booking-label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--warm-mute); margin-bottom: 7px; }
.booking-cards { display: flex; flex-wrap: wrap; gap: 7px; }
.booking-card { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 10px; font-size: 12px; font-weight: 700;
  color: #fff; text-decoration: none; transition: var(--fast); box-shadow: var(--sh-sm); }
.booking-card i { font-size: 13px; }
.booking-card:hover { transform: translateY(-1px); box-shadow: var(--sh-md); filter: brightness(1.07); }
.bk-traveloka { background: #0770e3; }
.bk-agoda { background: #5c2d91; }
.bk-tiket { background: #00a0e9; }
.bk-booking { background: #003580; }

.hotel-blurb { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); margin-bottom: 13px; min-height: 20px; font-style: italic; }
.blurb-loading { display: flex; flex-direction: column; gap: 6px; }
.sk { height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--card-2), var(--paper), var(--card-2));
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk-1 { width: 100%; } .sk-2 { width: 70%; }
.sk-row { height: 12px; border-radius: 6px; width: 80%; background: linear-gradient(90deg, var(--card-2), var(--paper), var(--card-2));
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.hotel-links { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.hotel-link { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: var(--r-pill);
  background: var(--card-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-soft);
  text-decoration: none; transition: var(--fast); }
.hotel-link i { font-size: 14px; }
.hotel-link:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); }
.hotel-link.website:hover { color: var(--primary-deep); border-color: var(--primary-soft); }
.hotel-link.phone:hover { color: var(--accent-deep); border-color: var(--accent); }
.hotel-link.instagram i { color: var(--instagram); }
.hotel-link.tiktok i { color: var(--tiktok); }

.hotel-travel { background: var(--card-2); border-radius: var(--r-md); padding: 12px 13px; border: 1px solid var(--line); }
.travel-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.travel-panel-title { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--warm-mute); }
.travel-map-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--primary-deep);
  padding: 4px 9px; border-radius: var(--r-pill); transition: var(--fast); }
.travel-map-btn:hover { background: var(--primary-tint); }
.travel-rows, .travel-loading { display: flex; flex-direction: column; gap: 7px; }
.travel-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.travel-icon { font-size: 16px; color: var(--primary); flex-shrink: 0; }
.travel-text { color: var(--ink-soft); }
.travel-text strong { color: var(--ink); font-weight: 700; }
.toll-est { color: var(--accent-deep); font-weight: 700; }
.na { color: var(--warm-mute); font-style: italic; }

/* Set-home CTA (shown instead of travel panel when home is unset) */
.travel-set-home { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px 14px;
  border-radius: var(--r-md); background: var(--primary-tint); border: 1px dashed var(--primary-soft);
  color: var(--primary-deep); font-size: 12.5px; font-weight: 600; text-align: center; transition: var(--fast); }
.travel-set-home:hover { background: var(--primary-tint-2); transform: translateY(-1px); }
.travel-set-home i { font-size: 16px; }

/* Map markers + labels */
.map-home-icon, .map-end-icon { background: none; border: none; }
.map-home-pin { width: 22px; height: 22px; background: var(--ink); border: 3px solid #FCF7EC; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.map-num-pin { width: 28px; height: 28px; background: var(--primary); border: 2.5px solid #fff; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); box-shadow: 0 3px 10px rgba(15,107,94,.45); display: flex; align-items: center; justify-content: center; }
.map-num-pin span { transform: rotate(45deg); color: #fff; font: 700 11px/1 'Plus Jakarta Sans', sans-serif; }
.map-end { display: flex; flex-direction: column; align-items: center; width: 120px; }
.map-end-thumb { width: 56px; height: 56px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.3);
  overflow: hidden; background: var(--card-2); }
.map-end-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-end-thumb-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--primary); font-size: 22px; }
.map-end-name { margin-top: 6px; max-width: 120px; padding: 3px 9px; border-radius: var(--r-pill); background: var(--ink);
  color: var(--paper-2); font-size: 11px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; box-shadow: var(--sh-sm); }
.leaflet-tooltip.map-tip { background: var(--ink); color: var(--paper-2); border: none; border-radius: var(--r-pill);
  padding: 4px 10px; font: 700 11px/1.2 'Plus Jakarta Sans', sans-serif; box-shadow: var(--sh-md); }
.leaflet-tooltip.map-tip::before { display: none; }

/* Destination marker: white rounded card + thumbnail + speech-bubble tail */
.map-dest-icon { background: none; border: none; }
.map-dest { display: flex; flex-direction: column; align-items: center; }
.map-dest-card { position: relative; width: 128px; height: 86px; border-radius: 8px; overflow: hidden; background: #fff;
  box-shadow: 0 8px 22px rgba(34,26,19,.30); }
.map-dest-thumb { position: absolute; inset: 0; }
.map-dest-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }   /* aspect-fill the container */
.map-dest-thumb-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--primary); font-size: 26px; background: var(--card-2); }
.map-dest-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 6px 5px;
  background: linear-gradient(transparent, rgba(20,14,9,.82)); color: #fff; font: 700 9.5px/1.15 'Plus Jakarta Sans', sans-serif;
  text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.map-dest-tail { width: 0; height: 0; margin-top: -1px; border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-top: 11px solid #fff; filter: drop-shadow(0 4px 3px rgba(34,26,19,.18)); }

/* Animated 3D vehicle marker */
.map-vehicle-icon { background: none; border: none; }
.map-vehicle { width: 40px; height: 40px; object-fit: contain; display: block; transition: transform .12s linear;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }

/* ── Hyped card ────────────────────────────────────────────── */
.hyped-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 17px 18px;
  box-shadow: var(--sh-sm); transition: var(--med); animation: cardIn .5s var(--ease) both;
  border-left: 4px solid var(--accent); flex-shrink: 0; }
.hyped-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.hyped-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.hyped-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 18px; line-height: 1.25; }
.hyped-locality { font-size: 12.5px; color: var(--warm-mute); margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.hyped-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.hyped-rating i { color: var(--gold); }
.hyped-why { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); margin-bottom: 12px; }
.hyped-source { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 10px; border-radius: var(--r-pill); background: var(--card-2); color: var(--warm-mute); border: 1px solid var(--line); }
.hyped-source.websearch { background: var(--accent-tint); color: var(--accent-deep); border-color: transparent; }
/* Hyped card with an enriched photo on top */
.hyped-card.with-photo { padding: 0; overflow: hidden; }
.hyped-card.with-photo .hyped-body { padding: 16px 18px; }
.hyped-photo { height: 190px; }
.hyped-body .hotel-links { margin: 4px 0 12px; }

/* Viral TikTok strip in the Tren tab */
.tiktok-strip { margin-bottom: 18px; }
.tiktok-strip-head { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.tiktok-strip-head i { font-size: 17px; }
.tiktok-rail { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.tiktok-embed { flex: 0 0 auto; width: 232px; height: 410px; border-radius: var(--r-md); overflow: hidden; background: #000; box-shadow: var(--sh-md); }
.tiktok-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ── Map ───────────────────────────────────────────────────── */
.map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 13px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; background: var(--card); }
.map-toolbar-label { font-family: 'Fraunces', serif; font-weight: 600; font-size: 16px; }
.route-pills { display: inline-flex; gap: 6px; }
.route-pill { display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border-radius: var(--r-pill);
  background: var(--card-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-soft); transition: var(--fast); }
.route-pill i { font-size: 15px; }
.route-pill:hover { border-color: var(--primary-soft); }
.route-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: var(--sh-primary); }
.leaflet-map-container { flex: 1; min-height: 0; background: var(--card-2); }
.leaflet-container { font-family: 'Plus Jakarta Sans', sans-serif !important; }

/* ── Toasts ────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 22px; right: 22px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-md); background: var(--ink); color: var(--paper-2);
  font-size: 13.5px; font-weight: 500; box-shadow: var(--sh-lg); max-width: 360px; animation: toastIn .35s var(--ease) both; }
.toast i { font-size: 18px; }
.toast.success { background: var(--primary-deep); }
.toast.error { background: var(--accent-deep); }
.toast.leaving { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px) scale(.96); } }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(34,26,19,.42); backdrop-filter: blur(6px); animation: fadeIn .25s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card { width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto; background: var(--card); border-radius: var(--r-xl);
  box-shadow: var(--sh-lg); border: 1px solid var(--line); animation: modalIn .35s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 21px; }
.modal-close { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--warm-mute); transition: var(--fast); }
.modal-close:hover { background: var(--card-2); color: var(--ink); }
.modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-field { display: flex; flex-direction: column; gap: 6px; }
.modal-field-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--warm-mute); }
.modal-field-input { padding: 10px 13px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--card-2); transition: var(--fast); -webkit-appearance: none; }
.modal-field-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); background: var(--card); }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }
.btn-ghost { padding: 10px 18px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600; color: var(--ink-soft); transition: var(--fast); }
.btn-ghost:hover { background: var(--card-2); }
.btn-primary { display: inline-flex; align-items: center; gap: 7px; padding: 10px 20px; border-radius: var(--r-pill);
  background: linear-gradient(150deg, var(--primary), var(--primary-deep)); color: var(--paper-2); font-size: 13.5px; font-weight: 700; transition: var(--fast); box-shadow: var(--sh-primary); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-icon-wrap { display: grid; place-items: center; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  body { overflow: auto; }
  .app-main { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - var(--header-h) - var(--banner-h)); }
  .pane-chat { height: 72vh; }
  .pane-results { min-height: 70vh; }
  .header-inner { padding: 0 14px; }
  .brand-tagline { display: none; }
  .save-trip-btn span { display: none; }
  .leaflet-map-container { min-height: 360px; }
}
@media (max-width: 640px) {
  .hotels-list { grid-template-columns: 1fr; }   /* single column on narrow screens */
}
@media (max-width: 480px) {
  .cost-meter span { display: none; }
  .filter-bar { gap: 10px; }
}

/* ── Print (Save trip → PDF) ───────────────────────────────── */
@media print {
  .app-header, .api-banner, .pane-chat, .tabs-bar, .filter-bar, .map-toolbar, .toast-container, .ambient-bg, .send-btn, .chat-input-wrap { display: none !important; }
  body { overflow: visible; background: #fff; }
  .app-main { display: block; height: auto; }
  .pane-results { border: none; box-shadow: none; }
  .tab-panel { display: block !important; }
  .hotel-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
}
