/* ==========================================================================
   MANGA & COMIC BOOK 3D PROFILE SLIDESHOW
   KVGIONS & SGCON BATCH OF 2022-2026 NURSING CHRONICLES
   Theme: Authentic Manga Ink, Halftone Screentone Dots, Comic Panels
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. COVER PAGE ANIMATED PLAY BUTTON (Image 1 Marker Placement)
   -------------------------------------------------------------------------- */
.manga-play-trigger-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(22px, 2.6cqw, 38px);
    height: clamp(22px, 2.6cqw, 38px);
    min-width: 22px;
    min-height: 22px;
    background: radial-gradient(circle at 35% 35%, #2a3c2e 0%, #152219 70%, #0a110d 100%);
    border: 2px solid #d4b475;
    border-radius: 50%;
    cursor: pointer;
    outline: none;
    box-shadow: 0 0 14px rgba(212, 180, 117, 0.45), 0 3px 8px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    z-index: 1000;
    flex-shrink: 0;
    margin-left: 8px;
    pointer-events: auto !important;
}

.manga-play-trigger-btn:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 0 22px rgba(212, 180, 117, 0.85), 0 0 35px rgba(255, 215, 0, 0.5);
}

/* Hide Play Slideshow button on mobile and tablet displays (Only available on PC / Desktop) */
@media (max-width: 1024px), (hover: none), (pointer: coarse) {
    .manga-play-trigger-btn,
    #mangaPlayTriggerBtn {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        opacity: 0 !important;
    }
}

.manga-play-trigger-btn:active {
    transform: scale(0.95);
}

/* Concentric Animated Rings */
.manga-btn-radar-glow {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 180, 117, 0.35) 0%, transparent 70%);
    animation: mangaRadarPulse 2.2s ease-out infinite;
    pointer-events: none;
}

.manga-btn-dashed-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px dashed rgba(212, 180, 117, 0.8);
    animation: mangaSpinRing 9s linear infinite;
    pointer-events: none;
}

.manga-btn-solid-ring {
    position: absolute;
    inset: 1.5px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.manga-btn-play-icon {
    width: clamp(10px, 1.2cqw, 16px);
    height: clamp(10px, 1.2cqw, 16px);
    color: #fcebb6;
    transform: translateX(1px);
    filter: drop-shadow(0 0 4px rgba(212, 180, 117, 0.9));
    transition: transform 0.2s ease, color 0.2s ease;
}

.manga-play-trigger-btn:hover .manga-btn-play-icon {
    color: #ffffff;
    transform: translateX(2px) scale(1.1);
}

/* Tooltip Badge */
.manga-btn-badge-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    border: 1px solid #d4b475;
    color: #fcebb6;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.manga-play-trigger-btn:hover .manga-btn-badge-label {
    opacity: 1;
    transform: translateX(-50%) translateY(2px);
}

@keyframes mangaRadarPulse {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

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

/* --------------------------------------------------------------------------
   2. FULL-SCREEN MANGA / COMIC THEATER MODAL
   -------------------------------------------------------------------------- */
#mangaShowcaseModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: #0d0e12 !important;
    z-index: 999999999 !important;
    display: none;
    opacity: 0;
    overflow: hidden;
    color: #f5f4ef;
    user-select: none;
    transition: opacity 0.4s ease;
    font-family: 'Inter', sans-serif;
    pointer-events: none;
}

#mangaShowcaseModal.active,
#mangaShowcaseModal.open {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* --------------------------------------------------------------------------
   2.1 ANIME SUNRISE-TO-NIGHT PARALLAX LANDSCAPE (Behind Halftone Dotted Layer)
   -------------------------------------------------------------------------- */
.manga-anime-landscape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
    opacity: 0.82;
    transition: opacity 0.5s ease;
}

/* Dynamic Sky Gradient (Controlled via CSS Custom Properties / GSAP) */
.manga-sky-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--anime-sky-top, #1c1032) 0%, var(--anime-sky-mid, #8338ec) 45%, var(--anime-sky-bottom, #fb5607) 100%);
    transition: background 1.4s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: background;
}

/* Twinkling Stars & Shooting Stars Canvas */
.manga-stars-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: var(--anime-stars-opacity, 0);
    transition: opacity 1.4s ease;
    z-index: 1;
}

/* Celestial Container (Sun & Moon) */
.manga-celestial-container {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    will-change: transform;
}

/* Radiant Anime Sun (Sunrise & Daytime) */
.manga-sun-orb {
    position: absolute;
    left: var(--anime-sun-x, 28%);
    top: var(--anime-sun-y, 58%);
    width: clamp(100px, 14vw, 190px);
    height: clamp(100px, 14vw, 190px);
    transform: translate(-50%, -50%) scale(var(--anime-sun-scale, 1.25));
    opacity: var(--anime-sun-opacity, 1);
    transition: top 1.6s cubic-bezier(0.22, 1, 0.36, 1), 
                left 1.6s cubic-bezier(0.22, 1, 0.36, 1), 
                opacity 1.6s ease, 
                transform 1.6s ease;
    pointer-events: none;
}

.manga-sun-core {
    position: absolute;
    inset: 15%;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 15%, #ffea79 60%, var(--anime-sun-core-color, #ffbe0b) 100%);
    box-shadow: 0 0 35px var(--anime-sun-glow, rgba(251, 86, 7, 0.9)), 0 0 75px rgba(255, 190, 11, 0.6);
}

.manga-sun-corona {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 200, 100, 0.45) 0%, rgba(255, 100, 50, 0.15) 55%, transparent 75%);
    animation: mangaSunPulse 4s ease-in-out infinite alternate;
}

@keyframes mangaSunPulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    100% { transform: scale(1.15); opacity: 1; }
}

