/* /map/ — THE MAP (Red, 2026-10-09). A full-screen map under the 32px topbar, the layer
   switches floating top-left, the card bottom (phone) or left (desktop). The site's own
   look: cream on black, the chrome headline, style.css's buttons, square corners, the
   route rose only on routes. No new font. */

.map-body { overflow: hidden; background: #0a0806; }
.mp-main {
  position: fixed; top: 32px; left: 0; right: 0; bottom: 0;
  background: #0e0b09;
}
/* `> .mp-canvas`: MapLibre puts `.maplibregl-map { position: relative }` on this node, so the
   rule needs the extra weight (the account.css `.ev-map > .ev-map-canvas` lesson). */
.mp-main > .mp-canvas { position: absolute; inset: 0; }

/* ---- the switches ---- */
.mp-bar {
  position: absolute; top: 14px; left: 16px; right: 16px; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  pointer-events: none;
}
.mp-bar > * { pointer-events: auto; }
.mp-title {
  margin: 0; font-size: clamp(1.9rem, 6vw, 2.8rem); font-weight: 800; font-stretch: condensed;
  letter-spacing: .08em; text-transform: uppercase; line-height: 1;
}
.mp-chips { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.mp-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(10, 8, 6, .82); border: 1px solid rgba(242, 237, 230, .2);
  color: rgba(242, 237, 230, .55); padding: 8px 11px; cursor: pointer;
  font: inherit; font-size: .62rem; letter-spacing: .2em; text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: color 160ms, border-color 160ms, background 160ms;
}
.mp-chip:hover { color: #f2ede6; border-color: rgba(242, 237, 230, .5); }
.mp-chip.is-on { color: #f2ede6; border-color: rgba(242, 237, 230, .6); }
.mp-chip:focus-visible { outline: 2px solid #f2ede6; outline-offset: 2px; }
.mp-key { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #0a0806; box-sizing: content-box; opacity: .4; }
.mp-chip.is-on .mp-key { opacity: 1; }
.mp-key-route { background: #F07384; }
.mp-key-spot { background: #f2ede6; }
.mp-key-meet { background: #fff; box-shadow: 0 0 0 3px rgba(242, 237, 230, .18); }
.mp-near { color: rgba(242, 237, 230, .8); }

.mp-note {
  margin: 0; max-width: 360px; padding: 8px 11px;
  background: rgba(10, 8, 6, .82); border-left: 2px solid rgba(242, 237, 230, .3);
  font-size: .72rem; line-height: 1.45; letter-spacing: .03em; color: rgba(242, 237, 230, .75);
}
.mp-note[hidden] { display: none; }
.mp-note-line { display: block; }
.mp-note-line + .mp-note-line { margin-top: 4px; }
.mp-note a { color: #f2ede6; text-decoration: none; border-bottom: 1px solid rgba(242, 237, 230, .4); }
.mp-note a:hover { border-bottom-color: #f2ede6; }

/* ---- the card ---- */
.mp-card {
  position: absolute; z-index: 3;
  left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-height: 62%; overflow-y: auto; overscroll-behavior: contain;
  background: #0a0806; border: 1px solid rgba(242, 237, 230, .14);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .65);
  animation: mp-in 220ms cubic-bezier(.2, .7, .2, 1);
}
.mp-card[hidden] { display: none; }
@keyframes mp-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mp-card { animation: none; } }
@media (min-width: 760px) {
  .mp-card { left: 16px; right: auto; top: 150px; bottom: auto; width: 340px; max-height: calc(100% - 180px); }
}

.mp-card-close {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  width: 32px; height: 32px; padding: 0; cursor: pointer;
  background: rgba(10, 8, 6, .8); border: 1px solid rgba(242, 237, 230, .18);
}
.mp-card-close::before, .mp-card-close::after {
  content: ""; position: absolute; left: 9px; top: 15px; width: 13px; height: 1.5px; background: #f2ede6;
}
.mp-card-close::before { transform: rotate(45deg); }
.mp-card-close::after { transform: rotate(-45deg); }
.mp-card-close:hover { border-color: rgba(242, 237, 230, .5); }

.mp-card-media[hidden] { display: none; }
.mp-card-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #14110f; }
.mp-card-body { padding: 16px 16px 0; }
.mp-card-kicker { margin: 0 44px 6px 0; font-size: .58rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(242, 237, 230, .5); }
.mp-card[data-kind="routes"] .mp-card-kicker { color: #F07384; }
.mp-card-name {
  margin: 0 40px 6px 0; font-size: 1.3rem; font-weight: 800; letter-spacing: .04em; line-height: 1.15;
  color: #f2ede6; overflow-wrap: anywhere;
}
.mp-card-media:not([hidden]) + .mp-card-body .mp-card-kicker,
.mp-card-media:not([hidden]) + .mp-card-body .mp-card-name { margin-right: 0; }
.mp-card-meta { margin: 0; font-size: .74rem; letter-spacing: .06em; color: rgba(242, 237, 230, .65); overflow-wrap: anywhere; }
.mp-card-line { margin: 10px 0 0; font-size: .76rem; line-height: 1.5; color: rgba(242, 237, 230, .75); }
.mp-card-locked {
  margin: 12px 0 0; padding-left: 10px; border-left: 2px solid rgba(242, 237, 230, .2);
  font-size: .72rem; line-height: 1.5; color: rgba(242, 237, 230, .55);
}
.mp-card-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px 0; }
.mp-card-actions:empty { display: none; }
.mp-btn { flex: 1 1 130px; text-align: center; text-decoration: none; display: inline-block; }
.btn-primary.mp-btn { padding: 12px 14px; font-size: .7rem; letter-spacing: .22em; }
.btn-ghost.mp-btn { padding: 11px 14px; }
.mp-card-get, .mp-card-fine { margin: 0; padding: 12px 16px 0; }
.mp-card-get { font-size: .68rem; letter-spacing: .05em; color: rgba(242, 237, 230, .55); }
.mp-card-get[hidden] { display: none; }
.mp-card-get a { color: #f2ede6; text-decoration: none; border-bottom: 1px solid rgba(242, 237, 230, .35); }
.mp-card-fine { font-size: .6rem; line-height: 1.45; color: rgba(242, 237, 230, .42); }
.mp-card-more { padding: 12px 16px 0; }
.mp-card-more-head { margin: 0 0 6px; font-size: .56rem; letter-spacing: .28em; text-transform: uppercase; color: rgba(242, 237, 230, .45); }
.mp-card-more-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; border-top: 1px solid rgba(242, 237, 230, .08);
  padding: 9px 0; font: inherit; font-size: .8rem; letter-spacing: .03em; color: rgba(242, 237, 230, .8);
}
.mp-card-more-item:hover { color: #fff; }
.mp-card > :last-child { padding-bottom: 16px; }

/* ---- map chrome ---- */
.mp-credit {
  position: absolute; right: 8px; bottom: 4px; z-index: 1; margin: 0;
  font-size: .55rem; letter-spacing: .04em; color: rgba(242, 237, 230, .45); pointer-events: none;
}
.mp-main .maplibregl-ctrl-bottom-right { bottom: 18px; }
.mp-main .maplibregl-ctrl-group { background: #0a0806; border: 1px solid rgba(242, 237, 230, .14); box-shadow: none; border-radius: 0; }
.mp-main .maplibregl-ctrl-group button + button { border-top: 1px solid rgba(242, 237, 230, .14); }
.mp-main .maplibregl-ctrl-group button span { filter: invert(1) opacity(.7); }
/* a card open on a phone covers the zoom buttons' corner; they step aside */
@media (max-width: 759px) {
  .mp-main:has(.mp-card:not([hidden])) .maplibregl-ctrl-bottom-right { display: none; }
}
