/* ============================================================
   kkaji.com — opulent baroque aquarium
   palette: teal-deep × champagne-gold (strict duotone)
   typography: Cormorant Garamond / EB Garamond / Outfit / Noto Serif KR
   layout: layered-depth (eleven Z-planes) over six chambers
   ============================================================ */

:root {
    /* duotone */
    --abyssal-teal:   #0B2A33;
    --vesper-teal:    #1F4E5B;
    --aquamarine:     #5A93A0;
    --foam-mist:      #D4E8EC;
    --apex-black:     #0B1418;
    /* gilt */
    --champagne:      #F4E4B8;
    --heritage-gold:  #C9A45A;
    --patina-bronze:  #8B6F2F;
    --obsidian-ink:   #1A1410;

    --gold-foil: linear-gradient(135deg, #C9A45A 0%, #F4E4B8 50%, #8B6F2F 100%);
    --gold-foil-dark: linear-gradient(135deg, #8B6F2F 0%, #C9A45A 50%, #F4E4B8 100%);

    --serif-display: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
    --serif-body: 'EB Garamond', Georgia, serif;
    --sans-marg: 'Outfit', 'Inter', system-ui, sans-serif;
    --serif-kr: 'Noto Serif KR', 'Cormorant Garamond', serif;

    --gilded-edge: 1px solid rgba(201, 164, 90, 0.55);
    --gilded-engrave: 0 0.5px 0 rgba(139, 111, 47, 0.65);
}

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

html, body {
    background: var(--abyssal-teal);
    color: var(--foam-mist);
    font-family: var(--serif-body);
    font-size: 18px;
    line-height: 1.7;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(212, 232, 236, 0.07) 0%, transparent 60%),
        linear-gradient(180deg, var(--abyssal-teal) 0%, var(--apex-black) 50%, var(--vesper-teal) 80%, var(--foam-mist) 100%);
    background-attachment: fixed;
    cursor: default;
}

a { color: var(--champagne); text-decoration: none; }
em { font-style: italic; color: var(--champagne); }
strong { font-weight: 500; color: var(--heritage-gold); }

.svg-defs { position: absolute; width: 0; height: 0; pointer-events: none; }

/* ============================================================
   Z+200 GLASS SURFACE — viewport-locked
   ============================================================ */
.glass-surface {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 80;
    backdrop-filter: blur(0.5px);
    -webkit-backdrop-filter: blur(0.5px);
}

.cursor-lamp {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%,
        rgba(244, 228, 184, 0.18) 0%,
        rgba(201, 164, 90, 0.08) 40%,
        transparent 70%);
    transform: translate(-50%, -50%);
    mix-blend-mode: soft-light;
    transition: opacity 0.6s ease;
    will-change: transform;
}

.condensation {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(244,228,184,0.08) 0 1.5px, transparent 2px),
        radial-gradient(circle at 88% 24%, rgba(244,228,184,0.06) 0 1.2px, transparent 2px),
        radial-gradient(circle at 22% 78%, rgba(244,228,184,0.07) 0 1.4px, transparent 2px),
        radial-gradient(circle at 78% 82%, rgba(244,228,184,0.05) 0 1px, transparent 1.5px),
        radial-gradient(circle at 50% 50%, rgba(244,228,184,0.04) 0 0.8px, transparent 1.2px);
    background-size: 300px 300px;
    background-position: var(--cx, 0) var(--cy, 0);
    transition: background-position 0.5s ease;
}

.glass-corner {
    position: absolute;
    width: 180px;
    height: 180px;
    pointer-events: none;
    background: radial-gradient(circle at 0% 0%,
        rgba(212, 232, 236, 0.12) 0%,
        rgba(212, 232, 236, 0.04) 40%,
        transparent 80%);
}
.glass-corner--tl { top: 0; left: 0; }
.glass-corner--tr { top: 0; right: 0; transform: scaleX(-1); }
.glass-corner--bl { bottom: 0; left: 0; transform: scaleY(-1); }
.glass-corner--br { bottom: 0; right: 0; transform: scale(-1, -1); }

/* ============================================================
   CHAMBER NAVIGATION — bubble column
   ============================================================ */
