/**
 * LIVZO — the society map window (/map/<slug>).
 *
 * Two blocks: the identity card pinned to the map's left edge, and the map frame beside it.
 * On a wide screen the card floats OVER the map at the far left (max 250px); below 900px the
 * card is the first block and the map fills the width under it, so nothing overlaps on a
 * phone.
 *
 * Class prefix `lz-map-*` — checked against every other module first. Tokens come from
 * base.css only.
 */

/* ==========================================================================
   1. Frame
   ========================================================================== */

/* The header is fixed, so the page owns its own offset — without it the map's top (and the top
   of the card pinned to it) sits behind the bar. */
.lz-main--map {
    padding: var(--lz-header-h) 0 0;
}

.lz-map {
    position: relative;
    height: calc(100vh - var(--lz-header-h));
    background: var(--lz-bg);
}

.lz-map__stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background-color: #F2F2F7;
}

.lz-map__canvas {
    position: absolute;
    inset: 0;
}

/* Google's DOM replaces the canvas' contents; the failure note and the loader sit above it. */
.lz-map__loading,
.lz-map__note,
.lz-map__nearby-note {
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    border-radius: var(--lz-r-pill);
    background-color: rgba(255, 255, 255, 0.96);
    color: var(--lz-body);
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: var(--lz-sh-3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lz-map__loading {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 12px 18px;
}

/* `display: flex` above beats the UA's [hidden] rule, so the states carry their own. */
.lz-map__note[hidden],
.lz-map__loading[hidden] { display: none; }

.lz-map__note {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: min(420px, calc(100% - 40px));
    padding: 14px 18px;
    align-items: flex-start;
}

.lz-map__note-ico {
    width: 18px;
    height: 18px;
    flex: none;
    margin-top: 1px;
    color: var(--lz-amber);
}

.lz-map__nearby-note {
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    max-width: calc(100% - 40px);
    padding: 9px 16px;
    font-size: 0.78rem;
}

.lz-map__nearby-ico {
    width: 15px;
    height: 15px;
    flex: none;
    color: var(--lz-accent);
}

.lz-map__spinner {
    width: 15px;
    height: 15px;
    flex: none;
    border: 2px solid var(--lz-line-2);
    border-top-color: var(--lz-accent);
    border-radius: 50%;
    animation: lzSpin 0.9s linear infinite;
}

/* ==========================================================================
   2. Markers
   ========================================================================== */

.lz-map__pin-wrap,
.lz-map__mini-wrap {
    position: absolute;
    pointer-events: auto;
}

/* The pin's tip is the coordinate, so its block hangs above the point… */
.lz-map__pin-wrap { transform: translate(-50%, -100%); }

/* …while a neighbour is a small chip centred on its point. */
.lz-map__mini-wrap { transform: translate(-50%, -50%); }

.lz-map__pin {
    position: relative;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 3px solid #fff;
    border-radius: 50%;
    background-image: linear-gradient(150deg, var(--lz-band-success-text) 0%, var(--lz-accent) 100%);
    box-shadow: 0 16px 28px -14px rgba(5, 150, 105, 0.95), 0 2px 6px rgba(11, 27, 51, 0.30);
    color: #fff;
}

.lz-map__pin .lz-icon { width: 22px; height: 22px; }

.lz-map__pin::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 12px;
    height: 12px;
    transform: translateX(-50%) rotate(45deg);
    border-radius: 2px;
    background-image: linear-gradient(150deg, var(--lz-accent) 0%, var(--lz-accent) 100%);
    box-shadow: 2px 2px 4px rgba(11, 27, 51, 0.18);
}

/* The target's name chip sits above its pin. */
.lz-map__pin-tip {
    display: block;
    margin-bottom: 10px;
    padding: 7px 14px;
    border-radius: var(--lz-r-pill);
    background-color: var(--lz-navy);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 14px 24px -14px rgba(11, 27, 51, 0.9);
}

.lz-map__pin-tip-approx {
    display: block;
    margin-top: 1px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.lz-map__pin-body {
    display: grid;
    justify-items: center;
    text-decoration: none;
}

/* A neighbour: a small circular photo with its sector beside it. */
.lz-map__mini {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--lz-line);
    border-radius: var(--lz-r-pill);
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: var(--lz-sh-3);
    text-decoration: none;
    transition: transform var(--lz-t-fast) var(--lz-ease), box-shadow var(--lz-t-fast) var(--lz-ease),
        border-color var(--lz-t-fast) var(--lz-ease);
}

.lz-map__mini:hover,
.lz-map__mini:focus-visible {
    transform: translateY(-2px);
    border-color: var(--lz-accent);
    box-shadow: 0 18px 30px -16px rgba(11, 27, 51, 0.45);
}

.lz-map__mini-img,
.lz-map__mini-mono {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--lz-accent-soft);
    color: var(--lz-navy);
    font-size: 0.86rem;
    font-weight: 800;
}

