.small-controls { display: flex; justify-content: space-between; gap: 10px; }
.rotary-control { width: 60px; min-width: 0; }
.rotary-control label { display: block; font: 7px monospace; letter-spacing: 1px; color: #b2a68b; margin: 2px 0 6px; }
.rotary-control output { float: right; color: #cbbb96; font-size: 7px; letter-spacing: 0; }
.rotary {
  width: 56px; height: 56px; position: relative; border-radius: 50%;
  background: repeating-conic-gradient(from 225deg, #b0a88a99 0deg 2deg, transparent 2deg 27deg);
}
.rotary::after { content: ''; position: absolute; bottom: -1px; left: 14px; right: 14px; height: 9px; background: #292d23; }
.rotary-knob {
  position: absolute; inset: 7px; z-index: 1; border-radius: 50%;
  background: repeating-conic-gradient(#171c16 0 5deg, #4d5042 6deg 10deg);
  border: 1px solid #9b967c;
  box-shadow: 2px 4px 4px #000b, 0 0 0 1px #10170f;
  transform: rotate(var(--rotation)); transition: transform 60ms linear;
}
.rotary-knob::before {
  content: ''; position: absolute; inset: 4px; border-radius: 50%;
  background: radial-gradient(ellipse at 30% 20%, #747463, #41473a 40%, #23291f 80%);
  box-shadow: inset 1px 1px 2px #b2ac8a50, inset -1px -1px 2px #080f09;
}
.rotary-knob i { position: absolute; top: 5px; left: calc(50% - 1px); height: 10px; width: 2px; background: #dfd0a2; box-shadow: 0 0 1px #d7c387; }
.rotary input {
  position: absolute; inset: 0; z-index: 2; opacity: 0;
  width: 100%; height: 100%; margin: 0; border-radius: 50%;
  cursor: grab; touch-action: none;
}
.rotary:focus-within { outline: 2px solid #e4c28c; outline-offset: 4px; }
.rotary.is-turning input { cursor: grabbing; }
.rotary.is-turning .rotary-knob { transition: none; }
.rotary-scale { display: flex; justify-content: space-between; font: 5px monospace; letter-spacing: .5px; color: #9d957b; margin-top: 3px; }

/* Material layers are separate from station styling and layout.
   Shared light source: warm, broad, above and left of the cabinet. */
:root { --veneer: url('assets/walnut-veneer.jpg'); --surface: url('assets/surface.svg'); }
body {
  background: radial-gradient(ellipse at 9% 31%, #ab773329, transparent 48%),
    radial-gradient(ellipse at 76% 64%, #8b613317, transparent 45%),
    repeating-linear-gradient(90deg, transparent 0 105px, #0002 106px 108px),
    radial-gradient(ellipse at 50% 45%, #413322, #13120f 72%);
}
.television { isolation: isolate; filter: drop-shadow(2px 25px 18px #0008); }
.television::before {
  content: ''; position: absolute; inset: 75% -4% -8px; z-index: -1;
  background: radial-gradient(ellipse at 50% 85%, #000d, #0005 37%, transparent 69%);
  pointer-events: none;
}
.cabinet {
  position: relative; isolation: isolate;
  border: 3px solid #312116; border-top: 5px solid #7b5b3c;
  border-radius: 5px 5px 2px 2px;
  background: radial-gradient(ellipse at 16% 1%, #d7b17b21, transparent 54%),
    linear-gradient(94deg, #0f080730, transparent 18% 70%, #120a0860),
    linear-gradient(0deg, #110a077a, transparent 18% 80%, #b68b5826),
    var(--veneer) 47% 58% / cover no-repeat, #573a25;
  box-shadow: inset 1px 1px 1px #e3bb7e42, inset -2px -3px 3px #100a08a6,
    1px 1px 0 #1b130e, 4px 4px 0 #422e20, 8px 8px 0 #261a12,
    10px 11px 3px #0f0c09, 17px 25px 30px #0008;
}
/* A separate cap rail, with a joint beneath it and a rounded furniture edge. */
.cabinet::before {
  content: ''; position: absolute; top: -5px; left: -3px; right: -3px; height: 18px;
  border-radius: 5px 5px 1px 1px; pointer-events: none;
  background: linear-gradient(180deg, #e1bb8029, transparent 20%, #0003 75%, #130c0980),
    var(--veneer) 30% 12% / 100% 380px no-repeat;
  border-top: 1px solid #bc956549; border-bottom: 1px solid #21150e;
  box-shadow: 0 2px 2px #0008, inset 0 -2px 1px #ae80552a;
}
/* The narrow right return reveals the thickness of the carcass. */
.cabinet::after {
  content: ''; position: absolute; top: 4px; bottom: -7px; right: -10px; width: 8px;
  z-index: -1; transform: skewY(35deg); transform-origin: left top;
  background: linear-gradient(90deg, #0005, #000a), var(--veneer) 90% 50% / auto 110%;
  border-right: 1px solid #170e09; pointer-events: none;
}
.surround {
  position: relative;
  background: radial-gradient(ellipse at 12% 0%, #a39b7f16, transparent 60%),
    var(--surface), linear-gradient(110deg, #393a31, #1c211a 66%, #161b15);
  border: 2px solid #19150e;
  box-shadow: 0 0 0 1px #94714880, 0 0 0 4px #2a1d14,
    0 0 0 5px #94613a40, 2px 5px 7px #0a0908c9,
    inset 2px 2px 3px #b9ad8650, inset -3px -4px 7px #030803c9;
}
.bezel {
  background: var(--surface),
    linear-gradient(141deg, #888574, #4c4e41 7%, #222a21 27%, #22271f 61%, #595d4c 91%, #827f6b);
  box-shadow: inset 1px 2px 2px #d8cda044, inset -2px -3px 4px #0b100ac9,
    0 1px 1px #a89c6738, 0 4px 6px #0009;
}
.crt {
  background: #050909;
  box-shadow: 0 0 0 3px #0b100c, 0 0 0 4px #93937b33, 0 2px 3px #000, inset 0 0 40px #000;
}
.glass {
  background: repeating-linear-gradient(0deg, #0002 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 49% 46%, transparent 48%, #000b 100%);
  box-shadow: inset 8px 9px 22px #0008, inset -9px -12px 24px #000a;
}
.glass::after {
  background: radial-gradient(ellipse at 42% -30%, #e9e6d82b, transparent 63%),
    linear-gradient(114deg, transparent 8%, #e3e4d606 15%, transparent 23% 90%, #b3bda00a);
  box-shadow: inset 0 2px 2px #c0c4b812;
}
.room-reflection, .reflection-event {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: url('assets/room-reflection.svg') center / 100% 100% no-repeat;
  opacity: 0; visibility: hidden;
}
.reflection-event { background-image: url('assets/reflection-shift.svg'); }
/* Explicit visibility prevents flicker, tuning and reduced motion exposing content. */
.crt.is-off .picture, .crt.is-off .noise, .crt.is-off .osd { visibility: hidden; opacity: 0; animation: none; }
.crt.is-off { background: radial-gradient(ellipse at 42% 35%, #141b19, #050909 75%); }
.crt.is-off .glass { background: radial-gradient(ellipse at 49% 46%, transparent 30%, #0009 100%); }
.crt.is-off .room-reflection { opacity: .62; visibility: visible; }
.crt.is-off .reflection-event { visibility: visible; animation: reflected-movement var(--reflection-cycle, 113s) linear infinite; }
/* Less than 3% of a long cycle; fades into the same glass, with no flash. */
@keyframes reflected-movement {
  0%, 96.9%, 100% { opacity: 0; transform: translateX(0); }
  98% { opacity: .68; transform: translateX(-3px); }
  99% { opacity: .28; transform: translateX(-5px); }
}
.brand { justify-content: space-between; color: #b8af94; text-shadow: 0 1px 1px #000; }
.brand .chromavision { font: italic 13px Georgia, serif; letter-spacing: .5px; }
.brand .color-designation { font: 8px monospace; letter-spacing: 1px; text-transform: uppercase; }
.controls {
  position: relative; border: 2px solid #171a12;
  background: radial-gradient(ellipse at 26% 32%, #a9a17e0d, transparent 37%),
    radial-gradient(ellipse at 20% 55%, #b9ab8110, transparent 30%),
    var(--surface), linear-gradient(98deg, #414336, #2a3025 40%, #1c241a);
  box-shadow: 0 0 0 2px #97754b80, 0 0 0 5px #25190f,
    -4px 0 5px #0a0908a6, 3px 5px 7px #000a,
    inset 2px 3px 4px #090d08d9, inset -1px -1px 1px #9d95764d;
}
.controls::before, .controls::after {
  content: ''; position: absolute; width: 5px; height: 5px; right: 6px;
  border-radius: 50%; background: linear-gradient(130deg, #a7a18a, #3a3c32 45%, #141914 48% 57%, #777565 60%, #33382b);
  box-shadow: 0 1px 1px #000;
}
.controls::before { top: 6px; } .controls::after { bottom: 6px; }
.maker { font: bold 19px Georgia, serif; letter-spacing: 2px; color: #bdb79d; text-shadow: 0 1px #080e08, 0 -1px #e4d7a526; }
.maker span { letter-spacing: .7px; color: #a89f83; }
.dial { border-color: #8c8972; box-shadow: 1px 1px 0 #d0c49a42, 3px 7px 5px #000c, 0 0 0 3px #0c130b, 0 0 0 5px #8a806a2b; }
.dial::before { background: var(--surface), radial-gradient(ellipse at 28% 17%, #7d7c66, #414637 46%, #1a2118 80%); }
.rotary-knob { box-shadow: 1px 1px 0 #c6bb9733, 2px 5px 3px #000c, 0 0 0 2px #0b1209; }
.rotary-knob::before { background: var(--surface), radial-gradient(ellipse at 30% 20%, #797966, #41473a 40%, #23291f 80%); }
.power-row { margin-top: 16px; }
button { background: var(--surface), linear-gradient(110deg, #555749, #272f22); border-color: #6e705b; box-shadow: inset 0 1px #b1ac8440, 1px 3px 3px #000c; }
button[aria-pressed=true] { box-shadow: inset 0 2px 4px #0008, 0 1px #8c826240; }
.speaker {
  height: calc(100% - 415px); min-height: 62px;
  background: radial-gradient(ellipse at 25% 15%, #c2ac7121, transparent 70%),
    url('assets/speaker-cloth.svg') 14px 9px / 260px 260px, #292b20;
  border: 3px solid #161b11; border-radius: 1px;
  box-shadow: inset 2px 4px 9px #000d, inset -2px -3px 8px #0008, 0 1px 1px #c6af6a30;
}
.speaker span { background: #262b20d9; padding: 3px 0; color: #b0a586; }
.plinth {
  height: 15px; background: linear-gradient(180deg, #0f0b08 0 12%, #b38b5338 17%, #0002 30%, #0009), var(--veneer) 50% 87% / 100% 240px;
  box-shadow: 4px 4px 0 #100d09, 0 6px 7px #0008;
}
.legs i {
  position: relative; width: 29px; border-radius: 1px 1px 4px 3px;
  clip-path: polygon(0 0,100% 0,86% 94%,76% 100%,20% 100%,10% 94%);
  background: linear-gradient(90deg, #08050299, #d5ae6326 22%, transparent 46%, #0009 85%),
    linear-gradient(180deg, #000b, transparent 28% 84%, #0007), var(--veneer) 28% 62% / auto 190px;
  box-shadow: inset 1px 0 #a77e413d, inset -3px 0 #100c0866;
}
.legs i::after { content: ''; position: absolute; left: 3px; right: 2px; bottom: 0; height: 3px; background: #14130b; border-top: 1px solid #93866350; }
@media (max-width: 760px) {
  .maker { font-size: 14px; letter-spacing: 1.5px; }
  .maker span { font-size: 4px; letter-spacing: .3px; }
  .small-controls { gap: 6px; }
  .rotary-control { width: 44px; }
  .rotary-control label, .rotary-control output { font-size: 6px; letter-spacing: 0; }
  .rotary { width: 44px; height: 44px; }
  .rotary-knob { inset: 5px; }
  .rotary-knob i { top: 4px; height: 8px; }
  .speaker { min-height: 45px; height: 45px; }
  .brand .chromavision { font-size: 10px; }
  .brand .color-designation { font-size: 6px; letter-spacing: .5px; }
}
@media (max-width: 480px) {
  .maker { font-size: 13px; letter-spacing: 2px; }
  .maker span { font-size: 5px; letter-spacing: .6px; }
  .small-controls { align-self: center; justify-content: space-around; gap: 6px; padding: 6px 0; }
  .controls { grid-template-columns: 78px minmax(94px, 1fr) 56px; gap: 4px; padding: 9px 6px; }
  .power-row { margin: 13px 0; }
  .power-row button { font-size: 7px; letter-spacing: .5px; padding: 12px 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .rotary-knob { transition: none; }
  .crt.is-off .reflection-event { animation: none; visibility: hidden; opacity: 0; }
}
