:root {
  color-scheme: dark;
  --bg: #0a0a0a; --panel: #0d0d0d; --panel-2: #151515;
  --line: #2a2a2a; --line-bright: #3a3a3a; --text: #e5e5e5; --muted: #898989;
  --accent: #facc15; --accent-dim: #8a6d0b; --accent-ink: #1a1400;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  font-family: var(--mono); font-synthesis: none;
}
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font-size: 13px; line-height: 1.4; touch-action: manipulation; user-select: none; -webkit-font-smoothing: antialiased; }
p, h1, h2 { margin: 0; } h1 { display: inline; margin-top: 2px; font-size: 15px; font-weight: 600; letter-spacing: .04em; text-transform: lowercase; } h2 { margin-top: 4px; font-size: 14px; font-weight: 600; letter-spacing: .04em; }
.eyebrow { display: inline-block; margin-right: 10px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
header { min-height: 64px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); }
.status { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; } #status-dot { width: 9px; height: 9px; border: 1px solid var(--line-bright); background: var(--muted); } #status-dot.online { background: var(--accent); border-color: var(--accent); }
main { width: 100%; min-height: calc(100vh - 64px); padding: 12px 0 28px; display: grid; grid-template-columns: minmax(230px, 1fr) min(760px, calc(100vh - 104px), calc(100vw - 488px)) minmax(230px, 1fr); gap: 14px; align-items: start; }
.instrument { grid-column: 2; display: grid; place-items: center; width: 100%; aspect-ratio: 1; border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.pad-layout { display: block; width: 100%; height: 100%; filter: drop-shadow(0 20px 50px #000); }
.pad-rim { fill: #111418; stroke: var(--line-bright); stroke-width: 2; }
.pad { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.pad path { fill: #202020; stroke: #080808; stroke-width: var(--separator-width, 10); stroke-linejoin: round; transition: fill 70ms ease, filter 70ms ease; }
.pad.inner path { fill: #171717; }
.pad[aria-disabled="true"] { cursor: not-allowed; }
.pad:not([aria-disabled="true"]):hover path, .pad:focus-visible path { fill: #292929; filter: brightness(1.18); }
.pad:focus-visible path { stroke: var(--accent); }
/* Zone light colours match the Groove ring with static lights: warm on I1/O1, magenta on I2/O2, blue on I3/O3. */
.pad[data-pad="I1"], .pad[data-pad="O1"] { --pad-light: #fb7c56; }
.pad[data-pad="I2"], .pad[data-pad="O2"] { --pad-light: #fb56f7; }
.pad[data-pad="I3"], .pad[data-pad="O3"] { --pad-light: #5674fb; }
.pad.active path { fill: color-mix(in srgb, var(--pad-light) 72%, #161616); filter: drop-shadow(0 0 22px color-mix(in srgb, var(--pad-light) 70%, transparent)); transition: none; }
.pad text { fill: var(--text); text-anchor: middle; pointer-events: none; }
.pad-id { font-size: 43px; font-weight: 750; letter-spacing: -.04em; }
.pad-key { fill: var(--muted) !important; font-size: 17px; letter-spacing: .08em; }
.pad.active .pad-key { fill: rgba(255, 255, 255, .82) !important; }
.side-panel { align-self: start; display: grid; width: min(300px, 100%); gap: 12px; }
.patterns-panel { grid-column: 3; grid-row: 1; align-self: stretch; align-content: space-between; justify-self: end; }
.settings-panel { grid-column: 1; grid-row: 1; justify-self: start; }
.control-card, .velocity-card { padding: 15px; border: 1px solid var(--line); background: var(--panel); }
.mode-group { display: grid; gap: 7px; margin-top: 14px; }
button { appearance: none; width: 100%; padding: 10px 12px; border: 1px solid var(--line-bright); color: var(--text); background: var(--panel-2); font: 600 12px var(--mono); text-align: left; cursor: pointer; }
button:hover { border-color: #666; }
button.active { border-color: var(--accent); color: var(--accent-ink); background: var(--accent); }
button:disabled { cursor: not-allowed; opacity: .42; }
button:disabled:hover { border-color: var(--line-bright); }
.velocity-card output { display: block; margin: 22px 0 8px; color: var(--text); font-size: 48px; font-weight: 600; letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
input { width: 100%; accent-color: var(--accent); }
select { width: 100%; margin-top: 10px; padding: 10px 34px 10px 10px; border: 1px solid var(--line-bright); border-radius: 0; color: var(--text); background: var(--panel-2); font: 12px var(--mono); }
select:focus-visible { border-color: var(--accent); outline: 1px solid var(--accent); }
.scale { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 10px; }
.effects-card { display: grid; }
.effect-control { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 24px; color: var(--text); font-weight: 600; }
.effect-control output { color: var(--accent); font-variant-numeric: tabular-nums; }
.effects-card input { margin-top: 12px; }
.preset-card { display: grid; }
.preset-card .effect-control { margin-top: 20px; }
.preset-description { min-height: 47px; margin-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.preset-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.preset-actions button { text-align: center; }
#preset-play { border-color: var(--accent-dim); }
#preset-play:hover:not(:disabled) { border-color: var(--accent); }
.preset-progress { height: 4px; margin-top: 15px; overflow: hidden; background: var(--panel-2); }
.preset-progress span { display: block; width: 0; height: 100%; background: var(--accent); transition: width 80ms linear; }
.preset-status { margin-top: 9px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.event-card { display: grid; grid-template-columns: 1fr auto; align-items: end; }
.event-card .eyebrow { grid-column: 1 / -1; }
.event-card strong { color: var(--accent); font-size: 36px; line-height: 1; }
.event-card span { color: var(--muted); font-size: 11px; }
.note { padding: 0 2px; color: var(--muted); font-size: 11px; line-height: 1.55; }
@media (max-width: 1100px) {
  main { min-height: 0; padding: 0 0 24px; grid-template-columns: 1fr 1fr; gap: 12px; }
  .instrument { grid-column: 1 / -1; grid-row: 1; width: 100vw; max-width: 100%; border-right: 0; border-left: 0; }
  .settings-panel { grid-column: 1; grid-row: 2; justify-self: stretch; width: auto; margin-left: 12px; }
  .patterns-panel { grid-column: 2; grid-row: 2; justify-self: stretch; width: auto; margin-right: 12px; }
}
@media (max-width: 620px) {
  header { align-items: flex-start; flex-direction: column; padding: 12px; }
  main { grid-template-columns: 1fr; gap: 10px; }
  .instrument { grid-column: 1; }
  .settings-panel { grid-column: 1; grid-row: 2; margin: 0 8px; }
  .patterns-panel { grid-column: 1; grid-row: 3; margin: 0 8px; }
  .pad-id { font-size: 50px; }
  .pad-key { font-size: 20px; }
}
/* Web demo layout, on top of the stand-in styles. */
/* Rows end with the pad, so the bottom-right cards line up with its lower edge. */
main { align-content: start; }
/* The page title is shown as written, a little smaller than GROOVE EMT (11px). */
h1 { text-transform: none; font-size: 9.5px; letter-spacing: .12em; }
.controls-panel { align-self: start; }
.controls-panel .mode-group { grid-template-columns: repeat(3, 1fr); }
.controls-panel .mode-group button { text-align: center; }
.effects-card .effect-control { margin-top: 18px; }
.effects-card input { margin-top: 10px; }
.effects-card select { margin-top: 10px; }
.song-card { display: grid; }
.song-card .preset-status { min-height: 15px; }
.song-card button { margin-top: 14px; text-align: center; }
.hit-group { display: grid; gap: 12px; }
.hit-group .velocity-card { padding: 12px 15px; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; }
.hit-group .velocity-card output { margin: 0; font-size: 26px; letter-spacing: -.04em; }
.hit-group .velocity-card input, .hit-group .velocity-card .scale { grid-column: 1 / -1; }
.hit-group .velocity-card input { margin-top: 10px; }
.hit-group .event-card { padding: 12px 15px; }
.hit-group .event-card strong { font-size: 26px; }
/* The same lists in every browser (Safari otherwise draws its own small control). */
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23898989' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