.chamber-nav {
    position: fixed;
    top: 50%;
    right: 32px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 60;
    padding: 14px 8px;
    border-left: var(--gilded-edge);
}

.nav-bubble {
    position: relative;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: transform 0.4s cubic-bezier(.25,.8,.25,1);
}
.nav-bubble svg { width: 100%; height: 100%; display: block; }
.nav-bubble .nav-roman {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--serif-display);
    font-style: italic;
    font-weight: 300;
    font-size: 14px;
    color: var(--champagne);
    letter-spacing: 0.04em;
    pointer-events: none;
    text-shadow: 0 0 6px rgba(244,228,184,0.3);
}
.nav-bubble:hover { transform: scale(1.12); filter: drop-shadow(0 0 12px rgba(244,228,184,0.4)); }
.nav-bubble.is-active::after {
    content: "";
    position: absolute;
    left: -22px; top: 50%;
    width: 14px; height: 1px;
    background: var(--heritage-gold);
    transform: translateY(-50%);
}
.nav-bubble.is-active .nav-roman { color: var(--champagne); text-shadow: 0 0 12px rgba(244,228,184,0.6); }

/* ============================================================
   MARGINALIA — gilded UI corners
   ============================================================ */
.marginalia {
    position: fixed;
    top: 22px;
    z-index: 70;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--sans-marg);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--heritage-gold);
}
.marginalia--tl { left: 28px; }
.marginalia--tr { right: 28px; }
.marginalia-line {
    display: inline-block;
    width: 56px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--heritage-gold), transparent);
}
.marginalia-text { font-weight: 400; }

/* ============================================================
   CAUSTIC CANVAS — Z-180 light grid behind everything
   ============================================================ */
.caustic-canvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    opacity: 0.45;
    mix-blend-mode: screen;
    pointer-events: none;
}

/* ============================================================
   AMBIENT BUBBLE FIELDS
   ============================================================ */
.bubble-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.bubble-field--front { z-index: 50; }
.bubble-field--mid { z-index: 5; }

.ambient-bubble {
    position: absolute;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%,
            rgba(244,228,184,0.55) 0%,
            rgba(212,232,236,0.25) 35%,
            rgba(90,147,160,0.15) 75%,
            rgba(31,78,91,0.2) 100%);
    box-shadow: inset -2px -3px 8px rgba(11,20,24,0.25),
                inset 1px 2px 4px rgba(244,228,184,0.4);
    will-change: transform, opacity;
    bottom: -240px;
}
.ambient-bubble--small { box-shadow: inset -1px -2px 4px rgba(11,20,24,0.2), inset 1px 1px 2px rgba(244,228,184,0.4); }

/* ============================================================
   AQUARIUM PERSPECTIVE STAGE
   ============================================================ */
.aquarium {
    position: relative;
    z-index: 10;
    perspective: 1400px;
    perspective-origin: 50% 35%;
    transform-style: preserve-3d;
}

/* ============================================================
   CHAMBER (section) base
   ============================================================ */
.chamber {
    position: relative;
    min-height: 110vh;
    padding: 12vh 0 14vh;
    transform-style: preserve-3d;
    isolation: isolate;
    border-bottom: var(--gilded-edge);
}
.chamber:last-of-type { border-bottom: none; }

.chamber-1 { background: linear-gradient(180deg, var(--foam-mist) 0%, var(--aquamarine) 70%, var(--vesper-teal) 100%); color: var(--abyssal-teal); }
.chamber-2 { background: linear-gradient(180deg, var(--aquamarine) 0%, var(--vesper-teal) 100%); }
.chamber-3 { background: linear-gradient(180deg, var(--vesper-teal) 0%, var(--abyssal-teal) 100%); }
.chamber-4 { background: linear-gradient(180deg, var(--abyssal-teal) 0%, var(--apex-black) 100%); min-height: 130vh; }
.chamber-5 { background: linear-gradient(180deg, var(--apex-black) 0%, var(--obsidian-ink) 50%, var(--apex-black) 100%); color: var(--champagne); min-height: 120vh; }
.chamber-6 { background: linear-gradient(180deg, var(--apex-black) 0%, var(--vesper-teal) 30%, var(--aquamarine) 60%, var(--foam-mist) 100%); color: var(--abyssal-teal); min-height: 130vh; }

