/* 京阪楓旅 2026 — 夜間拜觀色調：靛藍夜空、燈籠金、紅葉紅、木繪馬 */
:root {
  --ink: #161A35;
  --ink2: #1E2348;
  --ink3: #283063;
  --line: #3A4280;
  --text: #F6EEDC;
  --muted: #ABA9CC;
  --momiji: #E5483B;
  --lantern: #F6B44A;
  --matcha: #95C26A;
  --wisteria: #C98BE6;
  --sky: #7FB2E5;
  --wood1: #E7BE86;
  --wood2: #CC9358;
  --wood-ink: #3E2516;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --tab-h: 66px;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --f-ui: "PingFang HK", "PingFang TC", "Hiragino Sans", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", system-ui, sans-serif;
  --f-disp: "Hiragino Mincho ProN", "Songti TC", "Noto Serif TC", "Noto Serif CJK TC", "Noto Serif CJK JP", serif;
  --f-num: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", var(--f-ui);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); overflow: hidden; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font: 400 16px/1.6 var(--f-ui);
  overscroll-behavior: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  font-feature-settings: "palt" 0;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { -webkit-user-drag: none; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.stk { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--lantern); outline-offset: 3px; border-radius: 10px; }

#app { position: fixed; inset: 0; overflow: hidden; }
#app::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(246, 180, 74, .10), transparent 60%),
    radial-gradient(80% 50% at 100% 100%, rgba(229, 72, 59, .07), transparent 70%);
}

/* ── 分頁 ── */
.views { position: absolute; inset: 0 0 calc(var(--tab-h) + var(--sb)) 0; }
.view { position: absolute; inset: 0; will-change: transform, opacity; }
.view.scroll { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 0 28px; }
.view.under { pointer-events: none; }

/* 漣漪 */
[data-rp] { position: relative; overflow: hidden; isolation: isolate; transition: transform .35s var(--spring), background-color .2s; }
[data-rp]:active { transform: scale(.965); transition-duration: .12s; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255, 240, 210, .28); transform: scale(0); animation: rip .62s var(--ease) forwards; pointer-events: none; z-index: -1; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }

/* ── 底部分頁列 ── */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tab-h) + var(--sb)); padding: 0 8px var(--sb);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(20, 23, 50, .86);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.tab-ind { position: absolute; left: 8px; top: 7px; width: calc((100% - 16px) / 4); height: 52px; transition: transform .55s var(--spring); pointer-events: none; }
.tab-ind i { display: block; margin: 0 auto; width: 64px; height: 100%; border-radius: 20px; background: radial-gradient(60% 70% at 50% 40%, rgba(246, 180, 74, .30), rgba(246, 180, 74, .06)); box-shadow: inset 0 0 0 1px rgba(246, 180, 74, .25); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--tab-h); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; transition: color .3s; }
.tab-i { width: 28px; height: 28px; filter: grayscale(.85) brightness(.85); opacity: .75; transition: filter .3s, opacity .3s, transform .4s var(--spring); }
.tab.on { color: var(--lantern); }
.tab.on .tab-i { filter: none; opacity: 1; transform: translateY(-1px) scale(1.08); }
.tab.hop .tab-i { animation: hop .55s var(--spring); }
@keyframes hop { 0% { transform: scale(.7); } 40% { transform: translateY(-7px) scale(1.18) rotate(-8deg); } 100% { transform: translateY(-1px) scale(1.08); } }

