/* ==================== GLOBAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }

    .hero-scroll-link svg {
        animation: hero-scroll-bounce 0.65s ease-in-out infinite;
    }
}

@keyframes hero-scroll-bounce {
    0%, 100% { transform: translateY(-2px); }
    50% { transform: translateY(3px); }
}

/* ==================== HOMEPAGE - HERO SECTION ==================== */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    background-image: url('/assets/hero-mobile.webp?v=hero-image-v1');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tablet - medium resolution */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero {
        background-image: url('/assets/hero-tablet.webp?v=hero-image-v1');
    }
}

/* Desktop - high resolution */
@media (min-width: 1025px) {
    .hero {
        background-image: image-set(
            url('/assets/hero-desktop-1920.webp?v=hero-image-v1') 1x,
            url('/assets/hero-desktop-3840.webp?v=hero-image-v1') 2x
        );
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 20px;
    max-width: 900px;
    width: 100%;
}

.hero-scroll-link {
    position: absolute;
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transform: translateX(-50%);
}

.hero-scroll-arrow {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #31836b;
    color: white;
    font-size: 18px;
}

.hero-scroll-link:hover .hero-scroll-arrow {
    background: #236650;
}

.hero-scroll-link:focus-visible {
    outline: 3px solid white;
    outline-offset: 4px;
}

.hero-brand {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 1101;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.home-page .hero-brand {
    z-index: 1101;
}

.hero-logo {
    height: 72px;
    width: auto;
}

.hero-brand a:focus-visible {
    outline: 3px solid white;
    outline-offset: 4px;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: 3rem;
    opacity: 0.95;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.inline-icon {
    display: block;
    width: 1.2em;
    height: 1.2em;
    flex: none;
}

/* ==================== HOMEPAGE - DISCOVERY SECTION ==================== */
.discovery-section {
    position: relative;
    isolation: isolate;
    max-width: 1200px;
    margin: 0 auto;
    padding: 88px 32px 96px;
    color: #25332e;
}

.discovery-section::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: -1;
    width: 100vw;
    background: linear-gradient(rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.94));
    content: "";
    transform: translateX(-50%);
}

.discovery-section.discovery-background-ready::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.94)),
        url('/assets/discovery-background.webp?v=discovery-background-v1');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.discovery-intro {
    max-width: 680px;
    margin: 0 auto 48px;
    text-align: center;
}

.section-eyebrow {
    margin-bottom: 12px;
    color: #31836b;
    font-size: 1.3rem;
    font-weight: 750;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.discovery-intro h2 {
    margin-bottom: 16px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
}

.discovery-intro > p:last-child {
    color: #5f6d67;
    font-size: 1.3rem;
    line-height: 1.65;
}

.discovery-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.discovery-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 28px;
    border: 1px solid #e6ece8;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(31, 62, 49, 0.06), 0 2px 6px rgba(31, 62, 49, 0.04);
    text-align: center;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .discovery-card {
        transition: transform 180ms ease, box-shadow 180ms ease;
    }

    .discovery-card:hover {
        transform: perspective(900px) rotateX(2deg) translateY(-3px);
        box-shadow: 0 18px 36px rgba(31, 62, 49, 0.12), 0 4px 10px rgba(31, 62, 49, 0.05);
    }
}

.discovery-icon {
    display: inline-grid;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    place-items: center;
    border-radius: 14px;
    background: #eaf5ef;
    color: #31836b;
    font-size: 20px;
}

.discovery-card h3 {
    margin-bottom: 10px;
    color: #25332e;
    font-size: 1.15rem;
}

.discovery-card p {
    color: #68766f;
    line-height: 1.6;
}

.collection-overview-section {
    background: linear-gradient(180deg, #0c1117 0%, #263f43 24%, #355557 48%, #1b2b32 75%, #0c1117 100%);
    color: #edf4f5;
}

.world-map-section {
    padding: 76px 32px 48px;
}

.world-map-intro {
    max-width: 680px;
    margin: 0 auto 32px;
    text-align: center;
}

.world-map-intro h2 {
    margin-bottom: 14px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
}

.world-map-intro > p:last-child {
    color: #aab9bd;
    font-size: 1.15rem;
    line-height: 1.6;
}

.world-map-panel {
    position: relative;
    max-width: 920px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(174, 207, 199, 0.12);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(24, 43, 49, 0.8), rgba(10, 18, 24, 0.92));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
}

.world-map-canvas {
    display: block;
    width: 100%;
    height: clamp(280px, 36vw, 380px);
    background: #111a20;
}

.world-map-attribution {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    padding: 3px 6px;
    border: 1px solid rgba(174, 207, 199, 0.14);
    border-radius: 5px;
    background: rgba(10, 18, 24, 0.82);
    color: #91aaa8;
    font-size: 0.65rem;
}

.world-map-attribution a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.world-map-attribution a:hover {
    color: #edf4f5;
}

.world-map-action {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.world-map-search-link {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    border: 1px solid rgba(198, 235, 220, 0.28);
    border-radius: 999px;
    background: #31836b;
    box-shadow: 0 8px 24px rgba(12, 25, 26, 0.22);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 160ms ease, transform 160ms ease;
}

.world-map-search-link:hover {
    transform: translateY(-2px);
    background: #236650;
}

.world-map-search-link:focus-visible {
    outline: 3px solid #c6ebdc;
    outline-offset: 3px;
}

.collection-stats {
    padding: 48px 32px 84px;
}

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

.stats-intro {
    max-width: 680px;
    margin: 0 auto 40px;
    text-align: center;
}

.stats-intro h2 {
    margin-bottom: 12px;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

.stats-intro > p:last-child {
    color: #c0ced0;
    font-size: 1.05rem;
    line-height: 1.6;
}

.stats-status {
    max-width: 680px;
    margin: 12px auto 0;
    color: #bdcacc;
    font-size: 0.92rem;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 610px;
    margin: 0 auto;
}

.stat-card {
    display: flex;
    min-height: 140px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 14px;
    border: 1px solid #40545a;
    border-radius: 16px;
    background: rgb(39 56 62 / 88%);
    box-shadow: 0 18px 45px rgb(0 0 0 / 18%);
    text-align: center;
}

.stat-card-accent {
    border-color: rgb(77 212 176 / 45%);
    background: linear-gradient(145deg, #28504d, #27383e);
}

.stat-value {
    color: #4dd4b0;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 750;
    line-height: 1;
}

.collection-stats[aria-busy="true"] .stat-value:not([aria-hidden="true"]) {
    display: inline-block;
    min-width: 4ch;
    border-radius: 4px;
    color: transparent;
    background: linear-gradient(90deg, #40585b, #526b6b, #40585b);
}

.stat-label {
    color: #bdcacc;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
}

/* Search Container */
.search-container {
    position: relative;
    margin-bottom: 2rem;
}

/* Place Type Selector */
.place-type-selector {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    font-weight: 600;
    font-size: 14px;
    min-width: 120px;
}

.type-option:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.type-option.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
}

.type-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.type-label {
    font-size: 14px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.search-box {
    display: flex;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
}

.search-input-container {
    position: relative;
    flex: 1;
}

#searchInput {
    width: 100%;
    padding: 18px 24px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    outline: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

#searchInput:focus {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

#searchBtn {
    padding: 18px 36px;
    font-size: 16px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

#searchBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 107, 107, 0.5);
}

#searchBtn:active {
    transform: translateY(0);
}

.hero #searchInput {
    padding-right: 64px;
}

.hero #searchInput:focus {
    transform: none;
}

