/* 52 wknds Stay Advisor. One stylesheet for the chat (body.chatapp), admin and blind-compare pages.
   Brand: ocean-blue gradient (deep blue to aqua), aqua script wordmark, panda mascot. */
:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --script: "Yellowtail", "Brush Script MT", cursive;

  --bg: #f3f7fa; --panel: #ffffff; --ink: #0f1f33; --muted: #5a6b80; --line: #e1e8ef;
  --accent: #1769d1; --accent-ink: #ffffff; --me: #ffffff; --me-ink: #0f1f33; --bot: rgba(244, 251, 255, .86);
  --err: #a3332a; --err-bg: #fdeceb; --chip: #eaf4fa;
  --good: #128a5a; --good-bg: #e6f6ee; --warn: #b26a00; --warn-bg: #fff3df;
  --ocean: linear-gradient(180deg, #29a6c6 0%, #2780b9 46%, #24599b 100%);
  --aqua: #8ff3f3; --black: #0d1117;
  --shadow-1: 0 1px 2px rgba(10, 30, 60, .06), 0 2px 8px rgba(10, 30, 60, .06);
  --shadow-2: 0 4px 14px rgba(10, 30, 60, .12), 0 14px 40px rgba(10, 30, 60, .14);
  --frost: rgba(255, 255, 255, .16); --frost-line: rgba(255, 255, 255, .28); --on-ocean: #ffffff;
  --r-bubble: 22px; --r-card: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1624; --panel: #11233a; --ink: #e9f1f8; --muted: #9db0c4; --line: #20364f;
    --accent: #5aa8ff; --accent-ink: #06121f; --me: #e6f5fb; --me-ink: #0b1a2b; --bot: rgba(17, 37, 60, .82);
    --err: #ff9b8a; --err-bg: #3a201c; --chip: #16304b;
    --good: #5fd39b; --good-bg: #123526; --warn: #ffbf5e; --warn-bg: #3a2a10;
    --ocean: linear-gradient(180deg, #0f4e6e 0%, #0d3657 50%, #081d36 100%);
    --frost: rgba(255, 255, 255, .08); --frost-line: rgba(255, 255, 255, .16);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
    --shadow-2: 0 4px 14px rgba(0, 0, 0, .35), 0 14px 40px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  --bg: #0a1624; --panel: #11233a; --ink: #e9f1f8; --muted: #9db0c4; --line: #20364f;
  --accent: #5aa8ff; --accent-ink: #06121f; --me: #e6f5fb; --me-ink: #0b1a2b; --bot: rgba(17, 37, 60, .82);
  --err: #ff9b8a; --err-bg: #3a201c; --chip: #16304b;
  --good: #5fd39b; --good-bg: #123526; --warn: #ffbf5e; --warn-bg: #3a2a10;
  --ocean: linear-gradient(180deg, #0f4e6e 0%, #0d3657 50%, #081d36 100%);
  --frost: rgba(255, 255, 255, .08); --frost-line: rgba(255, 255, 255, .16);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-underline-offset: 2px; }
button { font: inherit; cursor: pointer; color: inherit; }
input, textarea, select { font: inherit; font-size: 16px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; width: 100%; }
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 11px 18px; font-weight: 600; min-height: 44px; transition: transform .15s var(--ease), filter .15s; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.btn:disabled { opacity: .5; cursor: default; }
.muted { color: var(--muted); font-size: 14px; }
.hidden { display: none !important; }
.note { padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { max-width: 420px; margin: 12vh auto 0; padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
.center h1 { margin: 0; font-size: 24px; }

/* ---------- messages (shared with admin and compare) ---------- */
.msg { max-width: 92%; padding: 11px 15px; border-radius: var(--r-bubble); overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--me); color: var(--me-ink); border-bottom-right-radius: 6px; white-space: pre-wrap; box-shadow: var(--shadow-1); }
.msg.assistant { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.friend { align-self: flex-start; background: var(--chip); border-bottom-left-radius: 6px; white-space: pre-wrap; }
.msg .who { display: block; font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 2px; white-space: normal; }
.msg.user .who { color: var(--muted); }
.msg.draft { opacity: .92; }
.msg.error { align-self: stretch; background: var(--err-bg); color: var(--err); border-radius: 14px; }
.msg p { margin: 0 0 10px; } .msg p:last-child { margin-bottom: 0; }
.msg p.h { font-weight: 700; margin-top: 6px; }
.msg ul, .msg ol { margin: 0 0 10px; padding-left: 20px; }
.msg li { margin: 2px 0; }
.tbl { overflow-x: auto; margin: 6px 0 10px; -webkit-overflow-scrolling: touch; }
.tbl table { border-collapse: collapse; font-size: 14px; }
.tbl td, .tbl th { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.status { color: var(--muted); font-size: 14px; }
.poll { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.poll b { font-size: 14px; }
.poll button { text-align: left; background: var(--chip); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; min-height: 44px; }
.poll button.mine { border-color: var(--accent); font-weight: 700; }
.poll button:disabled { cursor: default; }
.poll .muted { font-size: 12px; }

/* ---------- welcome / sign-in ---------- */
.welcome { min-height: 100dvh; background: var(--ocean); color: var(--on-ocean); display: flex; flex-direction: column; align-items: center;
  padding: calc(env(safe-area-inset-top) + 7vh) 16px calc(env(safe-area-inset-bottom) + 16px); text-align: center; }
.wordmark { display: inline-flex; align-items: baseline; gap: 2px; line-height: 1; color: #fff; user-select: none; }
.wordmark b { font: 800 44px/1 var(--font); letter-spacing: -.03em; }
.wordmark span { font: 400 42px/1 var(--script); color: var(--aqua); margin-left: 2px; }
.wordmark.sm b { font-size: 22px; } .wordmark.sm span { font-size: 22px; }
.welcome .tagline { margin: 8px 0 0; color: color-mix(in srgb, var(--aqua) 80%, #fff); font-size: 16px; letter-spacing: .02em; }
.hero-panda { width: 128px; height: auto; margin: 6vh 0 10px; filter: drop-shadow(0 12px 18px rgba(0, 20, 50, .3)); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
.welcome h1 { margin: 6px 0 6px; font: 600 30px/1.15 var(--serif); letter-spacing: -.01em; max-width: 340px; }
.welcome #loginIntro { color: rgba(255, 255, 255, .86); margin: 0 auto; max-width: 340px; font-size: 15px; }
.login-card { margin-top: auto; width: 100%; max-width: 440px; background: #fff; color: #0f1f33; border-radius: 28px; padding: 14px; box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; gap: 10px; text-align: left; }
.login-card input { background: #f3f7fa; border-color: #e1e8ef; color: #0f1f33; }
.login-card .btn { background: var(--black); color: #fff; }
.login-card .msg.error { max-width: none; margin: 0; }
/* Phone sign-in (static/auth.js) */
#signin, #nameStep { display: flex; flex-direction: column; gap: 10px; }
#signin.hidden, #nameStep.hidden { display: none !important; }
.signin-lead { margin: 0; font-size: 14px; }
.signin-phone { display: flex; gap: 8px; }
.signin-phone select { width: auto; flex: 0 0 auto; }
.signin-phone input { flex: 1; min-width: 0; }
.login-card select { background: #f3f7fa; border-color: #e1e8ef; color: #0f1f33; }
.signin-links { display: flex; justify-content: space-between; }
.signin-links button { background: none; border: 0; padding: 4px 0; font-size: 13px; color: var(--accent); }
/* Referral code after a new sign-up (static/auth.js ensureAccount) */
#signin .linkbtn { background: none; border: 0; padding: 6px 0; font-size: 13.5px; color: var(--accent); display: block; margin: 4px auto 0; }
#signin .refcode { text-transform: uppercase; letter-spacing: .2em; text-align: center; font-size: 18px; }

/* ---------- chat shell ---------- */
body.chatapp { background: var(--ocean) fixed; background-color: #24599b; }
body.chatapp .app { display: flex; flex-direction: column; height: 100dvh; max-width: 760px; margin: 0 auto; position: relative; }
.chatapp header { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 8px) 12px 8px; color: var(--on-ocean); }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; background: #d6f4f8 url("/static/img/panda-avatar.png") center/cover; box-shadow: 0 0 0 2px rgba(255, 255, 255, .6); }
.chatapp header .tt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chatapp header .tt small { font-size: 12px; opacity: .8; line-height: 1.2; }
.chatapp header select { background: transparent; color: #fff; border: 0; padding: 0 22px 0 0; font-weight: 700; font-size: 16px; width: auto; max-width: 100%;
  appearance: none; -webkit-appearance: none; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='white' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center; min-height: 24px; }
.chatapp header select option { color: #0f1f33; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--frost-line); background: var(--frost); color: #fff; display: inline-grid; place-items: center; flex: none;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform .15s var(--ease), background .2s; }
.iconbtn:active { transform: scale(.94); }
.iconbtn svg { width: 20px; height: 20px; }

.groupbar { margin: 0 12px 8px; padding: 8px 12px; font-size: 13px; color: #fff; background: var(--frost); border: 1px solid var(--frost-line); border-radius: 16px;
  display: flex; gap: 8px; align-items: center; justify-content: space-between; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.groupbar .mode { padding: 6px 12px; font-size: 12px; white-space: nowrap; color: #fff; border-color: var(--frost-line); min-height: 36px; }
.groupbar .mode.on { background: rgba(255, 255, 255, .2); }
.invite { margin: 0 12px 8px; padding: 12px 14px; border-radius: 20px; font-size: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--panel); box-shadow: var(--shadow-2); }
.invite .row { display: flex; gap: 8px; }

/* trip at a glance */
.glance { margin: 0 12px 6px; padding: 8px 12px 10px; font-size: 13px; color: #fff; background: var(--frost); border: 1px solid var(--frost-line); border-radius: 18px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.gitems { display: flex; gap: 4px 16px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.gitems::-webkit-scrollbar { display: none; }
.gi small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.gi.empty { opacity: .6; }
.stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 8px; }
.stages span { font-size: 10px; text-align: center; color: rgba(255, 255, 255, .7); position: relative; padding-top: 7px; }
.stages span::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); transition: background .6s var(--ease); }
.stages span.done::before, .stages span.now::before { background: var(--aqua); }
.stages span.now { color: #fff; font-weight: 700; }

/* log */
.chatapp .log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 12px 12px 18px; display: flex; flex-direction: column; gap: 14px; scroll-padding-bottom: 20px; }
.chatapp .msg { font-size: 15.5px; }
.chatapp .msg.user { background: var(--me); max-width: 84%; }
.chatapp .msg.assistant { background: var(--bot); border: 1px solid var(--frost-line); box-shadow: var(--shadow-1); position: relative; margin-left: 42px; max-width: calc(100% - 42px);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); }
.chatapp .msg.assistant::before { content: ""; position: absolute; left: -42px; bottom: 0; width: 32px; height: 32px; border-radius: 50%;
  background: #d6f4f8 url("/static/img/panda-avatar.png") center/cover; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.chatapp .msg.friend { background: rgba(255, 255, 255, .7); color: #0f1f33; }
.chatapp .msg.error { background: var(--err-bg); }
.chatapp .msg .who { color: var(--accent); }

/* entrance motion: only on new items (not when the chat is redrawn) */
.enter { animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadein .45s var(--ease) both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.cards-block.fade-in { animation: rise .55s var(--ease) both; animation-delay: .08s; }

/* typing indicator */
.typing { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .35; animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.typing .tstatus { font-size: 14px; color: var(--muted); transition: opacity .25s; }
.draft .typing { padding: 8px 0 0; }

/* "new message" pill */
.newpill { position: absolute; left: 50%; transform: translate(-50%, 10px); bottom: 100%; margin-bottom: 8px; opacity: 0; pointer-events: none; z-index: 3;
  background: var(--black); color: #fff; border: 0; border-radius: 999px; padding: 9px 16px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-2);
  transition: opacity .25s, transform .3s var(--ease); min-height: 40px; }
.newpill.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* empty-trip hero */
.hello { align-self: center; text-align: center; color: #fff; padding: 4vh 8px 4px; }
.hello img { width: 104px; height: auto; filter: drop-shadow(0 10px 16px rgba(0, 20, 50, .3)); animation: bob 4s ease-in-out infinite; }
.hello h2 { margin: 8px 0 2px; font: 600 26px/1.2 var(--serif); }
.hello p { margin: 0; opacity: .85; font-size: 15px; }

/* bottom dock: suggested replies + composer */
.dock { position: relative; padding: 0 10px calc(env(safe-area-inset-bottom) + 10px); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; background: rgba(255, 255, 255, .92); color: #0f1f33; border: 1px solid rgba(255, 255, 255, .6); border-radius: 999px; padding: 10px 16px; font-size: 14px; font-weight: 500;
  min-height: 44px; box-shadow: var(--shadow-1); transition: transform .15s var(--ease), background .2s; white-space: nowrap; }
.chip:active { transform: scale(.96); }
.chips .chip { animation: rise .45s var(--ease) both; }
.chips .chip:nth-child(2) { animation-delay: .06s; } .chips .chip:nth-child(3) { animation-delay: .12s; } .chips .chip:nth-child(4) { animation-delay: .18s; }
.chip.pdf { background: var(--black); color: #fff; border-color: var(--black); font-weight: 600; }
.chip.pdf:disabled { opacity: .7; }
.composer { display: flex; align-items: flex-end; gap: 6px; background: #fff; color: #0f1f33; border-radius: 28px; padding: 6px; box-shadow: var(--shadow-2); }
.composer textarea { flex: 1; resize: none; border: 0; background: transparent; color: #0f1f33; padding: 11px 6px; min-height: 44px; max-height: 140px; line-height: 1.4; border-radius: 0; }
.composer textarea:focus { outline: none; }
.composer textarea::placeholder { color: #7b8a9c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: #33465c; display: grid; place-items: center; flex: none; transition: transform .15s var(--ease), background .2s; }
.cbtn:hover { background: #eef3f7; }
.cbtn svg { width: 22px; height: 22px; }
.cbtn.send { background: var(--black); color: #fff; }
.cbtn.send:disabled { background: #c7d0da; cursor: default; }
.cbtn:active { transform: scale(.92); }
.cbtn.listening { background: #ffe3e0; color: #c0392b; }
.askbtn { flex: none; border-radius: 999px; border: 1px solid #d6e0ea; background: #f3f7fa; color: #0f1f33; padding: 0 12px; height: 44px; font-size: 13px; font-weight: 600; }
.menu { position: absolute; left: 10px; bottom: calc(100% + 4px); background: var(--panel); color: var(--ink); border-radius: 18px; box-shadow: var(--shadow-2); padding: 6px; z-index: 4;
  display: flex; flex-direction: column; min-width: 200px; transform-origin: bottom left; animation: pop .2s var(--ease) both; }
.menu button { text-align: left; background: none; border: 0; padding: 12px 14px; border-radius: 12px; min-height: 44px; }
.menu button:hover { background: var(--chip); }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(6px); } to { opacity: 1; transform: none; } }

/* thumbs */
.fb { display: flex; gap: 2px; margin-top: 6px; }
.fb button { background: none; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: 14px; padding: 4px 8px; min-width: 36px; min-height: 32px; opacity: .45; transition: opacity .2s; }
.fb button:hover { opacity: .8; }
.fb button.on { opacity: 1; border-color: var(--line); }

/* ---------- cards under a reply ---------- */
.cards-block { margin: 12px 0 4px; }
.ctitle { font-weight: 700; font-size: 13px; margin-bottom: 8px; letter-spacing: .01em; }
.chatapp .msg.assistant:has(.cards-block) { padding-bottom: 12px; }
.rail { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 2px; padding: 2px 2px 8px; margin: 0 -4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: none; }
.strip.rail > figure { width: 72%; max-width: 260px; }
.strip figure, .area figure, .stay figure { margin: 0; position: relative; }
.strip img, .strip .ph { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 16px; display: block; }
figcaption { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; padding: 14px 10px 6px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55)); border-radius: 0 0 16px 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
figcaption a { color: #fff; }
.ph { background: linear-gradient(135deg, #bfe7f2, #8cc6e6 60%, #6aa4d8); border-radius: 16px; aspect-ratio: 4/3; display: block; position: relative; }
.ph::after { content: ""; position: absolute; inset: 0; background: url("/static/img/panda-lounge.png") center/34% no-repeat; opacity: .5; }
.rail.areas .rail-dots { display: none; }
.dotsnav { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.dotsnav i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .3s var(--ease), background .3s; }
.dotsnav i.on { width: 18px; background: var(--accent); }

/* area cards: swipeable */
/* Area and hotel cards share one size and look (hotel cards are "area hotel"). */
.area { width: 82%; max-width: 300px; background: var(--panel); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-2); border: 0; display: flex; flex-direction: column; }
.area img, .area .ph { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; border-radius: 0; }
.area .abody { padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.area .pc { font-size: 12.5px; gap: 3px; margin: 6px 0 0; }
.area .pc li { line-height: 1.35; }
.area .hact { margin-top: auto; padding-top: 10px; }
.lean { position: absolute; top: 10px; left: 10px; background: var(--black); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; box-shadow: var(--shadow-1); }
.lean.stretch { background: var(--warn-bg); color: var(--warn); }
.aname, .sname { font: 600 19px/1.2 var(--serif); margin: 0; color: var(--ink); }
.aname a, .sname a { color: inherit; text-decoration: none; }
.suits { font-size: 13px; color: var(--muted); }
.pc { list-style: none; padding: 0; margin: 6px 0 2px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.pc li { padding-left: 24px; position: relative; line-height: 1.4; }
.pc li::before { position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.pc li.pro::before { content: "✓"; color: var(--good); background: var(--good-bg); }
.pc li.con::before { content: "!"; color: var(--warn); background: var(--warn-bg); }
.drive, .srcline { font-size: 12px; color: var(--muted); }
.srcline a { color: var(--muted); }
.maplink { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; text-decoration: none; min-height: 32px; }
.aact { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
.aact .btn { flex: 1; padding: 10px 12px; font-size: 14px; min-height: 44px; }
.aact .btn.dark { background: var(--black); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .aact .btn.dark, :root:not([data-theme="light"]) .lean { background: #e9f1f8; color: #0b1a2b; } }

/* compare */
.cmpwrap { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 4px 4px 8px; }
table.cmp { width: 100%; }
table.cmp th { text-transform: none; font-size: 12px; font-weight: 700; color: var(--ink); letter-spacing: 0; }
table.cmp td.mk { text-align: center; }
.mkp { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 800; font-size: 12px; }
td.mk.yes .mkp { color: var(--good); background: var(--good-bg); }
td.mk.no .mkp { color: var(--warn); background: var(--warn-bg); }
td.mk.partly .mkp, td.mk.unknown .mkp { color: var(--muted); background: var(--chip); }
table.cmp td.mk { font-weight: 700; }
table.cmp td.mk.yes { color: var(--good); } table.cmp td.mk.no { color: var(--warn); } table.cmp td.mk.unknown, table.cmp td.mk.partly { color: var(--muted); }
.whose { font-size: 11px; color: var(--muted); }
.legend { font-size: 11px; color: var(--muted); margin: 6px 8px 0; }

/* stay cards: two swipeable stacks (52wknds first, then the web). They sit under the reply with no bubble
   behind them, straight on the chat background, and run edge to edge: the first card starts at the left gutter. */
.cards-out { align-self: stretch; margin: -4px -12px 0; min-width: 0; }
.cards-out .cards-block { margin: 0; }
.stays-head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.stays-head .sh-ico { width: 34px; height: 34px; border-radius: 12px; background: var(--chip); display: grid; place-items: center; flex: none; }
.stays-head b { display: block; font: 600 17px/1.2 var(--serif); }
.stays-head small { display: block; font-size: 12.5px; color: var(--muted); }
.hstack { margin-top: 10px; }
.hs-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 2px 8px; }
.hs-head b { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; display: inline-flex; align-items: center; gap: 6px; }
.hs-head .hs-n { font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--chip); display: inline-grid; place-items: center; }
.hs-head small { font-size: 12px; color: var(--muted); flex-basis: 100%; margin-top: -4px; }
.brand52 { color: var(--accent); }
.livedot { width: 8px; height: 8px; border-radius: 50%; background: #5ff0a8; box-shadow: 0 0 0 3px rgba(95, 240, 168, .25); display: inline-block; }
.rail.hotels { gap: 12px; }
/* In the chat: white headings straight on the ocean background, cards from the left gutter to the right edge. */
.chatapp .cards-out .stays-head, .chatapp .cards-out .hs-head { color: #fff; margin-left: 14px; margin-right: 14px; }
.chatapp .cards-out .stays-head small, .chatapp .cards-out .hs-head small { color: rgba(255, 255, 255, .82); }
.chatapp .cards-out .stays-head .sh-ico { background: var(--frost); border: 1px solid var(--frost-line); color: #fff; }
.chatapp .cards-out .hs-head .hs-n { background: rgba(255, 255, 255, .2); }
.chatapp .cards-out .brand52 { color: var(--aqua); }
.cards-out .rail { margin: 0; padding: 2px 12px 12px; scroll-padding: 0 12px; gap: 12px; align-items: flex-start; }
.chatapp .cards-out .ctitle { color: #fff; margin: 0 14px 8px; }
.chatapp .cards-out .dotsnav i { background: rgba(255, 255, 255, .35); }
.chatapp .cards-out .dotsnav i.on { background: #fff; }

#log .area { cursor: pointer; }
.rail.hotels { align-items: flex-start; }
.area.picked { box-shadow: 0 0 0 2px var(--aqua), var(--shadow-2); }
.hotel.stretch { box-shadow: 0 0 0 2px #ffd38a, var(--shadow-2); }
.area figure, .area .hasbadge { position: relative; margin: 0; }
.area figcaption { display: none; }
.htag { position: absolute; top: 10px; left: 10px; z-index: 2; background: rgba(13, 17, 23, .78); color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.htag.stretch { background: #ffe2a8; color: #6b3d00; }
.badge { position: absolute; left: 10px; bottom: 10px; z-index: 2; background: rgba(13, 17, 23, .62); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: inline-flex; gap: 3px; align-items: center; }
.badge .star { color: #ffd25e; }
.badge i { font-style: normal; font-weight: 400; opacity: .8; margin-left: 2px; }
.htop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.area .aname { font: 650 16px/1.25 var(--font); letter-spacing: -.01em; min-width: 0; }
.hotel .hrate { flex: none; text-align: right; }
.hprice b { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.hprice span { font-size: 11.5px; color: var(--muted); margin-left: 2px; }
.hprice.none { font-size: 12px; color: var(--muted); font-weight: 500; }
.area .suits { font-size: 12.5px; color: var(--muted); }
.terms { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.terms.ok { color: var(--good); }
.terms.warn { color: var(--warn); }
.overb { font-size: 12px; color: var(--warn); font-weight: 600; }
.take52 { margin-top: 8px; padding: 9px 12px 10px; border-radius: 14px; background: var(--chip); }
.take52 .tk-h { font: 600 13.5px/1.2 var(--serif); display: flex; gap: 6px; align-items: center; }
.take52 .tk-h::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: #d6f4f8 url("/static/img/panda-avatar.png") center/cover; flex: none; }
.take52 p { margin: 5px 0 0; font-size: 13px; line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.area.open .take52 p { -webkit-line-clamp: unset; display: block; }
.hmore { display: none; flex-direction: column; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.area.open .hmore { display: flex; animation: fadein .3s var(--ease) both; }
.air { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink); }
.air svg { flex: none; width: 13px; height: 13px; color: var(--accent); }
.watch { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.4; }
.watch span { flex: none; width: 66px; color: var(--muted); }
.roomsel { position: relative; display: block; }
.roomsel > span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.roomsel select { appearance: none; -webkit-appearance: none; padding: 9px 34px 9px 12px; font-size: 13px; border-radius: 12px; min-height: 42px; text-overflow: ellipsis; }
.roomsel .chev { position: absolute; right: 11px; bottom: 12px; pointer-events: none; }
.hnote { font-size: 10.5px; line-height: 1.35; color: var(--muted); }
.hask { align-self: flex-start; background: none; border: 0; padding: 4px 0; color: var(--accent); font-size: 13px; font-weight: 600; min-height: 32px; }
.hact { display: flex; align-items: center; gap: 2px; margin-top: 10px; }
.area .air svg { width: 13px; height: 13px; }
.hicon { flex: none; width: 58px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; padding: 2px; min-height: 44px; font-size: 11px; font-weight: 600; color: var(--ink); }
.hicon svg { width: 18px; height: 18px; color: var(--accent); }
.hicon.on, .hicon.on svg { color: var(--good); }
.area.open [data-act="hdetail"] svg { color: var(--ink); }
.hbook { flex: 1; display: grid; place-items: center; margin-left: 6px; padding: 0 12px; min-height: 44px; border: 0; border-radius: 999px; background: var(--black); color: #fff;
  font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hbook:active, .hicon:active { transform: scale(.97); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hbook { background: #e9f1f8; color: #0b1a2b; } }
.chev { width: 18px; height: 18px; flex: none; color: var(--muted); }
/* In-chat Google map: a tappable bar inside the reply bubble, after its cards; the map loads inside the chat on tap */
.mapcard { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--panel); overflow: hidden; box-shadow: var(--shadow-1); }
.mapbar { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 52px; background: none; border: 0; color: var(--ink); text-align: left; }
.mapbar .mi { width: 34px; height: 34px; border-radius: 10px; background: var(--chip); display: grid; place-items: center; flex: none; color: var(--accent); }
.mapbar b { display: block; font-size: 14.5px; }
.mapbar small { display: block; font-size: 12px; color: var(--muted); }
.mapbar .chev { margin-left: auto; transition: transform .35s var(--ease); }
.mapcard.open .mapbar .chev { transform: rotate(180deg); }
.mapview { height: 0; transition: height .4s var(--ease); }
.mapcard.open .mapview { height: 340px; }
.mapview .gmap { width: 100%; height: 100%; }
.mapkey { display: none; flex-wrap: wrap; gap: 6px 12px; padding: 8px 14px 10px; font-size: 12px; color: var(--muted); }
.mapcard.open .mapkey { display: flex; }
.mapkey i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.mapnote { padding: 16px; font-size: 13px; color: var(--muted); }

/* legacy card classes (kept for the admin and compare pages' read-only cards) */
.vcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.price { font-weight: 700; margin-top: 4px; }
.price span { font-weight: 400; font-size: 12px; }
.price small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.price.none { font-weight: 400; font-size: 12px; color: var(--muted); }

/* ---------- compare page ---------- */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .pair { grid-template-columns: 1fr; } }
.pair .msg { max-width: 100%; }
.side-label { font-weight: 700; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.vote { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0 4px; }
.vote textarea { height: 60px; }

/* ---------- admin ---------- */
.wide { max-width: 1100px; margin: 0 auto; padding: 16px; }
.cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; min-width: 140px; }
.card b { display: block; font-size: 20px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--panel); border-radius: 12px; overflow: hidden; }
table.list td, table.list th { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
table.list tr.click:hover { background: var(--chip); cursor: pointer; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs .btn.ghost.on { background: var(--chip); }
.meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.story { font-size: 13px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 8px 10px; margin-top: 8px; }
.story p { margin: 4px 0; }
.story.muted { color: var(--muted); border-left-color: var(--line); }
.guidebar { margin: 10px 0 12px; padding: 10px 14px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; background: var(--panel); font-size: 14px; }
.guidebar b { font-size: 15px; }

@media (min-width: 700px) {
  .chatapp .msg { max-width: 82%; }
  .chatapp .msg.assistant { max-width: calc(88% - 42px); }
  .area { width: 46%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.groupbar > span { font-size: 12px; line-height: 1.4; }
.composer:has(#ask:not(.hidden)) #mic { display: none; }

/* Cards-first replies: the reply's one line sits on the ocean as a caption (no bubble), the cards run across the
   chat under it, and one slim strip under the cards holds the folded map bar, the sources and the tappable replies. */
.chatapp .msg.assistant.cardsfirst { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  color: var(--on-ocean); font-weight: 600; padding: 6px 4px 0; align-self: stretch; }
.chatapp .msg.assistant.cardsfirst::before { bottom: auto; top: 2px; }
.chatapp .msg.assistant.cardsfirst a, .chatapp .msg.assistant.cardsfirst b, .chatapp .msg.assistant.cardsfirst strong { color: inherit; }
.chatapp .msg.assistant.cardsfirst + .cards-out { margin-top: -6px; }
.cardstrip { align-self: stretch; margin-top: -8px; padding: 10px 12px 12px; border-radius: 18px; background: var(--bot); border: 1px solid var(--frost-line);
  box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 8px; -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); }
.cardstrip .cards-block { margin: 0; }
.cardstrip .mapcard { margin: 0; }
.stripsrc { font-size: 11.5px; line-height: 1.35; color: var(--muted); padding: 0 2px; }
.cardstrip .stripchips { padding: 0; }
.cardstrip .stripchips:empty { display: none; }
.cardstrip .chip { padding: 8px 13px; font-size: 13.5px; background: var(--panel); border: 1px solid var(--line); box-shadow: none; }

/* "Around your stay": place cards in the same size and look as hotel cards, then one white panel with the
   one-liners, the essentials and what was left out. A "Near" line on hotel cards, the top 3 under Details. */
.nearline { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; font-weight: 600; color: var(--accent); margin-top: 4px; line-height: 1.35; }
.nearline svg, .pdist svg { flex: none; width: 13px; height: 13px; margin-top: 2px; }
.nearmore, .nearpanel { display: flex; flex-direction: column; gap: 2px; }
.nm-h { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 2px; }
.nm-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 5px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.nm-row:first-of-type { border-top: 0; }
.nm-row span:last-child { color: var(--muted); white-space: nowrap; }
.pdist { display: flex; gap: 6px; font-size: 13.5px; margin-top: 6px; color: var(--ink); }
.pdist svg { color: var(--accent); }
.pdist small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.take52.why .tk-h::before { display: none; }
.besttime { font-size: 12.5px; font-weight: 600; color: var(--good); margin-top: 6px; }
.nearpanel { margin: 4px 12px 8px; padding: 10px 14px 12px; background: var(--panel); border-radius: var(--r-card); box-shadow: var(--shadow-1); }
.leftout { font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 6px; }
.cards-out .cards-block.nearby { margin-top: 12px; }
a.hicon { text-decoration: none; }

/* Trip sketch (first reply): one light card. Title and dates, "I've read this as" with a Change button that opens
   one editable line per item, at most one urgent line, three short rows, and More with the sources and topics. */
.sketchblock { padding: 0 12px 10px; }
.sketch { background: var(--panel); color: var(--ink); border-radius: 24px; padding: 20px 20px 4px; box-shadow: var(--shadow-2); max-width: 520px; }
.sketch .skt { font: 650 24px/1.15 var(--serif); letter-spacing: -.01em; margin: 0; }
.sketch .skd { font-size: 14.5px; color: var(--muted); margin-top: 4px; }
.skread { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; }
.skread p { margin: 0; flex: 1; font-size: 15px; line-height: 1.45; color: var(--muted); }
.skchange { flex: none; border: 1.5px solid var(--accent); color: var(--accent); background: none; border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: 13.5px; min-height: 34px; }
.skchange.on { background: var(--accent); color: var(--accent-ink); }
.skedit { display: none; margin-top: 12px; border: 1px solid var(--line); border-radius: 16px; padding: 4px 14px 12px; }
.skedit.open { display: block; }
.skh { font-size: 12.5px; color: var(--muted); padding: 8px 0 2px; }
.skrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.skh + .skrow { border-top: 0; }
.skl { width: 66px; flex: none; font-size: 13px; color: var(--muted); }
.skv { flex: 1; min-width: 0; }
.skv.empty { color: var(--warn); }
.skrow.edited .skv::after { content: " · changed"; color: var(--good); font-size: 12px; }
.sked { background: none; border: 0; color: var(--accent); font-weight: 600; font-size: 13.5px; padding: 4px 0 4px 6px; min-height: 32px; }
.skin { display: none; flex-basis: 100%; gap: 8px; }
.skin input { padding: 8px 12px; border-radius: 12px; }
.skrow.editing .skin { display: flex; }
.skrow.editing .sked, .skrow.editing .skv { display: none; }
.skerr { color: var(--err); font-size: 13px; }
.skerr:empty { display: none; }
.skdone { width: 100%; margin-top: 8px; background: var(--black); color: #fff; border: 0; border-radius: 999px; padding: 10px; font-weight: 600; min-height: 44px; }
.skurgent { margin: 16px 0 2px; background: var(--warn-bg); color: var(--ink); border-radius: 14px; padding: 12px 14px; font-size: 15.5px; line-height: 1.4; font-weight: 600; }
.skitems { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.skitem { display: flex; gap: 12px; align-items: baseline; font-size: 16.5px; line-height: 1.4; }
.ske { flex: none; width: 22px; font-size: 18px; }
.skmore { margin-top: 16px; border-top: 1px solid var(--line); }
.skmorebtn { display: flex; width: 100%; gap: 10px; align-items: center; background: none; border: 0; padding: 12px 0; color: var(--accent); text-align: left; min-height: 44px; }
.skmorebtn span { flex: 1; min-width: 0; color: var(--muted); font-size: 13.5px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skmorebtn i { font-style: normal; color: var(--muted); transition: transform .2s var(--ease); }
.skmore.open .skmorebtn i { transform: rotate(180deg); }
.skmorebody { display: none; padding-bottom: 12px; }
.skmore.open .skmorebody { display: block; }
.sktopics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.sktopics .chip { padding: 7px 12px; font-size: 13.5px; background: var(--chip); border: 0; border-radius: 999px; color: var(--ink); }
.sksrc { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.sksrc b { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.stripq { font-size: 15.5px; font-weight: 600; color: var(--ink); padding: 0 2px; }
.stripq p { margin: 0 0 4px; }

/* Flights card: live fares from 52wknds (search_flights), onward then return. */
.cards-block.flights { background: var(--panel); border-radius: var(--r-card); box-shadow: var(--shadow-2); padding: 14px; max-width: 560px; }
.fl-way { margin-top: 12px; }
.fl-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.fl { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.fl.picked { border-color: var(--good); background: var(--good-bg); }
.fl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fl-top b { font-size: 14.5px; }
.fl-no { font-size: 12px; color: var(--muted); }
.fl .htag { position: static; font-size: 11px; padding: 2px 8px; }
.fl-price { margin-left: auto; font-weight: 700; font-size: 15px; }
.fl-times { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 13.5px; }
.fl-dur { color: var(--muted); font-size: 12.5px; text-align: center; flex: 1; }
.fl-meta { margin-top: 4px; font-size: 12px; color: var(--muted); }
.fl-book { margin-top: 4px; font-size: 12.5px; color: var(--muted); text-align: center; }
.fl.pickable { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.fl.pickable:hover { border-color: var(--muted); }
.fl.pickable:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; }
.fl.chosen { border-color: var(--accent, #2563eb); box-shadow: 0 0 0 1px var(--accent, #2563eb) inset; }
.fl-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex: none; box-sizing: border-box; }
.fl.chosen .fl-radio { border-color: var(--accent, #2563eb); background: radial-gradient(circle, var(--accent, #2563eb) 45%, transparent 50%); }
.fl-bookbtn { width: 100%; margin: 8px 0 0; }
.fl-bookbtn:disabled { opacity: .5; cursor: not-allowed; }
