/* MAG-POLISH-20261109: shared phone and tablet layer for every Magnolia staff screen.
   Wide tables become compact cards (labels from the column headings), nothing is cut off,
   spacing is tight, and the page never flashes a foreign colour while loading. */
html{background:#FAF7F2;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto}
select,input,textarea{max-width:100%;box-sizing:border-box}
.mag-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%;border-radius:12px}
.mag-scroll>table{min-width:560px}
@media (max-width:900px){
  table.mag-cards tr.mag-hrow{display:none!important}
  .e-wrap,.wrap,.page,.container-narrow{padding-left:12px!important;padding-right:12px!important}
  .e-wrap{padding-top:14px!important;padding-bottom:72px!important}
  .e-title{font-size:1.65rem!important;line-height:1.15!important;margin-top:6px!important}
  .e-sub{margin-bottom:12px!important}
  .note{padding:10px 12px!important;margin-bottom:12px!important}
  table.mag-cards{display:block!important;width:100%!important;min-width:0!important;border:0!important;background:transparent!important;box-shadow:none!important;border-collapse:separate!important}
  table.mag-cards>thead{display:none!important}
  table.mag-cards>tbody,table.mag-cards>tfoot{display:grid!important;grid-template-columns:minmax(0,1fr);gap:10px;width:100%}
  table.mag-cards>tbody>tr,table.mag-cards>tfoot>tr{display:grid!important;grid-template-columns:minmax(74px,32%) minmax(0,1fr);column-gap:12px;row-gap:4px;align-items:start;background:#fff!important;border:1px solid #e4e0d5!important;border-radius:14px;padding:12px 14px!important;box-shadow:0 1px 2px rgba(58,75,62,.07);height:auto!important;margin:0!important}
  table.mag-cards>tbody>tr>td,table.mag-cards>tbody>tr>th,table.mag-cards>tfoot>tr>td{display:contents!important}
  table.mag-cards td::before,table.mag-cards th::before{content:attr(data-label);grid-column:1;font:600 .62rem/1.6 Montserrat,system-ui,sans-serif;letter-spacing:.09em;text-transform:uppercase;color:#8a938a;padding-top:2px}
  table.mag-cards .mag-c{grid-column:2;min-width:0;overflow-wrap:anywhere;font-size:.86rem;line-height:1.45;text-align:left;color:inherit}
  table.mag-cards td:first-child::before,table.mag-cards th:first-child::before{display:none}
  table.mag-cards td:first-child>.mag-c,table.mag-cards th:first-child>.mag-c{grid-column:1/-1;font-size:.98rem;font-weight:600;padding-bottom:6px;margin-bottom:2px;border-bottom:1px solid #eef0ea}
  table.mag-cards td[data-label=""]::before{display:none}
  table.mag-cards td[data-label=""]>.mag-c,table.mag-cards td.mag-span>.mag-c{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding-top:4px}
  table.mag-cards td.mag-span::before{display:none}
  table.mag-cards td.mag-empty{display:none!important}
  table.mag-cards .mag-c button,table.mag-cards .mag-c .btn,table.mag-cards .mag-c a.btn{min-height:34px}
  table.mag-cards .mag-c select,table.mag-cards .mag-c input:not([type=checkbox]):not([type=radio]){width:100%;min-height:36px}
}
@media (min-width:600px) and (max-width:900px){
  table.mag-cards>tbody,table.mag-cards>tfoot{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
}
@media (max-height:480px) and (orientation:landscape){
  .e-wrap{padding-top:8px!important}
  .e-title{font-size:1.35rem!important}
}

/* Second pass (same day): selects and labels never wider than the screen; the WhatsApp inbox stacks; long bold lines wrap. */
@media (max-width:900px){
  label{min-width:0;max-width:100%}
  label>select,label>input:not([type=checkbox]):not([type=radio]),label>textarea{width:100%;max-width:100%;min-width:0}
  .row>*,.e-bar>*{min-width:0}
  li b,li strong,td b,td strong{overflow-wrap:anywhere}
  .wa-wrap{flex-direction:column!important;height:auto!important;min-height:0!important}
  .wa-list{width:100%!important;border-right:0!important;border-bottom:1px solid rgba(0,0,0,.08);max-height:44vh;overflow:auto}
  .wa-thread{width:100%!important;min-height:52vh}
}

/* THIRD PASS 20261109: calm phone chrome. No rubber-band bounce, the title block scrolls away instead of pinning a
   third of the screen, lining numerals so 0 reads as 0, a drawer that never covers more than three quarters,
   and floating notices that stack instead of overlapping. */
html,body{overscroll-behavior-y:none}
/* the heading font draws 0 like a letter o by default; the font shorthand on many cards resets inherited settings, hence !important */
body,body *{font-feature-settings:"lnum" 1!important}
@media (max-width:900px),(max-height:520px){
  .dash-topbar{position:static!important;top:auto!important}
  .dash-topbar-left h1{font-size:clamp(1.45rem,6.6vw,1.9rem)!important;line-height:1.15!important}
  .dash-topbar-left .dash-date{font-size:.7rem!important;letter-spacing:.1em!important}
  .dash-mobile-toggle{background:#3A4B3E!important;border-radius:12px!important;box-shadow:0 4px 14px rgba(46,61,49,.28)!important}
  .dash-sidebar{width:min(72vw,280px)!important;max-width:none!important}
}
@media (max-height:520px){
  .dash-topbar{padding-top:.7rem!important;padding-bottom:.7rem!important}
  .dash-topbar-left h1{font-size:1.35rem!important}
}
#magSignPill,#magSignNotice{right:14px!important;bottom:calc(64px + env(safe-area-inset-bottom,0px))!important}
.pm-fab{bottom:calc(12px + env(safe-area-inset-bottom,0px))!important}

/* shell pages: room for the menu (the menu itself is added by js/mag-shell.js) */
body.mag-shell{margin:0}
@media (min-width:901px){body.mag-shell{padding-left:284px}}
@media (max-width:900px){body.mag-shell{padding-top:60px}}
