@charset "UTF-8";
html,
body {
    height: 100%;
    margin: 0;
    font-family: "Noto Sans TC", sans-serif;
    /* 頁面本身不捲動（滿版地圖），任何未被內層捲動區消化的手勢都不該外溢到文件層，
       否則行動版下拉會觸發瀏覽器的「下拉重新整理」。 */
    overscroll-behavior: none;
}
a {
    text-decoration: none;
}
button {
    border: none;
}

/* ========================================
   焦點指示器（WCAG 2.4.7 / 1.4.11）

   全域基準：任何可聚焦元素以鍵盤聚焦時都必須有清楚可見的外框。
   個別元件可加上 border-color、box-shadow 等額外提示，
   但「不得」以 outline: none 取消這條基準而不提供等效替代。
   #014f5a 對白底約 8.9:1，遠高於 1.4.11 要求的 3:1。
   outline-offset 讓外框落在元件之外（多為淺色卡片／頁面底），
   因此深色按鈕（.main-btn、展開中的主功能鈕）也不需另設顏色。
   ======================================== */
:focus-visible {
    outline: 2px solid #014f5a;
    outline-offset: 2px;
}

/* ========================================
   跳至主要內容（WCAG 2.4.1）
   平常移出畫面（不可用 display:none，那樣連鍵盤也聚焦不到），
   聚焦時才滑入左上角。
   ======================================== */
.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 3000;
    padding: 10px 16px;
    background: #014f5a;
    color: #fff;
    border-radius: 8px;
    font-size: 0.95rem;
    /* 移出可視範圍但保留在無障礙樹與 Tab 順序中 */
    transform: translateY(-200%);
    transition: transform 0.18s ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
    outline-color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
    .skip-link {
        transition-duration: 0.01ms;
    }
}

/* <main> 只是地標包裝層，需把高度傳遞給滿版地圖，
   否則 #map 的 height:100% 失去參照而塌成 0。 */
#map-main {
    height: 100%;
}

.row hr {
    flex-basis: 100%;
    width: 100%;
}
/* 地圖滿版 */
#map {
    height: 100%;
    width: 100%;
    position: relative;
    z-index: 0;
}

/* label 固定寬度 */
.form-label {
    width: 100px;
    flex-shrink: 0;
}

/* input 自動撐滿 */
input {
    flex: 1;
    height: 30px;
    padding: 0 5px;
    /* 邊框對比 ≥ 3:1（1.4.11）；#858e9c = 3.31:1，原 #ccc 僅 1.61:1 */
    border: 1px solid #858e9c;
    border-radius: 4px;
}
.form-input {
    flex: 1;
    height: 30px;
    padding: 0 5px;
    /* 邊框對比 ≥ 3:1（1.4.11）；#858e9c = 3.31:1，原 #ccc 僅 1.61:1 */
    border: 1px solid #858e9c;
    border-radius: 4px;
}
/* 藍框只是額外的「作用中」提示；焦點外框由全域 :focus-visible 負責，不可移除 */
.form-input:focus {
    border-color: #4a90e2;
}
.check-input {
    height: 30px;
    padding: 0 5px;
    border: 2px solid #858e9c;
    border-radius: 4px;
}

/* row 對齊 */
.form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}
/* 自訂 Checkbox */
.form-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    flex: none;
    border: 2px solid #b0c4c8;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
    vertical-align: middle;
}

.form-row input[type="checkbox"]:hover {
    border-color: #014f5a;
}

.form-row input[type="checkbox"]:checked {
    background: #014f5a;
    border-color: #014f5a;
}

.form-row input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 0px;
    width: 5px;
    height: 10px;
    border: 2.5px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* ========================================
   下拉選單（Select）
   ======================================== */
.form-select {
    flex: 1;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #858e9c;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}
.form-select:hover {
    border-color: #6b7280;
}
.form-select:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);
}
.form-select:disabled {
    background-color: #f5f5f5;
    /* 停用狀態的元件依 WCAG 1.4.3 註記屬「非作用中」，不受對比下限約束，
       此處刻意保留低對比以傳達「不可用」。 */
    color: #999;
    cursor: not-allowed;
}

/* ========================================
   評分按鈕
   ======================================== */
.rating-buttons {
    display: flex;
    gap: 10px;
    flex: 1;
}

/* 每顆按鈕只宣告自己的色票（文字／底色／hover／選中底色／選中框線），
   實際的未選中與選中樣式由下方共用規則套用，避免六種色系各寫一份。 */
