:root {
  --void: #050607;
  --iron: #111416;
  --iron-2: #1b1d1c;
  --edge: #40372a;
  --edge-lit: #79613a;
  --amber: #e4a62a;
  --amber-hot: #ffd369;
  --amber-dim: #71501c;
  --green: #68c56b;
  --green-dim: #285d32;
  --violet: #7f51a5;
  --red: #a33b2f;
  --text: #d8c9a7;
  --muted: #817862;
  font-family: "Courier New", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--void); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, #281d30 0, transparent 35rem),
    repeating-linear-gradient(90deg, transparent 0 62px, rgba(123,82,39,.045) 63px 64px),
    linear-gradient(#080a0b, #030404);
}
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--amber-hot); outline-offset: 3px; }

.arcane-noise {
  position: fixed; inset: 0; pointer-events: none; opacity: .18; z-index: 20;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, #000 4px 5px);
  mix-blend-mode: multiply;
}

.station-shell { width: min(1420px, calc(100% - 28px)); margin: 0 auto; padding: 22px 0 48px; position: relative; z-index: 1; }
.station-header { display: flex; align-items: center; gap: 16px; padding: 9px 12px 20px; border-bottom: 1px solid #362d22; }
.sigil { flex: 0 0 auto; width: 42px; height: 51px; color: var(--violet); filter: drop-shadow(0 0 6px #9250bf); animation: sigil-pulse 4s ease-in-out infinite; }
.celtic-cross circle, .celtic-cross path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: square; stroke-linejoin: miter; }
.celtic-cross path:not(.cross-knot) { fill: #110d14; }
.celtic-cross .cross-knot { stroke: var(--amber-dim); stroke-width: 1.2; }
.eyebrow { margin: 0 0 3px; color: var(--muted); font-size: 11px; letter-spacing: .22em; }
h1, h2 { margin: 0; font-weight: 700; letter-spacing: .08em; }
h1 { font-size: clamp(22px, 3vw, 38px); text-shadow: 2px 2px #000; }
h1 span { color: var(--amber); }
.station-status { margin-left: auto; display: flex; align-items: center; gap: 9px; color: var(--green); font-size: 12px; letter-spacing: .12em; }
.station-status i { width: 8px; height: 8px; background: var(--green); box-shadow: 0 0 10px var(--green); }
.station-status.error { color: #e76a58; }
.station-status.error i { background: #e76a58; box-shadow: 0 0 10px #e76a58; }

.panel-frame {
  border: 2px solid #2d2923;
  box-shadow: inset 0 0 0 2px #080909, inset 0 0 0 3px #43392a, 0 12px 30px #0009;
  background: linear-gradient(145deg, #161817, #0b0d0e 55%, #141313);
  position: relative;
}
.panel-frame::before, .panel-frame::after { content: ""; position: absolute; width: 7px; height: 7px; background: #655335; border: 2px solid #080909; z-index: 3; }
.panel-frame::before { left: 7px; top: 7px; }.panel-frame::after { right: 7px; bottom: 7px; }
.console-grid { display: grid; grid-template-columns: minmax(270px, .72fr) minmax(550px, 1.65fr); gap: 15px; margin-top: 16px; }
.wizard-bay, .broadcast-bay { padding: 14px; }

.crt { position: relative; overflow: hidden; border: 8px solid #080908; box-shadow: inset 0 0 25px #000, 0 0 0 1px #665033; background: #07100c; }
.crt::before { content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.32) 4px 5px); }
.crt-glass { position: absolute; inset: 0; pointer-events: none; z-index: 6; box-shadow: inset 0 0 50px #000, inset 0 0 10px #000; background: radial-gradient(ellipse, transparent 45%, rgba(0,0,0,.36)); }
.wizard-crt { height: 456px; background: #020504; }
.moon { position: absolute; width: 110px; height: 110px; border: 2px solid #82598c; border-radius: 50%; left: calc(50% - 55px); top: 44px; box-shadow: 0 0 32px #6a3b7c55, inset 0 0 25px #5c3c6855; opacity: .55; }
.moon::before, .moon::after { content:""; position:absolute; background:#82598c; opacity:.4; }
.moon::before { width: 1px; height: 145px; left: 54px; top: -18px; transform: rotate(36deg); }
.moon::after { height: 1px; width: 145px; top: 54px; left: -18px; transform: rotate(-19deg); }
.pixel-wizard { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; filter: brightness(.72) contrast(1.16) saturate(.82); image-rendering: pixelated; }
.wizard-ambient { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; mix-blend-mode: screen; }
.club-wash { position: absolute; inset: -12%; opacity: .04; transform: translate3d(0,0,0); }
.wash-violet { background: radial-gradient(circle at 76% 25%, #7640a8 0 4%, transparent 35%); animation: club-violet 17s steps(9,end) infinite; }
.wash-green { background: radial-gradient(circle at 24% 70%, #277d51 0 3%, transparent 31%); animation: club-green 13s steps(7,end) -4s infinite; }
.wash-amber { background: radial-gradient(circle at 52% 48%, #a26019 0 2%, transparent 29%); animation: club-amber 19s steps(11,end) -9s infinite; }
.eye-light { position: absolute; top: 28.1%; width: 3.3%; height: 1.7%; background: #ffb52a; box-shadow: 0 0 5px #ff8a00, 0 0 10px #e35b0055; animation: wizard-eye-pulse 4.7s steps(6,end) infinite; }
.eye-left { left: 45.1%; transform: rotate(8deg); }.eye-right { left: 52.2%; transform: rotate(-8deg); animation-delay: -.12s; }
.board-glow { position: absolute; left: 8%; right: 7%; bottom: 4%; height: 28%; background: radial-gradient(ellipse at 55% 58%, #286e4430, transparent 62%); animation: board-breathe 8s steps(8,end) infinite; }
.console-led { position: absolute; width: 3px; height: 3px; background: currentColor; box-shadow: 0 0 4px currentColor; opacity: .16; animation: console-blink 5.3s steps(1,end) infinite; }
.led-a { left: 22%; top: 75%; color:#68e57b; }.led-b { left: 31%; top: 83%; color:#e6a22f; animation-delay:-1.1s; }
.led-c { left: 43%; top: 78%; color:#6de67d; animation-delay:-2.8s; }.led-d { left: 56%; top: 73%; color:#e55a37; animation-delay:-.7s; }
.led-e { left: 64%; top: 84%; color:#5ce57b; animation-delay:-3.6s; }.led-f { left: 74%; top: 77%; color:#d69a2c; animation-delay:-2.1s; }
.led-g { left: 82%; top: 86%; color:#58df72; animation-delay:-4.4s; }.led-h { left: 49%; top: 90%; color:#b74b9e; animation-delay:-1.8s; }
.wizard-shadow { fill: #020303; }.robe-mid { fill: #151413; }.robe-light { fill: #3c3024; }.face { fill: #3a2e20; }.void { fill: #030303; }
.eye { fill: var(--amber-hot); filter: drop-shadow(0 0 3px var(--amber)); animation: eye-glow 3.2s steps(2) infinite; }
.beard { fill: #14120e; }.hands { fill: #5a432a; }.console { fill: #181b19; }.console-lights { fill: var(--green); filter: drop-shadow(0 0 2px var(--green)); }
.rune-field { position: absolute; z-index: 3; top: 15px; left: 15px; color: #6f4b87; opacity: .38; font-size: 12px; line-height: 2; }
.bay-caption { display: grid; grid-template-columns: 1fr auto; gap: 7px; padding: 17px 7px 3px; font-size: 11px; color: var(--muted); letter-spacing: .12em; }
.bay-caption strong { color: var(--amber); font-weight: normal; }

.broadcast-crt { height: 285px; background: radial-gradient(ellipse, #102115, #06100b 70%); }
.transmission-label { position: absolute; z-index: 7; left: 16px; right: 16px; top: 13px; display: flex; justify-content: space-between; color: var(--green); font-size: 11px; letter-spacing: .12em; }
#transmissionId { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.classified { flex: none; margin-left: 14px; color: var(--amber-dim); }
#spectrum { width: 100%; height: 100%; display: block; opacity: .88; }
.playback-gate { position: absolute; inset: 0; z-index: 8; width: 100%; border: 0; background: rgba(3,10,7,.78); color: var(--green); cursor: pointer; text-align: center; }
.playback-gate[hidden] { display: none; }
.playback-gate strong, .playback-gate span { display: block; }
.playback-gate strong { color: var(--amber); font-size: 14px; letter-spacing: .18em; }
.playback-gate span { margin-top: 11px; font-size: 12px; letter-spacing: .1em; }
.waiting-message { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--green); text-align: center; }
.waiting-message[hidden] { display: none; }
.waiting-message strong { letter-spacing: .16em; font-size: 13px; }.waiting-message span { color: #61836b; font-size: 11px; }
.summoning-ring { font-size: 38px; color: var(--violet); animation: summon 3s steps(12) infinite; text-shadow: 0 0 11px var(--violet); }

.transport { display: grid; grid-template-columns: auto auto 1fr auto 48px; align-items: center; gap: 10px; padding: 13px 4px 9px; }
.transport-buttons { display: flex; gap: 5px; }
.transport-button { width: 42px; height: 42px; color: var(--muted); font-size: 15px; }
.metal-button, .small-button { border: 1px solid var(--edge-lit); background: linear-gradient(#252421,#101211); box-shadow: inset 0 1px #4a4236, 0 3px #050606; cursor: pointer; }
.metal-button:active, .small-button:active { transform: translateY(2px); box-shadow: inset 0 1px #4a4236, 0 1px #050606; }
.play-button { width: 50px; height: 42px; color: var(--amber); font-size: 18px; }
.small-button { height: 30px; font-size: 10px; color: var(--muted); }
.small-button.active { color: #e65a49; }
.time { color: var(--amber); font-size: 12px; font-variant-numeric: tabular-nums; }
input[type="range"] { appearance: none; height: 15px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: #26281f; border: 1px solid #4f452e; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 10px; height: 16px; margin-top: -7px; background: var(--amber); border: 2px solid #221a0d; }
input[type="range"]::-moz-range-track { height: 4px; background: #26281f; border: 1px solid #4f452e; }
input[type="range"]::-moz-range-thumb { width: 8px; height: 14px; border-radius: 0; background: var(--amber); border: 2px solid #221a0d; }

.verdict-console { border-top: 1px solid #3c3325; padding-top: 10px; }
.verdict-console > p:first-child { margin: 0 0 8px; text-align: center; color: var(--muted); font-size: 10px; letter-spacing: .22em; }
.verdict-buttons { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); gap: 7px; max-width: 680px; margin: 0 auto; }
.verdict { min-height: 68px; padding: 7px 3px; border: 1px solid #3b372e; background: linear-gradient(#1f211f, #0d0f0f); cursor: pointer; box-shadow: inset 0 1px #3c3d37, 0 3px #050606; }
.verdict:hover { border-color: var(--amber-dim); transform: translateY(-1px); }
.verdict:active { transform: translateY(2px); box-shadow: inset 0 1px #3c3d37; }
.verdict b { display: block; font-size: 22px; line-height: 1; }.verdict span { display: block; margin-top: 7px; font-size: 8px; letter-spacing: .08em; color: var(--muted); }
.verdict.dislike b { color: #c05243; }.verdict.like b { color: #71b66e; }.verdict.favorite b { color: var(--amber-hot); text-shadow: 0 0 7px #d49524; }
.verdict.selected { border-color: var(--amber); background: #282112; box-shadow: inset 0 0 15px #9a641e33; }
.verdict:disabled { cursor: not-allowed; opacity: .38; transform: none; }
.key-hint { margin: 8px 0 0; color: #565245; text-align: center; font-size: 8px; letter-spacing: .12em; }

.details-deck { margin-top: 15px; padding: 12px 18px; }
.details-toggle { width: 100%; display: flex; justify-content: space-between; border: 0; background: transparent; cursor: pointer; color: var(--amber); letter-spacing: .12em; font-size: 11px; padding: 5px; }
.details-toggle i { color: var(--muted); font-style: normal; }
.details-content { padding: 17px 5px 8px; border-top: 1px solid #322b21; margin-top: 8px; }
.axes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; }
.axis { display: grid; grid-template-columns: minmax(118px, 148px) auto; align-items: center; justify-content: start; gap: 8px; font-size: 10px; color: var(--muted); }
.axis div { display: grid; grid-template-columns: repeat(3, 46px); }
.axis button, .tags button, .note-box button { border: 1px solid #39382f; background: #111413; color: #777567; padding: 7px 5px; cursor: pointer; font-size: 9px; }
.axis button.selected { color: var(--amber-hot); border-color: var(--amber-dim); background: #2a2112; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; padding-top: 4px; }
.tags button.selected { color: #c9ddbc; border-color: var(--green-dim); background: #132318; }
.diagnostics button { min-width: 150px; padding: 10px 13px; }
.note-box { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-top: 15px; }
.note-box label { grid-column: 1 / -1; font-size: 10px; color: var(--muted); letter-spacing: .13em; }
.note-box textarea { min-height: 70px; resize: vertical; border: 1px solid #393328; background: #080b0a; color: var(--green); padding: 10px; }
.note-box button { align-self: end; color: var(--amber); height: 37px; }

.archive { margin-top: 15px; padding: 19px; min-height: 170px; }
.archive-head { display: flex; align-items: end; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid #3b3022; }
h2 { font-size: 18px; color: var(--amber); }
.queue-readout { text-align: right; font-size: 9px; color: var(--muted); }.queue-readout span { display:block; }.queue-readout strong { color: var(--green); font-size: 11px; font-weight: normal; }
.history { display: grid; gap: 1px; margin-top: 10px; }
.empty-history { color: #504b3e; font-size: 10px; letter-spacing: .12em; }
.history-row { display: grid; grid-template-columns: 72px minmax(180px, 1.25fr) minmax(190px, 1fr) minmax(150px, .8fr); gap: 12px; align-items: center; padding: 9px 8px; border-bottom: 1px solid #24221d; font-size: 10px; }
.history-score { font-size: 17px; color: var(--amber); }.history-score.negative { color: #c05243; }.history-score.skipped { color: #646257; }
.history-title strong { display:block; color: #cabc9c; font-weight: normal; }.history-title span, .history-meta, .history-tags { color: var(--muted); }
.history-tags { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.editorial-credit { margin: 12px 0 24px; text-align: center; color: #504b3e; font-size: 8px; letter-spacing: .11em; }
.editorial-credit a { color: #77694d; text-decoration: none; }.editorial-credit a:hover { color: var(--amber); }

.reveal-toast { position: fixed; left: 50%; bottom: 24px; z-index: 30; transform: translate(-50%, 150%); visibility: hidden; opacity: 0; pointer-events: none; min-width: min(560px, calc(100% - 30px)); padding: 13px 20px; text-align: center; background: #101812; border: 1px solid var(--green-dim); color: var(--green); box-shadow: 0 8px 30px #000, inset 0 0 20px #19321d; font-size: 11px; transition: transform .25s ease, opacity .2s ease, visibility 0s linear .25s; }
.reveal-toast.visible { transform: translate(-50%, 0); visibility: visible; opacity: 1; pointer-events: auto; transition-delay: 0s; }

@keyframes summon { to { transform: rotate(360deg); } }
@keyframes sigil-pulse { 50% { opacity:.62; filter: drop-shadow(0 0 2px #9250bf); } }
@keyframes eye-glow { 50% { fill: #9e721c; } }
@keyframes club-violet { 0%,100% { opacity:.025; transform:translate(-2%,1%); } 42% { opacity:.105; transform:translate(2%,-1%); } 70% { opacity:.045; } }
@keyframes club-green { 0%,100% { opacity:.025; transform:translate(1%,0); } 36% { opacity:.085; } 74% { opacity:.04; transform:translate(-2%,1%); } }
@keyframes club-amber { 0%,100% { opacity:.018; } 52% { opacity:.065; } }
@keyframes wizard-eye-pulse { 0%,100% { opacity:.28; filter:brightness(.85); } 46% { opacity:.72; filter:brightness(1.18); } 52% { opacity:.46; } }
@keyframes board-breathe { 0%,100% { opacity:.18; } 50% { opacity:.52; } }
@keyframes console-blink { 0%,8%,100% { opacity:.15; } 9%,15% { opacity:.9; } 16%,55% { opacity:.28; } 56%,59% { opacity:.72; } 60% { opacity:.2; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 900px) {
  .console-grid { grid-template-columns: 1fr; }.wizard-bay { display:none; }.axes { grid-template-columns: 1fr; }
  .history-row { grid-template-columns: 58px 1fr; }.history-meta, .history-tags { grid-column: 2; }
}
@media (max-width: 570px) {
  .station-shell { width: calc(100% - 12px); padding-top: 8px; }.station-header { padding-left: 4px; }.station-status { display:none; }
  .broadcast-bay { padding: 9px; }.broadcast-crt { height: 215px; }.verdict-buttons { gap: 3px; }.verdict { min-height: 61px; }.verdict span { font-size: 7px; }
  .transport { grid-template-columns: 1fr auto; }.transport-buttons { grid-column: 1 / -1; justify-content:center; }.small-button { display:none; }.play-button { width:42px; }
  .details-deck, .archive { padding: 13px 10px; }.axis { align-items:flex-start; flex-direction:column; }.axis div { width:100%; grid-template-columns:repeat(3,1fr); }
  .note-box { grid-template-columns: 1fr; }.history-row { gap:5px; }
  .axis { grid-template-columns: 108px 1fr; align-items:center; }
}
