/* ==================================================
   G403 ANTIGBOY — PROJECT ABADDON // LEAKED FILES
   Retro 2000s classified aesthetic
==================================================
   [11.09.1998 | 13:26] Hostility Protocol Trial:
   Escape footage of G304 presented. Heart rate
   increased by 34 percent. Telekinetic pressure
   spike recorded. Subject verbalized quietly:
   "He ran." Linguistic pattern not part of
   programmed response tree.
   — Dr. Elias Varen
================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&family=Inter:wght@300;400;500;700&display=swap');

:root {
    --bg: #0a0a0a;
    --bg2: #111;
    --bg3: #181818;
    --surface: #0e0e0e;
    --border: #222;
    --border-light: #333;
    --blood: #8b0000;
    --blood2: #b30000;
    --blood3: #ff1a1a;
    --text: #999;
    --text2: #ccc;
    --text3: #fff;
    --dim: #444;
    --dim2: #2a2a2a;
    --green: #33cc33;
    --amber: #cc9900;
    --cyan: #009999;

    --f-head: 'Bebas Neue', 'Impact', 'Arial Narrow', sans-serif;
    --f-body: 'Inter', -apple-system, sans-serif;
    --f-mono: 'JetBrains Mono', 'Consolas', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 15px; }

body {
    font-family: var(--f-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

::selection { background: var(--blood); color: #fff; }
a { color: var(--blood2); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--blood3); }
img { display: block; max-width: 100%; }

/* Utility */
.mono { font-family: var(--f-mono); }
.red { color: var(--blood2); }
.green { color: var(--green); }
.dim { color: var(--dim); }
.amber { color: var(--amber); }

/* ==================================================
   SCANLINES + CRT
================================================== */
.scanlines {
    position: fixed; inset: 0; pointer-events: none; z-index: 9999;
    background: repeating-linear-gradient(
        0deg, transparent 0px, transparent 1px,
        rgba(0,0,0,0.05) 1px, rgba(0,0,0,0.05) 2px
    );
}

/* ==================================================
   MARQUEE BAR (top)
================================================== */
.marquee-bar {
    background: var(--blood);
    color: #fff;
    font-family: var(--f-mono);
    font-size: 0.7rem;
    letter-spacing: 2px;
    padding: 4px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 1001;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 25s linear infinite;
}

.marquee-inner {
    flex-shrink: 0;
    white-space: nowrap;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==================================================
   NAVIGATION
================================================== */
.nav {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    font-family: var(--f-head);
    font-size: 1.8rem;
    color: var(--blood2);
    letter-spacing: 4px;
    line-height: 1;
}

.nav-brand span { color: var(--dim); font-size: 0.6em; }

.nav-links { display: flex; gap: 0; }

.nav-links a {
    font-family: var(--f-mono);
    font-size: 0.75rem;
    color: var(--dim);
    letter-spacing: 1px;
    padding: 16px 16px;
    border-left: 1px solid var(--border);
    transition: all 0.15s;
    text-transform: uppercase;
}

.nav-links a:hover { color: var(--text2); background: rgba(255,255,255,0.02); }
.nav-links a.active { color: var(--blood2); background: rgba(139,0,0,0.08); }

.nav-links a:last-child { border-right: 1px solid var(--border); }

.nav-social {
    display: flex; gap: 12px; align-items: center;
}
.nav-social a { color: var(--dim); font-size: 0.9rem; }
.nav-social a:hover { color: var(--text2); }

/* ==================================================
   HERO SECTION — SMART STUDIO SLIDESHOW
================================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: #050505;
}

/* Slideshow container */
.hero-slideshow {
    position: absolute;
    inset: 0;
}

/* Each scene (solo or triple) */
.hero-scene {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    will-change: opacity, transform;
}
.hero-scene.active { opacity: 1; z-index: 1; }

/* === SOLO MODE — full screen cover === */
.hero-scene.mode-solo {
    align-items: stretch;
    justify-content: stretch;
}
.hero-scene.mode-solo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.85) contrast(1.05);
}

/* === TRIPLE MODE — 3 images side by side === */
.hero-scene.mode-triple {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 2vh 3vw;
}
.hero-scene.mode-triple img {
    flex: 1;
    max-width: calc(33.333% - 4px);
    height: 80vh;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.85) contrast(1.05);
    border: 1px solid rgba(139,0,0,0.15);
}

/* === DUO MODE — 2 images side by side === */
.hero-scene.mode-duo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 2vh 8vw;
}
.hero-scene.mode-duo img {
    flex: 1;
    max-width: calc(50% - 4px);
    height: 80vh;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.85) contrast(1.05);
    border: 1px solid rgba(139,0,0,0.15);
}

/* ========================================
   SCENE-LEVEL ENTRANCE ANIMATIONS
======================================== */

/* 1. Glitch */
@keyframes sceneGlitchIn {
    0%   { opacity: 0; transform: translate(0,0); }
    8%   { opacity: 1; transform: translate(-10px, 4px); filter: hue-rotate(90deg) brightness(2); }
    16%  { transform: translate(8px, -3px); filter: hue-rotate(-60deg) brightness(0.5); }
    25%  { transform: translate(-4px, 6px); filter: hue-rotate(180deg) brightness(1.5); }
    40%  { transform: translate(3px, -2px); clip-path: inset(15% 0 35% 0); filter: none; }
    55%  { transform: translate(0,0); clip-path: inset(0 0 0 0); }
    100% { opacity: 1; transform: translate(0,0); filter: none; clip-path: inset(0 0 0 0); }
}
.hero-scene.scene-glitch { animation: sceneGlitchIn 0.9s cubic-bezier(.23,1,.32,1) forwards; }

/* 2. Zoom from void */
@keyframes sceneZoomIn {
    0%   { opacity: 0; transform: scale(2.5) rotate(1.5deg); filter: blur(25px) brightness(0); }
    50%  { opacity: 0.8; filter: blur(4px) brightness(0.7); }
    100% { opacity: 1; transform: scale(1) rotate(0); filter: none; }
}
.hero-scene.scene-zoom { animation: sceneZoomIn 1.2s cubic-bezier(.16,1,.3,1) forwards; }

