/* StartupSend: every color is a token; light and dark both ship. --brand is the signed-in company's own color,
   set from its settings, so the whole app wears that company's look. */
:root {
  --brand: #1f4e79; --brand-ink: #fff; --accent: var(--brand); --on-accent: var(--brand-ink);
  --bg: #f4f5f7; --panel: #fff; --sunk: #f0f1f4; --fg: #15171c; --mute: #5d616c; --faint: #9a9ea8; --line: #e3e5ea; --line2: #eceef2;
  --good: #1f8a4c; --good-soft: rgba(31,138,76,.12); --bad: #c4261d; --bad-soft: rgba(196,38,29,.1); --warn: #b7791f; --warn-soft: rgba(183,121,31,.13);
  --info: #2f5bd3; --info-soft: rgba(47,91,211,.1); --shadow: 0 1px 2px rgba(16,20,30,.05), 0 6px 20px rgba(16,20,30,.06); --shadow-lg: 0 24px 60px rgba(16,20,30,.2);
  --glass: rgba(255,255,255,.86); --r: 14px; --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) {
  --bg: #0d0e11; --panel: #16171b; --sunk: #1c1d22; --fg: #f1f2f4; --mute: #a3a7b1; --faint: #6b6f79; --line: #2a2c33; --line2: #23252b;
  --good: #3fcf84; --good-soft: rgba(63,207,132,.13); --bad: #ff6b61; --bad-soft: rgba(255,107,97,.12); --warn: #f0b44c; --warn-soft: rgba(240,180,76,.13);
  --info: #7d9bff; --info-soft: rgba(125,155,255,.13); --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 26px rgba(0,0,0,.35); --glass: rgba(22,23,27,.86); color-scheme: dark; } }
:root[data-theme=dark] {
  --bg: #0d0e11; --panel: #16171b; --sunk: #1c1d22; --fg: #f1f2f4; --mute: #a3a7b1; --faint: #6b6f79; --line: #2a2c33; --line2: #23252b;
  --good: #3fcf84; --good-soft: rgba(63,207,132,.13); --bad: #ff6b61; --bad-soft: rgba(255,107,97,.12); --warn: #f0b44c; --warn-soft: rgba(240,180,76,.13);
  --info: #7d9bff; --info-soft: rgba(125,155,255,.13); --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 26px rgba(0,0,0,.35); --glass: rgba(22,23,27,.86); color-scheme: dark;
}
/* In dark mode the brand color is lifted so it stays readable as text and focus. */
:root[data-theme=dark] { --accent: var(--brand-dark, var(--brand)); --on-accent: var(--brand-dark-ink, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --accent: var(--brand-dark, var(--brand)); --on-accent: var(--brand-dark-ink, #fff); } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (pointer: coarse) { input, select, textarea { font-size: 16px !important; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14.5px/1.5 var(--font); min-height: 100vh; }
[hidden] { display: none !important; }
a { color: var(--accent); }
h1 { font-size: 24px; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0; }
h3 { font-size: 14.5px; margin: 0; }
.mute { color: var(--mute); }
.small { font-size: 12.5px; }
.grow { flex: 1; min-width: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 8px 18px; padding-top: max(8px, env(safe-area-inset-top));
  background: var(--glass); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 700; min-width: 0; }
.logo-box { display: grid; place-items: center; height: 32px; min-width: 32px; color: var(--brand); }
.logo-box img { max-height: 32px; max-width: 120px; object-fit: contain; display: block; }
.mark { width: 30px; height: 30px; }
.logo-box.on-brand { background: var(--brand); border-radius: 8px; padding: 4px 8px; }
.logo-box.on-brand img { max-height: 24px; }
.logo-drop.on-brand { background: var(--brand); color: var(--brand-ink); }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.tabs { display: flex; gap: 2px; margin-left: 14px; }
.tabs a, .bottom-tabs a { text-decoration: none; color: var(--mute); font-weight: 600; font-size: 13.5px; padding: 7px 13px; border-radius: 999px; }
.tabs a:hover { color: var(--fg); background: var(--sunk); }
.tabs a[aria-current=page] { color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, transparent); }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--mute); cursor: pointer; }
.icon-btn:hover { background: var(--sunk); color: var(--fg); }
.icon-btn svg { width: 19px; height: 19px; }
.save { font-size: 12px; font-weight: 600; color: var(--mute); width: 150px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save.busy { color: var(--warn); }
.save.off { color: var(--bad); }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: 44px; z-index: 30; display: flex; flex-direction: column; min-width: 230px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); }
.menu-list > button, .menu-list .smcp-inline { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font: 500 14px var(--font); color: var(--fg); width: 100%; cursor: pointer; }
.menu-list > button:hover, .menu-list .smcp-inline:hover { background: var(--sunk); }
.who { padding: 6px 10px 8px; font-size: 12.5px; color: var(--mute); overflow-wrap: anywhere; border-bottom: 1px solid var(--line2); margin-bottom: 4px; }
.bottom-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: none; justify-content: space-around; padding: 6px 4px; padding-bottom: max(6px, env(safe-area-inset-bottom));
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.bottom-tabs { height: calc(60px + env(safe-area-inset-bottom)); align-items: center; }
.bottom-tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; padding: 4px 8px; min-width: 64px; }
.bottom-tabs a svg { width: 22px; height: 22px; }
.bottom-tabs a[aria-current=page] { color: var(--accent); }

