/* ==========================================================================
   Campo Fiore - Okayama Birds Sanctuary Interactive Map
   ========================================================================== */

:root {
  --map-bg: #0b1013;
  --map-card-bg: rgba(18, 25, 29, 0.78);
  --map-card-hover: rgba(26, 36, 42, 0.92);
  --map-border: rgba(212, 175, 55, 0.22);
  --map-border-active: rgba(212, 175, 55, 0.75);
  
  --color-gold: #d4af37;
  --color-gold-light: #f5da88;
  --color-gold-glow: rgba(212, 175, 55, 0.4);
  
  --color-bitchu: #38bdf8;
  --color-bitchu-glow: rgba(56, 189, 248, 0.45);
  
  --color-bizen: #fbbf24;
  --color-bizen-glow: rgba(251, 191, 36, 0.45);
  
  --color-mimasaka: #34d399;
  --color-mimasaka-glow: rgba(52, 211, 153, 0.45);
  
  --spring-color: #f472b6;
  --summer-color: #34d399;
  --autumn-color: #fb923c;
  --winter-color: #60a5fa;

  --panel-width: 440px;
}

html {
  height: 100%;
  overflow: hidden;
}

body.birds-map-body {
  background-color: var(--map-bg);
  color: #f0f4f6;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
}

/* Background Ambient Canvas */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

/* Header */
.map-header {
  flex-shrink: 0;
  position: relative;
  z-index: 50;
  background: rgba(11, 16, 19, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--map-border);
  padding: 10px 24px;
}

.map-header-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.map-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.map-brand-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-normal);
}

.map-brand-back:hover {
  color: #fff;
  border-color: var(--color-gold);
  background: rgba(212, 175, 55, 0.12);
  transform: translateX(-3px);
}

.map-nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-gold-light);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--color-gold);
  text-decoration: none;
  transition: var(--transition-normal);
  white-space: nowrap;
}

.map-nav-link-btn:hover {
  color: #0b1013;
  background: var(--color-gold);
  box-shadow: 0 0 12px var(--color-gold-glow);
  transform: translateY(-1px);
}

.map-title-wrap {
  display: flex;
  flex-direction: column;
}

.map-site-title {
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #fff;
}

.map-site-sub {
  font-size: 0.75rem;
  color: var(--color-gold-light);
  letter-spacing: 0.1em;
}

.map-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
}

.icon-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--color-gold);
  color: var(--color-gold-light);
  transform: translateY(-2px);
}

.icon-btn.active {
  background: rgba(212, 175, 55, 0.3);
  border-color: var(--color-gold);
  color: var(--color-gold-light);
  box-shadow: 0 0 12px var(--color-gold-glow);
}

/* Mobile Hamburger Toggle Button (Hidden on Desktop) */
.map-menu-toggle {
  display: none;
}

/* Mobile Navigation Drawer */
.map-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 12, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.map-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.map-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 290px;
  max-width: 82vw;
  background: linear-gradient(180deg, #131b22 0%, #0c1116 100%);
  border-left: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: -12px 0 35px rgba(0, 0, 0, 0.75);
  z-index: 1101;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
}

.map-drawer.active {
  transform: translateX(0);
}

.map-drawer .drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
}

.map-drawer .drawer-brand-wrap {
  display: flex;
  flex-direction: column;
}

.map-drawer .drawer-brand-title {
  font-family: var(--font-en);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
}

.map-drawer .drawer-brand-sub {
  font-size: 0.65rem;
  color: var(--color-gold-light);
  letter-spacing: 0.08em;
}

.map-drawer .drawer-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-drawer .drawer-close:hover {
  background: rgba(212, 175, 55, 0.25);
  color: var(--color-gold);
}

.map-drawer .drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.map-drawer .drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.03);
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.map-drawer .drawer-nav-item:hover {
  background: rgba(212, 175, 55, 0.15);
  color: #fff;
  transform: translateX(3px);
}

.map-drawer .drawer-nav-item.active {
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid var(--color-gold);
  color: var(--color-gold-light);
  font-weight: 600;
}

.map-drawer .drawer-nav-icon {
  font-size: 1.1rem;
}

