* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 20%, rgba(180, 180, 160, .08), transparent 28%),
    linear-gradient(180deg, #171812, #090a08 45%, #020202);
  color: #d6d0bc;
  font-family: "Courier New", monospace;
  letter-spacing: 0.04em;
}

body:not(.entered) {
  overflow: hidden;
}

body:not(.entered) .site {
  display: none;
}

body.entered .boot {
  display: none;
}

.noise,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

.noise {
  background-image: radial-gradient(circle, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: .08;
}

.scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .04),
    rgba(255, 255, 255, .04) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: .35;
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(8, 9, 7, .45), rgba(0, 0, 0, .9)),
    radial-gradient(circle at center, #34362d, #11120e 42%, #000 80%);
  overflow: hidden;
}

.boot-fog {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 40%, rgba(210, 210, 190, .18), transparent 28%),
    radial-gradient(circle at 70% 55%, rgba(180, 180, 160, .12), transparent 30%),
    radial-gradient(circle at 45% 70%, rgba(230, 230, 210, .1), transparent 26%);
  filter: blur(18px);
  animation: fogMove 9s infinite alternate ease-in-out;
}

.boot-box {
  position: relative;
  width: min(520px, 88vw);
  padding: 32px;
  border: 1px solid #77705f;
  background: rgba(9, 10, 8, .82);
  box-shadow:
    0 0 60px #000,
    inset 0 0 35px rgba(120, 110, 90, .12);
  text-align: center;
}

.boot-box h1 {
  margin: 8px 0 12px;
  font-size: clamp(42px, 10vw, 72px);
  color: #e7e0c9;
  text-shadow:
    3px 3px #351014,
    0 0 18px rgba(220, 220, 190, .2);
}

.boot-small {
  color: #a6b38f;
  font-size: 12px;
}

.boot-text {
  color: #c6c0ad;
  line-height: 1.6;
}

.boot-warning {
  margin-top: 18px;
  color: #8e8675;
  font-size: 12px;
}

.site {
  width: min(1180px, 96vw);
  min-height: calc(100vh - 48px);
  margin: 24px auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  border: 3px double #6f6758;
  background:
    linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .7)),
    #080907;
  box-shadow:
    0 0 70px #000,
    inset 0 0 100px rgba(80, 45, 25, .25);
}

.sidebar {
  padding: 22px;
  border-right: 2px solid #403b2c;
  background:
    linear-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .9)),
    repeating-linear-gradient(45deg, #14170f, #14170f 8px, #0d0f0a 8px, #0d0f0a 16px);
}

h1 {
  margin: 0;
  font-size: 36px;
  color: #f1e8c8;
  text-shadow: 3px 3px #4c1512;
}

.subtitle {
  color: #a6b38f;
  font-size: 12px;
  border-bottom: 1px solid #55513c;
  padding-bottom: 18px;
}

nav {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

button {
  cursor: pointer;
  font-family: inherit;
  color: #e8dfbf;
  background: #10130d;
  border: 1px solid #787153;
  padding: 10px 14px;
}

button:hover {
  background: #3a1112;
  color: #fff4d0;
}

#enter-button {
  margin-top: 18px;
  padding: 12px 28px;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, .04);
}

.status,
.clock {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid #674137;
  background: #120908;
}

.status p,
.clock span {
  margin: 0 0 8px;
  color: #9c9680;
  font-size: 12px;
}

.status strong {
  display: block;
  color: #d6b663;
  font-size: 24px;
}

.status span {
  color: #a6b38f;
}

.main-screen {
  padding: 22px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: #a6b38f;
  font-size: 12px;
}