.rating-btn {
    flex: 1;
    /* 垂直 8px + 2px 框線 = 原本的 10px，加框後整體高度不變。 */
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--rating-fg);
    background-color: var(--rating-bg);
    /* 未選中先佔住 2px 透明框，選中時才不會因為長出框線而位移。 */
    border: 2px solid transparent;
}
.rating-btn:hover {
    background-color: var(--rating-bg-hover);
}

/* 高評分 - 綠色 */
.rating-high {
    --rating-fg: #337a10;
    --rating-bg: #d8f7c9;
    --rating-bg-hover: #f5fff0;
    --rating-bg-selected: #b9eea1;
    --rating-border: #337a10;
}

/* 尚可評分 - 橙黃色 */
.rating-medium {
    --rating-fg: #935b05;
    --rating-bg: #f8f0bf;
    --rating-bg-hover: #fff9f1;
    --rating-bg-selected: #f3e493;
    --rating-border: #935b05;
}

/* 低評分 - 紅色 */
.rating-low {
    --rating-fg: #b81619;
    --rating-bg: #facccc;
    --rating-bg-hover: #fff0f0;
    --rating-bg-selected: #f7adad;
    --rating-border: #b81619;
}

/* 難度 - 困難：紅色 */
.level-hard {
    --rating-fg: #991b1b;
    --rating-bg: #fee2e2;
    --rating-bg-hover: #fff0f0;
    --rating-bg-selected: #fbc4c4;
    --rating-border: #991b1b;
}

/* 難度 - 普通：橙色 */
.level-medium {
    --rating-fg: #9a3412;
    --rating-bg: #fed7aa;
    --rating-bg-hover: #ffedd8;
    --rating-bg-selected: #fcbf7c;
    --rating-border: #9a3412;
}

/* 尚未評估：灰色 */
.level-unrated {
    --rating-fg: #4b5563;
    --rating-bg: #e5e7eb;
    --rating-bg-hover: #f3f4f6;
    --rating-bg-selected: #d1d5db;
    --rating-border: #6b7280;
}

/* 難度 - 簡單：綠色 */
.level-easy {
    --rating-fg: #166534;
    --rating-bg: #dcfce7;
    --rating-bg-hover: #f0fdf4;
    --rating-bg-selected: #b6f2cb;
    --rating-border: #166534;
}

/* 選取中（預設狀態）：彩色底 + 同色實線框 + 粗體。
   實線／虛線框與字重是顏色以外的線索，色弱使用者才分得出來（WCAG 1.4.1）。 */
.rating-btn[aria-pressed="true"] {
    background-color: var(--rating-bg-selected);
    border-color: var(--rating-border);
    font-weight: 700;
}
.rating-btn[aria-pressed="true"]:hover {
    background-color: var(--rating-bg-hover);
}

/* 已排除：灰階 + 虛線框。虛線是刻意的——實線灰框太接近 disabled 的長相，
   虛線比較像「這格被關掉了、還可以打開」。 */
.rating-btn[aria-pressed="false"] {
    background-color: #f4f4f5;
    color: #6b7280;
    border-color: #c9ccd1;
    border-style: dashed;
    font-weight: 400;
}
.rating-btn[aria-pressed="false"]:hover {
    background-color: var(--rating-bg);
    color: var(--rating-fg);
    border-color: var(--rating-border);
}

/* 標題列右側的「全選／全部取消」快捷鍵，兼作預設為全選的提示。 */
.rating-toggle-all {
    margin-left: auto;
    padding: 2px 8px;
    /* 文字會在「全選」與「全部取消」之間切換，兩種狀態必須等寬，
       否則按鈕會隨狀態忽大忽小。這裡用固定寬而非 min-width：
       本專案沒有全域 border-box，min-width 只約束內容區，
       四個漢字的實際排版寬仍會把按鈕撐開。 */
    box-sizing: border-box;
    width: 5.5em;
    text-align: center;
    font-size: 0.8125rem;
    color: #014f5a;
    background: none;
    border: 1px solid #b0c4c8;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.rating-toggle-all:hover {
    background-color: #e6f0f1;
    border-color: #014f5a;
}

