
/* ==========================================
   SMARTOVAL // THE NULL EXHIBITION
   CLEANED GALLERY STYLESHEET
   ========================================== */

/* ==========================================
   01 / FONTS AND COLORS
   ========================================== */

@font-face {
  font-family: "Chitani";
  src: url("fonts/ChitaniBT-Roman.ttf")
       format("truetype");
  font-display: swap;
}

:root {
  --wall: #c5b783;
  --wall-dark: #a99b69;
  --carpet: #766d52;

  --terminal: #101711;
  --terminal-bar: #273025;

  --green: #b8d09c;
  --green-muted: #879c78;

  --cream: #e6dfb8;
  --ink: #393b2d;
  --border: #6f755b;

  --font: "Chitani", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #151711;
  color: var(--cream);
  font: 13px/1.6 var(--font);
}

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid #e5f1b4;
  outline-offset: 4px;
}

.hidden,
[hidden] {
  display: none !important;
}

/* ==========================================
   02 / ACCESSIBILITY
   ========================================== */

.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 10000;

  padding: 8px 12px;
  background: #101711;
  color: #e5f1b4;
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================
   03 / TOP SYSTEM BAR
   ========================================== */

.gallery-topbar {
  position: fixed;
  z-index: 100;

  top: 0;
  left: 0;
  right: 0;

  height: 38px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 0 22px;

  background: rgba(17, 23, 16, 0.93);
  border-bottom: 1px solid #647057;

  color: var(--green);
  font: 10px var(--font);
  letter-spacing: 0.07em;
}

.return-wired {
  text-decoration: none;
  color: #b5e38c;
}

.return-wired:hover {
  color: #e5ffc7;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-light {
  width: 6px;
  height: 6px;
  background: #c6d895;
  border-radius: 50%;
}

/* ==========================================
   04 / SCENE FOUNDATION
   ========================================== */

.gallery-scene {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.room-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.room-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;

  background: radial-gradient(
    ellipse at center,
    transparent 30%,
    rgba(22, 20, 10, 0.48) 100%
  );

  pointer-events: none;
}

.level-zero .room-vignette {
  z-index: 0;
}

/* ==========================================
   05 / LEVEL 0 BACKGROUND
   ========================================== */

.level-zero {
  background: #b7aa76;
}

/* Image-locked Level 0 canvas */

.level-artwork {
  position: absolute;

  width: max(100vw, 177.78vh);
  height: max(100vh, 56.25vw);

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);
  overflow: hidden;
}

.level-artwork-image {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

/* ==========================================
   06 / LEVEL 0 FALLBACK ARCHITECTURE
   ========================================== */

.room-ceiling {
  position: absolute;
  inset: 0 0 auto;

  height: 23%;

  background: linear-gradient(
    #d6c997,
    #c5b783
  );

  clip-path: polygon(
    0 0, 100% 0,
    83% 100%, 17% 100%
  );

  opacity: 0.35;
  pointer-events: none;
}

.room-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 26%;

  background: linear-gradient(
    #91815c,
    #615940
  );

  clip-path: polygon(
    0 35%, 100% 35%,
    100% 100%, 0 100%
  );

  opacity: 0.48;
  pointer-events: none;
}

.fluorescent-light {
  position: absolute;
  top: 7%;

  width: 18%;
  height: 10px;

  background: #f6f1ce;

  box-shadow:
    0 0 18px rgba(255,249,204,0.65),
    0 0 45px rgba(255,249,204,0.22);

  opacity: 0.75;
  pointer-events: none;
}

.light-one {
  left: 24%;
}

.light-two {
  right: 20%;
}

/* ==========================================
   07 / LEVEL 0 LABELS
   ========================================== */

.level-label {
  position: absolute;
  z-index: 5;

  top: 12%;
  left: 5%;

  display: flex;
  flex-direction: column;
  gap: 5px;

  padding: 12px 15px;

  background: rgba(16,22,16,0.82);
  border: 1px solid #6d765a;

  color: #d4ddb5;

  font-size: 12px;
  letter-spacing: 0.08em;
}

.level-label small {
  font-size: 9px;
  color: #a0aa8a;
}

.wall-sign {
  position: absolute;
  z-index: 4;

  top: 39%;
  left: 32%;

  display: flex;
  flex-direction: column;
  gap: 4px;

  padding: 10px 14px;

  background: #ded3a4;
  border: 3px solid #817653;
  color: #55523c;

  transform: rotate(-3deg);

  box-shadow:
    3px 5px 12px rgba(0,0,0,0.25);
}

.wall-sign small {
  font-size: 10px;
}

/* ==========================================
   08 / PHASE-ABLE TAPED ENTRANCE
   ========================================== */

.exhibition-door {
  position: absolute;
  z-index: 5;

  left: 50%;
  top: 50%;

  width: 14%;
  height: 40%;

  transform: translate(-50%, -50%);

  background: transparent;
  border: none;
  padding: 0;

  cursor: pointer;
}

.tape-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tape {
  position: absolute;
  display: block;

  background: #325578;
  opacity: 0.95;

  box-shadow:
    1px 1px 2px rgba(0,0,0,0.25);
}

.tape-top {
  top: 0;
  left: -4%;

  width: 108%;
  height: 7px;

  transform: rotate(-3deg);
}