/* Luminous Crescent Moon (Sunset & Night) */
.manga-moon-orb {
    position: absolute;
    right: 22%;
    top: var(--anime-moon-y, 40%);
    width: clamp(65px, 8vw, 110px);
    height: clamp(65px, 8vw, 110px);
    opacity: var(--anime-moon-opacity, 0);
    transition: opacity 1.6s ease, top 1.6s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.manga-moon-crescent {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: clamp(10px, 1.6vw, 22px) clamp(8px, 1.2vw, 16px) 0 0 #fdfcf7, 0 0 25px rgba(253, 252, 247, 0.7);
    transform: rotate(-25deg);
}

/* Flocking Anime Birds with Realistic Wing-Flapping Flight */
.manga-birds-layer {
    position: absolute;
    top: 15%;
    left: 0;
    width: 100%;
    height: 40%;
    opacity: var(--anime-birds-opacity, 0.9);
    transition: opacity 1.4s ease;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.manga-bird-wrapper {
    position: absolute;
    left: -160px;
    opacity: 0;
    animation: mangaBirdFlight var(--flight-duration, 24s) linear infinite;
    animation-fill-mode: both;
    will-change: transform, opacity;
}

.manga-flapping-bird {
    width: clamp(28px, 3.5vw, 42px);
    height: auto;
    overflow: visible;
    fill: var(--anime-bird-color, rgba(45, 20, 55, 0.85));
    transition: fill 1.4s ease;
    animation: mangaBirdBob 0.6s ease-in-out infinite alternate;
}

.manga-bird-body {
    fill: var(--anime-bird-color, rgba(45, 20, 55, 0.85));
}

.manga-bird-wing {
    fill: var(--anime-bird-color, rgba(45, 20, 55, 0.85));
    transform-box: fill-box;
}

.manga-wing-l {
    transform-origin: right bottom;
    animation: mangaFlapLeft 0.28s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

.manga-wing-r {
    transform-origin: left bottom;
    animation: mangaFlapRight 0.28s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

@keyframes mangaFlapLeft {
    0% { transform: rotate(-35deg) scaleY(0.7); }
    100% { transform: rotate(38deg) scaleY(1.1); }
}

@keyframes mangaFlapRight {
    0% { transform: rotate(35deg) scaleY(0.7); }
    100% { transform: rotate(-38deg) scaleY(1.1); }
}

@keyframes mangaBirdBob {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

@keyframes mangaBirdFlight {
    0% {
        transform: translateX(0) translateY(0) scale(var(--bird-scale, 1));
        opacity: 0;
    }
    4% {
        opacity: 1;
    }
    40% {
        transform: translateX(calc(45vw + 80px)) translateY(-22px) scale(var(--bird-scale, 1));
    }
    80% {
        transform: translateX(calc(90vw + 140px)) translateY(6px) scale(var(--bird-scale, 1));
    }
    96% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 320px)) translateY(-8px) scale(var(--bird-scale, 1));
        opacity: 0;
    }
}

/* Japanese Pine Trees Gentle Wind-Sway */
/* Japanese Pine Trees: Rooted trunks remain solid and grounded while only canopy sways */
.manga-tree-trunk {
    pointer-events: none;
}

.manga-pine-canopy {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: mangaCanopySway 4.2s ease-in-out infinite alternate;
    will-change: transform;
}

.manga-pine-tree:nth-child(2) .manga-pine-canopy {
    animation-duration: 5.1s;
    animation-delay: -1.4s;
}

.manga-pine-tree:nth-child(3) .manga-pine-canopy {
    animation-duration: 3.7s;
    animation-delay: -2.2s;
}

.manga-pine-tree:nth-child(4) .manga-pine-canopy {
    animation-duration: 4.8s;
    animation-delay: -0.7s;
}

.manga-pine-tree:nth-child(5) .manga-pine-canopy {
    animation-duration: 5.4s;
    animation-delay: -1.9s;
}

.manga-pine-tree:nth-child(6) .manga-pine-canopy {
    animation-duration: 3.9s;
    animation-delay: -3.1s;
}

.manga-pine-tree:nth-child(7) .manga-pine-canopy {
    animation-duration: 4.5s;
    animation-delay: -0.5s;
}

@keyframes mangaCanopySway {
    0% { transform: rotate(-2.4deg); }
    50% { transform: rotate(0.8deg); }
    100% { transform: rotate(2.8deg); }
}

/* Parallax Mountain & Forest Layers */
.manga-mountain-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    will-change: transform;
}

.manga-mountain-distant {
    height: 48vh;
    max-height: 500px;
    z-index: 4;
    opacity: 0.88;
}

.manga-mountain-mid {
    height: 38vh;
    max-height: 420px;
    z-index: 6;
    opacity: 0.93;
}

.manga-mountain-fore {
    height: 28vh;
    max-height: 320px;
    z-index: 8;
    opacity: 0.97;
}

.manga-mountain-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Valley Mist Layers */
.manga-valley-mist {
    position: absolute;
    bottom: 12vh;
    left: -20%;
    width: 140%;
    height: 18vh;
    background: radial-gradient(ellipse at 50% 60%, var(--anime-mist-color, rgba(255, 180, 140, 0.38)) 0%, transparent 75%);
    pointer-events: none;
    animation: mangaMistDrift 18s ease-in-out infinite alternate;
    transition: background 1.4s ease;
}

.manga-mist-1 {
    z-index: 5;
    bottom: 20vh;
}

.manga-mist-2 {
    z-index: 7;
    bottom: 9vh;
    animation-duration: 13s;
}

@keyframes mangaMistDrift {
    0% { transform: translateX(-40px); opacity: 0.5; }
    100% { transform: translateX(40px); opacity: 0.85; }
}

/* Authentic Manga Halftone Screentone Dotted Backdrop */
.manga-halftone-backdrop {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.09) 1.5px, transparent 1.5px),
        radial-gradient(circle, rgba(0, 0, 0, 0.4) 1.5px, transparent 1.5px);
    background-size: 14px 14px;
    background-position: 0 0, 7px 7px;
    opacity: 0.78;
    pointer-events: none;
    z-index: 1;
}

/* Manga Inked Speedlines Canvas */
#mangaSpeedlinesCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.4;
    mix-blend-mode: screen;
}

/* Floating Manga Kanji SFX Watermarks */
.manga-floating-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

.manga-kanji-glyph {
    position: absolute;
    font-family: 'Dela Gothic One', sans-serif;
    color: rgba(255, 255, 255, 0.035);
    font-size: clamp(8rem, 20vw, 24rem);
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    transform-style: preserve-3d;
}

/* --------------------------------------------------------------------------
   3. MANGA INITIAL "PLAY" INITIATION OVERLAY
   -------------------------------------------------------------------------- */
#mangaIntroScreen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    background: radial-gradient(circle at center, rgba(22, 24, 32, 0.94) 0%, rgba(13, 14, 18, 0.99) 85%);
    backdrop-filter: blur(8px);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#mangaIntroScreen.hidden {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.manga-intro-header {
    text-align: center;
    margin-bottom: 30px;
}

.manga-intro-batch-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.75rem, 1.4vw, 0.92rem);
    color: #d4b475;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.manga-intro-main-title {
    font-family: 'Dela Gothic One', 'Syne', sans-serif;
    font-size: clamp(2.2rem, 5.5vw, 4.4rem);
    color: #ffffff;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.1;
    text-shadow: 4px 4px 0px #000, 0 0 25px rgba(212, 180, 117, 0.4);
}

.manga-intro-kanji-accent {
    color: #e63946;
    margin-left: 10px;
    font-family: 'Dela Gothic One', sans-serif;
}

