:root {
  --sqm-dark: #0f172a;
  --sqm-card: #1e293b;
  --sqm-card-translucent: rgba(30, 41, 59, 0.85);
  --sqm-border: #334155;
  --sqm-accent: #6366f1;
  --sqm-accent-light: #818cf8;
  --sqm-moon: #eab308;
  --sqm-sky: #0ea5e9;
  --sqm-text: #e2e8f0;
  --sqm-muted: #94a3b8;
  --sqm-subtle: #64748b;
  --sqm-danger: #f87171;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  background-color: var(--sqm-dark);
  color: var(--sqm-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font-family: inherit;
}

/* スクロールバー */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

/* レイアウト共通 */
.container {
  max-width: 80rem;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--sqm-border);
  background-color: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.brand-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.brand-subtitle {
  margin: 0;
  font-size: 0.75rem;
  color: var(--sqm-muted);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: 1rem;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 0.875rem;
  color: #cbd5e1;
  transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.nav-link.active {
  font-weight: 600;
}

.nav-link-ext {
  font-size: 0.875rem;
  color: var(--sqm-muted);
  transition: color 0.15s ease;
}

.nav-link-ext:hover {
  color: #ffffff;
}

.nav-divider {
  color: #475569;
  user-select: none;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--sqm-border);
  color: #cbd5e1;
  border-radius: 0.375rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.875rem;
  cursor: pointer;
}

/* メイン・フッター */
.site-main {
  max-width: 80rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  flex: 1 0 auto;
}

.site-footer {
  border-top: 1px solid var(--sqm-border);
  margin-top: 3rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--sqm-subtle);
}

/* パンくず・セクション見出し */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--sqm-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.breadcrumb-current {
  color: #ffffff;
  font-weight: 500;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header-lg {
  margin-bottom: 2rem;
}

.page-title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.page-desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--sqm-muted);
}

.action-row {
  margin-top: 1rem;
}

/* ボタン・バッジ・カード共通 */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--sqm-border);
  background-color: var(--sqm-card);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #e2e8f0;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.btn-outline:hover {
  border-color: var(--sqm-accent);
  color: #ffffff;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--sqm-border);
  background: transparent;
  color: var(--sqm-muted);
  transition: all 0.15s ease;
}

.btn-sm:hover:not(:disabled) {
  border-color: #94a3b8;
  color: #e2e8f0;
}

.btn-sm.active {
  background-color: var(--sqm-accent);
  border-color: var(--sqm-accent);
  color: #ffffff;
}

