/* WeTrip 网页对话留资页 —— 一期纯静态。
   调色:墨绿 ink / 雾白 mist / 顾问气泡 pale / 唯一的强调色 amber,只用在「方案已备好」那张卡和摘要条填满的格子上。 */
:root {
  --ink: #15302f;
  --ink-soft: #4d6360;
  --mist: #eef2ef;
  --paper: #ffffff;
  --pale: #d9ebe5;
  --line: #cfdad6;
  --amber: #b35a10;
  --amber-ink: #5a2d05;
  --amber-soft: #fbe9d6;
  --radius: 18px;
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

/* ── 顶部:品牌 + 行程卡 ─────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 2;
  background: var(--paper);
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--ink);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; left: 9px; top: 9px; width: 16px; height: 16px;
  border-radius: 50%; border: 3px solid var(--pale); border-right-color: var(--amber);
}
.brand-name { font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.brand-role { font-size: 13px; color: var(--ink-soft); }

.ticket {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 6px;
}
.ticket-slot {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  min-width: 0;
  transition: background .25s, border-color .25s;
}
.ticket-slot.filled {
  border-style: solid;
  border-color: var(--amber);
  background: var(--amber-soft);
}
.ticket-label { display: block; font-size: 11px; color: var(--ink-soft); }
.ticket-value {
  display: block; font-weight: 700; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ticket-slot.filled .ticket-value { color: var(--amber-ink); }

/* ── 对话 ───────────────────────────────────────────────────────── */
.thread {
  flex: 1;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: var(--radius);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg.in { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.msg.out { align-self: flex-start; background: var(--pale); border-bottom-left-radius: 6px; }
.msg.pending { opacity: .6; }
.typing { align-self: flex-start; color: var(--ink-soft); font-size: 14px; padding: 4px 6px; }
.typing::after { content: "…"; animation: dots 1.2s steps(3, end) infinite; }
@keyframes dots { 0% { content: "."; } 50% { content: ".."; } 100% { content: "..."; } }

/* ── 渠道卡片:页面上唯一用满强调色的地方 ─────────────────────────── */
.card {
  align-self: stretch;
  border: 2px solid var(--amber);
  background: var(--amber-soft);
  border-radius: var(--radius);
  padding: 16px;
}
.card-title { margin: 0 0 4px; font-weight: 800; font-size: 17px; color: var(--amber-ink); }
.card-sub { margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card-actions button, .email-form button {
  font: inherit; font-weight: 700;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid var(--amber);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.card-actions button[data-channel="whatsapp"] { grid-column: 1 / -1; background: var(--amber); color: #fff; }
.card-actions button:disabled { opacity: .5; cursor: default; }
.email-form { display: flex; gap: 8px; margin-top: 10px; }
.email-form input {
  flex: 1; min-width: 0; font: inherit; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px;
}

/* ── 快捷按钮 ───────────────────────────────────────────────────── */
.quick {
  padding: 4px 16px 8px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.quick-title { width: 100%; font-size: 13px; color: var(--ink-soft); }
.chip {
  font: inherit; font-size: 14px; font-weight: 700;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  cursor: pointer;
}
.chip:hover, .chip:focus-visible { background: var(--pale); }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { font: inherit; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ink); background: var(--paper); cursor: pointer; }
.stepper output { min-width: 2.5em; text-align: center; font-weight: 800; font-size: 18px; }

/* ── 输入 ───────────────────────────────────────────────────────── */
.composer {
  position: sticky; bottom: 0;
  display: flex; gap: 8px; align-items: flex-end;
  padding: 10px calc(16px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.composer textarea {
  flex: 1; font: inherit; resize: none; max-height: 120px;
  padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line);
}
.composer button {
  font: inherit; font-weight: 800;
  padding: 11px 18px; border-radius: 14px; border: 0;
  background: var(--ink); color: #fff; cursor: pointer;
}
.composer button:disabled, .composer textarea:disabled { opacity: .5; cursor: default; }
.notice { margin: 0; padding: 8px 16px 14px; font-size: 13px; color: var(--ink-soft); text-align: center; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .typing::after { animation: none; content: "..."; } .ticket-slot { transition: none; } }
@media (min-width: 600px) { .page { margin: 24px auto; min-height: calc(100dvh - 48px); border-radius: 24px; overflow: clip; box-shadow: 0 1px 0 var(--line); } .top { position: static; } }
