/* ===========================================================
   MÉTRONOME — "Precision Instrument" · Light Edition
   Solid borders · no blur · brushed aluminium · amber accents
   =========================================================== */

   :root {
    --primary: #c28400;
    --primary-light: #d99a10;
    --primary-dim: rgba(194,132,0,0.08);
    --danger: #c33;
    --accent: #4a9;
    --bg-page: #e8e9ec;
    --bg-panel: #f3f4f6;
    --bg-surface: #ffffff;
    --bg-inset: #eaebee;
    --text-hi: #1a1c20;
    --text-mid: #4a4d55;
    --text-lo: #7a7e88;
    --brd: #c5c8ce;
    --brd-hi: #b0b3bb;
    --brd-accent: #a0a3ab;
}

*, *::before, *::after { box-sizing: border-box; }

/* ---- Container ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-panel);
    border: 2px solid var(--brd);
    border-top-color: #fff;
    border-bottom-color: var(--brd-hi);
    border-radius: 3px;
    padding: 36px;
    animation: fadeIn 0.35s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

h1 {
    text-align: center;
    font-size: 2.1em;
    color: var(--text-hi);
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* ---- Main grid ---- */
.main-section {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 32px;
}

/* ============ BPM ============ */
.bpm-section {
    background: var(--bg-surface);
    border: 2px solid var(--brd);
    border-top-color: #fff;
    border-bottom-color: var(--brd-hi);
    border-radius: 3px;
    padding: 26px;
}
.bpm-display { text-align: center; margin-bottom: 16px; }
.bpm-value {
    font-size: 4em;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.bpm-label {
    font-size: 0.75em;
    color: var(--text-lo);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: 4px;
}
.bpm-controls { display: flex; flex-direction: column; gap: 12px; }
#bpm {
    width: 100%;
    padding: 9px;
    font-size: 1.1em;
    border: 2px solid var(--brd);
    border-top-color: var(--brd-hi);
    border-bottom-color: #ddd;
    border-radius: 2px;
    text-align: center;
    background: var(--bg-inset);
    color: var(--text-hi);
    font-variant-numeric: tabular-nums;
    transition: border-color 0.15s;
}
#bpm:focus { outline: none; border-color: var(--primary); }

/* ============ SLIDERS ============ */
#bpm-slider, .volume-slider, .swing-slider-input {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--brd);
    border-radius: 0;
    outline: none;
}
#bpm-slider::-webkit-slider-thumb,
.volume-slider::-webkit-slider-thumb,
.swing-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    background: linear-gradient(180deg, #f0f1f3 0%, #d0d2d6 100%);
    border: 2px solid var(--brd-hi);
    border-top-color: #ddd;
    border-bottom-color: var(--brd-accent);
    border-radius: 2px;
    cursor: pointer;
    transition: border-color 0.15s;
}
#bpm-slider::-webkit-slider-thumb:hover,
.volume-slider::-webkit-slider-thumb:hover,
.swing-slider-input::-webkit-slider-thumb:hover {
    border-color: var(--primary);
}
#bpm-slider::-moz-range-thumb,
.volume-slider::-moz-range-thumb,
.swing-slider-input::-moz-range-thumb {
    width: 18px; height: 18px;
    background: linear-gradient(180deg, #f0f1f3 0%, #d0d2d6 100%);
    border: 2px solid var(--brd-hi);
    border-radius: 2px;
    cursor: pointer;
}

/* ============ PLAY CONTROLS ============ */
.play-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

#start-stop {
    width: 110px; height: 110px;
    border-radius: 50%;
    background: linear-gradient(180deg, #f5f6f8 0%, #d8dade 50%, #c8cad0 100%);
    border: 3px solid var(--brd-hi);
    border-top-color: #ddd;
    border-bottom-color: var(--brd-accent);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.2s;
}
#start-stop::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 1px solid var(--brd);
    pointer-events: none;
}
#start-stop:hover { border-color: var(--primary); }
#start-stop:active {
    background: linear-gradient(180deg, #c8cad0 0%, #d8dade 50%, #f5f6f8 100%);
}
#start-stop.playing {
    border-color: var(--danger);
    color: var(--danger);
}

.icon-play::before { content: "▶"; font-size: 40px; }
.icon-stop::before { content: "■"; font-size: 36px; }

#tap-tempo {
    padding: 9px 26px;
    background: var(--bg-surface);
    border: 2px solid var(--brd);
    border-top-color: #ddd;
    border-bottom-color: var(--brd-hi);
    border-radius: 2px;
    color: var(--text-mid);
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: border-color 0.15s, color 0.15s;
}
#tap-tempo:hover { border-color: var(--primary); color: var(--primary); }
#tap-tempo:active { background: var(--bg-inset); }

