html, body { height: 100%; margin: 0; }
html:has(.app), body:has(.app), .stage:has(.app), .app, .app .content { overscroll-behavior: none; }
#reader-page { touch-action: pan-y; overscroll-behavior: none; }
.stage { display: block; min-height: 100%; box-sizing: border-box; background: #F3F4F6; }
.stage:has(.app) { height: 100dvh; overflow: hidden; padding: 0; }
.app { height: 100%; min-height: 0; max-height: 100%; display: flex; flex-direction: column; background: var(--e-page, #F3F4F6); }
.app .content { flex: 1; min-height: 0; overflow: auto; }
.appbar { padding-top: env(safe-area-inset-top); height: auto; min-height: 64px; }
.tabbar { height: auto; min-height: 64px; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tab { min-height: 56px; min-width: 48px; }
.signin { width: min(420px, 100%); }
.pad .key, button.key { min-height: 56px; touch-action: manipulation; }
.gate { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; }
.gate .card { width: min(560px, 100%); }
.admin-app { min-height: 100dvh; display: flex; flex-direction: column; background: var(--e-page, #F3F4F6); }
.admin-app .adminbody { flex: 1; min-height: 0; }
button, input, select { font: inherit; }
input.field, select.field, .field-input { width: 100%; min-height: 44px; border: 1px solid var(--e-border); border-radius: 13px; padding: 0 12px; background: #fff; }
label.block, label.fl { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button.btn, a.btn { cursor: pointer; }
button.key { width: 100%; }
button.cell { width: 100%; }
.content { overflow: auto; }
.browser .inner { overflow: visible; }
button.nav, a.nav { width: 100%; text-align: left; background: transparent; border: 0; }
button.switch { background: transparent; border: 0; padding: 0; cursor: pointer; }
.media-el { width: 100%; border-radius: 13px; background: #14171a; }
@media (max-width: 700px) {
  .stage { padding: 0; }
  .device { width: 100%; padding: 0; border-radius: 0; box-shadow: none; }
  .tablet { width: 100%; min-height: 100vh; border-radius: 0; }
  .signin { width: 100% !important; }
}
@media (max-width: 1100px) {
  .admin-app { max-width: 100vw; }
  .adminbar { height: auto; flex-wrap: wrap; row-gap: 10px; max-width: 100%; box-sizing: border-box; }
  .adminbar .r { flex-wrap: wrap; }
  .adminbody { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .sidenav { flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--e-border); width: 100%; box-sizing: border-box; }
  .sidenav .lbl { width: 100%; }
  a.nav, button.nav { width: auto; flex: 1 1 160px; }
  .sidenav .site { margin-top: 8px; width: 100%; }
  .main { padding: 20px 16px; overflow-x: auto; }
  .head { flex-direction: column; align-items: flex-start; }
  .adminfoot { flex-direction: column; gap: 6px; }
  .tw { max-width: 100%; }
}
@media (max-width: 980px) {
  .browser { border-radius: 0; }
  .adminbar { height: auto; flex-wrap: wrap; padding: 12px 16px; }
  .adminbody { grid-template-columns: 1fr; }
  .split, .kpis, .grid { grid-template-columns: 1fr !important; }
  .addr { flex-basis: auto !important; min-width: 0; }
}