.hero #searchBtn {
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 2;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #236650;
    font-size: 19px;
    box-shadow: none;
    transform: translateY(-50%);
    transition: color 0.2s, background-color 0.2s;
}

.hero #searchBtn:hover {
    background: #edf6f0;
    color: #174a3a;
    box-shadow: none;
    transform: translateY(-50%);
}

.hero #searchBtn:active {
    transform: translateY(-50%);
}

.hero #searchBtn:focus-visible {
    outline: 3px solid #96d0b2;
    outline-offset: 2px;
}

/* Autocomplete Suggestions */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.suggestions.hidden {
    display: none;
}

/* Map Hint */
.map-hint {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.map-hint.hidden {
    display: none;
}

.use-map-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    color: #333;
    width: 100%;
    transition: background 0.2s;
}

.use-map-btn:hover {
    background: #f8f9fa;
}

.map-icon {
    font-size: 16px;
    color: #667eea;
}

/* Explore Map Button (mobile only) */
.explore-map-btn {
    display: none; /* Hidden by default (desktop) */
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 36px;
    font-size: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.explore-map-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.explore-map-btn:active {
    transform: translateY(0);
}

.explore-map-btn svg {
    width: 18px;
    height: 18px;
}

.suggestion-item {
    padding: 14px 24px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.suggestion-item:first-child {
    border-radius: 20px 20px 0 0;
}

.suggestion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 20px 20px;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item div {
    color: #333;
    font-size: 15px;
}

/* Loading Spinner (Homepage) */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
}

.loading.hidden {
    display: none;
}

.loading p {
    margin-top: 20px;
    font-size: 18px;
}

.spinner {
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== RESULTS PAGE ==================== */
html.results-document,
html.results-document body {
    height: 100%;
    overflow: hidden;
}

.results-page {
    position: relative;
    height: 100vh;
    height: 100dvh;
    height: var(--results-viewport-height, 100dvh);
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Header */
.results-header {
    position: relative;
    width: 100%;
    height: 96px;
    flex: 0 0 96px;
    background: #fff;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    z-index: 1100;
    box-shadow: 0 2px 12px rgba(22, 39, 33, 0.12);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    display: block;
    height: 72px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-text {
    font-weight: 800;
    font-size: 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== SITE ACCOUNT MENU ==================== */
.site-header {
    justify-content: space-between;
}

.home-page .site-header {
    position: absolute;
    top: env(safe-area-inset-top, 0px);
    right: 0;
    left: 0;
    background: transparent;
    box-shadow: none;
}

.home-page .site-header .logo {
    display: none;
}

.site-account-menu {
    position: relative;
    margin-left: auto;
}

.site-account-trigger {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #31836b;
    color: white;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.site-account-trigger:hover {
    background: #236650;
}

.site-account-trigger-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.site-account-user-icon {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.site-account-trigger:focus-visible,
.site-account-submenu a:focus-visible,
.site-account-submenu button:focus-visible {
    outline: 3px solid #96d0b2;
    outline-offset: 3px;
}

.site-account-menu-bars {
    display: none;
}

.site-account-submenu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1200;
    display: none;
    min-width: 210px;
    padding: 8px;
    border: 1px solid #e2e9e4;
    border-radius: 12px;
    background: white;
    box-shadow: 0 12px 28px rgba(22, 39, 33, 0.18);
}

.site-account-menu.is-open .site-account-submenu {
    display: grid;
}

.site-account-submenu-title {
    display: none;
}

.site-account-submenu a,
.site-account-submenu button {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #25332e;
    font: inherit;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

.site-account-submenu a:hover,
.site-account-submenu button:hover {
    background: #edf6f0;
}

.site-account-submenu [hidden],
[data-account-page] [hidden] {
    display: none !important;
}

[data-favorites-page] [hidden] { display: none !important; }

/* ==================== ACCOUNT PAGE ==================== */
.account-page {
    min-height: 100vh;
    background: #fff;
    color: #25332e;
}

.account-page.account-signed-out {
    display: flex;
    min-height: 100dvh;
    flex-direction: column;
}

.account-container {
    width: min(100% - 32px, 760px);
    margin: 48px auto 80px;
}

.account-page.account-signed-out .account-container {
    display: grid;
    width: 100%;
    flex: 1;
    place-items: center;
    margin: 0;
    padding: 32px 16px;
}

.account-page.account-signed-out .account-container > section {
    width: min(100%, 760px);
    margin: 0 auto;
    text-align: center;
}

.account-page.account-signed-out .account-status:empty {
    display: none;
}

.account-meta,
.password-hint {
    color: #68766f;
    line-height: 1.55;
}

.account-status {
    min-height: 24px;
    margin: 0 0 16px;
    color: #52625a;
    line-height: 1.5;
}

.account-status[data-state="success"] {
    color: #236650;
}

.account-status[data-state="error"] {
    color: #a33434;
}

.account-form {
    display: grid;
    gap: 16px;
}

.account-form h2 {
    margin: 2px 0 0;
    font-size: 1.25rem;
}

.account-readonly-details {
    display: grid;
    gap: 16px;
}

.account-readonly-details h2 {
    margin: 2px 0 0;
    font-size: 1.25rem;
}

.account-identity {
    display: grid;
    gap: 14px;
    margin: 0;
}

.account-identity > div {
    display: grid;
    gap: 5px;
}

.account-identity dt {
    color: #35443c;
    font-size: 0.95rem;
    font-weight: 650;
}

.account-identity dd {
    margin: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.account-form label {
    display: grid;
    gap: 7px;
    color: #35443c;
    font-size: 0.95rem;
    font-weight: 650;
}

.account-form-field {
    display: grid;
    gap: 7px;
}

.password-input-wrap {
    position: relative;
}

.account-form input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #ccd8d0;
    border-radius: 10px;
    background: white;
    color: #25332e;
    font: inherit;
    font-weight: 400;
}

.account-form input:focus {
    border-color: #31836b;
    outline: 3px solid rgba(49, 131, 107, 0.16);
}

.account-form .password-input-wrap input {
    padding-right: 54px;
}

.password-visibility-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 8px;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #68766f;
    cursor: pointer;
}

.password-visibility-toggle:hover {
    background: #edf6f0;
    color: #236650;
}

.password-visibility-toggle:focus-visible {
    outline: 3px solid rgba(49, 131, 107, 0.3);
    outline-offset: 1px;
}

.password-visibility-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.password-visibility-toggle [data-password-icon-show] {
    display: block;
}

.password-visibility-toggle [data-password-icon-hide] {
    display: none;
}

.password-visibility-toggle[aria-pressed="true"] [data-password-icon-show] {
    display: none;
}

.password-visibility-toggle[aria-pressed="true"] [data-password-icon-hide] {
    display: block;
}

.password-hint {
    margin-top: -7px;
    font-size: 0.88rem;
}

.account-submit {
    min-height: 48px;
    padding: 12px 18px;
    border: 0;
    border-radius: 10px;
    background: #31836b;
    color: white;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.account-submit:hover {
    background: #236650;
}

.account-secondary {
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid #b8cbc0;
    border-radius: 10px;
    background: #fff;
    color: #236650;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.account-secondary:hover {
    background: #edf6f0;
}

.account-danger {
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid #b93939;
    border-radius: 10px;
    background: #fff;
    color: #a33434;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.account-danger:hover {
    background: #fff1f1;
}

.account-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.account-actions {
    display: grid;
    gap: 16px;
    margin-top: 8px;
    padding-top: 24px;
    border-top: 1px solid #dce8df;
}

.account-actions h2 {
    margin-bottom: 0;
}

.account-actions a {
    color: #236650;
    font-weight: 700;
}

.account-actions .account-privacy-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid #d7e6dc;
    border-radius: 12px;
    background: #f7fbf8;
    color: #25332e;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.account-privacy-link:hover {
    border-color: #8fbeaa;
    background: #eef7f1;
    transform: translateY(-1px);
}

.account-privacy-link span:first-child {
    display: grid;
    gap: 4px;
}

.account-privacy-link small {
    color: #63736b;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
}

.account-privacy-link-arrow {
    color: #31836b;
    font-size: 1.35rem;
    transition: transform 0.2s ease;
}

.account-privacy-link:hover .account-privacy-link-arrow {
    transform: translateX(4px);
}

.account-actions .account-danger {
    justify-self: start;
}

.account-actions .account-delete-link {
    display: flex;
    width: 100%;
    min-height: 0;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border-color: #efd0d0;
    border-radius: 12px;
    background: #fff8f8;
    color: #702929;
    text-align: left;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.account-delete-link:hover {
    border-color: #d89595;
    background: #fff1f1;
    transform: translateY(-1px);
}

.account-delete-link span:first-child {
    display: grid;
    gap: 4px;
}

.account-delete-link small {
    color: #896060;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
}

.account-delete-link-arrow {
    color: #a33434;
    font-size: 1.35rem;
    transition: transform 0.2s ease;
}

.account-delete-link:hover .account-delete-link-arrow {
    transform: translateX(4px);
}

.privacy-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 12%, rgba(165, 213, 190, 0.22), transparent 28rem),
        linear-gradient(180deg, #eef6f1 0, #f7faf8 420px, #f7faf8 100%);
    color: #25332e;
}

.privacy-container {
    width: min(100% - 40px, 960px);
    margin: 0 auto;
    padding: 34px 0 88px;
}

.privacy-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    color: #365a4b;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.privacy-back span {
    font-size: 1.15rem;
    transition: transform 0.2s ease;
}

.privacy-back:hover span {
    transform: translateX(-4px);
}

.privacy-policy {
    overflow: hidden;
    border: 1px solid rgba(174, 199, 185, 0.7);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(42, 75, 60, 0.11);
}

.privacy-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(42px, 7vw, 72px) clamp(28px, 8vw, 80px) clamp(38px, 6vw, 60px);
    background: linear-gradient(135deg, #173f33 0%, #286b56 58%, #31836b 100%);
    color: #fff;
}

.privacy-hero::after {
    position: absolute;
    right: -90px;
    bottom: -150px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    box-shadow: 0 0 0 48px rgba(255, 255, 255, 0.045), 0 0 0 96px rgba(255, 255, 255, 0.025);
    content: "";
}

.privacy-eyebrow {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    color: #bfe9d8;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.privacy-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0;
    font-size: clamp(2.45rem, 7vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.privacy-lede {
    position: relative;
    z-index: 1;
    max-width: 610px;
    margin: 22px 0 28px;
    color: #e5f2ec;
    font-size: clamp(1.05rem, 2vw, 1.22rem);
    line-height: 1.65;
}

.privacy-updated {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: #eaf6f1;
    font-size: 0.84rem;
    font-weight: 650;
}

.privacy-updated span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9ce0c2;
    box-shadow: 0 0 0 4px rgba(156, 224, 194, 0.13);
}

.privacy-content {
    padding: clamp(30px, 7vw, 72px) clamp(28px, 8vw, 80px) clamp(42px, 8vw, 84px);
}

.privacy-summary {
    margin-bottom: 48px;
    padding: 22px 24px;
    border-left: 4px solid #31836b;
    border-radius: 0 12px 12px 0;
    background: #eef7f2;
}

.privacy-summary strong {
    display: block;
    margin-bottom: 6px;
    color: #1e5a46;
    font-size: 1rem;
}

.privacy-summary p {
    margin: 0;
}

.privacy-section {
    padding: 34px 0;
    border-top: 1px solid #e3ece7;
}

.privacy-summary + .privacy-section {
    padding-top: 0;
    border-top: 0;
}

.privacy-section h2 {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin: 0 0 18px;
    color: #1f382f;
    font-size: clamp(1.25rem, 3vw, 1.52rem);
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.privacy-section h2 span {
    color: #31836b;
    font-size: 0.73rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.privacy-section p,
.privacy-section li,
.privacy-section address {
    color: #52645c;
    font-size: 1rem;
    line-height: 1.75;
}

.privacy-section p + p {
    margin-top: 13px;
}

.privacy-section ul {
    display: grid;
    gap: 9px;
    margin: 15px 0 18px;
    padding-left: 0;
    list-style: none;
}

.privacy-section li {
    position: relative;
    padding-left: 28px;
}

.privacy-section li::before {
    position: absolute;
    top: 0.69em;
    left: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #68ad91;
    content: "";
}

.privacy-contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 32px;
    margin-top: 22px;
    padding: 30px;
    border: 0;
    border-radius: 16px;
    background: #f1f7f3;
}

.privacy-contact .privacy-eyebrow {
    margin-bottom: 9px;
    color: #31836b;
}

.privacy-contact h2 {
    margin-bottom: 10px;
}

.privacy-contact address {
    display: grid;
    gap: 8px;
    font-style: normal;
    text-align: right;
}

.privacy-contact a {
    color: #236650;
    font-weight: 750;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

@media (max-width: 640px) {
    .privacy-container {
        width: min(100% - 24px, 960px);
        padding-top: 22px;
        padding-bottom: 48px;
    }

    .privacy-policy {
        border-radius: 18px;
    }

    .privacy-hero {
        padding: 38px 24px 36px;
    }

    .privacy-content {
        padding: 30px 24px 48px;
    }

    .privacy-summary {
        margin-bottom: 34px;
        padding: 18px 18px;
    }

    .privacy-section {
        padding: 28px 0;
    }

    .privacy-section h2 {
        gap: 10px;
    }

    .privacy-contact {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 20px;
        padding: 24px;
    }

    .privacy-contact address {
        text-align: left;
    }
}

.account-signin-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.account-signin-required > p {
    margin: 0;
    color: #25332e;
    font-size: 1.5rem;
    line-height: 1.5;
}

.account-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px !important;
    cursor: pointer;
}

.account-form .account-checkbox-label input[type="checkbox"] {
    flex: 0 0 20px;
    width: 20px;
    min-height: 20px;
    height: 20px;
    margin: 0;
    accent-color: #31836b;
}

.account-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(100% - 28px, 460px);
    max-width: 460px;
    max-height: min(92dvh, 820px);
    padding: 0;
    overflow-y: auto;
    border: 1px solid #dbe6df;
    border-radius: 20px;
    background: #fff;
    color: #25332e;
    box-shadow: 0 24px 80px rgba(14, 35, 25, 0.3);
}

.account-dialog::backdrop {
    background: rgba(16, 31, 24, 0.62);
    backdrop-filter: blur(3px);
}

.account-dialog-content {
    position: relative;
    padding: clamp(24px, 6vw, 38px);
}

.account-dialog [hidden] {
    display: none !important;
}

.account-dialog-content > .section-eyebrow {
    margin: 0 0 8px;
    color: #31836b;
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.account-dialog-content h2 {
    margin: 0 38px 16px 0;
    font-size: clamp(1.5rem, 5vw, 1.9rem);
}

.account-dialog-close {
    position: absolute;
    top: 15px;
    right: 15px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f0f5f2;
    color: #35443c;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
}

.account-dialog-close:hover {
    background: #e1ece5;
}

.account-dialog-status {
    min-height: 24px;
    margin: 0 0 12px;
    color: #52625a;
    line-height: 1.45;
}

.account-dialog-status[data-state="error"] {
    color: #a33434;
}

.account-dialog-switch {
    margin: 20px 0 0;
    color: #68766f;
    text-align: center;
}

.account-dialog-switch button {
    padding: 4px;
    border: 0;
    background: transparent;
    color: #236650;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.account-dialog-switch button:hover {
    text-decoration: underline;
}

.account-profile {
    display: grid;
    gap: 30px;
}

.account-meta {
    margin: 0;
    font-size: 0.9rem;
}

.account-password-form {
    padding-top: 26px;
    border-top: 1px solid #e4ebe6;
}

@media (max-width: 768px) {
    .site-header {
        height: 72px;
        flex-basis: 72px;
        padding: 8px 16px;
    }

    .site-header .logo-icon {
        height: 52px;
    }

    .site-account-menu {
        position: static;
    }

    .site-account-trigger {
        width: 48px;
        height: 48px;
        min-height: 48px;
        padding: 10px;
        border-color: #dbe5df;
        background: white;
        color: #25332e;
    }

    .site-account-trigger:hover {
        background: #edf6f0;
    }

    .site-account-trigger-label {
        display: none;
    }

    .site-account-menu-bars {
        display: grid;
        width: 22px;
        gap: 5px;
    }

    .site-account-menu-bars span {
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
    }

    .site-account-submenu {
        position: absolute;
        top: 100%;
        right: 12px;
        left: 12px;
        z-index: 1200;
        min-width: 0;
    }

    .site-account-submenu-title {
        display: block;
        padding: 10px 12px;
        border-bottom: 1px solid #e5ece7;
        color: #52625a;
        font-size: 0.86rem;
        font-weight: 750;
    }

    .home-page .site-account-trigger {
        border-color: rgba(255, 255, 255, 0.6);
        background: rgba(20, 35, 29, 0.36);
        color: white;
    }

    .home-page .site-account-trigger:hover {
        background: rgba(20, 35, 29, 0.58);
    }

    .account-container {
        margin-top: 28px;
    }
}

@media (max-width: 520px) {
    .site-header {
        gap: 8px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .site-header .logo-icon {
        height: 42px;
    }

}

.header-search-container {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    max-width: 600px;
}

/* Compact Place Type Selector for Results Header */
.place-type-selector-compact {
    display: flex;
    gap: 8px;
    background: rgba(102, 126, 234, 0.08);
    padding: 6px;
    border-radius: 30px;
    flex-shrink: 0;
}

.type-option-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: white;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.type-option-compact:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.type-option-compact.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.type-option-compact .type-icon {
    font-size: 20px;
    transition: transform 0.2s;
}

.type-option-compact:hover .type-icon {
    transform: scale(1.1);
}

.search-box-header {
    display: flex;
    gap: 12px;
    flex: 1;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-input-wrapper .suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-input-wrapper .suggestions.hidden {
    display: none;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.4;
    pointer-events: none;
}

.search-box-header #searchInput {
    width: 100%;
    padding: 14px 20px 14px 48px;
    font-size: 15px;
    border: 2px solid rgba(102, 126, 234, 0.15);
    border-radius: 10px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-box-header #searchInput:focus {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.search-box-header #searchBtn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.search-box-header #searchBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.search-box-header #searchBtn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 18px;
    transition: transform 0.3s;
}

.search-box-header #searchBtn:hover .btn-icon {
    transform: translateX(4px);
}

/* Results Container */
.results-container {
    display: flex;
    flex: 1;
    height: auto;
    min-height: 0;
    position: relative;
}

/* Sidebar */
.results-sidebar {
    width: 420px;
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    order: 2;
}

.results-sidebar::-webkit-scrollbar {
    width: 10px;
}

.results-sidebar::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    margin: 8px 0;
}

.results-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background 0.3s;
}

.results-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.5) 0%, rgba(118, 75, 162, 0.5) 100%);
    background-clip: padding-box;
}

.results-sidebar::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%);
    background-clip: padding-box;
}

