:root {
    --ink: #020203;
    --paper: #0a0b0e;
    --white: #f7f4fb;
    --cyan: #16d8e5;
    --pink: #ed2d79;
    --yellow: #ffc713;
    --purple: #8f4bff;
    --blue: #0b8ee8;
    --panel: #071014;
    --stroke: #020203;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y mandatory; background: #000; }
body.public-body {
    margin: 0;
    background: #000;
    color: var(--white);
    overflow-x: hidden;
    font-family: Arial, Helvetica, sans-serif;
}

.osw-comic-profile {
    min-height: 100vh;
    background:
        linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px),
        #000;
    background-size: 24px 24px;
}

.roster-snap { scroll-snap-align: start; scroll-snap-stop: always; }

.comic-nav {
    position: fixed;
    z-index: 100;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    gap: 8px;
}
.comic-nav a {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.7);
    background: rgba(255,255,255,.18);
    transition: transform .18s ease, background .18s ease;
}
.comic-nav a.is-active { background: #fff; transform: scale(1.45); }

/* COVER */
.comic-cover {
    position: relative;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    border-bottom: 4px solid #000;
    background:
        repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px),
        radial-gradient(circle at 25% 55%, rgba(21,216,229,.12), transparent 34%),
        radial-gradient(circle at 77% 35%, rgba(237,45,121,.12), transparent 31%),
        #010102;
}
.comic-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 0 55%, rgba(0,0,0,.05) 72%, #000 100%),
        linear-gradient(0deg, #000 0%, transparent 27%, transparent 78%, rgba(0,0,0,.2));
    z-index: 2;
}
.glitch-static {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: .65;
    background:
        repeating-linear-gradient(90deg, transparent 0 27px, rgba(21,216,229,.12) 27px 29px, transparent 29px 74px, rgba(237,45,121,.12) 74px 77px),
        repeating-linear-gradient(0deg, transparent 0 9px, rgba(255,255,255,.035) 9px 10px),
        linear-gradient(90deg, transparent 0 18%, rgba(0,0,0,.4) 36%, transparent 70%);
    mix-blend-mode: screen;
    animation: static-shift 3.4s steps(1) infinite;
}
.cover-art {
    position: absolute;
    z-index: 3;
    left: clamp(10px, 1.5vw, 30px);
    bottom: -1%;
    width: clamp(460px, 39vw, 760px);
    height: 94%;
    object-fit: contain;
    object-position: left bottom;
    transform: scale(2.02);
    transform-origin: left bottom;
    filter: drop-shadow(0 0 18px rgba(21,216,229,.16));
    -webkit-mask-image: linear-gradient(to bottom, #000 0 78%, rgba(0,0,0,.98) 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0 78%, rgba(0,0,0,.98) 88%, transparent 100%);
}
.cover-title-wrap {
    position: absolute;
    z-index: 4;
    right: max(5vw, calc(50% - 690px));
    top: 46%;
    transform: translateY(-50%);
    width: min(66vw, 920px);
    text-align: right;
}
.glitch-title {
    position: relative;
    display: inline-block;
    margin: 0;
    color: #fff;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: clamp(74px, 12.5vw, 190px);
    line-height: .82;
    letter-spacing: .02em;
    font-style: italic;
    text-transform: uppercase;
    text-shadow: 5px 0 0 rgba(21,216,229,.72), -5px 0 0 rgba(237,45,121,.72), 0 0 18px rgba(255,255,255,.18);
    filter: contrast(1.12);
    animation: title-jitter 2.3s steps(1) infinite;
}
.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.glitch-title::before {
    color: #fff;
    text-shadow: -7px 0 var(--cyan);
    clip-path: inset(10% 0 66% 0);
    transform: translateX(-9px);
    animation: glitch-a 1.1s steps(2) infinite;
}
.glitch-title::after {
    color: #fff;
    text-shadow: 7px 0 var(--pink);
    clip-path: inset(66% 0 9% 0);
    transform: translateX(8px);
    animation: glitch-b 1.5s steps(2) infinite;
}
.roster-back,
.cover-scroll {
    position: absolute;
    z-index: 6;
    color: #fff;
    text-decoration: none;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    letter-spacing: .11em;
    font-size: 13px;
}
.roster-back { top: 22px; left: 24px; color: var(--cyan); }
.cover-scroll { right: 28px; bottom: 22px; opacity: .72; }

/* COMMON COMIC SLIDES */
.comic-page {
    width: 100%;
    margin: 0;
    background: #000;
}
.comic-slide {
    --accent: var(--cyan);
    --accent-dark: #07383c;
    position: relative;
    min-height: 100svh;
    display: grid;
    grid-template-columns: clamp(92px, 7vw, 140px) minmax(0, 1.55fr) minmax(360px, .95fr);
    gap: 0;
    overflow: hidden;
    border: 4px solid #000;
    outline: 2px solid var(--accent);
    outline-offset: -6px;
    background:
        radial-gradient(circle at 75% 45%, color-mix(in srgb, var(--accent) 21%, transparent), transparent 34%),
        repeating-radial-gradient(circle at 15% 15%, rgba(255,255,255,.05) 0 1px, transparent 1px 5px),
        linear-gradient(115deg, color-mix(in srgb, var(--accent) 12%, #090a0c) 0 58%, #040506 58% 100%);
}
.slide-pink { --accent: var(--pink); --accent-dark: #451021; }
.slide-yellow { --accent: var(--yellow); --accent-dark: #4b3900; }
.slide-purple { --accent: var(--purple); --accent-dark: #211340; }
.slide-blue { --accent: var(--blue); --accent-dark: #062c51; }
.comic-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .22;
    background:
        linear-gradient(135deg, transparent 0 40%, rgba(255,255,255,.05) 40% 40.6%, transparent 40.6% 52%, rgba(255,255,255,.035) 52% 52.7%, transparent 52.7%),
        repeating-linear-gradient(0deg, transparent 0 12px, rgba(0,0,0,.18) 12px 13px);
}
.section-number,
.section-main,
.comic-art-panel { position: relative; z-index: 2; }
.section-number {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 56px;
    background: linear-gradient(160deg, var(--accent) 0 72%, transparent 72%);
    clip-path: polygon(0 0, 100% 0, 78% 73%, 58% 67%, 49% 82%, 32% 74%, 0 90%);
}
.section-number span {
    color: #030303;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: clamp(92px, 10vw, 142px);
    line-height: .78;
    transform: rotate(-5deg);
}
.section-main {
    align-self: center;
    padding: clamp(54px, 7vh, 96px) clamp(42px, 5vw, 88px) clamp(48px, 6vh, 82px) clamp(34px, 4vw, 72px);
    min-width: 0;
}
.comic-heading {
    display: inline-block;
    margin: 0 0 24px;
    padding: 8px 18px 7px;
    color: #050505;
    background: var(--accent);
    border: 3px solid #000;
    box-shadow: 5px 5px 0 #000;
    transform: skew(-8deg) rotate(-1deg);
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-style: italic;
    font-size: clamp(34px, 3.2vw, 62px);
    line-height: .95;
    letter-spacing: .015em;
    text-transform: uppercase;
}
.comic-heading > * { transform: skew(8deg); }

.comic-art-panel {
    min-width: 0;
    overflow: hidden;
    border-left: 4px solid #000;
    background:
        repeating-radial-gradient(circle at 50% 50%, rgba(0,0,0,.28) 0 2px, transparent 2px 8px),
        radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--accent) 84%, #fff), var(--accent-dark) 42%, #090a0d 77%);
}
.comic-art-panel::before,
.comic-art-panel::after,
.burst-lines {
    content: "";
    position: absolute;
    inset: -15%;
    pointer-events: none;
}
.comic-art-panel::before {
    background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,255,255,.2) 0 2deg, transparent 2deg 8deg);
    opacity: .28;
}
.comic-art-panel::after {
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.2), transparent 25%, transparent 78%, rgba(0,0,0,.18));
}
.comic-art-panel img {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 0;
    width: 92%;
    height: 92%;
    transform: translateX(-50%);
    object-fit: contain;
    object-position: center bottom;
    filter: saturate(1.1) contrast(1.03) drop-shadow(0 10px 18px rgba(0,0,0,.5));
}

/* Per-slide art direction. These values are deliberate so every 1200×1600
   transparent character render lands consistently without manual positioning. */
.basics-art img {
    width: 84%;
    height: 88%;
    bottom: 0;
}
.persona-art img {
    width: 96%;
    height: 96%;
    bottom: -1.5%;
}
.ring-art img {
    width: 104%;
    height: 102%;
    bottom: -3%;
}
.entrance-art img {
    width: 94%;
    height: 96%;
    bottom: -1%;
}
.empty-art { display: grid; place-items: center; }
.empty-art span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: Impact, sans-serif;
    font-size: 48px;
    color: rgba(255,255,255,.14);
}