/* page */
.page { max-width: 1240px; margin: 0 auto; padding: 22px 20px 80px; outline: none; }
.page.wide { max-width: none; }
.head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.head .sub { color: var(--mute); margin-top: 2px; }
.crumbs { font-size: 12.5px; color: var(--mute); margin-bottom: 4px; }
.crumbs a { color: var(--mute); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.gap-y { margin-bottom: 12px; }
.gap-top { margin-top: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 16px; }
.card > .card-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line2); }
.empty { text-align: center; padding: 42px 16px; color: var(--mute); }
.empty h2 { color: var(--fg); margin-bottom: 6px; }

/* buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 13.5px var(--font); border-radius: 999px; padding: 0 15px; height: 36px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--faint); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.07); }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn svg { width: 16px; height: 16px; }
label.f { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--mute); min-width: 0; }
.in, .f input, .f select, .f textarea { width: 100%; min-width: 0; height: 38px; padding: 0 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: 400 14.5px var(--font); }
.f textarea, textarea.in { height: auto; min-height: 90px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
.in:focus, .f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input[type=color] { padding: 2px; width: 48px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.search { position: relative; }
.search.grow { flex: 1 1 180px; }
.search input { padding-left: 34px; border-radius: 999px; }
.search svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--mute); font: 600 13px var(--font); height: 30px; padding: 0 13px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--panel); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font: 600 12.5px var(--font); color: var(--fg); cursor: pointer; }
.chip[aria-pressed=true] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); color: var(--accent); }
.chip .n { color: var(--mute); font-weight: 600; }

/* status pills and progress */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font: 650 11.5px var(--font); white-space: nowrap; background: var(--sunk); color: var(--mute); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-open { background: var(--sunk); color: var(--mute); }
.st-progress { background: var(--info-soft); color: var(--info); }
.st-review { background: var(--warn-soft); color: var(--warn); }
.st-returned { background: var(--bad-soft); color: var(--bad); }
.st-approved { background: var(--good-soft); color: var(--good); }
.st-sent { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
.bar { height: 6px; border-radius: 99px; background: var(--sunk); overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; width: 0; transition: width .25s; }
.strip { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 12px 16px; }
.strip div { display: grid; }
.strip b { font-size: 20px; line-height: 1.2; }
.strip span { font-size: 12px; color: var(--mute); }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line2); min-width: 0; }
.list > li:first-child { border-top: 0; }
.list > li.click { cursor: pointer; }
.list > li.click:hover { background: var(--sunk); }
.list .t { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .d { font-size: 12.5px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .main { flex: 1; min-width: 0; display: grid; }
.cb { width: 20px; height: 20px; accent-color: var(--accent); flex: none; cursor: pointer; }
.group-h { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--sunk); border-top: 1px solid var(--line2); font-weight: 700; font-size: 13px; }
.group-h:first-child { border-top: 0; border-radius: var(--r) var(--r) 0 0; }

/* project cards */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pcard { display: grid; gap: 8px; padding: 16px; text-decoration: none; color: var(--fg); }
.pcard:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pcard .t { font-weight: 700; font-size: 15.5px; }
.pcard .meta { font-size: 12.5px; color: var(--mute); }

/* sub tabs inside a page */
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.subtabs a { padding: 9px 13px; color: var(--mute); text-decoration: none; font-weight: 650; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subtabs a[aria-current=page] { color: var(--accent); border-color: var(--accent); }

/* action bar for selected rows */
.actionbar { position: sticky; bottom: 12px; z-index: 15; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; margin-top: 12px; border-radius: 999px; background: var(--fg); color: var(--bg); box-shadow: var(--shadow-lg); }
.actionbar .btn { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); }
.actionbar .btn.primary { background: var(--bg); color: var(--fg); border-color: var(--bg); }

/* the field form */
.form { display: grid; gap: 14px; max-width: 920px; margin: 0 auto; }
.form .sec { padding: 0; }
.sec > h2 { padding: 13px 16px; border-bottom: 1px solid var(--line2); font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.sec .body { padding: 14px 16px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.fgrid .wide { grid-column: 1 / -1; }
.unit-in { position: relative; }
.unit-in input { padding-right: 52px; }
.unit-in .u { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--faint); pointer-events: none; }
.yn { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line2); }
.yn:first-child { border-top: 0; padding-top: 0; }
.yn .seg button { min-width: 50px; }
.yn .seg button[aria-pressed=true][data-v=Yes] { background: var(--good); color: #fff; }
.yn .seg button[aria-pressed=true][data-v=No] { background: var(--bad); color: #fff; }
.yn .seg button[aria-pressed=true][data-v="N/A"] { background: var(--faint); color: #fff; }
table.mt { width: 100%; border-collapse: collapse; }
table.mt th { text-align: left; font-size: 12px; color: var(--mute); font-weight: 650; padding: 0 6px 8px; }
table.mt td { padding: 4px 6px; border-top: 1px solid var(--line2); vertical-align: middle; }
table.mt td:first-child { font-size: 13.5px; padding-left: 0; }
table.mt td input { width: 100%; min-width: 0; height: 36px; padding: 0 9px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: 400 14.5px var(--font); }
table.mt td input:focus { outline: none; border-color: var(--accent); }
table.mt .u { font-size: 11.5px; color: var(--faint); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photos figure { margin: 0; position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1; background: var(--sunk); }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .x { position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.add-photo { display: grid; place-items: center; aspect-ratio: 1; border: 2px dashed var(--line); border-radius: 10px; color: var(--mute); cursor: pointer; font-weight: 650; font-size: 13px; text-align: center; padding: 8px; }
.add-photo svg { width: 28px; height: 28px; }
.add-photo:hover { border-color: var(--accent); color: var(--accent); }
.sigpad { width: 100%; height: 160px; border: 1px dashed var(--faint); border-radius: 10px; background: #fff; touch-action: none; display: block; }
.sig-img { max-height: 90px; background: #fff; border-radius: 8px; border: 1px solid var(--line); padding: 4px; }
.unit-head { display: grid; gap: 12px; padding: 16px; }
.unit-head .fgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sticky-actions { position: sticky; bottom: 0; z-index: 12; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); margin: 0 -20px -80px; }
.note-box { padding: 10px 14px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.tip { padding: 10px 14px; border-radius: 12px; background: var(--info-soft); color: var(--fg); font-size: 13.5px; }

/* the equipment table */
.gridwrap { height: calc(100vh - 290px); min-height: 380px; }

/* template editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 16px; align-items: start; }
.blocks { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.block { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); }
.block.drag-over { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.block.dragging { opacity: .45; }
.block-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; }
.handle { cursor: grab; color: var(--faint); display: grid; place-items: center; width: 26px; height: 30px; border-radius: 6px; flex: none; touch-action: none; }
.handle:hover { background: var(--sunk); color: var(--fg); }
.handle svg { width: 16px; height: 16px; }
.block-h .ttl { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kind { font-size: 11.5px; font-weight: 650; color: var(--mute); background: var(--sunk); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.block-b { padding: 4px 12px 12px; border-top: 1px solid var(--line2); display: grid; gap: 10px; }
.frow { display: grid; grid-template-columns: 26px minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, .8fr) auto; gap: 6px; align-items: center; padding: 4px; border-radius: 10px; }
.frow.drag-over { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.frow .in { height: 34px; font-size: 13.5px; }
.frow .opts { grid-column: 2 / -1; }
.palette { display: flex; flex-wrap: wrap; gap: 6px; }
.preview { position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow: auto; }
.preview .form { gap: 10px; }
.preview .sec .body { padding: 10px 12px; }
.mini { transform-origin: top left; }

/* toasts and dialogs */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(460px, calc(100vw - 24px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--fg); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 550; }
.toast.bad { background: var(--bad); color: #fff; }
.toast button { margin-left: auto; background: transparent; border: 1px solid color-mix(in srgb, currentColor 40%, transparent); color: inherit; border-radius: 999px; height: 28px; padding: 0 12px; font: 650 12.5px var(--font); cursor: pointer; }
dialog { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--fg); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(10,12,18,.45); backdrop-filter: blur(2px); }
dialog form, #whatsnew { padding: 20px; }
dialog h2 { margin-bottom: 12px; font-size: 18px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.err { color: var(--bad); min-height: 1.4em; font-weight: 550; }
.linkbox { display: flex; gap: 6px; }
.linkbox input { flex: 1; min-width: 0; font-size: 12.5px; }

/* sign in */
.signin { max-width: 420px; margin: 8vh auto 0; display: grid; gap: 16px; }
.signin .card { padding: 24px; display: grid; gap: 14px; }
.hero-mark { width: 56px; height: 56px; color: var(--brand); }

.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.logo-drop { display: grid; place-items: center; min-height: 110px; border: 2px dashed var(--line); border-radius: 12px; padding: 12px; cursor: pointer; text-align: center; color: var(--mute); }
.logo-drop img { max-height: 80px; max-width: 100%; }
.logo-drop.over { border-color: var(--accent); }
.drop-veil { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, rgba(0,0,0,.3)); color: #fff; font: 700 22px var(--font); pointer-events: none; }

@media (max-width: 1000px) {
  .editor { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; max-height: none; }
  .unit-head .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tabs { display: none; }
  .bottom-tabs { display: flex; }
  .page { padding: 16px 12px 96px; }
  .top { padding: 8px 12px; }
  .save { width: 84px; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .row > .seg { flex: 1 1 100%; }
  .row > .seg button { flex: 1; padding: 0 6px; }
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .frow { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) auto; }
  .frow .unit-col { display: none; }
  .block-h .kind { display: none; }
  .block-h .icon-btn { width: 32px; }
  .actionbar { border-radius: 16px; bottom: 76px; }
  .sticky-actions { margin: 0 -12px -96px; bottom: calc(60px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
  .gridwrap { height: calc(100vh - 300px); }
  h1 { font-size: 21px; }
  .list > li { padding: 11px 12px; }
  .brand-name { max-width: 130px; }
}
@media (max-width: 760px) { .unit-head .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sticky-actions { flex-wrap: nowrap; } .sticky-actions .btn.lg { flex: 1; height: 44px; padding: 0 12px; } .sticky-actions .grow { display: none; } }
@media (max-width: 380px) { .yn { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .bar > i { transition: none; } }
@media print { .top, .bottom-tabs, .actionbar, .sticky-actions { display: none !important; } }
:root[data-theme=dark] .btn.good, :root[data-theme=dark] .yn .seg button[aria-pressed=true][data-v=Yes] { color: #06140c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .btn.good, :root:not([data-theme=light]) .yn .seg button[aria-pressed=true][data-v=Yes] { color: #06140c; } }
.bill-price { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
