/* ========================================== */
/* IMPORT EXACT FONTS & COLOR SCHEME         */
/* ========================================== */
@import url('https://fonts.googleapis.com/css2?family=VT323&family=Inter:wght@400;700&display=swap');

:root { 
    --red: #ff0033; 
    --black: #050505; 
    --white: #ffffff;
    --grey: #1a1a1a;
    --dark-grey: #0a0a0a;
    --text-main: #ffffff;
    --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
}

/* SELECTION HIGHLIGHT */
::selection {
    background: var(--red);
    color: var(--black);
    text-shadow: none;
}

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

/* BASE BODY & WATERMARK */
body {
    background-color: var(--black);
    color: var(--text-main);
    font-family: var(--font-sans);
    overflow-x: hidden;
    width: 100vw;
    padding-top: 70px;
    position: relative;
}

/* Faint Watermark Logo */
.watermark-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(400px, 60vw);
    height: min(400px, 60vw);
    background: url("https://wordstar.nexus/svg/favicon.svg") no-repeat center;
    background-size: contain;
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
}
/* ── HERO CENTER GIF + SCRAMBLE MODULE ── */
/* Direct mail GIF link wrapper */
.ink-hero-gif-link {
  display: inline-block;
  line-height: 0;
  transition: transform 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}

.ink-hero-gif-link:hover {
  transform: scale(1.02);
}

.ink-hero-gif-link:hover .ink-hero-gif {
  border-color: var(--primary, #ff0000);
  box-shadow: 0 0 18px rgba(255, 0, 0, 0.45);
  filter: contrast(1.25) brightness(1.05);
}
/* ========================================== */
/* CRT & VHS OVERLAYS                         */
/* ========================================== */
#crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.9);
}

.scanline {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 50%, rgba(0,0,0,0.5) 50%);
    background-size: 100% 4px;
    animation: scanline 10s linear infinite, flicker 0.15s infinite;
}

@keyframes scanline {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

@keyframes flicker {
    0% { opacity: 0.3; }
    50% { opacity: 0.4; }
    100% { opacity: 0.3; }
}

/* VHS Bloom & Tracking lines */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #ff0000;
    mix-blend-mode: hard-light; 
    opacity: 0;
    z-index: 9998;
    pointer-events: none;
    animation: vhs-red-bloom 8s infinite linear;
}

body::after {
    content: "";
    position: fixed;
    left: 0;
    width: 100%;
    height: 5vh;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.95) 40%, rgba(255, 255, 255, 0.95) 60%, transparent 100%) 
        center center / 80% 2px no-repeat,
        linear-gradient(90deg, transparent, #ff0000, transparent) 
        20% 10% / 200px 1px no-repeat,
        linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.6), transparent) 
        70% 90% / 350px 1px no-repeat;
    top: -10vh;
    z-index: 9999;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0;
    animation: vhs-tracking-bounce 8s infinite linear;
}