.measure-counter {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-lo);
    min-height: 18px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

/* ============ VISUAL SECTION ============ */
.visual-section {
    background: var(--bg-surface);
    border: 2px solid var(--brd);
    border-top-color: #fff;
    border-bottom-color: var(--brd-hi);
    border-radius: 3px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* Clock */
.clock {
    width: 200px; height: 200px;
    border: 2px solid var(--brd-hi);
    border-radius: 50%;
    position: relative;
    background: var(--bg-inset);
    display: none;
}
.center-circle {
    position: absolute;
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    z-index: 10;
}
.hand {
    width: 2px; height: 50%;
    background: var(--primary);
    position: absolute;
    bottom: 50%; left: 50%;
    transform-origin: bottom;
    transform: translateX(-50%) rotate(0deg);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.hour-number {
    position: absolute;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-lo);
}
.time-marker {
    width: 2px; height: 8px;
    background: var(--brd);
    position: absolute;
    left: 50%;
    transform-origin: bottom;
}

/* Indicators */
.indicators-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 400px;
}
.indicator {
    width: 14px; height: 14px;
    background: var(--brd);
    border: 1px solid var(--brd-hi);
    border-radius: 50%;
    opacity: 0.4;
    transition: all 0.12s;
}
.indicator.strong-beat {
    background: var(--danger);
    border-color: var(--danger);
    opacity: 0.5;
}
.indicator.active {
    opacity: 1;
    transform: scale(1.35);
    background: var(--primary);
    border-color: var(--primary);
}
.indicator-wrapper {
    position: relative;
    min-height: 85px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.beat-number {
    font-size: 3em;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    transition: all 0.1s;
}
.beat-number.weak-beat { color: var(--text-lo); }
.beat-number.muted-beat { opacity: 0.15; }
#indicators-container .indicator.muted { opacity: 0.1; }

/* ============ CONTROLS GRID ============ */
.controls-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 28px;
}
.controls-section > .control-group-wide {
    width: 100%;
}

/* ---- Sound row: Subdiv left + 2x2 right ---- */
.ctrl-row-sounds {
    display: flex;
    gap: 14px;
    align-items: stretch;
}
.ctrl-col-subdiv {
    flex: 0 0 260px;
    max-width: 260px;
    display: flex;
}
.ctrl-col-subdiv > .control-group {
    flex: 1;
    margin: 0;
}
.ctrl-grid-right {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.ctrl-grid-right > .control-group { margin: 0; }

/* ---- Pair row (Timer + Speed Trainer) ---- */
.ctrl-row-pair {
    display: flex;
    gap: 14px;
}
.ctrl-row-pair > .control-group {
    flex: 1;
    margin: 0;
}

/* ---- Cards ---- */
.control-group {
    background: var(--bg-surface);
    border: 2px solid var(--brd);
    border-top-color: #fff;
    border-bottom-color: var(--brd-hi);
    border-radius: 3px;
    padding: 16px 18px;
    transition: border-color 0.2s;
}
.control-group:hover { border-color: var(--brd-hi); }

.control-group h3 {
    margin-bottom: 10px;
    color: var(--text-mid);
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    border-bottom: 1px solid var(--bg-inset);
    padding-bottom: 8px;
}

.control-group-wide {
    flex-basis: 100% !important;
    min-width: 100% !important;
}

/* ---- Selects ---- */
.selectm {
    width: 100%;
    padding: 8px 34px 8px 10px;
    font-size: 0.92em;
    border: 2px solid var(--brd);
    border-top-color: var(--brd-hi);
    border-bottom-color: #ddd;
    border-radius: 2px;
    background: var(--bg-inset);
    color: var(--text-hi);
    cursor: pointer;
    transition: border-color 0.15s;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a7e88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
}
.selectm:focus { outline: none; border-color: var(--primary); }
.selectm:hover { border-color: var(--brd-hi); }

/* ---- Preset bar ---- */
.preset-bar {
    margin-top: 10px;
    padding: 7px 12px;
    background: var(--bg-inset);
    border: 1px solid var(--brd);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.preset-toggle-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-lo);
    font-weight: 500;
}
.preset-toggle-label input[type="checkbox"] {
    width: 13px; height: 13px;
    accent-color: var(--primary);
    cursor: pointer;
}
.preset-info {
    font-size: 11px;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.preset-info strong { color: var(--primary); font-weight: 600; }
.preset-bpm-hint {
    background: var(--bg-panel);
    padding: 1px 6px;
    border-radius: 2px;
    font-size: 10px;
    color: var(--text-lo);
    border: 1px solid var(--brd);
}
.preset-swing-hint {
    background: var(--primary-dim);
    padding: 1px 6px;
    border-radius: 2px;
    font-size: 10px;
    color: var(--primary);
    border: 1px solid rgba(194,132,0,0.15);
}

/* ---- Volumes ---- */
.volume-controls { display: flex; flex-direction: column; gap: 9px; }
.volume-row { display: flex; align-items: center; gap: 10px; }
.volume-row label {
    min-width: 85px;
    font-size: 11px;
    color: var(--text-lo);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Inline volume slider (inside control-group) */
.inline-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--bg-inset);
}
.inline-volume label {
    font-size: 10px;
    color: var(--text-lo);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 48px;
    flex-shrink: 0;
}
.inline-volume .volume-slider {
    flex: 1;
}

