.scene-wrap {
    z-index: 3;
    opacity: .78;
    mix-blend-mode: screen;
    pointer-events: none;
    transition: opacity .45s ease;
}

.scene-wrap canvas { pointer-events: none; }
.scene-wrap canvas[hidden] { display: none !important; }
.scene-vignette { display: none; }
.world-hotspots {
    position: fixed;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
}
.world-hotspots[hidden] { display: none !important; }
.world-hotspot {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 170px;
    padding: 7px 11px 7px 7px;
    border: 1px solid rgba(169, 221, 208, .38);
    border-radius: 999px;
    background: rgba(6, 20, 25, .72);
    color: #edf5f0;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .24), 0 0 24px rgba(169, 221, 208, .12);
    backdrop-filter: blur(14px) saturate(1.1);
    pointer-events: auto;
    transform: translate(-50%, -50%);
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease, transform .25s ease;
}
.world-hotspot:hover,
.world-hotspot:focus-visible {
    outline: none;
    border-color: #e3b87a;
    background: rgba(18, 45, 48, .88);
    box-shadow: 0 10px 34px rgba(0, 0, 0, .34), 0 0 28px rgba(227, 184, 122, .22);
    transform: translate(-50%, -50%) scale(1.06);
}
.world-hotspot-icon {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border: 1px solid rgba(227, 184, 122, .48);
    border-radius: 50%;
    color: #e3b87a;
    font: 15px Newsreader, Georgia, serif;
}
.world-hotspot-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 10px "DM Mono", Consolas, monospace; }
html[data-effect="project-world"] .scene-wrap { opacity: .9; }
html[data-effect="project-world"] .world-hotspots { display: block; }
.header-actions { display: flex; align-items: center; gap: 16px; }

.effect-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px 0 8px;
    border: 1px solid rgba(169, 221, 208, .2);
    border-radius: 999px;
    background: rgba(8, 20, 25, .58);
    color: #91a7a6;
    font: 10px "DM Mono", Consolas, monospace;
    letter-spacing: .04em;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.effect-trigger:hover,
.effect-trigger:focus-visible,
.effect-trigger[aria-expanded="true"] {
    outline: none;
    color: #a9ddd0;
    border-color: rgba(169, 221, 208, .55);
    background: rgba(16, 39, 44, .76);
    box-shadow: 0 0 24px rgba(169, 221, 208, .1);
}

.effect-trigger-icon {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    color: #e3b87a;
    font: 16px Georgia, serif;
}

.effect-menu {
    inset: 74px 24px auto auto;
    width: min(360px, calc(100vw - 28px));
    margin: 0;
    padding: 14px;
    border: 1px solid rgba(169, 221, 208, .22);
    border-radius: 12px;
    background: rgba(7, 19, 24, .94);
    color: #edf5f0;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .045);
    backdrop-filter: blur(24px) saturate(1.12);
}

.effect-menu::backdrop { background: transparent; }
.effect-menu:popover-open { animation: effect-menu-in .2s cubic-bezier(.2, .8, .2, 1); }

@keyframes effect-menu-in {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.effect-menu-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 5px 5px 13px; }
.effect-menu-head div { display: grid; gap: 4px; }
.effect-menu-head span { color: #7f9897; font: 9px "DM Mono", Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; }
.effect-menu-head strong { font: 400 22px Georgia, serif; letter-spacing: -.02em; }
.effect-menu-close { border: 0; padding: 2px 5px; background: transparent; color: #7f9897; font: 22px/1 Georgia, serif; cursor: pointer; }
.effect-menu-close:hover { color: #edf5f0; }
.effect-options { display: grid; gap: 6px; }

.effect-option {
    display: grid;
    grid-template-columns: 37px 1fr 10px;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, .025);
    color: #edf5f0;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.effect-option:hover { transform: translateX(2px); border-color: rgba(169, 221, 208, .17); background: rgba(169, 221, 208, .055); }
.effect-option[aria-pressed="true"] { border-color: rgba(169, 221, 208, .38); background: linear-gradient(90deg, rgba(169, 221, 208, .105), rgba(169, 221, 208, .025)); }
.effect-option-icon { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid rgba(227, 184, 122, .25); border-radius: 50%; color: #e3b87a; font: 18px Georgia, serif; }
.effect-option > span:nth-child(2) { display: grid; gap: 4px; }
.effect-option strong { font: 500 12px Manrope, "Segoe UI", sans-serif; }
.effect-option small { color: #829796; font: 9px "DM Mono", Consolas, monospace; }
.effect-option i { width: 6px; height: 6px; border-radius: 50%; background: transparent; box-shadow: 0 0 0 1px rgba(169, 221, 208, .2); }
.effect-option[aria-pressed="true"] i { background: #a9ddd0; box-shadow: 0 0 12px rgba(169, 221, 208, .8); }
.effect-menu-note { margin: 12px 5px 2px; color: #617777; font: 8px "DM Mono", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }

html[data-effect="focus"] .scene-wrap { opacity: 0; }
html[data-effect="earth"] .scene-wrap { opacity: .68; }

@media (max-width: 560px) {
    .header-actions { gap: 10px; }
    .effect-trigger { width: 34px; padding: 0; justify-content: center; }
    .effect-trigger-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .effect-menu { inset: 64px 14px auto 14px; width: auto; }
    .scene-wrap { opacity: .52; }
    html[data-effect="earth"] .scene-wrap { opacity: .44; }
    html[data-effect="project-world"] .scene-wrap { opacity: .64; }
    .world-hotspot { max-width: 128px; padding-right: 8px; }
    .world-hotspot-label { font-size: 8px; }
    .world-hotspot-icon { width: 23px; height: 23px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .effect-menu:popover-open { animation: none; }
    .effect-option, .effect-trigger, .scene-wrap, .world-hotspot { transition: none; }
}