/* ── 行程頁：主視覺 ── */
.hero { position: relative; height: calc(290px + var(--st)); overflow: hidden; }
.hero-art, .hero-art .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 110px; background: linear-gradient(transparent, var(--ink)); }
.hero-txt { position: absolute; left: 22px; top: calc(var(--st) + 34px); z-index: 2; max-width: 58%; }
.hero-stk { position: absolute; z-index: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.hero-stk.pagoda { right: 132px; bottom: 30px; width: 116px; animation: bob 4s ease-in-out infinite; }
.hero-stk.deer { left: 14px; bottom: 34px; width: 78px; animation: bob 3.4s ease-in-out .6s infinite; transform-origin: 50% 100%; }
.hero-stk.maple { left: 104px; bottom: 78px; width: 48px; animation: spin 7s ease-in-out infinite; }
@keyframes spin { 50% { transform: rotate(18deg) translateY(-6px); } }
.hero h1 { font: 700 46px/1.05 var(--f-disp); letter-spacing: .06em; color: #FFF6E2; text-shadow: 0 2px 0 rgba(0, 0, 0, .25), 0 0 26px rgba(246, 180, 74, .45); }
.hero p { margin-top: 10px; font-size: 13.5px; line-height: 1.6; color: #E7DFFF; opacity: .9; }
.lantern-count { position: absolute; right: 16px; top: calc(var(--st) + 18px); width: 108px; z-index: 2; transform-origin: 50% 0; animation: sway 4.5s ease-in-out infinite; }
.lantern-count svg { width: 100%; display: block; filter: drop-shadow(0 8px 18px rgba(229, 72, 59, .45)); }
.lc-txt { position: absolute; left: 0; right: 0; top: 46px; text-align: center; color: #FFF6E2; }
.lc-txt b { display: block; font: 800 40px/1 var(--f-num); text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.lc-txt small { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; opacity: .9; }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

.talk { display: flex; align-items: flex-end; gap: 10px; margin: -6px 18px 0; position: relative; z-index: 3; }
.talk-m { width: 58px; height: 58px; flex: none; animation: breathe 3.2s ease-in-out infinite; }
.talk p { position: relative; background: #FFF3DC; color: #3B2B3A; font-size: 14px; line-height: 1.55; padding: 11px 14px; border-radius: 18px 18px 18px 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
@keyframes breathe { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-3px) scale(1.03, .97); } }

.today-btn { display: flex; align-items: center; gap: 10px; margin: 16px 18px 0; padding: 12px 16px; width: calc(100% - 36px); border-radius: 16px; background: linear-gradient(135deg, #F6B44A, #E5483B); color: #2B1A12; font-weight: 800; box-shadow: 0 8px 22px rgba(229, 72, 59, .35); }
.today-btn .stk { width: 30px; height: 30px; }

.sec-h { margin: 30px 22px 14px; font: 700 21px/1.3 var(--f-disp); letter-spacing: .08em; color: #FFF0D4; display: flex; align-items: center; gap: 10px; }
.sec-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(246, 180, 74, .5), transparent); }

/* ── 繪馬日卡 ── */
.ema-list { padding: 0 16px; display: grid; gap: 26px; }
.ema-wrap { position: relative; padding-top: 14px; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .35)); }
.ema-cord { position: absolute; left: 50%; top: -8px; width: 26px; height: 30px; margin-left: -13px; z-index: 2; pointer-events: none; }
.ema-cord::before, .ema-cord::after { content: ""; position: absolute; top: 0; width: 3px; height: 31px; background: linear-gradient(#FF6B5E, #C7392F); border-radius: 2px; }
.ema-cord::before { left: 6px; transform: rotate(-24deg); transform-origin: 50% 100%; }
.ema-cord::after { right: 6px; transform: rotate(24deg); transform-origin: 50% 100%; }
.ema {
  width: 100%; text-align: left; display: grid; grid-template-columns: 58px 1fr auto; gap: 4px 12px; align-items: center;
  padding: 30px 14px 16px 12px; min-height: 120px; color: var(--wood-ink);
  clip-path: polygon(0 26px, 50% 0, 100% 26px, 100% 100%, 0 100%);
  background:
    repeating-linear-gradient(176deg, transparent 0 9px, rgba(110, 60, 25, .09) 9px 10px, transparent 10px 23px, rgba(110, 60, 25, .06) 23px 24px),
    radial-gradient(130% 90% at 30% 20%, rgba(255, 240, 210, .55), transparent 60%),
    linear-gradient(180deg, var(--wood1), var(--wood2));
}
.ema-hole { position: absolute; left: 50%; top: 14px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #5A3520; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); }
.ema-no { grid-row: 1 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 76px; border-radius: 14px; background: rgba(62, 37, 22, .1); border: 1.5px solid rgba(62, 37, 22, .22); }
.ema-no small { font-size: 11px; font-weight: 700; line-height: 1; }
.ema-no b { font: 800 34px/1.05 var(--f-num); color: #9E2A1F; }
.ema-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ema-date { font: 700 13px/1.3 var(--f-num); letter-spacing: .02em; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ema-date i { font-style: normal; font-family: var(--f-ui); font-size: 11px; padding: 1px 8px; border-radius: 99px; background: rgba(62, 37, 22, .14); }
.ema-title { font: 800 20px/1.3 var(--f-disp); letter-spacing: .04em; color: #2E180C; }
.ema-lead { font-size: 12.5px; line-height: 1.5; color: rgba(62, 37, 22, .8); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ema-stk { grid-row: 1 / 3; grid-column: 3; position: relative; width: 66px; height: 82px; }
.ema-stk .stk { position: absolute; width: 44px; height: 44px; filter: drop-shadow(0 2px 2px rgba(62, 37, 22, .3)); }
.ema-stk .k0 { right: 0; top: 0; width: 50px; height: 50px; }
.ema-stk .k1 { left: 0; bottom: 4px; }
.ema-stk .k2 { right: 0; bottom: -4px; width: 34px; height: 34px; }
.ema:active .ema-stk .k0 { animation: wiggle .5s var(--spring); }
@keyframes wiggle { 30% { transform: rotate(-12deg) scale(1.1); } 60% { transform: rotate(8deg); } }
.hanko { position: absolute; right: 74px; top: 30px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 900 13px/1 var(--f-disp); color: #C7392F; border: 2.5px solid #C7392F; transform: rotate(-14deg); opacity: .85; background: rgba(255, 240, 220, .25); }
.hanko.done { color: #6B4A2E; border-color: #6B4A2E; opacity: .55; }
.ema-wrap.past .ema { filter: saturate(.7) brightness(.92); }
.ema-wrap.today { filter: drop-shadow(0 0 22px rgba(246, 180, 74, .55)) drop-shadow(0 10px 16px rgba(0, 0, 0, .35)); }
.ema-wrap.today .hanko { animation: stamp .6s var(--spring) .4s both; }
@keyframes stamp { from { transform: rotate(-30deg) scale(2.2); opacity: 0; } to { transform: rotate(-14deg) scale(1); opacity: .85; } }

.foot { margin: 26px 22px 10px; font-size: 12px; color: var(--muted); line-height: 1.7; }

/* ── 單日頁 ── */
.page { position: absolute; inset: 0 0 calc(var(--tab-h) + var(--sb)) 0; z-index: 20; background: var(--ink); transform: translateX(100%); box-shadow: -20px 0 40px rgba(0, 0, 0, .4); display: flex; flex-direction: column; }
.page.in { transform: none; transition: transform .48s var(--ease); }
.page.out { transform: translateX(100%); transition: transform .34s cubic-bezier(.55, 0, .7, .4); }
.dp-top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: calc(var(--st) + 8px) 12px 8px; pointer-events: none; }
.back { pointer-events: auto; display: flex; align-items: center; gap: 2px; padding: 8px 14px 8px 8px; border-radius: 99px; background: rgba(22, 26, 53, .72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-weight: 700; font-size: 15px; }
.back svg { width: 22px; height: 22px; }
.dp-dots { display: flex; gap: 5px; padding: 8px 12px; border-radius: 99px; background: rgba(22, 26, 53, .6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.dp-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .35); transition: width .4s var(--spring), background .3s; }
.dp-dots i.on { width: 18px; background: var(--lantern); }
.dp-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 30px; }
.dp-hero { position: relative; height: calc(250px + var(--st)); overflow: hidden; }
.dp-hero .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.dp-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 120px; background: linear-gradient(transparent, var(--ink)); }
.dp-hero-txt { position: absolute; left: 22px; right: 22px; bottom: 18px; z-index: 2; }
.dp-date { font: 700 13px/1.4 var(--f-num); color: var(--lantern); letter-spacing: .03em; }
.dp-hero h2 { font: 800 32px/1.2 var(--f-disp); letter-spacing: .05em; color: #FFF6E2; text-shadow: 0 2px 14px rgba(0, 0, 0, .5); margin-top: 4px; }
.dp-lead { margin: 4px 22px 0; color: #DCD6F2; font-size: 15px; line-height: 1.7; }
.btn-primary { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 18px; border-radius: 16px; font-weight: 800; color: #2B1A12; background: linear-gradient(135deg, #FFD27A, #F6B44A 55%, #F08A3A); box-shadow: 0 8px 22px rgba(246, 180, 74, .3), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-primary .stk { width: 28px; height: 28px; }
.dp-map { margin: 18px 22px 8px; width: calc(100% - 44px); }

.timeline { position: relative; margin: 18px 16px 0 10px; }
.timeline::before { content: ""; position: absolute; left: 82px; top: 18px; bottom: 18px; width: 3px; border-radius: 2px; background: linear-gradient(var(--lantern), var(--momiji) 50%, #7A6CC8); opacity: .55; }
.tl { position: relative; display: grid; grid-template-columns: 58px 50px 1fr; align-items: start; gap: 0 6px; padding: 7px 0; animation: tlIn .5s var(--ease) both; animation-delay: calc(var(--i) * 45ms + 120ms); }
@keyframes tlIn { from { opacity: 0; transform: translateY(12px); } }
.tl-t { padding-top: 12px; text-align: right; font: 800 15px/1.2 var(--f-num); color: #FFE7B8; letter-spacing: .01em; }
.tl-node { position: relative; z-index: 1; justify-self: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink2); border: 3px solid var(--c); display: grid; place-items: center; box-shadow: 0 0 0 4px var(--ink); }
.tl-node .stk { width: 30px; height: 30px; }
.tl-card { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 11px 14px 12px; border-radius: 16px; background: var(--ink2); border: 1px solid rgba(255, 255, 255, .06); box-shadow: inset 4px 0 0 var(--c); min-width: 0; }
button.tl-card { background: linear-gradient(180deg, #232955, #1E2348); }
.tl-title { font-weight: 800; font-size: 16px; line-height: 1.4; }
.tl-note { font-size: 13px; color: var(--muted); line-height: 1.5; }
.tl-more { display: flex; align-items: center; gap: 2px; margin-top: 4px; font-size: 12.5px; font-weight: 700; color: var(--c); }
.tl-more svg { width: 16px; height: 16px; }
.tl.move .tl-node { width: 32px; height: 32px; margin-top: 6px; border-style: dashed; border-width: 2px; }
.tl.move .tl-node .stk { width: 20px; height: 20px; }
.tl.move .tl-card { background: transparent; border: 1.5px dashed rgba(154, 160, 200, .35); box-shadow: none; padding: 8px 12px; }
.tl.move .tl-title { font-size: 14px; font-weight: 700; color: #CFCBEA; }
.tl.move .tl-t { font-size: 13px; color: var(--muted); }
.tl.rest .tl-card { background: rgba(127, 178, 229, .08); box-shadow: inset 4px 0 0 #7FB2E5; }
.dp-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 26px 16px 8px; }
.dp-nav button { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--ink2); border: 1px solid var(--line); text-align: left; }
.dp-nav .dp-next { text-align: right; }
.dp-nav small { font-size: 12px; color: var(--muted); }
.dp-nav span { font: 700 15px/1.35 var(--f-disp); }

/* ── 地圖 ── */
#v-map { background: #1C2148; }
.map-root { position: absolute; inset: 0; }
.map-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
.dragging .map-stage { cursor: grabbing; }
.map-world { position: absolute; left: 0; top: 0; display: block; }
.map-labels, .map-pins { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.mlabel { position: absolute; left: 0; top: 0; translate: -50% -50%; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .35s; font-weight: 700; color: rgba(243, 230, 200, .75); text-shadow: 0 1px 6px #11163A, 0 0 2px #11163A; }
.mlabel.on { opacity: 1; }
.mlabel.city { font: 800 22px/1 var(--f-disp); letter-spacing: .3em; color: rgba(255, 236, 200, .55); }
.mlabel.town { font-size: 13px; letter-spacing: .12em; color: rgba(243, 230, 200, .6); }
.mlabel.water { font: 600 15px/1 var(--f-disp); letter-spacing: .5em; color: rgba(127, 178, 229, .55); }
.mlabel.river { font-size: 11px; letter-spacing: .3em; color: rgba(127, 178, 229, .7); font-weight: 600; }
.mlabel.area { font-size: 12px; letter-spacing: .2em; color: rgba(243, 230, 200, .5); }
.map-route { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.route-glow { fill: none; stroke: var(--lantern); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; stroke-opacity: .35; }
.route-line { fill: none; stroke: #FFE7B0; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.route-ants { fill: none; stroke: var(--momiji); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 1.5 13; animation: ants 1.1s linear infinite; transition: opacity .4s; }
@keyframes ants { to { stroke-dashoffset: -14.5; } }

.pin, .mcluster { position: absolute; left: 0; top: 0; will-change: transform; }
.pin { translate: var(--ox, 0px) var(--oy, 0px); transition: translate .5s var(--spring); }
.pin.spread::before { content: ""; position: absolute; left: 0; top: -1px; width: var(--len); height: 2px; border-radius: 2px; background: rgba(255, 243, 220, .9); box-shadow: 0 0 3px rgba(0, 0, 0, .45); transform-origin: 0 50%; transform: rotate(var(--ang)); pointer-events: none; }
.pin-dot { position: absolute; left: -20px; top: -20px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--c); border: 3px solid #FFF3DC; box-shadow: 0 5px 12px rgba(0, 0, 0, .45); transition: transform .4s var(--spring); }
.pin-dot img { width: 28px; height: 28px; pointer-events: none; }
.pin-num { position: absolute; right: -8px; top: -8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #FFF3DC; color: #2B1A12; font: 800 13px/22px var(--f-num); text-align: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); display: none; }
.pin.numbered .pin-num { display: block; }
.pin-label { position: absolute; left: 0; top: 24px; translate: -50% 0; white-space: nowrap; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(22, 26, 53, .88); border: 1px solid rgba(255, 255, 255, .1); color: #FFF3DC; opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .3s var(--ease); pointer-events: none; }
.show-labels .pin-label, .pin.sel .pin-label { opacity: 1; transform: none; }
.show-labels .pin.nolabel:not(.sel) .pin-label { opacity: 0; transform: translateY(-4px); }
.map-world .rails { transition: opacity .3s; }
.pin.off, .pin.hid { display: none; }
.pin.pop .pin-dot { animation: pinPop .6s var(--spring) both; animation-delay: var(--d, 0ms); }
@keyframes pinPop { from { transform: translateY(-26px) scale(.2); opacity: 0; } 60% { opacity: 1; } }
.pin.press .pin-dot { transform: scale(.86); transition-duration: .1s; }
.pin.sel { z-index: 5; }
.pin.sel .pin-dot { transform: scale(1.28); }
.pin.sel .pin-dot::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 3px solid var(--c); animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { from { transform: scale(.75); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.mcluster > * { pointer-events: none; }
.mcluster { display: block; }
.mcluster::before { content: ""; position: absolute; left: -32px; top: -30px; width: 64px; height: 76px; border-radius: 30px; } /* 撳得中嘅範圍 */
.mcluster .mc-stk { position: absolute; left: -26px; top: -22px; width: 52px; height: 44px; }
.mcluster .mc-stk img { position: absolute; width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 2.5px solid #FFF3DC; padding: 3px; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); }
.mcluster .mc-stk img:nth-child(1) { left: 9px; top: 0; z-index: 3; }
.mcluster .mc-stk img:nth-child(2) { left: -4px; top: 10px; z-index: 2; transform: rotate(-10deg); }
.mcluster .mc-stk img:nth-child(3) { left: 22px; top: 10px; z-index: 1; transform: rotate(10deg); }
.mcluster b { position: absolute; left: 0; top: 18px; translate: -50% 0; z-index: 4; white-space: nowrap; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--lantern); color: #2B1A12; font: 800 12.5px/22px var(--f-num); text-align: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.mcluster.pop .mc-stk { animation: pinPop .5s var(--spring) both; }
.mcluster.press .mc-stk { transform: scale(.9); transition: transform .1s; }
.me-dot { position: absolute; left: 0; top: 0; pointer-events: none; }
.me-dot i { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: #4AA3FF; border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(74, 163, 255, .6); animation: meP 2s infinite; }
@keyframes meP { 70% { box-shadow: 0 0 0 18px rgba(74, 163, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 163, 255, 0); } }

.map-ui { position: absolute; z-index: 6; }
.map-top { top: 0; left: 0; right: 0; padding: calc(var(--st) + 10px) 0 10px; background: linear-gradient(rgba(22, 26, 53, .96) 55%, rgba(22, 26, 53, 0)); pointer-events: none; }
.map-top > * { pointer-events: auto; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: center; display: flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 99px; background: rgba(40, 48, 99, .85); border: 1px solid rgba(255, 255, 255, .08); font-weight: 800; font-size: 14px; white-space: nowrap; transition: background .3s, color .3s, transform .35s var(--spring); }
.chip small { font: 700 11.5px/1 var(--f-num); color: var(--muted); }
.chip.on { background: var(--lantern); color: #2B1A12; transform: scale(1.04); box-shadow: 0 4px 14px rgba(246, 180, 74, .35); }
.chip.on small { color: rgba(43, 26, 18, .7); }
.cat-row { display: flex; gap: 6px; padding: 4px 16px 0; overflow-x: auto; scrollbar-width: none; transition: opacity .3s, transform .35s var(--ease), max-height .35s var(--ease); max-height: 60px; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-row.hide { opacity: 0; transform: translateY(-8px); pointer-events: none; max-height: 0; }
.cat { flex: none; display: flex; align-items: center; gap: 5px; padding: 4px 10px 4px 5px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: rgba(30, 35, 72, .8); border: 1.5px solid transparent; color: var(--muted); transition: all .3s var(--ease); }
.cat .stk { width: 22px; height: 22px; filter: grayscale(1); opacity: .6; transition: filter .3s, opacity .3s; }
.cat.on { border-color: var(--c); color: #FFF3DC; }
.cat.on .stk { filter: none; opacity: 1; }
.map-ctrl { right: 12px; top: calc(var(--st) + 128px); display: flex; flex-direction: column; gap: 8px; }
.map-ctrl button { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(30, 35, 72, .9); border: 1px solid rgba(255, 255, 255, .1); color: #FFF3DC; box-shadow: 0 6px 14px rgba(0, 0, 0, .3); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.map-ctrl svg { width: 22px; height: 22px; }
.map-ctrl button[data-z="me"] { color: #6FB6FF; }
.map-strip { left: 0; right: 0; bottom: 0; padding: 26px 0 12px; background: linear-gradient(rgba(22, 26, 53, 0), rgba(22, 26, 53, .95) 40%); }
.strip-in { display: flex; gap: 10px; overflow-x: auto; padding: 0 16px 2px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.strip-in::-webkit-scrollbar { display: none; }
.sstop { flex: none; scroll-snap-align: start; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 16px; background: #232955; border: 1px solid rgba(255, 255, 255, .08); box-shadow: inset 0 -3px 0 var(--c); max-width: 230px; }
.sstop b { flex: none; width: 24px; height: 24px; border-radius: 12px; background: #FFF3DC; color: #2B1A12; font: 800 13px/24px var(--f-num); text-align: center; }
.sstop .stk { width: 30px; height: 30px; flex: none; }
.sstop span { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-strip.show .sstop { animation: stripIn .5s var(--spring) both; animation-delay: calc(var(--i) * 50ms + 300ms); }
@keyframes stripIn { from { opacity: 0; transform: translateY(24px) scale(.9); } }
.map-hint { position: absolute; z-index: 5; left: 50%; bottom: 16px; translate: -50% 0; white-space: nowrap; font-size: 12.5px; color: #E7DFFF; padding: 7px 14px; border-radius: 99px; background: rgba(22, 26, 53, .8); pointer-events: none; transition: opacity .4s, transform .4s var(--ease); }
.map-hint.hide { opacity: 0; transform: translateY(12px); }

/* ── 心水／準備 頁頭 ── */
.ph { display: flex; align-items: center; gap: 14px; padding: calc(var(--st) + 22px) 20px 8px; position: relative; }
.ph-stk { width: 66px; height: 66px; flex: none; animation: breathe 3.6s ease-in-out infinite; }
.ph h1 { font: 800 28px/1.2 var(--f-disp); letter-spacing: .08em; color: #FFF0D4; }
.ph p { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.ph > div { flex: 1; min-width: 0; }

.wgroup { margin: 22px 16px 0; border-radius: 22px; background: linear-gradient(180deg, #212756, #1B2047); border: 1px solid rgba(255, 255, 255, .06); overflow: hidden; }
.wg-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; background: radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, var(--c) 28%, transparent), transparent 70%); }
.wg-stk { width: 44px; height: 44px; }
.wg-h h3 { flex: 1; font: 800 18px/1.3 var(--f-disp); letter-spacing: .05em; }
.wg-n { font: 800 13px/1 var(--f-num); color: #2B1A12; background: var(--c); border-radius: 99px; padding: 5px 10px; }
.wg-note { margin: 0 16px 8px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.6; color: #E7DFFF; background: rgba(255, 255, 255, .05); }
.wgroup ul { padding: 0 8px 8px; }
.witem { width: 100%; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 14px; text-align: left; }
.witem:active { background: rgba(255, 255, 255, .05); }
.wi-stk { width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .06); padding: 5px; }
.wi-t { display: flex; flex-direction: column; min-width: 0; }
.wi-t b { font-size: 15px; line-height: 1.4; }
.wi-t small { font-size: 12.5px; color: var(--muted); }
.wi-d { font: 700 11.5px/1.3 var(--f-num); color: var(--c); text-align: right; max-width: 70px; }
.wi-been { position: absolute; left: 40px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--matcha); color: #1B2A10; font-size: 12px; font-weight: 900; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--ink2); }

.ring { position: relative; width: 64px; height: 64px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring-bg { stroke: rgba(255, 255, 255, .1); }
.ring-fg { stroke: var(--matcha); stroke-linecap: round; transition: stroke-dashoffset .7s var(--spring); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 15px/1 var(--f-num); }
.todo { margin: 16px 16px 0; display: grid; gap: 8px; }
.todo-i { width: 100%; display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 13px 14px; border-radius: 16px; background: var(--ink2); border: 1px solid rgba(255, 255, 255, .06); text-align: left; transition: background .3s, transform .35s var(--spring); }
.box { width: 28px; height: 28px; border-radius: 9px; border: 2.5px solid #6E6AA0; display: grid; place-items: center; color: #1B2A10; transition: background .3s var(--ease), border-color .3s; }
.box svg { width: 20px; height: 20px; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .4s var(--ease) .05s; }
.todo-i.done .box { background: var(--matcha); border-color: var(--matcha); animation: boxPop .45s var(--spring); }
.todo-i.done .box svg { stroke-dashoffset: 0; }
@keyframes boxPop { 40% { transform: scale(1.25); } }
.todo-t { font-size: 15px; line-height: 1.45; transition: color .3s, opacity .3s; }
.todo-i.done .todo-t { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(149, 194, 106, .7); }
.todo-due { font: 700 12px/1 var(--f-num); color: var(--lantern); background: rgba(246, 180, 74, .12); padding: 5px 9px; border-radius: 99px; white-space: nowrap; }
.burst { position: fixed; width: 18px; height: 18px; pointer-events: none; z-index: 90; }
.burst svg { width: 100%; height: 100%; display: block; }

.driver-cards { display: grid; gap: 10px; margin: 0 16px; }
.dcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, #24305E, #1E2348); border: 1px solid rgba(127, 178, 229, .3); text-align: left; }
.dcard .stk { width: 44px; height: 44px; flex: none; }
.dcard span { display: flex; flex-direction: column; min-width: 0; }
.dcard b { font-size: 15px; }
.dcard small { font-size: 12.5px; color: var(--muted); }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px; }
.info { padding: 14px; border-radius: 18px; background: var(--ink2); border: 1px solid rgba(255, 255, 255, .06); }
.info .stk { width: 38px; height: 38px; margin-bottom: 6px; }
.info b { font-size: 15px; }
.info p { font-size: 12.5px; line-height: 1.6; color: #CFCBEA; margin-top: 2px; }
.install { display: flex; gap: 12px; align-items: flex-start; margin: 22px 16px 0; padding: 14px; border-radius: 18px; background: rgba(149, 194, 106, .12); border: 1px solid rgba(149, 194, 106, .35); }
.ins-m { width: 50px; height: 50px; flex: none; }
.install b { font-size: 15px; }
.install p { font-size: 13px; line-height: 1.6; color: #DCE8CF; margin-top: 2px; }
.status { display: flex; align-items: center; gap: 8px; margin: 18px 22px 0; font-size: 13px; color: #CFCBEA; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: #8A86AE; }
.status .dot.on { background: var(--matcha); box-shadow: 0 0 10px var(--matcha); }

/* ── 地點介紹（底部彈出） ── */
#backdrop { position: absolute; inset: 0; z-index: 40; background: rgba(8, 10, 26, .55); opacity: 0; transition: opacity .35s; }
#backdrop.open { opacity: 1; }
#backdrop.light { background: transparent; pointer-events: none; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 41; height: 92%; max-width: 640px; margin: 0 auto; border-radius: 26px 26px 0 0; background: var(--ink); box-shadow: 0 -18px 50px rgba(0, 0, 0, .5); transform: translateY(105%); transition: transform .55s cubic-bezier(.2, 1.15, .35, 1); overflow: hidden; display: flex; flex-direction: column; }
.sheet.open { transform: translateY(var(--sy, 0px)); }
.sheet::before { content: ""; position: absolute; z-index: 4; left: 0; right: 0; top: 0; height: 30px; background: linear-gradient(rgba(22, 26, 53, .9), rgba(22, 26, 53, 0)); pointer-events: none; }
.sheet-grab { position: absolute; z-index: 5; left: 50%; top: 8px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: rgba(255, 255, 255, .55); }
.sheet-in { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: calc(24px + var(--sb)); }
.sheet.half .sheet-in { overflow: hidden; }
.sh-hero { position: relative; height: 190px; overflow: hidden; }
.sh-hero .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.sh-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 70px; background: linear-gradient(transparent, var(--ink)); }
.sh-close { position: absolute; z-index: 3; right: 12px; top: 14px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(22, 26, 53, .65); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sh-close svg { width: 18px; height: 18px; }
.sh-body { padding: 0 20px; margin-top: -18px; position: relative; z-index: 2; }
.sh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cchip, .dchip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 4px 10px 4px 5px; border-radius: 99px; }
.cchip { background: color-mix(in srgb, var(--c) 22%, var(--ink2)); color: #FFF3DC; border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); }
.cchip-i { width: 18px; height: 18px; }
.dchip { padding: 4px 10px; background: rgba(246, 180, 74, .14); color: var(--lantern); font-family: var(--f-num); }
.sh-body h2 { margin-top: 10px; font: 800 26px/1.3 var(--f-disp); letter-spacing: .03em; color: #FFF6E2; }
.sh-ja { margin-top: 2px; font: 600 15px/1.5 var(--f-disp); color: #CFC8EE; }
.sh-act { display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 8px; margin-top: 16px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 9px; border-radius: 16px; background: var(--ink2); border: 1px solid rgba(255, 255, 255, .07); font-size: 12px; font-weight: 700; color: #E7E1FA; }
.act .stk { width: 30px; height: 30px; transition: transform .45s var(--spring); }
.act:active .stk { transform: scale(1.2) rotate(-8deg); }
.act.been.on { background: rgba(149, 194, 106, .18); border-color: var(--matcha); color: #DFF0C9; }
.act.been .stk { filter: grayscale(1); opacity: .6; }
.act.been.on .stk { filter: none; opacity: 1; animation: hop .6s var(--spring); }
.sh-body h3 { margin: 22px 0 8px; font: 700 16px/1.3 var(--f-disp); letter-spacing: .08em; color: var(--lantern); }
.sh-hi li { position: relative; padding: 4px 0 4px 22px; font-size: 15px; line-height: 1.65; }
.sh-hi li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 8px; height: 8px; border-radius: 50% 0 50% 50%; background: var(--momiji); transform: rotate(-45deg); }
.sh-ev { display: flex; gap: 10px; margin-top: 16px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, rgba(229, 72, 59, .18), rgba(246, 180, 74, .1)); border: 1px solid rgba(246, 180, 74, .3); }
.ev-stk { width: 40px; height: 40px; flex: none; animation: sway 3.5s ease-in-out infinite; transform-origin: 50% 0; }
.sh-ev b { display: block; font-size: 14.5px; color: #FFE2A8; margin-top: 2px; }
.sh-ev p { font-size: 13.5px; line-height: 1.65; color: #EDE6FF; margin-bottom: 6px; }
.sh-ev p:last-child { margin-bottom: 0; }
.sh-rows { margin: 18px 0 0; display: grid; gap: 2px; border-radius: 18px; overflow: hidden; }
.sh-rows > div { display: grid; grid-template-columns: 30px 64px 1fr; gap: 10px; align-items: start; padding: 11px 12px; background: var(--ink2); }
.sh-rows .stk { width: 26px; height: 26px; margin-top: 1px; }
.sh-rows dt { font-size: 13px; font-weight: 700; color: var(--muted); padding-top: 2px; }
.sh-rows dd { margin: 0; font-size: 14.5px; line-height: 1.6; }
.sh-tip { display: flex; align-items: flex-end; gap: 10px; margin-top: 18px; }
.tip-m { width: 54px; height: 54px; flex: none; }
.sh-tip p { background: #FFF3DC; color: #3B2B3A; font-size: 14px; line-height: 1.6; padding: 11px 14px; border-radius: 18px 18px 18px 6px; }
.sh-foot { margin-top: 18px; font-size: 11.5px; color: var(--muted); }

/* ── 畀司機睇 ── */
#driver { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(8, 10, 26, .75); opacity: 0; transition: opacity .3s; }
#driver.open { opacity: 1; }
.dv-card { width: 100%; max-width: 460px; background: #FFFBF2; color: #1E1410; border-radius: 26px; padding: 26px 22px 20px; text-align: center; transform: scale(.85) translateY(20px); transition: transform .5s var(--spring); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
#driver.open .dv-card { transform: none; }
.dv-tip { font-size: 13px; color: #8A6E5A; }
.dv-say { margin-top: 14px; font: 700 20px/1.4 var(--f-disp); color: #C7392F; }
.dv-card h2 { margin-top: 8px; font: 800 30px/1.35 var(--f-disp); word-break: break-word; }
.dv-addr { margin-top: 10px; font: 600 18px/1.55 var(--f-disp); color: #3E2A1F; }
.dv-zh { margin-top: 10px; font-size: 13px; color: #8A6E5A; }
.dv-close { margin: 22px auto 0; }

/* ── Toast ── */
#toast { position: absolute; z-index: 80; left: 50%; top: calc(var(--st) + 14px); display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 8px; border-radius: 99px; background: #FFF3DC; color: #3B2B3A; font-weight: 700; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transform: translate(-50%, -140%); transition: transform .5s var(--spring); max-width: calc(100% - 32px); pointer-events: none; }
#toast.show { transform: translate(-50%, 0); }
.toast-stk { width: 30px; height: 30px; flex: none; }

/* ── 開場 ── */
#splash { position: absolute; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(80% 60% at 50% 40%, #2A2F66, #12152F); transition: opacity .6s var(--ease), transform .6s var(--ease); overflow: hidden; }
#splash.bye { opacity: 0; transform: scale(1.06); pointer-events: none; }
.sp-m { width: 128px; height: 128px; animation: spIn .9s var(--spring) both; }
#splash h1 { margin-top: 14px; font: 800 40px/1.1 var(--f-disp); letter-spacing: .12em; color: #FFF0D4; animation: spUp .7s var(--ease) .25s both; text-shadow: 0 0 24px rgba(246, 180, 74, .45); }
#splash p { margin-top: 6px; font: 700 15px/1 var(--f-num); color: var(--lantern); letter-spacing: .3em; animation: spUp .7s var(--ease) .4s both; }
@keyframes spIn { from { transform: translateY(40px) scale(.3) rotate(-20deg); opacity: 0; } }
@keyframes spUp { from { transform: translateY(14px); opacity: 0; } }
.sp-leaves span { position: absolute; top: -40px; animation: drop linear infinite; opacity: .9; }
.sp-leaves svg { width: 100%; height: 100%; display: block; }
@keyframes drop { to { transform: translateY(110vh) rotate(540deg); } }

/* ── 場景內動畫 ── */
.scene .twinkle { animation: tw 2.6s ease-in-out infinite; }
@keyframes tw { 50% { opacity: .15; } }
.scene .bob { animation: bob 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
.scene .fall { animation: fall 8s linear infinite; }
@keyframes fall { from { transform: translate(0, 0) rotate(0); } to { transform: translate(-30px, 260px) rotate(320deg); } }

@media (min-width: 700px) {
  .views, .page { max-width: 560px; margin: 0 auto; }
  .tabbar { max-width: 560px; margin: 0 auto; border-radius: 22px 22px 0 0; }
  #v-map { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ═════════ v2：動態天空背景 + 相片 ═════════ */
#app::before { display: none; }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.views, .page, .tabbar { z-index: 2; }
.views { z-index: 1; }
.page { background: transparent; box-shadow: none; }
#v-trip { transition: opacity .42s var(--ease), transform .48s var(--ease); }
#v-trip.under { opacity: 0; transform: translateX(-22%); }

/* 喺天空上面嘅字：加陰影確保日頭夜晚都睇得清 */
.hero { height: auto; min-height: calc(330px + var(--st)); }
.hero::after { display: none; }
.hero-txt { top: calc(var(--st) + 40px); max-width: 60%; }
.hero h1 { text-shadow: 0 2px 2px rgba(10, 12, 40, .35), 0 4px 22px rgba(10, 12, 40, .55); }
.hero p { color: #FFF6E2; text-shadow: 0 1px 8px rgba(10, 12, 40, .75); font-weight: 600; }
.hero-hint { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12.5px; font-weight: 700; color: #FFF6E2; padding: 6px 14px 6px 10px; border-radius: 99px; background: rgba(14, 17, 42, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: hint 2.4s ease-in-out infinite; }
.hero-hint svg { width: 16px; height: 16px; }
@keyframes hint { 50% { transform: translateY(4px); } }
.sec-h { color: #FFF6E2; text-shadow: 0 1px 3px rgba(10, 12, 40, .7), 0 0 16px rgba(10, 12, 40, .45); }
.sec-h::after { background: linear-gradient(90deg, rgba(255, 246, 226, .7), transparent); }
.foot { color: #E8E4FA; background: rgba(14, 17, 42, .5); padding: 10px 14px; border-radius: 14px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ph h1 { text-shadow: 0 2px 14px rgba(10, 12, 40, .6); }
.ph p { color: #EDE9FF; text-shadow: 0 1px 6px rgba(10, 12, 40, .8); }

/* 繪馬：右邊秋天相片 */
.ema-wrap.has-ph .ema { grid-template-columns: 58px 1fr 104px; }
.ema-photo { grid-row: 1 / 3; grid-column: 3; position: relative; width: 100px; height: 120px; transform: rotate(2.5deg); transition: transform .45s var(--spring); }
.ema-photo .pic { width: 100%; height: 100%; object-fit: cover; border: 4px solid #FFF8EC; border-bottom-width: 12px; border-radius: 4px; box-shadow: 0 6px 12px rgba(62, 37, 22, .38); background: #E9D6B4; }
.ema-photo .tape { position: absolute; left: 50%; top: -9px; width: 46px; height: 17px; margin-left: -23px; background: rgba(255, 238, 196, .82); transform: rotate(-5deg); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.ema-badge { position: absolute; left: -16px; bottom: -8px; width: 42px; height: 42px; filter: drop-shadow(0 2px 3px rgba(62, 37, 22, .4)); transition: transform .45s var(--spring); }
.ema:active .ema-photo { transform: rotate(-1deg) scale(1.04); }
.ema:active .ema-badge { transform: rotate(-14deg) scale(1.15); }
.ema-wrap.has-ph .hanko { right: 112px; }
.pic { opacity: 0; transition: opacity .6s var(--ease); }
.pic.ok { opacity: 1; }
.pic.bad { opacity: 0; }

/* 單日頁：相片幻燈片 */
.dp-hero.photo { height: calc(330px + var(--st)); -webkit-mask-image: linear-gradient(#000 68%, transparent); mask-image: linear-gradient(#000 68%, transparent); }
.dp-hero.photo::after { display: none; }
.slides, .slide { position: absolute; inset: 0; margin: 0; }
.slide { opacity: 0; transition: opacity 1.4s var(--ease); overflow: hidden; }
.slide.on { opacity: 1; }
.slide .pic { width: 100%; height: 100%; object-fit: cover; animation: kb 12s ease-in-out infinite alternate; }
.slide:nth-child(2n) .pic { animation-name: kb2; }
@keyframes kb { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.16) translate(-2.5%, -2%); } }
@keyframes kb2 { from { transform: scale(1.16) translate(2%, -1%); } to { transform: scale(1.04) translate(0, 0); } }
.slide figcaption { position: absolute; right: 12px; top: calc(var(--st) + 58px); font-size: 11.5px; font-weight: 700; color: #FFF6E2; padding: 4px 10px; border-radius: 99px; background: rgba(14, 17, 42, .55); }
.dp-hero.photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10, 12, 40, .45) 0%, transparent 28%, transparent 45%, rgba(10, 12, 40, .55) 78%); pointer-events: none; }
.dp-hero-txt { z-index: 3; bottom: 64px; }
.dp-hero.photo .dp-hero-txt { bottom: 96px; }
.slide-dots { position: absolute; z-index: 3; left: 22px; bottom: 76px; display: flex; gap: 5px; }
.slide-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .45); transition: width .4s var(--spring), background .3s; }
.slide-dots i.on { width: 18px; background: #FFF6E2; }
.dp-hero-stk { position: absolute; z-index: 3; right: 14px; bottom: 82px; display: flex; }
.dp-hero-stk .stk { width: 44px; height: 44px; margin-left: -10px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .45)); animation: bob 3.4s ease-in-out infinite; }
.dp-hero-stk .k1 { animation-delay: .4s; } .dp-hero-stk .k2 { animation-delay: .8s; }
.dp-hero:not(.photo) .dp-hero-stk { display: none; }
.dp-lead { margin: -40px 16px 0; position: relative; z-index: 3; padding: 12px 16px; border-radius: 16px; background: rgba(18, 21, 50, .72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #F1EDFF; }
.tl-t { justify-self: end; margin-top: 8px; padding: 3px 8px; height: fit-content; border-radius: 10px; background: rgba(14, 17, 42, .62); font-size: 14px; }
.tl-card, button.tl-card { background: rgba(28, 33, 72, .9); }
.tl.move .tl-card { background: rgba(14, 17, 42, .45); }
.tl.rest .tl-card { background: rgba(32, 44, 86, .88); }
.tl-card.has-ph { display: grid; grid-template-columns: 1fr 76px; column-gap: 12px; align-items: center; }
.tl-card.has-ph > :not(.tl-ph) { grid-column: 1; }
.tl-ph { grid-column: 2; grid-row: 1 / span 4; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 2px rgba(255, 255, 255, .08); align-self: center; }
.tl-ph .pic { width: 100%; height: 100%; object-fit: cover; transition: opacity .6s, transform .5s var(--spring); }
.tl-card:active .tl-ph .pic { transform: scale(1.08); }
.dp-nav button { background: rgba(28, 33, 72, .88); }

/* 心水／準備 卡片半透明 */
.wgroup { background: linear-gradient(180deg, rgba(33, 39, 86, .92), rgba(27, 32, 71, .92)); }
.todo-i, .info, .dcard { background: rgba(30, 35, 72, .9); }
.install { background: rgba(40, 62, 40, .82); }
.status { width: fit-content; padding: 8px 14px; border-radius: 99px; background: rgba(14, 17, 42, .6); margin-top: 12px; }
.status .dot.photo { background: #8A86AE; }
.status .dot.photo.on { background: var(--lantern); box-shadow: 0 0 10px var(--lantern); }
.wi-ph { position: relative; width: 52px; height: 52px; flex: none; }
.wi-ph .pic { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: rgba(255, 255, 255, .06); }
.wi-badge { position: absolute; right: -8px; bottom: -6px; width: 26px; height: 26px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); }
.witem { grid-template-columns: 52px 1fr auto; }
.wi-been { left: 44px; }

/* 地點介紹：相簿 + 連結 */
.sh-hero.photo { height: 260px; }
.sh-hero.photo::after { height: 90px; z-index: 1; pointer-events: none; }
.gal { position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.gal::-webkit-scrollbar { display: none; }
.gal-i { position: relative; flex: 0 0 100%; margin: 0; scroll-snap-align: center; overflow: hidden; }
.gal-i .pic { width: 100%; height: 100%; object-fit: cover; animation: kb 14s ease-in-out infinite alternate; }
.gal-i figcaption { position: absolute; z-index: 2; left: 14px; right: 60px; top: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.gal-i figcaption b { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: rgba(14, 17, 42, .62); color: #FFF6E2; }
.gal-i figcaption a { font-size: 10.5px; padding: 2px 8px; border-radius: 99px; background: rgba(14, 17, 42, .5); color: #DCD8F2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gal-dots { position: absolute; z-index: 3; left: 50%; bottom: 30px; translate: -50% 0; display: flex; gap: 5px; pointer-events: none; }
.gal-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .5); transition: width .35s var(--spring), background .3s; }
.gal-dots i.on { width: 18px; background: #FFF6E2; }
.sh-badge { position: absolute; z-index: 3; right: 16px; bottom: 18px; width: 54px; height: 54px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); animation: bob 3.6s ease-in-out infinite; pointer-events: none; }
.sh-links { display: grid; gap: 8px; }
.lnk { display: grid; grid-template-columns: 34px 1fr 18px; gap: 12px; align-items: center; padding: 11px 14px 11px 10px; border-radius: 16px; background: var(--ink2); border: 1px solid rgba(255, 255, 255, .07); box-shadow: inset 4px 0 0 var(--lc, var(--momiji)); }
.lnk .stk { width: 34px; height: 34px; }
.lnk span { display: flex; flex-direction: column; min-width: 0; }
.lnk b { font-size: 14.5px; line-height: 1.4; }
.lnk small { font-size: 11.5px; color: var(--muted); }
.lnk svg { width: 18px; height: 18px; color: var(--muted); }
.lnk.event { --lc: var(--lantern); }
.lnk.zh { --lc: var(--matcha); }
.lnk.info { --lc: var(--sky); }

/* 相片來源 */
.credits { margin: 0 16px; border-radius: 18px; background: rgba(30, 35, 72, .9); border: 1px solid rgba(255, 255, 255, .06); overflow: hidden; }
.credits summary { padding: 14px 16px; font-size: 14px; font-weight: 700; cursor: pointer; list-style: none; }
.credits summary::-webkit-details-marker { display: none; }
.credits summary::after { content: "＋"; float: right; color: var(--lantern); }
.credits[open] summary::after { content: "－"; }
.credits ul { padding: 0 12px 12px; display: grid; gap: 6px; }
.credits li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; }
.credits li img { width: 52px; height: 40px; object-fit: cover; border-radius: 8px; }
.credits li span { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; }
.credits li a { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-t { white-space: nowrap; padding: 3px 6px; letter-spacing: -.01em; }

/* ═════════ v3：真實地圖（MapLibre） ═════════ */
.gl-map { position: absolute; inset: 0; background: #1A1F45; }
.theme-day .gl-map { background: #F3EFE8; }
.gl-map .maplibregl-canvas { outline: none; }
.gl-pins { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 2; }
.gl-pins .pin, .gl-pins .mcluster { pointer-events: auto; }
.gl-attrib { position: absolute; z-index: 5; left: 8px; bottom: 6px; font-size: 10px; color: rgba(232, 227, 255, .75); background: rgba(14, 17, 42, .55); padding: 2px 8px; border-radius: 8px; pointer-events: auto; }
.gl-attrib a { text-decoration: underline; }
.theme-day .gl-attrib { color: #4A4560; background: rgba(255, 255, 255, .7); }
.day-mode .gl-attrib { bottom: auto; top: calc(var(--st) + 98px); }
.is-gl .map-hint { bottom: 34px; }
.gl-load { position: absolute; z-index: 6; left: 50%; top: 45%; translate: -50% -50%; padding: 10px 16px; border-radius: 14px; background: rgba(14, 17, 42, .85); font-size: 13.5px; }
.map-ctrl .gl-only { display: none; }
.is-gl .map-ctrl .gl-only { display: grid; }
.map-ctrl button[data-z="transit"] { color: var(--muted); }
.map-ctrl button[data-z="transit"].on { color: #FFF3DC; background: rgba(46, 111, 201, .85); }
.theme-day .pin-label { background: rgba(255, 255, 255, .95); color: #2E2840; border-color: rgba(0, 0, 0, .1); }
.map-dl { left: 50%; bottom: 58px; translate: -50% 0; white-space: nowrap; font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 99px; background: rgba(14, 17, 42, .85); color: #FFE7B0; }
.line-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 8px; scrollbar-width: none; }
.line-chips::-webkit-scrollbar { display: none; }
.lchip { flex: none; display: flex; align-items: center; gap: 6px; padding: 5px 11px 5px 7px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: rgba(20, 24, 54, .92); border: 1.5px solid var(--lc); color: #FFF3DC; }
.lchip i { width: 18px; height: 5px; border-radius: 3px; background: var(--lc); }
.lchip.bus i { background: repeating-linear-gradient(90deg, var(--lc) 0 4px, transparent 4px 7px); }
.map-strip.show .lchip { animation: stripIn .5s var(--spring) both; animation-delay: calc(var(--i) * 40ms + 200ms); }

/* ── v4 交通路線清單、站標記、資料卡 ── */
.lines-panel { position: absolute; z-index: 9; left: 0; right: 0; bottom: 0; max-height: min(62%, 520px); display: flex; flex-direction: column; padding: 12px 0 calc(10px + var(--sb)); border-radius: 22px 22px 0 0; background: rgba(22, 26, 56, .97); border-top: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 -12px 34px rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transform: translateY(105%); transition: transform .42s var(--ease); touch-action: pan-y; }
.lines-panel.show { transform: none; }
.lp-head { display: flex; align-items: center; gap: 10px; padding: 0 14px 0 18px; }
.lp-head b { font-size: 17px; }
.lp-head small { color: var(--muted); font-size: 12.5px; flex: 1; }
.lp-x { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .07); }
.lp-x svg, .lc-x svg { width: 18px; height: 18px; }
.lp-tabs { display: flex; gap: 6px; margin: 10px 14px 0; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .22); }
.lp-tabs button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 4px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--muted); transition: background .25s, color .25s; }
.lp-tabs button i { font-style: normal; min-width: 20px; padding: 0 6px; border-radius: 9px; font: 800 11.5px/18px var(--f-num); background: rgba(255, 255, 255, .1); }
.lp-tabs button.on { background: var(--lantern); color: #2B1A12; }
.lp-tabs button.on i { background: rgba(43, 26, 18, .16); }
.lp-tools { display: flex; align-items: center; gap: 6px; padding: 10px 14px 6px; }
.lp-tools span { flex: 1; }
.lp-tools button { padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); }
.lp-tools button[data-act="reset"] { color: var(--lantern); border-color: rgba(246, 180, 74, .4); }
.lp-list { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 2px 10px 6px; }
.lr { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 14px; cursor: pointer; transition: background .2s, opacity .2s; }
.lr + .lr { border-top: 1px solid rgba(255, 255, 255, .05); }
.lr:active { background: rgba(255, 255, 255, .06); }
.lr:not(.on) { opacity: .55; }
.lr-chk { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid rgba(255, 255, 255, .35); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.lr.on .lr-chk { background: var(--lantern); border-color: var(--lantern); }
.lr.on .lr-chk::after { content: ""; width: 10px; height: 6px; border-left: 3px solid #2B1A12; border-bottom: 3px solid #2B1A12; transform: translateY(-2px) rotate(-45deg); }
.lr.today .lr-chk { border-style: dashed; }
.lr-sw { flex: none; width: 6px; height: 34px; border-radius: 3px; background: var(--lc); }
.lr-sw.bus { background: repeating-linear-gradient(180deg, var(--lc) 0 6px, transparent 6px 9px); }
.lr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.lr-txt b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-txt b em { font-style: normal; font-size: 10.5px; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: rgba(246, 180, 74, .2); color: var(--lantern); vertical-align: 2px; }
.lr-txt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-b { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--oc); border: 2px solid #FFF; color: #FFF; font: 800 11px/1 var(--f-ui); letter-spacing: -.5px; box-shadow: 0 2px 5px rgba(0, 0, 0, .3); }
.lr-go { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #6FB6FF; background: rgba(111, 182, 255, .1); }
.lr-go svg { width: 19px; height: 19px; }
.lp-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 12px 8px 4px; margin-top: 6px; border-top: 1px dashed rgba(255, 255, 255, .12); font-size: 12px; color: var(--muted); }
.lp-legend span { display: flex; align-items: center; gap: 6px; }
.lp-legend .op-b { width: 20px; height: 20px; font-size: 9.5px; border-width: 1.5px; }
.lp-empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 13.5px; }
.lines-open .map-hint { opacity: 0; }

.line-card { position: absolute; z-index: 8; left: 12px; right: 66px; top: calc(var(--st) + 112px); padding: 12px 40px 12px 12px; border-radius: 18px; background: rgba(22, 26, 56, .96); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(-10px) scale(.97); pointer-events: none; transition: opacity .3s, transform .4s var(--spring); }
.line-card.show { opacity: 1; transform: none; pointer-events: auto; }
.lc-x { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .07); }
.lc-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lc-line + .lc-line { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .07); }
.lc-line span { flex: 1 1 60%; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.lc-line b { font-size: 15px; }
.lc-line small { font-size: 12px; color: var(--muted); }
.lc-line button { padding: 4px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: rgba(255, 255, 255, .08); }
.lc-line button[data-go] { background: rgba(111, 182, 255, .16); color: #9CCBFF; }
.lc-st { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.lc-lines { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.lc-lines button { display: flex; align-items: center; gap: 8px; text-align: left; font-size: 13.5px; font-weight: 700; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.lc-lines button.off { opacity: .55; }
.lc-lines i { flex: none; width: 16px; height: 5px; border-radius: 3px; background: var(--lc); }
.lc-lines small { font-weight: 400; color: var(--muted); font-size: 11.5px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48%; }
.theme-day .line-card, .theme-day .lines-panel { background: rgba(26, 30, 62, .96); }