/* 按鈕組與下方提示文字改為上下排列（.form-row 預設是橫向 flex）。 */
.form-row--stack {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.rating-hint {
    margin: 0;
    font-size: 0.8125rem;
    color: #6b7280;
}
.rating-hint--none {
    color: #935b05;
}

/* ========================================
   icon
   ======================================== */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem; /* 控制所有 icon 大小的關鍵 */
    line-height: 1; /* 防止被撐高 */
}

.bi-cursor {
    color: white;
}

.bi-info-circle {
    color: #4a90e2;
}
/* ========================================
   Tooltip
   ======================================== */

.tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
}

.tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    box-sizing: border-box;
    background: none;
    border: none;
    cursor: pointer;
}

.leaflet-overlay-pane path[role="button"]:focus-visible {
    outline: 2px solid #014f5a;
    outline-offset: 3px;
}

/* Tooltip 本體 */
.tooltip-box {
    position: fixed;
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #374151;
    z-index: 9999;
    display: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    width: max-content;
    max-width: 280px;
}

.tooltip-title {
    font-size: 1.1rem;
    color: #014f5a;
    font-weight: 600;
}

.tooltip-box p {
    margin: 0 0 0.4rem 0;
}

.tooltip-box p:last-child {
    margin-bottom: 0;
}

.tooltip-box.show {
    display: block;
}

/* Tooltip 內色標標籤 */
.tip-badge {
    display: inline-block;
    width: 2.5rem;
    text-align: center;
    padding: 1px 0;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    vertical-align: middle;
}

.tip-badge--red {
    color: #b81619;
    background-color: #facccc;
}

.tip-badge--yellow {
    color: #935b05;
    background-color: #f8f0bf;
}

.tip-badge--green {
    color: #337a10;
    background-color: #d8f7c9;
}

.tip-badge--orange {
    color: #9a3412;
    background-color: #fed7aa;
}

.tip-badge--unrated {
    width: auto;
    padding: 1px 6px;
    color: #4b5563;
    background-color: #e5e7eb;
}
/* Checkbox Label */
.form-checkbox-label {
    font-weight: normal;
    cursor: pointer;
}
/* flex相關 */
.flex {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}
.row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.justify-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.center {
    display: flex;
    justify-content: center;
    align-items: center;
}
/* margin相關 */
.mb-1 {
    margin-bottom: 1rem;
}
/* 顏色相關 */
.green {
    color: #388d0e;
}
.orange {
    color: #ff8c00;
}
.red {
    color: #ff0004;
}
.blue {
    color: #003470;
}
.purple {
    color: #7c3aed;
}
/* 文字相關 */
.paragraph {
    margin-bottom: 5px;
}
.bold {
    font-weight: bold;
}

/* ========================================
   資訊頁 — 是/否 卡片 Grid
   ======================================== */
.info-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: stretch;
    gap: 8px;
    margin: 0.4rem 0 0.6rem;
}

.info-card-grid--triple {
    grid-template-columns: repeat(3, 1fr);
}

.info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    border-radius: 10px;
    gap: 5px;
    text-align: center;
    border: 1.5px solid transparent;
}

.info-card-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.info-card-label {
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 500;
}

.info-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    padding: 3px 12px;
    border-radius: 20px;
    margin-top: 2px;
    line-height: 1.5;
}

.info-card-badge-row {
    position: relative;
    display: inline-flex;
}

.card-detail-trigger {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    margin-left: 4px;
    font-size: 1.1rem;
    line-height: 1;
    color: inherit;
    opacity: 0.75;
}

.card-detail-trigger:hover,
.card-detail-trigger:focus-visible {
    opacity: 1;
}

/* ========================================
   資訊頁 — Stat Chip（數值型）
   ======================================== */
.stat-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f6ff;
    border: 1px solid #c8dcf8;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0.4rem 0;
}

.stat-chip-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    color: #555;
    font-weight: 500;
}

.stat-chip-value {
    font-size: 1rem;
    font-weight: 700;
    color: #003470;
    background: #d0e4fb;
    padding: 2px 14px;
    border-radius: 20px;
}

/* ========================================
   資訊頁 — Info Row（時間/說明型）
   ======================================== */
.info-row {
    display: flex;
    gap: 12px;
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    padding: 12px 14px;
    margin: 0.5rem 0;
    align-items: flex-start;
}

/* 圖示徽章：淡藍底圓角方塊，與上方規定卡片同色系 */
.info-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f0f6ff;
    color: #003470;
    font-size: 1rem;
    flex-shrink: 0;
}

.info-row-main {
    flex: 1;
    min-width: 0;
}