.btn-sm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-xs {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  border: 1px solid var(--sqm-border);
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.btn-xs:hover:not(:disabled) {
  border-color: #94a3b8;
}

.btn-xs:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.card {
  border-radius: 0.75rem;
  border: 1px solid var(--sqm-border);
  background-color: var(--sqm-card);
  padding: 1rem;
}

.card-lg {
  padding: 1.25rem;
}

.section-gap {
  margin-bottom: 1.5rem;
}

.section-label {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sqm-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* アラート・エラーボックス */
.alert-error {
  border-radius: 0.75rem;
  border: 1px solid #991b1b;
  background-color: rgba(69, 10, 10, 0.4);
  padding: 1.5rem;
  color: #fca5a5;
  margin-bottom: 1.5rem;
}

.alert-error-sm {
  padding: 1rem;
  font-size: 0.875rem;
}

.alert-warn {
  border-radius: 0.75rem;
  border: 1px solid rgba(180, 83, 9, 0.5);
  background-color: rgba(69, 26, 3, 0.3);
  padding: 1rem;
  color: #fde68a;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.alert-title {
  margin: 0 0 0.25rem;
  font-weight: 600;
}

.alert-body {
  margin: 0;
  font-size: 0.875rem;
}

.alert-list {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.875rem;
}

/* スケルトンアニメーション */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.animate-pulse {
  animation: pulse 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.skeleton-box {
  border-radius: 0.25rem;
  background-color: rgba(51, 65, 85, 0.6);
}

/* グリッド */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}

.grid-summary-4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.grid-summary-3 {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* 地点カード（トップページ） */
.location-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 0.75rem;
  border: 1px solid var(--sqm-border);
  background-color: var(--sqm-card);
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.location-card:hover {
  border-color: var(--sqm-accent);
  background-color: rgba(30, 41, 59, 0.8);
}

.location-card-main {
  display: block;
  flex: 1 0 auto;
}

.location-card-footer {
  margin-top: 0.875rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(51, 65, 85, 0.7);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.location-card-action {
  flex: 1 1 auto;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--sqm-border);
  background-color: rgba(15, 23, 42, 0.55);
  color: #cbd5e1;
  transition: all 0.15s ease;
}

.location-card-action:hover {
  border-color: var(--sqm-accent);
  color: #ffffff;
  background-color: rgba(99, 102, 241, 0.15);
}

.location-card-action-dl {
  border-color: rgba(14, 165, 233, 0.45);
  color: #7dd3fc;
}

.location-card-action-dl:hover {
  border-color: var(--sqm-sky);
  background-color: rgba(14, 165, 233, 0.16);
  color: #e0f2fe;
}

.location-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.location-id-badge {
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background-color: #334155;
  color: #cbd5e1;
  border-radius: 0.25rem;
  padding: 0.125rem 0.5rem;
}

.location-arrow {
  font-size: 1.125rem;
  color: var(--sqm-subtle);
  transition: color 0.15s ease;
}

.location-card:hover .location-arrow {
  color: var(--sqm-accent);
}

.location-card-name {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
  transition: color 0.15s ease;
}

.location-card:hover .location-card-name {
  color: var(--sqm-accent);
}

.location-meta-dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--sqm-muted);
}

.location-meta-dl dt {
  margin: 0;
}

.location-meta-dl dd {
  margin: 0;
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.latest-sqm-box {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--sqm-border);
}

.latest-sqm-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.latest-sqm-label {
  font-size: 0.75rem;
  color: var(--sqm-muted);
  flex-shrink: 0;
}

.latest-sqm-value {
  font-size: 1rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--sqm-accent);
}

.latest-sqm-unit {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--sqm-muted);
  margin-left: 0.25rem;
}

.latest-sqm-missing {
  font-size: 0.75rem;
  font-weight: 600;
  color: #d97706;
}

.latest-sqm-none {
  font-size: 0.75rem;
  color: #475569;
  font-style: italic;
}

.latest-sqm-time {
  margin: 0.15rem 0 0;
  text-align: right;
  font-size: 0.75rem;
  color: #475569;
}

.latest-sqm-time.stale {
  color: #78350f;
}

/* フィルター UI */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.field-label {
  display: block;
  font-size: 0.75rem;
  color: var(--sqm-muted);
  margin-bottom: 0.25rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.btn-group-gap2 {
  gap: 0.5rem;
}

.input-dark {
  border-radius: 0.375rem;
  border: 1px solid var(--sqm-border);
  background-color: var(--sqm-dark);
  color: #e2e8f0;
  font-size: 0.75rem;
  padding: 0.375rem 0.5rem;
  outline: none;
}

.input-dark:focus {
  border-color: var(--sqm-accent);
}

.input-w-sm {
  width: 6rem;
}

.input-w-md {
  width: 7rem;
}

/* サマリーカード（ダッシュボード） */
.stat-card {
  border-radius: 0.75rem;
  border: 1px solid var(--sqm-border);
  background-color: var(--sqm-card);
  padding: 1rem;
}

.stat-card-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: var(--sqm-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-card-value {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.stat-card-sub {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--sqm-subtle);
}

.text-indigo-300 {
  color: #a5b4fc;
}

.text-purple-300 {
  color: #d8b4fe;
}

.text-orange-300 {
  color: #fdba74;
}

.text-sky-300 {
  color: #7dd3fc;
}

.text-yellow-300 {
  color: #fde047;
}

.text-yellow-400 {
  color: #facc15;
}

.text-amber-400 {
  color: #fbbf24;
}

.text-sqm-sky {
  color: var(--sqm-sky);
}

/* チャート関連 */
.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.chart-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e2e8f0;
}

.legend-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--sqm-muted);
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.legend-swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 0.2rem;
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 360px;
}