/* Central Glowing PLAY Trigger */
.manga-central-play-btn {
    position: relative;
    width: 135px;
    height: 135px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #2a2015 0%, #151008 70%, #0a0805 100%);
    border: 3px solid #d4b475;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    box-shadow: 0 0 30px rgba(212, 180, 117, 0.5), 0 0 60px rgba(230, 57, 70, 0.3), inset 0 0 20px rgba(212, 180, 117, 0.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.manga-central-play-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 0 50px rgba(212, 180, 117, 0.85), 0 0 80px rgba(230, 57, 70, 0.5);
    border-color: #e63946;
}

.manga-central-play-btn:hover .manga-central-play-icon {
    color: #e63946;
    transform: translateX(4px) scale(1.12);
}

.manga-central-play-icon {
    width: 52px;
    height: 52px;
    color: #fcebb6;
    transform: translateX(3px);
    filter: drop-shadow(0 0 10px rgba(212, 180, 117, 0.9));
    transition: all 0.3s ease;
}

.manga-central-ring-outer {
    position: absolute;
    inset: -16px;
    border: 2px dashed rgba(212, 180, 117, 0.6);
    border-radius: 50%;
    animation: mangaSpinRing 14s linear infinite;
    pointer-events: none;
}

.manga-central-ring-inner {
    position: absolute;
    inset: -30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: mangaSpinRingRev 20s linear infinite;
    pointer-events: none;
}

.manga-central-ring-pulse {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 180, 117, 0.35) 0%, transparent 70%);
    animation: mangaRadarPulse 1.8s ease-out infinite;
    pointer-events: none;
}

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

.manga-intro-action-hint {
    margin-top: 30px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manga-intro-pulse-dot {
    width: 8px;
    height: 8px;
    background: #d4b475;
    border-radius: 50%;
    box-shadow: 0 0 8px #d4b475;
    animation: mangaDotBlink 1.2s infinite ease-in-out;
}

@keyframes mangaDotBlink {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* --------------------------------------------------------------------------
   4. 3D CAMERA VIEWPORT & AUTONOMOUS PARALLAX STAGE
   -------------------------------------------------------------------------- */
.manga-camera-viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    perspective: 1400px;
    perspective-origin: 50% 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 10;
}

.manga-parallax-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    will-change: transform;
}

/* --------------------------------------------------------------------------
   5. MANGA & COMIC BOOK INDIVIDUAL LAYOUTS
   -------------------------------------------------------------------------- */
.manga-card-wrapper {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 90vw;
    max-width: 1350px;
    height: 85vh;
    max-height: 820px;
    transform-style: preserve-3d;
}

/* Authentic High-Contrast Manga Inked Image Container with Anime Cel-Filter Reveal */
/* ==========================================================================
   AUTHENTIC MANGA INK SKETCH & SUMI-E DRY-BRUSH REVEAL ENGINE
   Base: Black & White Comic Line Art (Paper White, Pen Contours, Shadow Fills)
   Top: Realistic Color Photo Revealed by Textured Dry-Brush Mask Sweep
   ========================================================================== */
.manga-brush-reveal-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
}

/* Base Layer: Authentic Black & White Manga Ink Line Art */
.manga-ink-sketch-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 1;
    overflow: hidden;
}

.ink-base-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(240%) brightness(105%);
    display: block;
}

.ink-dodge-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: color-dodge;
    filter: grayscale(100%) invert(100%) blur(1.5px) contrast(260%);
    display: block;
}

.ink-shadow-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
    filter: grayscale(100%) contrast(420%) brightness(82%);
    opacity: 0.88;
    display: block;
}

.ink-paper-grain {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#000000 0.75px, transparent 0.75px);
    background-size: 4px 4px;
    opacity: 0.08;
    mix-blend-mode: multiply;
    pointer-events: none;
}

/* Over Layer: Realistic Color Photo Revealed by Dry-Brush Stroke Mask */
.brush-color-reveal-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    overflow: hidden;
    --mask-x: 100%;
    -webkit-mask-image: url('assets/images/dry_brush_mask.png');
    mask-image: url('assets/images/dry_brush_mask.png');
    -webkit-mask-size: 240% 100%;
    mask-size: 240% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: var(--mask-x) 0;
    mask-position: var(--mask-x) 0;
    will-change: mask-position, -webkit-mask-position;
    pointer-events: none;
}

.brush-color-reveal-layer.brush-revealed {
    -webkit-mask-position: 0% 0;
    mask-position: 0% 0;
}

.manga-inked-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(118%) saturate(110%) brightness(102%);
    transition: transform 0.4s ease;
    display: block;
}

/* Luminous Leading Edge Glow Following the Calligraphy Brush Tip */
.brush-stroke-glow-edge {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 45px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 215, 0, 0.45) 45%,
        rgba(255, 255, 255, 0.8) 75%,
        rgba(255, 255, 255, 0) 100%
    );
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    transform: translateX(-50%);
    filter: blur(4px);
    will-change: left, opacity;
}

/* Interactive Manga Brush Badge */
.manga-brush-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ca8a0e;
    background: rgba(12, 14, 20, 0.88);
    border: 1.5px solid #ca8a0e;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
}

.manga-brush-reveal-container:hover .manga-brush-badge {
    background: #ca8a0e;
    color: #000;
    transform: scale(1.04);
}

.manga-brush-badge .badge-icon {
    font-size: 0.85rem;
}

.manga-brush-badge.badge-revealed {
    border-color: rgba(202, 138, 14, 0.6);
    color: #f5f5f7;
}


/* Manga Name Typography Base (Auto-fit & overflow safety) */
.manga-hero-name {
    margin: 0 0 10px 0;
    padding: 0;
    line-height: 1.06;
    text-transform: uppercase;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

/* Manga Badge (Degree & Year) */
.manga-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #111;
    color: #fdfcf7;
    border: 2px solid #d4b475;
    padding: 5px 14px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.85rem, 1.15vw, 1.05rem);
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.85);
    margin-bottom: 10px;
}

/* Manga Dialogue Quote Balloon with Authentic Comic Tail */
.manga-dialogue-box {
    position: relative;
    background: #ffffff;
    color: #111111;
    padding: 12px 20px;
    border-radius: 6px;
    border: 3px solid #111;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.85);
    margin-top: 10px;
    max-width: 580px;
}

/* Comic Speech Bubble Tail pointing towards graduate photo */
.manga-dialogue-box::before,
.manga-dialogue-box::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    pointer-events: none;
}