.map-drawer .drawer-bottom {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.map-drawer .drawer-legal-info {
  margin-bottom: 12px;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.map-drawer .drawer-legal-title {
  font-weight: 600;
  color: var(--color-gold-light, #ffd572);
  margin-bottom: 4px;
  font-size: 0.75rem;
}

.map-drawer .drawer-legal-item {
  margin-bottom: 2px;
}

.map-drawer .drawer-legal-item a {
  color: var(--color-gold-light, #ffd572);
  text-decoration: underline;
}

.map-drawer .drawer-legal-sub {
  margin-top: 4px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.45);
}

.map-drawer .drawer-copy {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* Data Verification Notice Banner */
.data-notice-banner {
  flex-shrink: 0;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.16) 0%, rgba(217, 119, 6, 0.12) 50%, rgba(180, 83, 9, 0.16) 100%);
  border-bottom: 1px solid rgba(245, 158, 11, 0.4);
  color: #fef3c7;
  padding: 8px 20px;
  position: relative;
  z-index: 48;
  font-size: 0.82rem;
  line-height: 1.5;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease;
}

.notice-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.notice-icon {
  flex-shrink: 0;
  color: #fbbf24;
  display: flex;
  align-items: center;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
}

.notice-content {
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.notice-title {
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.notice-text {
  color: #fde68a;
  opacity: 0.95;
}

.notice-close-btn {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fef3c7;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  line-height: 1;
}

.notice-close-btn:hover {
  background: rgba(251, 191, 36, 0.3);
  color: #fff;
  border-color: #fbbf24;
}

.bird-modal-notice {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  font-size: 0.78rem;
  color: #fde68a;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* Control Bar: Seasons, Months, Search */
.map-controls-bar {
  background: rgba(14, 20, 24, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 24px;
  flex-shrink: 0;
  position: relative;
  z-index: 45;
  backdrop-filter: blur(12px);
}

.controls-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

/* Mobile View Switcher - Hidden on PC/Desktop */
.mobile-view-tabs {
  display: none;
}

/* Season Tabs */
.season-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.season-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.season-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.season-btn.active[data-season="all"] {
  background: rgba(212, 175, 55, 0.25);
  color: var(--color-gold-light);
  border: 1px solid var(--color-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.season-btn.active[data-season="spring"] {
  background: rgba(244, 114, 182, 0.22);
  color: #fbcfe8;
  border: 1px solid var(--spring-color);
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.3);
}

.season-btn.active[data-season="summer"] {
  background: rgba(52, 211, 153, 0.22);
  color: #a7f3d0;
  border: 1px solid var(--summer-color);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
}

.season-btn.active[data-season="autumn"] {
  background: rgba(251, 146, 60, 0.22);
  color: #fed7aa;
  border: 1px solid var(--autumn-color);
  box-shadow: 0 0 10px rgba(251, 146, 60, 0.3);
}

.season-btn.active[data-season="winter"] {
  background: rgba(96, 165, 250, 0.22);
  color: #bfdbfe;
  border: 1px solid var(--winter-color);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

/* Month Bar */
.months-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 2px;
}

.month-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.month-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.month-btn.active {
  background: var(--color-gold);
  color: #0b1013;
  font-weight: 600;
  box-shadow: 0 0 10px var(--color-gold-glow);
}

/* Search Box */
.map-search-box {
  position: relative;
  min-width: 220px;
}

.map-search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 6px 14px 6px 36px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-normal);
}

.map-search-input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 12px var(--color-gold-glow);
  background: rgba(0, 0, 0, 0.6);
}

.map-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

/* Main Layout Container */
.map-main-layout {
  flex: 1;
  display: flex;
  position: relative;
  height: 0;
  min-height: 0;
  overflow: hidden;
  z-index: 10;
}

/* Map Viewport Area */
.map-viewport {
  flex: 1;
  height: 100%;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(20, 30, 36, 0.6) 0%, rgba(11, 16, 19, 0.95) 100%);
  touch-action: none;
  overscroll-behavior: contain;
}

#okayama-svg-map {
  width: 100%;
  height: 100%;
  max-height: 100%;
  user-select: none;
  cursor: grab;
  transition: transform 0.1s ease-out;
}

#okayama-svg-map:active {
  cursor: grabbing;
}

/* Map Floating UI Controls */
.map-floating-controls {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  z-index: 20;
  pointer-events: none;
  max-width: calc(100% - 32px);
}

.map-floating-controls > * {
  pointer-events: auto;
}

.map-breadcrumbs {
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(12, 19, 24, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 5px 12px;
  border-radius: 18px;
  font-size: 0.8rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crumb-btn {
  background: none;
  border: none;
  color: var(--color-gold-light);
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.crumb-btn:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.crumb-separator {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.75rem;
  margin: 0 1px;
}

.crumb-current {
  color: #fff;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Region Switcher Pills */
.region-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(12, 19, 24, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 4px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  max-width: 100%;
}

.pill-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.pill-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.pill-btn.active {
  color: #fff;
  font-weight: 600;
}

.pill-btn[data-region="all"].active {
  background: rgba(212, 175, 55, 0.25);
  border: 1px solid var(--color-gold);
  color: var(--color-gold-light);
}

.pill-btn[data-region="bitchu"].active {
  background: rgba(56, 189, 248, 0.25);
  border: 1px solid var(--color-bitchu);
  color: #7dd3fc;
}

.pill-btn[data-region="bizen"].active {
  background: rgba(251, 191, 36, 0.25);
  border: 1px solid var(--color-bizen);
  color: #fde68a;
}

.pill-btn[data-region="mimasaka"].active {
  background: rgba(52, 211, 153, 0.25);
  border: 1px solid var(--color-mimasaka);
  color: #6ee7b7;
}

.pill-badge {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
}

/* Map Zoom & Reset Tools */
.map-view-tools {
  position: absolute;
  bottom: 24px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
}

.tool-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(14, 21, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.tool-btn:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--color-gold);
  color: var(--color-gold-light);
  transform: translateY(-2px);
}

/* Map Legend */
.map-legend {
  position: absolute;
  bottom: 24px;
  right: calc(var(--panel-width) + 20px);
  background: rgba(14, 21, 25, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 20;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.map-main-layout.panel-collapsed .map-legend {
  right: 20px;
}

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

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.bitchu { background: var(--color-bitchu); box-shadow: 0 0 8px var(--color-bitchu-glow); }
.legend-dot.bizen { background: var(--color-bizen); box-shadow: 0 0 8px var(--color-bizen-glow); }
.legend-dot.mimasaka { background: var(--color-mimasaka); box-shadow: 0 0 8px var(--color-mimasaka-glow); }

/* SVG Map Styles */
.svg-city-path {
  fill: rgba(25, 34, 40, 0.65);
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 0.8;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.svg-city-path:hover {
  fill: rgba(45, 60, 70, 0.85);
  stroke: rgba(212, 175, 55, 0.6);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.3));
}

/* Region Color Themes */
.svg-city-path[data-region="備中"] {
  fill: rgba(18, 42, 58, 0.55);
  stroke: rgba(56, 189, 248, 0.22);
}
.svg-city-path[data-region="備中"]:hover,
.region-highlight-bitchu .svg-city-path[data-region="備中"] {
  fill: rgba(28, 64, 88, 0.75);
  stroke: rgba(56, 189, 248, 0.8);
  stroke-width: 1.4;
}

.svg-city-path[data-region="備前"] {
  fill: rgba(54, 44, 18, 0.55);
  stroke: rgba(251, 191, 36, 0.22);
}
.svg-city-path[data-region="備前"]:hover,
.region-highlight-bizen .svg-city-path[data-region="備前"] {
  fill: rgba(84, 68, 26, 0.75);
  stroke: rgba(251, 191, 36, 0.8);
  stroke-width: 1.4;
}

.svg-city-path[data-region="美作"] {
  fill: rgba(18, 50, 36, 0.55);
  stroke: rgba(52, 211, 153, 0.22);
}
.svg-city-path[data-region="美作"]:hover,
.region-highlight-mimasaka .svg-city-path[data-region="美作"] {
  fill: rgba(28, 78, 56, 0.75);
  stroke: rgba(52, 211, 153, 0.8);
  stroke-width: 1.4;
}

/* Dimmed other regions when one is focused */
.region-focus-active .svg-city-path.dimmed {
  opacity: 0.25;
  filter: grayscale(80%);
}

/* City Labels (shown when zoomed) */
.city-label-text {
  font-family: var(--font-sans);
  font-size: 11px;
  fill: rgba(240, 244, 248, 0.8);
  text-anchor: middle;
  pointer-events: none;
  font-weight: 400;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.show-city-labels .city-label-text {
  opacity: 1;
}

/* Spot Markers on SVG */
.spot-marker-group {
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.spot-marker-group:hover {
  transform: scale(1.3);
  z-index: 50;
}

/* Dim non-selected spots when a spot is active */
.spot-selected-mode .spot-marker-group:not(.active) {
  opacity: 0.4;
  filter: grayscale(40%);
}

.spot-selected-mode .spot-marker-group:not(.active):hover {
  opacity: 1;
  filter: none;
}

.spot-pulse-ring {
  fill: none;
  stroke-width: 1.5;
  transform-origin: center;
  animation: markerPulse 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes markerPulse {
  0% {
    r: 6;
    opacity: 0.9;
  }
  70% {
    r: 24;
    opacity: 0;
  }
  100% {
    r: 24;
    opacity: 0;
  }
}

.spot-marker-pin {
  stroke-width: 2;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  transition: all 0.25s ease;
}

.spot-marker-group:hover .spot-marker-pin {
  stroke-width: 2.8;
  filter: drop-shadow(0 0 14px var(--color-gold));
}

/* Active Highlight Pin (In Spot Markers Group) */
.spot-marker-group.active {
  opacity: 1 !important;
  filter: none !important;
  transform: scale(1.45);
}

.spot-marker-group.active .spot-marker-pin {
  fill: #fff !important;
  stroke: var(--color-gold) !important;
  stroke-width: 3.5;
  filter: drop-shadow(0 0 16px var(--color-gold)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.9));
}

.spot-marker-group.active .spot-pulse-ring {
  stroke: var(--color-gold) !important;
  stroke-width: 2.5;
  animation: activePulse 1.4s cubic-bezier(0.1, 0.8, 0.2, 1) infinite;
}

@keyframes activePulse {
  0% {
    r: 8;
    opacity: 1;
    stroke-width: 3;
  }
  70% {
    r: 32;
    opacity: 0;
    stroke-width: 1;
  }
  100% {
    r: 32;
    opacity: 0;
  }
}

.spot-marker-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  fill: #fff;
  text-anchor: middle;
  pointer-events: none;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0, 0, 0, 0.9);
  transition: opacity 0.3s ease;
}

.spot-marker-group.active .spot-marker-label {
  font-weight: 700;
  fill: var(--color-gold-light);
  font-size: 12px;
}

/* Active Spot Overlay (Top-level SVG overlay group) */
#svg-active-spot-group {
  pointer-events: none;
}

.active-spot-badge-rect {
  fill: rgba(14, 21, 26, 0.95);
  stroke: var(--color-gold);
  stroke-width: 1.8;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 10px var(--color-gold-glow));
  rx: 6;
  ry: 6;
}

.active-spot-badge-text {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: central;
}

.active-spot-subtext {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  fill: var(--color-gold-light);
  text-anchor: middle;
  dominant-baseline: central;
}

/* Interactive Floating Spot Card on Map Viewport */
.map-active-spot-banner {
  position: absolute;
  bottom: 24px;
  left: 24px;
  width: 480px;
  max-width: calc(100% - 48px);
  background: rgba(11, 16, 20, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--color-gold);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 24px var(--color-gold-glow);
  border-radius: 16px;
  padding: 16px 18px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: bannerSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
}

@keyframes bannerSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spot-card-top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.spot-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.spot-card-icon {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spot-card-heading {
  flex: 1;
  min-width: 0;
}

.spot-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--color-gold-light);
  font-weight: 600;
  margin-bottom: 2px;
}

.banner-pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--color-gold);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-gold);
  animation: dotBlink 1.5s infinite;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.spot-card-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spot-card-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spot-card-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.spot-card-close-btn:hover {
  background: rgba(212, 175, 55, 0.25);
  color: var(--color-gold);
}

