/* ============================================================
   Hagan Lab — Dark Cinematic Travel Theme
   Display: Fraunces · Body: EB Garamond · Meta: JetBrains Mono
   ============================================================ */

:root {
    /* Surfaces */
    --bg-primary:    #1A1612;
    --bg-surface:    #14110F;
    --bg-map:        #0F0D0B;

    /* Text */
    --text-primary:    #F4EFE6;
    --text-secondary:  #B9881C;
    --text-tertiary:   #807060;
    --text-quaternary: #5A4A3A;

    /* Accents */
    --accent-amber:     #EF9F27;
    --accent-amber-dim: #B9881C;

    /* Borders */
    --border-subtle:   #2A2520;
    --border-default:  #3A3027;

    /* Fonts */
    --font-display: var(--gh-font-heading, 'Fraunces', 'Iowan Old Style', 'Apple Garamond', Georgia, serif);
    --font-body:    var(--gh-font-body, 'EB Garamond', 'Iowan Old Style', Georgia, serif);
    --font-mono:    'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

    /* Layout */
    --container-wide:   1240px;
    --container-narrow: 720px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Motion */
    --t-fast: 0.15s ease;
    --t-base: 0.3s ease;
    --t-slow: 0.6s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.site-main { flex: 1; }

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    font-variation-settings: "SOFT" 50, "opsz" 96;
    line-height: 1.15;
    letter-spacing: -0.012em;
    color: var(--text-primary);
}

p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--accent-amber);
    text-decoration: none;
    border-bottom: 0.5px solid transparent;
    transition: border-color var(--t-fast), color var(--t-fast);
}
a:hover { border-bottom-color: var(--accent-amber); }

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--accent-amber); color: var(--bg-primary); }

/* === Site nav === */
.site-nav {
    background: var(--bg-primary);
    border-bottom: 0.5px solid var(--border-subtle);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(26, 22, 18, 0.92);
}
.site-nav-inner {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.site-brand {
    border-bottom: none;
    color: var(--text-primary);
}
.site-brand-name {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 80, "opsz" 144;
    font-size: 22px;
    letter-spacing: 0.005em;
}
.site-nav-menu {
    display: flex;
    gap: 24px;
    align-items: center;
}
.site-nav-link {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: var(--accent-amber-dim);
    border-bottom: none;
}
.site-nav-link.is-current { color: var(--accent-amber); }
.site-nav-link:hover { color: var(--accent-amber); border-bottom: none; }

/* === Time bar === */
.time-bar {
    background: var(--bg-surface);
    border-bottom: 0.5px solid var(--border-subtle);
    padding: 12px 0;
}
.time-bar-inner {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-tertiary);
}
.time-bar-traveler {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.time-bar-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.time-bar-text {
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
}
.time-bar-place {
    color: var(--accent-amber);
    font-weight: 500;
    font-style: italic;
}
.time-bar-time {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 12px;
}
.time-bar-day {
    color: var(--text-tertiary);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: lowercase;
}
.time-bar-viewer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    letter-spacing: 0.06em;
}
.time-bar-delta { color: var(--text-tertiary); }
.time-bar-sep { color: var(--text-quaternary); }
.time-bar-viewer-time { color: var(--text-quaternary); }

@media (max-width: 720px) {
    .time-bar-viewer { display: none; }
    .time-bar-text { font-size: 12px; }
}

/* === Hero map === */
.hero-map {
    background: var(--bg-primary);
    padding: 32px 0 0;
}
.hero-map-header {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 28px 28px;
}
.hero-map-eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--accent-amber-dim);
    text-transform: lowercase;
    margin-bottom: 10px;
}
.hero-map-title {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 60, "opsz" 144;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.05;
    margin-bottom: 14px;
}
.hero-map-subtitle {
    color: var(--text-tertiary);
    font-size: 15px;
    font-style: italic;
    max-width: 540px;
}

.hero-map-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    background: var(--bg-primary);
    max-width: var(--container-wide);
    margin: 0 auto;
    border-top: 0.5px solid var(--border-subtle);
    border-bottom: 0.5px solid var(--border-subtle);
}

.hero-map-canvas {
    background: var(--bg-map);
    min-height: 480px;
    position: relative;
}
#map.map-element {
    width: 100%;
    height: 100%;
    min-height: 480px;
    background: var(--bg-map);
}

.map-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    color: var(--text-tertiary);
    background: var(--bg-map);
    pointer-events: none;
}
.map-empty-state[hidden] { display: none !important; }
.map-empty-glyph {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 100, "opsz" 144, "wght" 300;
    font-size: 64px;
    color: var(--accent-amber-dim);
    opacity: 0.4;
    margin-bottom: 12px;
}
.map-empty-state p {
    font-style: italic;
    font-size: 14px;
    max-width: 320px;
}

/* === Leaflet overrides === */
.leaflet-container {
    background: var(--bg-map) !important;
    font-family: var(--font-mono);
    outline: none;
}
.leaflet-control-attribution {
    background: rgba(20, 17, 15, 0.7) !important;
    color: var(--text-tertiary) !important;
    font-size: 9px !important;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    border-top: 0.5px solid var(--border-subtle);
    opacity: 0.5;
}
.leaflet-control-attribution a { color: var(--accent-amber-dim) !important; }
.leaflet-control-zoom { border: none !important; box-shadow: none !important; margin: 12px !important; }
.leaflet-control-zoom a {
    background-color: var(--bg-surface) !important;
    color: var(--accent-amber-dim) !important;
    border: 0.5px solid var(--border-default) !important;
    border-radius: var(--radius-sm) !important;
    width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    font-size: 16px !important;
    font-family: var(--font-mono);
}
.leaflet-control-zoom a + a { margin-top: 4px !important; }
.leaflet-control-zoom a:hover {
    color: var(--accent-amber) !important;
    border-color: var(--accent-amber-dim) !important;
}

/* Custom markers */
.hagan-marker {
    background: var(--accent-amber);
    border-radius: 50%;
    width: 12px !important;
    height: 12px !important;
    margin-left: -6px !important;
    margin-top: -6px !important;
    box-shadow: 0 0 0 5px rgba(239, 159, 39, 0.18);
}
.hagan-marker-current {
    width: 16px !important;
    height: 16px !important;
    margin-left: -8px !important;
    margin-top: -8px !important;
    box-shadow:
        0 0 0 7px rgba(239, 159, 39, 0.25),
        0 0 0 14px rgba(239, 159, 39, 0.12);
    animation: marker-pulse 2.6s ease-in-out infinite;
}
@keyframes marker-pulse {
    0%, 100% { box-shadow: 0 0 0 7px rgba(239, 159, 39, 0.25), 0 0 0 14px rgba(239, 159, 39, 0.12); }
    50%      { box-shadow: 0 0 0 11px rgba(239, 159, 39, 0.08), 0 0 0 22px rgba(239, 159, 39, 0.04); }
}

/* Live location markers (from OwnTracks via Cloudflare Worker) — distinct from post pins.
   The marker root is a zero-size point; the visible dot and name label are children. */
.hagan-marker-live {
    width: 0 !important;
    height: 0 !important;
    overflow: visible;
}
.hagan-marker-live .live-pin-dot {
    position: absolute;
    left: -9px;
    top: -9px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #D85A30;
    border: 1.5px solid rgba(244, 239, 230, 0.9);
    box-shadow:
        0 0 0 8px rgba(216, 90, 48, 0.32),
        0 0 0 18px rgba(216, 90, 48, 0.16),
        0 0 0 28px rgba(216, 90, 48, 0.06);
    animation: live-pulse 2.2s ease-in-out infinite;
}
.hagan-marker-live .live-pin-label {
    position: absolute;
    left: 16px;
    top: -10px;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    background: rgba(15, 13, 11, 0.78);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    pointer-events: none;
}
@keyframes live-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 8px rgba(216, 90, 48, 0.32),
            0 0 0 18px rgba(216, 90, 48, 0.16),
            0 0 0 28px rgba(216, 90, 48, 0.06);
    }
    50% {
        box-shadow:
            0 0 0 12px rgba(216, 90, 48, 0.18),
            0 0 0 26px rgba(216, 90, 48, 0.08),
            0 0 0 40px rgba(216, 90, 48, 0.03);
    }
}

/* Eamon's pin = teal so it's distinguishable from Keith's coral */
.hagan-marker-live-eamon .live-pin-dot {
    background: #5B9BAB;
    box-shadow:
        0 0 0 8px rgba(91, 155, 171, 0.32),
        0 0 0 18px rgba(91, 155, 171, 0.16),
        0 0 0 28px rgba(91, 155, 171, 0.06);
    animation: live-pulse-eamon 2.2s ease-in-out infinite;
}
@keyframes live-pulse-eamon {
    0%, 100% {
        box-shadow:
            0 0 0 8px rgba(91, 155, 171, 0.32),
            0 0 0 18px rgba(91, 155, 171, 0.16),
            0 0 0 28px rgba(91, 155, 171, 0.06);
    }
    50% {
        box-shadow:
            0 0 0 12px rgba(91, 155, 171, 0.18),
            0 0 0 26px rgba(91, 155, 171, 0.08),
            0 0 0 40px rgba(91, 155, 171, 0.03);
    }
}

/* Dry-run travelers: Bess (rose) and Maeve (violet) */
.hagan-marker-live-bess .live-pin-dot {
    background: #C8527A;
    box-shadow:
        0 0 0 8px rgba(200, 82, 122, 0.30),
        0 0 0 18px rgba(200, 82, 122, 0.15),
        0 0 0 28px rgba(200, 82, 122, 0.05);
    animation: none;
}
.hagan-marker-live-maeve .live-pin-dot {
    background: #8E6FC9;
    box-shadow:
        0 0 0 8px rgba(142, 111, 201, 0.30),
        0 0 0 18px rgba(142, 111, 201, 0.15),
        0 0 0 28px rgba(142, 111, 201, 0.05);
    animation: none;
}

/* Stale ("dead zone") state — pin stops pulsing, dims, label goes muted.
   Honesty over fake-liveness: a stale pin should LOOK stale. */
.hagan-marker-live.is-stale .live-pin-dot {
    background: var(--text-tertiary);
    box-shadow: 0 0 0 5px rgba(128, 112, 96, 0.18);
    animation: none;
    opacity: 0.7;
}
.hagan-marker-live.is-stale .live-pin-label {
    color: var(--text-tertiary);
    font-style: italic;
}
.map-popup-deadzone {
    color: var(--text-secondary);
    font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
    .hagan-marker-live .live-pin-dot { animation: none !important; }
}


/* Popups */
.leaflet-popup-content-wrapper {
    background: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    border: 0.5px solid var(--border-default);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
    padding: 0 !important;
}
.leaflet-popup-content {
    margin: 14px 16px !important;
    font-family: var(--font-body);
    line-height: 1.5;
}
.leaflet-popup-tip { background: var(--bg-surface) !important; box-shadow: none !important; }
.leaflet-popup-close-button {
    color: var(--text-tertiary) !important;
    font-size: 18px !important;
    padding: 6px 8px 0 0 !important;
}
.leaflet-popup-close-button:hover { color: var(--accent-amber) !important; }

.map-popup-meta {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--accent-amber);
    text-transform: lowercase;
    margin-bottom: 6px;
}
.map-popup-title {
    display: block;
    font-family: var(--font-display);
    font-size: 17px;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 400;
}
.map-popup-excerpt {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.5;
    margin-bottom: 10px;
    font-style: italic;
}
.map-popup-link {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--accent-amber);
    text-transform: lowercase;
    border-bottom: none;
}
.map-popup-link:hover { color: var(--accent-amber); border-bottom: 0.5px solid var(--accent-amber); }

/* === Sidebar === */
.hero-map-sidebar {
    background: var(--bg-surface);
    border-left: 0.5px solid var(--border-subtle);
    padding: 22px 18px;
    max-height: 480px;
    overflow-y: auto;
}
.hero-map-sidebar::-webkit-scrollbar { width: 6px; }
.hero-map-sidebar::-webkit-scrollbar-track { background: var(--bg-surface); }
.hero-map-sidebar::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }

.sidebar-heading {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: lowercase;
    color: var(--text-tertiary);
    margin-bottom: 14px;
    font-weight: 500;
}
.sidebar-posts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-empty {
    font-style: italic;
    color: var(--text-tertiary);
    font-size: 13px;
    padding: 12px 0;
}
.sidebar-more {
    display: block;
    margin-top: 14px;
    padding: 8px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: lowercase;
    color: var(--accent-amber-dim);
    border-bottom: none;
}
.sidebar-more:hover { color: var(--accent-amber); border-bottom: none; }

/* === Post card === */
.post-card {
    background: var(--bg-primary);
    border: 0.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--t-base), border-color var(--t-base);
}
.post-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-default);
}
.post-card-link {
    display: block;
    color: inherit;
    border-bottom: none;
}
.post-card-link:hover { border-bottom: none; }
.post-card-image {
    aspect-ratio: 4 / 3;
    background: var(--bg-map);
    overflow: hidden;
    position: relative;
}
.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}
.post-card:hover .post-card-image img { transform: scale(1.04); }
.post-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border-bottom: 0.5px solid var(--border-subtle);
}
.post-card-image-glyph {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 100, "opsz" 144, "wght" 300;
    font-size: 56px;
    color: var(--accent-amber-dim);
    opacity: 0.45;
    text-transform: uppercase;
}
.post-card-body {
    padding: 14px 16px 18px;
}
.post-card-eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--accent-amber);
    text-transform: lowercase;
    margin-bottom: 6px;
}
.post-card-title {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 50, "opsz" 60;
    font-size: 20px;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 400;
}
.post-card-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}
.post-card-sep { margin: 0 5px; color: var(--text-quaternary); }

/* Compact variant for sidebar */
.post-card-compact { border-radius: var(--radius-sm); }
.post-card-compact .post-card-link {
    display: flex;
    gap: 10px;
    padding: 8px;
}
.post-card-compact .post-card-image {
    width: 48px;
    height: 48px;
    aspect-ratio: 1;
    flex-shrink: 0;
    border-radius: 3px;
    border: none;
}
.post-card-compact .post-card-body { padding: 0; min-width: 0; flex: 1; }
.post-card-compact .post-card-eyebrow { font-size: 9px; margin-bottom: 2px; letter-spacing: 0.14em; }
.post-card-compact .post-card-title { font-size: 13px; margin-bottom: 4px; line-height: 1.25; }
.post-card-compact .post-card-meta { font-size: 9px; }
.post-card-compact .post-card-image-glyph { font-size: 22px; }

/* === Section header === */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 28px;
}
.section-title {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 60, "opsz" 96;
    font-size: 26px;
    color: var(--text-primary);
    font-weight: 400;
}
.section-link {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--accent-amber-dim);
    border-bottom: none;
    text-transform: lowercase;
}
.section-link:hover { color: var(--accent-amber); border-bottom: none; }

/* === Latest grid === */
.latest-grid {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 56px 28px;
}
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}
.grid-empty {
    text-align: center;
    font-style: italic;
    color: var(--text-tertiary);
    padding: 40px 0;
}

/* === Post page === */
.post-page { background: var(--bg-primary); }

.post-hero {
    position: relative;
    height: clamp(380px, 62vh, 640px);
    overflow: hidden;
    background: var(--bg-map);
}
.post-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}
.post-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(15, 13, 11, 0.96) 0%, rgba(15, 13, 11, 0.3) 55%, rgba(15, 13, 11, 0.55) 100%);
    display: flex;
    align-items: flex-end;
    padding: 40px 28px;
}
.post-hero-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
    width: 100%;
}
.post-hero-eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--accent-amber);
    text-transform: lowercase;
    margin-bottom: 14px;
}
.post-hero-title {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 40, "opsz" 144;
    font-size: clamp(30px, 5.5vw, 56px);
    line-height: 1.05;
    color: var(--text-primary);
    margin-bottom: 18px;
    letter-spacing: -0.018em;
    font-weight: 400;
}
.post-hero-excerpt {
    font-family: var(--font-body);
    font-size: clamp(17px, 2vw, 20px);
    font-style: italic;
    color: rgba(244, 239, 230, 0.88);
    margin-bottom: 20px;
    max-width: 620px;
    line-height: 1.5;
}
.post-hero-meta,
.post-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--accent-amber-dim);
    text-transform: lowercase;
}
.post-meta-sep { margin: 0 6px; color: var(--text-quaternary); }
.post-meta-amp { font-style: italic; color: var(--text-tertiary); margin: 0 2px; }

/* Post without hero image */
.post-header {
    padding: 64px 28px 36px;
    border-bottom: 0.5px solid var(--border-subtle);
}
.post-header-inner {
    max-width: var(--container-narrow);
    margin: 0 auto;
}
.post-eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--accent-amber);
    text-transform: lowercase;
    margin-bottom: 14px;
}
.post-title {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 40, "opsz" 144;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.1;
    margin-bottom: 18px;
    font-weight: 400;
    letter-spacing: -0.012em;
}
.post-excerpt {
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(17px, 2vw, 20px);
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 620px;
}

/* === Post content === */
.post-body {
    padding: 56px 28px;
}
.post-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
    font-family: var(--font-body);
    font-size: 19px;
    line-height: 1.7;
    color: rgba(244, 239, 230, 0.94);
}
.post-content h2 {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 50, "opsz" 96;
    font-size: 30px;
    margin: 1.6em 0 0.5em;
}
.post-content h3 {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 50, "opsz" 60;
    font-size: 23px;
    margin: 1.4em 0 0.4em;
}
.post-content p { margin-bottom: 1.4em; }
.post-content a {
    color: var(--accent-amber);
    border-bottom: 0.5px solid rgba(185, 136, 28, 0.4);
}
.post-content a:hover { border-bottom-color: var(--accent-amber); }
.post-content strong { color: var(--text-primary); font-weight: 500; }
.post-content em { color: rgba(244, 239, 230, 0.9); }

.post-content img,
.post-content .kg-image {
    margin: 2em auto;
    border-radius: var(--radius-md);
    width: 100%;
}
.post-content .kg-image-card,
.post-content .kg-gallery-card { margin: 2em 0; }

/* Koenig editor width classes — required by Ghost */
.post-content .kg-width-wide {
    position: relative;
    width: calc(100% + 200px);
    max-width: calc(100vw - 40px);
    margin-left: -100px;
    margin-right: -100px;
}
.post-content .kg-width-wide img,
.post-content .kg-width-wide .kg-image {
    width: 100%;
    margin: 0 auto;
}
.post-content .kg-width-full {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: none;
    border-radius: 0;
}
.post-content .kg-width-full img,
.post-content .kg-width-full .kg-image {
    width: 100%;
    margin: 0;
    border-radius: 0;
}
@media (max-width: 900px) {
    .post-content .kg-width-wide {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

.post-content figcaption,
.post-content .kg-card-caption {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 0.6em;
}

.post-content blockquote {
    border-left: 2px solid var(--accent-amber);
    margin: 1.6em 0;
    padding: 0.3em 0 0.3em 1.5em;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.05em;
}

.post-content code {
    background: var(--bg-surface);
    padding: 0.12em 0.4em;
    font-family: var(--font-mono);
    font-size: 0.88em;
    border-radius: 3px;
    color: var(--accent-amber);
}
.post-content pre {
    background: var(--bg-surface);
    padding: 1.2em;
    border-radius: var(--radius-md);
    overflow-x: auto;
    border: 0.5px solid var(--border-subtle);
    margin: 1.5em 0;
    font-size: 14px;
}
.post-content pre code {
    background: transparent;
    padding: 0;
    color: var(--text-primary);
}

.post-content ul, .post-content ol { margin: 1em 0 1.4em 1.5em; }
.post-content li { margin-bottom: 0.4em; }

.post-content hr {
    border: none;
    border-top: 0.5px solid var(--border-default);
    margin: 3em auto;
    max-width: 200px;
}

/* Ghost Koenig editor cards */
.post-content .kg-bookmark-card {
    border: 0.5px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-surface);
    margin: 1.5em 0;
}
.post-content .kg-bookmark-container {
    display: flex;
    color: var(--text-primary);
    border-bottom: none;
    text-decoration: none;
}
.post-content .kg-callout-card {
    padding: 1em 1.5em;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border-left: 2px solid var(--accent-amber);
    margin: 1.5em 0;
}

/* === Post footer / tags === */
.post-footer {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 28px 56px;
}
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.post-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: var(--accent-amber-dim);
    background: var(--bg-surface);
    padding: 5px 12px;
    border-radius: 999px;
    border: 0.5px solid var(--border-subtle);
}
.post-tag:hover {
    color: var(--accent-amber);
    border-color: var(--border-default);
    border-bottom: 0.5px solid var(--border-default);
}

/* === Related posts === */
.related-posts {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 48px 28px 64px;
    border-top: 0.5px solid var(--border-subtle);
}

/* === Static page === */
.static-page-header,
.static-page-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 28px;
}
.static-page-header { padding-top: 64px; padding-bottom: 36px; }
.static-page-title {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 40, "opsz" 144;
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 16px;
}
.static-page-excerpt {
    font-style: italic;
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 19px;
    max-width: 620px;
}
.static-page-content { padding-bottom: 64px; font-size: 19px; line-height: 1.7; }

/* === Archive (tag/author) === */
.archive-page {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 56px 28px;
}
.archive-header { text-align: center; margin-bottom: 44px; }
.archive-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 16px;
    border: 0.5px solid var(--border-default);
}
.archive-eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--accent-amber-dim);
    text-transform: lowercase;
    margin-bottom: 12px;
}
.archive-title {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 40, "opsz" 144;
    font-size: clamp(32px, 5vw, 48px);
}
.archive-description {
    margin: 14px auto 0;
    color: var(--text-secondary);
    font-style: italic;
    max-width: 600px;
    font-size: 17px;
}

/* === Pagination (Ghost helper outputs) === */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 56px 0 0;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
}
.pagination a {
    color: var(--accent-amber-dim);
    text-transform: lowercase;
    border-bottom: none;
}
.pagination a:hover { color: var(--accent-amber); }

/* === Site footer === */
.site-footer {
    background: var(--bg-primary);
    border-top: 0.5px solid var(--border-subtle);
    margin-top: auto;
    padding: 16px 0;
}
.site-footer-inner {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: var(--text-quaternary);
}
.site-footer-brand { color: var(--text-tertiary); }
.site-footer-nav { display: flex; gap: 8px; align-items: center; }
.site-footer-nav a {
    color: var(--accent-amber-dim);
    border-bottom: none;
}
.site-footer-nav a:hover { color: var(--accent-amber); border-bottom: none; }
.site-footer-sep { color: var(--text-quaternary); }