/* SLIDE 1 */
.stat-list { display: grid; gap: clamp(10px, 1.2vh, 16px); width: 100%; max-width: none; }
.stat-row {
    min-height: clamp(68px, 8vh, 92px);
    display: grid;
    grid-template-columns: clamp(52px, 4vw, 72px) clamp(150px, 11vw, 220px) 1fr;
    align-items: center;
    background: rgba(2,6,8,.9);
    border: 2px solid #000;
    border-radius: 4px;
    box-shadow: 3px 3px 0 rgba(0,0,0,.72);
    overflow: hidden;
}
.stat-icon {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 23px;
    background: rgba(255,255,255,.02);
}
.stat-label,
.comic-info-panel h3 {
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-style: italic;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.stat-label { color: #dedbe1; font-size: clamp(16px, 1.15vw, 22px); }
.stat-row strong { padding: 0 clamp(18px, 2vw, 34px); font-size: clamp(20px, 1.55vw, 30px); }

/* SLIDE 2 + COMMON INFO PANELS */
.story-stack { display: grid; gap: 8px; }
.comic-info-panel {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 14px;
    align-items: start;
    padding: 16px 18px 16px 10px;
    border: 2px solid #000;
    background: rgba(3,9,12,.93);
    box-shadow: 4px 4px 0 rgba(0,0,0,.62);
}
.panel-icon {
    color: var(--accent);
    font-size: 31px;
    line-height: 1;
    text-align: center;
}
.comic-info-panel h3 {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: clamp(19px, 1.35vw, 26px);
}
.comic-prose,
.comic-info-panel p,
.comic-info-panel li,
.catchphrase-panel blockquote {
    color: #f5f2f5;
    font-size: clamp(16px, 1.2vw, 22px);
    line-height: 1.45;
}
.comic-prose p { margin: 0 0 .6em; }
.comic-prose p:last-child { margin-bottom: 0; }
.catchphrase-panel blockquote { margin: 0; font-style: italic; }

/* SLIDE 3 */
.ring-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
}
.ring-card { min-height: clamp(190px, 25vh, 280px); }
.ring-card ul { margin: 0; padding-left: 20px; }
.ring-card li + li { margin-top: 4px; }

/* SLIDE 4 */
.entrance-cards {
    display: grid;
    grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr);
    gap: 10px;
}
.entrance-song-card,
.entrance-writeup { min-height: 280px; }
.entrance-song-content { min-width: 0; }
.song-title {
    display: block;
    margin: 8px 0 20px;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: clamp(25px, 3vw, 38px);
    letter-spacing: .035em;
}
.osw-player {
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 5px;
    background: linear-gradient(90deg, rgba(143,75,255,.42), rgba(20,9,40,.95));
}
.play-button {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    font-size: 24px;
    cursor: pointer;
}
.player-readout { min-width: 0; }
.player-time { display: flex; justify-content: space-between; margin-bottom: 8px; color: #c9b5f8; font-size: 12px; }
.osw-player input[type="range"] { width: 100%; accent-color: var(--accent); }
.audio-empty { color: rgba(255,255,255,.48); font-size: 12px; letter-spacing: .12em; font-weight: 800; }

/* SLIDE 5 */
.works-slide { grid-template-columns: 106px 1fr; }
.works-main { padding-right: 52px; }
.works-intro { margin: -8px 0 24px; color: #eef5ff; font-size: 17px; }
.works-grid,
.works-placeholder-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: 18px;
}
.work-cover {
    color: #fff;
    text-decoration: none;
    text-align: center;
    min-width: 0;
}
.work-art {
    position: relative;
    aspect-ratio: 4 / 5.4;
    overflow: hidden;
    border: 3px solid #040404;
    box-shadow: 4px 4px 0 #000, 0 0 0 1px var(--accent);
    background:
        radial-gradient(circle at 20% 20%, rgba(237,45,121,.55), transparent 32%),
        linear-gradient(145deg, #392058, #051425 58%, #0f7ebf);
}
.work-art img {
    position: absolute;
    inset: 15% 0 0;
    width: 100%;
    height: 85%;
    object-fit: contain;
    object-position: center bottom;
    filter: saturate(1.18) contrast(1.05);
}
.work-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(255,255,255,.05) 7px 8px);
    mix-blend-mode: screen;
}
.work-art span {
    position: absolute;
    z-index: 4;
    left: 8px;
    right: 8px;
    top: 8px;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: clamp(18px, 2vw, 28px);
    line-height: .9;
    text-shadow: 2px 0 var(--pink), -2px 0 var(--cyan), 2px 2px 0 #000;
}
.work-cover strong {
    display: block;
    margin-top: 12px;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: 17px;
    letter-spacing: .025em;
    text-transform: uppercase;
}
.work-cover small { display: block; margin-top: 5px; color: #d2dce8; font-size: 11px; line-height: 1.3; }
.work-cover.is-placeholder { opacity: .55; }

@keyframes title-jitter {
    0%, 90%, 100% { transform: translate(0); }
    91% { transform: translate(-3px, 1px); }
    93% { transform: translate(4px, -1px); }
    95% { transform: translate(-1px, 0); }
}
@keyframes glitch-a {
    0%, 78%, 100% { clip-path: inset(10% 0 66% 0); transform: translateX(-8px); }
    80% { clip-path: inset(35% 0 42% 0); transform: translateX(12px); }
    84% { clip-path: inset(2% 0 83% 0); transform: translateX(-3px); }
}
@keyframes glitch-b {
    0%, 74%, 100% { clip-path: inset(66% 0 9% 0); transform: translateX(8px); }
    76% { clip-path: inset(48% 0 28% 0); transform: translateX(-13px); }
    82% { clip-path: inset(82% 0 2% 0); transform: translateX(5px); }
}
@keyframes static-shift {
    0%, 86%, 100% { transform: translate(0); opacity: .56; }
    88% { transform: translateX(9px); opacity: .85; }
    90% { transform: translateX(-7px); opacity: .35; }
}


@media (min-width: 901px) {
    .comic-slide {
        min-height: 100svh;
        width: 100%;
    }
    .section-main {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .comic-art-panel {
        min-width: 360px;
    }
    .story-stack,
    .ring-cards,
    .entrance-cards {
        width: 100%;
    }
    .works-main {
        padding-left: clamp(34px, 4vw, 72px);
        padding-right: clamp(42px, 5vw, 88px);
    }
}

@media (max-width: 900px) {

    .cover-art {
        left: 50%;
        bottom: 0;
        width: min(92vw, 620px);
        height: 76%;
        transform: translateX(-50%) scale(1.18);
        transform-origin: center bottom;
        object-position: center bottom;
        opacity: .82;
    }
    .comic-art-panel img,
    .basics-art img,
    .persona-art img,
    .ring-art img,
    .entrance-art img {
        left: 50%;
        width: min(88%, 620px);
        height: 92%;
        bottom: 0;
        transform: translateX(-50%);
        object-fit: contain;
        object-position: center bottom;
    }

    html { scroll-snap-type: y proximity; }
    .comic-nav { display: none; }
    .comic-cover { min-height: 78svh; }
    .cover-art { width: 62vw; height: 78%; left: -11vw; }
    .cover-title-wrap { width: 70vw; right: 5vw; }
    .glitch-title { font-size: clamp(52px, 14vw, 120px); }
    .comic-slide {
        min-height: 100svh;
        grid-template-columns: 74px 1fr;
        grid-template-rows: auto minmax(280px, 42vh);
    }
    .section-number { grid-row: 1 / span 2; padding-top: 42px; }
    .section-number span { font-size: 82px; }
    .section-main { padding: 42px 22px 24px; }
    .comic-art-panel { grid-column: 2; min-height: 280px; border-left: 0; border-top: 4px solid #000; }
    .comic-art-panel img { object-position: center 18%; }
    .works-slide { grid-template-columns: 74px 1fr; grid-template-rows: auto; }
    .works-main { padding-right: 22px; }
    .works-grid,
    .works-placeholder-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 620px) {
    .comic-cover { min-height: 72svh; }
    .cover-art { width: 78vw; height: 70%; left: -24vw; opacity: .92; }
    .cover-title-wrap { width: 77vw; right: 4vw; top: 43%; }
    .roster-back { left: 14px; top: 14px; }
    .cover-scroll { right: 14px; bottom: 14px; }
    .comic-slide { grid-template-columns: 56px 1fr; }
    .section-number { padding-top: 30px; }
    .section-number span { font-size: 61px; }
    .section-main { padding: 30px 14px 18px; }
    .comic-heading { font-size: 28px; margin-bottom: 18px; }
    .stat-row { grid-template-columns: 38px 98px 1fr; min-height: 54px; }
    .stat-label { font-size: 13px; }
    .stat-row strong { padding: 0 10px; font-size: 15px; }
    .comic-info-panel { grid-template-columns: 40px 1fr; gap: 8px; padding: 12px 10px 12px 7px; }
    .panel-icon { font-size: 24px; }
    .comic-info-panel h3 { font-size: 16px; }
    .ring-cards,
    .entrance-cards { grid-template-columns: 1fr; }
    .ring-card,
    .entrance-song-card,
    .entrance-writeup { min-height: auto; }
    .works-grid,
    .works-placeholder-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .glitch-title,
    .glitch-title::before,
    .glitch-title::after,
    .glitch-static { animation: none; }
}


/* ============================================================
   OSW v0.3.3.1 — RESPONSIVE STABILISATION
   This layer deliberately preserves the approved v0.3.3 look.
   It only corrects scaling across desktop/laptop/tablet/mobile.
   ============================================================ */

/* Desktop: scale the approved 4K composition proportionally instead of
   letting max-width clamps make artwork disproportionately large at 1080p. */
@media (min-width: 901px) and (max-width: 2559px) {
    .cover-art {
        left: clamp(10px, 1.5vw, 30px);
        width: 39vw;
        max-width: none;
        height: 94%;
        transform: scale(clamp(1.06, 0.0505vw + 0.09, 1.39));
        transform-origin: left bottom;
    }

    .cover-title-wrap {
        right: 5vw;
        width: 58vw;
    }

    .glitch-title {
        font-size: clamp(74px, 9.9vw, 190px);
    }

    .comic-slide {
        grid-template-columns:
            clamp(88px, 6.4vw, 124px)
            minmax(0, 1.58fr)
            minmax(330px, 34vw);
    }

    .section-number {
        padding-top: clamp(38px, 5.2vh, 56px);
    }

    .section-number span {
        font-size: clamp(78px, 7.4vw, 118px);
    }

    .section-main {
        padding:
            clamp(38px, 5.2vh, 64px)
            clamp(28px, 3.2vw, 58px)
            clamp(34px, 4.8vh, 58px)
            clamp(26px, 2.8vw, 52px);
    }

    .comic-heading {
        font-size: clamp(32px, 2.8vw, 54px);
        margin-bottom: clamp(16px, 2.1vh, 24px);
    }

    .stat-row {
        min-height: clamp(60px, 7.1vh, 78px);
        grid-template-columns:
            clamp(46px, 3.3vw, 62px)
            clamp(130px, 9.5vw, 182px)
            1fr;
    }

    .stat-label {
        font-size: clamp(15px, 1vw, 19px);
    }

    .stat-row strong {
        padding: 0 clamp(14px, 1.5vw, 26px);
        font-size: clamp(18px, 1.3vw, 25px);
    }

    .comic-info-panel {
        grid-template-columns: clamp(46px, 3vw, 56px) 1fr;
        gap: clamp(9px, .8vw, 14px);
        padding: clamp(12px, 1.4vh, 16px) clamp(13px, 1vw, 18px);
    }

    .comic-info-panel h3 {
        font-size: clamp(17px, 1.15vw, 22px);
    }

    .comic-prose,
    .comic-info-panel p,
    .comic-info-panel li,
    .catchphrase-panel blockquote {
        font-size: clamp(14px, 1vw, 19px);
        line-height: 1.4;
    }

    .ring-card {
        min-height: clamp(160px, 22vh, 238px);
    }

    .entrance-song-card,
    .entrance-writeup {
        min-height: clamp(220px, 29vh, 300px);
    }

    .works-grid,
    .works-placeholder-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: clamp(12px, 1vw, 18px);
    }
}

/* Large desktop / 1440p: retain the same proportions, with slightly more
   breathing room than 1080p. */
@media (min-width: 2000px) and (max-width: 2559px) {
    .cover-art {
        transform: scale(1.34);
    }

    .comic-slide {
        grid-template-columns:
            clamp(110px, 6.4vw, 140px)
            minmax(0, 1.55fr)
            minmax(390px, 34vw);
    }
}

/* The old v0.3.3 mobile rules contained two conflicting .cover-art blocks.
   These final rules make tablet/mobile deterministic while retaining the
   same OSW cover composition. */
@media (max-width: 900px) {
    html {
        scroll-snap-type: y proximity;
    }

    .comic-cover {
        min-height: 100svh;
    }

    .cover-art {
        left: 50%;
        bottom: 0;
        width: min(96vw, 720px);
        height: 69%;
        max-width: none;
        transform: translateX(-50%) scale(1.08);
        transform-origin: center bottom;
        object-position: center bottom;
        opacity: .82;
    }

    .cover-title-wrap {
        top: 24%;
        right: 5vw;
        width: 90vw;
        transform: none;
        text-align: right;
    }

    .glitch-title {
        font-size: clamp(58px, 15vw, 116px);
        line-height: .82;
    }

    .comic-slide {
        min-height: 100svh;
        height: auto;
        grid-template-columns: 68px minmax(0, 1fr);
        grid-template-rows: auto minmax(360px, 48svh);
    }

    .section-number {
        grid-row: 1 / span 2;
        padding-top: 38px;
    }

    .section-number span {
        font-size: 74px;
    }

    .section-main {
        align-self: stretch;
        padding: 34px 22px 26px;
    }

    .comic-art-panel {
        grid-column: 2;
        min-height: 360px;
        border-left: 0;
        border-top: 4px solid #000;
    }

    .comic-art-panel img,
    .basics-art img,
    .persona-art img,
    .ring-art img,
    .entrance-art img {
        left: 50%;
        bottom: 0;
        width: min(82%, 560px);
        height: 94%;
        transform: translateX(-50%);
        object-fit: contain;
        object-position: center bottom;
    }

    .works-slide {
        grid-template-columns: 68px minmax(0, 1fr);
        grid-template-rows: auto;
    }
}

/* Phones: intentionally becomes a vertical comic page rather than squeezing
   the desktop layout into a narrow viewport. */
@media (max-width: 620px) {
    .comic-cover {
        min-height: 100svh;
    }

    .roster-back {
        left: 14px;
        top: 14px;
    }

    .cover-scroll {
        right: 14px;
        bottom: 14px;
    }

    .cover-title-wrap {
        top: 18%;
        right: 4vw;
        width: 92vw;
        text-align: center;
    }

    .glitch-title {
        font-size: clamp(48px, 16vw, 82px);
    }

    .cover-art {
        left: 50%;
        bottom: 0;
        width: 112vw;
        height: 67%;
        transform: translateX(-50%) scale(1.04);
        opacity: .9;
    }

    .comic-slide {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        grid-template-rows: auto minmax(330px, 47svh);
        min-height: 100svh;
    }

    .section-number {
        padding-top: 26px;
    }

    .section-number span {
        font-size: 54px;
    }

    .section-main {
        padding: 26px 14px 20px;
    }

    .comic-heading {
        font-size: clamp(25px, 8vw, 34px);
        margin-bottom: 16px;
        box-shadow: 3px 3px 0 #000;
    }

    .stat-row {
        grid-template-columns: 34px minmax(82px, 31%) 1fr;
        min-height: 52px;
    }

    .stat-icon {
        font-size: 18px;
    }

    .stat-label {
        font-size: clamp(11px, 3.2vw, 14px);
    }

    .stat-row strong {
        padding: 0 8px;
        font-size: clamp(13px, 3.7vw, 16px);
        overflow-wrap: anywhere;
    }

    .comic-info-panel {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 7px;
        padding: 11px 9px 11px 6px;
    }

    .panel-icon {
        font-size: 21px;
    }

    .comic-info-panel h3 {
        font-size: 15px;
    }

    .comic-prose,
    .comic-info-panel p,
    .comic-info-panel li,
    .catchphrase-panel blockquote {
        font-size: 14px;
        line-height: 1.42;
        overflow-wrap: anywhere;
    }

    .ring-cards,
    .entrance-cards {
        grid-template-columns: 1fr;
    }

    .ring-card,
    .entrance-song-card,
    .entrance-writeup {
        min-height: auto;
    }

    .comic-art-panel {
        min-height: 330px;
    }

    .comic-art-panel img,
    .basics-art img,
    .persona-art img,
    .ring-art img,
    .entrance-art img {
        width: min(94%, 430px);
        height: 94%;
        object-position: center bottom;
    }

    .works-grid,
    .works-placeholder-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .works-main {
        padding-right: 14px;
    }
}

/* Very narrow phones. */
@media (max-width: 390px) {
    .comic-slide {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .section-number span {
        font-size: 47px;
    }

    .section-main {
        padding-left: 11px;
        padding-right: 10px;
    }

    .stat-row {
        grid-template-columns: 30px 78px minmax(0, 1fr);
    }

    .cover-title-wrap {
        width: 96vw;
        right: 2vw;
    }
}


/* ============================================================
   OSW v0.4.3 — FULL-WIDTH ROSTER / ISSUE BANNER
   hero_image_path is now treated as an edge-to-edge banner.
   ============================================================ */

.comic-cover .cover-art {
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    transform: none !important;
    transform-origin: center center !important;
    object-fit: cover !important;
    object-position: center center !important;
    opacity: 1 !important;
    filter: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
}

/* Preserve title readability over any uploaded banner. */
.comic-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.10) 38%, rgba(0,0,0,.46) 66%, rgba(0,0,0,.76) 100%),
        linear-gradient(0deg, rgba(0,0,0,.34) 0%, transparent 34%);
}