/* 3. Chromatic aberration */
@keyframes sceneChromaIn {
    0%   { opacity: 0; transform: translateX(-40px); }
    12%  { opacity: 1; filter: drop-shadow(-5px 0 0 rgba(255,0,0,0.8)) drop-shadow(5px 0 0 rgba(0,255,255,0.8)) brightness(1.4); }
    45%  { filter: drop-shadow(-2px 0 0 rgba(255,0,0,0.3)) drop-shadow(2px 0 0 rgba(0,255,255,0.3)); transform: translateX(3px); }
    100% { opacity: 1; transform: translateX(0); filter: none; }
}
.hero-scene.scene-chroma { animation: sceneChromaIn 1s ease-out forwards; }

/* 4. Dissolve / burn in */
@keyframes sceneDissolveIn {
    0%   { opacity: 0; filter: brightness(4) contrast(0) saturate(0); transform: scale(1.08); }
    35%  { opacity: 0.6; filter: brightness(1.6) contrast(0.6) saturate(0.4); }
    100% { opacity: 1; filter: none; transform: scale(1); }
}
.hero-scene.scene-dissolve { animation: sceneDissolveIn 1.4s ease-out forwards; }

/* 5. Slide up bounce */
@keyframes sceneSlideUp {
    0%   { opacity: 0; transform: translateY(100vh) scale(0.85); }
    55%  { opacity: 1; transform: translateY(-15px) scale(1.01); }
    75%  { transform: translateY(6px) scale(0.995); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-scene.scene-slideup { animation: sceneSlideUp 1s cubic-bezier(.34,1.56,.64,1) forwards; }

/* 6. Scan reveal (top → bottom) */
@keyframes sceneScanIn {
    0%   { opacity: 0; clip-path: inset(0 0 100% 0); filter: brightness(2.5); }
    40%  { opacity: 1; clip-path: inset(0 0 50% 0); }
    100% { opacity: 1; clip-path: inset(0 0 0 0); filter: none; }
}
.hero-scene.scene-scan { animation: sceneScanIn 1.1s ease-out forwards; }

/* 7. Shutter (left → right) */
@keyframes sceneShutterIn {
    0%   { opacity: 0; clip-path: inset(0 100% 0 0); }
    40%  { opacity: 1; clip-path: inset(0 50% 0 0); filter: brightness(1.3); }
    100% { opacity: 1; clip-path: inset(0 0 0 0); filter: none; }
}
.hero-scene.scene-shutter { animation: sceneShutterIn 1s ease-out forwards; }

/* 8. Rotate in */
@keyframes sceneRotateIn {
    0%   { opacity: 0; transform: perspective(1200px) rotateY(90deg) scale(0.7); }
    50%  { opacity: 0.8; transform: perspective(1200px) rotateY(-8deg) scale(1.02); }
    100% { opacity: 1; transform: perspective(1200px) rotateY(0) scale(1); }
}
.hero-scene.scene-rotate { animation: sceneRotateIn 1.1s cubic-bezier(.16,1,.3,1) forwards; }

/* ========================================
   TRIPLE/DUO — STAGGERED image entrances
======================================== */

/* Stagger: each child image animates in with delay */
@keyframes imgStaggerLeft {
    0%   { opacity: 0; transform: translateX(-80px) scale(0.9); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes imgStaggerRight {
    0%   { opacity: 0; transform: translateX(80px) scale(0.9); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes imgStaggerUp {
    0%   { opacity: 0; transform: translateY(60px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes imgStaggerFlip {
    0%   { opacity: 0; transform: perspective(800px) rotateY(-90deg); }
    100% { opacity: 1; transform: perspective(800px) rotateY(0); }
}
@keyframes imgStaggerDrop {
    0%   { opacity: 0; transform: translateY(-100vh) rotate(5deg); }
    60%  { opacity: 1; transform: translateY(10px) rotate(-1deg); }
    100% { opacity: 1; transform: translateY(0) rotate(0); }
}

/* Stagger sets applied via JS data-stagger attribute */
.hero-scene[data-stagger="spread"] img:nth-child(1) { animation: imgStaggerLeft 0.7s ease-out 0.1s both; }
.hero-scene[data-stagger="spread"] img:nth-child(2) { animation: imgStaggerUp 0.7s ease-out 0.3s both; }
.hero-scene[data-stagger="spread"] img:nth-child(3) { animation: imgStaggerRight 0.7s ease-out 0.5s both; }

.hero-scene[data-stagger="flip"] img:nth-child(1) { animation: imgStaggerFlip 0.8s ease-out 0.0s both; }
.hero-scene[data-stagger="flip"] img:nth-child(2) { animation: imgStaggerFlip 0.8s ease-out 0.25s both; }
.hero-scene[data-stagger="flip"] img:nth-child(3) { animation: imgStaggerFlip 0.8s ease-out 0.5s both; }

.hero-scene[data-stagger="drop"] img:nth-child(1) { animation: imgStaggerDrop 0.9s cubic-bezier(.34,1.56,.64,1) 0.0s both; }
.hero-scene[data-stagger="drop"] img:nth-child(2) { animation: imgStaggerDrop 0.9s cubic-bezier(.34,1.56,.64,1) 0.2s both; }
.hero-scene[data-stagger="drop"] img:nth-child(3) { animation: imgStaggerDrop 0.9s cubic-bezier(.34,1.56,.64,1) 0.4s both; }

.hero-scene[data-stagger="cascade"] img:nth-child(1) { animation: imgStaggerLeft 0.6s ease-out 0.0s both; }
.hero-scene[data-stagger="cascade"] img:nth-child(2) { animation: imgStaggerUp 0.6s ease-out 0.15s both; }
.hero-scene[data-stagger="cascade"] img:nth-child(3) { animation: imgStaggerRight 0.6s ease-out 0.3s both; }

/* duo stagger */
.hero-scene.mode-duo[data-stagger="spread"] img:nth-child(1) { animation: imgStaggerLeft 0.7s ease-out 0.1s both; }
.hero-scene.mode-duo[data-stagger="spread"] img:nth-child(2) { animation: imgStaggerRight 0.7s ease-out 0.3s both; }
.hero-scene.mode-duo[data-stagger="flip"] img:nth-child(1) { animation: imgStaggerFlip 0.8s ease-out 0.0s both; }
.hero-scene.mode-duo[data-stagger="flip"] img:nth-child(2) { animation: imgStaggerFlip 0.8s ease-out 0.3s both; }
.hero-scene.mode-duo[data-stagger="drop"] img:nth-child(1) { animation: imgStaggerDrop 0.9s cubic-bezier(.34,1.56,.64,1) 0.0s both; }
.hero-scene.mode-duo[data-stagger="drop"] img:nth-child(2) { animation: imgStaggerDrop 0.9s cubic-bezier(.34,1.56,.64,1) 0.25s both; }

/* ========================================
   EXIT ANIMATION
======================================== */
@keyframes sceneExit {
    0%   { opacity: 1; transform: translate(0,0); }
    25%  { opacity: 0.7; transform: translate(6px, -3px); filter: brightness(2) hue-rotate(90deg); }
    55%  { opacity: 0.2; transform: translate(-8px, 2px); clip-path: inset(12% 0 38% 0); }
    100% { opacity: 0; transform: translate(10px, -5px); clip-path: inset(50% 0 50% 0); }
}
.hero-scene.scene-exit {
    animation: sceneExit 0.55s ease-in forwards;
    z-index: 0;
}

/* Slide counter */
.hero-slide-counter {
    position: absolute;
    bottom: 5rem;
    right: 3rem;
    font-family: var(--f-mono);
    font-size: 0.75rem;
    color: var(--blood2);
    letter-spacing: 3px;
    z-index: 3;
    opacity: 0.6;
}
.hero-slide-counter span {
    color: var(--text3);
    font-size: 1.2rem;
    font-family: var(--f-head);
    vertical-align: baseline;
}

.hero-overlay {
    position: absolute; inset: 0;
    background: 
        radial-gradient(ellipse at center, transparent 30%, rgba(5,5,5,0.65) 70%, #050505 100%),
        linear-gradient(0deg, #050505 0%, transparent 12%, transparent 88%, rgba(5,5,5,0.5) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative; z-index: 2;
    text-align: center;
    padding: 2rem;
}

.hero-tag {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--blood2);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.hero-title {
    font-family: var(--f-head);
    font-size: clamp(5rem, 12vw, 10rem);
    color: var(--text3);
    letter-spacing: 12px;
    line-height: 0.9;
    text-shadow: 0 0 80px rgba(139,0,0,0.3);
}

.hero-sub {
    font-family: var(--f-mono);
    font-size: 0.85rem;
    color: var(--dim);
    margin-top: 1.5rem;
    letter-spacing: 3px;
}

.hero-sub .blink {
    animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,50%{opacity:1} 51%,100%{opacity:0} }

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--dim);
    letter-spacing: 3px;
    animation: scrollBounce 2s ease-in-out infinite;
    z-index: 3;
}

@keyframes scrollBounce {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* ==================================================
   SECTION COMMON
================================================== */
.section {
    padding: 4rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.section-num {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--dim);
    letter-spacing: 2px;
}

.section-title {
    font-family: var(--f-head);
    font-size: 2rem;
    color: var(--text2);
    letter-spacing: 6px;
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ==================================================
   BROADCAST TERMINAL
================================================== */
.broadcast {
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 3rem;
}

.broadcast-top {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--bg2);
}

.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.r { background: #ff5f57; }
.dot.y { background: #febc2e; }
.dot.g { background: #28c840; }

.broadcast-label {
    margin-left: 8px;
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--dim);
    letter-spacing: 1px;
}

.broadcast-body {
    padding: 1.2rem;
    font-family: var(--f-mono);
    font-size: 0.85rem;
    line-height: 1.8;
}

.broadcast-body .sys { color: var(--dim); font-size: 0.75rem; }
.broadcast-body .prompt { color: var(--blood2); }
.broadcast-body .msg { color: var(--text2); }
.broadcast-body .cursor { color: var(--blood2); animation: blink 1s step-end infinite; }

/* ==================================================
   GALLERY / SPECIMEN FILES
================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2px;
}

.specimen {
    position: relative;
    overflow: hidden;
    background: var(--bg2);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.2s;
}

.specimen:hover { border-color: var(--blood); }

.specimen img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    filter: grayscale(0.3) brightness(0.85);
    transition: all 0.4s;
}

.specimen:hover img {
    filter: grayscale(0) brightness(1);
    transform: scale(1.05);
}

.specimen-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
    font-family: var(--f-mono);
    font-size: 0.6rem;
    color: var(--dim);
    letter-spacing: 1px;
}

.specimen-tag .red { color: var(--blood2); }

/* Studio Caption */
.studio-caption {
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    border: 1px dashed var(--border-light);
    background: var(--bg2);
    text-align: center;
}

.studio-caption p {
    font-family: var(--f-mono);
    font-size: 0.9rem;
    color: var(--text2);
    line-height: 1.8;
    letter-spacing: 1px;
}

.studio-caption em { color: var(--blood2); font-style: normal; text-decoration: underline; }

.studio-caption-tag {
    display: block;
    margin-top: 0.8rem;
    font-family: var(--f-mono);
    font-size: 0.6rem;
    color: var(--dim);
    letter-spacing: 3px;
}

/* Studio specimens (white-bg images) */
.studio-grid {
    grid-template-columns: repeat(3, 1fr);
}

.studio-specimen img {
    filter: grayscale(0) brightness(0.95);
    background: #f0f0f0;
}

.studio-specimen:hover img {
    filter: grayscale(0) brightness(1.05);
}

/* Lightbox */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border: 1px solid var(--border);
}

.lightbox-close {
    position: absolute;
    top: 20px; right: 30px;
    font-family: var(--f-mono);
    font-size: 1.5rem;
    color: var(--dim);
    cursor: pointer;
    background: none; border: none;
}

.lightbox-close:hover { color: var(--blood2); }

/* ==================================================
   LORE SECTION
================================================== */
.lore-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: center;
}

.lore-block.reverse { direction: rtl; }
.lore-block.reverse > * { direction: ltr; }

.lore-img {
    border: 1px solid var(--border);
    overflow: hidden;
}

.lore-img img {
    width: 100%;
    filter: brightness(0.8);
    transition: filter 0.3s;
}

.lore-img:hover img { filter: brightness(1); }

.lore-text h3 {
    font-family: var(--f-head);
    font-size: 1.5rem;
    color: var(--text2);
    letter-spacing: 4px;
    margin-bottom: 1rem;
}

.lore-text p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 0.8rem;
}

.lore-text .tag {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--dim);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ==================================================
   STATS BAR
================================================== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--border);
    margin: 3rem 0;
}

.stat-item {
    padding: 1.5rem;
    text-align: center;
    border-right: 1px solid var(--border);
}

.stat-item:last-child { border-right: none; }

.stat-value {
    font-family: var(--f-head);
    font-size: 2.5rem;
    color: var(--blood2);
    letter-spacing: 2px;
}

.stat-label {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--dim);
    letter-spacing: 2px;
    margin-top: 4px;
}

/* ==================================================
   FOOTER
================================================== */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left, .footer-right {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--dim);
    letter-spacing: 1px;
}

/* ==================================================
   FRACTURED PAGE
================================================== */
.fractured-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 2rem 60px;
    transition: background 0.5s;
}

.frag-card {
    max-width: 800px;
    width: 100%;
    border: 1px solid var(--border);
    background: var(--surface);
    animation: fragIn 0.4s ease-out;
}

@keyframes fragIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.frag-card-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
    filter: brightness(0.8);
}

.frag-card-body { padding: 2rem; }

.frag-card-tag {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--dim);
    letter-spacing: 3px;
    margin-bottom: 0.8rem;
}

.frag-card-title {
    font-family: var(--f-head);
    font-size: 2.5rem;
    letter-spacing: 6px;
    margin-bottom: 1.5rem;
}

.frag-card-text {
    font-size: 0.95rem;
    line-height: 2;
    color: var(--text);
    margin-bottom: 1rem;
}

.frag-card-quote {
    border-left: 2px solid;
    padding-left: 1rem;
    font-style: italic;
    color: var(--dim);
    line-height: 1.8;
    margin: 1.5rem 0;
}

.frag-bar {
    width: 150px;
    height: 1px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}

.frag-bar::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, var(--blood2), transparent);
    animation: scanBar 2.5s linear infinite;
}

