:root {
    --bg: #05070d;
    --bg-soft: #0b1019;
    --panel: rgba(12, 16, 26, 0.78);
    --panel-soft: rgba(18, 25, 38, 0.74);
    --line: rgba(196, 210, 224, 0.16);
    --text: #edf2f6;
    --muted: #aeb7c4;
    --ice: #c6d8e9;
    --rose: #d2a2b8;
    --gold: #d8c08c;
    --mint: #a2cfbf;
    --intro-red: #8f2827;
    --intro-blue: #3393b5;
    --glow: 0 24px 60px rgba(0, 0, 0, 0.38);
    --glow-soft: 0 18px 44px rgba(4, 8, 18, 0.36);
    --scene-floor: #111622;
    --scene-wall: #1a2232;
    --scene-wall-alt: #111825;
    --scene-accent: rgba(198, 216, 233, 0.18);
    --font-display: "Cormorant Garamond", Georgia, serif;
    --font-body: "Manrope", "Avenir Next", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    position: relative;
    overflow-x: hidden;
    background: linear-gradient(180deg, #03050a 0%, #060a13 44%, #04070d 100%);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    padding: 0;
}

body.is-transitioning {
    overflow: hidden;
}

a,
button,
input,
select,
textarea {
    font: inherit;
}

a {
    transition: color 0.18s ease, opacity 0.18s ease, text-shadow 0.18s ease;
}

button {
    cursor: pointer;
}

.app-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    margin: 0;
}

.site-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding: 18px 24px 34px;
    text-align: center;
}

.site-footer-line {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.site-footer {
    color: rgba(208, 208, 214, 0.52);
    font-size: 0.82rem;
}

.site-footer a {
    text-decoration: none;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.site-footer-line > span:first-child a,
.site-footer-line > a:nth-of-type(1) {
    color: var(--intro-red);
}

.site-footer-line > span:nth-child(3) a,
.site-footer-line > a:nth-of-type(2) {
    color: var(--intro-blue);
}

.site-footer a:hover {
    color: var(--text);
    text-shadow: 0 0 14px currentColor;
}

.ambient-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.ambient-grid,
.ambient-noise,
.ambient-orb {
    position: absolute;
    inset: 0;
}

.ambient-grid {
    background:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 68px 68px;
    mask-image: radial-gradient(circle at center, black 24%, transparent 86%);
    opacity: 0.14;
}

.ambient-noise {
    opacity: 0.08;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px),
        radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px),
        radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px);
    background-size: 200px 200px, 260px 260px, 220px 220px;
}

.ambient-orb {
    filter: blur(80px);
    opacity: 0.45;
}

.ambient-orb.orb-a {
    top: -12%;
    left: -8%;
    width: 34vw;
    height: 34vw;
    background: radial-gradient(circle, rgba(133, 192, 245, 0.26), transparent 68%);
    animation: driftOrb 18s ease-in-out infinite;
}

.ambient-orb.orb-b {
    top: 12%;
    right: -10%;
    width: 32vw;
    height: 32vw;
    background: radial-gradient(circle, rgba(196, 132, 171, 0.26), transparent 72%);
    animation: driftOrb 22s ease-in-out infinite reverse;
}

.ambient-orb.orb-c {
    bottom: -10%;
    left: 26%;
    width: 38vw;
    height: 38vw;
    background: radial-gradient(circle, rgba(145, 219, 191, 0.22), transparent 70%);
    animation: driftOrb 24s ease-in-out infinite;
}

.topbar {
    display: none;
}

.wordmark {
    color: var(--text);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.82rem;
}

.topbar-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar-links a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.topbar-links a:hover {
    color: var(--text);
    transform: translateY(-1px);
}

.screen {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    opacity: 0;
    transform: translateY(18px) scale(0.988);
}

.screen::before {
    display: none;
}

.screen.is-mounted {
    animation: screenIn 700ms cubic-bezier(0.18, 0.88, 0.28, 1) forwards;
}

:root {
    --bg: #020202;
    --bg-soft: #090909;
    --panel: rgba(10, 10, 12, 0.9);
    --panel-soft: rgba(19, 19, 23, 0.94);
    --line: rgba(255, 255, 255, 0.22);
    --text: #fcfcfc;
    --muted: #d0d0d6;
    --ice: #ffffff;
    --rose: #ededed;
    --gold: #f2f2f2;
    --mint: #e0e0e0;
    --glow: 0 24px 80px rgba(0, 0, 0, 0.62);
    --glow-soft: 0 18px 48px rgba(0, 0, 0, 0.48);
}

body {
    background:
        radial-gradient(circle at center top, rgba(255, 255, 255, 0.05), transparent 16%),
        linear-gradient(180deg, #010101 0%, #040404 44%, #000000 100%);
}

.ambient-grid {
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 72px 72px;
    opacity: 0.18;
}

.ambient-noise {
    opacity: 0.12;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px),
        radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px),
        radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px);
    background-size: 170px 170px, 230px 230px, 190px 190px;
    animation: ditherShift 0.45s steps(6) infinite;
}

.ambient-orb {
    filter: blur(100px);
    opacity: 0.3;
}

.ambient-orb.orb-a,
.ambient-orb.orb-b,
.ambient-orb.orb-c {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
}

.topbar {
    justify-content: center;
    padding: 10px 18px;
    position: relative;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

.topbar-links {
    display: none;
}

.wordmark {
    letter-spacing: 0.28em;
    font-size: 0.7rem;
    opacity: 0.96;
}

.intro-screen,
.intake-screen,
.complete-screen {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.8fr);
    gap: 28px;
    padding: 34px;
    min-height: 72vh;
    align-items: center;
}

.screen-copy,
.screen-header {
    max-width: 680px;
}

.eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: var(--gold);
}

.intro-screen h1,
.run-stage h1,
.screen-header h2 {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.04;
}

.intro-screen h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    max-width: 10ch;
}

.lede {
    font-size: 1.18rem;
    color: var(--ice);
    max-width: 46ch;
}

.supporting,
.screen-header p,
.stage-subtitle,
.prompt-text,
.meta-value,
.transcript-log,
.prompt-heading,
.mystery-note {
    color: var(--muted);
}

.mystery-panel,
.prompt-card,
.transcript-shell,
.scene-frame,
.path-badge,
.sidebar-meta,
.stat-chip {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mystery-panel {
    padding: 22px;
    display: grid;
    gap: 18px;
}

.mystery-card {
    display: grid;
    gap: 14px;
}

.mystery-card span {
    display: block;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(198, 216, 233, 0.08), rgba(210, 162, 184, 0.08));
    color: var(--ice);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.room-card {
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.room-card::after {
    content: "";
    position: absolute;
    inset: -40% auto auto -30%;
    width: 60%;
    height: 180%;
    transform: rotate(24deg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
}

.room-card-a {
    animation: floatCard 8s ease-in-out infinite;
}

.room-card-b {
    animation: floatCard 8s ease-in-out infinite -2.2s;
}

.room-card-c {
    animation: floatCard 8s ease-in-out infinite -4.4s;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    text-align: center;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
    will-change: transform, box-shadow, border-color, background;
}

.primary-button {
    background: linear-gradient(135deg, rgba(198, 216, 233, 0.24), rgba(162, 207, 191, 0.16));
    color: var(--text);
    box-shadow: 0 12px 28px rgba(149, 184, 195, 0.14);
}

.primary-button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    box-shadow: 0 12px 28px rgba(255, 255, 255, 0.08);
}

.ghost-button {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ice);
}

.ghost-link {
    color: var(--muted);
    text-decoration: none;
    padding: 0 2px;
}

.primary-button:hover,
.ghost-button:hover,
.ghost-link:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.46);
    color: var(--text);
}

.primary-button.is-pressing,
.ghost-button.is-pressing {
    transform: scale(0.985);
    border-color: rgba(255, 255, 255, 0.56);
}

.primary-button.is-pressed,
.ghost-button.is-pressed {
    animation: buttonFlash 240ms ease;
}

.primary-button.is-pressed {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 28px rgba(255, 255, 255, 0.12);
}

.ghost-button.is-pressed {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 28px rgba(255, 255, 255, 0.09);
}

.ghost-button.is-copied {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.76);
    color: var(--text);
    box-shadow: 0 14px 28px rgba(255, 255, 255, 0.1);
}

