/* ==========================================================================
   日本百名山マップ（Hyakumeizan Atlas）— Topographic Editorial Design System
   --------------------------------------------------------------------------
   Aesthetic: Japanese Topographic Cartography & Alpine Editorial Craft
   Palette  : Warm Washi Paper (#F6F4EE), Evergreen Pine Ink (#172520),
              Alpine Cedar (#1F6A4A), Autumn Larch Terracotta (#C45D27)
   ========================================================================== */

:root {
  /* Light Theme (Default — Topographic Washi Paper) */
  --bg: #f6f4ee;
  --bg-subtle: #edeae0;
  --surface: #ffffff;
  --surface-elevated: #fcfbf8;
  --surface-glass: rgba(252, 251, 248, 0.92);
  --border: rgba(23, 37, 32, 0.12);
  --border-strong: rgba(23, 37, 32, 0.22);

  --ink: #172520;
  --ink-secondary: #43544c;
  --ink-muted: #65766e;

  --accent: #1f6a4a;
  --accent-hover: #175339;
  --accent-soft: rgba(31, 106, 74, 0.11);
  --accent-ink: #ffffff;

  --terracotta: #c45d27;
  --terracotta-soft: rgba(196, 93, 39, 0.12);

  /* Hypsometric Elevation Tier Colors */
  --tier-3000: #b83b28;
  --tier-2500: #c76921;
  --tier-2000: #1f6a4a;
  --tier-1500: #2b6b8e;
  --tier-low: #7d693d;
  --climbed-gold: #c98f12;
  --climbed-soft: rgba(201, 143, 18, 0.15);

  --alert-bg: #fdf4eb;
  --alert-border: rgba(196, 93, 39, 0.34);
  --alert-ink: #8f3d13;

  --live-green: #1e8f55;
  --fallback-amber: #c77b1a;

  --shadow-xs: 0 1px 2px rgba(18, 30, 26, 0.06);
  --shadow-sm: 0 3px 10px rgba(18, 30, 26, 0.07);
  --shadow-md: 0 10px 28px rgba(18, 30, 26, 0.12);
  --shadow-lg: 0 18px 46px rgba(18, 30, 26, 0.18);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --font-serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --header-h: 60px;
  --container-max: 1220px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  /* Dark Theme — Deep Alpine Night (Evergreen Slate, Zero Purple) */
  --bg: #0f1714;
  --bg-subtle: #15211d;
  --surface: #182520;
  --surface-elevated: #1e2e28;
  --surface-glass: rgba(22, 34, 30, 0.92);
  --border: rgba(226, 238, 232, 0.12);
  --border-strong: rgba(226, 238, 232, 0.24);

  --ink: #ecf2ee;
  --ink-secondary: #b7c7bf;
  --ink-muted: #84998f;

  --accent: #3ea878;
  --accent-hover: #4ec08c;
  --accent-soft: rgba(62, 168, 120, 0.18);
  --accent-ink: #08150f;

  --terracotta: #e37e49;
  --terracotta-soft: rgba(227, 126, 73, 0.18);

  --tier-3000: #e05b46;
  --tier-2500: #e6893e;
  --tier-2000: #3ea878;
  --tier-1500: #559bc4;
  --tier-low: #b89f63;
  --climbed-gold: #e6b235;
  --climbed-soft: rgba(230, 178, 53, 0.18);

  --alert-bg: rgba(227, 126, 73, 0.14);
  --alert-border: rgba(227, 126, 73, 0.38);
  --alert-ink: #f4b28a;

  --live-green: #38c97a;
  --fallback-amber: #e2a23b;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.36);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 20px 54px rgba(0, 0, 0, 0.62);
}

