
/* MTBCustoms Simulation Suite v1 — host shell + responsive guardrails only */
:root{--mtbc-navy:#0b1220;--mtbc-blue:#2563eb;--mtbc-line:#dbe3ed;--mtbc-text:#0f172a;--mtbc-muted:#64748b}
html{max-width:100%;overflow-x:hidden}
body{max-width:100%;overflow-x:hidden!important}
.mtbc-suitebar{position:relative;z-index:2147480000;width:100%;min-height:58px;display:grid;grid-template-columns:minmax(120px,1fr) minmax(0,2fr) minmax(120px,1fr);align-items:center;gap:14px;padding:9px max(16px,calc((100% - 1280px)/2));background:#0b1220;color:#f8fafc;border-bottom:1px solid rgba(255,255,255,.12);box-shadow:0 4px 18px rgba(15,23,42,.18);font:700 13px/1.2 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
.mtbc-suitebar a{color:#dbeafe;text-decoration:none;min-height:40px;display:inline-flex;align-items:center;gap:7px;border-radius:10px;padding:8px 10px;white-space:nowrap}
.mtbc-suitebar a:hover,.mtbc-suitebar a:focus-visible{color:#fff;background:rgba(255,255,255,.08);outline:2px solid transparent}
.mtbc-suitebar-back{justify-self:start}.mtbc-suitebar-home{justify-self:end}
.mtbc-suitebar-title{min-width:0;text-align:center;display:flex;flex-direction:column;line-height:1.15}
.mtbc-suitebar-title strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fff;font-size:14px;letter-spacing:.01em}
.mtbc-suitebar-title span{margin-top:3px;color:#93c5fd;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.mtbc-suite-footer{position:relative;z-index:1000;margin-top:auto;min-height:48px;display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;padding:12px 18px;background:#0b1220;color:#cbd5e1;border-top:1px solid rgba(255,255,255,.1);font:700 11px/1.4 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;text-align:center}
.mtbc-suite-footer a{color:#bfdbfe;text-decoration:none}.mtbc-suite-footer a:hover{text-decoration:underline;color:#fff}
/* Never let simulator chrome create sideways page scrolling */
body main,body header,body section,body aside,body nav,body footer{max-width:100%}
body canvas,body svg,body img{max-width:100%}
body button,body input,body select,body textarea{max-width:100%}
body button,body [role="button"],body input[type="range"],body select{touch-action:manipulation}
/* Common internal title/header cleanup without changing app logic */
body>header{scroll-margin-top:12px}
body>header h1,body>header h2{line-height:1.12}
/* Specific mobile repairs */
@media(max-width:1023px){
  .sim-black-hole main{display:block!important}
  .sim-black-hole main>section:first-child{width:100%!important;max-height:none!important;overflow:visible!important;border-right:0!important;border-bottom:1px solid var(--mtbc-line)}
  .sim-wave-optics main>nav{position:relative!important;top:auto!important}
  .sim-simple-machines main,.sim-titration main,.sim-density main,.sim-flame-test main,.sim-acid-base main,.sim-atomic-models main,.sim-photosynthesis main{min-width:0!important}
}
@media(max-width:760px){
  .mtbc-suitebar{grid-template-columns:auto minmax(0,1fr) auto;min-height:54px;gap:6px;padding:7px 8px}
  .mtbc-suitebar a{min-height:40px;padding:7px 8px;font-size:12px}
  .mtbc-suitebar-title strong{font-size:12px}
  .mtbc-suitebar-title span{display:none}
  body>header{position:relative!important;top:auto!important;padding-left:14px!important;padding-right:14px!important}
  body>header h1,body>header h2{font-size:clamp(1.1rem,6vw,1.55rem)!important;line-height:1.12!important}
  body main{padding-left:12px!important;padding-right:12px!important}
  body .max-w-7xl,body .max-w-6xl{max-width:100%!important}
  body table{font-size:12px}
  .sim-gravity>.flex-1{min-height:auto!important}
  .sim-gravity .canvas-container{min-height:480px!important}
  .sim-orbitview #sim-wrapper{min-height:400px!important}
  .sim-orbitview .chart-container{height:240px!important;min-height:240px!important}
}
@media(max-width:430px){
  .mtbc-suitebar{grid-template-columns:42px minmax(0,1fr) 42px}
  .mtbc-suitebar-backtext,.mtbc-suitebar-home{font-size:0!important}
  .mtbc-suitebar-back{justify-content:center}.mtbc-suitebar-home{justify-content:center}
  .mtbc-suitebar-home::before{content:"⌂";font-size:19px;line-height:1}
  .mtbc-suitebar-title strong{font-size:11px}
  body main{padding-left:10px!important;padding-right:10px!important}
  body button{overflow-wrap:anywhere}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
