/* =============================================================================
   PHONE-1 — the hub as an app on a phone.

   Matt (2026-09-29): "we need to make it so theres a mobile version and a desktop version. even
   just the sign in theres a huge page. we need to make it like an easy to use app for everything
   so i can work even if im away from the computer" … "desktop i think is pretty perfect."

   Every rule that changes a page is scoped to html.m-on — set before the first paint on a screen
   767px wide or less (base.html) — so a desktop never matches one. The only unscoped rules hide
   the phone's own parts (tab bar, More sheet, the "Phone view" pill) everywhere else.

   What a phone gets:
   - a slim header and a tab bar at the bottom (Home, the three tools this login uses most, More);
   - More: every other tool, the Admin panel, add-to-home-screen, the desktop site, sign out;
   - text boxes at 16px (an iPhone zooms the whole page into a smaller one) and keys a thumb hits;
   - wide tables turned into cards (All Inventory, Orders, the Lister, and any table too wide);
   - the page's own floating keys (Today, Ask Nova) lifted above the tab bar.
   ========================================================================== */

.m-tabbar, .m-sheet, .m-scrim, .m-view-pill { display: none; }

/* --------------------------------------------------------------- the shell ---- */
html.m-on {
  --m-tab-h: 58px;
  --m-safe-b: env(safe-area-inset-bottom, 0px);
  --m-safe-t: env(safe-area-inset-top, 0px);
  --m-gutter: 14px;
  --nova-bottom: calc(var(--m-tab-h) + var(--m-safe-b) + 12px);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
html.m-on body { overflow-x: hidden; }
html.m-on body:has(.m-tabbar) { padding-bottom: calc(var(--m-tab-h) + var(--m-safe-b) + 76px); }

/* the header: logo + name, 52px; Admin and Logout live in More */
html.m-on header.nova-header { padding-top: var(--m-safe-t); }
html.m-on header.nova-header > div { height: 52px; padding-left: max(var(--m-gutter), env(safe-area-inset-left)); padding-right: max(var(--m-gutter), env(safe-area-inset-right)); }
html.m-on header.nova-header .nova-brand { gap: .6rem; }
html.m-on header.nova-header .nova-brand img,
html.m-on header.nova-header .nova-brand > span:first-child:not(.font-anton) { width: 32px; height: 32px; }
html.m-on header.nova-header .nova-brand .font-anton { font-size: 1.05rem; letter-spacing: .06em; }
html.m-on header.nova-header:has(~ .m-tabbar) .nova-nav,
html.m-on body:has(.m-tabbar) header.nova-header .nova-nav { display: none; }

html.m-on.nova-theme main { padding: 16px max(var(--m-gutter), env(safe-area-inset-right)) 8px max(var(--m-gutter), env(safe-area-inset-left)); }
html.m-on.nova-theme main h1 { font-size: clamp(1.75rem, 8vw, 2.2rem); line-height: 1.04; }
html.m-on.nova-theme main h1 + p { font-size: .88rem; line-height: 1.45; }

/* the tab bar */
html.m-on .m-tabbar {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 64;
  height: calc(var(--m-tab-h) + var(--m-safe-b)); padding: 0 max(4px, env(safe-area-inset-right)) var(--m-safe-b) max(4px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(22, 19, 15, .86), rgba(12, 10, 8, .96));
  border-top: 1px solid rgba(255, 240, 214, .1);
  box-shadow: 0 -18px 40px -24px rgba(0, 0, 0, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(22px); backdrop-filter: saturate(1.4) blur(22px);
}
html.m-on .m-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 0; padding: 6px 2px 4px; border: 0; background: none; cursor: pointer;
  color: rgba(247, 241, 230, .52); text-decoration: none; -webkit-tap-highlight-color: transparent;
  font: 600 10.5px/1.1 var(--nv-font); letter-spacing: .01em; transition: color .18s;
}
html.m-on .m-tab svg { width: 24px; height: 24px; transition: transform .2s var(--nv-spring, ease); }
html.m-on .m-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.m-on .m-tab.is-on, html.m-on .m-tab.is-here { color: var(--nv-gold-hi, #F7E4C0); }
html.m-on .m-tab.is-on svg { filter: drop-shadow(0 2px 10px rgba(229, 190, 120, .55)); }
html.m-on .m-tab:active svg { transform: scale(.9); }
/* a text box has the keyboard up: the tab bar gets out of the way */
html.m-on.m-typing .m-tabbar { transform: translateY(110%); }
html.m-on .m-tabbar { transition: transform .22s var(--nv-ease, ease); }

/* More */
html.m-on .m-scrim { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .25s;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
html.m-on .m-scrim.is-on { opacity: 1; pointer-events: auto; }
html.m-on .m-sheet {
  display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 81;
  max-height: min(84vh, 720px); overflow-y: auto; overscroll-behavior: contain;
  padding: 8px max(16px, env(safe-area-inset-right)) calc(18px + var(--m-safe-b)) max(16px, env(safe-area-inset-left));
  border-radius: 24px 24px 0 0; color: var(--nv-ink, #F7F1E6);
  background: linear-gradient(180deg, rgba(40, 34, 26, .98), rgba(18, 15, 12, .99));
  border-top: 1px solid rgba(255, 240, 214, .14);
  box-shadow: 0 -30px 80px -20px rgba(0, 0, 0, .9);
  transform: translateY(105%); transition: transform .32s var(--nv-ease, ease);
}
html.m-on .m-sheet[hidden] { display: none; }
html.m-on .m-sheet.is-on { transform: none; }
html.m-on .m-sheet__grab { width: 38px; height: 5px; border-radius: 999px; background: rgba(255, 240, 214, .22); margin: 2px auto 10px; }
html.m-on .m-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 14px; }
html.m-on .m-sheet__who b { display: block; font-size: 17px; font-weight: 700; }
html.m-on .m-sheet__who span { font-size: 12.5px; color: var(--nv-ink-3); }
html.m-on .m-sheet__x { width: 36px; height: 36px; border-radius: 999px; border: 1px solid rgba(255, 240, 214, .14); background: rgba(255, 240, 214, .06); color: var(--nv-ink-2); display: grid; place-items: center; }
html.m-on .m-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
html.m-on .m-tile {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 92px;
  padding: 12px; border-radius: 16px; text-decoration: none; color: var(--nv-ink);
  background: linear-gradient(180deg, rgba(255, 244, 222, .08), rgba(255, 244, 222, .03)); border: 1px solid rgba(255, 240, 214, .1);
  font: 600 13px/1.25 var(--nv-font);
}
html.m-on .m-tile svg { width: 24px; height: 24px; color: var(--nv-gold, #E5CA9F); }
html.m-on .m-tile.is-on { border-color: rgba(229, 202, 159, .5); background: linear-gradient(180deg, rgba(229, 202, 159, .16), rgba(229, 202, 159, .06)); }
html.m-on .m-tile:active { transform: scale(.97); }
html.m-on .m-list { margin-top: 16px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255, 240, 214, .1); background: rgba(255, 244, 222, .03); }
html.m-on .m-list form { margin: 0; }
html.m-on .m-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 0 14px; border: 0; background: none;
  color: var(--nv-ink); font: 500 15px/1.2 var(--nv-font); text-align: left; cursor: pointer; border-bottom: 1px solid rgba(255, 240, 214, .07);
}
html.m-on .m-list > :last-child .m-row, html.m-on .m-list > .m-row:last-child { border-bottom: 0; }
html.m-on .m-row svg { width: 20px; height: 20px; color: var(--nv-ink-3); flex: none; }
html.m-on .m-row[hidden] { display: none; }
html.m-on .m-row--out { color: #F5B066; }
html.m-on .m-row--out svg { color: #F5B066; }
html.m-on .m-howto { padding: 12px 14px 14px 46px; font-size: 13.5px; line-height: 1.5; color: var(--nv-ink-2); border-bottom: 1px solid rgba(255, 240, 214, .07); }
html.m-on .m-howto[hidden] { display: none; }
html.m-on .m-howto svg { display: inline; vertical-align: -2px; }
html.m-sheet-open, html.m-sheet-open body { overflow: hidden; }

/* the desktop site on a phone: one way back */
html.m-desktop .m-view-pill {
  display: inline-flex; align-items: center; gap: .5rem; position: fixed; left: 14px; bottom: 14px; z-index: 90;
  padding: .7rem 1.1rem; border-radius: 999px; border: 1px solid rgba(229, 202, 159, .45); cursor: pointer;
  background: rgba(20, 17, 13, .94); color: #F7E4C0; font: 600 15px/1 var(--nv-font, sans-serif);
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .9);
}
html.m-desktop .m-view-pill svg { width: 18px; height: 18px; }

/* Today and Ask Nova sit above the tab bar (their own CSS reads --nova-bottom) */
html.m-on .tk-note { bottom: calc(var(--nova-bottom) + 64px); }
html.m-on .tk-toast { bottom: calc(var(--nova-bottom) + 66px); }
html.m-on .nova-panel { bottom: calc(8px + var(--m-safe-b)); z-index: 85; }
html.m-on .tk-drawer { z-index: 85; }

/* ------------------------------------------------------------- sign in ---- */
html.m-on .auth-wrap { margin: 0 auto; min-height: calc(100svh - 32px); display: flex; flex-direction: column; justify-content: center; padding: 8px 0 16px; }
html.m-on .auth-hero { margin-bottom: 18px; }
html.m-on .auth-hero img, html.m-on .auth-hero > div:first-child { width: 44px; height: 44px; margin-bottom: 10px; }
html.m-on .auth-hero h1 { font-size: 1.7rem; }
html.m-on .auth-hero p { margin-top: 4px; font-size: 11px; }
html.m-on .auth-wrap .usp-card { padding: 18px; border-radius: 20px; }
html.m-on .auth-wrap form { gap: 0; }
html.m-on .auth-wrap .usp-input { padding: .8rem .9rem; border-radius: 13px; }
html.m-on .auth-wrap .usp-btn { min-height: 50px; font-size: 16px; border-radius: 14px; }
html.m-on .auth-tag { margin-top: 14px; font-size: 11px; }

/* a bar a page pins to the bottom (the Tester's Submit) sits above the tab bar, not under it */
html.m-on body:has(.m-tabbar) main .sticky.bottom-0 { bottom: calc(var(--m-tab-h) + var(--m-safe-b)); }
html.m-on.m-typing body:has(.m-tabbar) main .sticky.bottom-0 { bottom: 0; }

/* ------------------------------------------------------- fields and keys ---- */
/* an iPhone zooms the page into any text box under 16px — and stays zoomed */
html.m-on :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]), select, textarea) { font-size: 16px !important; }
html.m-on .usp-btn { min-height: 42px; }
/* keys that share a row (flex-1) may wrap their words instead of running off the card */
html.m-on .usp-btn.flex-1 { min-width: 0; white-space: normal; padding-left: .55rem; padding-right: .55rem; }
html.m-on input[type=checkbox], html.m-on input[type=radio] { width: 20px; height: 20px; }
html.m-on main img, html.m-on main video, html.m-on main canvas { max-width: 100%; }
html.m-on main img.thumb { max-width: none; }
html.m-on main pre { white-space: pre-wrap; word-break: break-word; }
html.m-on main :is(.overflow-x-auto, .an-scroll) { -webkit-overflow-scrolling: touch; }
html.m-on dialog { max-width: calc(100vw - 24px); }

/* ------------------------------------------------------------- page tops ---- */
/* All Inventory: title and Organize on one line; the tabs, sort and market in one row that scrolls */
html.m-on .inv-head { flex-wrap: nowrap; align-items: center; margin-bottom: 12px; }
html.m-on .inv-head .usp-btn { padding: .55rem .95rem; font-size: 13px; min-height: 40px; letter-spacing: .04em; }
html.m-on .inv-bar { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--m-gutter)) 10px; padding: 2px var(--m-gutter) 6px; scrollbar-width: none; }
html.m-on .inv-bar::-webkit-scrollbar { display: none; }
html.m-on .inv-bar > * { flex: none; }
html.m-on .inv-bar > .flex-1 { display: none; }
html.m-on .inv-bar .tab { padding: .5rem .85rem; }
html.m-on .inv-bar select.usp-input { width: auto; padding-top: .45rem; padding-bottom: .45rem; }
html.m-on .inv-bar .usp-btn { min-height: 38px; }
/* the search: the box gets the room; Ask Nova is its orb */
html.m-on #nv-search #nv-ask { font-size: 0; gap: 0; padding: .55rem .8rem; min-height: 44px; }
html.m-on #nv-search #nv-ask .nova-orb { width: 20px !important; height: 20px !important; }
html.m-on #nv-search .m-cam { min-width: 44px; min-height: 44px; padding: 0 .6rem; border-radius: 12px; }
/* the Lister's filters wrap: the search takes a line of its own */
html.m-on .lst-bar { flex-wrap: wrap; gap: 8px; width: 100%; min-width: 0; }
html.m-on .lst-bar form { flex: 1 1 100%; min-width: 0; }
html.m-on .lst-bar form .m-scanwrap, html.m-on .lst-bar form > .usp-input { flex: 1 1 auto; }

