/* =========================================================
   continuum.quest — vandalized meiji library x shinjuku 2am
   japanese-minimal + broken-grid + retro-futuristic palette
   Compliance language: Interlud* Interlude* Interlude** opacity/transform transitions instead should lightweight (<50 lines `threshold: 0.15` (Google Fonts)
   ========================================================= */

:root {
    --void:          #0d0d1a;
    --parchment:     #e8dcc8;
    --vermillion:    #ff3b2f;
    --static-blue:   #3de8e0;
    --ink-wash:      #2a2a3d;
    --gold-leaf:     #c4a35a;
    --mist:          #a8b4c2;
    --paper-white:   #f0ece4;

    --font-display:  "Cormorant Garamond", "Lora", Georgia, serif;
    --font-body:     "Source Serif 4", "Lora", Georgia, serif;
    --font-hand:     "Caveat", "Segoe Script", cursive;
    --font-ui:       "DM Sans", "Inter", system-ui, sans-serif;

    --spine-ratio:   61.8%;
    --pad-x:         clamp(2rem, 6vw, 7rem);
}

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

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

body {
    background: var(--void);
    color: var(--parchment);
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* subtle torn-paper grain */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    background-image:
        radial-gradient(rgba(232, 220, 200, 0.025) 1px, transparent 1px),
        radial-gradient(rgba(61, 232, 224, 0.015) 1px, transparent 1px);
    background-size: 3px 3px, 7px 7px;
    background-position: 0 0, 1px 2px;
    mix-blend-mode: screen;
    opacity: 0.55;
}

/* vignette */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(13,13,26,0.55) 100%);
}

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* =========================================================
   SPINE LABEL — left-edge fixed vertical text (DM Sans)
   ========================================================= */
.spine-label {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: clamp(2.5rem, 3.5vw, 4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 2.4rem 0 2rem;
    z-index: 50;
    pointer-events: none;
    border-right: 1px solid rgba(168, 180, 194, 0.08);
    background: linear-gradient(180deg, rgba(13,13,26,0.85), rgba(13,13,26,0));
}

.spine-label-text {
    font-family: var(--font-ui);
    font-size: clamp(0.7rem, 0.82vw, 0.85rem);
    font-weight: 500;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: var(--mist);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    opacity: 0.82;
    animation: pulse-mist 7s ease-in-out infinite;
    animation-delay: -2s;
}

.spine-label-dot {
    width: 6px;
    height: 6px;
    background: var(--vermillion);
    box-shadow: 0 0 12px rgba(255, 59, 47, 0.65);
    animation: pulse-dot 3.1s ease-in-out infinite;
}

/* =========================================================
   CONTINUUM LINE — seismograph undulating sine-wave
   ========================================================= */
.continuum-line {
    position: fixed;
    top: 50%;
    left: -5vw;
    width: 110vw;
    height: 120px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
    mix-blend-mode: screen;
    transform: translateY(-50%);
}

.continuum-line svg {
    width: 100%;
    height: 100%;
    display: block;
    animation: drift-left 30s linear infinite;
}

.continuum-path {
    fill: none;
    stroke: var(--static-blue);
    stroke-width: 1.1;
    stroke-linecap: round;
    opacity: 0.75;
    filter: drop-shadow(0 0 10px rgba(61, 232, 224, 0.55));
}

/* scroll-progress: tiny vermillion bar on the right edge */
.scroll-progress {
    position: fixed;
    right: 0;
    top: 0;
    width: 1px;
    height: 100vh;
    background: rgba(168, 180, 194, 0.08);
    z-index: 50;
}
.scroll-progress span {
    display: block;
    width: 100%;
    height: 0%;
    background: var(--vermillion);
    box-shadow: 0 0 12px rgba(255, 59, 47, 0.5);
    transition: height 0.12s linear;
}

/* =========================================================
   SCROLL CONTAINER + GOLDEN-RATIO SPINE
   ========================================================= */
.scroll-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-left: clamp(3rem, 5vw, 5rem);
    padding-right: clamp(1.5rem, 3vw, 4rem);
    z-index: 2;
}

.scroll-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: var(--spine-ratio);
    width: 1px;
    height: 100%;
    background: var(--static-blue);
    opacity: 0.22;
    animation: pulse-spine 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.scroll-container.spine-flash::after {
    background: var(--vermillion);
    opacity: 0.7;
    box-shadow: 0 0 26px rgba(255, 59, 47, 0.5);
}

