:root {
  color-scheme: dark;
  --bg: #101318;
  --panel: #181d24;
  --ink: #f2f5f8;
  --muted: #aeb7c2;
  --line: #2b3440;
  --green: #75d88a;
  --gold: #f3c969;
  --red: #ff6a6a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 10%, #243247 0, transparent 32rem), linear-gradient(135deg, #101318 0%, #151816 45%, #17151b 100%);
  color: var(--ink);
}

.game-page {
  overflow: hidden;
}

.hub-page {
  overflow: auto;
}

a {
  color: inherit;
}

.site-header {
  width: min(1120px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.site-header nav a,
.back-link,
.game-link {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #42505d;
  border-radius: 8px;
  background: #202733;
  color: var(--green);
}

.site-header nav a,
.back-link {
  color: var(--muted);
  font-weight: 700;
}

.site-header nav a:hover,
.back-link:hover {
  color: var(--ink);
}

.hub {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 68px 0 80px;
}

.intro {
  max-width: 720px;
}

.eyebrow,
.game-type {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(44px, 7vw, 78px);
  line-height: .95;
}

.intro p:last-child {
  max-width: 620px;
  font-size: 18px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 48px;
}

.game-card {
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 29, 36, .84);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease;
}

.game-card:has(.game-link:hover) {
  transform: translateY(-3px);
  border-color: #526374;
}

.game-link,
.coming-soon {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.game-art {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  background: linear-gradient(180deg, #1b2635 0%, #10161f 100%);
}

.game-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: .22;
}

.moon {
  position: absolute;
  right: 28px;
  top: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f3c969;
  box-shadow: 0 0 34px rgba(243, 201, 105, .35);
}

.platform,
.runner,
.beacon,
.spike {
  position: absolute;
  display: block;
}

.platform {
  height: 12px;
  border-top: 4px solid #7d91a7;
  background: #313d4c;
}

.platform-a {
  left: 28px;
  bottom: 42px;
  width: 190px;
}

.platform-b {
  left: 220px;
  bottom: 94px;
  width: 130px;
}

.platform-c {
  right: 36px;
  bottom: 64px;
  width: 150px;
}

.runner {
  left: 74px;
  bottom: 56px;
  width: 24px;
  height: 34px;
  background: #f2f5f8;
  box-shadow: 9px -7px 0 -3px var(--green);
}

.beacon {
  right: 74px;
  bottom: 76px;
  width: 28px;
  height: 52px;
  background: var(--green);
  box-shadow: 0 0 34px rgba(117, 216, 138, .42);
}

.spike {
  bottom: 54px;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 24px solid var(--red);
}

.spike-a {
  left: 242px;
}

.spike-b {
  left: 270px;
}

.empty-art {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #202733, #171a1e);
}

.empty-art span {
  width: 92px;
  height: 92px;
  border: 2px dashed #526374;
  border-radius: 8px;
}

.pc-art {
  background: linear-gradient(135deg, #17241f 0%, #111820 100%);
}

.case-outline,
.board-shape,
.cpu-chip,
.ram-stick,
.gpu-card,
.drive-box,
.power-box {
  position: absolute;
  display: block;
}

.case-outline {
  inset: 28px 34px 24px 34px;
  border: 3px solid #6d7c8c;
  border-radius: 8px;
  background: rgba(11, 15, 21, .24);
}

.board-shape {
  left: 78px;
  top: 52px;
  width: 132px;
  height: 118px;
  border: 2px solid #75d88a;
  background: rgba(117, 216, 138, .12);
}

.cpu-chip {
  left: 124px;
  top: 86px;
  width: 38px;
  height: 38px;
  border: 2px solid #f3c969;
  background: rgba(243, 201, 105, .18);
}

.ram-stick {
  top: 64px;
  width: 8px;
  height: 78px;
  background: #8eb8ff;
}

.ram-one {
  left: 178px;
}

.ram-two {
  left: 192px;
}

.gpu-card {
  left: 92px;
  bottom: 48px;
  width: 156px;
  height: 24px;
  background: #ff915c;
  box-shadow: 24px 0 0 -8px #202733;
}

.drive-box {
  right: 74px;
  top: 60px;
  width: 52px;
  height: 34px;
  border: 2px solid #8eb8ff;
}

.power-box {
  right: 64px;
  bottom: 44px;
  width: 72px;
  height: 48px;
  background: #2b3440;
  border-top: 5px solid #f3c969;
}

.game-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.game-info h2 {
  margin: 0;
  font-size: 28px;
}

.play-cta {
  width: fit-content;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--green);
  color: #09200f;
  font-weight: 850;
}

.play-cta.muted {
  background: #2b3440;
  color: var(--muted);
}

.coming-soon {
  opacity: .72;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 0;
}

.game-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  background: #0d1117;
}

canvas {
  display: block;
  width: min(100vw - 320px, 1280px);
  height: auto;
  aspect-ratio: 16 / 9;
  image-rendering: auto;
}

.hud {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  pointer-events: none;
  text-shadow: 0 2px 16px #000;
}

.hud strong,
.hud span {
  display: block;
}

.hud strong {
  font-size: 18px;
}

.hud span {
  color: var(--muted);
  font-size: 14px;
}

.stats {
  display: flex;
  gap: 14px;
  text-align: right;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(16, 19, 24, .82);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
  font-weight: 700;
}

.panel {
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, black);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.controls {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.controls span {
  display: flex;
  align-items: center;
  gap: 6px;
}

kbd {
  min-width: 30px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #3a4654;
  border-bottom-color: #222a34;
  border-radius: 6px;
  background: #202733;
  color: var(--ink);
  font: 700 13px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

button {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #09200f;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.05);
}

.builder-page {
  overflow: auto;
}

.builder-shell {
  width: min(1320px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
}

.builder-board,
.parts-panel,
.mission-panel,
.lesson-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 29, 36, .86);
}

.builder-board {
  padding: 20px;
}

.mission-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.mission-bar h1 {
  font-size: 42px;
}

.score-box {
  min-width: 140px;
  display: grid;
  gap: 4px;
  text-align: right;
}

.score-box span {
  color: var(--muted);
  font-weight: 700;
}

.score-box strong {
  color: var(--gold);
  font-size: 20px;
}

.mission-panel {
  margin-top: 18px;
  padding: 16px;
}

.mission-panel h2,
.lesson-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.requirement-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.requirement-list span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #3a4654;
  border-radius: 8px;
  color: #dbe4ed;
  background: #202733;
  font-size: 13px;
  font-weight: 750;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  margin-top: 18px;
}

.pc-case {
  position: relative;
  min-height: 560px;
  border: 3px solid #526374;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 24px, rgba(255,255,255,.035) 24px 25px, transparent 25px 50px),
    linear-gradient(180deg, #111820 0%, #0d1117 100%);
  overflow: hidden;
}

.pc-case::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(255, 255, 255, .12);
  border-radius: 8px;
  pointer-events: none;
}

.slot {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 2px dashed #526374;
  border-radius: 8px;
  background: rgba(32, 39, 51, .76);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.slot.filled {
  border-style: solid;
  border-color: var(--green);
  color: var(--ink);
  background: rgba(117, 216, 138, .14);
}

.case-slot {
  left: 22px;
  top: 22px;
  width: 110px;
  height: 48px;
}

.motherboard-slot {
  left: 110px;
  top: 90px;
  width: 260px;
  height: 270px;
}

.cpu-slot {
  left: 198px;
  top: 160px;
  width: 86px;
  height: 72px;
}

.cooler-slot {
  left: 184px;
  top: 246px;
  width: 112px;
  height: 60px;
}

.ram-slot {
  left: 300px;
  top: 126px;
  width: 52px;
  height: 182px;
}

.storage-slot {
  left: 122px;
  top: 386px;
  width: 150px;
  height: 56px;
}

.psu-slot {
  right: 28px;
  bottom: 28px;
  width: 170px;
  height: 92px;
}

.gpu-slot {
  left: 116px;
  bottom: 146px;
  width: 330px;
  height: 68px;
}

.cable-slot {
  right: 30px;
  top: 34px;
  width: 146px;
  height: 54px;
}

.lesson-card {
  padding: 16px;
  align-self: stretch;
}

.lesson-card ol {
  margin: 12px 0 18px;
  padding-left: 24px;
  color: var(--muted);
}

.lesson-card li {
  margin: 7px 0;
}

.lesson-card li.done {
  color: var(--green);
  font-weight: 800;
}

#feedback {
  min-height: 96px;
  padding: 12px;
  border: 1px solid #3a4654;
  border-radius: 8px;
  background: #151b23;
}

#feedback.good {
  border-color: rgba(117, 216, 138, .7);
  color: #c8f3d0;
}