.tape-left {
  top: -3%;
  left: 0;

  width: 7px;
  height: 105%;

  transform: rotate(-2deg);
}

.tape-right {
  top: -5%;
  right: 0;

  width: 7px;
  height: 107%;

  transform: rotate(1deg);
}

.door-label {
  position: absolute;

  left: 50%;
  bottom: 12%;

  transform: translateX(-50%);

  width: max-content;
  padding: 7px 11px;

  background: rgba(10,18,12,0.85);
  border: 1px solid #647b5b;

  color: #d3e9b6;
  font: 10px "Chitani", monospace;

  opacity: 0;
  transition: opacity 0.25s;
}

.exhibition-door:hover .door-label,
.exhibition-door:focus-visible .door-label {
  opacity: 1;
}

.exhibition-door:hover .tape,
.exhibition-door:focus-visible .tape {
  background: #417eba;
}

.exhibition-door:focus-visible {
  outline: 2px dashed #d6e8b4;
  outline-offset: 8px;
}

/* ==========================================
   09 / LEVEL 0 ENVIRONMENTAL TEXT
   ========================================== */

.level-whisper {
  position: absolute;
  z-index: 3;

  left: 6%;
  bottom: 19%;

  color: rgba(240,233,194,0.75);
  font-size: 11px;
  letter-spacing: 0.13em;
}

.archive-shortcut {
  position: absolute;
  z-index: 6;

  right: 6%;
  bottom: 15%;

  padding: 12px 15px;

  background: rgba(13,20,14,0.88);
  border: 1px solid #9caf82;

  color: #d5e5bb;
  font-size: 11px;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}

.archive-shortcut:hover {
  background: #273326;
}

.level-footer {
  position: absolute;
  z-index: 4;

  bottom: 62px;
  left: 5%;
  right: 5%;

  display: flex;
  justify-content: space-between;
  gap: 15px;

  color: #e6dfb8;
  font-size: 10px;
}

/* ==========================================
   10 / LEVEL 0 FLUORESCENT GLOW
   ========================================== */

.ceiling-glow {
  position: absolute;
  z-index: 1;
  pointer-events: none;

  background: rgba(255,253,220,0.12);
}

.ceiling-glow-left {
  top: 3.5%;
  left: 3%;

  width: 36%;
  height: 14%;

  clip-path: polygon(
    0% 0%,
    92% 0%,
    100% 100%,
    25% 100%
  );
}

.ceiling-glow-right {
  top: 3.5%;
  right: 2%;

  width: 37%;
  height: 14%;

  clip-path: polygon(
    8% 0%,
    100% 0%,
    68% 100%,
    0% 100%
  );

  animation:
    fluorescent-flicker 9s steps(1,end) infinite;
}

/* Soft light scattering */

.ceiling-bloom {
  position: absolute;
  z-index: 2;

  pointer-events: none;

  background: rgba(255,250,200,0.85);

  filter: blur(100px);
  opacity: 0.9;
}

.ceiling-bloom-left {
  top: 3.5%;
  left: 3%;

  width: 36%;
  height: 14%;
}

.ceiling-bloom-right {
  top: 3.5%;
  right: 2%;

  width: 37%;
  height: 14%;

  animation:
    fluorescent-flicker 9s steps(1,end) infinite;
}

/* Irregular fluorescent flickering */

@keyframes fluorescent-flicker {
  0%, 18%, 24%, 57%, 63%, 100% {
    opacity: 1;
  }

  19% { opacity: 0.25; }
  20% { opacity: 0.85; }
  21% { opacity: 0.08; }
  22% { opacity: 0.7; }
  23% { opacity: 1; }

  58% { opacity: 0.12; }
  59% { opacity: 0.9; }
  60% { opacity: 0.2; }
  61% { opacity: 0.95; }
  62% { opacity: 1; }
}

/* ==========================================
   11 / NOCLIP TRANSITION
   ========================================== */

.noclip-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;

  background: #080c08;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.35s ease,
    visibility 0.35s;
}

.noclip-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.noclip-interference {
  position: absolute;
  inset: 0;

  opacity: 0;

  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 4px,
    rgba(225,240,190,0.12) 5px,
    transparent 6px
  );

  pointer-events: none;
}

.noclip-message {
  position: absolute;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  display: flex;
  flex-direction: column;
  gap: 8px;

  width: max-content;
  max-width: 90%;

  color: #c2d8a7;
  text-align: center;

  font: 12px "Chitani", monospace;
  letter-spacing: 0.13em;

  opacity: 0;
}

.noclip-message small {
  color: #819577;
  font-size: 9px;
}

.noclip-overlay.distorting {
  animation:
    noclip-displacement 0.45s steps(1,end) both;
}

.noclip-overlay.distorting .noclip-interference {
  animation:
    noclip-static 0.45s steps(1,end) both;
}

.noclip-overlay.distorting .noclip-message {
  animation:
    noclip-text 0.45s steps(1,end) both;
}

@keyframes noclip-displacement {
  0% {
    opacity: 0;
    background: transparent;
  }

  20% {
    opacity: 0.65;
    background: #89917b;
  }

  30% {
    opacity: 0.15;
    background: #0a0e09;
  }

  45% {
    opacity: 0.85;
    background: #d5d9b8;
  }

  60% {
    opacity: 0.25;
    background: #1d251b;
  }

  75% {
    opacity: 1;
    background: #050805;
  }

  100% {
    opacity: 1;
    background: #080c08;
  }
}