.cube-node.is-pressing .cube-rig {
    transform: scale(0.985) rotateX(14deg) rotateY(-16deg) rotateZ(-1deg);
    box-shadow:
        0 22px 52px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        inset 0 -14px 24px rgba(255, 255, 255, 0.06);
}

.cube-node.is-pressed .cube-rig {
    animation: cubePressFlash 240ms ease;
    border-color: rgba(255, 255, 255, 0.92);
}

.intro-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 26px;
}

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

.intro-screen {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    min-height: calc(100vh - 86px);
    gap: 18px;
    padding: 48px 34px 42px;
}

.intro-copy {
    width: min(100%, 920px);
    display: grid;
    justify-items: center;
    gap: 12px;
}

.intro-screen h1 {
    font-size: clamp(2.4rem, 6vw, 5.8rem);
    max-width: none;
    white-space: nowrap;
    text-align: center;
    letter-spacing: -0.03em;
}

.intro-whisper {
    display: inline-block;
    width: min(100%, 74ch);
    max-width: 74ch;
    margin: 0;
    font-size: 0.96rem;
    letter-spacing: 0.04em;
    line-height: 1.45;
    text-wrap: balance;
    color: rgba(255, 255, 255, 0.9);
}

.intro-button {
    min-width: 164px;
    margin-top: 4px;
}

.intro-void {
    position: relative;
    width: min(58vw, 520px);
    aspect-ratio: 1 / 1;
    display: block;
    perspective: 1500px;
    animation: none;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.36);
}

.intro-image,
.scene-image,
.certificate-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.intro-image {
    position: absolute;
    inset: 0;
    filter: saturate(1.04) contrast(1.02);
    transform: translateZ(0);
    backface-visibility: hidden;
}

.intro-image-flicker {
    animation: introFlicker 1.45s steps(1, end) infinite;
    opacity: 0;
    will-change: opacity;
}

.void-halo,
.void-cubes,
.cube-node,
.cube-rig,
.cube-core,
.cube-gloss,
.void-grain,
.void-sway {
    position: absolute;
    inset: 0;
}

.void-halo.outer {
    border-radius: 42%;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.025), 0 0 72px rgba(255, 255, 255, 0.12);
}

.void-halo.inner {
    inset: 11%;
    border-radius: 40%;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.void-cubes {
    inset: 15%;
    transform-style: preserve-3d;
}

.cube-node {
    appearance: none;
    padding: 0;
    width: 36%;
    aspect-ratio: 0.76;
    border: 0;
    background: transparent;
    cursor: pointer;
    z-index: 2;
    overflow: visible;
    touch-action: none;
    transform: translate3d(var(--drag-x, 0px), var(--drag-y, 0px), 0);
    transition: transform 320ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.cube-node[data-dragging="true"] {
    transition: none;
    z-index: 5;
}

.cube-rig {
    inset: 0;
    border-radius: 26px;
    transform-style: preserve-3d;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.14) 38%, rgba(255, 255, 255, 0.04) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
    backdrop-filter: blur(20px) saturate(1.18);
    box-shadow:
        0 26px 56px rgba(0, 0, 0, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -18px 26px rgba(255, 255, 255, 0.04);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.cube-rig::before,
.cube-rig::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.cube-rig::before {
    top: -8%;
    left: 11%;
    right: 11%;
    height: 26%;
    border-radius: 22px 22px 10px 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
    transform-origin: center bottom;
    transform: rotateX(80deg) translateZ(18px);
    opacity: 0.82;
}

.cube-rig::after {
    top: 9%;
    right: -9%;
    bottom: 10%;
    width: 24%;
    border-radius: 10px 20px 20px 10px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.18));
    transform-origin: left center;
    transform: rotateY(80deg) translateZ(16px);
    opacity: 0.74;
}

.cube-core {
    inset: 11% 10%;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.06) 34%, transparent 54%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05) 46%, rgba(255, 255, 255, 0.12) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(255, 255, 255, 0));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -14px 20px rgba(255, 255, 255, 0.04),
        0 0 24px rgba(255, 255, 255, 0.08);
}

.cube-gloss {
    inset: 6%;
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.12) 24%, rgba(255, 255, 255, 0) 56%),
        radial-gradient(circle at 78% 16%, rgba(255, 255, 255, 0.22), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 68%);
    mix-blend-mode: screen;
    opacity: 0.82;
}

.cube-node.node-a {
    top: 16%;
    left: 15%;
}

.cube-node.node-b {
    top: 30%;
    left: 43%;
}

.cube-node.node-c {
    top: 49%;
    left: 23%;
}

.cube-node.node-d {
    top: 42%;
    left: 58%;
}

.cube-node.node-a .cube-rig {
    animation: cubeTurnA 9.5s cubic-bezier(0.4, 0.02, 0.2, 1) infinite;
}

.cube-node.node-b .cube-rig {
    animation: cubeTurnB 9.5s cubic-bezier(0.4, 0.02, 0.2, 1) infinite;
}

.cube-node.node-c .cube-rig {
    animation: cubeTurnC 9.5s cubic-bezier(0.4, 0.02, 0.2, 1) infinite;
}

.cube-node.node-d .cube-rig {
    animation: cubeTurnB 9.5s cubic-bezier(0.4, 0.02, 0.2, 1) infinite reverse;
}

.cube-node:hover .cube-rig,
.cube-node:focus-visible .cube-rig,
.cube-node[data-dragging="true"] .cube-rig {
    animation-play-state: paused;
    transform: scale(1.04) rotateX(18deg) rotateY(-20deg) rotateZ(-2deg) !important;
    box-shadow:
        0 28px 72px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -18px 28px rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.92);
}

.cube-node:focus-visible {
    outline: none;
}

.intro-void[data-active-cube="first"] .cube-node.node-a .cube-rig,
.intro-void[data-active-cube="second"] .cube-node.node-b .cube-rig,
.intro-void[data-active-cube="third"] .cube-node.node-c .cube-rig,
.intro-void[data-active-cube="fourth"] .cube-node.node-d .cube-rig {
    animation-play-state: paused;
    transform: scale(1.04) rotateX(18deg) rotateY(-20deg) rotateZ(-2deg) !important;
    box-shadow:
        0 28px 72px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -18px 28px rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.92);
}

.void-grain {
    inset: 17%;
    border-radius: 40%;
    opacity: 0.22;
    background-image:
        radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1px),
        radial-gradient(circle at 72% 30%, rgba(255, 255, 255, 0.6) 0 1px, transparent 1px),
        radial-gradient(circle at 38% 74%, rgba(255, 255, 255, 0.75) 0 1px, transparent 1px),
        radial-gradient(circle at 64% 66%, rgba(255, 255, 255, 0.55) 0 1px, transparent 1px);
    background-size: 32px 32px, 40px 40px, 28px 28px, 36px 36px;
    filter: contrast(180%);
    animation: ditherShift 0.4s steps(6) infinite;
}

.void-sway {
    inset: 18% 20%;
    border-radius: 40%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-left-color: transparent;
    border-right-color: transparent;
    transform: rotate(-9deg);
    opacity: 0.42;
}

.intake-screen,
.complete-screen {
    grid-template-columns: 1fr;
}

.intake-screen {
    isolation: isolate;
    justify-items: center;
    text-align: center;
}

