/* 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-title { display:flex; align-items:center; gap:2px; min-width:0; }
.tp :is(.tp-cal-title) .tp-cal-pick, .tp-sheet :is(.tp-cal-title) .tp-cal-pick { width:auto; min-height:40px; padding:4px 22px 4px 8px; border:0; border-radius:10px; background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a96a8' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 6px center; color:var(--tp-ink); font-size:20px; font-weight:700; appearance:none; -webkit-appearance:none; cursor:pointer; }
.tp :is(.tp-cal-title) .tp-cal-pick:hover, .tp-sheet :is(.tp-cal-title) .tp-cal-pick:hover { background-color:var(--lb-surface-2,rgb(127 127 127 / 12%)); }
.tp-range .tp-cal-title .tp-cal-pick { font-size:17px; }
.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; }
/* The name, typed over in place (trips.js titleEditor): reads as the heading, a dashed line and a pen say it can change. */
.tp-trip-title-edit { display:flex; align-items:center; gap:8px; max-width:100%; cursor:text; }
.tp .tp-trip-title-input { flex:1; min-width:0; min-height:0; padding:2px 0; border:0; border-bottom:1px dashed transparent; border-radius:0; background:none; color:inherit; font:inherit; font-size:30px; font-weight:750; letter-spacing:-.03em; line-height:1.25; }
.tp .tp-trip-title-input:hover { border-bottom-color:var(--lb-line,#cdd5df); }
.tp .tp-trip-title-input:focus { outline:0; box-shadow:none; border-bottom-color:var(--lb-link,var(--tp-blue)); }
.tp-trip-title-pen { display:inline-flex; flex:none; color:var(--lb-text-2,#5f6672); }
.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; }
/* 天氣 (trip-weather.js): one line under each stop and at the top of a dated day; a tap opens the details. */
.tp-stop-weather, .tp-day-weather { display:block; max-width:100%; margin-top:2px; padding:0; border:0; background:none; color:var(--tp-ink); font:inherit; font-size:13px; line-height:1.45; text-align:left; cursor:pointer; }
.tp-day-weather { width:fit-content; margin-top:8px; padding:6px 12px; border-radius:12px; background:var(--tp-soft); font-size:14px; }
.tp-stop-weather[hidden], .tp-day-weather[hidden] { display:none; }
.tp-stop-weather:empty, .tp-day-weather:empty { margin:0; padding:0; }
.tp-weather-lead { color:var(--tp-muted); }
.tp-weather-block { padding:4px 0 12px; }
.tp-weather-block h3 { margin:8px 0 4px; font-size:16px; font-weight:700; }
.tp-weather-row { display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--tp-line); font-size:14px; }
.tp-weather-row strong { font-weight:600; text-align:right; }
.tp-weather-credit { display:block; margin-top:8px; color:var(--tp-muted); font-size:12px; }
.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; }
/* 追蹤航班 (trip-flights.js): a flight number is a link to the map following it; a later day's says when tracking starts. */
.tp-flight { display:inline-flex; align-items:center; min-height:28px; margin-right:10px; padding:0; border:0; background:none; color:var(--lb-link,var(--tp-blue)); font:inherit; font-weight:600; text-decoration:none; white-space:nowrap; cursor:pointer; }
.tp-flight.is-past { color:inherit; font-weight:inherit; cursor:auto; }
.tp-flight-later { display:block; margin:2px 0 4px; color:var(--tp-muted); font-size:13px; white-space:normal; }
.tp-flight-later[hidden] { display:none; }
.tp-flight-later a { color:var(--lb-link,var(--tp-blue)); font-weight:600; }
.tp-flight-links { display:flex; flex-wrap:wrap; column-gap:12px; font-size:13px; }
.tp-flight-own { display:inline-flex; flex-wrap:wrap; align-items:center; gap:4px 10px; margin-right:10px; }
.tp-flight.is-track { min-height:32px; margin:0; padding:0 12px; border:1px solid var(--tp-blue); border-radius:999px; background:var(--tp-range,#e8f1ff); color:var(--tp-blue); font-size:14px; font-weight:700; }
.tp-flight.is-track:hover { background:var(--tp-blue); color:#fff; }
/* 機票自動帶出: the flight number's card in the stop editor (trip-flight-fill.js). */
.tp-flight-field { display:grid; gap:8px; min-width:0; }
.tp-flight-field[hidden] { display:none; }
.tp-flight-fill { display:grid; gap:6px; padding:10px 12px; border:1px solid var(--tp-line,rgba(0,0,0,.12)); border-radius:12px; background:var(--tp-soft,rgba(0,107,255,.06)); font-size:14px; overflow-wrap:anywhere; }
.tp-flight-fill[hidden] { display:none; }
.tp-flight-fill-head { display:flex; align-items:center; gap:10px; }
.tp-flight-fill-head p { flex:1; min-width:0; margin:0; }
.tp-flight-apply { flex:none; min-height:36px; padding:0 14px; border:0; border-radius:999px; background:var(--tp-blue,#006bff); color:#fff; font:inherit; font-weight:700; cursor:pointer; }
.tp-flight-facts { margin:0; color:var(--tp-ink); font-size:13px; }
.tp-flight-applied { flex:none; max-width:45%; color:var(--tp-muted); font-size:13px; }
.tp-flight-arrive { justify-self:start; min-height:36px; padding:4px 12px; border:1px solid var(--tp-blue,#006bff); border-radius:999px; background:none; color:var(--lb-link,var(--tp-blue)); font:inherit; font-size:14px; font-weight:600; text-align:left; cursor:pointer; }
.tp-flight-arrive[aria-pressed="true"] { background:var(--tp-blue,#006bff); color:#fff; }
.tp-info-flights { display:flex; flex-wrap:wrap; column-gap:12px; font-size:14px; }
.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; }
/* 學生團 (student-toggle.js): one switch, saved on its own. */
.tp-student { display:flex; gap:12px; align-items:flex-start; padding:12px 14px; border:1px solid var(--tp-line); border-radius:14px; cursor:pointer; text-align:left; }
.tp-student:has(input:checked) { border-color:var(--lb-link,var(--tp-blue)); background:var(--lb-surface,#f5f9ff); }
.tp-student input { flex:none; width:18px; min-height:0; height:18px; margin-top:2px; padding:0; accent-color:var(--tp-blue); }
.tp-student strong { display:block; font-size:15px; }
.tp-student 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.is-new-reply { margin:-6px; padding:6px; border-radius:12px; background:var(--lb-surface,#f1f5fb); }
.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 { margin-top:6px; color:var(--lb-text-2,#304056); font-size:18px; font-weight:650; font-variant-numeric:tabular-nums; }
.tp-ledger-rate-note { color:var(--tp-muted); font-size:13px; }
.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-expense-amount.is-refund { color:#1a7f37; }
.tp-expense-kind { margin:0 0 4px; }
.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)); }
/* 建立者／管理員 in 討論 and the people list: who looks after the trip's talk. */
.tp-tag-mod { flex:none; background:color-mix(in srgb, var(--lb-link,#006bff) 12%, transparent); color:var(--lb-link,#006bff); }
/* A removed stop's expenses: the question, and a ledger entry whose stop is gone. */
.tp-cost-ask { display:grid; gap:8px; margin-top:12px; }
.tp-cost-ask .tp-danger { background:#d92d20; border-color:#d92d20; color:#fff; }
.tp-expense-orphan { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; margin:2px 0 6px 44px; font-size:13px; }
.tp-expense-orphan small { color:#c2410c; font-weight:600; }
.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; bottom:10px; max-width:calc(100% - 76px); padding:2px 8px; border-radius:999px; background:var(--lb-glass,rgba(255,255,255,.88)); color:var(--tp-muted); font-size:11px; }
/* Some legs have no route: said plainly, not in grey. */
.tp-map-hint.is-straight { padding:4px 10px; background:var(--lb-bg,#fff); color:var(--tp-ink); font-weight:600; box-shadow:0 2px 10px rgba(16,17,19,.14); }
.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; }
/* 備選 names (map-label-crowding.js): in their pin's colour, set aside where they would cover a stop or another name. */
.tp-pin.is-backup + .tp-pin-label { color:#8a4d0c; }
.tp-pin.is-candidate:not(.is-backup) + .tp-pin-label { color:#5e3591; }
.tp-pin-label.is-crowded { visibility:hidden; }
.tp-pin-label.is-saved { max-width:12em; }
/* The day's own stops stay on top: a 備選 at the same place never covers a stop's number. */
.tp-pin-wrap.is-saved { z-index:0; }
.tp-pin-wrap:not(.is-saved) { z-index:1; }
.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-pickmap .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; }

/* 前往地圖 on the day's map; picking a spot (從地圖加站, 補地點) moves the map full screen with a bar on top. */
.tp-map-actions { position:absolute; right:10px; top:10px; display:flex; gap:8px; }
.tp-map-go { display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border-radius:999px; background:var(--lb-strong,var(--tp-ink)); color:#fff; font-size:13px; font-weight:650; text-decoration:none; box-shadow:0 2px 10px rgba(16,17,19,.16); }
.tp-map-go[hidden] { display:none; }
.tp-map-away { height:460px; border-radius:18px; background:var(--tp-soft); }
html.tp-pickmap-open, html.tp-pickmap-open body { overflow:hidden; }
.tp-pickmap { 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-pickmap > .tp-map { position:absolute; inset:0; border-radius:0; }
.tp-pickmap .tp-map-canvas { height:100%; }
.tp-pickmap .tp-map-actions, .tp-pickmap .tp-map-hint:not(.is-straight) { display:none; }
.tp-pickmap .tp-map-hint.is-straight { top:76px; bottom:auto; left:12px; max-width:calc(100% - 80px); }
.tp-pickmap .tp-map-zoom { top:76px; bottom:auto; }
.tp-pickmap .tp-map-all { top:76px; bottom:auto; }
.tp-pickmap-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-pickmap-top > * { pointer-events:auto; }
.tp-pickmap-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; }

/* 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-item { position:relative; display:grid; }
.tp-cover-remove { position:absolute; top:-6px; right:-6px; display:grid; place-items:center; width:30px; height:30px; padding:0; border:2px solid var(--lb-bg,#fff); border-radius:50%; background:var(--tp-ink); color:var(--lb-bg,#fff); cursor:pointer; }
.tp-cover-remove svg { width:14px; height:14px; }
.tp-cover-upload-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; }
.tp-cover-file { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
/* A photo dragged over the picker: the whole picker takes it. */
.tp-cover-pick.is-photo-drop { outline:2px dashed var(--lb-link,var(--tp-blue)); outline-offset:6px; border-radius:12px; }
.tp-cover-pick.is-uploading .tp-cover-options { opacity:.6; }
@media (hover:none) { .tp-cover-drop-hint { display:none; } }
.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, .tp-day > .tp-day-weather { 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-pickmap .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, .tp .tp-trip-title-input { 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, .tp-stop:has(.tp-stop-tools) .tp-link-picture { 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-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-pick-find { flex-basis:100%; box-sizing:border-box; min-height:42px; padding:0 12px; border:1px solid var(--lb-line,#dce2ec); border-radius:12px; background:var(--lb-bg,#fff); color:inherit; font:inherit; font-size:16px; }
.tp-pick-results { flex-basis:100%; display:grid; gap:4px; max-height:148px; margin:0; padding:0; overflow-y:auto; list-style:none; }
.tp-pick-results:empty { display:none; }
.tp-pick-results button { display:grid; gap:1px; width:100%; min-height:44px; padding:6px 10px; border:0; border-radius:10px; background:var(--lb-surface,#f3f5f8); color:inherit; font:inherit; text-align:left; cursor:pointer; }
.tp-pick-results small { color:var(--lb-text-2,#47505f); font-size:12px; }
@media (max-width:520px) { .tp-map-pick { gap:8px; padding:12px; } }
.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-fold { grid-column:1 / -1; min-width:0; width:100%; margin-top:8px; }
.tp-stop-fold > summary { display:inline-flex; align-items:center; min-height:32px; padding:0 12px; border:1px solid var(--lb-line,#dce2ec); border-radius:999px; color:var(--lb-muted,#5b6472); font-size:13px; font-weight:600; cursor:pointer; list-style:none; }
.tp-stop-fold > summary::-webkit-details-marker { display:none; }
.tp-stop-fold[open] > summary { color:var(--lb-text,#101113); }
.tp-stop-fold > .tp-stop-expenses { margin-top:8px; }
.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; }
.tp-stop-cost { display:flex; align-items:center; gap:6px; }
.tp-stop-cost > p { flex:1; min-width:0; margin:0; font-size:13px; overflow-wrap:anywhere; }
.tp-stop-costs .tp-stop-cost-edit, .tp-stop-costs .tp-stop-cost-delete { flex:none; min-height:36px; padding:6px 12px; text-align:center; }
.tp-stop-costs .tp-stop-cost-delete { color:#c92a2a; }
.tp-stop-cost-editing { margin:0 0 6px; font-size:13px; font-weight:600; }
@media(max-width:480px) { .tp-expense-quick { grid-template-columns:repeat(2,minmax(0,1fr)); } .tp-stop-expenses { padding-top:10px; } }
.tp-prep { min-width:0; margin-top:14px; padding:12px 14px; border:1px solid var(--tp-line); border-radius:16px; }
.tp-prep[hidden] { display:none; }
.tp-prep-head { display:flex; align-items:center; gap:10px; min-height:32px; cursor:pointer; list-style:none; }
.tp-prep-head::-webkit-details-marker { display:none; }
.tp-prep-head::after { content:'⌄'; margin-left:auto; color:var(--tp-muted); }
.tp-prep details[open] > .tp-prep-head::after { content:'⌃'; }
.tp-prep-head strong { font-size:15px; }
.tp-prep-count { color:var(--tp-muted); font-size:13px; font-weight:600; }
.tp-prep-hint { margin-top:6px; font-size:13px; }
.tp-prep-list { display:grid; margin:6px 0 0; padding:0; list-style:none; }
.tp-prep-item { display:flex; align-items:center; gap:8px; min-height:44px; border-bottom:1px solid var(--tp-line); }
.tp-prep-item:last-child { border-bottom:0; }
.tp-prep-check { display:flex; flex:1 1 0; align-items:center; gap:10px; min-width:0; min-height:44px; cursor:pointer; }
.tp .tp-prep-check input { flex:none; width:20px; height:20px; min-height:0; margin:0; padding:0; accent-color:var(--lb-link,var(--tp-blue)); }
.tp-prep-text { min-width:0; overflow-wrap:anywhere; }
.tp-prep-item.is-done .tp-prep-text { color:var(--tp-muted); text-decoration:line-through; }
.tp-prep-cost, .tp-prep-recorded, .tp-prep-record, .tp-prep-edit-button { flex:none; white-space:nowrap; }
.tp-prep-cost { font-size:14px; font-weight:600; }
.tp-prep-recorded { color:var(--lb-green-text,#0a7a3d); font-size:13px; font-weight:600; }
.tp-prep-record, .tp-prep-edit-button { min-height:32px; padding:0 10px; border:1px solid var(--tp-line); border-radius:999px; background:none; color:var(--tp-ink); font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.tp-prep-record { border-color:var(--lb-link,var(--tp-blue)); color:var(--lb-link,var(--tp-blue)); }
.tp-prep-edit-button { padding:0 4px; border:0; color:var(--tp-muted); }
.tp-prep-add { display:flex; gap:8px; margin-top:10px; }
.tp-prep-add input { flex:1; min-width:0; }
.tp-prep-add .tp-secondary { flex:none; }
.tp-prep-ideas { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.tp-prep-ideas .tp-chip { background:none; font:inherit; font-size:13px; cursor:pointer; }
.tp-prep-edit { display:grid; flex:1; gap:8px; padding:10px 0; }
.tp-prep-cost-fields { display:grid; grid-template-columns:minmax(0,1fr) 90px; gap:8px; }
.tp-prep-edit-actions { display:flex; flex-wrap:wrap; align-items:center; gap:14px; }
.tp-prep .tp-form-status { margin-top:8px; }

.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, .tp-candidate .tp-stop-fold { 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-pin.is-backup { background:#b06a16; }
.tp-stop-name .tp-stop-kind { display:inline-flex; vertical-align:-2px; margin-right:4px; color:var(--lb-muted,#5d6675); }
/* 這天備選: a folded list under the day's stops, a row per place with one 排進行程 button. */
.tp-backups { margin:20px 0 0; border:1px dashed var(--lb-line,#bfc7d3); border-radius:14px; padding:4px 14px; }
.tp-backups > summary { display:flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; list-style:none; }
.tp-backups > summary::-webkit-details-marker { display:none; }
.tp-backups > summary::after { content:'＋'; margin-left:auto; color:var(--lb-muted,#5d6675); }
.tp-backups[open] > summary::after { content:'−'; }
.tp-backups > summary small { font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tp-backup-list { display:grid; gap:8px; margin:4px 0 0; padding:0; list-style:none; }
.tp-backup { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:10px; padding:8px; border-radius:12px; background:var(--lb-surface,#f5f7fa); }
.tp-backup-photo { width:44px; height:44px; border-radius:10px; object-fit:cover; overflow:hidden; }
.tp-backup-photo img { width:100%; height:100%; object-fit:cover; }
.tp-backup-photo.is-empty { display:grid; place-items:center; background:var(--lb-line,#dce2ec); }
.tp-backup-text { min-width:0; overflow-wrap:anywhere; }
.tp-backup-text p { margin:2px 0 0; font-size:12px; }
.tp-backup-go { display:inline-flex; align-items:center; gap:4px; margin-top:2px; font-size:12px; color:var(--lb-link,#0866ff); }
.tp-backup-actions { display:flex; align-items:center; gap:6px; }
.tp-backup-actions .tp-secondary { white-space:nowrap; padding:8px 12px; }
.tp-backup .tp-stop-take { margin:0; }
.tp-add-backup { min-height:44px; margin:8px 0 10px; font-size:15px; }
.tp-backup-days { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px; }
.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-cover { display:block; margin:-4px 0 14px; aspect-ratio:5 / 2; border-radius:12px; background:var(--tp-soft); }
.tp-album-cover > img { width:100%; height:100%; object-fit:cover; }
.tp-album-cover .tp-ai-mark { left:10px; bottom:10px; padding:3px 9px; border-radius:999px; font-size:12px; }
.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); }
/* 拍照打卡: one switch, one line saying who sees it, the result, and the one-step sign-up when needed. */
.tp-checkin-switch { display:flex; align-items:center; gap:10px; font-weight:600; font-size:15px; }
.tp-checkin-switch input { width:20px; height:20px; accent-color:var(--tp-blue); }
.tp-checkin-reach { margin:4px 0 0; font-size:13px; }
.tp-checkin-result { margin:8px 0; font-weight:600; }
.tp-checkin-result:empty { display:none; }
.tp-checkin-join { display:grid; gap:10px; margin:10px 0; padding:12px; border:1px solid var(--tp-line); border-radius:14px; }
.tp-checkin-join input:not([type]) { min-height:42px; padding:0 12px; border:1px solid var(--tp-line); border-radius:10px; font:inherit; }
.tp-checkin-join summary { cursor:pointer; color:var(--tp-muted); font-size:13px; }
.tp-checkin-term { display:flex; gap:8px; align-items:flex-start; margin-top:8px; font-size:13px; }
@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; } }
.tp-ledger-mine h3 { display:flex; align-items:center; gap:6px; }
/* 行程聯絡人 (trip-contacts.js): a small members-only card near the top, and its step-by-step sheet. */
.tp-contacts { margin:16px 0; padding:14px 16px; border:1px solid var(--tp-line); border-radius:16px; }
.tp-contacts h3 { margin:0; font-size:16px; }
.tp-contacts-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.tp-contact-main, .tp-contact-item { display:grid; gap:10px; min-width:0; }
.tp-contact-item { padding:12px 0; border-bottom:1px solid var(--tp-line); }
.tp-contact-item:last-child { border-bottom:0; }
.tp-contact-who { display:flex; align-items:center; gap:10px; min-width:0; }
.tp-contact-who > div { display:grid; min-width:0; }
.tp-contact-who strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tp-contact-ways { display:flex; flex-wrap:wrap; gap:8px; min-width:0; }
.tp-contact-way { display:inline-flex; align-items:center; gap:6px; min-height:40px; max-width:100%; margin:0; padding:4px 12px; border:1px solid var(--tp-line); border-radius:12px; background:var(--lb-bg,#fff); color:var(--tp-ink); font:inherit; font-size:14px; text-decoration:none; cursor:pointer; }
.tp-contact-way small { color:var(--tp-muted,#5b6575); font-size:12px; }
.tp-contact-way span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.tp-contact-other { cursor:default; }
.tp-contacts-mine { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; margin-top:12px; }
.tp-contacts-note { margin:8px 0 0; font-size:12px; }
.tp-contact-steps { display:grid; gap:14px; }
.tp-contact-step { font-size:12px; }
.tp-contact-steps .tp-field-label { margin:0; font-weight:600; }
.tp-contact-steps .tp-form-error:empty { display:none; }
.tp-contact-steps .tp-form-error { margin:0; color:var(--lb-danger,#b72328); font-size:14px; }
.tp-contact-steps .tp-sheet-actions { display:flex; gap:8px; justify-content:flex-end; }
.tp-contact-steps .tp-sheet-actions > * { flex:1 1 0; }
.tp-contact-preview { padding:12px; border-radius:12px; background:var(--lb-surface,#f5f7fa); }
@media(max-width:600px) { .tp-contacts { padding:12px; } .tp-contacts-mine .tp-secondary { flex:1 0 auto; } }

/* A trip as a post in 動態 and a 活動 card (activities.css): who planned it on top, the picture, then a few lines, in a
   hairline card with 10px corners. */
.tp-card { gap:0; overflow:hidden; border:1px solid var(--tp-line); border-radius:10px; background:var(--lb-bg,#fff); }
.tp-card-head { display:flex; align-items:center; gap:10px; min-width:0; min-height:54px; padding:0 12px; }
.tp-card-head-pic { flex:none; display:grid; place-items:center; width:32px; height:32px; border-radius:50%; object-fit:cover; background:var(--tp-soft); color:var(--tp-muted); font-size:14px; font-weight:700; }
.tp-card-head-name { overflow:hidden; min-width:0; font-size:14px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.tp-card-head small { flex:none; margin-left:auto; color:var(--tp-muted); font-size:12px; }
.tp-card .tp-card-cover { aspect-ratio:4 / 3; border-radius:0; }
.tp-card .tp-card-text { padding:12px 14px 14px; }
/* 已驗證 (LINE or Google linked to the account), beside a name on trip and 活動 cards and lists. */
.sc-verified { flex:none; display:inline-flex; align-items:center; gap:3px; padding:1px 7px; border-radius:999px; background:#e7f5ec; color:#1b6b3a; font-size:11px; font-weight:700; line-height:18px; white-space:nowrap; }
.sc-verified::before { content:'✓'; }
:root[data-themeable][data-theme="dark"] .sc-verified { background:#12351f; color:#8fe0aa; }
@media (prefers-color-scheme: dark) { :root[data-themeable]:not([data-theme="light"]) .sc-verified { background:#12351f; color:#8fe0aa; } }

/* 行程小助理 (trip-assistant.js): one step at a time, one main button per step. */
.ta { display:grid; gap:14px; }
.ta-lead { margin:0; font-size:17px; font-weight:600; }
.ta-back { justify-self:start; }
.ta-ways { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; }
.ta-way { display:grid; justify-items:center; gap:8px; padding:20px 8px; border:1px solid var(--tp-line); border-radius:18px; background:var(--tp-soft); color:var(--tp-ink); font:inherit; font-size:15px; font-weight:600; cursor:pointer; }
.ta-way:hover, .ta-way:focus-visible { border-color:var(--tp-blue); }
.ta-way .tp-icon { color:var(--tp-blue); }
.ta-words { display:grid; gap:8px; }
.ta-field { width:100%; box-sizing:border-box; min-height:110px; padding:12px 14px; border:1px solid var(--tp-line); border-radius:14px; background:var(--lb-bg,#fff); color:var(--tp-ink); font:inherit; font-size:16px; line-height:1.5; resize:vertical; }
.ta-field.is-paste { min-height:220px; font-size:15px; }
.ta-words-row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.ta-mic { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0 18px; border:1px solid var(--tp-line); border-radius:999px; background:var(--lb-bg,#fff); color:var(--tp-ink); font:inherit; font-size:15px; font-weight:600; cursor:pointer; }
.ta-mic.is-on { border-color:#e5484d; background:#e5484d; color:#fff; animation:ta-pulse 1.4s ease-in-out infinite; }
@keyframes ta-pulse { 50% { box-shadow:0 0 0 8px rgba(229,72,77,.18); } }
.ta-count { margin-left:auto; color:var(--tp-muted); font-size:13px; }
.ta-privacy { margin:0; color:var(--tp-muted); font-size:13px; line-height:1.5; }
.ta-status { min-height:1.2em; margin:0; color:var(--lb-red-text,#c7362f); font-size:14px; }
.ta-status:empty { display:none; }
.ta-waiting { display:grid; justify-items:center; gap:10px; padding:28px 0; text-align:center; }
.ta-waiting p { margin:0; }
.ta-spinner { width:36px; height:36px; border:3px solid var(--tp-line); border-top-color:var(--tp-blue); border-radius:50%; animation:ta-spin 0.9s linear infinite; }
@keyframes ta-spin { to { transform:rotate(360deg); } }
.ta-badge { display:inline-flex; justify-self:start; align-items:center; gap:6px; margin:0; padding:6px 12px; border-radius:999px; background:var(--tp-range); color:var(--lb-link,var(--tp-blue)); font-size:14px; font-weight:700; }
.ta-title, .ta-date { width:100%; box-sizing:border-box; min-height:46px; padding:0 14px; border:1px solid var(--tp-line); border-radius:12px; background:var(--lb-bg,#fff); color:var(--tp-ink); font:inherit; font-size:16px; }
.ta-days { display:grid; gap:12px; }
.ta-day h3 { margin:0 0 6px; font-size:15px; }
.ta-day > .tp-muted { margin:0; }
.ta-stops { display:grid; gap:6px; margin:0; padding:0; list-style:none; }
.ta-stop { display:grid; grid-template-columns:32px minmax(0, 1fr) auto; align-items:center; gap:8px; padding:8px 4px 8px 10px; border:1px solid var(--tp-line); border-radius:14px; }
.ta-stop-icon { display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:var(--tp-soft); color:var(--tp-muted); }
.ta-stop-text { display:grid; gap:2px; min-width:0; }
.ta-stop-text strong { overflow-wrap:anywhere; font-size:15px; }
.ta-stop-text small { color:var(--tp-muted); font-size:13px; overflow-wrap:anywhere; }
.ta-check { justify-self:start; padding:1px 8px; border-radius:999px; background:var(--lb-amber-soft,#fff4d6); color:var(--lb-amber-text,#8a5a00); font-size:12px; font-weight:600; }
.ta-stop-tools { display:flex; }
.ta-stop-tools .tp-round { width:36px; height:36px; color:var(--tp-muted); }
.ta-fix { border:1px solid var(--tp-line); border-radius:14px; padding:4px 14px; }
.ta-fix[open] { display:grid; gap:10px; padding-bottom:14px; }
.ta-fix summary { padding:10px 0; font-weight:600; cursor:pointer; }
.ta-changes { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.ta-change { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:12px; border:1px solid var(--tp-line); border-radius:14px; cursor:pointer; }
.ta-change input { width:20px; height:20px; margin:0; }
.ta-change b { font-size:13px; padding:1px 8px; border-radius:999px; background:var(--tp-soft); }
.ta-change.is-add b { background:var(--lb-green-soft,#e3f6e8); color:var(--lb-green-text,#1d6b35); }
.ta-change.is-remove b { background:var(--lb-red-soft,#fde8e8); color:var(--lb-red-text,#c7362f); }
.ta-change span { overflow-wrap:anywhere; }
@media (max-width: 520px) { .ta-way { padding:16px 4px; font-size:14px; } }
@media (prefers-reduced-motion: reduce) { .ta-spinner, .ta-mic.is-on { animation:none; } }
:root[data-themeable][data-theme="dark"] .ta-check { background:#3a2c08; color:#f3cf74; }
:root[data-themeable][data-theme="dark"] .ta-change.is-add b { background:#12351f; color:#8fe0aa; }
:root[data-themeable][data-theme="dark"] .ta-change.is-remove b { background:#3d1717; color:#f4a3a0; }
@media (prefers-color-scheme: dark) {
  :root[data-themeable]:not([data-theme="light"]) .ta-check { background:#3a2c08; color:#f3cf74; }
  :root[data-themeable]:not([data-theme="light"]) .ta-change.is-add b { background:#12351f; color:#8fe0aa; }
  :root[data-themeable]:not([data-theme="light"]) .ta-change.is-remove b { background:#3d1717; color:#f4a3a0; }
}
.ta-after { padding:12px 14px; border-radius:14px; background:var(--tp-soft); }
.ta-after h3 { margin:0 0 6px; font-size:14px; }
.ta-after p { margin:4px 0 0; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.ta-change.is-day b, .ta-change.is-time b { background:var(--tp-range); color:var(--lb-link,var(--tp-blue)); }

/* 家／公司 in one tap when adding a stop (the trip's owner only, my-places.js). */
.tp-mine-chips { flex-wrap:wrap; margin:-4px 0 6px; }
.tp-mine-chips[hidden] { display:none; }
.tp-mine-chips .tp-chip { background:var(--lb-bg,#fff); font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
/* 跟 AI 小助理說要怎麼改…: a line to type in on the trip page, for the owner and editors. */
.tp-ai-bar { display:flex; align-items:center; gap:4px; min-width:0; margin:12px 0 4px; padding:4px 4px 4px 14px; border:1px solid var(--tp-line); border-radius:999px; background:var(--lb-glass,rgba(255,255,255,.94)); box-shadow:0 1px 6px rgba(15,23,42,.06); }
.tp-ai-bar.is-compact { margin:14px 0 10px; }
.tp-ai-spark { display:grid; place-items:center; flex:none; color:var(--lb-link,var(--tp-blue)); }
.tp .tp-ai-input { flex:1 1 auto; min-width:0; min-height:40px; padding:0 4px; border:0; background:none; color:var(--tp-ink); font:inherit; font-size:16px; }
.tp .tp-ai-input:focus { outline:none; }
.tp-ai-bar:focus-within { border-color:var(--lb-link,var(--tp-blue)); }
.tp-ai-bar .tp-round { flex:none; width:40px; height:40px; color:var(--tp-muted); }
.tp-ai-bar .tp-ai-send { background:var(--tp-blue); color:#fff; }
.tp-ai-bar .tp-ai-send:hover { background:#005ad7; }
/* 行程準備, folded to one line by default; opened, each item is a small chip to tick. */
.tp-prep { padding:8px 12px; }
.tp-prep-head { min-height:40px; gap:8px; }
.tp-prep-summary { flex:1 1 auto; min-width:0; overflow:hidden; color:var(--tp-muted); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.tp-prep-summary.is-ready { color:var(--lb-green-text,#0a7a3d); font-weight:600; }
.tp-prep-head::after { margin-left:0; flex:none; }
.tp-prep-chips { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 0; padding:0; list-style:none; }
.tp-prep-chip { display:inline-flex; align-items:center; gap:6px; max-width:100%; min-height:34px; padding:0 12px 0 8px; border:1px solid var(--tp-line); border-radius:999px; background:var(--lb-glass,rgba(255,255,255,.9)); font-size:14px; cursor:pointer; }
.tp .tp-prep-chip input { flex:none; width:16px; height:16px; min-height:0; margin:0; padding:0; accent-color:var(--lb-link,var(--tp-blue)); }
.tp-prep-chip .tp-prep-text { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tp-prep-chip small { flex:none; color:var(--tp-muted); font-size:12px; }
.tp-prep-chip.is-done { background:var(--tp-soft); }
.tp-prep-chip.is-done .tp-prep-text { color:var(--tp-muted); text-decoration:line-through; }
.tp-prep-manage { margin-top:4px; font-size:13px; }
.tp-prep-add { margin-top:8px; }
.tp-prep-ideas { gap:6px; margin-top:8px; }
/* 複製到隔天 */
.tp-copy-row { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.tp-copy-days { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
/* 這天最後（回到這裡） first and 新的一天 last, each across the sheet; each other day is 開頭 | 最後. */
.tp-copy-days :is(.tp-copy-back, .tp-copy-new) { grid-column:1 / -1; }
.tp-start-chip { display:inline-flex; align-items:center; gap:6px; max-width:100%; min-height:36px; margin:6px 0 2px; padding:0 14px; border:1px dashed var(--lb-link,var(--tp-blue)); border-radius:999px; background:var(--lb-glass,rgba(255,255,255,.9)); color:var(--lb-link,var(--tp-blue)); font:inherit; font-size:14px; font-weight:600; cursor:pointer; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* A stop's actions (the owner, 2026-11-20): one compact row of equal buttons, icon above a short label, wrapping on a narrow phone. */
.tp-stop-go { grid-column:1 / -1; display:grid; gap:4px; margin-top:-4px; min-width:0; }
.tp-stop-acts { display:grid; grid-template-columns:repeat(auto-fit, minmax(58px, 1fr)); gap:6px; min-width:0; }
.tp-act { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-width:0; min-height:40px; padding:4px 2px; border:1px solid var(--tp-line); border-radius:12px; background:var(--lb-glass,rgba(255,255,255,.92)); color:var(--lb-link,var(--tp-blue)); font:inherit; font-size:12px; font-weight:600; line-height:1.2; text-decoration:none; cursor:pointer; }
.tp-act[hidden] { display:none; }
.tp-act > span { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tp-act.is-primary { border-color:var(--tp-blue); background:var(--tp-blue); color:#fff; }
.tp-act:disabled { opacity:.45; cursor:not-allowed; }
.tp-stop-go .tp-go-pick, .tp-stop-go .tp-go-switch { justify-self:end; padding:2px 0; font-size:12px; }
@media (min-width: 700px) { .tp-act { flex-direction:row; gap:6px; font-size:13px; } }
.tp-day-route { min-height:48px; margin:8px 0 4px; font-size:16px; }
.tp-stop-more { grid-column:1 / -1; display:grid; gap:4px; min-width:0; }
.tp-stop-more:empty { display:none; }

/* 建議怎麼去 between two stops (leg-suggest.js): the way, 套用 and 換一個, as quiet as the written way above a stop. */
.tp-suggest { grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; margin:-6px 0 -4px; color:var(--tp-muted); font-size:13px; line-height:1.4; }
.tp-suggest .tp-move-arrow { width:28px; }
.tp-timeline .tp-suggest { position:relative; z-index:1; margin:-4px 0 2px; padding-left:calc(var(--rail) - 14px); }
.tp-timeline .tp-suggest .tp-move-arrow { background:var(--lb-bg,#fff); }
.tp-suggest[hidden] { display:none; }
.tp-suggest-tag { padding:1px 8px; border-radius:999px; background:var(--tp-range,#e8f1ff); color:var(--lb-link,var(--tp-blue)); font-size:12px; font-weight:700; }
.tp-suggest-text { min-width:0; overflow-wrap:anywhere; color:var(--tp-ink); }
/* The line is a button: a tap opens its guide (openGuide). It reads as text, underlined on hover. */
button.tp-suggest-text { padding:0; border:0; background:none; font:inherit; text-align:left; cursor:pointer; }
/* A way written from 建議 (套用) opens its guide too: as the written way, with a small blue › that says so. */
button.tp-move-open { padding:0; border:0; background:none; font:inherit; color:inherit; text-align:left; cursor:pointer; }
button.tp-move-open:hover > span:first-child { text-decoration:underline; text-underline-offset:3px; }
button.tp-move-open:focus-visible { outline:2px solid var(--lb-link,var(--tp-blue)); outline-offset:2px; border-radius:4px; }
.tp-move-cue { margin-left:4px; color:var(--lb-link,var(--tp-blue)); font-weight:700; }
button.tp-suggest-text:hover { text-decoration:underline; text-underline-offset:3px; }
button.tp-suggest-text:focus-visible { outline:2px solid var(--lb-link,var(--tp-blue)); outline-offset:2px; border-radius:4px; }
/* The guide: 導航 on top, then the steps one per row, numbered, then the whole time and 套用 / 換一個. */
.tp-guide .tp-guide-go { width:100%; min-height:52px; font-size:17px; }
.tp-guide-steps { margin:18px 0 0; padding:0; list-style:none; counter-reset:step; display:grid; gap:0; }
.tp-guide-steps li { counter-increment:step; position:relative; padding:10px 0 10px 40px; border-bottom:1px solid var(--tp-line,#e5e8ee); font-size:16px; line-height:1.5; color:var(--tp-ink); overflow-wrap:anywhere; }
.tp-guide-steps li::before { content:counter(step); position:absolute; left:0; top:9px; display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:var(--tp-range,#e8f1ff); color:var(--lb-link,var(--tp-blue)); font-size:14px; font-weight:700; }
.tp-guide-total { margin:12px 0 0; font-size:15px; font-weight:700; color:var(--tp-ink); }
.tp-guide-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:16px; }
.tp-guide-actions .tp-suggest-source { margin-left:auto; color:var(--tp-muted); font-size:13px; }
.tp-suggest .tp-link-button { font-size:13px; }
.tp-suggest-source { color:var(--tp-muted); font-size:12px; text-decoration:underline; text-underline-offset:2px; }
.tp-day-routes { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:8px; margin:8px 0 4px; }
.tp-day-routes .tp-day-route { margin:0; }
/* 拍照打卡 keeps its old link styles elsewhere; in the action row it is one of the equal buttons. */
.tp-stop-acts > .tp-act.tp-stop-checkin, .tp-stop-acts > .tp-act.mp-stop-set { justify-self:stretch; margin:0; padding:4px 2px; border:1px solid var(--tp-line); background:var(--lb-glass,rgba(255,255,255,.92)); color:var(--lb-link,var(--tp-blue)); text-align:center; }
.tp-stop-acts > .tp-act { min-height:40px; padding:3px 2px; gap:1px; line-height:1.15; }
.tp-stop-acts > .tp-act > svg { display:block; flex:none; width:16px; height:16px; margin:0; }
@media (min-width: 700px) { .tp-stop-acts > .tp-act { gap:6px; } }
.tp-stop-acts > .tp-act, .tp-stop-acts > .tp-act.tp-stop-checkin { font-size:12px; font-weight:600; }
@media (min-width: 700px) { .tp-stop-acts > .tp-act, .tp-stop-acts > .tp-act.tp-stop-checkin { font-size:13px; } }
/* ˄ ˅ beside a stop (the owner, 2026-11-20), in its side column with ✎ and 🔖: easier than dragging on a small phone. */
.tp-stop-tools .tp-step { height:36px; }
/* 這天的備註 (the owner, 2026-11-20): under 這天的主題, a few lines; read as plain text by everyone else. */
.tp .tp-day-note-input { display:block; width:100%; box-sizing:border-box; min-height:52px; margin:6px 0 4px; padding:8px 12px; border:1px solid var(--tp-line); border-radius:12px; background:var(--lb-bg,#fff); color:var(--tp-ink); font:inherit; font-size:15px; line-height:1.5; resize:vertical; }
.tp .tp-day-note-input::placeholder { color:var(--tp-muted); }
.tp-day-note { margin:6px 0 4px; padding:8px 12px; border-radius:12px; background:var(--tp-soft); color:var(--tp-ink); font-size:14px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
/* 參考連結 on a stop (trip-stop-links.js): a small card per page, for reading only. */
.tp-links { display:grid; gap:6px; margin:6px 0 2px; min-width:0; }
/* 文章連結: title chips (site, then title), no picture; they wrap, never wider than the row. */
.tp-articles { display:flex; flex-wrap:wrap; gap:6px; margin:2px 0; min-width:0; }
.tp-stop > .tp-articles { grid-column:1 / -1; }
.tp-article-chip { display:inline-flex; align-items:baseline; gap:6px; max-width:100%; min-width:0; min-height:32px; padding:5px 12px; border:1px solid var(--tp-line); border-radius:999px; background:var(--tp-soft); color:var(--tp-ink); font-size:13px; text-decoration:none; }
.tp-article-chip small { flex:none; color:var(--tp-muted); font-size:12px; font-weight:600; }
.tp-article-chip span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
a.tp-article-chip:hover { border-color:var(--lb-link,#006bff); }
.tp-article-chip.is-edit { align-items:center; padding-right:4px; }
.tp-article-chip.is-edit .tp-link-remove { flex:none; }
.tp-link-field.is-articles .tp-links { display:flex; flex-wrap:wrap; }
.tp-stop > .tp-links { grid-column:1 / -1; margin:0; }
.tp-backup > .tp-links { grid-column:2 / -1; margin:0; }
.tp-links.is-compact { gap:4px; }
.tp-links.is-compact .tp-link-open { gap:8px; padding:4px; }
.tp-links.is-compact .tp-link-thumb { width:44px; height:33px; border-radius:6px; }
.tp-links.is-compact .tp-link-initial { font-size:15px; }
.tp-links.is-compact .tp-link-title { -webkit-line-clamp:1; font-size:13px; }
.tp-links.is-compact .tp-link-site { font-size:11px; }
img.tp-backup-photo { display:block; }
@media (min-width: 700px) { .tp-stop > .tp-links { grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); } }
.tp-link-card { display:flex; align-items:center; gap:6px; min-width:0; border:1px solid var(--tp-line); border-radius:12px; background:var(--lb-bg,#fff); }
.tp-link-open, .tp-link-open:hover { display:flex; flex:1; align-items:center; gap:10px; min-width:0; padding:6px; color:var(--tp-ink); text-decoration:none; }
.tp-link-open:focus-visible { outline:2px solid var(--tp-blue); outline-offset:2px; border-radius:10px; }
.tp-link-thumb { flex:none; width:64px; height:48px; border-radius:8px; object-fit:cover; background:var(--tp-soft); }
.tp-link-initial { display:grid; place-items:center; color:var(--tp-blue); font-size:20px; font-weight:700; }
.tp-link-text { display:grid; gap:2px; min-width:0; }
.tp-link-title { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; font-size:14px; line-height:1.3; overflow-wrap:anywhere; }
.tp-link-site.is-waiting { color:var(--tp-blue); }
.tp-link-site { overflow:hidden; color:var(--tp-muted); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.tp-link-remove { flex:none; width:36px; height:36px; margin-right:4px; border:0; border-radius:999px; background:none; color:var(--tp-muted); font-size:16px; cursor:pointer; }
.tp-link-remove:hover { background:var(--tp-soft); color:var(--tp-ink); }
.tp-link-field { gap:8px; }
.tp-link-input { display:flex; gap:8px; min-width:0; }
.tp-link-input[hidden] { display:none; }
.tp-link-input input { flex:1; min-width:0; }
.tp-link-add { flex:none; min-height:44px; padding:0 16px; border-radius:12px; font:inherit; font-weight:600; }
/* A 參考連結 picture in a stop's square opens larger. */
.tp-link-picture { display:block; padding:0; border:0; border-radius:12px; background:none; cursor:zoom-in; }
.tp-link-picture img { display:block; }
.tp-link-big { display:block; width:100%; max-height:70dvh; border-radius:16px; object-fit:contain; background:var(--tp-soft); }
.tp-link-big-site { margin:8px 0 12px; }
/* 收合 (the owner, 2026-11-20: 行程表現在有點亂…全部縮起來): a stop is one short line until opened with ＋. */
.tp-stop-toggle { color:var(--lb-link,var(--tp-blue)); }
.tp-stop.is-folded { padding:8px 0; row-gap:2px; align-items:center; }
.tp-stop.is-folded > :is(.tp-links, .tp-articles, .tp-stop-go, .tp-stop-more, .tp-stop-expenses, .tp-stop-fold:not(.has-cost)) { display:none; }
/* 有費用金額…一目了然 (the owner, 2026-11-20): a folded stop keeps its 「費用 · NT$600」 line, a tap opens it. */
.tp-stop.is-folded > .tp-stop-fold.has-cost { margin-top:2px; }
.tp-stop.is-folded > .tp-stop-fold.has-cost:not([open]) > summary { min-height:26px; padding:0 10px; font-size:12px; }
.tp-stop.is-folded .tp-stop-tools > :not(.tp-stop-toggle) { display:none; }
.tp-stop.is-folded .tp-stop-text { display:flex; align-items:center; gap:8px; min-width:0; }
.tp-stop.is-folded .tp-stop-name { display:flex; align-items:center; gap:4px; min-width:0; max-width:100%; overflow:hidden; }
.tp-stop.is-folded .tp-stop-name strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tp-stop.is-folded :is(.tp-stop-photo, .tp-stop-photo-button img, .tp-link-picture img) { width:44px; height:44px; }
.tp-stop.is-folded .tp-stop-time { flex:none; }
/* 建議怎麼去 above a folded stop: one quiet line; 套用 and 換一個 once the stop is opened. */
.tp-stop.is-folded .tp-suggest { flex-wrap:nowrap; overflow:hidden; }
/* 套用 and 換一個 stay on a folded stop too (the owner, 2026-11-21: 「套用、換一個都不見了」); the way's words shorten instead. */
.tp-stop.is-folded .tp-suggest .tp-link-button { flex:none; font-size:12px; }
.tp-stop.is-folded .tp-suggest-text { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tp-fold-all { display:flex; justify-content:flex-end; gap:16px; margin:4px 0 -4px; }
.tp-fold-all .tp-link-button { font-size:13px; }
/* A long description: three lines, and 更多 the rest. */
.tp-stop-more-text { justify-self:start; padding:0; font-size:13px; }
/* 參考連結 in an opened stop: small chips with the title only (no picture, no site); a tap opens the page. */
.tp-stop > .tp-links:not(.is-compact) { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
.tp-stop > .tp-links:not(.is-compact) > [role="listitem"] { min-width:0; max-width:100%; }
.tp-stop > .tp-links:not(.is-compact) .tp-link-card { display:inline-flex; min-width:0; max-width:100%; padding:0; border:0; background:none; box-shadow:none; }
.tp-stop > .tp-links:not(.is-compact) .tp-link-open { display:inline-flex; align-items:center; gap:6px; min-width:0; max-width:100%; min-height:30px; padding:0 12px; border:1px solid var(--tp-line); border-radius:999px; background:var(--lb-glass,rgba(255,255,255,.92)); color:var(--lb-link,var(--tp-blue)); text-decoration:none; }
.tp-stop > .tp-links:not(.is-compact) .tp-link-open::before { content:'🔗'; font-size:12px; }
.tp-stop > .tp-links:not(.is-compact) :is(.tp-link-thumb, .tp-link-site) { display:none; }
.tp-stop > .tp-links:not(.is-compact) .tp-link-text { display:block; min-width:0; }
.tp-stop > .tp-links:not(.is-compact) .tp-link-title { display:block; max-width:min(240px, 60vw); overflow:hidden; font-size:13px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; -webkit-line-clamp:unset; }
/* 行程聯絡人 and 旅程相簿 folded to one line, like 行程準備. */
.tp-fold { min-width:0; margin-top:12px; padding:6px 14px; border:1px solid var(--tp-line); border-radius:16px; }
.tp-fold:has(> summary + [hidden]:last-child) { display:none; }
.tp-fold > summary { display:flex; align-items:center; min-height:40px; cursor:pointer; list-style:none; }
.tp-fold > summary::-webkit-details-marker { display:none; }
.tp-fold > summary::after { content:'⌄'; margin-left:auto; color:var(--tp-muted); }
.tp-fold[open] > summary::after { content:'⌃'; }
.tp-fold > summary strong { font-size:15px; }
.tp-fold > :not(summary) { margin-top:4px; border:0; padding-left:0; padding-right:0; }
/* The trip's own buttons: one compact row, an icon over a short word, and ⋯ 更多 for the rest. */
.tp-trip-actions.is-compact { display:grid; grid-template-columns:repeat(auto-fit, minmax(56px, 1fr)); gap:6px; width:100%; }
.tp-trip-actions.is-compact > :is(button, a, .tp-more > summary) { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-width:0; min-height:48px; padding:4px 2px; border-radius:12px; font-size:12px; line-height:1.2; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tp-trip-actions.is-compact > .tp-more { position:relative; display:contents; }
.tp-trip-actions.is-compact > .tp-more > summary { list-style:none; cursor:pointer; }
.tp-trip-actions.is-compact > .tp-more > summary::-webkit-details-marker { display:none; }
.tp-more-menu { position:absolute; right:0; z-index:20; display:grid; gap:6px; min-width:160px; margin-top:6px; padding:8px; border-radius:16px; background:var(--lb-glass,rgba(255,255,255,.96)); box-shadow:0 10px 30px rgba(16,17,19,.18); -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); }
.tp-more-menu > button { justify-content:flex-start; min-height:40px; }
.tp-trip-actions.is-compact { position:relative; }
@media (min-width: 900px) { .tp-trip-actions.is-compact { width:auto; grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(64px, auto); } }
.tp-stop.is-folded > .tp-links, .tp-stop.is-folded > .tp-links:not(.is-compact) { display:none; }
.tp-trip-actions.is-compact > .tp-more > summary { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-width:0; min-height:48px; padding:4px 2px; border-radius:12px; font-size:12px; line-height:1.2; white-space:nowrap; }
/* 能隱藏起來就隱藏起來 (the owner, 2026-11-20): a folded stop is its time, title and picture; ＋ opens all of it, with no
   ⋯ 更多 inside (更多那個可以不用). */
.tp-stop.is-folded > :is(.tp-suggest, .tp-move) { display:none; }
/* The day's head: its 備註 on one line, a tap shows it all; 這天的詳情 folded. */
.tp-day-note.is-short { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
.tp-day:has(.tp-fold-day[open] .tp-day-note-input) > .tp-day-note { display:none; }
.tp-fold-day { margin-top:8px; }
/* The top: 今天的路線 and ⋯ 更多 with every other button, opening in place. */
.tp-trip-actions.is-top { display:flex; flex-wrap:wrap; align-items:flex-start; gap:8px; width:100%; }
.tp-trip-actions.is-top > :is(.tp-day-route, .tp-day-routes) { flex:1 1 220px; margin:0; }
.tp-trip-actions.is-top > .tp-menu { flex:1 1 100%; margin:0; padding:4px 12px; }
.tp-trip-actions.is-top > .tp-menu > summary { min-height:40px; }
.tp-menu-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(64px, 1fr)); gap:6px; margin:4px 0 8px; }
.tp-menu-grid > :is(button, a) { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-width:0; min-height:48px; padding:4px 2px; border-radius:12px; font-size:12px; line-height:1.2; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (min-width: 900px) { .tp-trip-actions.is-top { width:min(520px, 100%); } }
/* The top is one row: 今天的路線, then a small ⋯ 更多 beside it; opened, the menu takes the full width below. The other
   folds are short one-line rows. */
.tp-trip-actions.is-top { flex-wrap:wrap; align-items:stretch; }
.tp-trip-actions.is-top:has(> :is(.tp-day-route, .tp-day-routes)) > .tp-menu:not([open]) { flex:0 0 auto; display:flex; align-items:center; padding:0 12px; }
.tp-trip-actions.is-top > .tp-menu > summary { gap:4px; }
.tp-trip-actions.is-top > .tp-menu > summary::before { content:'⋯'; font-size:18px; line-height:1; }
.tp-trip-actions.is-top > .tp-menu:not([open]) > summary::after { content:none; }
.tp-trip-actions.is-top > .tp-menu:not([open]) > summary strong { font-size:14px; }
.tp-fold { margin-top:8px; padding:2px 12px; border-radius:14px; }
.tp-fold > summary { min-height:36px; }
.tp-fold > summary strong { font-size:14px; font-weight:600; }
/* 內容留這些就好 (the owner, 2026-11-20, after 7dde09b7): a folded stop still shows what it is — the time, the whole title
   (wrapping, never cut), the weather and air line, 照片與留言 and its picture square. Only the inner text and extras fold
   behind ＋: the description and flight, 參考連結, 導航／規劃路線／⋯, how the trip's people feel, 費用, and the way there. */
.tp-stop.is-folded { align-items:start; padding:12px 0; }
.tp-stop.is-folded .tp-stop-text { display:grid; gap:4px; }
.tp-stop.is-folded .tp-stop-text > :not(.tp-stop-time, .tp-stop-name, .tp-stop-weather, .tp-stop-links) { display:none; }
.tp-stop.is-folded .tp-stop-name { display:flex; align-items:flex-start; overflow:visible; }
.tp-stop.is-folded .tp-stop-name strong { overflow:visible; text-overflow:clip; white-space:normal; overflow-wrap:anywhere; }
.tp-stop.is-folded :is(.tp-stop-photo, .tp-stop-photo-button img, .tp-link-picture img) { width:72px; height:72px; }
/* 航班 (the owner, 2026-11-20: 航班那個內容好像修壞了): a flight stop, folded or not, shows its flight in full — 航班 UO109 with
   ✈️ 追蹤航班, and its note with the times — and no 導航 or 規劃路線. */
.tp-stop.is-folded.is-flight .tp-stop-text > :is(.tp-stop-meta, .tp-flight-links) { display:block; }
.tp-stop.is-flight .tp-flight-own { display:inline-flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
/* 群聊 and 對講 beside 今天的路線: small, an icon over a short word, like the menu's own. */
.tp-trip-actions.is-top.is-compact > .tp-top-talk { flex:0 0 auto; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; position:relative; min-width:56px; min-height:48px; padding:4px 8px; border-radius:12px; font-size:12px; line-height:1.2; white-space:nowrap; }
.tp-trip-actions.is-top.is-compact > .tp-top-talk .tp-chat-dot { position:absolute; top:6px; right:10px; }
.tp-trip-actions.is-top:has(> .tp-top-talk) > :is(.tp-day-route, .tp-day-routes) { flex:1 1 120px; min-width:0; }
.tp-trip-actions.is-top:has(> .tp-top-talk) > .tp-menu:not([open]) { flex:0 0 auto; display:flex; align-items:center; justify-content:center; min-width:56px; padding:0 8px; }
.tp-trip-actions.is-top:has(> .tp-top-talk) > .tp-menu:not([open]) > summary { flex-direction:column; justify-content:center; gap:0; min-height:46px; }
.tp-trip-actions.is-top:has(> .tp-top-talk) > .tp-menu:not([open]) > summary strong { font-size:12px; font-weight:500; }
.tp-trip-actions.is-top > .tp-menu[open] { order:9; }
/* A flight stop's flight (the owner, 2026-11-20: 本來有時間跟追蹤): 航班 UO109 ✈️ 追蹤航班, its looked-up times and, for a
   stop only named a flight, 改成航班 — shown folded too. */
.tp-stop-flight { display:grid; justify-items:start; gap:4px; min-width:0; }
.tp-stop.is-folded .tp-stop-text > .tp-stop-flight { display:grid; }
.tp-flight-times { display:grid; gap:1px; min-width:0; font-size:13px; line-height:1.4; }
.tp-flight-times[hidden] { display:none; }
.tp-flight-times strong { font-size:14px; font-weight:600; }
.tp-flight-times small { color:var(--tp-muted); font-size:12px; overflow-wrap:anywhere; }
.tp-make-flight { padding:0; font-size:13px; }
/* 預估時間 (the owner, 2026-11-20: 那個東西也不見了): how to get here stays as one short quiet line between folded stops;
   套用, 換一個 and where it comes from show once the stop is opened. */
.tp-stop.is-folded > .tp-move, .tp-stop.is-folded > .tp-suggest { display:flex; align-items:center; gap:6px; min-width:0; color:var(--tp-muted); font-size:12px; }
.tp-stop.is-folded > .tp-suggest[hidden] { display:none; }
.tp-stop.is-folded > .tp-move .tp-move-text, .tp-stop.is-folded .tp-suggest-text { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tp-stop.is-folded .tp-suggest .tp-suggest-source { display:none; }
.tp-stop.is-folded .tp-suggest .tp-link-button { flex:none; }
/* 聯絡人, 相簿 and 集合點 (the owner, 2026-11-20: 不要佔那麼長，盡量簡化簡潔一點): one row of small chips under the top row,
   each opening a tall sheet; the sheet's own title replaces the section's heading. */
.tp-chip-row { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.tp-chip-btn { display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:0 12px; border:1px solid var(--tp-line); border-radius:999px; background:var(--lb-glass,rgba(255,255,255,.92)); color:var(--tp-ink); font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.tp-chip-count { min-width:18px; padding:0 5px; border-radius:999px; background:var(--tp-soft); color:var(--tp-muted); font-size:11px; font-weight:600; line-height:18px; text-align:center; }
.tp-chip-count[hidden] { display:none; }
.tp-sheet.tp-sheet-tall { width:min(560px, 100%); height:min(68dvh, 720px); max-height:none; margin:auto auto 0; border-radius:24px 24px 0 0; }
@media (min-width: 900px) { .tp-sheet.tp-sheet-tall { width:min(460px, 40vw); height:100dvh; margin:0 0 0 auto; border-radius:24px 0 0 24px; } }
.tp-sheet-tall :is(.tp-contacts-head, .tp-album-head, .mp-trip-head) h3 { display:none; }
.tp-sheet-tall .tp-sheet-body > :is(.tp-contacts, .tp-album, .mp-trip) { padding:0; border:0; background:none; box-shadow:none; }
/* The top, short (the owner, 2026-11-20): title and dates, one row, the chips, then the days. */
.tp-trip-head { margin-bottom:0; }
.tp-trip-actions.is-top { margin-top:10px; }
.tp-chip-row + .tp-fold, .tp-trip-actions.is-top + .tp-fold { margin-top:10px; }

/* 群聊 and 對講 over the trip (trip-talk.js): a bottom sheet about two thirds of a phone's height, a side panel on a wide
   screen; the trip dimmed behind it, never scrolled. Folded, a small pill above the bottom bar. */
html.tt-open { overflow:hidden; }
.tt-layer { position:fixed; inset:0; z-index:90; }
.tt-layer[hidden], .tt-pill-wrap[hidden] { display:none; }
.tt-dim { position:absolute; inset:0; background:rgb(16 17 19 / 34%); }
.tt-panel { position:absolute; inset:auto 0 0 0; display:flex; flex-direction:column; height:min(66dvh, 720px); overflow:hidden; border-radius:24px 24px 0 0; background:var(--lb-elevated,#fff); color:var(--lb-text,#101113); box-shadow:0 -12px 40px rgb(20 32 50 / 22%); outline:none; transition:transform .2s ease; }
.tt-panel.is-dragging { transition:none; }
.tt-head { position:relative; display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:52px; padding:14px 12px 6px 20px; touch-action:none; cursor:grab; }
.tt-handle { position:absolute; top:6px; left:50%; width:44px; height:5px; padding:0; border:0; border-radius:999px; background:var(--lb-line,#d5dbe3); transform:translateX(-50%); cursor:pointer; }
.tt-title { font-size:17px; font-weight:700; }
.tt-frame { flex:1; width:100%; min-height:0; border:0; background:var(--lb-bg,#fff); }
@media (min-width: 900px) {
  .tt-panel { inset:0 0 0 auto; width:min(440px, 40vw); height:100dvh; border-radius:24px 0 0 24px; }
}
.tt-pill-wrap { position:fixed; left:50%; bottom:calc(env(safe-area-inset-bottom, 0px) + 92px); z-index:89; display:flex; align-items:center; gap:2px; padding:4px; border-radius:999px; background:var(--lb-glass,rgba(255,255,255,.96)); box-shadow:0 8px 28px rgb(20 32 50 / 22%); transform:translateX(-50%); -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); }
.tt-pill { display:inline-flex; align-items:center; gap:6px; min-height:40px; padding:0 14px; border:0; border-radius:999px; background:var(--lb-link,#006bff); color:#fff; font:inherit; font-size:14px; font-weight:700; white-space:nowrap; cursor:pointer; }
.tt-count { min-width:20px; padding:0 6px; border-radius:999px; background:#ff3b30; color:#fff; font-size:12px; line-height:20px; text-align:center; }
.tt-count[hidden] { display:none; }
.tt-pill-close { display:grid; place-items:center; width:36px; height:36px; padding:0; border:0; border-radius:50%; background:none; color:var(--lb-text-2,#6d7480); cursor:pointer; }
@media (min-width: 900px) { .tt-pill-wrap { bottom:24px; left:auto; right:24px; transform:none; } }

/* 備選 (the owner, 2026-11-20): like a stop, its words behind ＋ and no 參考連結 cards; those are small title chips in ⋯. */
.tp-backup-actions:empty { display:none; }
.tp-chip-links > .tp-links { display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
.tp-chip-links > .tp-links > [role="listitem"] { min-width:0; max-width:100%; }
.tp-chip-links .tp-link-card { display:inline-flex; min-width:0; max-width:100%; padding:0; border:0; background:none; box-shadow:none; }
.tp-chip-links .tp-link-open { display:inline-flex; align-items:center; gap:6px; min-width:0; max-width:100%; min-height:30px; padding:0 12px; border:1px solid var(--tp-line); border-radius:999px; background:var(--lb-glass,rgba(255,255,255,.92)); color:var(--lb-link,var(--tp-blue)); text-decoration:none; }
.tp-chip-links .tp-link-open::before { content:'🔗'; font-size:12px; }
.tp-chip-links :is(.tp-link-thumb, .tp-link-site) { display:none; }
.tp-chip-links .tp-link-text { display:block; min-width:0; }
.tp-chip-links .tp-link-title { display:block; max-width:min(240px, 60vw); overflow:hidden; font-size:13px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; -webkit-line-clamp:unset; }
.tp-backup-actions { display:flex; align-items:center; gap:2px; }
.tp-backup-actions > .tp-secondary { min-height:34px; padding:0 10px; font-size:13px; white-space:nowrap; }
.tp-backup-actions > .tp-mini { width:32px; height:32px; }
/* A 備選's 導航 sits under its name, short name or long. */
.tp-backup-text > strong { display:block; }
.tp-backup-text > .tp-backup-go { display:flex; align-items:center; gap:4px; width:max-content; margin-top:2px; }
/* 換縮圖 (trips.js pictureSheet). */
.tp-own-picture { display:grid; gap:8px; padding:10px 0; border-bottom:1px solid var(--tp-line); }
.tp-own-title { overflow-wrap:anywhere; font-size:15px; }
.tp-own-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.tp-own-pick { display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 16px; border-radius:12px; font-weight:600; cursor:pointer; }
.tp-own-pick:focus-within { outline:2px solid var(--tp-blue); outline-offset:2px; }
.tp-own-open { display:inline-flex; align-items:center; gap:4px; }
/* 小提醒 in full (the owner, 2026-11-20: 小提醒的文字我本來要寫很多…其他的顯現不出來): an opened stop and an opened 備選 show
   every line of it, with its line breaks, and a long link wraps instead of running off; folded, it is hidden, never cut. */
.tp-stop-meta :is(p, .translation-field > span:first-child), .tp-backup-note, .tp-backup-note .translation-field > span:first-child { display:block; overflow:visible; white-space:pre-line; overflow-wrap:anywhere; -webkit-line-clamp:unset; }
/* ＋ on every 備選 opens its details in place, across the row: the whole 小提醒, the weather, its 參考連結 chips. */
.tp-backup-more { grid-column:1 / -1; display:none; gap:6px; min-width:0; }
.tp-backup.is-open > .tp-backup-more { display:grid; }
.tp-backup-more > .tp-backup-note { margin:0; }
/* 討論 with 這天的留言 in it (2026-11-20): which day a comment is about, the filter to one day, the day picker, and a day's
   「這天有 N 則討論」. */
.tp-day-tag { background:var(--tp-soft); color:var(--tp-muted); }
.tp-talk-filter { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; margin:4px 0 8px; font-size:14px; }
.tp-talk-where { width:100%; min-height:40px; margin-bottom:8px; }
.tp-day-talk { display:inline-flex; align-items:center; gap:6px; margin-top:12px; font-size:14px; }
/* 建議順序 (trip-stop-reorder.js): left in the 全部展開 row, and its preview. */
.tp-fold-all > .tp-reorder { display:inline-flex; align-items:center; gap:4px; margin-right:auto; font-weight:600; }
.tp-reorder-saved { margin:0; font-size:18px; font-weight:700; color:#12a150; }
.tp-reorder-list { display:grid; gap:6px; margin:0; padding-left:28px; list-style:decimal; }
.tp-reorder-list li { display:list-item; }
.tp-reorder-list li > :first-child { margin-right:auto; }
.tp-reorder-list li > small { float:right; margin-left:8px; }
.tp-reorder-list li > span { min-width:0; overflow-wrap:anywhere; }
.tp-reorder-list li.is-kept > span { color:var(--tp-muted); }
.tp-reorder-actions { display:flex; justify-content:flex-end; gap:8px; }
/* 整個行程的建議順序: what would move, then each day's plan, to read only. */
.tp-plan-moves { display:grid; gap:6px; margin:0; padding:10px 12px; border-radius:12px; background:color-mix(in srgb, #ff6b00 10%, transparent); list-style:none; font-size:14px; font-weight:600; }
.tp-plan-day h3 { margin:6px 0 4px; font-size:15px; }
.tp-reorder-list li.is-moved > span { color:#c2410c; font-weight:700; }
.tp-plan-from { float:right; margin-left:8px; color:#c2410c; }
/* 從 ChatGPT 貼上 (trip-chatgpt-sheet.js): the paste, then the draft to check before 建立. */
/* 怎麼用？: folded under the intro, three short steps and a tip. */
.tp-cg-help { border-radius:12px; background:var(--tp-soft); padding:0 12px; font-size:14px; }
.tp-cg-help > summary { display:flex; align-items:center; min-height:44px; cursor:pointer; list-style:none; font-weight:600; color:var(--lb-link,#006bff); }
.tp-cg-help > summary::-webkit-details-marker { display:none; }
.tp-cg-help > summary::after { content:'＋'; margin-left:auto; color:var(--lb-muted,#5d6675); }
.tp-cg-help[open] > summary::after { content:'－'; }
.tp-cg-help ol { margin:0; padding:0 0 0 20px; display:grid; gap:6px; overflow-wrap:anywhere; }
.tp-cg-help p { margin:8px 0 12px; font-size:13px; }
.tp-cg-status { margin:0; font-size:14px; font-weight:600; color:var(--tp-ink); }
.tp-cg-text { width:100%; min-height:72px; padding:12px; border:1px solid var(--tp-line); border-radius:14px; font:inherit; font-size:15px; resize:vertical; }
.tp-cg-list { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.tp-cg-row { display:grid; gap:2px; padding:10px 12px; border-radius:12px; background:var(--tp-soft); min-width:0; }
.tp-cg-pick { display:flex; align-items:center; gap:8px; min-width:0; }
.tp-cg-pick strong { min-width:0; overflow-wrap:anywhere; }
.tp-cg-time { flex:none; color:var(--lb-link,#006bff); font-weight:700; font-variant-numeric:tabular-nums; }
.tp-cg-meta { display:flex; flex-wrap:wrap; gap:4px 10px; margin:0; font-size:13px; }
.tp-cg-found { color:#12a150; font-weight:600; }
.tp-cg-missing { color:#c2410c; font-weight:600; }
.tp-cg-picture { display:inline-flex; align-items:center; gap:3px; color:var(--tp-muted); }
.tp-cg-note { margin:0; font-size:13px; white-space:pre-line; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.tp-cg-pick input[type="checkbox"] { flex:none; width:20px; min-width:20px; height:20px; min-height:20px; margin:0; padding:0; accent-color:var(--lb-link,#006bff); }
.tp-cg-pick strong { flex:1; }
/* 截圖記帳: 記一筆 and 截圖記帳 side by side; the review sheet shows each screenshot beside its draft. */
.tp-ledger-add { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.tp-receipts { list-style:none; margin:4px 0 14px; padding:0; display:grid; gap:12px; }
.tp-receipt { display:grid; grid-template-columns:72px minmax(0,1fr); gap:12px; padding:12px; border:1px solid var(--tp-line); border-radius:16px; scroll-margin-top:72px; }
.tp-receipt.is-wrong { border-color:#d93025; }
.tp-receipt-shot { width:72px; height:128px; object-fit:cover; object-position:top; border-radius:10px; background:var(--tp-line); }
.tp-receipt-fields { display:grid; gap:8px; min-width:0; }
.tp-receipt-fields .tp-amount-row { grid-template-columns:minmax(0,1fr) 112px; gap:8px; }
.tp-receipt-fields input, .tp-receipt-fields select { width:100%; min-width:0; min-height:42px; padding:0 10px; border:1px solid var(--tp-line); border-radius:10px; background:var(--lb-bg,#fff); color:var(--tp-ink); font:inherit; font-size:16px; box-sizing:border-box; }
.tp-receipt-fields .tp-amount-row:first-child input { font-size:20px; font-weight:650; font-variant-numeric:tabular-nums; }
.tp-receipt-fields .tp-amount-row:nth-child(2) { grid-template-columns:112px minmax(0,1fr); }
.tp-receipt-day, .tp-receipt-tip { margin:0; font-size:13px; }
.tp-receipt-tip { color:#b3261e; }
.tp-receipt-drop { justify-self:start; padding:0; }
.tp-receipt-look { padding:0; border:0; background:none; border-radius:10px; cursor:zoom-in; align-self:start; }
.tp-receipt.is-open { grid-template-columns:minmax(0,1fr); }
.tp-receipt.is-open .tp-receipt-look { display:none; }
.tp-receipt-big { display:grid; gap:8px; min-width:0; order:2; }
.tp-receipt-big[hidden] { display:none; }
.tp-receipt-big-tools { display:flex; gap:8px; justify-content:flex-end; }
.tp-receipt-big-view { max-height:52dvh; overflow:auto; border-radius:12px; background:var(--tp-line); overscroll-behavior:contain; }
.tp-receipt-big-view img { display:block; width:100%; height:auto; }
.tp-receipt-big.is-zoomed .tp-receipt-big-view img { width:200%; max-width:none; }
.tp-receipt-picks { display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:13px; }
.tp-receipt-picks .tp-chip { min-height:32px; padding:0 12px; font-variant-numeric:tabular-nums; }
/* 截圖收據: the receipt button at the end of an entry, the 留下截圖當收據 box, and the saved receipt's sheet. */
.tp-expenses li.has-receipt { display:flex; flex-wrap:wrap; align-items:stretch; }
.tp-expenses li.has-receipt > .tp-expense { flex:1; width:auto; min-width:0; }
.tp-expenses li.has-receipt > .tp-expense-orphan { flex-basis:calc(100% - 44px); }
.tp-expense-receipt { display:grid; flex:none; place-items:center; width:44px; padding:0; border:0; border-bottom:1px solid var(--tp-line); background:none; color:var(--tp-muted); cursor:zoom-in; }
.tp-expense-receipt:hover, .tp-expense-receipt:focus-visible { color:var(--lb-link,var(--tp-blue)); }
.tp-receipt-keep { align-items:flex-start; }
.tp-receipt-keep > span { display:grid; gap:2px; }
.tp-receipt-big.tp-receipt-saved { order:0; }
.tp-receipt-saved .tp-receipt-big-view { max-height:70dvh; }
/* 匯出記帳 beside 記帳設定 at the foot of 費用與分帳. */
.tp-ledger-foot { display:flex; flex-wrap:wrap; align-items:center; gap:8px 20px; }
.tp-ledger-foot .tp-ledger-settings { justify-self:auto; }
.tp-ledger-export { display:inline-flex; align-items:center; gap:6px; }
/* 旅行總覽 (the owner, 2026-11-26): four big numbers, then by year and each trip behind one tap. */
.tp-overview { margin:4px 0 18px; padding:18px; border:1px solid var(--lb-line,#e6e9ee); border-radius:18px; background:var(--lb-bg,#fff); }
.tp-ov-note { margin:12px 0 0; font-size:13px; }
.tp-ov-more { margin-top:8px; }
.tp-ov-more summary { display:inline-flex; min-height:40px; align-items:center; color:var(--lb-link,#006bff); font-weight:700; cursor:pointer; }
.tp-ov-trips { margin:0; padding:0; list-style:none; }
.tp-ov-trip { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--lb-line,#eef0f3); color:inherit; text-decoration:none; }
.tp-ov-trips li:last-child .tp-ov-trip { border-bottom:0; }
.tp-ov-trip-text { display:grid; gap:2px; min-width:0; }
.tp-ov-trip-text strong { overflow:hidden; font-size:15px; text-overflow:ellipsis; white-space:nowrap; }
.tp-ov-trip-text small { color:var(--lb-text-2,#5f6672); font-size:13px; }
.tp-ov-cost { flex:none; font-variant-numeric:tabular-nums; font-weight:700; white-space:nowrap; }
.tp-ov-cost.is-none { color:var(--lb-text-2,#5f6672); font-weight:400; }
/* 旅行總覽 as a dashboard (trip-dashboard.js): a night-blue instrument panel in both site themes, its numbers counting up
   and its charts growing once it is on screen. */
.tp-dash { --dash-ink:#e9f1ff; --dash-ink-2:#93a6c2; --dash-line:rgb(120 170 255 / 16%); --dash-glow:#4fd8ff; position:relative; overflow:hidden; color:var(--dash-ink); border-color:#16233a;
  background:radial-gradient(120% 70% at 0% 0%, rgb(57 135 229 / 26%), transparent 60%), radial-gradient(90% 60% at 100% 100%, rgb(79 216 255 / 12%), transparent 65%),
    linear-gradient(rgb(120 170 255 / 5%) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgb(120 170 255 / 5%) 1px, transparent 1px) 0 0 / 28px 28px, #0a1220; }
.tp-dash-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:14px; }
.tp-dash-head h2 { margin:0; color:var(--dash-ink); font-size:18px; }
.tp-dash-span { color:var(--dash-ink-2); font-size:13px; font-variant-numeric:tabular-nums; }
.tp-dash-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.tp-dash-kpi { position:relative; display:grid; gap:4px; min-width:0; padding:12px 12px 11px; border:1px solid var(--dash-line); border-radius:12px; background:rgb(255 255 255 / 3%); }
.tp-dash-kpi::before { content:""; position:absolute; top:-1px; left:12px; width:28px; height:2px; border-radius:2px; background:var(--dash-glow); box-shadow:0 0 10px var(--dash-glow); }
.tp-dash-num { overflow:hidden; font-size:28px; font-weight:800; letter-spacing:-.01em; line-height:1.15; font-variant-numeric:tabular-nums; text-overflow:ellipsis; white-space:nowrap; text-shadow:0 0 18px rgb(79 216 255 / 35%); }
.tp-dash-kpi span { color:var(--dash-ink-2); font-size:13px; }
.tp-dash-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:10px; }
.tp-dash-panel { min-width:0; margin:0; padding:14px; border:1px solid var(--dash-line); border-radius:14px; background:rgb(255 255 255 / 3%); }
.tp-dash-panel.is-wide { grid-column:1 / -1; }
.tp-dash-panel figcaption { margin-bottom:8px; color:var(--dash-ink-2); font-size:13px; font-weight:600; }
.tp-dash-readout { min-height:20px; margin:0 0 10px; color:var(--dash-ink); font-size:14px; font-variant-numeric:tabular-nums; }
.tp-dash-bars { display:flex; align-items:stretch; gap:6px; height:150px; }
.tp-dash-bar { display:flex; flex:1 1 0; flex-direction:column; gap:6px; min-width:0; padding:0; border:0; background:none; color:var(--dash-ink-2); cursor:pointer; }
.tp-dash-bar-track { display:flex; flex:1; align-items:flex-end; border-bottom:1px solid var(--dash-line); }
.tp-dash-bar-fill { display:block; width:100%; height:calc(var(--v) * 100%); border-radius:4px 4px 0 0; background:linear-gradient(180deg, #5fd0ff, #3987e5); transform:scaleY(0); transform-origin:bottom;
  transition:transform .9s cubic-bezier(.2,.8,.2,1) calc(var(--i,0) * 45ms), background .2s, box-shadow .2s; }
.tp-dash-bar.is-on .tp-dash-bar-fill { background:linear-gradient(180deg, #c4f5ff, var(--dash-glow)); box-shadow:0 0 14px rgb(79 216 255 / 55%); }
.tp-dash-bar-year { font-size:11px; text-align:center; font-variant-numeric:tabular-nums; }
.tp-dash-bar.is-on .tp-dash-bar-year { color:var(--dash-ink); font-weight:700; }
.tp-dash-donut { position:relative; width:150px; margin:2px auto 12px; }
.tp-dash-ring { display:block; width:100%; height:auto; }
.tp-dash-ring-track { fill:none; stroke:rgb(255 255 255 / 6%); stroke-width:14; }
.tp-dash-arc { fill:none; stroke-width:14; stroke-dashoffset:var(--len); transition:stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1) .15s, opacity .2s; }
.tp-dash-ring.is-picking .tp-dash-arc:not(.is-on) { opacity:.25; }
.tp-dash-ring-label { position:absolute; inset:0; display:grid; place-content:center; gap:2px; text-align:center; }
.tp-dash-ring-label small { color:var(--dash-ink-2); font-size:11px; }
.tp-dash-ring-label strong { font-size:15px; font-variant-numeric:tabular-nums; }
.tp-dash-legend, .tp-dash-rows { margin:0; padding:0; list-style:none; }
.tp-dash-legend li { display:grid; grid-template-columns:10px 1fr auto 40px; gap:8px; align-items:center; padding:6px 0; border-top:1px solid var(--dash-line); font-size:14px; }
.tp-dash-legend li:first-child { border-top:0; }
.tp-dash-legend strong { font-variant-numeric:tabular-nums; }
.tp-dash-legend small { color:var(--dash-ink-2); text-align:right; font-variant-numeric:tabular-nums; }
.tp-dash-swatch { width:10px; height:10px; border-radius:3px; }
.tp-dash-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 10px; align-items:baseline; padding:7px 0; color:var(--dash-ink); text-decoration:none; font-size:14px; }
.tp-dash-row-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tp-dash-row strong { font-variant-numeric:tabular-nums; }
a.tp-dash-row:hover .tp-dash-row-name { color:var(--dash-glow); }
.tp-dash-row-track { grid-column:1 / -1; height:6px; overflow:hidden; border-radius:3px; background:rgb(255 255 255 / 6%); }
.tp-dash-row-fill { display:block; width:calc(var(--v) * 100%); height:100%; border-radius:3px; background:linear-gradient(90deg, #3987e5, #5fd0ff); transform:scaleX(0); transform-origin:left;
  transition:transform .9s cubic-bezier(.2,.8,.2,1) calc(var(--i,0) * 60ms); }
.tp-dash.is-live .tp-dash-bar-fill, .tp-dash.is-live .tp-dash-row-fill { transform:none; }
.tp-dash.is-live .tp-dash-arc { stroke-dashoffset:0; }
.tp-dash .tp-ov-note { color:var(--dash-ink-2); }
.tp-dash .tp-ov-more summary { color:var(--dash-glow); }
.tp-dash .tp-ov-trip { border-bottom-color:var(--dash-line); }
.tp-dash .tp-ov-trip-text small, .tp-dash .tp-ov-cost.is-none { color:var(--dash-ink-2); }
.tp-dash :focus-visible { outline:2px solid var(--dash-glow); outline-offset:2px; }
@media (max-width:640px) {
  .tp-dash-kpis, .tp-dash-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tp-dash-grid { grid-template-columns:minmax(0,1fr); }
  .tp-dash-num { font-size:23px; }
  .tp-dash-bars { gap:4px; height:130px; }
}
@media (prefers-reduced-motion:reduce) {
  .tp-dash-bar-fill, .tp-dash-row-fill, .tp-dash-arc { transition:none; }
}
/* 刪除行程: tick my trips, then delete them together from the bar that stays at the bottom. */
.tp-pick-hint { margin:20px 0 4px; color:var(--tp-muted); font-size:15px; }
.tp-card.is-pickable { cursor:pointer; -webkit-user-select:none; user-select:none; }
.tp-card.is-locked { opacity:.45; cursor:not-allowed; }
.tp-pick-mark { position:absolute; top:10px; right:10px; z-index:2; display:grid; place-items:center; width:30px; height:30px; border:2px solid #fff; border-radius:50%; background:rgb(0 0 0 / 28%); color:transparent; box-shadow:0 1px 4px rgb(0 0 0 / 30%); }
.tp-card.is-picked { border-color:#d92d20; box-shadow:0 0 0 2px #d92d20; }
.tp-card.is-picked .tp-pick-mark { border-color:#d92d20; background:#d92d20; color:#fff; }
.tp-card.is-share.is-picked { border-color:var(--tp-blue); box-shadow:0 0 0 2px var(--tp-blue); }
.tp-card.is-share.is-picked .tp-pick-mark { border-color:var(--tp-blue); background:var(--tp-blue); }
.tp-pick-bar .tp-primary:disabled { background:var(--tp-soft); color:var(--tp-muted); cursor:default; }
.tp-share-pick { display:grid; gap:10px; }
.tp-badge-twin { top:auto; bottom:10px; background:#fff3cd; color:#7a4b00; }
.tp-pick-bar { position:sticky; bottom:calc(var(--lb-bottom-bar, 0px) + 12px + env(safe-area-inset-bottom)); z-index:5; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 14px; margin:20px 0 0; padding:12px 14px; border:1px solid var(--tp-line); border-radius:18px; background:var(--lb-elevated,var(--lb-bg,#fff)); box-shadow:0 8px 28px rgb(0 0 0 / 18%); }
.tp-pick-count { font-size:15px; }
.tp-pick-bar-actions { display:flex; flex-wrap:wrap; gap:8px; margin-left:auto; }
.tp-pick-bar-actions > button { min-height:42px; padding:0 16px; }
.tp-pick-bar .tp-danger { display:inline-flex; align-items:center; border:0; border-radius:14px; background:#d92d20; color:#fff; font:inherit; font-size:15px; font-weight:600; cursor:pointer; }
.tp-pick-bar .tp-danger:disabled { background:var(--tp-soft); color:var(--tp-muted); cursor:default; }
/* 分享給: who one of my trips is shared with, under its dates. */
.tp-card-shared { display:flex; align-items:center; gap:6px; margin-top:4px; color:var(--lb-link,var(--tp-blue)); font-size:13px; font-weight:600; }
.tp-card-shared svg { flex:none; }
/* 人頭貼: everyone else who can see a trip, overlapping at the end of its card's head. */
.tp-faces { display:flex; flex:none; align-items:center; margin-left:auto; padding-left:6px; }
.tp-faces .tp-face { display:grid; place-items:center; width:28px; height:28px; margin-left:-9px; border:2px solid var(--lb-bg,#fff); border-radius:50%; object-fit:cover; background:var(--lb-surface-2,#e3e8ee); color:var(--tp-ink); font-size:12px; font-weight:700; box-sizing:border-box; }
.tp-faces .tp-face:first-child { margin-left:0; }
.tp-faces .tp-face-more { background:var(--lb-surface-2,#e9edf2); color:var(--tp-ink); font-size:11px; }
.tp-card-head small + .tp-faces { margin-left:8px; }
/* 找朋友一起: the 泡泡 a trip is shared with, each with its own choice. */
.tp-bubble-sheet { display:grid; gap:14px; }
.tp-bubble-sheet h3 { margin:0 0 8px; font-size:15px; }
.tp-bubble-sheet section { display:grid; gap:8px; }
.tp-bubble-links { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.tp-bubble-link { display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; padding:10px 12px; border:1px solid var(--tp-line); border-radius:12px; }
.tp-bubble-link-name { display:grid; flex:1 1 140px; min-width:0; }
.tp-bubble-link-name small { color:var(--tp-muted); font-size:12px; }
.tp-sheet .tp-bubble-link select { width:auto; min-height:38px; padding:6px 10px; font-size:14px; }
.tp-bubble-link .tp-text-danger { margin:0; padding:6px 4px; }

/* A narrow card (four across on a computer) keeps the owner's name readable beside the faces: smaller faces, ✓ alone. */
.tp-card { container-type:inline-size; }
@container (max-width: 330px) {
  .tp-card-head { gap:8px; }
  .tp-card-head-name { min-width:3em; }
  .tp-card-head .sc-verified { padding:1px 5px; font-size:0; }
  .tp-card-head .sc-verified::before { font-size:11px; }
  .tp-faces .tp-face { width:24px; height:24px; margin-left:-9px; font-size:11px; }
}
