@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Space+Grotesk:wght@400;600;700&display=swap');

:root {
  --mac-bg: #120024;
  --mac-plat: #dddddd;
  --mac-plat-mid: #cccccc;
  --mac-plat-dark: #777777;
  --mac-plat-light: #ffffff;
  --gz-lime: #b6ff00;
  --gz-pink: #ff2bd6;
  --gz-cyan: #00f5ff;
  --gz-yellow: #ffe600;
  --gz-red: #ff2442;
  --gz-purple: #843bff;
  --font-pixel: 'Press Start 2P', 'Courier New', monospace;
  --font-ui: 'Space Grotesk', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--mac-bg);
  color: #fff;
  font-family: var(--font-ui);
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* Classic Mac OS System 7 diagonal stipple desktop meets Acid Y2K cyber grid */
body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  background-color: #16042b;
  background-image:
    radial-gradient(circle at 16% 18%, rgba(255, 43, 214, 0.25), transparent 36%),
    radial-gradient(circle at 84% 12%, rgba(0, 245, 255, 0.2), transparent 32%),
    radial-gradient(circle at 50% 75%, rgba(182, 255, 0, 0.14), transparent 40%),
    repeating-conic-gradient(rgba(255, 255, 255, 0.04) 0% 25%, transparent 0% 50%);
  background-size: auto, auto, auto, 4px 4px;
}

body.mode-gameboy {
  filter: sepia(100%) hue-rotate(48deg) saturate(260%) contrast(1.15);
}

body.mode-chaos {
  animation: gz-hue 1.8s linear infinite;
}

@keyframes gz-hue {
  from { filter: hue-rotate(0deg) contrast(1.15); }
  to { filter: hue-rotate(360deg) contrast(1.15); }
}

img, video, canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

.gz-wrap {
  width: 100%;
  max-width: 1340px;
  margin-inline: auto;
  padding-inline: clamp(0.85rem, 2.5vw, 2rem);
}

/* =====================================================================
   CLASSIC MAC OS 8/9 PLATINUM TOP MENU BAR (Apple Menu Bar!)
   ===================================================================== */
.mac-menubar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: linear-gradient(180deg, #f3f3f3 0%, #d4d4d4 100%);
  color: #000;
  border-bottom: 2px solid #000;
  box-shadow: 0 4px 0 var(--gz-lime), 0 8px 0 var(--gz-pink);
  font-family: var(--font-pixel);
  font-size: 0.6rem;
}

.mac-menubar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-height: 2.55rem;
  padding-block: 0.3rem;
}

.mac-menu-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.mac-apple-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.6rem;
  background: transparent;
  border: 0;
  color: #000;
  font-weight: 700;
}

.mac-apple-btn:hover,
.mac-menu-item:hover {
  background: #1a247a;
  color: #fff;
}

.mac-menu-item {
  padding: 0.38rem 0.58rem;
  color: #000;
  background: transparent;
  border: 0;
}

.mac-menu-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.gz-btn-audio {
  font-family: var(--font-pixel);
  font-size: 0.56rem;
  padding: 0.4rem 0.68rem;
  background: var(--gz-yellow);
  color: #000;
  border: 2px solid #000;
  border-radius: 5px;
  box-shadow: 2px 2px 0 #000;
}

.gz-btn-audio.is-playing {
  background: var(--gz-lime);
  animation: gz-bounce 0.45s steps(2) infinite alternate;
}

@keyframes gz-bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-2px); }
}

.gz-btn-rain {
  font-family: var(--font-pixel);
  font-size: 0.56rem;
  padding: 0.4rem 0.68rem;
  background: var(--gz-pink);
  color: #fff;
  border: 2px solid #000;
  border-radius: 5px;
  box-shadow: 2px 2px 0 #000;
}

.mac-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.55rem;
  background: #e4e4e4;
  border: 2px solid #000;
  border-radius: 5px;
  box-shadow: 2px 2px 0 #000;
  font-family: var(--font-pixel);
  font-size: 0.54rem;
}

.mac-lang-switch a {
  color: #555;
  text-decoration: none;
  padding: 0.1rem 0.25rem;
}

.mac-lang-switch a:hover,
.mac-lang-switch a.on {
  color: #000;
  background: var(--gz-lime);
}

.mac-lang-switch .sep {
  color: #777;
}

/* Ultra-sober architectural Swiss contrast button inside the Gen-Z chaos */
.hyper-classic-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.95rem;
  background: #050505;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: none;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.hyper-classic-btn:hover,
