/* Каркас этапа 1 (§3.1): шапка 48 px, панель 56 px + safe area */
#hdr { position: sticky; top: 0; z-index: 20; background: var(--bg2); padding: 4px 16px; }
#hdr > * { max-width: 528px; margin: 0 auto; }
body.trip #hdr { box-shadow: inset 0 -4px 0 var(--accent, #f0a020); }
.hdr-row { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.hdr-row .grow { flex: 1; }
#hdr .btn { margin-top: 0; background: var(--section); color: var(--text); }
.chip.ctx { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 0; background: var(--section);
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.chip.ctx.accent { background: var(--accent, #f0a020); color: #fff; }
.hdr-tip { font-size: 13px; text-align: right; color: var(--hint); padding-bottom: 4px; }
main#app { padding: 8px 16px calc(72px + env(safe-area-inset-bottom)); }
#tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; height: calc(56px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--bg); border-top: 1px solid color-mix(in srgb, var(--hint) 20%, transparent); }
#tabbar .tab { flex: 1; border: 0; background: none; font: inherit; font-size: 13px; color: var(--hint); cursor: pointer; }
#tabbar .tab.on { color: var(--text); font-weight: 600; }
#tabbar .badge { margin-left: 4px; padding: 0 6px; border-radius: 9px; background: var(--btn); color: var(--btn-text); }
body.kb #tabbar { display: none; }
/* плавающее над экраном — над панелью, а не под ней (панель 56 px) */
.toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
body.kb .toast { bottom: calc(20px + env(safe-area-inset-bottom)); }
/* «Нет сети» (§4): полоса в шапке, на всех экранах */
.net-bar { margin: 2px auto 4px; padding: 6px 12px; border-radius: 10px; font-size: 14px;
  color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.net-bar[hidden] { display: none; }