/* ==========================================================================
   Reset & Base Typography
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ==========================================================================
   Sticky Top Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  height: var(--header-h);
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: var(--shadow-xs);
}

.brand-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.header-utilities {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease), color 0.16s var(--ease);
}

.header-pill:hover {
  border-color: var(--border-strong);
  color: var(--ink);
  transform: translateY(-1px);
}

.header-pill .pill-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink);
}

.header-pill.is-climb svg {
  color: var(--climbed-gold);
}

.vc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-muted);
  flex-shrink: 0;
}

.vc-dot.is-live {
  background: var(--live-green);
}

.vc-dot.is-fallback {
  background: var(--fallback-amber);
}

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-icon.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.mobile-menu-btn {
  display: none;
}

.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 1190;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 12px 18px 16px;
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-drawer-links a {
  text-decoration: none;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.25;
  white-space: nowrap;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease), transform 0.16s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-terracotta {
  background: var(--terracotta);
  color: #ffffff;
  border-color: var(--terracotta);
}

.btn-terracotta:hover {
  filter: brightness(0.92);
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12px;
}

/* ==========================================================================
   Primary Interactive Map Workspace (Split Screen Above the Fold)
   ========================================================================== */
.map-workspace {
  display: grid;
  grid-template-columns: 386px minmax(0, 1fr);
  height: calc(100vh - var(--header-h));
  min-height: 610px;
  max-height: 920px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

/* Left Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
  background: var(--surface-elevated);
}

.sidebar-top {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 92% 14%, var(--accent-soft), transparent 55%),
    var(--surface);
}

.sidebar-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.sidebar-h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  color: var(--ink);
}

.sidebar-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.sidebar-lead {
  margin: 0 0 11px;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* Search Input */
.search-box {
  position: relative;
  margin-bottom: 9px;
}

.search-box svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 34px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  font-size: 13px;
  color: var(--ink);
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

.search-clear-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.search-clear-btn:hover {
  background: var(--bg-subtle);
  color: var(--ink);
}

/* Quick Filter Chips */
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 9px;
}

.chip {
  height: 26px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Filter Selects Grid */
.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.filter-select {
  height: 31px;
  width: 100%;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

.list-meta-row {
  padding: 7px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.reset-filters-link {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--terracotta);
  text-decoration: underline;
}

/* Scrollable Mountain List */
.mountain-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mountain-list::-webkit-scrollbar {
  width: 6px;
}

.mountain-list::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.m-card {
  position: relative;
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 11px 9px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  width: 100%;
  transition: border-color 0.16s var(--ease), transform 0.14s var(--ease), box-shadow 0.16s var(--ease), background 0.16s var(--ease);
}

.m-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
  transform: translateY(-1px);
}

.m-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-sm);
}

.m-card-tier-bar {
  width: 4px;
  height: 100%;
  min-height: 44px;
  border-radius: 3px;
  background: var(--tier-2000);
}

.m-card-body {
  min-width: 0;
}

.m-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.m-card-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.m-card-name {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.m-card-climbed-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--climbed-gold);
  background: var(--climbed-soft);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

.m-card-alert-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--terracotta);
  flex-shrink: 0;
}

.m-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.m-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.m-card-elev {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.m-card-dist {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.empty-state {
  padding: 36px 18px;
  text-align: center;
  color: var(--ink-muted);
}

.empty-state p {
  margin: 0 0 12px;
}

/* Sidebar Subtle Sponsor Strip (HisatorNotebook PR) */
.sidebar-ad-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  transition: background 0.16s var(--ease);
}

.sidebar-ad-strip:hover {
  background: var(--accent-soft);
}

.sidebar-ad-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.sidebar-ad-text {
  min-width: 0;
  flex: 1;
  line-height: 1.3;
}

.sidebar-ad-head {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sidebar-ad-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--terracotta);
  background: var(--terracotta-soft);
  padding: 1px 5px;
  border-radius: 4px;
}

.sidebar-ad-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.sidebar-ad-sub {
  font-size: 11px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.sidebar-ad-arrow {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-muted);
  flex-shrink: 0;
}

/* ==========================================================================
   Map Stage & Overlays
   ========================================================================== */
.map-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--bg-subtle);
  overflow: hidden;
}

#hyakumeizan-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.leaflet-container {
  background: var(--bg-subtle);
  font-family: var(--font-sans);
}

