/* Industrial DDM-2801CU. The side-mounted control board, steel mounting plate
   and bare Trinitron face follow Sony's 1996 front elevation and the surviving
   unit photographed in CRT Database. All surfaces are original CSS. */
.tv-sony-box { display: none; }

#tv-room[data-model="sony"][data-view="cabinet"] #tv-stage {
  width: min(100%, 44rem, max(18rem, calc((100svh - 10rem) * 1.054)));
  aspect-ratio: 316 / 299;
  container-type: inline-size;
}

#tv-room[data-model="sony"][data-view="cabinet"] :is(#tv-cabinet, #tv-channel-knob) { display: none; }

#tv-room[data-model="sony"][data-view="cabinet"] .tv-sony-box {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  filter: drop-shadow(.12rem .28rem .16rem #050705a8);
}

/* Four mounting studs on the bare steel chassis. A shallow folded lip catches
   the gallery lighting around the complete front plate. */
.tv-sony-box::before {
  content: "";
  position: absolute;
  inset: 0 5.7% 0 0;
  border-radius: .65%;
  background:
    radial-gradient(ellipse at 4% 4.1%, #211b12 0 .38%, #8d7546 .45% .72%, #dcc891 .78% 1.06%, #736346 1.12% 1.33%, transparent 1.43%),
    radial-gradient(ellipse at 96% 4.1%, #211b12 0 .38%, #8d7546 .45% .72%, #dcc891 .78% 1.06%, #736346 1.12% 1.33%, transparent 1.43%),
    radial-gradient(ellipse at 4% 96%, #211b12 0 .38%, #8d7546 .45% .72%, #cab884 .78% 1.06%, #65583f 1.12% 1.33%, transparent 1.43%),
    radial-gradient(ellipse at 96% 96%, #211b12 0 .38%, #8d7546 .45% .72%, #cab884 .78% 1.06%, #65583f 1.12% 1.33%, transparent 1.43%),
    repeating-linear-gradient(0deg, #f0f0d80a 0, transparent 1px 3px),
    linear-gradient(109deg, #585a56, #bdbdb3 8%, #95998e 22%, #d7d7c7 43%, #848882 62%, #b1b2a3 85%, #6b6a62);
  box-shadow: inset 0 2px 0 #d8d9ca, inset 2px 0 0 #c4c5ba, inset -2px -2px 1px #515650;
}

/* The protective black band hugs the bent glass; short retaining straps cross
   its upper and lower edges. */
.sony-frame {
  position: absolute;
  inset: 2.8% 8.8% 3.1% 2.9%;
  border-radius: 8% / 6.5%;
  background:
    linear-gradient(90deg, transparent 19%, #b4aa89 19.2%, #e1d8b1 20%, #9a9277 22.9%, transparent 23.2%, transparent 75%, #928c74 75.2%, #d8d1ac 76%, #aca58a 78.9%, transparent 79.2%) 50% 0 / 95% 2.5% no-repeat,
    linear-gradient(90deg, transparent 17%, #98937a 17.2%, #c3bca0 18%, #817b67 20.8%, transparent 21.2%, transparent 73%, #817c6d 73.2%, #c5baa0 74%, #948b75 76.9%, transparent 77.2%) 50% 100% / 95% 2% no-repeat,
    linear-gradient(174deg, #2b2d2a, #454644 2.5%, #101213 4%, #191c1c 10%, #080c0c 46%, #232624 88%, #080a0a 96%, #3e413d);
  box-shadow: inset 1px 2px 2px #e2e3d85c, inset -2px -2px 2px #030505, 0 0 0 1px #333730, 0 2px 4px #252820;
}
.sony-frame::after {
  content: "";
  position: absolute;
  inset: 2.5% 3%;
  border-radius: 7.5% / 5%;
  background:
    radial-gradient(ellipse at 37% 9%, #686c6280, transparent 65%),
    linear-gradient(106deg, #293133, #141919 13%, #151b1b 86%, #090e0e);
  box-shadow: inset .3cqw .24cqw .38cqw #050707, inset -.2cqw -.18cqw .27cqw #6e77704d;
}

#tv-room[data-model="sony"][data-view="cabinet"] #tv-screen {
  left: 10.45%;
  top: 10.8%;
  width: 73.2%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 1.8% / 2.3%;
  overflow: hidden;
  background: #182022;
}

#tv-room[data-model="sony"] #tv-screen::before {
  background: repeating-linear-gradient(90deg, #03080315 0 .3px, transparent .7px 2px);
}
#tv-room[data-model="sony"] #tv-screen::after {
  background:
    linear-gradient(110deg, #a6b8ac12 0%, transparent 33%, transparent 77%, #00070630),
    radial-gradient(ellipse at 45% 40%, transparent 52%, #09111140 88%, #06090780);
  box-shadow: inset 0 .15cqw .5cqw #02070670;
}
#tv-room[data-model="sony"][data-power="off"] #tv-screen {
  background: radial-gradient(ellipse at 34% 14%, #4e5858, #323c3c 47%, #1c2527);
}

.sony-rail {
  position: absolute;
  left: 93.7%;
  top: 16.2%;
  width: 6.1%;
  height: 57.7%;
  background: linear-gradient(90deg, #40423e, #9ca49a 9%, #acafa4 63%, #deded0 82%, #7b8177 96%, #4b4f47);
  box-shadow: inset -1px 1px 1px #eeecda, .15cqw .3cqw .25cqw #080d08;
}
.sony-rail::before {
  content: "";
  position: absolute;
  inset: 3% 10% 12% 13%;
  border: 1px solid #626653;
  background:
    radial-gradient(ellipse at 84% 3%, #5b4d25 0 2%, #b3ac82 2.5% 3%, transparent 4%),
    linear-gradient(91deg, #777d64, #a1a58a 16%, #8e967f 55%, #aabd9c 91%, #7a8273);
  box-shadow: 0 1px 1px #4d574e;
}
.sony-rail i {
  position: absolute;
  left: 33%;
  width: 29%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #424640 0 23%, #171c1c 42% 54%, #9d805c 60%, #d4c7a5 67%, #70624d 80%, #36392e);
  box-shadow: .18cqw .16cqw .12cqw #31352d99;
}
.sony-rail i:nth-child(1) { top: 10%; border-radius: 12%; background: linear-gradient(90deg,#3b3d32,#85877b 26%,#30342d 44%,#272b26); }
.sony-rail i:nth-child(2) { top: 20%; }
.sony-rail i:nth-child(3) { top: 29%; }
.sony-rail i:nth-child(4) { top: 37.8%; }
.sony-rail i:nth-child(5) { top: 46.6%; height: 14%; border-radius: 15%; background: repeating-linear-gradient(0deg,#272c25 0 1px,#686b53 1px 2px); }
.sony-rail i:nth-child(6) { top: 72%; }
.sony-rail i:nth-child(7) {
  top: 84.4%; left: 45%; width: 16%; aspect-ratio: 1.2;
  background: #bbd778; box-shadow: 0 0 .37cqw .08cqw #9dcc6090;
}
#tv-room[data-power="off"] .sony-rail i:nth-child(7) { background: #3e4832; box-shadow: none; }
.sony-rail i:nth-child(8) {
  top: 91.5%; left: 25%; width: 48%; height: 4.7%; border-radius: 7%;
  background: linear-gradient(167deg,#4f534d,#262b27 53%,#171c18 59%,#383d34);
  box-shadow: 0 0 0 1px #41463d, 0 1px 1px #d1cfc0;
}
#tv-room[data-model="sony"][data-view="cabinet"] #tv-power-knob {
  left: auto;
  right: 0;
  top: 70.3%;
  width: max(44px, 6%);
  height: 44px;
  aspect-ratio: auto;
  transform: translateY(-50%);
  border-radius: 3px;
}
@media (max-width:47rem) {
  #tv-room[data-model="sony"][data-view="cabinet"] #tv-stage { width: 100%; }
}