/* Default (Layouts 0, 2, 3, 4, 5: Photo on left) -> Tail points left */
.manga-dialogue-box::before {
    left: -18px;
    top: 20px;
    border-width: 10px 18px 10px 0;
    border-color: transparent #111111 transparent transparent;
    z-index: 1;
}

.manga-dialogue-box::after {
    left: -13px;
    top: 21px;
    border-width: 9px 15px 9px 0;
    border-color: transparent #ffffff transparent transparent;
    z-index: 2;
}

/* Bio Layout (Layout 1: Photo on right) -> Tail points right */
.layout-manga-bio .manga-dialogue-box::before {
    left: auto;
    right: -18px;
    top: 20px;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #111111;
}

.layout-manga-bio .manga-dialogue-box::after {
    left: auto;
    right: -13px;
    top: 21px;
    border-width: 9px 0 9px 15px;
    border-color: transparent transparent transparent #ffffff;
}

.manga-dialogue-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.05rem, 1.55vw, 1.4rem);
    font-weight: 700;
    font-style: normal;
    line-height: 1.45;
    color: #111111;
    letter-spacing: -0.2px;
}

.manga-hometown-tag {
    margin-top: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #d4b475;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ==========================================================================
   STUDENT PROFILE DOSSIER HUD CARD (Sleek, Compact Archive Badge)
   ========================================================================== */
.manga-dossier-card {
    position: relative;
    margin-top: 8px;
    background: rgba(12, 14, 18, 0.88);
    border: 1.5px solid var(--mascot-border, #4a5d73);
    border-left: 3.5px solid var(--mascot-accent, #d4b475);
    border-radius: 4px;
    padding: 6px 12px;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.85), inset 0 0 12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    max-width: 480px;
    transition: border-color 0.8s ease, box-shadow 0.8s ease;
}

.dossier-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
    padding-bottom: 3px;
    margin-bottom: 5px;
}

.dossier-header-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.60rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--mascot-accent, #d4b475);
    text-transform: uppercase;
    transition: color 0.8s ease;
}

.dossier-header-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.56rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 1px;
}

.dossier-entries {
    display: flex;
    flex-direction: column;
    gap: 3.5px;
}