@keyframes vhs-red-bloom {
    0%, 90% { opacity: 0; }
    91% { opacity: 0.4; }
    93% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes vhs-tracking-bounce {
    0%, 90% { top: -10vh; opacity: 0; }
    91% { opacity: 1; }
    96% { top: 110vh; opacity: 1; }
    100% { top: 110vh; opacity: 0; }
}

/* ========================================== */
/* STICKY HEADER                              */
/* ========================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid #222;
    box-shadow: 0 2px 20px rgba(0,0,0,0.8);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-title {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--white);
    text-transform: uppercase;
    line-height: 1;
}

/* ========================================== */
/* GLITCH ORB (SCALED AS THE LETTER 'O')      */
/* ========================================== */
.orb-container-letter {
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    margin-left: 1px;
    position: relative;
    top: -0.05em;
    vertical-align: middle;
    cursor: pointer;
}

.glitch-orb {
    width: 100%;
    height: 100%;
    fill: none;
    stroke-width: 4;
    overflow: visible;
}

.orb-circle { stroke: #ff0033; } 
.orb-triangle { stroke: #ffffff; } 

.orb-container-letter svg {
    animation: slow-spin 10s linear infinite;
    filter: drop-shadow(0 0 4px rgba(255, 0, 51, 0.4));
    transition: all 0.2s ease;
}

.orb-container-letter:hover svg {
    animation: glitch-shake 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
    filter: drop-shadow(2px 2px 0px rgba(255, 255, 255, 0.5)) 
            drop-shadow(-2px -2px 0px rgba(255, 0, 51, 0.8));
}

.orb-container-letter:hover .orb-triangle {
    fill: rgba(255, 255, 255, 0.15);
}

@keyframes slow-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes glitch-shake {
    0% { transform: translate(0) rotate(0deg); }
    20% { transform: translate(-2px, 2px) rotate(-5deg); }
    40% { transform: translate(-2px, -2px) rotate(5deg); }
    60% { transform: translate(2px, 2px) rotate(-5deg); }
    80% { transform: translate(2px, -2px) rotate(5deg); }
    100% { transform: translate(0) rotate(0deg); }
}

/* ========================================== */
/* MINI GYRO LOGO                             */
/* ========================================== */
.gyro-container-mini {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 400px;
}

.gyro-ring-mini {
    position: absolute;
    border-radius: 50%;
    box-sizing: border-box;
}

.gyro-ring-mini-1 {
    width: 36px;
    height: 36px;
    border: 1.5px dashed rgba(255, 0, 0, 0.35);
    animation: gyro-spin-mini-1 9s linear infinite;
}

.gyro-ring-mini-2 {
    width: 30px;
    height: 30px;
    border: 1.5px dotted rgba(255, 0, 0, 0.7);
    animation: gyro-spin-mini-2 6s linear infinite reverse;
}

.gyro-ring-mini-3 {
    width: 24px;
    height: 24px;
    border: 1px dashed rgba(232, 224, 204, 0.4);
    animation: gyro-spin-mini-3 4s linear infinite;
}

.gyro-rotator-mini {
    position: relative;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gyro-spin-core-mini 15s linear infinite;
}

.gyro-anchor-logo-mini {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    filter: none !important;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    display: block;
}

@keyframes gyro-spin-mini-1 {
    0% { transform: rotateX(65deg) rotateY(15deg) rotateZ(0deg); }
    100% { transform: rotateX(65deg) rotateY(15deg) rotateZ(360deg); }
}

@keyframes gyro-spin-mini-2 {
    0% { transform: rotateX(25deg) rotateY(65deg) rotateZ(0deg); }
    100% { transform: rotateX(25deg) rotateY(65deg) rotateZ(360deg); }
}

@keyframes gyro-spin-mini-3 {
    0% { transform: rotateZ(0deg); }
    100% { transform: rotateZ(360deg); }
}

@keyframes gyro-spin-core-mini {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================== */
/* MENU TRIGGER                               */
/* ========================================== */
.menu-trigger {
    background: transparent;
    border: 1px solid var(--red);
    color: var(--red);
    padding: 4px 12px;
    font-size: 22px;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.menu-trigger:hover {
    background: var(--red);
    color: var(--black);
    box-shadow: 0 0 20px rgba(255, 0, 51, 0.3);
}

.mono-caption {
    font-family: var(--font-mono);
    font-size: 8px;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========================================== */
/* MAIN CONTENT & ACCORDIONS                  */
/* ========================================== */
.content-area,
main.content-area {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 20px 80px 20px !important;
}

.content-section {
    background: rgba(10, 15, 10, 0.85);
    border: 1px solid #333333;
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.content-section:hover {
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.8);
    border-color: #444;
}

.section-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: background 0.2s ease;
    position: relative;
}

.section-summary::-webkit-details-marker {
    display: none;
}

.section-summary:hover {
    background: rgba(255, 0, 0, 0.05);
}

.section-summary h2 {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--white);
    margin: 0;
    font-family: var(--font-mono);
    letter-spacing: 3px;
}

.summary-indicator {
    font-size: 1.8rem;
    color: var(--red);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 100;
    line-height: 1;
}

.content-section[open] .summary-indicator {
    transform: rotate(45deg);
}

.section-content {
    padding: 20px 25px 30px 25px;
    border-top: 1px solid #222;
    animation: fadeInContent 0.35s ease;
}

@keyframes fadeInContent {
    0% { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 1; transform: translateY(0); }
}
/* Ensure clickable node styling matches terminal aesthetics */
/* ── TELEMETRY WORD WALL CONTAINER ── */
.ink-wordwall {
  width: 100%;
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
  box-sizing: border-box;
  overflow: hidden;
}

/* ── RESPONSIVE GRID (3 columns on Desktop/Laptop, 2 on Tablet, 1 on Mobile) ── */
.ink-wall-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

/* ── INDIVIDUAL NODE TILES ── */
.ink-wall-item.tele-node {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #080808;
  border: 1px solid #222;
  padding: 12px 14px;
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(0.72rem, 0.95vw, 0.88rem); /* fluid scale */
  letter-spacing: 1px;
  color: #ccc;
  text-decoration: none;
  cursor: crosshair;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.ink-wall-item.tele-node:hover {
  background: rgba(255, 0, 0, 0.08);
  border-color: var(--red, #ff0033);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 0, 51, 0.25);
  transform: translateY(-1px);
}

.tele-tag {
  color: var(--red, #ff0000);
  font-weight: bold;
  flex-shrink: 0;
}

.tele-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── TABLET BREAKPOINT (2 Columns) ── */
@media (max-width: 900px) {
  .ink-wall-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ── MOBILE BREAKPOINT (1 Column Stack) ── */
@media (max-width: 540px) {
  .ink-wall-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .ink-wall-item.tele-node {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
}
/* ========================================== */
/* SECTION HOVER PREVIEW                      */
/* ========================================== */
.section-preview {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 100;
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid rgba(255, 0, 51, 0.3);
    border-radius: 4px;
    padding: 4px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9), 0 0 15px rgba(255, 0, 51, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    width: 120px;
    height: 80px;
    overflow: hidden;
}

.section-summary:hover .section-preview {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    border-color: var(--red);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 0, 51, 0.2);
}

.section-preview img, 
.section-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 2px;
    filter: grayscale(30%) contrast(1.1);
    transition: filter 0.3s ease;
}

.section-summary:hover .section-preview img,
.section-summary:hover .section-preview video {
    filter: grayscale(0%) contrast(1.1);
}

.section-preview .preview-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #888;
    font-family: var(--font-mono);
    font-size: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 6px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section-summary:hover .section-preview .preview-label {
    opacity: 1;
}

/* ========================================== */
/* ASCII TERMINAL                             */
/* ========================================== */
.artifact-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}

.artifact-terminal {
    width: 100%;
    max-width: 800px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--grey);
    backdrop-filter: blur(5px);
    margin-top: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 4px;
    overflow: hidden;
}

.terminal-header {
    background: var(--grey);
    color: var(--white);
    padding: 8px 15px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blink {
    animation: blinker 1s linear infinite;
    color: var(--red);
}

@keyframes blinker {
    50% { opacity: 0; }
}

.terminal-controls {
    padding: 15px 20px;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.tech-input {
    flex: 1;
    min-width: 120px;
    background: #050505;
    border: 1px solid #333;
    color: var(--white);
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    outline: none;
    transition: 0.3s;
    border-radius: 2px;
}

.tech-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 10px rgba(255, 0, 51, 0.1);
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid #333;
    color: #888;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px;
}

.tech-btn:hover {
    border-color: var(--red);
    color: var(--white);
    box-shadow: 0 0 8px rgba(255, 0, 51, 0.2);
}

.tech-btn.btn-primary {
    border-color: var(--white);
    color: var(--white);
}

.tech-btn.btn-primary:hover {
    background: var(--red);
    border-color: var(--red);
    color: #000;
}

.terminal-screen {
    height: 350px;
    background: #000;
    color: var(--red);
    padding: 20px;
    overflow-y: auto;
    font-family: 'VT323', monospace;
    font-size: 14px;
    line-height: 1.2;
    white-space: pre;
    letter-spacing: 0px;
    border-bottom: 1px solid var(--grey);
    scrollbar-width: thin;
    scrollbar-color: var(--red) #000;
}

/* ========================================== */
/* CUSTOM TERMINAL DROPDOWN                   */
/* ========================================== */
.custom-select-container {
    position: relative;
    width: 180px;
    flex-shrink: 0;
}

.custom-select-container select {
    display: none;
}

.select-selected {
    background-color: #0a0a0a;
    border: 1px solid #333;
    color: var(--red);
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.3s;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 2px;
}

.select-selected:after {
    position: absolute;
    content: "▼";
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--red);
}

.select-selected.select-arrow-active:after {
    content: "▲";
}

.select-selected:hover {
    border-color: var(--red);
    box-shadow: 0 0 10px rgba(255, 0, 51, 0.2);
}

.select-items {
    position: absolute;
    background-color: #000;
    border: 1px solid #333;
    border-top: none;
    z-index: 9999;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    border-radius: 0 0 2px 2px;
}

.select-items div {
    color: #aaa;
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    border-bottom: 1px solid #222;
    transition: all 0.2s;
    white-space: nowrap;
}

.select-items div:hover,
.select-items div.same-as-selected {
    background-color: var(--red);
    color: #000;
}

.select-hide {
    display: none;
}

.terminal-footer {
    padding: 8px 20px;
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
}

.terminal-footer .status-text {
    color: #444;
    font-size: 8px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================== */
/* 1. TOP FOOTER (.footer-grey)               */
/* ========================================== */
.footer-grey {
    background: #0d0d0d;
    color: #777;
    padding: 30px 20px;
    text-align: center;
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.8;
    border-top: 1px solid #222;
}

.footer-grey #system-message,
.footer-grey #status-message {
    font-family: 'VT323', monospace;
    font-size: 14px;
    color: #999;
}

.footer-grey .menu-link {
    color: var(--red, #ff0033);
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 2px;
}

.footer-grey .menu-link:hover {
    text-shadow: 0 0 8px var(--red, #ff0033);
}

/* ========================================== */
/* 2. BOTTOM UNIFIED FOOTER & POD             */
/* ========================================== */
.site-footer {
    position: relative;
    width: 100%;
    clear: both;
    padding: 40px 20px;
    background: #050505;
    border-top: 1px solid #222;
}

.site-footer .triangle-video-wrapper {
    margin: 0;
}

.site-footer .triangle-video-frame {
    width: 75px;
    height: 75px;
    cursor: pointer;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background: var(--red, #ff0033);
    padding: 2px;
    transition: transform 0.25s ease;
}

.site-footer .triangle-video-frame:hover {
    transform: scale(1.08);
}

.site-footer .triangle-inner-video {
    width: 100%;
    height: 100%;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background: #000;
    overflow: hidden;
}

.site-footer .triangle-inner-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* EXPAND ON CLICK */
.site-footer .triangle-video-frame.expanded,
#gram-qr.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(3.5);
    z-index: 100000;
    clip-path: none;
}

.site-footer .triangle-video-frame.expanded .triangle-inner-video {
    clip-path: none;
}

/* ELEVATED BACK-TO-TOP BUTTON */
#back-to-top,
.back-to-top,
.to-top-btn {
    position: fixed !important;
    bottom: 75px !important;
    right: 25px !important;
    z-index: 9999 !important;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--red);
    color: var(--red);
    padding: 8px 12px;
    font-family: 'VT323', monospace;
    font-size: 13px;
    cursor: pointer;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    transition: all 0.25s ease;
}

#back-to-top:hover,
.back-to-top:hover,
.to-top-btn:hover {
    background: var(--red);
    color: #000;
}

/* ========================================== */
/* CUBE OVERLAY MENU                          */
/* ========================================== */
.menu-overlay {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 5, 0.98);
    z-index: 99999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Supports both JS inline display and class toggling */
.menu-overlay.active,
.menu-overlay.open {
    display: flex !important;
}

.menu-close-hint {
    color: #666;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    margin-bottom: 40px;
    text-transform: uppercase;
    user-select: none;
}

.menu-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 60px;
    max-width: 900px;
}

.prism-wrapper { 
    position: relative; 
    text-align: center;
}

.prism-label {
    text-align: center;
    font-size: 10px;
    color: var(--red);
    margin-bottom: 20px;
    letter-spacing: 3px;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.prism-scene {
    width: 120px;
    height: 80px;
    perspective: 800px;
    -webkit-perspective: 800px;
    margin: 0 auto;
}

.prism {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transform: translateZ(-35px);
    animation: menuSpin 8s infinite linear;
}

.prism:hover { 
    animation-play-state: paused; 
}

.face {
    position: absolute;
    width: 120px;
    height: 80px;
    border: 1px solid var(--red);
    background: rgba(0, 0, 0, 0.92);
    color: var(--white) !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 0, 51, 0.25);
    font-family: var(--font-mono);
    transition: all 0.25s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.face:hover {
    background: var(--red);
    color: var(--black) !important;
    box-shadow: 0 0 30px rgba(255, 0, 51, 0.6);
}

.prism .face-1 { transform: rotateY(0deg) translateZ(35px); }
.prism .face-2 { transform: rotateY(120deg) translateZ(35px); }
.prism .face-3 { transform: rotateY(240deg) translateZ(35px); }

@keyframes menuSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* ========================================== */
/* MOBILE ADAPTATION                          */
/* ========================================== */
@media(max-width: 768px) {
    body { padding-top: 60px; }
    .site-header { height: 50px; padding: 0 12px; }
    .header-title { font-size: 11px; letter-spacing: 2px; }
    .section-preview { display: none; }
    .input-group, .btn-group { flex-direction: column; }
    .custom-select-container, .tech-btn { width: 100%; }
    .terminal-screen { height: 250px; font-size: 11px; padding: 12px; }

    /* Scale Down 3D Prisms on Mobile */
    .menu-grid {
        gap: 35px;
    }

    .prism-scene {
        width: 80px;
        height: 60px;
        perspective: 600px;
        -webkit-perspective: 600px;
    }

    .prism {
        transform: translateZ(-25px);
    }

    .face {
        width: 80px;
        height: 60px;
        font-size: 9px;
    }

    .prism .face-1 { transform: rotateY(0deg) translateZ(25px); }
    .prism .face-2 { transform: rotateY(120deg) translateZ(25px); }
    .prism .face-3 { transform: rotateY(240deg) translateZ(25px); }
}
/* ======================================================= */
/* MOBILE FIX FOR DISPATCH 00.2 (ZERO TEXT CUTOFF / NO JUMP)*/
/* ======================================================= */

/* 1. Give the inner text container a touch-scroll safety valve */
#tz-story-body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #550000 transparent;
}

/* 2. On mobile screens (under 480px), give the stage breathing room
      and scale the text down slightly so it naturally fits */
@media (max-width: 480px) {
    #tz-stage {
        height: 570px !important; /* gives narrow viewports the ~40px needed */
    }
    
    #tz-overlay {
        padding: 12px 14px !important; /* reclaim padding for text */
    }

    #tz-story-body p {
        font-size: 11px !important;     /* scales 12px down to 11px */
        line-height: 1.35 !important;   /* tightens vertical line spacing */
        margin-bottom: 5px !important;  /* trims empty paragraph margins */
    }
}
/* ── HIDDEN WHEN COLLAPSED ── */
details:not([open]) .dispatch-manga-thumb {
  display: none !important;
}

/* ── VISIBLE WHEN DETAILS IS OPENED ── */
details[open] .dispatch-manga-thumb {
  display: block;
  height: 60px;
  width: auto;
  border: 1px solid #440000;
  cursor: pointer;
  border-radius: 2px;
  flex-shrink: 0;
  transition: border-color 0.25s ease, filter 0.25s ease;
}

.dispatch-manga-thumb:hover {
  border-color: var(--red, #ff0000);
  filter: brightness(1.2);
}

/* ── REASONABLE FULL-VIEW EXPANSION ── */
.dispatch-manga-thumb.expanded {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  height: auto !important;
  max-height: 82vh !important;
  width: auto !important;
  max-width: min(520px, 88vw) !important;
  z-index: 999999 !important;
  border: 1px solid #ffffff !important;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.88), 0 0 50px rgba(0, 0, 0, 0.95) !important;
  cursor: zoom-out !important;
  filter: none !important;
}