.chamber-1::before,
.chamber-2::before,
.chamber-3::before,
.chamber-4::before,
.chamber-5::before,
.chamber-6::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(201,164,90,0.25), transparent);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   Z-PLANES — translateZ values create literal depth
   ============================================================ */
.z-plane {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transform-style: preserve-3d;
}

.z-backwall {
    z-index: 1;
    transform: translateZ(-420px) scale(1.42);
    background: linear-gradient(180deg, var(--tone-a, var(--abyssal-teal)), var(--tone-b, var(--vesper-teal)));
    opacity: 0.95;
}
.z-backwall::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 40%, rgba(244,228,184,0.06) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(212,232,236,0.05) 0%, transparent 50%);
    mix-blend-mode: screen;
}

.z-rear-type {
    z-index: 2;
    transform: translateZ(-340px) scale(1.32);
    display: grid;
    place-items: center;
    pointer-events: none;
}
.rear-glyph {
    font-family: var(--serif-kr);
    font-weight: 300;
    font-size: clamp(220px, 50vw, 600px);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(201, 164, 90, 0.25);
    background: linear-gradient(180deg, rgba(244,228,184,0.18), rgba(11,20,24,0.05));
    -webkit-background-clip: text;
    background-clip: text;
    filter: blur(2px);
    opacity: 0.85;
    user-select: none;
}
.z-rear-type--apex .rear-glyph {
    -webkit-text-stroke: 1px rgba(201, 164, 90, 0.4);
    font-family: var(--serif-display);
    font-style: italic;
}

.z-rear-type--rising { z-index: 3; }
.rear-glyph--rising {
    color: transparent;
    -webkit-text-stroke: 1.4px rgba(201, 164, 90, 0.55);
    background: linear-gradient(180deg, rgba(244,228,184,0.5), rgba(201,164,90,0.2));
    -webkit-background-clip: text;
    background-clip: text;
    filter: blur(0.5px);
}

.z-ribs {
    z-index: 4;
    transform: translateZ(-100px) scale(1.07);
    opacity: 0.7;
    filter: blur(2px);
}
.z-ribs svg { width: 100%; height: 100%; display: block; }

.z-curtain {
    z-index: 6;
    transform: translateZ(60px) scale(0.96);
    pointer-events: none;
}
.z-curtain svg { width: 100%; height: auto; display: block; }

.z-focal {
    position: relative;
    z-index: 8;
    inset: auto;
    transform: translateZ(0);
}

.z-foreground-bubbles {
    z-index: 9;
    transform: translateZ(120px) scale(0.92);
    pointer-events: none;
    overflow: hidden;
}
.z-foreground-bubbles--sparse { opacity: 0.55; }

/* ============================================================
   CHAMBER STAGE (focal-plane content)
   ============================================================ */
.chamber-stage {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 8vw;
    z-index: 20;
}

.chamber-numeral {
    display: flex;
    align-items: baseline;
    gap: 18px;
    font-family: var(--sans-marg);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: var(--heritage-gold);
    margin-bottom: 1.2rem;
    padding-left: 2px;
}
.chamber-numeral::before {
    content: "";
    display: inline-block;
    width: 36px;
    height: 1px;
    background: var(--heritage-gold);
    margin-right: 8px;
    transform: translateY(-4px);
}
.chamber-numeral--apex { color: var(--champagne); }
.chamber-numeral--apex::before { background: var(--champagne); }
.chamber-numeral--egress { color: var(--patina-bronze); }
.chamber-numeral--egress::before { background: var(--patina-bronze); }
.numeral-roman {
    font-family: var(--serif-display);
    font-style: italic;
    font-weight: 300;
    font-size: 1.4rem;
    letter-spacing: 0;
    color: inherit;
}

.chamber-title-block { margin-bottom: 2.4rem; position: relative; }
.chamber-title-block--centered { text-align: center; margin-left: auto; margin-right: auto; }

