@font-face {
  font-family: 'GFS Solomos';
  src: url('./assets/fonts/gfs-solomos.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: oklch(0.18 0.01 75);
  --surface: oklch(0.985 0 0);
  --surface-muted: oklch(0.955 0.008 160);
  --line: oklch(0.48 0.01 75);
  --line-soft: oklch(0.86 0.008 160);
  --muted: oklch(0.42 0.012 75);
  --verdigris: oklch(0.42 0.077 160);
  --verdigris-light: oklch(0.90 0.035 160);
  --bronze: oklch(0.48 0.13 55);
  --lost: oklch(0.46 0.16 30);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', Consolas, monospace;
  --z-dropdown: 20;
  --z-sticky: 30;
  --z-backdrop: 40;
  --z-modal: 50;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; height: 100%; }
body { background: var(--surface); color: var(--ink); font: 14px/1.5 var(--font-ui); overflow: hidden; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button, input, select, a { touch-action: manipulation; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, #map:focus-visible { outline: 3px solid var(--bronze); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; 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; z-index: 100; left: 1rem; top: -4rem; padding: .65rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }

#app { height: 100dvh; display: flex; flex-direction: column; }
.masthead { min-height: 74px; display: grid; grid-template-columns: minmax(32px, 1fr) auto minmax(90px, 1fr); align-items: center; gap: 1.5rem; padding: .55rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--ink); }
.masthead-rule { height: 1px; background: var(--ink); opacity: .42; }
.masthead-copy { text-align: center; }
.masthead h1 { display: inline-flex; align-items: baseline; gap: .18em; margin: 0; color: var(--ink); font-family: 'Italianno', cursive; font-size: clamp(2.6rem, 5vw, 3.4rem); font-style: normal; font-weight: 400; line-height: .9; letter-spacing: .01em; text-wrap: balance; white-space: nowrap; }
.masthead h1 i { color: var(--verdigris); font-family: inherit; font-size: 1em; font-style: normal; font-weight: inherit; line-height: inherit; letter-spacing: inherit; }
html[lang="el"] .masthead h1 { font-family: 'GFS Solomos', Georgia, serif; font-size: clamp(2.3rem, 4.5vw, 3.2rem); line-height: .88; letter-spacing: 0; }
.masthead-actions { justify-self: end; display: flex; align-items: center; gap: .6rem; }
.language-button, .icon-button { min-height: 44px; border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.language-button { min-width: 54px; padding: 0 .8rem; font: 600 .77rem var(--font-mono); }
.language-button:hover { background: var(--ink); color: white; }
.icon-button { width: 44px; display: grid; place-items: center; }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.app-shell { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: 348px minmax(0, 1fr); gap: 14px; padding: 14px; background: var(--surface-muted); }
.sidebar { position: relative; z-index: var(--z-sticky); min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--ink); background: var(--surface); box-shadow: 4px 5px 0 oklch(0.18 0.01 75 / .08); }
.tool-tabs { flex: 0 0 62px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--ink); background: white; }
.tool-tab { position: relative; min-width: 0; min-height: 62px; display: flex; align-items: center; justify-content: center; gap: .42rem; padding: 0 .5rem; border: 0; border-right: 1px solid var(--line-soft); background: transparent; color: var(--muted); font-size: .68rem; font-weight: 600; }
.tool-tab:last-child { border-right: 0; }
.tool-tab::after { content: ''; position: absolute; inset: auto .65rem 0; height: 3px; background: transparent; }
.tool-tab:hover { color: var(--ink); background: var(--surface-muted); }
.tool-tab.is-active { color: var(--verdigris); background: var(--verdigris-light); }
.tool-tab.is-active::after { background: var(--verdigris); }
.tool-tab svg, .facet-search svg, .search-box svg { width: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.tab-badge, .mobile-action-bar b { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--lost); color: white; font: 600 .58rem var(--font-mono); }
.sidebar-panel { min-width: 0; min-height: 0; flex: 1; overflow: hidden; overscroll-behavior: contain; }
.task-panel { width: 100%; height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.panel-heading { flex: 0 0 auto; min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 1rem; border-bottom: 1px solid var(--ink); }
.panel-heading h2 { margin: 0; font: 600 1.65rem/1 var(--font-display); }
.panel-heading > span { max-width: 12ch; color: var(--muted); font: 500 .61rem/1.35 var(--font-mono); text-align: right; }
.text-button { min-height: 36px; padding: .2rem 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--verdigris); font-size: .72rem; }

.catalog-register { min-height: 0; display: flex; flex: 1; flex-direction: column; }
.result-list { min-height: 0; overflow-y: auto; border-top: 1px solid var(--line-soft); scrollbar-width: thin; }
.result-item { border-bottom: 1px solid var(--line-soft); background: var(--surface); color: var(--ink); }
.result-item:hover { background: var(--surface-muted); }
.result-focus { width: 100%; display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: .75rem; padding: .65rem 1rem .45rem; border: 0; background: transparent; color: inherit; text-align: left; }
.result-media { position: relative; width: 74px; height: 56px; overflow: hidden; background: var(--ink); }
.result-image { width: 100%; height: 100%; object-fit: cover; filter: saturate(.78) contrast(1.03); }
.result-media b { position: absolute; inset: auto 0 0 auto; min-width: 24px; padding: .12rem .25rem; background: var(--ink); color: white; font: 500 .61rem var(--font-mono); text-align: center; }
.result-copy { min-width: 0; display: grid; gap: .05rem; }
.result-copy strong { overflow: hidden; font: 600 1.08rem/1.12 var(--font-display); text-overflow: ellipsis; white-space: nowrap; }
.result-copy small { overflow: hidden; color: var(--muted); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.result-copy em { color: var(--muted); font: 500 .59rem var(--font-mono); }
.result-foot { display: flex; align-items: center; justify-content: space-between; padding: 0 1rem .5rem 1rem; }
.result-status { max-width: 82px; padding: .18rem .3rem; border: 1px solid var(--line-soft); color: var(--muted); font-size: .58rem; line-height: 1.1; text-align: center; }
.result-status--lost { border-color: var(--lost); color: var(--lost); }
.result-details { min-height: 30px; padding: 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--verdigris); font-size: .65rem; }
.result-details span { margin-left: .25rem; }
.empty-state { margin: auto; padding: 2rem 1.2rem; text-align: center; }
.primary-button { min-height: 44px; padding: 0 .85rem; border: 1px solid var(--verdigris); background: var(--verdigris); color: white; }

.facet-tabs { flex: 0 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line-soft); }
.facet-tab { min-height: 44px; padding: 0 .6rem; border: 0; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: white; color: var(--muted); font-size: .67rem; font-weight: 600; }
.facet-tab:nth-child(even) { border-right: 0; }
.facet-tab:nth-child(n+3) { border-bottom: 0; }
.facet-tab:hover { background: var(--surface-muted); color: var(--ink); }
.facet-tab.is-active { background: var(--ink); color: white; }
.facet-search, .search-box { flex: 0 0 44px; display: grid; grid-template-columns: 19px minmax(0, 1fr); align-items: center; gap: .55rem; margin: .75rem 1rem; padding: 0 .7rem; border: 1px solid var(--line); background: white; color: var(--muted); }
.facet-search input, .search-box input { width: 100%; min-width: 0; height: 42px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.facet-search input::placeholder, .search-box input::placeholder { color: var(--muted); opacity: 1; }
.facet-search:focus-within, .search-box:focus-within { outline: 3px solid var(--bronze); outline-offset: 2px; }
.facet-search input:focus-visible, .search-box input:focus-visible { outline: 0; }
.facet-options { min-height: 0; flex: 1; overflow-y: auto; padding: 0 1rem .75rem; scrollbar-width: thin; }
.facet-option { position: relative; width: 100%; min-height: 51px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .5rem .55rem .55rem; overflow: hidden; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: var(--ink); text-align: left; }
.facet-option:hover:not(:disabled) { background: var(--surface-muted); }
.facet-option.is-selected { padding-left: .8rem; background: var(--verdigris-light); color: oklch(0.27 0.06 160); }
.facet-option.is-selected::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--verdigris); }
.facet-option:disabled { cursor: not-allowed; opacity: .38; }
.facet-option-label { position: relative; z-index: 1; overflow: hidden; font-size: .72rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.facet-option-count { position: relative; z-index: 1; min-width: 2.2rem; font: 500 .65rem var(--font-mono); text-align: right; }
.facet-option i { position: absolute; inset: auto auto 0 0; width: var(--facet-share); height: 3px; background: var(--verdigris); opacity: .58; }
.facet-empty { margin: auto; padding: 1rem; color: var(--muted); text-align: center; }
.filter-dock { flex: 0 0 auto; min-height: 67px; padding: .6rem 1rem .75rem; border-top: 1px solid var(--ink); background: white; }
.filter-dock-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: .45rem; color: var(--muted); font: 500 .57rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.filter-dock-heading b { color: var(--ink); }
.active-filters { display: flex; flex-wrap: wrap; gap: .35rem; }
.active-filters:empty { display: none; }
.active-filters button { min-height: 32px; display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .35rem .2rem .55rem; border: 1px solid oklch(0.65 0.04 160); background: var(--verdigris-light); color: oklch(0.28 0.06 160); font-size: .66rem; font-weight: 600; }
.active-filters b { font-size: 1rem; line-height: 1; }

.search-heading > span { min-width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--ink); color: var(--ink); font-size: .7rem; text-align: center; }
.search-register { border-top: 1px solid var(--line-soft); }
.about-panel { overflow-y: auto; }
.about-panel > p, .about-panel > h3 { margin-inline: 1rem; }
.about-panel > p { max-width: 66ch; color: var(--muted); text-wrap: pretty; }
.about-panel > h3 { margin-top: 1.5rem; margin-bottom: .2rem; font: 600 1.15rem var(--font-display); }
.image-policy { padding: .8rem; border: 1px solid var(--line-soft); color: var(--ink) !important; }
.source-link { color: var(--verdigris); }