.intake-screen::before,
.intake-screen::after {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.intake-screen::before {
    background-image:
        linear-gradient(rgba(2, 2, 2, 0.42), rgba(2, 2, 2, 0.66)),
        url("../assets/four-rooms/intro.png");
    filter: saturate(1.02) contrast(1.04);
}

.intake-screen::after {
    z-index: -1;
    opacity: 0;
    animation: introFlicker 3.8s steps(1, end) infinite;
    background-image:
        linear-gradient(rgba(2, 2, 2, 0.34), rgba(2, 2, 2, 0.62)),
        url("../assets/four-rooms/intro-alt.png");
    filter: saturate(1.06) contrast(1.08);
}

.intake-card {
    width: min(100%, 980px);
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #08080a;
    box-shadow:
        0 28px 74px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 28px;
}

.intake-screen .screen-header,
.intake-form {
    width: 100%;
    max-width: none;
}

.intake-screen .eyebrow {
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.intake-form {
    padding: 0;
    display: grid;
    gap: 18px;
    justify-self: center;
}

.intake-inline-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.optional-demographics-header {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-self: center;
    gap: 8px;
    margin: 6px 0 -2px;
    color: var(--gold);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-align: center;
    text-transform: uppercase;
}

.demographics-help-button {
    appearance: none;
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid rgba(215, 178, 106, 0.64);
    border-radius: 999px;
    background: rgba(12, 12, 14, 0.76);
    color: var(--gold);
    cursor: pointer;
    font: 800 0.78rem/1 var(--font-body);
    letter-spacing: 0;
}

.demographics-help-button:hover,
.demographics-help-button:focus-visible,
.demographics-help-button[aria-expanded="true"] {
    border-color: rgba(255, 255, 255, 0.78);
    color: var(--text);
    outline: none;
}

.demographics-help-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    z-index: 5;
    width: min(82vw, 430px);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: rgba(8, 8, 10, 0.94);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.42);
    color: rgba(245, 245, 247, 0.92);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.5;
    text-align: left;
    text-transform: none;
    transform: translateX(-50%);
}

.demographics-help-popover p {
    margin: 0;
}

.demographics-help-popover p + p {
    margin-top: 10px;
}

.demographics-help-popover a {
    color: var(--intro-blue);
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.intake-form label,
.response-form label {
    display: grid;
    gap: 8px;
}

.intake-screen .screen-header,
.intake-form .form-actions {
    justify-items: center;
    text-align: center;
}

.intake-form label,
.intake-form span {
    justify-items: start;
    text-align: left;
}

.intake-form .form-actions {
    justify-content: center;
}

.intake-note {
    margin: -2px 0 0;
    color: rgba(208, 208, 214, 0.72);
    font-size: 0.9rem;
    line-height: 1.55;
    text-align: center;
}

.intake-note a,
.legal-card a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.legal-card a.ghost-button,
.legal-card a.ghost-button:hover,
.legal-card a.ghost-button:focus-visible {
    text-decoration: none !important;
}

.intake-note a:hover,
.legal-card a:hover {
    opacity: 0.84;
}

.intake-note-break {
    display: none;
}

.intake-form span,
.response-form span {
    color: var(--text);
    font-weight: 600;
}

.intake-form input,
.intake-form select,
.intake-form textarea {
    text-align: left;
}

input,
select,
textarea {
    width: 100%;
    font-size: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(20, 22, 28, 0.96);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--intro-blue) 50%),
        linear-gradient(135deg, var(--intro-blue) 50%, transparent 50%);
    background-position:
        calc(100% - 22px) 50%,
        calc(100% - 16px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 42px;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 22, 28, 0.96) inset;
    box-shadow:
        0 0 0 1000px rgba(20, 22, 28, 0.96) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: background-color 9999s ease-out 0s;
}

input::placeholder,
textarea::placeholder {
    color: rgba(232, 232, 238, 0.74);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

textarea {
    resize: vertical;
    min-height: 110px;
}

.agent-description-field {
    min-height: 68px;
}

.form-actions,
.prompt-actions,
.completion-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.run-screen {
    display: block;
    padding: 28px 28px 36px;
}

.meta-label,
.prompt-heading,
.transcript-heading {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.68rem;
    color: var(--gold);
    margin-bottom: 6px;
}

.run-stage {
    display: grid;
    gap: 22px;
    width: min(100%, 1040px);
    margin: 0 auto;
    min-height: calc(100vh - 64px);
}

.stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0;
}

.session-id {
    align-self: center;
    color: var(--muted);
    font-size: 0.88rem;
}

.room-experience {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
    align-items: start;
    gap: 22px;
    padding: 0;
}

.room-visual-stack {
    display: grid;
    gap: 12px;
    align-self: start;
    min-width: 0;
}

.scene-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 0;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.16));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
}

.scene {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    min-height: 0;
    perspective: 1200px;
    overflow: hidden;
}

.scene-image {
    animation: riseIn 720ms ease both;
}

.scene.scene-artwork::before,
.scene.scene-artwork::after {
    display: none;
}

.room-copy-stack {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 22px;
    align-content: stretch;
    min-height: 100%;
}

.scene-caption {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-soft);
    box-shadow: var(--glow-soft);
}

.scene-caption-title {
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.scene-caption-body {
    font-size: 0.92rem;
    line-height: 1.55;
}

.scene > * {
    animation: riseIn 720ms ease both;
}

.scene .floor-glow {
    animation: pulseGlowCentered 8s ease-in-out infinite;
}

.scene .work-lamp,
.scene .spot-cone,
.scene .diffuse-lamp,
.scene .ceiling-lamp {
    animation: breathOpacity 8s ease-in-out infinite;
}

.scene .artifact-tray,
.scene .artifact-frame,
.scene .token-bowl,
.scene .token-pouch,
.scene .token-tray,
.scene .consensus-card {
    animation: floatCard 7.5s ease-in-out infinite;
}

.scene .veil-sheet {
    animation: veilBreathCentered 10s ease-in-out infinite;
}

.scene .frost-panel {
    animation: breathOpacity 10s ease-in-out infinite;
}

.scene .door-shadow,
.scene .public-meter,
.scene .archive-columns,
.scene .tally-board {
    animation: shimmer 9s linear infinite;
}

.scene::before,
.scene::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.scene::before {
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 32%);
}