.hyper-classic-btn:focus-visible {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.hyper-classic-btn--footer {
  padding: 0.75rem 1.45rem;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
}

/* Complete 78-show Mac OS Finder Catalog Section */
.gz-catalog-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: #e9e9e9;
  border-bottom: 2px solid #000;
}

.gz-catalog-search {
  min-width: min(100%, 290px);
  padding: 0.45rem 0.65rem;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.92rem;
}

.gz-catalog-count {
  font-family: var(--font-pixel);
  font-size: 0.56rem;
  color: #1a247a;
}

.gz-full-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 0.85rem;
  background: #0d001c;
  max-height: 760px;
  overflow-y: auto;
}

.gz-full-card {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  padding: 0.85rem;
  background: #17062f;
  border: 2px solid var(--cat-neon, var(--gz-cyan));
  box-shadow: 3px 3px 0 #000;
  color: #fff;
  text-align: left;
  transition: transform 90ms ease, border-color 90ms ease;
}

.gz-full-card:hover {
  transform: translate(-2px, -2px);
  border-color: #fff;
  background: #220b45;
}

.gz-full-cat {
  display: inline-block;
  align-self: flex-start;
  padding: 0.18rem 0.42rem;
  background: var(--cat-neon, var(--gz-cyan));
  color: #000;
  font-family: var(--font-pixel);
  font-size: 0.46rem;
  border: 1.5px solid #000;
}

.gz-full-title {
  margin: 0.1rem 0 0;
  font-family: var(--font-pixel);
  font-size: 0.66rem;
  line-height: 1.45;
  color: #fff;
}

.gz-full-place {
  margin: 0;
  font-size: 0.82rem;
  color: #d6c2ff;
  line-height: 1.3;
}

.gz-full-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.3rem;
}

.gz-mini-badge {
  padding: 0.15rem 0.4rem;
  font-family: var(--font-pixel);
  font-size: 0.44rem;
  border: 1px solid #000;
  color: #000;
  background: var(--gz-lime);
}

.gz-mini-badge.is-gold {
  background: var(--gz-yellow);
}

.gz-mini-badge.is-dlabs {
  background: var(--gz-cyan);
}

@media (max-width: 980px) {
  .gz-full-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .gz-full-list {
    grid-template-columns: 1fr;
  }
}

.gz-btn-classic {
  font-family: var(--font-pixel);
  font-size: 0.56rem;
  padding: 0.42rem 0.78rem;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 6px;
  box-shadow: 3px 3px 0 #1a247a;
  transition: transform 90ms ease, background-color 90ms ease;
}

.gz-btn-classic:hover {
  background: var(--gz-lime);
  transform: translate(-1px, -1px);
}

/* Marquee Ticker + Web 1.0 Construction GIF */
.gz-marquee {
  background: var(--gz-yellow);
  color: #000;
  border-bottom: 3px solid #000;
  overflow: hidden;
  white-space: nowrap;
  padding-top: calc(8px + 0.48rem);
  padding-bottom: 0.44rem;
  line-height: 1;
  font-family: var(--font-pixel);
  font-size: 0.64rem;
  display: flex;
  align-items: center;
}

.gz-marquee-track {
  display: inline-block;
  padding-left: 100%;
  animation: gz-scroll 28s linear infinite;
}

@keyframes gz-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.gz-banner-gifs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-top: 1.25rem;
}

.gz-banner-gifs img {
  border: 3px solid #000;
  box-shadow: 4px 4px 0 var(--gz-pink);
}

/* Desktop Icons Strip */
.lbl-mob {
  display: none;
}

.mac-desktop-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  justify-content: flex-end;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.mac-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.42rem;
  background: transparent;
  border: 0;
  color: #fff;
  width: 112px;
  padding: 0;
  text-align: center;
}

.mac-icon-btn span.ic-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  filter: drop-shadow(3px 3px 0 #000);
  transition: transform 110ms ease;
}

.mac-pixel-svg {
  width: 38px;
  height: 38px;
  display: block;
  shape-rendering: crispEdges;
}

.mac-icon-btn:hover span.ic-glyph {
  transform: scale(1.12) rotate(-4deg);
}

.mac-icon-btn span.ic-name {
  font-family: var(--font-pixel);
  font-size: 0.46rem;
  line-height: 1.38;
  padding: 0.22rem 0.36rem;
  background: #000;
  color: #fff;
  border: 1px solid #fff;
  max-width: 100%;
  word-break: break-word;
}

