.pwa-install-trigger { min-height: 44px; min-width: 44px; }
.auth-card > .pwa-install-trigger { display: block; width: 100%; margin-top: 12px; }
.pwa-install-symbol { font-size: 24px; line-height: 1; }
.pwa-instructions { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; overflow: auto; border: 1px solid var(--line, #ddd); border-radius: 12px; background: var(--panel, #fff); color: var(--text, #0f172a); }
.pwa-instructions::backdrop { background: rgb(0 0 0 / 45%); }
.pwa-instructions h2 { margin-top: 0; }
.pwa-instructions button { min-height: 44px; }
@media (display-mode: standalone) { .pwa-install-trigger { display: none !important; } }
@media (max-width: 760px) {
  .app { height: 100dvh; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .app.in-chat { grid-template-columns: minmax(0, 1fr); }
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; padding: 8px; min-width: 0; }
  .brand { width: auto; flex-wrap: wrap; gap: 4px; min-width: 0; }
  .brand .btn { min-height: 44px; padding: 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
  .top-right { grid-column: 2; grid-row: 1; align-self: start; }
  .top-right .me strong { display: none; }
  .topbar #search { grid-row: 2; grid-column: 1 / -1; max-width: none; width: 100%; height: 44px; }
  .sidebar, .chat, .chat-view, .chat-header, .composer, .messages { min-width: 0; }
  .icon-btn, .me { min-width: 44px; min-height: 44px; }
  input:not([type=checkbox]):not([type=radio]), textarea, select { font-size: 16px; }
  .auth { padding-top: max(20px, env(safe-area-inset-top, 0px)); padding-bottom: max(20px, env(safe-area-inset-bottom, 0px)); }
}
