/* Phones (Android and iPhone). Loaded last so it wins over the desktop layout: keeps every page inside the screen width. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
:root{--pn-accent:var(--purple,#50106e);--pn-accent-dark:#c9a2ea;--pn-ink:#211a2d}
img,video,canvas{max-width:100%;height:auto}
.table-wrap,.table-scroll,.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
@media (max-width:760px){
  body{overflow-x:hidden}
  .main{min-width:0}
  /* top bar: page title on its own line, language / theme / account underneath */
  .topbar{flex-wrap:wrap;align-items:flex-start;gap:10px;height:auto}
  .topbar{align-items:center}
  .topbar>div:first-of-type{flex:1 1 0;min-width:0}
  .install-bar{bottom:calc(92px + env(safe-area-inset-bottom))!important}
  .topbar .eyebrow{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:.12em}
  .topbar h1{font-size:1.45rem;line-height:1.2;overflow-wrap:anywhere}
  .topbar-tools{flex:1 1 100%;justify-content:flex-start;flex-wrap:wrap;gap:8px;min-width:0}
  .topbar-tools .theme-toggle .tt-text{display:none}
  .topbar-tools .user-pill>span:not(.avatar){display:none}
  .page-intro{flex-direction:column;gap:12px}
  .filter-bar,.actions,.form-actions{flex-wrap:wrap}
  input,select,textarea{max-width:100%;font-size:16px}           /* 16px stops iPhone zooming into fields */
  pre,code{white-space:pre-wrap;word-break:break-word}
}
@media (max-width:380px){
  .content{padding-left:10px;padding-right:10px}
  .panel{padding:14px}
}