.camera {
  min-height: 360px;
  position: relative;
  overflow: hidden;
  border: 2px ridge #77705a;
  background:
    linear-gradient(rgba(0, 0, 0, .15), rgba(0, 0, 0, .9)),
    radial-gradient(circle at 50% 42%, #4a493e, #1b1d17 42%, #050605 76%);
}

.camera::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 48% 55%, transparent 0 10%, rgba(0, 0, 0, .78) 72%),
    linear-gradient(90deg, rgba(255, 255, 255, .03), transparent 20%, transparent 80%, rgba(255, 255, 255, .02));
}

.hallway {
  position: absolute;
  inset: 12% 18%;
  background:
    linear-gradient(90deg, transparent 0 42%, rgba(210, 210, 170, .12) 42% 45%, transparent 45%),
    linear-gradient(#2b2f25, #060706);
  clip-path: polygon(18% 0, 82% 8%, 100% 100%, 0 92%);
  filter: blur(.4px);
}

.camera-label {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border: 1px solid #4d5544;
  background: #050605;
  color: #a6b38f;
}

.door {
  position: absolute;
  z-index: 2;
  width: 90px;
  height: 170px;
  left: 48%;
  bottom: 32px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #080908, #252217, #060706);
  border: 2px solid #393323;
  box-shadow: 0 0 30px rgba(0, 0, 0, .9);
}

.blood {
  position: absolute;
  z-index: 3;
  width: 140px;
  height: 24px;
  right: 18%;
  bottom: 48px;
  background: #3d0a0a;
  filter: blur(2px);
  transform: rotate(-6deg);
}

.camera h2 {
  position: absolute;
  z-index: 4;
  left: 22px;
  bottom: 18px;
  margin: 0;
  font-size: 46px;
  text-transform: uppercase;
  color: #e5dec9;
  text-shadow: 4px 4px #2a0d0d;
}

.panel {
  display: none;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #686047;
  background: rgba(8, 9, 7, .92);
}

.panel.active {
  display: block;
}

.panel h2 {
  margin-top: 0;
  color: #c9b86d;
  border-bottom: 1px solid #5c563d;
  padding-bottom: 8px;
}

.warning {
  color: #c98d78;
}

.file {
  margin-top: 12px;
  padding: 14px;
  border-left: 5px solid #5a2119;
  background: rgba(0, 0, 0, .42);
}

.file span {
  color: #a6b38f;
  font-size: 12px;
}

.file h3 {
  color: #efe4be;
}

.map-grid,
.items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.map-grid div,
.items div {
  min-height: 70px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid #57513d;
  background: #10130d;
}

.map-grid .danger {
  background: #26100d;
  color: #c98d78;
}

.map-grid .locked {
  color: #777;
  background: #050505;
}

footer {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #403b2c;
  background: #060706;
}

#transmission {
  color: #a6b38f;
}

@keyframes fogMove {
  from {
    transform: translateX(-4%) translateY(2%) scale(1);
    opacity: .55;
  }

  to {
    transform: translateX(4%) translateY(-2%) scale(1.08);
    opacity: .9;
  }
}

@media (max-width: 820px) {
  .site {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 2px solid #403b2c;
  }

  .map-grid,
  .items {
    grid-template-columns: 1fr;
  }

  .camera h2 {
    font-size: 32px;
  }

  .topbar {
    flex-direction: column;
  }
}