@keyframes noclip-static {
  0%, 100% { opacity: 0; }
  20%, 45%, 70% { opacity: 1; }
}

@keyframes noclip-text {
  0%, 25%, 100% { opacity: 0; }
  30%, 75% { opacity: 1; }
}

/* ==========================================
   12 / NULL EXHIBITION FOUNDATION
   ========================================== */

.null-exhibition {
  position: relative;
  background: #c9c7bf;
  overflow: hidden;
}

.exhibition-background {
  background-image:
    linear-gradient(
      rgba(79,75,52,0.58),
      rgba(30,35,25,0.68)
    ),
    url("assets/null-exhibition.jpg");

  background-size: cover;
  background-position: center;
  background-color: #827858;
}

/* Illustrated museum canvas */

.exhibition-artwork {
  position: absolute;

  width: max(100vw, 177.78vh);
  height: max(100vh, 56.25vw);

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);
  overflow: hidden;
}

.exhibition-artwork-image {
  position: absolute;
  inset: 0;

  display: block;
  width: 100%;
  height: 100%;

  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

/* ==========================================
   13 / FEATURED ARTWORK
   ========================================== */

.featured-exhibit {
  position: absolute;
  z-index: 5;

  left: 50%;
  top: 47%;

  width: 60%;
  height: 70%;

  transform: translate(-50%, -50%);

  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-exhibit-image {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 90%;
  height: 95%;

  padding: 0;
  background: transparent;
  border: none;

  cursor: zoom-in;
}

/* Antique gold outer frame */

.painting-frame {
  display: block;

  width: fit-content;
  height: fit-content;

  max-width: 100%;
  max-height: 100%;

  padding: 10px;

  background: linear-gradient(
    135deg,
    #6d4a23,
    #d9b875 15%,
    #a4783c 35%,
    #f0d597 50%,
    #8b5b29 70%,
    #5d3d20
  );

  border: 2px solid #6d4b2c;

  box-shadow:
    inset 0 0 0 2px #f0d29a,
    5px 10px 20px rgba(0,0,0,0.28);
}

/* Dark inner trim */

.painting-frame-inner {
  display: block;

  padding: 5px;

  background: #332518;
  border: 3px ridge #d4ad6d;
}

/* Artwork fitting */

.featured-exhibit-image img {
  display: block;

  width: auto;
  height: auto;

  max-width: min(45vw, 700px);
  max-height: min(65vh, 650px);

  object-fit: contain;
  background: #111;
}

.featured-exhibit-image:hover .painting-frame,
.featured-exhibit-image:focus-visible .painting-frame {
  box-shadow:
    inset 0 0 0 2px #f0d29a,
    inset 0 0 0 5px #795328,
    5px 10px 25px rgba(0,0,0,0.38);
}

/* ==========================================
   14 / DESKTOP EXIT SIGNS
   ========================================== */

.exhibit-exit {
  position: absolute;
  z-index: 8;

  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 0;

  width: clamp(65px, 12vw, 220px);
  height: clamp(26px, 4.5vw, 75px);

  padding: clamp(3px, 0.6vw, 10px);
  gap: clamp(2px, 0.6vw, 10px);

  background: #009b53;
  border: 2px solid #eaffed;
  border-radius: 1px;

  color: #fff;
  font-family: Arial, sans-serif;
  font-weight: bold;

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.25),
    0 0 8px rgba(0,255,120,0.2),
    2px 4px 8px rgba(0,0,0,0.2);

  transition:
    background 0.2s,
    box-shadow 0.2s;
}

/* Desktop positioning */

.exhibit-exit-left {
  left: 8%;
  top: 50%;
  transform: translateY(-50%);
}

.exhibit-exit-right {
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
}

.exhibit-exit .exit-person {
  width: clamp(14px, 3vw, 45px);
  height: clamp(14px, 3vw, 45px);

  flex: 0 1 auto;
  object-fit: contain;
}

.exhibit-exit .exit-arrow {
  font-size: clamp(12px, 2.5vw, 38px);
  line-height: 1;
}

.exhibit-exit .exit-label {
  font-size: clamp(9px, 1.6vw, 22px);
  font-weight: 900;
}

.exhibit-exit-left .exit-person {
  transform: scaleX(-1);
}

.exhibit-exit-right .exit-person {
  transform: scaleX(1);
}

.exhibit-exit:hover,
.exhibit-exit:focus-visible {
  background: #00b964;

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.4),
    0 0 12px rgba(0,255,130,0.45),
    0 0 25px rgba(0,255,130,0.18);
}

/* ==========================================
   15 / ARTWORK INFORMATION
   ========================================== */

.featured-exhibit-information {
  position: absolute;

  left: 50%;
  bottom: -4%;

  transform: translateX(-50%);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;

  width: max-content;
  max-width: 90%;

  padding: 7px 12px;

  background: rgba(245,242,230,0.92);
  border: 1px solid rgba(110,105,85,0.45);

  color: #555244;
  font: 10px "Chitani", monospace;
  text-align: center;
}

#featured-exhibit-counter {
  font-size: 9px;
  opacity: 0.65;
}

