/* =========================================================
   archetype.moe — Art Deco × Moe Subculture
   A Geometric Taxonomy of Affection
   ========================================================= */

:root {
    /* Palette */
    --moonlit-steel: #1c1f26;
    --silver-screen: #c8cdd5;
    --chrysler-chrome: #8e95a0;
    --archetype-gold: #c9a84c;
    --neon-sakura: #e0578a;
    --phantom-violet: #6e5a8e;
    --deep-void: #0d0f14;
    --frost-whisper: #edf0f5;
    --muted-steel: #7b8a99;

    /* Typography */
    --display: 'Poiret One', 'Avenir Next', Helvetica, system-ui, sans-serif;
    --label: 'Josefin Sans', 'Avenir Next', Helvetica, system-ui, sans-serif;
    --serif: 'Cormorant Garamond', 'Iowan Old Style', 'Times New Roman', Georgia, serif;
    --mono: 'Share Tech Mono', 'SFMono-Regular', 'Menlo', ui-monospace, monospace;

    /* Motion */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

    /* Magnetic defaults set per-module */
    --m-intensity: 0;
}

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

html {
    scroll-behavior: smooth;
    background: var(--deep-void);
}

body {
    background: var(--deep-void);
    color: var(--silver-screen);
    font-family: var(--serif);
    min-height: 100vh;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global frosted grid overlay */
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        linear-gradient(to right, rgba(200, 205, 213, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(200, 205, 213, 0.04) 1px, transparent 1px);
    background-size: calc(100vw / 12) calc(100vh / 12);
    mix-blend-mode: screen;
}

/* =========================================================
   Chamber base
   ========================================================= */
.chamber {
    position: relative;
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    overflow: hidden;
}

.chamber-1 {
    background: var(--deep-void);
}

.chamber-2 {
    background: var(--deep-void);
    display: flex;
    flex-direction: column;
}

.chamber-3 {
    background: var(--deep-void);
}

/* =========================================================
   Chamber 1 — The Archetype Gallery
   ========================================================= */
.deco-grid {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(12, 1fr);
    gap: 2px;
    padding: 2px;
    z-index: 2;
}

/* Module base */
.module {
    position: relative;
    background: var(--moonlit-steel);
    border: 1px solid rgba(142, 149, 160, 0.25);
    overflow: hidden;
    transition: border-color 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}

.module::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 0 solid var(--archetype-gold);
    border-width: calc(var(--m-intensity, 0) * 3px);
    opacity: var(--m-intensity, 0);
    transition: opacity 160ms linear, border-width 160ms linear;
    z-index: 3;
}

.module::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to right, rgba(200, 205, 213, calc(0.04 + var(--m-intensity, 0) * 0.11)) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(200, 205, 213, calc(0.04 + var(--m-intensity, 0) * 0.11)) 1px, transparent 1px);
    background-size: calc(100% / 4) calc(100% / 4);
    z-index: 2;
    transition: background 200ms linear;
}

.module-inner {
    position: relative;
    width: 100%;
    height: 100%;
    padding: clamp(12px, 2vw, 28px);
    z-index: 4;
}

/* Grid placement */
.module-title {
    grid-column: 1 / span 7;
    grid-row: 1 / span 5;
    background: linear-gradient(135deg, var(--moonlit-steel) 0%, var(--deep-void) 100%);
}

.module-portrait {
    grid-column: 1 / span 4;
    grid-row: 6 / span 5;
}

.module-description {
    grid-column: 5 / span 3;
    grid-row: 6 / span 5;
    background: var(--moonlit-steel);
}

.module-sunburst {
    grid-column: 8 / span 3;
    grid-row: 1 / span 5;
    background: var(--deep-void);
}

.module-pilaster-left {
    grid-column: 8 / span 1;
    grid-row: 6 / span 5;
}

.module-pilaster-right {
    grid-column: 9 / span 2;
    grid-row: 6 / span 5;
}

/* Right edge double-pilaster */
.chamber-1 .deco-grid::before,
.chamber-1 .deco-grid::after {
    content: '';
    position: absolute;
    top: 2px;
    bottom: calc(16.66% + 4px);
    width: calc(8.33% - 4px);
    background: var(--deep-void);
    border: 1px solid rgba(142, 149, 160, 0.2);
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.chamber-1 .deco-grid::before {
    right: calc(8.33% + 2px);
    background-image:
        repeating-linear-gradient(
            -45deg,
            rgba(201, 168, 76, 0.15) 0,
            rgba(201, 168, 76, 0.15) 2px,
            transparent 2px,
            transparent 14px
        );
}

.chamber-1 .deco-grid::after {
    right: 2px;
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(201, 168, 76, 0.15) 0,
            rgba(201, 168, 76, 0.15) 2px,
            transparent 2px,
            transparent 14px
        );
}