[data-theme="dark"] .map-stage.is-darkable-tiles .leaflet-tile-pane {
  filter: invert(0.92) hue-rotate(180deg) saturate(0.72) brightness(0.92) contrast(0.96);
}

.leaflet-control-zoom {
  border: 1px solid var(--border-strong) !important;
  box-shadow: var(--shadow-xs) !important;
}

.leaflet-control-zoom a {
  background: var(--surface-glass) !important;
  color: var(--ink) !important;
  border-bottom-color: var(--border) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}

.leaflet-control-attribution {
  background: var(--surface-glass) !important;
  color: var(--ink-muted) !important;
  font-size: 10.5px !important;
}

.leaflet-control-attribution a {
  color: var(--accent) !important;
}

/* Floating Region Quick-Jump Bar */
.map-region-bar {
  position: absolute;
  top: 12px;
  left: 52px;
  right: 16px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  pointer-events: none;
}

.map-region-bar::-webkit-scrollbar {
  display: none;
}

.region-pill {
  pointer-events: auto;
  flex-shrink: 0;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}

.region-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.region-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Floating Map Controls Bar (Bottom-Left) */
.map-bottom-dock {
  position: absolute;
  left: 12px;
  bottom: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  pointer-events: none;
}

.map-control-group {
  pointer-events: auto;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.map-ctrl-btn {
  height: 27px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.map-ctrl-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.map-ctrl-btn.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.map-legend {
  pointer-events: auto;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 6px 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-secondary);
  box-shadow: var(--shadow-xs);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-tri {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid currentColor;
  display: inline-block;
}

/* Custom Leaflet Mountain Marker */
.peak-marker-wrap {
  background: transparent;
  border: 0;
}

.peak-pin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: transform 0.16s var(--ease);
  filter: drop-shadow(0 2px 4px rgba(15, 25, 20, 0.32));
}

.peak-pin:hover,
.peak-pin.is-selected {
  transform: scale(1.24) translateY(-2px);
  z-index: 900;
}

.peak-pin.is-selected::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2.5px solid var(--terracotta);
  animation: peakRing 1.4s ease-out infinite;
}

