/* The tester shares the site's reading scale, container, colours and radii.
   Only live indicators use a denser scale; controller hit maps keep their aspect ratios. */
.gamepad-tester-page{
 --tester-bg:var(--bg);--tester-surface:var(--panel);--tester-surface-soft:var(--bg-soft);
 --tester-border:var(--line);--tester-red:var(--red);--tester-navy:var(--text);--tester-muted:var(--muted);--tester-blue:var(--directions);
 --tester-title-size:var(--page-title-size);
 --tester-heading-size:clamp(1.55rem,3vw,2.3rem);
 --tester-panel-size:clamp(1.125rem,1.6vw,1.375rem);
 --tester-copy-size:1rem;--tester-label-size:.875rem;--tester-caption-size:.75rem;
 --tester-front-size:clamp(18rem,29vw,22.5rem);--tester-wizard-front-size:clamp(14rem,22vw,18rem);
}
.tester-main{background:transparent;padding-top:24px}
.tester-main [hidden]{display:none!important}
.tester-mode-bar{display:flex;gap:12px;margin-bottom:22px}
.tester-mode-bar .tester-btn{border-radius:var(--radius);font-size:var(--tester-copy-size);min-height:44px;padding:10px 18px;text-transform:none;letter-spacing:0}
.tester-mode-bar .is-selected{background:var(--tester-red);border-color:var(--tester-red);color:white}
.tester-intro{grid-template-columns:minmax(0,1fr) minmax(300px,440px);align-items:center;gap:24px;margin-bottom:12px}
.tester-intro h1{font-size:var(--tester-title-size);font-weight:700;line-height:1.1;letter-spacing:-.035em}
.tester-intro-copy>p{font-size:var(--tester-copy-size);line-height:1.55;color:var(--tester-muted);margin-top:10px}
.connection-card{min-height:66px;padding:14px 18px;border-radius:var(--radius-lg);box-shadow:none;gap:14px}
.connection-dot{width:14px;height:14px;border:0;box-shadow:none!important}
.connection-card strong{font-size:var(--tester-label-size)}
.connection-card>div span{font-size:var(--tester-caption-size);margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.connection-transport{display:none}
.tester-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.96fr);gap:28px;align-items:center}
.controller-panel,.controller-stage{background:transparent;border:0;box-shadow:none;border-radius:0;overflow:visible;min-height:0;height:auto;padding:0}
.controller-stage{display:flex;flex-direction:column;align-items:center;gap:clamp(.5rem,1vw,.75rem)}
.controller-shoulder-view{display:block;width:min(100%,calc(var(--tester-front-size) * 5 / 6));height:auto;aspect-ratio:1400 / 560}
/* Keep both views in every Wizard step that displays the controller. */
.controller-front-view{width:100%;max-width:var(--tester-front-size);margin-inline:auto;height:auto;aspect-ratio:3 / 2;overflow:visible}
.controller-device{width:100%;max-width:100%}
.controller-visual,.controller-front-view img{filter:none}
.controller-visual{inset:0}
.diagnostic-stack{grid-template-rows:auto auto auto;gap:0;background:var(--tester-surface);border:1px solid var(--tester-border);border-radius:var(--radius-lg);padding:20px;overflow:visible}
.diagnostic-panel{border:0;background:transparent;box-shadow:none;overflow:visible}
.panel-heading,.panel-heading.compact{padding:0 0 12px;min-height:0}
.panel-heading h2{font-size:var(--tester-panel-size);text-transform:none;letter-spacing:0;margin:0;font-weight:700}
.deadzone-legend{display:none}
.stick-grid{grid-template-columns:repeat(2,minmax(0,1fr));height:auto;gap:16px;padding:0}
.stick-card{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto auto;align-content:start;border:1px solid var(--tester-border);border-radius:var(--radius);background:transparent;padding:12px 14px;gap:0}
.stick-card header{grid-column:auto;font-size:15px;margin:0 0 6px}
.stick-card header strong{text-transform:none;font-size:15px}
.wizard-coverage-readout{display:none;text-align:center;margin-top:4px}
[data-test-mode="wizard"][data-wizard-step="2"] .wizard-coverage-readout,[data-test-mode="wizard"][data-wizard-step="3"] .wizard-coverage-readout{display:block}
.wizard-coverage-readout strong{display:block;font-size:34px;line-height:1.2;color:var(--tester-navy)}
.wizard-coverage-readout span{display:block;font-size:16px;color:var(--tester-muted);margin-top:6px}
#wizard-feedback:empty{display:none}
[data-test-mode="wizard"][data-wizard-step="2"] .controller-stick-left,[data-test-mode="wizard"][data-wizard-step="3"] .controller-stick-right{border-color:var(--tester-red);box-shadow:0 0 0 3px var(--line)}
.stick-plot{position:relative;padding:0;min-width:0}
.stick-card canvas{width:min(100%,210px);height:auto;display:block;margin:auto;transform:none}
.stick-plot-legend{display:none}
.stick-card dl{display:flex;align-items:baseline;justify-content:center;flex-wrap:nowrap;gap:14px;margin:0;padding:0;border:0;min-width:0;width:100%;transform:none}
.stick-card dl>div{display:flex;gap:5px;background:transparent!important;padding:0;min-width:0}
/* Reset the old stacked-metric padding so both axes share one text baseline. */
.stick-card dl>div:is(:first-child,:nth-child(2)){align-items:baseline;padding:0;border-radius:0;white-space:nowrap}
.stick-card dl dt,.stick-card dl dd{font-size:14px;line-height:1.4;font-weight:500;color:var(--tester-navy);margin:0}
.stick-card dl .deadzone-metric,.stick-card dl .drift-metric,.stick-card dl .state-metric,.stick-card dl .coverage-metric{display:none}
.trigger-readouts{display:grid;grid-template-columns:1fr;padding:18px 0;gap:8px;border:0;background:transparent;border-radius:0}
.trigger-readouts>div{display:grid;grid-template-columns:40px minmax(0,1fr) 44px;gap:10px;align-items:center}
.trigger-readouts>div>span:first-child{display:contents}
.trigger-readouts strong{font-size:15px}.trigger-readouts small,.trigger-peak{display:none!important}
.trigger-readouts output{grid-column:3;grid-row:1;font-size:14px}.trigger-readouts>div>i{grid-column:2;grid-row:1;height:12px;min-width:0;background:#e4edf3;border:0;border-radius:10px;margin:0}
.trigger-readouts>div>i>b{background:var(--tester-red);border-radius:10px}
.button-count{font-size:12px;color:var(--tester-muted)}
.button-test-grid,.button-test-grid.has-optional-inputs{display:flex;flex-wrap:wrap;align-content:flex-start;gap:8px;padding:0;height:auto;min-height:0;margin:0;border:0;overflow:visible}
.button-group,.button-group:last-child,.dpad-test-cluster{display:contents}
.button-group h3{display:none}
.button-test-grid [data-button-index]{display:inline-flex;align-items:center;justify-content:center;position:relative;width:43px;height:43px;min-height:43px;padding:0;border:1px solid #e0ebf3;border-radius:50%;background:#f1f7fb;color:var(--tester-navy);font-size:11px;line-height:1;text-align:center;gap:0;white-space:nowrap;box-shadow:none}
.button-test-grid [data-button-index]>b,.button-test-grid [data-button-index]>small{display:none}
.button-test-grid [data-button-index]>i:not(.ps-face-icon){display:none}
.button-test-grid [data-button-index]:has(.ps-face-icon){font-size:0}
.button-test-grid .button-group>span .ps-face-icon{width:21px;height:21px;color:inherit;border:0;border-radius:0;box-shadow:none;background:transparent}
.button-test-grid .ps-face-icon svg{width:21px;height:21px;stroke:currentColor;stroke-width:1.7;fill:none}
.button-test-grid .dpad-test-cluster span{font-size:0;position:relative;grid-area:auto;transform:none;inset:auto;flex-direction:row}
.button-test-grid .dpad-test-cluster em{display:block;position:static;font-style:normal;color:inherit;line-height:1;width:21px;height:21px;border:0;background:transparent;border-radius:0}
.button-test-grid .dpad-test-cluster em svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.button-test-grid .dpad-test-cluster span:is(.is-active,.was-tested) em{background:transparent;border:0;box-shadow:none}
.button-test-grid .dpad-test-cluster span.is-active em{color:#fff}
.button-test-grid .tester-button-label{display:block;line-height:1.15;white-space:normal}
.button-diagnostics .panel-heading.compact{min-height:0;padding:0 0 12px}
.button-test-grid [data-button-index].was-tested{border-color:#afd4c5;background:#eaf8f2}
.button-test-grid [data-button-index].is-active{background:var(--tester-red);border-color:var(--tester-red);color:white}
.tester-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:14px;background:transparent;border:0;padding:20px 0;margin-top:0;box-shadow:none;min-height:0}
.quick-vibration-status{flex-basis:100%;text-align:center;margin:0;color:var(--tester-muted);font-size:14px;line-height:1.5}
.quick-vibration-status:empty{display:none}
.tester-btn{font-weight:700;line-height:1.35;border-radius:var(--radius);background:var(--tester-surface);color:var(--tester-navy);border-color:var(--tester-border)}
.tester-btn-primary{background:var(--red);border-color:var(--red);color:var(--white)}
.tester-actions{display:contents}
#start-test,#test-result,.guidance-icon,.guidance-progress,#guidance-title,#guidance-copy{display:none}
.test-guidance{display:contents}
.test-guidance>div{display:none}
.tester-controls .tester-btn{min-height:44px;border-radius:var(--radius);font-size:var(--tester-copy-size);text-transform:none;letter-spacing:0;padding:10px 18px}
.tester-controls .tester-btn,.wizard-shell .tester-btn-primary{min-width:0;box-shadow:none}
.tester-actions>.tester-btn{top:0;height:auto}
.guidance-vibration-button{margin:0;background:var(--tester-red);color:white;border-color:var(--tester-red);order:-1}
.tester-data-panels{display:grid;gap:12px}
.tester-disclosure{border:1px solid var(--tester-border);border-radius:var(--radius-lg);background:var(--tester-surface);overflow:hidden}
.tester-disclosure summary{display:flex;align-items:center;gap:16px;cursor:pointer;list-style:none;font-size:18px;line-height:1.4;font-weight:650;padding:17px 22px;min-height:60px}
.tester-disclosure summary::-webkit-details-marker{display:none}
.tester-disclosure summary>i:last-child{margin-left:auto;font-size:14px;transition:transform .15s}
.tester-disclosure[open] summary>i:last-child{transform:rotate(180deg)}
.tester-disclosure summary:focus-visible,.tester-btn:focus-visible{outline:3px solid #1688cf;outline-offset:-3px}
.tester-technical-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0;padding:18px 22px;border-top:1px solid var(--tester-border)}
.tester-technical-grid>div{min-width:0;border-right:1px solid var(--tester-border);padding-right:12px}
.tester-technical-grid dt{font-size:13px;color:var(--tester-muted);line-height:1.4}.tester-technical-grid dd{margin:5px 0 0;font-size:23px;font-weight:700}
#tester-info .advanced-diagnostics{width:100%;margin:0;border:0;border-radius:0;background:var(--tester-surface)}
#tester-info .advanced-heading{padding:16px 22px;gap:14px}
#tester-info .advanced-heading h2,#tester-info .advanced-heading p,#advanced-section-toggle{display:none}
#tester-info .device-info-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.wizard-shell{display:grid;grid-template-columns:260px minmax(0,1fr);gap:16px;align-items:stretch}
.wizard-rail{background:var(--tester-surface);border:1px solid var(--tester-border);border-radius:var(--radius-lg);padding:12px}
.wizard-rail ol{padding:0;margin:0;list-style:none;display:grid;gap:8px}
.wizard-rail li{display:flex;align-items:center;gap:14px;padding:14px 12px;border-bottom:1px solid var(--tester-border);font-size:16px;line-height:1.4;min-width:0}
.wizard-step-number{display:grid;place-items:center;flex-shrink:0;width:34px;height:34px;border-radius:50%;background:#e5eef5;font-size:16px;font-weight:700;color:#254565}
.wizard-rail li>i{margin-left:auto;color:var(--tester-green);visibility:hidden;font-size:14px}
.wizard-rail li[data-status="complete"]>i,.wizard-rail li[data-status="skipped"]>i{visibility:visible}
.wizard-rail li[data-status="complete"] .wizard-step-number{background:var(--tester-green);color:white}
.wizard-rail li[data-status="skipped"]>i{color:var(--tester-muted)}
.wizard-rail li[aria-current]{background:#fff0f5;border-color:transparent;color:var(--tester-red);border-radius:9px;font-weight:650}
.wizard-rail li[aria-current] .wizard-step-number{background:var(--tester-red);color:white}
.wizard-content,.wizard-heading h2{scroll-margin-top:140px}
.wizard-content{min-width:0;border:1px solid var(--tester-border);border-radius:var(--radius-lg);padding:24px;background:var(--tester-surface)}
.wizard-heading>span{font-size:15px;color:var(--tester-muted)}
.wizard-heading{position:relative}
.wizard-mode-slot{position:absolute;top:0;right:0}
.tester-main .wizard-mode-slot .tester-mode-bar{width:auto;gap:8px;margin:0}
.wizard-mode-slot .tester-mode-bar .tester-btn{padding:9px 12px;font-size:13px;min-height:42px}
.wizard-heading progress{display:block;width:60%;height:8px;appearance:none;border:0;border-radius:8px;overflow:hidden;margin:10px 0 28px;background:#e6edf3}
.wizard-heading progress::-webkit-progress-bar{background:#e6edf3}.wizard-heading progress::-webkit-progress-value{background:var(--tester-red)}.wizard-heading progress::-moz-progress-bar{background:var(--tester-red)}
.wizard-heading h2{font-size:var(--tester-heading-size);line-height:1.15;letter-spacing:0;margin:0 0 10px;text-transform:none}
.wizard-heading>p{color:var(--tester-muted);font-size:19px;line-height:1.45;margin:0 0 6px}
#wizard-feedback{min-height:22px;font-size:14px;margin:10px 0 12px;color:var(--tester-muted)}
#wizard-workspace-slot .tester-workspace{width:100%;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:20px;min-height:310px}
#wizard-workspace-slot .diagnostic-stack{border:0;padding:0;min-width:0}
#wizard-workspace-slot .stick-grid{grid-template-columns:1fr}
#wizard-workspace-slot .stick-card{border:0;padding:0}
#wizard-workspace-slot .stick-card canvas{width:min(100%,330px)}
[data-test-mode="wizard"][data-wizard-step="2"] [data-metric-side="right"],[data-test-mode="wizard"][data-wizard-step="3"] [data-metric-side="left"]{display:none}
#wizard-workspace-slot .stick-card header,#wizard-workspace-slot .stick-card dl,#wizard-workspace-slot #stick-heading,#wizard-workspace-slot .button-count{display:none}
[data-test-mode="wizard"][data-wizard-step="1"] #wizard-workspace-slot .stick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
[data-test-mode="wizard"][data-wizard-step="1"] #wizard-workspace-slot .stick-card canvas{width:min(100%,130px)}
[data-test-mode="wizard"][data-wizard-step="1"] #wizard-workspace-slot .stick-card header{display:flex;justify-content:center}
[data-test-mode="wizard"][data-wizard-step="1"] #wizard-workspace-slot .stick-card dl{display:flex}
[data-wizard-step="2"] [data-stick-card="right"],[data-wizard-step="3"] [data-stick-card="left"]{display:none}
[data-test-mode="wizard"] .button-diagnostics,[data-test-mode="wizard"] .trigger-readouts{display:none}
[data-test-mode="wizard"][data-wizard-step="4"] .stick-diagnostics,[data-test-mode="wizard"][data-wizard-step="5"] .stick-diagnostics{display:none}
[data-test-mode="wizard"][data-wizard-step="4"] .button-diagnostics{display:block}
[data-test-mode="wizard"][data-wizard-step="4"] .button-test-grid [data-button-index="6"],[data-test-mode="wizard"][data-wizard-step="4"] .button-test-grid [data-button-index="7"]{display:none}
[data-test-mode="wizard"][data-wizard-step="5"] .trigger-readouts{display:grid}
[data-test-mode="wizard"][data-wizard-step="0"] .diagnostic-stack{display:none}
[data-test-mode="wizard"][data-wizard-step="0"] #wizard-workspace-slot .tester-workspace{grid-template-columns:1fr;max-width:520px;margin:auto;min-height:220px}
[data-test-mode="wizard"][data-wizard-step="0"] #wizard-workspace-slot::before{content:none}
#wizard-technical-slot,#wizard-info-slot{margin-top:14px}
.wizard-controls{display:flex;align-items:center;gap:12px;padding:22px 0 0;margin-top:18px;border-top:1px solid var(--tester-border)}
.wizard-controls>div{margin-left:auto;display:flex;gap:12px}
.wizard-controls .tester-btn,.wizard-extras .tester-btn{font-size:15px;min-height:46px;letter-spacing:0;text-transform:none;border-radius:8px;padding:11px 16px}
.wizard-skip{border-color:transparent;background:transparent;color:#1688cf}
.wizard-controls>#wizard-back,.wizard-controls>.wizard-skip{width:auto;flex:0 0 auto}
.wizard-vibration{display:flex;flex-wrap:wrap;gap:14px;padding:20px 0;border-block:1px solid var(--tester-border);margin-bottom:22px}
.wizard-vibration>div{display:flex;gap:10px;flex-wrap:wrap}.wizard-vibration>p{width:100%;margin:0;color:var(--tester-muted);font-size:15px}
.wizard-extras>p{color:var(--tester-muted);font-size:16px;line-height:1.5}
.wizard-usb-body{padding:14px}
.wizard-usb-body>p{margin:0 0 12px;color:var(--tester-muted);font-size:14px;line-height:1.5}
#wizard-extra-tests-slot .advanced-test-grid{padding:18px 0 0;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#wizard-extra-tests-slot .input-completeness-card,#wizard-extra-tests-slot .usb-stability-card{display:none}
html[data-theme="dark"] .gamepad-tester-page{--tester-bg:var(--bg);--tester-surface:var(--panel);--tester-surface-soft:var(--bg-soft);--tester-border:var(--line);--tester-navy:var(--text);--tester-muted:var(--muted);color:var(--text)}
html[data-theme="dark"] .tester-main,html[data-theme="dark"] .wizard-content,html[data-theme="dark"] .wizard-rail,html[data-theme="dark"] .tester-disclosure,html[data-theme="dark"] .diagnostic-stack{background:var(--tester-bg);color:var(--tester-navy)}
html[data-theme="dark"] .wizard-content,html[data-theme="dark"] .wizard-rail,html[data-theme="dark"] .tester-disclosure,html[data-theme="dark"] .diagnostic-stack{background:var(--tester-surface)}
html[data-theme="dark"] .button-test-grid [data-button-index]{background:#1b3549;border-color:var(--tester-border);color:var(--tester-navy)}
html[data-theme="dark"] .button-test-grid [data-button-index].was-tested{background:#143e33;border-color:#397962}
html[data-theme="dark"] .button-test-grid [data-button-index].is-active{background:var(--tester-red);color:white}
html[data-theme="dark"] .wizard-rail li[aria-current]{background:#382235;color:#ff7294}
html[data-theme="dark"] .tester-mode-bar .is-selected,html[data-theme="dark"] .guidance-vibration-button{background:var(--tester-red);border-color:var(--tester-red);color:white}
html[data-theme="dark"] .button-test-grid .dpad-test-cluster span em{background:transparent;color:var(--tester-navy);border:0}
html[data-theme="dark"] .button-test-grid .dpad-test-cluster span.is-active em{color:white}
html[data-theme="dark"] .tester-main{background:transparent}
/* Legacy diagnostic rules must not introduce a second palette in dark mode. */
html[data-theme="dark"] .gamepad-tester-page :is(.connection-card,.tester-notes article,.advanced-test-card){background:var(--panel);border-color:var(--line);color:var(--text)}
html[data-theme="dark"] .gamepad-tester-page :is(.diagnostic-panel,.trigger-readouts,.stick-card){background:transparent;border-color:var(--line)}
html[data-theme="dark"] .gamepad-tester-page :is(.device-info-grid article,.advanced-metrics>div,.motion-groups section,#touchpad-test-canvas){background:var(--bg-soft);border-color:var(--line)}
html[data-theme="dark"] .tester-controls{background:transparent}
@media(max-width:1100px){
 .wizard-mode-slot{position:static;margin-bottom:22px}.wizard-mode-slot .tester-mode-bar{justify-content:flex-end}
 .wizard-shell{grid-template-columns:210px minmax(0,1fr);gap:12px}.wizard-content{padding:20px}.wizard-rail li{padding:12px 8px;font-size:14px;gap:10px}.wizard-step-number{width:30px;height:30px}
 .wizard-controls{flex-wrap:wrap}.wizard-controls>div{gap:8px}.wizard-controls .tester-btn{padding-inline:12px;font-size:13px}
 .tester-intro{grid-template-columns:1fr minmax(250px,340px)}.tester-workspace{gap:20px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.diagnostic-stack{padding:16px}
 .stick-grid{gap:10px}.stick-card{padding:10px}.stick-card dl{gap:8px}.stick-card dl dt,.stick-card dl dd{font-size:12px}
 .tester-technical-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Compact laptop/desktop sizing. Do not scale the entire app: text, keyboard
   focus rings and action hit areas remain native and readable. */
.wizard-result #test-result{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:14px;padding:18px;border:1px solid var(--tester-border);border-radius:10px;background:var(--tester-surface-soft)}
.wizard-result .result-icon{margin-top:4px}
.wizard-result .result-content>span{display:none}
.wizard-result #result-title{font-size:20px;line-height:1.3}
.wizard-result #result-copy{font-size:15px;line-height:1.5;margin-top:8px;color:var(--tester-muted)}
.wizard-result .result-action{min-height:44px;font-size:13px;padding:10px 14px}
.wizard-result .result-good-link{font-size:14px;line-height:1.4}
#wizard-completion-note{margin:14px 0 0;color:var(--tester-muted);font-size:14px;line-height:1.5}
@media(min-width:901px){
 .tester-main{padding:12px 0 24px}
 .tester-mode-bar{margin-bottom:10px;gap:10px}
 .tester-mode-bar .tester-btn{min-height:44px;padding:9px 18px;font-size:var(--tester-copy-size)}
 .tester-intro{gap:20px;grid-template-columns:minmax(0,1fr) minmax(280px,350px);margin-bottom:10px}
 .tester-intro-copy>p{font-size:var(--tester-copy-size);line-height:1.55;margin-top:6px}
 .connection-card{min-height:56px;padding:10px 14px;gap:10px}
 .tester-workspace{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:20px;align-items:center}
 .controller-stage{gap:8px}
 .diagnostic-stack{padding:10px}
 .panel-heading,.panel-heading.compact,.button-diagnostics .panel-heading.compact{padding:0 0 8px}
 .panel-heading h2{font-size:var(--tester-panel-size);line-height:1.3}
 .stick-grid{gap:10px}
 .stick-card{padding:8px;gap:0}
 .stick-card header{margin-bottom:4px;font-size:13px;line-height:1.3}
 .stick-card header strong{font-size:13px;line-height:1.3}
 .stick-card canvas{width:min(100%,130px)}
 .stick-card dl{gap:12px}
 .stick-card dl>div{padding:0}
 .stick-card dl dt,.stick-card dl dd{font-size:14px;line-height:1.4}
 .trigger-readouts{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px 0;gap:16px}
 .trigger-readouts>div{grid-template-columns:25px minmax(0,1fr) 38px;gap:7px}
 .trigger-readouts strong,.trigger-readouts output{font-size:14px}
 .trigger-readouts>div>i{height:10px}
 .button-test-grid,.button-test-grid.has-optional-inputs{display:grid;grid-template-columns:repeat(9,minmax(36px,1fr));gap:6px}
 .button-test-grid [data-button-index]{justify-self:center;width:36px;height:36px;min-height:36px;font-size:11px}
 .button-test-grid .ps-face-icon svg,.button-test-grid .dpad-test-cluster em svg{width:19px;height:19px}
 .tester-controls{padding:10px 0;gap:10px}
 .tester-controls .tester-btn{min-height:44px;padding:9px 18px;font-size:var(--tester-copy-size)}
 .tester-data-panels{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .tester-data-panels .tester-disclosure[open]{grid-column:1 / -1}
 .tester-disclosure summary{min-height:44px;padding:11px 16px;font-size:15px;gap:12px}
 .tester-disclosure summary>i{font-size:15px}
 .tester-technical-grid{padding:14px 16px;gap:14px}
 .tester-technical-grid dt{font-size:12px}.tester-technical-grid dd{font-size:19px}
 .tester-notes{margin-top:10px}.tester-notes article{padding:12px 14px}
 .wizard-shell{grid-template-columns:180px minmax(0,1fr);gap:12px}
 .wizard-rail{padding:8px}
 .wizard-rail ol{gap:4px}
 .wizard-rail li{padding:10px 8px;gap:10px;font-size:13px;line-height:1.4}
 .wizard-step-number{width:26px;height:26px;font-size:13px}
 .wizard-content{padding:16px}
 .wizard-mode-slot .tester-mode-bar{margin:0;gap:6px}
 .wizard-mode-slot .tester-mode-bar .tester-btn{min-height:40px;padding:8px 12px;font-size:12px;white-space:nowrap}
 .wizard-mode-slot{position:absolute;margin:0}
 .wizard-heading>span{font-size:13px}
 .wizard-heading progress{width:55%;height:6px;margin:8px 0 18px}
 .wizard-heading h2{font-size:var(--tester-heading-size);line-height:1.15;margin-bottom:6px}
 .wizard-heading>p{font-size:var(--tester-copy-size);line-height:1.55}
 #wizard-feedback{font-size:13px;min-height:18px;margin:8px 0 10px}
 #wizard-workspace-slot .tester-workspace{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:16px;min-height:0}
 #wizard-workspace-slot .controller-front-view{max-width:var(--tester-wizard-front-size)}
 #wizard-workspace-slot .controller-shoulder-view{width:min(100%,calc(var(--tester-wizard-front-size) * 5 / 6))}
 #wizard-workspace-slot .stick-card canvas{width:min(100%,220px)}
 #wizard-workspace-slot .trigger-readouts{grid-template-columns:1fr}
 .wizard-coverage-readout strong{font-size:28px}
 .wizard-coverage-readout span{font-size:13px;line-height:1.4;margin-top:4px}
 #wizard-technical-slot,#wizard-info-slot{margin-top:10px}
 .wizard-controls{padding-top:12px;margin-top:12px;gap:10px;flex-wrap:nowrap}
 .wizard-controls>div{gap:8px}
 .wizard-controls .tester-btn,.wizard-extras .tester-btn{font-size:13px;min-height:44px;padding:10px 12px}
 .wizard-extras>p{font-size:14px;line-height:1.5}
 .wizard-vibration{padding:14px 0;margin-bottom:14px;gap:10px}
 #wizard-extra-tests-slot .advanced-test-grid{padding-top:12px;gap:12px}
 #wizard-extra-tests-slot .advanced-test-card{min-height:0;padding:12px}
 #wizard-extra-tests-slot .advanced-test-card>header{gap:8px;min-height:36px;margin-bottom:10px}
 #wizard-extra-tests-slot .advanced-card-icon{width:32px;height:32px}
 #wizard-extra-tests-slot .advanced-test-card h3{font-size:14px;line-height:1.3}
 #wizard-extra-tests-slot .advanced-test-card header p{font-size:12px;line-height:1.4}
 #wizard-extra-tests-slot .motion-groups{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #wizard-extra-tests-slot .motion-axis,#wizard-extra-tests-slot .motion-axis output{font-size:12px}
 [data-test-mode="wizard"][data-wizard-step="0"] #wizard-workspace-slot .tester-workspace{max-width:360px;min-height:0}
}
@media(min-width:901px) and (max-width:1100px){
 .wizard-mode-slot{position:static;margin-bottom:14px}
 .wizard-heading progress{width:100%}
 .wizard-shell{grid-template-columns:160px minmax(0,1fr)}
 .wizard-rail li{font-size:12px;padding-inline:6px;gap:8px}
 #wizard-workspace-slot .button-test-grid,#wizard-workspace-slot .button-test-grid.has-optional-inputs{grid-template-columns:repeat(6,minmax(36px,1fr))}
 .wizard-controls{flex-wrap:wrap}
}
/* Short laptop screens keep the site's typography. Only illustrations and
   diagnostic whitespace tighten, not the entire interface or action targets. */
@media(min-width:1101px) and (max-height:800px){
 .gamepad-tester-page{--tester-front-size:clamp(16rem,44vh,20rem)}
 .tester-main{padding-top:10px}
 [data-test-mode="quick"] .stick-card{padding:6px}
 [data-test-mode="quick"] .stick-card canvas{width:min(100%,7rem)}
 [data-test-mode="quick"] .trigger-readouts{padding-block:8px}
 [data-test-mode="quick"] :is(.panel-heading,.panel-heading.compact){padding-bottom:6px}
}
@media(max-width:900px){
 .tester-intro{grid-template-columns:1fr}.connection-card{max-width:none;width:100%}
 .tester-workspace{grid-template-columns:1fr}.controller-front-view{margin:auto}
 .wizard-shell{grid-template-columns:1fr}.wizard-rail{padding:12px}.wizard-rail ol{display:flex;gap:8px;flex-wrap:wrap}.wizard-rail li{display:none;border:0;padding:6px 8px;gap:10px}.wizard-rail li[aria-current]{display:flex;width:100%}.wizard-rail li[aria-current]>i{display:none}
 #wizard-workspace-slot .tester-workspace{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);min-height:220px}.wizard-heading progress{width:100%}.wizard-heading>p{font-size:17px}
 #tester-info .device-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
 .tester-main{padding-top:18px}
 .tester-mode-bar{gap:8px;margin-bottom:20px}.tester-mode-bar .tester-btn{padding:10px 12px;font-size:13px;min-height:46px;flex:1;gap:8px}
 .wizard-mode-slot .tester-mode-bar{width:100%;margin:0}.wizard-mode-slot .tester-mode-bar .tester-btn{padding:10px;font-size:12px;min-height:46px}
 .tester-intro-copy>p{font-size:var(--tester-copy-size)}.connection-card{padding:13px 14px;grid-template-columns:auto minmax(0,1fr)}
 .tester-workspace{gap:14px}.diagnostic-stack{padding:14px}
 .stick-card header{font-size:12px}.stick-card{padding:10px 6px}.stick-grid{gap:10px}.stick-card dl{gap:6px}.stick-card dl dt,.stick-card dl dd{font-size:12px}
 .tester-controls .tester-btn{font-size:14px;padding:11px 15px;min-height:46px;flex-basis:auto}.tester-controls{padding:18px 0}
 .tester-disclosure summary{font-size:16px;padding:16px;gap:12px}.tester-technical-grid{padding:16px;gap:16px}.tester-technical-grid dt{font-size:12px}.tester-technical-grid dd{font-size:20px}
 .wizard-content{padding:16px}.wizard-heading>p{font-size:var(--tester-copy-size)}.wizard-heading progress{margin-bottom:20px}
 #wizard-workspace-slot .tester-workspace{grid-template-columns:1fr;min-height:0;gap:8px}
 #wizard-workspace-slot .stick-card canvas{width:220px}.wizard-content .tester-technical-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px;gap:14px}
 .wizard-controls{gap:8px}.wizard-controls>div{width:100%;margin:0}.wizard-controls>div .tester-btn{flex:1}.wizard-controls .tester-btn{font-size:13px;padding-inline:10px}.wizard-skip{margin-left:auto}
 .wizard-vibration>div{width:100%}.wizard-vibration>div .tester-btn{flex:1;font-size:13px;padding-inline:10px}
 #wizard-extra-tests-slot .advanced-test-grid{grid-template-columns:1fr}
}
