@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;500;600&display=swap');

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

body {
    font-family: 'Inter', sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    overflow: hidden;
    height: 100vh;
    display: flex;
}

/* ── Film Countdown ── */
#film-countdown {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #0d0d0d;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
    overflow: hidden;
}

#film-countdown.done {
    opacity: 0;
    pointer-events: none;
}

/* Film strip perforations along edges */
.film-perf-strip {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 36px;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}
.film-perf-strip.left { left: 0; }
.film-perf-strip.right { right: 0; }

.film-perf-strip::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 10px;
    width: 16px;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 10px,
        rgba(212, 175, 55, 0.15) 10px,
        rgba(212, 175, 55, 0.15) 12px,
        transparent 12px,
        transparent 14px,
        rgba(40, 35, 20, 0.8) 14px,
        rgba(40, 35, 20, 0.8) 28px,
        transparent 28px,
        transparent 30px,
        rgba(212, 175, 55, 0.15) 30px,
        rgba(212, 175, 55, 0.15) 32px,
        transparent 32px,
        transparent 42px
    );
    border-radius: 1px;
}

.countdown-frame {
    position: relative;
    width: 260px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Concentric guide circles (classic film leader) */
.guide-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.guide-circle-outer {
    width: 240px;
    height: 240px;
}

.guide-circle-mid {
    width: 180px;
    height: 180px;
    border-style: dashed;
    border-color: rgba(212, 175, 55, 0.08);
}

/* Crosshair lines */
.countdown-cross {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.cross-h, .cross-v {
    position: absolute;
    background: rgba(212, 175, 55, 0.12);
}

.cross-h {
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
}

.cross-v {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
}

/* Sweeping ring SVG */
.countdown-ring {
    position: absolute;
    width: 160px;
    height: 160px;
    transform: rotate(-90deg);
    z-index: 2;
}

.countdown-ring-progress {
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.5));
}

/* Number */
.countdown-number {
    position: relative;
    z-index: 3;
    font-family: 'Playfair Display', serif;
    font-size: 72px;
    font-weight: 900;
    color: #d4af37;
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.5), 0 0 80px rgba(212, 175, 55, 0.2);
    animation: countPulse 0.8s ease-out;
}

@keyframes countPulse {
    0% { transform: scale(1.4); opacity: 0.5; }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

/* Corner registration marks */
.reg-mark {
    position: absolute;
    width: 18px;
    height: 18px;
    z-index: 1;
}

.reg-mark::before, .reg-mark::after {
    content: '';
    position: absolute;
    background: rgba(212, 175, 55, 0.2);
}

.reg-mark::before {
    width: 18px;
    height: 1px;
    top: 0;
    left: 0;
}

.reg-mark::after {
    width: 1px;
    height: 18px;
    top: 0;
    left: 0;
}

.reg-mark.tl { top: 8px; left: 8px; }
.reg-mark.tr { top: 8px; right: 8px; transform: scaleX(-1); }
.reg-mark.bl { bottom: 8px; left: 8px; transform: scaleY(-1); }
.reg-mark.br { bottom: 8px; right: 8px; transform: scale(-1); }

/* Film grain overlay */
.countdown-grain {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Projector flicker */
.countdown-flicker {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.03);
    pointer-events: none;
    animation: projectorFlicker 0.15s infinite alternate;
}

@keyframes projectorFlicker {
    0% { opacity: 1; }
    25% { opacity: 0; }
    50% { opacity: 0.7; }
    75% { opacity: 0; }
    100% { opacity: 1; }
}

/* ── Intro Overlay ── */
#intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: radial-gradient(ellipse at center, #1a1410 0%, #0a0a0a 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#intro-overlay.intro-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#intro-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Typewriter tagline */
.intro-tagline {
    min-height: 1.5em;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: rgba(255, 255, 255, 0.6);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBlink 0.6s step-end infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.intro-content {
    text-align: center;
    animation: introFadeIn 1.2s ease-out;
}

@keyframes introFadeIn {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.intro-logo {
    width: 280px;
    max-width: 70vw;
    height: auto;
    object-fit: contain;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 30px rgba(212, 175, 55, 0.3));
}

.intro-tagline {
    font-size: 15px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 36px;
}

.intro-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.intro-btn {
    width: 260px;
    padding: 14px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 6px;
}

.intro-btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #b8962e 100%);
    border: none;
    color: #0a0a0a;
}

.intro-btn-primary:hover {
    background: linear-gradient(135deg, #e0c050 0%, #d4af37 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.35);
}

.intro-btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.7);
}