.lz-map__mini-body {
    display: grid;
    gap: 0;
    min-width: 0;
}

.lz-map__mini-name {
    max-width: 148px;
    overflow: hidden;
    color: var(--lz-navy);
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lz-map__mini-sector {
    color: var(--lz-body);
    font-size: 0.66rem;
    font-weight: 600;
}

/* ==========================================================================
   3. Identity card (pinned to the map's left edge)
   ========================================================================== */

.lz-map__card {
    position: absolute;
    z-index: 2;
    top: 18px;
    left: 18px;
    /* Never as far as the frame's bottom-left corner: Google's own logo, its keyboard-shortcut
       link and the map attribution live there, and the Maps terms forbid covering them. */
    max-height: calc(100% - 96px);
    display: grid;
    align-content: start;
    gap: 10px;
    width: 250px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 14px 16px;
    border: 1px solid var(--lz-line);
    border-radius: var(--lz-r-lg);
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 30px 60px -28px rgba(11, 27, 51, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: lzMapCardIn 0.6s var(--lz-ease-out) both;
}

@keyframes lzMapCardIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

/* The bottom-sheet handle is a phone affordance only, and the sheet wrapper dissolves into the
   card's own grid on a wide screen (`display: contents`, gotcha 15) — so the card that shipped
   first renders exactly as it did. Both only take shape below 900px. */
.lz-map__handle { display: none; }
.lz-map__sheet { display: contents; }

/* The handle's chevron drifts up and down, so the closed sheet reads as "there is more here"
   without any text saying so. */
@keyframes lzMapArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.lz-map__back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--lz-body);
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
    transition: color var(--lz-t-fast) var(--lz-ease);
}

.lz-map__back:hover { color: var(--lz-accent-700); }
.lz-map__back-ico { width: 15px; height: 15px; }

.lz-map__media {
    position: relative;
    overflow: hidden;
    border-radius: var(--lz-r-md);
    aspect-ratio: 16 / 10;
}

.lz-map__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lz-map__media-sheen {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.30) 50%, transparent 60%);
    transform: translateX(-130%);
    animation: lzMapSheen 6s var(--lz-ease) 1s infinite;
    pointer-events: none;
}

@keyframes lzMapSheen {
    0% { transform: translateX(-130%); }
    55%, 100% { transform: translateX(130%); }
}

.lz-map__verified {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--lz-line);
    border-radius: var(--lz-r-pill);
    background-image: linear-gradient(135deg, #FFFFFF, #F3F0FF);
    color: var(--lz-navy);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lz-map__verified-ico {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: 50%;
    background-image: linear-gradient(150deg, var(--lz-band-success-text), var(--lz-accent));
    color: #fff;
}

.lz-map__verified-ico .lz-icon { width: 13px; height: 13px; }

.lz-map__name {
    margin: 0;
    font-size: 1.06rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--lz-navy);
}

.lz-map__where {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
    color: var(--lz-body);
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.35;
}

.lz-map__where-ico {
    width: 14px;
    height: 14px;
    flex: none;
    margin-top: 2px;
    color: var(--lz-accent);
}

.lz-map__rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 7px 12px;
    border: 1px solid var(--lz-line);
    border-radius: var(--lz-r-pill);
    background-image: linear-gradient(135deg, #FFFFFF, #F7F5FF);
    color: var(--lz-body);
    font-size: 0.74rem;
    font-weight: 600;
}

.lz-map__score {
    color: var(--lz-navy);
    font-size: 0.94rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.lz-map__reviews { color: var(--lz-body); font-size: 0.72rem; }

.lz-map__approx {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 5px 11px;
    border-radius: var(--lz-r-pill);
    background-color: rgba(217, 138, 0, 0.12);
    color: #8A5600;
    font-size: 0.68rem;
    font-weight: 700;
}

.lz-map__approx-ico { width: 13px; height: 13px; flex: none; }

.lz-map__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lz-map__tag {
    padding: 3px 10px;
    border: 1px solid rgba(5, 150, 105, 0.22);
    border-radius: var(--lz-r-pill);
    background-color: rgba(5, 150, 105, 0.07);
    color: var(--lz-navy);
    font-size: 0.66rem;
    font-weight: 700;
}

/* Facts: a label/value pair per row, and a row with no value is never emitted. */
.lz-map__facts {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--lz-line);
}

