/* ==========================================================================
   CHAZFAB MAINFRAME // Clean 3-Zone Responsive Stylesheet
   Pure HTML + CSS (Pixel-Arcade Neon + Cyber-Violet + TRON Cyan Grid)
   ========================================================================== */

@font-face {
  font-family: "Press Start 2P";
  src: url("./assets/fonts/press-start-2p.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "VT323";
  src: url("./assets/fonts/vt323.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Share Tech Mono";
  src: url("./assets/fonts/share-tech-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* MANDATORY (dark-mode guide): declare color-scheme on :root */
  color-scheme: light dark;

  --void: #020406;
  --card-bg: rgba(6, 12, 20, 0.86);
  --card-art-bg: #03070d;
  --neon-green: #00ff41;
  --neon-green-glow: rgba(0, 255, 65, 0.36);
  --cyber-violet: #9d4edd;
  --titlebar-violet: #5a189a;
  --tron-cyan: #00e5ff;
  --tron-cyan-glow: rgba(0, 229, 255, 0.28);
  --laser-red: #ff2800;
  --ink: #e8fff0;
  --ink-muted: #8ec9a9;

  --font-display: "Press Start 2P", ui-monospace, monospace;
  --font-terminal: "VT323", "Share Tech Mono", ui-monospace, monospace;
  --font-mono: "Share Tech Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--void);
  color: var(--ink);
  font-family: var(--font-mono);
  line-height: 1.5;
  scroll-behavior: smooth;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* ==========================================================================
   1. CLEAN 3-ZONE MAINFRAME SHELL + BACKGROUND TRON GRID & SUBTLE SCANLINES
      Explicitly pairs color-scheme: dark with background-color & color.
      Background layers stay at z-index 1..2 BEHIND content (z-index: 10)
      so logos and cards are never sliced by horizontal scanlines.
   ========================================================================== */
.mainframe-shell {
  color-scheme: dark;
  background-color: var(--void);
  color: var(--ink);
  accent-color: var(--tron-cyan);

  min-height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: clip;
}

.tron-grid-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.tron-horizon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--tron-cyan);
  box-shadow:
    0 0 14px var(--tron-cyan),
    0 0 32px var(--tron-cyan-glow);
}

.tron-grid-plane {
  position: absolute;
  left: -35%;
  right: -35%;
  top: -12%;
  bottom: -60%;
  background-image:
    linear-gradient(to right, rgba(0, 229, 255, 0.36) 1.4px, transparent 1.4px),
    linear-gradient(to bottom, rgba(0, 229, 255, 0.36) 1.4px, transparent 1.4px);
  background-size: 48px 48px;
  transform: perspective(380px) rotateX(68deg) translate3d(0, 0, 0);
  transform-origin: center top;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.72) 28%, #000 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.72) 28%, #000 100%);
}

/* Subtle scanlines behind UI cards & brand logos */
.scanlines-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.16;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.45) 2px 4px
  );
  transition: opacity 0.2s ease;
}

@keyframes tronGridScroll {
  from { transform: perspective(380px) rotateX(68deg) translate3d(0, 0, 0); }
  to   { transform: perspective(380px) rotateX(68deg) translate3d(0, 48px, 0); }
}

@keyframes logoBloom {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(0, 255, 65, 0.45)); }
  50%      { filter: drop-shadow(0 0 12px rgba(0, 255, 65, 0.85)); }
}