.dossier-entry {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.dossier-key {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.60rem;
    font-weight: 800;
    color: #111;
    background: var(--mascot-accent, #d4b475);
    padding: 1px 5px;
    border-radius: 2px;
    letter-spacing: 0.8px;
    flex-shrink: 0;
    text-transform: uppercase;
    transition: background 0.8s ease;
}

.dossier-val {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #f1f3f5;
    letter-spacing: 0.3px;
    word-break: break-word;
}

/* Collector's Tankobon Corner Tape on Photo Frame */
.manga-frame-tape {
    position: absolute;
    top: 10px;
    left: -22px;
    width: 90px;
    height: 22px;
    background: rgba(212, 180, 117, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: rotate(-38deg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    z-index: 10;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.manga-frame-tape::after {
    content: '// ARCHIVE';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 1px;
}

/* Manga SFX Japanese Sound Effect */
.manga-sfx-text {
    position: absolute;
    font-family: 'Dela Gothic One', sans-serif;
    color: rgba(230, 57, 70, 0.2);
    font-size: clamp(6rem, 15vw, 16rem);
    line-height: 1;
    pointer-events: none;
    z-index: -1;
    user-select: none;
}

/* ==========================================================================
   AUTHENTIC MANGA ANIME MASCOT HERO (ENLARGED + INTERACTIVE CLICK)
   No rectangular card in background - backdrop matches exact PNG cutout contours!
   ========================================================================== */
.manga-anime-mascot-wrapper {
    position: relative;
    width: clamp(280px, 28vw, 420px);
    height: clamp(235px, 25vw, 350px);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    perspective: 900px;
    z-index: 15;
    pointer-events: auto; /* Clickable interactive anime hero */
    cursor: pointer;
    user-select: none;
    overflow: visible;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.manga-anime-mascot-wrapper:hover {
    transform: scale(1.04) translateY(-4px);
}

.manga-anime-mascot-wrapper:active {
    transform: scale(0.96) translateY(2px);
}

/* Interactive Action Kanji SFX burst label */
.mascot-action-burst-badge {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Dela Gothic One', sans-serif;
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    color: #ffbe0b;
    -webkit-text-stroke: 1.5px #000;
    text-shadow: 3px 3px 0 #000, 0 0 15px rgba(255, 190, 11, 0.8);
    pointer-events: none;
    z-index: 50;
    white-space: nowrap;
}

/* Composite Cutout Group - Synchronized Idle Floating Animation */
.mascot-cutout-composite-group {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: animeMascotIdle 4.5s ease-in-out infinite alternate;
    transform-origin: bottom center;
    will-change: transform;
    overflow: visible;
}

/* Layer 1: Inked Black Shadow Silhouette (Elongated in Exact Shape of PNG Cutout) */
.mascot-cutout-shadow-img {
    position: absolute;
    bottom: 0;
    height: 100%;
    width: 100%;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: bottom center;
    transform: translate(16px, 12px) scale(1.04, 1.12);
    transform-origin: bottom center;
    filter: brightness(0) opacity(0.78);
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

/* Layer 2: Day/Night Harmonized Colored Silhouette Backdrop (Elongated in Exact Shape of PNG Cutout) */
.mascot-cutout-silhouette-shape {
    position: absolute;
    bottom: 0;
    height: 100%;
    width: 100%;
    -webkit-mask-image: var(--cutout-url);
    mask-image: var(--cutout-url);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: bottom center;
    mask-position: bottom center;
    background: linear-gradient(160deg, var(--mascot-accent, #5f82a3) 0%, var(--mascot-border, #3e5d79) 100%);
    transform: translate(8px, 6px) scale(1.02, 1.07);
    transform-origin: bottom center;
    opacity: 0.92;
    pointer-events: none;
    user-select: none;
    z-index: 2;
    transition: background 0.8s ease, transform 0.4s ease;
}

/* Subtle Comic Screentone Texture Inside Character Silhouette */
.mascot-cutout-screentone {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(0, 0, 0, 0.28) 1.5px, transparent 1.5px);
    background-size: 6px 6px;
    opacity: 0.65;
    pointer-events: none;
}

/* Procedural Elemental Aura & Energy VFX Canvas (Positioned behind PNG Cutout) */
.manga-hero-vfx-canvas {
    position: absolute;
    bottom: -15%;
    left: 50%;
    transform: translateX(-50%);
    width: 145%;
    height: 130%;
    pointer-events: none;
    z-index: 4;
    overflow: visible;
}

/* Layer 3: Foreground High-Contrast Anime Hero PNG Cutout */
.manga-anime-mascot-img {
    position: relative;
    height: 100%;
    width: 100%;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: bottom center;
    z-index: 5;
    filter: 
        contrast(112%) 
        saturate(108%) 
        drop-shadow(2px 2px 0px var(--mascot-border, #3e5d79))
        drop-shadow(6px 6px 0px rgba(0, 0, 0, 0.85));
    transition: filter 0.8s ease;
}

@keyframes animeMascotIdle {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-7px) rotate(1.2deg); }
}

/* ==========================================================================
   LAYOUT 1: SHONEN JUMP HERO SPLASH (Diagonal Manga Action Panel)
   ========================================================================== */
.layout-manga-splash {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    gap: 30px;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.layout-manga-splash .manga-panel-frame {
    position: relative;
    height: 75vh;
    max-height: 680px;
    border: 5px solid #ffffff;
    background: #111;
    box-shadow: 12px 12px 0px #000, 0 25px 60px rgba(0,0,0,0.9);
    transform: translateZ(35px) rotate(-1.5deg);
    overflow: hidden;
}

.layout-manga-splash .manga-screentone-corner {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(#111 2px, transparent 2px);
    background-size: 6px 6px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 5;
}

.layout-manga-splash .manga-text-col {
    position: relative;
    transform: translateZ(85px);
    z-index: 20;
}

.typo-manga-impact {
    font-family: 'Syne', 'Inter', sans-serif;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 2.5px 2.5px 0px #000, 4.5px 4.5px 0px #000, 0 0 24px rgba(230, 57, 70, 0.45);
}

/* ==========================================================================
   LAYOUT 2: MANGA CHARACTER BIO PAGE (Dotted Screentone Tankobon Page)
   ========================================================================== */
.layout-manga-bio {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: center;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.layout-manga-bio .manga-text-col {
    transform: translateZ(90px);
    z-index: 20;
}

.typo-manga-serif {
    font-family: 'Syne', 'Inter', sans-serif;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 2.5px 2.5px 0px #000, 4.5px 4.5px 0px #000, 0 0 24px rgba(212, 180, 117, 0.45);
}

.layout-manga-bio .manga-bio-panel {
    position: relative;
    height: 75vh;
    max-height: 660px;
    border: 4px solid #d4b475;
    background: #111;
    box-shadow: 10px 10px 0px #000, 0 20px 50px rgba(0,0,0,0.85);
    transform: translateZ(30px);
    overflow: hidden;
}

.layout-manga-bio .manga-bio-dots-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: #fff;
    color: #000;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border: 2px solid #000;
    z-index: 5;
}

/* ==========================================================================
   LAYOUT 3: KATANA SLICE COMIC PANEL (Action Scene Manga)
   ========================================================================== */
.layout-manga-slash {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.layout-manga-slash .manga-slash-panel {
    position: relative;
    height: 75vh;
    max-height: 680px;
    clip-path: polygon(7% 0%, 100% 0%, 93% 100%, 0% 100%);
    border: 4px solid #e63946;
    box-shadow: 12px 12px 0px #000;
    transform: translateZ(40px) rotate(-1deg);
    overflow: hidden;
    background: #111;
}

.layout-manga-slash .manga-text-col {
    padding-left: 24px;
    transform: translateZ(95px);
    z-index: 20;
}

.typo-manga-slash {
    font-family: 'Bebas Neue', 'Syne', sans-serif;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 2px;
    text-shadow: 2.5px 2.5px 0px #000, 4.5px 4.5px 0px #000, 0 0 24px rgba(230, 57, 70, 0.45);
}

/* ==========================================================================
   LAYOUT 4: COMIC BOOK COVER ART (Split Editorial - Zero Photo Obstruction)
   ========================================================================== */
.layout-manga-cover {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 35px;
    align-items: center;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.layout-manga-cover .manga-cover-poster-col {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 75vh;
    max-height: 680px;
    transform: translateZ(40px);
}

.layout-manga-cover .manga-top-header-strip {
    position: relative;
    background: #e63946;
    color: #fff;
    font-family: 'Dela Gothic One', sans-serif;
    font-size: clamp(0.72rem, 1.2vw, 0.95rem);
    padding: 5px 18px;
    border: 3px solid #000;
    box-shadow: 4px 4px 0px #000;
    text-transform: uppercase;
    white-space: nowrap;
    margin-bottom: 12px;
    transform: rotate(-1deg);
    z-index: 15;
}

.layout-manga-cover .manga-cover-photo-frame {
    position: relative;
    width: 100%;
    height: 100%;
    background: #111;
    border: 5px solid #ffffff;
    overflow: hidden;
    box-shadow: 12px 12px 0px #000, 0 25px 60px rgba(0,0,0,0.9);
}

.layout-manga-cover .manga-cover-corner-tag {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #d4b475;
    color: #111;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border: 2px solid #000;
    box-shadow: 3px 3px 0px #000;
    z-index: 10;
}

.layout-manga-cover .manga-cover-text-col {
    position: relative;
    transform: translateZ(90px);
    z-index: 20;
}

.typo-manga-cover-title {
    font-family: 'Syne', sans-serif;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.5px;
    line-height: 1.1;
    margin-bottom: 14px;
    text-shadow: 2.5px 2.5px 0px #000, 4.5px 4.5px 0px #000, 0 0 20px rgba(212, 180, 117, 0.4);
}

/* ==========================================================================
   LAYOUT 5: SUMI-E INK SPLASH (Traditional Brush Wash)
   ========================================================================== */
.layout-manga-sumie {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 35px;
    align-items: center;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.layout-manga-sumie .manga-sumie-frame {
    position: relative;
    height: 75vh;
    max-height: 680px;
    background: #0e0f14;
    border: 4px solid #d4b475;
    transform: translateZ(35px) rotate(1deg);
    overflow: hidden;
    box-shadow: 10px 10px 0px #000, 0 25px 55px rgba(0,0,0,0.85);
}

.layout-manga-sumie .manga-text-col {
    transform: translateZ(90px);
    z-index: 20;
}

.typo-manga-brush {
    font-family: 'Syne', 'Inter', sans-serif;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 2.5px 2.5px 0px #000, 4.5px 4.5px 0px #000, 0 0 24px rgba(212, 180, 117, 0.45);
}

/* ==========================================================================
   LAYOUT 6: COMIC STRIP EPISODE (Multi-panel Manga Grid)
   ========================================================================== */
.layout-manga-strip {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 35px;
    align-items: center;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.layout-manga-strip .manga-strip-primary {
    position: relative;
    height: 75vh;
    max-height: 660px;
    border: 4px solid #111;
    background: #fff;
    box-shadow: 10px 10px 0px #000;
    transform: translateZ(40px);
    overflow: hidden;
}

.layout-manga-strip .manga-text-col {
    transform: translateZ(90px);
    z-index: 20;
}

.typo-manga-bold {
    font-family: 'Syne', sans-serif;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 2.5px 2.5px 0px #000, 4.5px 4.5px 0px #000, 0 0 24px rgba(212, 180, 117, 0.4);
}

/* --------------------------------------------------------------------------
   6. ANIME TRANSITIONS OVERLAYS (Katana, Paper, Ink, Shatter)
   -------------------------------------------------------------------------- */
.manga-transition-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

/* Katana Blade Flash (Pure white & crimson laser line) */
#katanaSlashOverlay {
    position: absolute;
    top: 50%;
    left: -50%;
    width: 200%;
    height: 5px;
    background: #ffffff;
    box-shadow: 0 0 15px #fff, 0 0 35px #e63946;
    transform: translateY(-50%) rotate(-32deg) scaleX(0);
    transform-origin: left center;
    opacity: 0;
}

#paperSliceOverlay {
    position: absolute;
    inset: 0;
    background: #ffffff;
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    opacity: 0;
    mix-blend-mode: overlay;
}

#inkBurstOverlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: radial-gradient(circle at center, #000000 0%, transparent 75%);
    mix-blend-mode: multiply;
}

/* --------------------------------------------------------------------------
   7. HUD CONTROLS, PROGRESS BAR, AND EXIT (Manga Comic Style)
   -------------------------------------------------------------------------- */
.manga-hud-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 80;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px 32px;
}

.manga-hud-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    pointer-events: auto;
}

/* Back / Exit Button */
.manga-exit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #111111;
    border: 2px solid #d4b475;
    color: #fdfcf7;
    padding: 9px 18px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.8);
    transition: all 0.25s ease;
}

.manga-exit-btn:hover {
    background: #d4b475;
    color: #111;
    box-shadow: 6px 6px 0px #000;
    transform: translateY(-2px);
}

.manga-exit-btn svg {
    width: 16px;
    height: 16px;
}

.manga-hud-telemetry {
    display: flex;
    align-items: center;
    gap: 16px;
}

.manga-hud-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    font-weight: 700;
    color: #f5f4ef;
    background: #111;
    border: 1.5px solid #d4b475;
    padding: 5px 12px;
    letter-spacing: 1.5px;
    box-shadow: 3px 3px 0px #000;
}

.manga-sound-btn {
    background: #111;
    border: 1.5px solid #d4b475;
    color: #d4b475;
    padding: 7px 12px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 3px 3px 0px #000;
    transition: all 0.2s ease;
}

.manga-sound-btn:hover {
    background: #d4b475;
    color: #111;
}

/* Focus Mode Button */
.manga-focus-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #111;
    border: 1.5px solid #d4b475;
    color: #d4b475;
    padding: 7px 14px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 3px 3px 0px #000;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto !important;
    user-select: none;
}

.manga-focus-btn:hover {
    background: #d4b475;
    color: #111;
    transform: translateY(-1px);
    box-shadow: 5px 5px 0px #000;
}

.manga-focus-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.manga-focus-btn:hover svg {
    transform: scale(1.15) rotate(90deg);
}

/* Focus Mode: Hide all other chrome, buttons, and telemetry; keep ONLY focus toggle button */
#mangaShowcaseModal.focus-mode-active .manga-exit-btn,
#mangaShowcaseModal.focus-mode-active .manga-sound-btn,
#mangaShowcaseModal.focus-mode-active .manga-hud-badge,
#mangaShowcaseModal.focus-mode-active .manga-hud-bottom-bar,
#mangaShowcaseModal.focus-mode-active .manga-counter-display,
#mangaShowcaseModal.focus-mode-active .manga-ctrl-buttons,
#mangaShowcaseModal.focus-mode-active .manga-nav-btn {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    transform: translateY(14px) scale(0.95);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}

#mangaShowcaseModal.focus-mode-active .manga-exit-btn {
    transform: translateY(-14px) scale(0.95);
}

#mangaShowcaseModal.focus-mode-active .manga-hud-top-bar {
    justify-content: flex-end;
}

#mangaShowcaseModal.focus-mode-active .manga-focus-btn {
    background: rgba(230, 57, 70, 0.22) !important;
    border-color: #e63946 !important;
    color: #ff99a0 !important;
    box-shadow: 0 0 18px rgba(230, 57, 70, 0.6), 3px 3px 0px #000 !important;
    transform: scale(1.06);
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 10000 !important;
}

#mangaShowcaseModal.focus-mode-active .manga-focus-btn:hover {
    background: #e63946 !important;
    color: #ffffff !important;
}

/* Bottom Bar */
.manga-hud-bottom-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    pointer-events: auto;
}