.lz-map__fact {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--lz-line);
}

.lz-map__fact-key {
    color: var(--lz-body);
    font-size: 0.72rem;
    font-weight: 600;
}

.lz-map__fact-value {
    margin: 0;
    color: var(--lz-navy);
    font-size: 0.76rem;
    font-weight: 700;
    text-align: right;
}

.lz-map__view {
    justify-content: center;
    width: 100%;
    margin-top: 2px;
}

/* ==========================================================================
   3b. Directions
   ========================================================================== */

/* A floating panel opposite the card, so the two never fight for the same corner. */
.lz-map__directions {
    position: absolute;
    z-index: 3;
    top: 18px;
    right: 18px;
    width: 348px;
    max-width: calc(100% - 36px);
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--lz-line);
    border-radius: var(--lz-r-lg);
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 30px 60px -28px rgba(11, 27, 51, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: lzMapCardIn 0.6s var(--lz-ease-out) 0.08s both;
}

.lz-map__dir-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--lz-navy);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.lz-map__dir-title-ico { width: 17px; height: 17px; flex: none; color: var(--lz-accent); }

/* The field, with the locate button pinned inside its right corner. */
.lz-map__dir {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 5px 5px 5px 14px;
    border: 1px solid var(--lz-line-2);
    border-radius: var(--lz-r-pill);
    background-color: var(--lz-surface);
    box-shadow: var(--lz-sh-2);
    transition: border-color var(--lz-t-fast) var(--lz-ease), box-shadow var(--lz-t-fast) var(--lz-ease);
}

.lz-map__dir:focus-within {
    border-color: var(--lz-accent);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
}

.lz-map__dir-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 9px 0;
    border: 0;
    background: none;
    color: var(--lz-navy);
    font-size: 0.86rem;
    outline: none;
}

.lz-map__dir-input::placeholder { color: var(--lz-muted); }

.lz-map__dir-locate {
    position: relative;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border: 1px solid rgba(5, 150, 105, 0.25);
    border-radius: 50%;
    background-color: rgba(5, 150, 105, 0.08);
    color: var(--lz-accent);
    transition: background-color var(--lz-t-fast) var(--lz-ease), color var(--lz-t-fast) var(--lz-ease),
        border-color var(--lz-t-fast) var(--lz-ease);
}

.lz-map__dir-locate .lz-icon { width: 17px; height: 17px; }

.lz-map__dir-locate:hover {
    border-color: var(--lz-accent);
    background-color: var(--lz-accent);
    color: #fff;
}

.lz-map__dir-locate:focus-visible { outline: 3px solid var(--lz-accent-ring); outline-offset: 2px; }

/* The ring that spins while the browser is asking for a position, and is simply absent
   otherwise — the button never changes size. */
.lz-map__dir-spin {
    position: absolute;
    inset: -3px;
    display: none;
    border: 2px solid rgba(5, 150, 105, 0.25);
    border-top-color: var(--lz-accent);
    border-radius: 50%;
    animation: lzSpin 0.9s linear infinite;
}

.lz-map__dir-locate.is-busy .lz-icon { opacity: 0.35; }
.lz-map__dir-locate.is-busy .lz-map__dir-spin { display: block; }

.lz-map__dir-go {
    flex: none;
    padding: 0 14px;
    min-height: 34px;
    border: 0;
    border-radius: var(--lz-r-pill);
    background-image: linear-gradient(180deg, var(--lz-accent) 0%, var(--lz-accent-600) 100%);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 10px 20px -14px rgba(5, 150, 105, 0.95);
    transition: transform var(--lz-t-fast) var(--lz-ease-out), filter var(--lz-t-fast) var(--lz-ease);
}

.lz-map__dir-go:hover { transform: translateY(-1px); filter: brightness(1.04); }

.lz-map__dir-note {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 11px 12px;
    border-radius: var(--lz-r-md);
    background-color: rgba(5, 150, 105, 0.09);
    color: var(--lz-navy);
    font-size: 0.78rem;
    font-weight: 700;
}

.lz-map__dir-note[hidden] { display: none; }

.lz-map__dir-note-text { margin: 0; }
.lz-map__dir-note-text:empty { display: none; }

.lz-map__dir-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lz-map__dir-stats[hidden] { display: none; }

/* Each number gets its own white card, so the distance is what the eye lands on. */
.lz-map__dir-stat {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0 8px;
    padding: 8px 10px;
    border: 1px solid rgba(5, 150, 105, 0.22);
    border-radius: var(--lz-r-sm);
    background-color: #fff;
}

