:root {
  --ink: #1C3235;      /* 深青綠：導覽列、主要文字 */
  --brick: #C2502F;    /* 磚紅：城市圖釘、主要按鈕 */
  --coral: #F08A6C;    /* 淺珊瑚：導覽列上的按鈕 */
  --bg: #F4F6F5;       /* 淺灰綠背景 */
  --visited: #F7C9B9;  /* 去過的國家 */
  --visited-line: #E0846A;
  --sea: #DCEAEC;      /* 海洋 */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}

.topbar {
  background: var(--ink);
  color: #fff;
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.brand { font-size: 18px; font-weight: 700; color: #fff; text-decoration: none; }
.spacer { flex: 1; }
.who { font-size: 14px; opacity: .85; margin-right: 12px; }

.page { padding: 16px; max-width: 1200px; margin: 0 auto; }

h1 { font-size: 22px; }

/* 按鈕：至少 44px 高，手指好按 */
.btn-nav, .btn-primary {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btn-nav { background: var(--coral); color: var(--ink); }
.btn-primary { background: var(--brick); color: #fff; width: 100%; }
.btn-primary:disabled { opacity: .6; }
[hidden] { display: none !important; }

.card { background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.login-card { max-width: 380px; margin: 40px auto; display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { margin: 0 0 4px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.login-card input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #c9d3d2;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;   /* 16px 以上，iPhone 點輸入框時才不會自動放大 */
}
.error { color: var(--brick); margin: 0; }

.topbar { gap: 8px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }

/* iPhone 從主畫面全螢幕打開時：導覽列延伸到最上面（狀態列底下），內容避開瀏海和圓角 */
.topbar {
  padding-top: max(6px, env(safe-area-inset-top));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
.page {
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }

/* 導覽列搜尋框；手機上只顯示 🔍，按了進入搜尋頁 */
.nav-search { display: flex; align-items: center; }
.nav-search input {
  width: 220px; min-height: 40px; padding: 0 12px; border-radius: 20px; border: 0;
  background: rgba(255,255,255,.14); color: #fff; font: inherit; font-size: 16px;
}
.nav-search input::placeholder { color: rgba(255,255,255,.65); }
.nav-search input:focus { outline: 2px solid var(--coral); background: rgba(255,255,255,.22); }
.nav-search-btn { display: none; }
@media (max-width: 860px) {
  .nav-search input { display: none; }
  .nav-search-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border-radius: 10px; border: 1px solid rgba(255,255,255,.4); text-decoration: none; font-size: 18px;
  }
}

/* 搜尋頁 */
.search-form { display: flex; gap: 8px; margin-bottom: 16px; }
.search-form .btn-primary { width: auto; padding: 0 22px; }
.search-result { display: flex; gap: 14px; margin-bottom: 12px; padding: 14px; }
.search-result .sr-cover { width: 96px; height: 96px; flex: none; border-radius: 10px; object-fit: cover; background: #e6ecea; }
.search-result .sr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sr-title { font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; }
.sr-title:hover { text-decoration: underline; }
.sr-hits { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sr-hits a {
  display: block; padding: 8px 10px; border-radius: 8px; background: var(--bg); color: var(--ink);
  text-decoration: none; font-size: 15px; line-height: 1.5;
}
.sr-hits a:hover { background: #e9eeec; }
.sr-snippet { display: block; color: #4d6466; font-size: 14px; }
mark { background: #FBE0D5; color: inherit; border-radius: 3px; padding: 0 1px; }
@media (max-width: 520px) {
  .search-result .sr-cover { width: 64px; height: 64px; }
}
@media (max-width: 520px) { .who { display: none; } }

/* ---------- 一般版面 ---------- */

.narrow { max-width: 760px; }
.back { display: inline-block; color: var(--ink); text-decoration: none; padding: 10px 0; font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.stack h1, .stack h2 { margin: 0; }
h2 { font-size: 18px; }
.hint { color: #5d6f71; font-size: 14px; margin: 0; }
.hint.warn, .warn { color: #a3541d; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row .field { flex: 1 1 150px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.field input {
  min-height: 44px; padding: 0 12px; border: 1px solid #c9d3d2; border-radius: 10px;
  font: inherit; font-size: 16px; background: #fff; color: var(--ink); width: 100%;
}
.btn-text {
  min-height: 44px; background: none; border: 0; font: inherit; color: var(--ink);
  cursor: pointer; text-decoration: underline;
}
.btn-text.danger { color: var(--brick); }

.draft-list { list-style: none; margin: 0; padding: 0; }
.draft-list li a {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 4px; min-height: 44px;
  color: var(--ink); text-decoration: none; border-top: 1px solid #e6ecea;
}
.draft-list li:first-child a { border-top: 0; }

.progress { height: 10px; background: #e6ecea; border-radius: 5px; overflow: hidden; }
#progress-bar { height: 100%; width: 0; background: var(--brick); transition: width .4s; }
#progress-text { margin: 0; font-weight: 600; }
.summary p { margin: 4px 0; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.media-item { margin: 0; }
.media-item a { position: relative; display: block; }
.media-item img, .thumb-missing {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #e6ecea; display: block;
}
.thumb-missing { display: flex; align-items: center; justify-content: center; font-size: 12px; color: #5d6f71; }
.play {
  position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; padding-left: 3px;
}
.media-item figcaption { font-size: 12px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tag { background: #eef2f1; border-radius: 6px; padding: 1px 6px; color: #5d6f71; }
.tag.warn { background: #fbe7dc; color: #a3541d; }

/* ---------- 影片播放連結 ---------- */

.btn-secondary {
  min-height: 44px; padding: 0 18px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
  background: #fff; color: var(--ink); border: 1.5px solid var(--ink);
}
.howto summary { cursor: pointer; min-height: 32px; font-weight: 600; }
.howto ol { margin: 8px 0 0; padding-left: 22px; line-height: 1.8; }
.video-count { margin: 0; font-weight: 700; color: var(--brick); }
.video-head { display: flex; gap: 12px; align-items: center; }
.video-thumb { width: 88px; height: 88px; flex: none; border-radius: 8px; object-fit: cover; background: #e6ecea; }
.video-name { word-break: break-all; }
.video-set, .video-unset { display: flex; flex-direction: column; gap: 10px; }
.video-set[hidden], .video-unset[hidden] { display: none; }
.ok-text { margin: 0; color: #2d7a4b; font-weight: 600; }
.video-player { width: 100%; border-radius: 8px; background: #000; max-height: 60vh; }

/* ---------- 分站 ---------- */

.mini-map { height: 280px; border-radius: 10px; background: var(--sea); }
.leaflet-container .leaflet-control-attribution { font-size: 10px; line-height: 1.4; }
.route { margin: 0; font-weight: 700; font-size: 17px; }
.stop-card { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; padding: 12px; }
.stop-main { display: flex; align-items: center; gap: 12px; }
.stop-main .stop-info { flex: 1; }
.stop-order { display: flex; flex-direction: column; gap: 6px; flex: none; }
.btn-icon {
  width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid #d5dedd; background: #fff;
  color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer;
}
.btn-icon:disabled { opacity: .3; cursor: default; }
.stop-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-small {
  min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1.5px solid #d5dedd; background: #fff;
  color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
.btn-small.danger { color: var(--brick); border-color: #ecc3b5; }
.btn-small:disabled { opacity: .5; }
.stop-panel { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #e6ecea; padding-top: 12px; }
.stop-panel .row .btn-primary { width: auto; flex: 1; }
.field select {
  min-height: 44px; padding: 0 10px; border: 1px solid #c9d3d2; border-radius: 10px;
  font: inherit; font-size: 16px; background: #fff; color: var(--ink);
}
.search-row { display: flex; gap: 8px; }
.text-input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid #c9d3d2; border-radius: 10px;
  font: inherit; font-size: 16px; background: #fff; color: var(--ink);
}
.place-results { list-style: none; margin: 0; padding: 0; }
.place-results:empty { display: none; }
.place-results li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #e6ecea; }
.place-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.place-text .hint { font-size: 12px; overflow-wrap: anywhere; }
.link-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.pop .btn-primary { margin-top: 10px; }
.mini-map { cursor: crosshair; }
.stop-num {
  flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brick); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.stop-cover { flex: none; width: 72px; height: 72px; border-radius: 8px; object-fit: cover; background: #e6ecea; }
.stop-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stop-name { font-size: 17px; }
.choice {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1.5px solid #d5dedd;
  border-radius: 10px; cursor: pointer; min-height: 44px;
}
.choice:has(input:checked) { border-color: var(--brick); background: #fdf3ef; }
.choice input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brick); }

/* 圖釘 */
.pin { background: none; border: 0; }
.pin-dot {
  display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--brick);
  border: 2.5px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.pin-num {
  display: flex; width: 26px; height: 26px; border-radius: 50%; background: var(--brick); color: #fff;
  border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; box-sizing: border-box;
}

.pin-num.active { background: var(--ink); transform: scale(1.2); }
/* 停靠港：白底船錨，順序數字放右上角 */
.pin-port {
  position: relative; display: flex; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.4);
  align-items: center; justify-content: center; font-size: 14px; line-height: 1; box-sizing: border-box;
}
.pin-port i {
  position: absolute; top: -7px; right: -9px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px;
  background: var(--ink); color: #fff; font-style: normal; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
}
.pin-port.active { background: var(--ink); color: #fff; border-color: #fff; transform: scale(1.2); }
.pin-port.active i { background: var(--brick); }

/* ---------- 旅行頁面 ---------- */

.trip-page { max-width: 1200px; }
.hero {
  position: relative; min-height: 220px; border-radius: 14px; margin-bottom: 16px; overflow: hidden;
  background: var(--ink) center / cover no-repeat; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; padding: 16px 20px;
}
@media (min-width: 768px) { .hero { min-height: 320px; } }
.hero-back {
  align-self: flex-start; color: #fff; text-decoration: none; font-weight: 600;
  background: rgba(0,0,0,.35); border-radius: 10px; padding: 0 14px; min-height: 44px;
  display: inline-flex; align-items: center;
}
.hero-text h1 { margin: 0 0 4px; font-size: 26px; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.hero-text p { margin: 0; font-size: 15px; opacity: .95; text-shadow: 0 1px 3px rgba(0,0,0,.5); }

.trip-layout { display: flex; flex-direction: column; gap: 16px; }
.trip-layout .stack { margin-bottom: 0; }
@media (min-width: 900px) {
  /* 電腦和 iPad 橫放：左邊路線圖，右邊照片 */
  .trip-layout { flex-direction: row; align-items: flex-start; }
  .trip-side { width: 380px; flex: none; position: sticky; top: 16px; }
  .trip-side .mini-map { height: 340px; }
  .trip-main { flex: 1; min-width: 0; }
}

.stop-tabs { position: relative; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
@media (min-width: 900px) { .stop-tabs { flex-wrap: wrap; overflow: visible; } }
.stop-tab {
  flex: none; min-height: 44px; padding: 0 14px 0 8px; border-radius: 22px; border: 1.5px solid #d5dedd;
  background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.tab-num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--brick); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}
.stop-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.stop-tab.active .tab-num { background: #fff; color: var(--ink); }

.stop-title { font-size: 22px; margin: 0 0 4px; }
.stop-note { white-space: pre-wrap; line-height: 1.8; font-size: 16px; }
.media-tile {
  position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 8px; overflow: hidden;
}
.media-tile img, .media-tile .thumb-missing {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #e6ecea;
}
.stop-nav { display: flex; justify-content: space-between; gap: 12px; }
.stop-nav button:disabled { opacity: .35; cursor: default; }

/* 旅行頁面：管理功能 */
.stop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stop-head .btn-small { flex: none; }
.note-btn { align-self: flex-start; }
.note-editor { margin: 0; }
.note-editor textarea {
  width: 100%; padding: 12px; border: 1px solid #c9d3d2; border-radius: 10px; resize: vertical;
  font: inherit; font-size: 16px; line-height: 1.7; color: var(--ink); min-height: 180px;
}
.note-editor .row .btn-primary { width: auto; flex: 1; }
.stop-tab.unassigned { border-style: dashed; padding-left: 14px; }

.media-tile .tile-tags { position: absolute; left: 4px; bottom: 4px; display: flex; flex-wrap: wrap; gap: 3px; }
.media-tile .tag { font-size: 11px; }
.tag.cover { background: var(--brick); color: #fff; }
.media-tile.is-hidden img { opacity: .4; }
.managing .media-tile .check {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid #fff; background: rgba(0,0,0,.25); box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.managing .media-tile.selected { outline: 3px solid var(--brick); outline-offset: -3px; }
.managing .media-tile.selected .check { background: var(--brick); }
.managing .media-tile.selected .check::after {
  content: "✓"; color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; height: 100%;
}

.manage-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500; background: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,.15); padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}
.manage-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.manage-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.manage-row select {
  min-height: 44px; padding: 0 10px; border: 1px solid #c9d3d2; border-radius: 10px;
  font: inherit; font-size: 16px; background: #fff; color: var(--ink); max-width: 200px;
}
body.has-manage-bar { padding-bottom: 150px; }

/* 對話視窗（分享地圖） */
.dialog {
  border: 0; border-radius: 14px; padding: 20px; width: min(480px, calc(100% - 24px));
  color: var(--ink); box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.dialog::backdrop { background: rgba(10,16,17,.5); }
.dialog .stack { margin: 0; }
.dialog .text-input { flex: none; width: 100%; }
.dialog .howto p { margin: 8px 0; }
.dialog .search-row .text-input { flex: 1; width: auto; }

/* 想去清單 */
.btn-wish {
  min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1.5px solid #2F7FC2; background: #fff;
  color: #2F7FC2; font: inherit; font-weight: 600; cursor: pointer; margin-left: auto;
}
.wish-list-title { margin: 8px 0 0; font-size: 16px; }
.wish-list { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow-y: auto; }
.wish-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #e6ecea; }
.wish-list li .place-text { cursor: pointer; }
.wish-list .empty { color: #6b7f80; border: 0; }
.pin-wish { display: block; color: #2F7FC2; font-size: 24px; line-height: 24px; text-align: center;
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 1px 3px rgba(0,0,0,.4); }
.pick-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #2F7FC2; color: #fff; font-weight: 600; padding: 6px 6px 6px 14px; border-radius: 12px; margin-bottom: 10px;
}
#map.picking { cursor: crosshair; }
#map.picking .leaflet-interactive, #map.picking .leaflet-grab { cursor: crosshair; }
#private-note { margin: 0 0 12px; }

/* 放大畫面裡補貼影片連結 */
.viewer-form { display: flex; flex-direction: column; gap: 12px; width: min(460px, 92%); }
.viewer-form p { margin: 0; }
.viewer-form .text-input { flex: none; }
.viewer-error { margin: 0; color: #ffb59c; }

/* 放大看照片 */
.viewer {
  position: fixed; inset: 0; z-index: 2000; background: rgba(10,16,17,.96); color: #fff;
  display: flex; flex-direction: column;
}
.viewer-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; font-size: 15px; }
.viewer-top {
  padding-top: max(8px, env(safe-area-inset-top));
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
}
.viewer-stage {
  flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 8px 16px; position: relative;
}
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.viewer-stage video { background: #000; width: 100%; }
.viewer-stage img.dim { opacity: .35; }
.viewer-msg { position: absolute; text-align: center; padding: 0 24px; line-height: 1.7; font-size: 16px; }
.viewer-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15);
  color: #fff; font-size: 22px; cursor: pointer;
}
.viewer-arrow { position: absolute; top: 50%; transform: translateY(-50%); font-size: 32px; line-height: 1; }
.viewer-arrow.left { left: 12px; }
.viewer-arrow.right { right: 12px; }
@media (max-width: 600px) { .viewer-arrow { display: none; } }   /* 手機用左右滑動 */

/* 點城市的小卡片 */
.leaflet-container a.pop-trip { color: var(--ink); text-decoration: none; border-radius: 8px; }
a.pop-trip:hover b { text-decoration: underline; }
.pop { min-width: 200px; font-family: inherit; color: var(--ink); }
.pop-title { font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.pop-trip { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.pop-trip img, .pop-noimg { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #e6ecea; flex: none; }

/* ---------- 首頁地圖 ---------- */

.map-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-bottom: 12px; }
.map-head h1 { margin: 0; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 15px; }
.stats b { font-size: 20px; color: var(--brick); margin-right: 2px; }

/* 高度＝畫面高度扣掉上方標題、年份按鈕，再留一段給「最近的旅行」露出來，
   讓人一打開就知道下面還有東西 */
#map {
  height: calc(100vh - 330px);
  height: calc(100dvh - 330px);
  min-height: 320px;
  border-radius: 14px;
  background: var(--sea);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
@media (min-width: 768px) {
  #map { height: calc(100vh - 300px); height: calc(100dvh - 300px); }
}


.map-legend {
  background: rgba(255,255,255,.92);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.map-legend span { display: inline-block; width: 18px; text-align: center; margin-right: 6px; vertical-align: middle; }
.lg-country { height: 12px; background: var(--visited); border: 1px solid var(--visited-line); border-radius: 2px; }
.lg-city { width: 12px !important; height: 12px; margin: 0 9px 0 3px !important; border-radius: 50%; background: var(--brick); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--brick); }
.lg-port { color: var(--ink); font-size: 14px; }
.lg-wish { color: #2F7FC2; }

/* 年份篩選：一排按鈕，手機上可以左右滑 */
.year-bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.year-bar::-webkit-scrollbar { display: none; }
/* 用滑鼠的電腦：顯示細捲軸，讓人知道右邊還有年份（手機、平板用手指滑，不用顯示） */
@media (hover: hover) and (pointer: fine) {
  .year-bar { scrollbar-width: thin; }
  .year-bar::-webkit-scrollbar { display: block; height: 6px; }
  .year-bar::-webkit-scrollbar-thumb { background: #c9d3d2; border-radius: 3px; }
}
.year-btn {
  flex: none; min-height: 44px; padding: 0 18px; border-radius: 22px;
  border: 1px solid #c9d3d2; background: #fff; color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer;
}
.year-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 最近的旅行 */
.trips-section { margin-top: 24px; scroll-margin-top: 12px; }
.trips-section h2 { font-size: 19px; margin: 0 0 12px; }
.trip-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.trip-card {
  background: #fff; border-radius: 14px; overflow: hidden; color: var(--ink); text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); display: flex; flex-direction: column;
  transition: box-shadow .15s, transform .15s;
}
.trip-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.12); transform: translateY(-1px); }
.trip-card-img { position: relative; aspect-ratio: 4 / 3; background: #e6ecea; }
.trip-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trip-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.trip-card-name { font-weight: 700; font-size: 16px; }
.trip-card-cities { font-size: 14px; color: #4d6466; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  position: absolute; top: 10px; left: 10px; font-size: 13px; font-weight: 600;
  padding: 3px 10px; border-radius: 12px; background: rgba(255,255,255,.92); color: var(--ink);
}
.badge.private { background: rgba(28,50,53,.85); color: #fff; }
#trips-more { margin-top: 14px; width: 100%; }
.trips-empty { padding: 20px; }
@media (max-width: 520px) {
  .trip-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .trip-card-body { padding: 10px; }
  .trip-card-name { font-size: 15px; }
  .badge { top: 6px; left: 6px; font-size: 12px; padding: 2px 8px; }
}