/* 標題：深色粗體，與內容拉開層級 */
.info-row-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2d3d;
    line-height: 1.4;
    margin: 5px 0 6px;
}

.info-row-text {
    font-size: 0.95rem;
    color: #4a5563;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* ── 聯繫窗口：主題 / 電話清單 ── */
.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 10px;
    padding: 8px 10px;
    background: #f7f8fa;
    border-radius: 8px;
}

.contact-item--note {
    display: block;
    color: #4a5563;
}

.contact-topic {
    font-size: 0.9rem;
    color: #5b6573;
}

.contact-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #003470;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.contact-phone i {
    font-size: 0.8rem;
}

.contact-phone:hover,
.contact-phone:focus-visible {
    text-decoration: underline;
}

/* ── 可致電時間：日別標籤 + 醒目時段 ── */
.call-time {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.call-time-day {
    padding: 1px 8px;
    border-radius: 999px;
    background: #f0f6ff;
    color: #003470;
    font-size: 0.85rem;
    font-weight: 600;
}

.call-time-range {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2d3d;
    font-variant-numeric: tabular-nums;
}

.call-time-note {
    margin-top: 4px;
    font-size: 0.9rem;
}

/* ========================================
   資訊頁 — Map Ref Badge（地圖參照型）
   ======================================== */
.map-ref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.map-ref-row:last-child {
    border-bottom: none;
}

.map-ref-label {
    font-size: 1rem;
    color: #555;
    font-weight: 500;
}

.map-ref-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
}

.map-ref-badge.orange {
    background: #fff4e0;
    color: #935b05;
    border: 1px solid #f8d08a;
}

.map-ref-badge.blue {
    background: #e8f0fb;
    color: #003470;
    border: 1px solid #c8dcf8;
}

.map-ref-badge.red {
    background: #fff0f0;
    color: #b81619;
    border: 1px solid #f8c8c8;
}

/* ========================================
   資訊頁 — Marker Guide（標記圖例，無圖層開關）
   用於場次確認彈窗：地圖被遮罩蓋住，開關無意義，
   只需讓使用者認得地圖上的標記長什麼樣。

   命名不可用 .map-legend*，那是地圖右下角浮動圖例面板的
   既有樣式（sidebar.css，position: fixed + display: flex），
   同名會讓這塊內容被抓出彈窗並橫向擠壓。
   ======================================== */
.marker-guide-hint {
    margin: 0 0 6px;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
}

.marker-guide-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.marker-guide-row:last-child {
    border-bottom: none;
}

/* marker 本體是 30px 且 rotate(-45deg)，旋轉後對角線會超出原尺寸，
   固定一個略寬的容器才不會被相鄰列裁到。 */
.marker-guide-mark {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 圖例中的標記不需要地圖上的互動放大效果 */
.marker-guide-mark .map-point-marker {
    box-shadow: none;
    transition: none;
}

/* 沿路指引路線在地圖上是虛線 polyline 而非標記，以線段色塊表示 */
.marker-guide-route {
    width: 26px;
    height: 0;
    border-top: 3px dashed #7c3aed;
    border-radius: 2px;
}

.marker-guide-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.marker-guide-label {
    color: #555;
    font-size: 1rem;
    font-weight: 500;
}

.marker-guide-desc {
    color: #64748b;
    font-size: 0.88rem;
}

/* ========================================
   資訊頁 — Notice Box（注意事項型）
   ======================================== */
.notice-box {
    background: #fffbeb;
    /* border-left: 4px solid #f59e0b; */
    border-radius: 8px;
    padding: 10px 14px;
    margin: 0.4rem 0;
}

.notice-box-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 1rem;
    color: #92400e;
    margin-bottom: 5px;
}

.notice-box-text {
    font-size: 1rem;
    color: #78350f;
    line-height: 1.65;
}

.support-return-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #d8edf2;
    border-radius: 8px;
    background: #f6fbfc;
}

.support-return-kicker,
.support-return-text {
    margin: 0;
}

.support-return-kicker {
    color: #24717d;
    font-size: 0.82rem;
    font-weight: 700;
}

.support-return-text {
    margin-top: 3px;
    color: #52646a;
    font-size: 0.9rem;
    line-height: 1.45;
}