/* Quick Birds Carousel directly in card */
.spot-card-birds-section {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spot-card-birds-header {
  font-size: 0.76rem;
  color: #cbd5e1;
  font-weight: 600;
}

.spot-card-birds-scroll {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 4px;
}

.map-spot-bird-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 60px;
  flex-shrink: 0;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.map-spot-bird-chip:hover {
  background: rgba(212, 175, 55, 0.15);
  transform: translateY(-2px);
}

.chip-img-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: #080d11;
  border: 1px solid rgba(212, 175, 55, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chip-img-bg {
  position: absolute;
  inset: -6px;
  background-size: cover;
  background-position: center;
  filter: blur(8px) brightness(0.45) saturate(1.2);
  transform: scale(1.15);
  opacity: 0.9;
  pointer-events: none;
}

.chip-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  z-index: 1;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
}

.chip-name {
  font-size: 0.68rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58px;
  text-align: center;
}

.chip-audio-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 0.65rem;
  z-index: 2;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}

.map-spot-bird-more-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 48px;
  border-radius: 8px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--color-gold-light);
  font-size: 0.72rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.map-spot-bird-more-btn:hover {
  background: rgba(212, 175, 55, 0.25);
  color: #fff;
}

/* Actions Row */
.spot-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.banner-route-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #d4af37, #b8972e);
  color: #0b1013 !important;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
  flex: 1;
  justify-content: center;
}