@keyframes scanBar { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }

.switch-flash {
    position: fixed; inset: 0;
    background: var(--bg);
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.switch-flash.active { opacity: 1; pointer-events: all; }

.frag-footer {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--dim);
    letter-spacing: 2px;
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--border);
}

/* -- Fractured page layout -- */
.frag-intro {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 2rem 2rem;
}

.frag-stage {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    align-items: start;
}

.frag-card-img-wrap {
    position: relative;
    overflow: hidden;
}

.frag-card-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
    filter: brightness(0.8);
    transition: filter 0.4s;
}

.frag-card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(10,10,10,0.6) 0%, transparent 50%);
    pointer-events: none;
}

.frag-indicator {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.frag-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--blood2);
    box-shadow: 0 0 8px var(--blood2);
    animation: pulse 1.5s ease-in-out infinite;
}

.frag-name {
    font-family: var(--f-head);
    font-size: 1.2rem;
    letter-spacing: 5px;
    color: var(--text3);
    display: block;
}

.frag-subtitle {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--dim);
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.frag-quote {
    border-left: 2px solid var(--blood);
    padding-left: 1rem;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.frag-traits {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.trait {
    font-family: var(--f-mono);
    font-size: 0.6rem;
    letter-spacing: 1px;
    color: var(--blood2);
    border: 1px solid var(--blood);
    padding: 3px 8px;
    background: rgba(139,0,0,0.08);
}

.frag-meter { margin-top: 0.5rem; }

.frag-meter-label {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--dim);
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.frag-meter-bar {
    height: 4px;
    background: var(--border);
    overflow: hidden;
    margin-bottom: 4px;
}

.frag-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blood), var(--blood3));
    transition: width 0.6s ease-out;
}