.comic-cover .cover-title-wrap,
.comic-cover .roster-back,
.comic-cover .cover-scroll {
    z-index: 4;
}

/* Banner remains a true background on tablet/mobile instead of reverting
   to the old centred character-model treatment. */
@media (max-width: 900px) {
    .comic-cover .cover-art {
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        transform: none !important;
        object-fit: cover !important;
        object-position: center center !important;
        opacity: 1 !important;
    }

    .comic-cover::after {
        background:
            linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.18) 42%, rgba(0,0,0,.72) 100%),
            linear-gradient(90deg, rgba(0,0,0,.08), rgba(0,0,0,.30));
    }
}


/* ============================================================
   OSW v0.4.5 — ROSTER HEADER READABILITY TUNING
   Surgical overrides only.
   ============================================================ */

/* Turn the character-name glitch down without removing the effect. */
.glitch-title {
    text-shadow:
        3px 0 0 rgba(21,216,229,.48),
        -3px 0 0 rgba(237,45,121,.48),
        0 0 14px rgba(255,255,255,.13);
    animation: osw-roster-title-soft-jitter 5.8s steps(1,end) infinite;
}

.glitch-title::before {
    text-shadow: -3px 0 rgba(21,216,229,.60);
    transform: translateX(-3px);
    opacity: .58;
    animation: osw-roster-glitch-soft-a 5.8s steps(1,end) infinite;
}

