:root {
  font-family: "Instrument Sans", "Avenir Next", "Segoe UI", sans-serif;
  --bg: #151412;
  --text: #f3eee4;
  --muted: #b9ad9e;
  --accent: #ffc183;
  --line: #494239;
  --mono: "IBM Plex Mono", "Menlo", "Cascadia Mono", monospace;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; background: radial-gradient(ellipse at 50% 0%,#34302a 0, #1b1916 48%,#151412 82%); min-height: 100vh; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .38; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button:focus:not(:focus-visible) { outline: none; }
button svg, .brand-mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.symbols { position: absolute; width: 0; height: 0; }
.shell { max-width: 1176px; margin: 0 auto; padding: clamp(24px,4.8vw,65px) clamp(16px,4vw,48px) 28px; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 2px clamp(24px,4vw,44px); }
.brand, .head-actions { display: flex; align-items: center; gap: 15px; }
.brand h1 { display: flex; gap: .22em; align-items: baseline; margin: 0; font-size: clamp(25px,4vw,40px); line-height: .95; letter-spacing: -.08em; white-space: nowrap; }
.brand h1 strong { font-weight: 850; }
.brand h1 span { font-weight: 500; color: #c7b9a9; }
.brand-mark { background: var(--accent); border-radius: 10px 10px 10px 2px; height: 41px; width: 43px; display: flex; align-items: center; justify-content: center; gap: 3px; transform: skew(-5deg); box-shadow: inset 0 1px 0 #ffe0b7; }
.brand-mark i { width: 3px; background: #211711; border-radius: 2px; height: 10px; }
.brand-mark i:nth-child(2) { height: 17px; }
.brand-mark i:nth-child(3) { height: 22px; }
.brand-mark i:nth-child(4) { height: 13px; }
.local-clock { font-family: var(--mono); font-size: 10px; color: var(--muted); text-transform: uppercase; display: grid; gap: 4px; text-align: right; min-width: 75px; }
.local-clock strong { font-size: 16px; color: #ede3d5; letter-spacing: .05em; }
.head-button, .plain, .accent { border: 1px solid var(--line); border-radius: 8px; padding: 11px 15px; background: #24211d; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 13px; font-weight: 700; min-height: 42px; }
.head-button:hover, .plain:hover, .utilities button:hover, .icon-btn:hover:not(:disabled) { border-color: #897765; background-color: #383028; }
.accent { background: var(--accent); border-color: var(--accent); color: #241810; }
.accent:hover { background: #ffdaaa; }
.deck { background: linear-gradient(151deg,#40382f,#2b2722 53%,#221f1b); border: 1px solid #665748; border-radius: 24px; padding: 14px clamp(13px,2.7vw,29px) 0; box-shadow: 0 18px 40px #0009, inset 0 1px #8b766055; }
.deck-strip { display: flex; justify-content: space-between; align-items: center; padding: 1px 1px 13px; }
.screw { background: radial-gradient(circle at 60% 28%,#7a6b5e,#27221d 63%); width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 1px 2px #000; position: relative; }
.screw::after { content: ""; position: absolute; inset: 4px 2px; background: #211a16; transform: rotate(-37deg); }
.lamp { display: flex; gap: 7px; align-items: center; font: 700 10px var(--mono); letter-spacing: .14em; color: #d4c4b3; }
.lamp i { width: 6px; height: 6px; border-radius: 50%; background: #7e6d5e; }
.lamp i.live { background: #ff9c65; box-shadow: 0 0 10px #ff8b55; }
.display { --screen: #100c09; color: #ffbc82; border: 2px solid #88735f; position: relative; border-radius: 13px; overflow: hidden; padding: clamp(16px,3.1vw,35px); background: linear-gradient(150deg,#26170f,var(--screen) 65%); box-shadow: inset 0 0 32px #090604, 0 2px 8px #000b; }
.display::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg,#08030042 0 1px,transparent 1px 4px); opacity: .38; }
.display-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 700 11px var(--mono); letter-spacing: .13em; }
.display-mode { border: 1px solid #a26740; background: #a462301c; border-radius: 3px; padding: 5px 9px; }
.display-clock { color: #e2a273; white-space: nowrap; }
.display-core { display: grid; grid-template-columns: minmax(0,1fr) minmax(145px,26%); align-items: end; gap: clamp(13px,4vw,42px); min-height: clamp(149px,18vw,201px); padding-block: 20px 24px; }
.track { min-width: 0; }
.track-kind { color: #e1a873; font: 700 clamp(10px,1.4vw,12px) var(--mono); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 9px; }
.track h2 { font: 720 clamp(29px,5.4vw,63px)/1.03 var(--mono); letter-spacing: -.075em; margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 0 18px #ff91482f; }
.track-detail { margin-top: 13px; color: #d9a681; font: 12px/1.3 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter canvas { display: block; width: 100%; height: clamp(46px,9vw,94px); }
.meter > div { display: flex; justify-content: space-between; font: 9px var(--mono); color: #c99369; margin-top: 6px; }
.display-bottom { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; color: #e6a46f; font: 11px var(--mono); }
input[type=range] { appearance: none; -webkit-appearance: none; display: block; margin: 0; height: 20px; background: transparent; cursor: pointer; min-width: 0; accent-color: var(--accent); }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right,var(--accent) 0 var(--progress,0%),#573d2f var(--progress,0%) 100%); }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: var(--accent); border: none; }
input[type=range]::-moz-range-track { height: 4px; background: #573d2f; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: none; }
input[type=range]:disabled { cursor: default; }
.seek:disabled::-webkit-slider-thumb { opacity: 0; }
.console { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(9px,2.6vw,30px); padding: 22px 0; }
.mode-buttons, .transport, .sound { display: flex; align-items: center; gap: 6px; }
.mode { min-width: 0; min-height: 60px; padding: 9px clamp(7px,1.3vw,15px); border: 1px solid #61554a; border-radius: 8px; background: linear-gradient(#37302a,#231f1a); box-shadow: inset 0 1px #74645355, 0 3px 0 #151311; font: 750 clamp(10px,1.2vw,13px) var(--mono); display: grid; justify-items: center; align-content: center; gap: 6px; white-space: nowrap; }
.mode svg { width: 18px; height: 18px; }
.mode:hover { border-color: #c6936b; }
.mode.selected { color: #ffd4a5; background: #412b1e; border-color: #e39a66; box-shadow: inset 0 -3px 0 #d8864b,0 3px 0 #151311; }
.transport { gap: 8px; }
.icon-btn, .play-btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #5c5146; border-radius: 9px; background: #24211d; min-width: 42px; min-height: 42px; padding: 0; }
.icon-btn.small { width: 36px; min-width: 36px; height: 38px; min-height: 38px; }
.play-btn { height: 65px; width: 65px; border-radius: 50%; background: linear-gradient(#ffce99,#edab6d); border: 1px solid #ffddb3; color: #2b1b11; box-shadow: 0 3px 0 #895e3e, 0 6px 12px #0008; }
.play-btn:hover:not(:disabled) { background: #ffdcaf; }
.transport button:disabled { filter: grayscale(1); }
.play-btn svg { height: 28px; width: 28px; }
.sound { justify-content: flex-end; gap: 9px; }
.vol { display: grid; gap: 2px; min-width: 49px; width: clamp(52px,8vw,103px); }
.vol span { font: 700 10px var(--mono); color: #d6c6b7; display: flex; justify-content: space-between; }
.deck-footer { border-top: 1px solid #53483d; padding: 13px 0 15px; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.next-track { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.next-track span { color: #d6a986; font: 700 10px var(--mono); letter-spacing: .09em; white-space: nowrap; }
.next-track strong { font-size: 13px; color: #e0d2c4; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
#quick-setup { white-space: nowrap; }
.utilities { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 19px; }
.utilities button { border: 1px solid #484038; border-radius: 10px; min-height: 68px; text-align: left; background: #24201c; display: flex; gap: 10px; align-items: center; padding: 10px clamp(8px,1.3vw,15px); min-width: 0; }
.utilities button > svg:first-child { color: var(--accent); }
.utilities button > span { flex: 1; display: grid; gap: 3px; min-width: 0; }
.utilities strong { font-size: 14px; }
.utilities small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.utilities .chevron { width: 14px; opacity: .68; }
.notice { color: #e5c8ac; font-size: 13px; line-height: 1.45; min-height: 1.5em; margin: 13px 2px 0; }
dialog { background: #241f1b; color: var(--text); border: 1px solid #6a5748; border-radius: 15px; width: min(760px,calc(100% - 28px)); max-height: 88vh; padding: 0; box-shadow: 0 20px 65px #000a; }
dialog::backdrop { background: #100b08bc; backdrop-filter: blur(5px); }
.panel-top { padding: 15px 20px; background: #2b251f; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 1; }
.panel-top h2 { margin: 0; font-size: 23px; }
#panel-content { padding: 18px 20px 23px; }
.panel-copy { color: #d5c6b8; font-size: 14px; line-height: 1.5; margin: 0 0 15px; }
.panel-actions, .day-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 13px; }
.field { display: grid; gap: 7px; flex: 1; min-width: 130px; }
.field span { font-size: 12px; color: #dfccba; font-weight: 700; }
select, input[type=text], input[type=url], input[type=search] { width: 100%; min-height: 42px; background: #161310; border: 1px solid #625447; border-radius: 6px; padding: 8px 11px; color: var(--text); }
.panel-actions .field { flex-basis: 150px; }
.panel-actions .field + button { align-self: end; }
.list { padding: 0; margin: 0; list-style: none; }
.row { border-top: 1px solid #494138; padding: 11px 0; display: flex; align-items: center; gap: 11px; }
.row-body { min-width: 0; flex: 1; display: grid; gap: 4px; }
.row-body strong { font-size: 14px; overflow-wrap: anywhere; }
.row-body small, .row-caption { font: 11px/1.4 var(--mono); color: #cbbbaf; overflow-wrap: anywhere; }
.row-time { font: 12px var(--mono); color: var(--accent); min-width: 47px; }
.row.current { border-left: 2px solid var(--accent); padding-left: 9px; background: #35271a; }
.day-tabs button[aria-pressed=true], .preset button[aria-pressed=true] { color: #241810; background: var(--accent); }
.placeholder { color: #c7b8a8; font-size: 14px; padding: 13px 0; }
.eq-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 13px; margin: 17px 0; }
.eq-grid label { display: grid; gap: 8px; color: #f0d9c4; text-align: center; font: 12px/1.4 var(--mono); }
.eq-grid output { color: #e2ab83; }
.mini-in-page .masthead, .mini-in-page .utilities, .mini-in-page .deck-strip, .mini-in-page .deck-footer, .mini-in-page .display-clock, .mini-in-page .meter { display: none; }
.mini-in-page .shell { max-width: 540px; padding-top: 12px; }
.mini-in-page .display-core { grid-template-columns: 1fr; min-height: auto; padding-block: 12px; }
.mini-in-page .track h2 { font-size: clamp(22px,6vw,30px); }
.mini-in-page .deck { padding-top: 12px; }
.exit-mini { margin: 10px 0 0; }
@media (max-width: 765px) {
  .console { grid-template-columns: 1fr 1fr; }
  .mode-buttons { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4,1fr); }
  .console { padding-block: 14px; }
  .mode { min-height: 47px; display: flex; align-items: center; justify-content: center; }
  .play-btn { width: 53px; height: 53px; }
  .utilities { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 470px) {
  .head-button span, .local-clock, .meter { display: none; }
  .brand-mark { width: 34px; height: 34px; }
  .brand { gap: 9px; }
  .display-core { grid-template-columns: 1fr; min-height: 145px; }
  .next-track { display: grid; gap: 3px; }
  .deck { border-radius: 16px; }
  .eq-grid { grid-template-columns: repeat(3,1fr); }
  #panel-content, .panel-top { padding-inline: 13px; }
}

[hidden] { display: none !important; }