.module-rail {
    grid-column: 1 / span 12;
    grid-row: 11 / span 2;
    background: linear-gradient(180deg, var(--moonlit-steel) 0%, var(--deep-void) 100%);
}

/* --- Title module content --- */
.title-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    text-align: center;
    z-index: 5;
}

.title-overline {
    font-family: var(--label);
    font-size: clamp(10px, 0.9vw, 13px);
    color: var(--muted-steel);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    margin-bottom: clamp(14px, 2vh, 28px);
    display: inline-flex;
    align-items: center;
    gap: 18px;
}

.title-overline .diamond {
    color: var(--archetype-gold);
    font-size: 8px;
}

.site-title {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(3rem, 10vw, 8rem);
    letter-spacing: 0.08em;
    color: var(--frost-whisper);
    line-height: 0.95;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 0 40px rgba(224, 87, 138, 0.12);
}

.site-title .title-dot {
    color: var(--neon-sakura);
    display: inline-block;
    transform: translateY(-0.05em);
}

.subtitle {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1rem, 1.5vw, 1.35rem);
    color: var(--silver-screen);
    margin-top: clamp(14px, 2vh, 26px);
    letter-spacing: 0.02em;
    opacity: 0.92;
}

.title-underline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: clamp(18px, 3vh, 34px);
}

.title-underline span {
    display: block;
    height: 1px;
    background: var(--archetype-gold);
}

.title-underline span:nth-child(1) { width: 60px; opacity: 0.4; }
.title-underline span:nth-child(2) { width: 120px; opacity: 0.9; height: 2px; }
.title-underline span:nth-child(3) { width: 60px; opacity: 0.4; }

/* Annotations (mono labels) */
.annotation {
    position: absolute;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted-steel);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 6;
}

.annotation.top-left { top: 14px; left: 14px; }
.annotation.top-right { top: 14px; right: 14px; }
.annotation.bottom-left { bottom: 14px; left: 14px; }
.annotation.bottom-right { bottom: 14px; right: 14px; }

.anno-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--archetype-gold);
    border-radius: 50%;
}

/* Sunburst behind title */
.sunburst {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.85;
}

.sunburst-rays {
    animation: sunburstRotate 120s linear infinite;
    transform-origin: 0 0;
}

@keyframes sunburstRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* --- Portrait module --- */
.module-portrait {
    background: var(--moonlit-steel);
}

.module-portrait .module-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.portrait {
    width: 70%;
    max-width: 260px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(110, 90, 142, 0.3));
}

.portrait-halo {
    animation: sunburstRotate 180s linear infinite reverse;
    transform-origin: 100px 90px;
}

.portrait-label {
    margin-top: 12px;
    text-align: center;
    font-family: var(--label);
    font-size: 12px;
    letter-spacing: 0.24em;
    color: var(--silver-screen);
}

.portrait-label .anno {
    color: var(--muted-steel);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 4px;
}

.portrait-label .anno-name {
    color: var(--neon-sakura);
    font-weight: 600;
}

/* --- Description module --- */
.desc-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 0;
}

.desc-label {
    font-family: var(--label);
    font-size: 11px;
    letter-spacing: 0.28em;
    color: var(--archetype-gold);
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.3);
}

.desc-text {
    font-family: var(--serif);
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.6;
    color: var(--silver-screen);
    transition: opacity 300ms var(--ease-out);
}

.desc-text em {
    color: var(--neon-sakura);
    font-style: italic;
}

.desc-index {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    gap: 10px;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted-steel);
    letter-spacing: 0.14em;
    border-top: 1px solid rgba(142, 149, 160, 0.15);
}

.desc-index .index-active {
    color: var(--archetype-gold);
    position: relative;
}

.desc-index .index-active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--archetype-gold);
}

/* --- Sunburst module --- */
.module-sunburst .module-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sunburst-ornament {
    width: 80%;
    max-width: 260px;
    height: auto;
    flex: 1;
}

.sunburst-ornament-rays {
    animation: sunburstRotate 120s linear infinite;
    transform-origin: 0 0;
}

