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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    background: #f5f5f7;
    color: #1d1d1f;
    -webkit-font-smoothing: antialiased;
}

/* ── Globe Section ─────────────────────────────────────────── */

#globe-section {
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 520px;
    background: #070b18;
    overflow: hidden;
    user-select: none;
}

#globe-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

#globe-canvas:active {
    cursor: grabbing;
}

#globe-ui {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

#library-switcher {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 30;
    pointer-events: auto;
}

#library-switcher-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    max-width: min(360px, calc(100vw - 48px));
    padding: 0 11px 0 5px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 9px;
    background: rgba(10, 15, 34, 0.58);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(16px) saturate(1.35);
    -webkit-backdrop-filter: blur(16px) saturate(1.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

#library-switcher-trigger:hover,
#library-switcher-trigger[aria-expanded="true"] {
    background: rgba(20, 33, 67, 0.72);
    border-color: rgba(255, 255, 255, 0.22);
}

#library-switcher-trigger:active {
    transform: translateY(0.5px);
}

.library-switcher-site-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.16);
}

.library-switcher-kind-icon,
.library-switcher-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    color: #7ed3ff;
    flex-shrink: 0;
}

.library-switcher-kind-icon svg,
.library-switcher-row-icon svg {
    width: 15px;
    height: 15px;
    display: block;
}

#library-switcher-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.library-switcher-chevron {
    width: 10px;
    height: 10px;
    opacity: 0.65;
    flex-shrink: 0;
    transition: transform 0.16s ease;
}

#library-switcher-trigger[aria-expanded="true"] .library-switcher-chevron {
    transform: rotate(180deg);
}

#library-switcher-menu {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    width: max-content;
    min-width: 230px;
    max-width: min(320px, calc(100vw - 48px));
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    background: rgba(8, 12, 28, 0.94);
    color: #fff;
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
    box-shadow: 0 24px 70px rgba(0,0,0,0.36);
}

.library-switcher-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-weight: 550;
    text-decoration: none;
    white-space: nowrap;
}

.library-switcher-row:hover,
.library-switcher-row:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.library-switcher-row[aria-current="page"] {
    color: #fff;
    background: rgba(126, 211, 255, 0.15);
}

#globe-header {
    padding: 44px 44px 0;
    pointer-events: auto;
    max-width: 520px;
}

#globe-header #pageTitle {
    font-size: clamp(19px, 3.2vw, 30px);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.4px;
    line-height: 1.25;
    margin-bottom: 10px;
    text-shadow: 0 1px 24px rgba(0, 0, 0, 0.7);
}

#globe-header #pageSummary {
    font-size: clamp(12px, 1.5vw, 14px);
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.55;
    margin: 0;
}

#globe-header a {
    color: rgba(100, 185, 255, 0.9);
    text-decoration: none;
}

#globe-header a:hover {
    color: #80caff;
}

#globe-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 44px 40px;
    pointer-events: auto;
}

#globe-legend {
    display: flex;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.2px;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-visited {
    background: #00c8ff;
    box-shadow: 0 0 7px 2px rgba(245, 166, 35, 0.6);
}

.legend-recommended {
    background: #f5a623;
    box-shadow: 0 0 7px 2px rgba(0, 200, 255, 0.6);
}

#globe-scroll-hint {
    width: 22px;
    height: 22px;
    color: rgba(255, 255, 255, 0.35);
    animation: scrollBounce 2.2s ease-in-out infinite;
    pointer-events: none;
}

#globe-scroll-hint svg {
    width: 22px;
    height: 22px;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.35; }
    50%       { transform: translateY(5px); opacity: 0.65; }
}

/* ── Tooltip ───────────────────────────────────────────────── */

#globe-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    background: rgba(8, 12, 28, 0.88);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 20;
}

#globe-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

#globe-tooltip-flag {
    width: 20px;
    height: auto;
    max-height: 15px;
    object-fit: contain;
    display: block;
    border-radius: 2px;
}

/* ── Content Section ───────────────────────────────────────── */

#content {
    max-width: 740px;
    margin: 0 auto;
    padding: 32px 20px 64px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 28px 30px 32px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.05);
}

