/* ===== Design tokens ===== */
:root, [data-theme="light"] {
  --color-bg: #F6F4EE;
  --color-surface: #FFFFFF;
  --color-surface-2: #F1EDE3;
  --color-surface-offset: #EAE4D6;
  --color-divider: #E1DACB;
  --color-border: #DAD2BF;

  --color-text: #1C2726;
  --color-text-muted: #62716F;
  --color-text-faint: #9CA9A5;
  --color-text-inverse: #F6F4EE;

  --color-primary: #0E7C86;
  --color-primary-hover: #0B5F67;
  --color-primary-active: #084A50;
  --color-primary-highlight: #D7E7E6;

  --color-coral: #DE6A3C;
  --color-coral-highlight: #F3DACB;
  --color-gold: #DDA22C;
  --color-gold-highlight: #F0E1C1;
  --color-blue: #3C6FA0;
  --color-blue-highlight: #D3DFEA;
  --color-purple: #7C5AC0;
  --color-purple-highlight: #E2D9F1;
  --color-success: #3E8452;
  --color-error: #B5473F;

  --radius-sm: 0.4rem;
  --radius-md: 0.65rem;
  --radius-lg: 1rem;
  --radius-xl: 1.4rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(28, 39, 38, 0.06);
  --shadow-md: 0 6px 16px rgba(28, 39, 38, 0.08);
  --shadow-lg: 0 16px 40px rgba(28, 39, 38, 0.14);

  --transition-interactive: 160ms cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: 'Cabinet Grotesk', 'Satoshi', system-ui, sans-serif;
  --font-body: 'Satoshi', 'Inter', system-ui, sans-serif;

  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.2vw, 0.9375rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.9vw, 1.75rem);
}

[data-theme="dark"] {
  --color-bg: #0F1817;
  --color-surface: #15201F;
  --color-surface-2: #1A2726;
  --color-surface-offset: #1F2E2C;
  --color-divider: #263635;
  --color-border: #304240;

  --color-text: #E1E9E7;
  --color-text-muted: #8DA09D;
  --color-text-faint: #566866;
  --color-text-inverse: #0F1817;

  --color-primary: #55BAC4;
  --color-primary-hover: #79CBD3;
  --color-primary-active: #9AD9DF;
  --color-primary-highlight: #223635;

  --color-coral: #EE9264;
  --color-coral-highlight: #3A2C23;
  --color-gold: #EBC15A;
  --color-gold-highlight: #372E1D;
  --color-blue: #7FAAD6;
  --color-blue-highlight: #23303D;
  --color-purple: #B49AE6;
  --color-purple-highlight: #2E2740;
  --color-success: #6FBB82;
  --color-error: #E0817A;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #0F1817;
    --color-surface: #15201F;
    --color-surface-2: #1A2726;
    --color-surface-offset: #1F2E2C;
    --color-divider: #263635;
    --color-border: #304240;
    --color-text: #E1E9E7;
    --color-text-muted: #8DA09D;
    --color-text-faint: #566866;
    --color-text-inverse: #0F1817;
    --color-primary: #55BAC4;
    --color-primary-hover: #79CBD3;
    --color-primary-active: #9AD9DF;
    --color-primary-highlight: #223635;
    --color-coral: #EE9264;
    --color-gold: #EBC15A;
    --color-blue: #7FAAD6;
    --color-purple: #B49AE6;
  }
}

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

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

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

body {
  font-family: var(--font-body), sans-serif;
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
}

html[lang="zh-CN"] body { font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif; }
html[lang="ja"] body { font-family: 'Noto Sans JP', 'Hiragino Sans', sans-serif; }
html[lang="ko"] body { font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif; }

button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
table { border-collapse: collapse; width: 100%; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

a, button, input, [role="button"] {
  transition: color var(--transition-interactive), background var(--transition-interactive),
    border-color var(--transition-interactive), box-shadow var(--transition-interactive), opacity var(--transition-interactive);
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ===== Dashboard layout ===== */
.dashboard {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: auto 1fr;
  height: 100dvh;
}

.sidebar {
  grid-row: 1 / -1;
  background: var(--color-surface);
  border-right: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.1rem 1.1rem 0.9rem;
  border-bottom: 1px solid var(--color-divider);
  flex-shrink: 0;
}
.logo { width: 30px; height: 30px; flex-shrink: 0; }
.brand-title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm); line-height: 1.2; }
.brand-sub { font-size: var(--text-xs); color: var(--color-text-muted); }
.brand > div { flex: 1; min-width: 0; }

.theme-toggle {
  width: 32px; height: 32px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--color-text); border-color: var(--color-primary); }
.theme-toggle svg { width: 16px; height: 16px; }

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.filter-title-row { display: flex; align-items: baseline; justify-content: space-between; }
.filter-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 0.55rem;
}

.link-btn {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}
.link-btn:hover { text-decoration-color: currentColor; }