.ornament-caption {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted-steel);
    letter-spacing: 0.22em;
    margin-top: 10px;
}

/* --- Pilaster modules --- */
.module-pilaster-left .module-inner,
.module-pilaster-right .module-inner {
    padding: 0;
    position: relative;
}

.chevron-band {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

.chevron-flow {
    animation: chevronFlow 2s linear infinite;
}

@keyframes chevronFlow {
    from { transform: translateY(-24px); }
    to   { transform: translateY(0); }
}

.pilaster-label {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--display);
    font-size: 18px;
    color: var(--archetype-gold);
    opacity: 0.7;
    z-index: 5;
}

/* --- Navigation Rail --- */
.module-rail .module-inner {
    padding: 0 clamp(16px, 3vw, 40px);
    display: flex;
    align-items: center;
}

.rail-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.rail-inner::-webkit-scrollbar { display: none; }

.rail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--silver-screen);
    font-family: var(--label);
    font-weight: 600;
    font-size: clamp(10px, 0.9vw, 13px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 6px 4px;
    white-space: nowrap;
    transition: color 220ms var(--ease-out);
    position: relative;
}

.rail-item:hover {
    color: var(--archetype-gold);
}

.rail-item.active {
    color: var(--neon-sakura);
}

.rail-item.active::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 1px;
    background: var(--neon-sakura);
}

.rail-num {
    font-family: var(--display);
    font-size: 10px;
    color: var(--archetype-gold);
    opacity: 0.7;
}

.rail-diamond {
    color: var(--archetype-gold);
    font-size: 7px;
    opacity: 0.5;
}

/* --- Chamber marker & scroll hint --- */
.chamber-marker {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: left center;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted-steel);
    letter-spacing: 0.26em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 20;
    pointer-events: none;
    white-space: nowrap;
}

.chamber-marker .marker-num {
    color: var(--archetype-gold);
    font-family: var(--display);
    font-size: 14px;
}

.chamber-marker .marker-line {
    display: inline-block;
    width: 40px;
    height: 1px;
    background: var(--muted-steel);
    opacity: 0.5;
}

.scroll-hint {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted-steel);
    letter-spacing: 0.26em;
    writing-mode: vertical-rl;
    z-index: 20;
    pointer-events: none;
    animation: scrollPulse 3s ease-in-out infinite;
}

.scroll-hint svg {
    writing-mode: horizontal-tb;
    animation: chevronDown 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.95; }
}

@keyframes chevronDown {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(6px); opacity: 1; }
}

/* =========================================================
   Chamber 2 — The Classification
   ========================================================= */
.chamber-header {
    padding: clamp(16px, 2vh, 28px) clamp(20px, 3vw, 44px);
    border-bottom: 1px solid rgba(142, 149, 160, 0.2);
    flex-shrink: 0;
}

.chamber-header-inner {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 24px);
    width: 100%;
}

.chamber-idx {
    font-family: var(--display);
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    color: var(--archetype-gold);
    letter-spacing: 0.1em;
    min-width: 40px;
}

.chamber-heading {
    font-family: var(--display);
    font-size: clamp(1rem, 2vw, 1.75rem);
    color: var(--frost-whisper);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    font-weight: 400;
    white-space: nowrap;
}

.header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(200, 205, 213, 0.4), transparent);
}

.chamber-meta {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted-steel);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    white-space: nowrap;
}

.classification-grid {
    position: relative;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2px;
    padding: 2px;
    background:
        repeating-linear-gradient(
            180deg,
            transparent 0,
            transparent 10px,
            rgba(142, 149, 160, 0.08) 10px,
            rgba(142, 149, 160, 0.08) 12px
        );
}

