/* Phone layout shared by every desk. mobile.js puts class "phone" on <html> when the screen is phone-sized.
   Rules here are deliberately generic: a desk's own @media rules still win where it has them. */
html.phone { -webkit-text-size-adjust: 100%; }
html.phone body { overflow-x: hidden; }
/* typing never zooms the page (iOS zooms any field under 16px) */
html.phone input:not([type=checkbox]):not([type=radio]):not([type=range]), html.phone select, html.phone textarea { font-size: 16px !important; max-width: 100%; }
/* things you tap are finger-sized */
html.phone button, html.phone .btn, html.phone a.btn { min-height: 38px; }
html.phone button.sm, html.phone .btn.sm { min-height: 34px; }
html.phone input[type=checkbox], html.phone input[type=radio] { width: 20px; height: 20px; }
/* page furniture */
html.phone .wrap { padding-left: 8px !important; padding-right: 8px !important; max-width: 100% !important; }
html.phone .card { padding: 12px !important; border-radius: 14px; }
html.phone h1 { font-size: 21px; }
html.phone .row, html.phone .bar, html.phone .btns, html.phone .tabs { flex-wrap: wrap; }
html.phone .two, html.phone .three { grid-template-columns: minmax(0, 1fr) !important; }
html.phone .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; } html.phone .seg button { flex: 0 0 auto; }
/* wide tables slide sideways inside their own box instead of pushing the page wide */
html.phone .mscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
html.phone .mscroll.wide > table { min-width: max-content; }
html.phone .mscroll.wide th, html.phone .mscroll.wide td { white-space: nowrap; }
html.phone .mscroll.wide td:first-child { white-space: normal; min-width: 140px; }
/* pop-ups fill the screen */
html.phone .sheet, html.phone .modal, html.phone .dialog { width: 100% !important; max-width: 100% !important; margin: 0 !important; border-radius: 14px !important; }
html.phone #ov { padding: 4px !important; }
/* the Home bar on a desk opened on its own */
#mHome { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; gap: 8px; align-items: center; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: #16181D; color: #fff; font: 700 14px "Roboto Condensed", Roboto, system-ui, sans-serif; }
#mHome a { color: #fff; text-decoration: none; background: #ED2224; border-radius: 10px; padding: 8px 14px; text-transform: uppercase; letter-spacing: .04em; }
#mHome span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .8; font-weight: 500; }
html.phone.mhome body { padding-bottom: 60px; }

/* How-to notes (data-info) are folded away until the Info button is pressed (mobile.js) */
html:not(.info-open) [data-info] { display: none !important; }
#infoFab { position: absolute; top: 6px; right: 8px; z-index: 85; min-height: 0 !important; padding: 4px 12px; border: 1.5px solid #16181D; border-radius: 999px; background: #fff; color: #16181D; cursor: pointer;
  font: 900 12px "Roboto Condensed", Roboto, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .06em; box-shadow: 2px 2px 0 rgba(0,0,0,.6); }
#infoFab.on { background: #FDD840; }

/* One page header on every desk: the title card is plain Coliseum red with white writing (marble is for page backgrounds only).
   mobile.js marks the card (.deck-hd), folds a long how-to subtitle behind Info, and puts the Info button inside the header. */
.card.deck-hd { background: #ED2224 !important; color: #fff; border-color: #16181D; }
.card.deck-hd h1, .card.deck-hd h1 small, .card.deck-hd > .muted, .card.deck-hd h1 b { color: #fff !important; }
.card.deck-hd h1 small { opacity: .92; }
.card.deck-hd[data-auto] { margin-bottom: 12px; } .card.deck-hd[data-auto] h1 { margin: 0; }
.card.deck-hd a:not(.btn) { color: #fff; }
#infoFab.inhd { position: static; float: right; margin: 0 0 4px 10px; box-shadow: none; border-color: #fff; flex: none; }
header > #infoFab.inhd { float: none; margin: 0 0 0 auto; align-self: center; }

/* a dashed box is how-to text and folds behind Info; a live message (data-keep) stays on screen with a solid edge */
.notebox[data-keep], .formula[data-keep], .rule[data-keep], .rvkey[data-keep] { border-style: solid !important; }

/* ===== ONE LOOK on every desk (Nov 25 2026, Ryan: "soft shadow with no border"). These win over a page's own styles on purpose,
   and only touch the frame of things (edge, corner, shadow, title size), never a layout. The parts themselves are in brand.css and on /app/style. ===== */
html body .card:not(.deck-hd) { border: 0; border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.07); }
html body .card.deck-hd { border: 0; border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.07); padding: 14px 16px !important; margin-bottom: 12px; min-height: 52px; }
html body .card.deck-hd h1 { font-size: 24px !important; line-height: 1.05; margin: 0; }
html body header .hTitle { font-size: 24px !important; }
html body .btn { border-radius: 10px; text-transform: none; letter-spacing: 0; box-shadow: none; }
html body .btn.sm { border-radius: 9px; }
html.phone body .card.deck-hd { padding: 11px 12px !important; min-height: 0; } html.phone body .card.deck-hd h1 { font-size: 21px !important; }
/* phones: the title bar is one line. A fixed subtitle folds behind Info (one a page fills in itself, with an id, stays), and the
   wide stat headers (Transfers, Reorder points, Store fill, Warehouse pick) become one row that slides sideways. */
html.phone:not(.info-open) body .card.deck-hd h1 small:not([id]) { display: none; }
html.phone body > header:has(.hTitle) { padding: 6px 10px !important; gap: 12px !important; flex-wrap: nowrap !important; overflow-x: auto; align-items: center !important; scrollbar-width: none; }
html.phone body > header:has(.hTitle) > * { flex: none; } html.phone body > header:has(.hTitle) .hTitle { font-size: 21px !important; white-space: nowrap; }
html.phone body > header:has(.hTitle) .hSub { display: none; } html.phone body > header:has(.hTitle) .hBig { font-size: 18px !important; line-height: 1 !important; }