.glitch-title::after {
    text-shadow: 3px 0 rgba(237,45,121,.58);
    transform: translateX(3px);
    opacity: .54;
    animation: osw-roster-glitch-soft-b 5.8s steps(1,end) infinite;
}

/* Slightly lower banner intensity, then fade it harder into black at the
   bottom so the title/navigation remain readable without flattening the art. */
.comic-cover .cover-art {
    opacity: .88 !important;
}

.comic-cover::after {
    background:
        linear-gradient(90deg,
            rgba(0,0,0,.12) 0%,
            rgba(0,0,0,.14) 38%,
            rgba(0,0,0,.48) 66%,
            rgba(0,0,0,.76) 100%),
        linear-gradient(0deg,
            #000 0%,
            rgba(0,0,0,.90) 7%,
            rgba(0,0,0,.58) 16%,
            rgba(0,0,0,.18) 31%,
            transparent 48%);
}

@keyframes osw-roster-title-soft-jitter {
    0%, 94%, 97%, 100% { transform: translate(0); }
    95% { transform: translate(-1px, 0); }
    96% { transform: translate(1px, 0); }
}

@keyframes osw-roster-glitch-soft-a {
    0%, 93%, 97%, 100% {
        clip-path: inset(10% 0 66% 0);
        transform: translateX(-3px);
    }
    94.5% {
        clip-path: inset(34% 0 45% 0);
        transform: translateX(3px);
    }
    96% {
        clip-path: inset(8% 0 79% 0);
        transform: translateX(-1px);
    }
}

