.mobile-topbar,.mobile-bottom,.mobile-cards,.mobile-table-controls,.mobile-settings-picker{display:none}
.mobile .sidebar{display:none!important}.mobile .mobile-topbar{display:flex;position:sticky;top:0;z-index:6;height:58px;align-items:center;justify-content:space-between;padding:7px 12px;background:var(--side);border-bottom:1px solid var(--line)}
.mobile-topbar .chip-icon{width:29px;height:29px}.mobile-topbar button{border:0;padding:8px 10px;min-width:44px}.mobile .main{margin:0;width:100%;height:auto;min-height:calc(100dvh - 58px);padding:18px 14px calc(90px + env(safe-area-inset-bottom));overflow:visible;gap:18px}.mobile .page-header{min-height:0;gap:12px}.mobile .page-header>.chip-icon{display:none}.mobile .page-header h1{font-size:24px}.mobile .page-header .page-actions{width:100%;flex-wrap:wrap}.mobile .page-actions>button{min-height:44px;flex:1}.mobile .page-body{min-height:0;gap:16px}.mobile .home-body{min-height:calc(100dvh - 240px)}
.mobile .mobile-bottom{position:fixed;display:grid;grid-template-columns:repeat(var(--mobile-nav-count,4),1fr);bottom:0;left:0;right:0;z-index:10;padding:5px 8px calc(5px + env(safe-area-inset-bottom));background:var(--side);border-top:1px solid var(--line)}.mobile-bottom button{border:0;border-radius:8px;background:none;min-height:55px;display:flex;flex-direction:column;gap:2px;align-items:center;justify-content:center;font-size:12px;color:var(--muted)}.mobile-bottom button.active{color:var(--text);background:var(--selected)}.mobile-nav-icon{font-size:23px;line-height:24px}
.mobile .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.mobile .stat{padding:16px;gap:8px}.mobile .stat strong{font-size:28px}.mobile .toolbar{flex-wrap:wrap;gap:8px}.mobile .toolbar input{flex-basis:100%;width:100%;font-size:16px}.mobile .toolbar button{flex:1;min-height:44px}.mobile .results{min-height:0}.mobile .split{display:flex;flex-direction:column;gap:20px}.mobile .split>section{min-height:0}.mobile .split h2{font-size:19px}
.mobile .table-wrap{overflow:visible;background:none;border:0;flex:initial}.mobile .table-wrap>table{display:none}.mobile .mobile-cards{display:flex;flex-direction:column;gap:12px}.mobile .mobile-table-controls{display:flex;gap:8px;align-items:flex-end;margin-bottom:12px}.mobile-table-controls>.field{flex:1}.mobile-table-controls button{padding:10px}.mobile .mobile-card{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:15px;min-width:0;outline-offset:2px}.mobile-card.selected{border-color:var(--text)}.mobile-card-title{display:flex;gap:12px;align-items:center;margin-bottom:12px;font-size:16px}.mobile-card-title strong{overflow-wrap:anywhere}.mobile-card dl{display:grid;grid-template-columns:78px minmax(0,1fr);gap:8px;margin:0;font-size:13px;line-height:1.6}.mobile-card dt{color:var(--muted)}.mobile-card dd{margin:0;overflow-wrap:anywhere}.mobile .footer{gap:8px;width:100%}.mobile .footer>button{flex:1;min-height:44px;white-space:normal}
.mobile dialog{inset:0;margin:0;width:100%!important;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0;border:0;overflow:hidden;display:flex;flex-direction:column}.mobile .modal-head{padding:16px;border-bottom:1px solid var(--line);flex-shrink:0}.mobile .modal-head h2{font-size:20px}.mobile .modal-head button{width:42px;height:42px}.mobile .modal-body{padding:16px;max-height:none;flex:1;overflow:auto;min-height:0}.mobile .modal-foot{padding:12px 14px calc(12px + env(safe-area-inset-bottom));flex-shrink:0;gap:8px}.mobile .modal-foot button{min-height:44px;flex:1;white-space:normal}.mobile .form{grid-template-columns:1fr}.mobile input,.mobile select,.mobile textarea{font-size:16px}.mobile input[type=checkbox]{width:23px;height:23px;padding:0;flex-shrink:0}.mobile .setting-row{flex-wrap:wrap;gap:10px}.mobile .setting-row>.setting-label{flex-basis:100%}.mobile .setting-row input:not([type=checkbox]),.mobile .setting-row select{max-width:100%;width:100%}
.mobile .settings-layout{display:block;overflow:visible}.mobile .settings-nav{display:none}.mobile .mobile-settings-picker{display:block;width:100%;min-height:44px}.mobile .settings-content{padding:0;overflow:visible}.mobile .settings-content h1{font-size:25px}.mobile .card{padding:4px 15px}.mobile .tabs{overflow:auto}.mobile .tabs button{min-height:44px;flex-shrink:0}.mobile #toast{left:12px;right:12px;top:68px;max-width:none}.mobile #busy{bottom:80px}.mobile .login{margin:5vh 14px;max-width:none;padding:28px 22px}.mobile .login-title{font-size:20px}.mobile .theme-choices{width:100%;justify-content:space-between}.mobile .theme-choices button{width:30%;max-width:105px}.mobile .menu{max-width:calc(100vw - 16px)}.mobile .drop-active:after{inset:70px 10px 80px}

