/* A drawer/dialog owns touch feedback; the page beneath it stays visually still. */
.mobile button,.mobile a,.mobile input,.mobile select,.mobile textarea,.mobile [role=button]{-webkit-tap-highlight-color:transparent}
.mobile button:active{transform:none}
.mobile button.boom-pressed:not(:disabled){transform:translateY(1px)}
.mobile .native-drawer-action.boom-pressed,.mobile .native-drawer-heading.boom-pressed{background:var(--hover)!important}
.mobile.overlay-background-locked #app{pointer-events:none}
.mobile.overlay-background-locked #app .stat{transform:none!important;animation:none!important;transition:none!important;box-shadow:none!important;outline:none!important;filter:none!important}
.mobile.overlay-background-locked #app .stat:not(.stock-low):not(.stock-out){background:var(--panel)!important;color:var(--text)!important}
.mobile.overlay-background-locked #app .stat.stock-low{background:var(--stock-low-bg)!important;color:var(--stock-low-fg)!important}
.mobile.overlay-background-locked #app .stat.stock-out{background:var(--stock-out-bg)!important;color:var(--stock-out-fg)!important}
@media(hover:none){.mobile .stat:not(.stock-low):not(.stock-out):hover{background:var(--panel);color:var(--text)}}
.mobile .stat:focus:not(:focus-visible){outline:none}
.mobile dialog.native-mobile-dialog:where(:not(.native-mobile-form,.native-item-detail,.mobile-drawer,.mobile-results-dialog)){inset:0;margin:auto;width:calc(100% - 40px)!important;max-width:600px;height:auto;max-height:calc(var(--mobile-viewport-height,100dvh) * .9);border:1px solid var(--line);border-radius:16px;background:var(--panel)}
.mobile .native-mobile-dialog:where(:not(.mobile-drawer)) .modal-head{flex:none;padding:16px 16px 10px;align-items:center;gap:8px}
.mobile .native-mobile-dialog:where(:not(.mobile-drawer)) .modal-head h2{font-size:20px;line-height:1.4;min-width:0}
.mobile .native-mobile-dialog:where(:not(.mobile-drawer)) .modal-head>button{flex:none;width:44px;height:44px;padding:0;font-size:24px}
.mobile .native-mobile-dialog:where(:not(.mobile-drawer,.mobile-results-dialog)) .modal-body{min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;flex:0 1 auto;padding:12px 20px 20px}
.mobile .native-mobile-dialog:where(:not(.mobile-drawer)) .modal-foot{flex:none;gap:8px;flex-wrap:wrap;justify-content:flex-end;padding:10px 12px calc(12px + env(safe-area-inset-bottom))}
.mobile .native-mobile-dialog:where(:not(.mobile-drawer)) .modal-foot:empty{display:none}
.mobile .native-mobile-dialog:where(:not(.mobile-drawer)) .modal-foot>button{min-height:44px;font-size:14px;white-space:normal}
.mobile .native-mobile-form .modal-body{flex:1 1 auto}
.mobile .native-action-dialog .modal-body{padding:4px 8px 12px}
.native-action-list{display:flex;flex-direction:column;gap:0}
.mobile .native-action-list>button{width:100%;border:0;border-radius:8px;text-align:left;min-height:48px;padding:13px 16px;line-height:1.5;font-size:16px;font-weight:400;white-space:normal;background:transparent;box-shadow:none}
.mobile .native-action-list>button.boom-pressed{background:var(--hover)}
.mobile .native-mobile-form .native-editor-footer{display:flex;justify-content:flex-end;gap:8px}
.mobile .native-mobile-form .native-editor-footer>button{flex:0 1 auto;min-width:58px;padding:9px 10px;border:0;background:transparent;color:var(--text)}
.mobile .native-mobile-form .native-editor-footer>button:first-child{margin-right:auto}
.mobile .native-mobile-form .native-editor-footer>button.primary{margin-left:0;font-weight:700;min-width:96px}
.native-intake-recommendations{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-top:0}
.native-intake-recommendations>button{width:100%;min-width:0;font-size:14px;white-space:normal;min-height:48px}
.native-extra-fields{grid-column:1/-1;min-width:0}
.native-extra-fields>summary{padding:14px 0;min-height:44px;color:var(--muted);cursor:pointer}
.native-extra-fields>.field{margin-top:12px}
.native-form-submit{grid-column:1/-1;padding-top:12px;width:100%}
.native-form-submit>button{width:100%;min-height:48px;font-size:15px}
.native-container-choices{display:flex;flex-direction:column;gap:12px}
.native-container-choice{padding:12px;border:1px solid var(--line);border-radius:10px}
.native-container-choice h3{font-size:16px;margin-bottom:8px}
.native-container-choice>button{margin-top:10px;min-height:44px;width:100%}
.mobile .manual-category-dialog .modal-foot>button.primary{background:transparent;color:var(--text);border:0;font-weight:700}
.mobile dialog.native-rule-dialog{height:auto;max-height:calc(var(--mobile-viewport-height,100dvh) * .85)}
.mobile .native-mobile-form .modal-foot>button:not(.danger){background:transparent;border-color:transparent;color:var(--text)}
.mobile .native-mobile-form .native-editor-footer>button.primary{background:var(--text);color:var(--panel);border:1px solid var(--text);border-radius:9px;padding:10px 14px}
.mobile .native-mobile-form .native-editor-footer>button:not(.primary){font-size:14px;color:var(--muted)}
.mobile .native-mobile-form .native-editor-footer{flex-wrap:nowrap;align-items:center;gap:6px}
.mobile .native-item-detail .modal-foot>button{background:transparent;border:0;color:var(--text)}
.mobile .native-item-detail .modal-foot>button.primary{font-weight:700}

