/* V143: quieter phone actions, reachable dialog content, and explicit selection. */
.mobile-actions-trigger,.mobile-sort-options{display:none}
dialog{border-color:color-mix(in srgb,var(--line),var(--text) 24%);box-shadow:0 20px 75px #0006}
.modal-head{border-bottom:1px solid var(--line)}
.tabs{gap:6px;border-bottom:0;padding:3px;background:var(--bg);border-radius:9px}
.tabs button{border:1px solid var(--line);border-radius:7px;margin:0;box-shadow:0 1px 2px #0001}
.tabs button.active{background:var(--selected);color:var(--text);border-color:var(--muted);box-shadow:inset 0 2px 4px #0003,inset 0 -1px 0 #fff2;font-weight:750}
.warning-icon{display:inline-grid;place-items:center;width:22px;height:22px;border:1px solid var(--warn);border-radius:50%;color:var(--warn);font-size:16px;margin-right:8px;vertical-align:middle}
.danger-notice:before{content:'❗';margin-right:6px;color:var(--warn)}
.item-dialog .modal-foot{justify-content:flex-end}
.item-dialog .modal-foot>button.primary{margin-left:0}
.item-dialog .modal-head .item-fit{font-size:13px;width:auto;min-width:0;padding:9px 12px;height:40px}
.item-dialog .table-fit-tools{display:none}
.public-entry-list{display:flex;flex-direction:column;gap:12px}
.public-entry-list:empty{display:none}
.card-extra{margin-top:10px;border-top:1px solid var(--line);padding-top:6px}
.card-extra summary{padding:7px 0;min-height:36px;font-size:13px;color:var(--muted);cursor:pointer}
.mobile .main{padding:16px 12px calc(82px + env(safe-area-inset-bottom));gap:16px}
.mobile .page-body{gap:12px}.mobile .page-header h1{font-size:23px}
.mobile .page-header>.grow>.muted{font-size:12px;line-height:1.6}
.mobile .page-header .page-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.mobile .page-actions>button{font-size:13px;padding:9px 8px;min-height:42px;line-height:1.5;white-space:normal}
.mobile .page-actions>.mobile-secondary-action{display:none}
.mobile .page-actions>.mobile-actions-trigger{display:block}
.mobile .page-actions:has(.mobile-actions-trigger)>.mobile-actions-trigger{grid-column:1/-1;min-height:36px;padding:6px 10px}
.mobile .page-actions>button:last-child:nth-child(3){grid-column:1/-1;min-height:36px;padding:6px 10px}
.mobile .toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;align-items:stretch}
.mobile .toolbar>input{grid-column:1/-1;width:100%;min-height:44px}
.mobile .toolbar>button,.mobile .toolbar>select{width:100%;min-width:0;min-height:42px;font-size:13px}
.mobile .toolbar>button:last-child:nth-child(4){grid-column:1/-1}
.mobile .inventory-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 84px}
.mobile .inventory-toolbar>input{grid-row:1;grid-column:1/3}
.mobile .inventory-toolbar>button:last-child:nth-child(4){grid-row:1;grid-column:3;font-size:12px}
.mobile .inventory-toolbar>select{grid-row:2;grid-column:1}
.mobile .inventory-toolbar>button:nth-child(3){grid-row:2;grid-column:2/4}
.mobile .mobile-sort-options{display:block;border:1px solid var(--line);border-radius:8px;padding:0 10px;background:var(--panel);margin-bottom:8px}
.mobile-sort-options>summary{min-height:38px;padding:9px 0;cursor:pointer;font-size:13px;color:var(--muted)}
.mobile .mobile-sort-options .mobile-table-controls{margin:2px 0 10px;gap:8px}
.mobile .mobile-sort-options .field label{font-size:12px}
.mobile .mobile-cards{gap:9px}
.mobile .inventory-card{padding:12px;border-radius:10px}
.mobile .inventory-card .mobile-card-title{font-size:15px;gap:9px;margin-bottom:9px;align-items:center;flex-wrap:wrap}
.mobile .inventory-card dl{font-size:13px;line-height:1.5;gap:5px 8px}
.mobile .inventory-card dd{line-height:1.5}
.mobile .modal-head{padding:10px 12px;gap:8px;min-height:58px;background:var(--side)}
.mobile .modal-head h2{font-size:18px}
.mobile .modal-head>button{width:38px;height:38px;min-height:38px;padding:6px}
.mobile .modal-body{padding:14px 12px;scroll-padding-bottom:32px}
.mobile .modal-foot{padding:10px 12px calc(10px + env(safe-area-inset-bottom));gap:7px;max-height:32dvh}
.mobile .modal-foot>button{min-height:44px;font-size:13px;padding:9px 7px}
.mobile .item-dialog .modal-foot{grid-template-columns:minmax(0,1fr) minmax(0,1.35fr) minmax(0,.85fr)}
.mobile .item-dialog .modal-foot>button{font-size:12px;white-space:normal;min-width:0;line-height:1.5}
.mobile .item-dialog .modal-foot>button.primary{min-height:44px;grid-column:auto}
.mobile .item-dialog .modal-head .item-fit{display:none}
.mobile .property-row{padding:10px 12px}
.mobile .tabs{gap:5px;padding:4px;flex-shrink:0}
.mobile .tabs button{min-height:43px;flex:1;padding:9px 12px;font-size:14px}
.mobile dialog.compact-dialog{width:calc(100% - 24px)!important;max-width:560px;height:auto;max-height:min(86dvh,calc(var(--mobile-viewport-height,100dvh) - 24px));inset:0;margin:auto;border:1px solid var(--muted);border-radius:14px}
.mobile dialog.compact-dialog .modal-body{flex:0 1 auto;min-height:0}
.mobile dialog.mobile-drawer{inset:0 auto 0 0;margin:0;width:min(72%,280px)!important;height:var(--mobile-viewport-height,100dvh);max-height:var(--mobile-viewport-height,100dvh);border-radius:0 18px 18px 0;border:0;border-right:1px solid var(--line);animation:drawer-enter 180ms ease-out both}
.mobile dialog.mobile-drawer.is-closing{animation:drawer-leave 150ms ease-in both}
.mobile .mobile-drawer h3{font-size:12px;color:var(--muted);margin:16px 0 4px;letter-spacing:.5px}
.mobile .mobile-drawer .modal-body{overscroll-behavior:contain}
.mobile .main>.page-header .page-actions,.mobile .main .page-body>.footer,.mobile .main .results>.footer,.mobile .mobile-container-actions{display:none}
.mobile .mobile-topbar>button{min-width:44px;font-size:22px}
@keyframes drawer-enter{from{opacity:.6;transform:translateX(-100%)}to{opacity:1;transform:translateX(0)}}
@keyframes drawer-leave{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-100%)}}
@media(prefers-reduced-motion:reduce){.mobile dialog.mobile-drawer,.mobile dialog.mobile-drawer.is-closing{animation:none}}
.mobile .mobile-drawer .modal-body button{min-height:43px;text-align:left}
.mobile .mobile-drawer .modal-body>.stack{gap:8px}
.mobile .mobile-drawer .modal-foot:empty{display:none}
.mobile .login{margin:6vh 12px;padding:24px 18px;gap:16px}
@media(min-width:600px){.mobile .form{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.mobile .form>.wide{grid-column:1/-1}.mobile .mobile-cards:not(.property-list){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}
@media(prefers-reduced-motion:reduce){.tabs button{transition:none}}

/* V149: one home workspace; disclose phone filters and secondary actions on demand. */
.mobile .main{padding-bottom:calc(108px + env(safe-area-inset-bottom))}
.mobile .mobile-home-workspace{display:flex;flex-direction:column;gap:12px;padding:12px;background:var(--panel);border:1px solid var(--line);border-radius:14px;min-width:0}
.mobile .mobile-home-workspace .home-search{margin:0;gap:8px}
.mobile .mobile-home-workspace .home-search input{min-height:48px;background:var(--bg);font-size:15px}
.mobile .mobile-home-workspace .home-search select,.mobile .mobile-home-workspace .home-search button{min-height:44px;font-size:14px}
.mobile .mobile-home-workspace .stats{gap:10px;margin:0}
.mobile .mobile-home-workspace .stat{padding:12px;min-height:120px;background:var(--bg);gap:7px;border-radius:10px}
.mobile .mobile-home-workspace .stat strong{font-size:28px;line-height:1.2}
.mobile .mobile-home-workspace .stat p{font-size:13px}
.mobile .mobile-home-workspace .stat small{font-size:12px;line-height:1.5}
.mobile .mobile-home-workspace .stat.stock-low{background:var(--stock-low-bg);color:var(--stock-low-fg)}
.mobile .mobile-home-workspace .stat.stock-out{background:var(--stock-out-bg);color:var(--stock-out-fg)}
.mobile .page-actions>.mobile-header-refresh{display:none}
.mobile .page-actions:has(.mobile-actions-trigger)>.mobile-actions-trigger{grid-column:auto;min-height:44px}
.mobile .page-actions>button:last-child:nth-child(3){grid-column:auto}
.mobile .mobile-query-panel,.mobile .mobile-container-tools{border:1px solid var(--line);background:var(--panel);border-radius:12px;padding:10px;min-width:0}
.mobile .toolbar.mobile-query-row,.mobile .mobile-container-search{display:grid;grid-template-columns:minmax(0,1fr) 88px;gap:8px;align-items:stretch}
.mobile .toolbar.mobile-query-row>input{grid-column:auto;min-height:44px;font-size:15px;background:var(--bg)}
.mobile .mobile-container-search input{min-width:0;width:100%;font-size:15px;background:var(--bg)}
.mobile .mobile-container-search button,.mobile .toolbar.mobile-query-row>button{font-size:13px;min-height:44px;padding:8px 5px}
.mobile .mobile-search-options{margin-top:8px;border-top:1px solid var(--line)}
.mobile .mobile-search-options>summary{font-size:13px;line-height:1.6;padding:10px 2px 2px;min-height:36px;color:var(--muted);cursor:pointer}
.mobile .mobile-filter-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-top:10px}
.mobile .mobile-filter-controls>*{min-width:0;width:100%;min-height:44px;font-size:13px;padding:8px}
.mobile .mobile-container-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.mobile .mobile-container-actions button{min-height:44px;font-size:14px;padding:8px}
.mobile .mobile-container-list{gap:12px;margin-top:2px}
.mobile .mobile-container-card{padding:13px}
.mobile .open-entry-screen:focus:not(:focus-visible){outline:none}

/* Borderless home composition; size the four cards to the available phone viewport. */
.mobile .mobile-home-workspace{border:0;background:none;border-radius:0;padding:0;min-height:clamp(390px,calc(var(--mobile-viewport-height,100dvh) - 192px),600px)}
.mobile .mobile-home-workspace .home-search input{background:var(--panel)}
.mobile .mobile-home-workspace .stats{flex:1;grid-auto-rows:minmax(135px,1fr)}
.mobile .mobile-home-workspace .stat{background:var(--panel);justify-content:center;padding:16px;gap:10px}
.mobile .mobile-home-workspace .stat.stock-low{background:var(--stock-low-bg)}
.mobile .mobile-home-workspace .stat.stock-out{background:var(--stock-out-bg)}
.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:230px;padding:32px 24px;text-align:center;max-width:100%;overflow-wrap:anywhere}
.empty-state strong{font-size:19px;font-weight:650;color:var(--text)}
.empty-state p{font-size:14px;line-height:1.8;color:var(--muted);max-width:440px;margin:0}
.empty-table{min-height:250px;display:block;overflow:hidden}
.empty-table>table,.empty-table>.mobile-cards,.empty-table>.table-fit-tools,.empty-table>.mobile-sort-options{display:none!important}
.mobile .empty-state{min-height:220px;padding:28px 18px}