#featured-exhibit-title {
  font-size: 11px;
}

/* ==========================================
   16 / ORIGINAL EXHIBITION INTERFACE
   ========================================== */

/* Preserved but visually hidden */

.null-exhibition > .exhibition-heading,
.null-exhibition > .exhibition-layout,
.null-exhibition > .exhibition-bottom-text {
  display: none;
}

.null-exhibition > .room-navigation {
  z-index: 20;
}

/* Return button */

.room-navigation {
  position: absolute;
  z-index: 10;

  top: 65px;
  left: 25px;

  padding: 8px 12px;

  background: #1a2119;
  border: 1px solid #8a9b75;

  color: #cbdab1;
  font-size: 10px;
}

/* Original heading */

.exhibition-heading {
  position: relative;
  z-index: 3;

  max-width: 680px;
  margin: 100px auto 35px;

  text-align: center;
}

.exhibition-heading > span {
  color: #d6d3ac;
  font-size: 10px;
  letter-spacing: 0.2em;
}

.exhibition-heading h1 {
  margin: 9px 0;
  font: normal clamp(30px,5vw,58px) Georgia,serif;
  color: #f1eac7;
}

.exhibition-heading p {
  max-width: 52ch;
  margin: auto;
  color: #e3ddbc;
  font-size: 13px;
}

/* Original exhibition layout */

.exhibition-layout {
  position: relative;
  z-index: 4;

  display: grid;
  grid-template-columns:
    minmax(200px,0.8fr)
    minmax(0,1.4fr);

  gap: clamp(25px,5vw,80px);

  width: min(1200px,92%);
  margin: 0 auto 160px;

  align-items: start;
}

/* ==========================================
   17 / ENVIRONMENTAL DISPLAYS
   ========================================== */

.exhibition-displays {
  position: relative;
  min-height: 500px;
}

.display-label {
  margin: 0 0 30px;
  color: #e0dab6;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.wall-art {
  display: block;

  width: min(280px,90%);
  padding: 10px;

  background: #453f30;
  border: 8px ridge #9c8d5f;

  color: #e9e2c4;
  text-align: center;

  box-shadow:
    7px 13px 30px rgba(0,0,0,0.38);

  transition: transform 0.2s;
}

.wall-art-one {
  margin-left: 6%;
  transform: rotate(-3deg);
}

.wall-art-two {
  margin-top: 32px;
  margin-left: 24%;
  transform: rotate(2deg);
}

.wall-art-one:hover {
  transform: rotate(-3deg) translateY(-3px);
}

.wall-art-two:hover {
  transform: rotate(2deg) translateY(-3px);
}

.wall-art-image {
  display: block;
  background: #171a16;
}

.wall-art-image img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: contain;
}

.wall-art-caption {
  display: block;
  padding-top: 9px;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.exhibition-warning {
  width: 240px;
  max-width: 90%;

  margin: 38px 0 0 10%;
  padding: 12px;

  background: rgba(218,205,155,0.88);
  border: 2px solid #8a7e55;

  color: #544e38;
  transform: rotate(-2deg);
}

.exhibition-warning span {
  font-size: 10px;
  font-weight: bold;
}

.exhibition-warning p {
  margin: 6px 0 0;
  font-size: 11px;
}

/* ==========================================
   18 / ARCHIVE TERMINAL
   ========================================== */

.archive-terminal {
  background: rgba(13,20,14,0.96);
  border: 2px solid #64735a;

  box-shadow:
    0 0 0 5px rgba(22,26,18,0.6),
    0 20px 55px rgba(0,0,0,0.35);
}

.terminal-titlebar {
  display: flex;
  justify-content: space-between;

  padding: 10px 14px;

  background: #293529;
  border-bottom: 1px solid #65765b;

  color: #c3d6a7;
  font-size: 11px;
}

.terminal-indicator {
  color: #c0db90;
}

.terminal-content {
  padding: 20px;
}

.terminal-intro {
  margin-bottom: 22px;
  color: #b5d49a;
  font-size: 11px;
}

.terminal-intro p {
  margin: 4px 0;
}

.terminal-muted {
  color: #84997a;
}

.gallery-grid {
  display: grid;
  grid-template-columns:
    repeat(3,minmax(0,1fr));
  gap: 12px;
}

.gallery-item {
  min-width: 0;
  padding: 7px;

  background: #273126;
  border: 1px solid #566b52;

  color: #c6d8ae;
  text-align: left;
}

.gallery-item:hover {
  background: #354331;
  border-color: #a3c18b;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 115px;

  object-fit: cover;
  background: #161e17;
}

.gallery-item span {
  display: block;
  margin-top: 7px;

  font-size: 10px;
  overflow-wrap: anywhere;
}

.terminal-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;

  margin-top: 20px;
  padding-top: 10px;

  border-top: 1px dashed #50664b;

  color: #8da481;
  font-size: 9px;
}

/* ==========================================
   19 / HIDDEN PASSAGE
   ========================================== */

.hidden-passage {
  position: absolute;
  z-index: 8;

  right: 5%;
  bottom: 115px;

  width: 42px;
  height: 42px;

  border: 1px solid rgba(214,220,171,0.18);
  background: rgba(23,27,19,0.15);

  color: rgba(234,239,200,0.35);
  font-size: 25px;
}

