/* =========================================================
   bability.pro — zen meets retro-futuristic probability
   Design compliance language: Interaction (prioritize shake-error pattern),
   Interactive Probability Sandbox:** Sandbox:**A Sandbox* Sandbox:* Sandbox::::* (final section) where coin/die responds
   to click with physics-based flip/roll animation. IntersectionObserver at
   threshold 0.15. The zen aesthetic demands subtlety. JetBrains Mono for
   consistency, Source Sans 3 (Google Fonts), Outfit (Google Fonts).
   ========================================================= */

:root {
    --c-twilight: #1b1833;
    --c-ink: #0e0c1d;
    --c-amber: #e8a44a;
    --c-pink: #c7617d;
    --c-cream: #f2ece0;
    --c-static: #8b87a3;
    --c-static-light: #d4d0e0;
    --c-moss: #6b9a7d;
    --c-deep: #3d3a50;

    --f-display: "Outfit", "Inter", system-ui, sans-serif;
    --f-body: "Source Sans 3", "Inter", system-ui, sans-serif;
    --f-mono: "JetBrains Mono", "Space Mono", ui-monospace, monospace;

    --pad-h: 8vw;
    --pad-h-mobile: 5vw;
    --col-max: 640px;
    --section-gap: 12vh;

    --ease-zen: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
    background: var(--c-twilight);
}

body {
    margin: 0;
    padding: 0;
    color: var(--c-static-light);
    background: var(--c-twilight);
    font-family: var(--f-body);
    font-size: 1.125rem;
    line-height: 1.75;
    font-weight: 400;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* CRT phosphor + aged paper grain */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.91 0 0 0 0 0.64 0 0 0 0 0.29 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* =========================================================
   Layout — chambers
   ========================================================= */

.chamber {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8vh var(--pad-h);
    scroll-snap-align: start;
}

.chamber--opening {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at center top, rgba(232, 164, 74, 0.08), transparent 55%),
        radial-gradient(ellipse at center bottom, rgba(199, 97, 125, 0.06), transparent 60%),
        var(--c-twilight);
}

.chamber-inner,
.opening-inner {
    width: 100%;
    max-width: var(--col-max);
    text-align: center;
    position: relative;
}

.opening-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3vh;
}

/* =========================================================
   Hero die (CSS 3D transform)
   ========================================================= */

.die-stage {
    position: relative;
    width: 180px;
    height: 180px;
    perspective: 900px;
    margin-bottom: 1vh;
}

.die {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 30px auto;
    transform-style: preserve-3d;
    animation: die-tumble 14s linear infinite;
}

