.bench #dual-connect{margin:0 0 6px}.bench #hid-help{margin-bottom:10px}
#sensor-view{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(20px,4vw,52px);margin:28px 0}
.sensor-block{border-top:2px solid #4089a9;padding:18px 0;min-width:0}.sensor-block header{display:flex;justify-content:space-between;gap:8px;align-items:center}.sensor-block header span{font-size:13px;color:#89d9fd}
.bench .sensor-block p{margin:10px 0 16px;font-size:15px}.sensor-block p:empty{display:none}
#mic-volume{display:block;width:100%;height:24px;margin:14px 0 12px;accent-color:#55e5c1}#mic-source-label{display:grid;gap:5px;margin:12px 0}#mic-source{width:100%}
.cal .guide{border:0;border-top:1px solid #395064;border-radius:0;background:transparent;padding:20px 0}.cal #task{font-size:clamp(24px,3vw,34px)}
.cal .scope{width:clamp(100px,15vw,152px)}.cal .scope i{background:#82fbc2;box-shadow:0 0 0 3px #365849}
.cal #axes-live[data-direction]:not([data-direction=""]) .scope::after{content:"";position:absolute;top:var(--target-y,50%);left:var(--target-x,50%);width:15px;height:15px;transform:translate(-50%,-50%);border:2px solid #ffcf69;border-radius:50%}
#axes-live[data-direction=izquierda]{--target-x:8%}#axes-live[data-direction=derecha]{--target-x:92%}#axes-live[data-direction=arriba]{--target-y:8%}#axes-live[data-direction=abajo]{--target-y:92%}
.cal .stages li[aria-current]{border-color:#70e8b1}.cal .controls{margin-top:12px}
@media(max-width:650px){#sensor-view{grid-template-columns:1fr;gap:8px;margin:18px 0}.bench-modes{gap:1px}.bench-modes a{min-height:48px;padding:8px 5px;text-align:center}.bench-modes span{display:none}.sensor-block{padding:14px 0}}

/* One live instrument with optional tools alongside it. */
.live-desk {display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,1fr);gap:clamp(22px,4vw,62px);align-items:start;margin:20px 0 0}
#quick-view,.tool-dock{min-width:0}
.live-desk .dual-stage{width:100%;margin:0}
.live-desk .dual-body{width:min(100%,600px);margin:14px auto 0}
.live-desk .dual-values{margin-top:6px;text-align:left}.live-desk .dual-values>span:last-child{text-align:right}
.controller-overview { grid-template-columns:1fr; gap:8px; }
.controller-overview .overview-instrument { width:min(100%,540px); margin:4px auto 0; }
.controller-overview #triggers { display:flex; justify-content:space-between; padding:0 11%; }
.controller-overview .trigger-reading { min-width:0; }
.controller-overview .photo { max-width:none; width:100%; }
.controller-overview .photo .stick-pin { width:1.8%; border:1px solid #1c5162; background:#85e5ff; box-shadow:0 0 0 1px #d1f5ff; }
.controller-overview .dual-values { margin:0; }
.controller-overview #signal.live { color:#7de5c0; }
.live-desk .key-panel { margin:10px 0; border-top:1px solid var(--line); padding:8px 0; }
.live-desk .key-panel summary { cursor:pointer; color:#bcd0df; font-size:14px; }
#pickers { align-items:end; }
#pickers :is(#cancel-pick,#find-sony,#disconnect-pad) { margin:0; }
@media(max-width:600px) {
  .controller-overview .photo { max-width:none; }
  #pickers label:first-child { width:100%; }
}
.tool-dock{border-top:2px solid #6dccf8;padding-top:16px}
.device-info h2{margin:0 0 12px}
.device-info dl{margin:0}
.device-info dl>div{display:grid;grid-template-columns:minmax(95px,.85fr) minmax(0,1.25fr);align-items:baseline;gap:12px;border-bottom:1px solid var(--line);padding:8px 0}
.device-info dt{color:#b7c8d7;font-size:14px}
.device-info dd{margin:0;text-align:right;color:#eaf4ff;font:600 14px/1.4 system-ui;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;user-select:all}
.dual-key.meta{background:transparent;width:2.8%;height:8%;padding:0;border-radius:45%}
.dual-key.meta.active{background:#168fba;box-shadow:0 0 0 2px #a1ecff,0 0 10px #0088ff}
.photo #dual-surface{left:35%;top:10.5%;width:31.2%;height:26%}
.bench #hid-help{font-size:14px;color:#b4c8d6}
.tool-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.tool-actions button{flex:1 1 140px}
.tool-actions button[aria-expanded=true]{border-color:#77d5ff;background:#164764}
#guide-vibration-status:empty {display:none}
#guide-vibration-status {color:#acdcf0; margin:.5rem 0; line-height:1.45}
.live-desk #sensor-view{display:block;margin:12px 0}.live-desk .sensor-block{padding:14px 0}
#cal-method{display:flex;gap:8px;border:0;margin:0;padding:0;min-width:0}
#cal-method legend{font-size:18px;font-weight:700;padding:0 0 9px}
#cal-method label{display:flex;gap:8px;align-items:center;flex:1;border:1px solid #455d70;border-radius:5px;padding:8px;cursor:pointer}#cal-method label:has(:checked){border-color:#75d4ff;background:#19394c}
#cal-method input{accent-color:#62d6ff}#cal-method small{display:block;color:#c3d5e0}
.cal .stages{margin-top:14px}.tool-dock .cal #task{font-size:23px}.tool-dock .cal .stages li{font-size:12px}
.tool-dock .cal .scope{width:90px}.tool-dock .cal .panel{padding:10px}.tool-dock .cal .guide{margin-bottom:0}
.tool-dock .cal th,.tool-dock .cal td{font-size:13px;overflow-wrap:anywhere}
@media(max-width:780px){.live-desk{grid-template-columns:1fr;gap:16px}.live-desk .dual-stage{max-width:500px}.tool-dock{padding-top:12px}.tool-actions{margin:10px 0}.live-desk .dual-body{margin-top:6px}}

@media(min-width:781px){.live-desk .dual-body{width:min(100%,600px,max(350px,calc((100dvh - 365px)*1.25)))}}
.tool-actions button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px}

/* Connection uses the same beveled action as the rest of the site. */
.bench #dual-connect.ecg-control { margin:4px 14px 16px; padding:12px 26px; min-height:50px; border:0; border-radius:0; background:transparent; color:white; }
.device-info dl>div { align-items:center; padding:3px 0; }
.device-info dd { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px; user-select:auto; }
.info-value { user-select:all; }
.bench .copy-field { display:grid; place-items:center; position:relative; min-height:42px; width:72px; padding:0; border:1px solid transparent; background:transparent; color:#a9d9ed; transition:background .18s,border-color .18s,color .18s; }
.copy-icon,.copy-result { grid-area:1/1; transition:opacity .18s,transform .18s; }
.copy-icon { position:relative; width:12px; height:15px; border:1.5px solid currentColor; border-radius:2px; }
.copy-icon::before { content:""; position:absolute; left:-5px; top:-5px; width:9px; height:12px; border:solid currentColor; border-width:1.5px 0 0 1.5px; border-radius:2px 0; }
.copy-result { font-size:12px; opacity:0; transform:translateY(3px); }
.bench .copy-field.copied { color:#a7f9cf; background:#103c2c; border-color:#357354; }
.copied .copy-icon { opacity:0; transform:translateY(-3px); }
.copied .copy-result { opacity:1; transform:none; }
.copy-status { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); }
#advanced-tools { box-sizing:border-box; width:min(560px,calc(100% - 28px)); max-height:calc(100dvh - 40px); overflow:auto; overscroll-behavior:contain; margin:auto; padding:clamp(18px,4vw,30px); color:#edf6fa; background:linear-gradient(118deg,transparent 82%,#1b384740 82% 85%,transparent 85%),linear-gradient(140deg,#182531,#0d161f 70%); border:1px solid #496378; border-top:2px solid #55c7fa; border-radius:2px; box-shadow:0 24px 100px #0009; }
#advanced-tools:not([open]) { display:none; }
#advanced-tools::backdrop { background:#050911ce; }
.wizard-head { display:flex; gap:14px; justify-content:space-between; align-items:flex-start; }
.wizard-head h2 { margin:3px 0 0; font-size:clamp(23px,4vw,30px); }
.wizard-head small,#step-count { color:#a5d9ef; font:700 12px/1.3 system-ui; letter-spacing:.07em; }
#end-guide { width:44px; padding:0; font-size:24px; }
#wizard-progress { display:block; width:100%; height:5px; accent-color:#52caff; margin:18px 0 22px; }
#step-title { font-size:23px; line-height:1.2; margin:6px 0; }
#advanced-tools #instruction { margin:6px 0 16px; color:#cee0ed; }
#advanced-tools #sensor-view { display:block; margin:16px 0; }
.wizard-actions,#advanced-tools .controls { display:flex; flex-wrap:wrap; gap:8px; }
.wizard-actions:not(:has(button:not([hidden]))),#advanced-tools .controls:not(:has(button:not([hidden]))) { display:none; }
.wizard-actions,#advanced-tools .controls { border-top:1px solid #344b5a; padding-top:16px; margin-top:18px; }
#advanced-tools #next-step { color:#b5fadc; background:#124531; border-color:#4d9572; }
#advanced-tools #fail-step { color:#ffdda3; }
#advanced-tools #open-report,.bench #last-report { background:transparent; border:0; border-radius:0; min-height:44px; padding-inline:20px; color:white; }
#advanced-tools .report-actions { border:0; margin:12px 0; padding:0; align-items:center; }
#advanced-tools.summary-step #wizard-progress,#advanced-tools.summary-step .wizard-head h2 { display:none; }
#advanced-tools.summary-step .wizard-head { align-items:center; margin-bottom:12px; }
#advanced-tools.summary-step #restart { min-height:44px; }
#advanced-tools #probe-action { margin-top:14px; }
#advanced-tools .checks:empty { display:none; }
#advanced-tools button:focus-visible,.copy-field:focus-visible { outline:2px solid #9edfff; outline-offset:2px; }
@media(max-width:480px){.device-info dl>div{grid-template-columns:minmax(82px,.69fr) minmax(0,1.45fr);gap:5px}.bench .copy-field{width:65px}.wizard-actions button{flex:1;padding:8px 6px}}
@media(prefers-reduced-motion:reduce){.copy-icon,.copy-result,.bench .copy-field{transition:none}}

#advanced-tools .wizard-actions button { white-space:nowrap; }
#advanced-tools #checks:not(:empty) { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:0 18px; }
#checks .check-result { min-width:0; padding:10px 0; border-bottom:1px solid #344b5a; display:grid; grid-template-columns:1fr auto; align-content:start; gap:4px 10px; }
#checks .check-result strong { font-size:14px; }
#checks .check-result span { padding:0; border:0; background:none; font-weight:700; color:#b3c4d1; }
#checks .done span { color:#87e3ad; }
#checks .review span,#checks .partial span { color:#ffd38d; }
#checks .failed span { color:#ff9fa7; }
#checks .check-result small { grid-column:1/-1; color:#b6c6d3; overflow-wrap:anywhere; }
#advanced-tools:not(.instrument-step) #step-count { display:none; }

.wizard-head { border-bottom:1px solid #344b5a; padding-bottom:12px; }
.wizard-head h2::after { content:"";display:block;width:52px;height:3px;margin-top:8px;transform:skewX(-25deg);background:linear-gradient(90deg,#fa3c61 32%,transparent 32% 38%,#c4cfda 38% 64%,transparent 64% 70%,#39c8ff 70%); }
#wizard-progress { appearance:none; border:0; background:#334253; color:#5bc8ff; }
#wizard-progress::-webkit-progress-bar { background:#334253; }
#wizard-progress::-webkit-progress-value { background:#55caff; }
#wizard-progress::-moz-progress-bar { background:#55caff; }
#connection-result { display:flex; align-items:center; gap:10px; min-height:32px; color:#b9cddd; font-weight:600; }
#connection-result::before { content:""; width:10px; height:10px; border:2px solid currentColor; border-radius:50%; }
#connection-result.confirmed { color:#8df2bc; }
#connection-result.confirmed::before { content:"✓"; border:0; font-size:16px; height:auto; width:auto; }
.connection-step .wizard-actions { align-items:center; justify-content:space-between; }
#advanced-tools.connection-step #skip-step { border-color:transparent; background:transparent; color:#bdcfde; }
@media(max-width:480px){.connection-step .wizard-actions button{flex:0 1 auto;}}

#advanced-tools #step-title:focus { outline:none; }
.connection-step #connection-result { margin:4px 0 8px; text-align:center; }
.connection-step :is(#test-markers,.test-shoulder-state,#test-extra,#button-test-progress,#pending-buttons) { visibility:hidden; }

/* Shared full-window stage for the buttons and trigger instruments. */
#advanced-tools.instrument-step[open] {
  --stage-width: min(760px,100%);
  position:fixed; inset:0; display:flex; flex-direction:column; align-items:center;
  box-sizing:border-box; width:100%; height:100dvh; max-width:none; max-height:none; margin:0;
  padding:clamp(12px,3vh,28px) max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  background:transparent; border:0; border-radius:0; box-shadow:none; overflow:auto;
}
#advanced-tools.instrument-step::backdrop { background:rgba(3,6,10,.86); backdrop-filter:blur(7px); }
body:has(#advanced-tools.instrument-step[open]) { overflow:hidden; }
.bench:has(#advanced-tools.instrument-step[open]) > :not(#advanced-tools) { visibility:hidden; }
.instrument-step .wizard-head { width:var(--stage-width); align-items:center; border:0; padding:0; }
.instrument-step .wizard-head>div { display:flex; align-items:center; gap:10px; }
.instrument-step .wizard-head h2 { margin:0; padding-left:10px; border-left:1px solid #527085; font:600 14px/1.2 system-ui; color:#cedbe4; }
.instrument-step .wizard-head h2::after { display:none; }
.instrument-step #guide { width:var(--stage-width); min-height:0; flex:1; display:flex; flex-direction:column; align-items:center; }
.instrument-step #wizard-progress { display:none; }
.instrument-step #step-count { font-size:11px; letter-spacing:.04em; color:#a7c5d4; }
.instrument-step #step-title { margin:6px 0 0; font-size:clamp(23px,3.7vw,36px); text-align:center; letter-spacing:-.035em; }
#advanced-tools.instrument-step #instruction { text-align:center; margin:4px 0 8px; }
#button-test { display:flex; flex:1; min-height:0; width:100%; flex-direction:column; align-items:center; position:relative; }
#test-scene { position:relative; flex:1; min-height:90px; width:100%; container-type:size; display:grid; place-items:center; }
#test-instrument { position:relative; width:min(100cqw,calc((100cqh - 66px)*1.5),640px); }
#test-instrument .dual-body { width:100%; margin:0; }
.button-test-front { position:relative; aspect-ratio:3/2; }
.button-test-front img { display:block; width:100%; height:100%; object-fit:contain; }
#test-markers,#test-feedback { position:absolute; inset:0; pointer-events:none; }
#test-feedback { z-index:5; }
.button-marker { --fill:transparent; --edge:transparent; --rim:0px; }
.button-marker[data-remaining="2"] { --edge:#70deffa6; --rim:1px; }
.button-marker[data-remaining="1"] { --edge:#4ad9ff; --rim:2px; }
.button-marker.pending-hint { --edge:#9ee8ff; --rim:2px; }
.button-marker.pressed { --edge:#a9edff; --rim:2px; --fill:rgba(29,177,247,.55); }
.button-marker[data-remaining="0"] { --edge:#8af4ba; --rim:1px; --fill:rgba(27,196,101,.54); }
#test-markers .button-marker,.test-shoulder-state { display:grid; place-items:center; background:var(--fill); box-shadow:inset 0 0 0 var(--rim) var(--edge); }
#test-markers .button-marker { position:absolute; transform:translate(-50%,-50%); width:6.2%; aspect-ratio:1; border-radius:50%; }
#test-markers :is([data-input="10"],[data-input="11"]) { width:11.5%; }
#test-markers :is([data-input="12"],[data-input="13"],[data-input="14"],[data-input="15"]) { width:4.8%; border-radius:28%; }
#test-instrument:is([data-model="ds5"],[data-model="ds4"]) #test-markers :is([data-input="8"],[data-input="9"]) { width:2.7%; height:7.5%; aspect-ratio:auto; border-radius:45%; }
/* The DS5 overlays follow the photographed contours, including the slanted menu buttons. */
#dual-surface.ds5-footprint,#dual-marks .ds5-footprint,#test-markers .ds5-footprint {
  transform:translate(-50%,-50%) rotate(var(--button-angle));
}
.ds5-footprint[data-input="12"] { --shape:polygon(0 20%,8% 6%,23% 0,78% 0,93% 6%,100% 20%,99% 64%,65% 95%,51% 100%,38% 95%,2% 64%); }
.ds5-footprint[data-input="13"] { --shape:polygon(2% 36%,39% 4%,50% 0,62% 4%,98% 36%,100% 79%,94% 95%,78% 100%,23% 100%,7% 95%,0 79%); }
.ds5-footprint[data-input="14"] { --shape:polygon(0 26%,6% 9%,21% 0,66% 4%,95% 37%,100% 50%,95% 63%,67% 95%,22% 100%,7% 92%,1% 78%); }
.ds5-footprint[data-input="15"] { --shape:polygon(0 50%,5% 37%,34% 5%,79% 0,94% 9%,100% 26%,99% 77%,93% 92%,78% 100%,34% 95%,5% 63%); }
.ds5-footprint[data-input="17"] { --shape:polygon(0 13%,2% 6%,13% 2%,34% 0,66% 0,87% 2%,98% 6%,100% 13%,93% 81%,91% 89%,88% 95%,82% 100%,18% 100%,12% 95%,9% 89%,7% 81%); }
#test-markers .ds5-footprint[data-input="17"] { border-radius:0; }
#dual-surface.ds5-footprint,#test-markers .ds5-footprint,#dual-marks .ds5-footprint { clip-path:var(--shape,none); }
#test-markers .ds5-footprint:is([data-input="12"],[data-input="13"],[data-input="14"],[data-input="15"]) .button-check {
  top:50%; right:50%; transform:translate(50%,-50%); min-width:0;
}
#dual-marks [data-input="mute"] { padding:0; background:transparent; }
#dual-marks [data-input="mute"]::after { content:"Mute"; position:absolute; top:100%; left:50%; transform:translateX(-50%); font-size:clamp(8px,1.6cqw,11px); color:#cfe0eb; }
#dual-marks [data-input="mute"].active { background:#29afff99; }
#test-instrument[data-model="ds4"] #test-markers [data-input="17"] { left:34%!important; top:11%!important; transform:none; width:32%; height:26%; aspect-ratio:auto; border-radius:5% 5% 12% 12%; }
#test-markers [data-input="mute"] { width:6%; height:3.6%; aspect-ratio:auto; border-radius:8px; }
#test-instrument .dual-trigger { display:none; }
#test-instrument .dual-bumper { position:relative; }
.test-shoulder-state { position:absolute; inset:0; border-radius:inherit; }
.button-check { display:none; position:absolute; right:0; top:2%; min-width:12px; padding:0 2px; background:#13492e; color:#d6ffdf; border-radius:5px; text-align:center; font:800 clamp(10px,1.8vw,13px)/1.15 system-ui; }
.button-marker[data-remaining="0"]>.button-check { display:block; }
#test-markers [data-input="17"]>.button-check { top:30%; right:12%; }
#test-shoulders { display:grid; grid-template-columns:24% 24%; justify-content:space-between; padding:0 11%; gap:3px 0; margin-bottom:2px; }
#test-shoulders .button-marker,#test-extra .button-marker {
  position:relative; display:flex; align-items:center; justify-content:center; gap:6px; padding:2px 4px; border:1px solid #557085;
  border-radius:4px; background:linear-gradient(var(--fill),var(--fill)),#192c39; box-shadow:inset 0 0 0 var(--rim) var(--edge); color:#f0f6fb; font:700 13px system-ui;
}
#test-extra:not(:empty) { display:flex; gap:4px; flex-wrap:wrap; justify-content:center; }
.press-note {
  position:absolute; transform:translate(-50%,-100%); white-space:nowrap;
  color:#e2f8ff; font:800 clamp(18px,2.2vw,25px)/1.18 system-ui;
  -webkit-text-stroke:2.4px #101d28;
  paint-order:stroke fill;
  text-shadow:0 1px 3px #071520;
  isolation:isolate;
  animation:press-confirm 1s ease-out both;
}
.press-note::before {
  content:"";
  position:absolute; z-index:-1; inset:-.4em -.55em;
  background:radial-gradient(ellipse closest-side, rgba(5,15,24,.72) 0%, rgba(5,15,24,.52) 45%, rgba(5,15,24,.15) 78%, transparent 100%);
}
.press-note.complete { color:#bbffd4; }
@keyframes press-confirm {
  0% { opacity:0; transform:translate(-50%,-70%); }
  12%,78% { opacity:1; }
  100% { opacity:0; transform:translate(-50%,calc(-100% - 16px)); }
}
#advanced-tools #button-test-progress { margin:5px 0 0; color:#bed1df; text-align:center; font-size:14px; }
#button-test-progress::before { content:""; display:block; width:140px; height:3px; margin:0 auto 7px; background:linear-gradient(to right,#78e6ad calc(var(--verified,0)*100%),#344954 0); }
#advanced-tools .all-verified #button-test-progress { color:#8cecb5; }
#advanced-tools #pending-buttons { margin:3px 0 0; color:#a6d9f0; text-align:center; font-size:14px; }
#pending-buttons:empty { display:none; }
#advanced-tools.instrument-step .wizard-actions { width:100%; margin:10px 0 0; padding:10px 0 0; align-items:center; }
#advanced-tools.instrument-step #next-step { order:1; margin-left:auto; min-width:110px; color:white; border-color:#69caff; background:linear-gradient(#0870c2,#094780); }
@media(max-height:460px) and (orientation:landscape) {
  #advanced-tools.instrument-step[open] { padding-top:4px; padding-bottom:4px; }
  .instrument-step .wizard-head { position:absolute; top:5px; width:calc(100% - 32px); }
  .instrument-step .wizard-head>div { visibility:hidden; }
  .instrument-step #step-title { margin:0; font-size:20px; }
  #advanced-tools.instrument-step #instruction { margin:1px 0; font-size:14px; }
  #advanced-tools.instrument-step .wizard-actions { margin-top:3px; padding-top:3px; }
}
@keyframes press-still { from,to { opacity:1; } }
@media(prefers-reduced-motion:reduce){.press-note{animation-name:press-still}}

#test-hand {
  z-index:6; pointer-events:none; position:absolute; width:clamp(24px,4vw,34px);
  transform:translateX(-38%); filter:drop-shadow(0 2px 3px #000b);
}
#test-hand svg { width:100%; height:auto; display:block; animation:button-hint-tap 1.35s ease-in-out infinite; }
@keyframes button-hint-tap { 0%,80%,100%{transform:translateY(4px)} 40%,50%{transform:translateY(-2px)} }
@media (prefers-reduced-motion:reduce){#test-hand svg{animation:none;}}

#trigger-test {
  display:flex; flex:1; flex-direction:column; justify-content:center;
  width:min(100%, 600px); padding:12px 0; text-align:center;
}
#trigger-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(16px,6vw,70px); }
.trigger-channel { --accent:#74d9ff; --lit:#12699d; min-width:0; }
.trigger-channel[data-cycles="3"] { --accent:#8aefb6; --lit:#1b8054; }
.trigger-heading { display:flex; gap:8px; align-items:baseline; justify-content:center; margin:0 0 12px; }
.trigger-heading b { color:var(--accent); font:800 clamp(22px,3vw,32px)/1 system-ui; }
.trigger-heading span { color:#ccdbe4; font-size:15px; }
.trigger-shell {
  position:relative; display:grid; place-items:center; isolation:isolate; overflow:hidden;
  width:82%; max-width:180px; height:clamp(110px,27dvh,222px); margin:auto;
  border:2px solid #668399; border-radius:44% 24% 34% 14% / 23% 14% 56% 18%;
  background:linear-gradient(145deg,#253e51,#111c28 70%);
  box-shadow:inset 0 4px 0 #ffffff1c, inset 0 -5px 0 #0004;
}
.trigger-channel:last-child .trigger-shell { border-radius:24% 44% 14% 34% / 14% 23% 18% 56%; }
.trigger-shell::after {
  content:""; position:absolute; inset:5% 10%; pointer-events:none;
  border-block:1px dashed #dae9f76b;
}
.trigger-fill {
  position:absolute; inset:0; z-index:-1; transform:scaleY(var(--pressure,0)); transform-origin:bottom;
  background:linear-gradient(0deg,var(--lit) 45%,var(--accent)); border-top:2px solid var(--accent);
}
.trigger-channel[data-cycles="3"] .trigger-shell { border-color:var(--accent); }
.trigger-number { color:#fff; font:800 clamp(27px,5vw,50px)/1 system-ui; font-variant-numeric:tabular-nums; text-shadow:0 1px 4px #041525; }
.trigger-samples { display:flex; justify-content:center; gap:6px; margin:15px auto 0; }
.trigger-samples i { width:clamp(18px,4vw,28px); height:5px; border-radius:3px; background:#354454; }
.trigger-channel:is([data-cycles="1"],[data-cycles="2"],[data-cycles="3"]) .trigger-samples i:first-child,
.trigger-channel:is([data-cycles="2"],[data-cycles="3"]) .trigger-samples i:nth-child(2),
.trigger-channel[data-cycles="3"] .trigger-samples i:last-child { background:var(--accent); }
#advanced-tools .trigger-cue { min-height:2.6em; margin:8px 0 0; color:#daebf5; line-height:1.3; }
#advanced-tools .trigger-channel[data-cycles="3"] .trigger-cue { color:var(--accent); }
#advanced-tools .trigger-limits { margin:12px 0 0; color:#adc1d0; font-size:14px; }
.trigger-limits span { padding-inline:8px; }
@media (max-height:460px) and (orientation:landscape) {
  #trigger-test { padding:0; }
  .trigger-shell { height:clamp(62px,22dvh,100px); max-width:120px; }
  .trigger-heading { margin-bottom:5px; }
  .trigger-samples { margin-top:6px; }
  #advanced-tools .trigger-cue { min-height:1.3em; }
  #advanced-tools .trigger-limits { margin-top:2px; }
}

/* The active shoulder floats beside its reading; the rest of the guided test keeps its layout. */
#trigger-model,#trigger-feedback,.trigger-credit,.trigger-repetition { display:none; }
#advanced-tools.instrument-step:has(.individual-trigger:not([hidden])) { --stage-width:min(100%,1060px); }
#trigger-test.individual-trigger {
  display:grid; grid-template-columns:minmax(0,1fr); align-content:center;
  justify-items:center; width:100%; min-height:0; padding:0; text-align:center;
}
.individual-trigger #trigger-pair { display:block; width:min(100%,270px); }
.individual-trigger .trigger-heading,.individual-trigger .trigger-samples { display:none; }
.individual-trigger .trigger-repetition { display:block; margin:4px 0; color:#b4dff1; font-variant-numeric:tabular-nums; }
.individual-trigger .trigger-channel .trigger-shell {
  background:none; border:0; box-shadow:none; border-radius:0; width:100%; height:auto;
  max-width:none; margin:0; padding:0; display:block;
}
.individual-trigger .trigger-shell::after,.individual-trigger .trigger-fill { display:none; }
.individual-trigger .trigger-number { color:var(--accent); font:700 clamp(36px,5.2vw,64px)/1.1 system-ui; font-variant-numeric:tabular-nums; }
#advanced-tools .individual-trigger .trigger-cue { margin:6px 0 0; min-height:2.6em; }
#trigger-test.individual-trigger:is(.has-trigger-model,:has(#shoulder-photo:not([hidden]))) {
  grid-template-columns:minmax(160px,.7fr) minmax(0,1.6fr);
  grid-template-rows:auto auto; column-gap:clamp(8px,3vw,36px); align-items:center;
}
.has-trigger-model #controller-model {
  display:block; grid-area:1/2; width:100%; min-width:0; height:clamp(170px,52dvh,440px);
  background:transparent; border:0; box-shadow:none;
  mask-image:radial-gradient(ellipse closest-side,#000 50%,rgba(0,0,0,.94) 62%,rgba(0,0,0,.48) 81%,transparent 100%);
}
#trigger-test:is(.has-trigger-model,:has(#shoulder-photo:not([hidden]))) #trigger-feedback {
  display:block; grid-area:1/2; align-self:stretch; justify-self:stretch;
  position:relative; z-index:1; pointer-events:none;
}
#trigger-feedback .press-note { top:24%; left:50%; }
#trigger-test:is(.has-trigger-model,:has(#shoulder-photo:not([hidden]))) #trigger-pair { grid-area:1/1; width:100%; }
#advanced-tools .individual-trigger .trigger-limits { color:#a7b8c5; font-size:13px; }
#trigger-test:is(.has-trigger-model,:has(#shoulder-photo:not([hidden]))) .trigger-limits { grid-area:2/1; }
.has-trigger-model .trigger-credit { display:block; grid-area:2/2; color:#9badbd; font-size:12px; padding:8px; }
@media(max-width:620px) and (orientation:portrait) {
  #trigger-test.individual-trigger:is(.has-trigger-model,:has(#shoulder-photo:not([hidden]))) { grid-template-columns:1fr; }
  .has-trigger-model #controller-model { grid-area:1/1; height:clamp(150px,32dvh,285px); }
  #trigger-test:is(.has-trigger-model,:has(#shoulder-photo:not([hidden]))) #trigger-feedback { grid-area:1/1; }
  #trigger-test:is(.has-trigger-model,:has(#shoulder-photo:not([hidden]))) #trigger-pair { grid-area:2/1; }
  #trigger-test:is(.has-trigger-model,:has(#shoulder-photo:not([hidden]))) .trigger-limits { grid-area:3/1; }
  .has-trigger-model .trigger-credit { grid-area:4/1; }
}
@media(max-height:520px) {
  .has-trigger-model #controller-model { height:clamp(95px,33dvh,165px); }
  .has-trigger-model .trigger-credit { padding-block:2px; }
}

/* The rear photos face the player upside down. Rotate about the physical trigger. */
#shoulder-photo {
  position:relative; grid-area:1/2; overflow:hidden; width:100%;
  height:clamp(150px,47dvh,360px); pointer-events:none;
  mask-image:radial-gradient(ellipse closest-side,#000 46%,#000e 67%,transparent 100%);
}
#shoulder-photo img { position:absolute; left:50%; top:50%; width:163%; max-width:none;
  transform-origin:var(--shoulder-x) var(--shoulder-y);
  transform:translate(calc(-1 * var(--shoulder-x)),calc(-1 * var(--shoulder-y))) rotate(180deg); }
#shoulder-photo i {
  position:absolute; left:50%; top:50%; width:10%; aspect-ratio:1;
  transform:translate(-50%,-50%); border:2px solid #a8e4ff; border-radius:50%;
  background:linear-gradient(to top,#36baeb calc(var(--pressure,0)*100%),#06293a33 0);
  box-shadow:0 0 0 2px #1029398c;
}
#shoulder-photo svg { display:none; position:absolute; left:50%; top:53%; width:clamp(30px,11%,55px); transform:rotate(-24deg); }
#trigger-test:has(.trigger-channel[data-show-finger]) #shoulder-photo svg { display:block; }
#trigger-test:has(#shoulder-photo:not([hidden])) .trigger-channel .meter-finger { display:none; }
@media(max-width:620px) and (orientation:portrait) {
  #shoulder-photo { grid-area:1/1; height:clamp(145px,32dvh,260px); }
}
@media(prefers-reduced-motion:no-preference) { #shoulder-photo svg use { animation:guide-land 1.8s ease-in-out infinite; } }

/* Stick test: instructions on the left, the active stick and live reticle on the right. */
#advanced-tools.instrument-step:has(#stick-test:not([hidden])) {
  --stage-width:min(100%,960px);
}
#advanced-tools.instrument-step:has(#stick-test:not([hidden])) #step-title {
  align-self:stretch; text-align:left;
}
#stick-test {
  flex:1; display:grid; align-items:center; width:100%; min-height:0;
  padding:18px 0; --stick-accent:#a5dcf3;
}
.stick-workspace {
  display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);
  align-items:center; column-gap:clamp(14px,4vw,56px); width:100%;
}
.stick-directions { position:relative; min-width:0; }
.stick-sides {
  display:flex; align-items:center; flex-wrap:wrap; gap:8px 18px;
  list-style:none; margin:0 0 16px; padding:0; color:#a8b4be;
}
.stick-sides li { position:relative; display:flex; align-items:center; gap:5px; font:600 14px/1.3 system-ui; }
.stick-sides li::before { content:""; width:6px; height:6px; border:1px solid currentColor; border-radius:50%; }
.stick-sides li[aria-current] { color:var(--stick-accent); }
.stick-sides li[aria-current]::before { background:currentColor; }
.stick-sides li.verified { color:#9de8b9; }
.stick-sides li.verified::before { content:"✓"; width:auto; height:auto; border:0; }
#advanced-tools #stick-task { margin:0; font-size:clamp(22px,3vw,34px); font-weight:700; line-height:1.14; letter-spacing:-.025em; color:#f1f7fb; }
#stick-task,#cal-view[data-phase="adjustRange"] #task { font-variant-numeric:tabular-nums; }
.stick-cue { min-block-size:5.25em; }
#stick-score { display:block; margin-top:6px; color:var(--stick-accent); font-weight:700; font-variant-numeric:tabular-nums; }
#stick-test[data-stage="done"] { --stick-accent:#9de8b9; }
.stick-instrument { min-width:0; margin:0; }
.stick-instrument svg { display:block; width:100%; height:auto; max-height:55dvh; }
.stick-photo { filter:grayscale(.85) brightness(.7); }
.stick-rail, .stick-ticks, .stick-lap-ring, .stick-arc { vector-effect:non-scaling-stroke; }
.stick-rail { fill:none; stroke:#9ab2c0; stroke-width:1.5px; }
.stick-ticks { fill:none; stroke:#b3c8d1; stroke-width:1.3px; stroke-linecap:round; }
.stick-arc, .stick-lap-ring { stroke:#79e4ff; stroke-width:3px; stroke-linecap:round; }
.stick-arc { filter:drop-shadow(0 0 1.4px #087796); }
.stick-lap-ring { opacity:0; }
.stick-instrument:is([data-gesture="release"],[data-gesture="done"]) .stick-rail { stroke:#83e4aa; stroke-width:2px; }
.stick-instrument:is([data-gesture="release"],[data-gesture="done"]) .stick-lap-ring { stroke:#a7f7c7; }
.stick-thumb > * { vector-effect:non-scaling-stroke; }
.stick-thumb { color:#f3fcff; filter:drop-shadow(0 1px 1px #071927); }
.stick-thumb circle { fill:#0c2333; stroke-width:1.7px; }
.stick-check { display:none; fill:none; stroke:#a7f7c7; stroke-width:2.8; stroke-linecap:round; stroke-linejoin:round; }
.stick-instrument[data-gesture="done"] .stick-check { display:block; }
.stick-instrument[data-gesture="done"] .stick-thumb { display:none; }
.stick-ghost, .stick-target, .stick-home {
  display:none; fill:none; stroke:#f2f8fc; stroke-width:1.3;
  stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 1px 1px #111);
}
.stick-instrument[data-gesture="circles"][data-tracking="false"] .stick-ghost { display:block; animation:stick-orbit 4s linear infinite; }
@keyframes stick-orbit { to { transform:rotate(360deg); } }
.stick-instrument[data-gesture="target"] .stick-target { display:block; stroke:#ffdd95; stroke-width:2; }
.stick-instrument[data-gesture="release"] .stick-home { display:block; stroke:#9cf2ca; stroke-width:2; }
.stick-instrument[data-gesture="settling"] .stick-home { display:block; stroke:#9cf2ca; }
.stick-instrument[data-gesture="settling"] .stick-home path { display:none; }
.wizard-head,.trigger-channel { position:relative; }
#guide-feedback { position:absolute; left:50%; top:100%; z-index:5; pointer-events:none; }
.trigger-channel > .press-note { z-index:2; pointer-events:none; left:50%; top:36%; }
.stick-feedback { display:grid; place-items:center; block-size:32px; text-align:center; pointer-events:none; }
#stick-test[data-stage="circles"] .stick-feedback,#cal-view[data-phase="adjustRange"] .stick-feedback { visibility:hidden; }
.stick-feedback .press-note { position:relative; display:inline-block; animation:stick-message 1.25s ease-out both; transform:none; }
@keyframes stick-message { 0%,100% { opacity:0; } 12%,78% { opacity:1; } }
@media(max-width:600px) {
  .stick-workspace { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; }
  .stick-sides { gap:4px 9px; margin-bottom:10px; }
  .stick-sides li { font-size:13px; gap:4px; }
  #advanced-tools #stick-task { font-size:clamp(19px,5vw,25px); }
}
@media(max-height:460px) and (orientation:landscape) {
  #stick-test { padding:2px 0; }
  .stick-instrument svg { max-height:48dvh; }
  .stick-sides { margin-bottom:6px; }
}
@media(prefers-reduced-motion:reduce) {
  .stick-lap-ring { display:none; }
  .stick-instrument[data-gesture="circles"][data-tracking="false"] .stick-ghost { animation:none; }
  .stick-feedback .press-note { animation-name:press-still; }
}

/* The photo and its live touch surface share one camera transform. */
#advanced-tools.instrument-step:has(#touch-test:not([hidden])) { --stage-width:min(100%,920px); }
#advanced-tools:has(#touch-test:not([hidden])) #step-title { align-self:stretch; text-align:left; }
#touch-test {
  flex:1; width:100%; min-height:0; display:grid; align-content:center; align-items:center;
  grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr); gap:clamp(16px,4vw,48px);
}
.touch-steps { display:flex; flex-wrap:wrap; gap:5px 15px; list-style:none; padding:0; margin:0 0 14px; }
.touch-steps li { padding:0 0 4px; border-bottom:2px solid #415361; color:#a9b8c3; font-size:14px; }
.touch-steps [aria-current] { border-color:#73dfff; color:#c4f0ff; }
.touch-steps .verified { border-color:#7cdbac; color:#a4e8c3; }
.touch-steps .verified::before { content:"✓ "; }
#advanced-tools #touch-task { margin:0; font-size:clamp(22px,2.8vw,32px); line-height:1.13; letter-spacing:-.025em; }
#advanced-tools #touch-help { margin:9px 0 0; max-width:36ch; color:#c5d5e2; font-size:16px; line-height:1.45; }
.touch-instrument { margin:0; min-width:0; width:min(100%,76dvh); justify-self:center; }
.touch-window { position:relative; aspect-ratio:3/2; }
.touch-viewport {
  position:absolute; inset:0; width:100%; height:100%; overflow:hidden; transform-origin:0 0;
  mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent),linear-gradient(0deg,transparent,#000 14%,#000 90%,transparent);
  mask-composite:intersect;
}
#touch-plane {
  --touch-pan:30.6%; --touch-zoom:1.98;
  position:relative; width:100%; aspect-ratio:3/2; transform-origin:50% calc(50% - var(--touch-pan));
  transform:translateY(var(--touch-pan)) scale(var(--touch-zoom));
  animation:touch-approach 1.25s cubic-bezier(.32,0,.2,1) both;
}
#touch-test.from-stick #touch-plane { animation:none; }
@keyframes touch-approach {
  0%,12% { transform:translateY(0) scale(.94); }
  100% { transform:translateY(var(--touch-pan)) scale(var(--touch-zoom)); }
}
#touch-test[data-model="ds4"] #touch-plane { --touch-pan:26.5%; --touch-zoom:2.32; }
#touch-test:is(.gyro-view,.audio-view) #touch-plane { animation:none; transform:scale(.74); transform-origin:center; }
.gyro-view .touch-viewport { mask-image:none; overflow:visible; }
#gyro-arrow { display:none; position:absolute; inset:0; width:100%; height:100%; pointer-events:none; color:#92e4ff; }
.gyro-view[data-gyro-phase="demo"] #gyro-arrow,.gyro-view[data-gyro-phase="ready"] #gyro-arrow { display:block; }
#gyro-arrow > path { display:none; stroke:currentColor; stroke-width:2.5; stroke-linecap:round; marker-end:url(#gyro-tip); filter:drop-shadow(0 1px 2px #001425); }
[data-gesture="pitch"] #gyro-arrow .pitch,
[data-gesture="roll"] #gyro-arrow .roll,
[data-gesture="yaw"] #gyro-arrow .yaw { display:block; }
#advanced-tools #motion-stage {
  width:fit-content; margin:0 0 9px; padding-left:9px; border-left:3px solid currentColor;
  color:#71d5ff; font-size:14px; font-weight:700;
}
.gyro-view:is([data-gyro-phase="ack"],[data-gyro-phase="done"]) #motion-stage { color:#9be7bf; }
#motion-readings { margin-top:14px; max-width:34ch; }
#motion-progress { display:block; width:100%; height:6px; accent-color:#79d8ff; }
#motion-progress[hidden],#replay-motion[hidden] { display:none; }
#advanced-tools #replay-motion { margin:12px 0 0; min-height:44px; }
#touch-test.gyro-view #touch-plane {
  transform:perspective(520px) scale(.83) rotateZ(var(--motion-turn,0rad))
    rotateX(calc(.60rad + var(--motion-pitch,0rad))) rotateY(var(--motion-bank,0rad));
}
.gyro-view .touch-directions { min-height:15em; }
@media(max-width:600px) and (orientation:portrait) {
  #touch-test.gyro-view { gap:3px; }
  .gyro-view .touch-instrument { width:min(100%,42dvh); }
  .gyro-view .touch-directions { min-height:12em; }
}
#advanced-tools #vibration-answers { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin-top:10px; }
#advanced-tools #vibration-answers button { margin:0; min-width:0; min-height:44px; white-space:normal; line-height:1.25; }
#advanced-tools #vibration-answers #next-step { order:0; width:100%; margin:0; }
#touch-help:empty { display:none; }
#advanced-tools #sensor-view { max-width:34ch; margin:16px 0 0; }
#mic-test-block { padding:10px 0 0; border-top:1px solid #344f61; }
#mic-test-block header label { color:#d2e1ec; font-size:15px; }
#mic-volume { width:100%; height:14px; margin:8px 0 14px; }
#mic-volume::-webkit-meter-bar { background:#253c4b; border:0; border-radius:4px; }
#mic-volume::-webkit-meter-optimum-value { background:linear-gradient(90deg,#47bdf2,#8df1b3); }
#mic-source-label { max-width:100%; }
#mic-source { min-width:0; }
#advanced-tools #mic-test { min-height:44px; border-color:#5cadd3; background:#103b55; }
@media(max-width:600px) and (orientation:portrait) {
  #touch-test.audio-view { flex:1 0 auto; min-height:min-content; }
  .audio-view .touch-instrument { width:min(100%,38dvh); }
}
@media(prefers-reduced-motion:no-preference) {
  @keyframes gyro-direction { 0%,12% { stroke-dashoffset:.45; opacity:.78; } 52%,100% { stroke-dashoffset:0; opacity:1; } }
  .gyro-view[data-gyro-phase="ready"] #gyro-arrow > path { stroke-dasharray:1; animation:gyro-direction 2.8s ease-in-out .6s infinite; }
}
#touch-photo { width:100%; height:100%; display:block; object-fit:contain; }
#touch-test[data-model="ds4"] #dual-surface { left:35%; top:10.5%; width:31.2%; height:26%; border-radius:5% 5% 9% 9%; }
#touch-plane #dual-surface { background-color:#17779815; transition:background-color .16s; }
#touch-plane #dual-surface.pressed { background-color:#5cddba66; }
#touch-plane #dual-surface b { z-index:2; width:5%; box-shadow:0 0 0 1px #f5fcff,0 0 4px #123848; }
/* The guide illustrates the action; contact dots and audio levels come from the device. */
.gesture-definitions { position:absolute; pointer-events:none; }
.action-art {
  display:none; position:absolute; inset:0; width:100%; height:100%; z-index:2;
  pointer-events:none; overflow:visible; color:#abedff;
  filter:drop-shadow(0 1px 1.5px #07121cc9);
}
.action-art :is(.pad-example,.swipe-example,.pair-example,.click-example,.voice-example,.grip-example,.voice-check,.voice-halo) { display:none; }
#touch-test:is([data-phase="swipe"],[data-phase="pair"],[data-phase="click"],[data-audio="mic"],[data-audio="vibration"]) .action-art,
#touch-test:is([data-phase="swipe"],[data-phase="pair"],[data-phase="click"]) .pad-example,
#touch-test[data-phase="swipe"] .swipe-example,
#touch-test[data-phase="pair"] .pair-example,
#touch-test[data-phase="click"] .click-example,
#touch-test[data-audio="mic"] .voice-example,
#touch-test[data-audio="vibration"] .grip-example { display:block; }
.action-art .cue-line { fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; paint-order:stroke; filter:drop-shadow(0 0 1px #10303f); }
.swipe-example .sliding-finger { transform:translateX(-34px); }
.touch-window:has(#dual-surface b:not([hidden])) :is(.swipe-example,.click-example) { opacity:.40; }
.touch-window:has(#dual-surface b:not([hidden])) .pair-example { opacity:.80; }
.touch-window:not(.ds-ready) .voice-example { transform:translate(180px,143px); }
.voice-waves path { opacity:.65; }
.voice-target { color:#a8e7ff; }
#touch-test:has(#mic-test-block[data-listening]) .voice-halo {
  display:block; transform:scale(calc(.8 + var(--voice-level,0)*.7));
  opacity:var(--voice-level,0);
}
#touch-test:has(#mic-test-block[data-verified]) .voice-target { color:#93f1bc; }
#touch-test:has(#mic-test-block[data-verified]) :is(.voice-mic,.voice-waves) { display:none; }
#touch-test:has(#mic-test-block[data-verified]) .voice-check { display:block; }
.motor-cue { color:#a5bfce; }
.motor-core { fill:#101c27e6; stroke:currentColor; stroke-width:1.2; }
.motor-ring { fill:none; stroke:currentColor; stroke-width:1.8; opacity:0; }
#touch-test:not([data-motors="general"]) .motor-general,
#touch-test[data-motors="general"] :is(.motor-left,.motor-right) { display:none; }
#touch-test:is([data-pulse="left"],[data-pulse="both"]) .motor-left,
#touch-test:is([data-pulse="right"],[data-pulse="both"]) .motor-right,
#touch-test[data-pulse="general"] .motor-general {
  color:#95f5cf; --ring-opacity:.85; --core-fill:#185946;
  --ring-motion:motor-wave 650ms ease-out infinite; --wave-motion:motor-tick 140ms ease-in-out infinite alternate;
}
.motor-cue .motor-core { fill:var(--core-fill,#101c27e6); }
.motor-cue .motor-ring { opacity:var(--ring-opacity,0); }
@media(prefers-reduced-motion:no-preference) {
  .motor-ring { animation:var(--ring-motion,none); }
  .motor-cue use { animation:var(--wave-motion,none); }
  @keyframes motor-wave { from { transform:scale(.76); opacity:.88; } to { transform:scale(1.32); opacity:0; } }
  @keyframes motor-tick { from { transform:translateX(-1px); } to { transform:translateX(1px); } }
}
#controller-model .trigger-finger,.meter-finger { display:none; pointer-events:none; }
#trigger-test:has(.trigger-channel[data-show-finger]) #controller-model:is([data-view="l2"],[data-view="r2"]) .trigger-finger {
  display:block; position:absolute; top:53%; left:50%; width:clamp(34px,11%,58px); height:auto;
  transform-origin:36% 5%; transform:translateX(-36%) rotate(-42deg);
  filter:drop-shadow(0 2px 3px #0b1827aa);
}
#controller-model[data-view="r2"] .trigger-finger { scale:-1 1; }
#trigger-test:not(.has-trigger-model) .trigger-channel[data-show-finger] .meter-finger {
  display:block; position:absolute; width:clamp(19px,18%,32px); top:52%; right:5%; transform:rotate(-34deg);
}
@media(prefers-reduced-motion:no-preference) {
  .swipe-example .sliding-finger { animation:guide-swipe 2.3s ease-in-out infinite; }
  .pair-example .landing-fingers,.click-example .click-finger { animation:guide-land 2s ease-in-out infinite; }
  #touch-test:has(#mic-test-block[data-listening]) .voice-waves path { animation:guide-sound 1.45s ease-in-out var(--sound-delay,0s) infinite; }
  .voice-waves path:nth-child(2) { --sound-delay:.14s; }
  .voice-waves path:nth-child(3) { --sound-delay:.28s; }
  .trigger-finger use,.meter-finger use { animation:guide-land 1.8s ease-in-out infinite; }
  @keyframes guide-swipe {
    0%,15% { transform:translate(-34px,2px); }
    68%,82% { transform:translate(31px,2px); opacity:1; }
    91% { transform:translate(31px,10px); opacity:0; }
    92% { transform:translate(-34px,10px); opacity:0; }
  }
  @keyframes guide-land {
    0%,100% { transform:translateY(7px); opacity:.8; }
    34%,73% { transform:translateY(0); opacity:1; }
  }
  @keyframes guide-sound { 0%,85%,100% {opacity:.45;} 40% {opacity:1;} }
}
@media(prefers-reduced-motion:reduce) {
  #touch-test:has(#mic-test-block[data-listening]) .voice-halo { transform:none; }
}

#touch-feedback { display:grid; place-items:center; min-height:1.6em; }
#touch-feedback .press-note { position:relative; transform:none; display:inline-block; animation:stick-message 1s ease-out both; }
@media(max-width:600px) and (orientation:portrait) {
  #touch-test { grid-template-columns:1fr; gap:14px; }
  .touch-instrument { grid-row:1; width:min(100%,53dvh); }
  .touch-directions { padding-inline:4px; }
  .touch-steps { margin-bottom:9px; }
}
@media(max-height:460px) and (orientation:landscape) {
  .touch-instrument { width:min(100%,70dvh); }
  #advanced-tools #touch-help { font-size:15px; }
}
@media(prefers-reduced-motion:reduce) {
  #touch-test #touch-plane { animation:none; }
  #touch-feedback .press-note { animation-name:press-still; }
}

/* A single canvas follows the active instrument. The measurement overlays remain in place. */
#controller-model { position:relative; min-width:0; isolation:isolate; pointer-events:none; }
#controller-model[hidden],#summary-model:not(.ds-ready),#cal-model-overview:not(.ds-ready) { display:none; }
#controller-model > canvas,#controller-model .model-labels { position:absolute; inset:0; display:block; width:100%; height:100%; }
.model-key,.model-contact { position:absolute; transform:translate(-50%,-50%); }
.model-key { color:#293542; font:700 clamp(11px,1.35vw,19px)/1 system-ui; text-shadow:0 1px 2px #ffffff8a; white-space:nowrap; }
.model-key:is([data-key="4"],[data-key="5"],[data-key="6"],[data-key="7"],[data-key="10"],[data-key="11"],[data-key="16"]) { font-size:clamp(10px,.8vw,13px); color:#f0f7fb; text-shadow:0 1px 3px #03101a; }
.model-key.down,.model-key.complete { color:#fff; text-shadow:0 0 3px #12352a,0 1px 3px #09191f; }
[data-model="series"] .model-key { color:#e5edf3; text-shadow:0 1px 2px #08121c; }
[data-model="series"] .model-key[data-key="0"] { color:#9bea70; }
[data-model="series"] .model-key[data-key="1"] { color:#ff7c78; }
[data-model="series"] .model-key[data-key="2"] { color:#79bffc; }
[data-model="series"] .model-key[data-key="3"] { color:#ffd86d; }
[data-model="series"] .model-key.complete { color:white; }
.model-key.next-key { outline:2px solid #72d7ff; outline-offset:3px; border-radius:50%; }
.model-key[hidden],.model-contact[hidden] { display:none; }
.model-contact { width:14px; aspect-ratio:1; border:2px solid white; border-radius:50%; background:#1676b6; box-shadow:0 0 0 4px #53c9ff4d; }
.model-contact[data-key="20"] { background:#6655ac; }
#dual-stage.ds-ready > .dual-body,#series-stage.ds-ready > .overview-instrument,.has-trigger-model #shoulder-photo,:is(#dual-stage,#series-stage):not(.ds-ready) > .model-credit { display:none; }
:is(#dual-stage,#series-stage) .model-credit { display:inline-block; margin-top:8px; font-size:12px; color:#a8bdcc; }
#controller-model .trigger-peek { display:none; }
:is(#dual-stage,#series-stage).ds-ready > #controller-model {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:clamp(74px,9vw,104px) minmax(0,1fr);
  width:min(100%,660px); height:clamp(285px,38vw,430px); margin:auto;
}
:is(#dual-stage,#series-stage).ds-ready .model-labels { position:relative; inset:auto; grid-area:2/1/3/3; }
:is(#dual-stage,#series-stage).ds-ready .trigger-peek {
  position:relative; grid-row:1; display:flex; align-items:center; justify-content:center;
  gap:clamp(2px,1vw,12px); min-width:0;
}
.trigger-peek[data-side="l2"] { grid-column:1; flex-direction:row-reverse; }
.trigger-peek[data-side="r2"] { grid-column:2; }
.trigger-angle { width:clamp(72px,11vw,132px); height:100%; }
.trigger-reading { min-width:54px; color:#e7f5ff; font-weight:700; font-size:14px; font-variant-numeric:tabular-nums; }
.trigger-reading span { display:flex; align-items:baseline; justify-content:space-between; gap:5px; white-space:nowrap; }
.trigger-reading b { font-size:12px; color:#9fc4d5; }
.trigger-reading meter { display:block; width:100%; height:4px; margin-top:5px; appearance:none; background:#2b3c49; border:0; border-radius:2px; }
.trigger-reading meter::-webkit-meter-bar { background:#2b3c49; border:0; border-radius:2px; height:4px; }
.trigger-reading meter::-webkit-meter-optimum-value { background:#65d6ff; }
.trigger-reading meter::-moz-meter-bar { background:#65d6ff; }
.model-key[data-key="8"] { min-width:6px; min-height:8px; }
#test-scene.ds-ready > #test-instrument { visibility:hidden; position:absolute; }
#test-scene.ds-ready > #controller-model { width:min(100%,850px); height:100%; }
.stick-instrument.ds-ready { display:grid; grid-template-columns:minmax(0,1fr); }
.stick-instrument.ds-ready > svg,.stick-instrument.ds-ready > #controller-model { grid-area:1/1; }
.stick-instrument.ds-ready > svg { position:relative; z-index:1; pointer-events:none; }
.stick-instrument.ds-ready > .stick-feedback { grid-row:2; }
.ds-ready .stick-photo { visibility:hidden; }
#cal-visuals.ds-ready,#cal-review.ds-ready { position:relative; isolation:isolate; }
#cal-visuals.ds-ready > #controller-model,#cal-review.ds-ready > #controller-model { position:absolute; inset:0 0 28px; }
#cal-visuals.ds-ready .stick-instrument,#cal-review.ds-ready .cal-result { position:relative; z-index:1; }
#cal-review.ds-ready .cal-field { fill:#0d1525; fill-opacity:.35; }
#cal-model-overview.ds-ready > #controller-model { aspect-ratio:3/2; }
#cal-model-overview.ds-ready + .cal-overview { display:none; }
#summary-model.ds-ready { max-width:440px; width:100%; margin-inline:auto; }
#summary-model.ds-ready > #controller-model { height:clamp(95px,20dvh,165px); }
.touch-window.ds-ready > .touch-viewport { visibility:hidden; }
.touch-window.ds-ready > #controller-model { position:absolute; inset:0; }
.touch-window.ds-ready > #gyro-arrow { z-index:1; }
.stick-instrument.ds-ready > #controller-model,.touch-window.ds-ready > #controller-model,
#cal-visuals.ds-ready > #controller-model,#cal-review.ds-ready > #controller-model {
  mask-image:linear-gradient(90deg,transparent,#000 13%,#000 87%,transparent),
    linear-gradient(0deg,transparent,#000 16%,#000 86%,transparent);
  mask-composite:intersect;
}



#controller-options:has(#pickers[hidden]), #controller-options:not(.compact) > summary { display:none; }
#controller-options.compact > summary {
  width:fit-content; padding:5px 0; color:#bacfdd; font-size:14px; cursor:pointer;
}
#controller-options.compact > summary:hover { color:#e1f5ff; }

#discovery {
  --pad-size:min(100%,clamp(300px,47vw,500px));
  --pad-gap:clamp(16px,3vw,40px);
  --pad-ease:cubic-bezier(.4,0,.2,1);
  text-align:center;
}
/* Reserve the status line so a browser permission prompt doesn't shift the controller. */
.bench:has(#discovery:not([hidden])) #connection { transition:opacity .35s ease; }
.bench:has(#discovery:not([hidden]):is([data-state="waiting"],[data-state="ready"])) #connection {
  opacity:0;
}
.discovery-stage { position:relative; display:grid; padding:clamp(10px,2vh,24px) 0 14px; }
.discovery-stage > * { grid-area:1 / 1; align-self:center; }
#discovery[data-state="blocked"] .discovery-stage { display:none; }
#pad-standby {
  width:var(--pad-size); margin-inline:auto; pointer-events:none; opacity:0; visibility:hidden;
  transition:opacity .65s var(--pad-ease),visibility 0s linear .65s;
}
#discovery[data-state="waiting"] #pad-standby { opacity:1; visibility:visible; transition-delay:0s; }
.pad-reliefs { display:block; width:100%; height:auto; }
.pad-imprint { opacity:0; animation:pad-cycle 18s ease-in-out infinite paused; }
#discovery[data-state="waiting"] .pad-imprint { animation-play-state:running; }
.pad-imprint:nth-of-type(2) { animation-delay:-12s; }
.pad-imprint:nth-of-type(3) { animation-delay:-6s; }
/* Complementary 1.8 s fades keep a visible outline throughout the change of model. */
@keyframes pad-cycle { 0%,23.333%,100% { opacity:1; } 33.333%,90% { opacity:0; } }
.pad-invitation {
  display:inline-flex; gap:14px; align-items:center; margin-top:14px;
  font-size:clamp(14px,1.2vw,17px); font-weight:700; letter-spacing:.17em; text-transform:uppercase; color:#e3edf4;
}
.pad-invitation::before,.pad-invitation::after { content:""; width:24px; height:1px; background:#587687; }
.detected-pads { display:flex; flex-wrap:wrap; justify-content:center; align-items:start; gap:var(--pad-gap); }
.detected-pads:empty { display:none; }
.bench .pad-card,.pad-echo {
  --pad-accent:#b9ceda; display:grid; justify-items:center; align-content:start;
  width:min(340px,calc((100% - var(--pad-gap)) / 2)); min-width:0; padding:0;
  border:0; border-radius:0; background:transparent; color:#f1f5fa; text-align:center;
}
.bench .pad-card { transform-origin:top left; animation:pad-arrival .65s var(--pad-ease); }
.discovery-stage > .pad-echo { position:absolute; grid-area:auto; pointer-events:none; margin:0; }
.pad-echo { animation:pad-departure .65s var(--pad-ease) both; }
@keyframes pad-departure { from { opacity:var(--from-opacity,1); } to { opacity:0; } }
@keyframes pad-arrival { from { opacity:0; } to { opacity:1; } }
#live-desk:not([hidden]) { animation:pad-arrival .42s ease-out; }
.bench .pad-card:only-child { width:var(--pad-size); }
.bench .pad-card:not(:disabled):hover { background:transparent; }
:is(.pad-card,.pad-echo)[data-family="ps"] { --pad-accent:#83cdf9; }
:is(.pad-card,.pad-echo)[data-family="xbox"] { --pad-accent:#84dea7; }
.pad-preview { display:grid; place-items:center; width:100%; aspect-ratio:8 / 5; transition:transform .32s var(--pad-ease); }
.pad-preview img { display:block; height:100%; width:100%; min-height:0; object-fit:contain; }
.pad-preview .unknown-pad { color:var(--pad-accent); font-size:64px; }
.pad-caption { display:inline-flex; align-items:baseline; justify-content:center; gap:9px; margin-top:12px; padding:2px 6px; }
.pad-caption strong { font-size:clamp(16px,2vw,24px); overflow-wrap:anywhere; transition:color .25s ease; }
.pad-caption small { display:block; color:#bbcad6; font-size:13px; }
.pad-caption i { font:normal 20px system-ui; color:var(--pad-accent); }
.bench .pad-card:focus-visible { outline:none; }
.pad-card:focus-visible .pad-caption { outline:2px solid var(--pad-accent); outline-offset:4px; }
.pad-card:is(:hover,:focus-visible) .pad-caption strong { color:var(--pad-accent); }
@media(hover:hover) {
  .pad-card:not(:disabled):hover .pad-preview { transform:translateY(-2px); }
}
.pad-card:not(:disabled):active .pad-preview { transform:scale(.995); }
#discovery-help { margin:12px auto; width:fit-content; max-width:100%; }
#discovery-help summary { width:fit-content; margin:auto; padding:10px 2px; cursor:pointer; color:#b8ccdb; }
#discovery-help p { margin:2px 0 10px; }
@media(prefers-reduced-motion:reduce) {
  .pad-imprint,.bench .pad-card,#live-desk:not([hidden]) { animation:none; }
  .pad-echo { display:none; }
  .pad-imprint:first-of-type { opacity:1; }
  #pad-standby,.pad-preview,.pad-caption strong,.bench:has(#discovery:not([hidden])) #connection { transition:none; }
  .pad-card:not(:disabled):is(:hover,:active) .pad-preview { transform:none; }
}

/* Photographic Xbox Series instrument; the meter and the photograph share one pressure reading. */
.controller-overview[data-profile="series"] .overview-instrument {
  width:min(100%,560px, max(360px,calc((100dvh - 310px)*1.22)));
}
.controller-overview[data-profile="series"] .trigger-reading {
  display:grid; grid-template-columns:auto auto; align-items:center; justify-content:center;
  column-gap:7px; font-variant-numeric:tabular-nums;
}
.controller-overview[data-profile="series"] .trigger-reading span:not(.series-trigger-photo) {
  display:grid; gap:1px; min-width:34px; justify-items:start; line-height:1.15;
}
.controller-overview[data-profile="series"] .shoulder-set:last-child .trigger-reading > span:last-of-type {
  grid-column:1; grid-row:1; justify-items:end;
}
.controller-overview[data-profile="series"] .series-trigger-photo {
  display:block; position:relative; width:clamp(35px,7vw,58px); aspect-ratio:207/214;
  background:var(--picture) center / contain no-repeat;
  filter:drop-shadow(0 0 1px #afc1cc);
}
.controller-overview[data-profile="series"] .shoulder-set:last-child .series-trigger-photo { grid-column:2; grid-row:1; }
.series-trigger-photo::after {
  content:""; position:absolute; inset:0; mask:var(--picture) center / contain no-repeat;
  background:linear-gradient(to top, #2eb982b3, #8ef0a4db);
  clip-path:inset(calc((1 - var(--pressure,0))*100%) 0 0);
}
.controller-overview[data-profile="series"] .trigger-reading meter {
  position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden;
}
.controller-overview[data-profile="series"] .photo { margin-top:2px; }
.controller-overview[data-profile="series"] .photo .series-footprint {
  background:#6beb9b80; border:1.5px solid #b1f4c8; box-shadow:none;
}
.series-footprint[data-input="17"] { border-radius:40%; }
.controller-overview[data-profile="series"] .photo .stick-pin { background:#a5f2bc; border-color:#2c593d; box-shadow:0 0 0 1px #c4f1d2; }
.controller-overview .photo .series-footprint:is([data-input="12"],[data-input="13"],[data-input="14"],[data-input="15"]) { border-radius:25%; }
/* Mirror around the active physical trigger to match the frontal player orientation. */
#shoulder-photo[data-profile="series"] img {
  transform:translate(calc(-1 * var(--shoulder-x)),calc(-1 * var(--shoulder-y))) scaleX(-1);
}
#shoulder-photo[data-profile="series"][data-side="left"] img {
  mask-image:linear-gradient(to left,#000 38%,transparent 42%);
}
#shoulder-photo[data-profile="series"][data-side="right"] img {
  mask-image:linear-gradient(to right,#000 38%,transparent 42%);
}
.series-photo-credit { font-size:12px; color:#a8bdcc; justify-self:start; }
#series-summary-photo { display:block; width:auto; max-width:100%; height:clamp(95px,20dvh,165px); object-fit:contain; margin-inline:auto; }