.radio-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.radio-chip {
  position: relative;
  display: inline-flex;
}
.radio-chip input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  cursor: pointer;
}
.radio-chip span {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  transition: inherit;
  white-space: nowrap;
}
.radio-chip input:checked + span {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
}
.radio-chip input:focus-visible + span { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.radio-chip:hover span { border-color: var(--color-primary); }

.checkbox-list { display: flex; flex-direction: column; gap: 0.25rem; }
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
}
.checkbox-item:hover { background: var(--color-surface-2); }
.checkbox-item input {
  width: 17px; height: 17px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  cursor: pointer;
}
.checkbox-item .crit-icon {
  width: 18px; height: 18px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  display: flex;
}
.checkbox-item .crit-icon svg { width: 100%; height: 100%; }
.checkbox-item span.crit-label { font-size: var(--text-sm); flex: 1; }
.checkbox-item:has(input:checked) {
  background: var(--color-primary-highlight);
  border-color: var(--color-primary);
}
.checkbox-item:has(input:checked) .crit-icon { color: var(--color-primary); }

.results-summary {
  font-size: var(--text-sm);
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}
.results-summary strong { color: var(--color-text); font-family: var(--font-display); }

.suggest-edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.5rem 1.1rem 0;
  padding: 0.5rem 0.9rem;
  flex-shrink: 0;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.suggest-edit-btn:hover,
.suggest-edit-btn:focus-visible {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.suggest-edit-btn i { width: 15px; height: 15px; }

.sidebar-footnote {
  padding: 0.65rem 1.1rem;
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  flex-shrink: 0;
}
.sidebar-footnote span { color: var(--color-text-muted); font-weight: 500; }

/* ===== Header ===== */
.header {
  grid-column: 2;
  position: sticky; top: 0; z-index: 10;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-divider);
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}
.header-copy { flex: 1; min-width: 0; }
.sidebar-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.sidebar-toggle svg { width: 18px; height: 18px; }
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}
.page-sub { color: var(--color-text-muted); font-size: var(--text-sm); max-width: 60ch; }

.language-picker {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}
.language-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 0.45rem 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.language-toggle:hover,
.language-toggle[aria-expanded="true"] {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
}
.language-icon { width: 20px; height: 20px; flex-shrink: 0; }
.language-code {
  min-width: 1.3rem;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1;
}
.language-toggle svg { width: 15px; height: 15px; flex-shrink: 0; }
.language-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 40;
  width: 10.5rem;
  padding: 0.35rem;
  display: grid;
  gap: 0.15rem;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.language-menu[hidden] { display: none; }
.language-menu button {
  min-height: 44px;
  padding: 0.45rem 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: var(--radius-sm);
  text-align: left;
  font-size: var(--text-sm);
}
.language-menu button:hover,
.language-menu button[aria-pressed="true"] {
  color: var(--color-primary);
  background: var(--color-primary-highlight);
}
.language-option-code {
  width: 1.5rem;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  text-align: center;
}

/* ===== Main ===== */
.main {
  grid-column: 2;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.panel-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.panel-title svg { width: 19px; height: 19px; color: var(--color-primary); }
.panel-sub { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 0.15rem; }

/* ===== Recommendation cards ===== */
.recommend-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
}
.rec-card {
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  background: var(--color-surface-2);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  position: relative;
}
.rec-card.rank-0 { border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); }
.rec-rank {
  position: absolute; top: -10px; left: 0.9rem;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.12rem 0.55rem;
  border-radius: var(--radius-full);
}
.rec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-top: 0.3rem; }
.rec-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.rec-name:hover { border-bottom-color: currentColor; color: var(--color-primary); }
.rec-score {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.rec-region { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.rec-blurb { font-size: var(--text-sm); color: var(--color-text-muted); flex: 1; }
.rec-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.rec-tag {
  font-size: var(--text-xs);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 0.25rem;
}
.rec-tag.miss { background: var(--color-surface-offset); color: var(--color-text-faint); text-decoration: line-through; }
.rec-empty { color: var(--color-text-muted); font-size: var(--text-sm); padding: 1rem 0; }

/* ===== Map ===== */
.legend { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 0.35rem; font-size: var(--text-xs); color: var(--color-text-muted); }
.legend-dot { width: 9px; height: 9px; border-radius: var(--radius-full); flex-shrink: 0; }

.map-head-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.tide-weather-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.65rem;
  white-space: nowrap;
  text-decoration: none;
}
.tide-weather-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.tide-weather-link i { width: 13px; height: 13px; flex-shrink: 0; }

.map-wrap { position: relative; }
#map {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-2);
}
.map-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.5rem;
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  border-radius: var(--radius-md);
  text-align: center;
  padding: 1rem;
}
.map-empty[hidden] { display: none; }
.map-empty svg { width: 26px; height: 26px; color: var(--color-text-faint); }
.map-empty p { font-size: var(--text-sm); color: var(--color-text-muted); }