.chamber-title {
    font-family: var(--serif-display);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(4rem, 11vw, 9.5rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin: 0 0 0.8rem;
    position: relative;
}

.title-foil {
    background: linear-gradient(135deg,
        var(--heritage-gold) 0%,
        var(--champagne) 35%,
        var(--patina-bronze) 65%,
        var(--champagne) 100%);
    background-size: 200% 200%;
    background-position: -100% 0%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 2px 0 rgba(11,20,24,0.25));
    transition: background-position 1.8s cubic-bezier(.65,.0,.35,1);
    display: inline-block;
}
.chamber.in-view .title-foil { background-position: 0% 0%; }

.chamber-title--apex .title-foil {
    background: linear-gradient(135deg, var(--patina-bronze) 0%, var(--heritage-gold) 50%, var(--champagne) 100%);
    background-size: 200% 200%;
    background-position: -100% 0%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.chamber-subtitle {
    font-family: var(--serif-body);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--heritage-gold);
    letter-spacing: 0.01em;
    margin-bottom: 0.4rem;
    opacity: 0.95;
}
.chamber-subtitle--apex { color: var(--champagne); opacity: 0.85; }

/* ============================================================
   PASSAGE / DROPCAP / KEY-TERM
   ============================================================ */
.ceremonial-passage,
.catechism-passage,
.anatomy-passage,
.apex-passage,
.egress-passage {
    max-width: 720px;
    margin: 0 auto;
    margin-top: 1.4rem;
    text-align: left;
}

.chamber-title-block--centered + .catechism-passage,
.chamber-title-block--centered + .apex-passage,
.chamber-title-block--centered + .egress-passage,
.chamber-title-block--centered ~ .anatomy-passage { text-align: center; }

