.bkfg-kf{--kf-gold:#d8b67b;--kf-red:#e44850;font:14px/1.5 system-ui,sans-serif;color:#f3eee6;background:#10151e;padding:24px;border:1px solid #384251;border-radius:10px;max-width:1200px;margin:24px auto;box-shadow:0 18px 65px #0004;box-sizing:border-box}
.bkfg-kf *{box-sizing:border-box}.bkfg-kf h2{font:850 clamp(22px,3vw,36px)/1.2 system-ui,sans-serif;margin:7px 0 0;color:#fff;letter-spacing:.025em}.bkfg-kf h2 b{color:var(--kf-red)}.bkfg-kf .kf-eyebrow{color:var(--kf-gold);font:700 10px/1.5 monospace;letter-spacing:.18em}
.bkfg-kf .kf-setup{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin:22px 0 14px}.bkfg-kf label{display:block;color:#bcc6d2;font:600 12px/1.5 system-ui,sans-serif}.bkfg-kf select{display:block;width:100%;min-width:0;height:46px;margin:7px 0 0;border:1px solid #536075;background:#1a2330;color:#fff;padding:0 12px;font:650 15px/1.4 system-ui,sans-serif;border-radius:4px;text-overflow:ellipsis}
.bkfg-kf button{height:40px;border:1px solid #f2696e;background:#b82e3b;color:#fff;font:800 12px/1 system-ui,sans-serif;padding:0 19px;border-radius:4px;cursor:pointer;white-space:nowrap;letter-spacing:.04em}.bkfg-kf button[data-role="pause"],.bkfg-kf button[data-role="switch"],.bkfg-kf button[data-role="restart"]{background:#222d3c;border-color:#5c6a7b}.bkfg-kf button:hover{filter:brightness(1.15)}.bkfg-kf button:disabled{opacity:.4;cursor:default}.bkfg-kf button:focus-visible,.bkfg-kf canvas:focus-visible,.bkfg-kf select:focus-visible,.bkfg-kf input:focus-visible{outline:3px solid var(--kf-gold);outline-offset:3px}
.bkfg-kf .kf-actions{display:flex;align-items:center;gap:12px 18px;flex-wrap:wrap;margin:14px 0 0}.bkfg-kf .kf-actions .kf-option{display:inline-flex;align-items:center;flex:0 0 auto;gap:7px;white-space:nowrap;word-break:normal;overflow-wrap:normal;line-height:20px;margin:0;cursor:pointer}.bkfg-kf .kf-option input{appearance:auto;width:16px;height:16px;flex:0 0 16px;margin:0;accent-color:var(--kf-red)}
.bkfg-kf canvas{display:block;width:100%;height:auto;aspect-ratio:16/9;background:#090c12;image-rendering:pixelated;border:1px solid #657185;border-radius:4px;box-shadow:0 0 0 5px #080d15,0 10px 28px #0005}.bkfg-kf .kf-status{min-height:21px;color:#e1bf83;margin:12px 0 14px;font:500 12px/1.5 system-ui,sans-serif}.bkfg-kf .kf-keys{display:flex;align-items:center;gap:12px 18px;flex-wrap:wrap;font:12px/1.7 system-ui,sans-serif;color:#aebccc;margin-top:19px}.bkfg-kf .kf-keys>span{white-space:nowrap}.bkfg-kf kbd{font:700 11px/1.5 monospace;color:#e8edf4;border:1px solid #566376;background:#222e3f;padding:3px 5px;border-radius:3px}.bkfg-kf .kf-foot{font:11px/1.6 system-ui,sans-serif;color:#8e9bae;margin:13px 0 0}
.bkfg-kf.kf-playing .kf-setup,.bkfg-kf.kf-playing .kf-test{display:none}.bkfg-kf.kf-playing h2{font-size:24px}.bkfg-kf.kf-playing .kf-actions{margin-top:12px}
@media(max-width:600px){.bkfg-kf{padding:14px;margin:12px auto}.bkfg-kf .kf-setup{grid-template-columns:1fr;gap:10px}.bkfg-kf .kf-keys{gap:8px 12px}.bkfg-kf .kf-actions{gap:10px}.bkfg-kf button{padding:0 12px}.bkfg-kf.kf-playing h2{font-size:20px}}

.bkfg-kf [hidden]{display:none!important}.bkfg-kf .kf-actions button{flex:0 0 auto}
.bkfg-kf .kf-stage{position:relative}.bkfg-kf .kf-results{position:absolute;top:12%;right:3%;width:56%;max-height:85%;overflow:auto;background:#101a29ed;border:1px solid #726349;padding:18px 20px;border-radius:5px;box-shadow:0 12px 30px #0005;color:#eef1f5}.bkfg-kf .kf-results h3{font:900 clamp(23px,3vw,40px)/1 system-ui,sans-serif;color:#f3d29b;margin:5px 0 10px;letter-spacing:.06em}.bkfg-kf .kf-results p{font:13px/1.4 system-ui,sans-serif;margin:6px 0;overflow-wrap:anywhere}.bkfg-kf .kf-results .kf-winner{font-size:20px;font-weight:800}.bkfg-kf .kf-results .kf-result-corner{font:700 11px monospace;letter-spacing:.12em;color:#d5b780}.bkfg-kf .kf-results .kf-result-time{font-size:12px;color:#adbdd1}.bkfg-kf .kf-results table{width:100%;border-collapse:collapse;table-layout:fixed;font:12px/1.4 system-ui,sans-serif;margin:12px 0;background:transparent;color:#eef1f5}.bkfg-kf .kf-results caption{text-align:left;font-size:10px;color:#a6b3c4;padding-bottom:6px}.bkfg-kf .kf-results th,.bkfg-kf .kf-results td{border:0;border-bottom:1px solid #354153;padding:7px 5px;text-align:right;vertical-align:top;background:transparent;color:inherit;overflow-wrap:anywhere}.bkfg-kf .kf-results th:first-child{text-align:left;width:32%}.bkfg-kf .kf-results th span{display:block;font-size:10px}.bkfg-kf .kf-results th span+span{font-size:12px;margin-top:3px}.bkfg-kf .kf-results .kf-red{color:#f68e90}.bkfg-kf .kf-result-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.bkfg-kf .kf-result-actions button{font-size:11px;padding:0 12px}.bkfg-kf .kf-result-actions button:last-child{background:#222d3c;border-color:#5c6a7b}@media(max-width:800px){.bkfg-kf .kf-results{top:10%;padding:10px}.bkfg-kf .kf-results p{font-size:11px}.bkfg-kf .kf-results .kf-winner{font-size:16px}.bkfg-kf .kf-results th,.bkfg-kf .kf-results td{padding:4px}.bkfg-kf .kf-result-actions button{font-size:10px;padding:0 8px}}@media(max-width:600px){.bkfg-kf .kf-results{position:relative;top:auto;right:auto;width:100%;max-height:none;margin-top:12px;padding:15px}.bkfg-kf .kf-results h3{font-size:28px}}
/* Mobile surfaces are enabled by input capability, not by a user-agent test. */
.bkfg-kf{position:relative;min-width:0}.bkfg-kf .kf-touch-pad,.bkfg-kf .kf-mobile-bar,.bkfg-kf .kf-orientation{display:none}.bkfg-kf .kf-play-area{min-width:0}.bkfg-kf .kf-stage{min-width:0}.bkfg-kf.kf-playing canvas{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.bkfg-kf.kf-touch{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right));padding-bottom:max(14px,env(safe-area-inset-bottom));scroll-margin-top:0}.bkfg-kf.kf-touch button{min-height:44px}.bkfg-kf.kf-touch select{min-height:48px;font-size:16px}.bkfg-kf.kf-touch .kf-actions label{min-height:44px}.bkfg-kf.kf-touch .kf-option input{width:20px;height:20px;flex-basis:20px}
.bkfg-kf.kf-touch.kf-playing .kf-mobile-bar{display:flex;gap:8px;margin:10px 0}.bkfg-kf.kf-touch.kf-playing .kf-mobile-bar button{background:#223044;border-color:#6a7b93;min-width:92px}.bkfg-kf.kf-touch.kf-playing .kf-actions{display:none}.bkfg-kf.kf-touch.kf-menu-open .kf-actions{display:flex;position:absolute;top:100px;left:12px;right:12px;z-index:5;margin:0;padding:16px;background:#101a2bf5;border:1px solid #8b7756;border-radius:8px;box-shadow:0 12px 32px #0009}.bkfg-kf.kf-touch.kf-menu-open .kf-actions button{min-height:48px}.bkfg-kf.kf-touch.kf-playing .kf-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%)}
.bkfg-kf.kf-touch.kf-playing .kf-play-area{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.bkfg-kf.kf-touch.kf-playing .kf-stage{grid-column:1/-1;grid-row:1}.bkfg-kf.kf-touch.kf-playing .kf-touch-pad{display:grid;align-content:center;gap:9px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;padding:9px;background:#0c1320dc;border:1px solid #3c4a61;border-radius:12px}.bkfg-kf .kf-touch-left{grid-template-columns:1fr 1fr}.bkfg-kf .kf-touch-left [data-key="KeyW"],.bkfg-kf .kf-touch-left [data-key="KeyS"]{grid-column:1/-1}.bkfg-kf .kf-touch-right{grid-template-columns:1fr}.bkfg-kf.kf-touch .kf-touch-pad button{height:52px;min-width:0;min-height:48px;padding:0 5px;font-size:12px;letter-spacing:.02em;border:1px solid #9d4553;border-bottom-width:4px;border-radius:10px;background:#3a2330d9;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;transition:background .08s,transform .08s}.bkfg-kf .kf-touch-pad button[data-key="KeyA"],.bkfg-kf .kf-touch-pad button[data-key="KeyD"]{font-size:24px}.bkfg-kf .kf-touch-pad button[data-key="Space"]{border-color:#bca16b;color:#ffe0a3;background:#493725cc}.bkfg-kf .kf-touch-pad button.kf-pressed{background:#be354c;transform:translateY(2px);border-bottom-width:2px;box-shadow:0 0 14px #ff466744;filter:none}.bkfg-kf .kf-touch-pad button:disabled{opacity:.35}.bkfg-kf.kf-touch.kf-playing .kf-keys,.bkfg-kf.kf-touch.kf-playing .kf-foot{display:none}
.bkfg-kf.kf-touch.kf-results-mode .kf-play-area{display:block}.bkfg-kf.kf-touch.kf-results-mode .kf-touch-pad{display:none}.bkfg-kf.kf-touch .kf-results{position:relative;top:auto;right:auto;width:100%;max-height:none;margin-top:14px;padding:16px}.bkfg-kf.kf-touch .kf-results p{font-size:14px}.bkfg-kf.kf-touch .kf-results .kf-winner{font-size:21px}.bkfg-kf.kf-touch .kf-results table{font-size:13px}.bkfg-kf.kf-touch .kf-results th,.bkfg-kf.kf-touch .kf-results td{padding:8px 5px}.bkfg-kf.kf-touch .kf-result-actions button{font-size:12px;min-height:48px}.bkfg-kf.kf-touch .kf-results caption{font-size:12px}
@media(orientation:portrait){.bkfg-kf.kf-touch .kf-orientation{display:block;font:13px/1.5 system-ui,sans-serif;color:#ddc394;border-left:3px solid #b39760;padding:8px 10px;background:#1c2533;margin:12px 0}}
@media(orientation:landscape){.bkfg-kf.kf-touch.kf-playing:not(.kf-results-mode) .kf-play-area{grid-template-columns:124px minmax(0,1fr) 124px;gap:10px;align-items:center}.bkfg-kf.kf-touch.kf-playing:not(.kf-results-mode) .kf-stage{grid-column:2;grid-row:1;width:100%;justify-self:center}.bkfg-kf.kf-touch.kf-playing .kf-touch-left{grid-column:1;grid-row:1}.bkfg-kf.kf-touch.kf-playing .kf-touch-right{grid-column:3;grid-row:1}}
@media(orientation:landscape) and (max-height:600px){.bkfg-kf.kf-touch.kf-playing:not(.kf-results-mode){margin:0 auto;padding-top:max(6px,env(safe-area-inset-top));padding-bottom:max(6px,env(safe-area-inset-bottom));padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}.bkfg-kf.kf-touch.kf-playing .kf-eyebrow{display:none}.bkfg-kf.kf-touch.kf-playing h2{font-size:15px;line-height:20px;margin:0;display:inline-block}.bkfg-kf.kf-touch.kf-playing .kf-mobile-bar{margin:5px 0 8px;gap:8px}.bkfg-kf.kf-touch.kf-playing .kf-mobile-bar button{height:44px;min-height:44px;font-size:11px}.bkfg-kf.kf-touch.kf-playing:not(.kf-results-mode) .kf-play-area{grid-template-columns:124px minmax(0,1fr) 124px;gap:8px}.bkfg-kf.kf-touch.kf-playing:not(.kf-results-mode) .kf-stage{width:min(100%,calc((100vh - 104px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*16/9));width:min(100%,calc((100svh - 104px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*16/9))}.bkfg-kf.kf-touch .kf-touch-pad{padding:6px;gap:8px}.bkfg-kf.kf-touch .kf-touch-pad button{height:50px;font-size:10px}.bkfg-kf.kf-touch.kf-menu-open .kf-actions{top:78px;max-height:calc(100svh - 95px);overflow:auto}.bkfg-kf.kf-touch.kf-results-mode .kf-stage{width:100%}}
.bkfg-kf button,.bkfg-kf select,.bkfg-kf .kf-option{touch-action:manipulation}
.bkfg-kf .kf-touch-pad button{touch-action:none}

/* 0.7.1: compact controls and an explicitly entered, reversible arcade surface. */
.bkfg-kf .kf-fullscreen,.bkfg-kf .kf-exit{display:none}
.bkfg-kf.kf-touch .kf-fullscreen{display:inline-block;margin:10px 0 0;min-height:44px}
.bkfg-kf .kf-joystick{grid-column:1/-1;width:88px;height:88px;justify-self:center;position:relative;border-radius:50%;border:2px solid #9d4553;background:radial-gradient(circle,#3e2635bb,#101621e6);touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;opacity:.4}
.bkfg-kf.kf-input-enabled .kf-joystick{opacity:1}
.bkfg-kf .kf-stick-knob{position:absolute;width:42px;height:42px;left:calc(50% - 21px);top:calc(50% - 21px);border-radius:50%;background:radial-gradient(circle at 35% 25%,#d75a67,#701d30);border:2px solid #e87782;box-shadow:0 4px 10px #0009;transform:translate(var(--stick-x,0px),var(--stick-y,0px));pointer-events:none}
.bkfg-kf .kf-stick-active{box-shadow:0 0 12px #e4485055}
.bkfg-kf.kf-touch.kf-playing .kf-touch-pad{padding:3px;gap:5px;border:0;background:transparent}
.bkfg-kf.kf-touch .kf-touch-pad button{height:44px;min-height:44px;font-size:10px}
.bkfg-kf.kf-touch.kf-playing .kf-mobile-bar{gap:5px}
.bkfg-kf.kf-touch.kf-playing .kf-mobile-bar button{min-width:72px;padding:0 9px}
.bkfg-kf.kf-arcade{position:fixed!important;z-index:2147483647;top:var(--kf-vtop,0px);left:var(--kf-vleft,0px);width:var(--kf-vw,100vw);height:100dvh;height:var(--kf-vh,100dvh);max-width:none;margin:0!important;border:0;border-radius:0;padding:max(4px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));overflow:auto;overscroll-behavior:contain;background:#10151e}
.bkfg-kf.kf-arcade .kf-fullscreen{display:none}
.bkfg-kf.kf-arcade .kf-exit{display:block;position:sticky;top:0;float:right;z-index:7;margin:4px 0;min-height:44px;font-size:10px;padding:0 10px;background:#263143;border-color:#8192a9}
.bkfg-kf.kf-arcade .kf-eyebrow,.bkfg-kf.kf-arcade>h2{display:none}
.bkfg-kf.kf-arcade .kf-mobile-bar{display:inline-flex;margin:4px 0}
.bkfg-kf.kf-arcade .kf-play-area{clear:both}
.bkfg-kf.kf-arcade.kf-menu-open .kf-actions{top:56px;z-index:8;max-height:calc(var(--kf-vh) - 68px);overflow:auto}
.bkfg-kf.kf-arcade:not(.kf-playing) .kf-exit{position:absolute;right:8px;top:4px}
.bkfg-kf.kf-arcade:not(.kf-playing) .kf-setup{margin-top:58px}
@media(orientation:landscape){
.bkfg-kf.kf-touch.kf-playing:not(.kf-results-mode) .kf-play-area{grid-template-columns:94px minmax(0,1fr) 68px;gap:6px}
.bkfg-kf.kf-touch.kf-playing:not(.kf-results-mode) .kf-stage{width:min(100%,calc((var(--kf-vh,100dvh) - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*16/9))}
.bkfg-kf.kf-touch.kf-playing>h2,.bkfg-kf.kf-touch.kf-playing>.kf-eyebrow{display:none}
.bkfg-kf.kf-touch.kf-playing .kf-mobile-bar{display:inline-flex;margin:0 0 6px}
.bkfg-kf.kf-touch.kf-playing .kf-fullscreen{float:right;font-size:10px;margin:0 0 6px}
.bkfg-kf.kf-arcade.kf-playing:not(.kf-results-mode) .kf-stage{width:min(100%,calc((var(--kf-vh,100dvh) - 62px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*16/9))}
.bkfg-kf.kf-touch.kf-playing .kf-touch-left,.bkfg-kf.kf-touch.kf-playing .kf-touch-right{align-self:end;margin-bottom:4px}
.bkfg-kf.kf-touch.kf-menu-open .kf-actions{top:56px}
}
@media(orientation:portrait){.bkfg-kf.kf-arcade .kf-orientation{clear:both;padding-top:8px}.bkfg-kf.kf-arcade.kf-playing .kf-mobile-bar{float:left}}