@keyframes cardReveal {
  from { opacity: 0; transform: translate3d(0, 6px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes cursorPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.22; }
}

@media (prefers-reduced-motion: no-preference) {
  .mainframe-shell:has(#gridDrive:checked) .tron-grid-plane,
  .mainframe-shell.has-grid-drive .tron-grid-plane {
    animation: tronGridScroll 1.8s linear infinite;
    will-change: transform;
  }

  .brand-logo-img,
  .dossier-logo-img {
    animation: logoBloom 3.4s ease-in-out infinite;
  }

  .clean-card,
  .sysop-dossier {
    animation: cardReveal 0.28s ease-out both;
  }

  .terminal-cursor {
    animation: cursorPulse 1.1s ease-in-out infinite;
  }
}

/* ==========================================================================
   2. ZONE 1 — SLIM UNIFIED CYBER-VIOLET TOP HEADER BAR
   ========================================================================== */
.mainframe-topbar {
  position: relative;
  z-index: 10;
  min-height: 56px;
  padding: 0.45rem 1.25rem;
  background: linear-gradient(90deg, #3b0764 0%, #240046 60%, #17022d 100%);
  border-bottom: 1.5px solid rgba(0, 229, 255, 0.55);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.3rem 0.72rem;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: #f3e8ff;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.nav-tab:hover,
.nav-tab:focus-visible {
  color: var(--neon-green);
  border-color: rgba(0, 255, 65, 0.55);
  background: rgba(6, 28, 16, 0.75);
  outline: 2px solid var(--tron-cyan);
  outline-offset: 2px;
}

.nav-tab[aria-current="page"] {
  background: #061c10;
  color: var(--neon-green);
  border: 1.5px solid var(--neon-green);
  box-shadow: 0 0 12px var(--neon-green-glow);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.avatar-pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1.5px solid var(--tron-cyan);
  background: #000000;
  overflow: hidden;
  box-shadow: 0 0 10px var(--tron-cyan-glow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.avatar-pill-link:hover,
.avatar-pill-link:focus-visible {
  border-color: var(--neon-green);
  box-shadow: 0 0 14px var(--neon-green-glow);
}

.avatar-pill-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  display: block;
}

.mobile-menu-trigger {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  border: 1.5px solid var(--tron-cyan);
  background: rgba(4, 14, 26, 0.85);
  color: var(--tron-cyan);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.mobile-menu-trigger:hover,
.mobile-menu-trigger:focus-visible {
  background: var(--tron-cyan);
  color: #021018;
}

/* ==========================================================================
   3. ZONE 2 — SPACIOUS MAIN STAGE & CLEAN CARDS
   ========================================================================== */
.mainframe-stage {
  position: relative;
  z-index: 10;
  flex: 1 0 auto;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.page-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.page-title {
  margin: 0;
  font-family: var(--font-terminal);
  font-size: 1.9rem;
  line-height: 1.1;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.page-note {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
}

.hub-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hub-wide {
  grid-column: 1 / -1;
}

.clean-card {
  background: var(--card-bg);
  border: 1.5px solid rgba(0, 229, 255, 0.42);
  border-radius: 6px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.clean-card:hover {
  border-color: rgba(0, 229, 255, 0.82);
  box-shadow: 0 12px 34px rgba(0, 229, 255, 0.14);
}

.clean-card--green {
  border-color: rgba(0, 255, 65, 0.52);
}

.clean-card--green:hover {
  border-color: var(--neon-green);
  box-shadow: 0 12px 34px rgba(0, 255, 65, 0.16);
}

.clean-card--violet {
  border-color: rgba(157, 78, 221, 0.55);
}

.clean-card--violet:hover {
  border-color: var(--cyber-violet);
  box-shadow: 0 12px 34px rgba(157, 78, 221, 0.18);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-title {
  margin: 0;
  font-family: var(--font-terminal);
  font-size: 1.55rem;
  line-height: 1.1;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-transform: uppercase;
}

.status-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid var(--tron-cyan);
  color: var(--tron-cyan);
  background: rgba(0, 229, 255, 0.08);
  white-space: nowrap;
}

.status-pill--live {
  border-color: var(--neon-green);
  color: var(--neon-green);
  background: rgba(0, 255, 65, 0.1);
}

.status-pill--wip {
  border-color: var(--laser-red);
  color: #ff9c8a;
  background: rgba(255, 40, 0, 0.12);
}

.card-art {
  background: var(--card-art-bg);
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 4px;
  aspect-ratio: 16 / 8.5;
  display: grid;
  place-items: center;
  padding: 0.75rem;
  overflow: hidden;
}

.card-art svg {
  width: 100%;
  height: 100%;
  max-height: 185px;
  display: block;
}

.card-desc {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  color: var(--ink-muted);
}

.code-preview {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: #020805;
  color: var(--neon-green);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: auto;
}

.enter-btn,
.btn-play,
.btn-raw {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.45rem 0.85rem;
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.enter-btn {
  width: 100%;
  border: 1px solid rgba(0, 229, 255, 0.5);
  background: rgba(4, 20, 34, 0.8);
  color: var(--ink);
}

.enter-btn:hover,
.enter-btn:focus-visible {
  background: #062112;
  color: var(--neon-green);
  border-color: var(--neon-green);
  box-shadow: 0 0 12px var(--neon-green-glow);
}

.btn-play {
  flex: 1 1 auto;
  border: 1.5px solid var(--neon-green);
  background: rgba(4, 27, 11, 0.88);
  color: var(--neon-green);
}

.btn-play:hover,
.btn-play:focus-visible {
  background: var(--neon-green);
  color: #021406;
  box-shadow: 0 0 12px var(--neon-green-glow);
}

.btn-raw {
  flex: 1 1 auto;
  border: 1.5px solid var(--tron-cyan);
  background: rgba(4, 19, 34, 0.88);
  color: var(--tron-cyan);
}

.btn-raw:hover,
.btn-raw:focus-visible {
  background: var(--tron-cyan);
  color: #021018;
  box-shadow: 0 0 12px var(--tron-cyan-glow);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.spec-table th,
.spec-table td {
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.22);
}

.spec-table th {
  color: var(--tron-cyan);
  font-size: 0.78rem;
  text-transform: uppercase;
}

/* ==========================================================================
   4. CLEAN 2-COLUMN SYSOP DOSSIER (Matches Render 1)
   ========================================================================== */
.sysop-dossier {
  background: var(--card-bg);
  border: 1.5px solid rgba(0, 229, 255, 0.42);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
  display: grid;
  grid-template-columns: minmax(210px, 280px) 1fr;
  gap: 2rem;
  align-items: center;
}

.sysop-portrait-frame {
  background: #03070d;
  border: 1.5px solid rgba(0, 229, 255, 0.35);
  border-radius: 6px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sysop-portrait-img {
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto;
  display: block;
  image-rendering: pixelated;
  background: #000000;
  border-radius: 4px;
}

.sysop-portrait-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.online-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--neon-green);
  font-weight: 700;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
}

.dossier-right {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.dossier-logo-img {
  width: min(100%, 300px);
  height: auto;
  display: block;
}

.dossier-bio {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: #d6f5e3;
  max-width: 52ch;
}

.bench-group-label {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.bench-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bench-pill {
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.45);
  background: rgba(4, 18, 28, 0.85);
  color: var(--ink);
  font-size: 0.82rem;
}

.social-grid {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.social-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 68px;
  padding: 0.55rem 0.5rem;
  border-radius: 5px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(3, 10, 18, 0.9);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.78rem;
  text-align: center;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.social-tile svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-tile:hover,
.social-tile:focus-visible {
  border-color: var(--neon-green);
  color: var(--neon-green);
  background: rgba(4, 24, 11, 0.9);
  box-shadow: 0 0 12px var(--neon-green-glow);
}

/* ==========================================================================
   5. ZONE 3 — SINGLE SLIM BOTTOM BAR (C:\CHAZFAB> + [GRID] [SFX])
   ========================================================================== */
.mainframe-bottombar {
  position: relative;
  z-index: 10;
  min-height: 44px;
  padding: 0.38rem 1.25rem;
  background: rgba(4, 8, 14, 0.94);
  border-top: 1px solid rgba(0, 229, 255, 0.38);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.terminal-inline-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  flex: 1 1 300px;
  min-width: 0;
}

.terminal-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 220px;
  min-width: 0;
}

.terminal-prompt-label {
  color: var(--tron-cyan);
  font-size: 0.92rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--neon-green);
}

.terminal-input {
  flex: 1 1 140px;
  min-width: 0;
  background: transparent;
  color: var(--neon-green);
  border: 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.32);
  padding: 0.2rem 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.terminal-input::placeholder {
  color: rgba(142, 201, 169, 0.52);
}

.terminal-input:focus {
  outline: none;
  border-bottom-color: var(--neon-green);
}

.terminal-output {
  font-size: 0.78rem;
  color: var(--neon-green);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 44ch;
}

.terminal-output:empty {
  display: none;
}

.bottom-toggles {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 30px;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(6, 14, 24, 0.85);
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.toggle-pill:hover {
  border-color: var(--tron-cyan);
  color: var(--ink);
}

.toggle-pill:has(input:checked) {
  border-color: var(--neon-green);
  color: var(--neon-green);
  background: rgba(4, 24, 11, 0.85);
}

.toggle-pill input {
  margin: 0;
  accent-color: currentColor;
}

/* ==========================================================================
   6. MOBILE SWIPE-TO-DISMISS <DIALOG> DRAWER (navigation-drawer guide)
   ========================================================================== */
.Drawer {
  --drawer-width: min(20em, 80dvw, 100dvw - 24px);
  --drawer-backdrop: 0;

  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  overflow: visible;
}

.Drawer::backdrop {
  background: #000000;
  opacity: calc(var(--drawer-backdrop) * 0.76);
}

.Drawer-scroller {
  position: relative;
  display: grid;
  grid-template-columns: var(--drawer-width) 100%;
  overflow-x: scroll;
  overscroll-behavior: none;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

@media (prefers-reduced-motion: no-preference) {
  .Drawer-scroller {
    scroll-behavior: smooth;
  }
}

.Drawer-scroller::after {
  content: "";
  scroll-snap-align: end;
  scroll-initial-target: nearest;
}

.Drawer-sheet {
  color-scheme: dark;
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100svh;
  background-color: #080412;
  color: var(--ink);
  border-right: 2px solid var(--tron-cyan);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.35);
  overflow-y: auto;
  scroll-snap-align: start;
  scrollbar-width: none;
  padding: 0.9rem;
  gap: 0.9rem;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid var(--cyber-violet);
  padding-bottom: 0.65rem;
}

.drawer-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--neon-green);
}

.drawer-close-btn {
  min-width: 44px;
  min-height: 44px;
  background: #1a0606;
  color: var(--laser-red);
  border: 1.5px solid var(--laser-red);
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
}

.drawer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  color: var(--ink);
  background: #060e1c;
  border: 1.5px solid var(--tron-cyan);
  font-weight: 700;
}

.drawer-link[aria-current="page"] {
  background: #041d0b;
  border-color: var(--neon-green);
  color: var(--neon-green);
}

@supports (animation-timeline: scroll()) {
  .Drawer {
    timeline-scope: --drawer-fade;
    animation: fade-drawer-backdrop linear both;
    animation-timeline: --drawer-fade;
  }

  .Drawer-scroller {
    scroll-timeline: --drawer-fade x;
  }

  @property --drawer-backdrop {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
  }

  @keyframes fade-drawer-backdrop {
    0%   { --drawer-backdrop: 1; }
    100% { --drawer-backdrop: 0; }
  }
}

/* ==========================================================================
   7. FRAMED APP VIEWER (viewer.html)
   ========================================================================== */
.viewer-body {
  margin: 0;
  padding: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--void);
  color: var(--ink);
  overflow: hidden;
}

.viewer-topbar {
  min-height: 44px;
  padding: 0.35rem 0.85rem;
  background: linear-gradient(90deg, #3b0764, #240046);
  border-bottom: 1.5px solid var(--tron-cyan);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.viewer-file-label {
  color: var(--neon-green);
  font-weight: 700;
  word-break: break-all;
}

.viewer-frame {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  background: #000000;
}

/* ==========================================================================
   8. RESPONSIVE BREAKPOINTS (TABLET <=980px, PHONE <680px)
   ========================================================================== */
@media (max-width: 980px) {
  .hub-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .social-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sysop-dossier {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding: 1.25rem;
  }
}

@media (max-width: 679px) {
  .mainframe-topbar {
    padding: 0.45rem 0.85rem;
  }

  .top-nav {
    display: none;
  }

  .mobile-menu-trigger {
    display: inline-flex;
  }

  .mainframe-stage {
    padding: 1.25rem 0.85rem 1.75rem;
    gap: 1rem;
  }

  .hub-grid,
  .hub-grid--3 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .mainframe-bottombar {
    padding: 0.45rem 0.85rem;
  }
}