.intro-btn-secondary:hover {
    border-color: rgba(212, 175, 55, 0.5);
    color: #d4af37;
}

/* ── Sidebar ── */
#sidebar {
    width: 380px;
    height: 100vh;
    background: linear-gradient(180deg, #0d0d0d 0%, #141414 100%);
    border-right: 1px solid rgba(212, 175, 55, 0.12);
    display: flex;
    flex-direction: column;
    z-index: 10;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.brand h1 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: #d4af37;
    letter-spacing: 4px;
}

.subtitle {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.5);
}

/* ── Search ── */
.search-section {
    padding: 12px 24px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.search-box:focus-within {
    border-color: rgba(212, 175, 55, 0.3);
}

.search-icon { color: rgba(255, 255, 255, 0.3); flex-shrink: 0; }

#search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #e0e0e0;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    outline: none;
}

#search-input::placeholder { color: rgba(255, 255, 255, 0.25); }

/* ── Filter Tabs ── */
.filter-tabs {
    display: flex;
    gap: 4px;
    padding: 0 24px 12px;
}

.filter-tab {
    flex: 1;
    padding: 7px 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab:hover {
    background: rgba(212, 175, 55, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.filter-tab.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
    color: #d4af37;
}

/* ── Tour Selector ── */
.tour-section {
    padding: 0 24px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}


/* ── Sort & Year Controls ── */
.controls-row {
    display: flex;
    gap: 10px;
    padding: 10px 24px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.control-group {
    flex: 1;
    min-width: 0;
}

.control-group label {
    display: block;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 5px;
}

.control-group select {
    width: 100%;
    padding: 8px 28px 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 6px;
    color: #e0e0e0;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23d4af37' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color 0.2s;
}

.control-group select:hover, .control-group select:focus {
    border-color: rgba(212, 175, 55, 0.4);
    outline: none;
}

.control-group select option {
    background: #1a1a1a;
    color: #e0e0e0;
}

/* ── Location List ── */
#location-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

#location-list::-webkit-scrollbar { width: 3px; }
#location-list::-webkit-scrollbar-track { background: transparent; }
#location-list::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.2); border-radius: 2px; }

.location-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 24px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.2s;
}

.location-card:hover { background: rgba(212, 175, 55, 0.05); }

.location-card.active {
    background: rgba(212, 175, 55, 0.08);
    border-left: 3px solid #d4af37;
    padding-left: 21px;
}

.card-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.card-number.tour-stop {
    background: #d4af37;
    color: #0a0a0a;
    border-color: #d4af37;
}

.card-info { flex: 1; min-width: 0; }

.card-production {
    font-size: 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #d4af37;
    margin-bottom: 3px;
    font-weight: 500;
}

.card-name {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    color: #ffffff;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-address {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
}

.card-category {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    font-size: 9px;
    letter-spacing: 0.5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.35);
}

.sidebar-footer {
    padding: 12px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-footer p {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
}

/* ── Map ── */
#map { flex: 1; height: 100vh; }

/* ── Tour Bar ── */
#tour-bar {
    position: fixed;
    bottom: 0;
    left: 380px;
    right: 0;
    z-index: 15;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#tour-bar.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.tour-bar-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    background: rgba(13, 13, 13, 0.95);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(16px);
}

.tour-bar-name {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    color: #d4af37;
}

.tour-bar-type {
    font-size: 11px;
    padding: 3px 10px;
    background: rgba(212, 175, 55, 0.12);
    border-radius: 4px;
    color: rgba(212, 175, 55, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tour-bar-stops {
    flex: 1;
    display: flex;
    gap: 6px;
    overflow-x: auto;
}

.tour-stop-pip {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.tour-stop-pip:hover, .tour-stop-pip.active {
    background: #d4af37;
    color: #0a0a0a;
}

.tour-bar-nav {
    display: flex;
    gap: 4px;
}

#tour-prev, #tour-next {
    padding: 8px 14px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    color: #d4af37;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

#tour-prev:hover, #tour-next:hover {
    background: #d4af37;
    color: #0a0a0a;
}

#tour-prev:disabled, #tour-next:disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

#tour-bar-close {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

#tour-bar-close:hover {
    background: rgba(255, 80, 80, 0.15);
    border-color: rgba(255, 80, 80, 0.3);
    color: #ff6b6b;
}

/* ── Custom Film Markers ── */
.film-marker {
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: transform 0.25s ease;
    position: relative;
}

.film-marker:hover { transform: scale(1.2); }

.film-marker svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
}

.marker-pulse-ring {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.3);
    top: 0;
    left: 0;
    animation: pulseRing 2.5s ease-out infinite;
}

