@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=DM+Mono:wght@400;500&family=Inter:wght@400;500;600;700&family=Montserrat:wght@600;700;800&display=swap');

:root{color-scheme:dark;--bg:#0b0d10;--panel:#15191e;--panel-light:#1b2027;--line:#333a43;--text:#f4f1eb;--muted:#a9b1bc;--red:#c43b30;--amber:#e7ac00;font-family:Inter,Arial,sans-serif}
*{box-sizing:border-box}
html{min-height:100%}
body{margin:0;min-height:100vh;background:var(--bg);color:var(--text)}
button,input,select{font:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--amber);outline-offset:4px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.app-shell{width:min(100%,760px);min-height:100vh;margin:0 auto;padding:0 32px;display:flex;flex-direction:column}
.topline{display:flex;gap:5px;align-items:center;height:4px}.topline span{height:4px;background:var(--red)}.topline span:nth-child(1){width:48px}.topline span:nth-child(2){width:14px;opacity:.65}.topline span:nth-child(3){width:7px;opacity:.35}
.header{margin-top:20px; text-align:center;padding:50px 0 20px}.section-label,.status,.meter-row label,.tempo-range,.footer{font-family:'DM Mono',monospace;letter-spacing:.16em;font-size:10px;font-weight:500}h1{font-family:'Barlow Condensed',Impact,sans-serif;font-size:clamp(43px,11vw,78px);font-weight:800;line-height:.95;letter-spacing:.045em;margin:15px 0 11px}.title-dot{color:var(--red)}.header p{margin:0;color:var(--muted);font-size:13px;letter-spacing:.015em}
.metronome{margin-top:20px; border:1px solid var(--line);background:var(--panel);box-shadow:0 24px 75px #0007,0 0 0 7px #ffffff05;position:relative}.metronome:before,.metronome:after{content:'';position:absolute;width:6px;height:6px;border-radius:50%;background:#515963;box-shadow:inset 0 1px 2px #000;top:15px}.metronome:before{left:15px}.metronome:after{right:15px}
.tempo-panel{padding:30px 43px 29px;text-align:center;border-bottom:1px solid var(--line)}.section-label{color:var(--muted)}.tempo-readout{display:flex;flex-direction:column;align-items:center;margin:5px 0 14px}.tempo-value{width:290px;max-width:100%;border:0;background:transparent;color:var(--text);text-align:center;font-family:'Barlow Condensed',Impact,sans-serif;font-size:clamp(100px,22vw,156px);font-weight:700;letter-spacing:-.045em;line-height:1.05;padding:0 0 0 12px;appearance:textfield}.tempo-value::-webkit-inner-spin-button,.tempo-value::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.tempo-unit{color:var(--amber);font-family:'DM Mono',monospace;font-size:15px;font-weight:500;letter-spacing:.48em;margin-top:-5px;padding-left:.48em}.tempo-adjust{width:min(100%,340px);display:flex;align-items:center;gap:20px;margin:23px auto 0}.adjust-button{width:46px;height:46px;flex:none;background:var(--panel-light);border:1px solid #49515c;color:var(--text);font-size:29px;line-height:1;border-radius:3px;transition:background .15s,border-color .15s}.adjust-button:hover{background:#303843;border-color:var(--amber)}.adjust-track{flex:1;display:flex;justify-content:space-between;gap:5px}.adjust-track span{display:block;width:2px;height:15px;background:#5a616a}.adjust-track span:nth-child(5){height:25px;background:var(--red);margin-top:-5px}.tempo-range{width:min(100%,340px);display:flex;justify-content:space-between;margin:12px auto 0;color:#737d89;font-size:9px}
.beat-panel{padding:26px 43px 25px;border-bottom:1px solid var(--line)}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.status{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:9px;letter-spacing:.1em;white-space:nowrap}.status-dot{width:6px;height:6px;border-radius:50%;background:#66707b}.status.is-playing{color:var(--amber)}.status.is-playing .status-dot{background:var(--amber);box-shadow:0 0 10px var(--amber)}.status.is-paused{color:var(--red)}.status.is-paused .status-dot{background:var(--red)}.beats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin:24px 0 20px}.beat{min-width:0}.beat-box{height:84px;display:flex;align-items:center;justify-content:center;border:1px solid #4a525c;border-radius:3px;background:#252b33;box-shadow:inset 0 1px 0 #ffffff10;transition:background .08s,border-color .08s,box-shadow .08s,transform .08s}.beat-box:after{content:'';transition:inherit}.beat.is-active .beat-box{background:var(--amber);border-color:#ffd18a;box-shadow:0 0 28px #ffb54755, inset 0 0 24px #fff3;transform:translateY(-2px)}.beat.is-active.is-first .beat-box{background:var(--red);border-color:#ff8a85;box-shadow:0 0 28px #f04e4e65,inset 0 0 24px #fff3}.beat-number{color:#84909d;font-family:'DM Mono',monospace;font-size:11px;margin-top:9px;text-align:center}.beat.is-active .beat-number{color:var(--text)}.meter-row{display:flex;justify-content:center;align-items:center;gap:17px}.meter-row label{color:var(--muted)}.select-wrap{position:relative}.select-wrap select{appearance:none;background:var(--panel-light);border:1px solid #46505a;border-radius:3px;color:var(--text);font-family:'DM Mono',monospace;font-size:15px;padding:9px 32px 9px 14px;min-width:88px}
.controls{padding:25px 43px 26px}.play-button,.secondary-button{display:flex;align-items:center;justify-content:center;border-radius:3px;font-family:'Barlow Condensed',Impact,sans-serif;font-size:21px;font-weight:700;letter-spacing:.08em;transition:transform .15s,background .15s,border-color .15s}.play-button:active,.secondary-button:active,.adjust-button:active{transform:translateY(1px)}.play-button{width:100%;height:65px;gap:13px;background:var(--red);border:1px solid #ff7773;color:#180d0d;box-shadow:0 6px 24px #f04e4e2b}.play-button:hover{background:#ff6864}.play-icon{width:0;height:0;border-top:9px solid transparent;border-bottom:9px solid transparent;border-left:14px solid currentColor}.play-button.is-playing .play-icon{width:14px;height:18px;border:0;border-left:5px solid currentColor;border-right:5px solid currentColor}.secondary-controls{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-top:12px}.secondary-button{height:53px;gap:11px;border:1px solid #4b535e;background:var(--panel-light);color:var(--text);font-size:18px}.secondary-button:hover{background:#2b323b;border-color:var(--amber)}.stop-icon{width:12px;height:12px;background:currentColor}.tap-button{color:var(--amber)}.tap-mark{font-family:Inter,sans-serif;font-size:17px;font-weight:400}.hint{text-align:center;color:#87919e;font-size:11px;margin:20px 0 0}.hint kbd{font:inherit;color:var(--amber)}
.footer{display:flex;justify-content:space-between;color:#717a86;font-size:9px;padding:27px 0 30px;margin-top:auto}
@media(max-width:600px){.app-shell{padding:0 17px}.header{padding:36px 0 29px}.header p{font-size:12px}.tempo-panel{padding:27px 23px 25px}.beat-panel{padding:23px 20px 22px}.controls{padding:21px 20px 22px}.beats{gap:8px}.beat-box{height:63px}.status{font-size:8px}.footer{font-size:8px}}
@media(max-width:390px){.status{letter-spacing:0}.beat-box{height:52px}.beats{gap:6px}.tempo-value{font-size:106px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition-duration:.01ms!important;animation-duration:.01ms!important}}

/* Compact layout: keep the complete instrument visible on ordinary screens. */
.app-shell{width:min(100%,620px);padding:0 22px}
.header{padding:25px 0 22px}

h1{font-size:clamp(48px,9vw,65px);margin:16px 0 20px}
.header p{font-size:11px}
.tempo-panel{padding:16px 28px 14px}
.tempo-readout{margin:2px 0 5px}
.tempo-value{font-size:clamp(80px,17vw,104px);line-height:.94;width:220px}
.tempo-unit{font-size:11px;margin-top:2px}
.tempo-adjust{width:min(100%,260px);gap:14px;margin:13px auto 0}
.adjust-button{width:40px;height:40px;font-size:25px}
.adjust-track span{height:12px}
.adjust-track span:nth-child(5){height:20px;margin-top:-4px}
.tempo-range{width:min(100%,260px);margin:6px auto 0;font-size:8px}
.beat-panel{padding:16px 28px 14px}
.beats{gap:10px;margin:15px 0 13px}
.beat-box{height:56px}
.beat-box:after{width:9px;height:9px}
.beat-number{font-size:10px;margin-top:6px}
.select-wrap select{font-size:13px;padding:6px 29px 6px 11px;min-width:75px}

.controls{padding:15px 28px 16px}
.play-button{height:49px;font-size:19px}
.play-icon{border-top-width:7px;border-bottom-width:7px;border-left-width:11px}
.play-button.is-playing .play-icon{width:12px;height:15px;border-left-width:4px;border-right-width:4px}
.secondary-controls{gap:10px;margin-top:9px}
.secondary-button{height:42px;font-size:16px}
.hint{margin:11px 0 0;font-size:10px}
.footer{padding:15px 0 17px}

@media(max-width:600px){
  .app-shell{padding:0 16px}
  .header{padding:23px 0 20px}
  h1{margin:12px 0 16px}
  .tempo-panel{padding:15px 20px 13px}
  .beat-panel{padding:15px 20px 13px}
  .controls{padding:14px 20px 15px}
  .beat-box{height:52px}
}
@media(max-width:390px){
  h1{font-size:48px}
  .tempo-value{font-size:84px}
  .beats{gap:6px}
  .beat-box{height:45px}
  .status{font-size:8px;letter-spacing:0}
}
@media(max-height:700px){
  .header{padding-top:15px;padding-bottom:14px}
  h1{margin:8px 0 10px}
  .tempo-panel{padding-top:12px;padding-bottom:10px}
  .tempo-value{font-size:78px}
  .tempo-adjust{margin-top:8px}
  .beat-panel{padding-top:12px;padding-bottom:10px}
  .beats{margin-top:10px;margin-bottom:9px}
  .beat-box{height:44px}
  .controls{padding-top:11px;padding-bottom:11px}
  .footer{padding-top:9px;padding-bottom:10px}
}

/* Distinct button colors make the controls easier to scan on stage. */
.adjust-button{
  background:#9eabb2;
  border-color:#bbc6cb;
  color:#171b20;
}
.adjust-button:hover{background:#b8c3c8;border-color:#d1d8db}
.secondary-button{
  background:#aeb8bd;
  border-color:#cbd2d5;
  color:#171b20;
}
.secondary-button:hover{background:#c3cccf;border-color:#d8dedf}
.tap-button{
  background:var(--amber);
  border-color:#f3c74d;
  color:#1b1505;
}
.tap-button:hover{background:#f0bb25;border-color:#f6d271}

/* Circular LED indicators replace the diamond inside each beat. */
.beat-box:after{
  width:12px;
  height:12px;
  border-radius:50%;
  transform:none;
  background:#56616d;
  border:1px solid #7c8793;
  box-shadow:inset 0 1px 3px #000a;
}
.beat.is-active .beat-box:after{
  background:#ffe58c;
  border-color:#fff0b3;
  box-shadow:0 0 9px #ffe58c,0 0 20px #e7ac0088;
}
.beat.is-active.is-first .beat-box:after{
  background:#f3b1a5;
  border-color:#f8c9c0;
  box-shadow:0 0 9px #f3b1a5,0 0 20px #c43b3088;
}
.meter-icon{
  pointer-events:none;
  position:absolute;
  top:50%;
  right:9px;
  width:15px;
  height:15px;
  color:var(--amber);
  transform:translateY(-50%);
}

/* A narrow top and wider base echo the silhouette in the reference. */
.beat-box{
  position:relative;
  width:min(58px,100%);
  height:72px;
  margin-inline:auto;
  border:0;
  border-radius:0;
  background:#59636f;
  box-shadow:none;
  clip-path:polygon(24% 0,76% 0,100% 100%,0 100%);
}
.beat-box:before{
  content:'';
  position:absolute;
  inset:2px;
  background:#252b33;
  clip-path:polygon(24% 0,76% 0,100% 100%,0 100%);
}
.beat-box:after{position:relative;z-index:1}
.beat.is-active .beat-box{
  background:#f3c74d;
  box-shadow:none;
}
.beat.is-active .beat-box:before{background:var(--amber)}
.beat.is-active.is-first .beat-box{
  background:#d26958;
  box-shadow:none;
}
.beat.is-active.is-first .beat-box:before{background:var(--red)}
.beat.is-active{filter:drop-shadow(0 0 9px #e7ac0066)}
.beat.is-active.is-first{filter:drop-shadow(0 0 9px #c43b3077)}
@media(max-width:600px){.beat-box{height:64px}}
@media(max-width:390px){.beat-box{height:56px}}
@media(max-height:700px){.beat-box{height:54px}}

/* Geometric uppercase lettering follows the supplied wordmark reference. */
h1{
  font-family:Montserrat,Arial,sans-serif;
  font-size:clamp(32px,8vw,58px);
  font-weight:800;
  letter-spacing:.015em;
}
.play-button,.secondary-button{
  font-family:Montserrat,Arial,sans-serif;
  font-weight:800;
  letter-spacing:.02em;
}
.play-button{font-size:15px}
.secondary-button{font-size:13px}
.section-label,.meter-row label{
  font-family:Montserrat,Arial,sans-serif;
  font-weight:700;
  letter-spacing:.04em;
}
.tempo-unit{letter-spacing:.08em;padding-left:.08em}
.tempo-range{letter-spacing:.03em}

/* Keep the established button palette, with a metallic light-to-dark finish. */
.play-button{
  --button-gradient:linear-gradient(180deg,#c43b30 0%,#b02f27 56%,#7e201b 100%);
  background:var(--button-gradient);
  border-color:#d26958;
  color:#fff2ef;
  box-shadow:0 6px 24px #7e201b55;
}
.adjust-button{
  --button-gradient:linear-gradient(180deg,#b9c4c9 0%,#9eabb2 56%,#75858e 100%);
  background:var(--button-gradient);
}
.secondary-button{
  --button-gradient:linear-gradient(180deg,#c4cdd1 0%,#aeb8bd 56%,#87959d 100%);
  background:var(--button-gradient);
}
.tap-button{
  --button-gradient:linear-gradient(180deg,#f4c944 0%,#e7ac00 56%,#ad7600 100%);
  background:var(--button-gradient);
}
.play-button:hover,.adjust-button:hover,.secondary-button:hover{
  background:var(--button-gradient);
  filter:brightness(1.09);
}
.play-button:active,.adjust-button:active,.secondary-button:active{filter:brightness(.94)}