#feedback.bad {
  border-color: rgba(255, 106, 106, .72);
  color: #ffd1d1;
}

.parts-panel {
  padding: 16px;
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-label {
  color: var(--ink);
  font-weight: 850;
}

input[type="search"] {
  width: 100%;
  height: 42px;
  border: 1px solid #3a4654;
  border-radius: 8px;
  padding: 0 12px;
  background: #10161f;
  color: var(--ink);
  font: inherit;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter,
.wide-action {
  width: auto;
  height: 34px;
  padding: 0 12px;
  background: #202733;
  color: var(--muted);
}

.filter.active,
.wide-action {
  background: var(--green);
  color: #09200f;
}

.parts-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.part-card {
  width: 100%;
  height: auto;
  min-height: 170px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 12px;
  border: 1px solid #3a4654;
  border-radius: 8px;
  background: #151b23;
  color: var(--ink);
  text-align: left;
}

.part-card img {
  width: 100%;
  height: 82px;
  display: block;
  object-fit: contain;
  border-radius: 6px;
  background: #0d1117;
}

.part-card .part-meta {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.part-card small {
  color: var(--muted);
  line-height: 1.4;
}

.wide-action {
  width: 100%;
  height: 44px;
}

.case-shell {
  width: min(1380px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
}

.case-file {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 29, 36, .88);
}

.evidence-scene {
  position: relative;
  min-height: 520px;
  margin-top: 18px;
  border: 1px solid #33404d;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 70px),
    linear-gradient(180deg, rgba(255,255,255,.025) 0 1px, transparent 1px 70px),
    #111820;
}

.evidence-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .22;
}

.lab-scene {
  background: linear-gradient(135deg, #101820 0%, #20313a 52%, #14191f 100%);
}

.apartment-scene {
  background: linear-gradient(135deg, #1b1a24 0%, #2a2430 48%, #111820 100%);
}

.studio-scene {
  background: linear-gradient(135deg, #151820 0%, #252238 45%, #12151c 100%);
}

.garage-scene {
  background: linear-gradient(135deg, #151b18 0%, #223027 50%, #101318 100%);
}

.alley-scene {
  background: linear-gradient(135deg, #18151b 0%, #2e2023 52%, #101318 100%);
}

.scene-glow {
  position: absolute;
  right: -120px;
  top: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: rgba(117, 216, 138, .14);
  filter: blur(4px);
}

.scene-props {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.desk-lamp,
.evidence-bag,
.fingerprint-card,
.cable-coil,
.case-marker {
  position: absolute;
  z-index: 1;
  display: block;
}

.desk-lamp {
  left: 30px;
  bottom: 24px;
  width: 110px;
  height: 170px;
  border-left: 8px solid #344352;
  border-bottom: 8px solid #344352;
}

.desk-lamp::before {
  content: "";
  position: absolute;
  left: 38px;
  top: -16px;
  width: 80px;
  height: 42px;
  border-radius: 42px 42px 8px 8px;
  background: #4c5c6c;
  box-shadow: 44px 78px 120px rgba(243, 201, 105, .22);
}

.evidence-bag {
  right: 34px;
  bottom: 28px;
  width: 150px;
  height: 96px;
  border: 2px solid rgba(142, 184, 255, .56);
  border-radius: 8px;
  background: rgba(142, 184, 255, .08);
}

.evidence-bag::before {
  content: "EVIDENCE";
  position: absolute;
  left: 10px;
  top: 10px;
  color: rgba(219, 228, 237, .82);
  font: 900 13px/1 ui-monospace, Consolas, monospace;
}

.fingerprint-card {
  right: 196px;
  bottom: 34px;
  width: 110px;
  height: 72px;
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(16, 19, 24, .2) 14px 16px),
    #d8e0e8;
  transform: rotate(-6deg);
}

.fingerprint-card::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px double rgba(16, 19, 24, .5);
}

.cable-coil {
  left: 172px;
  bottom: 36px;
  width: 84px;
  height: 54px;
  border: 8px solid rgba(142, 184, 255, .35);
  border-radius: 50%;
}

.cable-coil::after {
  content: "";
  position: absolute;
  right: -42px;
  top: 22px;
  width: 56px;
  height: 8px;
  background: rgba(142, 184, 255, .35);
}

.case-marker {
  right: 36px;
  top: 78px;
  min-width: 64px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #f3c969;
  color: #322400;
  font: 900 18px/1 ui-monospace, Consolas, monospace;
  transform: rotate(5deg);
}

.scene-copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 22px;
}

.scene-copy h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.device {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  border: 3px solid #6b7b8c;
  background: rgba(13, 17, 23, .88);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .36);
}

.device::before,
.device::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.device::before {
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: inherit;
}

.device::after {
  right: 18px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2e3a44;
  box-shadow:
    -36px 0 0 #2e3a44,
    0 246px 0 #2e3a44,
    -36px 246px 0 #2e3a44;
}

.desktop-device {
  width: min(600px, 82%);
  height: 310px;
  border-radius: 8px;
  background-image: linear-gradient(rgba(13, 17, 23, .18), rgba(13, 17, 23, .72)), url("/assets/hardware/web/desktop-case.webp");
  background-size: cover;
  background-position: center;
}

.laptop-device {
  width: min(660px, 86%);
  height: 260px;
  border-radius: 8px 8px 18px 18px;
  background-image: linear-gradient(rgba(13, 17, 23, .18), rgba(13, 17, 23, .78)), url("/assets/hardware/web/macbook-board.webp");
  background-size: cover;
  background-position: center;
}

.laptop-device::after,
.mac-device::after {
  content: "";
  position: absolute;
  left: -36px;
  right: -36px;
  bottom: -34px;
  height: 32px;
  border-radius: 8px;
  background: #2b3440;
}

.mac-device {
  width: min(620px, 84%);
  height: 280px;
  border-radius: 18px;
  border-color: #98a7b8;
  background-image: linear-gradient(rgba(13, 17, 23, .14), rgba(13, 17, 23, .72)), url("/assets/hardware/web/macbook-board.webp");
  background-size: cover;
  background-position: center;
}

.pi-device {
  width: min(520px, 76%);
  height: 320px;
  border-radius: 18px;
  border-color: #75d88a;
  background-image: linear-gradient(rgba(20, 58, 34, .08), rgba(13, 17, 23, .62)), url("/assets/hardware/web/raspberry-pi.webp");
  background-size: cover;
  background-position: center;
}

.phone-device {
  width: min(320px, 62%);
  height: 390px;
  border-radius: 34px;
  border-color: #8896a5;
  background-image: linear-gradient(rgba(13, 17, 23, .12), rgba(13, 17, 23, .76)), url("/assets/hardware/web/phone-charging.webp");
  background-size: cover;
  background-position: center;
}

.screen-sheen {
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, .08), transparent 38%);
  pointer-events: none;
}

.device-detail {
  position: absolute;
  z-index: 1;
  inset: 28px;
  opacity: .45;
  pointer-events: none;
}

.desktop-device .device-detail {
  background:
    linear-gradient(90deg, transparent 0 34%, rgba(117,216,138,.22) 34% 36%, transparent 36%),
    linear-gradient(180deg, transparent 0 48%, rgba(243,201,105,.24) 48% 51%, transparent 51%),
    radial-gradient(circle at 46% 40%, rgba(243,201,105,.32) 0 22px, transparent 23px),
    linear-gradient(90deg, transparent 0 70%, rgba(142,184,255,.28) 70% 75%, transparent 75%);
}

.laptop-device .device-detail,
.mac-device .device-detail {
  background:
    linear-gradient(180deg, rgba(142,184,255,.16) 0 46%, transparent 46%),
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(255,255,255,.12) 16px 17px);
}

.pi-device .device-detail {
  background:
    radial-gradient(circle at 20% 22%, rgba(255,255,255,.26) 0 12px, transparent 13px),
    radial-gradient(circle at 80% 22%, rgba(255,255,255,.26) 0 12px, transparent 13px),
    linear-gradient(90deg, rgba(243,201,105,.32) 0 18%, transparent 18% 100%),
    repeating-linear-gradient(0deg, transparent 0 24px, rgba(255,255,255,.10) 24px 25px);
}

.phone-device .device-detail {
  background:
    radial-gradient(circle at 50% 8%, rgba(255,255,255,.28) 0 5px, transparent 6px),
    linear-gradient(180deg, rgba(142,184,255,.12) 0 58%, transparent 58%),
    linear-gradient(90deg, transparent 0 46%, rgba(255,106,106,.22) 46% 54%, transparent 54%);
}

.slot-layer {
  position: absolute;
  inset: 0;
}

.evidence-slot {
  position: absolute;
  min-width: 86px;
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 2px dashed #8eb8ff;
  border-radius: 8px;
  background: rgba(16, 22, 31, .82);
  color: #d9e6f2;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.evidence-slot.filled {
  border-style: solid;
  border-color: var(--green);
  background: rgba(117, 216, 138, .18);
  color: var(--ink);
}

.evidence-slot img {
  width: 100%;
  height: 100%;
  max-height: 84px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .35));
}