.hidden-passage:hover {
  color: #e4f0c7;
  border-color: #d0dfad;
  background: rgba(23,27,19,0.55);
}

.passage-message {
  position: absolute;
  z-index: 20;

  right: 7%;
  bottom: 170px;

  width: min(300px,85vw);
  padding: 20px;

  background: #151c15;
  border: 1px solid #8d9d79;

  color: #cbd7b5;

  box-shadow:
    0 15px 35px rgba(0,0,0,0.4);
}

.passage-message span {
  font-size: 11px;
  color: #d6e4b9;
}

.passage-message p {
  font-size: 13px;
}

.passage-message small {
  color: #9aa88a;
  font-size: 10px;
}

.passage-message button {
  display: block;
  margin-top: 16px;

  padding: 5px 12px;

  background: #293628;
  border: 1px solid #6e8464;

  color: #d2e0b7;
}

.exhibition-bottom-text {
  position: absolute;
  bottom: 75px;
  left: 6%;

  color: rgba(237,230,188,0.55);
  font-size: 10px;
  letter-spacing: 0.12em;
}

/* ==========================================
   20 / RANDOM IMAGE FRAME
   ========================================== */

.random-frame-system {
  position: absolute;
  inset: 0;
  z-index: 6;

  pointer-events: none;
}

/* Preserve four-corner perspective system */

.random-frame-image {
  position: absolute;

  left: 3.5%;
  top: 22%;

  width: 9%;
  height: 44%;

  transform-origin: 0 0;
  transform: none;

  overflow: visible;
  clip-path: none;

  background: #f0eee6;
  pointer-events: auto;
}

.random-frame-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gold plaque */

.random-frame-button {
  position: absolute;

  left: 6.5%;
  top: 73.2%;

  width: 3.8%;
  height: 4.1%;

  padding: 0;
  background: transparent;
  border: none;

  cursor: pointer;
  pointer-events: auto;

  transform-origin: 0 0;
  transform: none;

  overflow: visible;
}

.random-frame-button:hover,
.random-frame-button:focus-visible {
  background: rgba(255,238,150,0.16);
  outline: 1px solid rgba(255,245,180,0.55);
}

.random-frame-tooltip {
  position: absolute;

  left: 50%;
  bottom: 120%;

  transform: translateX(-50%);

  width: max-content;
  padding: 5px 8px;

  background: rgba(14,20,14,0.92);
  border: 1px solid #849777;

  color: #d5e5bc;
  font: 10px "Chitani",monospace;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.2s;
}

.random-frame-button:hover .random-frame-tooltip,
.random-frame-button:focus-visible .random-frame-tooltip {
  opacity: 1;
}

/* ==========================================
   21 / INTERACTIVE CRT TELEVISION
   ========================================== */

.crt-archive-button {
  position: absolute;
  z-index: 9;

  left: 77%;
  top: 72%;

  width: 17%;
  height: 23%;

  padding: 0;
  border: none;
  background: transparent;

  cursor: pointer;
  overflow: visible;
}

/* Green phosphor glow */

.crt-screen-glow {
  position: absolute;

  left: 8%;
  top: 18%;

  width: 72%;
  height: 66%;

  transform: scale(1.15);
  transform-origin: center;

  background: radial-gradient(
    ellipse at center,
    rgba(75,255,145,0.55) 0%,
    rgba(40,255,120,0.30) 40%,
    rgba(30,255,100,0.08) 70%,
    transparent 100%
  );

  filter: blur(18px);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.3s ease;
}

/* Hover prompt */

.crt-hover-message {
  position: absolute;

  left: 50%;
  bottom: 110%;

  transform: translateX(-50%);

  width: max-content;
  padding: 8px 12px;

  background: rgba(5,20,10,0.95);
  border: 1px solid #83d49b;

  color: #baffca;
  font: bold 12px "Courier New",monospace;

  text-shadow: 0 0 6px #00ff77;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.25s ease;
}

.crt-archive-button:hover .crt-screen-glow,
.crt-archive-button:focus-visible .crt-screen-glow,
.crt-archive-button:hover .crt-hover-message,
.crt-archive-button:focus-visible .crt-hover-message {
  opacity: 1;
}

/* Power-on flicker */

.crt-archive-button:hover .crt-screen-glow,
.crt-archive-button:focus-visible .crt-screen-glow,
.crt-archive-button:hover .crt-hover-message,
.crt-archive-button:focus-visible .crt-hover-message {
  animation: crt-power-on 1s linear both;
}

@keyframes crt-power-on {
  0%   { opacity: 0; }
  8%   { opacity: 0.9; }
  13%  { opacity: 0.1; }
  19%  { opacity: 0.7; }
  24%  { opacity: 0; }
  31%  { opacity: 1; }
  38%  { opacity: 0.2; }
  43%  { opacity: 0.85; }
  49%  { opacity: 0.05; }
  57%  { opacity: 1; }
  63%  { opacity: 0.4; }
  70%  { opacity: 0.95; }
  77%  { opacity: 0.65; }
  85%  { opacity: 1; }
  100% { opacity: 1; }
}

/* ==========================================
   22 / CRT ARCHIVE MODAL
   ========================================== */

.crt-archive-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
}

.crt-archive-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(0,0,0,0.88);
}

