:root {
  --ink: #18140f;
  --paper: #e8dec5;
  --paper-dark: #cbbd9a;
  --orange: #f04b23;
  --acid: #d9ee59;
  --tube: #171d18;
  --line: rgba(24, 20, 15, 0.28);
}

* { box-sizing: border-box; }

html { background: var(--ink); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 8%, rgba(240, 75, 35, 0.2), transparent 28rem),
    linear-gradient(115deg, transparent 0 66%, rgba(24, 20, 15, 0.05) 66% 68%, transparent 68%),
    var(--paper);
  font-family: "IBM Plex Mono", "Courier New", monospace;
  min-height: 100vh;
}

button, input { font: inherit; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 64px);
  padding-left: max(clamp(22px, 4vw, 64px), env(safe-area-inset-left));
  padding-right: max(clamp(22px, 4vw, 64px), env(safe-area-inset-right));
  overflow: hidden;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-top: 2px solid var(--ink);
  padding-top: 12px;
  margin-bottom: clamp(20px, 3vw, 42px);
}

.brand-lockup { display: flex; align-items: flex-start; gap: clamp(14px, 2vw, 36px); }
.eyebrow { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10px; letter-spacing: .18em; }

h1 {
  margin: -3px 0 0;
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: clamp(62px, 9vw, 138px);
  line-height: .69;
  letter-spacing: -.075em;
}

h1 i { color: var(--orange); font-style: normal; margin-left: .2em; }

.on-air {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  transform: rotate(1.5deg);
}

.lamp { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 12px var(--orange); animation: pulse 1.8s infinite; }

.broadcast {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(250px, .9fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}

.tv-wrap { position: relative; padding-bottom: 18px; }

.tv {
  position: relative;
  z-index: 2;
  padding: clamp(14px, 2.2vw, 28px);
  padding-bottom: 0;
  background: #c4552d;
  border: 3px solid var(--ink);
  border-radius: 4.5% 4.5% 9% 5% / 5% 5% 8% 8%;
  box-shadow: inset 10px 8px rgba(255,255,255,.12), inset -12px -10px rgba(70, 29, 16, .25);
  transform: rotate(-.45deg);
}

.bezel { background: #26221c; border: 2px solid #0b0907; border-radius: 5% / 7%; padding: clamp(9px, 1.5vw, 19px); box-shadow: inset 0 0 0 5px #40392e; }

.screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--tube);
  border-radius: 7% / 10%;
  box-shadow: inset 0 0 40px #000, 0 0 0 2px #090b09;
}

#player, #player iframe { width: 100%; height: 100%; border: 0; }

.glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(105deg, rgba(255,255,255,.11), transparent 25% 80%, rgba(255,255,255,.04));
  box-shadow: inset 0 0 44px rgba(0,0,0,.5);
}