@keyframes osw-roster-glitch-soft-b {
    0%, 92.5%, 97.5%, 100% {
        clip-path: inset(66% 0 9% 0);
        transform: translateX(3px);
    }
    94% {
        clip-path: inset(51% 0 27% 0);
        transform: translateX(-3px);
    }
    96.5% {
        clip-path: inset(79% 0 5% 0);
        transform: translateX(1px);
    }
}

@media (max-width: 900px) {
    .comic-cover::after {
        background:
            linear-gradient(180deg,
                rgba(0,0,0,.10) 0%,
                rgba(0,0,0,.20) 42%,
                rgba(0,0,0,.88) 100%),
            linear-gradient(90deg, rgba(0,0,0,.08), rgba(0,0,0,.28));
    }
}

@media (prefers-reduced-motion: reduce) {
    .glitch-title,
    .glitch-title::before,
    .glitch-title::after {
        animation: none !important;
    }
}


/* ============================================================
   OSW v0.4.6 — ROSTER GLITCH REBALANCE
   Brings movement back without returning to the unreadable version.
   ============================================================ */

.glitch-title {
    text-shadow:
        4px 0 0 rgba(21,216,229,.55),
        -4px 0 0 rgba(237,45,121,.55),
        0 0 14px rgba(255,255,255,.14);
    animation: osw-roster-title-mid-jitter 3.6s steps(1,end) infinite;
}

