:root {
  --ink:#253e36; --ink-soft:#64736b; --paper:#f6f5f0; --paper-raised:#fffefa;
  --line:#dedfd5; --stamp:#9b6334; --stamp-soft:#f7ead8; --like:#396a53;
  --like-soft:#e7efe4; --drop:#a64637; --drop-soft:#f8e8e2;
  --font-body: -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  --font-display:var(--font-body); --font-mono:var(--font-body);
}
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; background:var(--paper); color:var(--ink); font-family:var(--font-body); -webkit-font-smoothing:antialiased; }
button,input,textarea,select { font:inherit; }
button,a,input,summary,textarea,select { -webkit-tap-highlight-color:transparent; }
button,a,summary { touch-action:manipulation; }
:focus-visible { outline:3px solid #b66f38; outline-offset:4px; }
[hidden] { display:none!important; }
button:disabled,input:disabled { cursor:wait; opacity:.5; }
a { color:var(--like); text-underline-offset:3px; }
.topbar { max-width:1280px; margin:auto; min-height:96px; padding:24px 40px; display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:13px; }
.brand-mark { display:grid; place-items:center; width:42px; height:42px; color:#f9f8ef; background:var(--ink); border-radius:14px; }
.brand-mark svg { width:29px; height:29px; }
.brand h1 { font-size:19px; letter-spacing:.02em; margin:0; font-weight:650; }
.tagline { font-size:11px; color:var(--ink-soft); margin:6px 0 0; letter-spacing:.05em; }
.service-details { position:relative; font-size:12px; color:var(--ink-soft); }
summary { cursor:pointer; list-style:none; }
summary::-webkit-details-marker { display:none; }
summary::after { content:'＋'; display:inline-block; margin-left:10px; color:var(--ink-soft); font-weight:400; }
details[open]>summary::after { content:'−'; }
.status-group { position:absolute; right:0; top:32px; width:285px; padding:16px; background:var(--paper-raised); border:1px solid var(--line); border-radius:14px; box-shadow:0 12px 32px #253e3610; z-index:5; }
.status-chip { display:block; font-size:11px; line-height:1.8; margin:7px 0; }
.status-chip.ok { color:var(--like); }.status-chip.mock { color:var(--stamp); }
.page-intro { max-width:1280px; margin:auto; padding:44px 40px 36px; display:flex; align-items:center; justify-content:space-between; gap:24px; }
.intro-kicker { display:flex; align-items:center; gap:8px; font-size:11px; letter-spacing:.12em; color:var(--ink-soft); margin:0 0 14px; }
.intro-kicker span { width:6px; height:6px; border-radius:50%; background:#a66940; }
.page-intro h2 { font-size:clamp(28px,3vw,40px); font-weight:550; letter-spacing:-.03em; line-height:1.25; margin:0; }
.intro-description { color:var(--ink-soft); font-size:13px; line-height:1.8; margin:14px 0 0; }
.route-art { width:240px; height:100px; color:#a6b5a5; flex-shrink:0; margin-right:24px; }
.layout { display:grid; grid-template-columns:minmax(0,1.38fr) minmax(0,1fr); max-width:1280px; padding:0 40px 48px; gap:32px; margin:auto; align-items:start; }
.trip-pane { grid-column:1; grid-row:1; min-width:0; }
.panel-head-inline { padding:0 2px; margin-bottom:14px; }
.eyebrow { font-size:11px; font-weight:600; letter-spacing:.05em; color:var(--ink-soft); }
#travelToolbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-size:12px; margin-bottom:20px; }
#travelToolbar .btn { border:1px solid var(--line); background:transparent; }
#travelToolbar>details { margin-left:auto; position:relative; }
.archive-list { display:flex; flex-direction:column; gap:8px; margin-top:10px; font-size:12px; line-height:1.8; max-width:280px; }
.chat-pane { grid-column:2; grid-row:1; position:sticky; top:24px; min-width:0; display:flex; flex-direction:column; height:min(680px,calc(100dvh - 48px)); min-height:470px; padding:26px; border-radius:22px; border:1px solid var(--line); background:#fffefa; box-shadow:0 8px 30px #253e3604; }
.chat-heading { border-bottom:1px solid #e7e7df; margin-bottom:18px; padding-bottom:18px; }
.assistant-label { display:flex; align-items:center; gap:7px; color:var(--ink-soft); font-size:11px; margin-bottom:13px; }
.assistant-label span { width:6px; height:6px; border-radius:50%; background:#7c9d77; }
.chat-heading h2 { font-size:20px; font-weight:600; margin:0 0 8px; }
.chat-heading p { font-size:12px; line-height:1.8; color:var(--ink-soft); margin:0; }
.chat-log { flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:16px; padding:2px 2px 16px; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#d6dccf transparent; }
.chat-msg { display:flex; }.chat-msg.user { justify-content:flex-end; }
.bubble { border-radius:15px; padding:13px 15px; max-width:95%; white-space:pre-wrap; font-size:13px; line-height:1.9; overflow-wrap:anywhere; }
.assistant .bubble { background:#f0f2eb; border-top-left-radius:3px; }
.user .bubble { background:var(--ink); color:#fffdf6; border-bottom-right-radius:3px; }
.system .bubble { background:var(--stamp-soft); color:#805023; font-size:12px; }
.loading .bubble { color:var(--ink-soft); background:#f4f3ed; }
.loading .bubble::before { content:''; display:inline-block; width:8px; height:8px; margin-right:8px; border-radius:50%; background:#b08a61; }
.chat-mode { font-size:11px; color:var(--ink-soft); margin:12px 0 10px; }
.chat-mode select { border:0; background:transparent; color:var(--ink); font-size:11px; padding:6px 4px; max-width:100%; }
.chat-input-row { display:flex; gap:8px; }
.chat-input-row input { flex:1; min-width:0; padding:12px; font-size:12px; background:#fff; border:1px solid #d6dcd1; border-radius:11px; color:var(--ink); }
.btn { border:1px solid #cdd6ca; background:#fffefa; color:var(--ink); border-radius:10px; padding:10px 15px; min-height:42px; font-size:12px; line-height:1.4; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:6px; text-decoration:none; text-align:center; transition:background-color .16s,border-color .16s,box-shadow .16s; }
.btn:hover:not(:disabled) { background:#edf1e7; border-color:#9ead98; }
.btn.primary { color:#fffdf6; background:var(--ink); border-color:var(--ink); }
.btn.primary:hover:not(:disabled) { background:#365848; border-color:#365848; }
.btn.small { font-size:11px; min-height:36px; padding:7px 11px; }
.btn.ghost { border-color:transparent; background:transparent; }
#resetBtn { align-self:flex-start; color:var(--ink-soft); margin:12px 0 0; padding-left:0; }
.next-card { position:relative; background:#eaf0e5; border:1px solid #dbe3d3; border-radius:22px; padding:28px; margin-bottom:22px; overflow:hidden; }
.next-card>.eyebrow { margin:0 0 18px; }
.next-card h2 { font-size:23px; font-weight:600; letter-spacing:-.025em; line-height:1.5; margin:14px 0; overflow-wrap:anywhere; }
.next-card p { font-size:13px; line-height:1.85; margin:10px 0; }
.next-card .next-meta { font-size:12px; font-weight:500; color:#47624e; }
.muted,.next-card .muted { color:var(--ink-soft); font-size:11px; line-height:1.8; }
.today-checklist { padding-bottom:22px; margin-bottom:22px; border-bottom:1px solid #d3ddcc; }
.today-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.today-heading h2 { font-size:28px; margin:0; }
.day-count { font-size:11px; color:#50674e; background:#f8faf3; border:1px solid #d6dfcd; padding:7px 10px; border-radius:99px; white-space:nowrap; }
.day-progress { height:3px; border-radius:5px; background:#d4decc; margin:17px 0; overflow:hidden; }
.day-progress-fill { height:100%; width:100%; background:#78986b; transform-origin:left center; transform:scaleX(var(--progress,0)); }
.check-row { display:flex; align-items:center; gap:12px; padding:13px 0; min-height:48px; font-size:13px; cursor:pointer; border-bottom:1px solid #dce4d5; }
.check-row:last-of-type { border-bottom:0; }
.check-row input { width:20px; height:20px; flex-shrink:0; accent-color:#577a50; cursor:pointer; }
.check-row:has(input:checked) span { color:#667861; }
.check-row:has(input:checked) span::after { content:'已完成'; font-size:10px; color:#6c8264; margin-left:10px; white-space:nowrap; }
.departure,.place-facts,.adjust-menu { margin:16px 0 0; font-size:12px; line-height:1.8; }
.departure summary,.place-facts summary,.adjust-menu summary { color:#52694b; padding:4px 0; }
.departure label { display:block; margin:10px 0; }
.departure input { width:100%; display:block; border:1px solid #ccd7c6; border-radius:9px; background:#fffef9; padding:10px; color:var(--ink); margin-top:5px; }
.place-facts article { margin-top:10px; padding:13px; border-radius:10px; background:#fffefa; }
.place-facts article p { font-size:12px; }.place-facts a { overflow-wrap:anywhere; }
.place-facts .btn { margin:10px 6px 0 0; }
.action-row,.quick-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:16px; }
.quick-actions { margin-top:10px; }
.change-card { background:#fffefa; border:1px solid var(--line); border-radius:16px; padding:20px; margin:0 0 20px; }
#proposalCard .change-card { border-color:#d2b08b; background:#fff8ed; }
.section-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.change-card h3 { font-size:14px; font-weight:600; margin:0 0 8px; }.section-heading h3 { margin:0; }
.change-card ul { font-size:12px; padding-left:18px; line-height:1.9; overflow-wrap:anywhere; }
.change-card details { font-size:12px; line-height:1.8; padding:12px 0; }
.itinerary-details { border-top:1px solid var(--line); margin-top:8px; }
.itinerary-details>summary { font-size:14px; font-weight:600; padding:20px 2px; }
.trip-title { margin:4px 0 8px; font-size:20px; font-weight:600; }
.trip-vibe { margin:0 0 24px; font-size:12px; color:var(--ink-soft); line-height:1.8; }
.trip-card-empty { padding:24px 0; color:var(--ink-soft); font-size:13px; }
.day-group { margin-bottom:24px; }.day-head { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:16px 0 12px; }
.day-label { font-size:12px; font-weight:600; }.day-head .btn { margin-left:auto; }
.granularity-badge { font-size:10px; color:var(--ink-soft); }.granularity-badge.partial { color:var(--stamp); }
.stop-tag { display:flex; align-items:flex-start; gap:14px; padding:18px; background:#fffefa; border:1px solid var(--line); border-radius:14px; margin-bottom:10px; }
.stop-tag.locked { border-left:3px solid #c49d6e; }.stop-tag.area { background:#f0f2eb; }
.stop-tag-main { flex:1; min-width:0; }.stop-tag-name { display:flex; align-items:center; flex-wrap:wrap; gap:7px; font-size:14px; font-weight:600; overflow-wrap:anywhere; }
.stop-tag-meta { color:var(--ink-soft); font-size:11px; margin-top:8px; }.stop-tag-note,.stop-transit { font-size:12px; line-height:1.8; margin-top:8px; color:var(--ink-soft); }
.stop-tag-time { font-size:11px; line-height:1.8; white-space:nowrap; text-align:right; color:var(--ink-soft); }
.stop-actions { margin-top:12px; gap:6px; }.stop-actions .btn { font-size:10px; min-height:32px; padding:6px 9px; }
.kind-badge,.lock-badge,.wish-badge,.rating-stamp { font-size:10px; font-weight:400; border-radius:5px; padding:3px 6px; background:#edf0e7; color:#5e7157; }
.lock-badge { color:var(--stamp); background:var(--stamp-soft); }.wish-badge { color:var(--like); background:var(--like-soft); }.rating-stamp.dislike,.rating-stamp.skip { color:var(--drop); background:var(--drop-soft); }
.theme-block { padding:20px; border:1px dashed #c9d4c0; border-radius:14px; background:#f0f2ea; margin:10px 0; }
.theme-kicker { font-size:10px; color:var(--ink-soft); margin-bottom:8px; }.theme-summary { font-size:14px; line-height:1.8; }
.theme-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }.theme-chip { font-size:10px; padding:4px 8px; border:1px solid var(--line); border-radius:99px; }
.theme-candidates { margin-top:12px; font-size:11px; color:var(--ink-soft); line-height:1.8; }
.progress-notice { padding:14px 18px; margin:-8px 0 20px; border-left:3px solid #78986b; border-radius:0 10px 10px 0; background:#e9efe3; font-size:12px; line-height:1.8; }
.connection-notice { max-width:1200px; margin:16px auto 0; padding:14px 20px; color:#805023; background:#f7ead8; font-size:12px; line-height:1.8; border-radius:12px; }
.connection-notice .btn { margin-left:12px; }.data-notice { padding:12px; background:#fff1d7; border-radius:10px; color:#805023; }
dialog { border:1px solid #d8ddcf; border-radius:22px; padding:28px; width:min(580px,calc(100vw - 32px)); max-height:90dvh; color:var(--ink); background:#fffefa; box-shadow:0 30px 90px #122c2926; }
dialog::backdrop { background:#18372a65; backdrop-filter:blur(3px); }
dialog h2 { font-size:21px; margin:0 0 16px; }dialog p { font-size:12px; line-height:1.8; }
#shareText,#profileText { display:block; width:100%; border:1px solid var(--line); border-radius:12px; background:#f5f6f0; color:var(--ink); padding:15px; margin:18px 0; font:13px/1.9 var(--font-body); resize:vertical; }
#shareText { height:40dvh; }#profileText { min-height:190px; }#shareStatus,#profileStatus { font-size:12px; }
footer { max-width:1200px; margin:0 auto; border-top:1px solid var(--line); padding:24px 0 30px; text-align:center; font-size:11px; letter-spacing:.04em; color:var(--ink-soft); }
@media(min-width:1500px) { .page-intro { padding-top:58px; padding-bottom:44px; } }
@media(max-width:860px) {
  .topbar { min-height:82px; padding:20px 22px; }.brand h1 { font-size:17px; }.brand-mark { width:37px; height:37px; border-radius:12px; }
  .tagline { font-size:10px; }.service-details { font-size:11px; }
  .page-intro { padding:30px 22px 26px; gap:12px; }.page-intro h2 { font-size:28px; }.intro-kicker { font-size:10px; }.intro-description { font-size:12px; max-width:280px; }
  .route-art { width:90px; height:80px; margin:0; }.layout { display:flex; flex-direction:column; padding:0 18px 28px; gap:24px; }
  .trip-pane { order:0; width:100%; }.chat-pane { order:1; position:static; width:100%; height:620px; max-height:85dvh; min-height:450px; padding:22px; }
  .next-card { padding:22px; border-radius:19px; }.next-card h2 { font-size:22px; }.today-heading h2 { font-size:25px; }
  .check-row { font-size:13px; }.check-row:has(input:checked) span::after { display:none; }
  .stop-tag { flex-wrap:wrap; padding:16px; }.stop-tag-time { text-align:left; }.chat-input-row input { font-size:16px; }
  #travelToolbar { gap:7px; }#travelToolbar .btn { font-size:10px; }.day-head { gap:8px; }
  .connection-notice { margin:12px 18px 0; }.change-card { padding:18px; }
  footer { margin:0 22px; padding:20px 0; font-size:10px; }
}
@media(max-width:380px) { .route-art { display:none; }.topbar { padding:18px; }.brand h1 { font-size:16px; }.section-heading { flex-wrap:wrap; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; } }
.proposal-status { font-size:12px; font-weight:600; line-height:1.7; color:#805023; background:#f7ead8; border-left:3px solid var(--stamp); padding:8px 10px; border-radius:8px; margin-bottom:10px; }
.proposal-status.none { font-size:11px; font-weight:400; color:var(--ink-soft); background:none; border-left:none; padding:0; margin:8px 0 0; }
.proposal-status.warning { color:var(--drop); background:var(--drop-soft); border-left-color:var(--drop); }
.proposal-explanation p { white-space:pre-wrap; overflow-wrap:anywhere; }
/* Account setup lives in two small dialogs; the travel interface stays focused. */
[hidden] { display:none!important; }
.signed-out .layout { visibility:hidden; }
.account-actions,.service-choice { display:flex; gap:8px; flex-wrap:wrap; }
.account-form { display:grid; gap:14px; }
.account-form label { display:grid; gap:7px; font-size:13px; }
.account-form input { width:100%; min-width:0; padding:12px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); font:16px var(--font-body); }
.account-form input:focus { outline:2px solid #759684; outline-offset:2px; }
.service-choice { margin:18px 0; }
.service-choice [aria-pressed="true"] { background:var(--ink); color:#fff; }
.key-remove { justify-self:start; margin-top:-10px; }
.account-footer { display:flex; justify-content:space-between; align-items:center; margin-top:24px; border-top:1px solid var(--line); padding-top:16px; font-size:12px; }
.request-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:12px 0; border-bottom:1px solid var(--line); }
.request-row span { flex:1; overflow-wrap:anywhere; }
#servicesDialog details { margin-top:18px; }
#activateOwn { margin-top:14px; }
@media(max-width:540px) { .topbar { flex-wrap:wrap; gap:14px; }.account-actions { margin-left:auto; }dialog { padding:22px; } }

/* Keep service status in the dialog flow; only the body scrolls. */
#servicesDialog { padding:0; overflow:hidden; }
#servicesDialog[open] { display:flex; flex-direction:column; }
#servicesDialog > .section-heading { flex:none; flex-wrap:nowrap; padding:22px 28px 16px; border-bottom:1px solid var(--line); }
#servicesDialog > .section-heading h2 { margin:0; }
#closeServices { flex:none; min-height:44px; }
#servicesDialog .services-body { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:4px 28px 24px; scrollbar-gutter:stable; }
#serviceStatusDetails > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; font-size:13px; }
#serviceStatusDetails > summary::after { content:none; }
#serviceStatusDetails .status-collapse { display:none; }
#serviceStatusDetails[open] .status-expand { display:none; }
#serviceStatusDetails[open] .status-collapse { display:inline; }
#serviceStatusDetails .status-group { position:static; width:auto; margin-top:8px; box-shadow:none; overflow-wrap:anywhere; }
@media(max-width:540px) {
  #servicesDialog > .section-heading { padding:16px 20px 12px; }
  #servicesDialog .services-body { padding:4px 20px 20px; }
}

.change-card.auto { border-left:3px solid var(--like); }
.trust-card { border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin-top:10px; background:var(--like-soft); }
.trust-card p { margin:0 0 8px; font-size:13px; }
.trust-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:6px 0; font-size:13px; }
.trust-row select { max-width:60%; }
.trust-row.trust-check { justify-content:flex-start; gap:8px; }
