/* MOBILE_R60: phone bottom bar and phone fixes. Loaded only while the switch is on. Logical properties only; nothing smaller than 14px; every tap target at least 44px. */
.r60-bar{display:none}
@media (max-width:900px){
  body{padding-block-end:calc(64px + env(safe-area-inset-bottom,0px))}
  .r60-bar{display:flex;position:fixed;inset-inline:0;inset-block-end:0;z-index:40;background:var(--surface,#fff);border-block-start:1px solid var(--line,#d1d5db);padding-block-end:env(safe-area-inset-bottom,0px);justify-content:space-around}
  .r60-bar a,.r60-bar button{flex:1 1 0;min-inline-size:44px;min-block-size:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font:inherit;font-size:14px;line-height:1.2;color:var(--muted,#4b5563);background:transparent;border:0;border-radius:0;text-decoration:none;padding:6px 2px;box-shadow:none;cursor:pointer}
  .r60-bar a.on,.r60-bar a[aria-current=page]{color:var(--brand,#1d4ed8);font-weight:700}
  .r60-bar a:focus-visible,.r60-bar button:focus-visible{outline:3px solid var(--brand,#1d4ed8);outline-offset:-3px}
  /* phone fixes found by scripts/qc/r60-mobile-audit.sh */
  .table-wrap{max-inline-size:100%;overflow-x:auto}
  pre,code{overflow-wrap:anywhere}
  pre{white-space:pre-wrap}
  img,video,canvas,svg{max-inline-size:100%;block-size:auto}
  .page-head{flex-wrap:wrap}
  .page-head .actions{inline-size:100%;display:flex;flex-wrap:wrap;gap:8px}
  .page-head .actions .btn,.page-head .actions button{min-block-size:44px}
  .row{flex-wrap:wrap}
  input:not([type=checkbox]):not([type=radio]):not([type=color]),select,textarea{min-block-size:44px;font-size:16px;max-inline-size:100%}
  .btn,button,.fit,summary{min-block-size:44px}
  input[type=checkbox],input[type=radio]{inline-size:28px;block-size:28px;min-block-size:28px;margin:8px}
  /* little pop-over forms (Log a call, etc.) open as a sheet above the bottom bar instead of running off the left edge */
  details[open]>form.card[style*="position:absolute"],details[open]>.card[style*="position:absolute"]{position:fixed!important;inset-inline:8px!important;inset-block-end:72px!important;inset-block-start:auto!important;min-inline-size:0!important;max-block-size:60vh;overflow:auto;z-index:45}
}
@media (prefers-reduced-motion:reduce){.r60-bar *{transition:none!important}}