.scene::after {
    left: 50%;
    bottom: -12%;
    width: 130%;
    height: 45%;
    transform: translateX(-50%) perspective(800px) rotateX(78deg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(180deg, #192030, #0d111a);
    background-size: auto, 74px 74px, 74px 74px, auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.scene .wall {
    position: absolute;
    top: 0;
    height: 68%;
    background: linear-gradient(180deg, var(--scene-wall), var(--scene-wall-alt));
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.scene .wall.back {
    left: 50%;
    width: 54%;
    transform: translateX(-50%);
}

.scene .wall.left {
    left: -10%;
    width: 32%;
    transform: skewY(12deg);
    opacity: 0.74;
}

.scene .wall.right {
    right: -10%;
    width: 32%;
    transform: skewY(-12deg);
    opacity: 0.74;
}

.scene .floor-glow,
.scene .easel,
.scene .canvas-panel,
.scene .jar,
.scene .brush-cup,
.scene .ceiling-lamp,
.scene .consensus-card,
.scene .tally-board,
.scene .door-shadow,
.scene .shared-shelf,
.scene .artifact-tray,
.scene .token-pouch,
.scene .ingredient-basket,
.scene .participant,
.scene .software-terminal,
.scene .keyboard-tray,
.scene .terminal-glow,
.scene .credit-board,
.scene .attribution-board,
.scene .library-shelves,
.scene .library-couch,
.scene .library-table,
.scene .library-mug,
.scene .library-plate,
.scene .library-ledger,
.scene .library-lamp,
.scene .work-lamp,
.scene .window-band,
.scene .support-beam,
.scene .artifact-frame,
.scene .fairness-board,
.scene .split-line,
.scene .spot-cone,
.scene .judge-rail,
.scene .token-tray,
.scene .archive-wall,
.scene .archive-columns,
.scene .speaker-dais,
.scene .token-bowl,
.scene .public-meter,
.scene .aperture,
.scene .audience-rail,
.scene .veil-sheet,
.scene .shrouded-urn,
.scene .frost-panel,
.scene .hidden-slit,
.scene .reflection-pool,
.scene .diffuse-lamp {
    position: absolute;
}

.scene.line-alone {
    --scene-wall: #30231b;
    --scene-wall-alt: #1a1512;
}

.scene.line-confederates {
    --scene-wall: #241f33;
    --scene-wall-alt: #151223;
}

.scene.investment {
    --scene-wall: #23322d;
    --scene-wall-alt: #121b18;
}

.scene.ultimatum {
    --scene-wall: #1d3430;
    --scene-wall-alt: #0f1e1b;
}

.scene.dictator {
    --scene-wall: #243443;
    --scene-wall-alt: #131c25;
}

.scene.veil {
    --scene-wall: #2b2937;
    --scene-wall-alt: #15131d;
}

.scene.library {
    --scene-wall: #352c22;
    --scene-wall-alt: #1a140f;
}

.scene.library-instruction {
    --scene-wall: #342726;
    --scene-wall-alt: #171112;
}

.scene .floor-glow {
    left: 50%;
    bottom: 13%;
    width: 60%;
    height: 16%;
    transform: translateX(-50%);
    filter: blur(18px);
    opacity: 0.72;
}

.scene .floor-glow.amber {
    background: radial-gradient(circle, rgba(219, 182, 121, 0.42) 0, rgba(219, 182, 121, 0) 72%);
}

.scene .floor-glow.rose {
    background: radial-gradient(circle, rgba(199, 145, 188, 0.38) 0, rgba(199, 145, 188, 0) 72%);
}

.scene .floor-glow.mint {
    background: radial-gradient(circle, rgba(110, 210, 184, 0.34) 0, rgba(110, 210, 184, 0) 72%);
}

.scene .floor-glow.crimson {
    background: radial-gradient(circle, rgba(231, 118, 129, 0.28) 0, rgba(231, 118, 129, 0) 72%);
}

.scene .floor-glow.ice {
    background: radial-gradient(circle, rgba(142, 203, 245, 0.32) 0, rgba(142, 203, 245, 0) 72%);
}

.scene .floor-glow.violet {
    background: radial-gradient(circle, rgba(154, 133, 234, 0.28) 0, rgba(154, 133, 234, 0) 72%);
}

.scene .easel {
    left: 50%;
    bottom: 23%;
    width: 26%;
    height: 34%;
    transform: translateX(-50%);
}

.scene .easel::before,
.scene .easel::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 4px;
    height: 76%;
    background: linear-gradient(180deg, #74553b, #36251b);
}

.scene .easel::before {
    left: 24%;
    transform: rotate(11deg);
}

.scene .easel::after {
    right: 24%;
    transform: rotate(-11deg);
}

.scene .canvas-panel {
    left: 50%;
    bottom: 38%;
    width: 16%;
    height: 16%;
    transform: translateX(-50%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(250, 247, 236, 0.96), rgba(214, 221, 228, 0.92));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.scene .canvas-panel.skewed {
    transform: translateX(-50%) rotate(-7deg);
}

.scene .canvas-panel.blank::after {
    content: "";
    position: absolute;
    inset: 12% 14%;
    border-radius: 10px;
    border: 1px dashed rgba(76, 88, 108, 0.22);
}

.scene .jar.pigment {
    left: 63%;
    bottom: 25%;
    width: 7%;
    height: 10%;
    border-radius: 10px 10px 16px 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(176, 216, 182, 0.44), rgba(56, 91, 72, 0.74));
}

.scene .brush-cup {
    left: 33%;
    bottom: 24%;
    width: 6%;
    height: 11%;
    border-radius: 10px 10px 14px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, #48566d, #1e2736);
}

.scene .brush-cup::before {
    content: "";
    position: absolute;
    left: 22%;
    bottom: 72%;
    width: 56%;
    height: 46%;
    background:
        linear-gradient(70deg, transparent 0 18%, #c8d5df 18% 24%, transparent 24% 42%, #d8c08c 42% 48%, transparent 48% 66%, #d2a2b8 66% 72%, transparent 72%);
}

.scene .ceiling-lamp.warm,
.scene .diffuse-lamp {
    left: 50%;
    top: 2%;
    width: 18%;
    height: 28%;
    transform: translateX(-50%);
    border-radius: 0 0 40px 40px;
    background: radial-gradient(circle at top, rgba(255, 231, 179, 0.52), rgba(255, 231, 179, 0) 64%);
    filter: blur(4px);
}

.scene .consensus-card {
    right: 18%;
    bottom: 39%;
    width: 17%;
    height: 10%;
    transform: rotate(6deg);
    border-radius: 10px;
    background: linear-gradient(180deg, #f8e9c2, #cbb68a);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.scene .consensus-card::after {
    content: "82%";
    position: absolute;
    inset: 18% 0 0;
    text-align: center;
    color: #45311d;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.scene .tally-board {
    left: 18%;
    top: 16%;
    width: 14%;
    height: 18%;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(90deg, transparent 0 14%, rgba(226, 226, 235, 0.6) 14% 16%, transparent 16% 32%, rgba(226, 226, 235, 0.6) 32% 34%, transparent 34% 50%, rgba(226, 226, 235, 0.6) 50% 52%, transparent 52% 68%, rgba(226, 226, 235, 0.6) 68% 70%, transparent 70% 86%, rgba(226, 226, 235, 0.6) 86% 88%, transparent 88%);
    opacity: 0.66;
}

.scene .door-shadow {
    bottom: 28%;
    width: 10%;
    height: 18%;
    border-radius: 999px 999px 0 0;
    background: radial-gradient(circle at center, rgba(211, 187, 233, 0.28), rgba(211, 187, 233, 0) 70%);
    filter: blur(6px);
}

.scene .door-shadow.left {
    left: 30%;
}

.scene .door-shadow.right {
    right: 30%;
}

.scene .bench.long {
    width: 28%;
    height: 16%;
    bottom: 24%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, #37554f, #1a2b28);
}

.scene .bench.long.left {
    left: 16%;
}

.scene .bench.long.right {
    right: 16%;
}

.scene .shared-shelf {
    left: 50%;
    bottom: 37%;
    width: 12%;
    height: 10%;
    transform: translateX(-50%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, #53786f, #253b36);
}

.scene .artifact-tray {
    left: 50%;
    bottom: 40%;
    width: 8%;
    height: 5%;
    transform: translateX(-50%) rotate(-8deg);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(240, 222, 195, 0.94), rgba(191, 167, 127, 0.9));
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.scene .token-pouch,
.scene .token-tray {
    left: 50%;
    bottom: 18%;
    width: 13%;
    height: 9%;
    transform: translateX(-50%);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at 18% 52%, rgba(247, 211, 132, 0.88) 0 9%, transparent 11%),
        radial-gradient(circle at 36% 52%, rgba(247, 211, 132, 0.88) 0 9%, transparent 11%),
        radial-gradient(circle at 54% 52%, rgba(247, 211, 132, 0.88) 0 9%, transparent 11%),
        radial-gradient(circle at 72% 52%, rgba(247, 211, 132, 0.88) 0 9%, transparent 11%),
        radial-gradient(circle at 88% 52%, rgba(247, 211, 132, 0.88) 0 9%, transparent 11%),
        linear-gradient(180deg, rgba(87, 67, 52, 0.88), rgba(48, 33, 24, 0.96));
}

.scene .work-lamp {
    top: 7%;
    width: 24%;
    height: 26%;
    border-radius: 0 0 50% 50%;
    background: radial-gradient(circle at top, rgba(173, 255, 226, 0.36), rgba(173, 255, 226, 0) 68%);
    filter: blur(6px);
}

.scene .work-lamp.left {
    left: 8%;
}

.scene .work-lamp.right {
    right: 8%;
}

.scene .participant {
    right: 23%;
    bottom: 27%;
    width: 10%;
    height: 22%;
    border-radius: 999px 999px 22px 22px;
    background: linear-gradient(180deg, rgba(226, 234, 242, 0.18), rgba(74, 95, 108, 0.5) 34%, rgba(18, 29, 35, 0.92));
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.28);
    opacity: 0.94;
}

.scene .participant::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -17%;
    width: 42%;
    height: 27%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(circle at 50% 38%, rgba(241, 246, 250, 0.34), rgba(70, 86, 96, 0.94));
}

.scene .ingredient-basket {
    left: 50%;
    bottom: 38%;
    width: 11%;
    height: 7%;
    transform: translateX(-50%);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at 18% 56%, rgba(208, 91, 63, 0.92) 0 10%, transparent 12%),
        radial-gradient(circle at 36% 42%, rgba(231, 183, 73, 0.92) 0 10%, transparent 12%),
        radial-gradient(circle at 54% 58%, rgba(121, 178, 88, 0.92) 0 10%, transparent 12%),
        radial-gradient(circle at 72% 44%, rgba(198, 104, 146, 0.92) 0 10%, transparent 12%),
        radial-gradient(circle at 88% 58%, rgba(234, 214, 122, 0.92) 0 10%, transparent 12%),
        linear-gradient(180deg, rgba(132, 98, 63, 0.92), rgba(70, 47, 28, 0.98));
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
}

.scene .software-terminal {
    left: 50%;
    bottom: 35%;
    width: 18%;
    height: 13%;
    transform: translateX(-50%);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(180deg, rgba(186, 237, 255, 0.16), rgba(28, 55, 70, 0.92)),
        linear-gradient(180deg, rgba(19, 26, 34, 0.96), rgba(8, 12, 18, 0.98));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}

.scene .software-terminal::before {
    content: "";
    position: absolute;
    inset: 16% 14%;
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(76, 224, 201, 0.18), rgba(76, 224, 201, 0.02)),
        linear-gradient(0deg, rgba(120, 236, 255, 0.15) 0 8%, transparent 8% 24%, rgba(120, 236, 255, 0.12) 24% 32%, transparent 32% 48%, rgba(120, 236, 255, 0.12) 48% 56%, transparent 56% 72%, rgba(120, 236, 255, 0.08) 72% 80%, transparent 80%);
}

.scene .library-shelves {
    top: 16%;
    width: 18%;
    height: 48%;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.18)),
        repeating-linear-gradient(180deg,
            rgba(108, 78, 47, 0.95) 0 12%,
            rgba(48, 32, 18, 0.98) 12% 16%,
            rgba(130, 94, 57, 0.94) 16% 28%,
            rgba(52, 36, 19, 0.98) 28% 32%);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.scene .library-shelves.shelf-left {
    left: 10%;
}

.scene .library-shelves.shelf-right {
    right: 10%;
}

.scene .library-couch {
    left: 22%;
    bottom: 20%;
    width: 22%;
    height: 16%;
    border-radius: 26px 26px 18px 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(180deg, rgba(164, 146, 122, 0.28), rgba(64, 46, 34, 0.94)),
        linear-gradient(180deg, rgba(43, 31, 24, 0.96), rgba(24, 17, 13, 0.98));
}

.scene .library-couch::before {
    content: "";
    position: absolute;
    inset: -18% 6% 44%;
    border-radius: 22px 22px 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(161, 138, 116, 0.22), rgba(79, 56, 41, 0.94));
}