@keyframes pulseRing {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* Tour numbered markers */
.tour-marker {
    width: 34px;
    height: 34px;
    cursor: pointer;
    position: relative;
    transition: transform 0.25s ease;
}

.tour-marker:hover { transform: scale(1.2); }

.tour-marker-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37 0%, #b8962e 100%);
    border: 2.5px solid #fff;
    color: #0a0a0a;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.5), 0 2px 8px rgba(0,0,0,0.4);
}

@keyframes markerDrop {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}

/* Ensure Mapbox marker wrapper doesn't collapse */
.mapboxgl-marker { overflow: visible !important; }

/* ── Mapbox Popup ── */
.mapboxgl-popup { max-width: 380px !important; z-index: 5; }

.mapboxgl-popup-content {
    background: #111111 !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    border-radius: 14px !important;
    padding: 0 !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7) !important;
    overflow: hidden;
}

.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
    align-self: center;
    border-left: none !important;
    border-right-color: #000000 !important;
}

.mapboxgl-popup-close-button {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 20px !important;
    right: 10px !important;
    top: 10px !important;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

.mapboxgl-popup-close-button:hover { color: #d4af37 !important; }

.popup-content { width: 360px; }

.popup-image-wrap {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.popup-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.popup-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, #111111 0%, transparent 100%);
}

.popup-body { padding: 0 22px 22px; margin-top: -24px; position: relative; }

.popup-production {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #d4af37;
    margin-bottom: 6px;
    font-weight: 600;
}

.popup-name {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1.2;
}

.popup-address {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 14px;
}

.popup-description {
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 18px;
}

.popup-cta {
    display: block;
    text-align: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #d4af37 0%, #b8962e 100%);
    color: #0a0a0a;
    text-decoration: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all 0.25s;
}

.popup-cta:hover {
    background: linear-gradient(135deg, #e0c050 0%, #d4af37 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.popup-actions {
    display: flex;
    gap: 8px;
}

.popup-actions .popup-cta {
    flex: 1;
    padding: 11px 12px;
    font-size: 10px;
    letter-spacing: 1px;
}

.popup-navigate {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%) !important;
    color: #1a1a1a !important;
}

.popup-navigate:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%) !important;
}

.popup-navigate svg {
    flex-shrink: 0;
}

/* ── Sidebar Toggle ── */
#sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 20;
    width: 44px;
    height: 44px;
    background: rgba(13, 13, 13, 0.92);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 10px;
    color: #d4af37;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

/* ── No Results ── */
.no-results {
    padding: 40px 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.25);
    font-size: 13px;
}

/* ── Loading ── */
.loading {
    padding: 40px 24px;
    text-align: center;
    color: rgba(212, 175, 55, 0.5);
    font-size: 13px;
}

/* ── Cinematic Overlay (Grain + Vignette) ── */
#cinematic-overlay {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 60% 50%, transparent 40%, rgba(0,0,0,0.5) 100%);
}


/* ── Tour Title Card ── */
#tour-title-card {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    transition: opacity 0.8s ease, visibility 0.8s ease;
    pointer-events: none;
}

#tour-title-card.hidden {
    opacity: 0;
    visibility: hidden;
}

.tour-title-content {
    text-align: center;
    animation: titleReveal 0.8s ease-out;
}

