:root {
  --ground: #1c4f66;
  --deep: #143d52;
  --cream: #f3eee2;
  --orange: #ee9233;
  --orange-ink: #b8620f;
  --bg: #faf7f0;
  --surface: #ffffff;
  --surface-2: #f3eee2;
  --ink: #1b2a31;
  --ink-2: #4c5f68;
  --ink-3: #7d8d94;
  --line: #e4ddcc;
  --accent: #255a73;
  --ok: #2f8a5b;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 61, 82, .06), 0 8px 24px rgba(20, 61, 82, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
          "PingFang TC", "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Arabic",
          "Noto Sans Thai", "Noto Sans Devanagari", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1d24;
    --surface: #16272f;
    --surface-2: #1c3039;
    --ink: #eef1ec;
    --ink-2: #b5c3c8;
    --ink-3: #85979e;
    --line: #2a3f48;
    --accent: #52b8db;
    --orange-ink: #f2a65a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.65 var(--font);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
button { font: inherit; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
body > main { min-height: 100vh; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* 版頭 */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 4px; margin-inline-start: 8px; }
.nav a { color: var(--ink-2); padding: 6px 12px; border-radius: 999px; font-size: .95rem; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); font-weight: 600; }
.header-end { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.lang-select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d8d94' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--line); color: var(--ink); border-radius: 999px;
  height: var(--h-sm); padding: 0 32px 0 14px; font: 600 .875rem/1 var(--font); max-width: 150px; cursor: pointer;
}
.lang-select:hover { background-color: var(--surface-2); }
[dir="rtl"] .lang-select { background-position: left 10px center; padding: 0 14px 0 32px; }
.btn.menu-toggle { display: none; }

/* 按鈕：一律膠囊形，兩種高度（--h、--h-sm），三種外觀（主要、次要、深色底），另有同高的圓形圖示鈕 */
:root { --h: 44px; --h-sm: 36px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--h); padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem/1 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none;
  background: var(--surface); color: var(--ink); border-color: var(--line);
  transition: transform .12s ease, background-color .12s ease, border-color .12s ease;
}
.btn:hover { text-decoration: none; background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn:focus-visible, .chip:focus-visible, .lang-select:focus-visible, .seg button:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.btn-sm { min-height: var(--h-sm); padding: 0 14px; font-size: .875rem; }
.btn-primary { background: var(--orange); color: #2a1600; border-color: var(--orange); }
.btn-primary:hover { background: #f4a14d; border-color: #f4a14d; }
.btn-on-dark { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .22); }
.btn-on-dark:hover { background: rgba(255, 255, 255, .2); }
.btn-icon { width: var(--h); padding: 0; font-size: 1.2rem; }
.btn-icon.btn-sm { width: var(--h-sm); }
.btn-row { display: inline-flex; flex-wrap: wrap; gap: 8px; }

/* 分段切換：同一組按鈕擇一，外框與按鈕同高 */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); }
.seg button { min-height: calc(var(--h-sm) - 8px); padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: #e5ecee; font: 600 .875rem/1 var(--font); cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--deep); }
.seg-light { background: var(--surface-2); border-color: var(--line); }
.seg-light button { color: var(--ink-2); }
.seg-light button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 61, 82, .15); }
.seg-field { display: inline-flex; align-items: center; gap: 10px; color: #c7d5da; font-size: .85rem; }
.head-actions { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 首頁主視覺 */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 500px at 85% -10%, #2a6b86 0%, transparent 60%),
              linear-gradient(160deg, var(--ground), var(--deep));
  color: var(--cream);
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: #f8d3a8; font-weight: 600; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; color: #fff; }
.hero-sub { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: #d7e5ea; margin-top: 16px; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 32px; }
.hero-meta { margin-top: 14px; font-size: .875rem; color: #a9c3cc; }
.hero-phones { position: relative; display: flex; justify-content: center; min-height: 460px; }
.hero-phones img {
  width: 230px; border-radius: 30px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .12); background: var(--deep);
}
.hero-phones img:nth-child(1) { transform: rotate(-6deg) translateX(40px); z-index: 1; margin-top: 40px; }
.hero-phones img:nth-child(2) { transform: rotate(5deg) translateX(-40px); z-index: 2; }
.hero-icon { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); margin-bottom: 22px; }

.store-badge img { height: 54px; width: auto; }
.store-badge { display: inline-block; border-radius: 12px; }
.store-badge:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.qr-box {
  display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 14px; padding: 8px 14px 8px 8px; color: #d7e5ea; font-size: .85rem; max-width: 220px;
}
.qr-box canvas, .qr-box img, .qr-box svg { width: 64px; height: 64px; background: #fff; border-radius: 8px; padding: 4px; flex: none; }

/* 數字列 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; margin-top: -36px; position: relative; z-index: 2; box-shadow: var(--shadow); }
.stat { background: var(--surface); padding: 20px; text-align: center; }
.stat b { display: block; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font-size: .9rem; }

section.block { padding: 72px 0 0; }
.block-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.block-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
.block-head p { color: var(--ink-2); margin-top: 6px; }

/* 功能 */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.feature .shot { background: linear-gradient(160deg, var(--ground), var(--deep)); aspect-ratio: 4 / 5; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; padding-top: 18px; }
.feature .shot img { width: 72%; border-radius: 18px 18px 0 0; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.feature .shot .emoji { font-size: 64px; align-self: center; }
.feature .text { padding: 16px 18px 20px; }
.feature h3 { font-size: 1.08rem; }
.feature p { color: var(--ink-2); font-size: .93rem; margin-top: 6px; }

/* 照片格 */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.photo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--ink); display: flex; flex-direction: column; }
.photo-card:hover { text-decoration: none; box-shadow: var(--shadow); }
.photo-card .img { aspect-ratio: 1; background: var(--surface-2); overflow: hidden; cursor: zoom-in; }
.photo-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.photo-card:hover .img img { transform: scale(1.04); }
.photo-card .meta { padding: 10px 12px 12px; font-size: .85rem; line-height: 1.45; }
.photo-card .meta .poke { font-weight: 700; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-card .meta .place { color: var(--ink-2); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-card .meta .who { display: flex; justify-content: space-between; gap: 6px; color: var(--ink-3); margin-top: 4px; }
.photo-card .meta .who a { color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.photo-card .meta .who a > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.face { width: 20px; height: 20px; flex: none; }
.has-face { border-radius: 50%; overflow: hidden; background: var(--surface-2); display: inline-grid; place-items: center; }
.has-face svg { width: 74%; height: 74%; fill: var(--ink-3); margin-top: 18%; }
.has-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card .meta .who a:hover { color: var(--accent); }

.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 40px 16px; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.route-share { max-width: 480px; margin: 0 auto; padding-bottom: 72px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.route-share-icon { border-radius: 22px; }
.route-share h1 { font-size: clamp(1.4rem, 4vw, 1.9rem); font-weight: 800; }
.route-share p { color: var(--ink-2); }

/* 地區 */
.regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.region { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.region h3 { font-size: 1rem; display: flex; justify-content: space-between; margin-bottom: 10px; }
.region h3 span { color: var(--ink-3); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; gap: 6px; align-items: center; min-height: 32px; background: var(--surface); color: var(--ink); border-radius: 999px; padding: 0 12px; font: 500 .85rem/1 var(--font); border: 1px solid var(--line); cursor: pointer; }
.chip:hover { text-decoration: none; background: var(--surface-2); }
.chip b { color: var(--orange-ink); font-weight: 700; }
.chip[aria-pressed="true"] { background: var(--ground); border-color: var(--ground); color: #fff; }
.chip[aria-pressed="true"] b { color: #f8d3a8; }

/* 成就 */
.ach-cats { display: grid; gap: 28px; }
.ach-cat h3 { font-size: 1.1rem; margin-bottom: 12px; display: flex; gap: 10px; align-items: baseline; }
.ach-cat h3 span { color: var(--ink-3); font-size: .9rem; font-weight: 500; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ach { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ach .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); flex: none; }
.ach.done .ico { background: linear-gradient(160deg, #f6b061, var(--orange)); }
.ach.locked { opacity: .55; }
.ach.locked .ico { filter: grayscale(1); }
.ach b { display: block; font-size: .95rem; }
.ach p { font-size: .82rem; color: var(--ink-2); line-height: 1.45; margin-top: 2px; }

/* 圖鑑頁 */
.page-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 20px; padding: 40px 0 20px; }
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 800; }
.page-head p { color: var(--ink-2); }
.map { height: 460px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); z-index: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0; }
.photos-toolbar #updated { margin-inline-start: auto; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 28px 0 8px; }
.pager[hidden] { display: none; }
.pager button {
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font: 600 .9rem/1 var(--font); font-variant-numeric: tabular-nums; cursor: pointer;
}
.pager button:hover:not(:disabled) { border-color: var(--ink-3); color: var(--ink); }
.pager button[aria-current="page"] { background: var(--deep); border-color: var(--deep); color: #fff; }
.pager button:disabled { opacity: .35; cursor: default; }
.pager .pager-step { font-size: 1.2rem; }
.pager-gap { min-width: 24px; text-align: center; color: var(--ink-3); }
.search {
  flex: 1 1 260px; min-width: 0; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit;
}
.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.cover-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.cover-item { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; color: var(--ink); }
.cover-item:hover { text-decoration: none; box-shadow: var(--shadow); }
.cover-item .no { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(160deg, var(--ground), var(--deep)); color: var(--cream); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; overflow: hidden; }
.cover-item .no img, .cover-item .no svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-item .t { min-width: 0; }
.cover-item .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover-item .t span { display: block; font-size: .85rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover-item .badges { margin-inline-start: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: .78rem; color: var(--ink-3); white-space: nowrap; }
.cover-item .badges.when { gap: 0; line-height: 1.35; }
.cover-item .badges.when span:last-child { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.cover-item.mine .no { box-shadow: 0 0 0 3px var(--orange); }

.lid { width: 26px; height: 26px; cursor: pointer; transition: transform .15s; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .35)); }
.lid svg { display: block; width: 100%; height: 100%; }
.lid .lid-fill { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.lid .lid-line { fill: none; stroke: var(--accent); stroke-opacity: .55; stroke-width: 1; }
.lid.mine .lid-fill { stroke: none; }
.lid:hover { transform: scale(1.2); }
.lid.selected { transform: scale(1.15); filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4)); }
.lid.selected:not(.mine) .lid-fill { fill: #ffd60a; }
.lid.selected.mine .lid-fill { stroke: #ffd60a; stroke-width: 3; }
.lid.photo { width: 30px; height: 30px; margin: -2px; border-radius: 50%; overflow: hidden; background: #fff; border: 2px solid var(--accent); }
.lid.photo .cover-crop { display: block; width: 100%; height: 100%; transform: scale(1.17); }
.lid.photo.mine { border-color: var(--ok); }
.lid.photo.selected { border: 3px solid #ffd60a; }
.balloon { position: relative; width: 56px; height: 72px; pointer-events: none; }
.balloon-pin { position: absolute; inset: 0; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3)); }
.balloon-head {
  position: absolute; top: 0; left: 0; z-index: 1;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #ff6b5e, #e5302a 55%, #c41f1a);
}
.balloon-photo { width: 44px; height: 44px; border-radius: 50%; border: 2px solid #fff; overflow: hidden; background: #fff; }
.balloon-photo .cover-crop { display: block; width: 100%; height: 100%; transform: scale(1.17); }
.balloon-blank { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 800; font-size: 20px; color: var(--ink-3); background: var(--surface-2); }
.balloon-stem {
  position: absolute; left: 50%; bottom: 0; width: 3px; height: 44px; margin-left: -1.5px; transform-origin: 50% 100%;
  border-radius: 0 0 2px 2px; background: linear-gradient(90deg, #8a8f96, #c9ccd0 50%, #7b8087);
}
.balloon-lid { position: absolute; left: 50%; top: 100%; width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.balloon-lid .lid { animation: none; }
.balloon-dot {
  position: absolute; left: 50%; top: 100%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: #e5302a; box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, .35);
}
.leaflet-container a.map-card { display: flex; align-items: center; gap: 14px; padding-right: 8px; color: var(--ink); text-decoration: none; }
.map-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.map-card-text b { font-size: 15px; font-weight: 800; line-height: 1.3; }
.map-card-text span { font-size: 13px; color: var(--ink-3); }
.stat-badges { display: flex; gap: 10px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: 2px; }
.map-card-text .stat-badges span, .map-pop .stat-badges span { font-size: 12px; color: var(--ink-2); }
.map-card-go { flex: none; font-size: 24px; line-height: 1; color: var(--ink-3); }
.leaflet-container a.map-card:hover .map-card-go { color: var(--accent); }
.balloon-head { pointer-events: auto; cursor: pointer; text-decoration: none; }
.balloon.open *, .balloon.close * { animation-duration: .5s; animation-timing-function: ease-in-out; animation-fill-mode: both; }
.balloon.close * { animation-direction: reverse; }
.balloon:is(.open, .close) .balloon-lid { animation-name: pin-lid; }
.balloon:is(.open, .close) .balloon-dot { animation-name: pin-dot; }
.balloon:is(.open, .close) .balloon-stem { animation-name: pin-stem; }
.balloon:is(.open, .close) .balloon-head { animation-name: pin-head; }
.balloon:is(.open, .close) .balloon-photo { animation-name: pin-photo; }
.balloon .balloon-lid .lid, .balloon .balloon-lid svg, .balloon .balloon-lid .cover-crop, .balloon .balloon-photo * { animation: none; }
@keyframes pin-lid { 0% { scale: 1; opacity: 1; } 33% { scale: .3; opacity: 1; } 40%, 100% { scale: .3; opacity: 0; } }
@keyframes pin-dot { 0%, 29% { scale: 0; } 40%, 100% { scale: 1; } }
@keyframes pin-stem { 0%, 40% { scale: 1 0; } 60%, 100% { scale: 1 1; } }
@keyframes pin-head {
  0%, 39% { opacity: 0; translate: 0 44px; scale: .14; }
  40% { opacity: 1; translate: 0 44px; scale: .14; }
  60% { translate: 0 0; scale: .14; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes pin-photo { 0%, 72% { opacity: 0; } 92%, 100% { opacity: 1; } }
.leaflet-tile-pane { filter: saturate(.55) brightness(1.04) contrast(.94); }
.lid, .capsule { animation: marker-in .3s ease-out both; }
@keyframes marker-in { from { opacity: 0; scale: .5; } }
@media (prefers-reduced-motion: reduce) {
  .balloon *, .lid, .capsule { animation: none !important; }
  .balloon-lid { display: none; }
}
.capsule-anchor { width: 0 !important; height: 0 !important; }
.capsule {
  position: absolute; translate: -50% -50%; display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 10px; border-radius: 999px; white-space: nowrap; cursor: pointer;
  background: #fff; color: #1d2a33; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .14); font-size: 13px; transition: transform .15s;
}
.capsule b { font-weight: 600; }
.capsule span { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 1px 5px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.capsule.region { background: #1c54ad; color: #fff; border-color: rgba(255, 255, 255, .3); }
.capsule.region span { background: rgba(255, 255, 255, .22); }
.capsule:hover { transform: scale(1.06); }
.map-hint {
  position: absolute; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; text-align: center;
  background: rgba(0, 0, 0, .45); color: #fff; font-weight: 700; font-size: 1.05rem;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.map-hint.show { opacity: 1; }
.map-key {
  position: absolute; top: 10px; inset-inline-end: 10px; z-index: 1000; pointer-events: none;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, .92); color: #3c4a52; box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  transition: background .2s, color .2s;
}
.map-key.nudge { background: #1f2328; color: #fff; }
.area-chips { margin-top: 12px; }
.area-chips[hidden] { display: none; }
.map-reset { box-shadow: 0 1px 5px rgba(0, 0, 0, .25); }
.leaflet-touch .leaflet-bar a { width: 36px; height: 36px; line-height: 36px; }
.map-pop { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; color: var(--ink); text-decoration: none; }
.map-pop .art { width: 84px; aspect-ratio: 1; display: grid; place-items: center; }
.map-pop .art .tile-empty { width: 100%; font-size: .78rem; }
.map-pop .meta { display: grid; gap: 2px; min-width: 0; }
.map-pop small { color: var(--orange); font-weight: 700; }
.map-pop b { font-size: 1rem; }
.map-pop span { font-size: .85rem; color: var(--ink-2); }
.map-pop em { font-style: normal; font-weight: 700; color: var(--ground); margin-top: 4px; }
.bubble small { display: block; font-size: 9px; font-weight: 500; opacity: .85; }

/* 單枚頁 */
.cover-head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; align-items: start; padding-top: 12px; }
.cover-head h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 800; }
.cover-head h1 a { color: inherit; }
.cover-art { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.cover-art figcaption { color: var(--ink-3); font-size: .85rem; text-align: center; margin-top: 6px; }
.cover-art-empty { aspect-ratio: 1; display: grid; place-content: center; text-align: center; gap: 8px; color: var(--ink-2); background: var(--surface-2); border-radius: 50%; }
.cover-art-empty b { font-size: 1.6rem; color: var(--ink); }

/* 圖鑑共用 */
.crumbs { padding-top: 24px; font-size: .85rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }
.lead { color: var(--ink-2); margin-top: 10px; max-width: 44em; }
.eyebrow { color: var(--orange-ink); font-weight: 700; font-size: .85rem; margin-bottom: 6px; }
.guide-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 32px; align-items: start; padding-top: 12px; }
.guide-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 800; }
.guide-head .map { height: 340px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; padding-top: 12px; }
.title-row h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 800; }
.title-row #cta { flex: 0 1 640px; }
.title-row.page-top { padding: 24px 0; }
.title-row .cta-card { margin-top: 0; padding: 12px 16px; }
.title-row + .guide-head { padding-top: 4px; }
.title-row:has(.title-side) { flex-wrap: nowrap; }
.title-row:has(.title-side) h1 { flex: none; }
.title-side { flex: 0 1 900px; display: flex; justify-content: flex-end; align-items: stretch; gap: 10px; min-width: 0; }
.title-side #cta { flex: 1 1 360px; display: flex; min-width: 0; }
.title-side #cta .cta-card { flex: 1; flex-wrap: nowrap; padding: 8px 14px; gap: 12px; }
.title-side #cta .cta-card p { flex: 1 1 auto; min-width: 0; }
.title-side .fact-boxes { flex: none; display: flex; gap: 10px; margin-top: 0; }
.title-side .fact-box { display: flex; flex-direction: column; justify-content: center; min-width: 96px; padding: 8px 14px; }
.title-side .fact-box b { font-size: 1.15rem; line-height: 1.2; }
.head-art { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fact-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 18px; }
.fact-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.fact-box b { display: block; font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.fact-box span { color: var(--ink-3); font-size: .8rem; }
.chips-lg .chip { min-height: 36px; padding: 0 14px; font-size: .9rem; }
.chip-accent { background: #fff4e5; border-color: #f6c98f; color: #7a3f00; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.cover-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--ink); display: flex; flex-direction: column; }
.cover-tile:hover { text-decoration: none; box-shadow: var(--shadow); }
.cover-tile .art, .pref-card .art { aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; }
.tile-empty { width: 70%; aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; color: var(--ink-3); font-weight: 700; font-size: .9rem; }
.cover-tile .meta, .pref-card .meta { padding: 10px 12px 12px; font-size: .85rem; line-height: 1.45; display: grid; }
.cover-tile .meta b, .cover-tile .meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover-tile .meta span { color: var(--ink-2); }
.cover-tile .meta small, .pref-card .meta small { color: var(--ink-3); }
.pref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pref-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--ink); }
.pref-card:hover { text-decoration: none; box-shadow: var(--shadow); }
.pref-card .meta b { font-size: 1rem; }
.pref-card .meta span { color: var(--orange-ink); font-weight: 700; }
.pref-regions section.block { padding-top: 40px; }
section.block.list-block { padding-top: 32px; }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.char-card { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-height: var(--h); padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.char-card:hover { text-decoration: none; background: var(--surface-2); }
.char-card b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.char-card span { color: var(--orange-ink); font-size: .85rem; font-weight: 700; white-space: nowrap; }
.route-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.route-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.route-card h3 { font-size: 1.02rem; }
.route-card h3 a { color: var(--orange-ink); }
.route-steps { --rail: rgba(255, 59, 48, .6); margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: .9rem; }
.route-steps li { display: grid; position: relative; padding-inline-start: 24px; }
.route-steps li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .35em; width: 11px; height: 11px; box-sizing: border-box;
  border-radius: 50%; border: 2.5px solid rgba(255, 59, 48, .7); background: var(--surface); z-index: 1;
}
.route-steps li:not(:last-child)::after {
  content: ""; position: absolute; inset-inline-start: 4.5px; top: calc(.35em + 5.5px); width: 2px; height: calc(100% + 10px);
  background: repeating-linear-gradient(to bottom, var(--rail) 0 5px, transparent 5px 9px);
}
.route-steps li.here b { color: var(--orange-ink); }
.route-steps .leg { color: var(--ink-3); font-size: .8rem; }
.route-list { display: grid; gap: 18px; margin-top: 20px; }
.route-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.route-row .cta-card { margin-top: 0; }
.route-map { height: 320px; }
.route-row.with-map { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); align-items: stretch; }
.route-row.with-map .route-map { height: auto; min-height: 320px; }
.step-pin { width: 24px; height: 24px; border-radius: 50%; background: var(--ground); color: #fff; border: 2px solid #fff; font: 700 12px/20px var(--font); text-align: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }

/* 首頁：地圖與找法面板 */
.map-hero.wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 24px; padding-bottom: 8px; }
.map-hero .map { height: min(68vh, 620px); border-radius: 22px; box-shadow: var(--shadow); }
.finder {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px) 240px;
  grid-template-areas: "intro side app"; gap: 28px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 26px; box-shadow: var(--shadow);
}
.finder-intro { grid-area: intro; }
.finder-side { grid-area: side; }
.finder-side .finder-grid { margin-top: 0; }
.finder-area { grid-area: area; display: flex; align-items: center; gap: 24px; min-width: 0; }
.finder-area[hidden] { display: none; }
.area-body { flex: 1; min-width: 0; }
.finder-area h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 800; }
.finder-area .lead { font-size: .92rem; margin-top: 6px; }
.finder-area .btn-row { margin-top: 14px; }
.finder-area .btn-row[hidden] { display: none; }
.finder.focused { grid-template-columns: minmax(0, 1fr) 240px; grid-template-areas: "area app"; }
.finder.focused > .finder-intro, .finder.focused > .finder-side { display: none; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); flex: 1; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs [role=tab] {
  appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px;
  padding: 10px 14px; font: inherit; font-size: clamp(1.05rem, 2.2vw, 1.35rem); font-weight: 800; color: var(--ink-3);
  white-space: nowrap; cursor: pointer;
}
.tabs [role=tab]:hover { color: var(--ink); }
.tabs [role=tab][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--orange); }
.tabs [role=tab]:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; border-radius: 8px; }
.guide-tabs .block-head { align-items: end; gap: 16px; margin-bottom: 0; }
@media (max-width: 760px) {
  .guide-tabs .block-head { flex-direction: column; align-items: stretch; gap: 0; }
  .guide-tabs .tabs { gap: 0; }
  .guide-tabs .tabs [role=tab] { flex: 1 1 0; padding: 10px 4px; font-size: .9rem; white-space: normal; line-height: 1.25; text-align: center; }
  .guide-tabs #guide-more { order: 1; align-self: flex-end; margin-top: 12px; }
}
.tab-sub { color: var(--ink-2); margin: 14px 0 18px; }
.area-cover { flex: 0 0 300px; padding-left: 24px; border-left: 1px solid var(--line); }
.finder h1 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); font-weight: 800; }
.finder .lead { font-size: .92rem; }
.finder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.finder-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; margin-top: 14px; }
.finder-stats div { background: var(--surface); padding: 8px 4px; text-align: center; }
.finder-stats b { display: block; font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.finder-stats span { font-size: .72rem; color: var(--ink-3); line-height: 1.2; display: block; }
.finder-app {
  grid-area: app; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  align-self: stretch; padding-left: 24px; border-left: 1px solid var(--line); font-size: .85rem; color: var(--ink-2);
}
.finder-app p { flex: 1 1 140px; }
.finder-app img.icon { width: 36px; height: 36px; border-radius: 9px; }
.store-badge.badge-sm img { height: 40px; }
.cover-head .no { color: var(--orange-ink); font-weight: 700; }
.facts { margin-top: 16px; display: grid; gap: 8px; }
.facts div { display: flex; gap: 12px; }
.facts dt { color: var(--ink-3); min-width: 6em; }
.facts dd { margin: 0; }
.cover-head .map { height: 320px; }
.cta-card { margin-top: 20px; background: color-mix(in srgb, var(--orange) 13%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--orange) 30%, transparent); font-weight: 600; border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cta-card p { flex: 1 1 200px; }
.cta-card img.icon { width: 48px; height: 48px; border-radius: 12px; }

/* 旅人頁 */
.profile-card { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); }
.profile { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-name { flex: 1 1 220px; min-width: 0; display: grid; gap: 6px; justify-items: start; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar { width: 84px; height: 84px; border-radius: 50%; background: linear-gradient(160deg, #f6b061, var(--orange)); display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #2a1600; flex: none; }
.avatar.has-face svg { fill: #2a1600; opacity: .55; }
.profile h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 20px; }
.mini-stats > div { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.mini-stats div b { font-size: 1.5rem; font-weight: 800; line-height: 1.2; display: block; font-variant-numeric: tabular-nums; }
.mini-stats div span { color: var(--ink-2); font-size: .85rem; }
.mini-stats .progress { background: var(--surface); margin-top: 8px; height: 6px; }
@media (max-width: 560px) { .profile-card { padding: 18px; } .mini-stats { grid-template-columns: repeat(2, 1fr); } }
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), #f6b061); border-radius: 999px; }

.signin-card { max-width: 460px; margin: 24px auto 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 32px 28px; text-align: center; box-shadow: var(--shadow); }
.signin-card img.icon { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 16px; }
.signin-card h1 { font-size: 1.5rem; }
.signin-card p { color: var(--ink-2); margin: 10px 0 24px; }
.signin-card .btn { width: 100%; margin-top: 10px; }
.btn-google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.btn-google:hover { background: #f6f8fa; }
.btn-apple { background: #000; color: #fff; border-color: #000; }
.btn-apple:hover { background: #1d1d1f; }
.note { font-size: .85rem; color: var(--ink-3); margin-top: 16px; }
.error-text { color: #c0392b; font-size: .9rem; margin-top: 12px; }
.private-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-2); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; }

/* 下載區 */
.download-band { margin-top: 80px; background: linear-gradient(160deg, var(--ground), var(--deep)); color: var(--cream); }
.download-band .wrap { padding-top: 56px; padding-bottom: 56px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.download-band img.icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.download-band h2 { font-size: clamp(1.4rem, 3vw, 2rem); color: #fff; }
.download-band p { color: #c7d9df; margin-top: 6px; }
.download-band .grow { flex: 1 1 280px; }

/* 版尾 */
.site-footer { padding: 40px 0 56px; color: var(--ink-3); font-size: .85rem; border-top: 1px solid var(--line); margin-top: 0; }
.download-band + .site-footer { border-top: 0; }
.site-footer .wrap { display: grid; gap: 14px; }
.site-footer .links { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer .links a { color: var(--ink-2); }

/* 燈箱 */
.lightbox { position: fixed; inset: 0; background: rgba(5, 15, 20, .88); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; flex-direction: column; gap: 12px; }
.lightbox .stage { display: grid; place-items: center; }
.lightbox .stage > * { grid-area: 1 / 1; }
.lightbox .stage img { max-width: min(92vw, 1000px); max-height: 74vh; border-radius: 12px; object-fit: contain; background: #000; }
.lightbox .stage .cover-crop { width: min(80vw, 74vh, 560px); }
.lightbox .cap { color: #e5ecee; text-align: center; font-size: .9rem; }
.lightbox .cap a { color: #f8d3a8; }
.lightbox .close { position: absolute; top: 14px; inset-inline-end: 14px; }

/* 照片裡框出的人孔蓋 */
.cover-crop { display: block; width: 100%; aspect-ratio: 1; }
.photo-card .img .cover-crop { width: 100%; height: 100%; }

.leaflet-container { font: inherit; }

@media (max-width: 1100px) {
  .title-row:has(.title-side) { flex-wrap: wrap; }
  .title-side { flex: 1 1 100%; justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 64px; }
  .hero-phones { min-height: 0; }
  .hero-phones img { width: 170px; border-radius: 24px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cover-head, .guide-head, .route-row, .route-row.with-map { grid-template-columns: 1fr; }
  .title-row + .guide-head .head-art { display: none; }
  .cover-art { max-width: 420px; }
  .map-hero .map { height: 60vh; order: -1; }
  .finder, .finder.focused { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "side" "area" "app"; gap: 16px; padding: 22px; }
  .finder-area { flex-direction: column; align-items: stretch; gap: 14px; }
  .area-cover { flex: none; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .finder-app { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

.legal { max-width: 760px; line-height: 1.75; padding-bottom: 56px; }
.legal h1 { font-size: 1.7rem; line-height: 1.3; margin: 0 0 4px; }
.legal h2 { font-size: 1.1rem; margin: 32px 0 8px; }
.legal .sub { color: var(--ink-3); margin: 0 0 24px; }
.legal .legal-langs { font-size: .9rem; color: var(--ink-3); margin: 0 0 20px; }
.legal .legal-langs a[aria-current] { color: var(--ink); font-weight: 700; text-decoration: none; }
.legal .legal-mail { font-size: 1.2rem; font-weight: 700; }
.legal a { color: var(--accent); }
.legal ul { padding-inline-start: 1.2rem; }
.legal table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: .95rem; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { white-space: nowrap; }

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .btn.menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 60px; inset-inline: 0; flex-direction: column;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 12px 14px; margin: 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; }
  .header-end .btn-download { display: none; }
  .lang-select { max-width: 110px; }
  .qr-box { display: none; }
  .map { height: 360px; }
  section.block { padding-top: 56px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
