:root {
  --bg-primary: #f5f1eb;
  --bg-secondary: #fff;
  --bg-card: #fff;
  --bg-overlay: rgba(0,0,0,0.04);
  --text-primary: #1e1812;
  --text-secondary: #5a4a3a;
  --text-muted: #8a7a6a;
  --border-color: #e0d5c7;
  --accent: #8B4513;
  --accent-light: #c8960c;
  --accent-dark: #5a2d0c;
  --tag-bg: #efe8dd;
  --tag-text: #6b5a3e;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
  --radius-sm: 4px;
  --radius-md: 8px;
  --font-heading: 'Georgia', 'Noto Serif SC', serif;
  --font-body: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
  --max-width: 1200px;
  --header-h: 50px;
  --breakpoint-sm: 540px;
  --breakpoint-md: 800px;
}

[data-theme="dark"] {
  --bg-primary: #141210;
  --bg-secondary: #1c1a16;
  --bg-card: #252118;
  --bg-overlay: rgba(255,255,255,0.03);
  --text-primary: #e8dcc8;
  --text-secondary: #c4b59a;
  --text-muted: #8a7a66;
  --border-color: #352e24;
  --accent: #d4a017;
  --accent-light: #f0c040;
  --accent-dark: #a07808;
  --tag-bg: #2a2520;
  --tag-text: #c4b59a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.5);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 15px; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.55;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dark); }

img { max-width: 100%; height: auto; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 10px; }

.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 10px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo .logo-icon { font-size: 1.5rem; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.header-nav a {
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav a.active {
  background: var(--accent);
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}

.header-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.main-content {
  flex: 1;
  padding: 8px 20px 32px;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.page-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 0.88rem;
}

.search-form {
  display: flex;
  max-width: 560px;
  margin: 0 auto;
  gap: 0;
  border: 2px solid var(--border-color);
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color var(--transition);
  box-shadow: var(--shadow-sm);
}

.search-form:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.search-form input {
  flex: 1;
  padding: 12px 18px;
  border: none;
  font-size: 1rem;
  background: transparent;
  color: var(--text-primary);
  outline: none;
  min-width: 0;
}

.search-form input::placeholder { color: var(--text-muted); }

.search-form button {
  padding: 10px 20px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.search-form button:hover {
  background: var(--accent-dark);
}

.search-results-section {
  margin-top: 24px;
}

.search-results-section .srs-heading {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 12px;
  padding: 6px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-results-section .srs-heading .srs-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: auto;
}

.search-results-section + .search-results-section {
  margin-top: 28px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  padding: 6px 0;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 1px; opacity: 0.4; }
.breadcrumb .current { color: var(--accent); font-weight: 600; }

.waterfall {
  column-width: 180px;
  column-gap: 6px;
}

.waterfall-item {
  break-inside: avoid;
  margin-bottom: 8px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  border: 1px solid var(--border-color);
  position: relative;
}

.waterfall-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--bar, var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}

.waterfall-item:hover::after { opacity: 1; }

.waterfall-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.waterfall-item .wi-header {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 8px 5px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-overlay);
}

.waterfall-item .wi-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.waterfall-item .wi-name {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: bold;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.waterfall-item .wi-cat-tag {
  font-size: 0.6rem;
  padding: 1px 6px;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.waterfall-item .wi-body { padding: 5px 8px 4px; }

.waterfall-item .wi-subtitle {
  font-size: 0.66rem;
  color: var(--text-muted);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.waterfall-item .wi-location {
  font-size: 0.66rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.waterfall-item .wi-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.waterfall-item .wi-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 0 8px 6px;
}

.waterfall-item .wi-tag {
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--tag-bg);
  color: var(--tag-text);
  white-space: nowrap;
  border: 1px solid transparent;
}

.detail-page { max-width: var(--max-width); margin: 0 auto; }

.detail-header {
  text-align: center;
  padding: 12px 0 8px;
}

.detail-header .dh-name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 2px;
}

.detail-header .dh-name-en {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.detail-header .dh-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.detail-header .dh-cat-tag {
  display: inline-block;
  color: #fff;
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.detail-header .dh-cat-tag:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.detail-header .dh-sub-tag {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  transition: all var(--transition);
  white-space: nowrap;
  margin-left: 2px;
}

.detail-header .dh-sub-tag:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.detail-header .dh-loc-text {
  color: var(--text-secondary);
}

.detail-header .dh-loc-text a {
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition);
  text-decoration: none;
}

.detail-header .dh-loc-text a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.detail-section {
  margin-bottom: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.detail-section:hover { box-shadow: var(--shadow-md); }

.detail-section .ds-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-section .ds-title .ds-icon { font-size: 1.2rem; }

.detail-section p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
  font-size: 0.92rem;
}

.detail-section p:last-child { margin-bottom: 0; }

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.detail-tag {
  padding: 4px 12px;
  border-radius: 16px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.detail-tag::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  transition: opacity var(--transition);
}

.detail-tag:hover {
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  opacity: 0.08;
  transition: all var(--transition);
}

.category-card:hover::before { transform: scale(2.5); }

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.category-card .cc-icon { font-size: 2rem; margin-bottom: 6px; }

.category-card .cc-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.category-card .cc-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.category-card .cc-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tag-group { margin-bottom: 16px; }

.tag-group-header,
.section-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-bottom: 8px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.tag-group-header .tgh-label,
.section-group-header .sgh-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.tag-group-header .tgh-count,
.section-group-header .sgh-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

.section-group-header .sgh-arrow {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.15s;
}
.section-group-header.clickable:hover .sgh-arrow {
  transform: translateX(3px);
  color: var(--bg-primary);
}

.section-group { margin-bottom: 20px; }

.section-group-header.clickable {
  cursor: pointer;
  transition: background 0.15s;
}
.section-group-header.clickable:hover {
  background: var(--accent);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 16px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid;
  white-space: nowrap;
}

.tag-chip:hover {
  transform: translateY(-1px);
  filter: brightness(0.9);
  box-shadow: var(--shadow-sm);
}

.tag-chip .tc-icon { font-size: 0.85rem; flex-shrink: 0; }

.tag-chip .tc-name { font-weight: 500; }

.tag-chip .tc-count {
  font-size: 0.6rem;
  opacity: 0.7;
  background: currentColor;
  color: #fff;
  border-radius: 8px;
  padding: 0px 5px;
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
}

.route-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.route-info-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border: 1px solid var(--border-color);
}

.route-info-card.route-info-full { grid-column: 1 / -1; }

.route-info-card .ric-links {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ric-link-btn {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.ric-link-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.ric-link-dy:hover { background: #111; color: #fff; border-color: #111; }
.ric-link-bl:hover { background: #fb7299; color: #fff; border-color: #fb7299; }
.ric-link-xs:hover { background: #ff2442; color: #fff; border-color: #ff2442; }

.route-info-card .ric-label {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 4px;
}

.route-info-card .ric-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.route-detail { max-width: 100%; margin: 0 auto; }

.route-detail-header {
  text-align: center;
  padding: 12px 0 8px;
}

.route-detail-header .rdh-icon { font-size: 2.2rem; margin-bottom: 4px; }

.route-detail-header .rdh-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.route-detail-header .rdh-subtitle {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Teahouse Detail */
.teahouse-detail { max-width: 100%; margin: 0 auto; }

.teahouse-detail .route-detail-header { padding: 12px 0 8px; }

.th-body {
  padding: 0 12px 16px;
}

.th-tags-section { margin-top: 12px; }

.th-section-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-color);
}

.th-timeline {
  position: relative;
  padding-left: 24px;
  margin: 8px 0 4px;
}

.th-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border-color);
  border-radius: 1px;
}

.th-timeline-item {
  position: relative;
  padding-bottom: 14px;
}

.th-timeline-item:last-child {
  padding-bottom: 0;
}

.th-timeline-marker {
  position: absolute;
  left: -20px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--accent);
  z-index: 1;
}

.th-timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.th-timeline-card:hover {
  box-shadow: var(--shadow-md);
}

.th-timeline-period {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 2px;
  letter-spacing: 0.01em;
}

.th-timeline-title {
  font-weight: 600;
  font-size: 0.85rem;
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-bottom: 3px;
}

.th-timeline-content {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.th-tags-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.th-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.th-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.th-tag:hover {
  filter: brightness(0.9);
  transform: translateY(-1px);
}

.route-story-block {
  padding: 8px 10px;
  margin-bottom: 6px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.route-story-block:hover { box-shadow: var(--shadow-md); }

.route-story-block .rsb-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}

.route-story-block .rsb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.route-story-block .rsb-label {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

.route-story-block p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.82rem;
  margin-bottom: 0;
}

.route-related-teas { margin-top: 16px; }

.route-map {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.route-map .rm-header {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rm-header .rm-distance-label {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

.elevation-container {
  display: flex;
  gap: 0;
  padding: 0 16px 8px;
  align-items: stretch;
}

.elevation-chart {
  flex: 1;
  min-width: 0;
  display: block;
  height: auto;
}

.ec-legend {
  width: 120px;
  flex-shrink: 0;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-self: flex-start;
  margin-top: 8px;
}

.ec-l-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}

.ec-l-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.ec-l-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.ec-l-label { white-space: nowrap; }

.satellite-map-section {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.satellite-map-section .sms-header {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.satellite-map-container {
  width: 100%;
  height: 480px;
  z-index: 1;
}

.map-marker-wrapper {
  background: transparent !important;
  border: none !important;
}

.map-marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.15s;
}

.map-marker:hover {
  transform: scale(1.2);
}

.map-popup-container .leaflet-popup-content-wrapper {
  border-radius: var(--radius-md);
  padding: 0;
  box-shadow: var(--shadow-lg);
}

.map-popup-container .leaflet-popup-content {
  margin: 0;
  font-family: var(--font-body);
}

.map-popup {
  padding: 12px 14px;
  min-width: 220px;
}

.map-popup .mp-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.map-popup .mp-meta {
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 2px;
}

.map-popup .mp-road {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.map-popup .mp-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: var(--breakpoint-sm)) {
  .satellite-map-container {
    height: 320px;
  }
}

.rm-timeline { padding: 0 16px 16px; }

.rm-station {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 6px;
}

.rm-station:last-child { padding-bottom: 0; }

.rm-station .rms-line {
  width: 28px;
  position: relative;
  flex-shrink: 0;
  min-height: 100%;
}

.rm-station .rms-line::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% - 4px);
  background: var(--rc, #8B4513);
}

.rm-station:last-child .rms-line::before { display: none; }

.rm-station .rms-dot {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rc, #8B4513);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  box-shadow: 0 0 0 3px var(--bg-card), 0 0 0 5px rgba(0,0,0,0.1);
}

.rms-dot .rms-num {
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.rm-station .rms-content {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
  padding-bottom: 14px;
}

.rm-station:last-child .rms-content { padding-bottom: 0; }

.rms-content .rms-name {
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font-heading);
  margin-bottom: 2px;
}

.rms-content .rms-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.rms-meta .rms-dist {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
}

.rms-meta .rms-alt {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.rms-content .rms-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.route-tea-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 12px 0;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.route-tea-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.route-tea-card .rtc-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}

.route-tea-card .rtc-info { flex: 1; min-width: 0; }

.rtc-info .rtc-name {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.rtc-info .rtc-cat {
  display: inline-block;
  font-size: 0.65rem;
  color: #fff;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 4px;
}

.rtc-info .rtc-loc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.rtc-info .rtc-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 18px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.site-footer .footer-brand {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 4px;
}

.home-section-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  text-align: center;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.home-section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent-light);
  margin: 6px auto 0;
  border-radius: 1px;
  opacity: 0.7;
}

@media (max-width: var(--breakpoint-md)) {
  .category-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .detail-header .dh-name { font-size: 1.4rem; }
}

@media (max-width: var(--breakpoint-sm)) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 8px 10px; gap: 6px; }
  .site-logo { font-size: 1.1rem; }
  .header-nav a { font-size: 0.72rem; padding: 3px 8px; }
  .page-title { font-size: 1.3rem; }
  .detail-header .dh-name { font-size: 1.2rem; }
  .detail-section { padding: 12px 14px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .search-form { max-width: 100%; }
  .rm-station { gap: 8px; }
  .rms-content .rms-desc { font-size: 0.75rem; }
}
