.mobile-bottom-nav { display: none; }
.mobile-app-tools { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 9px 40px 0; color: #73869b; font-size: 11px; }
.mobile-app-tools button { border: 0; border-radius: 6px; color: #0868b1; background: transparent; padding: 7px 9px; font: inherit; cursor: pointer; }
.mobile-app-tools button:hover { background: #e8f2fd; }
.mobile-app-tools[hidden] { display: none; }
.mobile-offline-banner { padding: 12px 20px; color: #815e17; background: #fff3d9; border-bottom: 1px solid #f0dcad; font-size: 13px; line-height: 1.7; }
.mobile-offline-banner[hidden] { display: none; }
.mobile-install-dialog { width: min(430px, calc(100vw - 40px)); border: 1px solid #dfe7ef; padding: 30px; border-radius: 18px; background: #fff; color: #334b63; box-shadow: 0 20px 80px #10233e38; max-height: calc(100dvh - 40px); overflow: auto; }
.mobile-install-dialog::backdrop { background: #10233e70; }
.mobile-install-dialog img { border: 1px solid #e1e9f2; border-radius: 14px; }
.mobile-install-dialog h2 { margin: 19px 0 12px; font-size: 20px; line-height: 1.5; color: #173451; }
.mobile-install-dialog p, .mobile-install-dialog li { font-size: 13px; line-height: 1.9; }
.mobile-install-dialog ol { padding-left: 20px; margin: 20px 0; }
.mobile-install-dialog li { padding-left: 4px; margin: 10px 0; }
.mobile-install-close { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; border: 0; border-radius: 8px; color: #718298; background: #f3f6fa; font-size: 25px; cursor: pointer; }
.mobile-install-note { color: #718298; }
.mobile-install-feedback:empty { display: none; }
.mobile-install-feedback { color: #0868b1; }
.mobile-install-dialog [hidden] { display: none; }
.android-apk-download { margin: 18px 0; }
.android-apk-download .button { width: 100%; justify-content: center; text-decoration: none; }
.android-apk-download p { margin: 8px 0 0; color: #718298; text-align: center; }
@media (max-width: 700px) {
  :root { --mobile-nav-height: calc(66px + env(safe-area-inset-bottom, 0px)); }
  body { padding-bottom: var(--mobile-nav-height); }
  .topbar { height: calc(68px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); }
  .mobile-app-tools { justify-content: space-between; padding: 5px 18px 0; font-size: 10px; }
  .mobile-app-tools button { min-height: 36px; font-size: 11px; }
  .mobile-bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 25; min-height: var(--mobile-nav-height); padding: 7px max(10px, env(safe-area-inset-right, 0px)) max(7px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); background: #fffffffa; border-top: 1px solid #dfe7ef; box-shadow: 0 -4px 18px #10233e05; backdrop-filter: blur(12px); }
  .mobile-bottom-nav a { min-height: 48px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; text-decoration: none; color: #79899b; font-size: 10px; border-radius: 8px; }
  .mobile-bottom-nav a.active { color: #0868b1; background: #edf5ff; font-weight: 600; }
  .mobile-bottom-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .toast-stack { bottom: calc(var(--mobile-nav-height) + 14px); }
  .sidebar { padding-top: calc(24px + env(safe-area-inset-top, 0px)); padding-bottom: max(20px, env(safe-area-inset-bottom, 0px)); }
  .drawer { padding-top: calc(24px + env(safe-area-inset-top, 0px)); padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
  .modal { max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 24px); }
  .form-control, input, select, textarea { font-size: 16px !important; }
  .workspace-footer { padding-bottom: 20px; }
  .focus-panel { padding: 22px 20px; }
  .focus-panel-empty h2 { font-size: 20px; }
  .focus-meta-row { gap: 12px; line-height: 1.8; }
  .mobile-install-dialog { padding: 24px; }
}
@media (display-mode: standalone) and (max-width: 700px) {
  .mobile-app-tools:has(#mobile-install-trigger[hidden]) { display: none; }
}
@media print {
  .mobile-bottom-nav, .mobile-app-tools, .mobile-offline-banner, .mobile-install-dialog { display: none !important; }
  body { padding-bottom: 0; }
}
