[hidden] { display:none !important; }
body.touch-test-active { overflow:hidden; }
body.touch-test-active > :not(#touchTestStage) { display:none !important; }
body.touch-test-active #touchTestStage {
  position:fixed; inset:0; width:100%; height:100dvh;
  z-index:2147483647; background:#071018;
}
body.touch-test-active #testSurface {
  position:absolute; inset:0; width:100%; height:100%; min-height:0;
  border:0; border-radius:0; box-shadow:none;
}
body.touch-test-active .surface-note,
body.touch-test-active .surface-copy { display:none; }
.touch-test-controls {
  position:absolute; z-index:10;
  top:max(8px, env(safe-area-inset-top)); right:max(8px, env(safe-area-inset-right));
  width:min(350px, calc(100% - 16px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  padding:10px; border:1px solid #607988; border-radius:8px;
  background:#101e29; color:#f4f8fa; touch-action:manipulation;
}
.touch-test-controls.at-bottom { top:auto; bottom:max(8px, env(safe-area-inset-bottom)); }
.touch-test-metrics { display:flex; justify-content:space-between; gap:10px; margin-bottom:8px; font-size:13px; font-variant-numeric:tabular-nums; }
.touch-test-metrics > span { min-width:0; overflow-wrap:anywhere; }
.touch-test-metrics strong { color:#fff; font-size:17px; }
.touch-test-actions { display:grid; grid-template-columns:1.5fr 1fr .8fr; gap:6px; }
.touch-test-actions button { min-height:44px; padding:6px; border:1px solid #7893a3; border-radius:6px; background:#263d4c; color:#fff; font-size:14px; box-shadow:none; text-shadow:none; }
.touch-test-actions #exitTestBtn { background:#77384b; border-color:#d08a9c; }
.touch-test-actions button:focus-visible { outline:3px solid #ffdf88; outline-offset:2px; }
.accuracy-target,.tap-marker,.touch-surface.is-active { box-shadow:none; }