/* Navigation Controls & Counter */
.manga-hud-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.manga-counter-display {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 1.15rem;
    color: #d4b475;
    letter-spacing: 2px;
    background: #111;
    padding: 4px 12px;
    border: 1.5px solid #d4b475;
    box-shadow: 3px 3px 0px #000;
}

.manga-ctrl-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.manga-nav-btn {
    background: #111;
    border: 1.5px solid #d4b475;
    color: #fdfcf7;
    width: 38px;
    height: 38px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 3px 3px 0px #000;
    transition: all 0.2s ease;
}

.manga-nav-btn:hover {
    background: #d4b475;
    color: #111;
    transform: scale(1.05);
}

.manga-nav-btn svg {
    width: 17px;
    height: 17px;
}

/* --------------------------------------------------------------------------
   8. MOBILE RESPONSIVE ADAPTATIONS
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .manga-hud-container {
        padding: 14px 16px;
    }
    
    .manga-hud-telemetry .manga-hud-badge {
        display: none;
    }
    
    .layout-manga-splash,
    .layout-manga-bio,
    .layout-manga-slash,
    .layout-manga-sumie,
    .layout-manga-strip {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .layout-manga-splash .manga-panel-frame,
    .layout-manga-bio .manga-bio-panel,
    .layout-manga-slash .manga-slash-panel,
    .layout-manga-sumie .manga-sumie-frame,
    .layout-manga-strip .manga-strip-primary {
        height: 48vh !important;
        max-height: 400px;
    }
    
    .layout-manga-cover .manga-center-panel {
        width: 72vw;
        height: 52vh;
    }
    
    .manga-dialogue-box {
        padding: 12px 14px;
        margin-top: 10px;
    }
    
    .manga-dialogue-text {
        font-size: 0.95rem;
    }
}

/* --------------------------------------------------------------------------
   9. FUN INTERACTIVE EASTER EGG ELEMENTS
   - Night: UFO Dogfight & Laser Battle
   - Night: Shooting Star Photo Shatter Explosion
   - Morning/Day: High-speed Wing-Flapping Bee/Butterfly Dogfight
   -------------------------------------------------------------------------- */
