:root {
    --lw360-night: #061016;
    --lw360-cream: #f2e5ca;
    --lw360-gold: #e2bb71;
}

body.overview-v2.lightwell-face {
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: var(--lw360-night);
    color: var(--lw360-cream);
}

body.lightwell-face #scroller,
body.lightwell-face #thread,
body.lightwell-face #scenes-tab {
    display: none !important;
}

.lw360-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#lightwell-panorama {
    --panel-w: 100vw;
    --panel-h: 66.6667vw;
    --overlap: 90px;
    --panel-top: 50%;
    --turn: 0deg;
    position: fixed;
    inset: 0;
    z-index: 10;
    isolation: isolate;
    overflow: hidden;
    background: #061016;
}

.lw360-viewport {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior: none;
    scrollbar-width: none;
    cursor: grab;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
}

.lw360-viewport::-webkit-scrollbar { display: none; }
.lw360-viewport.is-dragging { cursor: grabbing; }
.lw360-viewport:focus-visible { outline: none; }

.lw360-track {
    position: relative;
    height: 100%;
    min-width: 100%;
    background: #081116;
}

.lw360-track::before,
.lw360-track::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 30;
    pointer-events: none;
}

.lw360-track::before {
    background:
        linear-gradient(180deg, rgba(1, 5, 7, .14), transparent 22%, transparent 72%, rgba(1, 5, 7, .48)),
        radial-gradient(ellipse at center, transparent 56%, rgba(1, 5, 8, .4) 100%);
    mix-blend-mode: multiply;
}

.lw360-track::after {
    opacity: .18;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='2' seed='14'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}

.lw360-panel {
    position: absolute;
    top: var(--panel-top);
    width: var(--panel-w);
    height: var(--panel-h);
}

.lw360-art {
    position: absolute;
    inset: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6.7%, #000 93.3%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 6.7%, #000 93.3%, transparent 100%);
}

.lw360-art img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
    user-select: none;
    pointer-events: none;
    -webkit-user-drag: none;
}

.lw360-window {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--w);
    height: var(--h);
    z-index: 8;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    overflow: visible;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.lw360-window-light {
    position: absolute;
    inset: 4%;
    display: block;
    opacity: 0;
    background: radial-gradient(circle at 50% 46%, rgba(255, 245, 207, .18), rgba(95, 184, 223, .055) 48%, transparent 72%);
    box-shadow: 0 0 38px rgba(242, 194, 99, .24), inset 0 0 0 1px rgba(255, 242, 196, .13);
    mix-blend-mode: screen;
    transition: opacity .22s ease, transform .3s ease;
}

.shape-round .lw360-window-light { border-radius: 50%; }
.shape-wide .lw360-window-light { border-radius: 18% / 30%; }
.shape-arch .lw360-window-light { border-radius: 48% 48% 5% 5% / 21% 21% 4% 4%; }

.lw360-window:hover .lw360-window-light,
.lw360-window:focus-visible .lw360-window-light {
    opacity: 1;
    transform: scale(1.018);
}

.lw360-window:focus-visible { outline: none; }

.lw360-label {
    position: absolute;
    left: 50%;
    bottom: 5%;
    z-index: 4;
    width: max-content;
    max-width: min(260px, 155%);
    padding: 8px 11px 7px;
    transform: translate(-50%, 7px);
    opacity: 0;
    border: 1px solid rgba(230, 199, 138, .52);
    border-radius: 2px;
    background: rgba(4, 12, 17, .87);
    box-shadow: 0 7px 24px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(255, 255, 255, .04);
    color: #f4e5c6;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(9px, .7vw, 12px);
    font-weight: 600;
    line-height: 1.16;
    letter-spacing: .12em;
    text-align: center;
    text-transform: uppercase;
    white-space: normal;
    pointer-events: none;
    transition: opacity .17s ease, transform .2s ease;
}

.lw360-window:hover .lw360-label,
.lw360-window:focus-visible .lw360-label {
    opacity: 1;
    transform: translate(-50%, 0);
}