.passage {
    font-family: var(--serif-body);
    font-size: 1.125rem;
    line-height: 1.75;
    color: inherit;
    margin-bottom: 1.4rem;
    text-align: justify;
}
.chamber-1 .passage { color: var(--abyssal-teal); }
.chamber-6 .passage { color: var(--abyssal-teal); }
.passage--apex { color: var(--champagne); text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.passage--frieze { color: var(--foam-mist); }

.dropcap {
    float: left;
    font-family: var(--serif-display);
    font-style: italic;
    font-weight: 300;
    font-size: 5.4rem;
    line-height: 0.85;
    padding: 0.1em 0.18em 0 0;
    margin-right: 0.06em;
    background: var(--gold-foil);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    position: relative;
}
.dropcap::after {
    content: "";
    position: absolute;
    inset: -4px -2px -2px -4px;
    border: 0.5px solid rgba(201, 164, 90, 0.55);
    border-radius: 4px 12px 4px 12px;
    pointer-events: none;
    opacity: 0.5;
}
.dropcap--apex {
    background: var(--gold-foil-dark);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.key-term {
    position: relative;
    color: var(--heritage-gold);
    font-style: italic;
    white-space: nowrap;
}
.chamber-1 .key-term,
.chamber-6 .key-term { color: var(--patina-bronze); }
.key-term--apex { color: var(--champagne); }

.key-underline {
    position: absolute;
    left: 0; bottom: -8px;
    width: 100%;
    height: 14px;
    overflow: visible;
}
.key-underline path {
    stroke-dasharray: 240;
    stroke-dashoffset: 240;
    transition: stroke-dashoffset 1.1s cubic-bezier(.7,.0,.3,1);
}
.chamber.in-view .key-underline path { stroke-dashoffset: 0; }

/* ============================================================
   CARTOUCHES (ornamental SVG frames)
   ============================================================ */
.cartouche {
    position: absolute;
    pointer-events: none;
    opacity: 0.55;
}
.cartouche svg { width: 100%; height: 100%; display: block; overflow: visible; }
.cartouche-stroke {
    stroke-dasharray: 2400;
    stroke-dashoffset: 2400;
    transition: stroke-dashoffset 1.6s cubic-bezier(.7,.0,.3,1);
}
.chamber.in-view .cartouche-stroke { stroke-dashoffset: 0; }
.cartouche--ingress {
    width: 600px; height: 200px;
    right: 4vw; top: 22%;
}
.cartouche--catechism {
    width: 480px; height: 140px;
    right: 6vw; bottom: 18%;
}

/* ============================================================
   CHAMBER I — CHANDELIER GLYPH
   ============================================================ */
.chandelier-glyph {
    position: absolute;
    top: 4vh;
    right: 12%;
    width: 240px;
    height: 360px;
    opacity: 0.95;
    z-index: 12;
    animation: chandelierSway 6s ease-in-out infinite;
    transform-origin: 50% 0%;
}
.chandelier-glyph svg { width: 100%; height: 100%; }
@keyframes chandelierSway {
    0%, 100% { transform: rotate(-1.2deg); }
    50% { transform: rotate(1.4deg); }
}

/* ============================================================
   CHAMBER II — CATECHISM BUBBLES
   ============================================================ */
.catechism-field {
    position: relative;
    height: 60vh;
    margin: 4vh auto 0;
    max-width: 1100px;
}
.catechism-bubble {
    position: absolute;
    left: var(--x); top: var(--y);
    width: var(--size); height: var(--size);
    transform: translate(-50%, -50%);
    animation: catechismRise 14s linear infinite;
    animation-delay: var(--d, 0s);
    will-change: transform;
}
.catechism-bubble svg { width: 100%; height: 100%; display: block; }
.catechism-text {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 14% 18%;
    font-family: var(--serif-body);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--foam-mist);
    text-shadow: 0 1px 0 rgba(11,20,24,0.4);
    pointer-events: none;
}
@keyframes catechismRise {
    0%   { transform: translate(-50%, -50%); opacity: 0.6; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { transform: translate(-50%, -180%); opacity: 0; }
}

/* ============================================================
   CHAMBER III — ANATOMY DIAGRAM
   ============================================================ */
.anatomy-diagram {
    position: relative;
    margin: 3vh auto 4vh;
    max-width: 1100px;
}
.anatomy-svg {
    width: 100%;
    height: auto;
    display: block;
}
.anatomy-glyph {
    transition: transform 0.8s cubic-bezier(.7,.0,.3,1);
}
.chamber-3.in-view .anatomy-glyph:first-of-type { transform: translate(220px, 300px); }
.chamber-3.in-view .anatomy-glyph:nth-of-type(2) { transform: translate(720px, 300px); }
.anatomy-anno path { stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 1.4s cubic-bezier(.7,.0,.3,1) 0.3s; }
.chamber-3.in-view .anatomy-anno path { stroke-dashoffset: 0; }
.anatomy-anno-label text { opacity: 0; transition: opacity 0.8s ease 1.2s; }
.chamber-3.in-view .anatomy-anno-label text { opacity: 1; }

.anatomy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 4vh;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}
.anatomy-card {
    position: relative;
    padding: 28px 24px 26px;
    background:
        linear-gradient(180deg, rgba(212,232,236,0.05), rgba(11,42,51,0.15)),
        linear-gradient(135deg, rgba(31,78,91,0.4), rgba(11,42,51,0.4));
    border: var(--gilded-edge);
    border-radius: 2px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow:
        inset 0 1px 0 rgba(244,228,184,0.18),
        inset 0 -1px 0 rgba(139,111,47,0.45),
        0 6px 24px -8px rgba(11,20,24,0.4);
}
.anatomy-card::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 0.5px solid rgba(139,111,47,0.4);
    pointer-events: none;
}
.anatomy-card__roman {
    display: block;
    font-family: var(--serif-display);
    font-style: italic;
    font-weight: 300;
    font-size: 1.4rem;
    color: var(--heritage-gold);
    margin-bottom: 0.4rem;
}
.anatomy-card__title {
    font-family: var(--serif-display);
    font-style: italic;
    font-weight: 400;
    font-size: 1.6rem;
    color: var(--champagne);
    margin-bottom: 0.6rem;
    letter-spacing: -0.005em;
}
.anatomy-card__body {
    font-family: var(--serif-body);
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--foam-mist);
}

/* ============================================================
   CHAMBER IV — PROCESSION (HORIZONTAL FRIEZE)
   ============================================================ */
.chamber-4__stage { padding: 0 6vw; max-width: none; }