@keyframes die-tumble {
    0%   { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.die-face {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(242, 236, 224, 0.18), rgba(232, 164, 74, 0.12));
    border: 1px solid rgba(242, 236, 224, 0.22);
    box-shadow:
        inset 0 0 30px rgba(232, 164, 74, 0.35),
        inset 0 0 60px rgba(232, 164, 74, 0.15),
        0 0 20px rgba(232, 164, 74, 0.1);
    backdrop-filter: blur(4px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 6px;
    padding: 18px;
    place-items: center;
}

.die-face--front  { transform: translateZ(60px); }
.die-face--back   { transform: rotateY(180deg) translateZ(60px); }
.die-face--right  { transform: rotateY(90deg) translateZ(60px); }
.die-face--left   { transform: rotateY(-90deg) translateZ(60px); }
.die-face--top    { transform: rotateX(90deg) translateZ(60px); }
.die-face--bottom { transform: rotateX(-90deg) translateZ(60px); }

.pip {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--c-amber);
    box-shadow: 0 0 10px rgba(232, 164, 74, 0.9), 0 0 2px rgba(232, 164, 74, 1);
    align-self: center;
    justify-self: center;
}

.die-face--front .pip-center {
    grid-column: 2;
    grid-row: 2;
}

.die-face--back .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.die-face--back .pip:nth-child(2) { grid-column: 3; grid-row: 1; }
.die-face--back .pip:nth-child(3) { grid-column: 1; grid-row: 2; }
.die-face--back .pip:nth-child(4) { grid-column: 3; grid-row: 2; }
.die-face--back .pip:nth-child(5) { grid-column: 1; grid-row: 3; }
.die-face--back .pip:nth-child(6) { grid-column: 3; grid-row: 3; }

.die-face--right .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.die-face--right .pip-center { grid-column: 2; grid-row: 2; }
.die-face--right .pip:nth-child(3) { grid-column: 3; grid-row: 3; }

.die-face--left .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.die-face--left .pip:nth-child(2) { grid-column: 3; grid-row: 1; }
.die-face--left .pip:nth-child(3) { grid-column: 1; grid-row: 3; }
.die-face--left .pip:nth-child(4) { grid-column: 3; grid-row: 3; }

.die-face--top .pip { grid-column: 2; grid-row: 2; }

.die-face--bottom .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.die-face--bottom .pip:nth-child(2) { grid-column: 3; grid-row: 1; }
.die-face--bottom .pip-center { grid-column: 2; grid-row: 2; }
.die-face--bottom .pip:nth-child(4) { grid-column: 1; grid-row: 3; }
.die-face--bottom .pip:nth-child(5) { grid-column: 3; grid-row: 3; }

.die-glow {
    position: absolute;
    inset: 20%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 164, 74, 0.35), transparent 70%);
    filter: blur(20px);
    z-index: -1;
    animation: glow-pulse 6s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* =========================================================
   Typography — oversized display
   ========================================================= */

.hero-expression {
    font-family: var(--f-display);
    font-weight: 800;
    font-size: clamp(3.5rem, 10vw, 8rem);
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin: 1vh 0 0;
    color: var(--c-cream);
    position: relative;
}

.hero-expression .formula {
    background: linear-gradient(180deg, var(--c-cream) 0%, var(--c-amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 30px rgba(232, 164, 74, 0.3));
}

.hero-question {
    max-width: 440px;
    font-family: var(--f-body);
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--c-static);
    margin: 0.5vh auto 0;
    line-height: 1.7;
    font-style: italic;
}

.hero-question .pulse {
    display: block;
    animation: soft-pulse 4s ease-in-out infinite;
}

.hero-question .pulse:nth-child(2) {
    animation-delay: 1s;
}

@keyframes soft-pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

.scroll-cue {
    position: absolute;
    bottom: -8vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--c-static);
    font-family: var(--f-mono);
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.scroll-cue__line {
    width: 1px;
    height: 48px;
    background: linear-gradient(180deg, var(--c-static), transparent);
    animation: scroll-line 2.4s ease-in-out infinite;
    transform-origin: top;
}

@keyframes scroll-line {
    0% { transform: scaleY(0); opacity: 0.2; }
    40% { transform: scaleY(1); opacity: 0.9; }
    100% { transform: scaleY(1); opacity: 0; }
}

/* =========================================================
   Section titles
   ========================================================= */

.section-title {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.035em;
    line-height: 1.02;
    color: var(--c-cream);
    margin: 0 0 4vh;
}

.section-title .formula {
    font-family: var(--f-mono);
    font-weight: 500;
    color: var(--c-amber);
    letter-spacing: -0.02em;
}

.accent-amber { color: var(--c-amber); }
.accent-pink  { color: var(--c-pink); }
.accent-moss  { color: var(--c-moss); }

.chamber-index {
    font-family: var(--f-mono);
    font-size: 0.78rem;
    color: var(--c-static);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 2.2vh;
}

.chamber-index em {
    font-style: italic;
    color: var(--c-static-light);
    letter-spacing: 0.1em;
    text-transform: none;
    font-family: var(--f-body);
}

.chamber-index span {
    color: var(--c-amber);
}

.body-text {
    font-family: var(--f-body);
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--c-static-light);
    max-width: 520px;
    margin: 3vh auto;
}