.chart-canvas-wrap-sm {
  height: 280px;
}

.chart-canvas-wrap-lg {
  height: 430px;
}

.chart-footnote {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--sqm-subtle);
  text-align: center;
}

/* データテーブル・details */
.raw-details {
  margin-top: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--sqm-border);
  background-color: var(--sqm-card);
  overflow: hidden;
}

.raw-summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #cbd5e1;
  user-select: none;
  list-style: none;
}

.raw-summary::-webkit-details-marker {
  display: none;
}

.raw-summary:hover {
  background-color: rgba(51, 65, 85, 0.3);
}

.table-scroll {
  overflow-x: auto;
  max-height: 18rem;
  overflow-y: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  color: #cbd5e1;
}

.data-table thead {
  position: sticky;
  top: 0;
  background-color: var(--sqm-card);
  border-bottom: 1px solid var(--sqm-border);
  z-index: 2;
}

.data-table th {
  padding: 0.5rem 0.75rem;
  text-align: left;
  color: var(--sqm-muted);
  font-weight: 500;
  white-space: nowrap;
}

.data-table td {
  padding: 0.375rem 0.75rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background-color: rgba(51, 65, 85, 0.2);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: #cbd5e1;
}

.compare-table thead {
  border-bottom: 1px solid var(--sqm-border);
}

.compare-table th {
  padding: 0.5rem 0;
  text-align: left;
  color: var(--sqm-muted);
  font-weight: 600;
}

.compare-table td {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}

.text-right {
  text-align: right;
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* 同時刻比較：地点トグル */
.compare-loc-btn {
  text-align: left;
  border-radius: 0.375rem;
  border: 1px solid var(--sqm-border);
  background: transparent;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--sqm-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.compare-loc-btn:hover {
  border-color: #94a3b8;
}

.compare-loc-btn.selected {
  border-color: var(--sqm-accent);
  background-color: rgba(99, 102, 241, 0.12);
  color: #f1f5f9;
}

.color-dot {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  margin-right: 0.5rem;
}

/* 統計ページ・マップ */
.stats-map-box {
  width: 100%;
  height: 400px;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--sqm-border);
  background-color: var(--sqm-card);
}

.stats-summary-box {
  border-radius: 0.75rem;
  border: 1px solid var(--sqm-border);
  background-color: var(--sqm-card);
  padding: 1rem;
  text-align: center;
}

.stats-summary-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.stats-summary-val {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #ffffff;
}

.stats-summary-label {
  font-size: 0.75rem;
  color: var(--sqm-subtle);
  margin-top: 0.15rem;
}

.stats-card {
  border-radius: 0.75rem;
  border: 1px solid var(--sqm-border);
  background-color: var(--sqm-card);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stats-card:hover {
  border-color: #94a3b8;
}

.stats-card.active {
  border-color: var(--sqm-accent);
  background-color: rgba(99, 102, 241, 0.1);
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.2);
}

.stats-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stats-badge-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  background-color: #334155;
  color: #cbd5e1;
}

.stats-card.active .stats-badge-circle {
  background-color: var(--sqm-accent);
  color: #ffffff;
}

.stats-card-title {
  margin: 0;
  font-weight: 600;
  color: #ffffff;
  font-size: 0.875rem;
  line-height: 1.25;
}

.stats-card-coords {
  margin: 0.25rem 0 0 2.25rem;
  font-size: 0.75rem;
  color: var(--sqm-subtle);
}

.stats-coverage-val {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--sqm-sky);
  text-align: right;
}

.stats-coverage-label {
  font-size: 0.75rem;
  color: var(--sqm-subtle);
  text-align: right;
}

.stats-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  font-size: 0.875rem;
}

.stat-mini-label {
  margin: 0;
  font-size: 0.75rem;
  color: var(--sqm-subtle);
}