.crt-archive-window {
  position: relative;
  z-index: 1;

  width: min(1000px,100%);
  max-height: 85vh;

  display: flex;
  flex-direction: column;

  background: #101711;
  border: 1px solid #83d49b;

  box-shadow:
    0 0 35px rgba(50,255,130,0.12);
}

.crt-archive-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 10px 15px;

  background: #213325;
  border-bottom: 1px solid #5d8c68;

  color: #b6e9bf;
  font: 11px "Courier New",monospace;
}

#crt-archive-close {
  padding: 2px 9px;

  background: #101711;
  border: 1px solid #83d49b;

  color: #b6e9bf;
}

.crt-archive-content {
  overflow-y: auto;
  padding: 20px;
}

.crt-archive-content .archive-terminal {
  width: 100%;
}

/* ==========================================
   23 / ARTWORK VIEWER
   ========================================== */

.art-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 25px;
}

.viewer-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(5,8,5,0.86);
}

.viewer-window {
  position: relative;
  z-index: 1;

  width: min(1050px,100%);
  max-height: 88vh;

  display: flex;
  flex-direction: column;

  background: #121a13;
  border: 1px solid #849a73;

  box-shadow:
    0 25px 75px rgba(0,0,0,0.6);
}

.viewer-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 10px 15px;

  background: #2a3528;
  border-bottom: 1px solid #718767;

  color: #c8dcac;
  font-size: 11px;
}

.viewer-titlebar button {
  padding: 2px 9px;

  background: #111911;
  border: 1px solid #7c9171;

  color: #d7e9bd;
}

.viewer-content {
  display: grid;
  grid-template-columns:
    minmax(0,1.4fr)
    minmax(220px,0.6fr);

  gap: 25px;
  padding: 25px;

  overflow-y: auto;
}

.viewer-image {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 280px;
  background: #090d0a;
}

.viewer-image img {
  display: block;
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
}

.viewer-information h2 {
  margin: 10px 0;

  color: #e1eacb;
  font: normal 30px Georgia,serif;
}

.viewer-label {
  color: #9eb68d;
  font-size: 10px;
}

#viewer-date {
  color: #91a484;
  font-size: 11px;
}

#viewer-description {
  color: #c1ceb3;
  line-height: 1.9;
}

#viewer-full-image {
  display: inline-block;
  margin-top: 20px;

  color: #c0dba1;
  font-size: 11px;
}

/* ==========================================
   24 / BOTTOM SYSTEM TASKBAR
   ========================================== */

.gallery-taskbar {
  position: fixed;
  z-index: 100;

  bottom: 0;
  left: 0;
  right: 0;

  display: flex;
  align-items: center;
  gap: 8px;

  min-height: 42px;
  padding: 7px 13px;

  background: rgba(15,22,15,0.95);
  border-top: 1px solid #65745a;

  color: #b6cb9f;
  font-size: 10px;

  overflow-x: auto;
  white-space: nowrap;
}

.gallery-taskbar button {
  padding: 5px 9px;

  background: #273526;
  border: 1px solid #667c5d;

  color: #c7dcad;
  font-size: 10px;
}

.gallery-taskbar button:hover {
  background: #3a4a34;
}

.taskbar-brand {
  color: #a9d18b;
  margin-right: 8px;
}

.taskbar-location {
  margin-left: auto;
  color: #819778;
}

/* ==========================================
   25 / MOBILE NAVIGATION BAR
   ========================================== */

/* Hidden on desktop */

.mobile-exhibit-nav {
  display: none;
}

/* ==========================================
   26 / TABLET RESPONSIVENESS
   ========================================== */

@media (max-width: 900px) {

  .exhibition-layout {
    grid-template-columns: 1fr;
  }

  .exhibition-displays {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    min-height: 0;
  }

  .display-label {
    width: 100%;
    margin-bottom: 0;
  }

  .wall-art {
    width: min(260px,100%);
    margin: 0;
  }

  .exhibition-warning {
    margin: 0;
  }

  .exhibition-heading {
    padding: 0 20px;
  }

  .hidden-passage {
    bottom: 60px;
  }
}

/* ==========================================
   27 / MOBILE RESPONSIVENESS
   ========================================== */

