/* AIM STEM LAB v0.27.256 — phone lab gate + shared PC/tablet compatibility layer. */
html.aim-device-modal-open{overflow:hidden!important}
.aim-device-gate[hidden]{display:none!important}
.aim-device-gate{position:fixed;inset:0;z-index:2147483000;display:grid;place-items:center;padding:22px;background:rgba(7,24,34,.58);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.aim-device-gate-card{width:min(560px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;background:#fff;border:1px solid #dbe5e9;border-radius:26px;padding:28px;box-shadow:0 30px 80px rgba(4,24,35,.28);color:#14374a}
.aim-device-gate-visual{height:92px;border-radius:20px;background:linear-gradient(135deg,#f7eaed,#eef8f7);display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:20px;color:#a60f26;font-size:36px;font-weight:900}
.aim-device-gate-visual .plus{font-size:18px;color:#68808d}.aim-device-gate-visual .tablet{color:#179e8e}
.aim-device-gate-kicker{display:block;color:#aa1128;font-size:.72rem;font-weight:900;letter-spacing:.14em;margin-bottom:8px}
.aim-device-gate h2{margin:0 0 10px;font-size:clamp(1.65rem,5vw,2.25rem);line-height:1.05;color:#0e344a}.aim-device-gate p{margin:0;color:#617987;line-height:1.6;font-size:.96rem}
.aim-device-gate-supported{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:20px 0}.aim-device-gate-supported span{display:grid;gap:3px;border:1px solid #d9e4e8;border-radius:14px;padding:13px 14px;background:#fbfdfd}.aim-device-gate-supported b{font-size:.86rem;color:#173d50}.aim-device-gate-supported small{color:#728995;font-size:.74rem}
.aim-device-gate-note{display:grid;gap:4px;border-left:4px solid #1b9e8c;background:#f1faf8;border-radius:12px;padding:13px 14px;margin-bottom:20px}.aim-device-gate-note strong{color:#126f63}.aim-device-gate-note span{color:#58727f;font-size:.82rem;line-height:1.45}
.aim-device-gate-actions{display:flex;gap:10px;flex-wrap:wrap}.aim-device-gate-actions a,.aim-device-gate-actions button{min-height:46px;border-radius:12px;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font:800 .88rem/1 inherit;cursor:pointer}.aim-device-gate-actions .primary{background:#b20f29;color:#fff;border:1px solid #a40d25}.aim-device-gate-actions button{background:#fff;color:#173d50;border:1px solid #d5e0e5}
html.aim-device-lab-blocked body>*:not(.aim-device-gate){display:none!important}html.aim-device-lab-blocked body{overflow:hidden!important;background:#eef4f6!important;min-height:100dvh}
@media(max-width:460px){.aim-device-gate{padding:12px}.aim-device-gate-card{padding:22px 18px;border-radius:22px}.aim-device-gate-supported{grid-template-columns:1fr}.aim-device-gate-actions>*{width:100%}}

/* Shared tablet / desktop guard rails. Individual labs still own their internal design. */
html.aim-formfactor-tablet,html.aim-formfactor-desktop,html.aim-formfactor-tablet body,html.aim-formfactor-desktop body{max-width:100%;min-width:0}
html.aim-formfactor-tablet body,html.aim-formfactor-desktop body{overflow-x:hidden}
html.aim-formfactor-tablet :is(.studio-main,.app-shell,.ml-studio,.physics-app,.rb-shell),html.aim-formfactor-desktop :is(.studio-main,.app-shell,.ml-studio,.physics-app,.rb-shell){max-width:100%;min-width:0}
html.aim-formfactor-tablet :is(.studio-main,.app-shell,.ml-studio,.physics-app,.rb-shell)>*,html.aim-formfactor-desktop :is(.studio-main,.app-shell,.ml-studio,.physics-app,.rb-shell)>*{min-width:0}
html.aim-formfactor-tablet input,html.aim-formfactor-tablet select,html.aim-formfactor-tablet textarea,html.aim-formfactor-tablet button{font-size:max(16px,1em)}
@media (pointer:coarse){html.aim-formfactor-tablet button,html.aim-formfactor-tablet a[role=button],html.aim-formfactor-tablet select{touch-action:manipulation}}
@media (min-width:600px) and (max-width:1180px){
  html.aim-formfactor-tablet body{--aim-tablet-gutter:clamp(8px,1.6vw,18px)}
  html.aim-formfactor-tablet :is(.studio-main,.app-shell,.ml-studio,.physics-app,.rb-shell){width:100%;margin-inline:auto}
  html.aim-formfactor-tablet :is(.studio-main,.ml-studio,.physics-app,.rb-shell){padding-inline:min(var(--aim-tablet-gutter),18px)}
  html.aim-formfactor-tablet :is(dialog,.modal,.popup,[role=dialog]){max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
}
@media (min-width:600px) and (max-width:900px) and (orientation:portrait){
  html.aim-formfactor-tablet{font-size:15px}
}