/* the Admin panel's tools: two to a row, the name and its state (the blurb is on the desktop) */
html.m-on .ad-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
html.m-on .ad-tool { padding: .85rem; gap: .45rem; border-radius: 16px; }
html.m-on .ad-tool .bl { display: none; }
html.m-on .ad-tool .tt { font-size: .86rem; }
html.m-on .ad-tool .st { font-size: .7rem; }
html.m-on .ad-tool .ic { width: 2.05rem; height: 2.05rem; }

/* ------------------------------------------------ any table too wide: cards ---- */
/* phone.js marks a table that doesn't fit (.m-stack) and labels each cell from its header */
html.m-on table.m-stack, html.m-on table.m-stack tbody, html.m-on table.m-stack tr, html.m-on table.m-stack td { display: block; width: 100%; min-width: 0 !important; }
html.m-on table.m-stack thead { display: none; }
html.m-on table.m-stack tr { padding: 12px 14px; border-bottom: 1px solid rgba(255, 240, 214, .08); }
html.m-on table.m-stack tr:last-child { border-bottom: 0; }
html.m-on table.m-stack td { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 5px 0 !important; border: 0 !important; text-align: right !important; white-space: normal !important; }
html.m-on table.m-stack td::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; color: var(--nv-ink-3); font: 600 11px/1.3 var(--nv-font); letter-spacing: .07em; text-transform: uppercase; }
html.m-on table.m-stack td:not([data-label])::before, html.m-on table.m-stack td[data-label=""]::before { content: none; }
html.m-on table.m-stack td:not([data-label]), html.m-on table.m-stack td[data-label=""] { justify-content: flex-start; text-align: left !important; }
html.m-on table.m-stack td:empty { display: none; }
html.m-on :is(.overflow-x-auto, .an-scroll, .usp-card):has(> table.m-stack) { overflow: visible; }

