:root {
  --orange: #D24119;
  --orange2: #CF7D00;
  --teal: #1BA0AB;
  --green: #4A7759;
  --dark: #434344;
  --black: #1a1a1a;
  --white: #ffffff;
  --bg-soft: #f7f5f3;
  --border: #e8e4df;
  --text-muted: #8a8480;
  --fs-base: 1rem;
  --fs-sm: 0.9rem;
}

/* 注意：
 * 站台既有 `vnstyle.css` 已定義 `.page-title`（橘色置中）。
 * 這支檔案不要覆蓋 `.page-title`，避免 International 頁面標題樣式跑掉。
 */

/* ─── 地區篩選列 ─── */
.filter-bar {
  padding: 1rem 0 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.region-tabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.region-tabs::-webkit-scrollbar {
  display: none;
}
.rtab {
  flex-shrink: 0;
  padding: 0.32rem 1rem;
  border-radius: 20px;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  color: var(--dark);
  background: var(--white);
  transition: all 0.18s;
  font-family: inherit;
}
.rtab:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.rtab.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* ─── 路線卡片列 ─── */
.route-strip-wrap {
  position: relative;
  margin-bottom: 1rem;
}
.route-strip {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.2rem 0 0.6rem;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.route-strip::-webkit-scrollbar {
  display: none;
}
.strip-arrow {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--dark);
  z-index: 5;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.15s, color 0.15s;
  user-select: none;
}
.strip-arrow:hover {
  color: var(--orange);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.13);
}
.strip-arrow.left {
  left: -14px;
}
.strip-arrow.right {
  right: -14px;
}
.strip-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

.route-card {
  flex-shrink: 0;
  width: 118px;
  border-radius: 12px;
  padding: 0.75rem 0.65rem 0.7rem;
  cursor: pointer;
  background: var(--white);
  border: 2px solid var(--border);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s, opacity 0.2s;
  text-align: center;
  position: relative;
}
.route-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
.route-card.active {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.13);
  transform: translateY(-3px);
}
.route-card.dimmed {
  opacity: 0.35;
  transform: none;
  box-shadow: none;
}
.rc-badge {
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 0.5rem;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.04em;
}
.rc-name {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--black);
  line-height: 1.35;
  margin-bottom: 0.1rem;
}

/* ─── 地圖 ─── */
.map-section {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  user-select: none;
}
.map-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
  cursor: grab;
  touch-action: none;
  aspect-ratio: 3 / 2;
}
@media (max-width: 767px) {
  .map-viewport {
    aspect-ratio: unset;
    height: 100vw;
    min-height: 380px;
    max-height: 640px;
  }
}
.map-viewport.grabbing {
  cursor: grabbing;
}
#map-wrap {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}
#map-img {
  display: block;
  max-width: none;
  -webkit-user-drag: none;
}

/* ─── 地圖熱點（Hotspot） ─── */
#hotspot-layer {
  position: absolute;
  inset: 0;
  /* 預設不吃事件，讓子元素自己接 click/hover */
  pointer-events: none;
  z-index: 3;
}
.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.25s, transform 0.2s;
}
.hotspot .hotspot-dot {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Mono", monospace;
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}
.hotspot .hotspot-ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid;
  animation: ripple 2.5s ease-out infinite;
}

/* ─── ripple 動畫（地圖熱點用） ─── */
@keyframes ripple {
  0% {
    transform: scale(0.5);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}
.map-hint {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(67, 67, 68, 0.72);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.78rem;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
  transition: opacity 0.6s;
}
.zoom-controls {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
}
.zoom-controls button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  font-size: 1.05rem;
  cursor: pointer;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: color 0.15s;
  font-family: inherit;
}
.zoom-controls button:hover {
  color: var(--orange);
}

/* ─── 詳情區 ─── */
.detail-section {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  opacity: 0;
}
.detail-section.open {
  max-height: 4000px;
  opacity: 1;
}
.detail-inner {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 14px 14px;
  background: var(--white);
  padding: 1.4rem 1.5rem 1.8rem;
}
.detail-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.dh-badge {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}
.dh-title {
  flex: 1;
}
.dh-title h2 {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--black);
  margin: 0 0 0.1rem;
}
.dh-title p {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: 0;
}
.dh-close {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-family: inherit;
  flex-shrink: 0;
}
.dh-close:hover {
  background: #fff5f2;
  color: var(--orange);
  border-color: #f5c6b0;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
}
@media (max-width: 767px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}
.dp-label {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.dp-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── 路線特色 tags ─── */
.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}
.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--dark);
  border: 1px solid var(--border);
}
.feature-tag i {
  font-size: 0.8rem;
  color: var(--orange);
}

/* ─── 路線資訊連結（3 個：路線資訊 / 公車動態 / 時刻表與票價） ─── */
.route-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.route-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.route-link:hover {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--white);
}
.route-link i {
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ─── 主要景點 tags ─── */
.highlight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}
.highlight-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 0.32rem 0.75rem;
  border-radius: 6px;
  border: 1.5px solid;
  text-decoration: none;
  transition: opacity 0.15s;
}
.highlight-tag:hover {
  opacity: 0.78;
}

/* ─── 備註 ─── */
.note-box {
  font-size: var(--fs-sm);
  color: var(--dark);
  line-height: 1.75;
  padding: 0.75rem 0.9rem 0.75rem 1.1rem;
  background: var(--bg-soft);
  border-radius: 8px;
  border-left: 3px solid;
}

/* ─── 站點列表 ─── */
.stop-list {
  display: flex;
  flex-direction: column;
}
.stop-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.45rem 0;
  position: relative;
}
.stop-line {
  position: absolute;
  left: 9px;
  top: 22px;
  bottom: -4px;
  width: 2px;
  background: var(--border);
}
.stop-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  background: var(--white);
  position: relative;
  z-index: 1;
  margin-top: 1px;
}
.stop-info {
  flex: 1;
  min-width: 0;
}
.stop-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--black);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 5px;
}
.stop-bike-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
}
.stop-en {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.stop-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  padding: 0.14rem 0.45rem;
  border-radius: 4px;
  margin-top: 2px;
}