.stat-mini-value {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #ffffff;
}

.btn-expand-stats {
  margin-top: 1rem;
  width: 100%;
  font-size: 0.75rem;
  color: var(--sqm-accent);
  background: transparent;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 0.5rem;
  padding: 0.375rem 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-expand-stats:hover {
  color: #a5b4fc;
  border-color: #818cf8;
}

.stats-detail-panel {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stats-subbox {
  border-radius: 0.5rem;
  background-color: rgba(15, 23, 42, 0.45);
  padding: 0.75rem;
  font-size: 0.75rem;
}

.stats-subbox-title {
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: #cbd5e1;
  font-size: 0.75rem;
}

.stats-kv-row {
  display: flex;
  justify-content: space-between;
  margin: 0.25rem 0;
}

.missing-periods-scroll {
  max-height: 14rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.missing-period-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  border-bottom: 1px solid #334155;
  padding: 0.375rem 0;
  font-size: 0.75rem;
}

.missing-days-scroll {
  max-height: 10rem;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding-right: 0.25rem;
}

.missing-day-tag {
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background-color: rgba(69, 26, 3, 0.7);
  color: #fcd34d;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--sqm-muted);
}

.empty-state-icon {
  margin: 0 0 0.75rem;
  font-size: 2.25rem;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

/* レスポンシブ */
@media (min-width: 640px) {
  .grid-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-stats-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .grid-summary-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-summary-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .nav-toggle {
    display: inline-block;
  }

  .header-nav {
    display: none;
    width: 100%;
    margin-left: 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--sqm-border);
  }

  .header-nav.open {
    display: flex;
  }

  .nav-divider {
    display: none;
  }
}

/* ユーティリティ */
.hidden {
  display: none !important;
}

.alert-info {
  border-radius: 0.75rem;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background-color: rgba(12, 74, 110, 0.35);
  padding: 0.875rem 1rem;
  color: #bae6fd;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

/* 統計カードのリンク */
.stats-card-links {
  margin-top: 0.625rem;
  display: flex;
  gap: 0.5rem;
}

.stats-card-link {
  flex: 1 1 0;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--sqm-border);
  background-color: rgba(15, 23, 42, 0.5);
  color: #cbd5e1;
  transition: all 0.15s ease;
}

.stats-card-link:hover {
  border-color: var(--sqm-accent);
  color: #ffffff;
}

.stats-card-link-dl {
  border-color: rgba(14, 165, 233, 0.45);
  color: #7dd3fc;
}

.stats-card-link-dl:hover {
  border-color: var(--sqm-sky);
  color: #e0f2fe;
}

/* ダッシュボード・比較画面 ダウンロードアクションバー */
.dl-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
}

.dl-action-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dl-action-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f8fafc;
}

.dl-action-desc {
  font-size: 0.75rem;
  color: var(--sqm-muted);
}

.dl-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.btn-dl-primary,
.btn-dl-secondary,
.btn-dl-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 0.375rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-dl-primary {
  border: 1px solid #0284c7;
  background-color: #0284c7;
  color: #ffffff;
}

.btn-dl-primary:hover:not(:disabled) {
  background-color: #0369a1;
  border-color: #0369a1;
}

.btn-dl-secondary {
  border: 1px solid var(--sqm-border);
  background-color: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
}

.btn-dl-secondary:hover:not(:disabled) {
  border-color: var(--sqm-sky);
  color: #ffffff;
}

.btn-dl-primary:disabled,
.btn-dl-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-dl-link {
  border: 1px solid rgba(99, 102, 241, 0.5);
  background-color: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
}

.btn-dl-link:hover {
  border-color: var(--sqm-accent-light);
  background-color: rgba(99, 102, 241, 0.28);
  color: #ffffff;
}

/* 表示情報詳細ガイド */
.guide-details {
  border-radius: 0.75rem;
  border: 1px solid rgba(99, 102, 241, 0.4);
  background-color: var(--sqm-card);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.guide-summary {
  cursor: pointer;
  padding: 0.875rem 1.125rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e0e7ff;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  list-style: none;
  user-select: none;
}

.guide-summary::-webkit-details-marker {
  display: none;
}

.guide-summary:hover {
  background: rgba(99, 102, 241, 0.18);
}

.guide-summary-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--sqm-muted);
  flex-shrink: 0;
}