@keyframes peakRing {
  0% {
    transform: scale(0.85);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.peak-pin-label {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(252, 251, 248, 0.94);
  border: 1px solid rgba(23, 37, 32, 0.2);
  color: #172520;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}

.leaflet-tooltip.peak-tooltip {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 5px 9px;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-sans);
  font-size: 12px;
}

.leaflet-tooltip.peak-tooltip::before {
  display: none;
}

/* Custom MarkerCluster Styling */
.hyaku-cluster {
  background: rgba(31, 106, 74, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hyaku-cluster-inner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #1f6a4a;
  color: #ffffff;
  border: 2px solid #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   Slide-Over Mountain Detail Sheet
   ========================================================================== */
.detail-sheet {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(410px, calc(100% - 24px));
  z-index: 650;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s var(--ease), opacity 0.22s var(--ease);
}

.detail-sheet.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.detail-header {
  padding: 15px 16px 13px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.detail-book-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  color: #ffffff;
}

.detail-region-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.detail-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.detail-sub {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--ink-muted);
}

.detail-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--ink-secondary);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-close-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.detail-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.detail-stat-box {
  padding: 9px 10px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.detail-stat-label {
  display: block;
  font-size: 10.5px;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.detail-stat-val {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.detail-stat-sub {
  display: block;
  font-size: 10.5px;
  color: var(--ink-secondary);
}

/* Elevation Comparison Bar */
.elev-compare-box {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
}

.elev-compare-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.elev-track {
  position: relative;
  height: 9px;
  border-radius: 5px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.elev-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.35s var(--ease);
}

.elev-avg-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--ink);
  opacity: 0.45;
}

/* Volcano / Trail Regulation Alert */
.volcano-alert {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--alert-bg);
  border: 1px solid var(--alert-border);
  color: var(--alert-ink);
  font-size: 12px;
  line-height: 1.55;
}

.volcano-alert strong {
  display: block;
  margin-bottom: 2px;
}

/* Climb Toggle & Personal Log Box */
.climb-log-box {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
}

.climb-toggle-btn {
  width: 100%;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.climb-toggle-btn:hover {
  border-color: var(--climbed-gold);
}

.climb-toggle-btn.is-climbed {
  background: var(--climbed-gold);
  border-color: var(--climbed-gold);
  color: #ffffff;
}

.climb-note-fields {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 7px;
}

.climb-input {
  height: 32px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  color: var(--ink);
}

.detail-summary {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-secondary);
}

.detail-kv-list {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
  font-size: 12.5px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.detail-kv-list dt {
  color: var(--ink-muted);
  font-weight: 600;
}

.detail-kv-list dd {
  margin: 0;
  color: var(--ink);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.detail-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.nearby-peaks-section {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.nearby-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.nearby-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nearby-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  font-size: 12.5px;
  text-align: left;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.nearby-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ==========================================================================
   Below-Map Editorial Sections
   ========================================================================== */
.section {
  padding: 58px 0;
}

.section-alt {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 26px;
}

.section-kicker {
  margin: 0 0 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: var(--ink);
}

.section-desc {
  margin: 8px 0 0;
  max-width: 680px;
  font-size: 14px;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Section 1: Elevation Skyline Chart
   ========================================================================== */
.skyline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
}

.skyline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.skyline-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skyline-hover-readout {
  font-size: 12.5px;
  color: var(--ink-secondary);
  min-height: 22px;
}

.skyline-hover-readout strong {
  color: var(--ink);
}

.skyline-stage {
  position: relative;
  height: 250px;
  padding: 18px 4px 26px 42px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  overflow-x: auto;
}

.skyline-ref-line {
  position: absolute;
  left: 42px;
  right: 8px;
  border-top: 1px dashed var(--border-strong);
  pointer-events: none;
}

.skyline-ref-label {
  position: absolute;
  left: -38px;
  top: -9px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
}

.skyline-bars {
  position: relative;
  z-index: 2;
  height: 100%;
  min-width: 720px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.skyline-bar-btn {
  flex: 1 1 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}

.skyline-bar-fill {
  width: 100%;
  min-width: 4px;
  border-radius: 3px 3px 0 0;
  transition: transform 0.14s var(--ease), filter 0.14s var(--ease);
}

.skyline-bar-btn:hover .skyline-bar-fill,
.skyline-bar-btn:focus-visible .skyline-bar-fill {
  filter: brightness(1.18);
  transform: scaleY(1.03);
  transform-origin: bottom;
}

.skyline-bar-btn.is-climbed .skyline-bar-fill {
  box-shadow: inset 0 4px 0 var(--climbed-gold);
}

.stats-row {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  padding: 15px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.stat-card-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.stat-card-val {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.stat-card-note {
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-secondary);
}

/* ==========================================================================
   HisatorNotebook Editorial Sponsor Banner (PR · 広告)
   ========================================================================== */
.sponsor-section {
  padding: 36px 0;
  background: var(--bg);
}

.sponsor-banner {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(circle at 100% 0%, var(--accent-soft), transparent 46%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.sponsor-logo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.sponsor-logo {
  width: 68px;
  height: 68px;
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
}

.sponsor-pr-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--terracotta);
  background: var(--terracotta-soft);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.sponsor-eyebrow {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.sponsor-title {
  margin: 0 0 7px;
  font-family: var(--font-serif);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.sponsor-desc {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.65;
}

.sponsor-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 16px;
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
}

.sponsor-points li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  margin-right: 6px;
}

.sponsor-cta-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  min-width: 210px;
}

.sponsor-platform-note {
  text-align: center;
  font-size: 11px;
  color: var(--ink-muted);
}

/* ==========================================================================
   Section 2: 100-Peak Climb Stampbook
   ========================================================================== */
.stamp-summary-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.stamp-overview-card,
.region-progress-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}

.stamp-rank-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.stamp-big-count {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
}

.stamp-big-count span {
  font-size: 15px;
  color: var(--ink-muted);
}

.stamp-rank-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
}

.progress-track {
  height: 10px;
  border-radius: 5px;
  background: var(--bg-subtle);
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--accent), var(--climbed-gold));
  transition: width 0.35s var(--ease);
}

.stamp-submetrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12.5px;
  color: var(--ink-secondary);
  margin-bottom: 14px;
}

.stamp-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.region-bars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 14px;
}

.reg-prog-item {
  border: 0;
  padding: 4px 0;
  background: transparent;
  text-align: left;
}

.reg-prog-head {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 4px;
}

.reg-prog-track {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.reg-prog-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

/* 100 Stamp Grid */
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 7px;
}

.stamp-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  transition: border-color 0.15s var(--ease), transform 0.14s var(--ease), background 0.15s var(--ease);
}