.section-card h2 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.25px;
    color: #1d1d1f;
    margin-bottom: 5px;
}

.section-card p {
    font-size: 13.5px;
    color: #6e6e73;
    margin-bottom: 18px;
    line-height: 1.5;
}

.section-card a {
    color: #0071e3;
    text-decoration: none;
}

.section-card a:hover {
    text-decoration: underline;
}

.disclaimer {
    font-size: 12px;
    color: #999;
    text-align: center;
    padding: 0 4px;
}

.disclaimer a {
    color: #999;
    text-decoration: underline;
}

/* ── Destination Pills ─────────────────────────────────────── */

.bullet-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.bullet-list h4 {
    margin: 0;
    line-height: 1;
}

.bullet-list h4 a.roundel-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 100px;
    background: #f5f5f7;
    border: 1px solid rgba(0,0,0,0.07);
    font-size: 12.5px;
    font-weight: 500;
    color: #1d1d1f;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s;
    line-height: 1;
}

.bullet-list h4 a.roundel-container:hover {
    background: #ebebed;
    border-color: rgba(0,0,0,0.12);
}

.roundel {
    width: 16px;
    height: auto;
    max-height: 12px;
    object-fit: contain;
    display: block;
    border-radius: 1px;
}

.roundel-bordered {
    border: 0.5px solid rgba(0,0,0,0.18);
}

/* ── Form ──────────────────────────────────────────────────── */

#recommendationForm {
    margin-bottom: 10px;
}

select {
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    height: 44px;
    padding: 0 38px 0 14px;
    border-radius: 11px;
    border: 1.5px solid #d2d2d7;
    background-color: #fff;
    color: #1d1d1f;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    cursor: pointer;
    transition: border-color 0.15s;
}

select:focus {
    outline: none;
    border-color: #0071e3;
}

option[disabled] {
    color: #aaa;
}

.large-button {
    width: 100%;
    height: 44px;
    background: #0071e3;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border-radius: 11px;
    border: none;
    cursor: pointer;
    letter-spacing: -0.1px;
    transition: background 0.15s, transform 0.1s;
}

.large-button:hover:not(.large-button-disabled) {
    background: #0077ed;
}

.large-button:active:not(.large-button-disabled) {
    transform: scale(0.985);
}

.large-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

/* ── Dark Mode ─────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
    body {
        background: #0f0f12;
        color: #f5f5f7;
    }

    .section-card {
        background: #1c1c1e;
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 1px 4px rgba(0,0,0,0.2), 0 4px 20px rgba(0,0,0,0.25);
    }

    .section-card h2 {
        color: #f5f5f7;
    }

    .section-card p {
        color: #98989d;
    }

    .section-card a {
        color: #2997ff;
    }

    .disclaimer {
        color: #636366;
    }

    .disclaimer a {
        color: #636366;
    }

    .bullet-list h4 a.roundel-container {
        background: rgba(255,255,255,0.06);
        border-color: rgba(255,255,255,0.09);
        color: #f5f5f7;
    }

    .bullet-list h4 a.roundel-container:hover {
        background: rgba(255,255,255,0.1);
        border-color: rgba(255,255,255,0.15);
    }

    select {
        background-color: #2c2c2e;
        border-color: rgba(255,255,255,0.12);
        color: #f5f5f7;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    }

    select:focus {
        border-color: #2997ff;
    }
}

/* ── Mobile ────────────────────────────────────────────────── */

@media (max-width: 640px) {
    #globe-section {
        height: 68svh;
        min-height: 420px;
    }

    #globe-header {
        padding: 82px 22px 0;
    }

    #library-switcher {
        top: 18px;
        left: 22px;
        right: 22px;
    }

    #library-switcher-trigger {
        justify-content: flex-start;
    }

    #library-switcher-menu {
        left: 0;
        right: auto;
        max-width: none;
    }

    #globe-bottom {
        padding: 0 22px 28px;
    }

    #content {
        padding: 22px 14px 48px;
        gap: 12px;
    }

    .section-card {
        padding: 22px 20px 24px;
    }
}

@media (max-width: 380px) {
    #globe-header #pageTitle {
        font-size: 17px;
    }
}
