/* Phone layout: every phone-class (app--phone) rule of docs/design/ib.css and the boards (mappings, activity-settings, checks), as a width query on `.app`.
   The boards fix the phone width with a class; the real page has no such class, so the same rules apply below 640px. */
@media (max-width:640px){
.app{padding:0 16px 24px}
.app .bar{margin:0 -16px;padding:12px 16px;flex-wrap:wrap}
.app .bar .btn{margin-left:0;width:100%;height:44px}
.app .sec{grid-template-columns:1fr;gap:8px}
.app .steps li{grid-template-columns:32px minmax(0,1fr)}
.app .steps li .btn{grid-column:2;justify-self:start}
.app .kv{grid-template-columns:1fr;gap:6px}
.app .pt,.app .inp,.app .tbl .inp,.app .tbl .btn{height:44px}
.app .btn{min-height:44px}
.app .tab{min-height:44px}
.app .chip{height:32px;min-width:44px}
.app .chkrow input{width:24px;height:24px}
.app .sel{width:100%}
.app .bar__l,.app .bar__r{width:100%}
.app .bar__r .btn{flex:1}
.app .view{min-height:44px}
.app .chip{height:44px}
.app .frow{flex-direction:column;align-items:stretch}
.app .frow .inp,.app .inp,.app .inp--w{width:100%;max-width:none;height:44px}
.app .btn{height:44px}
.app .btn--text{height:44px;padding:0 4px}
.app .more .btn,.app .empty .btn,.app .savebar .btn,.app .panel__acts .btn,.app .drawer__acts .btn{width:100%}
.app .chkrow{min-height:44px;align-items:center}
.app .chkrow input{flex:none}
.app .more{flex-direction:column;align-items:stretch;gap:12px}
.app .more .mut{text-align:center}
.app .sel .btn{margin-left:0;width:100%}
.app .na{grid-template-columns:44px minmax(0,1fr);gap:0 4px;padding:12px 0}
.app .na .cbl{margin:-4px 0 0 -12px}
.app .na__b{grid-column:2}
.app .na__act{grid-column:2;flex-direction:column;margin-top:12px}
.app .na__act .btn{width:100%}
.app .na__h{gap:12px}
.app .drawer{border-left:0;padding-left:0}
.app .drawer__acts{flex-direction:column;align-items:stretch}
.app .facts{grid-template-columns:1fr;gap:2px}
.app .facts dd{margin-bottom:8px}
.app .tl li{grid-template-columns:64px minmax(0,1fr)}
.app .addrow{flex-direction:column;align-items:stretch}
.app .panel{padding:16px}
.app .panel__acts{flex-direction:column}
.app .rl .btn{width:auto}
.app .steps--plain li{grid-template-columns:32px minmax(0,1fr)}
.app .steps li .st{grid-column:2;justify-self:start}
.app .facts{grid-template-columns:104px minmax(0,1fr)}
.app .btn,.app .tab{min-height:44px}
.app .actions{flex-direction:column;align-items:stretch}
.app .actions .btn{width:100%}
.app .btn--text{display:inline-flex;justify-content:flex-start;width:auto;min-height:44px;height:auto}
.app .actions .btn--text{justify-content:center;width:100%}
.app .lines li{grid-template-columns:1fr;gap:2px}
.app .fields{flex-direction:column;align-items:stretch;gap:16px}
.app .inp{max-width:none;width:100%;height:44px}
.app .headline{font-size:26px;line-height:32px}
.app .foot a{display:inline-flex;align-items:center;min-height:44px;padding:0 4px}
.app .foot{gap:4px 16px}
.app .split{grid-template-columns:1fr}
.app .sec{grid-template-columns:minmax(0,1fr)}
.app .sec>*{min-width:0}
.app .lines .when{font-size:12px}
}