.support-return-btn {
    flex: 0 0 auto;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid #c8dcf8;
    border-radius: 8px;
    background: #fff;
    color: #003470;
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.support-return-btn:hover {
    background: #f0f6ff;
    border-color: #9fc1ee;
}

/* 否 — 灰暗 */
.info-card.inactive {
    background: #f2f2f2;
    border-color: #e0e0e0;
    color: #6b6b6b;
}
.info-card.inactive .info-card-badge {
    background: #e0e0e0;
    color: #555;
}

/* 數值型卡片（藍） */
.info-card.value.blue {
    background: #f0f6ff;
    border-color: #c8dcf8;
    color: #003470;
}
.info-card.value.blue .info-card-badge {
    background: #003470;
    color: #fff;
}

/* 是 — 藍色（淨灘規定） */
.info-card.active.blue {
    background: #f0f6ff;
    border-color: #c8dcf8;
    color: #003470;
}
.info-card.active.blue .info-card-badge {
    background: #003470;
    color: #fff;
}

/* 是 — 綠色亮燈（淨灘需求） */
.info-card.active.green {
    background: #e8f7e0;
    border-color: #5aad1e;
    color: #2a6b09;
}
.info-card.active.green .info-card-badge {
    background: #337a10;
    color: #fff;
}

/* ========================================
   照片頁籤：現場點位導覽
   ======================================== */
.left-photo {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.photo-overview {
    background: #f6fbfc;
    border: 1px solid #d8edf2;
    border-radius: 8px;
    padding: 14px;
}

.photo-kicker {
    margin: 0 0 4px;
    color: #24717d;
    font-size: 0.85rem;
    font-weight: 700;
}

.photo-overview h3 {
    margin: 0;
    color: #014f5a;
    font-size: 1.15rem;
    line-height: 1.35;
}

.photo-overview-text {
    margin: 8px 0 0;
    color: #52646a;
    font-size: 0.95rem;
    line-height: 1.6;
}

.photo-filter-bar {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    gap: 8px;
    padding: 8px 0;
    background: #fff;
    overflow-x: auto;
    scrollbar-width: none;
}

.photo-filter-bar::-webkit-scrollbar {
    display: none;
}

.photo-filter-chip {
    flex: 0 0 auto;
    padding: 7px 12px;
    border: 1px solid #cfe3e8;
    border-radius: 999px;
    background: #fff;
    color: #315f67;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.photo-filter-chip.active,
.photo-filter-chip:hover {
    background: #014f5a;
    border-color: #014f5a;
    color: #fff;
}

/* 沿路點位 chip 會依資料有無出現，改用 flex 讓 3～4 顆都能均分 */
.photo-point-summary {
    display: flex;
    gap: 8px;
}

.photo-point-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 68px;
    padding: 8px 6px;
    border-radius: 8px;
    background: #f7f8fa;
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.photo-point-item i {
    font-size: 1.35rem;
}

.photo-point-item.red {
    background: #fff0f0;
    border-color: #f8c8c8;
    color: #b81619;
}

.photo-point-item.blue {
    background: #e8f0fb;
    border-color: #c8dcf8;
    color: #003470;
}

.photo-point-item.orange {
    background: #fff4e0;
    border-color: #f8d08a;
    color: #935b05;
}

.photo-point-item.purple {
    background: #f3eeff;
    border-color: #d8c9f8;
    color: #5b21b6;
}

/* 點位卡片容器：卡片由 left-photo.js 依資料產生，間距與 .left-photo 一致 */
.photo-point-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.photo-point-cards:empty,
.photo-point-summary:empty {
    display: none;
}

.photo-empty {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.9rem;
}

/* display 會蓋過瀏覽器預設的 [hidden]{display:none}，
   需明確還原，否則 JS 設定的 hidden 屬性視覺上無效。 */
.photo-empty[hidden] {
    display: none;
}

.photo-place-card {
    scroll-margin-top: 56px;
    overflow: hidden;
    border: 1px solid #e1eaed;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(1, 79, 90, 0.06);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.photo-place-card.is-highlighted {
    border-color: #014f5a;
    box-shadow: 0 0 0 3px rgba(1, 79, 90, 0.14);
    transform: translateY(-2px);
}

.photo-media-button {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    background: #eef5f7;
    cursor: zoom-in;
    text-align: left;
}

.photo-media-button .place-img {
    height: 180px;
    object-fit: cover;
}

.photo-media-overlay {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(1, 35, 40, 0.72);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.photo-card-body {
    padding: 12px;
}

.photo-card-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.photo-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    flex-shrink: 0;
    font-size: 1.25rem;
}

.photo-icon-badge.red {
    background: #fff0f0;
    color: #b81619;
}

.photo-icon-badge.blue {
    background: #e8f0fb;
    color: #003470;
}

.photo-icon-badge.orange {
    background: #fff4e0;
    color: #935b05;
}

.photo-icon-badge.green {
    background: #e8f7e0;
    color: #2a6b09;
}

.photo-icon-badge.purple {
    background: #f3eeff;
    color: #5b21b6;
    font-weight: 700;
}

/* 沿路點位群組：標頭 + 依序排列的點位卡片 */
.photo-route-group {
    scroll-margin-top: 56px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.photo-route-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.photo-route-header h4 {
    margin: 0;
}

.photo-route-group.is-highlighted .photo-route-header {
    border-radius: 8px;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16);
    transition: box-shadow 0.2s ease;
}

.photo-card-label {
    margin: 0 0 2px;
    color: #64767c;
    font-size: 0.85rem;
    font-weight: 700;
}

.photo-card-title-row h4 {
    margin: 0;
    color: #1f3338;
    font-size: 1.08rem;
    line-height: 1.35;
}

.photo-card-note {
    margin: 10px 0;
    color: #52646a;
    font-size: 0.95rem;
    line-height: 1.6;
}

.photo-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 10px;
}

.photo-meta-grid span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    padding: 6px 8px;
    border-radius: 7px;
    background: #f7f8fa;
    color: #52646a;
    font-size: 0.88rem;
    line-height: 1.35;
}

.photo-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.photo-coordinates {
    min-width: 0;
    color: #6b7280;
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.photo-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    color: #014f5a;
}

.photo-nav-btn .bi-cursor {
    color: #014f5a;
}

.panorama-card {
    padding-top: 0;
}

.panorama-card .panorama-preview {
    border-radius: 0;
    margin: 0;
}

/* 多個入口處時預覽上下排列，以細縫分隔 */
.panorama-preview-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.photo-reminder {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 0 0 4px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fffbeb;
    color: #78350f;
    font-size: 0.9rem;
    line-height: 1.55;
}

.photo-reminder .bi-info-circle {
    color: #935b05;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ========================================
   Leaflet 縮放按鈕
   ======================================== */
.leaflet-control-zoom {
    border: none !important;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.leaflet-control-zoom a {
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 18px;
    font-weight: 600;
    background-color: #fff;
    color: #014f5a;
    border: none !important;
    display: block;
    text-align: center;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.leaflet-control-zoom-in {
    border-bottom: 1px solid #e5f4f7 !important;
}

.leaflet-control-zoom a:hover {
    background-color: #c2e9f2;
    color: #014f5a;
}

.map-point-marker {
    position: relative;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid currentColor;
    border-radius: 50% 50% 50% 8px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
    transform: rotate(-45deg);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.map-point-marker i {
    font-size: 1rem;
    line-height: 1;
    transform: rotate(45deg);
}

.map-point-marker--entry {
    color: #b81619;
    background: #fff0f0;
}

.map-point-marker--parking {
    color: #003470;
    background: #e8f0fb;
}

.map-point-marker--toilet {
    color: #935b05;
    background: #fff4e0;
}

/* 沿路點位以序號取代圖示，圓形外框與其他點位型別區隔 */
.map-point-marker--route {
    color: #5b21b6;
    background: #f3eeff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
}

.map-point-seq {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    transform: rotate(45deg);
}

.leaflet-marker-icon.is-selected .map-point-marker {
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.92),
        0 4px 12px rgba(15, 23, 42, 0.24);
    transform: rotate(-45deg) scale(1.12);
}

.leaflet-marker-icon.is-selected .map-point-marker::after {
    content: "";
    position: absolute;
    inset: -9px;
    border: 2px solid currentColor;
    border-radius: 50%;
    animation: mapPointPulse 1.25s ease-out infinite;
}

@keyframes mapPointPulse {
    0% {
        opacity: 0.7;
        transform: scale(0.7);
    }
    100% {
        opacity: 0;
        transform: scale(1.35);
    }
}

@media (max-width: 430px) {
    .support-return-cta {
        align-items: stretch;
        flex-direction: column;
    }

    .support-return-btn {
        width: 100%;
    }

    .photo-meta-grid {
        grid-template-columns: 1fr;
    }

    .photo-card-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .photo-nav-btn {
        justify-content: center;
    }
}

/* ========================================
   地圖 — 海岸線滑鼠移入效果
   ======================================== */
.coastline-path {
    --coastline-glow: rgba(34, 197, 94, 0.55);
    transition:
        stroke-width 0.2s ease,
        opacity 0.25s ease,
        filter 0.25s ease;
}

.coastline-path--hard {
    --coastline-glow: rgba(239, 68, 68, 0.55);
}

.coastline-path--medium {
    --coastline-glow: rgba(245, 158, 11, 0.55);
}

.coastline-path--unrated {
    --coastline-glow: rgba(107, 114, 128, 0.55);
}

/* 移入／選取：雙層光暈，內層貼線、外層擴散，讓線條像被點亮（選取中常駐） */
.coastline-path.is-hover,
.coastline-path.is-selected {
    filter:
        drop-shadow(0 0 2px var(--coastline-glow))
        drop-shadow(0 0 8px var(--coastline-glow));
}

/* 聚焦：其他海岸線退到背景，選取中的線維持清楚 */
.has-coastline-hover .coastline-path:not(.is-hover):not(.is-selected) {
    opacity: 0.35;
}

/* 沿線流動的光點：圓頭短 dash 搭配 dashoffset 位移 */
.coastline-flow {
    pointer-events: none;
    animation: coastlineFlow 0.9s linear infinite;
}

@keyframes coastlineFlow {
    to {
        stroke-dashoffset: -26; /* = dashArray 1 + 12 的兩倍，循環無縫 */
    }
}

@media (prefers-reduced-motion: reduce) {
    .coastline-path {
        transition: none;
    }

    .coastline-flow {
        animation: none;
    }
}

/* ========================================
   地圖 — 海岸線彈窗（點選海岸線後的懸浮卡片）
   ======================================== */
.coastline-popup .leaflet-popup-content-wrapper {
    border-radius: 14px;
    padding: 0;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.06),
        0 10px 28px rgba(15, 23, 42, 0.16);
}

.coastline-popup .leaflet-popup-content {
    margin: 0;
    width: auto !important; /* 交給 min/maxWidth 與內容決定，避免 Leaflet 寫死寬度造成右側空白 */
    min-width: 220px;
    max-width: 280px;
}

.coastline-popup .leaflet-popup-tip {
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

/* 關閉鈕：放大觸控範圍、對齊卡片內距 */
.coastline-popup a.leaflet-popup-close-button {
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #6b7280;
    font: 400 20px/1 system-ui, sans-serif;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.coastline-popup a.leaflet-popup-close-button:hover {
    background: #f1f5f9;
    color: #1f2937;
}

.coastline-popup-card {
    padding: 14px 16px 16px;
}

/* 同一點查到多條重疊海岸線時，以細線分隔 */
.coastline-popup-card + .coastline-popup-card {
    border-top: 1px solid #e8edf2;
}

.coastline-popup-location {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 28px 4px 0; /* 右側讓出關閉鈕 */
    font-size: 0.8rem;
    color: #5b6573;
}

.coastline-popup-name {
    margin: 0 28px 10px 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #014f5a;
}

.coastline-popup-card + .coastline-popup-card .coastline-popup-location,
.coastline-popup-card + .coastline-popup-card .coastline-popup-name {
    margin-right: 0;
}

.coastline-popup-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 0.85rem;
    color: #5b6573;
}

/* 難度標籤：沿用側欄難度燈號的配色 */
.coastline-popup-level {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.coastline-popup-level--easy {
    background: #dcfce7;
    color: #166534;
}

.coastline-popup-level--medium {
    background: #fed7aa;
    color: #9a3412;
}

.coastline-popup-level--hard {
    background: #fee2e2;
    color: #991b1b;
}

.coastline-popup-level--unrated {
    background: #e5e7eb;
    color: #4b5563;
}

/* 主要動作：滿版按鈕，沿用頁面主色 */
.coastline-popup-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 14px;
    border: none;
    border-radius: 10px;
    background: #014f5a;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.coastline-popup-btn i {
    transition: transform 0.15s ease;
}

.coastline-popup-btn:hover {
    background: #013d46;
}

.coastline-popup-btn:hover i {
    transform: translateX(3px);
}

.coastline-popup-btn:active {
    transform: scale(0.98);
}

.coastline-popup-btn:focus-visible {
    outline: 2px solid #014f5a;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .coastline-popup-btn,
    .coastline-popup-btn i {
        transition: none;
    }
}