.glitch-title::before {
    text-shadow: -4px 0 rgba(21,216,229,.68);
    transform: translateX(-4px);
    opacity: .66;
    animation: osw-roster-glitch-mid-a 3.6s steps(1,end) infinite;
}

.glitch-title::after {
    text-shadow: 4px 0 rgba(237,45,121,.66);
    transform: translateX(4px);
    opacity: .62;
    animation: osw-roster-glitch-mid-b 3.6s steps(1,end) infinite;
}

@keyframes osw-roster-title-mid-jitter {
    0%, 82%, 85%, 88%, 92%, 100% { transform: translate(0); }
    83% { transform: translate(-2px, 0); }
    84% { transform: translate(2px, 0); }
    86% { transform: translate(1px, -1px); }
    87% { transform: translate(-1px, 1px); }
    90% { transform: translate(-2px, 0); }
    91% { transform: translate(2px, 0); }
}

@keyframes osw-roster-glitch-mid-a {
    0%, 80%, 84%, 88%, 92%, 100% {
        clip-path: inset(10% 0 66% 0);
        transform: translateX(-4px);
    }
    81% {
        clip-path: inset(25% 0 52% 0);
        transform: translateX(4px);
    }
    83% {
        clip-path: inset(52% 0 24% 0);
        transform: translateX(-2px);
    }
    86% {
        clip-path: inset(5% 0 78% 0);
        transform: translateX(3px);
    }
    90% {
        clip-path: inset(68% 0 8% 0);
        transform: translateX(-3px);
    }
}

