:root { color-scheme: dark; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #f3f2e9; background: #14231f; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: grid; place-items: center; padding: 40px 22px; background: radial-gradient(ellipse at 50% 20%, #243b31 0, #14231f 65%); }
button, input, select { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #e0edac; outline-offset: 6px; }
.metronome { width: min(100%, 440px); text-align: center; }
.eyebrow { color: #b9ca9c; font-size: 10px; font-weight: 650; letter-spacing: 2.5px; }
h1 { font-family: Georgia, serif; font-weight: 400; font-size: clamp(34px, 8vw, 44px); letter-spacing: -1.5px; margin: 15px 0 10px; }
header p { color: #a8b7ae; font-size: 14px; margin: 0; }
.controls { margin: 34px 0 24px; padding: 30px 26px 20px; border: 1px solid #425247; border-radius: 24px; background: #1c2d26; box-shadow: 0 20px 60px #08171040; }
.beat { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #4b604e; border-radius: 50%; margin: 0 auto 26px; }
.beat span { width: 12px; height: 12px; background: #70846b; border-radius: 50%; }
.beat.pulse { background: #d4e99c20; border-color: #d4e99c; }
.beat.pulse span { background: #d4e99c; box-shadow: 0 0 18px #d4e99c70; }
.tempo-label, .bpm { display: block; color: #a8b7ae; font-size: 10px; letter-spacing: 2px; }
.tempo-control { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 2px; }
.step { flex-shrink: 0; width: 46px; height: 46px; background: transparent; color: #dae4d4; border: 1px solid #52624f; border-radius: 50%; font-size: 26px; }
.step:hover { background: #344535; }
.step:disabled { opacity: .35; cursor: default; }
#tempo { width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #f3f2e9; text-align: center; font-size: clamp(64px, 17vw, 84px); line-height: 1.2; font-weight: 350; letter-spacing: -4px; font-variant-numeric: tabular-nums; appearance: textfield; -moz-appearance: textfield; }
#tempo::-webkit-inner-spin-button, #tempo::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#tempo-slider { width: 100%; height: 36px; margin: 28px 0 0; accent-color: #d4e99c; cursor: pointer; }
.range-labels { display: flex; justify-content: space-between; color: #a8b7ae; font-size: 10px; letter-spacing: 1px; }
.meter { border: 1px solid #425247; border-radius: 12px; padding: 12px; margin: 18px 0 0; text-align: left; min-width: 0; }
.meter legend { color: #b9ca9c; font-size: 10px; letter-spacing: 2px; text-align: left; }
.meter legend { padding-right: 12px; }
.signature-controls { display: flex; align-items: end; gap: 12px; }
.signature-controls label { flex: 1; min-width: 0; color: #a8b7ae; font-size: 11px; }
.signature-controls input, .signature-controls select { display: block; width: 100%; min-height: 44px; margin-top: 8px; border: 1px solid #52624f; border-radius: 8px; padding: 8px; color: #f3f2e9; background: #14231f; font-size: 14px; }
.signature-slash { font-size: 26px; line-height: 44px; color: #a8b7ae; }
.meter-help { color: #a8b7ae; font-size: 11px; line-height: 1.6; margin: 10px 0 0; text-align: left; }
.beat-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 24px; }
.beat-pattern { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 10px; }
.meter-settings { display: grid; place-items: center; flex: 0 0 44px; min-height: 52px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #a8b7ae; }
.meter-settings:hover, .meter-settings[aria-expanded="true"] { background: #344535; color: #d4e99c; }
.pattern-beat { min-height: 52px; border: 1px solid #52624f; border-radius: 10px; background: #14231f; color: #b6c3b7; font-variant-numeric: tabular-nums; }
.pattern-beat span { display: block; font-size: 10px; height: 12px; line-height: 12px; }
.pattern-beat[aria-pressed="true"] { background: #d4e99c; color: #1b2c21; border-color: #d4e99c; font-weight: 700; }
.pattern-beat.current { outline: 2px solid #f3f2e9; outline-offset: 3px; }
.toggle { width: 100%; min-height: 60px; margin-top: 30px; border: 0; border-radius: 14px; background: #d4e99c; color: #1b2c21; font-weight: 650; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.toggle:hover { background: #e0efb6; }
.toggle[aria-pressed="true"] { background: #334833; color: #e0efb6; box-shadow: inset 0 0 0 1px #688054; }
.status { min-height: 18px; margin: 17px 0 0; color: #a8b7ae; font-size: 12px; }
footer { color: #a8b7ae; font-size: 11px; line-height: 1.8; }
footer span { display: block; color: #889c8e; }
@media (max-height: 720px) { body { padding-top: 24px; padding-bottom: 24px; } .controls { margin-top: 24px; padding-top: 22px; } .beat { margin-bottom: 18px; } }