.body-text strong {
    color: var(--c-cream);
    font-weight: 600;
}

.formula {
    font-family: var(--f-mono);
    font-weight: 400;
    color: var(--c-amber);
    letter-spacing: 0.01em;
}

/* =========================================================
   Raked sand dividers
   ========================================================= */

.divider {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.raked-sand {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.rake-line {
    fill: none;
    stroke: var(--c-static);
    stroke-width: 1;
    stroke-opacity: 0.28;
    stroke-linecap: round;
    stroke-dasharray: 1600;
    stroke-dashoffset: 0;
    animation: rake-shift 20s linear infinite;
}

.rake-line:nth-child(2) { animation-duration: 26s; animation-direction: reverse; }
.rake-line:nth-child(3) { animation-duration: 32s; }

.raked-sand--reverse .rake-line {
    animation-direction: reverse;
}
.raked-sand--reverse .rake-line:nth-child(2) {
    animation-direction: normal;
}

@keyframes rake-shift {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: 1600; }
}

.stone-marker {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c-amber);
    box-shadow:
        0 0 0 1px rgba(232, 164, 74, 0.3),
        0 0 18px rgba(232, 164, 74, 0.55),
        0 0 36px rgba(232, 164, 74, 0.25);
    z-index: 2;
}

/* =========================================================
   Fade-in on intersection
   ========================================================= */

.fade-in {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
    transition: opacity 800ms var(--ease-zen), transform 800ms var(--ease-zen);
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* =========================================================
   Distribution figure (chamber 01)
   ========================================================= */

.distribution-figure {
    margin: 3vh auto;
    max-width: 440px;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 600ms var(--ease-zen), transform 600ms var(--ease-zen);
}

.is-visible .distribution-figure {
    opacity: 1;
    transform: scale(1);
}

.dist-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(232, 164, 74, 0.15));
}

.bell-outline {
    fill: none;
    stroke: var(--c-amber);
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.axis {
    stroke: var(--c-static);
    stroke-opacity: 0.4;
    stroke-width: 1;
}

.tick-dot {
    fill: var(--c-amber);
}

.caption {
    font-family: var(--f-mono);
    font-size: 0.78rem;
    color: var(--c-static);
    margin-top: 1.5vh;
    letter-spacing: 0.05em;
}

/* =========================================================
   Coin (chamber 02)
   ========================================================= */

.coin-stage {
    perspective: 800px;
    margin: 3vh auto;
    display: flex;
    justify-content: center;
}

.coin {
    position: relative;
    width: 110px;
    height: 110px;
    transform-style: preserve-3d;
    transition: transform 800ms var(--ease-zen);
    cursor: pointer;
}

.coin.is-flipped {
    transform: rotateY(1080deg);
}

.coin-face {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--f-display);
    font-size: 2.6rem;
    font-weight: 700;
    backface-visibility: hidden;
    box-shadow:
        inset 0 0 20px rgba(0, 0, 0, 0.2),
        0 0 24px rgba(232, 164, 74, 0.25);
    border: 1px solid rgba(242, 236, 224, 0.3);
}