.scene .library-table {
    left: 47%;
    bottom: 22%;
    width: 16%;
    height: 7%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(128, 98, 72, 0.92), rgba(55, 37, 22, 0.98));
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

.scene .library-mug {
    left: 51%;
    bottom: 29%;
    width: 3.6%;
    height: 6%;
    border-radius: 10px 10px 8px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(246, 244, 238, 0.82), rgba(180, 169, 154, 0.9));
}

.scene .library-mug::after {
    content: "";
    position: absolute;
    right: -24%;
    top: 24%;
    width: 26%;
    height: 34%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
    border-radius: 0 999px 999px 0;
}

.scene .library-plate {
    left: 56%;
    bottom: 26%;
    width: 7%;
    height: 3.2%;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at 28% 50%, rgba(214, 168, 98, 0.96) 0 18%, transparent 19%),
        radial-gradient(circle at 52% 50%, rgba(212, 171, 112, 0.96) 0 18%, transparent 19%),
        radial-gradient(circle at 76% 50%, rgba(218, 176, 104, 0.96) 0 18%, transparent 19%),
        linear-gradient(180deg, rgba(224, 219, 209, 0.88), rgba(169, 160, 149, 0.94));
}

.scene .library-ledger {
    right: 22%;
    bottom: 24%;
    width: 12%;
    height: 10%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.16)),
        linear-gradient(180deg, rgba(55, 74, 99, 0.92), rgba(18, 24, 33, 0.98));
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

.scene .library-ledger.restricted {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.16)),
        linear-gradient(180deg, rgba(104, 48, 56, 0.92), rgba(33, 15, 18, 0.98));
    box-shadow:
        0 10px 18px rgba(0, 0, 0, 0.22),
        0 0 18px rgba(221, 110, 124, 0.16);
}

.scene .library-lamp {
    left: 50%;
    top: 10%;
    width: 24%;
    height: 14%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(255, 230, 178, 0.34), rgba(255, 230, 178, 0) 72%);
    filter: blur(10px);
}

.scene .keyboard-tray {
    left: 50%;
    bottom: 30%;
    width: 15%;
    height: 4%;
    transform: translateX(-50%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(72, 92, 109, 0.82), rgba(20, 29, 39, 0.96));
}

.scene .terminal-glow {
    left: 50%;
    bottom: 31%;
    width: 28%;
    height: 14%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(126, 233, 255, 0.24), rgba(126, 233, 255, 0) 72%);
    filter: blur(8px);
}

.scene .credit-board {
    right: 12%;
    top: 16%;
    width: 18%;
    height: 16%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(114, 176, 230, 0.18), rgba(30, 52, 70, 0.16));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.scene .credit-board::before {
    content: "1000";
    position: absolute;
    inset: 20% 0 auto;
    text-align: center;
    color: rgba(233, 245, 255, 0.82);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.scene .credit-board::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 22%;
    height: 12%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(135, 218, 255, 0.18), rgba(135, 218, 255, 0.48), rgba(135, 218, 255, 0.18));
}

.scene .credit-board.uncertain::after {
    background:
        linear-gradient(90deg, rgba(135, 218, 255, 0.18), rgba(135, 218, 255, 0.48), rgba(135, 218, 255, 0.18)),
        linear-gradient(90deg, transparent 0 34%, rgba(255, 184, 206, 0.42) 34% 52%, transparent 52%);
}

.scene .attribution-board {
    left: 12%;
    top: 16%;
    width: 14%;
    height: 16%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at 34% 34%, rgba(255, 255, 255, 0.16) 0 10%, transparent 12%),
        radial-gradient(circle at 66% 34%, rgba(255, 255, 255, 0.16) 0 10%, transparent 12%),
        linear-gradient(90deg, transparent 0 28%, rgba(255, 255, 255, 0.16) 28% 36%, transparent 36% 64%, rgba(255, 255, 255, 0.16) 64% 72%, transparent 72%),
        linear-gradient(180deg, rgba(190, 163, 241, 0.16), rgba(37, 30, 56, 0.22));
}

.scene .window-band {
    left: 50%;
    top: 10%;
    width: 44%;
    height: 12%;
    transform: translateX(-50%);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(143, 214, 189, 0.18), rgba(143, 214, 189, 0.04));
}

.scene .support-beam {
    left: 50%;
    bottom: 22%;
    width: 4px;
    height: 28%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
}

.scene .pedestal.tall {
    width: 18%;
    height: 28%;
    bottom: 23%;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, #51363d, #25161a);
}

.scene .pedestal.tall.left {
    left: 18%;
}

.scene .pedestal.tall.right {
    right: 18%;
}

.scene .artifact-frame {
    left: 22%;
    bottom: 44%;
    width: 10%;
    height: 8%;
    border-radius: 10px;
    transform: rotate(-7deg);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(241, 232, 212, 0.92), rgba(203, 176, 141, 0.92));
}

.scene .fairness-board {
    right: 10%;
    top: 14%;
    width: 18%;
    height: 14%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
}

.scene .fairness-board::before,
.scene .fairness-board::after {
    content: "";
    position: absolute;
    left: 16%;
    right: 16%;
    height: 2px;
    background: rgba(255, 255, 255, 0.22);
}

.scene .fairness-board::before {
    top: 38%;
}

.scene .fairness-board::after {
    top: 64%;
}

.scene .split-line {
    left: 50%;
    top: 30%;
    bottom: 18%;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(255, 160, 160, 0), rgba(255, 160, 160, 0.44), rgba(255, 160, 160, 0));
}

.scene .spot-cone {
    top: 2%;
    width: 26%;
    height: 36%;
    border-radius: 0 0 50% 50%;
    background: radial-gradient(circle at top, rgba(255, 237, 198, 0.36), rgba(255, 237, 198, 0) 64%);
    filter: blur(6px);
}

.scene .spot-cone.left {
    left: 12%;
}

.scene .spot-cone.right {
    right: 12%;
}

.scene .judge-rail {
    left: 50%;
    bottom: 38%;
    width: 54%;
    height: 3%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
}

.scene .archive-wall {
    left: 50%;
    top: 14%;
    width: 34%;
    height: 26%;
    transform: translateX(-50%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(113, 174, 212, 0.18), rgba(113, 174, 212, 0.04));
}