.banner-route-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.55);
  filter: brightness(1.1);
}

.banner-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  font-size: 0.76rem;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex: 2;
}

.banner-detail-btn:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--color-gold);
  color: #fff;
}

/* Spot & Area Tooltip (Fixed viewport follow with boundary safety) */
.map-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  background: rgba(12, 19, 24, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.82rem;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), 0 0 16px rgba(212, 175, 55, 0.2);
  transform: translate(-50%, -100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s cubic-bezier(0.16, 1, 0.3, 1), transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.16s;
  white-space: nowrap;
  max-width: 300px;
}

.map-tooltip.visible {
  opacity: 1;
  visibility: visible;
}

.tooltip-title {
  font-weight: 600;
  color: var(--color-gold-light);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
}

.tooltip-sub {
  font-size: 0.74rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Side Panel: Discovery & Details
   ========================================================================== */
.map-side-panel {
  width: var(--panel-width);
  height: 100%;
  min-height: 0;
  background: rgba(14, 20, 24, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--map-border);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 30;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);
}

.map-main-layout.panel-collapsed .map-side-panel {
  transform: translateX(100%);
}

.panel-toggle-btn {
  position: absolute;
  top: 20px;
  left: -32px;
  width: 32px;
  height: 50px;
  background: rgba(14, 20, 24, 0.92);
  border: 1px solid var(--map-border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: var(--color-gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
  z-index: 31;
}

.panel-toggle-btn:hover {
  background: var(--map-card-hover);
  color: #fff;
  border-color: var(--color-gold);
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 12px;
}

.bottom-sheet-handle-wrap,
.sheet-expand-toggle-btn,
.mobile-panel-back-btn {
  display: none;
}

.panel-header-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  gap: 12px;
}

.panel-view-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.2);
  color: var(--color-gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.panel-content-scroll {
  flex: 1;
  height: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Custom Scrollbar */
.panel-content-scroll::-webkit-scrollbar {
  width: 6px;
}
.panel-content-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.panel-content-scroll::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}
.panel-content-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.6);
}

/* View 1: Overview Card */
.overview-hero-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--map-border);
  background: #0f1518;
}

.overview-hero-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.overview-hero-card:hover .overview-hero-img {
  transform: scale(1.04);
}

.overview-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(11,16,19,0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.overview-hero-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 4px;
}

.overview-hero-sub {
  font-size: 0.8rem;
  color: var(--color-gold-light);
}