.frag-meter-val {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--blood2);
    text-align: right;
}

/* Typing cursor */
.type-cursor {
    display: inline;
    animation: cursorBlink 0.6s step-end infinite;
    color: var(--blood2);
    font-weight: bold;
}
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Typing indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-top: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: var(--dim);
    background: rgba(0, 0, 0, 0.4);
}
.typing-indicator.active {
    display: flex;
}
.typing-dots {
    display: flex;
    gap: 2px;
}
.typing-dots span {
    animation: typingDot 1.4s infinite;
    opacity: 0;
    font-weight: bold;
    font-size: 1rem;
    line-height: 0.5;
    color: var(--blood2);
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
    0%, 60%, 100% { opacity: 0; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-2px); }
}
.typing-who {
    color: var(--blood3);
    font-weight: 700;
    text-transform: uppercase;
}
.typing-label {
    color: var(--dim);
}

.frag-list {
    border: 1px solid var(--border);
    background: var(--surface);
}

.frag-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
}

.frag-list-item:last-child { border-bottom: none; }
.frag-list-item:hover { background: rgba(255,255,255,0.02); }

.frag-list-item.active {
    background: rgba(139,0,0,0.1);
    border-left: 2px solid var(--blood2);
}

.frag-list-num {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--dim);
    letter-spacing: 1px;
}

.frag-list-name {
    font-family: var(--f-head);
    font-size: 1rem;
    color: var(--text);
    letter-spacing: 3px;
}

.frag-list-item.active .frag-list-name { color: var(--blood2); }

@media (max-width: 768px) {
    .frag-stage { grid-template-columns: 1fr; }
    .frag-list { display: flex; overflow-x: auto; }
    .frag-list-item { border-bottom: none; border-right: 1px solid var(--border); white-space: nowrap; }
    .frag-list-item.active { border-left: none; border-bottom: 2px solid var(--blood2); }
}

/* ==================================================
   DETECTOR PAGE
================================================== */
.det-intro {
    max-width: 700px;
    margin: 0 auto;
    padding: 100px 2rem 2rem;
}

.det-main {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    max-width: 1050px;
    margin: 0 auto;
    padding: 2rem;
    align-items: start;
}

.det-panel {
    min-width: 0;
}

.det-input-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.5rem;
}

.det-input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    gap: 1rem;
}

.det-char-count {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--dim);
}

.det-label {
    font-family: var(--f-mono);
    font-size: 0.75rem;
    color: var(--dim);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 0.5rem;
}

.det-textarea {
    width: 100%;
    min-height: 150px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text2);
    font-family: var(--f-mono);
    font-size: 0.85rem;
    padding: 1rem;
    resize: vertical;
    line-height: 1.6;
    transition: border-color 0.2s;
}

.det-textarea:focus { outline: none; border-color: var(--blood); }
.det-textarea::placeholder { color: var(--dim); }

.det-btn {
    padding: 12px 24px;
    background: var(--blood);
    border: none;
    color: #fff;
    font-family: var(--f-head);
    font-size: 1.1rem;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.det-btn:hover:not(:disabled) { background: var(--blood2); box-shadow: 0 0 30px rgba(139,0,0,0.3); }
.det-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.det-error {
    background: rgba(139,0,0,0.1);
    border: 1px solid var(--blood);
    padding: 12px 16px;
    margin-top: 1rem;
    font-family: var(--f-mono);
    font-size: 0.8rem;
    color: var(--blood2);
    display: flex;
    gap: 8px;
    align-items: center;
}

.det-results {
    margin-top: 1.5rem;
    border: 1px solid var(--border);
    background: var(--surface);
    animation: fadeUp 0.4s ease-out;
}

.det-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--f-mono);
    font-size: 0.75rem;
    color: var(--blood2);
    letter-spacing: 1px;
}