.map-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; border: 1px solid var(--ink); background: oklch(0.91 0.01 160); box-shadow: 4px 5px 0 oklch(0.18 0.01 75 / .08); }
#map { width: 100%; height: 100%; background: oklch(0.91 0.01 160); }
#map.is-unavailable { opacity: .2; }
.map-fallback { position: absolute; inset: 50% auto auto 50%; z-index: 10; width: min(420px, calc(100% - 2rem)); translate: -50% -50%; padding: 1rem; border: 1px solid var(--ink); background: white; text-align: center; }
.map-legend { position: absolute; z-index: 500; left: .75rem; bottom: .75rem; width: 236px; border: 1px solid oklch(0.62 0 0); background: oklch(1 0 0 / .95); box-shadow: 0 2px 10px oklch(0 0 0 / .08); }
.map-legend summary { min-height: 40px; display: flex; align-items: center; gap: .55rem; padding: 0 .7rem; cursor: pointer; list-style: none; color: var(--ink); font: 600 .65rem var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
.map-legend summary::-webkit-details-marker { display: none; }
.map-legend summary::after { content: '+'; margin-left: auto; font-size: 1rem; }
.map-legend[open] summary::after { content: '−'; }
.map-legend summary b { min-width: 24px; height: 24px; display: grid; place-items: center; background: var(--ink); color: white; font-size: .61rem; }
.map-legend > div { display: grid; gap: .45rem; padding: .65rem .75rem .75rem; border-top: 1px solid var(--line-soft); }
.map-legend > div span { display: grid; grid-template-columns: 11px minmax(0, 1fr) auto; align-items: center; gap: .55rem; }
.map-legend > div b { color: var(--muted); font-size: .65rem; font-weight: 500; }
.map-legend output { font: 500 .62rem var(--font-mono); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px white, 0 0 0 3px var(--line); }
.legend-dot--extant { background: var(--verdigris); }
.legend-dot--ruins { background: var(--ink); }
.legend-dot--altered { background: var(--bronze); }
.legend-dot--lost { background: var(--lost); }
.map-status { position: absolute; z-index: 500; right: .75rem; bottom: .75rem; display: flex; align-items: center; gap: 1rem; padding: .55rem .75rem; border: 1px solid oklch(0.75 0 0); background: oklch(1 0 0 / .94); box-shadow: 0 2px 10px oklch(0 0 0 / .08); font: 500 .68rem var(--font-mono); }
.map-status span:first-child { display: grid; place-items: center; min-width: 24px; height: 24px; background: var(--ink); color: white; }
.mobile-action-bar { display: none; }

.wonder-marker { width: 28px; height: 28px; display: grid; place-items: center; border: 3px solid white; border-radius: 50%; background: var(--ink); color: white; box-shadow: 0 2px 9px oklch(0 0 0 / .35); transition: transform .18s var(--ease-out); }
.wonder-marker-glyph { width: 7px; height: 7px; display: block; border: 1.5px solid currentColor; transform: rotate(45deg); }
.wonder-marker:hover { transform: scale(1.12); }
.wonder-marker--standing, .wonder-marker--restored, .wonder-marker--partly-standing, .wonder-marker--partly-restored { background: var(--verdigris); }
.wonder-marker--lost { background: var(--lost); }
.wonder-marker--re-erected, .wonder-marker--unfinished { background: var(--bronze); }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: oklch(0.42 0.077 160 / .24); }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { display: grid; place-items: center; background: var(--ink); color: white; font: 500 .72rem var(--font-mono); }
.leaflet-control-zoom a, .leaflet-control-layers { border-radius: 0 !important; }
.wonder-preview-popup .leaflet-popup-content-wrapper { padding: 0; border: 1px solid var(--ink); border-radius: 0; box-shadow: 0 18px 50px oklch(0 0 0 / .26); overflow: hidden; }
.wonder-preview-popup .leaflet-popup-content { width: 340px !important; margin: 0; }
.wonder-preview-popup .leaflet-popup-tip { border: 1px solid var(--ink); box-shadow: none; }
.wonder-preview-popup .leaflet-popup-close-button { z-index: 2; width: 34px; height: 34px; padding: 4px !important; background: oklch(0.12 0 0 / .72); color: white !important; font-size: 24px; }
.map-preview { background: var(--surface); color: var(--ink); }
.map-preview-media { position: relative; height: 154px; overflow: hidden; background: var(--ink); border-bottom: 1px solid var(--ink); }
.map-preview-image { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) contrast(1.04); }
.map-preview-media > span { position: absolute; left: .7rem; bottom: .55rem; display: grid; place-items: center; width: 34px; height: 34px; background: var(--ink); color: white; font: 500 .72rem var(--font-mono); }
.map-preview-body { padding: .75rem .9rem .85rem; }
.map-preview-body > p { margin: 0; color: var(--verdigris); font: 600 .58rem var(--font-ui); letter-spacing: .08em; text-transform: uppercase; }
.map-preview h2 { margin: .08rem 0; font: 600 1.65rem/.98 var(--font-display); letter-spacing: -.02em; }
.map-preview address { color: var(--muted); font: italic .74rem var(--font-ui); }
.map-preview dl { display: grid; grid-template-columns: 1fr 1fr; margin: .65rem 0; border-block: 1px dashed var(--line); }
.map-preview dl div { min-width: 0; padding: .45rem 0; }
.map-preview dl div + div { padding-left: .65rem; border-left: 1px solid var(--line-soft); }
.map-preview dt { color: var(--muted); font: 600 .55rem var(--font-ui); text-transform: uppercase; }
.map-preview dd { margin: .12rem 0 0; font: 500 .63rem/1.25 var(--font-mono); }
.map-preview button { min-height: 36px; width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 .7rem; border: 1px solid var(--ink); background: var(--ink); color: white; font-size: .7rem; }