.channel-bug { position: absolute; right: 5%; top: 6%; color: #fff; text-shadow: 2px 2px #000; display: flex; align-items: baseline; gap: 5px; pointer-events: none; }
.channel-bug span { font-size: 9px; letter-spacing: .12em; }
.channel-bug strong { font-family: "Archivo Black", Impact, sans-serif; font-size: clamp(19px, 2.5vw, 34px); }

.loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: repeating-radial-gradient(ellipse, #26332b 0, #26332b 2px, #131813 3px, #131813 5px); color: var(--acid); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; transition: opacity .3s; pointer-events: none; }
.loading.hidden { opacity: 0; }
.loading-mark { font-family: "Archivo Black", Impact, sans-serif; font-size: clamp(42px, 7vw, 92px); line-height: 1; transform: skew(-8deg); }

.tv-footer { height: clamp(64px, 8vw, 102px); display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: clamp(15px, 3vw, 38px); padding: 0 2%; color: #29160f; }
.speaker { height: 36%; background: repeating-linear-gradient(90deg, #6d2917 0 3px, transparent 3px 9px); opacity: .65; }
.set-name { font-size: 8px; letter-spacing: .11em; line-height: 1.4; }
.set-name strong { font-size: 10px; }
.knob { width: clamp(30px, 4vw, 48px); aspect-ratio: 1; border: 2px solid #29160f; border-radius: 50%; box-shadow: inset 3px 3px rgba(255,255,255,.1), 2px 3px rgba(64,21,10,.25); }
.knob span { display: block; width: 2px; height: 33%; background: #29160f; margin: 9% auto; }
.shadow { position: absolute; z-index: 1; left: 5%; right: -3%; bottom: 0; height: 25px; background: rgba(24,20,15,.5); filter: blur(13px); border-radius: 50%; }

/* Sampling transport — a control deck bolted to the underside of the TV. */
.tv-column { display: flex; flex-direction: column; }
.transport {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(6px, 1vw, 10px);
  margin-top: clamp(12px, 1.8vw, 20px);
  padding: clamp(8px, 1.2vw, 12px);
  background: #26221c;
  border: 3px solid var(--ink);
  border-radius: 5px;
  box-shadow: 5px 6px 0 rgba(24,20,15,.35);
}
.transport-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 8px 4px;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--paper-dark);
  cursor: pointer;
  transition: transform .1s, background .12s, color .12s, box-shadow .12s;
}
.transport-glyph { font-size: clamp(17px, 2.4vw, 21px); line-height: 1; }
.transport-label { font-size: clamp(10px, 1.3vw, 12px); font-weight: 600; letter-spacing: .04em; }
.transport-btn.rewind { color: var(--ink); background: var(--orange); border-color: var(--ink); }
.transport-btn:hover:not(:disabled) { color: var(--ink); background: var(--acid); }
.transport-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--ink); }
.transport-btn:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }
.transport-btn:disabled { opacity: .38; cursor: not-allowed; }

.program-info { position: relative; padding: 20px 0 20px clamp(18px, 3vw, 42px); border-left: 2px solid var(--ink); }
.program-info::before { content: ""; position: absolute; left: -7px; top: 30%; width: 12px; height: 42%; background: var(--acid); border: 1px solid var(--ink); }
.counter { font-size: 12px; letter-spacing: .15em; margin-bottom: clamp(40px, 8vw, 110px); }
.counter #currentCount { color: var(--orange); font-weight: 600; font-size: 1.25em; }
.kicker { margin: 0 0 10px; font-size: 10px; font-weight: 600; letter-spacing: .16em; }
.program-info h2 { margin: 0; font-family: "Archivo Black", Impact, sans-serif; font-size: clamp(31px, 4vw, 62px); line-height: .95; letter-spacing: -.045em; overflow-wrap: anywhere; text-transform: uppercase; }
.year { display: inline-block; margin: 16px 0 22px; padding: 4px 7px; background: var(--acid); border: 1px solid var(--ink); font-size: 11px; font-weight: 600; transform: rotate(-1deg); }
.note { font-size: clamp(12px, 1.1vw, 15px); line-height: 1.65; max-width: 42ch; }
.track-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; }
.splitboy-control { display: inline-flex; align-items: stretch; min-height: 38px; }
.splitboy-trigger {
  overflow: hidden;
  max-width: 190px;
  white-space: nowrap;
  padding: 10px 12px;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--orange);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transform-origin: left center;
  transition: max-width .28s ease, padding .28s ease, opacity .18s ease, transform .28s ease, box-shadow .12s, color .12s, background .12s, border-width .28s ease;
}
.splitboy-trigger:hover { color: var(--ink); background: var(--acid); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--orange); }
.splitboy-trigger:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--orange); }
.splitboy-choices {
  display: grid;
  grid-template-columns: repeat(2, 60px);
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transform: translateX(-10px);
  transition: max-width .28s ease, opacity .2s ease .08s, transform .28s ease;
}
.splitboy-choices a { display: grid; place-content: center; color: var(--ink); background: var(--acid); border: 2px solid var(--ink); text-align: center; text-decoration: none; }
.splitboy-choices a + a { border-left: 0; background: var(--orange); }
.splitboy-choices strong { font-family: "Archivo Black", Impact, sans-serif; font-size: 16px; line-height: .9; }
.splitboy-choices span { margin-top: 2px; font-size: 7px; font-weight: 600; letter-spacing: .08em; }
.splitboy-choices a:hover { color: var(--paper); background: var(--ink); }
.splitboy-control.choosing .splitboy-trigger { max-width: 0; padding-left: 0; padding-right: 0; border-left-width: 0; border-right-width: 0; opacity: 0; transform: scaleX(.7); box-shadow: none; }
.splitboy-control.choosing .splitboy-choices { max-width: 120px; opacity: 1; transform: translateX(0); box-shadow: 3px 3px 0 var(--orange); }
.chopboy-link {
  display: inline-block;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--orange);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--acid);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  transform: rotate(.35deg);
  transition: color .12s, background .12s, box-shadow .12s, transform .12s;
}
.chopboy-link:hover { color: var(--paper); background: var(--ink); box-shadow: 5px 5px 0 var(--orange); transform: translate(-1px, -1px) rotate(0); }
.chopboy-link:active { box-shadow: 0 0 0 var(--acid); transform: translate(3px, 3px); }
.youtube-link { display: inline-block; color: var(--ink); font-size: 10px; font-weight: 600; text-underline-offset: 4px; }
.youtube-link:hover { color: var(--orange); }