.results-sidebar.hidden-mobile {
    transform: translateX(100%);
    width: 0;
    overflow: hidden;
}

.results-info {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px 24px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
    margin: 16px 16px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.results-count-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.count-icon {
    font-size: 20px;
}

/* Filter Dialog */
.filter-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.filter-dialog.hidden {
    display: none;
}

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

.filter-dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.filter-dialog-content {
    position: relative;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.filter-dialog-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
}

.filter-dialog-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.filter-dialog-close:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.filter-dialog-body {
    padding: 16px 28px 24px;
    overflow-y: auto;
    flex: 1;
}

.filter-section {
    margin-bottom: 24px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    cursor: pointer;
    user-select: none;
}

.filter-section-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
}

.collapse-icon {
    font-size: 12px;
    color: #667eea;
    transition: transform 0.2s;
}

.filter-section.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.filter-section.collapsed .filter-chips {
    display: none;
}

.filter-dialog-body::-webkit-scrollbar {
    width: 8px;
}

.filter-dialog-body::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
}

.filter-dialog-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-radius: 10px;
}

.filter-dialog-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.5) 0%, rgba(118, 75, 162, 0.5) 100%);
}

.filter-dialog-footer {
    display: flex;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.clear-filters-btn {
    flex: 1;
    padding: 14px 24px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-filters-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.clear-filters-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.apply-filters-btn {
    flex: 1;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.apply-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid rgba(102, 126, 234, 0.2);
    background: white;
    color: #667eea;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.filter-chip:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.filter-chip:active {
    transform: translateY(0);
}

.filter-chip.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.filter-icon {
    font-size: 16px;
    line-height: 1;
}

.filter-name {
    line-height: 1;
}

.filter-count {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.filter-chip.active .filter-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Results List */
.results-list {
    padding: 16px 16px 16px;
}

.place-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    overflow: hidden;
}

.place-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.place-card.selected {
    border-color: #667eea;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
    transform: translateY(-4px) scale(1.01);
}

.place-image {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    overflow: hidden;
}

.place-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.place-card:hover .place-image::after {
    opacity: 1;
}

.place-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.place-card:hover .place-image img {
    transform: scale(1.05);
}

.place-image-placeholder {
    font-size: 56px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.place-card:hover .place-image-placeholder {
    transform: scale(1.1) rotate(5deg);
}

.place-content {
    padding: 0;
}

.place-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
    gap: 12px;
}

.place-header-left {
    flex: 1;
    min-width: 0;
}

.place-title {
    font-size: 17px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.3;
}

.place-location {
    color: #666;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}


.place-price {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.place-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.place-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e8eaf6 0%, #f3e5f5 100%);
    color: #5c6bc0;
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 700;
}

.place-type i {
    font-size: 18px;
}

.place-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #ffa726;
}

.place-rating::before {
    content: '⭐';
    font-size: 14px;
}

.place-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.2s;
}

.tag:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.tag.activity {
    background: rgba(123, 31, 162, 0.1);
    color: #7b1fa2;
    border-color: rgba(123, 31, 162, 0.2);
}

.tag.activity:hover {
    background: rgba(123, 31, 162, 0.15);
    border-color: rgba(123, 31, 162, 0.3);
}

/* Icon-based tags */
.tag.tag-icon {
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.tag.tag-icon:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.2);
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tag.tag-icon i {
    display: block;
}

.tag-icon.tooltip-visible {
    position: relative;
}

.tag-icon.tooltip-visible::after {
    content: attr(title);
    position: absolute;
    z-index: 20;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    padding: 6px 9px;
    border-radius: 5px;
    background: #222;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
}

/* Count badge tag */
.tag.tag-count {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.2);
    cursor: pointer;
}