.detail-dialog { width: min(1100px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 1px solid var(--ink); border-radius: 0; background: var(--surface); color: var(--ink); }
.detail-dialog::backdrop { background: oklch(0.08 0 0 / .72); }
.dialog-close { position: absolute; z-index: 2; top: .7rem; right: .7rem; width: 44px; height: 44px; border: 1px solid var(--ink); background: white; color: var(--ink); font-size: 1.7rem; line-height: 1; }
.dialog-close:hover { background: var(--ink); color: white; }
.detail-layout { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(360px, 1.1fr); min-height: 560px; overscroll-behavior: contain; }
.detail-media { min-width: 0; min-height: 420px; background: var(--ink); overflow: hidden; }
.detail-gallery { position: relative; width: 100%; height: 100%; min-height: 420px; }
.detail-gallery-track { display: flex; width: 100%; height: 100%; min-height: 420px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x pan-y; }
.detail-gallery-track::-webkit-scrollbar { display: none; }
.detail-figure { position: relative; flex: 0 0 100%; width: 100%; height: 100%; min-height: 420px; margin: 0; overflow: hidden; background: var(--ink); scroll-snap-align: start; scroll-snap-stop: always; }
.detail-figure picture { position: absolute; inset: 0; }
.gallery-controls { position: absolute; z-index: 3; top: 1rem; left: 50%; display: flex; align-items: center; gap: .25rem; padding: .22rem; border: 1px solid oklch(1 0 0 / .28); background: oklch(0.12 0.015 155 / .84); color: white; transform: translateX(-50%); backdrop-filter: blur(10px); }
.gallery-controls button { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; background: transparent; color: inherit; font: 500 1.2rem var(--font-ui); cursor: pointer; }
.gallery-controls button:hover:not(:disabled), .gallery-controls button:focus-visible { background: oklch(1 0 0 / .13); }
.gallery-controls button:disabled { opacity: .3; cursor: default; }
.gallery-controls output { min-width: 3.8rem; text-align: center; font: 600 .65rem var(--font-mono); }
.image-placeholder { height: 100%; min-height: 420px; display: grid; place-content: center; justify-items: center; gap: .65rem; padding: 2rem; color: oklch(1 0 0 / .74); text-align: center; }
.image-placeholder span { font: 500 clamp(4rem, 11vw, 8rem)/1 var(--font-display); color: oklch(1 0 0 / .16); }
.image-placeholder strong { font: 500 1.4rem var(--font-display); }
.image-placeholder small { max-width: 36ch; color: oklch(1 0 0 / .62); font: .66rem/1.5 var(--font-mono); }
.detail-image { width: 100%; height: 100%; object-fit: cover; }
.media-type-badge { position: absolute; z-index: 1; top: 1rem; left: 1rem; padding: .35rem .5rem; border: 1px solid oklch(1 0 0 / .5); background: oklch(0.18 0.01 75 / .88); color: white; font: 600 .65rem var(--font-ui); }
.media-credit { position: absolute; z-index: 1; inset: auto 0 0; display: flex; flex-wrap: wrap; gap: .35rem; padding: .65rem .8rem; background: oklch(0.10 0.01 75 / .92); color: oklch(1 0 0 / .78); font: 500 .65rem/1.35 var(--font-ui); }
.media-credit a { color: white; text-underline-offset: 2px; }
.detail-copy { padding: 3rem clamp(1.5rem, 4vw, 3.6rem); overflow: auto; }
.detail-kind { margin: 0; color: var(--verdigris); font: 600 .68rem var(--font-ui); text-transform: uppercase; }
.detail-copy h2 { margin: .15rem 3rem .1rem 0; font: 600 clamp(2.3rem, 5vw, 4.5rem)/.88 var(--font-display); letter-spacing: -.035em; text-wrap: balance; }
.detail-location { margin: .55rem 0 1.5rem; color: var(--muted); font-style: italic; }
.detail-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.5rem; }
.detail-meta span { padding: .28rem .4rem; border: 1px solid var(--line); font: 500 .62rem var(--font-mono); }
.detail-description { max-width: 68ch; font-size: .98rem; line-height: 1.75; text-wrap: pretty; }
.detail-context { margin-top: 1.4rem; border-top: 1px solid var(--ink); }
.detail-context p { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; margin: 0; padding: .58rem 0; border-bottom: 1px dashed var(--line); }
.detail-context span { color: var(--muted); font: 600 .62rem var(--font-ui); text-transform: uppercase; }
.detail-context strong { font: 500 .68rem var(--font-mono); text-align: right; }
.detail-sources h3 { margin: 1.5rem 0 .3rem; font: 600 1.2rem var(--font-display); }
.detail-sources ul { margin: 0; padding-left: 1.1rem; }
.detail-sources a { color: var(--verdigris); }
.mobile-only { display: none; }
.sheet-close { display: none; }