.guide-body {
  padding: 1rem 1.125rem 1.25rem;
  border-top: 1px solid var(--sqm-border);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.875rem;
}

@media (min-width: 768px) {
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.guide-card {
  border-radius: 0.625rem;
  border: 1px solid var(--sqm-border);
  background-color: rgba(15, 23, 42, 0.55);
  padding: 0.875rem 1rem;
}

.guide-card-title {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #f1f5f9;
}

.guide-text {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.65;
}

.guide-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.79rem;
  color: #cbd5e1;
  line-height: 1.65;
}

.guide-list li {
  margin-bottom: 0.3rem;
}

.guide-list code,
.guide-text code,
.guide-table code {
  background-color: rgba(51, 65, 85, 0.75);
  color: #a5b4fc;
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
}

.guide-link {
  color: #7dd3fc;
  text-decoration: underline;
}

.guide-link:hover {
  color: #bae6fd;
}

.sqm-scale-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.4rem;
}

.sqm-scale-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.375rem;
  border-left: 3px solid transparent;
  background-color: rgba(30, 41, 59, 0.75);
  font-size: 0.78rem;
}

.sqm-tier-dark {
  border-left-color: #818cf8;
}

.sqm-tier-good {
  border-left-color: #38bdf8;
}

.sqm-tier-mid {
  border-left-color: #facc15;
}

.sqm-tier-bright {
  border-left-color: #fb923c;
}

.sqm-scale-range {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: #f8fafc;
  min-width: 6.2rem;
  flex-shrink: 0;
}

.sqm-scale-desc {
  color: #cbd5e1;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  color: #cbd5e1;
  min-width: 560px;
}

.guide-table th {
  text-align: left;
  padding: 0.45rem 0.65rem;
  background-color: rgba(30, 41, 59, 0.9);
  color: var(--sqm-muted);
  border-bottom: 1px solid var(--sqm-border);
  white-space: nowrap;
}

.guide-table td {
  padding: 0.4rem 0.65rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  vertical-align: top;
}

/* ============================================
   データダウンローダー（統合版・ダークテーマ）
   ============================================ */
.downloader-container {
  max-width: 54rem;
  margin: 0 auto;
}

.downloader-card {
  background-color: var(--sqm-card);
  border: 1px solid var(--sqm-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.enrich-promo {
  font-size: 0.85rem;
  color: var(--sqm-muted);
  margin: 0.75rem 0 0;
}

.enrich-promo a {
  color: #7dd3fc;
  font-weight: 600;
  text-decoration: underline;
}

.enrich-promo a:hover {
  color: #bae6fd;
}

.form-group {
  margin-bottom: 1.35rem;
}

.indented-group {
  margin-left: 1.5rem;
}

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: #e2e8f0;
}

.input,
.select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid var(--sqm-border);
  border-radius: 0.5rem;
  background-color: var(--sqm-dark);
  color: #f1f5f9;
  transition: border-color 0.15s ease;
}

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

.input:disabled,
.select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.help-text {
  font-size: 0.78rem;
  color: var(--sqm-muted);
  margin: 0.35rem 0 0;
}

.loading-text {
  font-size: 0.875rem;
  color: var(--sqm-muted);
  font-style: italic;
}

.error-text {
  font-size: 0.875rem;
  color: var(--sqm-danger);
  font-weight: 500;
}

.sub-panel {
  margin-bottom: 1.35rem;
  border: 1px solid var(--sqm-border);
  border-radius: 0.625rem;
  padding: 1rem 1.25rem;
  background-color: rgba(15, 23, 42, 0.55);
}

.sub-panel-title {
  margin: 0 0 0.875rem;
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}

.radio-group,
.enricher-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.radio-label,
.checkbox-label,
.enricher-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #e2e8f0;
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"],
.enricher-radio-label input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--sqm-accent);
  cursor: pointer;
}