.manga-fun-events-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 55;
    overflow: hidden;
}

/* UFOs */
.manga-ufo {
    position: absolute;
    width: clamp(80px, 9vw, 120px);
    height: clamp(48px, 5.5vw, 70px);
    will-change: transform, opacity;
    z-index: 60;
    pointer-events: none;
    filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.7));
}

.manga-ufo-left {
    filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.7));
}

.manga-ufo-right {
    filter: drop-shadow(0 0 16px rgba(255, 0, 85, 0.7));
    transform: scaleX(-1);
}

.manga-ufo-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.ufo-light {
    animation: ufoLightBlink 0.3s ease-in-out infinite alternate;
}

@keyframes ufoLightBlink {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.ufo-shield-bubble {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid #00f0ff;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.35) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0.6);
    pointer-events: none;
    box-shadow: 0 0 25px #00f0ff;
    transition: opacity 0.15s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ufo-shield-bubble.active {
    opacity: 1;
    transform: scale(1.15);
}

/* UFO Lasers */
.manga-laser-bolt {
    position: absolute;
    height: 6px;
    width: 42px;
    border-radius: 3px;
    z-index: 65;
    pointer-events: none;
    will-change: transform;
}

.manga-laser-bolt.cyan {
    background: #ffffff;
    box-shadow: 0 0 10px #00f0ff, 0 0 22px #00f0ff, 0 0 38px #00f0ff;
}

.manga-laser-bolt.magenta {
    background: #ffffff;
    box-shadow: 0 0 10px #ff0055, 0 0 22px #ff0055, 0 0 38px #ff0055;
}

/* High-speed Wing-Flapping Bees */
.manga-bee-combatant {
    position: absolute;
    width: 48px;
    height: 42px;
    z-index: 60;
    pointer-events: none;
    will-change: transform;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.bee-wing-fast {
    transform-origin: 50% 100%;
    transform-box: fill-box;
    animation: beeWingFlutter 0.04s linear infinite alternate;
}

@keyframes beeWingFlutter {
    0% { transform: scaleY(1) rotate(-18deg); opacity: 0.95; }
    100% { transform: scaleY(-0.7) rotate(24deg); opacity: 0.35; }
}

/* Dynamic Shaky Comic SFX Letters & Symbols */
.manga-comic-sfx-burst {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 92;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: mangaComicBurstShaky 0.65s cubic-bezier(0.18, 0.9, 0.28, 1.25) forwards;
    will-change: transform, opacity;
}

.manga-comic-starburst-svg {
    position: absolute;
    width: clamp(110px, 15vw, 160px);
    height: clamp(110px, 15vw, 160px);
    pointer-events: none;
    z-index: 1;
    overflow: visible;
    filter: drop-shadow(0 0 16px currentColor) drop-shadow(3px 4px 0 #000);
}

.manga-comic-text {
    position: relative;
    z-index: 2;
    font-family: 'Dela Gothic One', 'Syne', sans-serif;
    font-size: clamp(2rem, 3.8vw, 3rem);
    white-space: nowrap;
    letter-spacing: 2px;
    -webkit-text-stroke: 2.8px #000;
    text-shadow: 4px 4px 0px #000, 0 0 25px currentColor;
}

/* Color Schemes for Comic Action Symbols */
.manga-comic-sfx-burst.sfx-yellow {
    color: #ffd166;
}
.manga-comic-sfx-burst.sfx-yellow polygon {
    fill: #ffd166;
    stroke: #000;
    stroke-width: 3;
}
.manga-comic-sfx-burst.sfx-yellow .manga-comic-text {
    color: #ffffff;
    text-shadow: 4px 4px 0 #000, 0 0 22px #ff9e00;
}

.manga-comic-sfx-burst.sfx-orange {
    color: #ff5400;
}
.manga-comic-sfx-burst.sfx-orange polygon {
    fill: #ff5400;
    stroke: #000;
    stroke-width: 3;
}
.manga-comic-sfx-burst.sfx-orange .manga-comic-text {
    color: #ffe600;
    text-shadow: 4px 4px 0 #000, 0 0 28px #ff0055;
}

.manga-comic-sfx-burst.sfx-cyan {
    color: #00f0ff;
}
.manga-comic-sfx-burst.sfx-cyan polygon {
    fill: #00f0ff;
    stroke: #000;
    stroke-width: 3;
}
.manga-comic-sfx-burst.sfx-cyan .manga-comic-text {
    color: #ffffff;
    text-shadow: 4px 4px 0 #000, 0 0 28px #00f0ff;
}

.manga-comic-sfx-burst.sfx-magenta {
    color: #ff0055;
}
.manga-comic-sfx-burst.sfx-magenta polygon {
    fill: #ff0055;
    stroke: #000;
    stroke-width: 3;
}
.manga-comic-sfx-burst.sfx-magenta .manga-comic-text {
    color: #ffffff;
    text-shadow: 4px 4px 0 #000, 0 0 28px #ff0055;
}

.manga-comic-sfx-burst.sfx-gold {
    color: #ffbe0b;
}
.manga-comic-sfx-burst.sfx-gold polygon {
    fill: #fb5607;
    stroke: #000;
    stroke-width: 3;
}
.manga-comic-sfx-burst.sfx-gold .manga-comic-text {
    color: #ffbe0b;
    text-shadow: 4px 4px 0 #000, 0 0 28px #fb5607;
}

@keyframes mangaComicBurstShaky {
    0% {
        transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
        opacity: 0;
    }
    18% {
        transform: translate(calc(-50% + 8px), calc(-50% - 6px)) scale(1.42) rotate(-8deg);
        opacity: 1;
    }
    32% {
        transform: translate(calc(-50% - 8px), calc(-50% + 8px)) scale(1.32) rotate(7deg);
        opacity: 1;
    }
    46% {
        transform: translate(calc(-50% + 7px), calc(-50% - 7px)) scale(1.36) rotate(-6deg);
        opacity: 1;
    }
    60% {
        transform: translate(calc(-50% - 6px), calc(-50% + 6px)) scale(1.26) rotate(5deg);
        opacity: 1;
    }
    75% {
        transform: translate(calc(-50% + 4px), calc(-50% - 4px)) scale(1.2) rotate(-4deg);
        opacity: 0.95;
    }
    100% {
        transform: translate(-50%, -80%) scale(1.45) rotate(6deg);
        opacity: 0;
    }
}

/* Falling Meteor & Photo Shatter with Grand Explosion & Smoke */
.manga-falling-meteor {
    position: absolute;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 85;
    will-change: transform;
}

.manga-meteor-head {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 25px #ffffff, 0 0 55px #ffd166, 0 0 95px #ff5400, 0 0 160px #ff0055;
}

.manga-meteor-tail {
    position: absolute;
    top: 50%;
    right: 50%;
    height: 16px;
    width: 320px;
    transform-origin: right center;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 40, 0, 0.4) 30%, rgba(255, 170, 0, 0.85) 75%, #ffffff 100%);
    border-radius: 8px;
    filter: blur(2px);
    pointer-events: none;
}

/* Explosion Flash */
.manga-explosion-flash {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 210, 80, 0.6) 40%, rgba(255, 50, 0, 0.25) 70%, transparent 100%);
    pointer-events: none;
    z-index: 92;
}

/* Explosion Fireball Core */
.manga-explosion-core {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 20%, #ffd166 45%, #ff5400 70%, #ff0055 90%, transparent 100%);
    box-shadow: 0 0 60px #ffd166, 0 0 130px #ff5400, 0 0 220px #ff0055;
    pointer-events: none;
    z-index: 90;
    will-change: transform, opacity;
}

/* Flying Explosion Spark Particles */
.manga-explosion-spark {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 12px #ffd166, 0 0 25px #ff5400;
    pointer-events: none;
    z-index: 91;
    will-change: transform, opacity;
}

/* Billowing Manga Smoke Clouds */
.manga-smoke-puff {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 88;
    will-change: transform, opacity;
    filter: drop-shadow(0 0 16px rgba(10, 10, 20, 0.75));
}

.manga-smoke-puff svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Impact Shockwave Ring */
.meteor-impact-burst {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 6px solid #ffffff;
    box-shadow: 0 0 45px #ffd166, 0 0 90px #ff0055, inset 0 0 35px #ffaa00;
    pointer-events: none;
    z-index: 91;
    will-change: transform, opacity;
}

/* Giant Japanese Manga Explosion Onomatopoeia */
.manga-giant-sfx-text {
    position: absolute;
    transform: translate(-50%, -50%);
    font-family: 'Dela Gothic One', 'Syne', sans-serif;
    font-size: clamp(2.8rem, 6.5vw, 5.4rem);
    color: #ffd166;
    -webkit-text-stroke: 3.5px #111;
    text-shadow: 6px 6px 0px #000, 0 0 45px #ff0055, 0 0 85px #ff5400;
    letter-spacing: 3px;
    pointer-events: none;
    z-index: 95;
    white-space: nowrap;
    will-change: transform, opacity;
    animation: mangaGiantSfxShake 0.9s cubic-bezier(0.18, 0.9, 0.28, 1.25) forwards;
}

@keyframes mangaGiantSfxShake {
    0% {
        transform: translate(-50%, -50%) scale(0.2) rotate(-8deg);
        opacity: 0;
    }
    15% {
        transform: translate(calc(-50% + 12px), calc(-50% - 9px)) scale(1.45) rotate(7deg);
        opacity: 1;
    }
    28% {
        transform: translate(calc(-50% - 11px), calc(-50% + 10px)) scale(1.36) rotate(-6deg);
        opacity: 1;
    }
    42% {
        transform: translate(calc(-50% + 9px), calc(-50% - 8px)) scale(1.4) rotate(5deg);
        opacity: 1;
    }
    56% {
        transform: translate(calc(-50% - 8px), calc(-50% + 7px)) scale(1.32) rotate(-4deg);
        opacity: 1;
    }
    70% {
        transform: translate(calc(-50% + 5px), calc(-50% - 5px)) scale(1.25) rotate(3deg);
        opacity: 0.95;
    }
    100% {
        transform: translate(-50%, -85%) scale(1.6) rotate(6deg);
        opacity: 0;
    }
}

/* 3D Photo Shatter Container & Polygonal Glass Shards */
.manga-photo-shatter-container {
    position: absolute;
    pointer-events: none;
    z-index: 75;
    transform-style: preserve-3d;
    perspective: 1200px;
    overflow: visible;
}

.manga-glass-shard {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.95)) contrast(125%);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* ==========================================================================
   STORY-DRIVEN MANGA CHAPTER TRANSITIONS & TANKOBON EPISODE INTERLUDES
   Replaces plain sliding with an episodic narrative progression
   ========================================================================== */