.console { margin-top: clamp(38px, 6vw, 80px); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: 18px 0 14px; display: grid; grid-template-columns: 1fr auto; gap: 18px 38px; align-items: end; }
.scrubber-wrap label { display: block; font-size: 10px; font-weight: 600; letter-spacing: .16em; margin-bottom: 13px; }
input[type="range"] { width: 100%; appearance: none; height: 5px; border: 1px solid var(--ink); background: var(--paper-dark); cursor: ew-resize; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 16px; height: 27px; background: var(--orange); border: 2px solid var(--ink); border-radius: 0; }
.ticks { display: flex; justify-content: space-between; margin-top: 7px; font-size: 9px; }
.buttons { display: flex; gap: 8px; }
.buttons button { min-height: 50px; padding: 0 clamp(12px, 2vw, 24px); border: 2px solid var(--ink); background: transparent; font-size: 10px; font-weight: 600; letter-spacing: .08em; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s, background .12s; }
.buttons button:hover { background: var(--acid); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.buttons button:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.buttons .random { color: var(--paper); background: var(--ink); }
.buttons .random:hover { color: var(--ink); background: var(--orange); }
.keys { grid-column: 1 / -1; margin: 0; font-size: 9px; letter-spacing: .08em; opacity: .65; }
kbd { font-family: inherit; border: 1px solid currentColor; padding: 1px 4px; }

.crate { margin-top: clamp(60px, 9vw, 130px); }
.crate-heading { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 8px solid var(--ink); padding-bottom: 9px; }
.crate-kicker { margin: 0 0 8px; font-size: 9px; font-weight: 600; letter-spacing: .16em; }
.crate-heading h2 { margin: 0; font-family: "Archivo Black", Impact, sans-serif; font-size: clamp(34px, 6vw, 80px); line-height: .85; letter-spacing: -.05em; }
.crate-heading span { font-size: 10px; letter-spacing: .1em; }
.crate-search { display: grid; grid-template-columns: auto minmax(240px, 520px) 1fr; gap: 15px 24px; align-items: center; padding: 17px 8px; border-bottom: 1px solid var(--line); }
.crate-search label { font-size: 10px; font-weight: 600; letter-spacing: .14em; }
.search-field { display: grid; grid-template-columns: auto 1fr auto; align-items: center; min-height: 46px; padding: 0 10px 0 13px; border: 2px solid var(--ink); background: rgba(255,255,255,.16); box-shadow: 4px 4px 0 var(--orange); transition: background .15s, box-shadow .15s, transform .15s; }
.search-field:focus-within { background: var(--acid); box-shadow: 6px 6px 0 var(--orange); transform: translate(-2px, -2px); }
.search-field > span { font-family: Georgia, serif; font-size: 25px; line-height: 1; transform: rotate(-15deg); }
.search-field input { width: 100%; min-width: 0; padding: 10px; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.search-field input::placeholder { color: rgba(24,20,15,.55); }
.search-field input::-webkit-search-cancel-button { appearance: none; }
.search-field kbd { min-width: 23px; text-align: center; background: var(--paper); }
.search-status { justify-self: end; margin: 0; font-size: 9px; font-weight: 600; letter-spacing: .1em; }
.crate-list { list-style: none; padding: 0; margin: 0; }
.crate-item { border-bottom: 1px solid var(--line); }
.crate-item[hidden] { display: none; }
.crate-item button { width: 100%; display: grid; grid-template-columns: 55px 1fr auto; gap: 15px; align-items: center; text-align: left; padding: 18px 8px; color: var(--ink); border: 0; background: transparent; cursor: pointer; }
.crate-item button:hover, .crate-item.active button { background: var(--acid); }
.crate-item.active button { box-shadow: inset 7px 0 var(--orange); }
.crate-channel, .crate-year { font-size: 10px; letter-spacing: .1em; }
.crate-title { font-family: "Archivo Black", Impact, sans-serif; font-size: clamp(16px, 2vw, 26px); text-transform: uppercase; letter-spacing: -.025em; }
.empty-search { margin: 0; padding: clamp(34px, 7vw, 80px) 10px; border-bottom: 1px solid var(--line); text-align: center; font-family: "Archivo Black", Impact, sans-serif; font-size: clamp(18px, 3vw, 32px); }
.empty-search button { display: block; margin: 15px auto 0; padding: 8px 10px; color: var(--paper); background: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--orange); cursor: pointer; font-size: 9px; font-weight: 600; letter-spacing: .08em; }

@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 820px) {
  .broadcast { grid-template-columns: 1fr; }
  .program-info { border-left: 0; border-top: 2px solid var(--ink); padding: 28px 0 0; }
  .program-info::before { left: 0; top: -7px; width: 35%; height: 12px; }
  .counter { margin-bottom: 36px; }
  .console { grid-template-columns: 1fr; }
  .crate-search { grid-template-columns: auto 1fr; }
  .search-status { grid-column: 2; justify-self: start; }
  .buttons { justify-content: stretch; }
  .buttons button { flex: 1; }
}

@media (max-width: 520px) {
  .shell { padding: 18px max(14px, env(safe-area-inset-right)) 40px max(14px, env(safe-area-inset-left)); }
  .eyebrow, .on-air span:last-child { display: none; }
  .on-air { padding: 8px; }
  .tv { padding: 10px 10px 0; }
  .bezel { padding: 7px; }
  .tv-footer { height: 55px; }
  .transport-btn { min-height: 52px; padding: 8px 2px; }
  .transport-label { letter-spacing: 0; }
  .buttons { display: block; }
  .buttons button { width: 100%; min-width: 0; padding: 0 5px; }
  .keys { line-height: 1.7; }
  .crate-item button { grid-template-columns: 34px 1fr auto; gap: 8px; padding: 14px 5px; }
  .crate-search { grid-template-columns: 1fr; padding: 14px 5px 18px; }
  .crate-search label { display: none; }
  .search-status { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