.evidence-slot span {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
}

.evidence-slot.filled span {
  margin-top: 4px;
  padding: 3px 5px;
  border-radius: 5px;
  background: rgba(16, 19, 24, .78);
  font-size: 11px;
}

.case-slot { left: 18px; top: 18px; }
.safety-slot { left: 18px; top: 76px; width: 132px; }
.motherboard-slot, .board-slot { left: 110px; top: 74px; width: 180px; height: 134px; }
.cpu-slot { left: 154px; top: 104px; }
.cooler-slot { left: 148px; top: 164px; }
.memory-slot { right: 132px; top: 82px; width: 84px; height: 118px; }
.storage-slot { left: 98px; bottom: 38px; width: 150px; }
.power-slot, .charger-slot { right: 28px; bottom: 24px; width: 132px; }
.cables-slot { right: 28px; top: 24px; }
.battery-slot { left: 42px; bottom: 28px; width: 160px; }
.keyboard-slot { left: 220px; bottom: 30px; width: 190px; }
.display-slot, .screen-slot { left: 50%; top: 42px; transform: translateX(-50%); width: 200px; }
.network-slot { right: 32px; top: 42px; }
.sim-slot { right: 34px; top: 96px; }
.pager-slot { left: 50%; bottom: 34px; transform: translateX(-50%); width: 170px; }

