/* Experience layout — needs daohan token palette (experience.css uses these vars). */
:root {
  --green-950: #f0fdf9;
  --green-900: #ecfdf5;
  --green-100: #022c22;
  --text: #134e4a;
  --text-muted: #5b8a82;
  --muted: var(--text-muted);
  --line: rgba(13, 148, 136, 0.1);
  --line-strong: rgba(13, 148, 136, 0.18);
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --gold: #f59e0b;
  --gold-deep: #d97706;
  --teal: #0d9488;
  --blue: #0ea5e9;
  --blue-deep: #0369a1;
  --red: #ef4444;
  --red-deep: #dc2626;
  --signal: #10b981;
  --radius: 18px;
  --shadow: 0 4px 24px rgba(13, 148, 136, 0.08);
}

/* Experience layout subset for Navi Go */
.page-hero {
  background:
    radial-gradient(circle at 8% 20%, rgba(56, 189, 248, 0.2), transparent 38%),
    radial-gradient(circle at 92% 15%, rgba(52, 211, 153, 0.18), transparent 34%),
    radial-gradient(circle at 90% 0%, rgba(251, 191, 36, 0.12), transparent 36%),
    linear-gradient(165deg, #ecfdf5 0%, #e0f2fe 55%, #ffffff 100%);
  color: var(--text);
  padding: 1.8rem 0 1.4rem;
  border-bottom: 1px solid var(--line-strong);
}
.page-hero .lede a { color: var(--blue); font-weight: 500; }

.page-hero h1 { color: var(--green-100); }
.page-hero .eyebrow { color: var(--gold-deep); }
.page-hero .lede { color: var(--text-muted); }

.tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.4rem; }
.tab {
  border: 1.5px solid rgba(15, 118, 110, 0.38);
  background: #fff;
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  cursor: pointer;
  font: inherit;
  color: #0f766e;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.tab:hover { border-color: #0f766e; background: #f0fdf9; color: #0b5f58; }
.tab.is-active,
.tab:nth-child(n).is-active {
  background: #71afa0;
  color: #fff;
  border-color: #71afa0;
  font-weight: 700;
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
/* 預熱中：要有真實尺寸（地圖在 0×0 容器裡建不起來），但不能被看到、
   不能被點到、也不能影響版面。建完會立刻拿掉這個 class。 */
.tab-panel.is-prewarming {
  display: block;
  position: fixed;
  left: -10000px;
  top: 0;
  width: 900px;
  height: 600px;
  visibility: hidden;
  pointer-events: none;
}
.panel-head { max-width: 40rem; margin-bottom: 1rem; }

/* --- 一頁式的體驗區：左側欄 + 內容 --- */

/* 佔滿螢幕寬，只留一點喘息的邊。原本是 min(1240px, 94vw)，在寬螢幕上
   兩側各留一大塊白，而這一區的主體是三欄地圖版面，越寬越好用。 */
.exp-block {
  width: 100%;
  margin: 0 auto;
  /* 內距收窄。這一區是三欄（截圖／看板／地圖），每一欄都想要 350px 以上，
     外框每省一px 都直接變成內容。1280 寬時外框原本吃掉 372px（29%）。 */
  padding-inline: clamp(14px, 1.6vw, 36px);
}
.exp-block__head { text-align: center; margin-bottom: clamp(18px, 3vh, 32px); }
/* 字級跟這一區取代掉的輪播區（.feat__head / .feat__lede）對齊。
   首頁另有 .page-home 的覆寫（navi-go.css），兩邊要一樣大。 */
.exp-block__title {
  margin: 0 0 10px;
  font-size: clamp(30px, 4.4vw, 50px);
  font-weight: 900;
  line-height: 1.22;
  color: #0b2b24;
}
.exp-block__lede { margin: 0; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.65; color: #3f6259; }

.exp-block__body {
  display: grid;
  /* 側欄寬度看最寬的那一顆：選中時是粗體，加上五位數的即時數字，
     實測要 197px。留一點餘裕到 214——數字多一位就會擠爆。 */
  grid-template-columns: minmax(150px, 214px) minmax(0, 1fr);
  gap: clamp(12px, 1.4vw, 22px);
  align-items: start;
}

/* 內容區是稿上那張薄荷色卡片 */
.exp-block__panels {
  background: #fff;
  border: 1px solid rgba(11, 43, 36, 0.08);
  border-radius: 18px;
  padding: clamp(14px, 1.6vw, 24px);
  min-width: 0;
}

/* 「其他功能」的輪播原本是滿版區塊，.feat__stage 用 min(1180px, 92vw) 定寬。
   裝進已經限寬的面板之後那個寬度撐破容器——實測 1440px 視窗整頁橫向捲 117px。
   在面板裡一律吃容器的寬度；上方留白也收掉，區塊標題已經在上面了。 */
#panel-more .feat__stage {
  width: 100%;
  padding-top: clamp(8px, 1.5vh, 20px);
}
#panel-more .feat { background: transparent; }

/* 側欄。12 顆疊起來比手機框高，所以要黏著捲——不黏的話
   捲到面板下半部時按鈕已經跑出畫面，等於沒有側欄。 */
.tabs--rail {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-bottom: 0;
  position: sticky;
  top: 84px;
}
.tab--rail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  text-align: left;
  font-weight: 600;
}
.tab--rail .tab__label { flex: 1 1 auto; min-width: 0; }
.tab--rail .tab__num {
  flex: none;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0.72;
}
.tab--rail .tab__chev { flex: none; font-size: 1.05rem; line-height: 1; opacity: 0.6; }
/* .tab 前綴壓過上面的 .tab:nth-child(n).is-active（specificity 0,3,0），
   否則稿上的深綠 #0f5d4f 出不來，只會是薄荷綠 #71afa0。 */
.tab--rail.is-active,
.tab.tab--rail.is-active { background: #0f5d4f; border-color: #0f5d4f; color: #fff; }
.tab--rail.is-active .tab__num,
.tab--rail.is-active .tab__chev { opacity: 0.9; }

/* 看板被截斷時的最後一張卡。做得比一般卡片輕——它是說明不是資料，
   但也不能太輕：使用者必須知道自己看到的不是全部。 */
.board-overflow {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: center;
}

.map-shell {
  --map-height: clamp(480px, 62vh, 680px);
  --phone-status: 1.9rem;
  --phone-home: 1.1rem;
  --phone-bezel: 0.55rem;
  --phone-chrome: calc(var(--phone-status) + var(--phone-home) + var(--phone-bezel) * 2);
  --shell-height: calc(var(--map-height) + var(--phone-chrome));
  display: grid;
  /* 行銷稿：左 App 截圖、中說明與即時看板、右手機框地圖。
     欄位用 grid-column 明確指定，不靠 DOM 順序——DOM 順序是給
     螢幕閱讀器與手機堆疊用的（先說明、再地圖、最後截圖）。

     第一欄的上限是「讓截圖剛好跟地圖一樣高」算出來的，不是隨手挑的：
     owl 截圖是 680x915（比例 0.7432），寬度到 --shell-height x 0.7432
     時高度正好等於欄高。上限訂在 300px 的時候實測是 277x372 塞在 546 高
     的欄位裡，底下空 174px，看起來就是「圖片有點小」。 */
  --shot-aspect: 0.7432;
  /* 順序上先滿足看板：它是即時資料，是這一區真正要賣的東西。
     截圖再吃剩下的，上限就是「跟地圖一樣高」那個寬度。
     看板下限訂 280——1440 寬時如果讓截圖吃到上限 464，看板只剩 220，
     一行只放得下十幾個字，本末倒置。 */
  grid-template-columns:
    minmax(260px, 400px)
    minmax(280px, 1fr)
    minmax(200px, calc(var(--shell-height) * var(--shot-aspect)));
  gap: 1.1rem;
  align-items: stretch;
  justify-content: center;
}
/* 欄位被擠窄時截圖會比欄位矮，置中比靠上好看，也不會在底下留一塊空的。 */
.map-shell__shot {
  /* 第三欄。地圖跟截圖對調過：左邊是活地圖、右邊是 App 截圖。
     DOM 順序沒有跟著換——那是給螢幕閱讀器與手機堆疊用的
     （先說明與看板、再地圖、最後截圖）。 */
  grid-column: 3;
  grid-row: 1;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.map-shell__board { grid-column: 2; grid-row: 1; }
.map-shell .phone-frame--map { grid-column: 1; grid-row: 1; }
/* 沒有 App 截圖的面板（目前沒有，但代打圖被撤掉時會用到）收成兩欄，
   不要在左邊留一塊空白。 */
.map-shell--noshot { grid-template-columns: minmax(240px, 1fr) minmax(260px, 420px); }
.map-shell--noshot .map-shell__board { grid-column: 1; }
.map-shell--noshot .phone-frame--map { grid-column: 2; }

/* 語音導航沒有地圖，截圖補到右邊那一欄，版面才不會塌成一長條。 */
.map-shell--noshot .map-shell__shot--wide { grid-column: 2; }

.map-shell__shot img {
  display: block;
  width: 100%;
  height: auto;
  max-height: var(--shell-height);
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(11, 43, 36, 0.1);
}
/* 中欄是「說明 + 看板」。看板本身會內部捲動，所以整欄要有高度上限，
   否則說明文字會把中欄撐得比地圖高。這也順手修掉隧道面板原本
   因為多一段補充說明而比地圖高一截的問題。 */
.map-shell__board {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 0;
  max-height: var(--shell-height);
}
/* 中欄的內容區自己捲。.tts-board 一定要一起列進來——它不是 .side-board，
   漏掉它的後果是 1,235px 的內容塞進 546px 的欄位、往下溢出 797px，
   蓋住底下的方案區，而且「匝道方向」那一組整個看不到。 */
.map-shell__board > .side-board,
.map-shell__board > .tts-board {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: none;
}
.parking-map-legend {
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: calc(var(--phone-home, 1.1rem) + 0.45rem);
  z-index: 4;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: #134e4a;
  font-size: 0.82rem;
  line-height: 1.45;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  pointer-events: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
}
.parking-map-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
}
.parking-map-legend__copy {
  flex: 1 1 8rem;
  color: #3f6259;
  font-weight: 600;
}
.traffic-legend {
  position: static;
  max-width: none;
}
.map-canvas {
  position: relative;
  width: 100%;
  height: var(--map-height);
  min-height: var(--map-height);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(14, 165, 233, 0.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(52, 211, 153, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, #e0f2fe 0%, var(--green-950) 100%);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.08);
}
.phone-frame .map-canvas {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}
.map-locate-btn {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(18, 32, 40, 0.92);
  color: #f3f7f6;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.map-locate-btn:hover {
  background: rgba(26, 48, 64, 0.96);
  border-color: rgba(90, 171, 240, 0.45);
}
.map-locate-btn.is-active {
  border-color: rgba(90, 171, 240, 0.75);
  box-shadow: 0 0 0 2px rgba(90, 171, 240, 0.35);
}
.map-locate-btn.is-loading {
  opacity: 0.72;
  cursor: wait;
}
.map-locate-btn__icon {
  display: inline-flex;
}
.map-locate-status {
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 3;
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: rgba(18, 32, 40, 0.92);
  color: #e8f4f2;
  font-size: 0.78rem;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.map-locate-status--ok {
  color: #b2ebf2;
}
.map-locate-status--error {
  color: #ffcdd2;
}
.map-locate-status--pending {
  color: #ffe0b2;
}
.map-canvas:has(.map-locate-status:not([hidden])) .map-locate-btn {
  bottom: 2.65rem;
}
.user-location-marker {
  position: relative;
  width: 1.1rem;
  height: 1.1rem;
  pointer-events: none;
}
.user-location-marker__dot {
  position: absolute;
  inset: 0.22rem;
  border-radius: 50%;
  background: #2196f3;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.user-location-marker__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(33, 150, 243, 0.28);
  animation: user-location-pulse 2s ease-out infinite;
}
@keyframes user-location-pulse {
  0% { transform: scale(0.6); opacity: 0.85; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}
.map-canvas .mapboxgl-map,
.map-canvas .gompmap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.map-canvas .mapboxgl-canvas-container {
  position: absolute;
  inset: 0;
}
/* Do NOT set width/height on .mapboxgl-canvas — Map8 sets backing store via resize() */
.map-canvas iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Map8 popup 在白底上，需覆寫全站淺色文字，避免標籤看不見 */
.map-canvas .mapboxgl-popup-content {
  background: #fff;
  color: #122e25;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(18, 46, 37, 0.12);
}
.map-canvas .mapboxgl-popup-tip {
  border-top-color: #fff;
}
.map-canvas .mapboxgl-popup-close-button {
  color: #4a6b5f;
  font-size: 1.15rem;
  padding: 0.15rem 0.35rem;
  right: 0.15rem;
  top: 0.1rem;
}
.map-canvas .mapboxgl-popup-close-button:hover {
  background: rgba(18, 46, 37, 0.08);
  color: #122e25;
}
.map-canvas .papago-map-popup__label {
  display: block;
  color: #122e25;
  font-weight: 600;
}
.fallback-map { position: relative; width: 100%; height: 100%; min-height: var(--map-height, 480px); }
.pin {
  position: absolute;
  transform: translate(-50%, -100%);
  background: var(--teal);
  color: #fff;
  border-radius: 10px;
  padding: 0.25rem 0.45rem;
  font-size: 0.75rem;
  max-width: 9rem;
}
.pin.green { background: var(--signal); }
.pin.gray { background: #8a9298; }
.pin.red { background: var(--red); }
.pin.blue { background: var(--blue-deep); }
.side-board {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  max-height: var(--map-height, 480px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.15rem;
}
.live-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 10rem;
  padding: 2rem 1rem;
  text-align: center;
}
.live-loading__spinner {
  width: 2.6rem;
  height: 2.6rem;
  border: 3px solid rgba(90, 171, 240, 0.22);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: live-spin 0.85s linear infinite;
}
.live-loading__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
@keyframes live-spin {
  to { transform: rotate(360deg); }
}
.map-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.78);
  pointer-events: none;
}
.live-error {
  display: grid;
  gap: 0.55rem;
}
.live-error__title {
  margin: 0;
  font-weight: 600;
  line-height: 1.5;
}
.live-error__detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.live-error__retry {
  justify-self: start;
  margin-top: 0.15rem;
}
.parking-board {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.parking-street-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.parking-street-note__free { color: #047857; }
.parking-street-note__taken { color: #b91c1c; }
.parking-list-head {
  flex-shrink: 0;
}
.parking-list-legend {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}
.parking-list-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.legend-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid #10b981;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
}
.legend-marker.is-free { border-color: #10b981; background: #fff; }
.legend-marker.is-full { border-color: #ef4444; background: #fff; }
.legend-marker.is-full svg { display: none; }
.parking-list-legend .legend-free,
.parking-list-legend .legend-full {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.parking-list-legend .legend-free { background: #b91c1c; }
.parking-list-legend .legend-full { background: #8a9298; }
.parking-list-count {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.parking-card h3 {
  margin: 0;
  font-size: 0.95rem;
}
.parking-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.parking-card-dot {
  width: 14px;
  height: 7px;
  border-radius: 1px 1px 0 0;
  border-bottom: 2px solid rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}
.parking-card-dot.is-free { background: #b91c1c; }
.parking-card-dot.is-full { background: #8a9298; }
.parking-card-status {
  margin: 0.3rem 0 0;
}
.parking-card-meta {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.parking-list-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
}
.cms-list-head {
  flex-shrink: 0;
}
.cms-list-count {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.cms-list-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
}
.cms-marker {
  display: flex;
  flex-direction: column;
  align-items: center;

  color: #ffcdd2;
}
.event-chip--施工 {
  background: rgba(251, 140, 0, 0.22);
  color: #ffe0b2;
}
.event-chip--天候 {
  background: rgba(90, 171, 240, 0.22);
  color: #bbdefb;
}
.event-map-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.event-map-marker__dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.event-map-marker.is-selected .event-map-marker__dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 3px rgba(90, 171, 240, 0.55);
}
.event-map-marker__label {
  max-width: 5rem;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid var(--line-strong);
}
.event-map-marker__title {
  max-width: 9rem;
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--shadow);
  border: 1px solid var(--line-strong);
}
.event-map-marker.is-selected .event-map-marker__title {
  box-shadow: 0 0 0 2px rgba(90, 171, 240, 0.55);
}
.event-popup__type {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #e53935;
}
.event-popup__title {
  margin: 0 0 0.2rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #122e25;
}
.event-popup__location {
  margin: 0;
  font-size: 0.82rem;
  color: #4a6b5f;
}
.cameras-list-head {
  margin-bottom: 0.35rem;
}
.cameras-list-count,
.cameras-list-stats {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.cameras-list-stats {
  margin-top: 0.2rem;
  font-size: 0.82rem;
}
.cameras-list-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.camera-card h3 {
  margin: 0.25rem 0 0.35rem;
  font-size: 0.96rem;
  line-height: 1.45;
}
.camera-card-location,
.camera-card-direction,
.camera-card-dept {
  margin: 0.15rem 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
}
.camera-card-limit {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: #fb8c00;
  font-weight: 600;
}
.camera-card-limit strong {
  font-size: 1.05rem;
}
.camera-chip--fix {
  background: rgba(229, 57, 53, 0.2);
  color: #ffcdd2;
}
.camera-chip--zone {
  background: rgba(251, 140, 0, 0.22);
  color: #ffe0b2;
}
.camera-chip--tech {
  background: rgba(142, 36, 170, 0.22);
  color: #e1bee7;
}
.camera-chip--mobile {
  background: rgba(194, 65, 12, 0.22);
  color: #ffedd5;
}
.camera-map-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.camera-map-marker--dot {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--camera-color, #e53935);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}
.camera-map-marker--dot.is-selected {
  transform: scale(1.25);
  box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.45);
}
.camera-map-marker__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  padding: 0.34rem 0.65rem;
  border-radius: 8px;
  border: 3px solid #fff;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.38);
}
.camera-map-marker.is-selected .camera-map-marker__icon {
  transform: scale(1.06);
  box-shadow: 0 0 0 4px rgba(251, 140, 0, 0.5);
}
.camera-map-marker__kind {
  max-width: 12rem;
  padding: 0.14rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--gold-deep);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid var(--line-strong);
}
.camera-map-marker__name {
  max-width: 12rem;
  padding: 0.22rem 0.55rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--shadow);
  border: 1px solid var(--line-strong);
}
.camera-map-marker.is-selected .camera-map-marker__name {
  box-shadow: 0 0 0 3px rgba(90, 171, 240, 0.55);
}
.camera-popup__kind {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #e53935;
}
.camera-popup__title {
  margin: 0 0 0.2rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #122e25;
}
.camera-popup__limit,
.camera-popup__direction {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
  color: #4a6b5f;
}
.camera-popup__limit {
  color: #fb8c00;
  font-weight: 600;
}
.parking-detail-free { color: #b91c1c; font-weight: 600; }
.parking-detail-full { color: #8a9298; font-weight: 600; }
.parking-list-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
}
.parking-card-type {
  margin: 0 0 0.35rem;
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #8b3a3a;
  background: rgba(185, 28, 28, 0.12);
  border: 1px solid rgba(185, 28, 28, 0.28);
}
.parking-map-marker {
  width: 18px;
  height: 18px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.parking-map-marker__slot {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2.5px solid #10b981;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.parking-map-marker.is-free .parking-map-marker__slot { border-color: #10b981; background: #fff; }
.parking-map-marker.is-full .parking-map-marker__slot { border-color: #ef4444; background: #fff; }
.parking-street-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #10b981;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.parking-street-dot.is-taken { background: #ef4444; }
.parking-map-marker__label {
  font-size: 0.52rem;
  font-weight: 800;
  line-height: 1;
  color: #0f766e;
  letter-spacing: -0.02em;
}
.parking-map-marker.is-full .parking-map-marker__label { color: #b91c1c; }
.parking-map-marker__car {
  width: 12px;
  height: 8px;
  color: #fff;
  display: block;
}
.parking-map-marker.is-selected .parking-map-marker__slot {
  transform: scale(1.2);
  box-shadow: 0 0 0 3px rgba(90, 171, 240, 0.75), 0 3px 9px rgba(0, 0, 0, 0.28);
}
.parking-map-marker.is-selected {
  transform: none;
}
.tunnel-picker {
  border-top: 3px solid var(--blue);
}
.tunnel-picker label {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
}
.tunnel-picker select {
  width: 100%;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text);
  background-color: var(--surface);
}
.tunnel-picker select option {
  background: var(--surface);
  color: var(--text);
}
.tunnel-picker select optgroup {
  background: var(--green-950);
  color: var(--blue-deep);
  font-weight: 600;
}
.tunnel-picker label + .tunnel-direction-picker {
  margin-top: 0.65rem;
}
.tunnel-direction-label {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
}
.tunnel-direction-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.tunnel-direction-tabs .tunnel-dir-tab {
  flex: 1 1 auto;
  min-width: 4.5rem;
  text-align: center;
  padding: 0.5rem 0.85rem;
}
.tunnel-detail { display: grid; gap: 0.7rem; }
.tunnel-direction .tunnel-confidence,
.tunnel-confidence {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.tunnel-warning {
  margin: 0.55rem 0 0;
  font-size: 0.85rem;
  color: #f5b0ab;
}
.tunnel-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
  .tunnel-marker__label {
  display: block;
  max-width: 12rem;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  background: #fff;
  color: #122e25;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(18, 46, 37, 0.12);
  opacity: 1;
  pointer-events: none;
  white-space: nowrap;
}
.tunnel-marker__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}
.tunnel-marker.is-selected .tunnel-marker__dot {
  border-color: var(--red);
  transform: scale(1.2);
}
.map-canvas .tunnel-marker:focus-visible {
  outline: none;
}
.fallback-map .pin.is-selected {
  outline: 2px solid var(--blue);
  z-index: 2;
  font-weight: 600;
}
.side-card {
  background: var(--surface-raised);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.side-card.is-linked {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.side-card.is-linked:hover {
  border-color: rgba(90, 171, 240, 0.55);
}
.side-card.is-selected {
  outline: 2px solid var(--blue);
  box-shadow: 0 0 0 1px rgba(90, 171, 240, 0.35);
  transform: translateX(-2px);
}
.cta-inline { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.price-card.featured {
  outline: 2px solid var(--blue);
  box-shadow: 0 12px 36px rgba(90, 171, 240, 0.18);
}
.price-card .hero-actions { margin: 1rem 0 0; }
.plain { padding-left: 1.1rem; }

.table-wrap { overflow-x: auto; }
.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-raised);
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  color: var(--text);
}
.compare th, .compare td { padding: 0.8rem; border-bottom: 1px solid var(--line); text-align: left; }
.compare th { background: linear-gradient(160deg, var(--blue), var(--teal)); color: #fff; }
.yes { color: var(--blue); font-weight: 700; }
.no { color: var(--red); }

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.admin-toolbar input, .admin-toolbar select { min-width: 12rem; }
.admin-table textarea { min-height: 4.5rem; width: 16rem; }
.admin-table input, .admin-table select { width: 100%; }

.faq-list details {
  background: var(--surface-raised);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.7rem;
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.faq-list summary { cursor: pointer; font-weight: 500; color: var(--text); }

.live-partial {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #92400e;
}

.live-partial__mark {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* 首頁第二區的外框。/experience 上這一段由 .container 負責，
   首頁是滿版底色，所以自己有一層。 */
.home-experience { padding: clamp(20px, 7vh, 40px); background: #fff; }
.home-experience__inner { width: 100%; }

/* Narrow: map on top, cards below (design spec: 窄：上地圖下卡片).
   .map-shell has no media queries above this point, so this is the first
   responsive rule in the file. */
@media (max-width: 991.98px) {
  .map-shell {
    --map-height: 55vh;
    grid-template-columns: minmax(0, 1fr);
  }
  /* 三欄堆疊：先說明與看板（文字先讀得到），再地圖，最後截圖。
     order 只在這裡出現——桌機是用 grid-column 指定的。
     grid-row: auto 留下來：桌機規則寫了 grid-row: 1，不拆的話
     三塊會疊在同一格，order 排不到。 */
  .map-shell__board { grid-column: 1; grid-row: auto; order: 1; }
  .map-shell .phone-frame--map { grid-column: 1; grid-row: auto; order: 2; }
  .map-shell__shot { grid-column: 1; grid-row: auto; order: 3; max-width: 320px; margin-inline: auto; }
  .map-shell--noshot .map-shell__shot--wide { grid-column: 1; grid-row: auto; }
  .map-shell__board {
    max-height: none;
  }
  .phone-frame--map {
    width: 100%;
  }

  .side-board {
    /* Desktop clamps the board to the map height and scrolls it internally.
       Stacked, that would create a nested scroll region inside the page
       scroll, which is unpleasant on touch. Let the page scroll instead. */
    max-height: none;
    overflow-y: visible;
  }

  .tabs {
    /* Seven pills wrap to three rows at 390px and push the map off screen.
       Scroll them horizontally instead. */
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 0.5rem;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 0.5rem;
  }
  /* 側欄在手機上倒下來變成頂部的水平捲動列，
     跟改版前的分頁列是同一套操作，使用者不用重新學。 */
  .exp-block__body { grid-template-columns: minmax(0, 1fr); }
  .tabs--rail {
    flex-direction: row;
    position: static;
    margin-bottom: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tabs--rail::-webkit-scrollbar { display: none; }
  .tab--rail { width: auto; border-radius: 999px; padding: 0.5rem 0.95rem; }
  .tab--rail .tab__chev { display: none; }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  .tab {
    flex: none;
    scroll-snap-align: start;
  }

  /* 藏起 scrollbar 之後就沒有任何「右邊還有東西」的線索：至 390px 寬時
     第四顆分頁只露 4px，看起來像排版壞掉。把還能捲的那一側淡出，
     被切斷的那顆分頁就看得出來是被切斷的。
     mask 貼在元素自己的框上、不隨內容捲動，所以不需要外包一層 wrapper。
     has-scroll-* 由 experience.js 的 syncTabsOverflow() 依實際捲動位置打上，
     捲到底就拿掉，否則最後一顆分頁會永遠看起來是灰的。 */
  .tabs.has-scroll-end {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
  }
  .tabs.has-scroll-start {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 2.5rem);
    mask-image: linear-gradient(to right, transparent, #000 2.5rem);
  }
  .tabs.has-scroll-start.has-scroll-end {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 2.5rem,
                        #000 calc(100% - 2.5rem), transparent);
    mask-image: linear-gradient(to right, transparent, #000 2.5rem,
                #000 calc(100% - 2.5rem), transparent);
  }

  /* Playwright 1.62 iPhone 13 is 390×664 (not 844). Compact chrome on
     .page-experience only so the first card peeks (Decision 1). Homepage
     still hides the topbar. Task 3 hamburger replaces the interim
     nowrap/overflow topbar nav. */
  .page-experience main > .container.my-4 {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
  }
  .panel-head {
    margin-bottom: 0.25rem;
  }

  .tts-voice {
    flex: 1 1 auto;
    min-width: 5.5rem;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Replace the pulsing ring with a static one: the marker must still read
     as "this is you", which is what the pulse conveyed. */
  .user-location-marker__pulse {
    animation: none;
    transform: scale(1.6);
    opacity: 0.35;
  }
  .live-loading__spinner {
    animation: none;
    /* A static ring plus the adjacent live-region text carries the state. */
    border-top-color: currentColor;
    opacity: 0.6;
  }
}


/* ---------------------------------------------------------------------------
   體驗頁元件樣式（車道卡片、地圖標記、路況圖例與詳情、CCTV／事件清單）

   這些 class 由 experience.js 產生。JS 當初從參考實作移植過來時，對應的 CSS
   沒有一起帶過來，結果是元素都在、樣式全無——車道擠成一行純文字、路況圖例
   空白、地圖標記沒有尺寸。web/css_coverage_test.go 會擋住這類遺漏再次發生。

   規則沿用參考實作 app/static/css/style.css；兩邊的調色變數值相同，
   所以視覺一致。
   --------------------------------------------------------------------------- */

:root {
  --text-dim: #7aa39c;
}

.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; padding: 0.7rem 1.15rem; text-decoration: none; cursor: pointer; font: inherit; transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-ghost:hover { background: var(--green-950); }
.lanes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.45rem; margin: 0.5rem 0; }
.lane-name { display: block; color: var(--text-muted); }
.lane-speed { font-family: Outfit, sans-serif; font-size: 1.25rem; color: var(--text); }
.lane-speed span { font-size: 0.7rem; margin-left: 0.15rem; }
.lane-tag { display: inline-block; background: var(--gold-deep); color: #1a2a22; font-weight: 600; border-radius: 999px; font-size: 0.72rem; padding: 0.1rem 0.45rem; margin-bottom: 0.35rem; }
.lane-tag-reco { background: var(--red); color: #fff; font-weight: 700; }
.lane-occ { display: block; margin-top: 0.2rem; font-size: 0.75rem; color: var(--text-muted); }
.lane-speed--missing, .lane-occ--missing { color: var(--text-dim); }
.cta-band .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.cms-marker__card { background: #fff; color: #122e25; border-radius: 12px; padding: 0.6rem 0.75rem; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24); border: 2px solid rgba(90, 171, 240, 0.5); text-align: left; }
.cms-marker.is-selected .cms-marker__card { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(90, 171, 240, 0.35), 0 8px 22px rgba(0, 0, 0, 0.28); }
.cms-marker__message { margin: 0; font-size: 0.92rem; font-weight: 600; line-height: 1.5; color: #1a4035; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cms-marker.is-selected .cms-marker__message { -webkit-line-clamp: 6; }
.cms-marker__pin { width: 14px; height: 14px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28); flex-shrink: 0; }
.cms-marker.is-selected .cms-marker__pin { transform: scale(1.2); background: #3d8fd9; }
.map-cluster {
  position: relative;
  width: var(--cluster-size, 3.2rem);
  height: var(--cluster-size, 3.2rem);
  min-width: var(--cluster-size, 3.2rem);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.38));
  transition: transform 0.15s ease, filter 0.15s ease;
}
.map-cluster__halo { position: absolute; inset: -6px; border-radius: 50%; background: radial-gradient(circle, var(--cluster-halo, rgba(90, 171, 240, 0.35)) 0%, transparent 72%); pointer-events: none; }
.map-cluster__core { position: relative; z-index: 1; width: 82%; height: 82%; border-radius: 50%; border: 3px solid var(--cluster-ring, rgba(90, 171, 240, 0.55)); background: linear-gradient(155deg, var(--cluster-bg-start, #5aabf0) 0%, var(--cluster-bg-end, #2a5580) 100%); box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.28), inset 0 -4px 10px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 18px var(--cluster-glow, rgba(90, 171, 240, 0.25)); display: flex; align-items: center; justify-content: center; }
.map-cluster__count { font-size: calc(var(--cluster-size, 3.2rem) * var(--cluster-count-scale, 0.4)); font-weight: 800; line-height: 1; color: #fff; letter-spacing: -0.03em; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45); }
.cms-marker__compact { display: block; max-width: 14rem; padding: 0.28rem 0.55rem; border-radius: 8px; background: #fff; color: #122e25; font-size: 0.82rem; font-weight: 700; line-height: 1.35; text-align: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); border: 1px solid rgba(90, 171, 240, 0.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cms-marker--compact.is-selected .cms-marker__compact { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(90, 171, 240, 0.35); }
.cms-popup__message { margin: 0; font-size: 0.98rem; font-weight: 600; line-height: 1.55; color: #1a4035; white-space: pre-wrap; }
.cctv-list-count { margin: 0; font-size: 0.88rem; color: var(--muted); }
.cctv-live-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #0f1720; margin-bottom: 0.45rem; }
.cctv-live-wrap .cctv-live-frame { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.cctv-live { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; background: transparent; }
.cctv-card:not(.is-selected) .cctv-live-wrap { display: none; }
.cctv-live-fallback, .cctv-live-missing { margin: 0; padding: 1rem 0.75rem; font-size: 0.88rem; color: var(--muted); text-align: center; background: rgba(15, 23, 32, 0.06); border-radius: 8px; }
/* 未選取的卡片不開串流（MJPEG 會把同一台主機的六條連線佔死）。 */
.cctv-live-idle { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0.75rem; font-size: 0.85rem; color: rgba(255, 255, 255, 0.72); text-align: center; }
.cctv-live-idle[hidden],
.cctv-live-wrap .cctv-live-fallback[hidden] { display: none; }
.cctv-live-wrap .cctv-live-fallback { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 32, 0.9); color: rgba(255, 255, 255, 0.8); }
.cctv-card-note { margin: 0; font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.ev-list-count { margin: 0; font-size: 0.88rem; color: var(--muted); }
.ev-card h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; }
.ev-fast { display: inline-block; padding: 0.12rem 0.45rem; border-radius: 999px; background: rgba(13, 148, 136, 0.16); color: var(--teal); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; }
.ev-card-avail { margin: 0.2rem 0 0; font-size: 0.95rem; font-weight: 700; color: var(--text); }
.ev-card-city { margin: 0.15rem 0 0; font-size: 0.82rem; color: var(--muted); }
.ev-map-marker__icon { display: block; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: #fff; border: 2.5px solid #0d9488; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22); position: relative; }
.ev-map-marker__icon::before { display: none; }
.ev-map-marker.is-selected .ev-map-marker__icon { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.45); }
.ev-map-marker__label { display: block; max-width: 14rem; padding: 0.28rem 0.55rem; border-radius: 8px; background: #fff; color: #122e25; font-size: 0.82rem; font-weight: 700; line-height: 1.35; text-align: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); border: 1px solid rgba(13, 148, 136, 0.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-map-marker__pin { display: block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #0d9488; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.map-cluster:hover,
.map-cluster:focus-visible {
  transform: scale(1.06);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.42));
}
.map-cluster:focus-visible {
  outline: 2px solid rgba(90, 171, 240, 0.75);
  outline-offset: 3px;
}
.cms-map-cluster,
.parking-map-cluster,
.cctv-map-cluster,
.camera-map-cluster,
.ev-map-cluster {
  font: inherit;
}
.ev-map-cluster { --cluster-halo: rgba(13, 148, 136, 0.35); --cluster-ring: rgba(13, 148, 136, 0.55); --cluster-bg-start: #14b8a6; --cluster-bg-end: #0f766e; --cluster-glow: rgba(13, 148, 136, 0.25); }
.cctv-map-marker__icon { display: block; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: #fff; border: 2.5px solid #e85a52; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22); position: relative; }
.cctv-map-marker__icon::before { display: none; }
.cctv-map-marker.is-selected .cctv-map-marker__icon { border-color: #c9453d; box-shadow: 0 0 0 3px rgba(232, 90, 82, 0.45); }
.cctv-map-marker__label { display: block; max-width: 14rem; padding: 0.28rem 0.55rem; border-radius: 8px; background: #fff; color: #122e25; font-size: 0.82rem; font-weight: 700; line-height: 1.35; text-align: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); border: 1px solid rgba(232, 90, 82, 0.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cctv-map-marker__pin { display: block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #e85a52; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.cctv-map-marker--compact.is-selected .cctv-map-marker__label { border-color: #e85a52; box-shadow: 0 0 0 2px rgba(232, 90, 82, 0.35); }
.traffic-legend__panel { pointer-events: auto; padding: 0.75rem 0.85rem 0.85rem; border-radius: 14px; background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--shadow); color: var(--text); font-size: 0.85rem; line-height: 1.45; }
.traffic-legend__title { margin: 0 0 0.2rem; font-size: 0.82rem; font-weight: 700; }
.traffic-legend__updated { margin: 0 0 0.15rem; color: var(--text-muted); font-size: 0.76rem; }
.traffic-legend__stats { margin: 0 0 0.35rem; color: var(--text-dim); font-size: 0.72rem; }
.traffic-legend__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.18rem; }
.traffic-legend__list li { display: flex; align-items: center; gap: 0.35rem; }
.traffic-legend__unit { margin-left: auto; color: var(--text-dim); font-size: 0.68rem; }
.traffic-detail-empty { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }
.traffic-detail-type { display: inline-block; padding: 0.15rem 0.45rem; border-radius: 999px; background: rgba(90, 171, 240, 0.16); color: var(--blue); font-size: 0.72rem; font-weight: 700; }
.traffic-detail-alert { margin: 0; font-size: 0.82rem; font-weight: 700; color: var(--red); }
.traffic-detail--congested .traffic-detail-alert, .traffic-detail--severe .traffic-detail-alert { color: var(--red-deep); }
.traffic-detail-road { margin: 0; font-size: 0.84rem; color: var(--muted); }
.traffic-detail-name { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.traffic-detail-stats { display: grid; gap: 0.35rem; margin: 0.15rem 0 0; }
.traffic-detail-stats div { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.88rem; }
.traffic-detail-stats dt { margin: 0; color: var(--muted); }
.traffic-detail-stats dd { margin: 0; font-weight: 700; text-align: right; }
.traffic-card-alert { float: right; margin-left: 0.35rem; padding: 0.1rem 0.45rem; border-radius: 999px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.02em; color: #fff; background: linear-gradient(135deg, #ff1744, #d500f9); }
.traffic-card--severe .traffic-card-speed { font-size: 0.95rem; }
.traffic-card-road { margin: 0 0 0.15rem; font-size: 0.78rem; color: var(--muted); }
.traffic-card-type { display: inline-block; margin: 0 0 0.25rem; padding: 0.08rem 0.4rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; color: #1a4035; background: rgba(90, 171, 240, 0.22); }
.traffic-popup__type { margin: 0 0 0.15rem; font-size: 0.72rem; font-weight: 700; color: #4a6b5f; }
.traffic-card-speed { margin: 0; font-size: 0.88rem; font-weight: 700; }
.traffic-popup__road { margin: 0 0 0.15rem; font-size: 0.78rem; color: #4a6b5f; }
.traffic-popup__name { margin: 0 0 0.25rem; font-size: 0.92rem; font-weight: 700; color: #122e25; }
.traffic-popup__speed { margin: 0; font-size: 0.86rem; font-weight: 700; }
.events-list-count { margin: 0; font-size: 0.88rem; color: var(--muted); }
.event-card-location, .event-card-impact, .event-card-time { margin: 0.15rem 0 0; font-size: 0.84rem; line-height: 1.45; }
.event-card-location { color: var(--muted); }
.event-card-nocoords { margin: 0.35rem 0 0; font-size: 0.82rem; font-weight: 700; color: #9a3412; }
.event-card-impact { color: #fb8c00; font-weight: 600; }
.event-card-time { color: var(--muted); font-size: 0.8rem; }
.admin-table .btn { padding: 0.35rem 0.75rem; }

/* 上一批遺漏的：.lane 卡片本體與 .chip 標籤。
   這兩個在 JS 裡是以樣板字串組出來的（class="lane${...}"），
   當初用正則掃 class 屬性時被整條跳過，所以沒被發現。 */

:root {
  --surface-bright: #f0fdf9;
  --teal-deep: #0f766e;
}

.lane { background: var(--green-950); border-radius: 12px; padding: 0.5rem 0.55rem; min-height: 72px; position: relative; overflow: hidden; border: 1px solid var(--line-strong); }
.lane::after { content: ""; position: absolute; inset: 18% 46%; border-left: 2px dashed rgba(13, 148, 136, 0.2); }
.lane.is-recommended { outline: 3px solid var(--red); border-color: var(--red); background: rgba(232, 90, 82, 0.12); box-shadow: 0 0 0 1px rgba(232, 90, 82, 0.35); }
.lane.is-missing-data:not(.is-recommended) { background: var(--surface-bright); }
.chip { display: inline-block; background: var(--green-950); color: var(--text-muted); border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.78rem; margin-bottom: 0.5rem; border: 1px solid var(--line-strong); }
.chip[data-cat="充電"] { background: rgba(245, 158, 11, 0.1); color: var(--gold-deep); border-color: rgba(245, 158, 11, 0.3); }
.chip[data-cat="隧道"] { background: rgba(13, 148, 136, 0.1); color: var(--teal-deep); border-color: rgba(13, 148, 136, 0.28); }
.chip[data-cat="停車"] { background: rgba(14, 165, 233, 0.1); color: var(--blue-deep); border-color: rgba(14, 165, 233, 0.28); }
.chip[data-cat="擬真圖"] { background: rgba(139, 92, 246, 0.1); color: #6d28d9; border-color: rgba(139, 92, 246, 0.28); }
.chip[data-cat="功能更新"] { background: rgba(251, 146, 60, 0.1); color: #c2410c; border-color: rgba(251, 146, 60, 0.28); }
.traffic-legend__swatch { width: 0.85rem; height: 0.85rem; border-radius: 2px; border: 1px solid var(--line-strong); flex-shrink: 0; }
.traffic-detail-panel { display: grid; gap: 0.45rem; }

.parking-map-marker--lot {
  width: 26px;
  height: 26px;
}
.parking-map-marker--lot.is-full .parking-map-marker__slot {
  border-color: #ef4444;
  background: #fff;
}
.parking-map-marker--lot .parking-map-marker__label {
  font-size: 0.62rem;
  font-weight: 800;
}

.tts-board {
  max-width: 52rem;
  display: grid;
  gap: 1.25rem;
}
.tts-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.tts-voices {
  display: grid;
  gap: 0.4rem;
  flex: 1 1 100%;
}
.tts-voices__label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--blue);
}
.tts-voices__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.tts-voice {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font: inherit;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.tts-voice:hover {
  border-color: rgba(14, 165, 233, 0.45);
  color: var(--blue-deep);
  background: var(--green-950);
}
.tts-voice.is-active {
  background: linear-gradient(160deg, var(--teal), #0f766e);
  color: #fff;
  border-color: #0f766e;
  font-weight: 600;
}
.tts-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.tts-group {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 0.4rem;
  box-shadow: var(--shadow);
}
.tts-group__title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}
.tts-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tts-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}
.tts-item__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}
.tts-play {
  flex: none;
}
.tts-reshuffle { flex: none; }
