*{box-sizing:border-box}
[hidden]{display:none!important}
:root{color-scheme:light;font-family:system-ui,sans-serif;color:#263b39;background:#f2e9d6}
body{margin:0}
button,a{-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;cursor:pointer}
.game{width:min(100%,460px);margin:auto;padding:max(4px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
.toolbar,.sound,.stats,.controls{display:flex;align-items:center;gap:6px}
.toolbar{justify-content:space-between}
.toolbar a{display:inline-flex;align-items:center;min-height:44px;color:inherit;font-size:.82rem;font-weight:750;text-decoration:none;white-space:nowrap}
.sound button{min-height:44px;border:0;border-radius:11px;background:#e5d7bb;padding:0 7px;font-size:.74rem;font-weight:800;white-space:nowrap}
.sound button[aria-pressed=true]{background:#fbf5e8}
h1{margin:4px 0 8px;font-size:clamp(25px,7.7vw,36px);letter-spacing:-.06em;line-height:1.02;color:#264540;font-weight:950}
.stats{justify-content:space-between;background:#fff8e9;min-height:55px;padding:6px 9px;border:1px solid #d6c7aa;border-radius:13px;margin-bottom:7px;font-variant-numeric:tabular-nums}
.stats>div{min-width:68px}
.stats strong{display:block;font-size:1.18rem;line-height:1.15;white-space:nowrap}
.stats span,.stats label{font-size:.7rem;font-weight:800;display:block}
.stats strong span{display:inline}
.stats div:last-child{text-align:right}
.strain{flex:1;max-width:48%}
meter{width:100%;height:13px}
meter::-webkit-meter-bar{background:#e8dfcf;border:0;border-radius:12px}
meter::-webkit-meter-optimum-value{background:#4b8174}
meter::-webkit-meter-suboptimum-value{background:#cc7836}
meter::-webkit-meter-even-less-good-value{background:#a8372a}
.stage{position:relative;overflow:hidden;border-radius:16px;border:1px solid #6b6149;box-shadow:0 5px 13px #65462929;height:clamp(218px,calc(100svh - 287px),435px);background:#274e46}
canvas{display:block;width:100%;height:100%}
.cue{position:absolute;top:10px;left:10px;max-width:calc(100% - 70px);padding:7px 11px;background:#fbefce;color:#293e34;border-radius:9px;font-weight:850;font-size:.82rem}
.cue[data-danger=true]{color:#fff5e4;background:#93352a}
#pause{position:absolute;right:8px;top:8px;border:0;border-radius:12px;min-width:44px;min-height:44px;background:#fff4d8;font-weight:900}
.controls{margin-top:7px;flex-wrap:wrap;justify-content:center;min-height:58px}
#intro{font-size:.81rem;text-align:center;margin:0;width:100%;font-weight:750}
#action,#pad{min-height:49px;border:1px solid #182d2c;border-radius:12px;background:#294b43;color:#fff6df;flex:1 1 100%;font-weight:850}
#action:focus-visible,#pad:focus-visible,button:focus-visible,a:focus-visible{outline:3px solid #b9522c;outline-offset:2px}
#pad{min-height:59px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
#pad[data-held=true]{background:#ffcc60;color:#292618}
#pad:disabled{opacity:1;cursor:default}
#result{display:flex;flex:1 1 100%;justify-content:center;align-items:baseline;gap:10px;min-height:26px}
#outcome{font-size:1.3rem}
#detail{font-weight:750;font-size:.82rem}
@media(max-height:650px){h1 br{display:none}h1{font-size:clamp(24px,6.3vw,31px)}.stage{height:clamp(215px,calc(100svh - 265px),410px)}}


