/* 漫游 · Wayfarer AI — warm editorial interface */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; color: var(--ink); background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
:root {
  --bg: #f4f0e7; --bg-2: #ece6d9; --paper: #fffdf8; --paper-2: #faf7ef;
  --ink: #16211c; --ink-2: #34423a; --muted: #7b827b; --muted-2: #a0a49b;
  --line: #e2dccf; --line-strong: #d4cdbe; --accent: #dd5a35; --accent-dark: #bb4320;
  --accent-soft: #fae9e2; --teal: #1f6f5c; --teal-dark: #155141; --teal-soft: #e4efe9;
  --gold: #d8a534; --gold-soft: #fbf1d6; --danger: #c4493d;
  --sidebar: 264px; --topbar: 76px; --radius: 24px;
  --shadow: 0 18px 50px rgba(34, 42, 35, .08); --shadow-sm: 0 8px 24px rgba(34, 42, 35, .07);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
}
::selection { background: #f3c9b9; color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
a { color: var(--teal); }
img { display: block; max-width: 100%; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { display: block; font-size: 10px; line-height: 1.2; font-weight: 700; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }
.app { display: flex; height: 100dvh; width: 100%; }

/* SIDEBAR */
.sidebar {
  position: relative; z-index: 40; flex: 0 0 var(--sidebar); width: var(--sidebar); height: 100dvh;
  display: flex; flex-direction: column; padding: 26px 16px 16px; overflow: hidden; color: #eae5d9;
  background: radial-gradient(120% 60% at 15% 0%, rgba(80,124,103,.35), transparent 60%),
    radial-gradient(80% 50% at 100% 100%, rgba(188,83,47,.18), transparent 65%), #15211c;
}
.sidebar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22;
  background-image: radial-gradient(rgba(255,255,255,.4) .6px, transparent .6px); background-size: 16px 16px;
  mask-image: linear-gradient(to bottom, #000, transparent 55%);
}
.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; }
.brand-mark { width: 44px; height: 44px; color: #f2ead9; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-family: var(--serif); font-size: 25px; font-weight: 700; letter-spacing: .08em; color: #f7f1e4; }
.brand-text span { margin-top: 7px; font-size: 8px; font-weight: 700; letter-spacing: .22em; color: #8fa298; }
.sidebar-section { position: relative; z-index: 1; margin-bottom: 24px; }
.sidebar-label { margin: 0 12px 9px; font-size: 9px; font-weight: 700; letter-spacing: .18em; color: #788b80; text-transform: uppercase; }
.nav-item {
  width: 100%; min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 13px;
  margin-bottom: 5px; border: 0; border-radius: 14px; color: #b9c4bc; background: transparent;
  cursor: pointer; text-align: left; transition: background .2s, color .2s, transform .2s;
}
.nav-item .ico { width: 19px; height: 19px; opacity: .9; }
.nav-item span:nth-child(2) { flex: 1; font-size: 13.5px; font-weight: 600; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.is-active { color: var(--ink); background: #f4f0e7; box-shadow: 0 8px 22px rgba(0,0,0,.16); }
.nav-item.is-active .ico { color: var(--accent); }
.nav-badge { flex: none !important; padding: 1px 6px; border-radius: 5px; font-size: 8px !important; letter-spacing: .08em; color: #173c31; background: #bcd9c9; }
.nav-dot { flex: none !important; width: 6px; height: 6px; border-radius: 50%; background: #e09b42; box-shadow: 0 0 0 3px rgba(224,155,66,.16); }
.quick-section { margin-bottom: 10px; }
.quick-link {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 13px; border: 0;
  border-radius: 10px; color: #93a49a; background: transparent; font-size: 12.5px; cursor: pointer;
  text-align: left; transition: color .2s, background .2s;
}
.quick-link:hover { color: #f1eadc; background: rgba(255,255,255,.05); }
.quick-glyph { font-size: 8px; font-weight: 700; letter-spacing: .08em; color: #667b6f; }
.sidebar-spacer { flex: 1; }
.service-card {
  position: relative; z-index: 1; padding: 14px; margin: 0 2px 12px; border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px; background: rgba(255,255,255,.035);
}
.service-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 9px; font-weight: 700; letter-spacing: .12em; color: #7f9287; text-transform: uppercase; }
.service-live { display: flex; align-items: center; gap: 5px; color: #82b49c; }
.service-live i { width: 5px; height: 5px; border-radius: 50%; background: #78c59c; box-shadow: 0 0 0 3px rgba(120,197,156,.12); animation: pulse 2.4s infinite; }
.service-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; font-size: 10.5px; color: #a8b6ad; }
.service-name { display: flex; align-items: center; gap: 7px; }
.service-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.service-dot.ds { background: #6fb3e2; } .service-dot.amap { background: #6fc49d; } .service-dot.sf { background: #e3a65d; }
.service-state { color: #6d8175; font-size: 9.5px; }
.sidebar-profile { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 14px; color: #d8ded8; background: transparent; cursor: pointer; text-align: left; }
.sidebar-profile:hover { background: rgba(255,255,255,.05); }
.profile-avatar { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #f1c9ad; color: #5d2b17; font-family: var(--serif); font-size: 14px; font-weight: 700; }
.profile-copy { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.profile-copy strong { font-size: 11px; font-weight: 600; color: #d8ded8; }
.profile-copy small { font-size: 9.5px; color: #7d9085; }
.sidebar-profile .ico { width: 16px; height: 16px; color: #74887c; }
.sidebar-backdrop { display: none; }

/* TOPBAR */
.workspace { flex: 1; min-width: 0; height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(70% 45% at 78% 0%, rgba(255,255,255,.75), transparent 65%), var(--bg); }
.topbar { flex: 0 0 var(--topbar); height: var(--topbar); display: flex; align-items: center; gap: 16px; padding: 0 30px; border-bottom: 1px solid rgba(217,209,194,.7); background: rgba(244,240,231,.82); backdrop-filter: blur(18px); z-index: 20; }
.view-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.view-heading h1 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: .02em; line-height: 1.1; }
.view-heading .eyebrow { font-size: 8.5px; color: #8e9287; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.model-chip { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,248,.7); color: #59645c; font-size: 10.5px; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s; }
.model-chip:hover { background: var(--paper); border-color: var(--line-strong); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #4e9d76; box-shadow: 0 0 0 3px rgba(78,157,118,.12); animation: pulse 2.4s infinite; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink-2); cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.icon-btn:hover { background: var(--paper); border-color: var(--line); color: var(--ink); }
.mobile-menu { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 16px; border: 1px solid transparent; border-radius: 12px; background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s, transform .15s, color .2s; }
.btn:active { transform: translateY(1px); }
.btn-ghost { border-color: var(--line); background: rgba(255,253,248,.55); color: var(--ink-2); }
.btn-ghost:hover { background: var(--paper); border-color: var(--line-strong); }
.btn-primary { background: var(--ink); color: #fbf7ee; border-color: var(--ink); }
.btn-primary:hover { background: #26382f; }
.btn-small { min-height: 32px; padding: 0 13px; font-size: 11px; }
.btn .ico { width: 15px; height: 15px; }
.main { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.view { display: none; height: 100%; min-height: 0; }
.view.is-active { display: flex; }

/* CHAT THREAD */
.view-chat { flex-direction: column; position: relative; }
.thread-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d6cec0 transparent; }
.thread-scroll::-webkit-scrollbar { width: 8px; }
.thread-scroll::-webkit-scrollbar-thumb { background: #d6cec0; border-radius: 8px; border: 2px solid var(--bg); }
.thread { width: 100%; max-width: 880px; margin: 0 auto; padding: 40px 32px 20px; }
.view-chat .thread { min-height: 100%; display: flex; flex-direction: column; }
.welcome { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 2vh 0 4vh; animation: fadeUp .6s ease both; }
.welcome-kicker {
  display: inline-flex; align-items: center; gap: 8px; width: max-content; margin-bottom: 22px;
  padding: 6px 11px 6px 7px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,253,248,.65); color: #777d73; font-size: 9.5px; font-weight: 600; letter-spacing: .08em;
}
.welcome-kicker .spark { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.welcome-kicker .ico { width: 11px; height: 11px; }
.welcome h2 { max-width: 700px; margin: 0 0 16px; font-family: var(--serif); font-size: clamp(38px, 4.6vw, 60px); line-height: 1.14; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.welcome h2 em { font-style: normal; color: var(--accent); position: relative; white-space: nowrap; z-index: 0; }
.welcome h2 em::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 5px; height: 8px; background: #f5d4c7; z-index: -1; border-radius: 3px; transform: rotate(-1.4deg); }
.welcome-sub { max-width: 520px; margin: 0 0 30px; color: #727a72; font-size: 14px; line-height: 1.9; }
.prompt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; max-width: 650px; }
.prompt-card {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 15px; background: rgba(255,253,248,.55); color: var(--ink-2); text-align: left; cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.prompt-card:hover { background: var(--paper); border-color: #d3c9b8; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.prompt-icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--teal-soft); color: var(--teal); }
.prompt-icon.warm { background: var(--accent-soft); color: var(--accent); }
.prompt-icon.gold { background: var(--gold-soft); color: #9a7119; }
.prompt-card:nth-child(3) .prompt-icon { background: #e8edf8; color: #4f6792; }
.prompt-icon .ico { width: 15px; height: 15px; }
.prompt-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.prompt-copy strong { font-size: 12px; font-weight: 600; }
.prompt-copy span { font-size: 10.5px; color: #8d9188; }
.prompt-card .go { margin-left: auto; color: #b1b3aa; flex: none; }
.prompt-card .go .ico { width: 14px; height: 14px; }
.welcome-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; color: #8c9188; font-size: 10px; }
.welcome-foot span { display: flex; align-items: center; gap: 6px; }
.welcome-foot i { width: 4px; height: 4px; border-radius: 50%; background: #c5c1b6; }
.welcome-travel h2 { font-size: clamp(36px, 4.2vw, 54px); }
.welcome-travel .prompt-grid { max-width: 600px; }

/* MESSAGES */
.message { position: relative; margin-bottom: 30px; animation: fadeUp .35s ease both; }
.message-user { display: flex; flex-direction: column; align-items: flex-end; }
.message-meta { margin: 0 4px 7px; color: #9a9d94; font-size: 9.5px; letter-spacing: .04em; }
.user-bubble { max-width: min(82%, 640px); padding: 13px 17px; border-radius: 20px 20px 6px 20px; background: var(--ink); color: #f9f5eb; box-shadow: 0 10px 26px rgba(22,33,28,.13); font-size: 14px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.user-images { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 9px; }
.user-images img { width: 108px; height: 108px; object-fit: cover; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); cursor: zoom-in; }
.assistant-wrap { display: flex; gap: 13px; align-items: flex-start; }
.ai-mark { width: 31px; height: 31px; flex: none; display: grid; place-items: center; margin-top: 2px; border: 1px solid #d9d1c2; border-radius: 10px; background: var(--paper); color: var(--accent); box-shadow: 0 4px 12px rgba(34,42,35,.05); }
.ai-mark svg { width: 22px; height: 22px; }
.assistant-main { flex: 1; min-width: 0; }
.assistant-head { display: flex; align-items: center; gap: 8px; min-height: 31px; margin-bottom: 8px; }
.assistant-head strong { font-size: 12px; font-weight: 700; color: var(--ink); }
.model-tag { padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; color: #91958c; font-size: 8px; letter-spacing: .04em; }
.msg-time { margin-left: auto; color: #a7aaa1; font-size: 9px; }
.assistant-body { color: #2c3932; font-size: 14px; line-height: 1.9; }
.assistant-body > :first-child { margin-top: 0; }
.typing-caret { display: inline-block; width: 6px; height: 15px; margin-left: 2px; vertical-align: -2px; border-radius: 2px; background: var(--accent); animation: blink 1s step-end infinite; }
.stream-status { display: flex; align-items: center; gap: 8px; min-height: 22px; margin: 1px 0 8px; color: #858b82; font-size: 11px; }
.stream-status[hidden] { display: none; }
.stream-spinner { width: 12px; height: 12px; flex: none; border: 1.5px solid #d9d1c2; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.thinking-box { margin: 0 0 13px; border: 1px solid #e1dacd; border-radius: 12px; background: #f8f4eb; overflow: hidden; }
.thinking-box summary { display: flex; align-items: center; gap: 7px; padding: 8px 11px; color: #83877d; font-size: 10.5px; cursor: pointer; list-style: none; user-select: none; }
.thinking-box summary::-webkit-details-marker { display: none; }
.thinking-box summary .ico { width: 13px; height: 13px; color: var(--gold); }
.thinking-box summary::after { content: "展开"; margin-left: auto; color: #aaa99f; font-size: 9px; }
.thinking-box[open] summary::after { content: "收起"; }
.thinking-content { max-height: 220px; overflow: auto; padding: 0 12px 11px; color: #777e75; font-size: 11px; line-height: 1.75; white-space: pre-wrap; }
.source-block { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.source-label { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: #9a9d94; font-size: 9px; font-weight: 600; letter-spacing: .1em; }
.source-list { display: flex; flex-wrap: wrap; gap: 6px; }
.source-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,253,248,.6); color: #667068; font-size: 10px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: border-color .2s, background .2s; }
.source-chip:hover { border-color: #cbbda9; background: var(--paper); }
.source-favicon { width: 11px; height: 11px; flex: none; border-radius: 2px; }
.message-actions { display: flex; align-items: center; gap: 4px; margin-top: 14px; opacity: 0; transition: opacity .2s; }
.message:hover .message-actions { opacity: 1; }
.msg-action { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 0; border-radius: 6px; background: transparent; color: #969b92; font-size: 9.5px; cursor: pointer; }
.msg-action:hover { background: #ece7db; color: var(--ink-2); }
.msg-action .ico { width: 12px; height: 12px; }

/* TOOL TRACE */
.tool-trace { margin: 0 0 16px; padding: 11px 13px; border: 1px solid #e0d8c9; border-radius: 14px; background: #f8f4eb; }
.trace-head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: #95998f; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.trace-head .ico { width: 12px; height: 12px; color: var(--teal); }
.trace-item { display: flex; align-items: flex-start; gap: 9px; padding: 5px 0; border-top: 1px dashed #e5ddce; }
.trace-item:first-of-type { border-top: 0; }
.trace-icon { width: 17px; height: 17px; flex: none; margin-top: 1px; display: grid; place-items: center; border-radius: 50%; background: #e9e2d4; color: #8d9187; }
.trace-icon .ico { width: 10px; height: 10px; }
.trace-item.is-running .trace-icon { background: var(--accent-soft); color: var(--accent); }
.trace-item.is-running .trace-icon::after { content: ""; width: 9px; height: 9px; border: 1.5px solid #e7c5b8; border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
.trace-item.is-running .trace-icon .ico { display: none; }
.trace-item.is-done .trace-icon { background: var(--teal-soft); color: var(--teal); }
.trace-item.is-error .trace-icon { background: #f7dfdc; color: var(--danger); }
.trace-copy { flex: 1; min-width: 0; padding-top: 1px; font-size: 11px; line-height: 1.55; color: #4a554e; }
.trace-copy strong { font-weight: 600; }
.trace-copy small { display: block; color: #92968d; font-size: 9.5px; }
.trace-state { color: #a1a49b; font-size: 9px; white-space: nowrap; }
.tool-call-preamble { margin: 0 0 10px; color: #8b9087; font-size: 11px; }

/* COMPOSER */
.composer-dock {
  flex: none; width: 100%; padding: 10px 32px 20px;
  background: linear-gradient(to top, var(--bg) 62%, rgba(244,240,231,0));
  position: relative; z-index: 5;
}
.composer {
  width: 100%; max-width: 880px; margin: 0 auto; padding: 13px 14px 10px;
  border: 1px solid #ddd5c6; border-radius: 24px; background: var(--paper);
  box-shadow: 0 12px 38px rgba(40,45,38,.09), 0 2px 0 rgba(255,255,255,.8) inset;
  transition: border-color .2s, box-shadow .2s;
}
.composer:focus-within { border-color: #c9bba6; box-shadow: 0 16px 44px rgba(40,45,38,.12), 0 0 0 3px rgba(221,90,53,.055); }
.composer-input {
  display: block; width: 100%; max-height: 168px; min-height: 28px; padding: 4px 4px 8px;
  border: 0; outline: 0; resize: none; background: transparent; color: var(--ink);
  font-size: 14px; line-height: 1.7; overflow-y: auto; scrollbar-width: thin;
}
.composer-input::placeholder { color: #a4a69e; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.composer-tools { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.composer-divider { width: 1px; height: 18px; margin: 0 4px; background: var(--line); }
.tool-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #8d9289; cursor: pointer; transition: background .2s, color .2s; }
.tool-btn:hover { background: #f1ece1; color: var(--ink); }
.tool-btn .ico { width: 17px; height: 17px; }
.toggle-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: #989b93;
  font-size: 10px; font-weight: 600; cursor: pointer; transition: all .18s;
}
.toggle-pill .ico { width: 13px; height: 13px; }
.toggle-pill:hover { color: var(--ink-2); background: #f4efe5; }
.toggle-pill.is-on { color: var(--teal); background: var(--teal-soft); border-color: #d4e5dc; }
.toggle-pill.is-on.think { color: #9a7119; background: var(--gold-soft); border-color: #f0e2bc; }
.send-btn {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 14px; background: var(--ink); color: #fbf7ee; cursor: pointer;
  box-shadow: 0 7px 18px rgba(22,33,28,.2); transition: transform .15s, background .2s;
}
.send-btn:hover { background: #2c4136; transform: translateY(-1px); }
.send-btn .ico { width: 19px; height: 19px; }
.send-btn .stop-ico { display: none; width: 16px; height: 16px; }
.composer.is-busy .send-btn { background: var(--accent); }
.composer.is-busy .send-ico { display: none; }
.composer.is-busy .stop-ico { display: block; }
.composer-hint { max-width: 880px; margin: 9px auto 0; text-align: center; color: #a2a49c; font-size: 9px; letter-spacing: .01em; }
.attachment-strip { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 2px 9px; }
.attachment-strip:empty { display: none; }
.attachment-thumb { position: relative; width: 58px; height: 58px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #eee8dc; }
.attachment-thumb img { width: 100%; height: 100%; object-fit: cover; }
.attachment-thumb button { position: absolute; top: 3px; right: 3px; width: 17px; height: 17px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(18,26,22,.72); color: #fff; cursor: pointer; }
.attachment-thumb .ico { width: 9px; height: 9px; }
.attachment-add {
  width: 58px; height: 58px; display: grid; place-items: center; border: 1px dashed #cfc6b5;
  border-radius: 10px; background: transparent; color: #a2a49c; cursor: pointer;
}
.attachment-add .ico { width: 16px; height: 16px; }

/* TRAVEL VIEW */
.view-travel { display: none; flex-direction: column; }
.view-travel.is-active { display: flex; }
.travel-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.1fr); }
.travel-chat-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid rgba(217,209,194,.75); }
.travel-chat-pane .thread { max-width: 720px; padding: 30px 28px 18px; }
.travel-chat-pane .composer-dock { padding: 8px 24px 16px; }
.travel-chat-pane .composer, .travel-chat-pane .composer-hint { max-width: 720px; }
.mobile-tabs { display: none; }
.trip-panel {
  min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px;
  padding: 18px 20px 16px; overflow: hidden;
  background: radial-gradient(80% 50% at 100% 0%, rgba(255,255,255,.55), transparent 60%), #efeade;
}
.trip-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 0; }
.trip-title { min-width: 0; }
.trip-title h2 { margin: 5px 0 0; font-family: var(--serif); font-size: 21px; line-height: 1.2; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-actions { display: flex; align-items: center; gap: 7px; }
.text-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,253,248,.55); color: #657067; font-size: 10px; font-weight: 600; cursor: pointer; }
.text-btn:hover { background: var(--paper); }
.text-btn .ico { width: 12px; height: 12px; }
.round-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,253,248,.55); color: var(--teal); cursor: pointer; }
.round-btn:hover { background: var(--paper); }
.round-btn .ico { width: 15px; height: 15px; }

/* MAP */
.map-card { position: relative; flex: 1 1 48%; min-height: 230px; border-radius: 22px; overflow: hidden; background: #e7e0d2; border: 1px solid rgba(190,180,160,.5); box-shadow: 0 12px 30px rgba(54,52,41,.08); }
.map-image { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.map-image.is-loaded { opacity: 1; }
.map-skeleton { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #979184; font-size: 10px; background: #e8e2d6; transition: opacity .3s; }
.map-skeleton.is-hidden { opacity: 0; pointer-events: none; }
.map-skeleton-grid { position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(circle at center, #000, transparent 75%); }
.map-fallback { position: absolute; inset: 0; z-index: 4; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 7px; background: #eee8dc; color: #777d73; text-align: center; padding: 20px; }
.map-fallback.is-visible { display: flex; }
.map-fallback .ico { width: 26px; height: 26px; color: #a9a294; margin-bottom: 3px; }
.map-fallback strong { font-size: 12px; color: #5f665e; }
.map-fallback span { font-size: 10px; color: #999d93; }
.map-fallback .btn { margin-top: 6px; }
.map-topline { position: absolute; top: 11px; left: 11px; right: 11px; z-index: 3; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; pointer-events: none; }
.map-badge { display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 8px; border-radius: 7px; background: rgba(22,33,28,.78); color: #f8f3e8; font-size: 9px; font-weight: 600; backdrop-filter: blur(8px); }
.map-badge .ico { width: 12px; height: 12px; }
.weather-float { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 6px 11px 6px 8px; border: 1px solid rgba(255,255,255,.5); border-radius: 12px; background: rgba(255,253,248,.88); box-shadow: 0 8px 22px rgba(34,42,35,.12); backdrop-filter: blur(10px); pointer-events: auto; }
.weather-float[hidden] { display: none; }
.weather-float .wf-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: var(--gold-soft); color: #b27e1d; }
.weather-float .wf-icon .ico { width: 18px; height: 18px; }
.weather-float .wf-copy { display: flex; flex-direction: column; line-height: 1.2; }
.weather-float .wf-copy strong { font-size: 14px; color: var(--ink); }
.weather-float .wf-copy span { font-size: 9px; color: #858b82; }
.map-controls { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); z-index: 3; display: flex; flex-direction: column; border: 1px solid rgba(255,255,255,.7); border-radius: 9px; overflow: hidden; box-shadow: 0 4px 14px rgba(34,42,35,.1); }
.map-controls button { width: 29px; height: 29px; border: 0; background: rgba(255,253,248,.92); color: #515d54; font-size: 17px; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); }
.map-controls button + button { border-top: 1px solid #e4ddcf; }
.map-controls button:hover { background: #fff; color: var(--accent); }
.map-caption { position: absolute; left: 11px; bottom: 11px; z-index: 3; display: flex; align-items: center; gap: 7px; max-width: calc(100% - 100px); min-height: 29px; padding: 5px 11px 5px 6px; border-radius: 9px; background: rgba(22,33,28,.8); color: #f5f0e5; font-size: 9.5px; backdrop-filter: blur(8px); }
.map-caption-pin { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--accent); color: #fff; }
.map-caption-pin .ico { width: 11px; height: 11px; }
.map-caption span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-attrib { position: absolute; right: 9px; bottom: 9px; z-index: 3; padding: 2px 4px; border-radius: 3px; background: rgba(255,255,255,.65); color: #8a887e; font-size: 7px; }

/* TOOLBOX */
.canvas-toolbox { flex: 0 0 auto; display: flex; flex-direction: column; min-height: 0; max-height: 46%; border: 1px solid rgba(200,190,172,.6); border-radius: 18px; background: rgba(255,253,248,.72); box-shadow: 0 10px 26px rgba(54,52,41,.05); overflow: hidden; }
.tool-tabs { flex: none; display: flex; gap: 2px; padding: 7px 8px 0; border-bottom: 1px solid var(--line); }
.tool-tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 8px; border: 0; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; background: transparent; color: #92968c; font-size: 9.5px; font-weight: 600; cursor: pointer; transition: color .18s, background .18s; }
.tool-tabs button .ico { width: 15px; height: 15px; }
.tool-tabs button:hover { color: var(--ink-2); background: rgba(236,231,219,.6); }
.tool-tabs button.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.tool-form { flex: none; display: flex; flex-direction: column; gap: 7px; padding: 11px 12px 4px; }
.tb-row { display: flex; gap: 7px; }
.tb-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: #fffdf8; transition: border-color .18s, box-shadow .18s; }
.tb-field:focus-within { border-color: #c9bba6; box-shadow: 0 0 0 3px rgba(221,90,53,.06); }
.tb-field .ico { width: 13px; height: 13px; color: #a5a89e; }
.tb-field input, .tb-field select { width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11.5px; appearance: none; }
.tb-field input::placeholder { color: #b0b2a9; }
.tb-field select { cursor: pointer; }
.tb-field.grow-2 { flex: 2; }
.tb-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 34px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 9px; background: var(--ink); color: #fbf7ee; font-size: 11px; font-weight: 600; cursor: pointer; transition: background .18s, transform .15s; }
.tb-btn:hover { background: #2c4136; }
.tb-btn:active { transform: translateY(1px); }
.tb-btn[disabled] { opacity: .55; cursor: progress; }
.tb-btn.subtle { border-color: var(--line); background: rgba(255,253,248,.7); color: var(--ink-2); }
.tb-btn.subtle:hover { background: #fff; }
.tb-btn .ico { width: 13px; height: 13px; }
.tb-hint { color: #a0a49a; font-size: 9px; padding: 0 2px; }
.tool-results { flex: 1; min-height: 60px; overflow-y: auto; padding: 6px 10px 11px; scrollbar-width: thin; scrollbar-color: #d6cec0 transparent; }
.tool-results::-webkit-scrollbar { width: 7px; }
.tool-results::-webkit-scrollbar-thumb { background: #d9d1c2; border-radius: 7px; }
.tool-empty { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 20px 10px; color: #a3a69c; font-size: 10px; text-align: center; }
.tool-empty .ico { width: 20px; height: 20px; color: #bbbdb3; margin-bottom: 3px; }
.tool-loading { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 20px 10px; color: #8b9086; font-size: 10.5px; }
.tool-loading .stream-spinner { width: 13px; height: 13px; }
.result-list { display: flex; flex-direction: column; gap: 6px; }
.result-card { display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border: 1px solid #e6dfd1; border-radius: 11px; background: #fffdf8; transition: border-color .18s, box-shadow .18s; }
.result-card:hover { border-color: #d3c8b5; box-shadow: 0 6px 16px rgba(54,52,41,.06); }
.result-index { width: 19px; height: 19px; flex: none; display: grid; place-items: center; margin-top: 1px; border-radius: 6px; background: var(--teal-soft); color: var(--teal); font-size: 9px; font-weight: 700; }
.result-main { flex: 1; min-width: 0; }
.result-name { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.result-tag { flex: none; padding: 1px 5px; border-radius: 4px; background: #f1ece1; color: #8b9086; font-size: 8px; font-weight: 500; }
.result-meta { margin-top: 2px; color: #8d9188; font-size: 9.5px; line-height: 1.55; }
.result-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-loc { color: #a7aa9f; }
.result-actions { flex: none; display: flex; flex-direction: column; gap: 4px; }
.result-btn { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: #8b9086; cursor: pointer; transition: all .18s; }
.result-btn:hover { border-color: #cdbfa8; color: var(--accent); background: #fff; }
.result-btn .ico { width: 12px; height: 12px; }
.route-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; padding: 9px 11px; margin-bottom: 7px; border-radius: 11px; background: var(--teal-soft); color: var(--teal-dark); font-size: 10.5px; }
.route-summary strong { font-family: var(--serif); font-size: 14px; }
.route-summary i { width: 3px; height: 3px; border-radius: 50%; background: #8bb5a5; }
.route-step { display: flex; gap: 8px; padding: 6px 4px; border-bottom: 1px dashed #e7e0d2; font-size: 10.5px; color: #525d54; line-height: 1.6; }
.route-step:last-child { border-bottom: 0; }
.route-step b { flex: none; width: 15px; height: 15px; margin-top: 2px; display: grid; place-items: center; border-radius: 50%; background: #eae3d4; color: #868b81; font-size: 8px; }
.route-step span { flex: 1; min-width: 0; }
.route-step em { display: block; color: #a0a49a; font-size: 9px; font-style: normal; }
.weather-card { padding: 12px; border: 1px solid #e6dfd1; border-radius: 12px; background: #fffdf8; }
.weather-now { display: flex; align-items: center; gap: 12px; }
.weather-now .wn-icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--gold-soft); color: #b27e1d; }
.weather-now .wn-icon .ico { width: 24px; height: 24px; }
.wn-copy { display: flex; flex-direction: column; gap: 1px; }
.wn-copy strong { font-family: var(--serif); font-size: 22px; line-height: 1.1; }
.wn-copy span { color: #858b82; font-size: 10px; }
.weather-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; margin-top: 10px; }
.weather-day { padding: 7px 5px; border-radius: 9px; background: #f8f4eb; text-align: center; font-size: 9px; color: #83887e; }
.weather-day b { display: block; margin: 2px 0; color: var(--ink-2); font-size: 10px; font-weight: 600; }
.weather-day em { font-style: normal; color: #a0a49a; }
.web-hit { display: block; padding: 9px 10px; border: 1px solid #e6dfd1; border-radius: 11px; background: #fffdf8; text-decoration: none; transition: border-color .18s, box-shadow .18s; }
.web-hit:hover { border-color: #d3c8b5; box-shadow: 0 6px 16px rgba(54,52,41,.06); }
.web-hit strong { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.web-hit p { margin: 3px 0 0; color: #8d9188; font-size: 9.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.web-hit small { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: #a4a79d; font-size: 8.5px; }
.web-hit small img { width: 10px; height: 10px; border-radius: 2px; }
.web-actions { display: flex; gap: 5px; margin-top: 6px; }
.web-actions .tb-btn { height: 26px; padding: 0 9px; font-size: 9px; }

/* VOICE */
.voice-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; padding: 0 20px 34px; background: rgba(18,26,22,.42); backdrop-filter: blur(6px); animation: fadeIn .2s ease both; }
.voice-overlay[hidden] { display: none; }
.voice-panel { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 22px 18px; border-radius: 26px; background: var(--paper); box-shadow: 0 24px 60px rgba(10,16,13,.35); animation: fadeUp .28s cubic-bezier(.2,.8,.25,1) both; }
.voice-orb { display: flex; align-items: center; justify-content: center; gap: 5px; height: 62px; }
.voice-orb span { width: 6px; height: 16px; border-radius: 4px; background: var(--accent); animation: wave 1.1s ease-in-out infinite; }
.voice-orb span:nth-child(1) { animation-delay: -.9s; background: #e8a08a; }
.voice-orb span:nth-child(2) { animation-delay: -.6s; }
.voice-orb span:nth-child(3) { animation-delay: -.3s; height: 30px; }
.voice-orb span:nth-child(4) { animation-delay: -.15s; }
.voice-orb span:nth-child(5) { animation-delay: -.75s; background: #e8a08a; }
.voice-copy { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.voice-copy strong { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.voice-copy span { color: #8d9188; font-size: 10px; }
.voice-timer { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: var(--accent); letter-spacing: .06em; }
.voice-actions { display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 2px; }
.voice-cancel { flex: 1; height: 42px; border: 1px solid var(--line); border-radius: 13px; background: transparent; color: #858b82; font-size: 12px; font-weight: 600; cursor: pointer; }
.voice-cancel:hover { background: #f4efe5; }
.voice-stop { flex: 1.4; display: flex; align-items: center; justify-content: center; gap: 7px; height: 42px; border: 0; border-radius: 13px; background: var(--ink); color: #fbf7ee; font-size: 12px; font-weight: 600; cursor: pointer; }
.voice-stop:hover { background: #2c4136; }
.voice-stop-square { width: 9px; height: 9px; border-radius: 2px; background: currentColor; }
.voice-overlay.is-busy .voice-orb span { animation-play-state: paused; height: 8px; opacity: .45; }
.voice-overlay.is-busy .voice-timer { color: var(--teal); }

/* MODAL */
.modal { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; overflow: visible; }
.modal::backdrop { background: rgba(18,26,22,.42); backdrop-filter: blur(5px); }
.modal[open] { display: flex; align-items: center; justify-content: center; width: 100vw; height: 100dvh; padding: 20px; }
.modal-card { width: 100%; max-width: 460px; max-height: calc(100dvh - 40px); overflow-y: auto; padding: 22px 24px 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: 0 28px 70px rgba(12,18,15,.3); animation: fadeUp .26s cubic-bezier(.2,.8,.25,1) both; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.modal-head h2 { margin: 5px 0 0; font-family: var(--serif); font-size: 21px; font-weight: 700; line-height: 1.2; }
.modal-desc { margin: 0 0 16px; color: #8b9086; font-size: 10.5px; line-height: 1.7; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 11px; min-width: 0; }
.field label { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; color: #6c746b; }
.field label span { padding: 1px 5px; border-radius: 4px; background: #f1ece1; color: #9a9d94; font-size: 8px; font-weight: 500; }
.field input, .field select { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; color: var(--ink); font-size: 12px; outline: 0; transition: border-color .18s, box-shadow .18s; }
.field input:focus, .field select:focus { border-color: #c9bba6; box-shadow: 0 0 0 3px rgba(221,90,53,.06); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.secret-input { position: relative; display: flex; align-items: center; }
.secret-input input { padding-right: 52px; }
.reveal-btn { position: absolute; right: 5px; height: 26px; padding: 0 9px; border: 0; border-radius: 7px; background: #f1ece1; color: #858b82; font-size: 9px; font-weight: 600; cursor: pointer; }
.reveal-btn:hover { background: #e8e2d4; color: var(--ink-2); }
.modal-note { display: flex; gap: 8px; padding: 9px 11px; margin: 3px 0 16px; border-radius: 10px; background: #f8f4eb; color: #8b9086; font-size: 9.5px; line-height: 1.6; }
.modal-note .ico { width: 13px; height: 13px; flex: none; margin-top: 2px; color: var(--gold); }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.modal-actions .btn { min-height: 36px; font-size: 11px; }
.article-modal[open] { align-items: center; }
.article-card { max-width: 720px; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; color: #a0a49a; font-size: 9.5px; }
.article-meta a { color: var(--teal); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.article-body { max-height: 46vh; overflow-y: auto; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fdfbf5; margin-bottom: 16px; scrollbar-width: thin; }
.article-body.is-empty { color: #a0a49a; font-size: 11px; text-align: center; padding: 34px 16px; }

/* TOAST */
.toast-stack { position: fixed; left: 50%; bottom: 26px; z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; max-width: min(92vw, 460px); padding: 10px 15px; border-radius: 12px; background: rgba(22,33,28,.94); color: #f7f2e6; font-size: 11px; box-shadow: 0 14px 34px rgba(10,16,13,.3); animation: toastIn .25s cubic-bezier(.2,.8,.25,1) both; }
.toast.is-out { animation: toastOut .2s ease both; }
.toast .ico { width: 13px; height: 13px; flex: none; color: #a8d3bd; }
.toast.is-error .ico { color: #f0a89b; }

/* MARKDOWN */
.markdown { color: #2c3932; font-size: 13.5px; line-height: 1.9; word-break: break-word; }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { margin: 1.4em 0 .55em; font-family: var(--serif); font-weight: 700; line-height: 1.35; color: var(--ink); }
.markdown h1 { font-size: 20px; } .markdown h2 { font-size: 17.5px; } .markdown h3 { font-size: 15px; } .markdown h4 { font-size: 13.5px; }
.markdown p { margin: 0 0 .85em; }
.markdown strong { font-weight: 700; color: var(--ink); }
.markdown em { font-style: italic; }
.markdown ul, .markdown ol { margin: 0 0 .9em; padding-left: 1.35em; }
.markdown li { margin-bottom: .32em; }
.markdown li::marker { color: var(--accent); }
.markdown a { color: var(--teal); text-decoration: none; border-bottom: 1px solid rgba(31,111,92,.28); }
.markdown a:hover { border-bottom-color: var(--teal); }
.markdown code { padding: 1px 5px; border-radius: 4px; background: #efeadd; color: #b04a2a; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .88em; }
.markdown pre { margin: 0 0 1em; padding: 12px 14px; border-radius: 11px; background: #1d2a24; color: #e6e1d4; overflow-x: auto; font-size: 11.5px; line-height: 1.7; }
.markdown pre code { padding: 0; background: transparent; color: inherit; font-size: inherit; }
.markdown blockquote { margin: 0 0 1em; padding: 6px 0 6px 13px; border-left: 2px solid #d9c6ac; color: #6f776e; }
.markdown hr { height: 1px; margin: 1.3em 0; border: 0; background: var(--line); }
.markdown table { width: 100%; margin: 0 0 1em; border-collapse: collapse; font-size: 11.5px; }
.markdown th, .markdown td { padding: 6px 9px; border: 1px solid var(--line); text-align: left; }
.markdown th { background: #f6f1e6; font-weight: 600; }

/* KEYFRAMES */
@keyframes fadeUp { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wave { 0%, 100% { height: 12px; } 50% { height: 42px; } }

/* RESPONSIVE */
@media (max-width: 1180px) {
  .travel-grid { grid-template-columns: minmax(320px, .95fr) minmax(420px, 1.05fr); }
  .thread { padding: 32px 24px 18px; }
}
@media (max-width: 980px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-102%); transition: transform .28s cubic-bezier(.2,.8,.25,1); box-shadow: 0 0 60px rgba(0,0,0,.35); }
  .app.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(18,26,22,.4); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .app.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .mobile-menu { display: grid; }
  .topbar { padding: 0 16px; gap: 10px; }
  .view-heading h1 { font-size: 19px; }
  .topbar-actions .new-chat-btn span { display: none; }
  .new-chat-btn { width: 38px; padding: 0; }
  .model-chip { display: none; }
  .travel-grid { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .mobile-tabs { display: flex; gap: 4px; padding: 8px 14px 0; flex: none; border-bottom: 1px solid var(--line); background: rgba(244,240,231,.7); }
  .mobile-tabs button { flex: 1; height: 34px; border: 0; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; background: transparent; color: #93968d; font-size: 11.5px; font-weight: 600; cursor: pointer; }
  .mobile-tabs button.is-active { color: var(--accent); border-bottom-color: var(--accent); }
  .travel-chat-pane, .trip-panel { display: none; }
  .travel-grid[data-mobile-panel="chat"] .travel-chat-pane { display: flex; }
  .travel-grid[data-mobile-panel="trip"] .trip-panel { display: flex; }
  .travel-chat-pane { border-right: 0; }
  .trip-panel { padding: 14px 14px 12px; overflow-y: auto; }
  .map-card { flex: 0 0 auto; height: 300px; }
  .canvas-toolbox { max-height: none; }
}
@media (max-width: 720px) {
  :root { --topbar: 64px; }
  .thread { padding: 24px 16px 14px; }
  .view-chat .thread { min-height: 0; }
  .welcome { justify-content: flex-start; padding-top: 6vh; }
  .welcome h2 { font-size: 33px; }
  .welcome-sub { font-size: 12.5px; margin-bottom: 22px; }
  .prompt-grid { grid-template-columns: 1fr; }
  .composer-dock { padding: 8px 12px 14px; }
  .composer { border-radius: 20px; padding: 11px 11px 8px; }
  .composer-hint { display: none; }
  .message { margin-bottom: 24px; }
  .user-bubble { max-width: 90%; font-size: 13.5px; }
  .assistant-body, .markdown { font-size: 13px; }
  .ai-mark { width: 26px; height: 26px; border-radius: 8px; }
  .ai-mark svg { width: 19px; height: 19px; }
  .assistant-wrap { gap: 9px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .modal[open] { align-items: flex-end; padding: 0; }
  .modal-card { max-width: none; border-radius: 22px 22px 0 0; max-height: 90dvh; padding: 20px 18px 22px; animation: fadeUp .26s cubic-bezier(.2,.8,.25,1) both; }
  .article-body { max-height: 52vh; }
  .trip-panel { padding: 12px 12px 10px; }
  .trip-title h2 { font-size: 18px; }
  .map-card { height: 240px; }
  .tool-form { padding: 9px 10px 3px; }
  .tb-row { flex-wrap: wrap; }
  .tb-field { flex: 1 1 100%; }
  .tb-btn { flex: 1 1 auto; }
  .voice-overlay { padding: 0 0 0; align-items: flex-end; }
  .voice-panel { border-radius: 24px 24px 0 0; max-width: none; }
}
@media (max-height: 700px) {
  .welcome h2 { font-size: clamp(30px, 4vw, 44px); }
  .welcome-sub { margin-bottom: 20px; }
  .map-card { min-height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