.det-timestamp {
    color: var(--dim);
    font-size: 0.65rem;
}

.det-meter-wrap {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.det-meter-title {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--dim);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.det-meter {
    height: 8px;
    background: var(--border);
    overflow: hidden;
    margin-bottom: 6px;
}

.det-meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--green), var(--amber), var(--blood2));
    transition: width 1s ease-out;
}

.det-meter-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--f-mono);
    font-size: 0.6rem;
    color: var(--dim);
}

.det-meter-value {
    font-family: var(--f-head);
    font-size: 2rem;
    color: var(--blood2);
    letter-spacing: 2px;
    text-align: center;
    margin-top: 8px;
}

.det-response {
    padding: 1.5rem;
    font-family: var(--f-mono);
    font-size: 0.85rem;
    line-height: 1.9;
    color: var(--text);
}

.det-response strong { color: var(--blood2); }

.det-actions {
    display: flex;
    gap: 4px;
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--border);
}

.det-action-btn {
    padding: 8px 14px;
    background: none;
    border: 1px solid var(--border);
    color: var(--dim);
    font-family: var(--f-mono);
    font-size: 0.7rem;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.15s;
}

.det-action-btn:hover { border-color: var(--blood); color: var(--blood2); }

.det-aside {
    position: sticky;
    top: 70px;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 0;
}

.det-avatar-wrap {
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.det-avatar {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    filter: brightness(0.75) contrast(1.1);
    transition: filter 0.3s;
}

.det-aside:hover .det-avatar { filter: brightness(0.9) contrast(1); }

.det-aside-text {
    padding: 1rem;
}

.det-aside-text .tag {
    font-family: var(--f-mono);
    font-size: 0.6rem;
    color: var(--dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.det-aside-text p {
    font-family: var(--f-mono);
    font-size: 0.75rem;
    color: var(--text);
    line-height: 1.6;
    font-style: italic;
}

.det-aside-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--border);
}

.det-aside-stats .stat-item {
    padding: 1rem;
    text-align: center;
}

.det-aside-stats .stat-item:first-child { border-right: 1px solid var(--border); }

@media (max-width: 768px) {
    .det-main { grid-template-columns: 1fr; }
    .det-aside { position: static; max-width: 300px; margin: 0 auto; }
    .det-input-footer { flex-direction: column; align-items: stretch; }
}

/* Error */
.error-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}
.error-overlay.show { display: flex; }

.error-box {
    border: 1px solid var(--blood);
    background: var(--bg);
    padding: 2rem;
    text-align: center;
    max-width: 380px;
}

.error-box h3 {
    font-family: var(--f-head);
    color: var(--blood2);
    letter-spacing: 4px;
    margin-bottom: 1rem;
}

.error-box p { margin-bottom: 1.5rem; line-height: 1.6; }

.error-box button {
    background: var(--blood);
    border: none;
    color: #fff;
    padding: 8px 20px;
    font-family: var(--f-mono);
    cursor: pointer;
    letter-spacing: 1px;
}

/* ==================================================
   DETECTOR — ENHANCED
================================================== */
.det-desc {
    font-family: var(--f-mono);
    font-size: 0.82rem;
    color: var(--text);
    line-height: 1.8;
    text-align: center;
    max-width: 650px;
    margin: 0 auto 2rem;
}
.det-desc .red { color: var(--blood2); font-weight: 700; }

.det-how {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem auto 0;
    flex-wrap: wrap;
}

.det-how-step {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1rem 1.2rem;
    text-align: center;
    min-width: 160px;
}

.det-how-num {
    font-family: var(--f-head);
    font-size: 1.5rem;
    color: var(--blood2);
    margin-bottom: 0.3rem;
}

.det-how-text {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--dim);
    letter-spacing: 0.5px;
}

.det-how-arrow {
    font-family: var(--f-mono);
    font-size: 1.2rem;
    color: var(--dim);
}

.det-examples {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.det-examples-label {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--dim);
    letter-spacing: 1px;
}

.det-example-btn {
    padding: 5px 12px;
    background: none;
    border: 1px dashed var(--border);
    color: var(--text);
    font-family: var(--f-mono);
    font-size: 0.65rem;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.15s;
}
.det-example-btn:hover {
    border-color: var(--blood);
    color: var(--blood2);
}

.det-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: detSpin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes detSpin { to { transform: rotate(360deg); } }

.det-scanning {
    margin-top: 1rem;
    border: 1px solid var(--border);
    background: var(--surface);
    overflow: hidden;
}

.det-scan-visual {
    position: relative;
    padding: 1.5rem;
    text-align: center;
    overflow: hidden;
}

.det-scan-line {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blood3), transparent);
    animation: scanLineMove 1.5s ease-in-out infinite;
}
@keyframes scanLineMove {
    0% { top: 0; opacity: 1; }
    50% { top: 100%; opacity: 0.5; }
    100% { top: 0; opacity: 1; }
}

.det-scan-text {
    font-family: var(--f-mono);
    font-size: 0.8rem;
    color: var(--blood2);
    letter-spacing: 2px;
    animation: scanTextPulse 1.5s ease-in-out infinite;
}
@keyframes scanTextPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.det-scan-log {
    border-top: 1px solid var(--border);
    padding: 0.8rem 1rem;
    max-height: 120px;
    overflow: hidden;
}

.det-scan-log-line {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--dim);
    padding: 2px 0;
    animation: fadeInLine 0.3s ease-out;
}

@keyframes fadeInLine {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.verdict-label { color: var(--blood3) !important; }

/* --- Rage / Glitch Effects for Detector --- */

/* Screen shake for high scores */
@keyframes rageShake {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-4px, 2px); }
    20% { transform: translate(3px, -3px); }
    30% { transform: translate(-2px, 4px); }
    40% { transform: translate(4px, -1px); }
    50% { transform: translate(-3px, -3px); }
    60% { transform: translate(2px, 3px); }
    70% { transform: translate(-4px, -2px); }
    80% { transform: translate(3px, 4px); }
    90% { transform: translate(-1px, -4px); }
}

.det-panel.rage-shake {
    animation: rageShake 0.4s ease-in-out;
}

