:root {
  color-scheme: dark;
  font-family: "Instrument Sans", system-ui, sans-serif;
  background: #171111;
  color: #f8ead5;
  --accent: #ffc27c;
  --muted: #d5b7a4;
  --rule: #63423a;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button, label, input[type=range] { touch-action: manipulation; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid #ffe4a8; outline-offset: 5px; }
.wrap { margin-inline: auto; width: min(1120px, calc(100% - 40px)); }
.top { border-bottom: 1px solid #432f2b; }
.bar { min-height: 62px; display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.bar span:first-child { font-weight: 680; }
#status, #position, .range-labels, footer { color: var(--muted); font-size: .84rem; }
#status { text-align: right; }
.stage {
  margin-top: 22px; min-height: 416px; position: relative; overflow: hidden; isolation: isolate;
  display: grid; align-items: center; border: 1px solid #755448;
  background: radial-gradient(ellipse at 78% 34%, #693c32 0, transparent 48%),
      linear-gradient(110deg, #381e1b, #241719 68%, #1c1215);
}
.stage::after {
  content: ""; position: absolute; inset: 12px; border: 1px solid #b0826744; z-index: -1; pointer-events: none;
}
#crosshair { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.marquee { padding: clamp(28px, 7vw, 75px); }
.marquee p { margin: 0 0 16px; color: #f6bb8f; font-size: .85rem; font-weight: 650; letter-spacing: .1em; }
h1 { font: 400 clamp(3.55rem, 9vw, 7.6rem)/.86 "Baskervville", Georgia, serif; margin: 0; letter-spacing: -.065em; }
h1 em { color: var(--accent); }
.transport { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 29px; }
button { border: 1px solid var(--accent); color: #231410; background: var(--accent); min-height: 48px; padding: 10px 16px; font-weight: 720; border-radius: 3px; cursor: pointer; }
button:hover { background: #ffdaa7; }
#tap { background: #281819; color: #ffdcac; border-color: #ac785f; }
#tap:disabled { opacity: .53; cursor: default; }
kbd { font: .68rem system-ui, sans-serif; margin-left: 6px; color: var(--muted); }
.desk { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-top: 18px; }
.score, .mix { min-width: 0; padding: 19px 21px; border: 1px solid var(--rule); background: #201716; }
.panel-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 14px; }
h2 { margin: 0; font: 1.65rem "Baskervville", Georgia, serif; }
#tempo { color: var(--accent); font-weight: 700; }
#beats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; padding: 0; margin: 0 0 17px; list-style: none; }
#beats li { display: grid; place-items: center; min-height: 48px; border: 1px solid #67473c; color: #e8c9ad; font-size: clamp(.67rem, 2vw, .85rem); }
#beats li.active { background: #ffc27c; color: #271711; font-weight: 750; }
#beats li.rest.active { background: #412d28; color: #fff1dd; }
fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0; border: 0; margin: 0; }
legend { color: var(--muted); font-size: .8rem; padding: 0; margin-bottom: 7px; }
fieldset label, .mute { display: flex; align-items: center; gap: 6px; min-height: 34px; font-size: .85rem; }
input { accent-color: #efac6c; }
#bpm { display: block; width: 100%; margin: 5px 0 7px; }
.range-labels { display: flex; justify-content: space-between; }
.mute { margin: 9px 0; }
.file { display: block; color: var(--muted); font-size: .85rem; }
.file input { display: block; margin-top: 6px; max-width: 100%; color: #ede0cc; }
.file input::file-selector-button { padding: 6px 8px; border: 1px solid #9c725b; background: #33221e; color: #ffe5c7; border-radius: 3px; }
audio { width: 100%; margin-top: 9px; }
#feedback, #track-info { margin: 10px 0 0; color: var(--muted); font-size: .83rem; min-height: 1.1em; }
#track-info:empty { display: none; }
footer { display: flex; padding: 19px 0 25px; flex-wrap: wrap; gap: 18px; }
a { color: #ffcd9e; text-underline-offset: 3px; }
.hidden { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
@media (max-width: 640px) {
  .wrap { width: calc(100% - 26px); }
  .stage { margin-top: 13px; min-height: 360px; }
  .marquee { padding: 24px; }
  .desk { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .score, .mix { padding: 14px; }
  .bar { min-height: 53px; }
  .bar span { font-size: .79rem; }
}
@media (max-width: 350px) {
  h1 { font-size: 3.1rem; }
  kbd { display: none; }
  fieldset { grid-template-columns: 1fr; }
}