@keyframes titleReveal {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.tour-title-label {
    font-size: 11px;
    letter-spacing: 6px;
    color: rgba(212, 175, 55, 0.6);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.tour-title-name {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 900;
    color: #d4af37;
    letter-spacing: 4px;
    margin: 0 0 16px;
}

.tour-title-meta {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.tour-title-divider {
    margin: 0 12px;
    color: rgba(212, 175, 55, 0.4);
}

/* ── Spotlight Beam ── */
#spotlight-beam {
    position: absolute;
    top: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.6s ease;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.28) 0%,
        rgba(255, 255, 255, 0.16) 20%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 80%,
        transparent 100%
    );
}

#spotlight-beam.visible {
    opacity: 1;
}

#spotlight-beam::after {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    border-radius: 50%;
}

/* ── Ken Burns Effect on Popup Images ── */
.popup-image {
    animation: kenBurns 20s ease-in-out infinite alternate;
    transform-origin: 30% 30%;
}

@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.15) translate(-2%, -1%); }
}

/* ── Sidebar Action Buttons ── */
.tour-section-buttons {
    display: flex;
    gap: 8px;
}

.explore-tours-btn, .explore-nearby-btn {
    flex: 1;
    padding: 11px 12px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.08) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: #d4af37;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.explore-tours-btn:hover, .explore-nearby-btn:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0.15) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
}

.explore-nearby-btn svg { flex-shrink: 0; }

/* ── Shared Dialog Styles ── */
.dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(5, 5, 5, 0.88);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.dialog-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.dialog-box {
    width: 90%;
    max-width: 960px;
    max-height: 80vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #141414 0%, #0d0d0d 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 32px;
    animation: dialogReveal 0.4s ease-out;
}

.dialog-box-wide { max-width: 1100px; }

.dialog-box::-webkit-scrollbar { width: 4px; }
.dialog-box::-webkit-scrollbar-track { background: transparent; }
.dialog-box::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.2); border-radius: 2px; }

@keyframes dialogReveal {
    0% { opacity: 0; transform: scale(0.95) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.dialog-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    color: #d4af37;
    letter-spacing: 2px;
}

.dialog-close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.5);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.dialog-close:hover {
    background: rgba(255, 80, 80, 0.15);
    border-color: rgba(255, 80, 80, 0.3);
    color: #ff6b6b;
}

/* ── Dialog Filter Tabs ── */
.dialog-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}

.dialog-filter-tab {
    padding: 7px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.45);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.dialog-filter-tab:hover {
    background: rgba(212, 175, 55, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.dialog-filter-tab.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
    color: #d4af37;
}

/* ── Tour Dialog Grid ── */
.tour-dialog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.tour-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.tour-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #b8962e);
    opacity: 0;
    transition: opacity 0.25s;
}

.tour-card:hover {
    background: rgba(212, 175, 55, 0.06);
    border-color: rgba(212, 175, 55, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.tour-card:hover::before {
    opacity: 1;
}

.tour-card-type {
    display: inline-block;
    padding: 3px 10px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 12px;
}

.tour-card-type.driving {
    background: rgba(100, 149, 237, 0.15);
    color: #6495ed;
}

.tour-card-type.walking {
    background: rgba(80, 200, 120, 0.15);
    color: #50c878;
}

.tour-card-name {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.tour-card-desc {
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 14px;
}

.tour-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
}

.tour-card-stops {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tour-card-stops svg {
    opacity: 0.5;
}

.tour-card-cta {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #d4af37;
    opacity: 0;
    transition: opacity 0.25s;
}

.tour-card:hover .tour-card-cta {
    opacity: 1;
}

/* ── Nearby Dialog Grid & Cards ── */
.nearby-dialog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.nearby-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s;
}

.nearby-card:hover {
    background: rgba(212, 175, 55, 0.04);
    border-color: rgba(212, 175, 55, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.nearby-card-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.nearby-card-body {
    padding: 16px;
}

.nearby-card-production {
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #d4af37;
    font-weight: 600;
    margin-bottom: 4px;
}

.nearby-card-name {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1.3;
}

.nearby-card-desc {
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nearby-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nearby-card-distance {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #d4af37;
}

.nearby-card-distance svg { opacity: 0.7; }

.nearby-card-category {
    font-size: 9px;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.35);
}

.nearby-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: rgba(212, 175, 55, 0.5);
    font-size: 13px;
}

.nearby-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.25);
    font-size: 13px;
}

/* ── Chapter Card ── */
.chapter-card {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.55);
    transition: opacity 0.6s ease;
}

.chapter-card.hidden {
    opacity: 0;
}