.coin-face--heads {
    background: radial-gradient(circle at 35% 30%, #f3b15c, var(--c-amber) 60%, #b77a2c);
    color: var(--c-ink);
}

.coin-face--tails {
    background: radial-gradient(circle at 35% 30%, #d97a95, var(--c-pink) 60%, #9a4560);
    color: var(--c-cream);
    transform: rotateY(180deg);
}

/* Misconception block */
.misconception {
    margin: 3vh auto;
    max-width: 520px;
    padding: 5vh 6vw;
    border: 1px solid rgba(139, 135, 163, 0.2);
    border-radius: 4px;
    background: rgba(14, 12, 29, 0.4);
    position: relative;
}

.badge-stamp {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--f-mono);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    padding: 4px 14px;
    background: var(--c-twilight);
    border: 1px solid var(--c-pink);
    color: var(--c-pink);
    border-radius: 999px;
}

.fallacy-claim {
    display: block;
    width: 100%;
    background: transparent;
    border: 1px dashed rgba(199, 97, 125, 0.5);
    border-radius: 4px;
    color: var(--c-cream);
    font-family: var(--f-body);
    font-size: 1.05rem;
    line-height: 1.6;
    padding: 1.6rem 1.2rem;
    margin: 1.2rem 0;
    cursor: pointer;
    transition: border-color 300ms var(--ease-zen), background 300ms var(--ease-zen);
}

.fallacy-claim:hover {
    border-color: var(--c-pink);
    background: rgba(199, 97, 125, 0.06);
}

.fallacy-claim em {
    color: var(--c-pink);
    font-style: italic;
}

.shake {
    animation: shake 400ms ease-out;
    border-color: var(--c-pink);
    background: rgba(199, 97, 125, 0.1);
}

@keyframes shake {
    0%, 100%              { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80%    { transform: translateX(4px); }
}

.misconception__reveal {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 600ms var(--ease-zen), opacity 600ms var(--ease-zen), margin 600ms var(--ease-zen);
    margin: 0 auto;
}

.misconception__reveal.is-revealed {
    max-height: 300px;
    opacity: 1;
    margin: 1.6rem auto 0;
}

/* =========================================================
   Distribution stack (chamber 03)
   ========================================================= */

.distribution-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2vh;
    max-width: 520px;
    margin: 3vh auto;
    perspective: 900px;
}

.dist-sculpture {
    margin: 0;
    width: min(100%, 440px);
    min-height: 104px;
    padding: 1.2rem 1.4rem;
    border: 1px solid rgba(139, 135, 163, 0.2);
    border-radius: 4px;
    background:
        linear-gradient(90deg, rgba(14, 12, 29, 0.66), rgba(27, 24, 51, 0.26)),
        radial-gradient(circle at 22% 50%, rgba(232, 164, 74, 0.09), transparent 42%);
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(18px) scale(0.85) rotateX(8deg);
    transition: opacity 600ms var(--ease-zen), border-color 400ms var(--ease-zen), transform 600ms var(--ease-zen);
}

.is-visible .dist-sculpture {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
}

.is-visible .dist-sculpture:nth-child(2) { transition-delay: 90ms; }
.is-visible .dist-sculpture:nth-child(3) { transition-delay: 180ms; }
.is-visible .dist-sculpture:nth-child(4) { transition-delay: 270ms; }

.dist-sculpture:hover {
    border-color: rgba(232, 164, 74, 0.4);
    transform: translateY(-4px) scale(1.01);
}

.dist-mini {
    width: 42%;
    max-width: 120px;
    height: auto;
    flex: 0 0 120px;
    display: block;
    margin: 0;
    filter: drop-shadow(0 10px 20px rgba(107, 154, 125, 0.16));
}

.dist-fill {
    fill: rgba(107, 154, 125, 0.35);
    stroke: var(--c-moss);
    stroke-width: 1.25;
    stroke-linejoin: round;
}

.dist-sculpture figcaption {
    font-family: var(--f-body);
    font-size: 0.88rem;
    color: var(--c-static-light);
    line-height: 1.5;
}

.dist-sculpture figcaption .formula {
    font-size: 0.95rem;
    color: var(--c-amber);
    display: inline-block;
    margin-bottom: 0.3rem;
}

/* =========================================================
   Sandbox (chamber 04)
   ========================================================= */

.chamber--sandbox {
    min-height: 100vh;
}

.chamber--sandbox .chamber-inner {
    max-width: 900px;
}

.sandbox-intro {
    max-width: 460px;
    margin: 2vh auto 5vh;
    color: var(--c-static);
    font-style: italic;
}

.sandbox {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3vw;
    margin: 2vh auto 0;
}

.sandbox-panel {
    padding: 4vh 3vw;
    border: 1px solid rgba(139, 135, 163, 0.2);
    border-radius: 4px;
    background: rgba(14, 12, 29, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2vh;
}

/* Toy die */
.toy-die {
    position: relative;
    width: 96px;
    height: 96px;
    transform-style: preserve-3d;
    transition: transform 900ms var(--ease-zen);
    transform: rotateX(-20deg) rotateY(25deg);
    margin: 1vh auto;
}

.toy-die-face {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(242, 236, 224, 0.18), rgba(232, 164, 74, 0.12));
    border: 1px solid rgba(242, 236, 224, 0.3);
    box-shadow:
        inset 0 0 20px rgba(232, 164, 74, 0.3),
        0 0 16px rgba(232, 164, 74, 0.12);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    padding: 14px;
    place-items: center;
}

.toy-face-1 { transform: translateZ(48px); }
.toy-face-2 { transform: rotateY(90deg)  translateZ(48px); }
.toy-face-3 { transform: rotateY(180deg) translateZ(48px); }
.toy-face-4 { transform: rotateY(-90deg) translateZ(48px); }
.toy-face-5 { transform: rotateX(90deg)  translateZ(48px); }
.toy-face-6 { transform: rotateX(-90deg) translateZ(48px); }

.toy-die .pip {
    width: 10px;
    height: 10px;
}

.toy-face-1 .pip-center { grid-column: 2; grid-row: 2; }

.toy-face-2 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.toy-face-2 .pip:nth-child(2) { grid-column: 3; grid-row: 3; }

.toy-face-3 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.toy-face-3 .pip-center { grid-column: 2; grid-row: 2; }
.toy-face-3 .pip:nth-child(3) { grid-column: 3; grid-row: 3; }

.toy-face-4 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.toy-face-4 .pip:nth-child(2) { grid-column: 3; grid-row: 1; }
.toy-face-4 .pip:nth-child(3) { grid-column: 1; grid-row: 3; }
.toy-face-4 .pip:nth-child(4) { grid-column: 3; grid-row: 3; }

.toy-face-5 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.toy-face-5 .pip:nth-child(2) { grid-column: 3; grid-row: 1; }
.toy-face-5 .pip-center { grid-column: 2; grid-row: 2; }
.toy-face-5 .pip:nth-child(4) { grid-column: 1; grid-row: 3; }
.toy-face-5 .pip:nth-child(5) { grid-column: 3; grid-row: 3; }

.toy-face-6 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.toy-face-6 .pip:nth-child(2) { grid-column: 3; grid-row: 1; }
.toy-face-6 .pip:nth-child(3) { grid-column: 1; grid-row: 2; }
.toy-face-6 .pip:nth-child(4) { grid-column: 3; grid-row: 2; }
.toy-face-6 .pip:nth-child(5) { grid-column: 1; grid-row: 3; }
.toy-face-6 .pip:nth-child(6) { grid-column: 3; grid-row: 3; }

/* Toy coin */
.toy-coin {
    position: relative;
    width: 96px;
    height: 96px;
    transform-style: preserve-3d;
    transition: transform 900ms var(--ease-zen);
    margin: 1vh auto;
}

.toy-coin-face {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--f-display);
    font-size: 2.2rem;
    font-weight: 700;
    backface-visibility: hidden;
    border: 1px solid rgba(242, 236, 224, 0.3);
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.2), 0 0 18px rgba(232, 164, 74, 0.2);
}

