/* Photo-component cassette deck.
   All player state and controls remain owned by the existing React component. */

.cassette-component > .cassette-machine {
  aspect-ratio: 5 / 2;
  min-height: 0 !important;
  position: relative;
  overflow: visible;
  isolation: isolate;
  background:
    linear-gradient(#ffffff0d, #0000 18%, #0005),
    url("/assets/deck-chassis-texture.webp?v=deck-components-16") center / 100% 100% no-repeat !important;
  border: 1px solid #947a64 !important;
  border-radius: 2px;
  box-shadow: 0 2px #d4bea0, 0 15px 28px #000a !important;
}

.cassette-component {
  position: relative;
  isolation: isolate;
}

.cassette-component > .cassette-machine::before,
.cassette-component > .cassette-machine::after,
.cassette-machine-brand,
.cassette-machine-display {
  display: none !important;
}

.cassette-machine-main {
  position: absolute !important;
  inset: 0;
  z-index: 1;
  display: block !important;
  padding: 0 !important;
  pointer-events: none !important;
}

/* Left reconstructed module: real Technics hardware in the shared faceplate. */
.cassette-bay {
  position: absolute !important;
  z-index: 1;
  top: 2.5%;
  left: 1.25%;
  width: 47.4%;
  height: 60%;
  min-height: 0 !important;
  display: block !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  contain: layout paint;
  pointer-events: none;
  background: #100c0b url("/assets/deck-module-cassette.webp?v=deck-components-16") center / 100% 100% no-repeat !important;
  border: 1px solid #8f755e !important;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px #160f0c, 0 2px 5px #0008 !important;
}

.cassette-component .cassette-bay::before {
  content: "";
  position: absolute;
  z-index: 8;
  top: 21.1%;
  right: 3%;
  width: 68%;
  height: 31.7%;
  pointer-events: none;
  background:
    linear-gradient(112deg, #fff1 0 8%, transparent 23% 78%, #fff1 94%),
    linear-gradient(#130c0810, #0004);
  box-shadow: inset 0 0 10px #000a;
}

.cassette-component .cassette-bay::after { display: none !important; }

.cassette-component .inserted-tape,
.cassette-component .cassette-bay-empty {
  position: absolute !important;
  z-index: 5 !important;
  top: 22% !important;
  right: 3% !important;
  left: auto !important;
  width: 67.5% !important;
  height: 29.5% !important;
  max-width: none !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

.cassette-component .inserted-tape {
  background: transparent !important;
  filter: brightness(.68) contrast(.96) saturate(.68);
}

.inserted-tape-art {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 18% !important;
  opacity: .94;
  filter: drop-shadow(0 2px 3px #0008);
}

.inserted-tape-title { display: none !important; }

.cassette-component .cassette-bay-empty {
  display: grid !important;
  place-items: center;
  color: transparent !important;
  background: linear-gradient(112deg, #ffffff08, #0000005c 68%, #00000078) !important;
  font-size: 0 !important;
}

.cassette-component .cassette-bay-empty > * {
  display: none !important;
}

/* One continuous instrument cluster, reconstructed from the photographed deck. */
.cassette-machine-main::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 2.5%;
  left: 49.4%;
  width: 49.3%;
  height: 60%;
  overflow: hidden;
  pointer-events: none;
  background: #100c0b url("/assets/deck-instrument-cluster.webp?v=deck-components-16") center / 100% 100% no-repeat;
  border: 1px solid #8f755e;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px #160f0c, 0 2px 5px #0008;
}

/* Two functional meters aligned to the photographed L/R windows. */
.vu-bank {
  position: absolute !important;
  z-index: 2;
  top: 2.5%;
  left: 49.4%;
  width: 33.3%;
  height: 60%;
  min-height: 0 !important;
  display: block !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  contain: layout paint;
  pointer-events: none;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
}

.vu-bank > small,
.vu-meter span { display: none !important; }

.vu-bank::before,
.vu-bank::after { display: none !important; }

.vu-meter {
  position: absolute !important;
  top: 22.2% !important;
  width: 18.5% !important;
  height: 59.5% !important;
  min-width: 0;
  min-height: 0;
  overflow: hidden !important;
  background: transparent !important;
  border: 0 !important;
  --meter-level: 0%;
  --meter-peak: 0%;
}

.vu-meter:nth-of-type(1) { left: 23.5% !important; }
.vu-meter:nth-of-type(2) { left: 57% !important; }

.vu-meter i,
.vu-meter i.is-active {
  position: absolute !important;
  right: 12% !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 12% !important;
  width: auto !important;
  height: 100% !important;
  transform: none !important;
  clip-path: inset(calc(100% - var(--meter-level)) 0 0 0);
  background: linear-gradient(to top, #4fd28a 0 64%, #f1c64b 64% 84%, #ec4351 84% 100%) !important;
  filter: drop-shadow(0 0 3px #58d99a);
  opacity: .95;
  animation: none !important;
  transition: clip-path 78ms linear;
  -webkit-mask: repeating-linear-gradient(to top, #000 0 3.1%, transparent 3.1% 4.55%);
  mask: repeating-linear-gradient(to top, #000 0 3.1%, transparent 3.1% 4.55%);
}

.vu-meter::after {
  content: "";
  position: absolute;
  right: 4%;
  bottom: var(--meter-peak);
  left: 4%;
  height: 2px;
  background: #efffff;
  box-shadow: 0 0 4px #7beaf1;
  opacity: .82;
  transform: translateY(100%);
  transition: bottom 90ms linear;
}

/* Right photographed module with a real vertical range control. */
.cassette-volume-panel {
  position: absolute !important;
  z-index: 4;
  top: 2.5%;
  left: 83.24%;
  width: 15.46%;
  height: 60%;
  display: block !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  contain: layout paint;
  padding: 0 !important;
  pointer-events: auto;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
}

.cassette-volume-panel > span,
.cassette-volume-panel output,
.cassette-volume-knob { display: none !important; }

.cassette-volume-panel::before,
.cassette-volume-panel::after { display: none !important; }

.cassette-volume-panel input[type="range"] {
  position: absolute;
  z-index: 3;
  top: 20.5%;
  left: 42%;
  width: 24% !important;
  height: 70.5%;
  margin: 0;
  cursor: ns-resize;
  opacity: 1;
  direction: rtl;
  writing-mode: vertical-lr;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
}

.cassette-volume-panel input[type="range"]::-webkit-slider-runnable-track {
  width: 9px;
  background: #070706;
  border: 1px solid #3d342e;
  box-shadow: inset 0 0 4px #000;
}

.cassette-volume-panel input[type="range"]::-webkit-slider-thumb {
  width: 34px;
  height: 17px;
  margin-left: -13px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(90deg, #8c8479, #eee8dc 46%, #a69d90 54%, #6d665d);
  border: 1px solid #211e1b;
  border-radius: 1px;
  box-shadow: 0 3px 4px #000a, inset 0 1px #fff;
}

.cassette-volume-panel input[type="range"]::-moz-range-track {
  width: 9px;
  background: #070706;
  border: 1px solid #3d342e;
}

.cassette-volume-panel input[type="range"]::-moz-range-thumb {
  width: 34px;
  height: 17px;
  background: linear-gradient(90deg, #8c8479, #eee8dc 46%, #a69d90 54%, #6d665d);
  border: 1px solid #211e1b;
  border-radius: 1px;
  box-shadow: 0 3px 4px #000a, inset 0 1px #fff;
}

/* Four large, individual, photo-textured transport keys. */
.cassette-transport {
  position: absolute !important;
  z-index: 8;
  right: 1.25%;
  bottom: 3.2%;
  left: 1.25%;
  height: 30.2%;
  display: grid !important;
  grid-template-columns: 1fr 1.16fr 1fr 1fr;
  gap: 1.55%;
  min-height: 0 !important;
  padding: 2% 2.5% !important;
  pointer-events: auto !important;
  background:
    linear-gradient(#ffffff0a, transparent 24%, #0007),
    #17100e !important;
  border: 1px solid #765f4f !important;
  box-shadow:
    inset 0 1px #c4a98b55,
    inset 0 -7px 13px #0009,
    0 1px #090605 !important;
}

.cassette-transport button,
.cassette-transport button:nth-child(n) {
  position: relative !important;
  inset: auto !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8%;
  padding: 5% 4% 4% !important;
  pointer-events: auto;
  cursor: pointer;
  color: #f5eee5 !important;
  text-shadow: 0 1px 2px #000;
  background:
    linear-gradient(#ffffff0d, transparent 30%, #0003),
    #211a18 url("/assets/deck-control-key-v2.webp?v=deck-components-16") center / 100% 100% no-repeat !important;
  border: 1px solid #0b0807 !important;
  border-top-color: #756254 !important;
  border-radius: 2px 2px 1px 1px;
  box-shadow:
    0 4px 0 #090605,
    0 6px 8px #000a,
    inset 0 1px #a88c7547,
    inset 1px 0 #ffffff0a,
    inset -1px 0 #0008 !important;
  opacity: 1 !important;
  transform: none !important;
  transition: filter .12s ease, transform .08s ease, box-shadow .08s ease;
}

.cassette-transport button span,
.cassette-transport button small {
  visibility: visible !important;
  display: block;
  color: inherit !important;
  line-height: 1 !important;
}

.cassette-transport button span {
  color: #e8e0d8 !important;
  font: 700 clamp(9px, 1.22vw, 17px)/1 Arial, sans-serif;
  filter: drop-shadow(0 1px 1px #000);
}

.cassette-transport button small {
  color: #c9beb2 !important;
  letter-spacing: .11em;
  font: 800 clamp(6px, .78vw, 11px)/1 "Arial Narrow", Arial, sans-serif;
}

.cassette-transport button:nth-child(2) {
  border-top: 3px solid #d82333 !important;
  background:
    linear-gradient(#e22b3b18, transparent 34%, #0003),
    #241a19 url("/assets/deck-control-key-v2.webp?v=deck-components-16") center / 100% 100% no-repeat !important;
  box-shadow:
    0 4px 0 #090605,
    0 6px 8px #000a,
    0 -2px 7px #df18282e,
    inset 0 1px #b99d8655 !important;
}

.cassette-transport button:nth-child(5) {
  display: none !important;
}

.cassette-transport button:hover,
.cassette-transport button:focus-visible {
  filter: brightness(1.16) contrast(1.04);
  outline: 1px solid #d8c7b7;
  outline-offset: 2px;
}

.cassette-transport button:active {
  transform: translateY(3px) !important;
  box-shadow: 0 1px 0 #120c0e, 0 2px 4px #0009, inset 0 1px #c4aec055 !important;
}

.cassette-transport button:disabled {
  cursor: default;
  filter: grayscale(.55) brightness(.58);
}

.cassette-player-engine,
.cassette-player-engine.is-stowed {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.cassette-player-backdrop,
.cassette-player-close {
  display: none !important;
}

.cassette-player-engine.is-open {
  visibility: visible !important;
  opacity: 1 !important;
  position: fixed !important;
  z-index: 1002 !important;
  top: var(--tv-top, 50%) !important;
  left: var(--tv-left, 50%) !important;
  width: var(--tv-width, min(92vw, 720px)) !important;
  height: var(--tv-height, auto) !important;
  aspect-ratio: var(--tv-ratio, 16 / 9) !important;
  overflow: hidden !important;
  pointer-events: auto;
  transform: translate(-50%, -50%) !important;
  clip-path: inset(0 round 2.2% / 3.8%);
  background: #000 !important;
  border: 0 !important;
  border-radius: 2.2% / 3.8%;
  box-shadow: none !important;
}

.cassette-player-engine.is-open[data-routed-to="broadcast-tv"] {
  transform: none !important;
}

.cassette-player-engine.is-open iframe {
  width: 100% !important;
  height: 100% !important;
}

.cassette-machine.is-player-open { overflow: visible !important; }

.cassette-component > .cassette-case-stack {
  position: relative !important;
  z-index: 12 !important;
  pointer-events: auto !important;
  min-height: 520px !important;
  gap: 0 !important;
  padding: 0 12px 15px !important;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, #ffffff0b, transparent 13%, transparent 87%, #0009),
    linear-gradient(#241914, #0a0807 18%, #0b0908) !important;
  border: 1px solid #806953 !important;
  border-radius: 2px 2px 5px 5px;
  box-shadow:
    inset 0 1px #d0b18b55,
    inset 0 0 0 3px #0a0807,
    7px 8px #080706,
    0 18px 32px #0009 !important;
}

/* A photographed single-column storage bay forms the reusable empty slots. */
.cassette-component > .cassette-case-stack::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 7px;
  right: 9px;
  bottom: 12px;
  left: 9px;
  pointer-events: none;
  background:
    linear-gradient(90deg, #080706 0 8px, transparent 14px calc(100% - 14px), #080706 calc(100% - 8px)),
    url("/assets/cassette-rack-slot.webp?v=deck-components-16") center top / 100% 62px repeat-y;
  border: 1px solid #28201a;
  box-shadow: inset 0 0 17px #000d;
}

.cassette-component > .cassette-case-stack::after {
  content: "";
  position: absolute;
  z-index: 5;
  top: 6px;
  right: 8px;
  bottom: 10px;
  left: 8px;
  pointer-events: none;
  background: linear-gradient(90deg,
    #090706 0 7px,
    #47372b 8px,
    #17110e 11px,
    transparent 14px calc(100% - 14px),
    #17110e calc(100% - 11px),
    #47372b calc(100% - 8px),
    #090706 calc(100% - 7px));
  border-top: 2px solid #836b52;
  border-bottom: 3px solid #090706;
  box-shadow: inset 0 1px #d1b18b2b;
}

.cassette-component > .cassette-case-stack .cassette-stack-heading {
  display: none !important;
}

.cassette-component .cassette-case-pile,
.cassette-component .cassette-case,
.cassette-component .cassette-case * {
  pointer-events: auto !important;
}

.cassette-component .cassette-case-pile {
  align-items: stretch !important;
  position: relative;
  z-index: 3;
  gap: 20px !important;
  padding: 10px 11px 0 !important;
}

.cassette-component .cassette-case-pile .cassette-case {
  width: 100% !important;
  margin: 0 !important;
  transform: translateX(0) !important;
  border-radius: 2px 4px 4px 2px;
  filter: saturate(.92) contrast(1.04);
}

.cassette-component .cassette-case-pile .cassette-case::after {
  content: "" !important;
  position: absolute;
  z-index: 3;
  right: -10px;
  bottom: -14px;
  left: -10px;
  height: 10px;
  pointer-events: none;
  background: linear-gradient(#675242, #18120f 35%, #050403 72%);
  border-top: 1px solid #9a7d61;
  box-shadow: 0 3px 5px #000d;
}

.cassette-component .cassette-case-pile .cassette-case-shell {
  border-color: #61564c !important;
  box-shadow:
    0 2px 0 #050403,
    0 5px 8px #000c,
    inset 0 1px #ffffff24 !important;
}

.cassette-component .cassette-case-pile .cassette-case:hover,
.cassette-component .cassette-case-pile .cassette-case:focus-visible,
.cassette-component .cassette-case-pile .cassette-case.is-loaded {
  transform: translateX(-7px) !important;
}

.cassette-component .cassette-case-pile .cassette-case.is-loaded .cassette-case-shell {
  border-color: #e6ded4 !important;
  box-shadow:
    0 2px 0 #050403,
    0 5px 8px #000c,
    0 0 0 2px var(--case-accent),
    0 0 14px color-mix(in srgb, var(--case-accent) 32%, transparent),
    inset 0 1px #ffffff24 !important;
}

@media (max-width: 760px) {
  .cassette-component > .cassette-machine { min-height: 174px; }
  .cassette-transport { padding: 1.6% !important; }
  .cassette-transport button { gap: 4%; }
  .cassette-component > .cassette-case-stack {
    min-height: 410px !important;
  }
  .cassette-component .cassette-case-pile {
    padding-bottom: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vu-meter i,
  .vu-meter::after,
  .cassette-transport button { transition: none !important; }
}

/* Companion fluorescent track display. It is physically attached below the
   deck so the tall cassette rack cannot stretch the space between them. */
.cassette-component > .cassette-machine {
  margin-bottom: 100px;
}

.cassette-readout-unit {
  --readout-overflow: 0px;
  position: absolute;
  z-index: 12;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  isolation: isolate;
  min-width: 0;
  min-height: 88px;
  display: block;
  padding: 8px;
  color: #d6c7b6;
  background:
    linear-gradient(108deg, #ffffff0c, transparent 22% 76%, #0007),
    #15100e url("/assets/deck-chassis-texture.webp?v=deck-components-16") center / 100% 100% no-repeat;
  border: 1px solid #947a64;
  border-radius: 2px;
  box-shadow:
    0 2px #d4bea0,
    0 13px 24px #0009,
    inset 0 1px #efd5b334,
    inset 0 -8px 14px #0008;
}

.cassette-readout-unit::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 5px;
  pointer-events: none;
  border: 1px solid #33251f;
  box-shadow: inset 0 0 0 1px #8a715a32;
}

.readout-glass {
  position: relative;
  width: 100%;
  min-height: 70px;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 10px 13px 8px;
  color: #73e2bd;
  background:
    linear-gradient(111deg, #ffffff0c 0 9%, transparent 24% 76%, #ffffff07 91%),
    radial-gradient(ellipse at 52% 43%, #06322642, transparent 68%),
    linear-gradient(#020d0aa8, #000504d4),
    #010705;
  border: 1px solid #6e5948;
  border-radius: 2px;
  box-shadow:
    inset 0 0 0 2px #020403,
    inset 0 0 17px #000,
    0 1px #a4896d45;
}

.readout-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background: repeating-linear-gradient(0deg, transparent 0 2px, #001711 2px 3px);
  mix-blend-mode: multiply;
}

.readout-asteroid-field {
  position: absolute;
  z-index: 0;
  inset: 3px 5px;
  width: calc(100% - 10px);
  height: calc(100% - 6px);
  overflow: hidden;
  display: block;
  pointer-events: none;
  opacity: .1;
  filter: drop-shadow(0 0 2px #33d5a3);
  transition: opacity .35s ease;
}

.cassette-readout-unit.has-tape .readout-asteroid-field { opacity: .17; }
.cassette-readout-unit.is-playing .readout-asteroid-field { opacity: .34; }

.readout-title-window {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #5fe0b72c;
}

.readout-title {
  display: block;
  min-width: max-content;
  max-width: none;
  color: #86f4cf;
  white-space: nowrap;
  letter-spacing: .055em;
  text-transform: uppercase;
  font: 700 clamp(12px, 1.25vw, 17px)/1 Consolas, "Courier New", monospace;
  text-shadow: 0 0 3px #49dfad, 0 0 9px #0ad79988;
  transform: translateX(0);
}

.cassette-readout-unit.is-scrolling .readout-title {
  animation: readout-title-pan 8s ease-in-out 1s infinite alternate;
}

@keyframes readout-title-pan {
  0%, 18% { transform: translateX(0); }
  82%, 100% { transform: translateX(calc(-1 * var(--readout-overflow))); }
}

.readout-meta {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 12px;
  padding-top: 6px;
  text-transform: uppercase;
  font: 700 7px/1 Consolas, "Courier New", monospace;
  letter-spacing: .08em;
}

.readout-mixtape {
  min-width: 0;
  overflow: hidden;
  color: #55b697;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.readout-track { color: #cdbd9e; }

.readout-status {
  min-width: 43px;
  color: #d02d3b;
  text-align: right;
  font-style: normal;
}

.cassette-readout-unit.has-tape .readout-status { color: #74dab8; }
.cassette-readout-unit.is-playing .readout-status {
  color: #8bffd6;
  text-shadow: 0 0 6px #34d9a48c;
}

@media (max-width: 760px) {
  .cassette-component {
    grid-template-areas: "tuner" "game" "deck" "tapes" !important;
  }

  .cassette-component > .cassette-machine { margin-bottom: 94px; }

  .cassette-readout-unit {
    width: 100%;
    min-height: 82px;
    padding: 7px;
  }

  .readout-glass { padding: 9px 9px 7px; }
  .readout-meta { gap: 7px; font-size: 6px; }
}

@media (max-width: 430px) {
  .readout-track { display: none; }
  .readout-meta { grid-template-columns: minmax(0, 1fr) auto; }
}

@media (prefers-reduced-motion: reduce) {
  .cassette-readout-unit.is-scrolling .readout-title {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: none !important;
  }
}

/* Unbranded game hardware and fitted two-column case cabinet. The original
   full-screen launcher stays mounted and hidden so its return control remains
   the single source of truth. */
.media-game-library { display: none !important; }

.game-system-section {
  grid-area: games;
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 13px;
  align-self: start;
}

.game-system-console {
  position: relative;
  isolation: isolate;
  min-height: 132px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 72px minmax(130px, 1fr) 104px;
  grid-template-rows: 78px 36px;
  gap: 7px 11px;
  padding: 9px 12px 10px;
  color: #cfc3b6;
  background:
    linear-gradient(112deg, #ffffff0d, transparent 24% 72%, #0008),
    linear-gradient(#251a16 0 4%, #120e0c 7% 92%, #050403),
    url("/assets/deck-chassis-texture.webp?v=deck-components-16") center / 100% 100% no-repeat;
  border: 1px solid #806953;
  border-radius: 3px 3px 8px 8px;
  box-shadow: 0 2px #c1a98b, 0 12px 25px #000a, inset 0 1px #efd5b32b, inset 0 -10px 18px #000a;
}

.game-system-console::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 6px;
  pointer-events: none;
  border: 1px solid #3b2d25;
  box-shadow: inset 0 0 0 1px #8d735b32;
}

.game-system-console::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 50px;
  left: 12px;
  height: 1px;
  background: #5c493a;
  box-shadow: 0 1px #090706;
}

.game-system-screw {
  position: absolute;
  z-index: 4;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #a08f7f, #3d3731 48%, #12100e 72%);
  box-shadow: inset 0 0 0 1px #070605, 0 1px #9e836755;
}

.game-system-screw::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 1px;
  width: 5px;
  height: 1px;
  background: #171411;
  transform: rotate(-18deg);
}

.game-system-screw-one { top: 8px; left: 8px; }
.game-system-screw-two { right: 8px; bottom: 8px; }

.game-console-switches {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 7px 5px;
  border: 1px solid #342a24;
  background: linear-gradient(#ffffff0b, #0005), #0d0a09;
  box-shadow: inset 0 0 9px #000c;
}

.game-console-switches span { display: grid; justify-items: center; gap: 5px; }

.game-console-switches i {
  width: 20px;
  height: 26px;
  background: linear-gradient(90deg, #3d332e, #9a877a 48%, #302824 55%, #15110f);
  border: 1px solid #080706;
  box-shadow: inset 0 2px #b7a49740, 0 2px 3px #000c;
}

.game-console-switches span:first-child i { border-top-color: #ca2c3a; }

.game-console-switches small,
.game-controller-ports small {
  color: #927f70;
  letter-spacing: .08em;
  font: 700 5px/1.1 Consolas, "Courier New", monospace;
  white-space: nowrap;
}

.game-console-bay {
  position: relative;
  align-self: center;
  height: 63px;
  overflow: hidden;
  background: linear-gradient(104deg, #ffffff0a, transparent 22% 74%, #0009), linear-gradient(#0a0807, #1d1511 52%, #080605);
  border: 1px solid #6d5644;
  border-radius: 3px 3px 10px 10px;
  box-shadow: inset 0 0 0 4px #0b0807, inset 0 8px 13px #000d, 0 1px #bea08055;
}

.game-console-bay span {
  position: absolute;
  top: 20px;
  right: 10%;
  left: 10%;
  height: 15px;
  border: 1px solid #342821;
  border-radius: 2px;
  background: linear-gradient(#030202, #17110e 52%, #050403);
  box-shadow: inset 0 3px 6px #000, 0 1px #6c514033;
}

.game-console-bay i {
  position: absolute;
  right: 25%;
  bottom: 8px;
  left: 25%;
  height: 4px;
  border-radius: 50%;
  background: #080605;
  box-shadow: 0 1px #48382d;
}

.game-system-status {
  align-self: center;
  min-width: 0;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 8px 7px;
  background: #090706;
  border: 1px solid #413128;
  box-shadow: inset 0 0 8px #000;
}

.game-system-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #46171a;
  border: 1px solid #150707;
}

.game-system-status strong {
  min-width: 0;
  overflow: hidden;
  color: #bd685b;
  letter-spacing: .055em;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 700 8px/1 Consolas, "Courier New", monospace;
  text-shadow: 0 0 4px #c73f313d;
}

.game-system-section.is-running .game-system-status i { background: #e43a49; box-shadow: 0 0 7px #e43a49; }
.game-system-section.is-running .game-system-status strong { color: #ff9a89; text-shadow: 0 0 7px #e23a47a6; }

.game-controller-ports {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding-top: 7px;
}

.game-controller-ports span {
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.game-controller-ports i {
  width: 25px;
  height: 14px;
  border: 1px solid #534035;
  border-radius: 1px 1px 5px 5px;
  background: radial-gradient(ellipse at 50% 45%, #050403 0 38%, #2c221d 42% 53%, #080605 57%);
  box-shadow: inset 0 0 4px #000, 0 1px #95785b33;
}

.game-storage-cabinet {
  position: relative;
  isolation: isolate;
  min-height: 244px;
  padding: 13px 18px 17px;
  background: linear-gradient(90deg, #ffffff0b, transparent 11%, transparent 89%, #000b), linear-gradient(#211712, #0c0908 13%, #090706);
  border: 1px solid #806953;
  border-radius: 4px 4px 7px 7px;
  box-shadow: inset 0 1px #d0b18b55, inset 0 0 0 4px #090706, 7px 8px #080706, 0 18px 32px #0009;
}

.game-storage-cabinet::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8px 10px 11px;
  border: 1px solid #31251e;
  background: #080605;
  box-shadow: inset 0 0 22px #000;
}

.game-cabinet-rail {
  position: absolute;
  z-index: 4;
  top: 11px;
  bottom: 12px;
  width: 7px;
  background: linear-gradient(90deg, #120d0a, #745944 48%, #18110e 58%, #070504);
  box-shadow: 0 0 5px #000d;
  pointer-events: none;
}

.game-cabinet-rail-left { left: 11px; }
.game-cabinet-rail-right { right: 11px; transform: scaleX(-1); }

.game-storage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 15px; }

.game-storage-slot {
  position: relative;
  z-index: 2;
  aspect-ratio: 4 / 1;
  min-width: 0;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 1px solid #4e443b;
  border-radius: 2px 5px 5px 2px;
  background: #0a0807;
  box-shadow: 0 4px 0 #050403, 0 7px 8px #000c, inset 0 1px #ffffff17;
}

.game-storage-slot::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -7px;
  bottom: -9px;
  left: -7px;
  height: 6px;
  background: linear-gradient(#624d3c, #17110e 45%, #050403);
  border-top: 1px solid #8a6e55;
  box-shadow: 0 2px 4px #000;
}

.game-storage-slot.is-empty {
  overflow: visible;
  background: linear-gradient(104deg, #ffffff08, transparent 20% 75%, #0008), linear-gradient(#17110e, #090706 48%, #18120e 52%, #070504);
  border-color: #342921;
  box-shadow: inset 0 6px 8px #000d, 0 4px #050403, 0 7px 8px #000b;
}

button.game-storage-case { cursor: pointer; transition: transform .16s ease, filter .16s ease, border-color .16s ease; }

.game-storage-case img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: saturate(.94) contrast(1.04);
}

.game-storage-case:hover,
.game-storage-case:focus-visible {
  z-index: 6;
  filter: brightness(1.1);
  transform: translateY(-2px);
  border-color: #eee6db;
  outline: 0;
  box-shadow: 0 4px #050403, 0 7px 9px #000d, 0 0 0 2px #e21e31;
}

@media (min-width: 761px) {
  .cassette-component { grid-template-areas: "tuner game" "deck tapes" "games tapes" !important; }
}

@media (max-width: 760px) {
  .cassette-component { grid-template-areas: "tuner" "deck" "games" "tapes" !important; }
  .game-system-section { width: min(100%, 520px); justify-self: center; }
  .game-system-console { grid-template-columns: 64px minmax(110px, 1fr) 92px; }
}

@media (max-width: 430px) {
  .game-system-console { grid-template-columns: 56px minmax(90px, 1fr) 78px; padding-inline: 9px; gap: 7px; }
  .game-system-status { padding-inline: 4px; }
  .game-system-status strong { font-size: 6.5px; }
  .game-controller-ports small { font-size: 4.5px; }
  .game-storage-cabinet { padding-inline: 15px; }
  .game-storage-grid { gap: 12px 10px; }
}

/* Final console faceplate pass: deeper top-loading bay, readable hardware
   legends and a restrained late-80s signal stripe without borrowed branding. */
.game-system-console {
  min-height: 156px;
  grid-template-columns: 86px minmax(150px, 1fr) 122px;
  grid-template-rows: 96px 42px;
  gap: 8px 13px;
  padding: 10px 14px 12px;
  background:
    linear-gradient(112deg, #ffffff10, transparent 22% 74%, #0009),
    repeating-linear-gradient(90deg, #ffffff07 0 1px, transparent 1px 5px),
    linear-gradient(#2a1d17 0 4%, #120e0c 8% 91%, #050403),
    url("/assets/deck-chassis-texture.webp?v=deck-components-16") center / 100% 100% no-repeat;
  border-color: #94785e;
  box-shadow:
    0 2px #d0b99a,
    0 13px 27px #000b,
    inset 0 1px #f2d6b43d,
    inset 0 -12px 20px #000b;
}

.game-system-console::before {
  inset: 6px;
  border-color: #4d3a2d;
  box-shadow: inset 0 0 0 1px #a1846838, inset 0 -2px #050403;
}

.game-system-console::after {
  top: 9px;
  right: 13px;
  bottom: auto;
  left: 95px;
  height: 4px;
  background: linear-gradient(90deg, #d32636 0 34%, #d68c3f 34% 55%, #c7b28a 55% 72%, #2d241f 72%);
  box-shadow: 0 1px #050403, 0 2px #ffffff12;
}

.game-console-switches {
  position: relative;
  gap: 12px;
  padding: 24px 8px 8px;
  background:
    linear-gradient(#ffffff0d, transparent 38%, #0007),
    #0d0a09;
  border-color: #514033;
  box-shadow: inset 0 0 0 2px #070504, inset 0 0 13px #000e, 0 1px #9a795d30;
}

.game-console-switches::before {
  content: "SYSTEM";
  position: absolute;
  top: 9px;
  right: 7px;
  left: 7px;
  color: #ab9581;
  letter-spacing: .18em;
  text-align: center;
  font: 700 6px/1 Consolas, "Courier New", monospace;
}

.game-console-switches i {
  width: 24px;
  height: 32px;
  background:
    linear-gradient(#d92a3a 0 3px, transparent 3px),
    linear-gradient(90deg, #413630, #a89587 46%, #443731 55%, #17120f);
  border-color: #070504;
  box-shadow: inset 0 2px #d7c0b04f, 0 3px 4px #000d;
}

.game-console-switches small,
.game-controller-ports small {
  color: #b7a28e;
  font-size: 6px;
  letter-spacing: .1em;
}

.game-console-bay {
  align-self: stretch;
  height: auto;
  margin-top: 7px;
  border-color: #9b795d;
  border-radius: 3px 3px 13px 13px;
  background:
    linear-gradient(108deg, #ffffff0b, transparent 22% 77%, #000c),
    linear-gradient(#211711 0 18%, #080605 20% 80%, #1b130f 82% 100%);
  box-shadow:
    inset 0 0 0 3px #080605,
    inset 0 12px 17px #000e,
    inset 0 -8px 12px #000a,
    0 2px #c09b7740;
}

.game-console-bay::before {
  content: "PROGRAM BAY";
  position: absolute;
  top: 9px;
  right: 12px;
  left: 12px;
  color: #b09a84;
  letter-spacing: .16em;
  text-align: center;
  font: 700 6px/1 Consolas, "Courier New", monospace;
  text-shadow: 0 1px #000;
}

.game-console-bay::after {
  content: "";
  position: absolute;
  right: 14%;
  bottom: 9px;
  left: 14%;
  height: 7px;
  opacity: .7;
  background: repeating-linear-gradient(90deg, #554034 0 2px, #080605 2px 8px);
  border-top: 1px solid #080605;
  box-shadow: 0 1px #6f53403b;
}

.game-console-bay span {
  top: 29px;
  right: 8%;
  left: 8%;
  height: 22px;
  border-color: #48362b;
  background: linear-gradient(#020101, #17100c 44%, #060403 52%, #120d0a);
  box-shadow: inset 0 5px 8px #000, 0 1px #9a75583d, 0 0 0 3px #090605;
}

.game-console-bay i {
  right: 24%;
  bottom: 23px;
  left: 24%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #8f6b50 18% 82%, transparent);
  box-shadow: 0 1px #000;
}

.game-system-status {
  position: relative;
  align-self: stretch;
  grid-template-columns: 8px minmax(0, 1fr);
  grid-template-rows: 18px 1fr;
  gap: 3px 8px;
  margin-top: 7px;
  padding: 8px 10px 10px;
  background:
    repeating-linear-gradient(0deg, #ffffff07 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 45% 55%, #37100e70, transparent 72%),
    #080605;
  border-color: #684d3a;
  box-shadow: inset 0 0 12px #000, 0 1px #a27c5a38;
}

.game-system-status::before {
  content: "SYSTEM STATUS";
  grid-column: 1 / -1;
  align-self: center;
  color: #8e7967;
  letter-spacing: .14em;
  font: 700 5.5px/1 Consolas, "Courier New", monospace;
}

.game-system-status i {
  width: 7px;
  height: 7px;
  background: #7a1b21;
  box-shadow: inset 0 0 0 1px #1c0709, 0 0 4px #9a252c73;
}

.game-system-status strong {
  color: #e37967;
  letter-spacing: .075em;
  font-size: 9px;
  text-shadow: 0 0 6px #d3443575;
}

.game-controller-ports {
  position: relative;
  grid-column: 1 / 4;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 26px;
  padding: 16px 74px 0;
  border-top: 1px solid #5d4738;
  box-shadow: inset 0 1px #090605;
}

.game-controller-ports::before {
  content: "CONTROLLER INPUT";
  position: absolute;
  top: 5px;
  left: 50%;
  color: #715e4f;
  letter-spacing: .16em;
  transform: translateX(-50%);
  font: 700 5px/1 Consolas, "Courier New", monospace;
  white-space: nowrap;
}

.game-controller-ports span {
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 9px;
}

.game-controller-ports i {
  width: 35px;
  height: 18px;
  border-color: #725844;
  border-radius: 2px 2px 7px 7px;
  background:
    radial-gradient(circle at 35% 50%, #4e3c30 0 1px, transparent 2px),
    radial-gradient(circle at 65% 50%, #4e3c30 0 1px, transparent 2px),
    radial-gradient(ellipse at 50% 45%, #030202 0 38%, #2f241e 42% 55%, #070504 58%);
  box-shadow: inset 0 0 5px #000, 0 1px #b28d6b45;
}

@media (max-width: 760px) {
  .game-system-console { grid-template-columns: 78px minmax(125px, 1fr) 110px; }
  .game-controller-ports { padding-inline: 48px; }
}

@media (max-width: 430px) {
  .game-system-console {
    min-height: 148px;
    grid-template-columns: 68px minmax(96px, 1fr) 94px;
    grid-template-rows: 90px 40px;
    gap: 7px;
  }
  .game-system-console::after { left: 78px; }
  .game-console-switches { gap: 7px; padding-inline: 4px; }
  .game-console-switches i { width: 20px; }
  .game-system-status { padding-inline: 6px; }
  .game-system-status strong { font-size: 7px; }
  .game-controller-ports { gap: 14px; padding-inline: 22px; }
}

/* Temporary diagonal work tape across the CRT. */
.media-tuner-slot {
  position: relative;
  overflow: hidden;
}

.tv-construction-tape {
  position: absolute;
  z-index: 40;
  top: 5%;
  left: -12%;
  width: 136%;
  height: 28px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
  padding: 0 18px;
  pointer-events: none;
  color: #171000;
  background:
    linear-gradient(#ffffff75, transparent 23%, transparent 76%, #5b43004f),
    repeating-linear-gradient(135deg, #f6d335 0 16px, #e9bd18 16px 32px);
  border: 1px solid #3d2e00;
  box-shadow: 0 4px 8px #000a, inset 0 1px #fff8, inset 0 -1px #735600;
  transform: rotate(37deg);
  transform-origin: left center;
}

.tv-construction-tape::before,
.tv-construction-tape::after {
  content: "";
  flex: 0 0 24px;
  align-self: stretch;
  background: repeating-linear-gradient(135deg, #171000 0 6px, transparent 6px 12px);
  opacity: .88;
}

.tv-construction-tape span {
  flex: 0 0 auto;
  letter-spacing: .075em;
  white-space: nowrap;
  font: 900 10px/1 "Arial Narrow", Arial, sans-serif;
  text-shadow: 0 1px #fff4;
}

@media (max-width: 520px) {
  .tv-construction-tape {
    height: 24px;
    transform: rotate(39deg);
  }
  .tv-construction-tape span { font-size: 8px; }
}
