/* Meta pages stylesheet - unified with SPA design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.8);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --accent: #059669;
  --accent-light: #d1fae5;
  --link-color: #059669;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-lg: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.8);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --accent: #34d399;
    --accent-light: rgba(52, 211, 153, 0.15);
    --link-color: #34d399;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link-color); text-decoration: none; transition: opacity 0.15s; }
a:hover { opacity: 0.8; }

/* Site Header */
.meta-site-header {
  background: linear-gradient(to right, #0f172a, rgba(6, 78, 59, 0.3), #0f172a);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.meta-site-header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.meta-site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f1f5f9;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.meta-site-logo-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #34d399, #059669);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.meta-site-header-link {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s;
}
.meta-site-header-link:hover { color: #34d399; opacity: 1; }

/* Main content */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}
h1 small {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Card sections */
.card, section {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

h2, h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

/* Description list */
dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 0.9rem;
}
dt {
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}
dd {
  color: var(--text-primary);
}

/* Lists */
ul, ol {
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--text-primary);
}
li { margin-bottom: 6px; }
li a { font-weight: 500; }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--link-color); }

/* Taxonomy info */
.taxonomy-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Emergence time, ecology */
.emergence-time, .ecology-notes {
  background: var(--accent-light);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

/* Image */
.species-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

/* Footer / noscript */
.meta-footer {
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Focus ring */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 640px) {
  .container { padding: 16px 12px 32px; }
  h1 { font-size: 1.25rem; }
  dl { grid-template-columns: 1fr; gap: 4px 0; }
  dt { margin-top: 8px; }
  .card, section { padding: 16px; border-radius: 12px; }
}