/* === Error page === */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 28px;
    text-align: center;
}
.error-page-inner { max-width: 480px; }
.error-page-code {
    display: block;
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 100, "opsz" 144, "wght" 300;
    font-size: clamp(96px, 18vw, 180px);
    line-height: 1;
    color: var(--accent-amber);
    opacity: 0.35;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.error-page-title {
    font-family: var(--font-display);
    font-size: clamp(24px, 4vw, 32px);
    margin-bottom: 16px;
}
.error-page-description {
    color: var(--text-tertiary);
    font-style: italic;
    margin-bottom: 36px;
    font-size: 17px;
}
.error-page-link {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: var(--accent-amber);
    border-bottom: 0.5px solid var(--accent-amber-dim);
    padding-bottom: 2px;
}

/* === Responsive === */
@media (max-width: 900px) {
    .hero-map-layout {
        grid-template-columns: 1fr;
    }
    .hero-map-canvas { min-height: 360px; }
    #map.map-element { min-height: 360px; }
    .hero-map-sidebar {
        border-left: none;
        border-top: 0.5px solid var(--border-subtle);
        max-height: 360px;
    }
    .site-nav-inner { padding: 0 18px; }
    .time-bar-inner { padding: 0 18px; }
    .hero-map-header { padding: 0 18px 22px; }
    .latest-grid { padding: 40px 18px; }
}

@media (max-width: 600px) {
    body { font-size: 17px; }
    .site-nav { padding: 12px 0; }
    .site-brand-name { font-size: 18px; }
    .site-nav-menu { gap: 12px; }
    .site-nav-link { font-size: 10px; letter-spacing: 0.15em; }
    .time-bar { padding: 10px 0; }
    .time-bar-text { font-size: 12px; }
    .hero-map { padding-top: 18px; }
    .grid-cards { grid-template-columns: 1fr; gap: 16px; }
    .post-hero { height: 52vh; min-height: 320px; }
    .post-hero-overlay { padding: 28px 18px; }
    .post-body { padding: 36px 18px; }
    .post-content { font-size: 17px; }
    .post-content h2 { font-size: 25px; }
    .post-content h3 { font-size: 20px; }
    .post-footer { padding: 0 18px 36px; }
    .static-page-header,
    .static-page-content,
    .archive-page { padding-left: 18px; padding-right: 18px; }
    .site-footer-inner {
        padding: 0 18px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .related-posts { padding: 32px 18px 48px; }
}

/* ============================================================
   MAP-APP HOMEPAGE LAYOUT (body.home-template only)
   Full-bleed map fills viewport. Nav, time bar, and dispatches
   panel float as overlays. Post drawer slides in on pin click.
   ============================================================ */

body.home-template {
    overflow: hidden;
    height: 100vh;
    height: 100dvh; /* dynamic viewport — handles iOS Safari */
}
body.home-template .site-main {
    position: relative;
    height: 100vh;
    height: 100dvh;
}

.map-app {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}
#map.map-fullbleed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Site nav floats over the map */
body.home-template .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: linear-gradient(to bottom,
        rgba(20, 17, 15, 0.92) 0%,
        rgba(20, 17, 15, 0.6) 70%,
        rgba(20, 17, 15, 0) 100%);
    border-bottom: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 16px 0 32px;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Time bar floats as a centered pill below the nav */
body.home-template .time-bar {
    position: fixed;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    background: rgba(20, 17, 15, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 0.5px solid var(--border-default);
    border-radius: 24px;
    padding: 8px 20px;
    max-width: 92vw;
    width: auto;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
body.home-template .time-bar-inner {
    padding: 0;
    gap: 12px;
}

/* Footer hidden on homepage */
body.home-template .site-footer {
    display: none;
}

/* === Dispatches floating panel === */
.dispatches-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: rgba(20, 17, 15, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 0.5px solid var(--border-default);
    border-radius: 20px 20px 0 0;
    max-height: 70vh;
    max-height: 70dvh;
    transform: translateY(calc(100% - 76px));
    transition: transform 0.35s ease, opacity 0.35s ease;
    display: flex;
    flex-direction: column;
}
.dispatches-panel.is-expanded {
    transform: translateY(0);
}

.dispatches-toggle {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 22px 24px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: lowercase;
    color: var(--text-tertiary);
    position: relative;
    flex-shrink: 0;
}
.dispatches-toggle-handle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--border-default);
    border-radius: 2px;
    transition: background var(--t-fast);
}
.dispatches-panel.is-expanded .dispatches-toggle-handle {
    background: var(--accent-amber-dim);
}
.dispatches-toggle-label {
    flex: 1;
    color: var(--text-primary);
    font-size: 12px;
    letter-spacing: 0.18em;
}
.dispatches-toggle-count {
    color: var(--accent-amber-dim);
    background: var(--bg-surface);
    padding: 3px 11px;
    border-radius: 999px;
    border: 0.5px solid var(--border-subtle);
    font-size: 11px;
    letter-spacing: 0.06em;
}

.dispatches-list {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 18px 28px;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}
.dispatches-list::-webkit-scrollbar { width: 6px; }
.dispatches-list::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }
.dispatches-list::-webkit-scrollbar-track { background: transparent; }

.dispatch-item {
    display: flex;
    align-items: baseline;
    gap: 14px;
    width: 100%;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 14px 10px;
    border-bottom: 0.5px solid var(--border-subtle);
    text-align: left;
    transition: background var(--t-fast);
    font-family: inherit;
}
.dispatch-item:hover,
.dispatch-item:focus-visible {
    background: rgba(239, 159, 39, 0.05);
    outline: none;
}
.dispatch-item:last-child { border-bottom: none; }
.dispatch-item-date {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--accent-amber-dim);
    text-transform: lowercase;
    min-width: 56px;
    flex-shrink: 0;
}
.dispatch-item-title {
    flex: 1;
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 50, "opsz" 60;
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.3;
    font-weight: 400;
}
.dispatch-item-tag {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    text-transform: lowercase;
    flex-shrink: 0;
}
.dispatches-empty {
    color: var(--text-tertiary);
    font-style: italic;
    padding: 24px 0;
    text-align: center;
}

/* === Post drawer === */
.post-drawer-scrim {
    position: fixed;
    inset: 0;
    background: rgba(15, 13, 11, 0.65);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.post-drawer-scrim.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.post-drawer {
    position: fixed;
    z-index: 50;
    background: var(--bg-primary);
    box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.55);
    overflow-y: auto;
    overscroll-behavior: contain;
    transition: transform 0.35s ease;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 768px) {
    .post-drawer {
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 85vh;
        max-height: 85dvh;
        border-radius: 20px 20px 0 0;
        transform: translateY(110%);
    }
    .post-drawer.is-open { transform: translateY(0); }
}
@media (min-width: 769px) {
    .post-drawer {
        top: 0;
        right: 0;
        bottom: 0;
        width: 440px;
        max-width: 92vw;
        border-left: 0.5px solid var(--border-default);
        border-radius: 0;
        transform: translateX(110%);
        box-shadow: -10px 0 32px rgba(0, 0, 0, 0.55);
    }
    .post-drawer.is-open { transform: translateX(0); }
}

.post-drawer-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(20, 17, 15, 0.85);
    backdrop-filter: blur(6px);
    border: 0.5px solid var(--border-default);
    color: var(--text-tertiary);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: color var(--t-fast), border-color var(--t-fast);
}
.post-drawer-close:hover {
    color: var(--accent-amber);
    border-color: var(--accent-amber-dim);
}
.post-drawer-content { padding: 0; }
.post-drawer-feature {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: var(--bg-map);
}
.post-drawer-body { padding: 28px 28px 40px; }
.post-drawer-eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--accent-amber);
    text-transform: lowercase;
    margin-bottom: 12px;
}
.post-drawer-title {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 50, "opsz" 96;
    font-size: 28px;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 14px;
    font-weight: 400;
    letter-spacing: -0.01em;
}
.post-drawer-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--accent-amber-dim);
    text-transform: lowercase;
    margin-bottom: 20px;
}
.post-drawer-excerpt {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 28px;
}
.post-drawer-link {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: var(--accent-amber);
    border: 0.5px solid var(--accent-amber-dim);
    padding: 10px 22px;
    border-radius: 999px;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.post-drawer-link:hover {
    background: rgba(239, 159, 39, 0.08);
    border-color: var(--accent-amber);
    color: var(--accent-amber);
}

/* === Engaged state (chrome collapses to periphery on map interaction) === */
body.home-template.is-engaged .site-nav {
    opacity: 0.55;
    transform: translateY(-4px) scale(0.96);
}
body.home-template.is-engaged .site-nav:hover {
    opacity: 1;
    transform: none;
}
body.home-template.is-engaged .time-bar {
    opacity: 0.6;
    transform: translateX(-50%) scale(0.88);
}
body.home-template.is-engaged .time-bar:hover {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}
body.home-template.is-engaged .dispatches-panel:not(.is-expanded) {
    opacity: 0.75;
    transform: translateY(calc(100% - 40px));
}
body.home-template.is-engaged .dispatches-panel:not(.is-expanded):hover {
    opacity: 1;
    transform: translateY(calc(100% - 76px));
}

/* === Marker cluster bubbles (override plugin defaults to match theme) === */
.marker-cluster {
    background: rgba(239, 159, 39, 0.16) !important;
    border-radius: 50% !important;
}
.marker-cluster div {
    background: var(--accent-amber) !important;
    color: var(--bg-primary) !important;
    font-family: var(--font-mono) !important;
    font-size: 12px !important;
    letter-spacing: 0.04em !important;
    font-weight: 500 !important;
    width: 32px !important;
    height: 32px !important;
    margin: 4px !important;
    line-height: 32px !important;
    border: 1px solid rgba(244, 239, 230, 0.45);
}
.marker-cluster-medium {
    background: rgba(239, 159, 39, 0.22) !important;
}
.marker-cluster-medium div { width: 36px !important; height: 36px !important; line-height: 36px !important; }
.marker-cluster-large {
    background: rgba(216, 90, 48, 0.22) !important;
}
.marker-cluster-large div {
    background: #D85A30 !important;
    color: #F4EFE6 !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
}

/* Position Leaflet controls so they don't fight overlay chrome */
body.home-template .leaflet-control-zoom { margin: 16px !important; }
body.home-template .leaflet-top.leaflet-right { top: 70px; }
body.home-template .leaflet-bottom.leaflet-right { bottom: 80px; }

/* === Mobile polish === */
@media (max-width: 600px) {
    body.home-template .site-nav-inner { padding: 0 16px; }
    body.home-template .leaflet-bottom.leaflet-right { bottom: 2px; }
    body.home-template .site-brand-name { font-size: 16px; }
    body.home-template .site-nav-menu { gap: 14px; }
    body.home-template .time-bar { top: 54px; padding: 6px 14px; border-radius: 18px; }
    body.home-template .time-bar-text { font-size: 11px; }
    body.home-template .time-bar-time { font-size: 11px; }

    .dispatches-panel { max-height: 65vh; max-height: 65dvh; }
    .dispatches-toggle { padding: 22px 18px 12px; font-size: 10px; }
    .dispatches-list { padding: 4px 14px 24px; }
    .dispatch-item { padding: 14px 6px; gap: 12px; }
    .dispatch-item-date { min-width: 48px; }
    .dispatch-item-title { font-size: 14px; }

    .post-drawer-body { padding: 22px 22px 32px; }
    .post-drawer-title { font-size: 24px; }
    .post-drawer-close { width: 44px; height: 44px; }
}

/* ============================================================
   Access gate + self-destruct gag (v3.0.0)
   ============================================================ */
body.gate-locked { overflow: hidden; }

.access-gate {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gate-fade-in 0.4s ease;
}
.access-gate.is-dismissing {
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}
@keyframes gate-fade-in { from { opacity: 0; } to { opacity: 1; } }

.access-gate-inner {
    width: 100%;
    max-width: 320px;
    padding: 2rem;
    text-align: center;
}
.access-gate.is-shaking .access-gate-inner {
    animation: gate-shake 0.45s ease;
}
@keyframes gate-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-9px); }
    40% { transform: translateX(9px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

.access-gate-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-variation-settings: "SOFT" 40;
}
.access-gate-prompt {
    font-family: var(--font-body);
    color: var(--text-tertiary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}
.gate-input {
    width: 100%;
    padding: 0.8rem 0.9rem;
    margin-bottom: 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    text-align: center;
}
.gate-input:focus { outline: none; border-color: var(--accent-amber-dim); }
.gate-input::placeholder { color: var(--text-quaternary); letter-spacing: 0.02em; }
#gate-code { letter-spacing: 0.4em; font-size: 1.3rem; }
.gate-submit {
    width: 100%;
    padding: 0.85rem;
    background: var(--accent-amber);
    color: #1A1612;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    margin-top: 0.25rem;
}
.gate-submit:hover { background: #f5ab3d; }
.gate-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.gate-recover-link {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 1rem;
}
.gate-recover-link:hover { color: var(--accent-amber); }
.gate-recover-msg {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent-amber-dim);
    min-height: 1em;
    margin: 0.5rem 0 0;
}
.access-gate-error {
    min-height: 1.2em;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #D85A30;
    letter-spacing: 0.03em;
}

/* The self-destruct gag overlay */
.self-destruct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    pointer-events: none;
    opacity: 0;
}
.self-destruct.is-firing {
    animation: destruct-flash 1.9s steps(1) forwards;
}
.self-destruct-text {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.18em;
    color: #F4EFE6;
    text-align: center;
    padding: 0 1rem;
    opacity: 0;
}
.self-destruct.is-firing .self-destruct-text {
    animation: destruct-text 1.9s ease forwards;
}
@keyframes destruct-flash {
    0%   { background: rgba(200, 30, 20, 0); opacity: 1; }
    8%   { background: rgba(200, 30, 20, 0.85); }
    16%  { background: rgba(200, 30, 20, 0); }
    24%  { background: rgba(200, 30, 20, 0.85); }
    32%  { background: rgba(200, 30, 20, 0); }
    40%  { background: rgba(200, 30, 20, 0.85); }
    48%  { background: rgba(200, 30, 20, 0.2); }
    100% { background: rgba(200, 30, 20, 0); }
}
@keyframes destruct-text {
    0%   { opacity: 0; transform: scale(0.9); }
    20%  { opacity: 1; transform: scale(1); }
    80%  { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
    .self-destruct.is-firing { animation: none; background: rgba(200,30,20,0.3); }
    .self-destruct.is-firing .self-destruct-text { animation: none; opacity: 1; }
}

/* ============================================================
   The Naturalist byline
   ============================================================ */
.naturalist {
    position: fixed;
    left: 50%;
    bottom: 4.5rem;
    transform: translateX(-50%);
    z-index: 600;
    max-width: 440px;
    width: calc(100% - 3rem);
    text-align: center;
    pointer-events: none;
    transition: opacity var(--t-base);
}
.naturalist-byline {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-quaternary);
    display: block;
    margin-bottom: 0.35rem;
}
.naturalist-line {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-tertiary);
    margin: 0;
    text-shadow: 0 1px 8px rgba(15, 13, 11, 0.8);
}
/* When the reader zooms in to engage with the map, fade the Naturalist back */
body.is-engaged .naturalist { opacity: 0.25; }
body.is-engaged .naturalist:hover { opacity: 1; }
@media (max-width: 600px) {
    .naturalist { bottom: 5.5rem; }
    .naturalist-line { font-size: 0.85rem; }
}