/* =========================================================
   CHAPTER SECTIONS — broken 12-col grid
   ========================================================= */
.chapter {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(6vh, auto);
    column-gap: 0;
    row-gap: 0.6rem;
    min-height: 100vh;
    padding: 18vh var(--pad-x) 14vh;
    overflow: hidden;
}

.chapter > * {
    position: relative;
    z-index: 3;
}

/* CHAPTER-NUMBER WATERMARK — giant, 4% opacity, behind content */
.watermark {
    position: absolute;
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    font-size: 20vw;
    line-height: 0.8;
    color: var(--parchment);
    opacity: 0.04;
    top: 6vh;
    right: 4vw;
    user-select: none;
    pointer-events: none;
    z-index: 1;
    letter-spacing: -0.05em;
}

.prologue .watermark { right: auto; left: 8vw; top: 50%; transform: translateY(-50%); font-size: 30vw; }
.epilogue .watermark { font-size: 28vw; opacity: 0.035; }

/* INK WASH layers — positioned atmospheric blurs */
.ink-wash {
    position: absolute;
    pointer-events: none;
    mix-blend-mode: soft-light;
    opacity: 0.15;
    z-index: 1;
}

.ink-wash-a {
    top: 10%;
    right: -10%;
    width: 70vw;
    height: 70vh;
    background: radial-gradient(ellipse at center, var(--parchment) 0%, transparent 70%);
    filter: url(#inkwash-a) blur(20px);
}

.ink-wash-b {
    top: 20%;
    left: -15%;
    width: 80vw;
    height: 80vh;
    background: radial-gradient(ellipse at 30% 50%, var(--static-blue) 0%, transparent 60%);
    filter: url(#inkwash-b) blur(30px);
    opacity: 0.12;
}

.ink-wash-c {
    top: -10%;
    right: -5%;
    width: 75vw;
    height: 90vh;
    background: radial-gradient(ellipse at 70% 30%, var(--vermillion) 0%, transparent 55%);
    filter: url(#inkwash-c) blur(35px);
    opacity: 0.1;
}

.ink-wash-d {
    top: 30%;
    left: 10%;
    width: 80vw;
    height: 70vh;
    background: radial-gradient(ellipse at center, var(--gold-leaf) 0%, transparent 65%);
    filter: url(#inkwash-d) blur(32px);
    opacity: 0.13;
}

/* =========================================================
   PANELS — sharp corners, no radius, overlap allowed
   ========================================================= */
.panel {
    position: relative;
    padding: clamp(1.5rem, 2.4vw, 2.6rem);
    z-index: 3;
    clip-path: polygon(
        0 2px, 8px 0, 40% 3px, 60% 0, 100% 2px,
        calc(100% - 1px) 12px, 100% 40%, calc(100% - 3px) 70%, 100% calc(100% - 2px),
        calc(100% - 20%) 100%, 50% calc(100% - 3px), 12% 100%, 0 calc(100% - 2px),
        3px 60%, 0 30%, 2px 12px
    );
}

.panel-ink {
    background: rgba(42, 42, 61, 0.75);
    border-left: 1px solid rgba(61, 232, 224, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.panel-heading {
    background: transparent;
    padding-top: 1rem;
}

.panel-body {
    background: rgba(232, 220, 200, 0.03);
    border-left: 1px solid rgba(232, 220, 200, 0.15);
}

.panel-quote {
    background: rgba(196, 163, 90, 0.06);
    border-left: 2px solid var(--gold-leaf);
    padding: 2rem 2.4rem;
}

.panel-vermillion {
    border-left: 2px solid var(--vermillion);
    background: rgba(255, 59, 47, 0.035);
}

.panel-overlap-a {
    margin-right: -6vw;
    transform: translateY(1.5vh);
}
.panel-overlap-b {
    margin-left: -3vw;
    z-index: 4;
}

/* Prologue panel is placed specifically */
.panel-prologue {
    grid-column: 2 / 9;
    grid-row: 4 / 7;
    padding: 0;
}

.panel-epilogue {
    grid-column: 3 / 10;
    grid-row: 4 / 8;
    padding: 0;
    text-align: left;
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
.eyebrow {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: clamp(0.72rem, 0.95vw, 0.88rem);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold-leaf);
    margin-bottom: 1.4rem;
    display: inline-block;
}

.display, .display-italic {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--parchment);
    margin: 0.2rem 0 1.5rem;
}

.display-italic {
    font-weight: 300;
    font-style: italic;
    color: var(--paper-white);
}

.display em, .display-italic em {
    color: var(--vermillion);
    font-style: italic;
    font-weight: 500;
    text-shadow: 0 0 20px rgba(255, 59, 47, 0);
    animation: pulse-heading 3s ease-in-out infinite;
}

.display .accent-serif {
    font-style: italic;
    font-weight: 300;
    color: var(--gold-leaf);
}

.subheading {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--paper-white);
    margin-bottom: 1.1rem;
}

.subheading.italic {
    font-style: italic;
    font-weight: 300;
    color: var(--gold-leaf);
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.12rem);
    line-height: 1.75;
    color: var(--parchment);
    margin-bottom: 1.1rem;
}

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

.body-text em {
    font-style: italic;
    color: var(--static-blue);
}

.body-center { text-align: center; }

/* PULLQUOTE */
.pullquote {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.5rem, 2.4vw, 2.3rem);
    line-height: 1.28;
    color: var(--paper-white);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.pullquote-attr {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--mist);
}

/* CAVEAT HANDWRITTEN ANNOTATIONS */
.caveat-quote, .handwritten {
    font-family: var(--font-hand);
    font-weight: 400;
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    color: var(--vermillion);
    transform: rotate(-1.5deg);
    display: inline-block;
    line-height: 1.4;
}
.caveat-quote.center { display: block; text-align: center; transform: rotate(-0.5deg); margin-top: 1.2rem; }

.handwritten {
    color: var(--gold-leaf);
    transform: rotate(-2deg);
}
.handwritten.rotate-neg {
    transform: rotate(-3.5deg);
    color: var(--vermillion);
}

/* MARGINALIA */
.marginalia {
    font-family: var(--font-hand);
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    color: var(--mist);
    line-height: 1.4;
    opacity: 0.6;
    max-width: 15vw;
    padding: 0.4rem 0.6rem;
    border-left: 1px dashed rgba(168, 180, 194, 0.3);
    transform: rotate(-1deg);
}

.marginalia-right {
    transform: rotate(1.2deg);
    border-left: none;
    border-right: 1px dashed rgba(168, 180, 194, 0.3);
    padding-right: 0.6rem;
    padding-left: 0;
    text-align: right;
}

.marginalia-left {
    text-align: left;
}

.prologue-margin {
    position: absolute;
    grid-column: 9 / 12;
    grid-row: 7;
    transform: rotate(2deg);
    color: var(--gold-leaf);
}

/* FRAGMENT TEXT — stranded sentences floating in the grid */
.fragment-text {
    font-family: var(--font-display);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    color: var(--mist);
    line-height: 1.4;
    letter-spacing: 0.01em;
    padding: 0.8rem 0;
    border-top: 1px solid rgba(168, 180, 194, 0.2);
    border-bottom: 1px solid rgba(168, 180, 194, 0.08);
}

/* PILCROW / SECTION MARKS */
.pilcrow, .section-mark {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 3rem;
    color: var(--gold-leaf);
    line-height: 1;
    display: inline-block;
    animation: pulse-scale 4s ease-in-out infinite;
}

.pilcrow.pilcrow-lg {
    font-size: clamp(3rem, 5vw, 5rem);
}

.pilcrow-absolute {
    position: absolute;
    z-index: 2;
    opacity: 0.7;
}

.section-mark {
    margin-bottom: 1rem;
    color: var(--vermillion);
}
.section-mark.gold { color: var(--gold-leaf); }

/* =========================================================
   RUPTURE ZONES — horizontal bands + vertical text (tategaki)
   ========================================================= */
.rupture {
    position: relative;
    width: 100%;
    min-height: 22vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vh var(--pad-x);
    overflow: hidden;
}

.rupture-band {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 12px;
    transform: translateY(-50%);
    background:
        linear-gradient(90deg,
            var(--vermillion) 0%,
            var(--static-blue) 25%,
            var(--gold-leaf) 50%,
            var(--vermillion) 75%,
            var(--static-blue) 100%);
    background-size: 200% 100%;
    animation: drift-band 60s linear infinite;
    box-shadow:
        0 0 30px rgba(255, 59, 47, 0.4),
        0 0 60px rgba(61, 232, 224, 0.15);
    opacity: 0.9;
    z-index: 2;
}

.rupture-band-alt {
    height: 14px;
    background:
        linear-gradient(90deg,
            var(--static-blue) 0%,
            var(--vermillion) 30%,
            var(--ink-wash) 55%,
            var(--gold-leaf) 80%,
            var(--static-blue) 100%);
    background-size: 180% 100%;
}

.rupture::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: rgba(232, 220, 200, 0.12);
    z-index: 1;
}

.rupture-vertical {
    position: relative;
    z-index: 3;
    display: inline-block;
    padding: 1rem 0.6rem;
    background: var(--void);
    box-shadow: 0 0 40px 20px var(--void);
}

.tategaki {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: var(--parchment);
    writing-mode: vertical-rl;
    transform: rotate(0deg);
    white-space: nowrap;
    display: inline-block;
    line-height: 1.8;
}

/* =========================================================
   GLITCH FRAGMENTS — chromatic aberration
   ========================================================= */
.glitch-fragment {
    position: relative;
    width: 50px;
    height: 200px;
    display: block;
    z-index: 3;
}
.glitch-fragment.glitch-fragment-a {
    position: absolute;
    top: 20%;
    right: 10vw;
    width: 60px;
    height: 180px;
}
.glitch-fragment .glitch-red,
.glitch-fragment .glitch-cyan {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.glitch-fragment .glitch-red {
    background: var(--vermillion);
    transform: translate(0, 0);
    opacity: 0.85;
    mix-blend-mode: screen;
}
.glitch-fragment .glitch-cyan {
    background: var(--static-blue);
    transform: translate(3px, 3px);
    opacity: 0.75;
    mix-blend-mode: screen;
    animation: glitch-shift 2.7s ease-in-out infinite;
}
.glitch-fragment-b {
    width: 12px;
    height: 100px;
    align-self: center;
}
.glitch-fragment-c {
    width: 14px;
    height: 140px;
    transform: rotate(6deg);
}
.glitch-fragment.stutter .glitch-red {
    transform: translate(-6px, 4px) scaleY(0.96);
}
.glitch-fragment.stutter .glitch-cyan {
    transform: translate(8px, -5px) scaleY(1.04);
}

/* =========================================================
   RULESET (chapter two)
   ========================================================= */
.ruleset {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 0;
    display: grid;
    gap: 0.7rem;
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.25vw, 1.1rem);
    line-height: 1.5;
    color: var(--parchment);
}
.ruleset li {
    padding-left: 2.6rem;
    position: relative;
    border-bottom: 1px dotted rgba(196, 163, 90, 0.2);
    padding-bottom: 0.55rem;
}
.ruleset li:last-child {
    border-bottom: none;
    color: var(--vermillion);
    font-style: italic;
}
.ruleset .num {
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--font-display);
    font-style: italic;
    color: var(--gold-leaf);
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    min-width: 2rem;
}