.lz-map__dir-stat-ico {
    grid-row: span 2;
    width: 18px;
    height: 18px;
    color: var(--lz-accent);
}

.lz-map__dir-stat-label {
    color: var(--lz-body);
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lz-map__dir-stat-value {
    color: var(--lz-navy);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.15;
}

/* A message that is not a route (a blocked location, a denied key) reads as a warning. */
.lz-map__dir-note.is-warn {
    background-color: rgba(217, 138, 0, 0.14);
    color: #8a5600;
}

.lz-map__dir-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--lz-line-2);
    border-radius: var(--lz-r-pill);
    background-color: var(--lz-surface);
    color: var(--lz-body);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color var(--lz-t-fast) var(--lz-ease), color var(--lz-t-fast) var(--lz-ease);
}

.lz-map__dir-clear[hidden] { display: none; }
.lz-map__dir-clear:hover { border-color: var(--lz-red-600); color: var(--lz-red-600); }
.lz-map__dir-clear .lz-icon { width: 14px; height: 14px; }

/* ==========================================================================
   4. Dead end (unknown slug, DB unreachable)
   ========================================================================== */

.lz-map--empty {
    display: grid;
    place-items: center;
    height: auto;
    min-height: 60vh;
    padding: clamp(40px, 8vw, 90px) 20px;
}

.lz-map__state {
    display: grid;
    justify-items: center;
    gap: 12px;
    max-width: 460px;
    padding: 32px 28px;
    border: 1px solid var(--lz-line);
    border-radius: var(--lz-r-xl);
    background-color: var(--lz-surface);
    box-shadow: var(--lz-sh-3);
    text-align: center;
}

.lz-map__state-ico {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-image: linear-gradient(150deg, var(--lz-band-success-text), var(--lz-accent));
    color: #fff;
}

.lz-map__state-ico .lz-icon { width: 26px; height: 26px; }
.lz-map__state-title { margin: 0; font-size: 1.3rem; font-weight: 800; color: var(--lz-navy); }
.lz-map__state-text { margin: 0; color: var(--lz-body); }

/* ==========================================================================
   5. Motion — the pins are the page's subject, so they are what moves
   ========================================================================== */

/* The society's own pin drops in and then breathes: a halo ring pulses out of it, so the eye
   lands on the society the page is about before the neighbours. */
@keyframes lzMapPinIn {
    from { opacity: 0; transform: translate(-50%, -170%) scale(0.82); }
    to { opacity: 1; transform: translate(-50%, -100%) scale(1); }
}

@keyframes lzMapPulse {
    0% { opacity: 0.75; transform: scale(1); }
    70%, 100% { opacity: 0; transform: scale(1.75); }
}

@keyframes lzMapTipIn {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: none; }
}

/* A neighbour rises into place, centred on its own point (the transform is part of the
   animation, because the wrapper's resting transform is what centres it). */