.dl-btn-row {
  display: flex;
  gap: 0.875rem;
  align-items: center;
}

.download-button {
  flex: 1;
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  background-color: var(--sqm-accent);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.download-button:hover:not(:disabled) {
  background-color: #4f46e5;
  transform: translateY(-1px);
}

.download-button:disabled {
  background-color: #334155;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

.cancel-button {
  padding: 0.875rem 1.25rem;
  background-color: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.cancel-button:hover {
  background-color: #b91c1c;
}

.progress-container {
  margin-top: 1.5rem;
  padding: 1.125rem 1.25rem;
  background-color: rgba(15, 23, 42, 0.65);
  border-radius: 0.5rem;
  border: 1px solid var(--sqm-border);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.progress-message {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f1f5f9;
}

.progress-count {
  font-size: 0.78rem;
  color: var(--sqm-muted);
}

.progress-bar {
  width: 100%;
  height: 10px;
  background-color: #334155;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sqm-accent), var(--sqm-sky));
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.progress-percentage {
  text-align: right;
  font-size: 0.8rem;
  font-weight: 600;
  color: #a5b4fc;
}

.dl-info-box {
  margin-top: 1.5rem;
  padding: 1.125rem 1.25rem;
  background-color: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--sqm-border);
  border-left: 4px solid var(--sqm-sky);
  border-radius: 0.5rem;
}

.dl-info-box h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #7dd3fc;
}

.dl-info-box ul {
  margin: 0;
  padding-left: 1.2rem;
}

.dl-info-box li {
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-bottom: 0.35rem;
  line-height: 1.6;
}

.dl-info-box a {
  color: #7dd3fc;
  text-decoration: underline;
}

.dl-info-box code {
  background-color: rgba(51, 65, 85, 0.75);
  color: #a5b4fc;
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}

.error-box {
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  background-color: rgba(69, 10, 10, 0.45);
  border: 1px solid #991b1b;
  border-left: 4px solid #ef4444;
  border-radius: 0.5rem;
  color: #fca5a5;
  font-size: 0.85rem;
}

.timeout-box {
  margin-top: 1.25rem;
  padding: 1rem 1.125rem;
  background-color: rgba(69, 26, 3, 0.4);
  border: 1px solid rgba(217, 119, 6, 0.5);
  border-left: 4px solid #f59e0b;
  border-radius: 0.5rem;
  color: #fde68a;
  font-size: 0.85rem;
  line-height: 1.7;
}

.timeout-link {
  color: #7dd3fc;
  font-weight: 700;
  text-decoration: underline;
}

.related-links {
  margin-top: 1.75rem;
}

.related-links-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
}

.related-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.75rem;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.875rem 1rem;
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--sqm-border);
  border-radius: 0.5rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.related-card:hover {
  border-color: var(--sqm-accent);
  background-color: rgba(99, 102, 241, 0.12);
}

.related-card-icon {
  font-size: 1.1rem;
}

.related-card-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #a5b4fc;
}

.related-card-desc {
  font-size: 0.72rem;
  color: var(--sqm-muted);
}

/* ============================================
   CSV データ仕様アコーディオン（ダークテーマ）
   ============================================ */
.spec-section {
  margin-top: 1.5rem;
}

.spec-intro {
  font-size: 0.82rem;
  color: var(--sqm-muted);
  margin: 0 0 0.6rem;
}

.spec-wrapper {
  margin-top: 0.5rem;
}

.spec-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.875rem 1.125rem;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: #bae6fd;
  text-align: left;
  transition: background-color 0.15s ease;
}

.spec-toggle:hover {
  background: rgba(14, 165, 233, 0.18);
}