/* =========================================================
   ANNOTATION GRID (marginalia chapter)
   ========================================================= */
.annotation-grid {
    grid-column: 2 / 13;
    grid-row: 5 / 12;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(4, auto);
    gap: 2.5rem 0;
    position: relative;
    z-index: 3;
}

.annotation {
    padding: 1.3rem 1.6rem;
    border-top: 1px solid rgba(196, 163, 90, 0.3);
    border-bottom: 1px solid rgba(196, 163, 90, 0.1);
    position: relative;
}

.annotation-left  { grid-column: 1 / 7;  transform: translateX(-2vw); }
.annotation-right { grid-column: 7 / 13; transform: translateX(3vw); }

.annotation:nth-child(1) { grid-row: 1; }
.annotation:nth-child(2) { grid-row: 2; margin-top: 3vh; }
.annotation:nth-child(3) { grid-row: 3; margin-top: -2vh; }
.annotation:nth-child(4) { grid-row: 4; margin-top: 4vh; }

.annotation-hand {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--vermillion);
    display: block;
    margin-bottom: 0.6rem;
}

.annotation-quote {
    font-family: var(--font-hand);
    font-weight: 400;
    font-size: clamp(1.2rem, 1.8vw, 1.7rem);
    line-height: 1.35;
    color: var(--paper-white);
    letter-spacing: 0.01em;
    border-left: 2px solid var(--gold-leaf);
    padding-left: 1rem;
    margin: 0;
    font-style: normal;
}