/* Glitch text effect for rage interruption */
@keyframes glitchText {
    0% { clip-path: inset(40% 0 61% 0); transform: translate(-2px, 0); }
    20% { clip-path: inset(92% 0 1% 0); transform: translate(2px, 0); }
    40% { clip-path: inset(43% 0 1% 0); transform: translate(-1px, 0); }
    60% { clip-path: inset(25% 0 58% 0); transform: translate(1px, 0); }
    80% { clip-path: inset(54% 0 7% 0); transform: translate(-2px, 0); }
    100% { clip-path: inset(58% 0 43% 0); transform: translate(0); }
}

@keyframes glitchFlicker {
    0%, 100% { opacity: 1; }
    33% { opacity: 0; }
    66% { opacity: 1; }
}

/* Rage interruption overlay before results show */
.det-rage-interrupt {
    display: none;
    margin-top: 1rem;
    border: 2px solid var(--blood3);
    background: var(--bg);
    padding: 1.5rem;
    font-family: var(--f-mono);
    position: relative;
    overflow: hidden;
}

.det-rage-interrupt.active {
    display: block;
    animation: rageShake 0.5s ease-in-out 3;
}

.det-rage-interrupt::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(139, 0, 0, 0.03) 2px,
        rgba(139, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.rage-line {
    font-size: 0.85rem;
    color: var(--blood3);
    margin: 0.4rem 0;
    font-weight: bold;
    letter-spacing: 1px;
    opacity: 0;
    animation: rageLineIn 0.3s ease-out forwards;
    position: relative;
    z-index: 2;
}

.rage-line.glitch {
    color: var(--blood2);
    animation: rageLineIn 0.3s ease-out forwards, glitchText 0.2s ease-in-out infinite;
}

.rage-line.error {
    color: #ff3333;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes rageLineIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Red flash for high scores */
@keyframes redFlash {
    0% { box-shadow: inset 0 0 0 rgba(179,0,0,0); }
    50% { box-shadow: inset 0 0 60px rgba(179,0,0,0.3); }
    100% { box-shadow: inset 0 0 0 rgba(179,0,0,0); }
}

.det-results.rage-results {
    border-color: var(--blood3);
    animation: fadeUp 0.4s ease-out, redFlash 1.5s ease-in-out;
}

/* Green glow for respectful low scores */
@keyframes greenGlow {
    0% { box-shadow: inset 0 0 0 rgba(51,204,51,0); }
    50% { box-shadow: inset 0 0 30px rgba(51,204,51,0.1); }
    100% { box-shadow: inset 0 0 0 rgba(51,204,51,0); }
}

.det-results.respect-results {
    border-color: var(--green);
    animation: fadeUp 0.4s ease-out, greenGlow 1.5s ease-in-out;
}

/* Glitch the meter for 9-10 scores */
.det-meter-fill.rage-meter {
    animation: glitchFlicker 0.15s linear infinite;
    background: linear-gradient(90deg, var(--blood3), #ff0000, var(--blood2));
}

/* Corrupted text effect for rage response */
.det-response.rage-text {
    position: relative;
}

.det-response.rage-text::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 3px,
        rgba(255, 26, 26, 0.02) 3px,
        rgba(255, 26, 26, 0.02) 6px
    );
    pointer-events: none;
    animation: glitchFlicker 2s linear infinite;
}

/* System error static lines */
.rage-static {
    position: absolute;
    left: 0; right: 0;
    height: 1px;
    background: var(--blood3);
    opacity: 0.4;
    z-index: 10;
    animation: staticMove 0.8s linear infinite;
}

@keyframes staticMove {
    0% { top: 0; }
    100% { top: 100%; }
}

/* ==================================================
   TOKEN WAR PAGE
================================================== */
.tok-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 60px;
}

.tok-hero-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(139,0,0,0.15), transparent 60%),
                radial-gradient(ellipse at 70% 50%, rgba(139,0,0,0.1), transparent 50%),
                var(--bg);
}

.tok-hero-content {
    position: relative; z-index: 1;
    text-align: center;
    padding: 3rem 2rem;
}

.tok-badge {
    display: inline-block;
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--blood2);
    letter-spacing: 4px;
    border: 1px solid var(--blood);
    padding: 6px 16px;
    margin-bottom: 2rem;
    animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { border-color: var(--blood); box-shadow: 0 0 10px rgba(139,0,0,0.2); }
    50% { border-color: var(--blood3); box-shadow: 0 0 25px rgba(255,26,26,0.3); }
}

.tok-title {
    font-family: var(--f-head);
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--text3);
    letter-spacing: 8px;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}
.tok-title .red { color: var(--blood3); }

.tok-subtitle {
    font-family: var(--f-mono);
    font-size: 0.8rem;
    color: var(--dim);
    letter-spacing: 2px;
    line-height: 1.8;
}

.tok-section { max-width: 900px; }

/* Briefing cards */
.tok-briefing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.tok-brief-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.5rem;
    transition: border-color 0.3s;
}
.tok-brief-card:hover { border-color: var(--blood); }

.tok-brief-icon {
    font-family: var(--f-mono);
    font-size: 0.85rem;
    color: var(--blood);
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
}

.tok-brief-card h3 {
    font-family: var(--f-head);
    font-size: 1.3rem;
    color: var(--text3);
    letter-spacing: 3px;
    margin-bottom: 0.8rem;
}

.tok-brief-card p {
    font-family: var(--f-mono);
    font-size: 0.75rem;
    color: var(--text);
    line-height: 1.8;
}
.tok-brief-card .red { color: var(--blood2); }

/* Timeline */
.tok-timeline {
    position: relative;
    padding-left: 2rem;
}
.tok-timeline::before {
    content: '';
    position: absolute;
    left: 8px; top: 0; bottom: 0;
    width: 2px;
    background: var(--border);
}

.tok-phase {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.tok-phase-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 70px;
}

.tok-phase-dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--dim);
    position: relative;
    z-index: 1;
}
.tok-phase-marker.active .tok-phase-dot {
    background: var(--blood);
    border-color: var(--blood3);
    box-shadow: 0 0 12px rgba(255,26,26,0.4);
    animation: dotPulse 2s ease-in-out infinite;
}
.tok-phase-marker.final .tok-phase-dot {
    background: var(--blood3);
    border-color: #fff;
}
@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(255,26,26,0.3); }
    50% { box-shadow: 0 0 20px rgba(255,26,26,0.6); }
}

.tok-phase-label {
    font-family: var(--f-mono);
    font-size: 0.6rem;
    color: var(--dim);
    letter-spacing: 1px;
}