/* 3 Regions Cards Grid in Panel */
.regions-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.region-card {
  background: var(--map-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.region-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  transition: width 0.25s ease;
}

.region-card[data-region="bitchu"]::before { background: var(--color-bitchu); }
.region-card[data-region="bizen"]::before { background: var(--color-bizen); }
.region-card[data-region="mimasaka"]::before { background: var(--color-mimasaka); }

.region-card:hover {
  background: var(--map-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.region-card:hover::before {
  width: 8px;
}

.region-card-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.region-card-info p {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.region-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.region-spot-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.region-arrow {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.region-card:hover .region-arrow {
  color: var(--color-gold);
  transform: translateX(3px);
}

/* Spot List in Region View */
.spots-list-title {
  font-size: 0.85rem;
  color: var(--color-gold-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.spots-compact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spot-compact-card {
  background: var(--map-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 14px;
}

.spot-compact-card:hover {
  background: var(--map-card-hover);
  border-color: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.spot-compact-card.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--color-gold);
}

.spot-card-icon {
  font-size: 1.5rem;
  width: 42px;
  height: 42px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spot-card-details {
  flex: 1;
  min-width: 0;
}

.spot-card-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spot-card-city {
  font-size: 0.76rem;
  color: var(--color-text-muted);
}

.spot-card-preview-birds {
  font-size: 0.74rem;
  color: var(--color-gold-light);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   View 3: Spot Detail View
   ========================================================================== */
.spot-detail-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.spot-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-gold-light);
  font-size: 0.8rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  margin-bottom: 10px;
  padding: 0;
}

.spot-detail-back:hover {
  color: #fff;
  text-decoration: underline;
}

.spot-detail-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.spot-detail-icon {
  font-size: 2rem;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--color-gold);
  border-radius: 12px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spot-detail-titles {
  flex: 1;
}

.spot-detail-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.spot-detail-location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.spot-region-tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.spot-region-tag.bitchu { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.4); }
.spot-region-tag.bizen { background: rgba(251, 191, 36, 0.2); color: #fde68a; border: 1px solid rgba(251, 191, 36, 0.4); }
.spot-region-tag.mimasaka { background: rgba(52, 211, 153, 0.2); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.4); }

.spot-city-name {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Spot Hero Photo Card */
.spot-photo-card {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  background: #141c22;
}

.spot-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.spot-photo-card:hover .spot-photo-img {
  transform: scale(1.05);
}

.spot-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 16, 19, 0.95) 0%, rgba(11, 16, 19, 0.2) 60%, rgba(0,0,0,0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;
  pointer-events: none;
}

.spot-photo-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.spot-photo-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* Route Navigation CTA Button (Google Maps) */
.spot-route-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spot-route-btn-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, #d4af37 0%, #f3cf65 50%, #b8972e 100%);
  color: #0b1013 !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35), 0 0 10px var(--color-gold-glow);
  transition: all 0.25s ease;
  cursor: pointer;
}

.spot-route-btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.55), 0 0 16px rgba(212, 175, 55, 0.8);
  filter: brightness(1.08);
}

.spot-route-btn-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 4px;
  transition: color 0.2s ease;
}

.spot-route-btn-sub:hover {
  color: var(--color-gold-light);
  text-decoration: underline;
}

/* Spot Description Section */
.spot-desc-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spot-desc-heading {
  font-size: 0.84rem;
  color: var(--color-gold-light);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.05em;
}

.spot-desc-text {
  font-size: 0.84rem;
  line-height: 1.7;
  color: #e2e8f0;
}

/* Environment Tags */
.spot-env-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.spot-tag-chip {
  font-size: 0.72rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--color-gold-light);
  padding: 3px 8px;
  border-radius: 12px;
}

/* Access / Location Info Box */
.spot-access-box {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--color-gold);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spot-access-title {
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Season / Month Birds Section */
.spot-birds-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-label-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-label-bar h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.season-indicator-pill {
  font-size: 0.74rem;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 500;
}

/* Bird Cards Grid */
.bird-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.bird-item-card {
  background: var(--map-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.25s ease;
}

.bird-item-card:hover {
  background: var(--map-card-hover);
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateX(3px);
}

.bird-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bird-item-icon {
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bird-item-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
}

.bird-item-feature {
  font-size: 0.74rem;
  color: var(--color-text-muted);
}

.bird-item-type {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-gold-light);
  white-space: nowrap;
}

/* 12-Month Matrix / Timeline */
.twelve-months-section {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
}

.twelve-months-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-gold-light);
  margin-bottom: 10px;
}

.month-matrix-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.matrix-month-cell {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.matrix-month-cell:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--color-gold);
}

.matrix-month-cell.active {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--color-gold);
}

.cell-month-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.cell-birds-summary {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Spot Official Link */
.spot-source-box {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.source-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-gold);
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  transition: var(--transition-normal);
}

.source-link-btn:hover {
  background: var(--color-gold);
  color: #0b1013;
  transform: translateY(-2px);
}

/* Navigation between spots */
.spot-prev-next {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.spot-nav-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.spot-nav-btn:hover {
  color: #fff;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    --panel-width: 380px;
  }
}