.annotation-caption {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--mist);
    margin-top: 0.8rem;
    opacity: 0.8;
}

/* =========================================================
   COLOPHON
   ========================================================= */
.colophon {
    grid-column: 4 / 11;
    grid-row: 10;
    text-align: center;
    padding-top: 4rem;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--mist);
    border-top: 1px solid rgba(196, 163, 90, 0.18);
    background-image:
        linear-gradient(90deg,
            transparent 0, transparent calc(50% - 4px),
            var(--gold-leaf) calc(50% - 4px), var(--gold-leaf) calc(50% - 3px),
            transparent calc(50% - 3px));
    background-size: 8px 3px;
    background-repeat: repeat-x;
    background-position: top center;
}
.colophon .dot {
    color: var(--vermillion);
    margin: 0 0.4rem;
}

/* =========================================================
   REVEAL ANIMATIONS (IntersectionObserver)
   ========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal.annotation-left.visible  { transform: translateX(0); }
.reveal.annotation-right.visible { transform: translateX(0); }
.reveal.annotation-left  { transform: translateX(-6vw); }
.reveal.annotation-right { transform: translateX(6vw); }

/* =========================================================
   ANIMATIONS — staggered, polyrhythmic pulses
   ========================================================= */
@keyframes pulse-heading {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 59, 47, 0);
    }
    50% {
        text-shadow:
            0 0 40px rgba(255, 59, 47, 0.35),
            0 0 80px rgba(255, 59, 47, 0.12);
    }
}