.phone-device .battery-slot { left: 50%; bottom: 92px; transform: translateX(-50%); }
.phone-device .screen-slot { top: 34px; }
.phone-device .storage-slot { left: 50%; bottom: 168px; transform: translateX(-50%); width: 145px; }
.phone-device .safety-slot { left: 50%; top: 86px; transform: translateX(-50%); width: 150px; }

.laptop-device .safety-slot,
.mac-device .safety-slot {
  left: 36px;
  top: 32px;
}

.pi-device .safety-slot {
  left: 28px;
  top: 28px;
}

.evidence-status {
  position: absolute;
  z-index: 3;
  right: 18px;
  top: 18px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 900;
}

.evidence-status.safe {
  background: rgba(117, 216, 138, .18);
  color: #c8f3d0;
}

.evidence-status.warning {
  background: rgba(243, 201, 105, .2);
  color: #ffe7a6;
}

.evidence-status.destroyed {
  background: rgba(255, 106, 106, .22);
  color: #ffd1d1;
}

.evidence-scene.blast::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  background:
    radial-gradient(circle at 50% 62%, rgba(255, 106, 106, .72), transparent 18%),
    radial-gradient(circle at 42% 55%, rgba(243, 201, 105, .52), transparent 15%),
    repeating-linear-gradient(28deg, rgba(20,20,20,.38) 0 12px, rgba(80,80,80,.18) 12px 20px),
    rgba(10, 8, 8, .68);
  animation: blastFlash .75s ease-out;
}