@media (max-width: 1050px) and (min-width: 761px) {
  .app-shell { grid-template-columns: 330px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .masthead h1 { font-size: 2rem; }
  html[lang="el"] .masthead h1 { font-size: 1.72rem; }
}

@media (max-width: 760px) {
  .masthead { min-height: 60px; grid-template-columns: minmax(0, 1fr) auto; padding: max(.4rem, env(safe-area-inset-top)) max(.7rem, env(safe-area-inset-right)) .4rem max(.7rem, env(safe-area-inset-left)); }
  .masthead-rule { display: none; }
  .masthead-copy { text-align: left; }
  .masthead h1 { max-width: 245px; font-size: 1.95rem; line-height: .86; white-space: normal; }
  html[lang="el"] .masthead h1 { max-width: 238px; font-size: 1.35rem; line-height: .96; }
  .app-shell { display: block; position: relative; padding: 0; }
  .sidebar { position: absolute; inset: 0; z-index: 1200; width: 100%; height: 100%; border: 0; box-shadow: none; transform: translateY(100%); transition: transform .22s var(--ease-out); }
  .sidebar.is-open { transform: translateY(0); }
  .tool-tabs { display: none; }
  .sheet-close { position: absolute; z-index: 3; top: max(.55rem, env(safe-area-inset-top)); right: max(.65rem, env(safe-area-inset-right)); width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--ink); background: white; color: var(--ink); font-size: 1.65rem; line-height: 1; }
  .panel-heading { min-height: 60px; padding-right: 4.5rem; }
  .map-stage { width: 100%; height: 100%; border: 0; box-shadow: none; }
  .mobile-action-bar { position: absolute; z-index: 600; inset: auto 0 0; height: calc(60px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, 1fr); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--ink); background: var(--surface); }
  .mobile-action-bar button { position: relative; min-height: 60px; display: grid; place-content: center; justify-items: center; gap: .15rem; border: 0; border-right: 1px solid var(--line-soft); background: transparent; color: var(--muted); font-size: .61rem; }
  .mobile-action-bar button.is-active { color: var(--verdigris); background: var(--verdigris-light); }
  .mobile-action-bar svg { width: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
  .mobile-action-bar b { position: absolute; top: .4rem; left: calc(50% + 9px); }
  .map-legend { left: max(.55rem, env(safe-area-inset-left)); bottom: calc(69px + env(safe-area-inset-bottom)); width: min(250px, calc(100% - 1.1rem)); }
  .map-legend:not([open]) { width: auto; min-width: 118px; }
  .map-status { right: max(.6rem, env(safe-area-inset-right)); bottom: calc(69px + env(safe-area-inset-bottom)); }
  .leaflet-bottom { bottom: calc(60px + env(safe-area-inset-bottom)); }
  .map-status span:last-child { display: none; }
  .facet-options { padding-bottom: 1rem; }
  .result-list { padding-bottom: env(safe-area-inset-bottom); }
  .filter-dock { padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
  .detail-dialog { width: 100%; max-width: none; max-height: 100dvh; height: 100dvh; border: 0; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-media, .detail-gallery, .detail-gallery-track, .detail-figure, .image-placeholder { min-height: 42dvh; height: 42dvh; }
  .detail-copy { padding: 1.4rem; }
  .detail-copy h2 { font-size: 2.45rem; }
  .detail-context p { grid-template-columns: 7.5rem 1fr; }
  .wonder-preview-popup .leaflet-popup-content { width: min(310px, calc(100vw - 44px)) !important; }
  .map-preview-media { height: 132px; }
}

@media (max-width: 340px) {
  .masthead { min-height: 80px; }
  .masthead h1 { max-width: 185px; font-size: 1.72rem; line-height: .84; }
  html[lang="el"] .masthead h1 { max-width: 180px; font-size: 1.15rem; line-height: .96; }
  .language-button { min-width: 48px; padding-inline: .55rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
