html{width:100%;min-width:0;min-height:100%;height:100%;overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}body{width:100%;min-width:0;min-height:100%;height:100%;overflow-x:hidden}.app-shell,.main,.content,.panel,.panel-body,.record-section,.animal-profile,.animal-data-grid,.pedigree-tree,.pedigree-row{min-width:0;max-width:100%}img,svg,video,canvas{max-width:100%;height:auto}.content{width:100%}.topbar{width:100%;max-width:100%;min-width:0}.topbar>div:not(.top-actions){min-width:0}.topbar h1,.eyebrow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toolbar>*{max-width:100%}.table-wrap{width:100%;max-width:100%;-webkit-overflow-scrolling:touch}.form-grid input,.form-grid select,.form-grid textarea,.upload-row input[type=file]{min-width:0;max-width:100%}dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}#modalBody{max-width:100%;overflow-x:hidden}.pwa-install-btn{display:inline-grid;place-items:center;min-width:40px;height:40px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:#fff;color:#24444f;font-weight:700;cursor:pointer}.pwa-install-btn[hidden]{display:none!important}.pwa-install-help{display:grid;gap:12px}.pwa-install-help ol{margin:0;padding-left:22px;line-height:1.6}.pwa-install-help .micro{margin:0}.standalone .topbar{padding-top:max(12px,env(safe-area-inset-top))}.standalone .content{padding-bottom:max(22px,env(safe-area-inset-bottom))}@media(max-width:900px){.content{padding-left:clamp(10px,3vw,18px);padding-right:clamp(10px,3vw,18px)}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.animal-profile-head,.grid,.qr-box{max-width:100%}}@media(max-width:760px){body{min-height:100dvh}.app-shell{min-height:100dvh}.main{width:100vw;max-width:100vw}.sidebar{height:100dvh}.topbar{height:auto;min-height:72px;padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}.content{padding-top:12px;padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));padding-bottom:max(20px,env(safe-area-inset-bottom))}.hero{border-radius:14px}.panel,.table-wrap,.stat,.mobile-animal-card{border-radius:12px}.toolbar{align-items:stretch}.toolbar .spacer{display:none}.toolbar button,.toolbar .search{width:100%}.form-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.form-actions>*{width:100%}.upload-row form{width:100%}.upload-row input[type=file]{font-size:16px}.modal-head{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}dialog{width:100vw!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;margin:0!important;border-radius:0!important}.pwa-install-btn{display:inline-grid}.top-actions{flex:0 0 auto}}@media(max-width:520px){.stats{grid-template-columns:1fr 1fr;gap:8px}.stat{min-width:0}.quick-grid,.line-cards,.animal-data-grid,.pedigree-documented-grid{grid-template-columns:1fr!important}.profile-actions{grid-template-columns:1fr!important}.animal-gallery{grid-template-columns:1fr 1fr!important}.topbar h1{font-size:18px}.topbar .eyebrow{font-size:9px}.top-actions .icon-btn,.pwa-install-btn{width:38px;min-width:38px;height:38px;padding:0}.auth-shell{padding:12px}.auth-card{padding:20px 16px;border-radius:16px}}@media(max-width:380px){.stats{grid-template-columns:1fr}.animal-gallery{grid-template-columns:1fr!important}.form-actions{grid-template-columns:1fr}.brand-large img{width:58px;height:58px}.brand-large strong{font-size:21px}}@media(display-mode:standalone){html,body,.app-shell{min-height:100dvh}.standalone-only{display:block!important}}