/* Keep all three editor actions on one line; size the save action to its label. */
.mobile .native-mobile-form .native-editor-footer>button{flex:0 0 auto;min-width:0;width:auto;white-space:nowrap;padding:10px}
.mobile .native-mobile-form .native-editor-footer>button.primary{flex:0 0 auto;min-width:0;width:auto;padding:10px 12px;font-size:14px}

/* Metric sheets share the native app's compact heading and generous content area. */
.mobile dialog.mobile-metric-dialog{inset:0;margin:auto;width:calc(100% - 20px)!important;max-width:640px;height:86dvh;max-height:calc(var(--mobile-viewport-height,100dvh) * .86);border:1px solid var(--line);border-radius:20px;background:var(--panel);box-shadow:0 16px 50px #0003}
.mobile .mobile-metric-dialog .modal-head{padding:16px 14px 8px;border-bottom:0}
.mobile .mobile-metric-dialog .modal-head h2{font-size:21px;line-height:1.3}
.mobile .mobile-metric-dialog .modal-head>button{border:0;background:transparent}
.mobile .mobile-metric-dialog .modal-body{padding:0 14px 14px;display:flex;flex-direction:column;gap:12px;min-height:0;flex:1 1 0;overflow:auto}
.mobile .mobile-metric-dialog .metric-summary{margin:0;padding:0 0 12px;font-size:13px;color:var(--muted);border-bottom:1px solid var(--line);flex:none}
.mobile .mobile-metric-dialog article.card{margin:0;padding:14px;border-radius:12px;border:1px solid var(--line);flex:none}
.mobile .mobile-metric-dialog article.card strong{font-size:16px}
.mobile .mobile-metric-dialog article.card p{margin:6px 0 0;font-size:13px}
.mobile .mobile-metric-dialog .table-wrap{border-radius:10px;flex:1 1 0;min-height:0}
.mobile .mobile-metric-dialog .modal-foot:empty{display:none}
.pull-refresh.dragging{transition:opacity 100ms ease}
.mobile dialog.mobile-drawer::backdrop{background:rgb(0 0 0 / var(--drawer-shade,.42))}
@keyframes drawer-leave{from{opacity:1;transform:var(--drawer-close-x,translateX(0))}to{opacity:0;transform:translateX(-100%)}}