@media (max-width: 768px) {
  /* Mobile Header Slimming & Hamburger Menu */
  .map-header {
    height: 48px;
  }

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

  .map-brand-back {
    padding: 4px 8px;
    font-size: 0.75rem;
    gap: 4px;
  }

  .map-site-title {
    font-size: 0.95rem;
    letter-spacing: 0.1em;
  }

  .map-site-sub {
    display: none;
  }

  .map-nav-link-btn,
  #sound-toggle-btn,
  #fullscreen-btn {
    display: none !important;
  }

  .map-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
  }

  .map-menu-toggle:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--color-gold);
  }

  .map-menu-toggle .hamburger-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .map-menu-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .map-menu-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
  }

  .map-menu-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Compact Notice Banner on Mobile */
  .data-notice-banner {
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  .notice-inner {
    gap: 8px;
  }

  .notice-title {
    font-size: 0.75rem;
  }

  .notice-text {
    line-height: 1.35;
    font-size: 0.7rem;
  }

  /* Controls Bar on Mobile */
  .map-controls-bar {
    padding: 6px 10px;
    background: rgba(14, 20, 24, 0.98);
  }
  
  .controls-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  /* Mobile View Switcher Tabs */
  .mobile-view-tabs {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 3px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    width: 100%;
    gap: 4px;
  }

  .mobile-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-tab-btn.active {
    background: linear-gradient(135deg, #1e3a47 0%, #2b4c5e 100%);
    color: #f8fafc;
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  }

  .map-search-box {
    width: 100%;
    max-width: none;
  }

  .map-search-input {
    width: 100%;
    height: 38px;
    font-size: 0.85rem;
  }
  
  /* ==========================================================================
     Main Layout: Fullscreen Map with Interactive Bottom Sheet on Mobile
     ========================================================================== */
  .map-main-layout {
    display: block;
    position: relative;
    height: calc(100vh - 100px);
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  
  /* Map Viewport is always visible in full behind the sheet */
  .map-viewport {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    z-index: 1;
  }

  /* Interactive Bottom Sheet (Replaces separate side panel on mobile) */
  .map-side-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    max-width: 600px;
    margin: 0 auto;
    border-left: none;
    border-top: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 20px 20px 0 0;
    background: rgba(13, 19, 24, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 -8px 36px rgba(0, 0, 0, 0.75);
    z-index: 95;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(0) !important;
    transition: height 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  }

  /* 3-State Snap Heights */
  .map-side-panel.sheet-collapsed {
    height: 60px !important;
  }

  .map-side-panel.sheet-half {
    height: 48vh !important;
  }

  .map-side-panel.sheet-expanded {
    height: 86vh !important;
  }

  /* Mobile Swipe Handle Bar */
  .bottom-sheet-handle-wrap {
    width: 100%;
    padding: 8px 0 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    flex-shrink: 0;
  }

  .bottom-sheet-handle-bar {
    width: 44px;
    height: 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.3);
    transition: background 0.2s ease, transform 0.2s ease;
  }

  .bottom-sheet-handle-wrap:active .bottom-sheet-handle-bar,
  .map-side-panel.sheet-expanded .bottom-sheet-handle-bar {
    background: var(--color-gold);
  }

  /* Panel Header inside Bottom Sheet */
  .panel-header {
    padding: 6px 12px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
  }

  /* Hide back button when collapsed, show when half or expanded */
  .map-side-panel.sheet-collapsed .mobile-panel-back-btn {
    display: none;
  }

  .mobile-panel-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(212, 175, 55, 0.16);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--color-gold-light);
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }

  .mobile-panel-back-btn:active {
    background: rgba(212, 175, 55, 0.35);
    transform: scale(0.96);
  }

  .sheet-expand-toggle-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }

  .sheet-expand-toggle-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--color-gold);
    color: var(--color-gold-light);
  }

  .panel-header-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
    gap: 8px;
  }

  .panel-view-title {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .panel-content-scroll {
    flex: 1;
    height: 0;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 10px 12px 36px;
  }
  
  .panel-toggle-btn {
    display: none;
  }
  
  .map-legend {
    display: none;
  }

  .map-active-spot-banner {
    bottom: 68px; /* sheet-collapsed(60px) + 余白8px でシートの上に出る */
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
    padding: 10px 12px;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
    gap: 8px;
  }

  .spot-card-icon {
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    border-radius: 10px;
  }

  .spot-card-title {
    font-size: 0.96rem;
  }

  .spot-card-sub {
    font-size: 0.7rem;
  }

  .spot-card-birds-section {
    padding: 6px 8px;
    gap: 6px;
  }

  .spot-card-birds-header {
    font-size: 0.7rem;
  }

  .spot-card-birds-scroll {
    gap: 8px;
  }

  .map-spot-bird-chip {
    width: 48px;
    padding: 2px;
  }

  .chip-img-wrap {
    width: 40px;
    height: 40px;
    border-radius: 6px;
  }

  .chip-name {
    font-size: 0.62rem;
    max-width: 46px;
  }

  .map-spot-bird-more-btn {
    width: 58px;
    height: 40px;
    font-size: 0.65rem;
    border-radius: 6px;
  }

  .spot-card-actions {
    flex-direction: row;
    gap: 6px;
  }

  .spot-card-actions .banner-route-btn,
  .spot-card-actions .banner-detail-btn {
    padding: 7px 8px;
    font-size: 0.72rem;
    border-radius: 6px;
  }
  
  .map-floating-controls {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 6px;
    align-items: flex-start;
  }
  
  .map-breadcrumbs {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 14px;
    max-width: 100%;
  }

  .region-pills {
    overflow-x: auto;
    width: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 3px 4px;
    gap: 4px;
  }

  .region-pills::-webkit-scrollbar {
    display: none;
  }

  .pill-btn {
    flex-shrink: 0;
    padding: 5px 9px;
    font-size: 0.75rem;
    min-height: 32px;
  }

  .pill-badge {
    padding: 1px 5px;
    font-size: 0.68rem;
  }

  /* Bird Cards and Photos on Mobile */
  .bird-item-card {
    padding: 10px 12px;
    border-radius: 10px;
  }

  .bird-thumb-wrap {
    width: 56px;
    height: 56px;
  }

  .bird-item-name {
    font-size: 0.95rem;
  }

  .bird-item-feature {
    font-size: 0.75rem;
  }

  .spot-photo-card {
    height: 180px;
    border-radius: 12px;
    margin-bottom: 12px;
  }

  /* Bird Modal on Mobile */
  .bird-modal {
    padding: 0;
    align-items: flex-end;
  }

  .bird-modal-container {
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
  }

  .bird-modal-hero {
    height: 200px;
  }

  .bird-modal-details {
    padding: 16px 14px 32px;
    gap: 14px;
  }

  .bird-modal-name {
    font-size: 1.4rem;
  }
}

/* ==========================================================================
   Real Bird Photo Cards & Encyclopedia Modal
   ========================================================================== */