.stamp-cell:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.stamp-cell.is-climbed {
  background: var(--climbed-soft);
  border-color: var(--climbed-gold);
}

.stamp-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
}

.stamp-cell.is-climbed .stamp-cell-top {
  color: var(--climbed-gold);
  font-weight: 700;
}

.stamp-cell-name {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stamp-cell-elev {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Section 3: Fukada Kyuya Guide & Theme Presets
   ========================================================================== */
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  margin-bottom: 28px;
}

.guide-art-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}

.guide-art-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.criteria-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.criteria-item {
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.criteria-item h3 {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink);
}

.criteria-item p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.preset-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.preset-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.preset-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--terracotta);
}

.preset-title {
  margin: 4px 0 6px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.preset-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.preset-cta {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

/* ==========================================================================
   Section 4: Hyakumeizan Quiz
   ========================================================================== */
.quiz-card {
  max-width: 780px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.quiz-question {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quiz-opt-btn {
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  text-align: left;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.quiz-opt-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.quiz-opt-btn.is-correct {
  background: rgba(31, 106, 74, 0.16);
  border-color: var(--accent);
  color: var(--accent);
}

.quiz-opt-btn.is-wrong {
  background: rgba(184, 59, 40, 0.14);
  border-color: var(--tier-3000);
  color: var(--tier-3000);
}

.quiz-feedback {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.quiz-feedback-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   Site Footer & Live Visitor Counter Card
   ========================================================================== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 44px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

.footer-brand-desc {
  margin: 12px 0 8px;
  font-size: 13px;
  color: var(--ink-secondary);
  max-width: 560px;
}

.footer-disclaimer {
  margin: 0;
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* Visitor Counter Card */
.visitor-counter-card {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-xs);
}

.vc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.vc-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}

.vc-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ink-muted);
}

.vc-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.vc-metric-box {
  padding: 10px 11px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.vc-metric-label {
  display: block;
  font-size: 10.5px;
  color: var(--ink-muted);
  margin-bottom: 3px;
}

.vc-metric-val {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.vc-metric-val.is-accent {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  text-decoration: none;
  color: var(--ink-secondary);
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Toast Notification */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(16px);
  z-index: 2000;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--surface);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1120px) {
  .site-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .presets-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 960px) {
  .map-workspace {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    min-height: 0;
  }

  .map-stage {
    order: 1;
    height: 58vh;
    min-height: 410px;
  }

  .sidebar {
    order: 2;
    border-right: 0;
    border-top: 1px solid var(--border);
  }

  .mountain-list {
    max-height: 420px;
  }

  .sponsor-banner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .sponsor-logo-col {
    flex-direction: row;
    justify-content: flex-start;
  }

  .stamp-summary-bar,
  .guide-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .header-inner {
    padding: 0 12px;
  }

  .brand-sub {
    display: none;
  }

  .header-pill .pill-label {
    display: none;
  }

  .detail-sheet {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-height: 82%;
    transform: translateY(calc(100% + 24px));
  }

  .detail-sheet.is-open {
    transform: translateY(0);
  }

  .map-legend {
    display: none;
  }

  .sponsor-points,
  .presets-grid,
  .quiz-options,
  .region-bars-grid,
  .vc-metrics {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .quiz-card {
    padding: 20px 18px;
  }
}
