:root{--bm-bg:#10121a;--bm-panel:#191d28;--bm-text:#f3f4fa;--bm-muted:#b0b7c9;--bm-line:#353d51;--bm-red:#ff626c}
html{scroll-behavior:smooth}body{font-size:16px}button,input,select{font:inherit}button,a,input,select,summary{touch-action:manipulation}button:focus-visible,a:focus-visible,[tabindex]:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #5ae0e6;outline-offset:4px}button{cursor:pointer}
.bm-nav{position:relative;z-index:110;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:10px 16px;background:#10121af0;border-bottom:1px solid var(--bm-line);font:600 14px/1.4 system-ui,sans-serif;letter-spacing:0}
.bm-nav a,.bm-nav button{color:#e5e9f5;padding:8px 12px;background:transparent;border:0;border-radius:6px;text-decoration:none}.bm-nav a:hover,.bm-nav button:hover{background:#30364a}.bm-nav button{border:1px solid var(--bm-line)}
body:has(.hud.on)>.bm-nav,body:has(#session.on)>.bm-nav,body:has(.qs-btn.on):not(:has(.ss-title))>.bm-nav{display:none}
.bm-paused #arena *,.bm-paused .hud *,.bm-paused .session *{animation-play-state:paused!important}.bm-paused #arena{pointer-events:none}
.bm-session-notice{font:400 14px/1.5 system-ui,sans-serif!important;letter-spacing:0;color:#c0c8dc;max-width:640px;text-align:center;padding:16px;margin:16px auto 0}.bm-session-notice button{display:block;margin:10px auto 0;border:0;background:none;color:#e3e8f4;text-decoration:underline;font-size:14px}
.bm-result{margin-top:24px;padding:20px 0 8px;border-top:1px solid var(--bm-line);font:400 15px/1.6 system-ui,sans-serif;letter-spacing:0;text-align:left;color:var(--bm-text)}.bm-result p{margin:8px 0}.bm-status{font-weight:700;color:#ffcc85}.bm-status[data-eligible=true]{color:#6ee7b7}.bm-muted{color:var(--bm-muted);font-size:14px;line-height:1.6}.bm-secondary{color:#dfe9fc}.bm-link{color:#92d9ff;background:none;border:0;padding:8px 0;font:600 15px/1.4 system-ui;text-decoration:underline;display:inline-block}
.bm-result-puzzle{margin:18px 0 0;padding:14px 16px 10px;border:1px solid var(--bm-line);border-left:3px solid #a855f7;background:linear-gradient(115deg,rgba(168,85,247,.08),rgba(25,29,40,.72) 58%);border-radius:3px}.bm-result-puzzle .bm-status{margin:0 0 7px;color:#c8a2ff;font:700 10px/1.5 system-ui,sans-serif;letter-spacing:.04em}.bm-result-puzzle .bm-status[data-eligible=true]{color:#8ee7c3}.bm-result-puzzle .sp-result-note{margin:0;color:#e5e7ef;font-size:14px;line-height:1.55}.bm-result-puzzle .bm-config{padding:8px 0 2px}.bm-result-puzzle .bm-link{margin-top:2px}
.bm-config{padding:12px 0;font:400 14px/1.6 system-ui}.bm-config summary{cursor:pointer;color:#dfe9fc}.bm-config dl{display:grid;grid-template-columns:1fr 1fr;gap:6px 16px;margin:12px 0}.bm-config dt{color:var(--bm-muted)}.bm-config dd{margin:0;overflow-wrap:anywhere}
.bm-routine-banner{padding:18px;background:#242b3d;border:1px solid #656f92;border-radius:10px;display:grid;gap:10px;font:400 15px/1.5 system-ui;color:white;text-align:left;margin:0 0 20px}.bm-routine-result{margin-top:20px;padding-top:12px;border-top:1px solid #576079}
.bm-page{background:var(--bm-bg);color:var(--bm-text);margin:0;font:400 16px/1.65 system-ui,sans-serif;overflow:auto}.bm-page main{max-width:1060px;margin:0 auto;padding:58px 28px 100px}.bm-page h1{font-size:clamp(30px,5vw,50px);line-height:1.12;letter-spacing:-1.5px;margin:0 0 18px}.bm-page h2{font-size:22px;margin:36px 0 12px;line-height:1.3}.bm-lead{font-size:19px;max-width:760px;color:#c8d0e0;margin:0 0 30px}.bm-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--bm-line);border:1px solid var(--bm-line);border-radius:12px;overflow:hidden;margin:30px 0}.bm-stats>div{display:grid;gap:5px;padding:24px;background:var(--bm-panel)}.bm-stats strong{font-size:34px;line-height:1.2}.bm-stats span{font-size:14px;color:var(--bm-muted)}.bm-filters{display:flex;gap:18px;flex-wrap:wrap;margin:32px 0}.bm-filters label{display:grid;gap:8px;flex:1;min-width:230px;font-size:14px;color:var(--bm-muted)}.bm-filters select{width:100%;max-width:100%;padding:12px;background:var(--bm-panel);border:1px solid var(--bm-line);border-radius:6px;color:var(--bm-text);font-size:15px}.bm-best{font-size:24px;color:#8be3bb;font-weight:650}.bm-empty{padding:26px;background:var(--bm-panel);border-radius:10px}.bm-table-wrap{overflow-x:auto;margin-top:24px}.bm-page table{border-collapse:collapse;width:100%;font-size:14px;text-align:left}.bm-page th{color:var(--bm-muted);font-weight:500}.bm-page th,.bm-page td{padding:14px 12px;border-bottom:1px solid var(--bm-line);min-width:110px}.bm-page tr:target{background:#2c3e46}.bm-trend{padding:18px;background:#1b3032;border-left:3px solid #6edac4}.bm-legacy{margin:40px 0;padding:20px;background:var(--bm-panel);border-radius:10px}.bm-legacy summary{cursor:pointer}.bm-legacy pre{font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.bm-actions{display:flex;gap:12px;flex-wrap:wrap}.bm-primary,.bm-button{display:inline-block;border:1px solid var(--bm-line);border-radius:6px;padding:13px 20px;font:600 15px/1.4 system-ui;text-decoration:none;color:white;background:#2b3145;cursor:pointer}.bm-primary{background:#cf3349;border-color:#fa6c78;color:white}.bm-primary:hover{background:#e23d54}.bm-button:hover{background:#3a4258}.bm-feedback{display:grid;justify-items:start;gap:12px}.bm-error{color:#ff929b}.bm-routine-list{list-style:none;counter-reset:blocks;padding:0;margin:38px 0}.bm-routine-list li{counter-increment:blocks;display:grid;grid-template-columns:46px 1fr;gap:4px 20px;padding:22px 0;border-bottom:1px solid var(--bm-line)}.bm-routine-list li::before{content:counter(blocks,decimal-leading-zero);grid-row:span 3;color:#ff7b88;font:500 26px/1.4 monospace}.bm-routine-list strong{font-size:21px}.bm-routine-list span{color:var(--bm-muted)}.bm-routine-list a{grid-column:2}
.bm-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}
/* Retain the original visual identity while making supporting text readable. */
.hint,.setup-hint,.res-details,.res-compare,.setup-sub,.ss-sub,.concept-txt{font-size:14px!important;line-height:1.6!important}.pb,.hl,.tune-label,.res-metric-label,.res-evo-title,.qs-sub,.qs-hint,.qs-tile-code,.es-l,.cue-label{font-size:12px!important;line-height:1.5!important}.pb,.qs-action,.cue-btn,.sess-btn,.rb-s,.rb-p{font-size:14px!important;min-height:40px}.rcard{max-height:90dvh;overflow-y:auto}.setup{max-height:calc(100dvh - 64px);overflow-y:auto}.qs-panel{max-height:90dvh;overflow-y:auto;overflow-x:hidden;padding:4px}.qs-tile-name{font-size:13px!important}.end-screen.on{overflow-y:auto;justify-content:flex-start;padding-top:40px}.end-screen .bm-result{max-width:640px;margin:22px auto}
@media(max-width:650px){.bm-page main{padding:34px 18px 70px}.bm-stats{grid-template-columns:1fr}.bm-stats>div{padding:18px}.bm-stats strong{font-size:28px}.bm-nav{justify-content:flex-start}.bm-nav a{padding:8px}.bm-config dl{grid-template-columns:1fr}.bm-config dd{margin-bottom:6px}.bm-result{padding:16px 8px}.bm-routine-list li{gap:4px 10px}.qs-grid{grid-template-columns:repeat(2,1fr)!important}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.bm-nav *,.bm-page *{animation:none!important;transition:none!important}}

.tune-panel:not(.open){visibility:hidden}.tune-panel.open{visibility:visible}.qs-overlay:not(.on),.stats-modal:not(.on){visibility:hidden}[hidden]{display:none!important}

.bm-chart{display:block;width:100%;height:auto;max-height:190px;background:#171f2c;border-radius:8px;margin:12px 0}
.bm-record-context{display:block;font:400 12px/1.5 system-ui;color:#b0b7c9;margin-top:5px}.best-chip-label{font-size:12px!important}

.hud:not(.on),#binfo:not(.on),#status:not(.on),#stwrap:not(.on),#eff-wrap:not(.on),#sismo-wrap:not(.on){visibility:hidden}
.mcard:not(.active) .player{visibility:hidden}#modal:not(.on){visibility:hidden}
.set-overlay:not(.on){visibility:hidden}.set-overlay.on{visibility:visible}.ss-sub,.pc-desc,.pc-name,.mc-sub,.sc-tags{font-size:13px!important;line-height:1.5!important}
.bpm-display:not(.on),.combo-wrap:not(.on),.keys-row:not(.on){visibility:hidden}body:not(:has(.hud.on)) .cmd-wrap{visibility:hidden}