.spec-toggle-icon {
  font-size: 0.75rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.spec-body {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1rem 1.125rem;
  border-radius: 0.75rem;
  border: 1px solid var(--sqm-border);
  background-color: var(--sqm-card);
}

.spec-academic-note {
  background-color: rgba(69, 26, 3, 0.35);
  border: 1px solid rgba(202, 138, 4, 0.4);
  border-left: 4px solid #eab308;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  font-size: 0.8rem;
  color: #fef3c7;
  line-height: 1.65;
}

.spec-academic-note strong {
  color: #fde047;
}

.spec-academic-note ul {
  margin: 0.4rem 0 0 1.2rem;
  padding: 0;
}

.spec-academic-note li {
  margin-bottom: 0.25rem;
}

.spec-academic-note p {
  margin: 0.4rem 0 0;
}

.spec-doi-link {
  word-break: break-all;
  color: #7dd3fc;
  text-decoration: underline;
}

.spec-summary h3,
.spec-detail-heading {
  font-size: 0.875rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 0.65rem;
}

.spec-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.spec-summary-card {
  padding: 0.875rem;
  background-color: rgba(15, 23, 42, 0.6);
  border: 1.5px solid;
  border-radius: 0.5rem;
  text-align: center;
}

.spec-summary-count {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
}

.spec-summary-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 0.25rem;
}

.spec-summary-unit {
  font-size: 0.7rem;
  color: var(--sqm-muted);
}

.spec-group {
  border: 1px solid var(--sqm-border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.spec-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: rgba(15, 23, 42, 0.65);
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease;
}

.spec-group-header:hover {
  background-color: rgba(51, 65, 85, 0.45);
}

.spec-group-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f5f9;
}

.spec-group-id {
  font-size: 0.7rem;
  font-weight: 700;
  background-color: var(--sqm-accent);
  color: #ffffff;
  padding: 0.15em 0.5em;
  border-radius: 0.25rem;
}

.spec-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: #ffffff;
  padding: 0.15em 0.55em;
  border-radius: 9999px;
}

.spec-group-body {
  padding: 0.875rem;
  background-color: rgba(15, 23, 42, 0.35);
  border-top: 1px solid var(--sqm-border);
}

.spec-calc-note {
  background-color: rgba(12, 74, 110, 0.3);
  border-left: 3px solid var(--sqm-sky);
  border-radius: 0.375rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.78rem;
  color: #bae6fd;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.spec-calc-list {
  margin: 0.35rem 0 0;
  padding-left: 1.3rem;
}

.spec-table-wrap {
  overflow-x: auto;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.77rem;
  min-width: 600px;
}

.spec-table thead th {
  background-color: #1e293b;
  color: #cbd5e1;
  padding: 0.5rem 0.7rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--sqm-border);
  white-space: nowrap;
}

.spec-table tbody tr:nth-child(even) {
  background-color: rgba(30, 41, 59, 0.45);
}

.spec-table tbody td {
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  vertical-align: top;
  color: #e2e8f0;
  line-height: 1.5;
}

.spec-code {
  background-color: rgba(99, 102, 241, 0.22);
  color: #c7d2fe;
  padding: 0.1em 0.45em;
  border-radius: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  white-space: nowrap;
}

.spec-type {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82em;
  color: var(--sqm-muted);
  white-space: nowrap;
}

.spec-note-cell {
  color: var(--sqm-muted);
  font-size: 0.74rem;
}

/* ============================================
   天文情報付与ツール（ダークテーマ）
   ============================================ */
.enricher-container {
  max-width: 50rem;
  margin: 0 auto;
}

.enricher-header {
  margin-bottom: 1.5rem;
}

.enricher-title {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.enricher-subtitle {
  margin: 0 0 0.6rem;
  color: var(--sqm-muted);
  line-height: 1.6;
  font-size: 0.875rem;
}

.enricher-back-link {
  font-size: 0.85rem;
  color: #7dd3fc;
  text-decoration: underline;
}

.enricher-card {
  background-color: var(--sqm-card);
  border: 1px solid var(--sqm-border);
  border-radius: 0.75rem;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
}

.enricher-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: #e0e7ff;
}

.enricher-input,
.enricher-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--sqm-border);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  background-color: var(--sqm-dark);
  color: #f1f5f9;
}