.toy-coin-face--heads {
    background: radial-gradient(circle at 35% 30%, #f3b15c, var(--c-amber) 60%, #b77a2c);
    color: var(--c-ink);
}

.toy-coin-face--tails {
    background: radial-gradient(circle at 35% 30%, #d97a95, var(--c-pink) 60%, #9a4560);
    color: var(--c-cream);
    transform: rotateY(180deg);
}

/* Toy button */
.toy-trigger {
    font-family: var(--f-mono);
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 0.9rem 1.6rem;
    background: transparent;
    border: 1px solid var(--c-amber);
    color: var(--c-amber);
    cursor: pointer;
    border-radius: 999px;
    transition: background 300ms var(--ease-zen), color 300ms var(--ease-zen), box-shadow 300ms var(--ease-zen);
}

.toy-trigger:hover {
    background: rgba(232, 164, 74, 0.1);
    box-shadow: 0 0 22px rgba(232, 164, 74, 0.3);
}

.toy-trigger:active {
    transform: scale(0.97);
}

.toy-readout {
    width: 100%;
    max-width: 280px;
    display: grid;
    gap: 0.4rem;
    margin-top: 1vh;
}

.readout-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: var(--f-mono);
    font-size: 0.85rem;
    border-bottom: 1px dashed rgba(139, 135, 163, 0.18);
    padding: 0.25rem 0;
}

.readout-label {
    color: var(--c-static);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.7rem;
}

.readout-value {
    color: var(--c-cream);
    font-weight: 500;
}

.readout-value.formula {
    color: var(--c-amber);
}

/* Histogram */
.histogram {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    width: 100%;
    max-width: 280px;
    height: 80px;
    align-items: end;
    margin-top: 1vh;
}

.hist-bar {
    position: relative;
    background: rgba(232, 164, 74, 0.12);
    border-top: 2px solid var(--c-amber);
    min-height: 2px;
    height: 2px;
    transition: height 400ms var(--ease-zen);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--c-static-light);
}

