#keyboardControls{height:100%;min-height:0}.keyboard-workspace,.touch-settings-grid{display:grid;grid-template-columns:minmax(230px,.85fr) minmax(0,1.4fr);gap:16px;min-height:0;height:100%}
.input-preview-card,.keyboard-binding-card{min-width:0;border:1px solid #cecec5;border-radius:6px;background:#ffffff80;padding:16px}
.input-preview-card h2{font-size:18px}.input-preview-card h3{font-size:14px;margin:0}.input-preview-card p{font-size:11px;line-height:1.6;color:#62625b}
.keyboard-binding-card{display:flex;flex-direction:column;min-height:0}.input-card-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.input-card-heading h3{font-size:14px;margin:0}.input-reset{min-height:36px;padding:5px 10px;border:1px solid #bdbdb3;border-radius:4px;background:#fff;color:#444;font-size:11px;cursor:pointer}
.keyboard-mappings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 12px;overflow:auto;min-height:0}.keyboard-map-row{display:flex;align-items:center;justify-content:space-between;gap:5px;min-width:0;font-size:11px;min-height:38px;border-bottom:1px solid #ddddd4}.keyboard-map-row button{min-width:68px;max-width:125px;min-height:36px;border:1px solid #bfbfb5;border-radius:4px;padding:6px 8px;background:#fff;color:#262620;font-size:11px;font-weight:700;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.keyboard-map-row button.is-listening{background:#fff3a1;border-color:#ac1b16;outline:2px solid #ac1b16;outline-offset:1px}
.keyboard-assignment-status{display:flex;gap:8px;align-items:center;min-height:53px;flex-shrink:0}.keyboard-assignment-status p,.keyboard-reserved{font-size:10px;color:#66665b;line-height:1.5;margin:8px 0}.keyboard-assignment-status button{min-height:36px;border:1px solid #bdbdb3;background:#fff;border-radius:4px}.keyboard-reserved{margin:0}
.keyboard-steering-test{padding:6px 16px 14px;border-radius:6px;background:#eeede5;text-align:center;cursor:default;outline-offset:3px}.keyboard-steering-test svg{height:136px;max-width:100%;fill:none;stroke:#56564c;stroke-width:7;stroke-linecap:round}.keyboard-steering-test .wheel-marker{stroke:#b11812;stroke-width:8}.keyboard-steering-test output{display:block;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;margin-top:10px}.steering-test-track{height:10px;position:relative;border-radius:10px;background:linear-gradient(90deg,#d3d3c6,#fff 50%,#d3d3c6)}.steering-test-track i{position:absolute;left:50%;top:-3px;height:16px;border-left:1px solid #99998a}.steering-test-track span{position:absolute;left:50%;top:-3px;width:6px;height:16px;background:#b11812;border-radius:2px;transform:translateX(-50%)}
.input-preview-card .setting-slider{margin-top:18px}.touch-settings-grid{height:auto;grid-template-columns:1fr 1fr}.touch-size-preview{display:flex;flex-direction:column;gap:28px;align-items:center;justify-content:center;min-height:215px;margin:12px 0;border-radius:8px;background:#252723;overflow:hidden}.preview-touch-pad{display:flex;align-items:center;justify-content:space-around;width:calc(132px * var(--touch-steering-width,1.15));max-width:90%;height:64px;background:#ffffff20;border:1px solid #ffffff50;border-radius:40px;color:#ffed79;font-size:25px}.preview-touch-pad span{font-size:22px;display:grid;place-items:center;width:42px;height:42px;background:#ffffff20;border-radius:50%}.preview-touch-buttons{display:flex;gap:10px;transform:scale(var(--touch-button-scale,1))}.preview-touch-buttons span{padding:17px 12px;border:1px solid #ffffff60;border-radius:10px;color:#eee;font:bold 10px Arial}.preview-touch-buttons span:last-child{color:#ffe979;border-color:#ffe97970}
.touch-controls{--touch-button-scale:1;--touch-steering-width:1.15}.touch-controls .steering-pad{width:min(calc(148px * var(--touch-steering-width)),calc(100vw - max(180px,170px * var(--touch-button-scale)) - 44px))}.touch-controls .touch-pedals{transform:scale(var(--touch-button-scale));transform-origin:bottom right}.touch-controls .touch-gears{transform:scale(var(--touch-button-scale));transform-origin:bottom right;bottom:calc(120px * var(--touch-button-scale))}.touch-controls .touch-top button,.touch-controls .touch-service button{font-size:calc(10px * var(--touch-button-scale));padding:calc(9px * var(--touch-button-scale)) calc(12px * var(--touch-button-scale));min-width:max(44px,calc(44px * var(--touch-button-scale)));min-height:max(44px,calc(44px * var(--touch-button-scale)))}.touch-controls .touch-top [data-menu],.touch-controls .touch-top [data-sound]{font-size:calc(18px * var(--touch-button-scale))}.touch-controls button{min-width:max(44px,calc(44px / var(--touch-button-scale)));min-height:max(44px,calc(44px / var(--touch-button-scale)))}
@media(max-width:740px){.keyboard-workspace,.touch-settings-grid{grid-template-columns:1fr;height:auto}.keyboard-mappings{overflow:visible}.input-preview-card{padding:14px}#settingsModal .settings-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}#settingsModal .settings-tabs button{font-size:11px;padding:6px;gap:5px}.touch-size-preview{min-height:175px}.touch-settings-grid{gap:12px}.touch-settings-grid .setting-slider:first-child{margin-top:0}}
@media(max-width:430px){.touch-controls .touch-top{gap:6px;left:10px;right:10px}.touch-controls .touch-actions{gap:3px}.touch-controls .touch-top button{padding-inline:6px;font-size:9px;min-width:44px}.keyboard-map-row{font-size:10px}.keyboard-map-row button{min-width:58px}.keyboard-mappings{gap:5px 8px}}
@media(orientation:landscape) and (max-height:500px){.touch-controls .touch-gears{bottom:calc(106px * var(--touch-button-scale))}}
@media(max-width:740px){.touch-settings-grid .touch-size-preview{min-height:130px;gap:12px;margin:8px 0}.touch-settings-grid .preview-touch-pad{height:48px}.touch-settings-grid .preview-touch-pad span{height:34px;width:34px}.touch-settings-grid .preview-touch-buttons span{padding:12px 8px}.touch-settings-grid .input-preview-card>p{margin:8px 0 0}}
@media(orientation:landscape) and (max-height:500px){
 .touch-device #keyboardControls>h2,.touch-device #keyboardControls>.settings-intro{display:none}
 .touch-settings-grid{grid-template-columns:minmax(165px,.65fr) minmax(0,1.6fr);gap:12px;align-items:start}
 .touch-settings-grid>.input-preview-card{padding:8px}.touch-settings-grid>.input-preview-card>h3,.touch-settings-grid>.input-preview-card>p{display:none}
 .touch-settings-grid .touch-size-preview{min-height:132px;margin:0;gap:12px}.touch-settings-grid .preview-touch-pad{height:45px}.touch-settings-grid .preview-touch-pad span{width:32px;height:32px}.touch-settings-grid .preview-touch-buttons span{padding:10px 8px}
 .touch-settings-grid>section:last-child{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px}.touch-settings-grid .setting-slider{margin:0}.touch-settings-grid .setting-slider p{font-size:10px;line-height:1.45}.touch-settings-grid .setting-slider>div{font-size:12px}.touch-settings-grid #touchReset{grid-column:1/-1;justify-self:end;min-height:32px}
}
.touch-controls .touch-service{top:calc(68px * max(1,var(--touch-button-scale)))}
/* Apply to labels/knob as well as buttons; block WebKit selection/callouts. */
.arcade,.arcade *{touch-action:none!important;user-select:none!important;-webkit-user-select:none!important;-webkit-touch-callout:none!important;-webkit-user-drag:none;-webkit-tap-highlight-color:transparent}
html.mobile-gestures,html.mobile-gestures body{touch-action:pan-x pan-y;overscroll-behavior:none}
html.mobile-gestures .launcher{touch-action:pan-x pan-y}
html.mobile-gestures input:not([type=range]):not([type=checkbox]):not([type=radio]),html.mobile-gestures select,html.mobile-gestures textarea{font-size:16px!important}

/* Temporary analogue pedal above the left steering control. */
.touch-launch-throttle{--launch-level:0;position:absolute;left:max(24px,env(safe-area-inset-left));bottom:calc(112px + env(safe-area-inset-bottom));width:48px;height:clamp(100px,22svh,132px);display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px 4px;border:1px solid #ffe12e70;border-radius:12px;background:#111a;color:#ffe979;pointer-events:auto;touch-action:none;font:700 10px Arial,sans-serif}
.touch-launch-throttle[hidden]{display:none}.touch-launch-throttle:focus-visible{outline:2px solid #ffe12e;outline-offset:3px}
.launch-throttle-track{position:relative;display:block;flex:1;width:14px;min-height:40px;background:#ffffff16;border:1px solid #ffffff38;border-radius:8px}
.launch-throttle-track i{position:absolute;bottom:0;left:0;right:0;height:calc(var(--launch-level)*1%);background:#ffe12eb0;border-radius:7px}
.launch-throttle-track b{position:absolute;left:50%;bottom:calc(var(--launch-level)*1%);width:26px;height:10px;transform:translate(-50%,50%);border:1px solid #ffef95;border-radius:4px;background:#ffe12e;box-shadow:0 1px 4px #0008}
.touch-launch-throttle output{font:700 10px Arial,sans-serif;font-variant-numeric:tabular-nums}
@media(orientation:landscape) and (max-height:500px){.touch-launch-throttle{bottom:calc(98px + env(safe-area-inset-bottom));height:108px}}