@media (max-width: 600px) {

  /* Top system bar */

  .gallery-topbar {
    padding: 0 10px;
    font-size: 9px;
  }

  .topbar-center {
    display: none;
  }

  /* Level 0 */

  .level-artwork {
    width: 160vw;
    height: auto;
    aspect-ratio: 16 / 9;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);
  }

  .level-label {
    top: 13%;
    left: 4%;
  }

  .wall-sign {
    left: 30%;
    top: 40%;

    padding: 5px 7px;

    font-size: 9px;
    border-width: 2px;
  }

  .wall-sign small {
    font-size: 7px;
  }

  .archive-shortcut {
    right: 4%;
    bottom: 17%;
    font-size: 9px;
  }

  .level-whisper {
    bottom: 29%;
    font-size: 9px;
  }

  /* ========================================
     MOBILE MUSEUM LAYOUT
     ======================================== */

  .null-exhibition {
    min-height: 100svh;
    background: #10140f;

    /* Space for separate navigation */
    padding-bottom: 110px;
  }

  /* Full illustration, no horizontal crop */

  .exhibition-artwork {
    width: 100vw;
    height: auto;
    aspect-ratio: 16 / 9;

    left: 50%;
    top: 46%;

    transform: translate(-50%, -50%);
  }

  /* Featured painting */

  .featured-exhibit {
    width: 70%;
    height: 60%;
  }

  .featured-exhibit-image {
    width: 75%;
    height: 80%;

    min-width: 0;
    min-height: 0;
  }

  .painting-frame {
    display: flex;
    align-items: center;
    justify-content: center;

    max-width: 100%;
    max-height: 100%;

    padding: 3px;
    border-width: 1px;
  }

  .painting-frame-inner {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 0;
    min-height: 0;

    max-width: 100%;
    max-height: 100%;

    padding: 2px;
    border-width: 1px;
  }

  .featured-exhibit-image img {
    display: block;

    width: auto;
    height: auto;

    max-width: 100%;
    max-height: min(22vw,100px);

    object-fit: contain;
  }

  /* Hide desktop EXIT signs */

  .featured-exhibit > .exhibit-exit {
    display: none;
  }

  /* Artwork information */

  .featured-exhibit-information {
    bottom: -18%;

    font-size: 8px;
    padding: 3px 5px;
  }

  #featured-exhibit-counter {
    font-size: 7px;
  }

  #featured-exhibit-title {
    font-size: 9px;
  }

  /* ========================================
     SEPARATE MOBILE NAVIGATION
     ======================================== */

  .mobile-exhibit-nav {
    position: relative;
    z-index: 30;

    left: auto;
    bottom: auto;
    transform: none;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;

    width: min(420px, 94%);
    margin: 16px auto 0;

    padding: 10px;

    background: rgba(12,22,15,0.95);
    border: 1px solid #526d58;

    box-shadow:
      0 4px 18px rgba(0,0,0,0.3);
  }

  .mobile-exit-sign {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    min-width: 0;
    min-height: 44px;

    padding: 6px;

    background: #009b53;
    border: 2px solid #eaffed;

    color: white;

    font: bold 13px Arial,sans-serif;

    box-shadow:
      0 0 8px rgba(0,255,120,0.18);
  }

  .mobile-exit-sign img {
    display: block;

    width: 23px;
    height: 23px;

    object-fit: contain;
    flex-shrink: 0;
  }

  /* Left pictogram faces left */

  #mobile-exhibit-previous img {
    transform: scaleX(-1);
  }

  .mobile-exit-arrow {
    font-size: 22px;
    line-height: 1;
  }

  .mobile-exit-sign:hover,
  .mobile-exit-sign:focus-visible {
    background: #00b964;
  }

  /* Return button */

  .room-navigation {
    top: 55px;
    left: 12px;
  }

  /* Archive thumbnails */

  .gallery-grid {
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }

  /* Artwork viewer */

  .viewer-content {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .viewer-image {
    min-height: 170px;
  }

  .viewer-image img {
    max-height: 45vh;
  }

  /* CRT archive modal */

  .crt-archive-modal {
    padding: 10px;
  }

  .crt-archive-content {
    padding: 10px;
  }

  /* Bottom taskbar */

  .gallery-taskbar {
    font-size: 9px;
  }

  .taskbar-location {
    display: none;
  }
}

/* ==========================================
   28 / REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .ceiling-glow-right,
  .ceiling-bloom-right {
    animation: none;
  }

  .noclip-overlay,
  .noclip-overlay.distorting {
    animation: none !important;
    transition: opacity 0.2s ease;
  }

  .noclip-interference,
  .noclip-message {
    animation: none !important;
  }

  .crt-archive-button:hover .crt-screen-glow,
  .crt-archive-button:focus-visible .crt-screen-glow,
  .crt-archive-button:hover .crt-hover-message,
  .crt-archive-button:focus-visible .crt-hover-message {
    animation: none;
    opacity: 1;
  }
}

/* ==========================================
   NULL EXHIBITION / MOBILE LAYOUT FIX
   Museum + separate navigation
   ========================================== */

@media (max-width: 600px) {

  /* Main exhibition container */

  .null-exhibition {
    display: flex;
    flex-direction: column;
    align-items: center;

    min-height: 100svh;

    padding: 110px 0 100px;

    background: #10140f;
    overflow: visible;
  }

  /* Museum illustration */

  .exhibition-artwork {
    position: relative;

    left: auto;
    top: auto;

    transform: none;

    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;

    flex-shrink: 0;
    overflow: hidden;
  }

  /* Mobile navigation below illustration */

  .mobile-exhibit-nav {
    position: relative;

    left: auto;
    bottom: auto;

    transform: none;

    display: grid;
    grid-template-columns: 1fr 1fr;

    width: min(420px, 94%);

    margin: 16px auto 0;
    padding: 10px;
    gap: 10px;

    background: rgba(12,22,15,0.95);
    border: 1px solid #526d58;
  }

  /* Keep desktop EXIT signs hidden */

  .featured-exhibit > .exhibit-exit {
    display: none;
  }

  /* Painting information */

  .featured-exhibit-information {
    bottom: -18%;
  }

  /* Return button */

  .room-navigation {
    position: relative;

    top: auto;
    left: auto;

    align-self: flex-start;

    margin: 0 0 24px 12px;
  }

  /* Hide unused old exhibition elements */

  .null-exhibition > .exhibition-heading,
  .null-exhibition > .exhibition-layout,
  .null-exhibition > .exhibition-bottom-text {
    display: none;
  }

  /* Keep hidden passage out of the artwork */

  .hidden-passage {
    bottom: 70px;
  }
}

