/* Phone ergonomics only: keep the established desktop composition. */
.connection-status { padding: 12px 20px; background: #453820; color: #ffedc4; text-align: center; font-size: 13px; line-height: 1.5; }
.connection-status[hidden], .pwa-install[hidden] { display: none; }
#install-dialog { width: min(440px, calc(100% - 32px)); padding: 28px; }
#install-dialog h2 { font-size: 25px; line-height: 1.3; }
#install-dialog p { font-size: 14px; color: var(--muted); line-height: 1.8; margin: 18px 0; }
#install-dialog form { margin-top: 22px; }
.pwa-install { min-height: 44px; }
@media (max-width: 760px) {
  html { scroll-padding-top: calc(84px + env(safe-area-inset-top)); scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  body { min-height: 100dvh; }
  body :is(input, select, textarea) { font-size: 16px; }
  body :is(.text-input, .filter-select, .amount-input, .search-field input, .support-compose textarea) { font-size: 16px; min-height: 46px; }
  body :is(.button, .text-button, .icon-action, .close-button) { min-height: 44px; }
  body :is(.text-input, textarea, select, button, a) { scroll-margin-block: 100px; }
  body dialog { max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px); overflow-y: auto; overscroll-behavior: contain; }
  body[data-member-workspace="true"] .topbar { min-height: calc(68px + env(safe-area-inset-top)); height: auto; padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); gap: 8px; }
  body[data-member-workspace="true"] .breadcrumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body[data-member-workspace="true"] .topbar-right { gap: 8px; flex-shrink: 0; }
  body .theme-control { min-height: 44px; padding-inline: 6px; gap: 4px; }
  body .theme-control select { font-size: 16px; min-height: 42px; max-width: 90px; }
  body[data-member-workspace="true"] .mobile-profile { min-width: 44px; width: 44px; height: 44px; }
  body[data-member-workspace="true"] .navigation { padding: 6px max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  body[data-member-workspace="true"] .navigation a { min-height: 52px; }
  body[data-member-workspace="true"] main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); padding-top: 24px; }
  body[data-member-workspace="true"] .page-heading { margin-bottom: 22px; }
  body[data-member-workspace="true"] .page-heading h1 { font-size: 29px; line-height: 1.2; }
  body[data-member-workspace="true"] .heading-subtitle { font-size: 13px; }
  body[data-member-workspace="true"] .page-heading > .button { min-height: 44px; }
  body[data-member-workspace="true"] .member-overview-top.has-deposit .member-overview-hero { min-height: 0; padding: 24px; }
  body[data-member-workspace="true"] .member-overview-top.has-deposit .member-hero-bottom { margin-top: 20px; padding-top: 18px; }
  body[data-member-workspace="true"] .member-overview-top.has-deposit .member-total { font-size: 48px; margin: 10px 0; }
  body[data-member-workspace="true"] .member-deposit-panel { padding: 20px; }
  body[data-member-workspace="true"] .member-deposit-selectors { gap: 12px; }
  body[data-member-workspace="true"] .member-deposit-selectors .input-label { font-size: 12px; }
  body[data-member-workspace="true"] .member-deposit-selectors select { padding-inline: 10px; }
  body[data-member-workspace="true"] .member-deposit-code { width: min(212px, 100%); }
  body[data-member-workspace="true"] .member-deposit-note { font-size: 12px; }
  body[data-member-workspace="true"] .member-deposit-address { font-size: 13px; overflow-wrap: anywhere; }
  body[data-member-workspace="true"] :is(.member-wallet-tabs, .member-account-tabs) a { min-height: 48px; padding-top: 10px; }
  body[data-member-workspace="true"] .page-footer { flex-wrap: wrap; gap: 10px 18px; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  body[data-member-workspace="true"] .support-compose { flex-wrap: wrap; }
  body[data-member-workspace="true"] .support-compose textarea { flex-basis: 100%; }
  body[data-member-workspace="true"] .support-compose .button { margin-left: auto; }
  body[data-member-workspace="true"] .support-log { height: clamp(200px, 42dvh, 420px); }
}
@media (max-width: 380px) {
  body[data-member-workspace="true"] .topbar { padding-inline: max(10px, env(safe-area-inset-left)); }
  body[data-member-workspace="true"] .topbar-right { gap: 5px; }
  body .theme-control > svg { display: none; }
  body .theme-control select { max-width: 87px; }
}
@media (display-mode: standalone) {
  .pwa-install { display: none; }
  body { overscroll-behavior-y: none; }
}

.membership-billing-list { padding: 0 24px; }
.membership-billing-item { padding: 22px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.membership-billing-item h3 { font-size: 17px; }
.membership-billing-item p { margin: 12px 0; color: var(--muted); line-height: 1.7; }
.membership-billing-item form > .button { margin-top: 18px; }
.membership-billing-item details { margin-block: 16px; }
.membership-billing-item summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.membership-invoice { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px; margin-block: 18px; background: var(--page); border: 1px solid var(--line); border-radius: 12px; }
.membership-invoice > div { min-width: 0; }
@media(max-width:600px) { .membership-invoice { flex-direction: column; align-items: stretch; } .membership-billing-list { padding-inline: 16px; } }