.manga-chapter-curtain-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 60;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    overflow: hidden;
}

/* Chapter Card Box */
.chapter-card-box {
    position: relative;
    background: radial-gradient(circle at center, #181b24 0%, #0d0e14 90%);
    border: 3px solid #d4b475;
    box-shadow: 12px 12px 0px #000, 0 0 60px rgba(212, 180, 117, 0.35);
    padding: 30px 48px;
    text-align: center;
    max-width: 580px;
    width: 88vw;
    border-radius: 4px;
    transform: scale(0.85);
    opacity: 0;
    z-index: 65;
}

.chapter-card-kanji {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    color: #e63946;
    letter-spacing: 4px;
    margin-bottom: 6px;
    text-shadow: 3px 3px 0 #000, 0 0 25px rgba(230, 57, 70, 0.5);
    line-height: 1;
}

.chapter-card-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.78rem, 1.3vw, 0.95rem);
    color: #d4b475;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 800;
    display: block;
    margin-bottom: 8px;
}

.chapter-card-stripe {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4b475 30%, #e63946 50%, #d4b475 70%, transparent);
    margin: 12px 0;
}

.chapter-card-name {
    font-family: 'Dela Gothic One', 'Syne', sans-serif;
    font-size: clamp(1.4rem, 2.8vw, 2.2rem);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    line-height: 1.15;
    text-shadow: 3px 3px 0 #000;
}

.chapter-card-arc {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.7rem, 1.1vw, 0.82rem);
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 10px;
    display: block;
}

/* Sumi-e Calligraphy Brush Stroke Slash */
.sumi-brush-slash {
    position: absolute;
    top: 50%;
    left: -20%;
    width: 140%;
    height: 220px;
    background: radial-gradient(ellipse at center, rgba(10, 12, 18, 0.96) 0%, rgba(5, 6, 10, 0.98) 75%, transparent 100%);
    transform: translateY(-50%) rotate(-14deg) scaleY(0);
    pointer-events: none;
    z-index: 62;
}

/* Tankobon 3D Page Turn Curl Overlay */
.manga-page-curl-sweep {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(20, 22, 28, 0.92) 40%,
        #f5f0e6 48%,
        #e2d7c5 50%,
        rgba(15, 17, 22, 0.95) 52%,
        rgba(0, 0, 0, 0.9) 100%
    );
    transform: translateX(-100%);
    z-index: 63;
    pointer-events: none;
}

