/* Mirrored verbatim in MEDscience. Shared panel dimensions; scene cameras are independent. */
:is(body,#ms-foundations) .robot-controls.platform-controls{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;width:408px;max-width:calc(100% - 24px);padding:16px 20px;gap:20px;border:1px solid #ffffff26;border-radius:22px;background:#112128ed;color:#d5e3e2;font:13px system-ui;backdrop-filter:blur(12px)}
:is(body,#ms-foundations) .platform-controls[hidden],:is(body,#ms-foundations) .platform-controls [hidden]{display:none!important}
:is(body,#ms-foundations) .platform-controls .controller-guide{width:146px;flex:0 0 146px;align-self:center}
:is(body,#ms-foundations) .platform-controls .compact-gamepad{position:relative;width:146px;height:101px;flex:0 0 146px}
:is(body,#ms-foundations) .platform-controls .compact-gamepad>img,:is(body,#ms-foundations) .platform-controls .compact-gamepad>svg{width:100%;height:100%;pointer-events:none}
:is(body,#ms-foundations) .platform-controls .controller-tools{display:flex;flex-direction:column;gap:9px;min-width:0;flex:1}
:is(body,#ms-foundations) .platform-controls :is(.robot-control-row,.robot-instrument-row,.robot-instrument-picker){display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:8px;margin:0}
:is(body,#ms-foundations) .platform-controls .controller-tools button{box-sizing:border-box;flex:0 0 42px;width:42px;min-width:42px;height:42px;min-height:42px;padding:8px;border:0;border-radius:9px;background:transparent;color:inherit;font:15px system-ui;touch-action:none;cursor:pointer}
:is(body,#ms-foundations) .platform-controls .controller-tools button[aria-pressed=true]{background:#8effcc12;color:var(--panel-accent,#91ffd1)}
:is(body,#ms-foundations) .platform-controls .controller-tools svg{width:26px;height:26px;display:block}
:is(body,#ms-foundations) .platform-controls .robot-drape{display:flex;align-items:center;gap:8px;height:24px;margin:0;padding:0;font:12px system-ui;color:inherit}
:is(body,#ms-foundations) .platform-controls .robot-drape input{appearance:none;-webkit-appearance:none;flex:1;width:0;min-width:35px;height:24px;margin:0;background:transparent;outline:none}
:is(body,#ms-foundations) .platform-controls .robot-drape output{width:32px;flex:0 0 32px;text-align:right;font-variant-numeric:tabular-nums}
:is(body,#ms-foundations) .platform-controls input::-webkit-slider-runnable-track{height:3px;background:#53776a;border-radius:3px}
:is(body,#ms-foundations) .platform-controls input::-webkit-slider-thumb{-webkit-appearance:none;width:12px;height:12px;border-radius:50%;background:var(--panel-accent,#8fffd0);margin-top:-4.5px}
:is(body,#ms-foundations) .platform-controls input::-moz-range-track{height:3px;background:#53776a;border-radius:3px}
:is(body,#ms-foundations) .platform-controls input::-moz-range-thumb{width:12px;height:12px;border:0;border-radius:50%;background:var(--panel-accent,#8fffd0)}
:is(body,#ms-foundations) .platform-controls .robot-input-hint{margin-top:5px;font:9px/1.3 system-ui}
:is(body,#ms-foundations) .platform-controls .website-stick{display:grid;place-items:center;position:absolute;top:35%;width:32px;height:32px;min-height:0;padding:0;border:1px solid #58636c;border-radius:50%;background:#11181d;touch-action:none}
:is(body,#ms-foundations) .platform-controls .website-stick>span{display:block;width:22px;height:22px;border-radius:50%;background:radial-gradient(circle at 35% 25%,#56626b,#252e35);border:1px solid #78848d;pointer-events:none}
:is(body,#ms-foundations) .platform-controls .stick-turn{left:23%}:is(body,#ms-foundations) .platform-controls .stick-depth{left:55%}
#ms-foundations .platform-controls{--panel-accent:#d0da31}
@media(max-width:767px){:is(body,#ms-foundations) .robot-controls.platform-controls{width:360px;padding:10px;gap:10px}:is(body,#ms-foundations) .platform-controls .controller-guide{width:112px;flex-basis:112px}:is(body,#ms-foundations) .platform-controls .compact-gamepad{width:112px;height:80px;flex-basis:112px}:is(body,#ms-foundations) .platform-controls .controller-tools button{width:36px;min-width:36px;height:36px;min-height:36px;flex-basis:36px;padding:6px}:is(body,#ms-foundations) .platform-controls :is(.robot-control-row,.robot-instrument-row,.robot-instrument-picker){gap:4px}}
:is(body,#ms-foundations) .platform-controls>.panel-drag-grip{position:absolute;top:0;left:calc(50% - 18px);width:36px;height:16px;min-height:16px;padding:0;border:0;border-radius:0;background:transparent;color:#94aaa8;font:16px/16px system-ui;cursor:grab;touch-action:none;z-index:2}
:is(body,#ms-foundations) .platform-controls>.panel-drag-grip:active{cursor:grabbing}
:is(body,#ms-foundations) .platform-controls>.panel-drag-grip:focus-visible{outline:1px solid var(--panel-accent,#8fffd0)}
/* Align with the endoscope's horizontal centre, retaining each scene's height. */
:is(body,#ms-foundations) .product-journey .robot-controls.platform-controls{left:auto;right:max(12px,calc(4% + min(16vw,30vh) - 204px))}
body.workshop .robot-controls.platform-controls{left:4%;right:auto}
@media(max-width:767px){:is(body,#ms-foundations) .product-journey .robot-controls.platform-controls{left:auto;right:12px}}
:is(body,#ms-foundations) .platform-controls>.panel-drag-grip>span{display:block;width:24px;height:2px;margin:6px auto;background:#94aaa866;border-radius:2px}
:is(body,#ms-foundations) .platform-controls .controller-tools button:disabled{opacity:.3;cursor:default}
/* Mobile simulator: one continuous scene and fixed controller, native page scroll. */
@media(max-width:767px){
 :is(body,#ms-foundations) .student-product.product-journey{height:auto}
 :is(body,#ms-foundations) .student-product .product-stage{position:relative;height:auto;min-height:0;padding:0;overflow:visible}
 :is(body,#ms-foundations) .student-product .product-layout{position:relative;inset:auto;width:100%;display:flex;flex-direction:column;height:auto;gap:0}
 :is(body,#ms-foundations) .student-product .product-editorial{position:relative;inset:auto;width:100%;max-width:none;min-height:0;padding:28px 6% 20px;box-sizing:border-box;text-align:center;order:0;flex:none}
 :is(body,#ms-foundations) .student-product .product-copy h2.title-text{font-size:28px;line-height:1.1;margin:0 0 12px;text-align:center}
 :is(body,#ms-foundations) .student-product .product-copy p.sub-title-text{position:static;font-size:16px;line-height:1.4;max-width:32ch;margin:0 auto;text-align:center}
 :is(body,#ms-foundations) .student-product .product-view{touch-action:pan-y;position:relative;inset:auto;order:1;width:100%;height:auto;display:grid;grid-template-rows:calc(56.25vw + 300px) auto;min-height:0;max-height:none;flex:none;margin:0}
 :is(body,#ms-foundations) .student-product .product-view iframe{position:relative;inset:auto;grid-row:1;width:100%;height:100%;pointer-events:auto;touch-action:none}
 :is(body,#ms-foundations) .student-product .robot-controls.platform-controls{position:relative;inset:auto;grid-row:2;transform:none;order:2;width:100%;max-width:none;border-radius:0;border-width:1px 0 0;box-shadow:none;padding:12px;gap:10px;display:grid;grid-template-columns:146px minmax(0,1fr);touch-action:pan-y}
 :is(body,#ms-foundations) .platform-controls .controller-guide{width:146px;flex-basis:146px}
 :is(body,#ms-foundations) .platform-controls .compact-gamepad{width:146px;height:101px;display:block}
 :is(body,#ms-foundations) .platform-controls .compact-gamepad>img{display:block}
 :is(body,#ms-foundations) .platform-controls .website-stick{position:absolute;top:35%;width:44px;height:44px;border-radius:50%;background:#11181d;transform:translate(-6px,-6px)}
 :is(body,#ms-foundations) .platform-controls .stick-turn{left:23%}
 :is(body,#ms-foundations) .platform-controls .stick-depth{left:55%}
 :is(body,#ms-foundations) .platform-controls .controller-tools{gap:5px}
 :is(body,#ms-foundations) .platform-controls .controller-tools button{width:36px;min-width:36px;height:40px;min-height:40px;flex-basis:36px;padding:6px;touch-action:pan-y}
 :is(body,#ms-foundations) .platform-controls .controller-tools svg{width:24px;height:24px}
 :is(body,#ms-foundations) .platform-controls .robot-drape:has([data-robot-drape]){display:none}
 :is(body,#ms-foundations) .platform-controls .robot-drape:has([data-curette-depth]){display:flex;height:44px}
 :is(body,#ms-foundations) .platform-controls [data-curette-depth]{height:44px;touch-action:none}
 :is(body,#ms-foundations) .platform-controls .robot-input-hint{display:grid;grid-template-columns:1fr 1fr;font-size:10px;text-align:center;margin-top:5px}
 :is(body,#ms-foundations) .platform-controls .hint-keys{display:none}
 :is(body,#ms-foundations) .platform-controls .mobile-simulator-modes{grid-column:1/-1;grid-row:2;display:flex;flex-wrap:nowrap;gap:8px;justify-content:space-between;margin:8px 0 8px;width:100%;max-width:none;pointer-events:auto}
 :is(body,#ms-foundations) .platform-controls .mobile-simulator-modes button{flex:1;min-width:0;min-height:44px;padding:8px 4px;border:1px solid #ffffff25;border-radius:8px;background:transparent;color:#c5d5d0;font:12px system-ui;touch-action:pan-y}
 :is(body,#ms-foundations) .platform-controls .mobile-simulator-modes button[aria-pressed=true]{background:#8fffd014;color:var(--panel-accent,#8fffd0);border-color:var(--panel-accent,#8fffd0)}

 :is(body,#ms-foundations) .product-journey .panel-drag-grip{display:none}
}


@media(max-width:767px){:is(body,#ms-foundations) .platform-controls .robot-input-hint{justify-content:space-between;grid-template-columns:auto auto}:is(body,#ms-foundations) .platform-controls .robot-input-hint>span{display:flex;align-items:center;gap:3px}:is(body,#ms-foundations) .platform-controls .robot-input-hint svg{width:12px;height:12px}}

/* Mobile insertion uses the same native range input, with a generous vertical grip. */
@media(max-width:767px){
 :is(body,#ms-foundations) .student-product .platform-controls .robot-drape:has([data-curette-depth]){display:grid;grid-template-columns:minmax(0,1fr) 44px 36px;align-items:center;height:116px;gap:8px}
 :is(body,#ms-foundations) .student-product .platform-controls [data-curette-depth]{writing-mode:vertical-lr;direction:rtl;appearance:none;-webkit-appearance:none;width:44px;min-width:44px;height:112px;min-height:112px;flex:none;touch-action:none;cursor:ns-resize}
 :is(body,#ms-foundations) .student-product .platform-controls [data-curette-depth]::-webkit-slider-runnable-track{width:6px;height:100%;border-radius:6px}
 :is(body,#ms-foundations) .student-product .platform-controls [data-curette-depth]::-webkit-slider-thumb{width:24px;height:24px;margin-top:0;margin-left:-9px;box-shadow:0 0 0 8px #8fffd014}
 :is(body,#ms-foundations) .student-product .platform-controls [data-curette-depth]::-moz-range-track{width:6px;height:100%}
 :is(body,#ms-foundations) .student-product .platform-controls [data-curette-depth]::-moz-range-thumb{width:24px;height:24px}
 :is(body,#ms-foundations) .student-product .platform-controls .robot-drape:has([data-curette-depth]) output{width:36px;font-size:12px;white-space:nowrap}
}

/* Keep insertion beside the button rows, within their existing height. */
@media(max-width:767px){
 :is(body,#ms-foundations) .student-product .robot-controls.platform-controls{grid-template-columns:minmax(0,146px) minmax(192px,1fr);padding:8px;gap:24px}
 :is(body,#ms-foundations) .student-product .platform-controls .controller-guide{width:100%;position:relative;top:10px}
 :is(body,#ms-foundations) .student-product .platform-controls .compact-gamepad{width:100%;height:auto;aspect-ratio:146/101}
 :is(body,#ms-foundations) .student-product .platform-controls .controller-tools{display:grid;grid-template-columns:minmax(0,1fr) 32px;gap:10px;align-items:center}
 :is(body,#ms-foundations) .student-product .platform-controls .controller-tools>div{grid-column:1}
 :is(body,#ms-foundations) .student-product .platform-controls .controller-tools button{width:36px;min-width:36px;flex-basis:36px;padding:6px}
 :is(body,#ms-foundations) .student-product .platform-controls .robot-drape:has([data-curette-depth]){grid-column:2;grid-row:1/span 2;display:flex;flex-direction:column;justify-content:center;gap:3px;width:32px;height:104px;font-size:9px;transform:translateY(8px)}
 :is(body,#ms-foundations) .student-product .platform-controls [data-curette-depth]{width:32px;min-width:32px;height:72px;min-height:72px}
 :is(body,#ms-foundations) .student-product .platform-controls .robot-drape:has([data-curette-depth]) output{text-align:center;font-size:10px}
}

@media(max-width:767px){:is(body,#ms-foundations) .student-product .product-view iframe{pointer-events:auto!important}}
@media(max-width:767px){
 :is(body,#ms-foundations) .student-product .platform-controls .controller-tools>[data-instrument-controls]{display:contents}
 :is(body,#ms-foundations) .student-product .platform-controls .controller-tools :is(.robot-control-row,.robot-instrument-row,.robot-instrument-picker){gap:2px}
 :is(body,#ms-foundations) .student-product .platform-controls .controller-tools .robot-control-row{grid-column:1;grid-row:1}
 :is(body,#ms-foundations) .student-product .platform-controls .controller-tools .robot-instrument-row{grid-column:1;grid-row:2}
}

/* Desktop insertion: breathing room beneath the instrument buttons. */
@media(min-width:768px){:is(body,#ms-foundations) .student-product .platform-controls .robot-drape:has([data-curette-depth]){margin-top:6px}}