.procession-track {
    position: relative;
    margin-top: 4vh;
    height: 60vh;
    overflow: hidden;
    border-top: var(--gilded-edge);
    border-bottom: var(--gilded-edge);
    background: linear-gradient(180deg,
        rgba(11,42,51,0.4) 0%,
        rgba(11,20,24,0.6) 100%);
}
.procession-track::before,
.procession-track::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    width: 80px;
    pointer-events: none;
    z-index: 4;
}
.procession-track::before {
    left: 0;
    background: linear-gradient(90deg, var(--abyssal-teal), transparent);
}
.procession-track::after {
    right: 0;
    background: linear-gradient(270deg, var(--apex-black), transparent);
}

.procession-frieze {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 80px;
    padding: 0 8vw;
    will-change: transform;
}

.frieze-panel {
    flex: 0 0 480px;
    padding: 24px 0;
}
.frieze-panel--intro { flex-basis: 520px; }
.frieze-panel--midpoint { flex-basis: 460px; }
.frieze-panel--end { flex-basis: 520px; }

.passage--frieze {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--foam-mist);
}

.frieze-figures {
    flex: 0 0 2400px;
    height: 360px;
    display: flex;
    align-items: flex-end;
}
.frieze-figures svg {
    width: 100%;
    height: 100%;
    display: block;
}
.frieze-figure {
    transform-origin: 0 320px;
    transition: transform 0.4s ease;
}

.procession-progress {
    position: relative;
    margin: 22px auto 0;
    width: 60%;
    max-width: 480px;
    height: 14px;
}
.procession-progress__rail {
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--heritage-gold), transparent);
    transform: translateY(-50%);
}
.procession-progress__bead {
    position: absolute;
    left: 0;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--champagne), var(--heritage-gold) 60%, var(--patina-bronze));
    box-shadow: 0 0 12px rgba(244,228,184,0.5);
    transform: translate(0, -50%);
    will-change: transform;
}

/* ============================================================
   CHAMBER V — APEX
   ============================================================ */
.chamber-5__stage { padding-bottom: 6vh; }
.chamber-5 .chamber-stage { color: var(--champagne); }

.apex-leaves {
    margin: 4vh auto 0;
    max-width: 1100px;
    height: 200px;
    opacity: 0.95;
}
.apex-leaves svg { width: 100%; height: 100%; }

.apex-cartouche {
    margin: 6vh auto 0;
    max-width: 600px;
    opacity: 0;
    transition: opacity 1.6s ease 0.4s;
}
.chamber-5.in-view .apex-cartouche { opacity: 0.95; }
.apex-cartouche svg { width: 100%; height: auto; display: block; overflow: visible; }
.apex-cartouche path { stroke-dasharray: 2400; stroke-dashoffset: 2400; transition: stroke-dashoffset 1.8s cubic-bezier(.7,.0,.3,1); }
.chamber-5.in-view .apex-cartouche path { stroke-dashoffset: 0; }

/* ============================================================
   CHAMBER VI — EGRESS
   ============================================================ */
.chamber-6__stage { padding-bottom: 4vh; }
.chamber-6 .passage { color: var(--abyssal-teal); }
.chamber-6 .chamber-numeral { color: var(--patina-bronze); }
.chamber-6 .chamber-subtitle { color: var(--patina-bronze); }
.chamber-6 .chamber-title .title-foil {
    background: linear-gradient(135deg, var(--patina-bronze), var(--heritage-gold) 50%, var(--champagne));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.egress-finale {
    position: relative;
    margin: 6vh auto 0;
    max-width: 900px;
    height: 280px;
    text-align: center;
}
.finale-bubble-spawner {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
}
.finale-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%,
        rgba(244,228,184,0.85),
        rgba(212,232,236,0.45) 40%,
        rgba(90,147,160,0.25) 90%);
    box-shadow: inset -1px -2px 4px rgba(11,20,24,0.2), inset 1px 1px 2px rgba(244,228,184,0.5);
    will-change: transform, opacity;
    pointer-events: none;
}
.finale-mark {
    position: absolute;
    left: 50%; bottom: 0;
    transform: translateX(-50%);
    text-align: center;
}
.finale-line {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    padding-bottom: 20px;
}
.finale-en {
    font-family: var(--serif-body);
    font-style: italic;
    font-size: 1.6rem;
    color: var(--patina-bronze);
}
.finale-ko {
    font-family: var(--serif-kr);
    font-weight: 300;
    font-size: 2.4rem;
    color: var(--patina-bronze);
    letter-spacing: 0.04em;
}
.finale-underline {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 22px;
    overflow: visible;
}
.finale-underline path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 2s cubic-bezier(.7,.0,.3,1);
}
.chamber-6.in-view .finale-underline path { stroke-dashoffset: 0; }