@keyframes osw-roster-glitch-mid-b {
    0%, 79%, 83%, 87%, 91%, 100% {
        clip-path: inset(66% 0 9% 0);
        transform: translateX(4px);
    }
    80% {
        clip-path: inset(46% 0 30% 0);
        transform: translateX(-4px);
    }
    82% {
        clip-path: inset(18% 0 59% 0);
        transform: translateX(2px);
    }
    85% {
        clip-path: inset(74% 0 6% 0);
        transform: translateX(-3px);
    }
    89% {
        clip-path: inset(34% 0 42% 0);
        transform: translateX(3px);
    }
}


/* ============================================================
   OSW v0.4.7 — ROSTER GLITCH SPEED-UP
   Same readable intensity, much faster cadence.
   ============================================================ */

.glitch-title {
    animation: osw-roster-title-fast-jitter 1.8s steps(1,end) infinite;
}

.glitch-title::before {
    animation: osw-roster-glitch-fast-a 1.8s steps(1,end) infinite;
}

.glitch-title::after {
    animation: osw-roster-glitch-fast-b 1.8s steps(1,end) infinite;
}

@keyframes osw-roster-title-fast-jitter {
    0%, 58%, 61%, 65%, 69%, 73%, 78%, 100% { transform: translate(0); }
    59% { transform: translate(-2px, 0); }
    60% { transform: translate(2px, 0); }
    63% { transform: translate(1px, -1px); }
    64% { transform: translate(-1px, 1px); }
    67% { transform: translate(-2px, 0); }
    68% { transform: translate(2px, 0); }
    71% { transform: translate(1px, 0); }
    72% { transform: translate(-1px, 0); }
    75% { transform: translate(-2px, 1px); }
    76% { transform: translate(2px, -1px); }
}