.lw360-brand {
    position: fixed;
    top: clamp(16px, 2.3vw, 30px);
    left: clamp(16px, 2.4vw, 34px);
    z-index: 55;
    display: flex;
    align-items: baseline;
    gap: 12px;
    color: #f5ead4;
    text-shadow: 0 2px 11px rgba(0, 0, 0, .7);
    pointer-events: none;
}

.lw360-brand span {
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(14px, 1.25vw, 20px);
    font-weight: 600;
    letter-spacing: .14em;
}

.lw360-index {
    position: fixed;
    top: clamp(15px, 2.2vw, 28px);
    right: clamp(15px, 2.2vw, 30px);
    z-index: 58;
    width: 42px;
    height: 42px;
    display: grid;
    place-content: center;
    gap: 4px;
    border: 1px solid rgba(240, 222, 183, .52);
    border-radius: 50%;
    background: rgba(5, 14, 19, .44);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .27), inset 0 0 0 1px rgba(255, 255, 255, .05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.lw360-index:disabled { pointer-events: none; }

.lw360-index span {
    width: 15px;
    height: 1px;
    display: block;
    background: #f3dfb6;
}

.lw360-index:hover,
.lw360-index:focus-visible {
    background: rgba(12, 31, 40, .82);
    border-color: rgba(240, 222, 183, .92);
    outline: none;
    transform: scale(1.06);
}

.lw360-hint {
    position: fixed;
    left: 50%;
    bottom: clamp(21px, 2.5vw, 35px);
    z-index: 52;
    transform: translateX(-50%);
    color: rgba(243, 229, 202, .62);
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    text-shadow: 0 2px 9px #000;
    pointer-events: none;
    opacity: 1;
    transition: opacity .7s ease;
}

.lw360-compass {
    position: fixed;
    right: clamp(18px, 2.5vw, 36px);
    bottom: clamp(16px, 2.1vw, 29px);
    z-index: 52;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(242, 226, 193, .42);
    border-radius: 50%;
    background: rgba(5, 14, 19, .32);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .24);
    pointer-events: none;
}

.lw360-compass::before,
.lw360-compass::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    background: rgba(242, 226, 193, .22);
    transform: translate(-50%, -50%);
}

.lw360-compass::before { width: 1px; height: 30px; }
.lw360-compass::after { width: 30px; height: 1px; }

.lw360-compass i {
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 1px solid rgba(226, 187, 113, .28);
}

.lw360-compass b {
    position: absolute;
    left: 50%;
    top: 4px;
    width: 5px;
    height: 17px;
    margin-left: -2.5px;
    background: linear-gradient(180deg, #e5bd71, rgba(229, 189, 113, .1));
    clip-path: polygon(50% 0, 100% 100%, 50% 82%, 0 100%);
    transform-origin: 50% 17px;
    transform: rotate(var(--turn));
    transition: transform .08s linear;
}

#lightwell-panorama.has-looked .lw360-hint { opacity: 0; }

.lw360-curtain {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    background: #071015;
    transition: opacity .65s ease, visibility 0s linear .65s;
}

.lw360-curtain span {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(229, 190, 115, .3);
    border-radius: 50%;
    box-shadow: 0 0 34px rgba(54, 134, 169, .28), inset 0 0 18px rgba(232, 186, 99, .18);
    animation: lw360-breathe 1.4s ease-in-out infinite;
}

@keyframes lw360-breathe {
    50% { transform: scale(1.18); border-color: rgba(229, 190, 115, .72); }
}

#lightwell-panorama.is-ready .lw360-curtain {
    opacity: 0;
    visibility: hidden;
}

/* The parchment case-study card keeps its own walnut ink. */
body.lightwell-face .modal-card { color: var(--ink); }

/* The all-work fallback keeps the pavilion's nocturnal stone palette. */
body.lightwell-face #scenes {
    color: #dce7e4;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 70% 10%, rgba(26, 84, 111, .28), transparent 36%),
        linear-gradient(145deg, #0b171d, #071015 55%, #0d2028);
}