.mobile .property-list{gap:0;border:1px solid var(--line);border-radius:12px;overflow:hidden}.mobile .property-row{border:0;border-bottom:1px solid var(--line);border-radius:0;padding:12px 15px}.mobile .property-row p{overflow-wrap:anywhere}
.mobile .modal-foot{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.mobile .modal-foot button{padding:10px 8px;min-height:46px}.mobile .modal-foot button:only-child{grid-column:1/-1}

.mobile .stat{min-height:0}.mobile .stats>.stat:last-child:nth-child(odd){grid-column:1/-1}
.mobile .home-main>.chip-background{position:fixed;inset:58px 0 auto;width:100%;height:calc(100dvh - 138px - env(safe-area-inset-bottom));max-height:none}
.mobile{overflow-x:clip;overscroll-behavior-y:contain}.mobile .main,.mobile .page-body,.mobile .results,.mobile .toolbar,.mobile .form,.mobile .modal-body{min-width:0}.mobile .page-header{flex-wrap:wrap}.mobile .page-actions{gap:8px}.mobile .page-actions>button{font-size:14px;padding:10px 9px}.mobile .toolbar>select{flex:1 1 130px;min-width:0;max-width:100%;min-height:46px}.mobile .toolbar>button{font-size:14px;padding:10px 8px}.mobile .toolbar>input{min-height:48px}.mobile .mobile-card-title{align-items:flex-start;line-height:1.5}.mobile .mobile-card{box-shadow:0 2px 8px #00000008}.mobile .mobile-card dd{line-height:1.65}.mobile .mobile-card dl{grid-template-columns:72px minmax(0,1fr)}.mobile .field{min-width:0}.mobile .field input,.mobile .field select,.mobile .field textarea{max-width:100%;min-width:0;scroll-margin-block:90px}.mobile .field label{line-height:1.6}.mobile .modal-body{overscroll-behavior:contain;scroll-padding-bottom:24px}.mobile .modal-head{gap:12px;padding-top:max(12px,env(safe-area-inset-top))}.mobile .modal-head h2{line-height:1.45;overflow-wrap:anywhere}.mobile .modal-foot{background:var(--panel);border-top:1px solid var(--line);max-height:40dvh;overflow:auto}.mobile .modal-foot>button{font-size:14px;line-height:1.4}.mobile .danger-dialog .modal-foot{grid-template-columns:minmax(80px,.7fr) minmax(0,1.5fr)}.mobile .danger-dialog .modal-foot>button{min-width:0}.mobile .danger-notice{font-size:14px;padding:12px}.mobile .danger-progress{justify-content:center;margin:4px 0 18px}.mobile .renumber-dialog .form{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.mobile .renumber-dialog .field.wide{grid-column:1/-1}.mobile .renumber-preview .table-wrap{max-height:none}.mobile .renumber-preview .mobile-card dl{grid-template-columns:68px minmax(0,1fr)}.mobile .renumber-preview .mobile-card{padding:12px}.mobile .renumber-dialog .modal-body{gap:16px}.mobile .footer{flex-wrap:wrap}.mobile .footer>button{flex:1 1 100px}.mobile .menu button{min-height:46px;white-space:normal;text-align:left}.mobile .menu{max-height:65dvh;overflow:auto;padding:6px}.mobile .table-fit-tools{display:none}.mobile .settings-content h2{font-size:21px}.mobile .setting-row .setting-label{line-height:1.7}
@media(max-width:350px){.mobile .renumber-dialog .form{grid-template-columns:1fr}.mobile .page-actions>button{flex-basis:100%}.mobile .toolbar>button{flex-basis:40%}.mobile .mobile-card dl{grid-template-columns:62px minmax(0,1fr)}}
.mobile dialog{height:min(100dvh,var(--mobile-viewport-height,100dvh));max-height:min(100dvh,var(--mobile-viewport-height,100dvh))}.mobile .renumber-options{padding:11px 12px}.mobile .renumber-dialog .field:has(input[type=checkbox]){grid-column:1/-1;display:flex;flex-direction:row;align-items:center;gap:12px}.mobile .renumber-dialog .field:has(input[type=checkbox]) label{flex:1}.mobile .renumber-options summary{font-size:14px}
.mobile .bom-policy-grid{grid-template-columns:1fr;gap:12px}.mobile .bom-policy-field{padding:13px}.mobile .bom-range{grid-template-columns:70px minmax(0,1fr) 76px;font-size:14px}.mobile .bom-result-options{align-items:stretch;gap:10px}.mobile .bom-result-options>button{min-height:46px}.mobile .bom-result-options>label{flex-basis:100%;font-size:14px}.mobile .intake-container-choice .modal-foot{grid-template-columns:repeat(2,minmax(0,1fr))}
.mobile .separation-layout{display:flex;flex-direction:column;gap:12px}.mobile .separation-pane{padding:13px;gap:10px}.mobile .separation-pane h3{font-size:18px}.mobile .separation-arrows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.mobile .separation-arrows p{grid-column:1/-1;margin:0;font-size:13px}.mobile .separation-groups{max-height:400px}.mobile .separation-items{max-height:280px}.mobile .separation-pane .mobile-card{padding:12px}.mobile .separation-pane .mobile-card-title{font-size:14px;gap:8px}.mobile .separation-pane .mobile-card dl{grid-template-columns:65px minmax(0,1fr);gap:5px}.mobile .separation-pane .mobile-table-controls{flex-wrap:wrap}.mobile .separation-preview-dialog .table-wrap{max-height:none}.mobile .separation-dialog .modal-foot{grid-template-columns:repeat(2,minmax(0,1fr))}

/* Mobile follows the native app: compact controls, stock tables and five destinations. */
.mobile .mobile-topbar{height:66px;padding:10px 14px}.mobile .mobile-topbar strong{font-size:17px}.mobile .mobile-topbar .row{gap:9px;min-width:0}.mobile .mobile-topbar .row>.muted{font-size:11px}
.mobile .home-body{min-height:0;gap:14px}.mobile .home-main{gap:18px}.mobile .home-main .page-header{padding-bottom:0}.mobile .home-main .page-header h1{font-size:22px}.mobile .home-main .page-header p{font-size:13px}
.mobile .stat{padding:13px;gap:7px;min-height:112px}.mobile .stat strong{font-size:27px}.mobile .stat .muted{font-size:13px}.mobile .stat small{font-size:11px}
.mobile .home-search{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px}.mobile .home-search input{grid-column:1/-1}.mobile .home-search select,.mobile .home-search button{width:100%;min-width:0}
.mobile-home-actions,.mobile-scan-actions{display:flex;flex-direction:column;gap:10px}.mobile-home-actions button,.mobile-scan-actions button{min-height:46px;width:100%}
.mobile .mobile-bottom{gap:3px}.mobile .mobile-bottom button{font-size:11px;padding:6px 2px;min-height:53px}
.mobile .page-header{gap:12px}.mobile .page-actions{margin:0;row-gap:10px}.mobile .page-body>.results{margin-top:12px}
.mobile .table-wrap{display:block;overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:8px;max-height:65dvh;min-height:110px;touch-action:pan-x pan-y}
.mobile .table-wrap>table{display:table}.mobile .table-wrap>.mobile-cards{display:none}.mobile .table-wrap th{position:sticky;top:0;z-index:1;height:46px;padding:10px 12px;font-size:13px}.mobile .table-wrap td{padding:11px 10px;font-size:14px;min-height:46px}.mobile .table-wrap th .resize{top:8px;bottom:8px;width:9px;touch-action:none}.mobile .table-wrap td .resize{display:none;pointer-events:none}.mobile .table-wrap>details{display:none}
.mobile .item-properties.table-wrap{max-height:none;overflow:visible;border:0}.mobile .item-properties table{table-layout:fixed;width:100%}.mobile .item-properties td{white-space:pre-wrap;overflow-wrap:anywhere}.mobile .item-properties th{position:relative}.mobile .item-properties td:first-child{width:95px}.mobile .table-fit-tools{display:none}
.open-entry-screen{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;padding:30px;text-align:center;cursor:pointer;outline-offset:-8px;background:var(--bg);color:var(--text)}.open-entry-screen .chip-icon{width:68px;height:68px}.open-entry-screen h1{font-size:28px}.open-entry-screen>p{max-width:620px;line-height:1.9;font-size:17px}.open-entry-hint{border:1px solid var(--line);padding:14px 24px;border-radius:10px;background:var(--panel)}.open-entry-screen[aria-busy=true]{cursor:progress}.mobile .open-entry-screen{padding:24px}.mobile .open-entry-screen h1{font-size:24px}.mobile .open-entry-screen>p{font-size:16px}

.mobile .page-header>.grow{display:none}.mobile .page-header:has(.page-actions:empty){display:none}.mobile .mobile-topbar{height:auto;min-height:76px;align-items:center}.mobile .mobile-topbar>.row{flex:1;margin:0 12px;display:grid;grid-template-columns:34px minmax(0,1fr);column-gap:10px;row-gap:3px}.mobile .mobile-topbar .chip-icon{grid-row:1/3;width:34px;height:34px}.mobile .mobile-topbar strong{font-size:18px;line-height:1.4;overflow-wrap:anywhere}.mobile .mobile-topbar .muted{font-size:11px;line-height:1.5;overflow:hidden;max-height:3em}.mobile .mobile-topbar>button:first-child{padding:8px 4px;min-width:26px}
.mobile-container-actions{display:flex;flex-direction:column;gap:10px;margin-bottom:0}.mobile-container-actions button{width:100%;min-height:46px}.mobile-container-list{display:flex;flex-direction:column;gap:12px}.mobile-container-card{padding:15px;background:var(--panel);border:1px solid var(--line);border-radius:10px}.mobile-container-card.selected{border-color:var(--text)}.mobile-container-card h3{font-size:18px;margin:0 0 8px}.mobile-container-card p{font-size:13px;line-height:1.65;overflow-wrap:anywhere;margin:3px 0}.mobile-container-card button{width:100%;margin-top:12px;min-height:46px}

.mobile .main{padding-bottom:calc(95px + env(safe-area-inset-bottom))}.mobile .table-wrap tbody tr{touch-action:pan-x pan-y}.mobile .table-wrap thead{touch-action:pan-x}.mobile .table-wrap th .resize{touch-action:none}

.mobile .item-properties table col:first-child{width:95px!important}.mobile .item-properties table col:last-child{width:auto!important}.mobile .item-properties table{min-width:0!important;width:100%!important}.mobile .item-properties .resize{display:none}

/* Readable five-way phone navigation; home contains search, then four cards. */
.mobile .mobile-bottom{padding-top:7px;padding-bottom:calc(7px + env(safe-area-inset-bottom))}.mobile .mobile-bottom button{font-size:16px;line-height:1.35;min-height:64px;gap:4px;padding:6px 2px}.mobile-bottom button.active{font-weight:700;box-shadow:inset 0 3px 0 var(--text)}.mobile-nav-icon{font-size:24px;line-height:25px}.mobile .home-search{margin:0 0 3px}.mobile .home-body>.stats{margin-top:3px}.mobile .main{padding-bottom:calc(105px + env(safe-area-inset-bottom))}