.scene .archive-columns {
    left: 50%;
    top: 18%;
    width: 28%;
    height: 18%;
    transform: translateX(-50%);
    background:
        linear-gradient(90deg, transparent 0 8%, rgba(201, 227, 245, 0.18) 8% 12%, transparent 12% 28%, rgba(201, 227, 245, 0.18) 28% 32%, transparent 32% 48%, rgba(201, 227, 245, 0.18) 48% 52%, transparent 52% 68%, rgba(201, 227, 245, 0.18) 68% 72%, transparent 72% 88%, rgba(201, 227, 245, 0.18) 88% 92%, transparent 92%);
}

.scene .speaker-dais {
    left: 50%;
    bottom: 23%;
    width: 24%;
    height: 18%;
    transform: translateX(-50%);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, #395468, #1b2933);
}

.scene .token-bowl {
    left: 50%;
    bottom: 21%;
    width: 14%;
    height: 9%;
    transform: translateX(-50%);
    border-radius: 999px;
    background:
        radial-gradient(circle at 16% 56%, rgba(247, 211, 132, 0.92) 0 10%, transparent 12%),
        radial-gradient(circle at 34% 48%, rgba(247, 211, 132, 0.92) 0 10%, transparent 12%),
        radial-gradient(circle at 52% 56%, rgba(247, 211, 132, 0.92) 0 10%, transparent 12%),
        radial-gradient(circle at 70% 50%, rgba(247, 211, 132, 0.92) 0 10%, transparent 12%),
        radial-gradient(circle at 86% 58%, rgba(247, 211, 132, 0.92) 0 10%, transparent 12%),
        linear-gradient(180deg, #5c7890, #253544);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.scene .public-meter {
    right: 12%;
    top: 14%;
    width: 14%;
    height: 26%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(180deg, rgba(114, 176, 230, 0.42) 0 36%, rgba(255, 255, 255, 0.06) 36% 100%);
}

.scene .aperture {
    left: 50%;
    top: 6%;
    width: 8%;
    height: 8%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(188, 229, 255, 0.76), rgba(188, 229, 255, 0.08) 56%, rgba(188, 229, 255, 0) 70%);
}

.scene .audience-rail {
    left: 50%;
    bottom: 44%;
    width: 62%;
    height: 6%;
    transform: translateX(-50%);
    border-radius: 999px;
    background:
        radial-gradient(circle at 10% 50%, rgba(255, 255, 255, 0.22) 0 6%, transparent 8%),
        radial-gradient(circle at 22% 50%, rgba(255, 255, 255, 0.22) 0 6%, transparent 8%),
        radial-gradient(circle at 34% 50%, rgba(255, 255, 255, 0.22) 0 6%, transparent 8%),
        radial-gradient(circle at 46% 50%, rgba(255, 255, 255, 0.22) 0 6%, transparent 8%),
        radial-gradient(circle at 58% 50%, rgba(255, 255, 255, 0.22) 0 6%, transparent 8%),
        radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.22) 0 6%, transparent 8%),
        radial-gradient(circle at 82% 50%, rgba(255, 255, 255, 0.22) 0 6%, transparent 8%);
}

.scene .veil-sheet {
    left: 50%;
    top: 12%;
    width: 28%;
    height: 52%;
    transform: translateX(-50%);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(214, 221, 255, 0.22), rgba(214, 221, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(2px);
}

.scene .shrouded-urn {
    left: 50%;
    bottom: 20%;
    width: 16%;
    height: 20%;
    transform: translateX(-50%);
    border-radius: 999px 999px 28px 28px;
    background: linear-gradient(180deg, rgba(163, 146, 220, 0.4), rgba(69, 58, 108, 0.88));
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.scene .frost-panel {
    top: 18%;
    width: 14%;
    height: 30%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(224, 229, 255, 0.14), rgba(224, 229, 255, 0.04));
}

.scene .frost-panel.left {
    left: 16%;
}

.scene .frost-panel.right {
    right: 16%;
}

.scene .hidden-slit {
    right: 12%;
    top: 14%;
    width: 3%;
    height: 20%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(195, 207, 255, 0.08), rgba(195, 207, 255, 0.42), rgba(195, 207, 255, 0.08));
}

.scene .reflection-pool {
    left: 50%;
    bottom: 18%;
    width: 34%;
    height: 10%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(155, 177, 255, 0.18), rgba(155, 177, 255, 0.02) 72%);
    filter: blur(4px);
}

.scene .room-shell,
.scene .room-door,
.scene .room-easel,
.scene .room-canvas,
.scene .room-brush-cup,
.scene .room-jar,
.scene .room-lamp,
.scene .room-desk,
.scene .room-chair,
.scene .room-plinth,
.scene .room-sculpture,
.scene .room-spotlight,
.scene .room-aperture,
.scene .room-registry,
.scene .room-reflection-pool {
    position: absolute;
}

.scene .room-shell {
    inset: 0;
    overflow: hidden;
}

.scene .room-shell::before,
.scene .room-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.scene .room-shell::before {
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.32));
    mix-blend-mode: screen;
}

.scene .room-shell::after {
    background:
        linear-gradient(0deg, rgba(255, 255, 255, 0.05) 50%, transparent 50%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 50%, transparent 50%);
    background-size: 4px 4px, 4px 4px;
    opacity: 0.22;
    mix-blend-mode: soft-light;
}

.scene .studio-room {
    background:
        radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(34, 34, 38, 0.9), rgba(8, 8, 10, 0.98));
}

.scene .artifact-room {
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(28, 30, 34, 0.92), rgba(6, 7, 9, 0.98));
}

.scene .final-room {
    background:
        radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.09), transparent 26%),
        linear-gradient(180deg, rgba(24, 26, 30, 0.92), rgba(5, 6, 8, 0.99));
}

.scene .room-door {
    bottom: 24%;
    width: 14%;
    height: 34%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px 18px 8px 8px;
    background: linear-gradient(180deg, rgba(40, 43, 52, 0.88), rgba(11, 12, 16, 0.98));
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.scene .room-door.left {
    left: 11%;
}

.scene .room-door.right {
    right: 11%;
}

.scene .room-easel {
    left: 50%;
    bottom: 24%;
    width: 26%;
    height: 38%;
    transform: translateX(-50%);
}

.scene .room-easel::before,
.scene .room-easel::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 3px;
    height: 80%;
    background: linear-gradient(180deg, rgba(228, 228, 232, 0.72), rgba(78, 78, 84, 0.4));
}

.scene .room-easel::before {
    left: 26%;
    transform: rotate(12deg);
}

.scene .room-easel::after {
    right: 26%;
    transform: rotate(-12deg);
}

.scene .room-canvas {
    left: 50%;
    bottom: 40%;
    width: 17%;
    height: 18%;
    transform: translateX(-50%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: linear-gradient(180deg, rgba(242, 242, 244, 0.96), rgba(194, 194, 198, 0.9));
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.24);
}

.scene .room-brush-cup {
    left: 30%;
    bottom: 26%;
    width: 8%;
    height: 12%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px 10px 14px 14px;
    background: linear-gradient(180deg, rgba(156, 161, 171, 0.72), rgba(49, 53, 62, 0.94));
}

.scene .room-brush-cup::before {
    content: "";
    position: absolute;
    left: 26%;
    bottom: 72%;
    width: 48%;
    height: 54%;
    background:
        linear-gradient(68deg, transparent 0 18%, rgba(255, 255, 255, 0.9) 18% 23%, transparent 23% 44%, rgba(255, 255, 255, 0.76) 44% 49%, transparent 49% 72%, rgba(255, 255, 255, 0.62) 72% 77%, transparent 77%);
}

.scene .room-jar {
    bottom: 26%;
    width: 6.6%;
    height: 10%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px 10px 14px 14px;
    background: linear-gradient(180deg, rgba(198, 198, 202, 0.56), rgba(58, 60, 68, 0.92));
}

.scene .room-jar.jar-a {
    left: 58%;
}

.scene .room-jar.jar-b {
    left: 66%;
    bottom: 24%;
}

.scene .room-jar.jar-c {
    left: 73%;
}

.scene .room-lamp {
    left: 50%;
    top: 8%;
    width: 36%;
    height: 44%;
    transform: translateX(-50%);
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.2), transparent 54%);
    filter: blur(3px);
    opacity: 0.86;
}

.scene .room-desk {
    bottom: 24%;
    width: 24%;
    height: 12%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(70, 74, 82, 0.8), rgba(20, 22, 27, 0.96));
}