body.lightwell-face .scenes-inner { max-width: 1180px; }
body.lightwell-face .toc-row { flex-wrap: wrap; }
body.lightwell-face .scenes-title,
body.lightwell-face .toc-name { color: #eef2eb; text-shadow: none; }
body.lightwell-face .toc-name { overflow: visible; text-overflow: clip; }
body.lightwell-face .toc-era-head { color: #d7b66f; border-color: rgba(215, 182, 111, .34); }
body.lightwell-face .toc-era-head .n,
body.lightwell-face .toc-no,
body.lightwell-face .toc-client { color: rgba(220, 231, 228, .54); }

body.lightwell-face .toc-row:hover,
body.lightwell-face .toc-row:focus-visible {
    background: rgba(55, 112, 132, .15);
    border-color: rgba(215, 182, 111, .48);
}

body.lightwell-face .pill {
    color: #eddfc2;
    background: rgba(5, 13, 18, .52);
    border: 1px solid rgba(215, 182, 111, .45);
    border-radius: 999px;
    box-shadow: none;
}

body.lightwell-face .pill:hover { color: #071015; background: #e0bd77; }

.lw360-about {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(430px, 1.2fr);
    gap: clamp(34px, 7vw, 96px);
    margin-top: 8vh;
    padding-top: 5vh;
    border-top: 1px solid rgba(215, 182, 111, .22);
}

.lw360-about p {
    max-width: 34ch;
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(19px, 2.3vw, 31px);
    line-height: 1.42;
    color: #ecdfc6;
}

.lw360-about-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-top: 28px;
    color: rgba(220, 231, 228, .65);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.lw360-about-links a { color: #ddbc78; text-decoration: none; }
.lw360-career { border-top: 1px solid rgba(220, 231, 228, .14); }
.lw360-career-row {
    display: grid;
    grid-template-columns: 84px 1.2fr 1fr;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(220, 231, 228, .11);
    color: rgba(220, 231, 228, .72);
    font-size: 11px;
    line-height: 1.4;
}
.lw360-career-row span:first-child { color: rgba(220, 231, 228, .42); }
.lw360-career-row span:nth-child(2) { color: #e7dcc5; }

@media (max-width: 720px) {
    .lw360-brand { top: 16px; left: 15px; }
    .lw360-brand span { font-size: 13px; }
    .lw360-index { top: 12px; right: 12px; width: 40px; height: 40px; }
    .lw360-hint {
        bottom: 49px;
        width: 100%;
        padding: 0 48px;
        font-size: 7.4px;
        text-align: center;
    }
    .lw360-compass { right: 12px; bottom: 12px; width: 38px; height: 38px; }
    .lw360-compass b { top: 3px; height: 16px; transform-origin: 50% 16px; }
    .lw360-label { max-width: 185px; padding: 6px 8px 5px; font-size: 8px; }
    .lw360-window:hover .lw360-window-light { opacity: 0; }
    .lw360-window:focus-visible .lw360-window-light { opacity: 1; }

    body.lightwell-face .toc-row {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 3px 10px;
        align-items: baseline;
    }
    body.lightwell-face .toc-name { white-space: normal; }
    body.lightwell-face .toc-client { grid-column: 2; white-space: normal; }

    .lw360-about { grid-template-columns: 1fr; gap: 38px; margin-top: 5vh; }
    .lw360-career-row { grid-template-columns: 72px 1fr; }
    .lw360-career-row span:last-child { grid-column: 2; color: rgba(220, 231, 228, .48); }
}

@media (prefers-reduced-motion: reduce) {
    .lw360-window-light,
    .lw360-label,
    .lw360-index,
    .lw360-brand,
    .lw360-compass,
    .lw360-hint,
    .lw360-curtain { transition: none !important; }
    .lw360-curtain span { animation: none !important; }
    .lw360-compass b { transition: none !important; }
}