/* Gutter chevrons (decorative overlay) */
.gutter-chevrons {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.gutter-v {
    top: 0;
    bottom: 0;
    width: 2px;
    background-image:
        repeating-linear-gradient(
            180deg,
            rgba(201, 168, 76, 0.4) 0,
            rgba(201, 168, 76, 0.4) 4px,
            transparent 4px,
            transparent 12px
        );
    animation: chevronFlow 2s linear infinite;
}

.gutter-v-1 { left: calc(33.33% - 1px); }
.gutter-v-2 { left: calc(66.66% - 1px); }

.gutter-h {
    left: 0;
    right: 0;
    height: 2px;
    background-image:
        repeating-linear-gradient(
            90deg,
            rgba(201, 168, 76, 0.4) 0,
            rgba(201, 168, 76, 0.4) 4px,
            transparent 4px,
            transparent 12px
        );
    animation: chevronFlowH 2s linear infinite;
}

.gutter-h-1 { top: calc(33.33% - 1px); }
.gutter-h-2 { top: calc(66.66% - 1px); }

@keyframes chevronFlowH {
    from { background-position: -24px 0; }
    to   { background-position: 0 0; }
}

/* Archetype cell */
.archetype-cell {
    position: relative;
    background: var(--deep-void);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: clamp(14px, 1.8vw, 24px);
    transition: background-color 400ms var(--ease-out);
    cursor: default;
    color: var(--chrysler-chrome);
    z-index: 2;
}

.archetype-cell[data-accent="pink"] { color: var(--neon-sakura); }
.archetype-cell[data-accent="violet"] { color: var(--phantom-violet); }
.archetype-cell[data-accent="gold"] { color: var(--archetype-gold); }

.archetype-cell:hover {
    background: var(--moonlit-steel);
}

.archetype-cell:hover .cell-portrait svg {
    transform: scale(1.05);
}

.archetype-cell:hover .cell-border {
    border-color: currentColor;
    box-shadow: 0 0 30px 0 color-mix(in srgb, currentColor 30%, transparent);
}

/* Cell border (4px) */
.cell-border {
    position: absolute;
    inset: 2px;
    border: 4px solid rgba(142, 149, 160, 0.45);
    pointer-events: none;
    transition: border-color 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
    z-index: 3;
}

/* Cell magnetic effect via custom properties */
.archetype-cell::before {
    content: '';
    position: absolute;
    inset: 2px;
    pointer-events: none;
    border: 0 solid currentColor;
    border-width: calc(var(--m-intensity, 0) * 3px);
    opacity: calc(var(--m-intensity, 0) * 0.9);
    transition: opacity 160ms linear, border-width 160ms linear;
    z-index: 4;
}

.cell-head {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 5;
}

.cell-id {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted-steel);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.cell-name {
    font-family: var(--label);
    font-weight: 600;
    font-size: clamp(16px, 1.6vw, 22px);
    letter-spacing: 0.18em;
    color: currentColor;
    text-transform: uppercase;
}

.cell-portrait {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    position: relative;
    z-index: 5;
}

.cell-portrait svg {
    width: 70%;
    max-width: 170px;
    height: auto;
    transition: transform 600ms var(--ease-spring);
    color: currentColor;
    filter: drop-shadow(0 0 18px color-mix(in srgb, currentColor 25%, transparent));
}

.center-cell .cell-portrait svg {
    filter: drop-shadow(0 0 24px rgba(201, 168, 76, 0.35));
}

.center-cell .cell-sunburst {
    animation: sunburstRotate 80s linear infinite;
    transform-origin: 60px 60px;
}

.cell-foot {
    position: relative;
    z-index: 5;
    border-top: 1px solid rgba(142, 149, 160, 0.18);
    padding-top: 10px;
}

.cell-foot p {
    font-family: var(--serif);
    font-size: clamp(13px, 1vw, 15px);
    font-style: italic;
    color: var(--silver-screen);
    line-height: 1.45;
}

/* =========================================================
   Chamber 3 — The Deco Shrine
   ========================================================= */
.chamber-3 {
    overflow-y: auto;
}

.shrine-grid {
    display: grid;
    grid-template-columns: 1fr minmax(0, 800px) 1fr;
    height: 100%;
    min-height: 100vh;
    position: relative;
}

.shrine-column {
    position: relative;
    border-left: 1px solid rgba(142, 149, 160, 0.15);
    border-right: 1px solid rgba(142, 149, 160, 0.15);
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0 clamp(8px, 1.5vw, 24px);
}

.shrine-column-left { border-left: none; }
.shrine-column-right { border-right: none; }

.shrine-ornament {
    width: 100%;
    max-width: 120px;
    height: 100%;
}

.zig-breath {
    animation: ziggBreath 8s ease-in-out infinite;
    transform-origin: center;
}

@keyframes ziggBreath {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.fan-rotate {
    animation: fanRotate 10s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

@keyframes fanRotate {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.shimmer-lines line {
    stroke-width: 0.6;
    opacity: 0.04;
    animation: shimmer 6s ease-in-out infinite;
}

.shimmer-lines line:nth-child(1) { animation-delay: 0s; }
.shimmer-lines line:nth-child(2) { animation-delay: 0.6s; }
.shimmer-lines line:nth-child(3) { animation-delay: 1.2s; }
.shimmer-lines line:nth-child(4) { animation-delay: 1.8s; }
.shimmer-lines line:nth-child(5) { animation-delay: 2.4s; }

@keyframes shimmer {
    0%, 100% { opacity: 0.04; }
    50% { opacity: 0.12; }
}

.shrine-narrative {
    padding: clamp(40px, 6vh, 80px) clamp(24px, 4vw, 64px);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 3vh, 40px);
}

.shrine-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-bottom: clamp(20px, 3vh, 36px);
    border-bottom: 1px solid rgba(142, 149, 160, 0.25);
    position: relative;
}

.shrine-head::before,
.shrine-head::after {
    content: '';
    position: absolute;
    bottom: -1px;
    width: 60px;
    height: 3px;
    background: var(--archetype-gold);
}

.shrine-head::before { left: 0; }
.shrine-head::after { right: 0; }

.shrine-idx {
    font-family: var(--display);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--archetype-gold);
    letter-spacing: 0.1em;
    line-height: 1;
}

.shrine-heading {
    font-family: var(--display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--frost-whisper);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 400;
    text-align: center;
}

.shrine-sub {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(14px, 1.2vw, 17px);
    color: var(--chrysler-chrome);
    letter-spacing: 0.02em;
    text-align: center;
}

.narrative-body {
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 2.5vh, 28px);
}