@keyframes lzMapMiniIn {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(0.88); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes lzMapFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lz-map__pin-wrap { animation: lzMapPinIn 0.7s var(--lz-ease-out) both; }

.lz-map__pin::before {
    content: '';
    position: absolute;
    inset: -3px;
    border: 2px solid var(--lz-accent);
    border-radius: 50%;
    animation: lzMapPulse 2.8s var(--lz-ease) infinite both;
    pointer-events: none;
}

.lz-map__pin-tip { animation: lzMapTipIn 0.5s var(--lz-ease-out) 0.28s both; }

/* The stagger itself is set per marker by assets/js/society-map.js (--lz-map-delay). */
.lz-map__mini-wrap {
    animation: lzMapMiniIn 0.55s var(--lz-ease-out) both;
    animation-delay: var(--lz-map-delay, 0.2s);
}

.lz-map__mini { transition: transform var(--lz-t-fast) var(--lz-ease), box-shadow var(--lz-t-fast) var(--lz-ease),
        border-color var(--lz-t-fast) var(--lz-ease); }

.lz-map__loading,
.lz-map__note,
.lz-map__nearby-note { animation: lzMapFadeIn 0.5s var(--lz-ease-out) both; }

/* By the time Google paints, the loader has done its job — fade it rather than blink it. */
.lz-map__loading[hidden] { display: none; }

/* ==========================================================================
   6. Responsive — the map fills the screen and the card becomes a bottom sheet
   ========================================================================== */

@media (max-width: 900px) {
    /* The map is the page on a phone: it takes the whole screen below the header, and the
       details slide up over it as a bottom sheet. */
    .lz-map {
        height: calc(100vh - var(--lz-header-h));
        /* Clips the sheet while it is closed — its body sits just below this box. */
        overflow: hidden;
        padding-bottom: 0;
        /* How much of the card stays on screen when the sheet is closed: exactly the handle. */
        --lz-sheet-handle: 54px;
    }

    .lz-map__stage {
        position: absolute;
        inset: 0;
        height: auto;
        margin-top: 0;
    }

    .lz-map__card {
        position: absolute;
        inset: auto 0 0 0;
        display: block;
        width: auto;
        max-width: none;
        max-height: 75vh;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
        overflow: visible;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        animation: none;
        /* Closed, only the handle's own height is left on screen; open, the sheet comes up to
           its 75vh ceiling (`max-height`), which is what caps it. */
        transform: translateY(calc(100% - var(--lz-sheet-handle)));
        transition: transform 0.44s var(--lz-ease-out);
    }

    .lz-map__card.is-open { transform: none; }

    /* A centred pill rather than a full-width bar: Google's logo and attribution live in the
       map's bottom corners and the terms forbid covering them. */
    .lz-map__handle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: max-content;
        max-width: calc(100% - 32px);
        min-height: var(--lz-sheet-handle);
        margin: 0 auto;
        padding: 12px 20px;
        border: 1px solid var(--lz-line);
        border-radius: var(--lz-r-pill);
        background-color: rgba(255, 255, 255, 0.97);
        box-shadow: var(--lz-sh-3);
        color: var(--lz-navy);
        font-size: 0.88rem;
        font-weight: 800;
        letter-spacing: -0.01em;
    }

    .lz-map__handle-text { white-space: nowrap; }

    .lz-map__handle-arrow {
        display: grid;
        place-items: center;
        animation: lzMapArrow 2.4s var(--lz-ease) infinite;
    }

    .lz-map__handle-chevron {
        width: 17px;
        height: 17px;
        color: var(--lz-accent);
        /* Points up while the sheet is closed — "the details are this way" — and flips once
           they are open. The arrow span above carries the drift, so the two never fight. */
        transform: rotate(180deg);
        transition: transform 0.3s var(--lz-ease);
    }

    .lz-map__card.is-open .lz-map__handle-chevron { transform: rotate(0deg); }

    .lz-map__sheet {
        display: block;
        max-height: calc(75vh - var(--lz-sheet-handle) - 10px);
        margin-top: 10px;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 14px 14px calc(16px + env(safe-area-inset-bottom, 0px));
        border: 1px solid var(--lz-line);
        border-radius: var(--lz-r-lg) var(--lz-r-lg) 0 0;
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: 0 -22px 44px -24px rgba(11, 27, 51, 0.45);
        /* Closed means out of the tab order and the accessibility tree, not merely off-screen. */
        visibility: hidden;
    }

    .lz-map__card.is-open .lz-map__sheet { visibility: visible; }

    /* Facts go two-up so the sheet stays short when it opens. */
    .lz-map__facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 16px;
    }

    .lz-map__fact {
        display: grid;
        gap: 1px;
    }

    .lz-map__fact-value { text-align: left; }

    .lz-map__nearby-note {
        bottom: 84px;
        font-size: 0.72rem;
    }

    /* The panel takes the map's full width on a phone — the card is the bottom sheet, so the
       top of the frame is its own. */
    .lz-map__directions {
        left: 14px;
        right: 14px;
        top: 14px;
        width: auto;
        max-width: none;
        padding: 12px;
    }

    .lz-map__dir-title { font-size: 0.78rem; }
    .lz-map__dir-go { padding: 0 12px; }
}

/* Below 480px only the chips need reining in — the card and the stage belong to the bottom
   sheet and the full-bleed map now, so they must not be resized here. */
@media (max-width: 480px) {
    .lz-map__mini-name { max-width: 104px; }
    .lz-map__handle { font-size: 0.84rem; }
}

/* ==========================================================================
   7. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    /* Every one of these is animation-based — a loop, an entrance or a sheen (gotcha 24). */
    .lz-map__card,
    .lz-map__media-sheen,
    .lz-map__pin-wrap,
    .lz-map__pin::before,
    .lz-map__pin-tip,
    .lz-map__mini-wrap,
    .lz-map__loading,
    .lz-map__note,
    .lz-map__nearby-note { animation: none; }

    .lz-map__mini { transition: none; }
    .lz-map__card,
    .lz-map__handle-chevron { transition: none; }

    .lz-map__mini:hover,
    .lz-map__mini:focus-visible { transform: none; }

    /* The handle's drift and the chevron's flip are motion, not information: the heading and
       the open/closed content both still say which state the sheet is in. */
    .lz-map__handle-arrow { animation: none; }
}