.ps1-map {
  position: relative;
  width: min(680px, 100%);
  height: 560px;
  margin: 18px auto;
  border: 3px solid #1c2529;
  background-color: #8f999b;
  background-image:
    linear-gradient(#727d80 1px, transparent 1px),
    linear-gradient(90deg, #727d80 1px, transparent 1px);
  background-size: 28px 28px;
  box-shadow: inset 0 0 0 4px #c4cccc;
  color: #1d2527;
  font-family: Arial, sans-serif;
  overflow: hidden;
}

.map-title {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 10px;
  background: #d9dddd;
  color: #1c2529;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 1px;
}

.room {
  position: absolute;
  display: grid;
  place-items: center;
  border: 3px solid #20282a;
  background: #d9dddd;
  color: #333;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.square {
  top: 44px;
  left: 280px;
  width: 130px;
  height: 80px;
  border-radius: 18px 18px 6px 6px;
}

.elevator-left {
  top: 85px;
  left: 82px;
  width: 150px;
  height: 75px;
}

.elevator-right {
  top: 85px;
  right: 78px;
  width: 150px;
  height: 75px;
}

.patio {
  top: 160px;
  left: 88px;
  width: 220px;
  height: 92px;
}

.road {
  top: 145px;
  left: 360px;
  width: 100px;
  height: 135px;
  transform: rotate(14deg);
}

.observatory {
  top: 170px;
  right: 58px;
  width: 95px;
  height: 190px;
  writing-mode: vertical-rl;
}

.fountain {
  top: 265px;
  left: 280px;
  width: 150px;
  height: 82px;
  border-radius: 0 0 48px 48px;
}

.bridge {
  top: 390px;
  left: 220px;
  width: 230px;
  height: 62px;
}

.sanctuary {
  top: 365px;
  right: 68px;
  width: 130px;
  height: 120px;
}

.cafeteria {
  top: 260px;
  left: 95px;
  width: 115px;
  height: 125px;
  writing-mode: vertical-rl;
}

.door {
  position: absolute;
  width: 22px;
  height: 10px;
  background: #22e6ff;
  border: 1px solid #047789;
  box-shadow: 0 0 4px #22e6ff;
}

.d1 { top: 118px; left: 238px; transform: rotate(90deg); }
.d2 { top: 118px; right: 238px; transform: rotate(90deg); }
.d3 { top: 250px; left: 275px; }
.d4 { top: 250px; left: 455px; }
.d5 { top: 388px; left: 210px; transform: rotate(90deg); }
.d6 { top: 416px; left: 450px; transform: rotate(90deg); }

.marker,
.legend-icon {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 2px solid #1e2a2d;
  color: #111;
  font-family: Arial, sans-serif;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}

.marker {
  position: absolute;
  z-index: 5;
  font-size: 16px;
}

.green { background: #13db5a; }
.pink { background: #ff31a8; }
.yellow { background: #dedb36; }
.blue { background: #536fa5; color: #071018; }
.orange { background: #e46820; }
.phone { background: #12e943; }
.gray { background: #a9b5b8; }

.m1 { top: 42px; left: 318px; }
.m2 { top: 135px; left: 335px; }
.m3 { top: 165px; left: 450px; }
.m4 { top: 330px; left: 175px; }
.m5 { top: 270px; left: 145px; }

.p1 { top: 205px; right: 105px; }
.p2 { bottom: 72px; right: 215px; }
.p3 { top: 290px; left: 320px; }

.y1 { top: 315px; right: 180px; }

.b1 { top: 120px; left: 340px; }
.o1 { top: 76px; left: 340px; }
.t1 { top: 52px; right: 238px; }
.t2 { top: 360px; left: 96px; }

.compass {
  position: absolute;
  right: 32px;
  bottom: 36px;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: start center;
  border: 2px solid #30383a;
  border-radius: 50%;
  color: #1d2527;
  font-weight: 900;
}

.compass::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 31px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 34px solid #1d2527;
}

.map-legend {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 18px;
  border: 3px solid #1c2529;
  background:
    linear-gradient(rgba(220, 225, 225, .9), rgba(190, 198, 200, .9)),
    repeating-linear-gradient(0deg, transparent, transparent 26px, rgba(90, 100, 105, .22) 27px);
  color: #1c2529;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.map-legend div {
  margin: 6px 0;
}

.map-legend hr {
  border: 0;
  border-top: 2px solid rgba(40, 50, 55, .35);
  margin: 12px 0;
}

@media (max-width: 760px) {
  .ps1-map {
    transform: scale(.72);
    transform-origin: top left;
    width: 680px;
    margin-bottom: -130px;
  }
}