.mac-icon-btn:hover span.ic-name {
  background: #1a247a;
  border-color: var(--gz-lime);
}

/* Sections */
.gz-section {
  padding-block: clamp(1.85rem, 3.8vw, 3.25rem);
}

.gz-h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-pixel);
  font-size: clamp(0.95rem, 2.1vw, 1.48rem);
  line-height: 1.45;
  color: var(--gz-lime);
  text-shadow: 3px 3px 0 var(--gz-pink), -2px -2px 0 #000;
}

.gz-sub {
  margin: 0 0 1.4rem;
  font-size: 1.04rem;
  color: #eeddff;
  max-width: 72ch;
}

.gz-badge-pov {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  padding: 0.42rem 0.72rem;
  background: var(--gz-pink);
  color: #000;
  border: 3px solid #fff;
  box-shadow: 4px 4px 0 #000;
  transform: rotate(-1.5deg);
}

.gz-hero-title {
  margin: 0.75rem 0 0.5rem;
  font-family: var(--font-pixel);
  font-size: clamp(1.1rem, 2.5vw, 1.9rem);
  line-height: 1.42;
  color: #fff;
  text-shadow: 4px 4px 0 #1a247a, -2px 0 var(--gz-pink), 2px 0 var(--gz-cyan);
}

.gz-hero-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

/* =====================================================================
   CLASSIC MAC OS 8/9 PLATINUM WINDOW CHROME
   ===================================================================== */
.mac-win {
  background: var(--mac-plat);
  color: #000;
  min-width: 0;
  max-width: 100%;
  border: 2.5px solid #000;
  box-shadow:
    inset 2px 2px 0 #fff,
    inset -2px -2px 0 #8f8f8f,
    6px 6px 0 #000;
  display: flex;
  flex-direction: column;
}

.mac-win-bar {
  position: relative;
  height: 28px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #d6d6d6;
  background-image: repeating-linear-gradient(
    0deg,
    #fff 0px,
    #fff 1px,
    #8c8c8c 1px,
    #8c8c8c 2px,
    #d6d6d6 2px,
    #d6d6d6 3px
  );
  border-bottom: 2px solid #000;
}

.mac-win-bar.is-bomb {
  background-color: #ffd8df;
  background-image: repeating-linear-gradient(
    0deg,
    #fff 0px,
    #fff 1px,
    #cc4466 1px,
    #cc4466 2px,
    #ffd8df 2px,
    #ffd8df 3px
  );
}

.mac-win-close,
.mac-win-shade {
  width: 15px;
  height: 15px;
  background: #e8e8e8;
  border: 1.5px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #888;
  flex-shrink: 0;
  z-index: 2;
}

.mac-win-shade {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mac-win-shade::after {
  content: '';
  width: 9px;
  height: 3px;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}

.mac-win-title {
  background: #d6d6d6;
  padding: 1px 10px;
  font-family: var(--font-pixel);
  font-size: 0.54rem;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 54px);
}

.mac-win-bar.is-bomb .mac-win-title {
  background: #ffd8df;
  color: #700018;
}

.mac-win-body {
  padding: 0.7rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Authentic Classic Mac OS Rounded Buttons */
.mac-btn {
  padding: 0.42rem 0.85rem;
  background: linear-gradient(180deg, #fff 0%, #d4d4d4 100%);
  color: #000;
  border: 2px solid #000;
  border-radius: 6px;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #888;
  font-family: var(--font-pixel);
  font-size: 0.53rem;
}

.mac-btn:active {
  background: #222;
  color: #fff;
}

.mac-btn.is-default {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px #000;
}

.mac-btn.is-lime {
  background: var(--gz-lime);
}

.gz-video-frame {
  position: relative;
  background: #000;
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #444;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.gz-video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gz-sticker {
  position: absolute;
  padding: 0.32rem 0.55rem;
  font-family: var(--font-pixel);
  font-size: 0.53rem;
  background: var(--gz-lime);
  color: #000;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
  pointer-events: none;
}

.gz-sticker-tl { top: 0.6rem; left: 0.6rem; transform: rotate(-4deg); }
.gz-sticker-br { bottom: 0.6rem; right: 0.6rem; background: var(--gz-yellow); transform: rotate(3deg); }

.gz-video-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.gz-tdah-strip {
  display: none;
  background: #041908;
  border: 3px solid var(--gz-lime);
  padding: 0.45rem 0.65rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--font-pixel);
  font-size: 0.54rem;
  color: var(--gz-lime);
}

.gz-tdah-strip.is-on {
  display: flex;
}

.mac-win.is-tdah-shaking {
  animation: gz-tdah-shake 0.16s infinite;
}

@keyframes gz-tdah-shake {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-2px, 1.5px) rotate(-0.35deg); }
  50% { transform: translate(2px, -1.5px) rotate(0.35deg); }
  75% { transform: translate(-1.5px, -1px) rotate(-0.2deg); }
  100% { transform: translate(1.5px, 1px) rotate(0.2deg); }
}

