:root {
  color-scheme: dark;
  --page: #1d1e20;
  --ocean: #232629;
  --land: #414145;
  --map-border: #252629;
  --ink: #dcdfe1;
  --muted: #92989d;
  --paper: rgba(30, 33, 36, .97);
  --card: #292d31;
  --line: #3b3f43;
  --soft: #2b3034;
  --point: #70a9c0;
  --accent: #95bdd0;
  --focus: #7caac0;
  --shadow: 0 12px 32px #0003;
}
body[data-theme="light"] {
  color-scheme: light;
  --page: #f6f7f7; --ocean: #edf0f1; --land: #d4d8db;
  --map-border: #b9c0c5; --ink: #2f383d; --muted: #707b81;
  --paper: rgba(248,250,250,.97); --card: #fff; --line: #d5dadd;
  --soft: #e7ecee; --point: #4f8ba4; --accent: #3d7188;
  --shadow: 0 10px 28px #23364010;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { background: var(--page); color: var(--ink); font: 14px/1.5 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:hover, a:hover { color: var(--accent); }
button:disabled { cursor: default; opacity: .4; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
a { color: inherit; }
button svg { display: block; width: 18px; height: 18px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 28px; z-index: 30; padding: 10px; background: var(--card); }
.skip-link:focus { top: 12px; }
.page-header { position: absolute; top: 24px; left: 30px; right: 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.page-header h1 { margin: 0; font: 300 clamp(30px,3.35vw,48px)/1.15 "Segoe UI", sans-serif; letter-spacing: -.025em; }
.brand { font: inherit; letter-spacing: inherit; text-align: left; padding: 0; }
#atlas-summary { margin: 7px 0 0 2px; color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.topbar { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.language-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.language-button:hover { background: var(--soft); }
.language-divider { opacity: .6; }
html[lang="en"] .locale-en, html[lang="zh-CN"] .locale-zh { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.nav-item { border-radius: 6px; padding: 8px 13px; font-size: 12px; color: var(--muted); }
.nav-item.active { color: var(--ink); background: var(--soft); }
.icon-button { display: flex; justify-content: center; align-items: center; width: 34px; height: 34px; padding: 8px; border-radius: 7px; flex-shrink: 0; }
.icon-button:hover { background: var(--soft); }
.theme { margin-left: 8px; color: var(--muted); }
#map { position: absolute; inset: 116px 28px 28px; border: 1px solid #474a4e; border-radius: 16px; overflow: hidden; background: var(--ocean); }
.glass { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel { position: absolute; z-index: 4; left: 44px; top: 132px; bottom: 45px; width: 320px; display: flex; flex-direction: column; overflow: hidden; border-radius: 11px; }
.panel.is-collapsed { visibility: hidden; pointer-events: none; }
.panel-top { padding: 21px 20px 13px; flex-shrink: 0; }
.heading-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.heading-row h2 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: .025em; }
.collapse-button { display: inline-flex; align-items: center; gap: 4px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; color: var(--muted); }
.collapse-button svg { width: 13px; height: 13px; }
.collapse-button:hover { background: var(--soft); }
.subtitle { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.filters { margin-top: 15px; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); padding: 8px 9px; }
.search:focus-within { border-color: var(--focus); }
.search svg { display: block; width: 15px; height: 15px; color: var(--muted); }
.search input { min-width: 0; flex: 1; border: 0; background: transparent; outline: none; padding: 0; height: 20px; font-size: 12px; }
.search input:focus-visible { outline: none; }
.search kbd { font: 10px "Segoe UI", sans-serif; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; }
.filter-row { display: flex; gap: 7px; margin-top: 8px; }
.filter-row select { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); padding: 6px 8px; font-size: 11px; cursor: pointer; }
.reset-filter { width: 30px; height: 30px; padding: 7px; border: 1px solid var(--line); border-radius: 5px; }
.panel-content { padding: 0 15px 16px 20px; overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; scrollbar-width: thin; scrollbar-color: #737a7f55 transparent; }
.city-card { display: block; width: 100%; text-align: left; padding: 15px 2px; border-bottom: 1px solid var(--line); }
.city-card:hover { color: var(--ink); background: var(--soft); }
.card-title { display: flex; gap: 8px; align-items: baseline; }
.card-title h2 { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 500; }
.english { color: var(--muted); }
.card-title .english { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-arrow { margin-left: auto; color: var(--muted); font-size: 12px; }
.card-date { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 5px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.card-date svg { width: 11px; height: 11px; }
.badge { padding: 2px 6px; border-radius: 4px; background: var(--soft); color: var(--muted); font-size: 10px; }
.panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 11px 19px; font-size: 10px; color: var(--muted); flex-shrink: 0; }
.panel-footer button { padding: 0; font-size: 10px; }
.reopen { position: absolute; z-index: 4; top: 132px; left: 44px; display: flex; gap: 8px; align-items: center; border-radius: 6px; padding: 9px 12px; color: var(--muted); font-size: 11px; box-shadow: none; }
.reopen:hover { color: var(--ink); background: var(--soft); }
.reopen span { font-size: 12px; }
.map-controls { position: absolute; z-index: 3; bottom: 52px; right: 44px; display: flex; flex-direction: column; gap: 5px; }
.map-controls button { font-size: 20px; font-weight: 300; color: var(--muted); border-radius: 6px; box-shadow: none; background: var(--paper); }
.map-controls button:last-child { margin-top: 3px; }
.map-help { position: absolute; left: 50%; bottom: 39px; transform: translateX(-50%); pointer-events: none; white-space: nowrap; font-size: 9px; color: var(--muted); opacity: .7; letter-spacing: .05em; }
.attribution { position: absolute; right: 31px; bottom: 7px; color: var(--muted); font-size: 8px; opacity: .7; }
.attribution a { text-decoration: none; }
.attribution a:hover { text-decoration: underline; }
.maplibregl-canvas:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
.map-pin { position: absolute; display: grid; place-items: center; width: 18px; height: 18px; padding: 0; background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.pin-dot { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--point); border: 1px solid var(--ocean); box-shadow: 0 0 4px #69a4be30; }
.map-pin:hover, .map-pin:focus-visible, .map-pin.is-selected { z-index: 3 !important; }
.map-pin:hover .pin-dot, .map-pin:focus-visible .pin-dot { width: 7px; height: 7px; background: #acd0df; box-shadow: 0 0 6px #77b2ca65; }
.map-pin.is-selected .pin-dot { box-shadow: 0 0 0 2px #78aac13a,0 0 7px #77b2ca55; background: #add1df; }
.maplibregl-popup { z-index: 6; pointer-events: none !important; }
.maplibregl-popup-content { border-radius: 8px !important; border: 1px solid var(--line); padding: 12px 14px !important; background: var(--card) !important; color: var(--ink); box-shadow: var(--shadow) !important; font-family: inherit; }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--card); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--card); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--card); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--card); }
.tooltip-title { font-size: 15px; font-weight: 500; }
.tooltip-country { color: var(--muted); font-size: 10px; margin: 3px 0 7px; }
.tooltip-dates { font-size: 11px; line-height: 1.8; }
.detail-back { display: flex; align-items: center; gap: 6px; padding: 0; margin: 4px 0 16px; color: var(--muted); font-size: 11px; }
.detail-back svg { width: 13px; height: 13px; }
.city-cover { position: relative; background: var(--ocean); overflow: hidden; height: 110px; }
.detail-cover { margin-bottom: 18px; border-radius: 7px; border: 1px solid var(--line); }
.city-cover svg { width: 100%; height: 100%; display: block; }
.city-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.country-tag { position: absolute; top: 9px; left: 10px; font-size: 10px; color: var(--muted); }
.cover-coordinates { position: absolute; bottom: 9px; right: 10px; font-size: 9px; color: var(--muted); font-variant-numeric: tabular-nums; }
.detail-heading h2 { font-size: 26px; font-weight: 400; margin: 0 0 4px; line-height: 1.3; }
.detail-heading .english { font-size: 11px; }
.detail-location { font-size: 11px; color: var(--muted); margin: 10px 0 18px; }
.detail-section { padding: 15px 0 3px; margin-top: 15px; border-top: 1px solid var(--line); }
.detail-section h3 { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 500; margin: 0 0 10px; }
.detail-section h3 svg { width: 14px; height: 14px; color: var(--muted); }
.month-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.month-chip { padding: 6px 8px; border-radius: 4px; background: var(--soft); font-size: 11px; font-variant-numeric: tabular-nums; }
.subtle-copy { margin: 8px 0; font-size: 11px; line-height: 1.8; color: var(--muted); }
.empty-photo { display: flex; gap: 10px; align-items: center; border: 1px dashed var(--line); border-radius: 5px; padding: 14px; font-size: 11px; color: var(--muted); }
.empty-photo svg { width: 19px; flex-shrink: 0; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.album-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.album-heading h3 { margin: 0; }
.album-add { min-height: 32px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; color: var(--accent); }
.album-add:hover { background: var(--soft); }
.album-sync { margin: 12px 0; color: var(--ink); }
.album-sync[hidden], .album-sync button[hidden] { display: none; }
.album-sync p { margin: 0 0 8px; font-size: 12px; line-height: 1.65; }
.album-sync button { min-height: 38px; }
.upload-dialog { width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 24px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); color: var(--ink); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
.upload-dialog::selection { background: var(--focus); color: var(--page); }
.upload-dialog p { margin: 12px 0; text-align: left; font-size: 13px; line-height: 1.65; }
.upload-dialog .album-sync { padding: 12px 0; border-bottom: 1px solid var(--line); }
.upload-dialog .album-sync p { margin: 0 0 8px; }
.upload-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.upload-heading h2 { font-size: 24px; font-weight: 400; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.upload-copy { color: var(--ink); opacity: .78; }
.upload-account { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; margin-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 12px; }
.upload-label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.upload-label input, .upload-label select { width: 100%; min-height: 38px; background: var(--page); border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; caret-color: var(--accent); }
.upload-label input::placeholder { color: var(--ink); opacity: .7; }
.upload-button { flex-shrink: 0; padding: 8px 10px; min-height: 38px; font-size: 12px; border: 1px solid var(--line); border-radius: 5px; }
.upload-button:hover { background: var(--soft); }
.upload-button.primary { background: var(--accent); border-color: var(--accent); color: var(--page); }
body[data-theme="light"] .upload-button.primary { color: #fff; }
.upload-drop { width: 100%; min-height: 126px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; margin: 18px 0; padding: 20px 12px; border: 1px dashed var(--muted); border-radius: 7px; background: var(--page); }
.upload-drop strong { font-size: 16px; font-weight: 500; }
.upload-drop span { font-size: 13px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.upload-drop small { margin-top: 5px; font-size: 11px; color: var(--ink); opacity: .75; }
.upload-drop.is-dragging { border-style: solid; border-color: var(--accent); background: var(--soft); }
.upload-queue { margin: 10px 0; }
.upload-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.upload-row img { width: 76px; height: 88px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.upload-photo-copy { flex: 1; min-width: 0; }
.upload-filename { display: block; font-size: 12px; overflow-wrap: anywhere; }
.upload-photo-copy small { display: block; font-size: 11px; margin: 3px 0 10px; opacity: .75; }
.upload-row > button { padding: 6px; border: 0; min-height: 32px; }
.upload-status { color: var(--ink); }
.upload-status:empty { display: none; }
.upload-status[role="alert"] { padding: 10px; background: var(--page); border-radius: 5px; }
.upload-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.upload-modes { display: flex; gap: 8px; margin: 16px 0; }
.upload-modes [aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--soft); }
.upload-existing { margin-top: 10px; }
.upload-existing .upload-row { align-items: center; }
.upload-existing .upload-row img { width: 100px; height: 76px; }
.upload-existing .upload-row > button { min-height: 44px; }
.upload-confirmation { margin-top: 22px; }
.upload-confirmation h3 { margin: 0 0 14px; font-size: 18px; font-weight: 500; }
.upload-confirmation img { display: block; width: 100%; max-height: 240px; object-fit: contain; background: var(--page); border-radius: 5px; }
.upload-confirmation .upload-photo-context { overflow-wrap: anywhere; }
.upload-button.danger { color: #f0aea7; border-color: #8f514c; }
.upload-button.danger:hover { background: #4c3031; }
body[data-theme="light"] .upload-button.danger { color: #9c302b; border-color: #bd817d; }
body[data-theme="light"] .upload-button.danger:hover { background: #f8e7e6; }
@media (max-width: 600px) {
  .upload-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 18px 14px; }
  .upload-heading h2 { font-size: 22px; }
  .upload-account { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  .upload-row { gap: 8px; flex-wrap: wrap; }
  .upload-row img { width: 62px; height: 76px; }
  .upload-row > button { margin-left: auto; }
  .upload-label input, .upload-label select { font-size: 16px; }
}
.photo-tile { padding: 0; }
.photo-tile img { width: 100%; height: 96px; object-fit: cover; border-radius: 5px; display: block; }
.albums-open #map { visibility: hidden; }
.album-library { position: absolute; inset: 116px 28px 28px; overflow-y: auto; overscroll-behavior: contain; padding: 28px 32px 40px; border: 1px solid var(--line); border-radius: 16px; background: var(--page); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.library-header { padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.library-header h2 { margin: 0; width: fit-content; font-size: 28px; font-weight: 400; letter-spacing: -.02em; }
.library-summary { margin: 5px 0 22px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.library-controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px; }
.library-grouping { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; }
.library-grouping button { min-height: 36px; padding: 7px 14px; border-radius: 4px; font-size: 13px; }
.library-grouping button[aria-pressed="true"] { background: var(--soft); color: var(--ink); }
.library-filters { display: flex; gap: 14px; }
.library-filters label { display: flex; flex-direction: column; gap: 5px; min-width: 140px; font-size: 12px; }
.library-filters select { min-height: 38px; max-width: 240px; padding: 7px 26px 7px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--page); font-size: 13px; cursor: pointer; }
.library-groups--city { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 32px; }
.library-group { min-width: 0; }
.library-groups--month .library-group + .library-group { margin-top: 36px; }
.library-group-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 12px; margin-bottom: 14px; }
.library-group-heading h3 { margin: 0; font-size: 20px; font-weight: 400; }
.library-group-meta { font-size: 12px; color: var(--muted); }
.library-city-link { padding: 0; text-align: left; font: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; overflow-wrap: anywhere; }
.library-city-link:hover { text-decoration-color: currentColor; }
.library-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
.library-groups--month .library-photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.library-photo { margin: 0; min-width: 0; }
.library-photo-button { display: block; padding: 0; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 7px; background: var(--soft); }
.library-photo-button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.library-photo-button:hover { outline: 1px solid var(--accent); outline-offset: 3px; }
.library-photo-button:focus-visible { outline: 2px solid var(--focus); }
.library-photo figcaption { display: flex; flex-direction: column; gap: 3px; margin-top: 9px; font-size: 13px; overflow-wrap: anywhere; }
.library-date { font-variant-numeric: tabular-nums; }
.library-caption { color: var(--muted); font-size: 12px; }
.library-photo-error { display: block; padding: 12px; font-size: 12px; }
.library-empty { grid-column: 1 / -1; padding: 48px 0; text-align: center; }
.library-empty h3 { margin: 0 0 8px; font-size: 20px; font-weight: 400; }
.library-empty p { margin: 0 auto 18px; max-width: 48ch; }
.library-text-button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 5px; }
body[data-theme="light"] .library-summary, body[data-theme="light"] .library-group-meta, body[data-theme="light"] .library-caption { color: #606d74; }
.story-link { display: block; margin-top: 10px; padding: 9px 11px; border-radius: 5px; background: var(--soft); text-decoration: none; font-size: 11px; }
.empty-state { padding: 30px 4px; text-align: center; }
.empty-state > svg { width: 25px; height: 25px; color: var(--muted); }
.empty-state h2 { font-size: 15px; font-weight: 500; }
.empty-state p { font-size: 11px; color: var(--muted); }
.empty-state button { padding: 8px 12px; margin-top: 8px; background: var(--soft); border-radius: 5px; font-size: 11px; }
.timeline-note { color: var(--muted); font-size: 11px; line-height: 1.8; margin: 0 0 20px; }
.timeline-group { margin-left: 4px; border-left: 1px solid var(--line); padding: 0 0 23px 16px; }
.timeline-group h2 { position: relative; font-size: 12px; font-weight: 500; margin: 0 0 10px; }
.timeline-group h2:before { content: ""; position: absolute; left: -19px; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--point); }
.timeline-place { width: 100%; padding: 10px 0; display: flex; justify-content: space-between; align-items: center; text-align: left; border-bottom: 1px solid var(--line); font-size: 12px; }
.timeline-place small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.stats-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.stats-hero strong { display: block; font-size: 38px; font-weight: 300; line-height: 1.1; }
.stats-hero span { display: block; color: var(--muted); font-size: 11px; margin-top: 7px; }
.stats-range { font-size: 11px; color: var(--muted); margin: 18px 0; }
.stats-country { display: block; text-align: left; width: 100%; padding: 11px 0; }
.stats-country .label { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 11px; }
.bar-track { height: 3px; background: var(--soft); }
.bar-fill { height: 100%; background: #5a8295; }
.status-stats { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 17px; }
.loading { position: fixed; z-index: 20; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; padding: 30px; background: var(--page); color: var(--muted); font-size: 12px; text-align: center; }
.loading.error { inset: auto; left: 50%; top: 40%; transform: translate(-50%,-50%); width: min(90vw,430px); background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.loading button { padding: 8px 14px; border-radius: 5px; background: var(--soft); }
dialog { max-width: min(90vw,1000px); max-height: 90dvh; padding: 45px 18px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: #111b; }
dialog img { display: block; max-width: 100%; max-height: 70dvh; margin: auto; object-fit: contain; }
dialog p { text-align: center; font-size: 12px; color: var(--muted); }
dialog .icon-button { position: absolute; right: 7px; top: 5px; font-size: 23px; }
@media (min-width: 761px) and (max-width: 1000px) {
  .page-header h1 { font-size: 30px; }
  .topbar { gap: 2px; }
  .nav-item { padding: 8px 9px; font-size: 11px; }
  .theme { margin-left: 2px; }
}
@media (max-width: 760px) {
  .page-header { top: 20px; left: 20px; right: 20px; display: block; }
  .page-header h1 { font-size: clamp(25px,7.2vw,34px); }
  #atlas-summary { font-size: 10px; margin-top: 5px; }
  .topbar { margin-top: 10px; gap: 2px; }
  .nav-item { padding: 5px 8px; font-size: 11px; }
  .language-button { min-height: 32px; padding: 5px 6px; gap: 4px; font-size: 11px; }
  .theme { margin-left: auto; height: 27px; width: 27px; }
  .theme svg { width: 16px; height: 16px; }
  #map { inset: 138px 12px 22px; border-radius: 11px; }
  .reopen { top: 151px; left: 25px; padding: 8px 10px; font-size: 10px; }
  .panel { top: auto; left: 24px; right: 24px; bottom: 36px; width: auto; max-height: 46dvh; border-radius: 9px; }
  .panel-top { padding: 15px 15px 10px; }
  .heading-row h2 { font-size: 18px; }
  .subtitle { font-size: 9px; margin-top: 6px; }
  .filters { display: flex; gap: 6px; margin-top: 10px; }
  .search { flex: 1; min-width: 0; padding: 6px 7px; }
  .search input { font-size: 11px; }
  .search kbd { display: none; }
  .filter-row { flex: 1.15; min-width: 0; margin: 0; gap: 4px; }
  .filter-row select { padding: 5px 1px; font-size: 9px; }
  .reset-filter { width: 24px; height: 33px; padding: 5px; }
  .panel-content { padding: 0 11px 14px 15px; }
  .city-card { padding: 12px 1px; }
  .panel-footer { padding: 9px 14px; font-size: 9px; }
  .panel-footer button { font-size: 9px; }
  .map-controls { right: 25px; bottom: calc(46dvh + 49px); }
  .map-controls button { width: 30px; height: 30px; font-size: 18px; }
  body.panel-collapsed .map-controls { bottom: 44px; }
  .map-help { bottom: 33px; font-size: 8px; left: 26px; transform: none; }
  body:not(.panel-collapsed) .map-help { display: none; }
  .attribution { right: 14px; bottom: 5px; font-size: 7px; }
  .detail-cover { height: 70px; margin-bottom: 11px; }
  .detail-heading h2 { font-size: 23px; }
  .detail-back { margin: 0 0 10px; }
  .detail-location { margin: 8px 0 10px; }
  .detail-section { margin-top: 10px; padding-top: 10px; }
  .detail-section h3 { margin-bottom: 7px; }
  body.detail-open .subtitle { display: none; }
  .album-library { inset: 138px 12px 22px; padding: 20px 18px 28px; border-radius: 11px; }
  .library-header { padding-bottom: 20px; margin-bottom: 24px; }
  .library-header h2 { font-size: 25px; }
  .library-summary { margin-bottom: 18px; }
  .library-controls { gap: 18px; align-items: stretch; }
  .library-grouping { align-self: flex-start; }
  .library-grouping button { min-height: 38px; }
  .library-filters { width: 100%; gap: 10px; }
  .library-filters label { flex: 1; min-width: 0; }
  .library-filters select { min-width: 0; max-width: none; width: 100%; font-size: 16px; }
  .library-groups--city { grid-template-columns: 1fr; gap: 28px; }
  .library-groups--month .library-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-group-heading h3 { font-size: 19px; }
}
@media (max-width: 380px) {
  .page-header { left: 14px; right: 14px; }
  .nav-item { padding: 6px 4px; font-size: 10px; }
  .language-button { font-size: 10px; gap: 3px; padding: 5px 4px; }
  .theme { width: 24px; margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