/* ============================================================
   Wandertross-inspired additions (v3.1.0)
   Pin photo popups · route lines · scroll-synced post map
   ============================================================ */

/* --- Photo-thumbnail pin popups (homepage + post map) --- */
.pin-photo-popup .leaflet-popup-content-wrapper {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0,0,0,0.55);
    padding: 0;
    overflow: hidden;
}
.pin-photo-popup .leaflet-popup-content { margin: 0; width: auto !important; }
.pin-photo-popup .leaflet-popup-tip { background: var(--bg-surface); border: 1px solid var(--border-default); }
.pin-popup { width: 200px; }
.pin-popup-photo { width: 100%; height: 110px; overflow: hidden; background: var(--bg-primary); }
.pin-popup-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pin-popup-body { padding: 0.6rem 0.75rem 0.7rem; }
.pin-popup-eyebrow {
    font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--accent-amber); display: block; margin-bottom: 0.25rem;
}
.pin-popup-title { font-family: var(--font-display); font-size: 1rem; line-height: 1.2; color: var(--text-primary); display: block; }
.pin-popup-date {
    font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-tertiary);
    display: block; margin-top: 0.35rem; letter-spacing: 0.03em;
}

/* --- Route line subtle animation (optional shimmer) --- */
.route-line { filter: drop-shadow(0 0 2px rgba(239,159,39,0.4)); }

/* --- Scroll-synced post map layout --- */
.post-body--mapped {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: 3rem;
    align-items: start;
}
.post-map-rail { position: relative; }
.post-map-sticky { position: sticky; top: 5rem; }
#post-map {
    width: 100%;
    height: 70vh;
    max-height: 620px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    background: var(--bg-map);
    overflow: hidden;
}
.post-map-rail:not(.is-active) #post-map,
#post-map:empty { display: none; }
/* If the script never activates (no places), collapse the rail so the article
   spans full width naturally. */
.post-body--mapped:not(:has(.post-map-rail.is-active)) {
    display: block;
    max-width: 760px;
}
.post-map-caption {
    font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--text-quaternary);
    text-align: center; margin: 0.6rem 0 0;
}

/* Place mentions highlighted in the text */
.place-mention {
    color: var(--accent-amber);
    border-bottom: 1px dashed rgba(239,159,39,0.45);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
    border-radius: 2px;
}
.place-mention:hover { background: rgba(239,159,39,0.12); }
.place-mention.is-current {
    background: rgba(216,90,48,0.22);
    color: var(--text-primary);
    border-bottom-color: var(--accent-coral);
}

/* Post-map markers */
.post-map-marker .pm-dot {
    position: absolute; left: -7px; top: -7px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--accent-amber);
    border: 2px solid var(--bg-surface);
    box-shadow: 0 0 0 4px rgba(239,159,39,0.25);
    transition: transform var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.post-map-marker.is-current .pm-dot {
    background: var(--accent-coral);
    transform: scale(1.35);
    box-shadow: 0 0 0 7px rgba(216,90,48,0.30);
}

/* Fold the map under the text on narrower screens */
@media (max-width: 900px) {
    .post-body--mapped {
        display: block;
        max-width: 760px;
    }
    .post-map-rail { margin-top: 2rem; }
    .post-map-sticky { position: static; }
    #post-map { height: 50vh; }
}

/* --- Live breadcrumb trail (the path of where travelers have actually been) --- */
.live-trail-line { filter: drop-shadow(0 0 3px rgba(216,90,48,0.5)); }
.live-trail-glow { pointer-events: none; }

/* --- Viewer trail-window control (compact, unobtrusive) --- */
.trail-control {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    z-index: 600;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(20,17,15,0.82);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.4rem 0.6rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.trail-control-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.trail-control-select {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    padding: 0.2rem 0.4rem;
    cursor: pointer;
}
.trail-control-select:focus { outline: none; border-color: var(--accent-amber-dim); }
@media (max-width: 600px) {
    .trail-control { bottom: 0.75rem; left: 0.75rem; padding: 0.35rem 0.5rem; }
    .trail-control-label { display: none; }
}

/* ===== Gate photo cropper (optional) ===== */
.gate-photo-toggle {
    background: none; border: 1px dashed var(--border-default); color: var(--text-tertiary);
    font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
    padding: 0.55rem; border-radius: var(--radius-md); cursor: pointer; width: 100%; margin: 0.25rem 0 0.5rem;
}
.gate-photo-toggle:hover { color: var(--accent-amber); border-color: var(--accent-amber-dim); }
.gate-photo-area { margin-bottom: 0.75rem; }
.gate-photo-hint { font-family: var(--font-body); font-size: 0.85rem; color: var(--text-tertiary); margin: 0 0 0.5rem; }
.gate-crop-wrap { display: flex; justify-content: center; background: var(--bg-primary); border: 1px solid var(--border-default); border-radius: var(--radius-md); overflow: hidden; margin: 0.5rem 0; }
.gate-crop-wrap canvas { max-width: 100%; touch-action: none; cursor: grab; }
.gate-slider { display: block; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }
.gate-slider input { width: 100%; }
.gate-prev-wrap { display: flex; justify-content: center; margin-top: 0.5rem; }

/* ===== Dancing watcher caricatures ===== */
.hagan-dancer { pointer-events: none; }
.dancer-img {
    display: block;
    background-size: contain; background-repeat: no-repeat; background-position: bottom center;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,0.5));
    animation: dancer-bob 1.6s ease-in-out infinite;
    transform-origin: bottom center;
}
@keyframes dancer-bob {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%      { transform: translateY(-3px) rotate(2deg); }
}

/* ===== Star avatar on the live pin ===== */
.hagan-marker-live.has-avatar { }
.live-avatar {
    display: block; width: 56px; height: 72px;
    background-size: contain; background-repeat: no-repeat; background-position: bottom center;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.55));
    animation: dancer-bob 1.4s ease-in-out infinite;
    transform-origin: bottom center;
}
.hagan-marker-live.has-avatar .live-pin-label {
    position: absolute; left: 50%; transform: translateX(-50%); bottom: -14px; white-space: nowrap;
}

/* ============================================================
   RESPONSIVE + NEW UI (iteration 2)
   ============================================================ */

/* ---- Gate: scrollable panel with a visible, tasteful scrollbar ---- */
.access-gate-inner {
    max-height: 88vh;
    max-height: 88dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-amber-dim, #b97f2a) rgba(255,255,255,0.06);
    padding-right: 6px;
}
.access-gate-inner::-webkit-scrollbar { width: 10px; }
.access-gate-inner::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 8px; }
.access-gate-inner::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-amber, #EF9F27), var(--accent-coral, #D85A30));
    border-radius: 8px; border: 2px solid transparent; background-clip: padding-box;
}
.access-gate-inner::-webkit-scrollbar-thumb:hover { background: var(--accent-amber, #EF9F27); }

/* ---- Gate crop controls (shape + remove bg + status) ---- */
.gate-crop-controls { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; margin: 0.5rem 0; }
.gate-check { display: flex; align-items: center; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-tertiary); }
.gate-check input { width: auto; }
.gate-shape-seg { display: flex; gap: 0.3rem; }
.gate-shape { background: var(--bg-primary); border: 1px solid var(--border-default); color: var(--text-tertiary); border-radius: 6px; font-family: var(--font-mono); font-size: 0.72rem; padding: 0.4rem 0.75rem; cursor: pointer; min-height: 36px; }
.gate-shape.active { background: var(--accent-amber); color: #1A1612; border-color: var(--accent-amber); }
.gate-cut-status { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent-amber); min-height: 1em; margin: 0.2rem 0; }

/* ---- Suggestions: search + tap controls (top-left) ---- */
.sugg-ui {
    position: absolute; top: 0.75rem; left: 0.75rem; z-index: 620;
    width: min(280px, calc(100% - 1.5rem)); display: flex; flex-direction: column; gap: 0.4rem;
}
.sugg-search-row { display: flex; gap: 0.35rem; }
.sugg-search {
    flex: 1; min-width: 0; background: rgba(20,17,15,0.92); color: var(--text-primary);
    border: 1px solid var(--border-default); border-radius: var(--radius-md);
    font-family: var(--font-mono); font-size: 0.82rem; padding: 0.5rem 0.65rem; min-height: 40px;
    backdrop-filter: blur(6px);
}
.sugg-search:focus { outline: none; border-color: var(--accent-amber); }
.sugg-btn {
    background: rgba(20,17,15,0.92); border: 1px solid var(--border-default); color: var(--accent-amber);
    border-radius: var(--radius-md); font-size: 1.1rem; width: 40px; min-height: 40px; cursor: pointer; backdrop-filter: blur(6px);
}
.sugg-tap-toggle {
    background: rgba(20,17,15,0.92); border: 1px dashed var(--border-default); color: var(--text-tertiary);
    border-radius: var(--radius-md); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.02em;
    padding: 0.5rem 0.6rem; min-height: 40px; cursor: pointer; text-align: left; backdrop-filter: blur(6px);
}
.sugg-tap-toggle.is-active { border-style: solid; border-color: var(--accent-coral); color: var(--cream); background: rgba(216,90,48,0.18); }
.sugg-results { background: rgba(20,17,15,0.96); border: 1px solid var(--border-default); border-radius: var(--radius-md); overflow: hidden; backdrop-filter: blur(6px); }
.sugg-result { display: block; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); font-family: var(--font-body); font-size: 0.86rem; padding: 0.55rem 0.65rem; cursor: pointer; min-height: 40px; }
.sugg-result:hover { background: rgba(255,255,255,0.05); color: var(--cream); }
.sugg-result:last-child { border-bottom: none; }
.sugg-result-empty { padding: 0.6rem 0.65rem; font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-tertiary); }
#map.suggest-cursor { cursor: crosshair; }

