/* 旅人個人頁 (traveller-profile.mjs, travel-achievements.mjs): the approved profile design in the feed's own look. One
   column, edge to edge on a phone and 935px on a wide screen. Muted text is #5f6672 (4.5:1 on white); the accent is the
   site blue; the achievements' dark card is #0f1d33 with gold #ffd34d. */
.tp { --tp-ink:var(--lb-text,#101113); --tp-text:var(--lb-text,#24282e); --tp-muted:var(--lb-text-2,#5f6672); --tp-line:var(--lb-line,#eef0f3); --tp-edge:var(--lb-line,#e6eaef); --tp-soft:var(--lb-surface,#f4f6f9); --tp-accent:#006bff; --tp-navy:#0f1d33; --tp-gold:#ffd34d;
  width:100%; max-width:935px; margin:0 auto; padding:8px 0 48px; box-sizing:border-box; color:var(--tp-ink); }
/* Resets that any class below may override (no weight of their own). */
:where(.tp) *, :where(.tp) *::before, :where(.tp) *::after { box-sizing:border-box; }
:where(.tp) :where(h1, h2, h3, p, ul, ol) { margin:0; }
:where(.tp) :where(ul, ol) { padding:0; list-style:none; }

/* 足跡: the band at the top of a real traveller's page, always night-dark (the globe's own sky), edge to edge on a phone.
   The globe fills it; the kilometres sit low on the left over a fade, 徽章 and 重播 at the top. */
.fp { position:relative; height:clamp(300px, 86vw, 420px); overflow:hidden; background:radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 78% 12%, #fff6 50%, transparent 51%), radial-gradient(1.5px 1.5px at 64% 30%, #fff7 50%, transparent 51%), radial-gradient(1px 1px at 30% 8%, #fff5 50%, transparent 51%), radial-gradient(1px 1px at 90% 40%, #fff6 50%, transparent 51%), radial-gradient(circle at 50% 42%, #1d3a66 0, #0f2342 55%, #0a1830 100%); color:#fff; isolation:isolate; }
.fp-view { position:absolute; inset:0; }
.fp-stage { position:absolute; inset:0; }
.fp-ball { position:absolute; top:50%; left:50%; width:min(78%, 300px); aspect-ratio:1; border-radius:50%; background:radial-gradient(circle at 38% 32%, #2a4f84, #16345e 55%, #0b1a31); box-shadow:inset 0 0 0 2px #5f8fcf, 0 0 40px #5f8fcf55; transform:translate(-50%, -56%); }
.fp.is-drawn .fp-ball, .fp.is-still .fp-ball { display:none; }
/* 足跡卡 as a still picture (a phone saving data): its globe or city map, the left of the card, fills the band. */
.fp-still { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:left center; }
/* .fp-view > …: MapLibre's own stylesheet, loaded later, would make the map box relative (and 0 tall). */
.fp-view > .fp-map { position:absolute; inset:0; }
.fp-map .maplibregl-canvas { background:transparent; }
.fp-map .maplibregl-ctrl-attrib { font-size:10px; }
.fp-map .maplibregl-ctrl-bottom-right { top:54px; bottom:auto; }
.fp-map .maplibregl-marker-covered { visibility:hidden; }
.fp::after { content:""; position:absolute; inset:auto 0 0; z-index:1; height:52%; background:linear-gradient(to bottom, transparent, rgb(10 24 48 / 88%)); pointer-events:none; }
.fp-map { cursor:pointer; }
.fp-over { position:absolute; right:16px; bottom:16px; left:16px; z-index:3; display:grid; gap:2px; pointer-events:none; }
.fp-km { display:flex; align-items:baseline; gap:6px; }
.fp-km strong { color:#ffd34d; font-size:44px; font-weight:800; line-height:1.05; letter-spacing:-.01em; font-variant-numeric:tabular-nums; text-shadow:0 2px 12px rgb(0 0 0 / 45%); }
.fp-km span { color:#ffe9a8; font-size:15px; font-weight:700; }
.fp-km-one strong { font-size:28px; }
.fp-km-one strong + span { display:none; }
.fp-meta { color:#e3ebf6; font-size:14px; font-weight:600; line-height:1.5; }
.fp-note { color:#b7c6dc; font-size:11px; line-height:1.5; }
.fp-places { display:flex; gap:6px; margin-top:8px; overflow-x:auto; pointer-events:auto; scrollbar-width:none; }
.fp-places[hidden] { display:none; }
.fp-place { display:inline-flex; flex:none; align-items:center; gap:5px; min-height:36px; padding:0 12px; border:1px solid rgb(255 255 255 / 30%); border-radius:999px; background:rgb(10 24 48 / 55%); color:#fff; font:inherit; font-size:13px; font-weight:700; cursor:pointer; }
.fp-place[aria-pressed="true"] { border-color:#ffd34d; background:#ffd34d; color:#0f1d33; }
.fp-place:focus-visible, .fp-back:focus-visible { outline:2px solid #ffd34d; outline-offset:2px; }
.fp-replay, .fp-badges, .fp-back { position:absolute; top:12px; z-index:3; display:inline-flex; align-items:center; gap:5px; min-height:36px; padding:0 12px; border:1px solid rgb(255 255 255 / 22%); border-radius:999px; background:rgb(10 24 48 / 62%); color:#fff; font:inherit; font-size:13px; font-weight:700; text-decoration:none; cursor:pointer; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.fp-badges, .fp-back { left:12px; }
.fp-back[hidden], .fp-badges[hidden] { display:none; }
.fp-badges > svg:first-child { color:#ffd34d; }
.fp-replay { right:12px; top:auto; bottom:12px; }
.fp-replay[hidden] { display:none; }
.fp-replay:focus-visible, .fp-badges:focus-visible { outline:2px solid #ffd34d; outline-offset:2px; }
.fp-walker { display:block; width:28px; height:28px; filter:drop-shadow(0 0 6px rgb(255 211 77 / 85%)) drop-shadow(0 2px 3px rgb(0 0 0 / 55%)); pointer-events:none; }
.fp-plane { display:block; width:44px; height:44px; filter:drop-shadow(0 0 6px rgb(255 211 77 / 85%)) drop-shadow(0 2px 3px rgb(0 0 0 / 55%)); pointer-events:none; }
.fp-plane > svg { display:block; width:100%; height:100%; }
/* 分享足跡影片: a sheet with the video being made, upright like a story; the copy of the band that plays the journey sits
   behind the canvas at its own size (360 × 640), all but invisible. */
.fpv { width:min(100vw - 24px, 420px); max-height:calc(100dvh - 24px); margin:auto; padding:0; border:0; border-radius:22px; background:#0f1d33; color:#fff; }
.fpv::backdrop { background:rgb(0 0 0 / 60%); }
.fpv-body { display:grid; gap:12px; padding:14px 16px 16px; }
.fpv-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.fpv-head h2 { font-size:17px; font-weight:700; }
.fpv-close { display:grid; place-items:center; width:44px; height:44px; margin:-8px -8px -8px 0; padding:0; border:0; border-radius:50%; background:none; color:inherit; cursor:pointer; }
.fpv-stage { position:relative; width:min(100%, calc((100dvh - 260px) * 9 / 16)); aspect-ratio:9 / 16; margin:0 auto; overflow:hidden; border-radius:16px; background:#0a1830; }
.fpv-canvas { position:absolute; inset:0; width:100%; height:100%; }
.fpv-stage .fp-record { position:absolute; top:0; left:0; width:360px; height:640px; margin:0; border-radius:0; opacity:.01; pointer-events:none; }
.fp-record .fp-over, .fp-record .fp-replay, .fp-record .fp-badges, .fp-record .fp-back { display:none; }
.fpv-status { min-height:20px; color:#c9d6e8; font-size:13px; text-align:center; }
.fpv-status[data-state="making"]::before { content:""; display:inline-block; width:12px; height:12px; margin-right:6px; border:2px solid #ffd34d; border-right-color:transparent; border-radius:50%; vertical-align:-1px; animation:fpv-turn .8s linear infinite; }
@keyframes fpv-turn { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .fpv-status[data-state="making"]::before { animation:none; } }
.fpv-actions { display:grid; gap:8px; }
.fpv-share { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:48px; border:0; border-radius:999px; background:#ffd34d; color:#0f1d33; font:inherit; font-size:15px; font-weight:800; text-decoration:none; cursor:pointer; }
.fpv-share[hidden] { display:none; }
.fpv-link { min-height:44px; border:1px solid rgb(255 255 255 / 30%); border-radius:999px; background:none; color:#fff; font:inherit; font-size:14px; font-weight:700; cursor:pointer; }
.fpv-share:focus-visible, .fpv-link:focus-visible, .fpv-close:focus-visible { outline:2px solid #ffd34d; outline-offset:2px; }

/* Under 足跡: the photo beside the name, and the numbers in one quiet line under them (not three big columns). */
.tp.has-fp .tp-head { grid-template-columns:auto minmax(0, 1fr); column-gap:14px; row-gap:12px; padding-top:14px; }
.tp.has-fp .tp-top { display:contents; }
.tp.has-fp .tp-top > .community-avatar, .tp.has-fp .tp-story-ring { grid-column:1; grid-row:1; align-self:start; }
.tp.has-fp .tp-top > .community-avatar { width:72px !important; height:72px !important; font-size:28px !important; }
.tp.has-fp .tp-story-ring { width:80px; height:80px; }
.tp.has-fp .tp-story-ring > .community-avatar { width:70px !important; height:70px !important; font-size:26px !important; }
.tp.has-fp .tp-who { grid-column:2; grid-row:1; align-self:center; }
.tp.has-fp .tp-counts { grid-column:1 / -1; grid-row:2; display:flex; flex-wrap:wrap; gap:4px 18px; text-align:left; }
.tp.has-fp .tp-counts li { display:flex; align-items:baseline; gap:5px; min-height:0; }
.tp.has-fp .tp-counts strong { font-size:16px; }
.tp.has-fp .tp-counts small { font-size:13px; }
.tp.has-fp .tp-actions { grid-column:1 / -1; grid-row:3; }
@media (min-width:768px) {
  .fp { margin:0 16px; border-radius:22px; }
  .tp.has-fp .tp-head { grid-template-areas:none; padding:18px 16px 0; }
  .tp.has-fp .tp-top > .community-avatar { width:110px !important; height:110px !important; font-size:40px !important; }
  .tp.has-fp .tp-story-ring { width:120px; height:120px; }
  .tp.has-fp .tp-story-ring > .community-avatar { width:108px !important; height:108px !important; font-size:38px !important; }
}

/* Who they are */
/* ‹ and the handle above the profile, as on a photo app. */
.tp-bar { display:flex; align-items:center; gap:4px; min-height:48px; padding:0 12px 0 4px; }
.tp-back { display:grid; place-items:center; width:44px; height:44px; color:var(--lb-text,#101113); border-radius:50%; }
.tp-bar > strong { overflow:hidden; color:var(--lb-text,#101113); font-size:17px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.tp-head { display:grid; gap:12px; padding:4px 16px 0; }
.tp-top { display:flex; align-items:center; gap:18px; }
.tp-top > .community-avatar { flex:none; width:86px !important; height:86px !important; font-size:32px !important; box-shadow:0 0 0 1px var(--tp-edge); }
.tp-top > .community-avatar img { width:100%; height:100%; }
/* A live 限時動態: a ring around the photo (Profile.dc.html), and the photo opens it. */
.tp-story-ring { flex:none; display:grid; place-items:center; width:95px; height:95px; box-sizing:border-box; padding:2px; border:2.5px solid var(--lb-link,var(--tp-accent)); border-radius:50%; }
.tp-story-ring > .community-avatar { width:86px !important; height:86px !important; font-size:32px !important; }
.tp-story-ring > .community-avatar img { width:100%; height:100%; }
.tp-story-ring:focus-visible { outline:2px solid var(--lb-link,var(--tp-accent)); outline-offset:3px; }
.tp-story-ring.is-bubble { border-color:#1aa34a; }
/* 精選限時動態: round covers with a short title, in a row that scrolls sideways on its own. */
.tp-highlights { padding:18px 0 0; }
.tp-highlights h2 { padding:0 16px 10px; color:var(--tp-text); font-size:13px; font-weight:700; line-height:1.5; }
.tp-highlights ul { display:flex; gap:16px; padding:0 16px 2px; overflow-x:auto; scrollbar-width:none; }
.tp-highlights ul::-webkit-scrollbar { display:none; }
.tp-highlights li { flex:none; }
.tp-highlights a { display:grid; justify-items:center; gap:5px; width:70px; color:var(--tp-ink); text-decoration:none; }
.tp-highlight-cover { display:block; width:70px; height:70px; box-sizing:border-box; padding:2px; border:1.5px solid var(--lb-line,#c9d0d9); border-radius:50%; }
.tp-highlight-cover img { display:block; width:100%; height:100%; border-radius:50%; object-fit:cover; background:var(--tp-soft); }
.tp-highlight-title { max-width:70px; overflow:hidden; font-size:12px; line-height:1.4; text-overflow:ellipsis; white-space:nowrap; }
.tp-highlights a:focus-visible { outline:2px solid var(--lb-link,var(--tp-accent)); outline-offset:2px; border-radius:8px; }
.tp-counts { flex:1; display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); text-align:center; }
.tp-counts li { display:grid; align-content:center; gap:2px; min-height:48px; }
.tp-counts strong { font-size:18px; font-weight:700; line-height:1.3; }
.tp-counts small { color:var(--tp-muted); font-size:12px; line-height:1.4; }
.tp-who { display:grid; gap:4px; min-width:0; }
.tp-who h1 { display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:17px; font-weight:700; line-height:1.45; overflow-wrap:anywhere; }
.tp-ai { flex:none; padding:1px 8px; border-radius:999px; background:var(--lb-strong,var(--tp-ink)); color:#fff; font-size:11px; font-weight:500; line-height:17px; }
.tp-ai-small { margin-left:6px; padding:0 6px; font-size:10px; line-height:15px; vertical-align:1px; }
.tp-handle { color:var(--tp-muted); font-size:13px; line-height:1.4; }
.tp-bio { color:var(--tp-text); font-size:14px; line-height:1.6; white-space:pre-line; overflow-wrap:anywhere; }
.tp-ai-note { color:var(--tp-muted); font-size:12px; line-height:1.5; }
.tp-who .work-social { margin:2px 0 0; }
.tp-been { display:flex; align-items:center; gap:5px; margin-top:2px; color:var(--tp-text); font-size:13px; line-height:1.6; }
.tp-been > svg { flex:none; color:var(--lb-link,var(--tp-accent)); }
.tp-note { color:var(--tp-muted); font-size:12px; line-height:1.5; }
/* 追蹤／分享個人頁, or on one's own page 編輯個人資料／我的創作／分享個人頁: equal buttons in one row. */
.tp-actions { display:flex; gap:8px; }
.tp-actions .fl-actions, .tp-actions .tp-self { display:contents; }
.tp-actions .tp-self[hidden], .tp-actions .fl-button[hidden] { display:none; }
.tp-actions .fl-button { flex:1 1 0; min-width:0; min-height:44px; padding:0 10px; font-size:14px; white-space:nowrap; }
.tp-share { display:inline-flex; gap:6px; }
.tp-share.is-copied { color:var(--lb-link,var(--tp-accent)); }
/* 推薦追蹤: a square person button at the end of the row, and the strip under the header; both go with nobody left. */
.tp-actions .tp-suggest-toggle { flex:none; width:44px; padding:0; }
.tp-suggest-toggle[aria-expanded="true"] { background:var(--lb-surface-2,#e3e7ed); }
.tp:has([data-follow-suggest][hidden]) .tp-suggest-toggle { display:none; }
.tp-suggest { padding:10px 8px 0; }
.tp-suggest[hidden] { display:none; }

/* 旅行成就 card */
.ta-teaser { position:relative; display:flex; align-items:center; gap:14px; margin:18px 16px 0; padding:14px 16px; border-radius:18px; background:var(--tp-navy); color:#fff; }
.ta-mini { flex:none; width:88px; height:88px; }
.ta-teaser > div { flex:1; min-width:0; display:grid; gap:4px; }
.ta-teaser strong { font-size:16px; line-height:1.45; }
.ta-teaser small { color:#c9d6e8; font-size:13px; line-height:1.6; }
.ta-teaser a { justify-self:start; display:inline-flex; align-items:center; gap:2px; min-height:44px; margin:-6px 0 -12px; color:var(--tp-gold); font-size:13px; font-weight:700; text-decoration:none; }
.ta-teaser a::after { content:""; position:absolute; inset:0; border-radius:inherit; }
.ta-teaser a:focus-visible { outline:none; }
.ta-teaser:has(a:focus-visible) { outline:3px solid var(--tp-gold); outline-offset:2px; }

/* Tabs */
.tp-tabs { display:grid; grid-auto-columns:minmax(0, 1fr); grid-auto-flow:column; margin-top:18px; border-bottom:1px solid var(--tp-line); }
.tp-tabs a { display:flex; align-items:center; justify-content:center; gap:4px; min-height:44px; margin-bottom:-1px; padding:0 2px; border-bottom:2px solid transparent; color:var(--tp-muted); font-size:13px; font-weight:500; text-decoration:none; white-space:nowrap; }
.tp-tabs a > svg { flex:none; }
.tp-tabs a[aria-selected="true"] { border-bottom-color:var(--lb-link,var(--tp-accent)); color:var(--lb-link,var(--tp-accent)); font-weight:700; }
.tp-tabs a:hover { color:var(--tp-ink); }
.tp-tabs a[aria-selected="true"]:hover { color:var(--lb-link,var(--tp-accent)); }
/* 被標記 on a phone: the icon alone in a narrow last column, its name still read out. */
@media (max-width:559px) {
  .tp-tabs.has-tagged { grid-template-columns:repeat(4, minmax(0, 1fr)) 44px; }
  .tp-tabs.has-tagged [data-tp-tab="tagged"] span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
}
.tp-panel[hidden] { display:none; }
.tp-panel { min-height:240px; }

/* 照片影片: three across, 4:5, as on a photo app; the boxes keep their size before the pictures load. */
.tp-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:2px; padding-top:2px; }
.tp-tile > a { position:relative; display:block; aspect-ratio:4 / 5; overflow:hidden; background:var(--lb-surface,#e9edf2); color:var(--tp-muted); text-decoration:none; }
.tp-tile img { display:block; width:100%; height:100%; object-fit:cover; }
.tp-tile-mark { position:absolute; top:5px; right:5px; display:grid; place-items:center; width:22px; height:22px; border-radius:50%; background:rgb(16 17 19 / 60%); color:#fff; }
.tp-tile .ai-mark { position:absolute; top:5px; left:5px; right:auto; bottom:auto; padding:1px 6px; border-radius:999px; background:var(--lb-strong,var(--tp-ink)); color:#fff; font-size:10px; font-weight:600; line-height:15px; }
.tp-tile-place { position:absolute; inset:auto 0 0; padding:22px 8px 6px; overflow:hidden; background:linear-gradient(rgb(16 17 19 / 0), rgb(16 17 19 / 62%) 45%, rgb(16 17 19 / 86%)); color:#fff; font-size:11px; font-weight:500; line-height:1.4; text-overflow:ellipsis; white-space:nowrap; }
/* 貼文只給泡泡看: a green mark on the tile, for those who may see it (post-audience.mjs). */
.tp-tile-bubble { position:absolute; top:5px; left:5px; max-width:calc(100% - 38px); overflow:hidden; padding:1px 6px; border-radius:999px; background:#13853a; color:#fff; font-size:10px; font-weight:700; line-height:15px; text-overflow:ellipsis; white-space:nowrap; }
.tp-tile .ai-mark ~ .tp-tile-bubble { top:26px; }
[data-post-bubble] .sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.tp-tile-empty { display:grid; place-items:center; align-content:center; gap:6px; height:100%; padding:8px; text-align:center; }
.tp-tile-empty > span { display:-webkit-box; overflow:hidden; color:var(--tp-text); font-size:11px; line-height:1.4; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; }
.tp-more { display:flex; align-items:center; justify-content:center; width:fit-content; min-height:44px; margin:20px auto 0; padding:0 24px; border:1px solid var(--lb-line,#dfe6f0); border-radius:999px; color:var(--lb-link,var(--tp-accent)); font-size:14px; font-weight:600; text-decoration:none; }
.tp-more[hidden] { display:none; }
.tp-empty { display:grid; justify-items:center; gap:10px; padding:48px 24px; color:var(--tp-muted); font-size:14px; line-height:1.6; text-align:center; }
.tp-empty > svg { color:var(--lb-text-2,#9aa6b4); }

/* Section heads inside a tab */
.tp-section-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:18px 16px 0; }
.tp-section-head h2 { font-size:17px; font-weight:700; line-height:1.4; }
.tp-section-head small { flex:none; color:var(--tp-muted); font-size:12px; }
.tp-lead { padding:4px 16px 0; color:var(--tp-muted); font-size:13px; line-height:1.5; }

/* 行程 */
.tp-trips { display:grid; gap:10px; padding:12px 16px 0; }
.tp-trip { display:flex; align-items:center; gap:12px; padding:10px; border:1px solid var(--tp-edge); border-radius:16px; background:var(--lb-bg,#fff); }
.tp-trip-cover { position:relative; flex:none; display:grid; place-items:center; width:64px; height:64px; overflow:hidden; border-radius:12px; background:var(--lb-surface,#e9edf2); color:var(--tp-muted); }
.tp-trip-cover img { width:100%; height:100%; object-fit:cover; }
.tp-trip-cover .ai-mark { position:absolute; left:3px; top:3px; right:auto; bottom:auto; padding:0 5px; border-radius:999px; background:var(--lb-strong,var(--tp-ink)); color:#fff; font-size:9px; line-height:14px; }
.tp-trip-text { flex:1; min-width:0; display:grid; gap:2px; }
.tp-trip-title { display:-webkit-box; overflow:hidden; color:var(--tp-ink); font-size:15px; font-weight:700; line-height:1.4; text-decoration:none; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; }
.tp-trip-title:hover { text-decoration:underline; }
.tp-trip-text small { color:var(--tp-muted); font-size:12px; line-height:1.5; }
.tp-trip-copy { flex:none; display:flex; align-items:center; min-height:44px; padding:0 14px; border-radius:12px; background:var(--tp-accent); color:#fff; font-size:13px; font-weight:700; text-decoration:none; white-space:nowrap; }
.tp-trip-copy:hover { background:#005bdc; }

/* 旅行紀錄: a line down the left with a dot per month and place */
.tp-timeline { position:relative; display:grid; gap:4px; margin:12px 16px 0; }
.tp-timeline::before { content:""; position:absolute; top:12px; bottom:12px; left:60px; width:2px; border-radius:2px; background:var(--tp-line); }
.tp-group details > summary { position:relative; display:flex; align-items:center; gap:10px; min-height:72px; padding:6px 4px 6px 0; list-style:none; cursor:pointer; }
.tp-group summary::-webkit-details-marker { display:none; }
.tp-month { flex:none; width:48px; color:var(--tp-muted); font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; }
.tp-dot { flex:none; position:relative; z-index:1; width:10px; height:10px; margin:0 2px 0 -1px; border:2px solid var(--lb-bg,#fff); border-radius:50%; background:var(--tp-accent); box-shadow:0 0 0 1px var(--lb-link,var(--tp-accent)); }
.tp-group summary > img, .tp-group-empty { flex:none; width:56px; height:56px; border-radius:12px; object-fit:cover; background:var(--lb-surface,#e9edf2); }
.tp-group-empty { display:grid; place-items:center; color:var(--tp-muted); }
.tp-group-text { flex:1; min-width:0; display:grid; gap:2px; }
.tp-group-text strong { overflow:hidden; font-size:15px; font-weight:700; line-height:1.4; text-overflow:ellipsis; white-space:nowrap; }
.tp-group-text small { color:var(--tp-muted); font-size:12px; line-height:1.5; }
.tp-group summary > .ag-icon { flex:none; color:var(--tp-muted); transition:transform .2s; }
.tp-group details[open] > summary > .ag-icon { transform:rotate(180deg); }
.tp-group-posts { display:grid; gap:2px; margin:0 0 8px 74px; }
.tp-group-posts a { display:flex; align-items:center; gap:10px; min-height:56px; padding:4px 0; color:var(--tp-ink); text-decoration:none; }
.tp-group-posts a:hover strong { text-decoration:underline; }
.tp-group-posts img, .tp-row-empty { flex:none; width:48px; height:48px; border-radius:10px; object-fit:cover; background:var(--lb-surface,#e9edf2); }
.tp-row-empty { display:grid; place-items:center; color:var(--tp-muted); }
.tp-group-posts a > span { min-width:0; display:grid; gap:1px; }
.tp-group-posts strong { overflow:hidden; font-size:14px; font-weight:600; line-height:1.4; text-overflow:ellipsis; white-space:nowrap; }
.tp-group-posts small { overflow:hidden; color:var(--tp-muted); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.tp-extra { margin-top:12px; }
.tp-extra .collection-map-grid, .tp-extra .collection-story-grid { margin:12px 16px 0; }

/* 地圖與成就 */
.ta { display:grid; gap:14px; padding:14px 16px 0; }
.ta-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.ta-head h2 { font-size:17px; font-weight:700; line-height:1.4; }
.ta-share-all { display:inline-flex; align-items:center; gap:5px; min-height:44px; padding:0 14px; border:0; border-radius:999px; background:var(--tp-soft); color:var(--tp-ink); font:inherit; font-size:13px; font-weight:700; cursor:pointer; }
.ta-share-all:hover, .ta-share-all.is-copied { color:var(--lb-link,var(--tp-accent)); }
.ta-world { display:grid; gap:14px; }
.ta-globe { margin:0; padding:14px 16px 12px; border-radius:20px; background:var(--tp-navy); color:#fff; }
.ta-globe-view { position:relative; width:min(100%, 360px); aspect-ratio:1; margin:0 auto; }
.ta-globe-stage { position:absolute; inset:0; }
/* .ta-globe-view > …: MapLibre's own stylesheet, loaded later, would make the map box relative (and 0 tall). */
.ta-globe-view > .ta-globe-map { position:absolute; inset:0; overflow:hidden; border-radius:16px; }
.ta-globe-map .maplibregl-canvas { background:radial-gradient(circle at 50% 45%, #1d3a66 0, #0f2342 55%, #0a1830 100%); }
.ta-globe-map .maplibregl-canvas:focus-visible { outline:3px solid var(--tp-gold); outline-offset:-3px; }
.ta-globe-map .maplibregl-ctrl-attrib { font-size:10px; }
.ta-flag { display:block; width:24px; height:30px; padding:0; border:0; background:none; cursor:pointer; filter:drop-shadow(0 1px 2px rgb(0 0 0 / 45%)); }
/* A flag on the far side of the globe is hidden, not faded through it. */
.ta-globe-map .maplibregl-marker-covered { visibility:hidden; pointer-events:none; }
.ta-flag:focus-visible { outline:2px solid var(--tp-gold); outline-offset:2px; border-radius:4px; }
.ta-place { position:absolute; right:8px; bottom:8px; left:8px; z-index:2; max-height:calc(100% - 16px); overflow:auto; padding:10px 12px 12px; border-radius:14px; background:var(--lb-elevated,#fff); color:var(--lb-text,#101113); box-shadow:0 8px 24px rgb(0 0 0 / 35%); }
.ta-place[hidden] { display:none; }
.ta-place-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.ta-place-head strong { font-size:15px; line-height:22px; }
.ta-place-close { flex:none; width:44px; height:44px; margin:-10px -10px -10px 0; padding:0; border:0; background:none; color:inherit; font-size:22px; line-height:1; cursor:pointer; }
.ta-place ul { display:grid; gap:6px; margin:6px 0 8px; padding:0; list-style:none; }
.ta-place li a { display:flex; align-items:center; gap:10px; min-height:44px; color:inherit; font-size:14px; text-decoration:none; }
.ta-place li img { flex:none; width:44px; height:44px; border-radius:8px; object-fit:cover; }
.ta-place li span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ta-place-more { display:inline-flex; align-items:center; min-height:40px; padding:0 14px; border-radius:999px; background:var(--lb-link,#0866ff); color:#fff; font-size:13px; font-weight:700; text-decoration:none; }
.ta-globe-ball { position:absolute; inset:2%; border-radius:50%; background:radial-gradient(circle at 38% 32%, #2a4f84, #16345e 55%, #0b1a31); box-shadow:inset 0 0 0 2px var(--lb-link,#5f8fcf); }
.ta-globe.is-drawn .ta-globe-ball { display:none; }
.ta-globe figcaption { margin-top:8px; color:#c9d6e8; font-size:12px; line-height:1.5; text-align:center; }
.ta-world-side { display:grid; gap:12px; align-content:start; }
.ta-countries { display:flex; flex-wrap:wrap; gap:8px; }
.ta-countries li { display:inline-flex; align-items:center; gap:7px; padding:6px 12px 6px 9px; border-radius:999px; background:var(--tp-soft); font-size:13px; font-weight:600; line-height:18px; }
.ta-span { display:flex; align-items:center; gap:6px; color:var(--tp-muted); font-size:13px; line-height:1.5; }
.ta-figures { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; text-align:center; }
.ta-figures li { display:grid; gap:1px; padding:10px 6px; border-radius:14px; background:var(--tp-soft); }
.ta-figures strong { font-size:22px; font-weight:700; line-height:1.35; font-variant-numeric:tabular-nums; }
.ta-figures small { color:var(--tp-muted); font-size:12px; line-height:1.5; }
.ta-note { color:var(--tp-muted); font-size:12px; line-height:1.5; }
.ta-sub { display:flex; align-items:center; gap:6px; margin-top:6px; font-size:17px; font-weight:700; line-height:1.4; }
.ta-sub > svg { color:var(--lb-amber-text,#8a5a00); }
.ta-badges { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.ta-badge { display:grid; align-content:start; gap:2px; padding:8px 8px 12px 12px; border-radius:16px; background:var(--tp-soft); color:var(--tp-muted); }
.ta-badge.is-earned { border:1px solid var(--tp-edge); background:var(--lb-bg,#fff); color:var(--tp-ink); }
.ta-badge-top { display:flex; align-items:center; justify-content:space-between; min-height:44px; }
.ta-badge-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:var(--lb-surface,#e6eaef); color:var(--tp-muted); }
.ta-badge.is-earned .ta-badge-icon { background:var(--lb-amber-soft,#fff4d6); color:var(--lb-amber-text,#8a5a00); }
/* The pill is 30px tall; its margins make the target 44px. */
.ta-badge-share { display:inline-flex; align-items:center; gap:4px; height:30px; margin:7px 0; padding:0 10px; border:1px solid var(--tp-edge); border-radius:999px; background:var(--lb-bg,#fff); color:var(--tp-ink); font:inherit; font-size:12px; font-weight:500; cursor:pointer; }
.ta-badge-share::after { content:""; position:absolute; inset:-7px -4px; }
.ta-badge-share { position:relative; }
.ta-badge-share:hover, .ta-badge-share.is-copied { border-color:var(--lb-link,var(--tp-accent)); color:var(--lb-link,var(--tp-accent)); }
.ta-badge-count { padding-right:4px; font-size:13px; font-weight:700; font-variant-numeric:tabular-nums; }
.ta-badge strong { margin-top:4px; font-size:15px; font-weight:700; line-height:1.4; }
.ta-badge small { font-size:12px; line-height:1.5; color:var(--tp-muted); }
.ta-progress { display:block; height:6px; margin-top:6px; overflow:hidden; border-radius:999px; background:var(--lb-surface-2,#dfe4ea); }
.ta-progress > span { display:block; height:100%; border-radius:inherit; background:#6b7480; }

/* A wide screen: the header beside a larger photo, a roomier grid, the globe beside its numbers. */
@media (min-width:768px) {
  .tp { padding-top:28px; }
  .tp-head { grid-template-columns:150px minmax(0, 1fr); grid-template-areas:"avatar counts" "avatar who" "avatar actions"; column-gap:48px; row-gap:10px; padding:0 24px; }
  .tp-top { display:contents; }
  .tp-top > .community-avatar { grid-area:avatar; align-self:start; width:150px !important; height:150px !important; font-size:52px !important; }
  .tp-top > .tp-story-ring { grid-area:avatar; align-self:start; width:162px; height:162px; padding:3px; }
  .tp-story-ring > .community-avatar { width:150px !important; height:150px !important; font-size:52px !important; }
  .tp-highlights { padding:28px 24px 0; }
  .tp-highlights h2, .tp-highlights ul { padding-left:0; padding-right:0; }
  .tp-counts { grid-area:counts; display:flex; gap:32px; text-align:left; }
  .tp-counts li { display:flex; align-items:baseline; gap:6px; min-height:0; }
  .tp-counts small { font-size:14px; color:var(--tp-text); }
  .tp-who { grid-area:who; }
  .tp-who h1 { font-size:20px; }
  .tp-actions { grid-area:actions; max-width:420px; }
  .ta-teaser { margin:28px 24px 0; }
  .tp-tabs { margin-top:28px; }
  .tp-grid { gap:4px; padding-top:4px; }
  .tp-section-head, .tp-lead { padding-left:24px; padding-right:24px; }
  .tp-trips { grid-template-columns:repeat(2, minmax(0, 1fr)); padding:12px 24px 0; }
  .tp-timeline, .tp-extra .collection-map-grid, .tp-extra .collection-story-grid { margin-left:24px; margin-right:24px; }
  .ta { padding:20px 24px 0; }
  .ta-world { grid-template-columns:minmax(0, 340px) minmax(0, 1fr); align-items:start; }
  .ta-badges { grid-template-columns:repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion:reduce) { .tp *, .tp *::before, .tp *::after { transition:none !important; animation:none !important; } }

.tp-shops{margin:12px 18px 18px}.tp-shops h2{font-size:14px;margin:0 0 8px}.tp-shop{display:flex;align-items:center;gap:12px;padding:8px 0;color:inherit;text-decoration:none}.tp-shop img{width:56px;height:56px;object-fit:cover;border-radius:8px}.tp-shop span{display:grid;gap:4px;min-width:0}.tp-shop strong{font-size:14px;overflow-wrap:anywhere}.tp-shop small{font-size:12px;opacity:.65}

.tp-filmed{margin:20px auto;max-width:920px;padding:0 16px}.tp-filmed h2{font-size:18px}.tp-filmed ul{display:flex;gap:14px;overflow:auto;list-style:none;padding:0 0 12px}.tp-filmed li{flex:0 0 250px;border:1px solid #8883;padding:14px;border-radius:14px;overflow-wrap:anywhere}.tp-filmed li>a{display:block}.tp-filmed li img{width:100%;height:140px;object-fit:cover;border-radius:8px}.tp-filmed p{white-space:pre-wrap;font-size:13px}

.tp-filmed-map .ta-globe-view{width:min(100%,280px)}

.fp-view.ta-globe-view { width:100%; height:100%; aspect-ratio:auto; margin:0; }
.fp-view > .ta-globe-map { border-radius:0; }
.fp-view .ta-place { bottom:112px; }
.ta-flag.ta-photo-pin { width:28px; height:28px; padding:1px; border:1px solid rgb(255 255 255 / .8); border-radius:50%; background:#fff; box-shadow:0 2px 8px rgb(0 0 0 / .25); overflow:hidden; filter:none; }
.ta-photo-pin img { display:block; width:100%; height:100%; min-width:0; min-height:0; border-radius:50%; object-fit:cover; }
.fp-share { position:absolute; right:12px; top:12px; z-index:3; display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 12px; border:1px solid rgb(255 255 255 / .35); border-radius:999px; background:rgb(10 24 48 / .68); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); color:#fff; font:inherit; font-size:13px; font-weight:650; cursor:pointer; }
.fp-record .fp-share { display:none; }
.ta-place { border:1px solid var(--cm-glass-border,rgb(255 255 255 / .3)); background:var(--cm-glass-bg,rgb(255 255 255 / .72)); backdrop-filter:blur(24px) saturate(150%); -webkit-backdrop-filter:blur(24px) saturate(150%); }
html[data-theme="dark"] .ta-place { background:rgb(25 29 37 / .72); }

.fp-enable { position:absolute; top:56px; right:12px; z-index:3; min-height:44px; padding:0 12px; border:1px solid rgb(255 255 255 / .3); border-radius:999px; color:#fff; background:rgb(10 24 48 / .7); font:inherit; font-size:13px; cursor:pointer; }
