/* Sound Map Memory — standalone styles */
:root {
  --bg: #0f1419;
  --bg-elev: #161d26;
  --bg-card: #1c2530;
  --bg-hover: #243040;
  --border: #2a3644;
  --text: #e8edf3;
  --text-dim: #8899aa;
  --text-muted: #5a6b7d;
  --accent: #2dd4a8;
  --accent-soft: rgba(45, 212, 168, 0.12);
  --accent-glow: rgba(45, 212, 168, 0.35);
  --warm: #f0a050;
  --danger: #e05555;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --max-width: 1200px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --mono: 'SF Mono', SFMono-Regular, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 20, 25, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand-mark { color: var(--accent); }
.site-nav {
  display: flex;
  gap: 20px;
}
.site-nav a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* Hero */
.hero {
  padding: 80px 24px 60px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(45,212,168,0.08) 0%, transparent 60%);
}
.hero-inner { max-width: 700px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat strong { font-size: 28px; color: var(--accent); font-weight: 700; }
.stat span { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* Sections */
section { padding: 60px 24px; }
.section-head { max-width: var(--max-width); margin: 0 auto 32px; }
.section-head h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.section-head p { color: var(--text-dim); margin: 0; font-size: 15px; }

/* Map */
.map-section { background: var(--bg-elev); }
.map-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
.map-wrap { position: relative; }
.world-map {
  width: 100%;
  height: auto;
  background: #111820;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.region-dots circle {
  cursor: pointer;
  transition: all 0.2s;
}
.region-dots circle:hover { filter: brightness(1.3); }
.region-dots circle.active { fill: var(--accent); }
.region-dots circle.empty { fill: var(--text-muted); }
.region-dots circle.selected {
  stroke: var(--accent);
  stroke-width: 3;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}
.map-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  align-items: center;
}
.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}
.legend-dot.active { background: var(--accent); }
.legend-dot.empty { background: var(--text-muted); }

.map-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 300px;
}
.sidebar-head h3 { margin: 0 0 6px; font-size: 18px; }
.sidebar-head p { margin: 0 0 16px; font-size: 13px; color: var(--text-dim); }
.region-list { display: flex; flex-direction: column; gap: 8px; }
.region-sound {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-elev);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  color: var(--text);
  font-size: 13px;
  width: 100%;
}
.region-sound:hover { border-color: var(--accent); background: var(--bg-hover); }
.region-sound .rs-play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.region-sound .rs-info { flex: 1; min-width: 0; }
.region-sound .rs-name { font-weight: 600; font-size: 13px; }
.region-sound .rs-cat { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Collection */
.collection-section { max-width: var(--max-width); margin: 0 auto; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
}
.search-wrap { margin-left: auto; }
.search-wrap input {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  width: 220px;
  outline: none;
  transition: border-color 0.15s;
}
.search-wrap input:focus { border-color: var(--accent); }

.sound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.sound-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: all 0.2s;
  position: relative;
}
.sound-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.sound-card.playing { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.sound-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.sound-card-title { font-size: 15px; font-weight: 600; margin: 0; }
.sound-card-loc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sound-card-cat {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.sound-card-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 14px;
  line-height: 1.5;
}
.sound-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}
.btn-play:hover { filter: brightness(1.1); }
.btn-play.playing { background: var(--danger); }
.btn-fav {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-size: 16px;
}
.btn-fav:hover { border-color: var(--danger); color: var(--danger); }
.btn-fav.active { background: rgba(224,85,85,0.12); border-color: var(--danger); color: var(--danger); }

.empty-results {
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
}
.btn-ghost {
  margin-top: 12px;
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 13px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Favorites */
.favorites-section { background: var(--bg-elev); }
.favorites-section .section-head { max-width: var(--max-width); margin: 0 auto 32px; }
.fav-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
  grid-column: 1 / -1;
}
.empty-state svg { margin: 0 auto 12px; opacity: 0.5; }

/* Guide */
.guide-section { max-width: var(--max-width); margin: 0 auto; }
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.guide-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--accent);
}
.guide-card p {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 8px;
  line-height: 1.6;
}
.guide-card p:last-child { margin-bottom: 0; }

.guide-faq { margin-top: 20px; }
.guide-faq h3 { font-size: 18px; margin: 0 0 16px; }
.guide-faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.guide-faq summary {
  padding: 14px 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary::after {
  content: '+';
  font-size: 18px;
  color: var(--accent);
  transition: transform 0.2s;
}
.guide-faq details[open] summary::after { content: '−'; }
.guide-faq details p {
  padding: 0 18px 14px;
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-brand { display: flex; flex-direction: column; gap: 2px; }
.footer-brand strong { color: var(--text); font-size: 14px; }
.footer-nav { display: flex; gap: 16px; margin-left: auto; }
.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--accent); }
.footer-note { width: 100%; margin: 0; font-size: 12px; }

/* Responsive */
@media (max-width: 860px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-sidebar { min-height: auto; }
  .hero-stats { gap: 24px; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 13px; }
  .search-wrap { margin-left: 0; width: 100%; }
  .search-wrap input { width: 100%; }
  .filters { flex-direction: column; align-items: stretch; }
  .filter-group { justify-content: center; }
}
@media (max-width: 520px) {
  .header-inner { padding: 0 16px; }
  section { padding: 40px 16px; }
  .hero { padding: 48px 16px 36px; }
  .hero-stats { flex-direction: column; gap: 12px; }
  .footer-nav { margin-left: 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

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

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