/* ---- Swing ---- */
.swing-control { display: flex; align-items: center; gap: 12px; }
.swing-slider-input {
    background: linear-gradient(to right, var(--brd), var(--primary)) !important;
}
.swing-display {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    min-width: 34px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.swing-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-lo);
    margin-top: 3px;
}

/* ---- Toggles ---- */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: inherit;
    font-size: inherit;
    margin: 0;
}
.toggle-label input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

/* ---- Sub-panels ---- */
.sub-panel {
    margin-top: 10px;
    padding: 11px;
    background: var(--bg-inset);
    border: 1px solid var(--brd);
    border-radius: 2px;
}
.sub-panel-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}
.sub-panel-row:last-child { margin-bottom: 0; }
.sub-panel-row label {
    min-width: 78px;
    font-size: 11px;
    color: var(--text-lo);
}
.sub-panel-row span { font-size: 11px; color: var(--text-lo); }

.small-input {
    width: 62px;
    padding: 5px 6px;
    border: 2px solid var(--brd);
    border-top-color: var(--brd-hi);
    border-bottom-color: #ddd;
    border-radius: 2px;
    font-size: 13px;
    text-align: center;
    background: var(--bg-surface);
    color: var(--text-hi);
    font-variant-numeric: tabular-nums;
    transition: border-color 0.15s;
}
.small-input:focus { outline: none; border-color: var(--primary); }

/* ---- Session timer ---- */
.session-timer-display {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 8px;
    min-height: 28px;
    font-variant-numeric: tabular-nums;
}

/* ---- Keyboard shortcuts ---- */
.shortcuts-list { display: flex; flex-wrap: wrap; gap: 14px; }
.shortcuts-list span {
    font-size: 11px;
    color: var(--text-lo);
    display: flex;
    align-items: center;
    gap: 5px;
}
kbd {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    font-family: inherit;
    color: var(--text-mid);
    background: var(--bg-inset);
    border: 1px solid var(--brd-hi);
    border-bottom-width: 2px;
    border-radius: 2px;
}
.shortcut-hint { font-size: 10px; opacity: 0.35; margin-left: 2px; }

audio { display: none; }

/* ============ STEP SEQUENCER ============ */
.seq-enable-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-mid);
}
.seq-enable-label input[type="checkbox"] {
    cursor: pointer;
}
.seq-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.seq-top-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.seq-ctrl-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.seq-ctrl-group label {
    font-size: 10px;
    color: var(--text-lo);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.seq-select {
    padding: 4px 6px;
    font-size: 12px;
    border: 1px solid var(--brd);
    border-radius: 2px;
    background: var(--bg-inset);
    color: var(--text-hi);
    cursor: pointer;
}
.seq-select:focus { outline: none; border-color: var(--primary); }

/* Preset bar */
.seq-preset-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.seq-preset-select {
    flex: 1;
    min-width: 140px;
}
.seq-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--brd);
    border-radius: 2px;
    background: var(--bg-surface);
    color: var(--text-mid);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: border-color 0.15s, color 0.15s;
}
.seq-btn:hover { border-color: var(--primary); color: var(--primary); }
.seq-btn-clear { color: var(--danger); }
.seq-btn-clear:hover { border-color: var(--danger); }