/* ------------------------------------------------------ All Inventory cards ---- */
html.m-on table[data-m=inv] thead { display: none; }
html.m-on table[data-m=inv], html.m-on table[data-m=inv] tbody { display: block; width: 100%; }
html.m-on table[data-m=inv] tr.row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid rgba(255, 240, 214, .08) !important;
}
html.m-on table[data-m=inv] tr.row > td { padding: 0 !important; font-size: 14px; min-width: 0; }
html.m-on table[data-m=inv] tr.row > td:nth-child(1) { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
html.m-on table[data-m=inv] tr.row .thumb { width: 64px; height: 64px; min-width: 64px; border-radius: 12px; }
html.m-on table[data-m=inv] tr.row > td:nth-child(2) { grid-column: 2 / span 2; grid-row: 1; }
html.m-on table[data-m=inv] tr.row .ttl { font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html.m-on table[data-m=inv] tr.row > td:nth-child(3) { display: none; }                      /* buy cost: on the unit's page */
html.m-on table[data-m=inv] tr.row > td:nth-child(4) { grid-column: 3; grid-row: 2; text-align: right; }
html.m-on table[data-m=inv] tr.row > td:nth-child(4).num { font-size: 21px; }
html.m-on table[data-m=inv] tr.row > td:nth-child(5) { grid-column: 2; grid-row: 2; font-size: 15px; }
html.m-on table[data-m=inv] tr.row > td:nth-child(6) { grid-column: 2; grid-row: 3; white-space: nowrap; }
html.m-on table[data-m=inv] tr.row > td:nth-child(6) .mk { font-size: 15px; }
html.m-on table[data-m=inv] tr.row > td:nth-child(7) { display: none; }                      /* listed date: on the unit's page */
html.m-on table[data-m=inv] tr.row > td:nth-child(8) { grid-column: 3; grid-row: 3; text-align: right; }
html.m-on table[data-m=inv] tr.row > td:nth-child(8) .nv-fresh-sub { display: none; }
html.m-on table[data-m=inv] tr.row > td:nth-child(9) { display: none; }                      /* the title opens it */
html.m-on table[data-m=inv] tr > td[colspan] { display: block; padding: 18px 14px !important; }
html.m-on table[data-m=inv] tr.row { position: relative; }
html.m-on table[data-m=inv] tr.row .ttl::after { content: ""; position: absolute; inset: 0 0 0 76px; }   /* the whole card opens the unit */

/* --------------------------------------------------------------- Orders cards ---- */
html.m-on table[data-m=orders] { table-layout: auto; min-width: 0; }
html.m-on table[data-m=orders], html.m-on table[data-m=orders] tbody { display: block; width: 100%; }
html.m-on table[data-m=orders] thead { display: none; }
html.m-on table[data-m=orders] tr {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center;
  grid-template-areas: "ch when" "who who" "item item" "sold bin" "track track" "by by" "act act";
  padding: 12px 14px; border-bottom: 1px solid rgba(255, 240, 214, .08);
}
html.m-on table[data-m=orders] tr.m-cont { padding-top: 0; margin-top: -4px; }
html.m-on table[data-m=orders] td { display: block; padding: 3px 0 !important; border: 0 !important; width: auto !important; }
html.m-on table[data-m=orders] td.c-when { grid-area: when; text-align: right; font-size: 13px; }
html.m-on table[data-m=orders] td.c-when .muted { display: inline; margin-left: .35rem; }
html.m-on table[data-m=orders] td.c-ch { grid-area: ch; }
html.m-on table[data-m=orders] td.c-ch .muted { display: inline; margin-left: .45rem; }
html.m-on table[data-m=orders] td.c-who { grid-area: who; font-size: 14px; }
html.m-on table[data-m=orders] td.c-who .truncate { white-space: normal; }
html.m-on table[data-m=orders] td.c-item { grid-area: item; padding-top: 8px !important; }
html.m-on table[data-m=orders] td.c-item .item-title { font-size: 14.5px; }
html.m-on table[data-m=orders] td.col-sold { grid-area: sold; text-align: left !important; font-family: Anton, sans-serif; font-size: 20px; }
html.m-on table[data-m=orders] td.bin { grid-area: bin; text-align: right; }
html.m-on table[data-m=orders] td.c-track { grid-area: track; }
html.m-on table[data-m=orders] td.c-by { grid-area: by; font-size: 13px; }
html.m-on table[data-m=orders] td.col-act { grid-area: act; text-align: left !important; padding-top: 8px !important; }
html.m-on table[data-m=orders] td.col-act .usp-btn { width: 100%; font-size: 15px; min-height: 44px; }
html.m-on table[data-m=orders] td.col-act form { display: block; }
html.m-on table[data-m=orders] tr.late { background: rgba(248, 113, 113, .07); box-shadow: inset 4px 0 0 #f87171; }
html.m-on table[data-m=orders] tr.late td { background: none; box-shadow: none !important; }
html.m-on table[data-m=orders] td[colspan] { grid-column: 1 / -1; }
html.m-on .usp-card:has(> table[data-m=orders]) { overflow: visible; }

/* -------------------------------------------------------------- Lister cards ---- */
html.m-on table[data-m=lister], html.m-on table[data-m=lister] tbody { display: block; width: 100%; }
html.m-on table[data-m=lister] thead { display: block; }
html.m-on table[data-m=lister] thead tr { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
html.m-on table[data-m=lister] thead th { display: none; padding: 0 !important; }
html.m-on table[data-m=lister] thead th:first-child { display: block; }
html.m-on table[data-m=lister] thead th:first-child::after { content: "Select all"; margin-left: .55rem; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--nv-ink-3); }
html.m-on table[data-m=lister] thead th:first-child { display: flex; align-items: center; }
html.m-on table[data-m=lister] tbody tr {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; column-gap: 10px; row-gap: 4px; align-items: center;
  grid-template-areas: "pick item item item" "pick sku grade price" "pick status status act";
  padding: 12px 14px; border-bottom: 1px solid rgba(255, 240, 214, .08);
}
html.m-on table[data-m=lister] tbody td { display: block; padding: 0 !important; min-width: 0; }
html.m-on table[data-m=lister] tbody td:nth-child(1) { grid-area: pick; align-self: start; padding-top: 2px !important; }
html.m-on table[data-m=lister] tbody td:nth-child(2) { grid-area: item; font-size: 15px; }
html.m-on table[data-m=lister] tbody td:nth-child(3) { grid-area: sku; overflow: hidden; text-overflow: ellipsis; }
html.m-on table[data-m=lister] tbody td:nth-child(4) { grid-area: grade; font-weight: 700; }
html.m-on table[data-m=lister] tbody td:nth-child(4)::before { content: "Grade "; font: 600 11px/1 var(--nv-font); letter-spacing: .08em; text-transform: uppercase; color: var(--nv-ink-3); }
html.m-on table[data-m=lister] tbody td:nth-child(5) { grid-area: price; text-align: right; font-family: Anton, sans-serif; font-size: 19px; }
html.m-on table[data-m=lister] tbody td:nth-child(6) { grid-area: status; }
html.m-on table[data-m=lister] tbody td:nth-child(7) { grid-area: act; text-align: right; }
html.m-on table[data-m=lister] tbody td[colspan] { grid-column: 1 / -1; }

/* ------------------------------------------------------------ a scan box ---- */
/* the one box a page is for (Tester, Mystery Box, tags): big enough to hit, not a billboard,
   with the camera key beside it */
html.m-on .m-scanwrap { display: flex; flex: 1 1 0%; gap: 8px; align-items: stretch; min-width: 0; }
html.m-on .m-scanwrap > input { flex: 1 1 0%; min-width: 0; width: 0; }
html.m-on input[data-scan]:not([data-scan=fill]) { font-size: 19px !important; letter-spacing: .02em; }
html.m-on .m-cam {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-width: 52px; min-height: 48px; padding: 0 .9rem;
  border-radius: 14px; border: 1px solid rgba(229, 202, 159, .45); cursor: pointer; color: #1d1408;
  background: linear-gradient(180deg, #F9E6C3 0%, #EBD1A6 42%, #D9B67C 100%); font: 700 14px/1 var(--nv-font);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 10px 24px -12px rgba(229, 190, 120, .65);
}
html.m-on .m-cam svg { width: 22px; height: 22px; }
.m-cam { display: none; }
html.m-on .m-cam { display: inline-flex; }

/* the camera: full screen, the code read inside the frame */
.m-camview { display: none; }
html.m-on .m-camview.is-on { display: flex; }
html.m-on .m-camview { position: fixed; inset: 0; z-index: 120; flex-direction: column; background: #000; color: #fff; }
html.m-on .m-camview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
html.m-on .m-camview__frame { position: absolute; left: 8%; right: 8%; top: 30%; height: 22%; border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5); border: 2px solid rgba(247, 228, 192, .9); }
html.m-on .m-camview__frame::after { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: rgba(221, 133, 25, .9); box-shadow: 0 0 12px rgba(221, 133, 25, .9); animation: m-scanline 1.8s ease-in-out infinite; }
@keyframes m-scanline { 0%, 100% { transform: translateY(-40px); } 50% { transform: translateY(40px); } }
html.m-on .m-camview__top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: calc(12px + var(--m-safe-t)) 16px 12px; }
html.m-on .m-camview__top b { font: 700 16px/1.2 var(--nv-font); }
html.m-on .m-camview__x { width: 40px; height: 40px; border-radius: 999px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 22px; line-height: 1; }
html.m-on .m-camview__msg { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: calc(28px + var(--m-safe-b)); text-align: center; font: 500 15px/1.45 var(--nv-font); color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
html.m-on .m-camview__msg b { color: #F7E4C0; }
html.m-on .m-camview.is-hit .m-camview__frame { border-color: #7BD389; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5), 0 0 30px rgba(123, 211, 137, .8); }
@media (prefers-reduced-motion: reduce) { html.m-on .m-camview__frame::after { animation: none; } html.m-on .m-sheet, html.m-on .m-tabbar { transition: none; } }
@media print { .m-tabbar, .m-sheet, .m-scrim, .m-view-pill, .m-camview { display: none !important; } }

/* ======================================================================= PHONE-2 (2026-09-30) ==
   Matt, on the phone: "why don't we just remove where it says Ask Nova … it just says Ask Nova
   anything" · "what needs my attention today? … do we need to have them there? … can I click on
   Nova … and then have it produce me this list" · "the moment you go to type something, all of
   Nova gets pushed up" · "the only thing I don't see on here for the mobile is the tasks" · "I'm
   admin and I don't even see the admin panel in the top right". */

/* the hub's Nova bar: one tap target that opens Nova; its suggestions live inside Nova */
html.m-on .nova-hero__face > button[type=submit], html.m-on .nova-hero__hint { display: none; }
html.m-on .nova-hero__face { cursor: pointer; }
html.m-on .nova-hero__face input { cursor: pointer; caret-color: transparent; }

/* Nova on a phone: the whole screen above the keyboard (nova.js sets --vv-top/--vv-h from the
   visual viewport), the conversation scrolling in the middle, the box at the bottom */
html.m-on .nova-panel {
  top: calc(var(--vv-top, 0px) + max(8px, var(--m-safe-t))); bottom: auto; left: 6px; right: 6px;
  height: calc(var(--vv-h, 100dvh) - max(8px, var(--m-safe-t)) - 8px);
  max-height: none; border-radius: 22px; z-index: 95;
}
html.m-on.m-kb .nova-panel { top: calc(var(--vv-top, 0px) + 6px); height: calc(var(--vv-h, 100dvh) - 12px); }
html.m-on.m-kb .nova-panel .nova-head { padding-top: .7rem; padding-bottom: .5rem; }
html.m-on.m-kb .nova-panel .nova-sub { display: none; }
html.m-on .nova-scrim { z-index: 94; }
html.m-on.m-nova-open, html.m-on.m-nova-open body { overflow: hidden; }
html.m-on.m-nova-open .m-tabbar { transform: translateY(110%); }
html.m-on .nova-panel .nova-log { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
html.m-on .nova-panel textarea { font-size: 16px !important; }

/* Today's tasks: a key in the header on every page (the floating Today pill is gone on a phone),
   and the Admin panel's gear beside it for the owner and admins */
.m-head { display: none; }
html.m-on .m-head { display: flex; align-items: center; gap: 8px; margin-left: auto; }
html.m-on .m-head__tasks {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 10px; border-radius: 999px;
  border: 1px solid rgba(229, 202, 159, .32); background: rgba(255, 240, 214, .06); color: #F2E6CF;
  font: 700 12.5px/1 var(--nv-font); letter-spacing: .02em; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
html.m-on .m-head__tasks svg { width: 18px; height: 18px; color: #E5CA9F; }
html.m-on .m-head__n {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  font: 800 11.5px/1 var(--nv-font); color: #1d1408; background: linear-gradient(180deg, #F7E3BD, #DDBB82);
}
html.m-on .m-head__n:empty { display: none; }
html.m-on .m-head__tasks.is-late .m-head__n { background: #F6B566; }
html.m-on .m-head__tasks.is-done .m-head__n { background: #7BD389; }
html.m-on .m-head__tasks.is-new { animation: m-bump 1s cubic-bezier(.34, 1.4, .64, 1) 2; }
@keyframes m-bump { 40% { transform: scale(1.12); } }
html.m-on .m-head__admin {
  width: 36px; height: 36px; border-radius: 999px; display: inline-grid; place-items: center; color: #E5CA9F;
  border: 1px solid rgba(229, 202, 159, .32); background: rgba(255, 240, 214, .06);
}
html.m-on .m-head__admin svg { width: 19px; height: 19px; }
html.m-on header.nova-header .nova-brand { flex: 1 1 auto; }
html.m-on .tk-tab { display: none !important; }
html.m-on .tk-note { left: 12px; right: 12px; top: calc(60px + var(--m-safe-t)); bottom: auto; max-width: none; transform: translateY(-8px); }
html.m-on .tk-note.is-on { transform: none; }
html.m-on .tk-note::before { display: none; }
@media (prefers-reduced-motion: reduce) { html.m-on .m-head__tasks.is-new { animation: none; } }

/* PHONE-LAG-1 (Matt, 2026-09-30: "if it's been open and I haven't updated it, it's very laggy"):
   a phone's graphics chip redrew every frosted-glass panel on every frame the live backdrop moved
   (the header, the tab bar, the analytics card), plus three drifting pools of light, a film grain
   blended over the whole screen and two closed scrims still blurring the page behind them. On a
   phone: the pools and the grain hold still while the backdrop draws (it lights the page itself),
   the panels are solid glass without the blur, the Ask Nova glow stops breathing, and a closed
   scrim is not drawn at all. The desktop is unchanged. */
html.m-on .nova-bg--live .nova-bg__pool { animation: none; will-change: auto; }
html.m-on .nova-bg__grain { display: none; }
html.m-on.nova-theme header.nova-header {
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background: linear-gradient(180deg, rgba(14, 11, 8, .99), rgba(12, 10, 8, .97));
}
html.m-on .m-tabbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(180deg, rgba(24, 20, 16, .97), rgba(12, 10, 8, .99)); }
html.m-on .hx, html.m-on .tx {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  background: linear-gradient(180deg, rgba(40, 34, 26, .95), rgba(18, 15, 12, .96)) !important;
}
html.m-on .nova-hero__glow { animation: none; filter: none; opacity: .7; }
/* the small lights that never stop — the orb's pulse and swirl, the Ask Nova key's breathing glow
   and the ring running round the Nova bar — hold still on a phone (they look the same at rest) */
html.m-on .nova-orb, html.m-on .nova-orb::after, html.m-on .nova-fab::before,
html.m-on .nova-rim::before { animation: none !important; will-change: auto; }
html.m-on .m-scrim { visibility: hidden; -webkit-backdrop-filter: none; backdrop-filter: none;
  transition: opacity .25s, visibility 0s linear .25s; }
html.m-on .m-scrim.is-on { visibility: visible; transition: opacity .25s, visibility 0s; }
html.m-on .nova-scrim { visibility: hidden; transition: opacity .35s, visibility 0s linear .35s; }
html.m-on .nova-scrim.is-open { visibility: visible; transition: opacity .35s, visibility 0s; }

/* PHONE-NAV-1 (Matt, 2026-10-01: "when you click from home to inventory … it's not instant"): a tap
   that leaves the page answers the moment the finger lifts — the tab lights up (phone.js) and this
   thin gold line runs along the top until the next page is up. */
html.m-on.m-going body::after {
  content: ''; position: fixed; z-index: 100; left: 0; right: 0; top: env(safe-area-inset-top, 0px); height: 2.5px;
  background: linear-gradient(90deg, rgba(229, 202, 159, 0), #E5CA9F 35%, #F6B566 75%, #FFF1D6);
  box-shadow: 0 0 10px rgba(246, 181, 102, .65); pointer-events: none;
  transform-origin: 0 50%; animation: m-going 2.4s cubic-bezier(.2, .7, .2, 1) forwards;
}
@keyframes m-going { from { transform: scaleX(.05); } 30% { transform: scaleX(.6); } to { transform: scaleX(.94); } }
@media (prefers-reduced-motion: reduce) { html.m-on.m-going body::after { animation: none; transform: scaleX(.6); } }