/* ==========================================
   MOBILE EXHIBITION / FINAL LAYOUT
   ========================================== */

@media (max-width: 600px) {

  /* Vertical mobile layout */

  .null-exhibition {
    display: flex;
    flex-direction: column;
    align-items: center;

    min-height: 100svh;

    padding: 100px 0 100px;

    background: #10140f;
    overflow: visible;
  }

  /* Return button first */

  .null-exhibition > .room-navigation {
    position: relative;

    order: -1;

    top: auto;
    left: auto;

    align-self: flex-start;

    margin: 0 0 24px 12px;
  }

  /* Museum illustration second */

  .null-exhibition > .exhibition-artwork {
    position: relative;

    order: 0;

    left: auto;
    top: auto;

    transform: none;

    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;

    flex-shrink: 0;
    overflow: hidden;
  }

  /* Navigation below museum */

  .null-exhibition > .mobile-exhibit-nav {
    position: relative;

    order: 1;

    left: auto;
    right: auto;
    top: auto;
    bottom: auto;

    transform: none;

    display: grid;
    grid-template-columns: 1fr 1fr;

    width: min(420px, 94%);

    margin: 16px auto 0;
    padding: 10px;
    gap: 10px;

    background: rgba(12,22,15,0.95);
    border: 1px solid #526d58;
  }

  /* Hide desktop EXIT signs */

  .featured-exhibit > .exhibit-exit {
    display: none;
  }

  /* Ensure mobile signs fit */

  .mobile-exit-sign {
    min-width: 0;
    min-height: 44px;
    gap: 5px;
    padding: 6px;

    font: bold 13px Arial, sans-serif;
  }

  .mobile-exit-sign img {
    width: 23px;
    height: 23px;
    flex-shrink: 0;
  }

  /* Keep legacy interface hidden */

  .null-exhibition > .exhibition-heading,
  .null-exhibition > .exhibition-layout,
  .null-exhibition > .exhibition-bottom-text {
    display: none;
  }

}



/* ==========================================
   SECRET ROOM ENTRANCES / INTERACTION
   ========================================== */

.secret-entrance {
  position: absolute;
  z-index: 12;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  margin: 0;

  background: transparent;
  border: none;
  border-radius: 0;

  cursor: pointer;
  pointer-events: auto;
}

/* Preserve your calibrated coordinates.
   Replace these with your exact working
   values if you adjusted them previously. */

.secret-entrance-left {
  left: 15.5%;
  top: 24%;
  width: 4%;
  height: 50%;
}

.secret-entrance-right {
  left: 79%;
  top: 25%;
  width: 4.5%;
  height: 48%;
}

/* Hidden prompt */

.secret-entrance-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;

  width: max-content;
  min-width: 110px;

  padding: 9px 12px;

  background: rgba(8, 18, 12, 0.9);
  border: 1px solid rgba(131, 212, 155, 0.7);

  color: #b8e8c4;

  font-family: "Courier New", monospace;
  font-size: 11px;
  white-space: nowrap;

  opacity: 0;
  visibility: hidden;

  transform: translateY(5px);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;

  pointer-events: none;
}

/* Directional arrow */

.secret-entrance-arrow {
  font-family: Arial, sans-serif;
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
}

/* Reveal on hover or keyboard focus */

.secret-entrance:hover .secret-entrance-prompt,
.secret-entrance:focus-visible .secret-entrance-prompt {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Keyboard focus */

.secret-entrance:focus-visible {
  outline: 2px dashed #83d49b;
  outline-offset: 3px;
}

/* ==========================================
   TOUCHSCREEN DISCOVERABILITY
   ========================================== */

@media (hover: none) {

  .secret-entrance-prompt {
    min-width: 0;
    padding: 4px 6px;

    background: rgba(8, 18, 12, 0.55);
    border-color: rgba(131, 212, 155, 0.3);

    opacity: 0.7;
    visibility: visible;

    transform: none;

    animation: secret-entrance-pulse 3s ease-in-out infinite;
  }

  .secret-entrance-label {
    display: none;
  }

  .secret-entrance-arrow {
    font-size: 18px;
  }

}

/* Very subtle pulse */

@keyframes secret-entrance-pulse {
  0%, 100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.8;
  }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {

  .secret-entrance-prompt {
    animation: none;
    transition: none;
  }

}


/* ==========================================
   MOBILE ARTWORK NAVIGATION / SIMPLIFIED
   ========================================== */

@media (max-width: 600px) {

  .mobile-exit-sign {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 1;
    min-width: 0;
    min-height: 48px;

    padding: 12px 16px;

    background: #1d2b20;
    border: 1px solid #75927a;
    border-radius: 2px;

    color: #c5dfb9;

    font-family: "Courier New", monospace;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.08em;

    cursor: pointer;
    touch-action: manipulation;
  }

  .mobile-exit-sign:active {
    background: #344d38;
    color: #ffffff;
  }

  .mobile-exit-sign:focus-visible {
    outline: 2px solid #83d49b;
    outline-offset: 3px;
  }

}