@keyframes blastFlash {
  from { opacity: 0; }
  35% { opacity: 1; }
  to { opacity: .35; }
}

.detective-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  margin-top: 18px;
}

.detective-panel > div,
.evidence-parts {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 29, 36, .86);
  padding: 16px;
}

.detective-panel h2 {
  margin: 0 0 12px;
}

.danger-action {
  background: var(--red);
  color: #2b0808;
}

.credit-link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.credit-link:hover {
  color: var(--ink);
}

@media (max-width: 920px) {
  .game-page {
    overflow: auto;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .builder-shell,
  .workbench,
  .case-shell,
  .detective-panel {
    grid-template-columns: 1fr;
  }

  .parts-panel {
    position: static;
    max-height: none;
  }

  canvas {
    width: 100vw;
  }

  .panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .site-header,
  .hub {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    min-height: 64px;
  }

  .hub {
    padding-top: 42px;
  }

  .intro h1 {
    font-size: 42px;
  }

  .mission-bar {
    display: grid;
  }

  .score-box {
    text-align: left;
  }

  .pc-case {
    min-height: 620px;
  }

  .motherboard-slot {
    left: 38px;
    top: 96px;
    width: 220px;
  }

  .gpu-slot {
    left: 34px;
    width: calc(100% - 68px);
  }
}