/* 5-Second Fullscreen Classic Mac OS 9 Boot Screen */
.gz-mac-boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background-color: #8c8c8c;
  background-image: repeating-conic-gradient(#a4a4a4 0% 25%, #787878 0% 50%);
  background-size: 4px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.mac-boot-happy {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(3px 3px 0 #000);
}

.mac-boot-panel {
  width: min(90vw, 430px);
  background: #e6e6e6;
  color: #000;
  border: 2.5px solid #000;
  box-shadow:
    inset 2px 2px 0 #fff,
    inset -2px -2px 0 #8a8a8a,
    8px 8px 0 #000;
  padding: 2rem 1.75rem 1.55rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.mac-boot-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

.mac-boot-title {
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 2.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #000;
  line-height: 1;
}

.mac-boot-sub {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: #333;
}

.mac-boot-status {
  margin-top: 0.65rem;
  font-family: var(--font-pixel);
  font-size: 0.56rem;
  color: #000;
}

.mac-boot-bar {
  width: 100%;
  max-width: 280px;
  height: 14px;
  background: #fff;
  border: 2px solid #000;
  box-shadow: inset 1px 1px 0 #888;
  overflow: hidden;
}

.mac-boot-fill {
  width: 6%;
  height: 100%;
  background: repeating-linear-gradient(
    -45deg,
    #3b5bdb 0px,
    #3b5bdb 6px,
    #748ffc 6px,
    #748ffc 12px
  );
  transition: width 3.85s linear;
}

.mac-boot-ext-row {
  position: fixed;
  left: 1.25rem;
  bottom: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mac-boot-ext-icon {
  width: 22px;
  height: 22px;
  border: 2px solid #000;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.75), 2px 2px 0 #000;
  display: inline-block;
}

.gz-runner-track {
  flex: 1;
  height: 22px;
  background: repeating-linear-gradient(90deg, #102a14 0 18px, #0a1b0d 18px 36px);
  position: relative;
  overflow: hidden;
  border: 2px solid var(--gz-lime);
}

.gz-runner-sprite {
  position: absolute;
  top: 1px;
  left: 0;
  font-size: 14px;
  display: inline-block;
  animation: gz-run 2.4s linear infinite;
}

@keyframes gz-run {
  0% { left: -5%; transform: scaleX(-1) translateY(0); }
  25% { transform: scaleX(-1) translateY(-4px); }
  50% { left: 50%; transform: scaleX(-1) translateY(0); }
  75% { transform: scaleX(-1) translateY(-4px); }
  100% { left: 102%; transform: scaleX(-1) translateY(0); }
}

/* Chat */
.gz-chat-log {
  flex: 1;
  min-height: 220px;
  max-height: 330px;
  overflow-y: auto;
  background: #090014;
  border: 2px solid #000;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.88rem;
}

.gz-chat-msg {
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--gz-pink);
  color: #f3e8ff;
}

.gz-chat-msg strong {
  color: var(--gz-cyan);
  font-size: 0.82rem;
}

.gz-chat-form {
  display: flex;
  gap: 0.4rem;
}

.gz-chat-form input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  font-family: var(--font-ui);
  font-weight: 600;
}

/* XP Stats + Animated GIFs Strip */
.gz-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.gz-stat-card {
  padding: 1rem;
  background: #140529;
  border: 3px solid var(--gz-lime);
  box-shadow: 5px 5px 0 var(--gz-pink);
  text-align: center;
}

.gz-stat-num {
  display: block;
  font-family: var(--font-pixel);
  font-size: clamp(1.2rem, 2.2vw, 1.75rem);
  color: var(--gz-yellow);
}

.gz-stat-lbl {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  line-height: 1.5;
  color: var(--gz-cyan);
}

.gz-gif-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.gz-gif-card {
  background: #0d001b;
  border: 3px solid var(--gz-yellow);
  box-shadow: 5px 5px 0 var(--gz-cyan);
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
}

.gz-gif-card img {
  border: 2px solid #000;
  image-rendering: pixelated;
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.gz-gif-card span {
  font-family: var(--font-pixel);
  font-size: 0.54rem;
  line-height: 1.5;
  color: var(--gz-lime);
}

/* AI Error Gallery */
.gz-error-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.gz-error-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.gz-err-img-wrap {
  position: relative;
  overflow: hidden;
  border: 2px solid #000;
  background: #000;
  aspect-ratio: 16 / 9;
}

.gz-err-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 160ms ease, transform 160ms ease;
}

.gz-err-img-wrap.glitch-lvl-1 img {
  filter: contrast(1.4) saturate(1.9) hue-rotate(-18deg);
}

.gz-err-img-wrap.glitch-lvl-2 img {
  filter: contrast(1.8) saturate(2.8) invert(0.12);
  image-rendering: pixelated;
  transform: scale(1.06) skewX(-2deg);
}

.gz-err-tag {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.28rem 0.48rem;
  background: var(--gz-red);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  border: 2px solid #000;
}

.gz-err-caption {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

/* =====================================================================
   FAMOUS MEMES CARICATURE HALL
   ===================================================================== */
.gz-memes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  align-items: start;
}

.meme-img-wrap {
  background: #0a0014;
  border: 2px solid #000;
  overflow: hidden;
  display: block;
}

.meme-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.meme-card {
  background: #fff;
  color: #000;
  border: 3px solid #000;
  box-shadow: 6px 6px 0 var(--gz-pink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.meme-head {
  padding: 0.55rem 0.75rem;
  background: #000;
  color: var(--gz-yellow);
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  line-height: 1.4;
}

.meme-split {
  display: grid;
  grid-template-columns: 95px 1fr;
  flex: 1;
}

.meme-emoji-col {
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  padding: 0.75rem;
  border-bottom: 2px solid #000;
  border-right: 2px solid #000;
}

.meme-emoji-col.no { background: #ffd1dc; }
.meme-emoji-col.yes { background: #d2ff80; border-bottom: 0; }

.meme-text-col {
  padding: 0.75rem;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
  border-bottom: 2px solid #000;
}

.meme-text-col.yes {
  border-bottom: 0;
  background: #f6ffe3;
}

.meme-comic {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
  background: linear-gradient(180deg, #fffdf0 0%, #ffeefc 100%);
}

.meme-bubble {
  padding: 0.55rem 0.7rem;
  border: 2px solid #000;
  border-radius: 10px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 3px 3px 0 #000;
}

.meme-bubble.alt {
  background: #dffbff;
  align-self: flex-end;
}

.meme-buttons-panik {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.meme-red-btn {
  flex: 1;
  padding: 0.55rem 0.45rem;
  border: 2px solid #000;
  border-radius: 50px;
  background: #ff2442;
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 0.48rem;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 4px 0 #700010;
}

/* Tier List & Productions */
.gz-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.gz-filter-btn {
  font-family: var(--font-pixel);
  font-size: 0.56rem;
  padding: 0.52rem 0.82rem;
  background: #140529;
  color: #fff;
  border: 2px solid var(--gz-lime);
  box-shadow: 3px 3px 0 #000;
}

.gz-filter-btn.is-active,
.gz-filter-btn:hover {
  background: var(--gz-lime);
  color: #000;
}

.gz-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gz-show-card {
  background: #140529;
  border: 3px solid var(--gz-cyan);
  box-shadow: 5px 5px 0 var(--gz-pink);
  padding: 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: #fff;
  transition: transform 110ms ease;
}

.gz-show-card:hover {
  transform: translate(-3px, -3px);
  border-color: var(--gz-yellow);
}

.gz-tier-pill {
  align-self: flex-start;
  font-family: var(--font-pixel);
  font-size: 0.54rem;
  padding: 0.28rem 0.5rem;
  border: 2px solid #000;
  color: #000;
}

.gz-tier-s { background: var(--gz-yellow); }
.gz-tier-a { background: var(--gz-lime); }
.gz-tier-boss { background: var(--gz-pink); }

.gz-show-card h3 {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 0.76rem;
  line-height: 1.45;
  color: #fff;
}

.gz-show-meta {
  font-size: 0.85rem;
  color: var(--gz-cyan);
  font-weight: 600;
}

.gz-show-roast {
  margin: 0;
  font-size: 0.92rem;
  color: #eadcff;
  line-height: 1.4;
}

.gz-xp-bar {
  height: 10px;
  background: #000;
  border: 2px solid #fff;
  margin-top: auto;
}

.gz-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gz-lime), var(--gz-cyan));
}

/* RPG Lore Bio */
.gz-lore-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.gz-lore-chapters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.gz-quest {
  background: #140529;
  border: 3px solid var(--gz-pink);
  box-shadow: 4px 4px 0 var(--gz-cyan);
  padding: 1rem;
}

.gz-quest-lvl {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--gz-yellow);
  display: block;
  margin-bottom: 0.45rem;
}

.gz-quest h4 {
  margin: 0 0 0.45rem;
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  line-height: 1.45;
  color: var(--gz-lime);
}

.gz-quest p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #f0e6ff;
}

/* 8-Bit Arcade Mini-Game */
.gz-arcade-wrap {
  max-width: 700px;
  margin-inline: auto;
}

#gz-arcade-canvas {
  width: 100%;
  height: auto;
  background: #020804;
  border: 2px solid #000;
  image-rendering: pixelated;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.gz-arcade-slider {
  padding: 0.35rem 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.gz-slider-rail {
  position: relative;
  height: 36px;
  background: repeating-linear-gradient(
    90deg,
    #112817 0px,
    #112817 16px,
    #0a1a0e 16px,
    #0a1a0e 32px
  );
  border: 2.5px solid #000;
  box-shadow: inset 2px 2px 0 #000, 0 2px 0 #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: ew-resize;
}

.gz-slider-hint {
  font-family: var(--font-pixel);
  font-size: 0.46rem;
  color: rgba(182, 255, 0, 0.72);
  letter-spacing: 0.04em;
  pointer-events: none;
  text-align: center;
  padding-inline: 0.5rem;
}

.gz-slider-knob {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: calc(50% - 24px);
  width: 48px;
  background: linear-gradient(180deg, #b6ff00 0%, #7acc00 100%);
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow: 2px 0 0 #ff2bd6, -2px 0 0 #00f5ff;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  pointer-events: none;
}

.gz-arcade-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  padding: 0.5rem 0.65rem;
  background: #000;
  color: var(--gz-lime);
}

.gz-arcade-touch {
  display: flex;
  gap: 0.5rem;
  touch-action: manipulation;
}

/* CLASSIC SAD MAC + SYSTEM BOMB FOOTER */
.mac-crash-footer {
  padding: clamp(2.5rem, 5vw, 4rem) 1rem;
  background-color: #9e9e9e;
  background-image: repeating-conic-gradient(#b6b6b6 0% 25%, #8b8b8b 0% 50%);
  background-size: 4px 4px;
  border-top: 4px solid #000;
  display: flex;
  justify-content: center;
}

.mac-bomb-footer-box {
  width: min(100%, 640px);
}

.mac-bomb-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.mac-sad-icon {
  font-size: 3.1rem;
  flex-shrink: 0;
}

/* Sticker Rain Particle */
.gz-rain-drop {
  position: fixed;
  top: -40px;
  z-index: 95;
  font-size: 2rem;
  pointer-events: none;
  animation: gz-fall 2.6s linear forwards;
}

@keyframes gz-fall {
  to {
    transform: translateY(112vh) rotate(540deg);
    opacity: 0.9;
  }
}

/* Modals */
dialog.mac-dialog {
  width: min(94vw, 600px);
  padding: 0;
  border: 0;
  background: transparent;
}

dialog.mac-dialog::backdrop {
  background: rgba(12, 0, 24, 0.85);
  backdrop-filter: blur(4px);
}

@media (max-width: 980px) {
  .gz-hero-grid,
  .gz-lore-grid,
  .gz-tier-grid,
  .gz-error-grid,
  .gz-memes-grid,
  .gz-gif-trio {
    grid-template-columns: minmax(0, 1fr);
  }
  .gz-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gz-lore-chapters {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .lbl-desk {
    display: none;
  }

  .lbl-mob {
    display: inline;
  }

  .mac-menu-item,
  .mac-finder-lbl {
    display: none;
  }

  .mac-menubar-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.22rem;
    padding-block: 0.32rem;
    padding-inline: 0.4rem;
  }

  .mac-menu-left {
    flex-shrink: 0;
  }

  .mac-apple-btn {
    padding: 0.25rem 0.3rem;
  }

  .mac-menu-right {
    width: auto;
    flex: 1;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.24rem;
    min-width: 0;
  }

  .gz-btn-rain {
    order: 1;
  }

  .gz-btn-audio {
    order: 2;
  }

  .mac-lang-switch {
    order: 3;
    font-size: 0.42rem;
    padding: 0.24rem 0.3rem;
    gap: 0.14rem;
    flex-shrink: 0;
  }

  .mac-lang-switch a {
    padding: 0.08rem 0.16rem;
  }

  .gz-btn-rain,
  .gz-btn-audio {
    font-size: 0.42rem;
    padding: 0.3rem 0.36rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .hyper-classic-btn {
    order: 4;
    font-size: 0.52rem;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.45rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .gz-marquee {
    font-size: 0.52rem;
    padding-top: calc(8px + 0.4rem);
    padding-bottom: 0.36rem;
  }

  .gz-banner-gifs {
    padding-inline: 0.85rem;
    gap: 0.7rem;
  }

  .gz-banner-gifs img {
    width: 100%;
    max-width: 340px;
    height: auto;
  }

  .mac-desktop-icons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem 0.5rem;
    justify-items: center;
    align-items: start;
  }

  .mac-icon-btn {
    width: 100%;
    max-width: 78px;
    min-width: 0;
  }

  .mac-icon-btn span.ic-name {
    font-size: 0.36rem;
    padding: 0.16rem 0.18rem;
    line-height: 1.3;
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }

  .mac-icon-btn--panic {
    grid-column: 1 / -1;
    width: auto;
    max-width: none;
    min-width: 140px;
    flex-direction: row;
    justify-content: center;
    padding: 0.32rem 0.65rem;
  }

  .mac-icon-btn--panic span.ic-name {
    width: auto;
  }

  .gz-error-toolbar {
    flex-wrap: nowrap;
    gap: 0.3rem;
  }

  .gz-error-toolbar .mac-btn {
    flex: 1;
    min-width: 0;
    font-size: 0.4rem;
    padding: 0.36rem 0.25rem;
    white-space: nowrap;
    text-align: center;
  }

  .gz-arcade-touch {
    display: none;
  }

  .gz-slider-hint {
    font-size: 0.38rem;
  }

  .gz-badge-pov {
    font-size: 0.52rem;
    padding: 0.36rem 0.55rem;
    transform: none;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .gz-hero-title {
    font-size: clamp(0.88rem, 4.3vw, 1.35rem);
    line-height: 1.48;
    overflow-wrap: anywhere;
    text-shadow: 2px 2px 0 #1a247a, -1px 0 var(--gz-pink), 1px 0 var(--gz-cyan);
  }

  .gz-h2 {
    font-size: clamp(0.82rem, 3.8vw, 1.15rem);
    overflow-wrap: anywhere;
    text-shadow: 2px 2px 0 var(--gz-pink), -1px -1px 0 #000;
  }

  .gz-sub {
    font-size: 0.94rem;
  }

  .gz-sticker {
    font-size: 0.42rem;
    padding: 0.2rem 0.36rem;
  }

  .gz-sticker-tl { top: 0.35rem; left: 0.35rem; }
  .gz-sticker-br { bottom: 0.35rem; right: 0.35rem; }

  .gz-video-bar,
  .gz-error-toolbar {
    gap: 0.45rem;
  }

  .mac-btn,
  .gz-filter-btn {
    font-size: 0.47rem;
    padding: 0.42rem 0.58rem;
  }

  .gz-chat-form input,
  .gz-catalog-search {
    font-size: 16px;
    min-width: 0;
    width: 100%;
  }

  .gz-stat-card {
    padding: 0.78rem 0.5rem;
    box-shadow: 3px 3px 0 var(--gz-pink);
  }

  .gz-stat-lbl {
    font-size: 0.46rem;
  }

  .gz-gif-card img {
    height: auto;
    max-height: 170px;
  }

  .holo-card {
    max-width: 300px;
    margin-inline: auto;
  }

  .holo-modes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
  }

  .gz-full-list {
    padding: 0.6rem;
    gap: 0.65rem;
    max-height: 620px;
  }

  .gz-arcade-hud {
    font-size: 0.5rem;
    gap: 0.4rem;
  }

  .mac-bomb-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .hyper-classic-btn--footer {
    width: 100%;
    justify-content: center;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    padding: 0.65rem 0.9rem;
  }

  .gz-mire-osd {
    width: 92vw;
    padding: 1.15rem 1rem;
  }
}

[hidden] {
  display: none !important;
}

/* 5th Panic Warning Sign Button */
.mac-icon-btn--panic {
  width: auto;
  min-width: 118px;
  padding: 0.45rem 0.7rem;
  background: repeating-linear-gradient(
    -45deg,
    #ffe600 0px,
    #ffe600 10px,
    #111111 10px,
    #111111 20px
  );
  border: 3px solid #ff2442;
  box-shadow: 4px 4px 0 #000;
  border-radius: 6px;
}

.mac-icon-btn--panic span.ic-glyph {
  font-size: 2.35rem;
  line-height: 1;
}

.mac-icon-btn--panic span.ic-name {
  background: #ff2442;
  color: #fff;
  border: 2px solid #000;
  font-size: 0.56rem;
  padding: 0.25rem 0.45rem;
}

.mac-icon-btn--panic:hover span.ic-name {
  background: #ffe600;
  color: #000;
}

/* Fullscreen Vintage SMPTE/EBU TV Color Bars ("Mire de barres") */
.gz-mire-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  background: #000;
  cursor: pointer;
  user-select: none;
}

.gz-mire-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.28) 0px, rgba(0, 0, 0, 0.28) 2px, transparent 2px, transparent 4px),
    radial-gradient(circle at center, transparent 52%, rgba(0, 0, 0, 0.65) 100%);
}

.gz-mire-bars-top {
  flex: 67;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.gz-mire-bars-mid {
  flex: 8;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.gz-mire-bars-bot {
  flex: 25;
  display: flex;
}

.gz-mire-osd {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  padding: 1.5rem 2.25rem;
  background: rgba(0, 0, 0, 0.88);
  border: 4px solid #ffffff;
  box-shadow: 0 0 0 4px #000, 10px 10px 0 rgba(0, 0, 0, 0.85);
  max-width: min(92vw, 540px);
}

.gz-mire-osd-badge {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.3rem 0.65rem;
  background: #00e038;
  color: #000;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  animation: gz-mire-blink 1s steps(2) infinite;
}

@keyframes gz-mire-blink {
  50% { opacity: 0.3; }
}

.gz-mire-title {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: clamp(1.2rem, 3.6vw, 2.35rem);
  color: #ffffff;
  letter-spacing: 0.08em;
  text-shadow: 3px 3px 0 #ff2442, -2px -2px 0 #001ee6;
}

.gz-mire-sub {
  margin: 1rem 0 0;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.5;
  color: #ffe600;
}

/* 3D Holographic Trading Card + Game Boy Camera / ASCII Portrait */
.holo-card {
  position: relative;
  padding: 0.6rem;
  background: linear-gradient(135deg, #ffe600 0%, #ff2bd6 48%, #00f5ff 100%);
  border: 3px solid #000;
  border-radius: 10px;
  box-shadow: 5px 5px 0 #000;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 120ms ease-out;
  overflow: hidden;
  user-select: none;
}

.holo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.32) 45%,
    rgba(0, 245, 255, 0.28) 52%,
    rgba(255, 43, 214, 0.25) 58%,
    transparent 78%
  );
  mix-blend-mode: overlay;
  opacity: 0.75;
}

.holo-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.35rem 0.4rem;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  color: #000;
}

.holo-hp {
  color: #7c0018;
}

.holo-screen {
  position: relative;
  border: 3px solid #000;
  background: #0f380f;
  overflow: hidden;
  aspect-ratio: 260 / 310;
}

#gz-boss-canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.holo-flash {
  position: absolute;
  inset: 0;
  background: #ffffff;
  pointer-events: none;
  z-index: 4;
  animation: holo-flash-pop 280ms ease-out forwards;
}

@keyframes holo-flash-pop {
  from { opacity: 0.95; }
  to { opacity: 0; }
}

.holo-stamp {
  position: absolute;
  bottom: 0.45rem;
  right: 0.45rem;
  padding: 0.24rem 0.42rem;
  background: rgba(0, 0, 0, 0.85);
  color: #b6ff00;
  border: 1.5px solid #b6ff00;
  font-family: var(--font-pixel);
  font-size: 0.44rem;
  z-index: 3;
}

.holo-stats {
  margin-top: 0.45rem;
  padding: 0.38rem 0.45rem;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #000;
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
  font-family: var(--font-pixel);
  font-size: 0.44rem;
  line-height: 1.45;
  color: #000;
}

.holo-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
}

.holo-modes .mac-btn {
  padding: 0.34rem 0.48rem;
  font-size: 0.46rem;
}