.enricher-select {
  width: auto;
  min-width: 220px;
}

.enricher-input:disabled,
.enricher-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.enricher-hint {
  font-size: 0.78rem;
  color: var(--sqm-muted);
  margin: 0.35rem 0 0;
}

.drop-zone {
  border: 2px dashed #475569;
  border-radius: 0.625rem;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  background-color: rgba(15, 23, 42, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.drop-zone.active {
  border-color: var(--sqm-accent);
  background-color: rgba(99, 102, 241, 0.12);
}

.drop-zone.success {
  border-color: #10b981;
  background-color: rgba(6, 78, 59, 0.3);
}

.drop-zone.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.drop-icon {
  font-size: 2rem;
}

.drop-text {
  font-weight: 600;
  color: #f1f5f9;
}

.drop-hint {
  font-size: 0.8rem;
  color: var(--sqm-muted);
}

.enricher-error-box {
  margin-top: 0.75rem;
  background-color: rgba(69, 10, 10, 0.45);
  border: 1px solid #991b1b;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #fca5a5;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

.enricher-info-box {
  margin-top: 0.75rem;
  background-color: rgba(12, 74, 110, 0.35);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #bae6fd;
  line-height: 1.6;
}

.enricher-form-group {
  margin-bottom: 1rem;
}

.enricher-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  color: #e2e8f0;
}

.enricher-progress-wrapper {
  margin-bottom: 1rem;
}

.enricher-progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.enricher-progress-message {
  color: #f1f5f9;
  font-weight: 500;
}

.enricher-progress-count {
  color: var(--sqm-muted);
  font-size: 0.8rem;
}

.enricher-progress-bar-bg {
  width: 100%;
  height: 10px;
  background-color: #334155;
  border-radius: 9999px;
  overflow: hidden;
}

.enricher-progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease;
  background-color: var(--sqm-accent);
}

.enricher-progress-pct {
  text-align: right;
  font-size: 0.75rem;
  color: var(--sqm-muted);
  margin-top: 0.2rem;
}

.enricher-button-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.enricher-start-button {
  padding: 0.75rem 1.5rem;
  background-color: var(--sqm-accent);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.enricher-start-button:hover:not(:disabled) {
  background-color: #4f46e5;
}

.enricher-start-button:disabled {
  background-color: #334155;
  color: #94a3b8;
  cursor: not-allowed;
}

.enricher-cancel-button {
  padding: 0.75rem 1.5rem;
  background-color: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.enricher-cancel-button:hover {
  background-color: #b91c1c;
}

.enricher-estimate-box {
  margin-top: 0.75rem;
  padding: 0.6rem 0.9rem;
  background-color: rgba(69, 26, 3, 0.35);
  border: 1px solid rgba(234, 179, 8, 0.45);
  border-radius: 0.375rem;
  font-size: 0.82rem;
  color: #fde68a;
}

.field-group-block {
  margin-bottom: 0.875rem;
}

.field-group-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #a5b4fc;
  margin-bottom: 0.35rem;
}

.field-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.field-td-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 0.25rem 0.5rem;
  color: #7dd3fc;
  white-space: nowrap;
  width: 50%;
}

.field-td-desc {
  padding: 0.25rem 0.5rem;
  color: #cbd5e1;
}

.methodology-intro {
  font-size: 0.82rem;
  color: var(--sqm-muted);
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

.methodology-item {
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

.methodology-btn {
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.9rem;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.methodology-arrow {
  font-size: 0.75rem;
}

.methodology-list {
  margin: 0;
  padding: 0.65rem 0.9rem 0.65rem 2rem;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #cbd5e1;
  background-color: rgba(15, 23, 42, 0.55);
}

.methodology-list li {
  margin-bottom: 0.15rem;
}

.methodology-quote {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  color: #7dd3fc;
}

@media (max-width: 640px) {
  .grid-2col,
  .spec-summary-grid {
    grid-template-columns: 1fr;
  }

  .dl-btn-row,
  .enricher-button-row {
    flex-direction: column;
    align-items: stretch;
  }
}