@keyframes osw-roster-glitch-fast-a {
    0%, 56%, 60%, 64%, 68%, 72%, 77%, 100% {
        clip-path: inset(10% 0 66% 0);
        transform: translateX(-4px);
    }
    57% {
        clip-path: inset(25% 0 52% 0);
        transform: translateX(4px);
    }
    59% {
        clip-path: inset(52% 0 24% 0);
        transform: translateX(-2px);
    }
    62% {
        clip-path: inset(5% 0 78% 0);
        transform: translateX(3px);
    }
    66% {
        clip-path: inset(68% 0 8% 0);
        transform: translateX(-3px);
    }
    70% {
        clip-path: inset(38% 0 40% 0);
        transform: translateX(4px);
    }
    74% {
        clip-path: inset(14% 0 71% 0);
        transform: translateX(-4px);
    }
}

@keyframes osw-roster-glitch-fast-b {
    0%, 55%, 59%, 63%, 67%, 71%, 76%, 100% {
        clip-path: inset(66% 0 9% 0);
        transform: translateX(4px);
    }
    56% {
        clip-path: inset(46% 0 30% 0);
        transform: translateX(-4px);
    }
    58% {
        clip-path: inset(18% 0 59% 0);
        transform: translateX(2px);
    }
    61% {
        clip-path: inset(74% 0 6% 0);
        transform: translateX(-3px);
    }
    65% {
        clip-path: inset(34% 0 42% 0);
        transform: translateX(3px);
    }
    69% {
        clip-path: inset(8% 0 76% 0);
        transform: translateX(-4px);
    }
    73% {
        clip-path: inset(58% 0 20% 0);
        transform: translateX(4px);
    }
}


/* v1.4.12 — persistent direct return to roster.
   This deliberately uses a normal /luchadors link rather than browser history,
   so moving between profiles never depends on the previous document state. */
.osw-comic-profile .roster-back {
    position: fixed !important;
    top: 22px !important;
    left: 22px !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 1000 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 15px 9px;
    border: 3px solid #000;
    background: var(--cyan);
    color: #000 !important;
    box-shadow: 5px 5px 0 var(--pink), 8px 8px 0 #000;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transform: rotate(-1deg);
    transition: transform .16s ease, box-shadow .16s ease;
}

.osw-comic-profile .roster-back:hover,
.osw-comic-profile .roster-back:focus-visible {
    transform: translateY(-3px) rotate(0deg);
    box-shadow: 7px 8px 0 var(--pink), 10px 11px 0 #000;
}

.osw-comic-profile .roster-back:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

@media (max-width: 620px) {
    .osw-comic-profile .roster-back {
        top: auto !important;
        bottom: 16px !important;
        left: 14px !important;
        min-height: 40px;
        padding: 9px 12px 8px;
        font-size: 11px;
        box-shadow: 4px 4px 0 var(--pink), 7px 7px 0 #000;
    }
}

@media (prefers-reduced-motion: reduce) {
    .osw-comic-profile .roster-back {
        transition: none;
    }
}
