/* libenest.com/trips/: white, one blue for actions, thin grey lines; the trip's own photos carry the colour. */
/* Sheets and the toast are added to <body>, outside .tp, so they carry the same colours. */
.tp, .tp-sheet, .tp-toast { --tp-blue:#006bff; --tp-ink:var(--lb-text,#101113); --tp-muted:var(--lb-text-2,#6d7480); --tp-line:var(--lb-line,#e6eaef); --tp-soft:var(--lb-surface,#f4f6f9); --tp-range:var(--lb-blue-soft,#e8f1ff); }
.tp { width:min(1120px, calc(100% - 48px)); margin:0 auto; padding:24px 0 120px; color:var(--tp-ink); }
.tp-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.tp-icon { flex:none; }
.tp-muted { color:var(--tp-muted); font-size:14px; line-height:1.5; }
.tp-loading, .tp-empty { padding:48px 0; color:var(--tp-muted); text-align:center; }
.tp-empty { display:grid; justify-items:center; gap:16px; }
.tp-panel { max-width:460px; margin:24px auto; display:grid; gap:14px; }
.tp-panel h2, .tp-intro h2, .tp-section h2 { font-size:24px; font-weight:700; letter-spacing:-.02em; }

/* Buttons: one blue, one quiet, round icon buttons. */
.tp-primary, .tp-secondary { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:46px; padding:0 20px; border-radius:14px; font:inherit; font-size:15px; font-weight:600; text-decoration:none; cursor:pointer; }
.tp-primary { border:0; background:var(--tp-blue); color:#fff; }
.tp-primary:hover { background:#005ad7; }
.tp-secondary { border:1px solid var(--tp-line); background:var(--lb-bg,#fff); color:var(--tp-ink); }
.tp-secondary:hover { border-color:var(--lb-line,#c9d3df); }
.tp-wide { width:100%; }
.tp-round { display:inline-grid; place-items:center; width:40px; height:40px; border:0; border-radius:50%; background:none; color:var(--tp-ink); cursor:pointer; }
.tp-round:hover { background:var(--tp-soft); }
.tp-round-line { width:46px; height:46px; border:1px solid var(--tp-line); }
.tp-link-button { display:inline-flex; align-items:center; gap:6px; padding:6px 0; border:0; background:none; color:var(--lb-link,var(--tp-blue)); font:inherit; font-size:14px; font-weight:600; text-decoration:none; cursor:pointer; }
.tp-text-danger { justify-self:center; margin-top:6px; padding:10px; border:0; background:none; color:var(--lb-red-text,#c7362f); font:inherit; font-size:14px; cursor:pointer; }
.tp-mini { display:inline-grid; place-items:center; width:32px; height:32px; border:0; border-radius:10px; background:none; color:var(--lb-text-2,#4a525e); cursor:pointer; }
.tp-mini:hover:not(:disabled) { background:var(--tp-soft); }
.tp-mini:disabled { opacity:.3; cursor:default; }
:where(.tp, .tp-sheet, .tp-toast) :is(button, a, input, select, textarea):focus-visible { outline:2px solid #83b8ff; outline-offset:2px; }

/* 大家 / 我的 */
.tp-tabs { display:flex; border-bottom:1px solid var(--tp-line); }
.tp-tab { flex:1; max-width:220px; padding:12px 0 14px; color:var(--tp-muted); font-size:17px; font-weight:600; text-align:center; text-decoration:none; border-bottom:2px solid transparent; }
.tp-tab.is-active { color:var(--tp-ink); border-color:var(--lb-link,var(--tp-blue)); }
.tp-intro { display:grid; gap:6px; margin:24px 0 18px; }
.tp-section { margin-top:34px; }
.tp-section h2 { font-size:20px; margin-bottom:14px; }

/* Trip cards */
.tp-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:18px; }
.tp-card { display:grid; gap:10px; color:inherit; text-decoration:none; }
.tp-card-cover { position:relative; aspect-ratio:5 / 4; overflow:hidden; border-radius:14px; background:var(--tp-soft); }
.tp-card-cover img { width:100%; height:100%; object-fit:cover; }
.tp-cover-empty { display:grid; place-items:center; width:100%; height:100%; color:var(--lb-text-2,#9aa6b4); }
.tp-badge { position:absolute; top:10px; left:10px; padding:3px 9px; border-radius:999px; background:var(--lb-glass,rgb(255 255 255 / 92%)); font-size:12px; font-weight:600; }
.tp-card h3 { font-size:17px; font-weight:650; line-height:1.35; }
.tp-card:hover h3 { color:var(--lb-link,var(--tp-blue)); }
.tp-card-route { overflow:hidden; color:var(--lb-text-2,#3f4652); font-size:13px; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.tp-card-owner { color:var(--tp-muted); font-size:13px; }
.tp-card-text { display:grid; gap:3px; }

/* My calendar */
.tp-mine-actions { display:flex; flex-wrap:wrap; gap:10px; margin:20px 0 4px; }
.tp-calendar { margin-top:16px; padding:16px; border:1px solid var(--tp-line); border-radius:18px; }
.tp-cal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.tp-cal-head h3 { font-size:20px; font-weight:700; }
.tp-cal-nav { display:flex; align-items:center; gap:4px; }
.tp-cal-grid { display:grid; grid-template-columns:repeat(7, 1fr); row-gap:4px; }
.tp-cal-wd { padding:6px 0; color:var(--tp-muted); font-size:12px; text-align:center; }
.tp-cal-day { display:grid; place-items:center; height:42px; border:0; background:none; color:var(--tp-ink); font:inherit; font-size:15px; cursor:pointer; }
.tp-cal-day > span { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; }
.tp-cal-day.is-trip { background:var(--tp-range); }
.tp-cal-day.is-start { border-radius:21px 0 0 21px; }
.tp-cal-day.is-end { border-radius:0 21px 21px 0; }
.tp-cal-day.is-start.is-end { border-radius:21px; }
.tp-cal-day.is-today > span { box-shadow:inset 0 0 0 1.5px var(--lb-link,var(--tp-blue)); color:var(--lb-link,var(--tp-blue)); font-weight:650; }
.tp-cal-day.is-picked > span { background:var(--tp-blue); color:#fff; font-weight:650; }
.tp-cal-day:hover > span { background:var(--tp-soft); }
.tp-cal-day.is-picked:hover > span { background:#005ad7; }
.tp-day-pick { display:grid; gap:10px; margin-top:14px; }
.tp-day-pick:empty { display:none; }
.tp-day-pick h3 { font-size:17px; font-weight:700; }
.tp-day-pick-trip { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px; border:1px solid var(--tp-line); border-radius:14px; }
.tp-shared-list { display:grid; gap:0; margin-top:16px; list-style:none; padding:0; }
.tp-shared-list li { display:flex; gap:14px; padding:12px 0; border-bottom:1px solid var(--tp-line); }
.tp-shared-list a { color:var(--lb-link,var(--tp-blue)); }

/* One trip */
.tp-back { display:inline-flex; align-items:center; gap:6px; color:var(--tp-muted); font-size:14px; text-decoration:none; }
.tp-trip-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin:14px 0 6px; }
.tp-trip-head h2 { font-size:30px; font-weight:750; letter-spacing:-.03em; line-height:1.25; }
.tp-trip-head .tp-muted { margin-top:4px; }
.tp-trip-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tp-source { margin-top:4px; color:var(--tp-muted); font-size:13px; }
.tp-source a { color:var(--lb-link,var(--tp-blue)); }
.tp-day-tabs { display:flex; gap:4px; margin-top:18px; overflow-x:auto; border-bottom:1px solid var(--tp-line); scrollbar-width:none; scroll-snap-type:x proximity; }
.tp-day-tabs::-webkit-scrollbar { display:none; }
.tp-day-tab { flex:none; display:grid; gap:2px; min-width:84px; max-width:120px; padding:10px 12px 12px; border:0; border-bottom:2px solid transparent; background:none; color:var(--tp-muted); font:inherit; text-align:center; cursor:pointer; scroll-snap-align:start; }
.tp-day-tab strong { font-size:16px; font-weight:650; white-space:nowrap; }
/* A long day title never widens its tab: a week of days still fits a phone's strip, one tab at a time. */
.tp-day-tab small { min-width:0; min-height:1.2em; overflow:hidden; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.tp-day-tab.is-active { color:var(--lb-link,var(--tp-blue)); border-color:var(--lb-link,var(--tp-blue)); }
.tp-day { max-width:720px; padding-top:18px; }
.tp-day-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.tp-day-head h3 { font-size:20px; font-weight:700; }
.tp-day-title { margin-top:4px; color:var(--lb-text-2,#3f4652); }
.tp .tp-day-title-input { width:100%; min-height:0; border-radius:0; margin-top:8px; padding:9px 0; border:0; border-bottom:1px dashed var(--lb-line,#cdd5df); background:none; color:var(--lb-text-2,#3f4652); font:inherit; font-size:15px; }
.tp .tp-day-title-input:focus { box-shadow:none; outline:0; border-bottom-color:var(--lb-link,var(--tp-blue)); }
.tp-stops { display:grid; margin-top:8px; list-style:none; padding:0; }
.tp-stop { display:grid; grid-template-columns:30px 1fr 72px; align-items:start; gap:14px; padding:16px 0; border-bottom:1px solid var(--tp-line); }
.tp-stop:has(.tp-stop-tools) { grid-template-columns:30px 1fr 72px 32px; }
.tp-stop-no { display:grid; place-items:center; width:28px; height:28px; margin-top:2px; border-radius:50%; background:var(--tp-blue); color:#fff; font-size:14px; font-weight:700; }
.tp-stop-no.is-unplaced { background:#a3adba; }
.tp-stop-text { display:grid; gap:4px; min-width:0; }
.tp-stop-text strong { font-size:17px; font-weight:650; line-height:1.4; overflow-wrap:anywhere; }
.tp-stop-text .tp-muted { white-space:pre-line; overflow-wrap:anywhere; }
.tp-stop-links { display:flex; gap:16px; margin-top:2px; font-size:13px; }
.tp-stop-links a { display:inline-flex; align-items:center; gap:4px; color:var(--lb-link,var(--tp-blue)); font-weight:600; text-decoration:none; }
.tp-stop-photo { width:72px; height:72px; border-radius:12px; object-fit:cover; }
.tp-stop-photo-empty { display:grid; place-items:center; width:72px; height:72px; border-radius:12px; background:var(--tp-soft); color:var(--lb-text-2,#9aa6b4); }
.tp-stop-checkin { display:inline-flex; align-items:center; gap:4px; justify-self:start; margin-top:2px; color:var(--lb-link,var(--tp-blue)); font-size:13px; font-weight:600; text-decoration:none; }
/* A place photo the AI office made carries its mark on the photo: AI 示意圖, or AI on a small thumbnail. */
.tp-ai-pic { position:relative; display:inline-block; flex:none; overflow:hidden; line-height:0; vertical-align:top; }
.tp-ai-pic.tp-stop-photo, .tp-ai-pic.tp-cover-photo { display:block; }
.tp-ai-pic.tp-stop-photo > img, .tp-ai-pic.tp-cover-photo > img { width:100%; height:100%; object-fit:cover; }
.tp-cover-photo { width:100%; height:100%; }
.tp-ai-mark { position:absolute; left:6px; bottom:6px; padding:2px 6px; border-radius:5px; background:rgba(17,24,39,.66); color:#fff; font-size:10px; font-weight:600; line-height:1.5; white-space:nowrap; pointer-events:none; }
.tp-card-cover .tp-ai-mark { left:10px; bottom:10px; padding:3px 9px; border-radius:999px; font-size:12px; }
.tp-place-results .tp-ai-mark { left:3px; bottom:3px; padding:0 4px; font-size:9px; }
.tp-stop-tools { display:grid; gap:2px; }
/* How to get to a stop from the one before, between the two: ↓ 南海電鐵 約 40 分, its arrow under the stop numbers. */
.tp-move { grid-column:1 / -1; display:flex; align-items:center; gap:14px; margin:-6px 0 -4px; color:var(--tp-muted); font-size:13px; line-height:1.4; }
.tp-move-arrow { flex:none; width:28px; color:var(--lb-text-2,#9aa6b4); font-size:15px; text-align:center; }
.tp-move-text { min-width:0; overflow-wrap:anywhere; }
/* What the trip is like: who it suits, its pace, where to stay, and a few tips. */
.tp-details { display:grid; gap:10px; min-width:0; max-width:720px; margin-top:14px; padding:14px 16px; border:1px solid var(--tp-line); border-radius:16px; }
.tp-details-facts { display:flex; flex-wrap:wrap; gap:6px 18px; margin:0; font-size:15px; }
.tp-details-facts span { display:inline-flex; align-items:baseline; gap:6px; min-width:0; }
.tp-details small { color:var(--tp-muted); font-size:13px; }
.tp-details-facts strong { font-weight:600; overflow-wrap:anywhere; }
.tp-details-tips { display:grid; gap:4px; min-width:0; }
.tp-details-tips ul { display:grid; gap:2px; margin:0; padding-left:18px; color:var(--lb-text-2,#3f4652); font-size:14px; line-height:1.55; }
/* Free text people and the AI office write can hold one long unbroken word (a URL-like run, a code); it wraps instead of
   widening a 375px phone's page. */
.tp-details-tips li, .tp-day-title, .tp-card-suits { min-width:0; overflow-wrap:anywhere; }
.tp-card-suits, .tp-card-from-ai { color:var(--tp-muted); font-size:13px; }
.tp-from-ai { color:var(--tp-ink); font-weight:600; }
.tp-more { border:1px solid var(--tp-line); border-radius:14px; }
.tp-more > summary { padding:12px 14px; font-size:14px; font-weight:600; cursor:pointer; }
.tp-more-body { display:grid; gap:12px; padding:0 14px 14px; }
.tp-empty-day { padding:28px 0; color:var(--tp-muted); }
.tp-add-stop { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:50px; margin-top:16px; border:1.5px solid var(--lb-link,var(--tp-blue)); border-radius:14px; background:var(--lb-bg,#fff); color:var(--lb-link,var(--tp-blue)); font:inherit; font-size:16px; font-weight:600; cursor:pointer; }
.tp-add-stop:hover { background:var(--lb-surface,#f2f7ff); }
.tp-stay { display:grid; gap:12px; margin-top:28px; padding:18px; border-radius:18px; background:var(--tp-soft); }
.tp-stay-head { display:flex; align-items:center; gap:8px; }
.tp-stay-head h3 { font-size:17px; font-weight:700; }
.tp-stay-card { display:flex; align-items:center; gap:14px; width:100%; min-width:0; padding:0; border:0; background:none; color:inherit; font:inherit; text-align:left; text-decoration:none; cursor:pointer; user-select:none; -webkit-user-select:none; }
.tp-stay-card > span:nth-child(2) { flex:1; min-width:0; }
.tp-stay-drag { display:grid; place-items:center; flex:none; width:28px; height:40px; border-radius:8px; color:var(--lb-text-2,#9aa6b4); cursor:grab; touch-action:none; }
.tp-stay-card:hover .tp-stay-drag { background:var(--tp-soft); color:var(--tp-ink); }
.tp-stay-card.is-dragging { opacity:.35; }
.tp-stay-ghost { position:fixed; left:0; top:0; z-index:1000; display:flex; align-items:center; gap:12px; padding:10px; border-radius:16px; background:var(--lb-bg,#fff); box-shadow:0 14px 34px rgba(16,17,19,.22); pointer-events:none; }
.tp-stay-ghost img { width:52px; height:52px; border-radius:10px; object-fit:cover; }
.tp-stay-ghost strong { font-size:14px; }
.tp-stay-ghost small, .tp-stay-ghost .tp-stay-drag { display:none; }
.tp.is-placing-stay .tp-day-tab, .tp.is-placing-stay .tp-stops { outline:2px dashed #b9cff5; outline-offset:2px; border-radius:12px; }
.tp .is-drop { outline:2px solid var(--lb-link,var(--tp-blue)) !important; background:var(--lb-surface,#f5f9ff); }
.tp-stay-hint { margin-top:-4px; font-size:13px; }
.tp-drop-bar { position:fixed; left:12px; right:12px; top:calc(12px + env(safe-area-inset-top)); z-index:999; display:grid; gap:6px; padding:10px; border-radius:18px; background:var(--lb-glass,rgba(255,255,255,.97)); box-shadow:0 8px 28px rgba(16,17,19,.2); --tp-blue:#006bff; --tp-ink:var(--lb-text,#101113); --tp-muted:var(--lb-text-2,#6d7480); }
.tp-drop-bar > small { color:var(--tp-muted); font-size:12px; font-weight:600; }
.tp-drop-bar > div { display:flex; gap:6px; overflow-x:auto; }
.tp-drop-night { display:grid; flex:none; min-width:76px; padding:10px 12px; border:2px dashed #b9cff5; border-radius:14px; text-align:center; }
.tp-drop-night strong { font-size:14px; }
.tp-drop-night small { color:var(--tp-muted); font-size:11px; }
.tp-drop-night.is-drop { border-style:solid; border-color:var(--lb-link,var(--tp-blue)); background:var(--lb-surface,#e8f1ff); }
/* The night's stay as the day's last line. */
.tp-night { display:flex; align-items:center; gap:12px; width:100%; margin-top:10px; padding:12px 14px; border:1px dashed var(--lb-line,#c8d3e1); border-radius:14px; background:var(--lb-bg,#fafcff); color:inherit; font:inherit; text-align:left; cursor:pointer; }
.tp-night > span:nth-child(2) { display:grid; flex:1; min-width:0; }
.tp-night small { color:var(--tp-muted); font-size:12px; }
.tp-night strong { overflow:hidden; font-size:15px; font-weight:650; text-overflow:ellipsis; white-space:nowrap; }
.tp-night-icon { display:grid; place-items:center; flex:none; width:34px; height:34px; border-radius:50%; background:var(--lb-surface,#e8f1ff); color:var(--lb-link,var(--tp-blue)); }
/* A stay up close: its month with each night's price. */
.tp-stay-info { display:grid; gap:14px; }
.tp-stay-cal .tp-cal-grid { row-gap:2px; }
.tp-stay-day { height:auto; min-height:48px; grid-template-rows:auto auto; align-content:center; gap:1px; padding:4px 0; }
.tp-stay-day small { color:var(--tp-muted); font-size:10px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.tp-stay-day.is-full > span:first-child { color:var(--lb-text-3,#b4bcc7); text-decoration:line-through; }
.tp-stay-day.is-open > span:first-child { font-weight:650; }
.tp-stay-cal .tp-stay-day.is-sel, .tp-stay-cal .tp-stay-day.is-sel > span { border-radius:10px; background:var(--tp-blue); box-shadow:none; }
.tp-stay-cal .tp-stay-day.is-sel > span:first-child, .tp-stay-cal .tp-stay-day.is-sel small { color:#fff; text-decoration:none; }
.tp-stay-day:disabled { cursor:default; opacity:.45; }
.tp-stay-summary { padding:10px 12px; border-radius:12px; background:var(--tp-soft); font-size:14px; font-weight:600; }
.tp-stay-summary:empty { display:none; }
.tp-stay-nights select { max-width:160px; }
.tp-stay-card img, .tp-stay-card .tp-stop-photo-empty { flex:none; width:64px; height:64px; border-radius:12px; object-fit:cover; background:var(--lb-bg,#fff); }
.tp-stay-card strong { display:block; font-size:16px; font-weight:650; }
.tp-stay-card small { display:block; margin-top:2px; color:var(--tp-muted); font-size:13px; }
.tp-stay-card:hover strong { color:var(--lb-link,var(--tp-blue)); }
.tp-stay-options { display:grid; gap:12px; list-style:none; padding:0; }
.tp-stay-options li { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px; border-radius:14px; background:var(--lb-bg,#fff); }
.tp-stay-pick { display:grid; justify-items:end; gap:6px; text-align:right; }
.tp-stay-pick .tp-secondary { min-height:38px; padding:0 14px; font-size:14px; }

/* Sheets and forms */
.tp-sheet { width:min(520px, calc(100% - 32px)); max-height:calc(100dvh - 48px); margin:auto; padding:0; overflow:auto; border:0; border-radius:24px; background:var(--lb-elevated,#fff); color:var(--tp-ink); box-shadow:0 24px 70px rgb(20 32 50 / 20%); }
.tp-sheet::backdrop { background:rgb(16 17 19 / 34%); }
.tp-sheet-head { position:sticky; top:0; z-index:1; display:flex; align-items:center; justify-content:space-between; padding:14px 14px 8px 22px; background:var(--lb-elevated,#fff); }
.tp-sheet-head h2 { font-size:19px; font-weight:700; }
.tp-sheet-body { display:grid; gap:14px; padding:4px 22px 24px; }
.tp-sheet-sub { margin-top:6px; font-size:16px; font-weight:700; }
.tp-form { display:grid; gap:14px; }
.tp-field { display:grid; gap:6px; min-width:0; font-size:14px; font-weight:600; }
.tp-field small { color:var(--tp-muted); font-weight:400; }
.tp-field-row { display:grid; grid-template-columns:1fr 110px; gap:12px; }
.tp-field-row .tp-field-small:first-child { order:0; }
.tp :is(input, select, textarea), .tp-sheet :is(input, select, textarea) { width:100%; min-height:46px; padding:10px 14px; border:1px solid var(--lb-line,#d9e0e8); border-radius:12px; background:var(--lb-elevated,#fff); color:var(--tp-ink); font:inherit; font-size:16px; font-weight:400; }
.tp-sheet textarea { min-height:72px; resize:vertical; }
.tp-sheet :is(input, select, textarea):focus { outline:0; border-color:var(--lb-link,var(--tp-blue)); box-shadow:0 0 0 3px rgb(0 107 255 / 14%); }
.tp-form-status { min-height:1.2em; color:var(--lb-red-text,#c7362f); font-size:14px; }
.tp-form-status:empty { display:none; }
.tp-signin { display:grid; gap:12px; }
.tp-signin-lead { font-size:16px; line-height:1.6; }
.tp-place-results { display:grid; list-style:none; padding:0; margin:-6px 0 0; }
.tp-place-results:empty { display:none; }
.tp-place-results button { display:flex; align-items:center; gap:12px; width:100%; padding:8px 4px; border:0; border-bottom:1px solid var(--tp-line); background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.tp-place-results img, .tp-place-results .tp-stop-photo-empty { flex:none; width:44px; height:44px; border-radius:10px; object-fit:cover; }
.tp-place-results strong { display:block; font-size:15px; font-weight:600; }
.tp-place-results small { display:block; color:var(--tp-muted); font-size:12px; }
.tp-chosen { display:flex; align-items:center; gap:6px; margin-top:-6px; color:var(--lb-link,var(--tp-blue)); font-size:13px; }
.tp-chosen:empty { display:none; }
.tp-choice { display:grid; gap:10px; margin:0; padding:0; border:0; }
.tp-choice legend { margin-bottom:8px; font-size:14px; font-weight:600; }
.tp-choice label { display:flex; gap:12px; padding:12px 14px; border:1px solid var(--tp-line); border-radius:14px; cursor:pointer; }
.tp-choice label:has(input:checked) { border-color:var(--lb-link,var(--tp-blue)); background:var(--lb-surface,#f5f9ff); }
.tp-choice input { width:18px; min-height:0; height:18px; margin-top:2px; padding:0; accent-color:var(--tp-blue); }
.tp-choice strong { display:block; font-size:15px; }
.tp-choice small { display:block; margin-top:2px; color:var(--tp-muted); font-size:13px; font-weight:400; }
.tp-invite-buttons { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.tp-people { display:grid; list-style:none; padding:0; }
.tp-people li { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--tp-line); }
.tp-people li > span:nth-child(2) { flex:1; min-width:0; }
.tp-people strong { display:block; font-size:15px; font-weight:600; }
.tp-people small { display:block; color:var(--tp-muted); font-size:13px; }
.tp-avatar { display:grid; place-items:center; flex:none; width:38px; height:38px; border-radius:50%; background:var(--lb-surface,#e8f1ff); color:var(--lb-link,var(--tp-blue)); font-weight:700; }
.tp-toast { position:fixed; left:50%; bottom:calc(100px + env(safe-area-inset-bottom)); z-index:60; display:flex; align-items:center; gap:14px; max-width:calc(100% - 32px); padding:12px 18px; border-radius:14px; background:var(--lb-strong,#1d2127); color:#fff; font-size:14px; transform:translateX(-50%); box-shadow:0 10px 30px rgb(0 0 0 / 22%); }
.tp-toast[hidden] { display:none; }
.tp-toast button { border:0; background:none; color:#7fb4ff; font:inherit; font-weight:700; cursor:pointer; }

/* 求建議: a filter on 大家, a mark on the card, and the question above the days. */
.tp-chips { display:flex; gap:8px; margin:0 0 18px; }
.tp-chip { display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:0 14px; border:1px solid var(--tp-line); border-radius:999px; color:var(--tp-ink); font-size:14px; font-weight:600; text-decoration:none; }
.tp-chip.is-active { border-color:var(--tp-ink); background:var(--lb-strong,var(--tp-ink)); color:#fff; }
.tp-badge-ask { background:var(--tp-blue); color:#fff; }
.tp-badge-ai { background:rgba(17,24,39,.78); color:#fff; }
.tp-ai-note { margin-top:8px; padding:10px 12px; border-radius:12px; background:var(--tp-soft); color:var(--tp-muted); font-size:13px; line-height:1.6; }
.tp-ai-note strong { color:var(--tp-ink); }
.tp-ai-note a { color:var(--lb-link,var(--tp-blue)); }
.tp-card-ask { overflow:hidden; color:var(--tp-ink); font-size:14px; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.tp-card-ask::before { content:'“'; }
.tp-card-ask::after { content:'”'; }
.tp-advice { display:grid; gap:6px; margin-top:18px; padding:16px 18px; border-radius:16px; background:var(--tp-range); }
.tp-advice-head { display:flex; align-items:center; gap:8px; color:var(--lb-link,var(--tp-blue)); font-size:14px; }
.tp-advice-question { font-size:17px; font-weight:600; line-height:1.5; white-space:pre-line; }

/* Each day's comments */
.tp-day-tab { position:relative; }
.tp-day-count { position:absolute; top:6px; right:4px; display:inline-flex; align-items:center; gap:2px; color:var(--tp-muted); font-size:11px; font-weight:600; }
.tp-comments { display:grid; gap:14px; margin-top:28px; padding-top:22px; border-top:1px solid var(--tp-line); }
.tp-comments-head { display:flex; align-items:center; gap:8px; }
.tp-comments-head h3 { font-size:18px; font-weight:700; }
.tp-comment-list { display:grid; gap:16px; list-style:none; padding:0; }
.tp-comment { display:flex; gap:12px; }
.tp-comment .tp-avatar { width:34px; height:34px; font-size:14px; }
.tp-comment.is-private { opacity:.7; }
.tp-comment-text { flex:1; min-width:0; display:grid; gap:3px; }
.tp-comment-head { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:14px; }
.tp-comment-head time { color:var(--tp-muted); font-size:13px; }
.tp-tag { padding:1px 8px; border-radius:999px; background:var(--tp-soft); color:var(--tp-muted); font-size:12px; font-weight:600; }
.tp-comment-body { font-size:15px; line-height:1.6; white-space:pre-line; overflow-wrap:anywhere; }
.tp-comment-actions { display:flex; gap:16px; }
.tp-comment-actions .tp-link-button { padding:2px 0; color:var(--tp-muted); font-size:13px; font-weight:500; }
.tp-report { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.tp-report select { width:auto; min-height:38px; }
.tp-composer { gap:10px; }
.tp-composer textarea { min-height:64px; resize:vertical; }
.tp-composer-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.tp-composer-foot small { font-size:12px; }
.tp-composer-foot .tp-primary { flex:none; min-height:42px; }

.tp-held { display:grid; gap:4px; margin-top:18px; padding:16px 18px; border-radius:16px; background:var(--lb-surface,#fff4e5); color:var(--lb-amber-text,#6b3d00); }
.tp-held p { font-size:15px; line-height:1.5; }
.tp-held .tp-muted { color:var(--lb-amber-text,#8a5a1c); }
.tp-card-new { display:inline-flex; align-items:center; gap:5px; color:var(--lb-link,var(--tp-blue)); font-size:13px; font-weight:650; }
.tp-switch { display:flex; align-items:center; justify-content:space-between; gap:16px; max-width:560px; padding:14px 16px; border:1px solid var(--tp-line); border-radius:14px; cursor:pointer; }
.tp-switch > span { display:grid; gap:3px; }
.tp-switch strong { font-size:15px; font-weight:600; }
.tp-switch small { color:var(--tp-muted); font-size:13px; line-height:1.5; }
.tp .tp-switch input { flex:none; width:48px; min-height:28px; height:28px; padding:0; border:0; border-radius:999px; background:var(--lb-surface-2,#d4dae2); appearance:none; position:relative; cursor:pointer; transition:background .15s; }
.tp .tp-switch input::after { content:''; position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%; background:var(--lb-bg,#fff); box-shadow:0 1px 3px rgb(0 0 0 / 20%); transition:transform .15s; }
.tp .tp-switch input:checked { background:var(--tp-blue); }
.tp .tp-switch input:checked::after { transform:translateX(20px); }
@media (prefers-reduced-motion:reduce) { .tp .tp-switch input, .tp .tp-switch input::after { transition:none; } }

/* Dates picked like a booking calendar: the chosen days as one band. */
.tp-cal-hint { margin-top:16px; }
.tp-cal-day.is-sel { background:var(--lb-blue-soft,#dbe9ff); }
.tp-cal-day.is-sel-start { border-radius:21px 0 0 21px; }
.tp-cal-day.is-sel-end { border-radius:0 21px 21px 0; }
.tp-cal-day.is-sel-start.is-sel-end { border-radius:21px; }
.tp-cal-day.is-sel-start > span, .tp-cal-day.is-sel-end > span { background:var(--tp-blue); color:#fff; font-weight:650; }
.tp-range { display:grid; gap:8px; padding:12px; border:1px solid var(--tp-line); border-radius:16px; font-weight:400; }
.tp-range-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:4px 12px; font-size:15px; }
.tp-range-head .tp-link-button { white-space:nowrap; }
.tp-day-pick-trip .tp-primary { flex:none; white-space:nowrap; }
.tp-range .tp-cal-head h3 { font-size:17px; }
.tp-stepper { display:flex; align-items:center; justify-content:center; gap:20px; padding:8px 0; font-size:17px; font-weight:650; }
.tp-stepper .tp-round:disabled { opacity:.35; cursor:default; }

/* Saving: quiet while it works, plain when there is no connection. */
.tp-save-state { min-height:1.4em; margin-top:2px; color:var(--tp-muted); font-size:13px; }
.tp-save-state.is-unsaved { color:var(--lb-amber-text,#b45309); font-weight:600; }

/* 行程 / 記帳 */
.tp-segment { display:inline-flex; gap:4px; margin-top:18px; padding:4px; border-radius:14px; background:var(--tp-soft); }
.tp-segment button { display:inline-flex; align-items:center; gap:6px; min-height:38px; padding:0 18px; border:0; border-radius:10px; background:none; color:var(--tp-muted); font:inherit; font-size:15px; font-weight:600; cursor:pointer; }
.tp-segment button.is-active { background:var(--lb-bg,#fff); color:var(--tp-ink); box-shadow:0 1px 3px rgb(16 17 19 / 12%); }
.tp-ledger { display:grid; gap:22px; max-width:640px; margin-top:20px; }
.tp-ledger-empty { display:grid; justify-items:center; gap:12px; padding:28px 12px 8px; color:var(--tp-muted); text-align:center; line-height:1.6; }
.tp-ledger-total { display:grid; gap:4px; padding:20px; border-radius:18px; background:var(--tp-range); }
.tp-ledger-currencies { display:flex; margin:0; flex-wrap:wrap; gap:4px 18px; list-style:none; padding:0; font-size:30px; font-weight:700; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.tp-ledger-converted { color:var(--lb-text-2,#304056); font-size:15px; }
.tp-ledger-total .tp-link-button { justify-self:start; }
.tp-ledger-block { display:grid; gap:8px; }
.tp-ledger-block h3 { font-size:17px; font-weight:700; }
.tp-ledger-rows { display:grid; margin:0; list-style:none; padding:0; }
.tp-ledger-rows li { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--tp-line); font-size:15px; }
.tp-ledger-label { flex:1; min-width:0; }
.tp-ledger-rows strong, .tp-expense-amount { font-variant-numeric:tabular-nums; text-align:right; }
.tp-ledger-icon { display:inline-grid; place-items:center; flex:none; width:34px; height:34px; border-radius:50%; background:var(--tp-soft); color:var(--lb-text-2,#4a525e); }
.tp-ledger-day { display:grid; gap:2px; margin-top:6px; }
.tp-ledger-day-head { display:flex; margin:0; justify-content:space-between; gap:12px; padding:6px 0; color:var(--tp-muted); font-size:13px; font-weight:600; }
.tp-expenses { display:grid; margin:0; list-style:none; padding:0; }
.tp-expense { display:flex; align-items:center; gap:12px; width:100%; padding:10px 0; border:0; border-bottom:1px solid var(--tp-line); background:none; color:inherit; font:inherit; text-align:left; }
button.tp-expense { cursor:pointer; }
button.tp-expense:hover strong { color:var(--lb-link,var(--tp-blue)); }
.tp-expense-text { display:grid; flex:1; min-width:0; gap:2px; }
.tp-expense-text strong { overflow:hidden; font-size:15px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.tp-expense-text small { color:var(--tp-muted); font-size:13px; }
.tp-expense-amount { flex:none; font-size:15px; font-weight:650; }
.tp-ledger-settings { justify-self:start; color:var(--tp-muted); }
.tp-amount-row { display:grid; grid-template-columns:1fr 130px; gap:12px; }
.tp-amount-row input { font-size:24px; font-weight:650; font-variant-numeric:tabular-nums; }
.tp-chip-row { display:flex; flex-wrap:wrap; gap:8px; }
button.tp-chip { background:var(--lb-bg,#fff); font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.tp-split { display:flex; flex-wrap:wrap; gap:8px 16px; margin:0; padding:0; border:0; }
.tp-split legend { margin-bottom:8px; font-size:14px; font-weight:600; }
.tp-check { display:inline-flex; align-items:center; gap:8px; font-size:15px; cursor:pointer; }
.tp .tp-check input, .tp-sheet .tp-check input { width:20px; min-height:0; height:20px; padding:0; accent-color:var(--tp-blue); }
.tp-rates { display:grid; gap:8px; }
.tp-rate { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:10px; font-size:15px; font-weight:600; }
.tp-extra-people { display:grid; gap:8px; list-style:none; padding:0; }
.tp-extra-people li { display:flex; align-items:center; gap:8px; }
.tp-subscribe { display:grid; gap:10px; margin-top:12px; padding-top:16px; border-top:1px solid var(--tp-line); }

/* Who planned the trip, as a post shows its author: picture, name, @handle. */
.tp-author { display:flex; align-items:center; gap:12px; max-width:720px; margin-top:14px; color:inherit; text-decoration:none; }
.tp-author > .tp-icon { margin-left:auto; color:var(--lb-text-2,#9aa6b4); }
.tp-author-pic { display:grid; place-items:center; flex:none; width:44px; height:44px; border-radius:50%; background:var(--lb-surface,#e8f1ff); color:var(--lb-link,var(--tp-blue)); font-size:18px; font-weight:700; object-fit:cover; box-shadow:0 0 0 2px var(--lb-bg,#fff), 0 0 0 3.5px var(--lb-link,var(--tp-blue)); }
.tp-author-text { display:grid; min-width:0; }
.tp-author-name { display:flex; align-items:center; gap:8px; min-width:0; }
.tp-author-name strong { overflow:hidden; font-size:15px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.tp-author small { color:var(--tp-muted); font-size:13px; }
a.tp-author:hover strong { color:var(--lb-link,var(--tp-blue)); }
.tp-tag-ai { flex:none; background:var(--lb-surface,#eef0ff); color:var(--lb-link,#4b4fc4); }
.tp-card-owner { display:flex; align-items:center; gap:6px; }
.tp-card-owner-pic { flex:none; width:20px; height:20px; border-radius:50%; object-fit:cover; }
.tp-avatar-photo { object-fit:cover; }

/* A stop: its name and photo open its sheet; the trip's own people drag it by its handle, edit it or take it out. */
.tp-stop:has(.tp-drag) { grid-template-columns:22px 30px 1fr 72px 32px; }
.tp-drag { display:grid; place-items:center; width:22px; height:32px; padding:0; border:0; border-radius:8px; background:none; color:var(--lb-text-2,#9aa6b4); cursor:grab; touch-action:none; }
.tp-drag:hover, .tp-drag:focus-visible { background:var(--tp-soft); color:var(--tp-ink); }
.tp-stops.is-sorting .tp-stop { transition:transform .15s ease; }
.tp-stops .tp-stop.is-dragging { position:relative; z-index:2; transition:none; background:var(--lb-bg,#fff); box-shadow:0 10px 28px rgba(16,17,19,.14); border-radius:14px; cursor:grabbing; }
.tp-stop-name { justify-self:start; padding:0; border:0; background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.tp-stop-name:hover strong { color:var(--lb-link,var(--tp-blue)); }
.tp-stop-links button { display:inline-flex; align-items:center; gap:4px; padding:0; border:0; background:none; color:var(--lb-link,var(--tp-blue)); font:inherit; font-weight:600; cursor:pointer; }
.tp-stop-take { display:inline-flex; align-items:center; gap:4px; justify-self:start; margin-top:2px; padding:5px 10px; border:1px solid var(--tp-line); border-radius:999px; background:var(--lb-bg,#fff); color:var(--tp-ink); font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.tp-stop-take:hover { border-color:var(--lb-link,var(--tp-blue)); color:var(--lb-link,var(--tp-blue)); }
.tp-stop-photo-button { padding:0; border:0; border-radius:12px; background:none; line-height:0; cursor:pointer; }
.tp-stop-add { border:1.5px dashed var(--lb-line-strong,#b9c4d2); color:var(--lb-link,var(--tp-blue)); cursor:pointer; }
.tp-stop-add:hover { border-color:var(--lb-link,var(--tp-blue)); background:var(--lb-surface,#f5f9ff); }

/* The day's map: numbered stops joined in order. */
.tp-side { display:grid; gap:16px; min-width:0; }
.tp-side > .tp-stay { margin-top:0; }
.tp-map { position:relative; overflow:hidden; border-radius:18px; background:var(--lb-surface,#f5efe3); }
.tp-map-canvas { width:100%; height:460px; }
.tp-map-note { position:absolute; left:12px; right:12px; top:12px; padding:10px 12px; border-radius:12px; background:var(--lb-glass,rgba(255,255,255,.94)); color:var(--tp-ink); font-size:13px; line-height:1.45; box-shadow:0 2px 10px rgba(16,17,19,.1); }
.tp-map-zoom { position:absolute; right:10px; bottom:34px; display:grid; overflow:hidden; border-radius:12px; background:var(--lb-bg,#fff); box-shadow:0 2px 10px rgba(16,17,19,.14); }
.tp-map-zoom button { display:grid; place-items:center; width:36px; height:36px; border:0; background:none; color:var(--tp-ink); cursor:pointer; }
.tp-map-zoom button + button { border-top:1px solid var(--tp-line); }
.tp-map-compass { perspective:90px; }
.tp-needle { transform-origin:50% 50%; }
.tp-map-hint { position:absolute; left:10px; top:10px; padding:2px 8px; border-radius:999px; background:var(--lb-glass,rgba(255,255,255,.88)); color:var(--tp-muted); font-size:11px; }
.tp-pin { display:grid; place-items:center; width:30px; height:30px; padding:0; border:2.5px solid #fff; border-radius:50%; background:var(--tp-blue); color:#fff; font:700 14px/1 system-ui, sans-serif; box-shadow:0 2px 8px rgba(16,17,19,.3); cursor:pointer; }
.tp-pin:hover, .tp-pin:focus-visible { transform:scale(1.12); }
.tp-pin-wrap { display:flex; align-items:center; gap:4px; }
.tp-pin-label { max-width:9.5em; padding:3px 8px; overflow:hidden; border:0; border-radius:999px; background:var(--lb-glass,rgba(255,255,255,.95)); color:var(--tp-ink); font:600 12px/1.3 system-ui, sans-serif; text-overflow:ellipsis; white-space:nowrap; box-shadow:0 1px 6px rgba(16,17,19,.18); cursor:pointer; }
.tp-map-working { position:absolute; left:50%; top:52px; z-index:1; padding:6px 12px; border-radius:999px; background:rgba(16,17,19,.78); color:#fff; font-size:12px; font-weight:600; transform:translateX(-50%); pointer-events:none; }
.tp-map-working[hidden] { display:none; }
.tp-route .tp-map-working { top:84px; }
.tp-map-all { position:absolute; left:50%; bottom:12px; display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border:0; border-radius:999px; background:var(--lb-strong,var(--tp-ink)); color:#fff; font:inherit; font-size:13px; font-weight:600; transform:translateX(-50%); box-shadow:0 4px 14px rgba(16,17,19,.25); cursor:pointer; }
.tp-map-all[hidden] { display:none; }
.tp-stop.is-flash { animation:tp-flash 1.6s ease; }
@keyframes tp-flash { 0%, 40% { background:#e8f1ff; } 100% { background:transparent; } }
@media (prefers-reduced-motion:reduce) { .tp-stop.is-flash { animation:none; outline:2px solid var(--lb-link,var(--tp-blue)); } }
.tp-info-back { margin-top:4px; }
.tp-popup { display:grid; gap:8px; min-width:160px; font-family:inherit; }
.tp-popup strong { font-size:15px; }
.tp-popup .tp-primary { min-height:38px; font-size:14px; }
.tp-popup-photo, .tp-popup .tp-ai-pic { width:100%; height:96px; border-radius:10px; object-fit:cover; }
.tp-popup .tp-ai-pic > img { width:100%; height:100%; object-fit:cover; }

/* The full-screen route map, laid out as a maps app shows a route: the map, a bar on top, a sheet of stops below. */
.tp-map-expand { position:absolute; right:10px; top:10px; display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border:0; border-radius:999px; background:var(--lb-bg,#fff); color:var(--tp-ink); font:inherit; font-size:13px; font-weight:650; box-shadow:0 2px 10px rgba(16,17,19,.16); cursor:pointer; }
.tp-map-away { height:460px; border-radius:18px; background:var(--tp-soft); }
html.tp-route-open, html.tp-route-open body { overflow:hidden; }
.tp-route { position:fixed; inset:0; z-index:900; background:var(--lb-surface,#f5efe3); --tp-blue:#006bff; --tp-ink:var(--lb-text,#101113); --tp-muted:var(--lb-text-2,#6d7480); --tp-line:var(--lb-line,#e6eaef); --tp-soft:var(--lb-surface,#f4f6f9); color:var(--tp-ink); }
.tp-route > .tp-map { position:absolute; inset:0; border-radius:0; }
.tp-route .tp-map-canvas { height:100%; }
.tp-route .tp-map-expand, .tp-route .tp-map-hint { display:none; }
.tp-route .tp-map-zoom { top:76px; bottom:auto; }
.tp-route .tp-map-all { top:76px; bottom:auto; }
.tp-route-top { position:absolute; left:0; right:0; top:0; z-index:2; display:flex; align-items:center; gap:10px; padding:calc(10px + env(safe-area-inset-top)) 12px 10px; pointer-events:none; }
.tp-route-top > * { pointer-events:auto; }
.tp-route-back { display:inline-flex; align-items:center; gap:6px; padding:9px 14px; border:0; border-radius:999px; background:var(--lb-bg,#fff); color:var(--tp-ink); font:inherit; font-size:14px; font-weight:650; box-shadow:0 2px 12px rgba(16,17,19,.18); cursor:pointer; }
.tp-route-title { display:flex; align-items:center; gap:2px; margin-left:auto; padding:2px 4px; border-radius:999px; background:var(--lb-bg,#fff); box-shadow:0 2px 12px rgba(16,17,19,.18); }
.tp-route-title > span { display:grid; min-width:84px; text-align:center; line-height:1.2; }
.tp-route-title strong { font-size:14px; }
.tp-route-title small { color:var(--tp-muted); font-size:11px; }
.tp-route-title .tp-round { width:34px; height:34px; }
.tp-route-sheet { position:absolute; left:0; right:0; bottom:0; z-index:2; display:grid; gap:12px; max-height:46vh; overflow-y:auto; padding:6px 16px calc(16px + env(safe-area-inset-bottom)); border-radius:24px 24px 0 0; background:var(--lb-glass,rgba(255,255,255,.97)); box-shadow:0 -6px 24px rgba(16,17,19,.14); overscroll-behavior:contain; }
.tp-route-sheet.is-full { max-height:82vh; }
.tp-route-grab { justify-self:center; width:44px; height:18px; padding:0; border:0; background:none; cursor:pointer; }
.tp-route-grab::before { content:''; display:block; width:40px; height:5px; margin:auto; border-radius:999px; background:var(--lb-surface-2,#cfd6df); }
.tp-route-head { display:flex; align-items:baseline; justify-content:space-between; }
.tp-route-head h2 { font-size:20px; font-weight:750; }
.tp-route-modes { display:grid; grid-template-columns:repeat(4, 1fr); gap:4px; padding:4px; border-radius:16px; background:var(--tp-soft); }
.tp-route-modes button { display:grid; justify-items:center; gap:2px; padding:7px 0; border:0; border-radius:12px; background:none; color:var(--tp-muted); font:inherit; font-size:12px; font-weight:600; cursor:pointer; }
.tp-route-modes button.is-active { background:var(--lb-bg,#fff); color:var(--tp-ink); box-shadow:0 1px 6px rgba(16,17,19,.12); }
.tp-route-stops { display:grid; margin:0; padding:0; list-style:none; border-radius:16px; background:var(--tp-soft); }
.tp-route-stop { display:grid; grid-template-columns:auto 28px 1fr auto auto; align-items:center; gap:10px; padding:10px 12px; border-bottom:1px solid var(--lb-line,#e3e8ee); }
.tp-route-stop:not(:has(.tp-drag)) { grid-template-columns:28px 1fr auto; }
.tp-route-stop:last-child { border-bottom:0; }
.tp-route-stop.is-dragging { position:relative; z-index:2; border-radius:12px; background:var(--lb-bg,#fff); box-shadow:0 10px 28px rgba(16,17,19,.14); }
.tp-route-stops.is-sorting .tp-route-stop { transition:transform .15s ease; }
.tp-route-name { display:grid; min-width:0; padding:0; border:0; background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.tp-route-name strong { overflow:hidden; font-size:15px; font-weight:650; text-overflow:ellipsis; white-space:nowrap; }
.tp-route-name small { color:var(--tp-muted); font-size:12px; }
.tp-route-leg { grid-column:2 / -1; display:inline-flex; align-items:center; gap:5px; justify-self:start; margin-top:-2px; color:var(--lb-link,var(--tp-blue)); font-size:12px; font-weight:600; text-decoration:none; }
.tp-route-add { display:flex; align-items:center; gap:8px; padding:12px; border:1.5px dashed var(--lb-line-strong,#b9c4d2); border-radius:14px; background:none; color:var(--lb-link,var(--tp-blue)); font:inherit; font-size:15px; font-weight:650; cursor:pointer; }
.tp-route-apps { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.tp-route-apps small { width:100%; color:var(--tp-muted); font-size:12px; font-weight:600; }
.tp-route-apps button { padding:6px 12px; border:1px solid var(--tp-line); border-radius:999px; background:var(--lb-bg,#fff); color:var(--tp-ink); font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.tp-route-apps button.is-active { border-color:var(--lb-link,var(--tp-blue)); background:var(--lb-surface,#e8f1ff); color:var(--lb-link,var(--tp-blue)); }
.tp-route-open-app { display:flex; align-items:center; justify-content:center; gap:8px; text-decoration:none; }

/* A stop up close. */
.tp-info-photo, .tp-sheet .tp-ai-pic.tp-info-photo { display:block; width:100%; aspect-ratio:16 / 10; height:auto; border-radius:16px; object-fit:cover; }
.tp-ai-pic.tp-info-photo > img { width:100%; height:100%; object-fit:cover; }
.tp-info-head { display:grid; gap:4px; }
.tp-info-place { display:flex; align-items:center; gap:6px; font-weight:600; }
.tp-info-note { white-space:pre-line; overflow-wrap:anywhere; }
.tp-info-actions { display:flex; flex-wrap:wrap; gap:10px; }
.tp-info-actions > * { flex:1 1 140px; }
.tp-info-section { display:grid; gap:10px; padding-top:14px; border-top:1px solid var(--tp-line); }
.tp-info-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.tp-info-section-head h3 { font-size:16px; font-weight:700; }
.tp-info-wall { display:grid; grid-template-columns:repeat(3, 1fr); gap:4px; }
.tp-info-tile { position:relative; display:block; aspect-ratio:1; overflow:hidden; border-radius:8px; background:var(--tp-soft); color:inherit; text-decoration:none; }
.tp-info-tile img { width:100%; height:100%; object-fit:cover; }
.tp-info-tile-text { display:block; padding:8px; overflow:hidden; font-size:12px; line-height:1.4; }
.tp-info-play { position:absolute; right:6px; top:6px; display:grid; place-items:center; width:24px; height:24px; border-radius:50%; background:rgba(17,24,39,.6); color:#fff; }
.tp-take-stop { display:flex; align-items:center; gap:8px; padding:12px 14px; border-radius:14px; background:var(--tp-soft); }
.tp-check { display:flex; align-items:center; gap:10px; font-size:14px; cursor:pointer; }
.tp-check input { width:18px; height:18px; min-height:0; margin:0; accent-color:var(--tp-blue); }

/* 封面照片 in 行程設定. */
.tp-cover-pick { display:grid; gap:8px; margin:0; padding:0; border:0; }
.tp-cover-pick legend { margin-bottom:4px; font-size:14px; font-weight:600; }
.tp-cover-options { display:grid; grid-template-columns:repeat(auto-fill, minmax(86px, 1fr)); gap:10px; }
.tp-cover-option { display:grid; gap:4px; font-size:12px; cursor:pointer; }
.tp-cover-option input { position:absolute; opacity:0; pointer-events:none; }
.tp-cover-option span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tp-cover-thumb, .tp-cover-option .tp-ai-pic { display:block; width:100%; aspect-ratio:1; height:auto; border-radius:12px; object-fit:cover; outline:2px solid transparent; outline-offset:2px; }
.tp-cover-option .tp-ai-pic > img { width:100%; height:100%; object-fit:cover; }
.tp-cover-auto { display:grid; place-items:center; background:var(--tp-soft); color:var(--tp-muted); }
.tp-cover-option:has(input:checked) .tp-cover-thumb, .tp-cover-option:has(input:checked) .tp-ai-pic { outline-color:var(--lb-link,var(--tp-blue)); }
.tp-cover-option:has(input:focus-visible) .tp-cover-thumb { outline-color:var(--tp-ink); }

/* On a computer the day's map and tonight's stay sit beside the day's stops and stay in view. */
@media (min-width:1024px) {
  .tp-day { display:grid; grid-template-columns:minmax(0, 1fr) 400px; column-gap:40px; align-items:start; max-width:none; }
  .tp-day > :not(.tp-side) { grid-column:1; }
  .tp-day > .tp-side { grid-column:2; grid-row:1 / span 8; position:sticky; top:24px; }
}
/* On a phone the map comes right after the day's title, before its stops. */
@media (max-width:1023px) {
  .tp-day { display:flex; flex-direction:column; }
  .tp-day > * { order:4; }
  .tp-day > .tp-day-head, .tp-day > .tp-day-title, .tp-day > .tp-day-title-input { order:1; }
  .tp-day > .tp-side { display:contents; }
  .tp-side > .tp-map { order:2; margin-top:14px; }
  .tp-side > .tp-stay { order:5; margin-top:28px; }
  .tp-day > .tp-comments { order:6; }
  .tp-map-canvas { height:min(62vh, 380px); }
  .tp-map-away { height:min(62vh, 380px); }
  .tp-route .tp-map-canvas { height:100%; }
}
.tp-field-row.is-even { grid-template-columns:1fr 1fr; }
@media (max-width:820px) {
  .tp { width:calc(100% - 32px); padding-top:8px; }
  .tp-tab { max-width:none; }
  .tp-grid { grid-template-columns:1fr; gap:22px; }
  .tp-trip-head { flex-direction:column; align-items:stretch; gap:14px; }
  .tp-trip-head h2 { font-size:25px; }
  .tp-trip-actions > .tp-primary { flex:1; }
  .tp-trip-actions > .tp-secondary { flex:1; }
  .tp-mine-actions > * { flex:1; }
  .tp-calendar { padding:12px 6px; border:0; }
  .tp-stop { grid-template-columns:28px 1fr 64px; gap:12px; }
  .tp-stop:has(.tp-stop-tools) { grid-template-columns:28px 1fr 56px 32px; }
  .tp-stop:has(.tp-drag) { grid-template-columns:20px 28px 1fr 56px 32px; gap:10px; }
  .tp-stop-photo, .tp-stop .tp-stop-photo-empty { width:56px; height:56px; }
  .tp-sheet { width:100%; max-width:none; max-height:92dvh; margin:auto 0 0; border-radius:24px 24px 0 0; }
  .tp-sheet-body { padding-bottom:calc(24px + env(safe-area-inset-bottom)); }
  .tp-invite-buttons { grid-template-columns:1fr; }
}
@media (max-width:360px) {
  .tp-stop:has(.tp-stop-tools) { grid-template-columns:26px 1fr 32px; }
  .tp-stop:has(.tp-drag) { grid-template-columns:20px 26px 1fr 32px; }
  .tp-stop:has(.tp-stop-tools) .tp-stop-photo, .tp-stop:has(.tp-stop-tools) .tp-stop-photo-empty, .tp-stop:has(.tp-stop-tools) .tp-stop-photo-button { display:none; }
}

/* 共同行程: the day as a timeline. One line runs through the stops' numbers (--rail is where it runs: the number's middle,
   after the drag handle for whoever can change the trip) and on to the night's stay at the end of the day. */
.tp-day { --rail:14px; }
.tp-day:has(.tp-timeline.is-edit) { --rail:50px; }
.tp-timeline { position:relative; }
.tp-timeline::before { content:''; position:absolute; left:calc(var(--rail) - 1px); top:28px; bottom:24px; width:2px; border-radius:1px; background:var(--lb-surface-2,#dfe5ee); }
.tp-timeline .tp-stop { position:relative; padding:12px 0; border-bottom:0; }
.tp-timeline .tp-stop-no { position:relative; z-index:1; box-shadow:0 0 0 3px var(--lb-bg,#fff); }
.tp-timeline .tp-move { position:relative; z-index:1; margin:-4px 0 2px; padding-left:calc(var(--rail) - 14px); }
.tp-timeline .tp-move-arrow { background:var(--lb-bg,#fff); }
.tp-stop-time { color:var(--lb-link,var(--tp-blue)); font-size:13px; font-weight:700; line-height:1.3; font-variant-numeric:tabular-nums; }
.tp-day-spend { display:inline-flex; align-items:center; align-self:flex-start; justify-self:start; gap:6px; max-width:100%; margin-top:10px; padding:6px 12px; border:0; border-radius:999px; background:var(--tp-soft); color:var(--tp-ink); font:inherit; font-size:13px; font-weight:600; text-align:left; cursor:pointer; }
.tp-day-spend > span { min-width:0; overflow-wrap:anywhere; }

/* The night at the end of the day: 今晚住哪. */
.tp-night-slot { position:relative; display:grid; grid-template-columns:28px minmax(0, 1fr); gap:12px; margin:6px 0 0 calc(var(--rail) - 14px); padding-top:6px; }
.tp-timeline + .tp-night-slot::before { content:''; position:absolute; left:13px; top:-26px; height:34px; width:2px; background:var(--lb-surface-2,#dfe5ee); }
.tp-night-mark { position:relative; z-index:1; display:grid; place-items:center; width:28px; height:28px; margin-top:12px; border-radius:50%; background:#1d2a44; color:#fff; box-shadow:0 0 0 3px var(--lb-bg,#fff); }
.tp-night-main { display:grid; gap:10px; min-width:0; padding:14px; border-radius:16px; background:var(--tp-soft); }
.tp-night-head { display:flex; align-items:baseline; gap:8px; }
.tp-night-head strong { font-size:16px; font-weight:700; }
.tp-night-head small { color:var(--tp-muted); font-size:13px; }
.tp-night-slot .tp-night { margin-top:0; padding:10px; border:0; border-radius:12px; background:var(--lb-bg,#fff); }
.tp-night-photo { flex:none; width:52px; height:52px; border-radius:10px; object-fit:cover; }
.tp-night-actions { display:flex; flex-wrap:wrap; align-items:center; gap:2px 18px; }
.tp-night-open { width:100%; min-height:44px; }

/* A night's sheet: 我們的候選 and 附近住宿. Stay cards here are the trip's own, not the stays' listing cards. */
.tp-night-sheet { display:grid; gap:12px; min-width:0; }
.tp-night-sub { margin-top:-8px; font-size:13px; }
.tp-night-tabs { display:flex; gap:22px; border-bottom:1px solid var(--tp-line); }
.tp-night-tabs button { min-height:40px; padding:0 0 8px; border:0; border-bottom:2px solid transparent; background:none; color:var(--tp-muted); font:inherit; font-size:15px; font-weight:600; cursor:pointer; }
.tp-night-tabs button.is-active { border-color:var(--tp-ink); color:var(--tp-ink); font-weight:700; }
.tp-cand-list { display:grid; min-width:0; }
.tp-cand { position:relative; display:grid; gap:10px; min-width:0; padding:14px 0; border-bottom:1px solid var(--lb-line,#eef0f3); }
.tp-cand-top { display:flex; gap:12px; min-width:0; }
.tp-cand:has(.tp-cand-remove) .tp-cand-top { padding-right:34px; }
.tp-cand-photo { flex:none; width:88px; height:88px; border-radius:14px; object-fit:cover; }
.tp-cand-text { display:grid; flex:1; gap:3px; align-content:start; min-width:0; }
.tp-cand-text strong { font-size:15px; font-weight:700; line-height:1.4; overflow-wrap:anywhere; }
.tp-cand-text small { color:var(--tp-muted); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.tp-cand-night { margin-top:2px; color:var(--lb-text-2,#6b7480); font-size:13px; font-weight:600; }
.tp-cand-night.is-open { color:var(--lb-green-text,#0a7a3d); }
.tp-cand.is-decided .tp-cand-by { color:var(--lb-link,var(--tp-blue)); font-weight:700; }
.tp-cand-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; }
.tp-vote { display:inline-flex; align-items:center; gap:5px; min-height:36px; padding:0 14px; border:1px solid var(--tp-line); border-radius:18px; background:var(--lb-bg,#fff); color:var(--tp-ink); font:inherit; font-size:13px; font-weight:600; white-space:nowrap; cursor:pointer; }
.tp-vote[aria-pressed="true"] { border-color:var(--tp-ink); background:var(--lb-strong,var(--tp-ink)); color:#fff; }
.tp-vote.is-want[aria-pressed="true"] { border-color:var(--lb-link,var(--tp-blue)); background:var(--tp-blue); }
.tp-voters { display:flex; }
.tp-voter { display:grid; place-items:center; flex:none; width:24px; height:24px; margin-left:-6px; border:2px solid var(--lb-bg,#fff); border-radius:50%; background:#b2541b; color:#fff; font-size:11px; font-weight:700; object-fit:cover; }
.tp-voter:first-child { margin-left:0; }
.tp-cand-room { margin-left:auto; font-size:13px; }
.tp-cand-remove { position:absolute; top:10px; right:0; }
.tp-cand-in { display:inline-flex; align-items:center; gap:4px; color:var(--lb-green-text,#0a7a3d); font-size:13px; font-weight:600; }
.tp-night-empty { display:grid; justify-items:start; gap:10px; padding:10px 0; }
.tp-night-note { font-size:12px; line-height:1.6; }
.tp-night-foot { position:sticky; bottom:0; z-index:1; margin:0 -22px -24px; padding:12px 22px 20px; border-top:1px solid var(--lb-line,#eef0f3); background:var(--lb-bg,#fff); }
@media (max-width:820px) {
  .tp-day:has(.tp-timeline.is-edit) { --rail:44px; }
  .tp-night-foot { padding-bottom:calc(16px + env(safe-area-inset-bottom)); }
}
@media (max-width:1023px) {
  .tp-day > .tp-day-spend { order:1; }
  /* On a phone a decided stay shows at the end of the timeline, so the stays block below the day does not say it again. */
  .tp-day:has(.tp-night) > .tp-side > .tp-stay { display:none; }
}
@media (max-width:360px) {
  .tp-cand-photo { width:72px; height:72px; }
}

.tp-countries { overflow-x:auto; padding:2px 0 6px; }
.tp-countries .tp-chip { flex:none; white-space:nowrap; cursor:pointer; }

.tp-stop-feedback { display:flex; flex-wrap:wrap; gap:8px; margin-block:8px; min-width:0; }
.tp-stop-feedback :is(a,button) { display:inline-flex; align-items:center; min-height:44px; padding:6px 10px; border:1px solid var(--tp-border, #d9dedc); border-radius:12px; color:inherit; background:transparent; font:inherit; font-size:.8rem; white-space:normal; overflow-wrap:anywhere; text-decoration:none; }
.tp-stop-feedback button[aria-pressed="true"] { border-color:currentColor; font-weight:700; background:color-mix(in srgb,currentColor 8%,transparent); }
.tp-bubble-panel { margin-block:12px; padding:12px; border:1px solid var(--tp-border, #d9dedc); border-radius:16px; min-width:0; overflow-wrap:anywhere; }
.tp-bubble-panel > a { font-weight:700; color:inherit; }

/* The existing route globe doubles as a confirmed-position picker, with a continuous add mode. */
.tp-route.is-picking .tp-route-sheet { display:none; }
.tp-map-pick { position:absolute; z-index:8; left:50%; bottom:max(20px,env(safe-area-inset-bottom)); transform:translateX(-50%); display:flex; flex-wrap:wrap; align-items:center; gap:10px; width:min(620px,calc(100% - 24px)); padding:16px; border:1px solid var(--lb-line,#dce2ec); border-radius:18px; background:var(--lb-glass,rgb(255 255 255 / 88%)); color:var(--lb-text,#10151c); backdrop-filter:blur(20px); box-shadow:0 12px 36px #0003; }
.tp-map-pick > strong,.tp-map-pick > p { flex-basis:100%; margin:0; }
.tp-map-pick > p { color:var(--lb-text-2,#47505f); font-size:13px; }
.tp-map-pick button,.tp-map-pick select { min-height:44px; }
.tp-map-pick select { padding:8px; border:1px solid var(--lb-line,#dce2ec); border-radius:10px; background:var(--lb-bg,#fff); color:inherit; font:inherit; }
.tp-stop-drop-bar { color:var(--lb-text,#10151c); }
.tp-stop-drop-bar .tp-drop-night { min-height:44px; }
.tp-stop-drop-bar ~ .tp-stop.is-dragging { pointer-events:none; }
@media (prefers-reduced-transparency:reduce) { .tp-map-pick { background:var(--lb-bg,#fff); backdrop-filter:none; } }
.tp-stop-expenses { grid-column:1 / -1; min-width:0; width:100%; margin-top:10px; padding:12px 0 0; border-top:1px solid var(--lb-line,#dce2ec); }
.tp-stop-expenses > strong { display:block; margin-bottom:8px; font-size:13px; }
.tp-stop-expense-form { display:grid; gap:8px; }
.tp-expense-quick { display:grid; grid-template-columns:minmax(0,1fr) minmax(70px,1fr) 75px auto; align-items:end; gap:8px; }
.tp-expense-field { display:flex; flex-direction:column; min-width:0; gap:4px; font-size:12px; }
.tp-expense-field :is(input,select) { width:100%; min-width:0; min-height:40px; border:1px solid var(--lb-line,#dce2ec); border-radius:8px; padding:8px; background:var(--lb-bg,#fff); color:var(--lb-text,#10151c); font:inherit; }
.tp-expense-settings { font-size:13px; }
.tp-expense-settings[open] { display:grid; gap:10px; }
.tp-expense-settings fieldset { display:flex; flex-wrap:wrap; gap:8px 14px; border:0; padding:0; }
.tp-expense-settings fieldset label { display:inline-flex; align-items:center; gap:5px; }
.tp-expense-preview { font-size:12px; color:var(--lb-text-2,#47505f); }
.tp-stop-costs { display:grid; gap:5px; margin-bottom:8px; }
.tp-stop-costs button { min-height:36px; padding:6px 10px; border:1px solid var(--lb-line,#dce2ec); border-radius:8px; background:var(--lb-surface,#f5f7fa); color:var(--lb-text,#10151c); text-align:left; font:inherit; font-size:13px; cursor:pointer; }
@media(max-width:480px) { .tp-expense-quick { grid-template-columns:repeat(2,minmax(0,1fr)); } .tp-stop-expenses { padding-top:10px; } }

.tp-calendar-fold { margin:20px 0; border:1px solid var(--lb-line,#dce2ec); border-radius:14px; padding:12px 16px; }
.tp-calendar-fold > summary { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; cursor:pointer; min-height:32px; }
.tp-calendar-fold > summary::after { content:'＋'; margin-left:auto; }
.tp-calendar-fold[open] > summary::after { content:'−'; }
.tp-calendar-fold .tp-calendar { margin-top:12px; }
.tp-candidates { margin:24px 0; padding:18px; border:1px dashed var(--lb-line,#bfc7d3); border-radius:16px; }
.tp-candidates-head > button { flex-shrink:0; white-space:nowrap; }
.tp-candidates-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.tp-candidates h3,.tp-candidates p { margin:0 0 6px; }
.tp-candidate-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr)); gap:12px; padding:0; list-style:none; max-height:460px; overflow:auto; }
.tp-candidate { display:grid; grid-template-columns:52px minmax(0,1fr); gap:10px; padding:12px; border-radius:12px; background:var(--lb-surface,#f5f7fa); }
.tp-candidate-photo { width:52px; height:52px; border-radius:10px; object-fit:cover; overflow:hidden; }
.tp-candidate-photo img { width:100%; height:100%; object-fit:cover; }
.tp-candidate-photo.is-empty { display:grid; place-items:center; background:var(--lb-line,#dce2ec); }
.tp-candidate-text { min-width:0; overflow-wrap:anywhere; }
.tp-candidate-text p,.tp-candidate-text small { font-size:12px; }
.tp-candidate-actions { grid-column:1/-1; display:flex; gap:8px; align-items:center; }
.tp-candidate-actions .tp-secondary { margin-right:auto; }
.tp-candidate .tp-stop-expenses { grid-column:1/-1; margin:0; }
.tp-scheduled-heading { margin:24px 0 4px; }
.tp-map-candidates { position:absolute; left:12px; bottom:14px; z-index:2; border:1px solid var(--lb-line,#dce2ec); border-radius:20px; padding:8px 12px; background:var(--lb-bg,#fff); color:var(--lb-text,#10151c); font:inherit; cursor:pointer; }
.tp-map-candidates[aria-pressed=true] { border-color:#a368d7; box-shadow:inset 0 0 0 1px #a368d7; }
.tp-pin.is-candidate { background:#7947ae; border-style:dashed; display:grid; place-items:center; }
.tp-stop-checkin:is(button) { border:0; padding:0; background:none; text-align:left; cursor:pointer; font:inherit; color:var(--lb-link,#0866ff); }
@media(max-width:600px) { .tp-calendar-fold > summary .tp-muted { flex-basis:100%; font-size:12px; } .tp-candidates { padding:12px; } .tp-candidates-head { align-items:flex-start; } .tp-candidates-head p { font-size:12px; } }

.tp-album { margin:24px 0; padding:18px; border:1px solid var(--lb-line,#dce2ec); border-radius:16px; }
.tp-album.is-photo-drop { outline:3px dashed var(--lb-link,#0866ff); outline-offset:4px; background:var(--lb-surface,#f5f7fa); }
.tp-album-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; }
.tp-album h3 { margin:0 0 5px; }
.tp-album-head .tp-muted,.tp-album-audience { font-size:13px; }
.tp-album-actions > button { white-space:nowrap; flex:0 0 auto; }
.tp-album-actions { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.tp-album-empty { margin:0; padding:24px 16px; border:1px dashed var(--lb-line,#bfc7d3); border-radius:12px; text-align:center; color:var(--lb-text-2,#47505f); }
.tp-album-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:8px; max-height:390px; overflow:auto; }
.tp-album-photo { padding:0; border:0; border-radius:10px; overflow:hidden; background:var(--lb-surface,#f5f7fa); color:var(--lb-text,#10151c); cursor:pointer; text-align:left; min-width:0; }
.tp-album-photo img { width:100%; height:120px; object-fit:cover; display:block; }
.tp-album-photo-facts { display:block; padding:5px 7px; font-size:10px; overflow-wrap:anywhere; }
.tp-album-full { width:100%; max-height:65dvh; object-fit:contain; border-radius:10px; }
.tp-album-options { display:grid; gap:12px; }
.tp-album-options section { display:flex; gap:8px; flex-wrap:wrap; }
.tp-album-options h4 { flex-basis:100%; margin:8px 0 0; }
.tp-album-upload-list { list-style:none; margin:12px 0; padding:0; max-height:45dvh; overflow:auto; display:grid; gap:10px; }
.tp-album-upload { display:grid; grid-template-columns:60px minmax(0,1fr); gap:10px; align-items:center; }
.tp-album-upload img { width:60px; height:60px; border-radius:8px; object-fit:cover; }
.tp-album-upload strong,.tp-album-upload small,.tp-album-upload span { display:block; overflow-wrap:anywhere; }
.tp-album-upload strong { font-size:13px; }
.tp-album-upload small { font-size:11px; color:var(--lb-text-2,#47505f); }
.tp-album-upload span { font-size:12px; margin-top:4px; }
.tp-album-upload.is-failed span,.tp-album-upload.is-invalid span { color:var(--lb-danger,#b72328); }
.tp-album-upload.is-done span { color:var(--lb-success,#18703c); }
@media(max-width:600px) { .tp-album { padding:12px; } .tp-album-head > .tp-link-button { font-size:12px; } .tp-album-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } .tp-album-photo img { height:95px; } .tp-album-actions .tp-primary { flex:1 0 auto; } .tp-trip-actions > .tp-secondary { flex:1 0 auto; white-space:nowrap; } .tp-mine-actions > * { flex:1 0 auto; white-space:nowrap; } }