@keyframes pulse-spine {
    0%, 100% { opacity: 0.15; }
    50%      { opacity: 0.38; }
}

@keyframes pulse-scale {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(255, 59, 47, 0.4);
    }
    50% {
        transform: scale(1.4);
        box-shadow: 0 0 22px rgba(255, 59, 47, 0.85);
    }
}

@keyframes pulse-mist {
    0%, 100% { opacity: 0.7; }
    50%      { opacity: 1; }
}

@keyframes drift-band {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

@keyframes drift-left {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100px); }
}

@keyframes glitch-shift {
    0%, 100%  { transform: translate(3px, 3px); }
    25%       { transform: translate(-2px, 4px); }
    50%       { transform: translate(4px, -2px); }
    75%       { transform: translate(-3px, 2px); }
}

/* =========================================================
   RESPONSIVE — collapse to single column but preserve asymmetry
   ========================================================= */
@media (max-width: 768px) {
    :root { --pad-x: clamp(1rem, 6vw, 2.5rem); }

    .scroll-container {
        padding-left: clamp(2.2rem, 7vw, 3.5rem);
        padding-right: clamp(1rem, 4vw, 2rem);
    }

    .chapter {
        grid-template-columns: 1fr;
        padding: 12vh var(--pad-x) 10vh;
    }

    .chapter > .panel,
    .chapter > .fragment-text,
    .chapter > .marginalia {
        grid-column: 1 !important;
        grid-row: auto !important;
        max-width: 100% !important;
        margin: 1rem 0 !important;
    }

    .chapter > *:nth-child(odd) {
        transform: translateX(-2vw);
        padding-right: 3vw;
    }
    .chapter > *:nth-child(even) {
        transform: translateX(3vw);
        padding-left: 2vw;
    }

    .watermark { font-size: 45vw; opacity: 0.03; }
    .display   { font-size: clamp(2.2rem, 10vw, 3.5rem); }

    .marginalia {
        max-width: 80%;
        transform: rotate(0);
    }
    .marginalia-right {
        margin-left: auto;
        text-align: right;
    }

    .annotation-grid {
        grid-template-columns: 1fr;
    }
    .annotation-left, .annotation-right {
        grid-column: 1 !important;
        transform: none !important;
    }

    .panel-overlap-a, .panel-overlap-b {
        margin: 0 !important;
        transform: none;
    }

    .continuum-line { opacity: 0.25; }
    .spine-label { width: 2.2rem; }
    .spine-label-text { font-size: 0.65rem; letter-spacing: 0.3em; }

    .scroll-container::after {
        left: 62%;
    }
}