.beach-marker {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--color-surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.maplibregl-popup-content {
  background: var(--color-surface) !important;
  color: var(--color-text) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0.9rem !important;
  font-family: var(--font-body), sans-serif !important;
}
.maplibregl-popup-tip { border-top-color: var(--color-surface) !important; border-bottom-color: var(--color-surface) !important; }
.maplibregl-popup-close-button { color: var(--color-text-muted) !important; font-size: 1.1rem !important; padding: 0.2rem 0.5rem !important; }

.popup-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.popup-title:hover { color: var(--color-primary); }
.popup-title svg { width: 13px; height: 13px; opacity: 0.6; }
.popup-kr { font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: 0.4rem; }
.popup-blurb { font-size: var(--text-xs); color: var(--color-text-muted); margin: 0.4rem 0 0.55rem; max-width: 220px; }
.popup-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.6rem; }
.popup-tag { font-size: 10.5px; padding: 0.1rem 0.4rem; border-radius: var(--radius-full); background: var(--color-primary-highlight); color: var(--color-primary); font-weight: 500; }
.popup-link {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex; align-items: center; gap: 0.25rem;
}
.popup-link svg { width: 12px; height: 12px; }
.popup-source { display: block; margin-top: 0.4rem; font-size: 10.5px; color: var(--color-text-faint); }
.popup-source a { color: var(--color-text-faint); text-decoration: underline; }
.popup-blurb, .rec-blurb { overflow-wrap: anywhere; }

/* ===== Table ===== */
.table-scroll {
  overflow-x: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
}
#beachTable { font-size: var(--text-sm); }
#beachTable thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--color-surface-2);
  text-align: left;
  padding: 0.6rem 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--color-divider);
  cursor: pointer;
  user-select: none;
}
#beachTable thead th:hover { color: var(--color-text); }
#beachTable thead th .th-inner { display: inline-flex; align-items: center; gap: 0.3rem; }
#beachTable thead th .sort-arrow { width: 11px; height: 11px; opacity: 0; color: var(--color-primary); }
#beachTable thead th[aria-sort="ascending"] .sort-arrow,
#beachTable thead th[aria-sort="descending"] .sort-arrow { opacity: 1; }
#beachTable thead th[aria-sort="ascending"] .sort-arrow { transform: rotate(180deg); }

#beachTable thead th:first-child,
#beachTable tbody td:first-child { padding-left: 0.8rem; }

#beachTable tbody td {
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--color-divider);
  vertical-align: middle;
  white-space: nowrap;
}
#beachTable tbody td:first-child { white-space: normal; min-width: 150px; max-width: 185px; }
#beachTable tbody tr:last-child td { border-bottom: none; }
#beachTable tbody tr:hover { background: var(--color-surface-2); }
#beachTable tbody tr.no-match { display: none; }

.cell-name { display: flex; flex-direction: column; gap: 0.05rem; }
.cell-name a {
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.cell-name a:hover { color: var(--color-primary); }
.cell-name a svg { width: 12px; height: 12px; opacity: 0.55; flex-shrink: 0; }
.cell-name small { color: var(--color-text-muted); font-size: var(--text-xs); font-weight: 400; }

.region-pill {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  display: inline-block;
}
.region-North { background: var(--color-blue-highlight); color: var(--color-blue); }
.region-East { background: var(--color-primary-highlight); color: var(--color-primary); }
.region-South { background: var(--color-coral-highlight); color: var(--color-coral); }
.region-West { background: var(--color-purple-highlight); color: var(--color-purple); }

.bool-yes, .bool-no { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
.bool-yes svg { width: 16px; height: 16px; color: var(--color-success); }
.bool-no svg { width: 14px; height: 14px; color: var(--color-text-faint); }

.match-score { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--color-primary); }

.table-empty { padding: 1rem; text-align: center; color: var(--color-text-muted); font-size: var(--text-sm); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .dashboard { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; }
  .sidebar {
    grid-row: 2;
    position: fixed;
    inset: 0 20% 0 0;
    z-index: 30;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
    width: 80%;
    max-width: 320px;
  }
  .sidebar.open { transform: translateX(0); }
  .header { grid-column: 1; }
  .main { grid-column: 1; padding: 1rem; }
  .sidebar-toggle { display: flex; }
  #map { height: 320px; }
}

@media (max-width: 560px) {
  .header { padding: 0.9rem 1rem; }
  .header { gap: 0.6rem; }
  .language-toggle { padding: 0.45rem; }
  .language-code { display: none; }
  .panel { padding: 1rem; }
}
.data-load-error {
  position: relative;
  z-index: 1000;
  padding: 0.75rem 1rem;
  color: #7f1d1d;
  background: #fef2f2;
  border-bottom: 1px solid #fecaca;
  font-weight: 600;
  text-align: center;
}

[data-theme="dark"] .data-load-error {
  color: #fecaca;
  background: #450a0a;
  border-bottom-color: #7f1d1d;
}