.chapter-card.visible {
    opacity: 1;
}

.chapter-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.6);
    margin-bottom: 10px;
}

.chapter-name {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 2px;
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.8);
    text-align: center;
    max-width: 600px;
    padding: 0 20px;
}


/* ── Spotlight Cursor (desktop) ── */
#spotlight-cursor {
    position: fixed;
    width: 28px;
    height: 28px;
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    border-radius: 50%;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.15), inset 0 0 8px rgba(212, 175, 55, 0.08);
    transform: translate(-50%, -50%);
}

#spotlight-cursor.visible {
    opacity: 1;
}

/* ── Audio Toggle ── */
.audio-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 20;
    width: 40px;
    height: 40px;
    background: rgba(13, 13, 13, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    color: #d4af37;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: all 0.2s;
    opacity: 0;
    visibility: hidden;
}

.audio-toggle.visible {
    opacity: 1;
    visibility: visible;
}

.audio-toggle:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(212, 175, 55, 0.12);
}

/* ── Info / Attribution Button ── */
.info-btn {
    position: fixed;
    top: 16px;
    right: 64px;
    z-index: 20;
    width: 40px;
    height: 40px;
    background: rgba(13, 13, 13, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    color: rgba(212, 175, 55, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: all 0.2s;
}

.info-btn:hover {
    border-color: rgba(212, 175, 55, 0.5);
    color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
}

.info-dialog-box {
    max-width: 520px;
}

.info-dialog-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-section {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.info-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-section-label {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.5);
    margin-bottom: 8px;
    font-weight: 600;
}

.info-section-body {
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
}

.info-section-body strong {
    color: rgba(255, 255, 255, 0.85);
}

.info-section-body a {
    color: #d4af37;
    text-decoration: none;
    transition: color 0.2s;
}

.info-section-body a:hover {
    color: #e0c050;
    text-decoration: underline;
}

/* ── Popup Cinematic Transitions ── */
.mapboxgl-popup {
    animation: popupSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popupSlideIn {
    0% { opacity: 0; transform: translateY(20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.popup-image {
    filter: blur(0);
    transition: filter 0.6s ease;
}

.popup-image.loading {
    filter: blur(8px);
}

/* ── Drag handle (hidden on desktop) ── */
.drag-handle { display: none; }

/* ── Mobile logo (hidden on desktop) ── */
#mobile-logo { display: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .intro-logo { width: 220px; }
    .intro-tagline { font-size: 12px; letter-spacing: 3px; margin-bottom: 28px; }
    .intro-btn { width: 240px; padding: 12px 20px; font-size: 11px; }

    /* Hide Mapbox navigation control */
    .mapboxgl-ctrl-bottom-right .mapboxgl-ctrl-group { display: none !important; }

    /* Hide brand header & footer — reclaim space for content */
    .sidebar-header { display: none; }
    .sidebar-footer { display: none; }

    /* Small logo on map */
    #mobile-logo {
        display: flex;
        align-items: center;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 10;
        padding: 6px;
        background: rgba(10, 10, 10, 0.75);
        border: 1px solid rgba(212, 175, 55, 0.15);
        border-radius: 10px;
        backdrop-filter: blur(12px);
    }

    .mobile-logo-icon {
        width: 36px;
        height: 36px;
        object-fit: contain;
    }

    /* Drag handle */
    .drag-handle {
        display: flex;
        justify-content: center;
        cursor: grab;
        user-select: none;
        -webkit-user-select: none;
        padding: 10px 0 6px;
    }

    .drag-handle-bar {
        height: 4px;
        width: 44px;
        display: block;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50px;
    }

    /* Compact search */
    .search-section { padding: 4px 16px 6px; }
    .search-box { padding: 8px 12px; gap: 8px; }
    #search-input { font-size: 12px; }

    /* Compact filter tabs */
    .filter-tabs { padding: 0 16px 6px; gap: 3px; }
    .filter-tab { padding: 5px 0; font-size: 10px; }

    /* Compact tour selector */
    .tour-section { padding: 0 16px 6px; }
    .tour-section-buttons { gap: 6px; }
    .explore-tours-btn, .explore-nearby-btn { padding: 8px 10px; font-size: 10px; letter-spacing: 0.8px; }

    /* Dialogs mobile */
    .dialog-box {
        width: 95%;
        max-height: 85vh;
        padding: 20px;
        border-radius: 12px;
    }
    .dialog-title { font-size: 22px; }
    .dialog-filters { gap: 4px; flex-wrap: wrap; }
    .dialog-filter-tab { padding: 5px 12px; font-size: 10px; }
    .tour-dialog-grid { grid-template-columns: 1fr; gap: 12px; }
    .tour-card { padding: 18px; }
    .tour-card-name { font-size: 16px; }
    .tour-card-cta { opacity: 1; }
    .nearby-dialog-grid { grid-template-columns: 1fr; gap: 12px; }
    .nearby-card-image { height: 120px; }
    .nearby-card-body { padding: 14px; }
    .nearby-card-name { font-size: 15px; }

    /* Compact sort & year controls */
    .controls-row { padding: 4px 16px 6px; gap: 8px; }
    .control-group label { margin-bottom: 2px; font-size: 8px; }
    .control-group select { padding: 6px 24px 6px 8px; font-size: 10px; }

    /* Compact location cards */
    .location-card { padding: 10px 16px; gap: 10px; }
    .card-number { width: 24px; height: 24px; font-size: 11px; }
    .card-name { font-size: 14px; }
    .card-production { font-size: 9px; margin-bottom: 2px; }
    .card-address { font-size: 10px; }
    .card-category { font-size: 8px; margin-top: 3px; padding: 1px 6px; }

    /* Bottom sheet sidebar */
    #sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        height: 50vh;
        max-height: 80vh;
        border-right: none;
        border-top: 1px solid rgba(212, 175, 55, 0.2);
        border-radius: 16px 16px 0 0;
        z-index: 20;
        transition: height 0.3s ease;
    }

    #sidebar.dragging { transition: none !important; }
    #sidebar.fullscreen { border-radius: 0; }

    /* Hide hamburger on mobile */
    #sidebar-toggle { display: none !important; }

    #map { width: 100%; height: 100vh; }

    /* Tour bar — stacked at bottom */
    #tour-bar { left: 0; right: 0; bottom: 0; z-index: 25; }
    .tour-bar-content {
        display: flex;
        flex-direction: column;
        padding: 0;
        gap: 0;
    }
    .tour-bar-info {
        padding: 10px 14px 6px;
    }
    .tour-bar-stops {
        padding: 4px 14px 10px;
        justify-content: space-evenly;
        flex: none;
    }
    /* Nav row — prev, next, exit all in one row */
    .tour-bar-nav {
        display: flex;
        gap: 8px;
        padding: 10px 14px;
        border-top: 1px solid rgba(212, 175, 55, 0.15);
    }
    #tour-prev, #tour-next {
        flex: 1;
        padding: 12px 14px;
        font-size: 13px;
        text-align: center;
    }
    #tour-bar-close {
        padding: 12px 14px;
        font-size: 13px;
    }

    /* Smaller popup on mobile */
    .mapboxgl-popup { max-width: 260px !important; }
    .popup-content { width: 240px; }
    .popup-image-wrap { height: 120px; }
    .popup-name { font-size: 18px; }
    .popup-body { padding: 0 16px 16px; margin-top: -20px; }
    .popup-production { font-size: 9px; }
    .popup-address { font-size: 11px; margin-bottom: 10px; }
    .popup-description { font-size: 11px; line-height: 1.5; margin-bottom: 12px; }
    .popup-actions .popup-cta { padding: 9px 8px; font-size: 9px; }

    /* Hide spotlight cursor on mobile/touch */
    #spotlight-cursor { display: none !important; }

    /* Smaller chapter card */
    .chapter-name { font-size: 24px; }

    /* Audio toggle & info button mobile */
    .audio-toggle { top: 10px; right: 10px; width: 36px; height: 36px; }
    .info-btn { top: 10px; right: 52px; width: 36px; height: 36px; }

    /* Popup slide up on mobile */
    .mapboxgl-popup { animation-name: popupSlideUp; }
    @keyframes popupSlideUp {
        0% { opacity: 0; transform: translateY(40px) scale(0.95); }
        100% { opacity: 1; transform: translateY(0) scale(1); }
    }

    .mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
        border-top-color: #111111 !important;
    }
}