/* ---- Suggestion dots (small + quiet so they don't overpower) ---- */
.sugg-dot { pointer-events: auto; }
.sugg-dot-pip {
    display: block; width: 12px; height: 12px; border-radius: 50%;
    background: var(--accent-coral, #D85A30); border: 2px solid rgba(255,255,255,0.85);
    box-shadow: 0 1px 4px rgba(0,0,0,0.5); opacity: 0.9; cursor: pointer;
    transition: transform 0.15s ease;
}
.sugg-dot-pip:hover { transform: scale(1.35); }
.sugg-popup .sugg-eyebrow { display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-amber); margin-bottom: 0.2rem; }
.sugg-popup .sugg-place { display: block; font-family: var(--font-display, serif); font-size: 0.95rem; color: var(--cream); margin-bottom: 0.25rem; }
.sugg-popup .sugg-note { font-family: var(--font-body); font-size: 0.9rem; color: var(--text-secondary); margin: 0.25rem 0 0.5rem; }
.sugg-del { background: none; border: 1px solid var(--border-default); color: var(--text-tertiary); border-radius: 6px; font-family: var(--font-mono); font-size: 0.68rem; padding: 0.35rem 0.55rem; cursor: pointer; }
.sugg-del:hover { border-color: var(--accent-coral); color: var(--accent-coral); }
.sugg-form .sugg-eyebrow { display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-amber); margin-bottom: 0.35rem; }
.sugg-note-input { width: 100%; background: var(--bg-primary); border: 1px solid var(--border-default); border-radius: 8px; color: var(--text-primary); font-family: var(--font-body); font-size: 0.95rem; padding: 0.5rem; resize: vertical; }
.sugg-note-input:focus { outline: none; border-color: var(--accent-amber); }
.sugg-btn-primary { width: 100%; margin-top: 0.5rem; background: var(--accent-amber); color: #1A1612; border: none; border-radius: 8px; font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; padding: 0.6rem; cursor: pointer; min-height: 40px; }
.sugg-form-by { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-tertiary); margin: 0.4rem 0 0; text-align: right; }
.sugg-form-err { color: #e06a4a; font-family: var(--font-mono); font-size: 0.74rem; min-height: 1em; margin: 0.25rem 0 0; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
/* Fluid type baseline */
:root { --touch-min: 44px; }
button, .gate-submit, .gate-input, select, input[type="text"], input[type="email"] { min-height: var(--touch-min); }

/* Tablet / iPad portrait */
@media (max-width: 1024px) {
    .sugg-ui { width: min(260px, calc(100% - 1.5rem)); }
}
/* iPad landscape & smaller laptops keep desktop layout; phones below */

/* Phones (portrait) */
@media (max-width: 600px) {
    .access-gate-inner { max-height: 92vh; max-height: 92dvh; padding: 1.25rem 1rem; }
    .sugg-ui { top: 0.5rem; left: 0.5rem; right: 0.5rem; width: auto; }
    .trail-control { bottom: 0.6rem; left: 0.6rem; }
    .gate-crop-controls { gap: 0.45rem; }
    .gate-shape, .sugg-result, .sugg-tap-toggle { font-size: 0.78rem; }
    .live-pin-label { font-size: 0.6rem; }
    .leaflet-control-zoom { display: none; } /* pinch-zoom on phones; reclaim space */
}
/* Small phones */
@media (max-width: 380px) {
    .sugg-search { font-size: 0.78rem; }
    .gate-shape-seg { width: 100%; }
    .gate-shape { flex: 1; }
}
/* Large screens / iPad Pro: give the search a touch more room */
@media (min-width: 1200px) {
    .sugg-ui { width: 300px; }
}

/* ============================================================
   DUAL SIDE PANELS (iteration 3) — left = dispatches, right = suggestions
   ============================================================ */
.map-app { position: relative; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; }
.map-fullbleed { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Suggestions search/controls now live inside the right panel; kill the old overlay */
.sugg-ui { display: none !important; }

/* ---- Edge tabs (the pull-tabs that open each panel) ---- */
.edge-tab {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 640;
    background: rgba(20,17,15,0.92); color: var(--cream, #F4EFE6);
    border: 1px solid var(--border-default); cursor: pointer; backdrop-filter: blur(6px);
    writing-mode: vertical-rl; text-orientation: mixed;
    font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
    padding: 0.9rem 0.5rem; transition: background 0.2s ease, color 0.2s ease;
}
.edge-tab-left { left: 0; border-left: none; border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.edge-tab-right { right: 0; border-right: none; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.edge-tab-left { border-left: 3px solid var(--accent-amber, #EF9F27); }
.edge-tab-right { border-right: 3px solid #5B8DEF; }
.edge-tab:hover { background: rgba(35,30,26,0.96); color: #fff; }
.edge-tab-stack-left { position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 640; display: flex; flex-direction: column; gap: 6px; }
.edge-tab-stack-left .edge-tab { position: static; transform: none; top: auto; }
.edge-tab-photos { left: 0; border-left: 3px solid #3FA66A; border-radius: 0 var(--radius-md) var(--radius-md) 0; text-decoration: none; }

/* ---- The panels themselves ---- */
.panel-scrim { position: absolute; inset: 0; z-index: 645; background: rgba(8,6,5,0.35); opacity: 0; pointer-events: none; transition: opacity 0.35s ease; }
.panel-scrim.is-visible { opacity: 1; pointer-events: auto; }

.side-panel {
    position: absolute; top: 0; bottom: 0; z-index: 660; width: min(420px, 88vw);
    background: #FBF8F2; color: #1c1814;
    display: flex; flex-direction: column;
    box-shadow: 0 0 50px rgba(0,0,0,0.45);
    transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.42s ease;
    will-change: transform;
}
.side-panel-left { left: 0; transform: translateX(-104%); }
.side-panel-right { right: 0; transform: translateX(104%); }
.side-panel.is-open { transform: translateX(0); }

.side-panel-head { position: relative; padding: 1.4rem 1.5rem 0.9rem; border-bottom: 1px solid #e9e1d3; }
.side-panel-kicker { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: #b06a3c; }
.side-panel-title { font-family: var(--font-display, 'Fraunces', serif); font-weight: 500; font-size: 1.7rem; margin: 0.15rem 0 0; color: #1c1814; }
.side-panel-close {
    position: absolute; top: 1.1rem; right: 1.1rem; background: none; border: 1px solid #d8cdba;
    border-radius: 8px; cursor: pointer; color: #6b5d4a; font-family: var(--font-mono); font-size: 0.72rem;
    padding: 0.4rem 0.6rem; min-height: 36px;
}
.side-panel-close:hover { border-color: #b06a3c; color: #b06a3c; }
.side-panel-close-map { display: none; }   /* shown on phones */
.side-panel-actions { padding: 0.9rem 1.5rem; border-bottom: 1px solid #e9e1d3; display: flex; flex-direction: column; gap: 0.5rem; }
.side-panel-feed { flex: 1; overflow-y: auto; padding: 1rem 1.2rem 2rem; scrollbar-width: thin; }

/* ---- Feed cards ---- */
.feed-card { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid #ece4d6; border-radius: var(--radius-md, 10px); margin-bottom: 0.9rem; overflow: hidden; cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
.feed-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.10); transform: translateY(-1px); }
.feed-card:hover .feed-card-title { color: #b06a3c; }
.feed-card.is-active { border-color: var(--accent-amber, #EF9F27); box-shadow: 0 0 0 2px rgba(239,159,39,0.35); }
.feed-card-sugg.is-active { border-color: #5B8DEF; box-shadow: 0 0 0 2px rgba(91,141,239,0.35); }
.feed-card-img { width: 100%; height: 210px; background-size: cover; background-position: center; }
.feed-card.has-photo .feed-card-title { font-size: 1.3rem; }
.feed-card-body { padding: 0.85rem 1rem 1rem; }
.feed-card-meta { display: block; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; color: #9a8466; margin-bottom: 0.25rem; }
.feed-card-title { font-family: var(--font-display, 'Fraunces', serif); font-weight: 500; font-size: 1.18rem; line-height: 1.2; margin: 0 0 0.35rem; color: #1c1814; transition: color 0.15s ease; }
.feed-card-excerpt { font-family: var(--font-body, 'EB Garamond', serif); font-size: 0.95rem; line-height: 1.45; color: #5a4f40; margin: 0 0 0.6rem; }
.feed-card-link { display: inline-block; font-family: var(--font-mono); font-size: 0.74rem; color: #b06a3c; }
.feed-card:hover .feed-card-link { text-decoration: underline; }
.feed-card-del { background: none; border: 1px solid #d8cdba; color: #8a7d6a; border-radius: 6px; font-family: var(--font-mono); font-size: 0.68rem; padding: 0.35rem 0.55rem; cursor: pointer; }
.feed-card-del:hover { border-color: #c0573c; color: #c0573c; }
.feed-empty { font-family: var(--font-mono); font-size: 0.8rem; color: #9a8466; padding: 1rem 0.2rem; }

/* search controls inside the right panel (override the dark map styling) */
.side-panel-actions .sugg-search { background: #fff; color: #1c1814; border-color: #d8cdba; backdrop-filter: none; }
.side-panel-actions .sugg-btn { background: #fff; color: #b06a3c; border-color: #d8cdba; backdrop-filter: none; }
.side-panel-actions .sugg-tap-toggle { background: #fff; color: #6b5d4a; border-color: #d8cdba; backdrop-filter: none; text-align: center; }
.side-panel-actions .sugg-tap-toggle.is-active { background: rgba(91,141,239,0.12); border-color: #5B8DEF; color: #2f5bb0; border-style: solid; }
.side-panel-actions .sugg-results { background: #fff; border-color: #ece4d6; }
.side-panel-actions .sugg-result { color: #4a4133; border-color: #f0ebe0; }
.side-panel-actions .sugg-result:hover { background: #f7f2e8; color: #1c1814; }
.side-panel-actions .sugg-result-empty { color: #9a8466; }

/* ---- Suggestion dots: cool color so "theirs" reads instantly vs warm post pins ---- */
.sugg-dot-pip {
    display: block; width: 13px; height: 13px; border-radius: 50%;
    background: #5B8DEF; border: 2px solid #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,0.45); cursor: pointer; transition: transform 0.15s ease;
}
.sugg-dot-pip:hover { transform: scale(1.35); }

/* ---- Mobile: panels go full-screen "pages" with a Back to map button ---- */
@media (max-width: 600px) {
    .side-panel { width: 100%; }
    .side-panel-left, .side-panel-right { transform: translateX(0); opacity: 0; pointer-events: none; }
    .side-panel-left.is-open, .side-panel-right.is-open { opacity: 1; pointer-events: auto; }
    .side-panel-close-x { display: none; }
    .side-panel-close-map { display: inline; }
    .side-panel-close { top: 1rem; right: 1rem; padding: 0.5rem 0.7rem; }
    .edge-tab { writing-mode: horizontal-tb; top: auto; bottom: 0.75rem; transform: none; padding: 0.6rem 0.9rem; font-size: 0.66rem; }
    .edge-tab-left { left: 0.75rem; border-radius: var(--radius-md); border-left: 1px solid var(--border-default); border-bottom: 3px solid var(--accent-amber, #EF9F27); }
    .edge-tab-right { right: 0.75rem; border-radius: var(--radius-md); border-right: 1px solid var(--border-default); border-bottom: 3px solid #5B8DEF; }
    .edge-tab-stack-left { top: auto; bottom: 0.75rem; left: 0.75rem; transform: none; flex-direction: row; gap: 8px; }
    .edge-tab-photos { border-radius: var(--radius-md); border-left: 1px solid var(--border-default); border-bottom: 3px solid #3FA66A; }
    .panel-scrim { display: none; }
}

/* ============================================================
   MAP FIXES (iteration 3 cleanup)
   ============================================================ */
/* Readable traveler names: solid colored pill + bright bold text, legible on the light map */
.hagan-marker-live .live-pin-label {
    color: #fff !important;
    background: #D85A30 !important;            /* Keith = coral */
    border: 1.5px solid rgba(255,255,255,0.85) !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    text-shadow: none;
}
.hagan-marker-live-eamon .live-pin-label { background: #3E7E8F !important; }  /* Eamon = teal */
.hagan-marker-live-bess  .live-pin-label { background: #B0563F !important; }
.hagan-marker-live-maeve .live-pin-label { background: #6E5BAB !important; }

/* Restore the +/- zoom buttons on ALL devices (they were hidden on phones in iter 2) */
@media (max-width: 600px) {
    .leaflet-control-zoom { display: block !important; }
}
.leaflet-control-zoom a { width: 38px !important; height: 38px !important; line-height: 38px !important; font-size: 20px !important; }

/* Full-map night veil (replaces the partial terminator) */
.night-veil {
    position: absolute; inset: 0; z-index: 410; pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(10,16,40,0.0) 0%, rgba(8,12,30,0.30) 100%), rgba(10,16,40,0.26);
    opacity: 0; transition: opacity 2s ease;
}
.night-veil.is-night { opacity: 1; }

/* ============================================================
   ITERATION 4 — teardrop markers, recolored live pins, place modal,
   prominent phone back button, avatar gags
   ============================================================ */

/* ---- Map markers: 3D ring location pin (our places) + pushpin (suggestions) ---- */
.pin-wrap { position: relative; }

/* Location pin — hollow-ring teardrop with a dimensional fill (red stops, orange posts).
   The mask punches a real hole so the map shows through, like a Google pin. */
.map-pin {
    position: absolute; left: -13px; top: -32px;
    width: 26px; height: 26px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: radial-gradient(circle at 32% 28%, #ef6f60 0%, #d8392b 55%, #a82518 100%);
    border: 2px solid rgba(255,255,255,0.6);
    -webkit-mask: radial-gradient(circle at 50% 50%, transparent 0 5px, #000 5.7px 100%);
            mask: radial-gradient(circle at 50% 50%, transparent 0 5px, #000 5.7px 100%);
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.45));
}
.map-pin-red    { background: radial-gradient(circle at 32% 28%, #ef6f60 0%, #d8392b 55%, #a82518 100%); }
.map-pin-orange { background: radial-gradient(circle at 32% 28%, #ffb45e 0%, #ef7f1a 55%, #b85e0c 100%); }
.map-pin-red.is-faded { background: radial-gradient(circle at 32% 28%, #f3bbb2 0%, #e0a097 55%, #c2877e 100%); filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25)); }
.map-pin-red.is-here  { animation: pin-throb 1.9s ease-in-out infinite; }
@keyframes pin-throb {
    0%,100% { filter: drop-shadow(0 3px 4px rgba(0,0,0,0.45)) drop-shadow(0 0 2px rgba(211,58,44,0.95)); }
    50%     { filter: drop-shadow(0 3px 4px rgba(0,0,0,0.45)) drop-shadow(0 0 9px rgba(211,58,44,0.65)); }
}

/* Pushpin — a shaded sphere on a metal needle (suggestions). */
.map-pin-push {
    position: absolute; left: -9px; top: -34px;
    width: 18px; height: 18px; border-radius: 50%;
    background: radial-gradient(circle at 34% 30%, #9fc8ff 0%, #2E6FE0 55%, #154a9e 100%);
    box-shadow: inset -1px -1px 2px rgba(0,0,0,0.28);
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35));
}
.map-pin-push::before {   /* metal needle */
    content: ''; position: absolute; left: 50%; top: 88%;
    width: 3px; height: 18px; margin-left: -1.5px;
    background: linear-gradient(90deg, #9aa3ae 0%, #eef2f6 45%, #8e97a2 100%);
    border-radius: 0 0 1px 1px;
}
.map-pin-push::after {    /* tiny ground shadow at the tip */
    content: ''; position: absolute; left: 50%; top: calc(88% + 18px);
    width: 10px; height: 3px; margin-left: -5px;
    background: rgba(0,0,0,0.26); border-radius: 50%;
}

/* Always-visible name beside a stop */
.map-pin-name {
    position: absolute; left: 13px; top: -30px; white-space: nowrap;
    font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
    color: #fff; background: #D33A2C; padding: 2px 8px; border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.8); box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    pointer-events: none;
}
.map-pin-red.is-faded + .map-pin-name-red { background: #D9968D; }
.pin-kind-glyph { position: absolute; left: -8px; top: -27px; width: 16px; height: 16px; color: #fff; pointer-events: none; z-index: 2; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.35)); }
.pin-kind-glyph svg { width: 100%; height: 100%; display: block; }
.map-pin-red.is-faded ~ .pin-kind-glyph { opacity: 0.55; }

/* ---- Live pins recolored: Keith violet, Eamon green ---- */
.hagan-marker-live .live-pin-dot {
    background: #7C5CD6 !important;
    box-shadow: 0 0 0 8px rgba(124,92,214,0.30), 0 0 0 18px rgba(124,92,214,0.15), 0 0 0 28px rgba(124,92,214,0.05) !important;
}
.hagan-marker-live .live-pin-label { background: #7C5CD6 !important; }
.hagan-marker-live-eamon .live-pin-dot {
    background: #3FA66A !important;
    box-shadow: 0 0 0 8px rgba(63,166,106,0.30), 0 0 0 18px rgba(63,166,106,0.15), 0 0 0 28px rgba(63,166,106,0.05) !important;
}
.hagan-marker-live-eamon .live-pin-label { background: #3FA66A !important; }

/* ---- Place detail modal ---- */
.place-modal { position: absolute; inset: 0; z-index: 700; display: none; }
.place-modal.is-open { display: block; }
.place-modal-scrim { position: absolute; inset: 0; background: rgba(8,6,5,0.55); }
.place-modal-card {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: min(560px, 92vw); max-height: 88vh; max-height: 88dvh; overflow: hidden;
    background: #FBF8F2; color: #1c1814; border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,0.5);
    display: flex; flex-direction: column;
    animation: place-pop 0.32s cubic-bezier(0.22,0.61,0.36,1);
}
@keyframes place-pop { from { opacity: 0; transform: translate(-50%,-46%) scale(0.97); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
.place-modal-close {
    position: absolute; top: 0.9rem; right: 0.9rem; z-index: 2;
    background: rgba(255,255,255,0.92); border: 1px solid #d8cdba; border-radius: 8px;
    color: #6b5d4a; font-family: var(--font-mono); font-size: 0.74rem; padding: 0.45rem 0.65rem; cursor: pointer; min-height: 38px;
}
.place-modal-close:hover { border-color: #b06a3c; color: #b06a3c; }
.place-modal-close-map { display: none; }
.place-modal-body { overflow-y: auto; }
.place-photo { width: 100%; height: 240px; background-size: cover; background-position: center; background-color: #e9e1d3; }
.place-text { padding: 1.3rem 1.6rem 1.7rem; }
.place-kicker { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: #b06a3c; }
.place-title { font-family: var(--font-display, 'Fraunces', serif); font-weight: 500; font-size: 1.9rem; margin: 0.2rem 0 0.6rem; color: #1c1814; }
.place-extract { font-family: var(--font-body, 'EB Garamond', serif); font-size: 1.05rem; line-height: 1.55; color: #4a4133; margin: 0 0 0.8rem; }
.place-noentry { color: #9a8466; font-style: italic; }
.place-note { font-family: var(--font-body, serif); font-style: italic; color: #6b5d4a; border-left: 2px solid #e0b07c; padding-left: 0.8rem; margin: 0 0 0.8rem; }
.place-link { font-family: var(--font-mono); font-size: 0.78rem; color: #b06a3c; text-decoration: none; }
.place-link:hover { text-decoration: underline; }
.place-loading { padding: 2.5rem 1.6rem; font-family: var(--font-mono); font-size: 0.85rem; color: #9a8466; text-align: center; }

/* ---- Prominent phone "back to map" bars ---- */
@media (max-width: 600px) {
    .side-panel-head { position: sticky; top: 0; background: #FBF8F2; z-index: 3; }
    .side-panel-close {
        position: static; display: block; width: 100%; margin-top: 0.6rem;
        text-align: center; background: #1c1814; color: #FBF8F2; border: none;
        font-size: 0.9rem; padding: 0.7rem; min-height: 46px; border-radius: 8px;
    }
    .side-panel-close-x { display: none; }
    .side-panel-close-map { display: inline; font-weight: 600; }
    .place-modal-card { top: 0; left: 0; transform: none; width: 100%; height: 100%; max-height: 100vh; max-height: 100dvh; border-radius: 0; }
    @keyframes place-pop { from { opacity: 0; } to { opacity: 1; } }
    .place-modal-close { position: sticky; top: 0; left: 0; width: 100%; border-radius: 0; text-align: left; background: #1c1814; color: #FBF8F2; border: none; font-weight: 600; padding: 0.85rem 1rem; }
    .place-modal-close-map { display: inline; }
    .place-modal-close-x { display: none; }
}

/* ---- Avatar gags ---- */
.dancer { position: relative; display: block; transition: opacity 0.6s ease; }
.dancer.is-leaving { opacity: 0 !important; }
.dancer-fig { position: relative; display: block; transform-origin: bottom center; filter: drop-shadow(0 3px 5px rgba(0,0,0,0.4)); }
.av-head { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 92%; height: 72%; }
.av-head-face { background-size: contain; background-repeat: no-repeat; background-position: bottom center; }
.av-body { position: absolute; top: 64%; left: 50%; transform: translateX(-50%); width: 26%; height: 36%; overflow: visible; }
.av-body line { stroke: #1c1814; stroke-width: 2.8; stroke-linecap: round; fill: none; }
.gag-prop { position: absolute; pointer-events: none; }

/* bob (gentle default) */
.gag-bob .dancer-fig { animation: dancer-bob 1.6s ease-in-out infinite; }

/* jig (silly little dance in place) */
.gag-jig .dancer-fig { animation: gag-jig 0.5s ease-in-out infinite; }
@keyframes gag-jig { 0%,100% { transform: rotate(-7deg) translateY(0); } 50% { transform: rotate(7deg) translateY(-4px); } }

/* horse (gallops sideways with a bouncy gait) */
.gag-horse { animation: gag-gallop-move 3.4s ease-in-out infinite; }
.gag-horse .dancer-fig { animation: gag-gallop-bob 0.4s ease-in-out infinite; }
.gag-prop-horse {
    left: 50%; bottom: -2px; width: 34px; height: 16px; margin-left: -17px;
    background:
        linear-gradient(90deg, transparent 0 6px, #6b4a2a 6px 9px, transparent 9px) no-repeat, /* front leg */
        linear-gradient(90deg, transparent 0 24px, #6b4a2a 24px 27px, transparent 27px) no-repeat;
}
.gag-prop-horse::before { content: ''; position: absolute; left: 0; bottom: 6px; width: 30px; height: 5px; background: #7a5630; border-radius: 3px; }
.gag-prop-horse::after  { content: ''; position: absolute; left: 26px; bottom: 8px; width: 7px; height: 11px; background: #7a5630; border-radius: 3px 4px 2px 2px; transform: rotate(12deg); } /* head */
@keyframes gag-gallop-move { 0% { transform: translateX(-60px); } 50% { transform: translateX(60px); } 51% { transform: translateX(60px) scaleX(-1); } 100% { transform: translateX(-60px) scaleX(-1); } }
@keyframes gag-gallop-bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-5px) rotate(3deg); } }

/* helicopter (rotor spins, lifts and drifts) */
.gag-heli { animation: gag-heli-float 4s ease-in-out infinite; }
.gag-prop-heli { left: 50%; top: -10px; width: 46px; height: 4px; margin-left: -23px; background: #444; border-radius: 2px; transform-origin: center; animation: gag-rotor 0.12s linear infinite; }
.gag-prop-heli::after { content: ''; position: absolute; left: 50%; top: 4px; width: 2px; height: 12px; margin-left: -1px; background: #444; }
@keyframes gag-rotor { from { transform: scaleX(1); } 50% { transform: scaleX(0.15); } to { transform: scaleX(1); } }
@keyframes gag-heli-float { 0%,100% { transform: translate(0,0); } 25% { transform: translate(18px,-22px); } 50% { transform: translate(0,-30px); } 75% { transform: translate(-18px,-22px); } }

/* skateboard (rolls side to side on a little deck) */
.gag-skate { animation: gag-roll 2.7s ease-in-out infinite; }
.gag-skate .dancer-fig { animation: dancer-bob 1.6s ease-in-out infinite; }
.gag-prop-board { left: 50%; bottom: -1px; width: 64%; height: 5px; margin-left: -32%; background: #3a2f28; border-radius: 3px; }
.gag-prop-board::before, .gag-prop-board::after { content: ''; position: absolute; bottom: -4px; width: 6px; height: 6px; border-radius: 50%; background: #1c1814; }
.gag-prop-board::before { left: 14%; }
.gag-prop-board::after { right: 14%; }
@keyframes gag-roll { 0%,100% { transform: translateX(-14px); } 50% { transform: translateX(14px); } }

/* surfing (rides a board, tilting on the wave) */
.gag-surf .dancer-fig { animation: gag-surf 2s ease-in-out infinite; }
.gag-prop-surf { left: 50%; bottom: -3px; width: 74%; height: 8px; margin-left: -37%; background: #c98a3a; border-radius: 50%; }
@keyframes gag-surf { 0%,100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }

/* rope swing (pendulum from a rope anchored overhead) */
.gag-swing { animation: gag-swing 2.5s ease-in-out infinite; transform-origin: top center; }
.gag-prop-rope { left: 50%; top: -20px; width: 2px; height: 26px; margin-left: -1px; background: #6b5a3a; }
@keyframes gag-swing { 0%,100% { transform: rotate(-22deg); } 50% { transform: rotate(22deg); } }

/* soccer (taps a ball back and forth) */
.gag-soccer .dancer-fig { animation: dancer-bob 0.7s ease-in-out infinite; }
.gag-prop-ball { left: 50%; bottom: -2px; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: #fff; border: 2px solid #1c1814; animation: gag-soccer-ball 1.1s ease-in-out infinite; }
@keyframes gag-soccer-ball { 0%,100% { transform: translateX(-9px) rotate(0); } 50% { transform: translateX(11px) rotate(180deg); } }

/* jump rope (hops while a rope whirls) */
.gag-jumprope .dancer-fig { animation: gag-hop 0.5s ease-in-out infinite; }
.gag-prop-jumprope { left: 50%; bottom: 0; width: 132%; height: 92%; margin-left: -66%; border: 2px solid #6b5a3a; border-radius: 50%; border-top-color: transparent; animation: gag-rope-whirl 0.5s linear infinite; }
@keyframes gag-hop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes gag-rope-whirl { 0%,100% { transform: scaleX(1); } 50% { transform: scaleX(-1); } }

/* cartwheel (the whole figure rolls over) */
.gag-cartwheel { animation: gag-cartwheel 1.5s linear infinite; transform-origin: center; }
@keyframes gag-cartwheel { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* breakdance (floor spin) */
.gag-breakdance .dancer-fig { animation: gag-spin 1s linear infinite; transform-origin: center bottom; }
@keyframes gag-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* moonwalk (glides side to side with a lean) */
.gag-moonwalk { animation: gag-moonwalk 2.6s ease-in-out infinite; }
.gag-moonwalk .dancer-fig { animation: gag-lean 1.3s ease-in-out infinite; }
@keyframes gag-moonwalk { 0%,100% { transform: translateX(13px); } 50% { transform: translateX(-13px); } }
@keyframes gag-lean { 0%,100% { transform: skewX(-7deg); } 50% { transform: skewX(7deg); } }

@media (prefers-reduced-motion: reduce) {
    .gag-horse, .gag-heli, .gag-skate, .gag-swing, .gag-cartwheel, .gag-moonwalk,
    .gag-jig .dancer-fig, .gag-skate .dancer-fig, .gag-surf .dancer-fig,
    .gag-soccer .dancer-fig, .gag-jumprope .dancer-fig, .gag-breakdance .dancer-fig, .gag-moonwalk .dancer-fig,
    .gag-prop-heli, .gag-prop-ball, .gag-prop-jumprope { animation: none !important; }
}

/* flight tracker — plane marker rides the great-circle arc */
.flight-plane { background: none; border: none; }
.flight-plane svg { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }

/* ============================================================
   Header layout A — title left; clock readout + divider + nav on the right.
   Brightened for legibility over the light map.
   ============================================================ */
.site-nav-inner { align-items: center; }
.site-nav { background: rgba(16,13,11,0.94); border-bottom: 1px solid rgba(0,0,0,0.35); }
.site-nav-right { display: flex; align-items: center; gap: 16px; }
.nav-clock { background: none; border: none; padding: 0; box-shadow: none; }
.nav-clock .time-bar-inner {
    flex-direction: column; align-items: flex-end; gap: 1px;
    max-width: none; margin: 0; padding: 0; font-family: var(--font-mono);
}
.nav-clock-line { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.nav-clock-line1 { font-size: 14px; color: #FBF7EF; }            /* near-white, bright */
.nav-clock-line1 .time-bar-place { color: #FFB446; font-weight: 600; }  /* bright amber */
.nav-clock-line2 { font-size: 11.5px; color: rgba(251,247,239,0.78); }  /* readable, not faint */
.nav-clock-dot { opacity: 0.5; }
.nav-clock .time-bar-icon svg { width: 12px; height: 12px; vertical-align: middle; opacity: 0.85; }
.nav-clock-divider { width: 1px; height: 30px; background: rgba(251,247,239,0.28); }
.site-nav-menu { display: flex; gap: 16px; }
.site-nav-link { color: #FBF7EF; opacity: 0.82; text-decoration: none; font-family: var(--font-mono); font-size: 13px; transition: opacity 0.15s ease; }
.site-nav-link:hover { opacity: 1; }
.site-nav-link.is-current { opacity: 1; border-bottom: 1.5px solid #FFB446; padding-bottom: 1px; }

@media (max-width: 720px) {
    .nav-clock-line2 { display: none; }          /* phone: place + their time only */
    .site-nav-right { gap: 10px; }
    .nav-clock-divider { height: 22px; }
    .nav-clock-line1 { font-size: 12.5px; }
    .site-brand-name { font-size: 18px; }
}
@media (max-width: 460px) {
    .site-nav-menu { gap: 10px; }
    .nav-clock { display: none; }                /* very narrow: protect the title + nav */
}

/* search-only suggest hint */
.sugg-hint { font-family: var(--font-mono); font-size: 0.68rem; color: #9a8466; margin: 0.1rem 0 0; line-height: 1.4; }

/* ============================================================
   Pass 2 — private linger panel, comments, toast
   ============================================================ */
/* Discreet private launcher (bottom-left, above the trail control) */
.linger-launch {
    position: fixed; left: 14px; bottom: 92px; z-index: 615;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(20,17,15,0.9); color: var(--text-tertiary);
    border: 1px solid var(--border-default); cursor: pointer;
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
    backdrop-filter: blur(6px);
}
.linger-launch:hover { color: var(--accent-amber); border-color: var(--accent-amber); }

.linger-overlay { position: fixed; inset: 0; z-index: 720; display: none; background: rgba(8,6,5,0.55); }
.linger-overlay.is-open { display: flex; align-items: center; justify-content: center; }
.linger-gate-card, .linger-panel-card {
    background: #FBF8F2; color: #1c1814; border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,0.5);
    position: relative; width: min(460px, 92vw);
}
.linger-gate-card { padding: 1.6rem 1.6rem 1.4rem; text-align: center; }
.linger-panel-card { max-height: 86vh; max-height: 86dvh; display: flex; flex-direction: column; overflow: hidden; }
.linger-close { position: absolute; top: 0.8rem; right: 0.9rem; background: none; border: none; font-size: 1.5rem; color: #9a8466; cursor: pointer; line-height: 1; }
.linger-h { font-family: var(--font-display, serif); font-size: 1.4rem; margin: 0 0 0.2rem; }
.linger-sub { font-family: var(--font-mono); font-size: 0.78rem; color: #9a8466; margin: 0 0 0.9rem; }
.linger-code { width: 9rem; text-align: center; font-size: 1.4rem; letter-spacing: 0.3em; padding: 0.5rem; border: 1px solid #d8cdba; border-radius: 8px; background: #fff; color: #1c1814; margin-bottom: 0.8rem; }
.linger-err { font-family: var(--font-mono); font-size: 0.74rem; color: #c0573c; min-height: 1em; margin: 0.5rem 0 0; }
.linger-panel-head { display: flex; align-items: baseline; gap: 0.6rem; padding: 1.2rem 1.5rem 0.5rem; border-bottom: 1px solid #e9e1d3; }
.linger-who { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: #b06a3c; }
.linger-panel-title { font-family: var(--font-display, serif); font-size: 1.35rem; }
.linger-help { font-family: var(--font-body, serif); font-size: 0.92rem; color: #6b5d4a; padding: 0.6rem 1.5rem 0; margin: 0; }
.linger-list { overflow-y: auto; padding: 0.8rem 1.3rem 1.6rem; }
.linger-empty { font-family: var(--font-mono); font-size: 0.8rem; color: #9a8466; padding: 1rem 0; }
.linger-bucket-h { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; color: #b06a3c; margin: 1rem 0 0.5rem; }
.linger-card { background: #fff; border: 1px solid #ece4d6; border-radius: 10px; padding: 0.8rem 0.9rem; margin-bottom: 0.7rem; }
.linger-card.is-known { opacity: 0.72; }
.linger-name { display: block; font-family: var(--font-display, serif); font-size: 1.1rem; }
.linger-meta { display: block; font-family: var(--font-mono); font-size: 0.68rem; color: #9a8466; margin: 0.1rem 0 0.35rem; }
.linger-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.64rem; padding: 2px 7px; border-radius: 5px; background: #f0ebe0; color: #8a7d6a; }
.linger-tag-new { background: rgba(239,127,26,0.15); color: #b85e0c; }
.linger-actions { display: flex; gap: 0.4rem; margin-top: 0.6rem; flex-wrap: wrap; }
.linger-act { font-family: var(--font-mono); font-size: 0.7rem; padding: 0.35rem 0.6rem; border: 1px solid #d8cdba; background: #fff; color: #6b5d4a; border-radius: 6px; cursor: pointer; min-height: 36px; }
.linger-act-primary { background: #1c1814; color: #FBF8F2; border-color: #1c1814; }
.linger-act:hover { border-color: #b06a3c; color: #b06a3c; }
.linger-act-primary:hover { color: #fff; opacity: 0.92; }

/* Panel tabs (Lingers / Avatar / Post) */
.linger-tabs { display: flex; gap: 4px; padding: 0 1.2rem; border-bottom: 1px solid #e9e1d3; flex: none; }
.linger-tab { flex: 1; background: none; border: none; border-bottom: 2px solid transparent; color: #9a8466; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.6rem 0.25rem; cursor: pointer; min-height: 42px; }
.linger-tab.is-active { color: #1c1814; border-bottom-color: #b06a3c; }
.linger-pane { display: none; }
.linger-pane.is-active { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.linger-pane .linger-list { overflow: visible; }
.linger-pane[data-pane="avatar"], .linger-pane[data-pane="post"] { padding-bottom: 1.4rem; }

/* Avatar tab reuses the gate cropper, recolored for the light panel */
.lp-photo-area { padding: 0 1.5rem; }
.linger-pane .gate-photo-hint, .linger-pane .gate-cut-status { color: #6b5d4a; font-family: var(--font-body, serif); font-size: 0.85rem; margin: 0.4rem 0; }
.linger-pane .gate-photo-buttons { display: flex; gap: 0.5rem; justify-content: center; margin: 0.6rem 0; }
.linger-pane .gate-photo-btn { background: #fff; border: 1px solid #d8cdba; color: #6b5d4a; border-radius: 6px; padding: 0.45rem 0.8rem; font-family: var(--font-mono); font-size: 0.72rem; cursor: pointer; min-height: 38px; }
.linger-pane .gate-crop-controls { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 0.5rem 0; flex-wrap: wrap; }
.linger-pane .gate-check, .linger-pane .gate-slider { font-family: var(--font-mono); font-size: 0.72rem; color: #6b5d4a; }
.linger-pane .gate-slider { display: block; margin: 0.5rem 0; }
.linger-pane .gate-shape-seg { display: flex; gap: 0.4rem; }
.linger-pane .gate-shape { background: #fff; border: 1px solid #d8cdba; color: #6b5d4a; border-radius: 6px; padding: 0.35rem 0.7rem; font-family: var(--font-mono); font-size: 0.7rem; cursor: pointer; min-height: 34px; }
.linger-pane .gate-shape.active { background: #1c1814; color: #FBF8F2; border-color: #1c1814; }
.linger-pane .gate-crop-wrap { text-align: center; }
.linger-pane #lp-crop { max-width: 100%; border: 1px solid #e0d6c4; border-radius: 8px; background: #fff; touch-action: none; }
.linger-pane #lp-prev { display: block; margin: 0.6rem auto 0; }
.lp-save { margin: 0.9rem 1.5rem 0; width: calc(100% - 3rem); }
.lp-postbtn { margin: 0.4rem 1.5rem 0; }
.lp-post-note { font-family: var(--font-mono); font-size: 0.72rem; color: #9a8466; padding: 0.5rem 1.5rem 0; margin: 0; }

/* Comments (post page + stop modal) */
.hl-comments { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid #e9e1d3; }
.post-comments-section { max-width: 720px; margin: 2rem auto 4rem; padding: 0 28px; }
.hl-comments-title { font-family: var(--font-display, serif); font-size: 1.2rem; margin: 0 0 0.7rem; }
.hl-comment { padding: 0.6rem 0; border-bottom: 1px solid #f0ebe0; position: relative; }
.hl-comment-by { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; color: #b06a3c; }
.hl-comment-when { font-family: var(--font-mono); font-size: 0.66rem; color: #b8a98f; margin-left: 0.5rem; }
.hl-comment-text { font-family: var(--font-body, serif); font-size: 0.98rem; color: #3a3026; margin: 0.2rem 0 0; }
.hl-comment-del { position: absolute; top: 0.6rem; right: 0; background: none; border: none; font-family: var(--font-mono); font-size: 0.66rem; color: #c0573c; cursor: pointer; }
.hl-comment-empty { font-family: var(--font-mono); font-size: 0.78rem; color: #9a8466; }
.hl-comment-form { margin-top: 0.9rem; }
.hl-comment-input { width: 100%; box-sizing: border-box; border: 1px solid #d8cdba; border-radius: 8px; padding: 0.5rem; font-family: var(--font-body, serif); font-size: 0.95rem; background: #fff; color: #1c1814; resize: vertical; }
.hl-comment-as { font-family: var(--font-mono); font-size: 0.66rem; color: #9a8466; margin-left: 0.6rem; }
.hl-comment-err { font-family: var(--font-mono); font-size: 0.72rem; color: #c0573c; margin: 0.3rem 0 0; }

/* on the post page (dark theme) the comments sit on the page bg, lighten text */
.post-comments-section .hl-comments-title { color: var(--text-primary); }
.post-comments-section .hl-comment-text { color: var(--text-secondary); }
.post-comments-section .hl-comment-input { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-default); }
.post-comments-section .hl-comments { border-top-color: var(--border-subtle); }
.post-comments-section .hl-comment { border-bottom-color: var(--border-subtle); }

/* Toast */
.hl-toast {
    position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 900;
    background: #1c1814; color: #FBF8F2; padding: 0.7rem 1.1rem; border-radius: 10px;
    font-family: var(--font-mono); font-size: 0.8rem; box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    opacity: 0; transition: opacity 0.35s ease, transform 0.35s ease; pointer-events: none; max-width: 86vw;
}
.hl-toast.is-in { opacity: 1; transform: translate(-50%, 0); }

/* estimated (lost-tracking) trail leg */
.live-trail-estimated { opacity: 0.5; }

@media (max-width: 600px) {
    .linger-launch { bottom: 80px; left: 10px; }
    .linger-panel-card, .linger-gate-card { width: 100%; height: 100%; max-height: 100dvh; border-radius: 0; }
    .linger-overlay.is-open { align-items: stretch; }
    .linger-panel-card { }
}

/* Check-in control in the stop modal */
.place-checkin { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid #e9e1d3; }
.place-checkin-btn {
    font-family: var(--font-mono); font-size: 0.8rem; padding: 0.5rem 0.9rem; min-height: 40px;
    background: #1c1814; color: #FBF8F2; border: 1px solid #1c1814; border-radius: 8px; cursor: pointer;
}
.place-checkin-btn.is-checked { background: #fff; color: #b06a3c; border-color: #d8cdba; }
.place-checkin-btn:hover { opacity: 0.92; }
.place-checkin-note { display: block; font-family: var(--font-mono); font-size: 0.66rem; color: #9a8466; margin-top: 0.35rem; }
.place-checkin-code { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.6rem; flex-wrap: wrap; }
.place-checkin-code .linger-code { font-size: 1rem; letter-spacing: 0.2em; width: 6rem; margin: 0; }
.place-checkin-err { font-family: var(--font-mono); font-size: 0.7rem; color: #c0573c; }

/* Google Places result rows — name + street address */
.sugg-result { display: block; width: 100%; text-align: left; }
.sugg-result-name { display: block; font-family: var(--font-body, 'EB Garamond', serif); font-size: 0.95rem; font-weight: 600; color: #1c1814; line-height: 1.25; }
.sugg-result-addr { display: block; font-family: var(--font-mono); font-size: 0.68rem; color: #9a8466; margin-top: 2px; line-height: 1.3; }

/* ===== Batch 1 additions ===== */

/* #1 — "Where are they?" status card (floats over the map, below center) */
.where-card {
    position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(10px);
    z-index: 680; background: rgba(252,248,242,0.97); border: 1px solid #e3d9c8; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18); padding: 12px 18px; min-width: 210px;
    max-width: min(86vw, 360px); text-align: center; opacity: 0; pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease; font-family: var(--font-mono);
}
.where-card.is-on { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.where-card-x { position: absolute; top: 4px; right: 9px; background: none; border: none; font-size: 19px; line-height: 1; color: #b3a690; cursor: pointer; }
.where-card-place { font-family: var(--font-display, 'Fraunces', serif); font-size: 1.15rem; color: #1c1814; margin-bottom: 2px; }
.where-card-dwell { font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: #9a8466; margin-bottom: 6px; }
.where-card-time { font-size: 0.82rem; color: #3a332a; }
.where-card-time strong { color: #b06a3c; }
@media (max-width: 600px) { .where-card { bottom: 16px; } }

/* #2 — keep the +/- zoom buttons clear of the header on phones */
@media (max-width: 720px) { .leaflet-top.leaflet-left { top: 72px; } }

/* #4 — cap the search results so they never bury the note form */
#sugg-results { max-height: 42vh; overflow-y: auto; }

/* #3 — a bigger, more inviting photo step in the intro */
.gate-photo-toggle {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
    padding: 14px 16px; margin: 6px 0 2px; border: 1.5px dashed #c9bba2; border-radius: 12px;
    background: rgba(255,255,255,0.5); cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease;
}
.gate-photo-toggle:hover { border-color: #EF9F27; background: rgba(255,255,255,0.8); }
.gate-photo-toggle-icon { font-size: 1.6rem; line-height: 1; color: #b06a3c; width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; border: 1.5px solid #d8cdba; border-radius: 50%; }
.gate-photo-toggle-text { display: flex; flex-direction: column; gap: 2px; }
.gate-photo-toggle-text strong { font-family: var(--font-display, 'Fraunces', serif); font-size: 1.02rem; color: #1c1814; font-weight: 600; }
.gate-photo-toggle-text small { font-family: var(--font-mono); font-size: 0.68rem; color: #9a8466; }
.gate-photo-buttons { display: flex; gap: 10px; margin: 4px 0 10px; }
.gate-photo-btn { flex: 1; padding: 10px; min-height: 44px; border: 1px solid #1c1814; background: #1c1814; color: #FBF8F2; border-radius: 9px; font-family: var(--font-mono); font-size: 0.8rem; cursor: pointer; }
.gate-photo-btn:hover { opacity: 0.92; }
#gate-pick-cam { background: #fff; color: #1c1814; }

/* Pull-to-refresh indicator on the panels */
.ptr-ind { height: 0; opacity: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.03em; color: #9a8466; transition: height 0.2s ease, opacity 0.2s ease; }

/* ===== Photos page ===== */
.photos-page { max-width: 1100px; margin: 0 auto; padding: 2rem 1.2rem 4rem; }
.photos-page-head { text-align: center; margin-bottom: 1.6rem; }
.photos-page-title { font-family: var(--font-display, 'Fraunces', serif); font-size: 2rem; color: #1c1814; margin: 0 0 0.4rem; }
.photos-page-intro { font-family: var(--font-body, 'EB Garamond', serif); color: #5a4f40; }
.photo-gallery { display: block; }
.photo-cell { aspect-ratio: 1 / 1; border: none; padding: 0; cursor: pointer; background-size: cover; background-position: center; background-color: #ece4d6; border-radius: 4px; transition: transform 0.15s ease, box-shadow 0.15s ease; position: relative; }
.photo-cell:hover { transform: scale(1.015); box-shadow: 0 6px 16px rgba(0,0,0,0.16); }
.photos-empty { grid-column: 1 / -1; text-align: center; font-family: var(--font-mono); font-size: 0.85rem; color: #9a8466; padding: 2.5rem 0; }
.photo-lightbox { position: fixed; inset: 0; z-index: 4000; background: rgba(18,15,12,0.92); display: none; align-items: center; justify-content: center; flex-direction: column; gap: 14px; padding: 24px; }
.photo-lightbox.is-on { display: flex; }
.photo-lightbox img { max-width: 94vw; max-height: 80vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.photo-lightbox-x { position: absolute; top: 16px; right: 20px; background: none; border: none; color: #FBF8F2; font-size: 30px; line-height: 1; cursor: pointer; }
.photo-lightbox-link { font-family: var(--font-mono); font-size: 0.8rem; color: #FFB446; text-decoration: none; }
.photo-lightbox-link:hover { text-decoration: underline; }

/* standalone photo/video media */
.media-pin-wrap { background: none; border: none; }
.media-pin { display: block; width: 44px; height: 44px; border-radius: 8px; background-size: cover; background-position: center; border: 2px solid #FBF8F2; box-shadow: 0 3px 8px rgba(0,0,0,0.4); position: relative; }
.media-badge-video { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; background: #14110F; color: #FBF8F2; font-size: 9px; line-height: 18px; text-align: center; border: 1px solid #FBF8F2; }
.photo-cell.is-video { position: relative; }
.photo-cell-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 34px; height: 34px; border-radius: 50%; background: rgba(20,17,15,0.62); color: #fff; font-size: 14px; line-height: 34px; text-align: center; pointer-events: none; }
.photo-lightbox-media { max-width: 94vw; max-height: 76vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); background: #000; }
.photo-lightbox-cap { font-family: var(--font-serif, Georgia, serif); color: #F2EBDD; font-size: 0.98rem; max-width: 640px; text-align: center; margin: 0; }
.photo-lightbox-comments { width: min(640px, 92vw); max-height: 30vh; overflow-y: auto; background: rgba(255,255,255,0.04); border-radius: 10px; padding: 10px 12px; }
@media (max-width: 600px) { .gal-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 4px; } }

/* Photos page: per-day grouping + select/download */
.gal-bar { position: sticky; top: 0; z-index: 5; display: flex; gap: 0.6rem; align-items: center; justify-content: flex-end; padding: 0.5rem 0; margin-bottom: 0.4rem; background: linear-gradient(to bottom, rgba(247,242,233,0.97), rgba(247,242,233,0.0)); }
.gal-selall, .gal-day-pick { font-family: var(--font-mono); font-size: 0.78rem; color: #5a4f40; background: rgba(28,24,20,0.06); border: 1px solid rgba(28,24,20,0.12); border-radius: 999px; padding: 0.3rem 0.8rem; cursor: pointer; }
.gal-selall:hover, .gal-day-pick:hover { background: rgba(28,24,20,0.12); }
.gal-dl { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600; color: #fff; background: #EF9F27; border: none; border-radius: 999px; padding: 0.36rem 1rem; cursor: pointer; }
.gal-dl[disabled] { opacity: 0.4; cursor: default; }
.gal-day { margin-bottom: 1.6rem; }
.gal-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 0.5rem; padding-bottom: 0.3rem; border-bottom: 1px solid rgba(28,24,20,0.1); }
.gal-day-title { font-family: var(--font-display, 'Fraunces', serif); font-size: 1.05rem; color: #1c1814; margin: 0; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.photo-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(20,17,15,0.45); border: 2px solid rgba(255,255,255,0.92); cursor: pointer; transition: background 0.12s ease; }
.photo-check:hover { background: rgba(20,17,15,0.7); }
.photo-cell.is-sel { outline: 3px solid #EF9F27; outline-offset: -3px; }
.photo-cell.is-sel .photo-check { background: #EF9F27; border-color: #fff; }