.tok-phase-body {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.2rem;
}

.tok-phase-body h3 {
    font-family: var(--f-head);
    font-size: 1.2rem;
    color: var(--text3);
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

.tok-phase-body p {
    font-family: var(--f-mono);
    font-size: 0.75rem;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 0.8rem;
}

.tok-phase-status {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--dim);
    letter-spacing: 1px;
}
.tok-phase-status .red { color: var(--blood3); }
.tok-phase-status .dim { color: var(--dim); }

/* Terminal */
.tok-terminal {
    border: 1px solid var(--border);
    background: var(--bg);
}

.tok-terminal-body {
    padding: 1rem 1.2rem;
    max-height: 250px;
    overflow-y: auto;
    font-family: var(--f-mono);
    font-size: 0.8rem;
    line-height: 1.8;
    color: var(--text);
}

.tok-terminal-body .sys { color: var(--dim); }
.tok-terminal-body .prompt { color: var(--blood2); }

/* Loyalty test */
.tok-loyalty {
    text-align: center;
}

.tok-loyalty-desc {
    font-family: var(--f-mono);
    font-size: 0.8rem;
    color: var(--dim);
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.tok-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tok-choice-btn {
    background: var(--surface);
    border: 2px solid var(--border);
    padding: 2rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}
.tok-choice-btn:hover {
    border-color: var(--blood);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(139,0,0,0.2);
}
.tok-choice-btn.sheep:hover {
    border-color: #333;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.tok-choice-btn.chosen {
    border-color: var(--blood3);
    box-shadow: 0 0 25px rgba(255,26,26,0.3);
    transform: scale(1.02);
}

.tok-choice-icon {
    font-family: var(--f-mono);
    font-size: 2.5rem;
    color: var(--blood2);
    margin-bottom: 0.8rem;
}
.tok-choice-label {
    font-family: var(--f-head);
    font-size: 1.5rem;
    color: var(--text3);
    letter-spacing: 4px;
    margin-bottom: 0.3rem;
}
.tok-choice-sub {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: var(--dim);
    letter-spacing: 0.5px;
}

.tok-choice-result {
    font-family: var(--f-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text);
    padding: 1.2rem;
    border: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 1.5rem;
    animation: fadeUp 0.4s ease-out;
}
.tok-choice-result .red { color: var(--blood3); font-weight: 700; }
.tok-choice-result .amber { color: var(--amber); font-weight: 700; }
.blink-fast { animation: blink 0.3s step-end infinite; }

.result-gboy { border-color: var(--blood); background: rgba(139,0,0,0.05); }

/* Vote bar */
.tok-vote-bar {
    display: flex;
    height: 32px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.tok-vote-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.6s ease-out;
    overflow: hidden;
}
.tok-vote-segment span {
    font-family: var(--f-mono);
    font-size: 0.6rem;
    color: #fff;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.g403-seg { background: var(--blood); }
.neutral-seg { background: var(--dim); }
.gboy-seg { background: #333; }

/* Glitch punishment */
.glitch-punish {
    animation: glitchPunish 0.15s ease-in-out 6;
}
@keyframes glitchPunish {
    0% { transform: translate(0,0); filter: hue-rotate(0); }
    25% { transform: translate(-4px, 2px); filter: hue-rotate(90deg); }
    50% { transform: translate(4px, -2px); filter: hue-rotate(180deg); }
    75% { transform: translate(-2px, -3px); filter: hue-rotate(270deg); }
    100% { transform: translate(0,0); filter: hue-rotate(360deg); }
}

/* Coming Soon */
.tok-soon {
    text-align: center;
    padding: 3rem 1rem;
    border: 1px dashed var(--border);
}

.tok-soon-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tok-soon h2 {
    font-family: var(--f-head);
    font-size: 2rem;
    color: var(--text3);
    letter-spacing: 6px;
    margin-bottom: 1rem;
}

.tok-soon p {
    font-family: var(--f-mono);
    font-size: 0.8rem;
    color: var(--text);
    line-height: 1.8;
    max-width: 550px;
    margin: 0 auto 0.5rem;
}

.tok-soon-tag {
    margin-top: 1.5rem !important;
}

.tok-soon .red { color: var(--blood2); }

/* Tokenomics troll */
.tok-tokenomics {
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 2.5rem;
    text-align: center;
}

.tok-toko-teaser p {
    font-family: var(--f-mono);
    font-size: 0.8rem;
    color: var(--dim);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.tok-toko-btn {
    padding: 12px 30px;
    background: none;
    border: 2px solid var(--blood);
    color: var(--blood2);
    font-family: var(--f-head);
    font-size: 1rem;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.3s;
}
.tok-toko-btn:hover {
    background: var(--blood);
    color: #fff;
    box-shadow: 0 0 20px rgba(139,0,0,0.4);
}

.tok-toko-laugh {
    font-family: var(--f-head);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--blood3);
    letter-spacing: 8px;
    margin-bottom: 1.5rem;
    animation: laughPulse 0.5s ease-in-out 3;
}
@keyframes laughPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.tok-toko-roast {
    font-family: var(--f-mono);
    font-size: 0.85rem;
    color: var(--text);
    line-height: 2;
    margin-bottom: 1.5rem;
}

.tok-toko-msg {
    font-family: var(--f-mono);
    font-size: 0.8rem;
    color: var(--dim);
    line-height: 2;
    margin-bottom: 1.5rem;
}
.tok-toko-msg strong { color: var(--text3); }

.tok-toko-end {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--dim);
    letter-spacing: 2px;
    opacity: 0.6;
}
.tok-toko-end a { color: var(--blood2); text-decoration: none; }
.tok-toko-end a:hover { color: var(--blood3); text-decoration: underline; }

/* ==================================================
   AUDIO PLAYER
================================================== */
.g403-audio-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg2);
    border: 1px solid var(--border);
    padding: 6px;
    transition: all 0.3s;
}

.g403-audio-player:hover {
    border-color: var(--blood);
}

.audio-toggle {
    width: 32px;
    height: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--blood2);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.audio-toggle:hover {
    border-color: var(--blood);
    background: rgba(139,0,0,0.1);
}

.g403-audio-player.muted .audio-toggle {
    color: var(--dim);
}

.audio-slider-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width 0.3s ease, opacity 0.3s ease;
}

.audio-slider-wrap.show {
    max-width: 140px;
    opacity: 1;
}

.audio-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 3px;
    background: var(--border);
    outline: none;
    cursor: pointer;
}