/* ============================================================
   CHAMBER ANNOUNCE (lower-left tag)
   ============================================================ */
.chamber-announce {
    position: fixed;
    left: 28px;
    bottom: 28px;
    z-index: 70;
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(11,20,24,0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: var(--gilded-edge);
    border-radius: 2px;
    font-family: var(--sans-marg);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--heritage-gold);
    transition: transform 0.6s cubic-bezier(.7,.0,.3,1), opacity 0.4s ease;
}
.chamber-announce__roman {
    font-family: var(--serif-display);
    font-style: italic;
    font-size: 1.3rem;
    color: var(--champagne);
    letter-spacing: 0;
    text-transform: none;
}
.chamber-announce__sep { opacity: 0.6; }
.chamber-announce__name { color: var(--champagne); }

/* ============================================================
   AUDIO ICON (decorative)
   ============================================================ */
.audio-icon {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 70;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: var(--gilded-edge);
    border-radius: 50%;
    background: rgba(11,20,24,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    transition: transform 0.3s ease;
}
.audio-icon:hover { transform: scale(1.08); }
.audio-icon svg { width: 22px; height: 22px; }

/* ============================================================
   POP-LAYER (click-to-bubble)
   ============================================================ */
.pop-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 65;
    overflow: hidden;
}
.pop-bubble {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(244,228,184,0.85), rgba(212,232,236,0.4) 50%, rgba(90,147,160,0.25));
    box-shadow: inset -1px -2px 3px rgba(11,20,24,0.3);
    transform: translate(-50%, -50%);
    will-change: transform, opacity;
}

/* ============================================================
   DISSOLVE OVERLAY (chamber-transition bubble curtain)
   ============================================================ */
.dissolve-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 75;
    overflow: hidden;
    opacity: 0;
}
.dissolve-overlay.is-active { opacity: 1; }
.dissolve-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(244,228,184,0.6), rgba(212,232,236,0.3) 60%, transparent);
    box-shadow: inset -1px -2px 4px rgba(11,20,24,0.25);
    will-change: transform, opacity;
}

/* ============================================================
   NEWLY-RISEN: link bubble emitter (anchor hover)
   ============================================================ */
a, button { position: relative; }

/* ============================================================
   IN-VIEW STAGE-FOIL ANIM (signals)
   ============================================================ */
.chamber.is-entering { transition: opacity 1.2s ease; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .chamber-stage { padding: 0 6vw; }
    .anatomy-grid { grid-template-columns: 1fr; }
    .chamber-nav { right: 12px; gap: 12px; }
    .nav-bubble { width: 36px; height: 36px; }
    .marginalia { font-size: 0.7rem; gap: 8px; }
    .marginalia--tl, .marginalia--tr { left: auto; right: auto; }
    .marginalia--tl { left: 12px; }
    .marginalia--tr { right: 12px; }
    .marginalia-line { width: 30px; }
    .chamber-title { font-size: clamp(3rem, 13vw, 7rem); }
    .chandelier-glyph { right: 4%; width: 160px; height: 240px; }
    .cartouche--ingress, .cartouche--catechism { width: 80%; right: 4%; }
    .frieze-figures { flex-basis: 1800px; }
    .chamber-announce { left: 12px; bottom: 12px; padding: 8px 12px; font-size: 0.7rem; }
    .audio-icon { right: 12px; bottom: 12px; }
}

@media (max-width: 560px) {
    .catechism-bubble { transform: translate(-50%, -50%) scale(0.7); }
    .anatomy-grid { gap: 16px; }
    .chamber { min-height: 100vh; }
    .chamber-4 { min-height: 110vh; }
}
