/* Cabinet-native details: two recessed perforated grilles and one thumbwheel.
   No screen, glass, monitor outline or fullscreen dimensions are changed. */
.crt-speaker-grille {
  position: absolute;
  top: 25%;
  height: 38%;
  width: clamp(7px, 1.1vw, 13px);
  left: clamp(4px, .9vw, 11px);
  border-radius: 4px;
  background: radial-gradient(ellipse at 50% 38%, #56604dc9 0 28%, transparent 37%) 0 0 / 3px 4px, #bbc0b0;
  box-shadow: inset 1px 1px 2px #68725d80, 1px 0 0 #f0f0e6bb;
  pointer-events: none;
}
.crt-speaker-grille--right { left: auto; right: clamp(4px, .9vw, 11px); }
.crt-volume {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 20px;
  color: #5e6a54;
  font: 7px Arial, sans-serif;
  letter-spacing: .09em;
  text-shadow: 0 1px #f2f2e4;
}
.crt-volume input {
  appearance: none;
  -webkit-appearance: none;
  width: 77px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: ew-resize;
}
.crt-volume input::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #8d9681 0 1px, #c7cdbb 1px 3px);
  box-shadow: inset 0 1px 2px #44523dc2, 0 1px #f5f3e6;
}
.crt-volume input::-moz-range-track {
  height: 8px;
  border: 0;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #8d9681 0 1px, #c7cdbb 1px 3px);
  box-shadow: inset 0 1px 2px #44523dc2, 0 1px #f5f3e6;
}
.crt-volume input::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 11px;
  height: 13px;
  margin-top: -3px;
  border: 1px solid #7e8b70;
  border-radius: 3px;
  background: linear-gradient(90deg, #dce1ce, #a7b297 48%, #e1e5d2 64%, #b3bda4);
  box-shadow: 0 1px 2px #424d3c80, inset 0 1px #ffffef;
}
.crt-volume input::-moz-range-thumb {
  width: 9px;
  height: 11px;
  border: 1px solid #7e8b70;
  border-radius: 3px;
  background: linear-gradient(90deg, #dce1ce, #a7b297 48%, #e1e5d2 64%, #b3bda4);
  box-shadow: 0 1px 2px #424d3c80, inset 0 1px #ffffef;
}
.crt-volume input:focus-visible { outline: 1px solid #61774e; outline-offset: 2px; border-radius: 3px; }
@media (max-width: 600px), (max-height: 600px) {
  .crt-volume { gap: 4px; font-size: 6px; }
  .crt-volume input { width: 62px; height: 17px; }
}

/* A recessed tray is cut into the lower control plane, clear of its seam. */
.crt-chin { container-type:inline-size; container-name:crt-chin; }
.crt-hardware { gap:10px; }
.crt-label { padding-left:32px; }
.crt-fullscreen { position:absolute; left:1px; top:calc(50% + 5px); transform:translateY(-50%); }
.crt-optical-drive { position:absolute; box-sizing:border-box; left:50%; top:calc(50% + 5px); transform:translate(-50%,-50%); width:46%; max-width:none; min-width:0; height:25px; margin:0; border:0; border-radius:1px; background:none; box-shadow:none; color:#748168; }
.crt-optical-tray { position:absolute; inset:0 27px 0 0; border:1px solid #8f9c81; border-bottom-color:#e8ebdd; border-radius:1px; background:linear-gradient(180deg,#bac2ad,#d3d8c5 5px,#d7dccb 78%,#c4cdb7); box-shadow:inset 0 2px 2px #57654a57,inset 1px 0 1px #68765b40; }
.crt-optical-tray span { position:absolute; left:6px; top:5px; font:clamp(5px,.9cqw,8px)/1 Arial,sans-serif; letter-spacing:.1em; color:#738066; text-shadow:0 1px #eef1e2; }
.crt-optical-tray i { position:absolute; left:31%; right:27%; bottom:5px; height:2px; background:#9aa88b; border-radius:1px; box-shadow:inset 0 1px #68785b70,0 1px #edf1dc; }
.crt-optical-led { position:absolute; left:9px; bottom:5px; width:4px; height:2px; border-radius:1px; background:#7c8e66; box-shadow:inset 0 1px #596d4d; }
.crt-optical-drive[data-state="inserted"] .crt-optical-led { background:#95bb64; box-shadow:0 0 3px #95bb6466; }
.crt-optical-drive[data-state="busy"] .crt-optical-led { background:#c9bb67; box-shadow:0 0 3px #c9bb6755; }
.crt-optical-drive .crt-cd-eject { position:absolute; display:grid; place-items:center; right:0; top:0; bottom:auto; box-sizing:border-box; width:24px; min-width:24px; height:25px; min-height:25px; margin:0; padding:2px; border:1px solid #a1ac94; border-bottom-color:#e9ecdd; border-radius:1px; background:linear-gradient(#cbd3be,#d7ddcb); box-shadow:inset 0 1px 2px #7380644d; color:#6b7d59; cursor:pointer; }
.crt-optical-drive .crt-cd-eject svg { display:block; width:13px; height:13px; fill:none; stroke:currentColor; stroke-width:1.3; stroke-linejoin:round; }
.crt-optical-drive .crt-cd-eject:disabled { opacity:.55; cursor:default; }
.crt-optical-drive .crt-cd-eject:focus-visible { outline:2px solid #526e91; outline-offset:3px; }
.crt-optical-drive>p { position:absolute; width:1px; height:1px; margin:-1px; padding:0; border:0; clip-path:inset(50%); overflow:hidden; white-space:nowrap; }
@container crt-chin (max-width:760px) {
  .crt-hardware { gap:6px; padding-top:10px; margin-right:-6px; }
  .crt-volume { gap:4px; }
  .crt-volume input { width:44px; }
  .crt-monitor-control { width:22px; }
  .crt-disk { width:18px; }
  .crt-power { width:28px; height:28px; }
}
@container crt-chin (max-width:480px) {
  .crt-hardware { gap:2px; padding-top:10px; }
  .crt-label { display:grid; gap:1px; justify-items:start; padding-left:30px; }
  .crt-label span { max-width:none; white-space:nowrap; font-size:4.5px; line-height:1; letter-spacing:.04em; }
  .crt-volume { width:34px; height:20px; gap:0; }
  .crt-volume>span { display:none; }
  .crt-volume input { width:34px; height:20px; }
  .crt-monitor-control { width:22px; height:24px; }
  .crt-disk { width:7px; }
  .crt-disk svg { display:none; }
  .crt-disk i { width:7px; }
  .crt-led { width:3px; }
  .crt-power { width:26px; height:26px; }
}

/* TEAC CD-540E period face: matte flush tray, thin clearance seam, small oval Eject. */
.crt-optical-tray{border:1px solid #96a28d;border-bottom-color:#eff0e2;border-radius:2px;background:linear-gradient(100deg,#d1d6c4,#daddcd 47%,#cbd3bd);box-shadow:0 -1px #8b977f55,inset 0 1px #eef1df7a}
.crt-optical-tray span{top:8px;color:#78876b;text-shadow:0 1px #edf0df}.crt-optical-tray i{display:none}
.crt-optical-drive .crt-cd-eject{top:7px;right:1px;width:21px;min-width:21px;height:11px;min-height:11px;padding:1px;border:1px solid #9ba88e;border-bottom-color:#7e8e70;border-radius:8px;background:linear-gradient(#dbe1cd,#bdcaad);box-shadow:inset 0 1px #eef2df,0 1px #eef1df}
.crt-optical-drive .crt-cd-eject svg{width:8px;height:8px}.crt-optical-drive .crt-cd-eject::after{content:"";position:absolute;inset:-7px -2px}

/* The 25px face stays in its slot; the drawer projects out of that same slot. */
.crt-optical-drive { --crt-tray-depth:clamp(32px,8cqw,58px); z-index:3; }
.crt-optical-tray { appearance:none; box-sizing:border-box; margin:0; padding:0; width:auto; height:25px; cursor:pointer; transition:transform .3s ease-out; z-index:2; }
.crt-optical-tray:focus-visible { outline:2px solid #526e91; outline-offset:3px; }
.crt-optical-tray:disabled { cursor:wait; }
.crt-optical-drawer { position:absolute; top:3px; left:1px; right:28px; height:var(--crt-tray-depth); box-sizing:border-box; padding:4px 13%; border:1px solid #626b59; border-bottom:3px solid #707a65; border-radius:3px 3px 7px 7px; background:linear-gradient(90deg,#58634e 0 4%,#acb49b 5%,#bfc7ae 49%,#a8b297 94%,#68745a 96%); box-shadow:inset 0 5px 7px #303c2a66,0 5px 5px #18231b44; clip-path:polygon(5% 0,95% 0,100% 100%,0 100%); transform-origin:50% 0; transform:scaleY(.05); visibility:hidden; transition:transform .3s ease-out,visibility 0s .3s; pointer-events:none; }
.crt-optical-seat { position:relative; box-sizing:border-box; height:100%; width:100%; border:1px solid #5a664e; border-radius:50%; background:radial-gradient(ellipse at center,#a3af93 0 10%,#5e6d52 11% 13%,#8b977e 14% 58%,#6d7a5e 69%,#b4bea4 74%); box-shadow:inset 0 2px 3px #3b472b99,0 1px #d3dbc4; }
.crt-optical-seat::after { content:""; position:absolute; left:44%; top:36%; width:12%; height:28%; border:1px solid #738064; border-radius:50%; background:#aebaa0; box-shadow:0 1px 1px #3b4a3377; }
.crt-optical-disc { position:absolute; inset:2px 3px; display:block; overflow:hidden; border:1px solid #e5eadf; border-radius:50%; background:conic-gradient(from 70deg,#d8ddd9,#f9faf5 12%,#aabdc0 21%,#dbe5da 31%,#b0bac4 46%,#f8f7dd 58%,#c7d4db 70%,#eef5eb 88%,#d8ddd9); box-shadow:0 1px 2px #34422c99; }
.crt-optical-disc[hidden] { display:none; }
.crt-optical-disc-label { position:absolute; left:9%; right:9%; top:13%; color:#466548; text-align:center; font:600 clamp(4px,.72cqw,6px)/1.1 Arial,sans-serif; transform:scaleY(.75); }
.crt-optical-drive[data-tray="open"] .crt-optical-drawer { transform:scaleY(1); visibility:visible; transition-delay:0s; }
.crt-optical-drive[data-tray="open"] .crt-optical-tray { transform:translateY(var(--crt-tray-depth)); box-shadow:0 3px 3px #23331b44,inset 0 1px #eef1df7a; }
.crt-tray-layer { position:absolute; z-index:40; left:0; top:0; margin:0; padding:0; border:0; transform-origin:0 0; container-type:inline-size; container-name:crt-chin; pointer-events:none; }
.crt-optical-projection .crt-optical-tray { pointer-events:auto; }
.crt-optical-drive:not(.crt-optical-projection)[data-tray="open"]::before { content:""; position:absolute; inset:0 27px 0 0; border-radius:2px; background:#59644f; box-shadow:inset 0 3px 3px #2c382977; }
@media(prefers-reduced-motion:reduce) { .crt-optical-tray,.crt-optical-drawer { transition:none; } }

/* XYZ tray rendering owns the material; the original face is its one native
   focus/click target. No part stretches vertically to imitate extrusion. */
#browser-computer [data-projective-tray] .crt-optical-drawer { display:none; }
#browser-computer [data-projective-tray]::before { display:none; }
#browser-computer .crt-tray-layer { width:100%; height:100%; transform:none; container-type:normal; }
#browser-computer .crt-tray-geometry { position:absolute; inset:0; overflow:visible; pointer-events:none; }
#browser-computer .crt-tray-layer>.crt-optical-tray { position:absolute; inset:auto; left:0; top:0; margin:0; padding:0; transition:none; transform-origin:0 0; pointer-events:auto; }

/* Reuse the cabinet-native front face and the existing music deck CD finish.
   Both remain real 3D planes; these materials do not squash their geometry. */
#browser-computer .crt-tray-layer>.crt-optical-tray{box-sizing:border-box;border:calc(var(--tray-unit,1px)) solid #96a28d;border-bottom-color:#eff0e2;border-radius:calc(2 * var(--tray-unit,1px));background-color:#d1d6c4;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23000' opacity='.035' filter='url(%23grain)' d='M0 0h128v128H0z'/%3E%3C/svg%3E"),linear-gradient(100deg,#d1d6c4,#daddcd 47%,#cbd3bd);box-shadow:0 calc(-1 * var(--tray-unit,1px)) #8b977f55,inset 0 var(--tray-unit,1px) #eef1df7a,0 calc(2 * var(--tray-unit,1px)) calc(2 * var(--tray-unit,1px)) #28372236}
#browser-computer .crt-tray-layer>.crt-optical-tray>span{visibility:visible}
#browser-computer .crt-tray-disc{position:absolute;left:0;top:0;transform-origin:0 0;box-sizing:border-box;border-radius:50%;pointer-events:none;mask:radial-gradient(circle closest-side,transparent 0 12.5%,#000 13.2%);background:radial-gradient(circle closest-side,transparent 0 12.5%,#c3cbc3 12.5% 17%,#87958f 17% 18.8%,transparent 18.8%),conic-gradient(from 25deg,#e2e5dc,#b5bfc1 12%,#d2c0e0 17%,#c1dfda 21%,#f8f6d9 24%,#e3e7e1 30%,#a4b1b4 49%,#e1d6ec 55%,#c9e5df 59%,#e1ded3 64%,#c4ccce 76%,#f2f2e7);box-shadow:inset 0 0 0 calc(.7 * var(--tray-unit)) #ecf0e5}
#browser-computer .crt-tray-disc[hidden]{display:none}
#browser-computer .crt-tray-disc>span{position:absolute;left:12%;right:12%;top:15%;font:600 calc(4.5 * var(--tray-unit))/1.15 Arial,sans-serif;color:#4d6551;text-align:center}