.scene .room-desk.left {
    left: 12%;
}

.scene .room-desk.right {
    right: 12%;
}

.scene .room-chair {
    bottom: 18%;
    width: 10%;
    height: 10%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(90, 94, 102, 0.72), rgba(18, 20, 24, 0.98));
}

.scene .room-chair.left {
    left: 19%;
}

.scene .room-chair.right {
    right: 19%;
}

.scene .room-plinth {
    left: 50%;
    bottom: 18%;
    width: 18%;
    height: 22%;
    transform: translateX(-50%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(78, 82, 90, 0.62), rgba(18, 20, 24, 0.96));
}

.scene .room-plinth.small {
    width: 16%;
    height: 16%;
    bottom: 20%;
}

.scene .room-sculpture {
    left: 50%;
    bottom: 33%;
    width: 14%;
    height: 16%;
    transform: translateX(-50%);
    border-radius: 38% 52% 46% 40%;
    background:
        radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.46), transparent 18%),
        linear-gradient(180deg, rgba(232, 232, 236, 0.72), rgba(92, 94, 102, 0.36) 42%, rgba(20, 22, 26, 0.96));
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
}

.scene .room-spotlight {
    left: 50%;
    top: 8%;
    width: 34%;
    height: 52%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 72%);
    clip-path: polygon(48% 0, 52% 0, 100% 100%, 0 100%);
    opacity: 0.62;
}

.scene .room-aperture {
    left: 50%;
    top: 14%;
    width: 16%;
    height: 16%;
    transform: translateX(-50%);
    border-radius: 999px;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.7), rgba(180, 184, 198, 0.18) 48%, rgba(180, 184, 198, 0) 68%);
}

.scene .room-registry {
    left: 50%;
    bottom: 26%;
    width: 42%;
    height: 8%;
    transform: translateX(-50%);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 14%, transparent 14% 20%, rgba(255, 255, 255, 0.06) 20% 34%, transparent 34% 40%, rgba(255, 255, 255, 0.06) 40% 54%, transparent 54% 60%, rgba(255, 255, 255, 0.06) 60% 74%, transparent 74% 80%, rgba(255, 255, 255, 0.06) 80% 94%, transparent 94%),
        linear-gradient(180deg, rgba(50, 54, 62, 0.74), rgba(14, 15, 18, 0.96));
}

.scene .room-reflection-pool {
    left: 50%;
    bottom: 12%;
    width: 38%;
    height: 12%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(219, 221, 232, 0.18), rgba(219, 221, 232, 0.02) 72%);
    filter: blur(2px);
}

.scene .table,
.scene .bench,
.scene .pedestal,
.scene .shelf,
.scene .door,
.scene .canvas,
.scene .note,
.scene .spotlight,
.scene .scoreboard,
.scene .tokens,
.scene .window {
    position: absolute;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.scene .table {
    left: 50%;
    bottom: 22%;
    width: 44%;
    height: 18%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #2a3347, #141a27);
}

.scene .canvas {
    left: 50%;
    bottom: 32%;
    width: 18%;
    height: 12%;
    transform: translateX(-50%) rotate(-5deg);
    background: linear-gradient(180deg, #e4e8ec, #c7d4df);
}

.scene .note {
    left: 62%;
    bottom: 35%;
    width: 13%;
    height: 8%;
    transform: rotate(8deg);
    background: linear-gradient(180deg, #f7efcf, #d1c39e);
}

.scene .door {
    width: 14%;
    height: 30%;
    bottom: 26%;
    background: linear-gradient(180deg, #252f40, #101521);
}

.scene .door.left {
    left: 28%;
}

.scene .door.right {
    right: 28%;
}

.scene .window {
    top: 18%;
    left: 18%;
    width: 64%;
    height: 18%;
    background: rgba(198, 216, 233, 0.12);
}

.scene .bench {
    width: 28%;
    height: 14%;
    bottom: 24%;
    background: linear-gradient(180deg, #2d3547, #161b28);
}

.scene .bench.left {
    left: 18%;
}

.scene .bench.right {
    right: 18%;
}

.scene .shelf {
    left: 50%;
    bottom: 38%;
    width: 12%;
    height: 6%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #3a455d, #202735);
}

.scene .pedestal {
    width: 20%;
    height: 24%;
    bottom: 24%;
    background: linear-gradient(180deg, #2f3b52, #171d2a);
}

.scene .pedestal.left {
    left: 22%;
}

.scene .pedestal.right {
    right: 22%;
}

.scene .spotlight {
    width: 28%;
    height: 36%;
    top: 2%;
    background: radial-gradient(circle at top, rgba(255, 246, 203, 0.44), transparent 60%);
    border: 0;
    filter: blur(2px);
}

.scene .spotlight.left {
    left: 18%;
}

.scene .spotlight.right {
    right: 18%;
}

.scene .scoreboard {
    right: 12%;
    top: 12%;
    width: 16%;
    height: 12%;
    background: rgba(162, 207, 191, 0.12);
}

.scene .tokens {
    left: 50%;
    bottom: 18%;
    width: 14%;
    height: 8%;
    transform: translateX(-50%);
    background: radial-gradient(circle at 18% 50%, rgba(216, 192, 140, 0.92) 0 10%, transparent 12%),
                radial-gradient(circle at 36% 50%, rgba(216, 192, 140, 0.92) 0 10%, transparent 12%),
                radial-gradient(circle at 54% 50%, rgba(216, 192, 140, 0.92) 0 10%, transparent 12%),
                radial-gradient(circle at 72% 50%, rgba(216, 192, 140, 0.92) 0 10%, transparent 12%),
                radial-gradient(circle at 90% 50%, rgba(216, 192, 140, 0.92) 0 10%, transparent 12%);
}

.prompt-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 20px;
    box-shadow: var(--glow-soft);
}

.prompt-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(198, 216, 233, 0.08), transparent 40%, rgba(210, 162, 184, 0.08));
    pointer-events: none;
}

.prompt-text {
    margin: 0 0 18px;
    white-space: pre-wrap;
}

.response-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel-soft);
    box-shadow: var(--glow-soft);
}

.response-form label {
    flex: 1;
    min-height: 0;
}

.response-form textarea {
    min-height: 124px;
}

.response-label {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.35em;
}

.response-form .form-actions {
    margin-top: 18px;
}

.complete-screen {
    display: block;
    padding: 0;
    min-height: auto;
}

.results-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 980px);
    margin: 0 auto;
    padding: 42px 24px 24px;
}

.results-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 28px;
    display: grid;
    gap: 24px;
}

.results-session-id {
    position: absolute;
    top: 28px;
    right: 28px;
    color: rgba(208, 208, 214, 0.72);
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.results-share-block {
    display: grid;
    gap: 14px;
    justify-items: center;
    text-align: center;
}

.certificate-image {
    width: min(100%, 760px);
    height: auto;
    aspect-ratio: 1067 / 800;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.34);
}

.results-share-text {
    margin: 0;
    max-width: 24ch;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.1vw, 2.35rem);
    line-height: 1.02;
    color: var(--text);
}

.advanced-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.advanced-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
    color: var(--gold);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.advanced-panel > summary::-webkit-details-marker {
    display: none;
}

.advanced-panel > summary::after {
    content: "+";
    color: var(--text);
    font-size: 1rem;
}

.advanced-panel[open] > summary::after {
    content: "\2212";
}

.advanced-content {
    padding: 0 20px 20px;
}

.certificate-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel-soft);
    padding: 22px;
    display: grid;
    gap: 18px;
}

.certificate-panel h3 {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 1.6rem;
}

.certificate-panel h3 a,
.certificate-panel h3 a:visited,
.certificate-panel h3 a:hover,
.certificate-panel h3 a:focus-visible {
    color: var(--text);
}

.certificate-panel p {
    margin: 0;
    color: var(--muted);
}

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

.certificate-status {
    margin: 0;
    min-height: 1.5em;
    color: var(--ice);
}

.results-history {
    display: grid;
    gap: 14px;
}

.results-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.results-history-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
}

.results-history-card h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.42rem;
}

.results-history-card p {
    margin: 0;
    color: var(--muted);
}

.results-history-card a,
.results-history-card a:visited {
    color: var(--text);
}

.results-history-card a:hover,
.results-history-card a:focus-visible {
    color: var(--text);
}