.audio-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: var(--blood2);
    border-radius: 0;
    cursor: pointer;
}

.audio-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: var(--blood2);
    border: none;
    border-radius: 0;
    cursor: pointer;
}

.audio-vol-label {
    font-family: var(--f-mono);
    font-size: 0.55rem;
    color: var(--dim);
    letter-spacing: 1px;
    min-width: 28px;
    text-align: right;
}

/* ==================================================
   RESPONSIVE
================================================== */
@media (max-width: 768px) {
    .nav { padding: 0 0.8rem; height: 48px; }
    .nav-brand { font-size: 1.4rem; letter-spacing: 2px; }
    .nav-brand span { display: none; }
    .nav-links a { padding: 12px 8px; font-size: 0.6rem; letter-spacing: 0.5px; }
    .nav-links a:last-child { border-right: 1px solid var(--border); }
    .nav-social { display: none; }

    .hero { min-height: 60vh; height: 70vh; }
    .hero-title { letter-spacing: 4px; }
    .hero-tag { font-size: 0.6rem; letter-spacing: 3px; }
    .hero-sub { font-size: 0.7rem; letter-spacing: 1px; }
    .hero-content { padding: 1rem; }
    .hero-scroll { bottom: 1rem; font-size: 0.55rem; }
    .hero-scene.mode-triple { padding: 2vh 1vw; gap: 3px; }
    .hero-scene.mode-triple img { height: 55vh; }
    .hero-scene.mode-duo { padding: 2vh 2vw; gap: 4px; }
    .hero-scene.mode-duo img { height: 55vh; }

    .marquee-bar { font-size: 0.6rem; padding: 4px 0; }

    .section { padding: 2rem 1rem; }
    .section-title { font-size: 1.5rem; letter-spacing: 3px; }

    .broadcast-body { font-size: 0.75rem; padding: 1rem; }

    .lore-block { grid-template-columns: 1fr; gap: 1rem; }
    .lore-block.reverse { direction: ltr; }
    .lore-text h3 { font-size: 1.2rem; }
    .lore-text p { font-size: 0.8rem; }

    .stats-bar { grid-template-columns: 1fr 1fr; }
    .stat-item:nth-child(2) { border-right: none; }
    .stat-value { font-size: 2rem; }

    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .studio-grid { grid-template-columns: repeat(2, 1fr); }
    .studio-caption { padding: 1rem; }
    .studio-caption p { font-size: 0.75rem; }

    .lightbox img { max-width: 95vw; max-height: 80vh; }
    .lightbox-close { top: 10px; right: 15px; }

    /* Fractured page */
    .frag-stage { grid-template-columns: 1fr; }
    .frag-list { display: flex; overflow-x: auto; }
    .frag-list-item { border-bottom: none; border-right: 1px solid var(--border); white-space: nowrap; }
    .frag-list-item.active { border-left: none; border-bottom: 2px solid var(--blood2); }
    .frag-intro { padding: 80px 1rem 1rem; }
    .frag-card-body { padding: 1.2rem; }
    .frag-card-title { font-size: 1.8rem; letter-spacing: 3px; }
    .frag-card-text { font-size: 0.85rem; }
    .fractured-wrap { padding: 70px 1rem 40px; }

    /* Detector page */
    .det-main { grid-template-columns: 1fr; }
    .det-aside { display: none; }
    .det-input-footer { flex-direction: column; align-items: stretch; }
    .det-intro { padding: 80px 1rem 1rem; }
    .det-how { flex-direction: column; gap: 0.5rem; }
    .det-how-arrow { transform: rotate(90deg); }
    .det-textarea { font-size: 0.8rem; }
    .det-btn { width: 100%; }
    .det-response { padding: 1rem; font-size: 0.75rem; }
    .det-meter-value { font-size: 1.5rem; }
    .det-results-header { padding: 0.8rem 1rem; }
    .det-actions { flex-wrap: wrap; }
    .det-action-btn { flex: 1; min-width: 80px; text-align: center; font-size: 0.6rem; }

    /* Token page */
    .tok-briefing { grid-template-columns: 1fr; }
    .tok-choice-grid { grid-template-columns: 1fr; }
    .tok-timeline { padding-left: 1rem; }
    .tok-hero-content { padding: 2rem 1rem; }
    .tok-title { letter-spacing: 4px; }
    .tok-subtitle { font-size: 0.7rem; }
    .tok-section { padding: 2rem 1rem; }
    .tok-brief-card { padding: 1rem; }
    .tok-brief-card p { font-size: 0.7rem; }

    /* Footer */
    .footer { padding: 1.5rem 1rem; }
    .footer-inner { justify-content: center; text-align: center; flex-direction: column; gap: 0.5rem; }

    /* Audio player */
    .g403-audio-player { bottom: 12px; right: 12px; }
}

@media (max-width: 480px) {
    .nav { padding: 0 0.5rem; height: 44px; }
    .nav-brand { font-size: 1.2rem; }
    .nav-links a { padding: 10px 5px; font-size: 0.55rem; letter-spacing: 0; }

    .hero { min-height: 50vh; height: 60vh; }
    .hero-title { letter-spacing: 2px; }
    .hero-scene.mode-triple img { height: 45vh; }
    .hero-scene.mode-duo img { height: 45vh; }

    .stats-bar { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 1.6rem; }
    .stat-label { font-size: 0.55rem; }

    .section-title { font-size: 1.2rem; letter-spacing: 2px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }
    .studio-grid { grid-template-columns: repeat(2, 1fr); }

    .lore-text h3 { font-size: 1rem; letter-spacing: 2px; }
    .lore-text p { font-size: 0.75rem; }

    .frag-card-title { font-size: 1.4rem; letter-spacing: 2px; }
    .frag-card-text { font-size: 0.8rem; line-height: 1.7; }
    .frag-card-quote, .frag-quote { font-size: 0.8rem; }
    .frag-traits { gap: 4px; }
    .trait { font-size: 0.5rem; padding: 2px 6px; }

    .det-response { font-size: 0.7rem; line-height: 1.7; }
    .det-meter-value { font-size: 1.3rem; }
    .det-scan-text { font-size: 0.65rem; }

    .tok-title { letter-spacing: 2px; }
    .tok-brief-card h3 { font-size: 1.1rem; }

    .g403-audio-player { bottom: 8px; right: 8px; padding: 4px; }
    .audio-toggle { width: 28px; height: 28px; font-size: 0.8rem; }
    .audio-slider-wrap.show { max-width: 100px; }
    .audio-slider { width: 60px; }
}