/* Upgraded Bird Item Card */
.bird-item-card {
  background: var(--map-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.bird-item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: transparent;
  transition: background 0.25s ease;
}

.bird-item-card:hover {
  background: rgba(26, 36, 44, 0.95);
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.bird-item-card:hover::before {
  background: var(--color-gold);
}

.bird-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Bird Photo Thumbnail in Card */
.bird-thumb-wrap {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #080d11;
  border: 1px solid rgba(212, 175, 55, 0.3);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bird-thumb-bg {
  position: absolute;
  inset: -6px;
  background-size: cover;
  background-position: center;
  filter: blur(8px) brightness(0.45) saturate(1.2);
  transform: scale(1.15);
  opacity: 0.9;
  pointer-events: none;
}

.bird-thumb-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  z-index: 1;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
  transition: transform 0.35s ease;
}

.bird-item-card:hover .bird-thumb-img {
  transform: scale(1.08);
}

.bird-thumb-fallback {
  color: var(--color-gold);
  opacity: 0.7;
}

/* Text inside card */
.bird-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bird-item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bird-item-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

.bird-has-sound-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.68rem;
  background: rgba(212, 175, 55, 0.15);
  color: var(--color-gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.bird-item-feature {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.bird-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.bird-item-type {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-weight: 500;
}

.bird-item-action-icon {
  color: var(--color-gold);
  opacity: 0.7;
  transition: all 0.2s ease;
}

.bird-item-card:hover .bird-item-action-icon {
  opacity: 1;
  transform: translateX(2px);
}

/* ==========================================================================
   Encyclopedia Modal
   ========================================================================== */
.bird-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bird-modal.active {
  opacity: 1;
  visibility: visible;
}

.bird-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 10, 14, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.bird-modal-container {
  position: relative;
  width: 90%;
  max-width: 720px;
  max-height: 88vh;
  background: linear-gradient(145deg, rgba(22, 30, 38, 0.98) 0%, rgba(12, 17, 22, 0.99) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(212, 175, 55, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.bird-modal.active .bird-modal-container {
  transform: scale(1) translateY(0);
}

.bird-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s ease;
}

.bird-modal-close:hover {
  background: var(--color-gold);
  color: #0b0f14;
  border-color: var(--color-gold);
  transform: rotate(90deg);
}

.bird-modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.4) transparent;
}

.bird-modal-body > * {
  flex-shrink: 0;
}

.bird-modal-body::-webkit-scrollbar {
  width: 6px;
}

.bird-modal-body::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.4);
  border-radius: 3px;
}

/* Modal Hero Image Section */
.bird-modal-hero {
  position: relative;
  width: 100%;
  height: 260px;
  min-height: 200px;
  flex-shrink: 0;
  background: #080d11;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bird-modal-hero-bg {
  position: absolute;
  inset: -16px;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.42) saturate(1.3);
  transform: scale(1.2);
  opacity: 0.9;
  pointer-events: none;
}

.bird-modal-hero-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  z-index: 1;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.75));
  padding: 8px;
}

.bird-modal-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 17, 22, 1) 0%, rgba(12, 17, 22, 0.4) 50%, rgba(0, 0, 0, 0.2) 100%);
}

.bird-photo-credit {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  font-size: 0.72rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: calc(100% - 70px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.bird-photo-credit a {
  color: var(--color-gold-light);
  text-decoration: underline;
}

/* Modal Content Details */
.bird-modal-details {
  padding: 24px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.bird-header-block {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.bird-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 6px;
}

.bird-modal-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  margin: 0;
}

.bird-modal-meta-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.meta-tag {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 500;
}

.meta-tag.type {
  background: rgba(212, 175, 55, 0.18);
  color: var(--color-gold-light);
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.meta-tag.category {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bird-scientific-name {
  font-family: 'Cinzel', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-gold);
  letter-spacing: 0.05em;
}

.bird-english-name {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-left: 8px;
}

/* Audio Player Section */
.bird-audio-player-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audio-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.audio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.audio-label svg {
  color: var(--color-gold);
}

.audio-play-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.audio-btn-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold) 0%, #b8860b 100%);
  border: none;
  color: #0b0f14;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.audio-btn-play:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.55);
}

/* Visualizer Bars */
.audio-visualizer {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 28px;
  flex: 1;
}

.audio-bar {
  flex: 1;
  background: rgba(212, 175, 55, 0.3);
  border-radius: 2px;
  height: 4px;
  transition: height 0.15s ease, background-color 0.2s ease;
}

.audio-visualizer.playing .audio-bar {
  background: var(--color-gold);
  animation: barBounce 0.8s infinite ease-in-out alternate;
}

.audio-visualizer.playing .audio-bar:nth-child(2n) { animation-delay: 0.15s; }
.audio-visualizer.playing .audio-bar:nth-child(3n) { animation-delay: 0.3s; }
.audio-visualizer.playing .audio-bar:nth-child(4n) { animation-delay: 0.45s; }
.audio-visualizer.playing .audio-bar:nth-child(5n) { animation-delay: 0.6s; }

@keyframes barBounce {
  0% { height: 4px; }
  100% { height: 26px; }
}

.audio-time-display {
  font-family: 'Outfit', monospace;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  width: 42px;
  text-align: right;
  flex-shrink: 0;
}

.audio-credit-info {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 6px;
  margin-top: 2px;
}

.audio-credit-info a {
  color: var(--color-gold-light);
  text-decoration: underline;
}

.audio-not-available {
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* Ecology & Details Blocks */
.bird-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.bird-info-card {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
}

.bird-info-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-gold-light);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bird-info-card-text {
  font-size: 0.86rem;
  line-height: 1.6;
  color: #cbd5e1;
}

/* Season Distribution Bar in Modal */
.season-month-strip {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
  margin-top: 8px;
}

.strip-month {
  text-align: center;
  padding: 4px 0;
  font-size: 0.68rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.35);
}