/* Keep the original compact four-card size, with a daily reading below it. */
.mobile .mobile-home-workspace{min-height:0}
.mobile .mobile-home-workspace .stats{flex:0;grid-auto-rows:minmax(120px,auto)}
.mobile .mobile-home-workspace .stat{min-height:120px;padding:14px;gap:8px}
.mobile .daily-recommendation{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:16px;background:var(--panel);border:1px solid var(--line);border-radius:10px}
.daily-recommendation small{font-size:12px;color:var(--muted)}
.daily-recommendation>strong{font-size:18px;line-height:1.5;overflow-wrap:anywhere}
.daily-recommendation>p{font-size:13px;line-height:1.7;margin:0}
.mobile .daily-recommendation>button{min-height:42px;padding:9px;font-size:13px}

/* Keep four separate cards without enclosing the whole home in another panel. */
.mobile .home-search{display:flex;flex-direction:column;align-items:stretch}
.mobile .home-search-field{display:flex;align-items:center;min-width:0;min-height:50px;border:1px solid var(--line);border-radius:9px;background:var(--panel);overflow:hidden}
.mobile .home-search-field:focus-within{outline:1px solid var(--text);outline-offset:1px}
.mobile .home-search .home-search-field select{flex:0 0 112px;width:112px;min-width:0;border:0;border-right:1px solid var(--line);border-radius:0;background:transparent;min-height:46px;padding:8px;font-size:14px;outline:0}
.mobile .home-search .home-search-field input{flex:1;flex-basis:0;width:0;min-width:0;border:0;border-radius:0;background:transparent;min-height:48px;padding:10px;font-size:15px;outline:0}
.mobile .mobile-home-workspace .stat{border:1px solid var(--line);border-radius:10px;background:var(--panel);padding:14px;box-shadow:none}
.mobile .mobile-home-workspace .stat.stock-low{background:var(--stock-low-bg)}
.mobile .mobile-home-workspace .stat.stock-out{background:var(--stock-out-bg)}
.mobile .daily-recommendation{border:0;border-radius:0;background:none;box-shadow:none;padding:12px 8px}
.mobile .daily-recommendation>button{border:0;background:none;padding:6px 0;text-align:left;color:var(--text);text-decoration:underline;text-underline-offset:4px}
.search-icon-button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.mobile .home-search-field>.search-icon-button,.mobile .mobile-query-field>.search-icon-button{flex:0 0 44px;width:44px;min-width:44px;min-height:46px;padding:10px;border:0;background:transparent;border-radius:0;display:grid;place-items:center}
.mobile .mobile-query-field{display:flex;align-items:center;border:1px solid var(--line);border-radius:8px;background:var(--panel);min-width:0;overflow:hidden}
.mobile .mobile-query-field:focus-within{outline:1px solid var(--text);outline-offset:1px}
.mobile .mobile-query-field>input{min-width:0;width:0;flex:1;border:0;outline:0;background:transparent}
.mobile .toolbar.mobile-query-row{display:block}
.menu-shield{position:fixed;inset:0;z-index:999;touch-action:none}
.menu{overscroll-behavior:contain;touch-action:pan-y;-webkit-user-select:none;user-select:none}
/* V150: a single search surface, inline global results, and phone-sized tables. */
.mobile .mobile-container-search.mobile-query-field{display:flex;gap:0}
.mobile .mobile-container-search.mobile-query-field input{width:0;border:0;flex:1;outline:none}
.mobile .mobile-query-field.home-search-field select{flex:0 0 112px;width:112px;min-width:0;border:0;border-right:1px solid var(--line);border-radius:0;background:transparent;padding:8px;font-size:14px}
.mobile .mobile-query-field.home-search-field input{min-width:0;width:0;flex:1}
.mobile .stats[hidden],.mobile .daily-recommendation[hidden],.home-search-results[hidden]{display:none!important}
.home-search-results{display:flex;flex-direction:column;gap:12px;min-width:0}
.home-search-results h2{font-size:19px}.home-search-results h3{font-size:16px}
.home-container-result{padding:14px;border:1px solid var(--line);border-radius:10px;display:flex;flex-direction:column;gap:10px;background:var(--panel)}
.mobile [data-pdf-export]{display:none!important}
.mobile dialog.mobile-results-dialog{position:fixed;inset:0;margin:0;width:100%!important;max-width:100%;height:var(--mobile-viewport-height,100dvh);max-height:var(--mobile-viewport-height,100dvh);border:0;border-radius:0;display:flex;flex-direction:column}
.mobile .mobile-results-dialog .modal-body{flex:1;min-height:0;max-height:none;padding:12px;gap:10px}
.mobile .mobile-results-dialog .modal-head{flex:none}
.mobile .mobile-results-dialog .modal-foot:empty{display:none}
.mobile .mobile-results-dialog .table-wrap,.mobile .home-search-results .table-wrap{display:block;overflow:auto;min-width:0;background:var(--panel);border:1px solid var(--line);overscroll-behavior:contain}
.mobile .mobile-results-dialog .table-wrap{flex:1;min-height:0}
.mobile .mobile-results-dialog .table-wrap>table,.mobile .home-search-results .table-wrap>table{display:table}
.mobile .mobile-results-dialog .table-wrap>.mobile-cards,.mobile .home-search-results .table-wrap>.mobile-cards{display:none}
/* V151: one grouped selector on every search surface. */
.unified-search{display:flex;align-items:center;min-width:180px;min-height:44px;border:1px solid var(--line);border-radius:8px;background:var(--panel);overflow:hidden;flex:1}
.unified-search:focus-within{outline:1px solid var(--muted);outline-offset:1px}
.unified-search>input{flex:1;width:0;min-width:0;border:0;border-radius:0;background:transparent;outline:none}
.unified-search>input::placeholder{color:var(--muted);opacity:1}
.unified-search>select[hidden]{display:none!important}
.unified-search>.search-filter-trigger{flex:0 1 auto;width:auto;min-width:0;max-width:min(42%,200px);white-space:nowrap;border:0;border-right:1px solid var(--line);border-radius:0;background:transparent;overflow:hidden;text-overflow:ellipsis;padding:10px 8px}
.unified-search>.search-icon-button{flex:none;display:grid;place-items:center;width:44px;min-width:44px;border:0;background:transparent;padding:9px;border-radius:0}
.toolbar.home-search{display:flex;flex-direction:row;align-items:stretch}
.mobile .unified-search{width:100%;min-width:0;min-height:48px}
.mobile .unified-search>.search-filter-trigger{max-width:140px;min-width:0;font-size:13px;padding:10px 6px;min-height:46px}
.mobile .unified-search>input{font-size:15px;padding:10px;min-height:46px}
.mobile .unified-search>.search-icon-button{min-height:46px}
.menu-group-heading{font-size:12px;color:var(--muted);padding:8px 12px 5px;border-bottom:1px solid var(--line)}
.mobile .mobile-results-dialog .table-wrap{max-height:none!important;flex:1 1 0!important;min-height:0}
.mobile .mobile-results-dialog .modal-body{flex:1 1 0!important;overflow:hidden}
.mobile .mobile-scan-actions{gap:10px}.mobile .mobile-scan-actions>button{min-height:48px;font-size:15px}
.cloud-state{display:flex;gap:8px;align-items:center;font-size:13px;color:var(--muted)}
.cloud-dot{width:9px;height:9px;flex:none;border-radius:50%;background:#858585}
.cloud-state[data-online=true] .cloud-dot{background:#3dcc82;animation:cloud-breathe 2.4s ease-in-out infinite}
@keyframes cloud-breathe{0%,100%{opacity:.55;box-shadow:0 0 0 0 #3dcc8200}50%{opacity:1;box-shadow:0 0 0 4px #3dcc8220}}
@media(prefers-reduced-motion:reduce){.cloud-state[data-online=true] .cloud-dot{animation:none}}

/* V152: intrinsic-height searches; toolbar descendants never stretch filter labels. */
.page-body>.unified-search{flex:0 0 auto;height:48px}
.mobile .toolbar.home-search{display:block;width:100%;min-width:0}
.mobile .home-search>.unified-search{height:50px;min-height:50px;width:100%}
.mobile .unified-search>.search-filter-trigger{flex:0 1 auto!important;width:auto!important;max-width:min(38%,128px);white-space:nowrap;line-height:1.4;padding-inline:8px}
.mobile .unified-search>input{flex:1 1 0!important;width:0!important;min-width:0!important}
.mobile .unified-search>.search-icon-button{flex:0 0 44px!important;width:44px!important;min-width:44px;max-width:44px}
.mobile button,.mobile a{touch-action:manipulation}
.mobile .unified-search>.search-filter-trigger{display:flex;align-items:center;justify-content:space-between;gap:7px;max-width:min(42%,148px);padding:4px 8px;min-height:46px;text-align:left}
.search-filter-mode{display:block;min-width:0;font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-filter-chevron{flex:0 0 12px;width:12px;text-align:center;font-size:16px;line-height:1;color:var(--text)}
.mobile-search-filter-menu{max-width:calc(100vw - 16px)!important}
.mobile-search-filter-menu>button{white-space:normal!important;overflow-wrap:anywhere;line-height:1.45;min-height:44px}
.pull-refresh{position:fixed;left:50%;top:calc(66px + env(safe-area-inset-top));transform:translate(-50%,calc(var(--pull-offset,0px) - 8px));opacity:0;transition:opacity 160ms ease,transform 180ms cubic-bezier(.2,.8,.2,1);z-index:40;pointer-events:none;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:24px;box-shadow:0 4px 18px #0002;padding:10px 16px;font-size:13px;display:flex;align-items:center;gap:9px;contain:paint}
.pull-refresh.visible{opacity:1;transform:translate(-50%,var(--pull-offset,0px))}
.pull-refresh::before{content:'↓';display:block;width:16px;text-align:center;transition:transform 160ms ease}
.pull-refresh.ready::before{transform:rotate(180deg)}
.pull-refresh.refreshing::before{content:'';width:13px;height:13px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:feedback-turn .7s linear infinite}
@media(prefers-reduced-motion:reduce){.pull-refresh{transition:none}.pull-refresh.refreshing::before{animation:none}}
.pull-refresh[hidden]{display:none}.pull-refresh.ready{border-color:var(--muted)}

/* Page transitions keep old requests and page controls out of the new view. */
.main.page-leaving{animation:none;opacity:0;transition:opacity 90ms ease-out;pointer-events:none}
.main.page-preparing{opacity:0;pointer-events:none}
.main.page-entering{animation:page-arrive 150ms ease-out both}
@keyframes page-arrive{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.main.page-leaving{transition:none}.main.page-entering{animation:none}}

/* V153: match the native APK's compact dialog and two-column property table. */
.mobile dialog.native-item-detail,.mobile dialog.native-item-editor{inset:0;margin:auto;width:calc(100% - 24px)!important;max-width:640px;height:88dvh;max-height:calc(var(--mobile-viewport-height,100dvh) * .88);border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.mobile .native-item-detail .modal-body,.mobile .native-item-editor .modal-body{min-height:0;flex:1;overflow-y:auto;overflow-x:hidden;padding:8px 16px 24px}
.native-item-detail .modal-body>.stack{gap:10px}.native-item-name{font-size:18px;line-height:1.5;margin:4px 0;font-weight:700;overflow-wrap:anywhere}
.native-item-detail .modal-body>.stack>.muted{font-size:14px;line-height:1.6;margin:0 0 4px}
.mobile .native-property-table{table-layout:fixed;border-collapse:collapse;width:100%;min-width:0;background:var(--panel);font-size:14px}
.mobile .native-property-table th,.mobile .native-property-table td{border:1px solid var(--line);padding:10px;text-align:left;vertical-align:middle;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5;min-height:43px}
.mobile .native-property-table tbody th{background:var(--panel);font-weight:400;width:94px}.mobile .native-property-table thead th{position:static;background:var(--hover);font-size:13px;font-weight:700}
.mobile .native-item-detail .modal-foot{display:flex;justify-content:flex-end;gap:7px;flex-wrap:wrap;max-height:32dvh;padding:10px 12px}
.mobile .native-item-detail .modal-foot>button{flex:0 1 auto;min-width:68px;min-height:44px;font-size:14px;padding:9px 10px}
.mobile .native-item-detail .modal-foot>button.primary{margin-left:auto}

/* Page-level actions live in the left drawer on phones. */
.mobile .mobile-container-tools .mobile-container-actions{display:none}

.mobile .mobile-topbar{display:flex;justify-content:flex-start;gap:10px}.mobile-greeting{font-size:17px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.mobile .main>.page-header{display:none}

.mobile-header-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.mobile-page-description{font-size:11px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-page-description:empty{display:none}

.mobile .mobile-drawer .modal-body{padding:12px 14px}.mobile .mobile-drawer .modal-body>.stack{gap:3px}.mobile .mobile-drawer .modal-body button{border:0;background:transparent;border-radius:9px;min-height:46px;padding:11px 10px;font-size:14px;text-align:left;font-weight:500}.mobile .mobile-drawer .modal-body button:active{background:var(--line)}.mobile .mobile-drawer .modal-head{padding:16px}.mobile .mobile-drawer .modal-head h2{font-size:19px}

.mobile .mobile-topbar>.drawer-toggle{width:44px;height:44px;min-width:44px;flex:0 0 44px;display:flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;box-shadow:none;border-radius:10px}.mobile .mobile-topbar>.drawer-toggle:active{background:var(--line)}.client-tag{font-size:10px;color:var(--muted);white-space:nowrap;flex:none}.mobile-greeting{font-size:clamp(15px,4.1vw,17px)}

.mobile .mobile-drawer .modal-body{padding:10px 12px}.mobile .mobile-drawer .modal-body button{font-size:16px;line-height:1.45;min-height:48px;padding:11px 10px}.mobile .mobile-drawer h3{font-size:12px;margin:16px 0 6px}.mobile .mobile-drawer .modal-head h2{font-size:20px}

/* Six equally sized intake choices, icon above label. */
.mobile .mobile-scan-actions.intake-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}.mobile .intake-grid>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-width:0;min-height:112px;padding:12px 6px;font-size:14px;font-weight:500;line-height:1.4}.mobile .intake-icon{display:block;width:30px;height:30px;flex:none;color:var(--text)}.mobile .intake-icon svg{width:100%;height:100%}

/* Contained, raised tabs; shadows remain inside the form frame. */
.container-depth-tabs{display:flex!important;gap:4px!important;padding:5px!important;margin:0!important;border:1px solid var(--line);border-radius:12px 12px 0 0;background:color-mix(in srgb,var(--panel) 88%,#888 12%);box-shadow:inset 0 2px 5px #0002;overflow:hidden}
.container-depth-tabs button{flex:1;margin:0!important;min-height:46px;border:1px solid transparent!important;border-radius:8px!important;background:transparent;color:var(--muted);box-shadow:none}
.container-depth-tabs button.active{color:var(--text);font-weight:700;background:linear-gradient(180deg,#ffffff20,#00000008),var(--panel);border-color:var(--line)!important;box-shadow:inset 0 1px #ffffff28,0 2px 4px #0003;transform:none}
.container-tab-body{padding:14px;border:1px solid var(--line);border-top:0;border-radius:0 0 12px 12px;background:var(--panel);min-width:0}
.main.page-leaving{transition:opacity 120ms ease-out;opacity:0!important}
.main.page-entering{animation:page-arrive 190ms cubic-bezier(.22,1,.36,1) both}
@keyframes page-arrive{from{opacity:.96;transform:translateX(var(--page-shift,0px))}to{opacity:1;transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){.main.page-leaving{transition:none}.main.page-entering{animation:none}}

.container-editor-frame{gap:0!important;min-width:0}

/* Feedback occupies its own lane above navigation; no header overlay. */
.mobile .pull-refresh{top:auto;transform:translate(-50%,4px);max-width:calc(100% - 24px);white-space:nowrap}
.mobile .pull-refresh.visible{transform:translate(-50%,0)}

/* The pull gesture unfolds a slim row below the header, in document flow. */
.mobile .main:has(>.pull-refresh){padding-top:calc(16px + var(--refresh-reveal,0px));transition:padding-top 220ms cubic-bezier(.22,1,.36,1);position:relative}
.mobile .main:has(>.pull-refresh.dragging){transition:none}
.mobile .main>.pull-refresh{position:absolute;inset:0 0 auto;left:0;top:0;bottom:auto;width:100%;max-width:none;height:0;padding:0;border:0;border-radius:0;box-shadow:none;background:var(--bg);transform:none;overflow:hidden;justify-content:center;gap:8px;opacity:0;transition:height 220ms cubic-bezier(.22,1,.36,1),opacity 150ms;z-index:1}
.mobile .main>.pull-refresh.visible{transform:none;opacity:1}
.mobile .main>.pull-refresh.dragging{transition:none}
@media(prefers-reduced-motion:reduce){.mobile .main:has(>.pull-refresh),.mobile .main>.pull-refresh{transition:none}}

.mobile .pull-refresh.complete::before{content:"✓";transform:none}.mobile .pull-refresh.failed::before{content:"!";transform:none}.mobile .pull-refresh.complete{font-weight:600}

.mobile .main.refresh-restoring:has(>.pull-refresh){transition:none}
