/* /map – 3D satellite map search (30.11.2026). Site palette: ink/navy #13242a, gold #b0813a / #d2a75f, sand/ivory #f7f3ec */
.m3-body { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #0e2530; }
.m3-body .top { flex: none; }
.m3-app { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #0e2530; color: var(--ink); }
.m3-map { position: absolute; inset: 0; }
.m3-veil { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #1d3a46, #0e2530 70%); z-index: 5; }
.m3-spin { width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(210,167,95,.25); border-top-color: #d2a75f; animation: m3spin 1s linear infinite; }
@keyframes m3spin { to { transform: rotate(360deg); } }

/* glass cards */
.m3-top, .m3-panel, .m3-tools button, .m3-drawbar, .m3-skip { background: rgba(247,243,236,.94); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); box-shadow: 0 10px 30px rgba(10,24,30,.28); }

/* top-left: title, coasts, filters */
.m3-top { position: absolute; z-index: 6; top: 16px; left: 16px; width: 330px; max-height: calc(100% - 32px); overflow: auto; padding: 16px 16px 12px; border-radius: 10px; border: 1px solid rgba(210,167,95,.45); transition: opacity .5s, transform .5s; }
.m3-title .eyebrow { font-size: 10px; }
.m3-title h1 { font-size: 30px; line-height: 1.05; margin: 4px 0 2px; }
.m3-title p { margin: 0 0 10px; font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.m3-regions { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.m3-regions button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--ink); transition: background .15s, border-color .15s; }
.m3-regions button small { margin-left: 5px; color: var(--muted); font-weight: 600; font-size: 10.5px; }
.m3-regions button:hover { border-color: var(--gold); }
.m3-regions button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.m3-regions button.on small { color: var(--gold-2); }
.m3-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m3-filters label { display: flex; flex-direction: column; gap: 2px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.m3-filters select { width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink); }
.m3-filters select:focus { outline: 2px solid var(--gold-2); outline-offset: 0; }
.m3-ftoggle { display: none; }
.m3-count { margin-top: 10px; font-size: 13px; color: var(--ink-soft); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.m3-count b { font-family: var(--serif); font-size: 26px; color: var(--gold); font-weight: 600; line-height: 1; }
.m3-reset { margin-left: auto; background: none; border: 0; color: var(--gold); text-decoration: underline; cursor: pointer; font-size: 12px; padding: 0; }

/* tools */
.m3-tools { position: absolute; z-index: 6; top: 16px; right: 416px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 520px; }
.m3-tools button { border: 1px solid rgba(210,167,95,.45); border-radius: 999px; padding: 8px 13px; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--ink); white-space: nowrap; }
.m3-tools button:hover { border-color: var(--gold); color: var(--gold); }
.m3-tools button.on { background: var(--ink); color: var(--gold-2); border-color: var(--ink); }
.m3-drawbar { position: absolute; z-index: 7; left: 50%; top: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; border-radius: 999px; border: 1px solid var(--gold-2); font-size: 13px; font-weight: 600; }
.m3-drawbar button { border: 0; border-radius: 999px; padding: 7px 14px; font-weight: 700; cursor: pointer; font-size: 12px; }
.m3-drawbar #d-done { background: var(--ink); color: #fff; }
.m3-drawbar #d-cancel { background: transparent; color: var(--ink-soft); }
.m3-app.drawing .m3-map canvas { cursor: crosshair !important; }

/* cinematic intro */
.m3-caption { position: absolute; z-index: 6; left: 50%; bottom: 46px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity .8s, transform .8s; color: #fff; font-family: var(--serif); font-style: italic; font-size: clamp(22px, 3.2vw, 40px); text-shadow: 0 2px 18px rgba(0,0,0,.65); white-space: nowrap; }
.m3-caption.on { opacity: 1; transform: translate(-50%, 0); }
.m3-skip { position: absolute; z-index: 7; right: 416px; bottom: 28px; border: 1px solid var(--gold-2); border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 12px; cursor: pointer; color: var(--ink); }
.m3-app.intro .m3-top, .m3-app.intro .m3-tools { opacity: .25; }
.m3-app.intro .m3-top:hover, .m3-app.intro .m3-tools:hover { opacity: 1; }

/* list panel (desktop: right side) */
.m3-panel { position: absolute; z-index: 6; top: 16px; right: 16px; bottom: 16px; width: 384px; border-radius: 10px; border: 1px solid rgba(210,167,95,.45); display: flex; flex-direction: column; overflow: hidden; }
.m3-phead { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: default; color: var(--ink); }
.m3-phead b { font-size: 13px; letter-spacing: .04em; flex: 1; }
.m3-grip { display: none; }
.m3-sortbox select { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 5px 6px; font-size: 12px; max-width: 170px; }
.m3-list { flex: 1; overflow: auto; padding: 10px 12px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.m3-item { display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 8px; margin-bottom: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; transition: border-color .15s, box-shadow .15s; }
.m3-item:hover { border-color: var(--gold-2); box-shadow: 0 4px 14px rgba(19,36,42,.1); }
.m3-ph { position: relative; display: block; border-radius: 6px; overflow: hidden; background: var(--sand-2); aspect-ratio: 4/3; }
.m3-ph img { width: 100%; height: 100%; object-fit: cover; }
.m3-badge { position: absolute; left: 6px; top: 6px; background: var(--ink); color: var(--gold-2); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.m3-ib { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m3-loc { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m3-ti { font-family: var(--serif); font-size: 16.5px; line-height: 1.15; text-decoration: none; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m3-ti:hover { color: var(--gold); }
.m3-sp { font-size: 12px; color: var(--ink-soft); }
.m3-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.m3-pr { color: var(--gold); font-size: 15px; font-weight: 700; white-space: nowrap; }
.m3-acts { display: flex; align-items: center; gap: 6px; }
.m3-mort { font-size: 11px; font-weight: 700; color: var(--sea); text-decoration: none; border: 1px solid rgba(47,107,112,.35); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.m3-mort:hover { background: var(--sea); color: #fff; }
.m3-loc-btn { border: 1px solid var(--line); background: #fff; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; font-size: 15px; line-height: 1; color: var(--ink); padding: 0; }
.m3-loc-btn:hover { border-color: var(--gold); color: var(--gold); }
.m3-more { width: 100%; padding: 10px; border: 1px solid var(--ink); background: transparent; cursor: pointer; font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; border-radius: 6px; }
.m3-more:hover { background: var(--ink); color: #fff; }
.m3-empty, .m3-fx, .m3-nogl { font-size: 13px; color: var(--ink-soft); padding: 8px 4px; }
.m3-nogl { margin: 10px 12px 0; padding: 10px 12px; background: #fff; border-left: 3px solid var(--gold); }
.m3-nogl p { margin: 0 0 6px; }
.m3-nogl .m3-inapp { color: var(--ink); }
.m3-ext, .m3-retry { display: inline-block; margin: 4px 8px 2px 0; padding: 8px 14px; border-radius: 999px; font: 600 13px Manrope, system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.m3-ext { background: #13242a; color: #fff; border: 1px solid #13242a; }
.m3-retry { background: #fff; color: var(--ink); border: 1px solid var(--gold); }
/* until the map is ready only the list works (30.11.2026: list first, map later) */
.m3-app:not(.ready) .m3-tools, .m3-app:not(.ready) .m3-loc-btn { visibility: hidden; }
.m3-legal { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--muted); }
.m3-legal a { color: var(--ink); font-weight: 600; }
.m3-toast { position: absolute; z-index: 9; left: 50%; bottom: 30px; transform: translateX(-50%); }

/* popups */
.m3-pop .maplibregl-popup-content { padding: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 14px 34px rgba(10,24,30,.35); border: 1px solid var(--gold-2); font-family: var(--sans); }
.m3-pop .maplibregl-popup-close-button { z-index: 2; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.92); top: 6px; right: 6px; font-size: 18px; color: var(--ink); }
.m3-card { width: 300px; max-width: 78vw; background: #fff; }
.m3-cph { position: relative; display: block; aspect-ratio: 2/1; background: var(--sand-2); }
.m3-cph img { width: 100%; height: 100%; object-fit: cover; }
.m3-cb { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.m3-cta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.m3-view { background: var(--ink); color: #fff; text-decoration: none; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; padding: 7px 12px; border-radius: 999px; }
.m3-view:hover { background: var(--gold); }
.m3-approx { display: block; font-size: 10.5px; color: var(--muted); width: 100%; }
.m3-multi .m3-mh { padding: 12px 40px 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.m3-multi .m3-mh b { font-family: var(--serif); font-size: 19px; color: var(--ink); }
.m3-ml { max-height: 258px; overflow: auto; overscroll-behavior: contain; }
.m3-mi { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 7px 12px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--sand-2); }
.m3-mi:hover { background: var(--sand); }
.m3-mi img { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; }
.m3-mi span { min-width: 0; display: flex; flex-direction: column; }
.m3-mi b { color: var(--gold); font-size: 13px; }
.m3-mi em { font-style: normal; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m3-mi small { font-size: 11px; color: var(--muted); }
.m3-multi .m3-cta { padding: 8px 12px 10px; margin: 0; }

/* MapLibre controls in the palette */
.m3-app .maplibregl-ctrl-group { border-radius: 8px; overflow: hidden; box-shadow: 0 6px 18px rgba(10,24,30,.25); }
.m3-app .maplibregl-ctrl-bottom-right { right: 410px; }
.m3-app .maplibregl-ctrl-attrib { font-size: 10px; }

/* no WebGL → plain list */
.m3-app.nogl { overflow: auto; background: var(--sand); }
.m3-app.nogl .m3-map { display: none; }
.m3-app.nogl .m3-top { position: static; width: auto; max-height: none; margin: 16px; }
.m3-app.nogl .m3-panel { position: static; width: auto; margin: 0 16px 16px; }
.m3-app.nogl .m3-loc-btn { display: none; }

/* tablets: narrower panel */
@media (max-width: 1180px) and (min-width: 900px) {
  .m3-top { width: 300px; }
  .m3-panel { width: 340px; }
  .m3-tools, .m3-skip { right: 372px; }
  .m3-app .maplibregl-ctrl-bottom-right { right: 366px; }
  .m3-item { grid-template-columns: 92px 1fr; }
}

/* phones: compact top bar + bottom sheet */
@media (max-width: 899px) {
  .m3-top { top: 8px; left: 8px; right: 8px; width: auto; padding: 8px 10px; border-radius: 10px; max-height: 70%; }
  .m3-title p, .m3-title .eyebrow { display: none; }
  .m3-title h1 { font-size: 20px; margin: 0 0 6px; }
  .m3-regions { flex-wrap: nowrap; overflow-x: auto; margin: 0 -10px 4px; padding: 0 10px 2px; scrollbar-width: none; }
  .m3-regions::-webkit-scrollbar { display: none; }
  .m3-ftoggle { display: inline-block; position: absolute; top: 8px; right: 10px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
  .m3-filters { display: none; margin-top: 6px; }
  .m3-top.fopen .m3-filters { display: grid; }
  .m3-count { margin-top: 4px; }
  .m3-count b { font-size: 20px; }
  .m3-tools { top: auto; bottom: 84px; right: 8px; left: 8px; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; max-width: none; scrollbar-width: none; }
  .m3-tools::-webkit-scrollbar { display: none; }
  .m3-tools button { padding: 7px 11px; flex: none; }
  .m3-skip { right: 8px; bottom: 132px; }
  .m3-caption { bottom: 180px; font-size: 24px; }
  .m3-drawbar { top: auto; bottom: 132px; width: calc(100% - 16px); justify-content: space-between; border-radius: 12px; font-size: 12px; }
  .m3-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 68px; border-radius: 16px 16px 0 0; border-width: 1px 0 0; transition: height .35s cubic-bezier(.2,.8,.2,1); }
  .m3-panel.open { height: 70%; }
  .m3-phead { cursor: pointer; padding: 18px 14px 12px; position: relative; }
  .m3-grip { display: block; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line); }
  .m3-app .maplibregl-ctrl-bottom-right { display: none; } /* pinch / two-finger tilt on phones */
  .m3-app .maplibregl-ctrl-bottom-left { bottom: 68px; }
  .m3-card { width: 270px; }
  .m3-app.nogl .m3-panel { height: auto; border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) { .m3-panel, .m3-caption, .m3-top { transition: none; } }
