/* Shared phone and tablet layout; desktop and print styles remain independent. */
@media screen and (max-width:900px){
  .page,.panel,.office-section,.demo-controls,.data-item,.form-field,.two-col>*{min-width:0}
  .topbar{position:sticky;top:0;z-index:35;min-height:68px;height:auto;padding-block:10px}
  .crumb{min-width:0;gap:8px}.crumb b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:38vw}
  .top-actions{flex-shrink:0}.menu-toggle{min-width:44px;min-height:44px}
  .sidebar{max-width:calc(100vw - 52px);height:100dvh;z-index:60}
  .mobile-nav-close{display:block;margin:12px 16px 0;min-height:44px;background:#284765;color:white;border:1px solid #71879f;border-radius:7px}
  body.nav-open{overflow:hidden}.nav-link{min-height:44px;align-items:center}
  .btn,.tabs button,.year-tabs button,.anchor-nav a{min-height:44px;align-items:center}
  input:not([type=checkbox]):not([type=radio]),select,textarea,.control{font-size:16px;max-width:100%;min-height:44px}
  input[type=checkbox],input[type=radio]{min-width:20px;min-height:20px}
  .table-wrap{max-width:100%;overflow:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
  .table-wrap:before{content:'Swipe horizontally to view all columns';display:block;font-size:12px;color:#607185;padding:8px 12px;background:#f3f6fa;width:max-content;max-width:100%;position:sticky;left:0}
  .table-wrap:focus-visible{outline:3px solid #245d92;outline-offset:3px}
  .tabs,.year-tabs,.anchor-nav{display:flex;flex-wrap:nowrap;overflow-x:auto;max-width:100%;gap:8px;padding-bottom:8px;scroll-padding-inline:8px}
  .tabs button,.year-tabs button,.anchor-nav a{flex:0 0 auto;white-space:nowrap}
  .analytics-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .modal{padding:12px}.dialog{max-height:calc(100dvh - 24px);overscroll-behavior:contain;scroll-padding-block:20px}
  .data-item strong,.notice,.analytics-scope,.profile-header h2{overflow-wrap:anywhere}
}
.mobile-nav-close{display:none}
@media screen and (max-width:900px){.mobile-nav-close{display:block}}
@media screen and (max-width:600px){
  .page{padding:18px 14px 32px}.panel{padding:17px}.demo-controls{display:grid;grid-template-columns:minmax(0,1fr)}
  .demo-controls>label{min-width:0;width:100%}.demo-controls select,.demo-controls input{width:100%}
  .analytics-filters{grid-template-columns:1fr;gap:14px}.analytics-filters .btn{justify-self:stretch}
  .analytics-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.analytics-sections .btn{font-size:12px;padding:10px;white-space:normal}
  .analytics-sections .btn:last-child{grid-column:1/-1}.office-navigation button{min-height:72px}
  .record-actions,.form-actions{display:flex;flex-wrap:wrap;gap:8px}.record-actions .btn,.form-actions .btn{flex:1 1 130px}
  .round-board{grid-template-columns:minmax(0,1fr);overflow:visible}.round-column{padding:14px}
  .owner-card,.org-branches{grid-template-columns:1fr}.branch-balance>div:first-child{flex-wrap:wrap;gap:4px 12px}
  .dialog{padding:18px;width:100%}.dialog-header{align-items:flex-start}.dialog-header .btn{flex-shrink:0}
  .toast{bottom:12px;right:12px;left:12px;max-width:none;padding:14px;overflow-wrap:anywhere}
  .profile-header{gap:12px}.profile-header h2{font-size:1.2rem}.qr-card{min-width:0}
}
@media screen and (max-width:360px){.data-grid,.metrics{grid-template-columns:minmax(0,1fr)}.crumb b{max-width:31vw}.top-actions .btn{padding-inline:8px}.office-navigation button{grid-template-columns:1fr}.office-navigation button>span{display:none}}