.strip-month.active {
  background: rgba(212, 175, 55, 0.35);
  color: #fff;
  font-weight: 600;
  border: 1px solid var(--color-gold);
}

/* Related Spots Links */
.related-spots-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.related-spot-pill {
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.related-spot-pill:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--color-gold);
  color: var(--color-gold-light);
  transform: translateY(-1px);
}

/* Mobile responsive for modal */
@media (max-width: 640px) {
  .bird-modal-container {
    width: 95%;
    max-height: 92vh;
  }
  .bird-modal-hero {
    height: 200px;
  }
  .bird-modal-details {
    padding: 18px 16px 24px;
    gap: 16px;
  }
  .bird-modal-name {
    font-size: 1.4rem;
  }
}

/* eBird / Macaulay Library Integration */
.ebird-macaulay-box {
  background: linear-gradient(145deg, rgba(14, 28, 24, 0.75) 0%, rgba(9, 18, 16, 0.9) 100%);
  border: 1px solid rgba(46, 204, 113, 0.28);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.ebird-macaulay-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #2ecc71, #d4af37, #2ecc71);
  opacity: 0.8;
}

.ebird-macaulay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ebird-macaulay-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

.ebird-badge-tag {
  font-size: 0.68rem;
  background: rgba(46, 204, 113, 0.15);
  color: #4ade80;
  border: 1px solid rgba(46, 204, 113, 0.35);
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.02em;
  font-weight: normal;
}

.ebird-macaulay-desc {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.ebird-btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.ebird-portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 170px;
  justify-content: center;
}

.ebird-btn-primary {
  background: linear-gradient(135deg, #1e7e48 0%, #155d34 100%);
  color: #fff;
  border: 1px solid rgba(74, 222, 128, 0.4);
  box-shadow: 0 2px 8px rgba(22, 101, 52, 0.3);
}

.ebird-btn-primary:hover {
  background: linear-gradient(135deg, #228b50 0%, #186b3c 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 101, 52, 0.5);
}

.ebird-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.ebird-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-1px);
}

.ebird-compliance-note {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

/* ============================
   Xeno-canto iframe embed box
   ============================ */
.xenocanto-embed-box {
  background: linear-gradient(145deg, rgba(16, 14, 40, 0.88) 0%, rgba(10, 9, 28, 0.95) 100%);
  border: 1px solid rgba(99, 102, 241, 0.38);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.xenocanto-embed-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #6366f1, #a78bfa, #ec4899, #6366f1);
  background-size: 200% 100%;
  animation: xcGradientMove 3.5s linear infinite;
}

@keyframes xcGradientMove {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.xenocanto-embed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.xenocanto-embed-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e0e7ff;
}

.xenocanto-badge {
  font-size: 0.66rem;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  animation: xcPulse 2.5s ease-in-out infinite;
}

@keyframes xcPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.xenocanto-embed-desc {
  font-size: 0.77rem;
  color: #94a3b8;
  line-height: 1.55;
}

.xenocanto-iframe-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: #080715;
  min-height: 360px;
  height: 360px;
  flex-shrink: 0;
}

.xenocanto-iframe-wrap iframe {
  display: block;
  border: none;
  width: 100%;
  height: 360px;
  min-height: 360px;
}

.xc-btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 2px;
}

.xc-portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  flex: 1;
  min-width: 200px;
  justify-content: center;
}

.xc-btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  color: #ffffff !important;
  border: 1px solid rgba(165, 180, 252, 0.45);
  box-shadow: 0 3px 12px rgba(79, 70, 229, 0.35);
}

.xc-btn-primary:hover {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  transform: translateY(-1.5px);
  box-shadow: 0 5px 16px rgba(99, 102, 241, 0.5);
  color: #ffffff !important;
}

.xc-btn-secondary {
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe !important;
  border: 1px solid rgba(165, 180, 252, 0.28);
}

.xc-btn-secondary:hover {
  background: rgba(99, 102, 241, 0.26);
  color: #ffffff !important;
  border-color: rgba(165, 180, 252, 0.5);
  transform: translateY(-1.5px);
}

.xenocanto-credit {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.xc-external-link {
  font-size: 0.76rem;
  color: #a5b4fc;
  text-decoration: none;
  border-bottom: 1px solid rgba(165, 180, 252, 0.3);
  transition: color 0.2s;
  white-space: nowrap;
}
.xc-external-link:hover {
  color: #c7d2fe;
  border-bottom-color: rgba(199, 210, 254, 0.6);
}

.xc-fallback-btn {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.xc-fallback-btn:hover {
  background: rgba(99, 102, 241, 0.28);
  color: #e0e7ff;
}

/* Map Attribution */
.map-attribution {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(10, 14, 20, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  user-select: none;
}

.map-attribution a {
  color: var(--color-gold-light, #ffd572);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}

.map-attribution a:hover {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .map-attribution {
    bottom: 6px;
    right: 8px;
    font-size: 0.65rem;
    padding: 2px 6px;
  }
}