.narrative-body p {
    font-family: var(--serif);
    font-size: clamp(1.05rem, 1.3vw, 1.25rem);
    line-height: 1.72;
    color: var(--silver-screen);
    font-weight: 400;
}

.narrative-body em {
    font-style: italic;
    color: var(--neon-sakura);
}

.narrative-body .lead {
    font-size: clamp(1.15rem, 1.4vw, 1.375rem);
}

.dropcap {
    font-family: var(--display);
    font-size: 3.6em;
    color: var(--archetype-gold);
    float: left;
    line-height: 0.85;
    padding-right: 10px;
    padding-top: 4px;
    letter-spacing: 0;
}

.coda {
    border-top: 1px solid rgba(201, 168, 76, 0.25);
    border-bottom: 1px solid rgba(201, 168, 76, 0.25);
    padding: clamp(18px, 2.5vh, 26px) 0;
    font-style: italic;
    color: var(--frost-whisper) !important;
    text-align: center;
}

/* Closing */
.shrine-close {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: clamp(20px, 3vh, 40px);
    padding-top: clamp(20px, 3vh, 36px);
    border-top: 1px solid rgba(142, 149, 160, 0.2);
}

.closing {
    font-family: var(--display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--frost-whisper);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    font-weight: 400;
}

.closing-sunburst {
    width: clamp(120px, 20vw, 200px);
    height: clamp(120px, 20vw, 200px);
    opacity: 0.5;
}

.closing-rays {
    animation: sunburstRotate 150s linear infinite;
    transform-origin: 0 0;
}

.colophon {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted-steel);
    letter-spacing: 0.26em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}

.colophon span:first-child,
.colophon span:last-child {
    color: var(--archetype-gold);
    font-size: 6px;
}

/* =========================================================
   Responsive adjustments
   ========================================================= */
@media (max-width: 900px) {
    .site-title { font-size: clamp(2.4rem, 11vw, 5rem); }

    .module-title { grid-column: 1 / span 12; grid-row: 1 / span 4; }
    .module-portrait { grid-column: 1 / span 6; grid-row: 5 / span 4; }
    .module-description { grid-column: 7 / span 6; grid-row: 5 / span 4; }
    .module-sunburst { grid-column: 1 / span 6; grid-row: 9 / span 2; }
    .module-pilaster-left { display: none; }
    .module-pilaster-right { grid-column: 7 / span 6; grid-row: 9 / span 2; }
    .module-rail { grid-column: 1 / span 12; grid-row: 11 / span 2; }

    .chamber-1 .deco-grid::before,
    .chamber-1 .deco-grid::after { display: none; }

    .shrine-grid { grid-template-columns: 60px 1fr 60px; }
    .shrine-narrative { padding: 48px 20px; }

    .chamber-marker { display: none; }
    .scroll-hint { right: 10px; }
}

@media (max-width: 600px) {
    .chamber-heading { font-size: 14px; letter-spacing: 0.18em; }
    .chamber-meta { display: none; }
    .cell-name { font-size: 14px; }
    .cell-foot p { font-size: 12px; }
    .dropcap { font-size: 3em; }
}
