html{scroll-padding-top:110px;overflow-x:hidden;overscroll-behavior-x:none}body{padding-bottom:env(safe-area-inset-bottom);width:100%;max-width:100%;overflow-x:hidden;overscroll-behavior-x:none}
/* Clip sideways page overflow without creating a scroll container that breaks sticky headers.
   Diagram viewers and the 3D canvas retain their own pan/zoom gestures. */
@supports(overflow:clip){html,body{overflow-x:clip}}
main,.model-panel,.manual-panel,.fault-search{min-width:0;max-width:100%}
.part-row>*,.shop-links,.source-row>*{min-width:0;overflow-wrap:anywhere}
@media(max-width:900px){main{grid-template-columns:minmax(0,1fr)}}
header{padding-top:calc(14px + env(safe-area-inset-top));padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right));gap:12px}
.app-brand-icon{width:44px;height:44px;border-radius:9px;flex-shrink:0}.brand{min-width:0}.brand h1{margin:0}.header-actions{display:flex;flex-wrap:wrap;gap:8px}.header-actions button{min-height:44px}
#installApp{background:#0c293a;color:white;border-color:#0c293a;animation:install-app-blink 2.4s ease-in-out infinite}
@keyframes install-app-blink{0%,30%,100%{opacity:1}50%,65%{opacity:0}}
#installApp:hover,#installApp:focus,#installApp:active{animation:none;opacity:1}
@media(prefers-reduced-motion:reduce){#installApp{animation:none;opacity:1}}
.app-notice{padding:12px max(16px,env(safe-area-inset-left));background:#fff3cf;border-bottom:1px solid #dcc786;font-size:16px;line-height:1.5}
#updateNotice{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#e0f4ec;border-color:#a9d1c2}#updateNotice>div{display:flex;gap:8px}#updateNow{background:#0c293a;color:white}
#installDialog{max-width:520px}#installDialog h2{margin:0}#installDialog p{line-height:1.6}#installDialog .install-brand{display:flex;align-items:center;gap:14px;margin-bottom:20px}#installDialog .install-brand img{border-radius:12px}#installDialog .install-brand strong{display:block}#installDialog .install-brand span{font-size:14px;color:var(--muted)}
@media(max-width:600px){header .brand{flex:1}header h1{font-size:17px}.header-actions{width:100%;justify-content:flex-end}.header-actions button{flex:1}header .app-brand-icon{width:36px;height:36px}.app-notice{padding:12px 16px}dialog{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 32px)}}
@media(display-mode:standalone){#installApp{display:none}header .header-actions{width:auto}header .header-actions #about{font-size:14px}}

.brand-copy{min-width:0}
.store-banner{container-type:inline-size;padding:12px max(16px,env(safe-area-inset-left));background:#fff;border-bottom:1px solid var(--line)}
.store-link{display:block;width:100%;text-align:center;font-family:Arial,sans-serif;font-size:5.8vw;font-size:6cqw;font-weight:600;line-height:1.4;white-space:nowrap;text-underline-offset:.15em}
.page-footer{padding:24px 16px calc(24px + env(safe-area-inset-bottom));text-align:center;border-top:1px solid var(--line);background:#fff}
.page-footer button{min-height:44px}