.tag.tag-count:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

/* Search Loading State */
.search-loading {
    text-align: center;
    padding: 60px 30px;
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 30px;
    color: #666;
}

.no-results.hidden {
    display: none;
}

.no-results-illustration {
    position: relative;
    display: inline-block;
    margin-bottom: 32px;
    animation: float 3s ease-in-out infinite;
}

.magnifier {
    font-size: 72px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}

.empty-marker {
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 36px;
    opacity: 0.6;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.no-results h3 {
    color: #1a1a1a;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 800;
}

.no-results p {
    font-size: 15px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.6;
}

.no-results-tips {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.tip {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
    background: #e0e5ec;
    order: 1;
}

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

.results-page .leaflet-top.leaflet-left {
    top: 10px;
}

.results-page .leaflet-control-zoom {
    display: none;
}

/* Glassmorphism components */
.glass-button {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-button:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}

/* Fix Leaflet attribution z-index and positioning */
.leaflet-control-attribution {
    z-index: 999 !important;
    max-width: calc(100% - 20px);
    font-size: 10px;
    line-height: 1.4;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    border-radius: 8px;
}

.leaflet-bottom.leaflet-right {
    z-index: 999;
}

/* Custom popup styling */
.leaflet-popup-content-wrapper {
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.leaflet-popup-content {
    margin: 20px;
    line-height: 1.6;
}

.leaflet-popup-tip {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.custom-popup .leaflet-popup-close-button {
    font-size: 24px;
    padding: 8px 12px;
    color: #666;
    transition: color 0.2s;
}

.custom-popup .leaflet-popup-close-button:hover {
    color: #667eea;
}

/* Custom Markers */
.custom-marker {
    transition: filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible !important;
}

.custom-marker.highlighted,
.place-cluster.highlighted {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
    z-index: 1000 !important;
}

/* Marker Icon Styling */
.marker-icon {
    box-sizing: border-box;
    background: var(--marker-color, #68766f);
    color: #fff;
    width: 42px;
    height: 42px;
    margin: 3px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2.5px solid #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.marker-icon i {
    font-size: 23px;
}

.marker-icon.mystery-marker {
    background: #68766f;
    cursor: help;
}

.marker-icon.mystery-marker i {
    color: #fff;
    font-size: 23px;
    font-weight: 700;
}

.place-cluster-icon {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #31836b;
    color: #fff;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

.custom-marker:focus-visible .marker-icon,
.place-cluster:focus-visible .place-cluster-icon {
    outline: 3px solid #25332e;
    outline-offset: 3px;
}

.mystery-place-card {
    width: 100%;
    min-height: 112px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    text-align: left;
    color: #594a34;
    background: linear-gradient(120deg, #fffaf0, #f8eed8);
    border: 1px dashed #d2b77e;
    cursor: pointer;
}

.mystery-place-icon,
.restricted-place-dialog-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    color: #916a2d;
    background: #f2e3bf;
    border-radius: 50%;
}

.mystery-place-copy {
    display: grid;
    gap: 5px;
}

.mystery-place-copy span {
    color: #78694f;
    font-size: 0.9rem;
}

.mystery-place-lock {
    margin-left: auto;
    color: #a18a60;
}

.restricted-place-dialog {
    width: min(420px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    overflow-y: auto;
    padding: 32px;
    color: #263238;
    text-align: center;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(19, 35, 45, 0.28);
}

.restricted-place-dialog::backdrop {
    background: rgba(20, 31, 39, 0.55);
    backdrop-filter: blur(3px);
}

.restricted-place-close {
    position: absolute;
    top: 12px;
    right: 14px;
    padding: 4px 8px;
    color: #65727a;
    background: transparent;
    border: 0;
    font-size: 28px;
    cursor: pointer;
}

.restricted-place-dialog-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    font-size: 22px;
}

.restricted-place-dialog h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

.restricted-place-dialog p {
    margin: 0;
    color: #64727a;
    line-height: 1.55;
}

.restricted-place-actions {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.restricted-place-actions button {
    min-height: 46px;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.restricted-place-register {
    color: #fff;
    background: #286f65;
    border: 1px solid #286f65;
}

.restricted-place-login {
    color: #286f65;
    background: #fff;
    border: 1px solid #b7d0cb;
}

/* Scale around the geographic center when a place is highlighted. */
.custom-marker.highlighted .marker-icon {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Map Controls Container (top-right) */
.map-controls-top-right {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

/* Toggle Sidebar Button */
.toggle-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 16px;
    padding: 14px 18px;
    cursor: pointer;
    font-size: 20px;
    color: #667eea;
    flex-shrink: 0;
}

.toggle-sidebar:hover {
    color: #764ba2;
}

/* Filter Button */
.filter-btn {
    border: none;
    border-radius: 16px;
    padding: 14px 18px;
    cursor: pointer;
    font-size: 20px;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.filter-btn.hidden {
    display: none;
}

.filter-btn:hover {
    color: #764ba2;
}

/* Floating Search */
.floating-search {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    flex-shrink: 0;
}

.floating-search-btn {
    border: none;
    border-radius: 16px;
    padding: 14px 18px;
    cursor: pointer;
    font-size: 20px;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.floating-search-btn:hover {
    color: #764ba2;
}


.floating-search-box {
    position: absolute;
    right: calc(100% + 8px);
    top: 0;
    width: 300px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-search-box.hidden {
    display: none;
}

.floating-search-box input {
    width: 100%;
    padding: 14px 18px;
    font-size: 20px;
    border: 2px solid rgba(102, 126, 234, 0.15);
    border-radius: 16px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    height: 48px;
    box-sizing: border-box;
}

.floating-search-box input:focus {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.floating-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1003;
    margin-top: 4px;
}

.floating-suggestions.hidden {
    display: none;
}

.filter-btn-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.filter-btn-badge.hidden {
    display: none;
}

/* Search This Area Button */
.search-this-area {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    transition: opacity 0.1s ease-out, transform 0.1s ease-out, box-shadow 0.1s ease-out, background 0.1s ease-out;
    white-space: nowrap;
}

.search-this-area:hover {
    background: linear-gradient(135deg, #7b8ff0 0%, #8d5bb8 100%);
    color: white;
    transform: translateX(-50%);
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.5);
}

.search-this-area:active {
    transform: translateX(-50%) translateY(-2px);
}

.search-this-area.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

.button-icon {
    font-size: 18px;
}

.search-loading-indicator {
    display: none;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
}

.search-loading-indicator img {
    display: block;
    width: 100%;
    height: 100%;
}

.search-this-area.is-loading .button-icon,
.search-this-area.is-loading .button-text {
    display: none;
}

.search-this-area.is-loading .search-loading-indicator {
    display: inline-flex;
}

.search-this-area:disabled {
    cursor: wait;
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 40px;
    right: 24px;
    z-index: 1000;
    padding: 16px 20px;
    max-width: 200px;
}

.map-legend.hidden {
    display: none;
}

.legend-title {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.legend-item span {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

/* Map Popup Card (shown when sidebar is hidden) */
.map-popup-card {
    position: absolute;
    z-index: 1000;
    width: 320px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.3);
    pointer-events: auto;
    transition: opacity 0.2s, transform 0.2s;
}

.map-popup-card.hidden {
    display: none;
}

.map-popup-card::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

/* Arrow pointing left (when popup is on the right of marker) */
.map-popup-card.arrow-left::before {
    left: -20px;
    top: 20px;
    border-right-color: rgba(102, 126, 234, 0.3);
}

/* Arrow pointing right (when popup is on the left of marker) */
.map-popup-card.arrow-right::before {
    right: -20px;
    top: 20px;
    border-left-color: rgba(102, 126, 234, 0.3);
}

/* Arrow pointing down (when popup is above marker) */
.map-popup-card.arrow-down::before {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: rgba(102, 126, 234, 0.3);
}

/* Arrow pointing up (when popup is below marker) */
.map-popup-card.arrow-up::before {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: rgba(102, 126, 234, 0.3);
}

.map-popup-card .place-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
    gap: 10px;
}

.map-popup-card .place-header-left {
    flex: 1;
    min-width: 0;
}

.map-popup-card .place-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.map-popup-card .place-location {
    color: #666;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.map-popup-card .place-location::before {
    content: '📍';
    font-size: 11px;
}

.map-popup-card .place-price {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.map-popup-card .place-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.map-popup-card .place-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #e8eaf6 0%, #f3e5f5 100%);
    color: #5c6bc0;
    padding: 7px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.map-popup-card .place-type i {
    font-size: 16px;
}

.map-popup-card .place-rating {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #f57c00;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
}

.map-popup-card .place-rating::before {
    content: '⭐';
    font-size: 12px;
}

.map-popup-card .place-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.map-popup-card .tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}

.map-popup-card .tag.tag-icon {
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.map-popup-card .tag.tag-icon:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.2);
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.map-popup-card .tag.tag-count {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
    cursor: pointer;
}

.map-popup-card .tag.tag-count:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.map-popup-card .popup-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.map-popup-card .popup-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.map-popup-card .popup-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.map-popup-card .popup-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.map-popup-card .popup-btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.map-popup-card .popup-btn-secondary:hover {
    background: rgba(102, 126, 234, 0.2);
}

.map-popup-card .popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
    transition: all 0.2s;
}

.map-popup-card .popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* Loading Overlay (Results Page) */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.hidden {
    display: none;
}

.loading-content {
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.loading-van {
    font-size: 80px;
    margin-bottom: 24px;
    animation: drive 2s ease-in-out infinite;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.15));
}

@keyframes drive {
    0%, 100% { transform: translateX(-20px); }
    50% { transform: translateX(20px); }
}

.loading-overlay p {
    margin-top: 24px;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-overlay .spinner {
    border-color: rgba(102, 126, 234, 0.15);
    border-top-color: #667eea;
    width: 50px;
    height: 50px;
    border-width: 4px;
}

/* ==================== RESPONSIVE ==================== */

/* Tablet */
@media (max-width: 1024px) {
    .results-sidebar {
        width: 380px;
    }

    .results-header {
        padding: 14px 20px;
        gap: 16px;
    }

    .search-box-header {
        max-width: 500px;
    }

    .place-image {
        height: 140px;
    }

    .place-content {
        padding: 16px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Homepage */
    .discovery-section {
        padding: 68px 24px 76px;
    }

    .discovery-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .discovery-card {
        padding: 24px;
    }

    .world-map-section {
        padding: 60px 20px 40px;
    }

    .world-map-panel {
        border-radius: 16px;
    }

    .world-map-canvas {
        height: 280px;
    }

    .collection-stats {
        padding: 40px 24px 68px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .hero-logo {
        height: 52px;
    }

    .hero-brand {
        top: max(12px, env(safe-area-inset-top));
        left: max(12px, env(safe-area-inset-left));
    }

    .place-type-selector {
        gap: 8px;
        margin-bottom: 20px;
    }

    .type-option {
        min-width: auto;
        padding: 12px 16px;
        flex: 1;
    }

    .type-icon {
        font-size: 24px;
    }

    .type-label {
        font-size: 12px;
    }

    .search-box {
        flex-direction: column;
        gap: 12px;
    }

    #searchBtn {
        width: 100%;
        padding: 16px;
    }

    .suggestions {
        width: 90%;
    }

    /* Hide mapHint on mobile */
    .map-hint {
        display: none !important;
    }

    /* Show explore map button on mobile */
    .explore-map-btn {
        display: flex;
        width: 100%;
        padding: 16px;
    }

    /* Results Page - Keep the logo header above the map */
    .results-header {
        height: 72px;
        flex-basis: 72px;
        padding: 8px 16px;
    }

    .results-page .leaflet-top.leaflet-left {
        top: 0;
    }

    .logo {
        font-size: 18px;
    }

    .logo-icon {
        height: 52px;
    }

    .header-search-container {
        order: 3;
        width: 100%;
        max-width: none;
        margin-top: 12px;
        flex-direction: column;
        gap: 12px;
    }

    .place-type-selector-compact {
        justify-content: center;
        width: 100%;
    }

    .type-option-compact {
        width: 40px;
        height: 40px;
    }

    .type-option-compact .type-icon {
        font-size: 18px;
    }

    .search-box-header {
        width: 100%;
        max-width: none;
        flex-direction: column;
    }

    .search-input-wrapper {
        width: 100%;
    }

    .search-box-header #searchBtn {
        width: 100%;
        justify-content: center;
    }

    /* Results container - use flex to take remaining space */
    .results-container {
        flex: 1;
        height: auto;
        min-height: 0;
    }

    /* Sidebar - Hidden by default on mobile */
    .results-sidebar {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1001;
        background: rgba(245, 247, 250, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        transform: translateX(-100%);
    }

    .results-sidebar:not(.hidden-mobile) {
        transform: translateX(0);
    }

    .results-info {
        margin: 12px;
    }

    .filter-chip {
        font-size: 12px;
        padding: 7px 12px;
        gap: 5px;
    }

    .filter-icon {
        font-size: 14px;
    }

    .filter-count {
        font-size: 10px;
        padding: 2px 6px;
    }

    /* Filter dialog on mobile */
    .filter-dialog-content {
        width: 95%;
        max-height: 75vh; /* Reduce to prevent exceeding viewport */
    }

    .filter-dialog-header {
        padding: 16px 20px;
    }

    .filter-dialog-header h3 {
        font-size: 18px;
    }

    .filter-dialog-body {
        padding: 16px 20px;
        max-height: calc(75vh - 140px); /* Account for header + footer */
        overflow-y: auto;
    }

    .filter-dialog-footer {
        padding: 16px 20px;
        flex-direction: column;
    }

    .clear-filters-btn,
    .apply-filters-btn {
        width: 100%;
    }

    .results-list {
        padding: 0 12px 12px;
    }

    .place-card {
        margin-bottom: 12px;
    }

    .place-image {
        height: 140px;
    }

    /* Map takes full available space on mobile */
    .map-container {
        width: 100%;
        height: 100%;
    }

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

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

    /* Force sidebar to stay hidden on mobile */
    .results-sidebar {
        transform: translateX(100%) !important;
        width: 0 !important;
        overflow: hidden !important;
    }

    /* Ensure "Search this area" button is visible and accessible */
    .search-this-area {
        bottom: 20px;
        font-size: 14px;
        padding: 14px 24px;
    }

    .search-this-area.is-loading {
        justify-content: center;
        min-width: 52px;
        min-height: 50px;
        padding: 12px;
    }

    .search-this-area.is-loading .search-loading-indicator {
        display: inline-flex;
        width: 26px;
        height: 26px;
    }

    .button-text {
        display: none;
    }

    .button-icon {
        font-size: 20px;
    }

    /* Hide map legend on mobile */
    .map-legend {
        display: none !important;
    }

    /* Map controls on mobile - ensure they stay on one line */
    .map-controls-top-right {
        top: 12px;
        right: 12px;
        gap: 6px;
    }

    .floating-search-btn,
    .filter-btn,
    .toggle-sidebar {
        padding: 10px 12px;
        font-size: 18px;
    }

    .floating-search-box {
        /* Keep the input beside its button inside the map controls row. */
        position: absolute;
        right: calc(100% + 8px);
        top: 0;
        width: 240px;
        z-index: 1002;
    }

    .floating-search-box input {
        height: 42px;
        padding: 10px 14px;
        font-size: 16px;
    }

    /* Adjust loading animation */
    .loading-van {
        font-size: 60px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: 112px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    #searchInput {
        padding: 16px 20px;
        font-size: 15px;
    }

    .results-sidebar {
        width: 100%;
    }

    .place-title {
        font-size: 16px;
    }

    .place-price {
        font-size: 12px;
        padding: 6px 12px;
    }

    .place-tags {
        gap: 6px;
    }

    .tag {
        font-size: 10px;
        padding: 5px 10px;
    }

    .search-this-area {
        bottom: 20px;
    }

    .no-results {
        padding: 40px 20px;
    }

    .magnifier {
        font-size: 56px;
    }

    .empty-marker {
        font-size: 28px;
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    .discovery-cards {
        row-gap: 24px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        height: auto;
        min-height: 100vh;
        min-height: 100svh;
        padding: 40px 0 124px;
    }

    .hero-subtitle {
        margin-bottom: 2rem;
    }
}
.favorite-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 44px;
    min-width: 44px;
    padding: 6px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #d83a4b;
    font: inherit;
    cursor: pointer;
}

.favorite-toggle svg,
.favorites-heading-icon svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.favorite-toggle:hover { background: #fff0f2; }

.favorite-toggle[aria-pressed="true"] svg { fill: currentColor; }
.favorite-toggle:disabled { opacity: 0.6; cursor: wait; }
.favorite-toggle:focus-visible { outline: 3px solid #96d0b2; outline-offset: 3px; }
.favorite-status { font-size: 16px; margin: 8px 0 0; }
.favorite-status:empty { display: none; }
.favorite-collection { scroll-margin-top: 24px; }
.favorite-place-link { display: block; text-decoration: none; }
.favorite-place-link:focus-visible { outline: 3px solid #667eea; outline-offset: 2px; }
.favorite-list .related-place-card-features { margin-top: 10px; }
.favorite-list p { margin-top: 6px; color: #68766f; font-size: 13px; line-height: 1.4; }
.favorite-list .account-secondary { align-self: flex-start; min-height: 36px; padding: 6px 12px; font-size: 13px; }

.favorites-page { min-height: 100vh; background: #f7faf8; color: #25332e; }
.favorites-container { width: min(100%, 1200px); padding: 0 25px; margin: 48px auto 80px; }
.favorites-heading { text-align: center; margin-bottom: 32px; }
.favorites-heading h1 { font-size: clamp(28px, 5vw, 36px); margin: 12px 0; }
.favorites-heading p, .favorites-footer p { color: #68766f; line-height: 1.6; }
.favorites-heading-icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff0f2;
    color: #d83a4b;
}
.favorites-heading-icon svg { fill: currentColor; }
.favorites-container > .account-status { text-align: center; }
.favorites-container .account-signin-required { text-align: center; }
.favorites-container .account-signin-required > p { font-size: 1rem; margin-top: 12px; }
.favorites-footer { text-align: center; margin-top: 32px; }
.favorites-footer p { margin-bottom: 20px; }
.favorites-footer a, .favorite-dialog-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.favorite-dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.favorite-dialog-actions > * { flex: 1 1 auto; }

/* Shared cards for related places and saved favorites. */
.related-place-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.related-place-list li {
    min-width: 0;
}

.related-place-card {
    display: flex;
    width: 100%;
    min-height: 120px;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    height: 100%;
    padding: 14px;
    border: 1px solid rgba(102, 126, 234, 0.28);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.08);
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.related-place-card:hover {
    transform: translateY(-2px);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 10px 26px rgba(31, 41, 55, 0.14);
}

.related-place-card:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.related-place-card-title {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.related-place-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.related-place-type-icon {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(102, 126, 234, 0.16);
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.08);
    font-size: 20px;
}

.related-place-card-features {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.related-place-feature-icon {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(102, 126, 234, 0.14);
    border-radius: 9px;
    background: rgba(102, 126, 234, 0.06);
    font-size: 14px;
}

.related-place-feature-more {
    display: inline-flex;
    min-width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 9px;
    background: rgba(102, 126, 234, 0.1);
    color: #5264bc;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .related-place-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .related-place-list { grid-template-columns: 1fr; }
}
