/* enjoyGraz Tour Guide — Public Frontend */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; }

.egtg-tour-wrap {
    --accent: #1D9E75;
    --accent-dark: #0F6E56;
    --accent-light: #eaf6f1;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    color: #1a1a1a;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    max-width: 960px;
    margin: 2rem auto;
}

.egtg-tour-inner {
    display: flex;
    flex-direction: row;
    min-height: 580px;
    position: relative;
}

/* ── Sidebar ── */
.egtg-sidebar {
    background: #fff;
    border-right: 1px solid #ebebeb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 280px;
    min-width: 280px;
    flex-shrink: 0;
    transition: width 0.28s cubic-bezier(0.4,0,0.2,1),
                min-width 0.28s cubic-bezier(0.4,0,0.2,1),
                border-color 0.28s;
}

/* ── Sidebar toggle button (inside header) ── */
.egtg-sidebar-toggle {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    background: #f7f7f5;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.12s, color 0.12s;
    margin-left: 6px;
    align-self: flex-start;
    margin-top: 2px;
}
.egtg-sidebar-toggle:hover { background: #efefeb; color: #444; }

/* ── Show-tab (visible only when sidebar is hidden) ── */
.egtg-sidebar-show-tab {
    display: none;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 18px;
    height: 48px;
    border-radius: 0 8px 8px 0;
    border: 1px solid #e8e8e8;
    border-left: none;
    background: #fff;
    color: #888;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.07);
    transition: background 0.12s, color 0.12s;
}
.egtg-sidebar-show-tab:hover { background: #f5f5f2; color: #333; }

/* ── Collapsed state ── */
.egtg-tour-inner.egtg-sidebar-hidden .egtg-sidebar {
    width: 0;
    min-width: 0;
    border-color: transparent;
}
.egtg-tour-inner.egtg-sidebar-hidden .egtg-sidebar-show-tab {
    display: flex;
}

.egtg-sidebar-header {
    padding: 20px 16px 14px;
    border-bottom: 1px solid #ebebeb;
}

.egtg-brand {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
}

.egtg-tour-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 18px;
    font-weight: 400;
    color: #111;
    margin: 0 0 4px;
    line-height: 1.25;
}

.egtg-tour-desc {
    font-size: 11px;
    color: #888;
    margin: 0;
    line-height: 1.5;
}

/* ── Description collapse toggle ── */
.egtg-desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #aaa;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1px 0 4px;
    font-family: inherit;
    line-height: 1;
    transition: color 0.15s;
}
.egtg-desc-toggle:hover { color: #666; }

/* ── Intro guide overlay ── */
.egtg-intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    font-family: 'DM Sans', -apple-system, sans-serif;
}
.egtg-intro-box {
    background: #fff;
    border-radius: 18px;
    padding: 32px 28px 24px;
    max-width: 340px;
    width: 90vw;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    animation: egtg-intro-in 0.25s ease;
}
@keyframes egtg-intro-in {
    from { opacity: 0; transform: scale(0.93) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.egtg-intro-icon {
    font-size: 40px;
    margin-bottom: 12px;
    line-height: 1;
}
.egtg-intro-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 20px;
    font-weight: 400;
    color: #111;
    margin: 0 0 10px;
    line-height: 1.25;
}
.egtg-intro-body {
    font-size: 13px;
    color: #555;
    line-height: 1.65;
    margin: 0 0 20px;
}
.egtg-intro-body strong { color: #222; }
.egtg-intro-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
}
.egtg-intro-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #ddd;
    transition: background 0.2s;
}
.egtg-intro-dot.active { background: var(--accent, #1D9E75); }
.egtg-intro-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.egtg-intro-skip {
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    color: #888;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s;
}
.egtg-intro-skip:hover { background: #f5f5f5; }
.egtg-intro-next,
.egtg-intro-start {
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    background: var(--accent, #1D9E75);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s;
}
.egtg-intro-next:hover,
.egtg-intro-start:hover { background: var(--accent-dark, #0F6E56); }

/* ── Guide help button (in sidebar header) ── */
.egtg-guide-btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 8px;
    line-height: 1;
    color: #888;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.egtg-guide-btn:hover { background: #f5f5f5; border-color: #ccc; }

.egtg-progress-bar {
    height: 2px;
    background: #f0f0f0;
    flex-shrink: 0;
}
.egtg-progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.4s ease;
    width: 0%;
}

.egtg-stops-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    scroll-behavior: smooth;
}
.egtg-stops-list::-webkit-scrollbar { width: 4px; }
.egtg-stops-list::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 2px; }

.egtg-stop-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.14s, border-color 0.14s;
    margin-bottom: 2px;
}
.egtg-stop-item:hover { background: #f7f7f7; }
.egtg-stop-item.active {
    background: var(--accent-light);
    border-color: rgba(29,158,117,0.25);
}

.egtg-stop-dot {
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}
.egtg-stop-dot.visited { background: var(--accent); color: #fff; }
.egtg-stop-dot.current { background: #0072f5; color: #fff; }
.egtg-stop-dot.upcoming {
    background: #f0f0f0;
    color: #aaa;
    border: 1px solid #e0e0e0;
}

.egtg-stop-info { flex: 1; min-width: 0; }
.egtg-stop-name-text { font-size: 13px; font-weight: 600; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.egtg-stop-sub-text { font-size: 11px; color: #aaa; margin-top: 1px; }

.egtg-stop-dur { font-size: 11px; color: #ccc; flex-shrink: 0; padding-top: 3px; }

/* ── Main panel ── */
.egtg-main {
    display: flex;
    flex-direction: column;
    background: #f8f8f6;
}

.egtg-map {
    flex: 1;
    min-height: 300px;
    position: relative;
}

/* Route path toggle button (bottom-left of map) */
.egtg-route-toggle-btn {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 500;
    background: rgba(255,255,255,0.92);
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.egtg-route-toggle-btn:hover { color: #333; background: #fff; }
.egtg-route-toggle-btn.active { color: var(--accent); border-color: var(--accent); }

.egtg-audio-panel {
    background: #fff;
    border-top: 1px solid #ebebeb;
    padding: 16px 20px;
}

.egtg-stop-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.egtg-stop-name {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 18px;
    font-weight: 400;
    color: #111;
    line-height: 1.2;
}

.egtg-stop-tip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    background: #fff8e1;
    color: #b07d00;
    border-radius: 20px;
    border: 1px solid #ffe58f;
    margin-top: 5px;
}

.egtg-stop-badge {
    font-size: 11px;
    padding: 3px 9px;
    background: #f0f0f0;
    color: #888;
    border-radius: 20px;
    flex-shrink: 0;
    font-weight: 500;
}

.egtg-narration {
    font-size: 13px;
    color: #555;
    line-height: 1.65;
    margin-bottom: 14px;
    max-height: 68px;
    overflow-y: auto;
}
.egtg-narration::-webkit-scrollbar { width: 3px; }
.egtg-narration::-webkit-scrollbar-thumb { background: #e0e0e0; }

.egtg-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.egtg-play-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #fff;
    transition: background 0.15s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(29,158,117,0.3);
}
.egtg-play-btn:hover { background: var(--accent-dark); }
.egtg-play-btn:active { transform: scale(0.95); }
.egtg-play-btn.speaking { background: #e74c3c; }

.egtg-track { flex: 1; }
.egtg-track-bar {
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    position: relative;
    margin-bottom: 4px;
    overflow: hidden;
}
.egtg-track-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.2s linear;
    width: 0%;
}
.egtg-track-times {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #bbb;
}

.egtg-nav { display: flex; gap: 6px; flex-shrink: 0; }
.egtg-btn {
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    color: #444;
    transition: background 0.12s;
    font-family: inherit;
}
.egtg-btn:hover { background: #f5f5f5; }
.egtg-btn:disabled { opacity: 0.35; cursor: default; }
.egtg-btn-primary {
    background: var(--accent) !important;
    color: #fff !important;
    border-color: transparent !important;
}
.egtg-btn-primary:hover { background: var(--accent-dark) !important; }

.egtg-lang-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
    flex-wrap: wrap;
}
.egtg-lang-row label { font-weight: 600; color: #777; }
.egtg-lang-select {
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 3px 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-family: inherit;
}
.egtg-tts-note { font-size: 11px; color: #bbb; margin-left: auto; }

/* ── Responsive — iPhone portrait and small screens ── */
@media (max-width: 680px) {
    /* Full-bleed card — no side margins, no radius */
    .egtg-tour-wrap {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
        max-width: 100%;
    }

    /* Switch to flex column so children can share height properly */
    .egtg-tour-inner {
        display: flex;
        flex-direction: column;
        min-height: 100dvh;
    }

    /* Sidebar becomes a compact strip at the top */
    .egtg-sidebar {
        width: auto !important;
        min-width: 0 !important;
        flex-shrink: 0;
        border-right: none;
        border-bottom: 1px solid #ebebeb;
        overflow: hidden;
        max-height: 220px;
        transition: max-height 0.28s cubic-bezier(0.4,0,0.2,1),
                    border-color 0.28s;
    }
    .egtg-tour-inner.egtg-sidebar-hidden .egtg-sidebar {
        max-height: 0;
        border-color: transparent;
    }

    /* Toggle button flips to point down on mobile */
    .egtg-sidebar-toggle .egtg-toggle-icon {
        transform: rotate(-90deg);
    }
    .egtg-tour-inner.egtg-sidebar-hidden .egtg-sidebar-toggle .egtg-toggle-icon {
        transform: rotate(90deg);
    }

    /* Show-tab sits at top of map, horizontal */
    .egtg-sidebar-show-tab {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 48px;
        height: 18px;
        border-radius: 0 0 8px 8px;
        border: 1px solid #e8e8e8;
        border-top: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    }
    .egtg-sidebar-show-tab svg {
        transform: rotate(90deg);
    }

    /* Tighten sidebar header */
    .egtg-sidebar-header {
        padding: 10px 14px 6px;
    }
    .egtg-brand { font-size: 10px; margin-bottom: 2px; }
    .egtg-tour-title { font-size: 14px; margin-bottom: 0; }
    .egtg-tour-desc { display: none; }

    /* Horizontal scrolling stop strip */
    .egtg-stops-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: visible;
        padding: 6px 10px 8px;
        -webkit-overflow-scrolling: touch;
    }
    .egtg-stop-item {
        flex-direction: column;
        align-items: center;
        min-width: 72px;
        max-width: 72px;
        text-align: center;
        padding: 5px 4px;
        margin-bottom: 0;
    }
    .egtg-stop-dot { margin-top: 0; flex-shrink: 0; }
    .egtg-stop-info { width: 100%; }
    .egtg-stop-name-text {
        font-size: 11px;
        white-space: normal;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        word-break: break-word;
    }
    .egtg-stop-dur, .egtg-stop-sub-text { display: none; }

    /* Main panel fills all remaining height */
    .egtg-main {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* Map: fixed height so audio panel + stop strip stay visible */
    .egtg-map {
        flex: none;
        height: 42dvh;
        min-height: 180px;
        max-height: 320px;
    }

    /* Compact audio panel */
    .egtg-audio-panel {
        flex-shrink: 0;
        padding: 10px 14px 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
    .egtg-stop-header { margin-bottom: 4px; }
    .egtg-stop-name { font-size: 15px; }
    .egtg-narration {
        font-size: 12px;
        max-height: 38px;
        margin-bottom: 8px;
    }
    .egtg-controls { flex-wrap: nowrap; margin-bottom: 6px; gap: 8px; }
    .egtg-nav { order: unset; width: auto; }
    .egtg-tts-note { display: none; }
    .egtg-lang-row { font-size: 11px; gap: 5px; }
    .egtg-lang-select { font-size: 11px; }
}

/* ── iPhone SE / very small screens ── */
@media (max-width: 390px) {
    .egtg-tour-inner { min-height: 100svh; }
    .egtg-stop-dot { width: 20px; height: 20px; font-size: 10px; }
    .egtg-stop-item { min-width: 64px; max-width: 64px; }
    .egtg-stop-name-text { font-size: 10px; -webkit-line-clamp: 2; }
    .egtg-narration { max-height: 32px; }
    .egtg-play-btn { width: 34px; height: 34px; }
    .egtg-audio-panel { padding: 8px 12px 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}

/* ── Sidebar header flex (for print button) ── */
.egtg-sidebar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.egtg-sidebar-header-text { flex: 1; min-width: 0; }

/* ── Language pills ── */
.egtg-lang-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.egtg-lang-pill {
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #888;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.egtg-lang-pill:hover { background: #f5f5f5; color: #444; }
.egtg-lang-pill.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── Stop links ── */
.egtg-stop-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.egtg-link-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    transition: opacity 0.15s;
    font-family: inherit;
}
.egtg-link-badge:hover { opacity: 0.8; }
.egtg-link-website   { background: #f0f0f0; color: #444; border: 1px solid #ddd; }
.egtg-link-wikipedia { background: #e8f0fb; color: #1a5296; border: 1px solid #c8d8f5; }

/* ── Photo gallery ── */
.egtg-gallery { margin-bottom: 10px; }
.egtg-gallery-header {
    font-size: 12px;
    font-weight: 600;
    color: #777;
    margin-bottom: 6px;
}
.egtg-gallery-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    color: #666;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
}
.egtg-gallery-strip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
}
.egtg-gallery-strip::-webkit-scrollbar { height: 3px; }
.egtg-gallery-strip::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
.egtg-gallery-thumb {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    scroll-snap-align: start;
    border: 2px solid transparent;
    transition: border-color 0.12s, transform 0.12s;
}
.egtg-gallery-thumb:hover { border-color: var(--accent); transform: scale(1.04); }

/* ── Lightbox ── */
#egtg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
}
.egtg-lb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
}
.egtg-lb-img-wrap {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.egtg-lb-img-wrap img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    display: block;
}
.egtg-lb-close {
    position: absolute;
    top: 16px; right: 20px;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 22px;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
    line-height: 1;
}
.egtg-lb-close:hover { background: rgba(255,255,255,0.25); }
.egtg-lb-prev, .egtg-lb-next {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 36px;
    width: 48px; height: 64px;
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
    line-height: 1;
}
.egtg-lb-prev { left: 16px; }
.egtg-lb-next { right: 16px; }
.egtg-lb-prev:hover, .egtg-lb-next:hover { background: rgba(255,255,255,0.25); }
.egtg-lb-prev:disabled, .egtg-lb-next:disabled { opacity: 0.25; cursor: default; }
.egtg-lb-counter {
    position: absolute;
    bottom: 56px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
}
.egtg-lb-caption {
    position: absolute;
    bottom: 20px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    text-align: center;
    max-width: 80vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── POI map layer ── */
.egtg-poi-control {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    overflow: hidden;
    min-width: 140px;
}
.egtg-poi-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    background: #fff;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: 'DM Sans', sans-serif;
    transition: background 0.12s;
}
.egtg-poi-toggle-btn:hover { background: #f5f5f5; }
.egtg-poi-toggle-btn.open  { background: #f0f0f0; }
.egtg-poi-legend {
    padding: 6px 8px 8px;
    border-top: 1px solid #eee;
}
.egtg-poi-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #444;
    padding: 3px 0;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
}
.egtg-poi-legend-item input[type="checkbox"] { cursor: pointer; accent-color: var(--accent); }
.egtg-poi-marker {
    font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
    cursor: pointer;
}
.egtg-poi-svg-wrap {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    border-radius: 50%;
    border: 2px solid currentColor;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    padding: 4px;
}
.egtg-poi-svg-wrap svg {
    width: 100%; height: 100%;
    display: block;
}
.egtg-poi-legend-icon {
    width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.egtg-poi-legend-icon svg { width: 100%; height: 100%; }

/* ── User location dot ── */
.egtg-user-dot {
    width: 16px; height: 16px;
    background: #0072f5;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px rgba(0,114,245,0.4);
    animation: egtg-pulse 2s ease-in-out infinite;
}
@keyframes egtg-pulse {
    0%   { box-shadow: 0 0 0 2px rgba(0,114,245,0.5); }
    50%  { box-shadow: 0 0 0 8px rgba(0,114,245,0.0); }
    100% { box-shadow: 0 0 0 2px rgba(0,114,245,0.5); }
}
.egtg-locate-control { }
.egtg-locate-btn-a {
    width: 30px; height: 30px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    text-decoration: none !important;
    color: #333 !important;
}

/* ── Map toast ── */
.egtg-map-toast {
    position: absolute;
    top: 10px; left: 50%; transform: translateX(-50%);
    z-index: 1000;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    pointer-events: none;
    animation: egtg-toast-fade 3s forwards;
    font-family: 'DM Sans', sans-serif;
}
@keyframes egtg-toast-fade {
    0%   { opacity: 1; }
    70%  { opacity: 1; }
    100% { opacity: 0; }
}

/* ── Header action buttons ── */
.egtg-header-btns {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    margin-top: 4px;
}

/* ── Translate widget ── */
.egtg-translate-btn {
    padding: 5px 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    color: #666;
    transition: background 0.12s;
    font-family: inherit;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1;
}
.egtg-translate-btn:hover { background: #f5f5f5; }

.egtg-google-translate {
    padding: 6px 12px 8px;
    background: #f9f9f9;
    border-bottom: 1px solid #ebebeb;
    font-size: 12px;
}

/* ── Print button ── */
.egtg-print-btn {
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    color: #666;
    transition: background 0.12s;
    font-family: inherit;
    flex-shrink: 0;
    white-space: nowrap;
    margin-top: 4px;
}
.egtg-print-btn:hover { background: #f5f5f5; }

/* ── Access code gate ── */
.egtg-access-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    font-family: 'DM Sans', -apple-system, sans-serif;
}
.egtg-access-box {
    background: #fff;
    border-radius: 16px;
    padding: 36px 40px;
    max-width: 380px;
    width: 90vw;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,0.25);
}
.egtg-access-logo {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent, #1D9E75);
    margin-bottom: 16px;
}
.egtg-access-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 22px;
    font-weight: 400;
    color: #111;
    margin: 0 0 8px;
}
.egtg-access-label {
    font-size: 13px;
    color: #777;
    margin: 0 0 18px;
}
.egtg-code-input {
    width: 100%;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 12px 16px;
    color: #111;
    font-family: 'Courier New', monospace;
    transition: border-color 0.15s;
    margin-bottom: 10px;
}
.egtg-code-input:focus { border-color: var(--accent, #1D9E75); outline: none; }
.egtg-code-input--error { border-color: #e74c3c !important; animation: egtg-shake 0.4s; }
@keyframes egtg-shake {
    0%,100% { transform: translateX(0); }
    20%,60% { transform: translateX(-6px); }
    40%,80% { transform: translateX(6px); }
}
.egtg-access-error {
    min-height: 18px;
    font-size: 12px;
    color: #e74c3c;
    margin-bottom: 12px;
}
.egtg-access-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--accent, #1D9E75);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.egtg-access-btn:hover { filter: brightness(0.9); }

/* ── Basket button ── */
.egtg-basket-btn {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 8000;
    background: var(--accent, #1D9E75);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 13px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: transform 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}
.egtg-basket-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.25); }
.egtg-basket-btn:active { transform: translateY(0); }

@media (max-width: 680px) {
    .egtg-basket-btn {
        /* sit above the audio panel (~160px) + safe-area inset */
        bottom: calc(160px + env(safe-area-inset-bottom));
        right: 14px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ── Basket modal ── */
.egtg-basket-modal {
    position: fixed;
    inset: 0;
    z-index: 8500;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.egtg-basket-modal.open { pointer-events: auto; }
.egtg-basket-modal-inner {
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 28px 28px 36px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
    position: relative;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
    font-family: 'DM Sans', sans-serif;
}
.egtg-basket-modal.open .egtg-basket-modal-inner { transform: translateY(0); }
.egtg-basket-close {
    position: absolute;
    top: 14px; right: 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: background 0.12s;
}
.egtg-basket-close:hover { background: #e0e0e0; }
.egtg-basket-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 20px;
    font-weight: 400;
    color: #111;
    margin: 0 0 8px;
}
.egtg-basket-address {
    font-size: 13px;
    color: #666;
    margin: 0 0 18px;
}
.egtg-basket-time-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.egtg-basket-time-label { font-size: 13px; color: #888; }
.egtg-basket-time {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    font-variant-numeric: tabular-nums;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 0.04em;
}
.egtg-basket-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 13px;
    background: #25D366;
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    transition: filter 0.15s;
}
.egtg-basket-whatsapp:hover { filter: brightness(0.9); }

/* Leaflet marker override */
.egtg-marker-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.egtg-marker {
    width: 32px; height: 32px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    border: 2.5px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: transform 0.2s;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    flex-shrink: 0;
}
.egtg-marker:hover { transform: scale(1.15); }
.egtg-marker.active-marker { transform: scale(1.2); box-shadow: 0 3px 12px rgba(0,0,0,0.3); }
.egtg-marker-label {
    background: rgba(20,20,20,0.72);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 5px;
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    font-family: 'DM Sans', sans-serif;
    line-height: 1.4;
    backdrop-filter: blur(2px);
    /* Hidden on desktop — show only on hover or active */
    opacity: 0;
    transition: opacity 0.15s;
}
.egtg-marker-wrap:hover .egtg-marker-label,
.egtg-marker-wrap:has(.active-marker) .egtg-marker-label { opacity: 1; }
/* Always visible on mobile */
@media (max-width: 680px) {
    .egtg-marker-label { opacity: 1; }
}

/* ── Weather button (in sidebar header) ── */
.egtg-weather-btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.egtg-weather-btn:hover { background: #f0f9f5; border-color: var(--accent); }

/* ── Weather modal ── */
.egtg-weather-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 10100;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}
.egtg-weather-modal.open { display: flex; }

.egtg-weather-inner {
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 640px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
    animation: egtg-slide-up 0.28s cubic-bezier(0.32,1,0.56,1);
}
@keyframes egtg-slide-up {
    from { transform: translateY(60px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.egtg-weather-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.egtg-weather-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 17px;
    font-weight: 400;
    margin: 0;
    color: #111;
}
.egtg-weather-close {
    background: #f4f4f4;
    border: none;
    border-radius: 50%;
    width: 30px; height: 30px;
    cursor: pointer;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}
.egtg-weather-close:hover { background: #e8e8e8; }

.egtg-weather-content {
    overflow-y: auto;
    padding: 16px 20px 24px;
    flex: 1;
}
.egtg-weather-content::-webkit-scrollbar { width: 4px; }
.egtg-weather-content::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 2px; }

/* Loading */
.egtg-weather-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 0;
    color: #888;
    font-size: 14px;
    justify-content: center;
}
.egtg-weather-spinner {
    width: 18px; height: 18px;
    border: 2px solid #e0e0e0;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: egtg-spin 0.7s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}
@keyframes egtg-spin { to { transform: rotate(360deg); } }

.egtg-weather-error {
    color: #c0392b;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
}

/* Current weather card */
.egtg-wx-current {
    background: linear-gradient(135deg, #f0f9f5 0%, #e8f4fd 100%);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #d8eef8;
}
.egtg-wx-main {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.egtg-wx-icon {
    width: 64px; height: 64px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}
.egtg-wx-temps { display: flex; flex-direction: column; gap: 2px; }
.egtg-wx-temp {
    font-size: 32px;
    font-weight: 700;
    color: #111;
    line-height: 1;
    font-family: 'DM Sans', sans-serif;
}
.egtg-wx-desc {
    font-size: 14px;
    color: #555;
    text-transform: capitalize;
}
.egtg-wx-feels { font-size: 12px; color: #888; }

.egtg-wx-stats {
    display: flex;
    gap: 8px;
}
.egtg-wx-stat {
    flex: 1;
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #444;
    border: 1px solid rgba(0,0,0,0.05);
}
.egtg-wx-stat strong { font-size: 13px; font-weight: 700; color: #222; }
.egtg-wx-stat small  { font-size: 10px; color: #999; }
.egtg-wx-stat.vis-fog  { background: rgba(200,210,220,0.4); }
.egtg-wx-stat.vis-poor { background: rgba(230,220,180,0.35); }
.egtg-wx-stat.vis-clear{ background: rgba(200,240,215,0.4); }

/* Section headers */
.egtg-wx-section {
    margin-bottom: 16px;
    background: #fafafa;
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid #f0f0f0;
}
.egtg-wx-sec-title {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px;
    letter-spacing: 0.02em;
}

/* Sunset grid */
.egtg-sunset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.egtg-sunset-stat {
    background: #fff;
    border-radius: 10px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border: 1px solid #ebebeb;
    text-align: center;
}
.egtg-sunset-val {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    font-family: 'DM Sans', sans-serif;
}
.egtg-sunset-lbl { font-size: 10px; color: #999; letter-spacing: 0.03em; }

/* Compass */
.egtg-compass-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.egtg-compass {
    position: relative;
    width: 120px; height: 120px;
}
.egtg-compass-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: radial-gradient(circle, #f9fafb 60%, #eef2f7 100%);
}
.egtg-cp-n, .egtg-cp-e, .egtg-cp-s, .egtg-cp-w {
    position: absolute;
    font-size: 11px;
    font-weight: 700;
    color: #888;
}
.egtg-cp-n { top: 4px;  left: 50%; transform: translateX(-50%); }
.egtg-cp-s { bottom: 4px; left: 50%; transform: translateX(-50%); }
.egtg-cp-e { right: 6px; top: 50%; transform: translateY(-50%); }
.egtg-cp-w { left: 6px;  top: 50%; transform: translateY(-50%); }

.egtg-compass-needle {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    transition: transform 0.4s ease;
    transform-origin: center center;
    padding-top: 8px;
}
.egtg-compass-sun-icon {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
}
.egtg-compass-dot {
    position: absolute;
    width: 10px; height: 10px;
    background: var(--accent);
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--accent);
}
.egtg-compass-hint {
    font-size: 12px;
    color: #666;
    margin: 0;
    text-align: center;
}

/* Blue hour */
.egtg-bluehour-section { background: linear-gradient(135deg, #f0f4ff 0%, #e8efff 100%); border-color: #c8d8f8; }
.egtg-bluehour-wrap { display: flex; flex-direction: column; gap: 6px; }
.egtg-bluehour-time {
    font-size: 22px;
    font-weight: 700;
    color: #2c5ee8;
    font-family: 'DM Sans', sans-serif;
}
.egtg-bluehour-desc { font-size: 12px; color: #4a5c80; line-height: 1.5; }

/* Forecast */
.egtg-fc-list { display: flex; flex-direction: column; gap: 6px; }
.egtg-fc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    border: 1px solid #ebebeb;
}
.egtg-fc-time { font-size: 13px; font-weight: 700; color: #333; width: 44px; flex-shrink: 0; }
.egtg-fc-icon { width: 32px; height: 32px; flex-shrink: 0; }
.egtg-fc-temp { font-size: 14px; font-weight: 700; color: #111; width: 36px; flex-shrink: 0; }
.egtg-fc-desc { font-size: 12px; color: #777; text-transform: capitalize; }

/* Dressing advice */
.egtg-dress-section { background: linear-gradient(135deg, #f5f9f6 0%, #edf7f2 100%); border-color: #c2e4d4; }
.egtg-dress-list { display: flex; flex-direction: column; gap: 10px; }
.egtg-dress-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(29,158,117,0.12);
}
.egtg-dress-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}
.egtg-dress-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.egtg-dress-text strong {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
}
.egtg-dress-text span {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
}

/* Weather map section */
.egtg-wxmap-section { padding: 14px 16px 0; }
.egtg-wxmap-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.egtg-wxmap-header .egtg-wx-sec-title { margin: 0; flex-shrink: 0; }
.egtg-wxmap-layers {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
}
.egtg-wl-btn {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: #f6f6f6;
    cursor: pointer;
    color: #555;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
}
.egtg-wl-btn:hover { background: #e8f4fd; border-color: #90c8f0; }
.egtg-wl-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.egtg-wxmap-fs-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 15px;
    flex-shrink: 0;
    transition: background 0.15s;
    line-height: 1;
}
.egtg-wxmap-fs-btn:hover { background: #e0e0e0; }

.egtg-wxmap-wrap {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    height: 220px;
    transition: all 0.3s;
}
#egtg-weather-map { width: 100%; height: 100%; }

.egtg-wxmap-exit-fs {
    display: none;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    cursor: pointer;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

/* Fullscreen states */
.egtg-wxmap-wrap.egtg-wxmap-fullscreen {
    position: fixed;
    inset: 0;
    height: 100dvh;
    width: 100vw;
    border-radius: 0;
    z-index: 10200;
    border: none;
}
.egtg-body-wxmap-fs { overflow: hidden; }

/* Main map fullscreen button (Leaflet control) */
.egtg-map-fs-btn {
    background: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 5px rgba(0,0,0,0.25);
    transition: background 0.15s;
    margin-bottom: 4px;
}
.egtg-map-fs-btn:hover { background: #f0f0f0; }

.egtg-map.egtg-map-fullscreen-active {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    z-index: 10050 !important;
    border-radius: 0 !important;
}
.egtg-body-main-map-fs { overflow: hidden; }

@media (max-width: 480px) {
    .egtg-sunset-grid { grid-template-columns: repeat(2, 1fr); }
    .egtg-wx-stats { gap: 6px; }
    .egtg-wx-stat { padding: 6px 8px; }
    .egtg-wxmap-wrap { height: 180px; }
}
