:root {
  color-scheme: dark;
  --page: #10120f;
  --panel: #191c17;
  --border: #30352b;
  --muted: #a2a895;
  --text: #f3f5eb;
  --accent: #d7fa65;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--page);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse 900px 400px at 30% 12%, #1e2317 0%, transparent 80%);
}
[hidden], .symbols { display: none !important; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button svg, .local svg, .brand svg, .volume svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.wrap { width: min(1232px, calc(100% - 80px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid #2c3027; }
.masthead { display: flex; align-items: center; min-height: 73px; gap: 19px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 800; letter-spacing: .13em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: #242d13;
}
.brand-mark svg { width: 19px; height: 19px; }
.site-label { border-left: 1px solid var(--border); padding-left: 18px; font-size: 13px; color: var(--muted); }
.local { display: flex; align-items: center; gap: 7px; margin-left: auto; font-size: 12px; color: #c2c9b4; }
.local svg { width: 16px; height: 16px; color: var(--accent); }

.intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 43px 0 30px; }
.eyebrow, .technical, .display-footer, .track-type, .controls-header > span, .range-labels, .status {
  font: 600 11px/1.35 var(--mono);
  letter-spacing: .08em;
}
.eyebrow { color: #c8e18f; display: flex; align-items: center; gap: 9px; }
.eyebrow > span { display: block; width: 20px; height: 1px; background: #abc56a; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(44px, 6vw, 83px); line-height: .99; letter-spacing: -.074em; font-weight: 730; margin-top: 11px; }
h1 span { color: var(--accent); }
.intro p { color: #b6beab; font-size: 15px; line-height: 1.6; padding-bottom: 3px; }

.workbench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 318px); align-items: start; gap: 16px; }
.visual-column { min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 17px; }
.display { padding: 20px; background: linear-gradient(148deg, #201e20, #151516 63%); }
.display-header, .display-actions, .display-footer { display: flex; justify-content: space-between; align-items: center; }
.display-header { margin-bottom: 15px; }
.technical { color: #a4b094; }
.display-header h2 { font-size: 27px; line-height: 1.1; letter-spacing: -.04em; margin-top: 4px; }
.display-actions { gap: 11px; }
.status {
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 20px;
  padding: 7px 9px;
  background: #2b3125;
  color: #cad3bb;
  white-space: nowrap;
}
.status > span:first-child { width: 6px; height: 6px; border-radius: 50%; background: #a8b39b; }
.status[data-state="live"] { background: #354321; color: #e0ff9d; }
.status[data-state="live"] > span:first-child { background: var(--accent); box-shadow: 0 0 9px #c9f56790; }
.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #414a37;
  border-radius: 10px;
  background: #24291f;
}
.screen {
  height: clamp(255px, 25vw, 355px);
  position: relative;
  overflow: hidden;
  border: 1px solid #353035;
  border-radius: 11px;
  background: #050506;
  box-shadow: inset 0 0 25px #0009;
}
.display[data-mode="spectrum"] .screen { height: auto; aspect-ratio: 3.4; }
.screen canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.display-footer { color: #adb5a0; margin-top: 13px; gap: 12px; }
.display-footer span:last-child { text-align: right; }
.display .screen:is(:fullscreen, .expanded) {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: #000;
  box-shadow: none;
  cursor: none;
  touch-action: manipulation;
}
.screen.expanded { position: fixed; inset: 0; z-index: 3; }
body:has(.screen.expanded) { overflow: hidden; }

.transport {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(155px, 1.45fr) minmax(75px, .52fr);
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
  min-height: 80px;
  padding: 12px 16px;
}
.track { display: flex; align-items: center; min-width: 0; gap: 12px; }
.play-button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 12px;
  color: #192009;
  background: var(--accent);
}
.play-button svg { width: 23px; height: 23px; }
.track-text { min-width: 0; }
.track-title { font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-type { color: var(--muted); margin-top: 3px; font-size: 10px; }
.timeline, .volume { display: flex; align-items: center; gap: 9px; color: #b7bead; }
.timeline { font: 11px/1 var(--mono); }
.timeline span { white-space: nowrap; min-width: 4ch; }
.timeline span:last-child { text-align: right; }
.volume svg { width: 17px; height: 17px; }
.live-description { color: var(--muted); font-size: 13px; grid-column: 2 / -1; text-align: right; }
input[type="range"] {
  appearance: none;
  width: 100%;
  min-width: 0;
  margin: 0;
  height: 24px;
  background: transparent;
  cursor: pointer;
}
input[type="range"]:disabled { opacity: .55; cursor: default; }
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, #a7c94f var(--fill, 0%), #3c4334 var(--fill, 0%));
}
input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, #a7c94f var(--fill, 0%), #3c4334 var(--fill, 0%));
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  margin-top: -4px;
}
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; border: 0; background: var(--accent); }
.notice { color: #ffd8ac; padding: 11px 13px; margin-top: 8px; background: #34291d; border-radius: 9px; font-size: 13px; }

.controls { padding: 19px 17px; }
.controls-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; }
.controls-header h2 { font-size: 21px; line-height: 1.2; letter-spacing: -.025em; }
.controls-header > span { color: #a3ae96; }
.control-section { border-top: 1px solid #33392d; padding: 14px 0; }
.control-section:last-child { padding-bottom: 0; }
.control-section h3 { font-size: 13px; font-weight: 650; margin-bottom: 9px; }
.source-options, .mode-options { display: grid; gap: 6px; }
.source-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mode-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.option {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 39px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid #393f33;
  background: #21251e;
  color: #c8d0bc;
  font-size: 12px;
  font-weight: 580;
}
.source-option { flex-direction: column; justify-content: center; gap: 3px; min-height: 51px; }
.background-option { grid-column: 1 / -1; flex-direction: row; gap: 8px; min-height: 39px; }
.option svg { width: 17px; height: 17px; }
.option[aria-pressed="true"] { border-color: #91a94d; background: #353e25; color: #edffbb; }
.option[aria-pressed="true"] svg { color: var(--accent); }
.option:disabled { cursor: wait; opacity: .7; }
.control-hint { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.palette-options { display: flex; flex-wrap: wrap; gap: 5px; }
.swatch {
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  width: 35px;
  height: 35px;
  padding: 0;
}
.swatch::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--swatch); }
.swatch[aria-pressed="true"] { border-color: #d5e3be; background: #333b28; }
.custom-color-row { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.custom-color-row .option { flex: 1; }
#custom-color {
  width: 44px;
  height: 39px;
  padding: 5px;
  border: 1px solid #393f33;
  border-radius: 8px;
  background: #21251e;
  cursor: pointer;
}
#custom-color::-webkit-color-swatch-wrapper { padding: 0; }
#custom-color::-webkit-color-swatch { border: 0; border-radius: 4px; }
#custom-color::-moz-color-swatch { border: 0; border-radius: 4px; }
.sensitivity-heading { display: flex; justify-content: space-between; align-items: center; }
.sensitivity-heading h3 { margin: 0; }
.sensitivity-heading output { color: var(--accent); font: 12px/1 var(--mono); }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 19px 0 22px;
  padding-top: 12px;
  border-top: 1px solid #30352b;
  color: #a6af9a;
  font-size: 12px;
}
.page-footer > span:first-child { font: 600 10px/1.5 var(--mono); letter-spacing: .12em; }
.page-footer b { color: #d8eea4; }

@media (hover: hover) and (pointer: fine) {
  .option:hover, .icon-button:hover { border-color: #a2b475; }
  .play-button:hover { background: #e5ff95; }
  .swatch:hover { border-color: #a2b475; }
}
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 48px); }
  .workbench { grid-template-columns: minmax(0, 1fr) 273px; }
  .transport { gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(118px, 1fr); }
  .volume { display: none; }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 30px); }
  .masthead { min-height: 60px; }
  .site-label, .desktop-break { display: none; }
  .intro { display: block; padding: 29px 0 20px; }
  .intro p { margin-top: 10px; font-size: 14px; }
  .workbench { grid-template-columns: 1fr; gap: 12px; }
  .display { padding: 13px; border-radius: 13px; }
  .display-header { margin-bottom: 10px; }
  .display-header h2 { font-size: 23px; }
  .screen { height: clamp(165px, 48vw, 265px); }
  .display-footer { font-size: 9px; margin-top: 9px; }
  .transport { min-height: 66px; margin-top: 8px; padding: 8px 11px; border-radius: 12px; }
  .play-button { width: 41px; height: 41px; border-radius: 9px; }
  .track { gap: 8px; }
  .track-title { font-size: 13px; }
  .track-type { font-size: 8px; }
  .timeline { gap: 5px; font-size: 10px; }
  .controls { padding: 14px; }
  .option, .swatch { min-height: 44px; }
  .swatch { width: 44px; }
  #custom-color { height: 44px; }
}
@media (max-width: 380px) {
  .transport { grid-template-columns: minmax(0, 1fr) 110px; }
}
