/* Map pages (MapController). Two surfaces, each scoped so nothing leaks into the site:
     body.mp-sheet   one sheet, full window (layout "page")
     .mp-grid        the gallery cards, inside the site's normal layout and on a country page */

.mp-sheet {
  --bg: #1d2127; --panel: #252a31; --line: #3a414b;
  --text: #e6e2d8; --muted: #9aa3ad; --accent: #e0b25c; --table: #33302b;
  --mono: 'Cascadia Mono', Consolas, 'Courier New', monospace;
  --sans: 'Archivo Narrow', 'Arial Narrow', Arial, sans-serif;
  margin: 0; background: var(--bg); color: var(--text); font: 14px var(--sans);
}
html:has(> .mp-sheet) { background: #1d2127; }
.mp-sheet * { box-sizing: border-box; }
.mp-sheet a { color: var(--accent); text-decoration: none; }
.mp-sheet a:hover { text-decoration: underline; }

.mp-bar { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 52px; background: var(--panel); border-bottom: 1px solid var(--line); min-width: 0; }
.mp-bar .crumbs { display: flex; gap: 8px; align-items: baseline; min-width: 0; white-space: nowrap; overflow: hidden; }
.mp-bar .crumbs b { color: var(--text); overflow: hidden; text-overflow: ellipsis; letter-spacing: 1px; }
.mp-bar .crumbs .sep { color: var(--muted); }
.mp-bar .spacer { flex: 1; }
.mp-bar button, .mp-bar .btn { font: 13px var(--sans); letter-spacing: 1px; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.mp-bar button:hover, .mp-bar .btn:hover { border-color: var(--muted); text-decoration: none; }

.mp-view { position: relative; overflow: hidden; background: var(--table); cursor: grab; touch-action: none; user-select: none;
  height: calc(100vh - 52px); height: calc(100dvh - 52px); }
.mp-view.drag { cursor: grabbing; }
.mp-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; box-shadow: 0 10px 40px rgba(0,0,0,0.45); background: #fdfbf3; }
.mp-stage svg { display: block; }
.mp-stage .map-index a { cursor: pointer; }
.mp-zoom { position: absolute; right: 14px; bottom: 14px; font-size: 12px; color: var(--muted); background: rgba(0,0,0,0.35); padding: 4px 8px; border-radius: 4px; letter-spacing: 1px; pointer-events: none; }

.mp-sheet .about { max-width: 820px; margin: 0 auto; padding: 32px 16px 56px; line-height: 1.55; }
.mp-sheet .about h1 { font-size: 26px; letter-spacing: 3px; text-transform: uppercase; margin: 0 0 4px; }
.mp-sheet .about h2 { font-size: 15px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin: 30px 0 8px; }
.mp-sheet .about .sub { color: var(--muted); font-style: italic; margin: 0 0 18px; }
.mp-sheet .about p { color: #cfcabd; }
.mp-sheet .about .facts { color: var(--muted); letter-spacing: 1px; font-size: 13px; }
.mp-sheet details { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.mp-sheet summary { cursor: pointer; padding: 10px 14px; letter-spacing: 1px; font-size: 13px; color: var(--muted); }
.mp-sheet pre { margin: 0; padding: 12px 14px; border-top: 1px solid var(--line); font: 12.5px/1.5 var(--mono); overflow: auto; max-height: 70vh; color: var(--text); }
.mp-sheet .mp-sibs a { margin-right: 10px; }

.mp-private { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #8a3b12; background: #f6dcc7; border-radius: 4px; padding: 1px 6px; vertical-align: middle; }
.mp-note { font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------------- gallery */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 20px; }
.mp-card { display: block; color: var(--ink); }
.mp-card:hover { text-decoration: none; }
.mp-card:hover .mp-thumb { border-color: var(--accent, #c08a2c); }
.mp-thumb { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius, 12px); overflow: hidden; background: #fdfbf3; border: 1px solid var(--line, #d9d3c4); }
.mp-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.mp-card h3 { margin: 10px 0 2px; font-size: 16px; }
.mp-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.mp-sheet .mp-card { color: var(--text); }

@media (max-width: 800px) {
  .mp-bar { flex-wrap: wrap; height: auto; padding: 8px 16px; row-gap: 8px; }
  .mp-view { height: 70vh; }
}