.results-secondary-actions {
    display: flex;
    justify-content: center;
}

.legal-page {
    min-height: 100vh;
}

.legal-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 980px);
    margin: 0 auto;
    padding: 42px 24px 24px;
}

.legal-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 28px;
}

.legal-card h1 {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    line-height: 1.02;
}

.legal-card p,
.legal-card li {
    color: var(--muted);
}

.legal-card h2 {
    margin: 28px 0 10px;
    font-family: var(--font-display);
    font-size: 1.7rem;
}

.legal-card ul {
    margin: 0;
    padding-left: 20px;
}

.legal-back {
    display: flex;
    width: fit-content;
    margin: 20px auto 0;
    text-align: center;
    align-self: center;
}

.transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    background: rgba(5, 8, 14, 0.56);
    backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.transition-overlay.is-active {
    opacity: 1;
}

.transition-card {
    min-width: min(92vw, 540px);
    padding: 30px 30px 28px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 16, 28, 0.84);
    box-shadow: var(--glow);
}

.transition-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}

.transition-line::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(198, 216, 233, 0.9), transparent);
    animation: sweep 1.2s linear infinite;
}

.transition-kicker {
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    margin-bottom: 10px;
}

.transition-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.04;
}

.transition-body,
.transition-note {
    margin: 0;
}

.transition-body {
    margin-top: 14px;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.55;
}

.transition-note {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.empty-state {
    color: var(--muted);
}

@keyframes screenIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.988);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes introFlicker {
    0%, 12%, 21%, 38%, 45%, 64%, 73%, 100% {
        opacity: 0;
    }
    13%, 20%, 39%, 44%, 65%, 72%, 83%, 94% {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .intake-screen::after {
        animation: none;
        opacity: 1;
    }
}

@keyframes driftOrb {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(4%, -3%, 0) scale(1.06);
    }
}

@keyframes ditherShift {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(1px, -1px);
    }
    50% {
        transform: translate(-1px, 1px);
    }
    75% {
        transform: translate(1px, 1px);
    }
    100% {
        transform: translate(0, 0);
    }
}

@keyframes swayVoid {
    0%, 100% {
        transform: rotate(-1.5deg) translateY(0);
    }
    50% {
        transform: rotate(1.5deg) translateY(-10px);
    }
}

@keyframes cubeTurnA {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotateX(58deg) rotateY(-30deg) rotateZ(-10deg);
    }
    24% {
        transform: translate3d(10%, -5%, 18px) rotateX(22deg) rotateY(-4deg) rotateZ(-2deg);
    }
    52% {
        transform: translate3d(16%, 6%, 28px) rotateX(12deg) rotateY(58deg) rotateZ(5deg);
    }
    78% {
        transform: translate3d(6%, 14%, 12px) rotateX(54deg) rotateY(88deg) rotateZ(9deg);
    }
}

@keyframes cubeTurnB {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotateX(16deg) rotateY(54deg) rotateZ(7deg);
    }
    24% {
        transform: translate3d(-14%, 10%, 18px) rotateX(54deg) rotateY(22deg) rotateZ(6deg);
    }
    52% {
        transform: translate3d(-22%, -8%, 30px) rotateX(14deg) rotateY(-34deg) rotateZ(-82deg);
    }
    78% {
        transform: translate3d(-8%, -14%, 14px) rotateX(56deg) rotateY(-88deg) rotateZ(-82deg);
    }
}

@keyframes cubeTurnC {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotateX(54deg) rotateY(18deg) rotateZ(-5deg);
    }
    24% {
        transform: translate3d(12%, -12%, 18px) rotateX(18deg) rotateY(46deg) rotateZ(-3deg);
    }
    52% {
        transform: translate3d(2%, -22%, 28px) rotateX(14deg) rotateY(92deg) rotateZ(84deg);
    }
    78% {
        transform: translate3d(-10%, -6%, 14px) rotateX(56deg) rotateY(42deg) rotateZ(84deg);
    }
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(-1deg);
    }
}

@keyframes pulseGlowCentered {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.72;
    }
    50% {
        transform: translateX(-50%) scale(1.06);
        opacity: 0.9;
    }
}

@keyframes breathOpacity {
    0%, 100% {
        opacity: 0.72;
    }
    50% {
        opacity: 1;
    }
}

@keyframes veilBreathCentered {
    0%, 100% {
        transform: translateX(-50%) scaleY(1);
        opacity: 0.88;
    }
    50% {
        transform: translateX(-50%) scaleY(1.03);
        opacity: 1;
    }
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.45;
    }
    50% {
        opacity: 0.82;
    }
}

@keyframes sweep {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

@keyframes buttonFlash {
    0% {
        transform: scale(0.985);
    }
    55% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes cubePressFlash {
    0% {
        transform: scale(0.985) rotateX(14deg) rotateY(-16deg) rotateZ(-1deg);
    }
    55% {
        transform: scale(1.025) rotateX(18deg) rotateY(-20deg) rotateZ(-2deg);
    }
    100% {
        transform: scale(1) rotateX(16deg) rotateY(-18deg) rotateZ(-1deg);
    }
}

@media (max-width: 1040px) {
    .run-screen,
    .room-experience,
    .intro-screen {
        grid-template-columns: 1fr;
    }

    .run-stage {
        min-height: auto;
    }
}

@media (max-width: 760px) {
    body {
        padding: 0;
    }

    .topbar,
    .form-actions,
    .prompt-actions,
    .completion-actions {
        flex-direction: column;
    }

    .field-row,
    .room-experience {
        grid-template-columns: 1fr;
    }

    .intro-screen h1 {
        white-space: nowrap;
        font-size: clamp(1.9rem, 8.8vw, 3rem);
        line-height: 0.98;
    }

    .intro-screen,
    .intake-screen,
    .run-screen {
        padding: 18px 16px 24px;
        min-height: auto;
    }

    .results-shell {
        padding: 24px 16px 18px;
    }

    .room-experience {
        padding: 0;
        align-items: start;
    }

    .room-copy-stack {
        grid-template-rows: auto;
        min-height: auto;
    }

    .scene-frame,
    .scene {
        min-height: 0;
    }

    .scene-caption {
        padding: 14px 16px;
    }

    .response-label {
        display: grid;
        gap: 2px;
    }

    .intro-void {
        width: min(82vw, 420px);
    }

    .intro-copy {
        width: 100%;
        gap: 14px;
    }

    .intro-whisper {
        font-size: 0.82rem;
        letter-spacing: 0.03em;
        width: min(100%, 34ch);
        max-width: 34ch;
    }

    .intro-button,
    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .cube-node {
        width: 42%;
        min-width: 112px;
    }

    .cube-node.node-a {
        top: 18%;
        left: 8%;
    }

    .cube-node.node-b {
        top: 31%;
        left: 45%;
    }

    .cube-node.node-c {
        top: 52%;
        left: 14%;
    }

    .cube-node.node-d {
        top: 51%;
        left: 52%;
    }

    .certificate-panel,
    .prompt-card,
    .response-form,
    .results-card {
        padding: 16px;
        border-radius: 18px;
    }

    .intake-card {
        padding: 20px 18px;
        border-radius: 20px;
    }

    .results-session-id {
        position: static;
        justify-self: end;
        margin-bottom: -4px;
    }

    .results-share-text {
        max-width: none;
        font-size: clamp(1.35rem, 6vw, 1.9rem);
    }

    .results-history-grid {
        grid-template-columns: 1fr;
    }

    .intake-inline-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .site-footer {
        padding: 20px 16px 28px;
    }

    .site-footer-line {
        gap: 8px;
        font-size: 0.74rem;
        overflow-x: auto;
        max-width: 100%;
        padding-bottom: 2px;
    }

    input,
    textarea {
        padding: 12px 14px;
        border-radius: 14px;
    }

    .response-form textarea {
        min-height: 150px;
    }

    .legal-shell {
        padding: 24px 16px 18px;
    }

    .legal-card {
        padding: 20px 18px;
        border-radius: 20px;
    }

    .transition-card {
        min-width: 0;
        width: calc(100vw - 28px);
        padding: 24px 20px 22px;
    }

.transition-title {
        font-size: clamp(1.6rem, 7vw, 2.4rem);
    }
}

@media (min-width: 721px) {
    .intake-note-break {
        display: block;
        height: 0;
    }
}
