@media(max-width:768px){
 #app-screen .layout-transfer :is(#panel-redeem,#panel-analytics,#panel-opt,#panel-settings,#panel-calculator,#panel-schedule)>.panel-header{display:flex!important;flex-wrap:wrap;align-items:center;gap:10px;box-sizing:border-box;height:auto!important;min-height:64px;padding:12px 14px;flex:none}
 #app-screen .layout-transfer :is(#panel-redeem,#panel-analytics,#panel-opt,#panel-settings,#panel-calculator,#panel-schedule)>.panel-header>.panel-title{font-size:22px;line-height:1.3;min-width:0;overflow-wrap:anywhere;flex:1}
 #app-screen .layout-transfer :is(#panel-redeem,#panel-analytics,#panel-opt,#panel-settings,#panel-calculator,#panel-schedule)>.panel-header>.back-btn{flex:0 0 36px;width:36px;min-width:36px;min-height:44px;height:44px;margin:0;padding:0;display:grid;place-items:center}
 #app-screen .layout-transfer :is(#panel-redeem,#panel-analytics,#panel-opt,#panel-settings,#panel-calculator,#panel-schedule)>.panel-header :is(.redeem-header-tabs,.an-tabs,#opt-pill-switcher,.settings-sections,.xcalc-tabs,.staff-workspace-tabs){order:10;display:flex!important;flex:0 0 100%!important;box-sizing:border-box;width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important;gap:4px!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;justify-content:flex-start!important;scroll-padding:6px;scrollbar-width:thin;overscroll-behavior-x:contain;touch-action:pan-x pan-y;padding:4px!important;border-radius:12px}
 #app-screen .layout-transfer .panel-header :is(.redeem-header-tabs,.an-tabs,#opt-pill-switcher,.settings-sections,.xcalc-tabs,.staff-workspace-tabs)>button{box-sizing:border-box;flex:0 0 auto!important;min-height:44px!important;width:auto!important;white-space:nowrap;font-size:12px;line-height:1.3;padding:8px 12px}
 #app-screen #panel-analytics .an-brand{flex:1;min-width:0}
 #app-screen #panel-analytics .an-brand .panel-title{font-size:22px;line-height:1.3}
 #app-screen #panel-settings #btn-debug-open{margin-left:auto;min-height:44px}
}

@media(max-width:768px){#app-screen #panel-opt>.panel-header>#opt-header-actions{order:10;flex:0 0 100%;min-width:0;max-width:100%}}
@media(max-width:768px){#app-screen .layout-transfer .panel-header :is(.redeem-header-tabs,.an-tabs,#opt-pill-switcher,.settings-sections,.xcalc-tabs,.staff-workspace-tabs){height:auto!important;min-height:54px!important;align-items:center!important}}

/* The compact two-tab headers use the same touch targets as the other sections. */
@media(max-width:768px){
 #app-screen .panel-header .back-btn{min-width:44px!important;width:44px!important;min-height:44px!important;flex:0 0 44px!important}
 #app-screen .panel-header :is(#qr-pill-switcher,#keybuy-pill-switcher,#home-pill-switcher){height:auto!important;min-height:52px!important;align-items:center}
 #app-screen .panel-header :is(#qr-pill-switcher,#keybuy-pill-switcher,#home-pill-switcher) .pill-btn{min-height:44px!important;height:44px!important;display:inline-flex;align-items:center;justify-content:center}
}
