:root {
  color-scheme: dark;
  --bg: #15141a;
  --panel: #1d1c23;
  --line: #383540;
  --ink: #f8f3f0;
  --muted: #bbb3c0;
  --accent: #f5a791;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
.wrap { width: min(1060px, calc(100% - 48px)); margin-inline: auto; }
header { border-bottom: 1px solid var(--line); }
.mast { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: .875rem; }
.brand { color: var(--ink); text-decoration: none; font-size: 1.25rem; font-weight: 750; letter-spacing: -.04em; }
.brand span, h1 span { color: var(--accent); }
.radio-link { color: var(--muted); text-decoration: none; }
.radio-link:hover { color: var(--ink); }
.beat { padding-block: 28px 20px; }
.beat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.beat-head h1 { margin: 0; font-size: clamp(2.2rem, 7vw, 4rem); }
.beat-head button { min-width: 0; }
.sequencer { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: 16px; }
.controls, .project { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.control { display: flex; align-items: center; gap: 7px; min-height: 38px; color: var(--muted); font-size: .875rem; }
.control small { font-size: .8125rem; }
.control input:not([type="range"]), .control select {
  background: #17161c; color: var(--ink); border: 1px solid var(--line); border-radius: 6px;
  padding: 7px; font: inherit;
}
.control input[type="number"] { width: 65px; }
.swing input { width: 75px; }
.swing output { min-width: 3ch; }
.controls button, .project button, .bars button { min-width: 0; }
.secondary { color: var(--ink); background: #2d2a34; border: 1px solid #4a4555; }
button:disabled { opacity: .55; cursor: default; }
.pattern-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0 10px; }
.pattern-head h2 { margin: 0; }
.bars { display: flex; gap: 6px; }
.bars button { padding: 6px 9px; }
.bars button[aria-pressed="true"] { border-color: var(--accent); }
.bars .running-bar { color: var(--accent); }
.grid-scroll { overflow-x: auto; padding: 3px; }
#beat-grid { min-width: 730px; }
.beat-row { display: grid; grid-template-columns: 135px repeat(16, minmax(32px, 1fr)); gap: 4px; margin-bottom: 5px; }
.beat-numbers { color: var(--muted); text-align: center; font: .875rem ui-monospace, monospace; }
.track-label { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 3px; padding-right: 8px; text-align: left; }
.track-label strong { color: var(--track); font-size: .875rem; }
.track-label input { width: 74%; }
.mute { min-width: 0; padding: 1px 5px; background: #34303c; color: var(--ink); font-size: .78rem; }
.mute[aria-pressed="true"] { background: var(--track); color: #17161c; }
.step { min-width: 0; min-height: 33px; padding: 0; border-radius: 5px; border: 1px solid #43404e; background: #2d2a35; }
.step.downbeat { border-left-color: #9d91ae; background: #393542; }
.step[aria-pressed="true"] { background: var(--track); }
.step.current { outline: 2px solid #f8f3f0; outline-offset: -3px; }
.muted .step { opacity: .48; }
.project { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.title-field input { width: 145px; }
#beat-status { margin-left: auto; color: var(--muted); font-size: .85rem; }
.radio { margin-bottom: 24px; }
.radio summary { padding: 11px 0; color: var(--muted); cursor: pointer; }
.radio .transport { margin-bottom: 0; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 32px; padding-block: 38px 32px; }
.kicker { margin: 0; color: var(--accent); font: 600 .875rem ui-monospace, monospace; text-transform: uppercase; letter-spacing: .10em; }
h1 { margin: 12px 0 17px; font-size: clamp(2.7rem, 6.7vw, 5rem); line-height: .96; letter-spacing: -.075em; }
.intro { max-width: 42ch; margin: 0; color: var(--muted); line-height: 1.55; }
.cover { display: grid; place-items: center; min-height: 260px; overflow: hidden; border-radius: 18px; background: radial-gradient(ellipse at 32% 79%, #c16d63, transparent 61%), radial-gradient(ellipse at 79% 18%, #927899, transparent 64%), #2d2540; }
.record { width: min(64%, 216px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #191722 0 3%, #e3a089 4% 20%, transparent 21%), repeating-radial-gradient(circle, #201b28 0 4px, #433545 5px 6px, #24202d 7px 9px); box-shadow: 15px 20px 35px #10091a94; }
.studio { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: 14px; padding: 17px 20px; background: var(--panel); }
h2 { font-size: 1.15rem; margin: 0 0 13px; letter-spacing: -.035em; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.station { display: grid; align-items: center; grid-template-columns: auto 1fr auto; gap: 10px; padding: 8px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.station:has(:checked) { border-color: #956c69; background: #31252d; }
.station small, .now span, .received span { display: block; color: var(--muted); font-size: .875rem; }
.bpm { font: .875rem ui-monospace, monospace; color: var(--muted); white-space: nowrap; }
input { accent-color: var(--accent); }
.mixer label { display: grid; gap: 6px; margin-bottom: 14px; }
.mixer label span { display: flex; justify-content: space-between; gap: 8px; }
output { color: var(--accent); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; margin: 0; }
.transport { display: flex; align-items: center; gap: 16px; margin-block: 16px 28px; min-height: 74px; padding: 12px 16px; border: 1px solid #755256; border-radius: 12px; background: #282029; }
.received { margin-left: auto; text-align: right; }
.received strong { font-variant-numeric: tabular-nums; }
button { padding: 11px 14px; min-width: 137px; background: var(--accent); color: #241a22; border: 0; border-radius: 8px; font: 700 .875rem system-ui; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 690px) {
  .wrap { width: calc(100% - 28px); }
  .hero, .studio { grid-template-columns: 1fr; gap: 14px; }
  .cover { min-height: 155px; }
  .record { width: 122px; }
  .transport { flex-wrap: wrap; gap: 9px 13px; }
  .received { margin-left: 0; text-align: left; }
}