.hist-value {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--c-amber);
    font-size: 0.6rem;
}

.hist-label {
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--c-static);
    font-size: 0.62rem;
}

/* Convergence chart */
.convergence {
    width: 100%;
    max-width: 280px;
    margin-top: 1vh;
}

.convergence-svg {
    width: 100%;
    height: 60px;
    background: rgba(14, 12, 29, 0.5);
    border: 1px solid rgba(139, 135, 163, 0.18);
    border-radius: 3px;
}

.convergence-target {
    stroke: var(--c-moss);
    stroke-width: 1;
    stroke-dasharray: 3 3;
    opacity: 0.7;
}

.convergence-line {
    fill: none;
    stroke: var(--c-amber);
    stroke-width: 1.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.convergence-caption {
    font-size: 0.7rem;
    color: var(--c-static);
    text-align: right;
    margin-top: 0.4rem;
}

/* =========================================================
   Closing
   ========================================================= */

.closing {
    padding: 20vh var(--pad-h) 18vh;
    text-align: center;
    position: relative;
    background:
        radial-gradient(ellipse at center, rgba(14, 12, 29, 0.8), var(--c-twilight) 70%);
}

.closing-inner {
    max-width: var(--col-max);
    margin: 0 auto;
}

.closing-mark {
    display: block;
    font-family: var(--f-display);
    font-weight: 800;
    font-size: clamp(4rem, 12vw, 9rem);
    color: var(--c-amber);
    letter-spacing: -0.04em;
    opacity: 0.85;
    filter: drop-shadow(0 0 30px rgba(232, 164, 74, 0.3));
    line-height: 1;
    margin-bottom: 2vh;
}

.closing-text {
    font-family: var(--f-body);
    font-size: 1.05rem;
    color: var(--c-static-light);
    font-style: italic;
    margin: 0 auto 2vh;
    max-width: 440px;
}

.closing-meta {
    font-size: 0.72rem;
    color: var(--c-static);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 720px) {
    .chamber {
        padding: 10vh var(--pad-h-mobile);
    }
    .chamber--opening {
        padding-top: 14vh;
    }
    .dist-sculpture {
        width: 100%;
        gap: 1rem;
    }
    .sandbox {
        grid-template-columns: 1fr;
        gap: 4vh;
    }
    .section-title {
        font-size: clamp(1.75rem, 8vw, 3rem);
    }
    .die-stage {
        transform: scale(0.85);
    }
}