/* Grid */
.seq-grid-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.seq-grid {
    display: grid;
    gap: 2px;
    min-width: max-content;
}
.seq-cell {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    user-select: none;
}
.seq-label {
    min-width: 64px;
    max-width: 72px;
    padding: 0 6px;
    color: var(--text-lo);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    justify-content: flex-end;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.seq-header {
    min-height: 18px;
    color: var(--text-lo);
    font-size: 9px;
    font-weight: 700;
}
.seq-header-label { min-height: 18px; }

/* Pads */
.seq-pad {
    min-width: 24px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.08s, box-shadow 0.08s;
    border: 1px solid transparent;
}
.seq-pad.seq-off {
    background: var(--bg-inset);
    border-color: var(--brd);
}
.seq-pad.seq-on {
    background: var(--primary);
    border-color: var(--primary-light);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}
.seq-pad.seq-accent {
    background: var(--danger);
    border-color: #d44;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}
.seq-pad:hover {
    filter: brightness(1.15);
}

/* Beat group separator */
.seq-pad.seq-beat-start,
.seq-header.seq-beat-start {
    margin-left: 3px;
}

/* Playback highlight column */
.seq-step-active {
    outline: 2px solid #fff;
    outline-offset: -1px;
    z-index: 2;
    position: relative;
}
.seq-step-active.seq-header {
    outline: none;
    color: var(--primary);
}

/* Accessory sound bar */
.seq-acc-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--bg-inset);
}
.seq-acc-bar label {
    font-size: 10px;
    color: var(--text-lo);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.seq-acc-select { flex: 1; }

/* ---- Sequencer Transport Bar ---- */
.seq-transport-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0 4px;
    margin-top: 4px;
    border-top: 1px solid var(--bg-inset);
}
.seq-transport-play {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}
.seq-transport-play:hover {
    background: var(--primary);
    color: #fff;
}
.seq-transport-active {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}
.seq-transport-active:hover {
    background: #a22;
    border-color: #a22;
}
.seq-transport-bpm {
    display: flex;
    align-items: center;
    gap: 5px;
}
.seq-transport-bpm label {
    font-size: 10px;
    color: var(--text-lo);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.seq-bpm-input {
    width: 58px;
    padding: 4px 6px;
    border: 1px solid var(--brd);
    border-radius: 4px;
    background: var(--bg-inset);
    color: var(--text-hi);
    font-size: 13px;
    text-align: center;
}
.seq-bpm-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============ SUBDIVISION GRID ============ */
.subdiv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 2px 0;
}
.subdiv-btn {
    aspect-ratio: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    background: var(--bg-inset);
    border: 2px solid var(--brd);
    border-top-color: var(--brd-hi);
    border-bottom-color: #ddd;
    border-radius: 3px;
    cursor: pointer;
    color: var(--text-mid);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.subdiv-btn svg {
    width: 100%;
    height: 100%;
    display: block;
}
.subdiv-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: var(--primary-dim);
}
.subdiv-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(194, 132, 0, 0.1);
    box-shadow: inset 0 0 0 1px var(--primary-light);
}

/* ---- Entrance ---- */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.control-group { animation: slideIn 0.3s ease-out forwards; opacity: 0; }
.control-group:nth-child(1)  { animation-delay: 0.04s; }
.control-group:nth-child(2)  { animation-delay: 0.08s; }
.control-group:nth-child(3)  { animation-delay: 0.12s; }
.control-group:nth-child(4)  { animation-delay: 0.16s; }
.control-group:nth-child(5)  { animation-delay: 0.20s; }
.control-group:nth-child(6)  { animation-delay: 0.24s; }
.control-group:nth-child(7)  { animation-delay: 0.28s; }
.control-group:nth-child(8)  { animation-delay: 0.32s; }
.control-group:nth-child(9)  { animation-delay: 0.36s; }
.control-group:nth-child(10) { animation-delay: 0.40s; }
.control-group:nth-child(11) { animation-delay: 0.44s; }

/* ============ RESPONSIVE ============ */
@media (max-width: 968px) {
    .main-section { grid-template-columns: 1fr; gap: 20px; }
    h1 { font-size: 1.7em; }
    .bpm-value { font-size: 3em; }
    .ctrl-row-sounds { flex-direction: column; }
    .ctrl-col-subdiv { flex: 1 1 100%; max-width: 100%; }
}
@media (max-width: 600px) {
    .volume-row label { min-width: 68px; }
    .sub-panel-row label { min-width: 62px; }
    .ctrl-grid-right { grid-template-columns: 1fr; }
    .ctrl-row-pair { flex-direction: column; }
    .seq-label { min-width: 44px; max-width: 52px; font-size: 8px; }
    .seq-pad { min-width: 18px; min-height: 24px; }
    .seq-top-bar { gap: 6px; }
    .seq-preset-bar { gap: 4px; }
}
@media (max-width: 480px) {
    .container { padding: 14px; }
    h1 { font-size: 1.4em; }
    #start-stop { width: 88px; height: 88px; }
    .bpm-value { font-size: 2.5em; }
    .subdiv-grid { gap: 4px; }
    .subdiv-btn { padding: 3px; }
}