:root {--weighUnder: #f39c12; --weighOk: #e1d70f; --weighPerfect: #2ecc40; --weighOver: #c0392b;} /* the weighing colours of the fill, check and factory modes: under | OK range | PERFECT | over */
/* =====================================================================================================================
   THE LOOK OF THE APP ("INSTRUMENT"): one set of values and the base of every control. Every page builds on these values;
   the base rules have no weight (:where), so every class rule of a page wins over them.
   ===================================================================================================================== */
:root {
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, "SF Mono", "Cascadia Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
	--f0: 10px; --f1: 11px; --f2: 13px; --f3: 15px; --f4: 18px; --f5: 24px; --f6: 34px; --f7: 60px; --fIn: 16px;	/* text sizes (--fIn: fields to type in - phones don't zoom) */
	--s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;		/* spacing steps */
	--ctl: 40px; --key: 52px; --ctlS: 30px; --hit: 36px; --annH: 28px;		/* a control | a key of the key row | a small control | close and back | a key at the weight */
	--mark: #ffd400;															/* the one highlight (never a button colour of its own) */
	--wUnder: var(--weighUnder); --wOk: var(--weighOk); --wPerfect: var(--weighPerfect); --wOver: var(--weighOver); --onW: #14160f; --onWOver: #ffffff;	/* the weighing colours: never for buttons */
	--bg: #f2f1ec; --surface: #ffffff; --sunk: #e8e6df; --line: #cfccc2; --edge: #15171a; --text: #15171a; --muted: #5b5f5a;
	--main: #15171a; --onMain: #ffffff; --mainSoft: #e3e1d9;
	--head: #15171a; --onHead: #f2f1ec; --headMuted: #a9aca6; --headLine: #ffd400;
	--disp: #15171a; --onDisp: #f6f5f0; --dispMuted: #8a8e88; --dispEdge: #15171a; --dispWarn: #ff8a7d;
	--danger: #b3261e; --onDanger: #ffffff; --dangerSoft: #f7e3e1; --ok: #1e7a3c;
	--warnBg: #fbe7b8; --warnText: #4d3400; --noteBg: #e3e1d9; --noteText: #15171a;
	--r1: 2px; --r2: 4px; --r3: 4px; --rPill: 2px; --shadow: none; --shadowWin: 0 10px 30px rgba(0, 0, 0, 0.30); --focus: #1a66c2;
	--selArrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%2315171a'/%3E%3C/svg%3E");
	--info: #1e5fb8; --infoSoft: #e3eefc; --okSoft: #e8f5e9; --warnInk: #8a5a00;	/* a blue mark | its ground | the ground of a good line | orange text (low, pending) */
	--roast: #6d4c41; --roastSoft: #efebe9; --dispPrice: #00695c; --dispPriceSoft: #e0f2f1;	/* the price card of the roastery and the dispensary (the colours of the coffee and the lab view) */
	--fillOk: #1e7a3c; --fillBad: #b3261e; --fillOver: #b84a00; --onFill: #ffffff;	/* filled marks with white text (badges, strips, the BOOK key): the same in both schemes */
	--cGrid: #ebe9e2; --cWater: #0057b8; --cFlow: #c45200; --cBrew: #6f4126; --cGood: #2e7d32; --cOver: #c45200; --cPress: #8e44ad; --cTemp: #117a65; --cWarn: #8a5a00; --cNeutral: #5d6d7e;	/* drawings and charts: fine grid | water, weight | flow | coffee | in range | too much | pressure | temperature | bloom, gross | tare */
	color-scheme: light;
}
/* DARK: the system's choice (prefers-color-scheme) unless 🌐 VIEW says light; or 🌐 VIEW says dark (<html data-scheme="light|dark">, app_views.js).
   Both blocks hold the same values. Paper stays light: reports, labels and PDFs are built with their own colours. */
@media (prefers-color-scheme: dark) {
	:root:not([data-scheme="light"]) {
		--weighOver: #ff6b5b; --onWOver: #14160f;
		--bg: #0f1113; --surface: #181b1e; --sunk: #22262a; --line: #363c42; --edge: #8b9199; --text: #ecebe6; --muted: #a2a7a0;
		--main: #ecebe6; --onMain: #0f1113; --mainSoft: #2a2f35;
		--head: #000000; --onHead: #ecebe6; --headMuted: #9a9f98; --headLine: #ffd400;
		--disp: #000000; --onDisp: #f6f5f0; --dispMuted: #8a8e88; --dispEdge: #363c42; --dispWarn: #ff8a7d;
		--danger: #ff8a7d; --onDanger: #2b0906; --dangerSoft: #3a1512; --ok: #6fd08c;
		--warnBg: #4a3a10; --warnText: #ffe6a6; --noteBg: #22262a; --noteText: #ecebe6;
		--shadowWin: 0 10px 30px rgba(0, 0, 0, 0.7); --focus: #7db8ff;
		--selArrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23ecebe6'/%3E%3C/svg%3E");
		--info: #7db8ff; --infoSoft: #1a2b42; --okSoft: #16301d; --warnInk: #f0b44c;
		--roast: #d4b0a0; --roastSoft: #33261f; --dispPrice: #5cc9b8; --dispPriceSoft: #0f2e2a;
		--cGrid: #262a2f; --cWater: #6fb1ff; --cFlow: #ffa057; --cBrew: #d9a77a; --cGood: #6fd08c; --cOver: #ffa057; --cPress: #c79be0; --cTemp: #4fd1b5; --cWarn: #f0b44c; --cNeutral: #a3b1bf;
		color-scheme: dark;
	}
}
:root[data-scheme="dark"] {
	--weighOver: #ff6b5b; --onWOver: #14160f;
	--bg: #0f1113; --surface: #181b1e; --sunk: #22262a; --line: #363c42; --edge: #8b9199; --text: #ecebe6; --muted: #a2a7a0;
	--main: #ecebe6; --onMain: #0f1113; --mainSoft: #2a2f35;
	--head: #000000; --onHead: #ecebe6; --headMuted: #9a9f98; --headLine: #ffd400;
	--disp: #000000; --onDisp: #f6f5f0; --dispMuted: #8a8e88; --dispEdge: #363c42; --dispWarn: #ff8a7d;
	--danger: #ff8a7d; --onDanger: #2b0906; --dangerSoft: #3a1512; --ok: #6fd08c;
	--warnBg: #4a3a10; --warnText: #ffe6a6; --noteBg: #22262a; --noteText: #ecebe6;
	--shadowWin: 0 10px 30px rgba(0, 0, 0, 0.7); --focus: #7db8ff;
	--selArrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23ecebe6'/%3E%3C/svg%3E");
	--info: #7db8ff; --infoSoft: #1a2b42; --okSoft: #16301d; --warnInk: #f0b44c;
	--roast: #d4b0a0; --roastSoft: #33261f; --dispPrice: #5cc9b8; --dispPriceSoft: #0f2e2a;
	--cGrid: #262a2f; --cWater: #6fb1ff; --cFlow: #ffa057; --cBrew: #d9a77a; --cGood: #6fd08c; --cOver: #ffa057; --cPress: #c79be0; --cTemp: #4fd1b5; --cWarn: #f0b44c; --cNeutral: #a3b1bf;
	color-scheme: dark;
}
body {font-family: var(--font); color: var(--text); background-color: var(--bg);}
/* every control starts from nothing (Safari and iOS draw their own buttons, fields and selects otherwise) */
:where(button, select, textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"])) {-webkit-appearance: none; appearance: none; box-sizing: border-box; font-family: inherit; font-size: var(--f3); color: var(--text); background-color: var(--surface); border: 1px solid var(--edge); border-radius: var(--r1); -webkit-tap-highlight-color: transparent; touch-action: manipulation;}
:where(button) {min-height: var(--ctlS); padding: 0.35em 0.8em; font-weight: 700; letter-spacing: 0.04em; line-height: 1.2; cursor: pointer;}
:where(button:hover:not(:disabled)) {background-color: var(--sunk);}
:where(button:disabled) {opacity: 0.45; cursor: default;}
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]), textarea) {min-height: var(--ctl); padding: 0 var(--s2); font-size: var(--fIn); border-color: var(--line);}
:where(textarea) {padding: var(--s2);}
:where(input, textarea)::placeholder {color: var(--muted); opacity: 0.9;}
:where(select) {min-height: var(--ctl); padding: 0 28px 0 var(--s2); font-size: var(--fIn); border-color: var(--line); background-image: var(--selArrow); background-repeat: no-repeat; background-position: right 10px center;}
:where(input[type="checkbox"], input[type="radio"], input[type="range"], progress) {accent-color: var(--main);}
:where(a) {color: var(--text);}
:where(:focus-visible) {outline: 2px solid var(--focus); outline-offset: 2px;}
/* the accent of the chosen view (APP_VIEWS, app_view_apply sets its light and dark pair on body): marks what is active, never a button colour */
body {--accent: var(--viewAccent, var(--main)); --accentSoft: var(--viewAccentSoft, var(--mainSoft)); --onAccent: var(--viewAccentText, var(--onMain)); --accentBright: var(--viewAccent, var(--headLine));}
body.appViewOn {--viewAccent: var(--viewAccentL); --viewAccentSoft: var(--viewAccentSoftL); --viewAccentText: #ffffff;}
@media (prefers-color-scheme: dark) {:root:not([data-scheme="light"]) body.appViewOn {--viewAccent: var(--viewAccentD); --viewAccentSoft: var(--viewAccentSoftD); --viewAccentText: #0f1113;}}
:root[data-scheme="dark"] body.appViewOn {--viewAccent: var(--viewAccentD); --viewAccentSoft: var(--viewAccentSoftD); --viewAccentText: #0f1113;}

/* ---- THE PARTS (one of each, inside an element of class "ui": a rebuilt page or window) ---- */
.ui {font-family: var(--font); font-size: var(--f3); line-height: 1.35; color: var(--text); text-align: left;}
.ui button, .ui input, .ui select {font: inherit; color: inherit; margin: 0;}
.ui button {cursor: pointer;}
/* Safari and iOS draw their own buttons, fields and selects unless told not to: every control starts from nothing */
.ui button, .ui select, .ui input:not([type="checkbox"]):not([type="radio"]) {-webkit-appearance: none; appearance: none; border-radius: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation;}
.ui :focus-visible {outline: 2px solid var(--focus); outline-offset: 2px;}
.ui .mut {color: var(--muted);}

/* buttons: normal | main | quiet | danger, small, with a lock */
.ui .btn {min-height: var(--ctl); padding: 6px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center; line-height: 1.15; font-size: var(--f2); font-weight: 700; letter-spacing: 0.02em; color: var(--text); background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r1); box-shadow: var(--shadow); overflow-wrap: break-word;}
.ui .btn.main {background: var(--main); color: var(--onMain); border-color: var(--main);}
.ui .btn.quiet {background: transparent; border-color: transparent; box-shadow: none; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;}
.ui .btn.danger {color: var(--danger); border-color: var(--danger);}
.ui .btn.danger.fill {background: var(--danger); color: var(--onDanger);}
.ui .btn.sm {min-height: var(--ctlS); padding: 2px 10px; font-size: var(--f1);}
.ui .btn.ico {flex: none; width: var(--ctl); padding: 0; font-size: var(--f3);}
.ui .btn.wide {width: 100%;}
.ui .btn.hero {min-height: 64px; font-size: var(--f4); box-shadow: 0 0 0 3px var(--ok);}
.ui .isLocked {color: var(--muted);}
.ui .isLocked .e {opacity: 0.5;}
.ui .btn.isLocked, .ui .tile.isLocked {color: var(--muted); background: var(--sunk); border-color: var(--line); box-shadow: none;}
.ui .lock {display: inline-flex; align-items: center; gap: 3px; margin-left: auto; padding: 1px 6px; font-size: var(--f0); font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; color: var(--text); background: var(--sunk); border: 1px solid var(--line); border-radius: var(--rPill);}
.ui .btn .lock {margin-left: 2px;}
/* the round close, the back arrow, the info sign: one glyph each, everywhere */
.ui .x, .ui .back {flex: none; width: var(--hit); height: var(--hit); display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: var(--f3); line-height: 1; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 50%;}
.ui .back {border-color: transparent; font-size: var(--f4);}
.ui .i {flex: none; box-sizing: border-box; width: 18px; height: 18px; min-width: 0; min-height: 0; aspect-ratio: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0; font: italic 700 var(--f1)/1 Georgia, "Times New Roman", serif; color: var(--muted); background: transparent; border: 1px solid var(--muted); border-radius: 50%;}

/* fields */
.ui .fld {display: grid; gap: 4px; min-width: 0;}
.ui .lab {display: flex; align-items: center; gap: 6px; font-size: var(--f1); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);}
.ui .lab .req {color: var(--danger);}
/* (a unit inside an uppercase label keeps its case: '$/g', 'mg/g', '(g)' - helpers.js ui_unit_case) */
.unitCase {text-transform: none;}
.ui .inp, .ui .sel {width: 100%; min-width: 0; min-height: var(--ctl); padding: 6px 10px; font-size: var(--fIn); color: var(--text); background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r1);}
.ui .inp::placeholder {color: var(--muted); opacity: 0.9;}
/* (the arrow of a select is drawn here, as the browser's own is switched off) */
.ui .sel {padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;}
.ui .hint {font-size: var(--f1); color: var(--muted);}
.ui .note {padding: 8px 10px; font-size: var(--f2); color: var(--noteText); background: var(--noteBg); border-radius: var(--r1);}
.ui .join {display: flex; gap: var(--s2); min-width: 0;}
.ui .join > .inp, .ui .join > .sel {flex: 1;}
.ui .chk {display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: var(--f2);}
.ui .chk input {flex: none; width: 18px; height: 18px; accent-color: var(--main);}

/* cards */
.ui .card {background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--shadow); min-width: 0;}
.ui .cardHead {display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: var(--f1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid var(--line);}
.ui .cardHead .chev {margin-left: auto;}
.ui .cardBody {display: grid; gap: var(--s3); padding: 12px;}
.ui .cardActs {display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: flex-end;}

/* values (the unit cards below the weight) */
.ui .vals, .ui.vals {display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2);}
.ui .val {min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: baseline; align-content: space-between; column-gap: 4px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--shadow);}
.ui .val .k {display: block; font-size: min(var(--f1), 10.6cqw); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis;}
/* (a long single word - CARBOHYDRATE - shrinks instead of breaking in the word: the class set by conversions.js) */
.ui .val .k.kLong {font-size: min(var(--f1), 8.4cqw); letter-spacing: 0;}
.ui .val .v {font: 600 var(--f5)/1.2 var(--mono); font-variant-numeric: tabular-nums;}
.ui .val .u {font-size: var(--f2); color: var(--muted);}
.ui .val .goal {grid-column: 1 / -1; margin-top: 4px; font-size: var(--f0); color: var(--muted);}
.ui .val .goal .bar {display: block; height: 6px; margin-top: 3px;}
/* a card is a key: a tap opens the goal of its unit; the 🥅 mark in its corner shows that (full when a goal is set) */
.ui .val.tap {position: relative; cursor: pointer;}
.ui .val.tap .gm {position: absolute; top: 5px; right: 7px; font-size: var(--f0); opacity: 0.35;}
.ui .val.tap.hasGoal .gm {opacity: 1;}
.ui .val.tap.isPicked {border-color: var(--main); box-shadow: 0 0 0 2px var(--mainSoft);}
.ui .val.tap .k {padding-right: 16px;}
/* the goal bar: neutral up to 90 %, then the last 10 % fill the whole bar (fine view, as today) in the weighing colours */
.ui .goal .bar span {background: var(--text);}
.ui .goal .bar.zoom {background: var(--sunk); box-shadow: inset 3px 0 0 var(--muted);}
.ui .goal .bar.gUnder span {background: var(--wUnder);}
.ui .goal .bar.gNear span {background: var(--wOk);}
.ui .goal .bar.gOn span {background: var(--wPerfect);}
.ui .goal .bar.gOver span {background: var(--wOver);}
.ui .goal b.gOver {color: var(--wOver);}
/* the small goal window: hangs at the card that was tapped */
.ui .pop {position: relative; display: grid; gap: var(--s2); margin-top: 8px; padding: 10px 12px; color: var(--text); background: var(--surface); border: 1px solid var(--main); border-radius: var(--r2); box-shadow: var(--shadowWin);}
.ui .pop::before {content: ""; position: absolute; top: -7px; left: var(--popArrow, 24px); width: 12px; height: 12px; background: var(--surface); border-left: 1px solid var(--main); border-top: 1px solid var(--main); transform: rotate(45deg);}
.ui .pop .popHead {display: flex; align-items: center; gap: 8px; font-size: var(--f2); font-weight: 700;}
.ui .pop .popHead .grow {flex: 1 1 auto; min-width: 0;}
.ui .pop .join .inp {min-width: 0;}
.ui .pop .hint {margin: 0;}
.ui .vals.two {grid-template-columns: 1fr 1fr;}
/* a unit chip: the name between its keys (edit | hide, delete) - small, so more fit in a line */
.ui .chip.unit {gap: 0; padding: 0; min-height: 0; font-size: var(--f1); overflow: hidden;}
.ui .chip.unit .nm {padding: 0 6px 0 3px; font-weight: 600;}
.ui .chip.unit .nm:first-child {padding-left: 8px;}
.ui .cKey {flex: none; width: calc(var(--annH) - 4px); height: calc(var(--annH) - 4px); display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: var(--f1); line-height: 1; background: transparent; border: 0; border-left: 1px solid var(--line);}
.ui .chip.unit .cKey:first-child {border-left: 0;}
.ui .cKey.on {background: var(--mainSoft); box-shadow: inset 0 -3px 0 var(--main);}
.ui .chip.unit.isOff .nm {color: var(--muted); text-decoration: line-through;}
.ui .val.big .v {font-size: var(--f6);}
.ui .val.hl {background: var(--accentSoft); border-color: var(--accent);}

/* lists, tables, pager */
.ui .list {background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--shadow); overflow: hidden;}
.ui .row {box-sizing: border-box; display: flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 6px 8px 6px 12px; border-top: 1px solid var(--line);}
.ui .row:first-child {border-top: 0;}
.ui .row .grow {flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere;}
.ui .row .sub {display: block; font-size: var(--f1); font-weight: 400; color: var(--muted);}
.ui .row .e {flex: none; width: 28px; text-align: center; font-size: var(--f4);}
.ui .tools {display: flex; gap: var(--s2); align-items: center;}
.ui .tools .inp, .ui .tools .sel {flex: 1;}
.ui .tbl {width: 100%; border-collapse: collapse; font-size: var(--f2);}
.ui .tbl thead {display: none;}
.ui .tbl tr {display: grid; grid-template-columns: auto 1fr; gap: 0 10px; padding: 8px 12px; border-top: 1px solid var(--line);}
.ui .tbl tbody tr:first-child {border-top: 0;}
.ui .tbl td {padding: 0; color: var(--muted); font-size: var(--f1);}
.ui .tbl td.t {font-family: var(--mono); font-variant-numeric: tabular-nums;}
.ui .tbl td.c {grid-column: 1 / -1; color: var(--text); font-size: var(--f2); font-weight: 600;}
/* the log: one row per entry (time | no. and name | value), the extras of a line below it */
.ui .logRow {display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: baseline; padding: 8px 12px; border-top: 1px solid var(--line);}
.ui .logRow:first-child {border-top: 0;}
.ui .logRow .t {font: var(--f1) var(--mono); color: var(--muted); font-variant-numeric: tabular-nums;}
.ui .logRow .n {min-width: 0; font-weight: 600; overflow-wrap: anywhere;}
.ui .logRow .n .no {color: var(--muted); font-weight: 400;}
.ui .logRow .w {font: 600 var(--f3) var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui .logRow .lx {grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--f1); color: var(--muted);}
.ui .logRow .lx b {font-family: var(--mono); font-weight: 600; color: var(--text);}
.ui .logRow.sum {background: var(--sunk);}
.ui .logRow.sum .n, .ui .logRow.sum .w {font-weight: 800;}
/* a table of values: name | amount | (per 100 g) - the numbers right-aligned */
.ui .kv3 {display: grid; grid-template-columns: 1fr auto auto; gap: 4px 14px; font-size: var(--f2);}
.ui .kv3 b, .ui .kv3 i {font: 600 var(--f2) var(--mono); font-style: normal; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui .kv3 i {font-weight: 400; color: var(--muted);}
.ui .kv3 .hd {font-size: var(--f0); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: right;}
.ui .kv3 .hd:first-child {text-align: left;}
.ui .cardBody .sub2 {font-size: var(--f0); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 4px;}
.ui details.card > summary {list-style: none; cursor: pointer;}
.ui details.card > summary::-webkit-details-marker {display: none;}
.ui details.card > summary .chev::after {content: '▸';}
.ui details.card[open] > summary .chev::after {content: '▾';}
.ui .cond {font-size: var(--f0); font-weight: 700; letter-spacing: 0.04em; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--rPill); padding: 1px 6px; white-space: nowrap;}
.ui .pager {display: flex; align-items: center; justify-content: center; gap: var(--s3); font-size: var(--f2); color: var(--muted);}

/* chips, tabs, tiles */
.ui .chips {display: flex; flex-wrap: wrap; gap: 6px; align-items: center;}
.ui .chip {display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 10px; font-size: var(--f2); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--rPill);}
.ui .chip.on {background: var(--mainSoft); border-color: var(--main); font-weight: 700;}
.ui .chip.wUnder {background: var(--wUnder); color: var(--onW); border-color: transparent;}
.ui .chip.wOk {background: var(--wOk); color: var(--onW); border-color: transparent;}
.ui .chip.wPerfect {background: var(--wPerfect); color: var(--onW); border-color: transparent;}
.ui .chip.wOver {background: var(--wOver); color: var(--onWOver); border-color: transparent;}
.ui .tabs, .ui.tabs {flex: none; display: flex; overflow-x: auto; scrollbar-width: none; background: var(--surface); border-bottom: 1px solid var(--line);}
.ui .tab {flex: 1 0 auto; min-height: calc(var(--hit) + 8px); padding: 8px 14px; font-size: var(--f2); font-weight: 700; white-space: nowrap; color: var(--muted); background: transparent; border: 0; border-bottom: 3px solid transparent;}
.ui .tab.on {color: var(--text); border-bottom-color: var(--accent);}
.ui .tabs.more {-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);}
.ui .tiles {display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: var(--s2);}
.ui .tile {position: relative; min-width: 0; min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 4px; font-size: var(--f1); font-weight: 700; letter-spacing: 0.03em; line-height: 1.15; text-align: center; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-bottom: 3px solid var(--accent); border-radius: var(--r2); box-shadow: var(--shadow); overflow-wrap: break-word;}
.ui .tile .e {font-size: var(--f5); line-height: 1;}
.ui .tile .lock {position: absolute; top: 4px; right: 4px; margin: 0;}
.ui .secLabel {font-size: var(--f1); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);}

/* the weighing state (fill, check, factory): the only place for the traffic-light colours */
.ui .state {padding: 12px; text-align: center; color: var(--onW); background: var(--wPerfect); border-radius: var(--r2);}
.ui .state .big {font: 700 var(--f6)/1.1 var(--mono); font-variant-numeric: tabular-nums;}
.ui .state .meter {height: 14px; margin-top: 8px; background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(0, 0, 0, 0.35); border-radius: var(--r1); overflow: hidden;}
.ui .state .meter span {display: block; height: 100%; width: 72%; background: rgba(0, 0, 0, 0.55);}
.ui .verdict {padding: 8px 12px; font-size: var(--f2); font-weight: 700; color: var(--ok); background: var(--surface); border: 1px solid var(--ok); border-left-width: 6px; border-radius: var(--r1);}
.ui .kv {display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: var(--f2);}
.ui .kv b {font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui .kv b.l {text-align: left;}

/* banners (the one stack above the keys), dialogs */
.ui .banner {display: flex; align-items: center; gap: var(--s2); min-height: 36px; padding: 4px 12px; font-size: var(--f2); font-weight: 600; color: var(--noteText); background: var(--noteBg); border-top: 1px solid var(--line);}
.ui .banner .grow {flex: 1; min-width: 0;}
.ui .banner.bad {color: var(--onDanger); background: var(--danger);}
.ui .banner.warn {color: var(--warnText); background: var(--warnBg);}
.ui .banner.ok {color: var(--onFill); background: var(--fillOk); border-top-color: var(--fillOk);} /* (it worked: saved, copied, done - green, so it is not missed) */
.ui .banner.ok .bx {opacity: 0.9;}
.ui .banner.tool {flex-wrap: nowrap; gap: 6px; padding: 4px 10px; color: var(--text); background: var(--surface);}
.ui .banner.tool .grow {flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.ui .banner.tool .i {margin-right: auto;}
.ui .banner.tool .btn {flex: none; padding: 2px 7px; gap: 4px; white-space: nowrap;}
/* (too narrow for the words: the keys keep their sign, the word stays as the tooltip) */
.ui .banner.tool.tight .wd {display: none;}
.ui .banner.tool.tight .btn {min-width: calc(var(--ctlS) + 10px); font-size: var(--f3);}
.ui .banner .btn.sm {box-shadow: none;}
.ui .banner .bx {flex: none; width: 28px; height: 28px; margin-right: -6px; padding: 0; font-size: var(--f2); line-height: 1; color: inherit; background: transparent; border: 0; opacity: 0.75;}
/* THE MESSAGE STACK (busy_overlay.js msg_line): fixed at the bottom of the screen above the key row of the page (--keyRowH), right of a
   docked ☰ menu, below the menu drawer (z 54/55) and every window; the page gets its height as room below (--msgStackH) */
div.msgStack {position: fixed; left: 0; right: 0; bottom: var(--keyRowH, 0px); z-index: 50; display: flex; flex-direction: column; max-height: 40vh; overflow-y: auto; box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);}
div.msgStack:empty {display: none;}
body.appMenuWide div.msgStack {left: var(--menuW);}
body {padding-bottom: calc(var(--msgStackH, 0px) + var(--keyRowH, 0px) + var(--weightBoxH, 0px));}
div.msgStack .banner, div.msgToasts .banner {position: relative; flex: none; overflow: hidden;}
div.msgStack .banner .grow, div.msgToasts .banner .grow {overflow-wrap: anywhere;}
div.msgStack .banner .grow.msgTap, div.msgToasts .banner .grow.msgTap {cursor: pointer;}
div.msgStack .banner .spin, div.msgToasts .banner .spin {flex: none; font-size: var(--f4); line-height: 1;}
div.msgStack .banner .btn.sm {flex: none;}
div.msgStack .msgBar, div.msgToasts .msgBar {position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--sunk);}
div.msgStack .msgBar i, div.msgToasts .msgBar i {display: block; height: 100%; width: 0; background: var(--main);}
/* THE TOASTS (busy_overlay.js msg_line): the short answers to a click - saved, copied, done, loading... - are small notes over the page, at
   the top below the head (and the weight display), above every window: you see the answer where you clicked; they leave by themselves */
div.msgToasts {position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--headH) + var(--instH, 0px) + 8px); z-index: 20100; display: flex; flex-direction: column; gap: 6px; width: min(92vw, 420px); pointer-events: none;}
div.msgToasts:empty {display: none;}
body.appMenuWide div.msgToasts {left: calc(50% + var(--menuW) / 2);}
div.msgToasts .banner {pointer-events: auto; border: 0; border-radius: var(--r2); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32); animation: toastIn 0.16s ease-out;}
@keyframes toastIn {from {opacity: 0; transform: translateY(-8px);} to {opacity: 1; transform: none;}}
@media (prefers-reduced-motion: reduce) {div.msgToasts .banner {animation: none;}}
div.msgStack .msgTime, div.msgToasts .msgTime {position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor; opacity: 0.5; transform-origin: left; animation: msgTime linear forwards;}
@keyframes msgTime {from {transform: scaleX(1);} to {transform: scaleX(0);}}
@media (prefers-reduced-motion: reduce) {div.msgStack .banner .spin, div.msgToasts .banner .spin {animation: none;}}
/* the timers (recipe_tools.js): one chip per timer in their line, the time that is up in the danger colour */
div.msgStack span.msgChips {display: flex; flex-wrap: wrap; gap: 4px 6px;}
div.msgStack span.msgChip {display: inline-flex; align-items: center; gap: 2px; padding: 0 0 0 8px; font-variant-numeric: tabular-nums; white-space: nowrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--rPill);}
div.msgStack span.msgChip.isDone {color: var(--onDanger); background: var(--danger); border-color: var(--danger);}
/* THE KEY ROW of a page: fixed at the bottom (the message stack stands on it: the page that shows it sets --keyRowH), the main action right;
   the keys share the whole width of the row on every screen (a tablet / desktop too) */
.ui.keyRow {position: fixed; z-index: 49; left: 0; right: 0; bottom: 0; box-sizing: border-box; display: flex; gap: var(--s2); padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)) 12px; background: var(--surface); border-top: 2px solid var(--edge);}
body.appMenuWide .ui.keyRow {left: var(--menuW);}
.ui.keyRow .btn {flex: 1 1 0; min-width: 0; min-height: var(--key); padding: 4px 8px; font-size: var(--f3); box-shadow: none;}
.ui.keyRow .btn.main {flex: 2 1 0;}
@media (min-width: 900px) {
	.ui.keyRow {padding-left: 24px; padding-right: 24px;}
}
/* the key that is the next step (key_next(), 00_upscale.js): green = go on, red = stop - with a slight pulse; gray keys stay gray */
.ui.keyRow .btn.keyGo:not(:disabled):not(.isOff):not(.blocked):not(.isLocked) {color: var(--onFill); background: var(--fillOk); border-color: var(--fillOk); animation: keyGoPulse 1.6s ease-in-out infinite;}
.ui.keyRow .btn.keyStop:not(:disabled):not(.isOff):not(.blocked):not(.isLocked) {color: var(--onFill); background: var(--fillBad); border-color: var(--fillBad); animation: keyStopPulse 1.6s ease-in-out infinite;}
@keyframes keyGoPulse {50% {box-shadow: 0 0 0 4px rgba(30, 122, 60, 0.35);}}
@keyframes keyStopPulse {50% {box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.35);}}
@media (prefers-reduced-motion: reduce) {.ui.keyRow .btn.keyGo, .ui.keyRow .btn.keyStop {animation: none;}}
.ui.keyRow .btn.keyGo.keyStill, .ui.keyRow .btn.keyStop.keyStill {animation: none;} /* (coloured, no pulse: the other key of the row pulses) */
.ui .dlg {position: relative; width: 100%; max-width: 22em; display: grid; gap: var(--s3); padding: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: var(--shadowWin);}
.ui .dlgTitle {display: flex; align-items: flex-start; gap: 8px; padding-right: 40px; font-size: var(--f4); font-weight: 700; line-height: 1.2;}
.ui .dlg > .x {position: absolute; top: 10px; right: 10px;}
.ui .dlg p {margin: 0; font-size: var(--f2);}
.ui .dlgBtns {display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: flex-end;}
.ui .dlgBtns .btn {flex: 1 1 auto;}
.ui .bar {height: 8px; background: var(--sunk); border-radius: var(--rPill); overflow: hidden;}
.ui .bar span {display: block; height: 100%; width: 42%; background: var(--main);}
.ui .spin {display: inline-block; font-size: var(--f6); animation: spin 2.4s linear infinite;}
@keyframes spin {to {transform: rotate(360deg);}}
@media (prefers-reduced-motion: reduce) {.ui .spin {animation: none;}}
.ui .vals, .ui.vals {gap: 1px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2);}
.ui .val {border: 0; border-radius: 0; box-shadow: none; outline: 1px solid var(--line);}
.ui .val.hl {border: 1px solid var(--line); border-bottom: 3px solid var(--accent); outline: 0;}
.ui .btn {text-transform: none; letter-spacing: 0.04em;}

body {margin: 10px; font-size: 1em; overscroll-behavior-y: contain;}
button {align-items: center; display: inline;}
button.blackEmojiButton span {font-family: Arial, sans-serif, "EmojiSymbols"; filter: grayscale(85%);}
.newbutton {height: inherit; align-items: inherit; display: inline; font-size: inherit;}
.fettButton {font-weight: bold; font-size: 1.25em; display: inline-flex; margin-bottom: 0.25em;}
.fettButtonHundert {font-weight: bold; font-size: 1.5em; margin-bottom: 0.15em;}
button.stopAlarmButton {font-size: 1.5em; margin-left: 0.25em; padding: 0.2em; border-radius: 1em; border: 0; background: lemonchiffon;}
button.blinkAlarmButton {font-weight: bold; color: red; padding: 0.2em; animation: blinker 1s linear infinite; border-color: red; position: absolute; top: 10px; right: 10px;}
input[type="text"] {width: 100%;}
p {font-size: 1.2em;}
h2 {padding: 0 0 0 0; margin: 0 0 0 0;}
.container {display: flex; justify-content: space-between; align-items: center;}
/* THE HEAD OF EVERY PAGE (helpers.js head_build / head_title): fixed at the top - ☰ | small line = where you are (the mode), large line =
   what is open (page title, recipe, THING or the scale) | the status (link dot, battery, user - from the first connect on) | QR | ✕ of the
   page. Its bottom edge in the accent of the view. Below the pages that open over the page (z-index 5 and up), as the title was. */
:root {--headH: 55px;}
header.appHead {position: fixed; z-index: 4; top: 0; left: 0; right: 0; box-sizing: border-box; display: flex; align-items: center; gap: var(--s2); height: var(--headH); padding: 6px 10px; color: var(--onHead); background: var(--head);}
body.appMenuWide header.appHead {left: var(--menuW);}
header.appHead h1.ttl {flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; margin: 0; padding: 0; font-size: inherit; font-weight: 400; text-align: start;}
header.appHead .ttlSub {font-size: var(--f0); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--headMuted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
header.appHead .ttlSub:empty {display: none;}
header.appHead .ttlMain {font-size: var(--f4); font-weight: 700; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
header.appHead .em {filter: grayscale(1);}
header.appHead button {flex: none; color: inherit; background-color: transparent;}
header.appHead button:hover:not(:disabled) {background-color: rgba(255, 255, 255, 0.12);}
header.appHead .dontShowButton {display: none;}
/* ☰ (from the first connect on, not beside the sidebar) and its red dot: no link, an empty battery, an app update (app_menu_dot_refresh()) */
header.appHead button.menuBtn {display: none; position: relative; width: 40px; height: 40px; min-height: 0; padding: 0; font-size: var(--f5); font-weight: 400; line-height: 1; border: 0;}
body.appMenuOn header.appHead button.menuBtn {display: inline-flex; align-items: center; justify-content: center;}
body.appMenuWide header.appHead button.menuBtn {display: none;}
header.appHead span.appMenuDot {display: none; position: absolute; top: 6px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--head);}
header.appHead button.appMenuAttention span.appMenuDot {display: block;}
/* the status: link dot · battery · user (role sign + initials) */
header.appHead .stat {flex: none; display: none; align-items: center; gap: 6px; font-size: var(--f1); font-weight: 700; color: var(--headMuted); white-space: nowrap;}
body.appMenuOn header.appHead .stat {display: inline-flex;}
header.appHead .stat .statPart:empty {display: none;}
header.appHead .dot {display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #35c759;}
header.appHead .dot.off {background: var(--danger);}
/* (a click on the link dot: the mini connection menu, app_menu_conn_pop_toggle() - a larger place to tap than the dot) */
header.appHead #headLink {position: relative; cursor: pointer;}
header.appHead #headLink::after {content: ""; position: absolute; inset: -12px;}
/* THE MINI CONNECTION MENU: under the link dot of the head (DISCONNECT / RECONNECT, SWITCH SCALE, ADD MORE SCALES) */
div.connPop {position: fixed; z-index: 60; min-width: 230px; max-width: calc(100vw - 16px); box-sizing: border-box; padding: 4px 0; color: var(--text); background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r2); box-shadow: var(--shadowWin);}
div.connPop::before {content: ""; position: absolute; top: -7px; right: var(--popArrow, 12px); width: 12px; height: 12px; background: var(--surface); border-left: 1px solid var(--edge); border-top: 1px solid var(--edge); transform: rotate(45deg);}
div.connPop div.connPopHead {padding: 8px 14px 0 14px; font-size: var(--f2); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
div.connPop div.connPopState {padding: 0 14px 8px 14px; font-size: var(--f1); color: var(--muted); border-bottom: 1px solid var(--line);}
div.connPop button.connPopKey {display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; margin: 0; padding: 6px 14px; font: inherit; font-size: var(--f2); text-align: start; color: var(--text); background: transparent; border: 0; border-radius: 0; box-shadow: none; cursor: pointer;}
div.connPop button.connPopKey:hover:not(:disabled) {background: var(--sunk);}
div.connPop button.connPopKey:disabled {opacity: 0.5; cursor: default;}
/* (a page with its own ✕ - settings, info, records ...: no link dot in the head, the menu shows the link: its scale name turns red) */
header.appHead:has(#pageCloseButton:not(.dontShowButton)) #headLink {display: none;}
/* the ✕ of a page: a red filled key with a white sign, well to see on the dark head */
header.appHead #pageCloseButton {color: var(--onFill); background: var(--fillBad); border: 1px solid var(--fillBad); font-weight: 700;}
header.appHead #pageCloseButton:hover:not(:disabled) {background: var(--fillBad); border-color: var(--onFill); filter: brightness(1.12);}
header.appHead #headBattery {cursor: pointer;}
header.appHead #headBattery.batteryLow {color: #ff8a7d;} /* (the red of the dark values: readable on the dark head) */
header.appHead .usr {padding-left: 6px; border-left: 1px solid var(--headMuted);}
header.appHead button.qrKey {min-height: 28px; padding: 2px 6px; font: 700 var(--f0)/1 var(--mono); letter-spacing: 0.06em; border: 1px solid var(--headMuted); border-radius: var(--r1);}
header.appHead button.x.isLocked {opacity: 0.45;}
/* (the title of index.html until head_build() made the head of it - search engines read it, the first paint shows it like the head) */
h1#daTitle.title {position: fixed; z-index: 4; top: 0; left: 0; right: 0; box-sizing: border-box; height: var(--headH); margin: 0; padding: 0 10px; font-size: var(--f4); line-height: calc(var(--headH) - 3px); white-space: nowrap; overflow: hidden; color: var(--onHead); background: var(--head); border-bottom: 3px solid var(--headLine);}
h1#daTitle.title span.titleSub {display: none;}
div#isBigPage, div#isSetupPage, div#isInfoPage {margin-top: var(--headH);}
/* THE WEIGHT: the display of a scale page (#weightPanel.ui.inst, index.html - 00_upscale.js, mode_weighting.js), dark, pinned below the
   head: ↰ TAKE-AWAY | the marks NET · STABLE · →0← · ⛶ | 卄 HOLD - the row of the other scales - the number + unit (dimmed while it
   moves, a tap opens the window of the weight) - the lines below it (NET / tare, the light, container, virtual weight, take-away, hold,
   take-from, 🔖 of an RS-232 scale, 🌬 true mass). From the first connect on; a page without the weight hides it. Its height:
   --instH (the page scrolls a target below it). No coloured bar under it (2026-11-17: the owner does not like coloured bars: the head, the head of the menu and the display have none). */
html {scroll-padding-top: calc(var(--headH) + var(--instH, 0px) + 8px);}
.ui .dontShowDiv, .ui.dontShowDiv, .ui .dontShowButton {display: none;}
div.inst {position: sticky; top: var(--headH); z-index: 3; margin: 0 -10px; padding: 8px 12px 8px 12px; color: var(--onDisp); background: var(--disp);}
div.inst:has(> #topScale.dontShowTopScale, > #topScale.dontShowDiv) > :not(#daScales) {display: none;}
div.inst:has(> #topScale.dontShowTopScale, > #topScale.dontShowDiv):not(:has(> #daScales > *)) {display: none;}
div.inst .ann {display: flex; align-items: center; justify-content: space-between; gap: 6px;}
div.inst .annKey {display: inline-flex; align-items: center; gap: 4px; min-height: var(--annH); padding: 2px 8px; font-size: var(--f0); font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; color: inherit; background: transparent; border: 1px solid var(--dispMuted); border-radius: var(--r1);}
/* ↰ TAKE-AWAY and 卄 HOLD while off: muted text and a faint frame (on: the light fill below) */
div.inst #weightKeys .annKey:not(.on):not(.wtFull) {color: var(--dispMuted); border-color: color-mix(in srgb, var(--dispMuted) 50%, transparent);}
div.inst .annKey.on {color: var(--disp); background: var(--onDisp); border-color: var(--onDisp);}
div.inst .ann .annKey.dontShowButton {display: inline-flex; visibility: hidden;} /* (the marks stay in the middle) */
div.inst:has(> #topScale.notConnected) .ann .annKey {opacity: 0.4; pointer-events: none;} /* (no link: gray) */
div.inst .annIcon {font-family: Arial Black, Arial, sans-serif; font-weight: 900;}
div.inst .annTakeaway {display: inline-block; transform: rotate(90deg);}
div.inst .annKey.on .annTakeaway {transform: rotate(270deg);}
div.inst .marks {display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font: 700 var(--f1)/1 var(--mono); letter-spacing: 0.08em;}
div.inst .mark {opacity: 0.28;}
div.inst .mark.on {opacity: 1;}
/* the other scales: ⚖N weight (= N pcs / the state of a station) ⚞T⚟ ✕ */
div.inst .daExtraScales {flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 6px;}
div.inst .daExtraScales:empty {display: none !important;} /* (its display is set by the code: flex / none) */
div.inst .oneSingleScaleDiv {display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font: var(--f2) var(--mono); font-variant-numeric: tabular-nums;}
div.inst .oneSingleScaleDiv .msNr {color: var(--dispMuted);}
div.inst .oneSingleScaleDiv .msW {font-weight: 600;}
div.inst .oneSingleScaleDiv .daScaleUnstable {color: var(--dispMuted);}
div.inst .oneSingleScaleDiv .annKey {min-height: 24px; padding: 0 6px;}
div.inst .msState {padding: 0 6px; border-radius: var(--rPill); color: var(--onW);}
div.inst .msState.wPerfect {background: var(--wPerfect);}
div.inst .msState.wOk {background: var(--wOk);}
div.inst .msState.wOver {background: var(--wOver); color: var(--onWOver);}
/* the number (a text node, the unit in span.scaleUnit - other code writes it so) */
div.inst #topScale {display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 0; padding: 4px 0 0 0; font: 600 clamp(40px, 15vw, var(--f7))/1.05 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; white-space: nowrap; color: var(--onDisp); cursor: pointer;}
div.inst #topScale.daScaleUnstable {color: var(--dispMuted);}
div.inst #topScale .scaleUnit {font-size: var(--f5); font-weight: 400; letter-spacing: 0; color: var(--dispMuted);}
@media (min-width: 900px) {div.inst {padding: 10px 24px;} div.inst #topScale {font-size: 84px;} div.inst .marks {font-size: var(--f2);}}
@media (max-width: 479px) {div.inst .marks {gap: 4px 6px; letter-spacing: 0.02em;}} /* (the four marks in one line between the keys of a phone) */
/* the first seconds of a connection (link_watch.js): the line keeps the size of a weight (invisible number + unit), the turning scale and
   the text lie on top of it */
div.inst #topScale.topScaleLoadingOn {position: relative;}
div.inst .topScaleGhost {visibility: hidden;}
div.inst .topScaleLoading {position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; font: var(--f2)/1.2 var(--font); letter-spacing: 0; color: var(--dispMuted);}
div.inst .topScaleLoading .connectingSpinner {font-size: var(--f5); line-height: 1;}
/* the lines below the number: the text | small keys (👻 ✕ 🍽) or ℹ */
div.inst .wtGroup {display: grid; gap: 2px;}
div.inst .wtLine {display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; margin-top: 4px; font: var(--f2)/1.35 var(--font); text-align: center; color: var(--onDisp);}
div.inst .wtLine.dontShowDiv, div.inst .wtGroup.dontShowDiv {display: none;} /* (a hidden line of the display is hidden: its display: flex above would win over .dontShowDiv) */
div.inst .wtLine.wtWarn {color: var(--dispWarn); font-weight: 700;}
div.inst .wtLine .wtKey {min-height: 24px; padding: 0 7px; font-size: var(--f2);}
div.inst .wtLine .i {color: var(--dispMuted); border-color: var(--dispMuted);}
div.inst .wtLine span {font-variant-numeric: tabular-nums;}
div.inst .holdInfo {font-weight: 700;}
div.inst .holdInfo .holdState {font-weight: 400;}
@media (max-width: 600px) {div.inst .holdInfo .holdState {flex-basis: 100%;}} /* phones: what happens in its own line */
div.inst .wtLine.marks {font: 700 var(--f1)/1 var(--mono);}
div.inst .stabilityLight {font-weight: 700; cursor: pointer;}
/* the stability light (stability_light.js): moving red, settling yellow and pulsing, settled green - in the display and in its window */
.stabilityState0 {color: var(--danger);}
.stabilityState1 {color: var(--warnInk); animation: stabilityPulse 0.8s ease-in-out infinite;}
.stabilityState2 {color: var(--ok);}
.stabilityState3 {color: var(--muted);}
div.inst .stabilityState0 {color: var(--dispWarn);}
div.inst .stabilityState1 {color: var(--wOk);}
div.inst .stabilityState2 {color: var(--wPerfect);}
div.inst .stabilityState3 {color: var(--dispMuted);}
@keyframes stabilityPulse {50% {opacity: 0.35;}}
@media (prefers-reduced-motion: reduce) {.stabilityState1 {animation: none;}}
#stabilityWaitDialog .stabilityLight {margin: 0; font-size: var(--f3); font-weight: 700;}
/* ⛶ the weight on the whole screen: the last place of the marks (00_upscale.js weight_marks_refresh() keeps it there) */
div.inst .marks .wtFull {min-height: 0; padding: 8px 6px; margin: -8px -6px; gap: 0; font: inherit; font-size: var(--f2); line-height: 1; background: transparent; border: 0; border-radius: 0; opacity: 0.85; cursor: pointer;} /* (a mark in the line, no key frame; the padding and the equal negative margin make the touch area bigger, not the line) */
div.inst .marks .wtFull:hover, div.inst .marks .wtFull:focus-visible {opacity: 1;}
/* the window of the weight (weight_colors_info()): the marks explained, the scale behind the weight, the virtual weight */
#weightColorsInfo .weightMarkInfo {margin: 0 0 6px 0; font-size: var(--f2);}
#weightColorsInfo .weightMarkInfo.isNow {font-weight: 700;}
#weightColorsInfo .markSample {display: inline-block; min-width: 5.5em; margin-right: 4px; padding: 1px 6px; font: 700 var(--f1) var(--mono); letter-spacing: 0.08em; text-align: center; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r1);}
#weightColorsInfo .markSample.on {color: var(--onDisp); background: var(--disp); border-color: var(--disp);}
#weightColorsInfo .weightColorsScale {margin-top: 8px; padding-top: 6px; font-size: var(--f2); border-top: 1px solid var(--line);}
#weightColorsInfo .weightColorsScale p {margin: 4px 0;}
#weightColorsInfo .weightColorsWarn {color: var(--danger); font-weight: 700;}
#weightColorsInfo .weightColorsVirtual {margin-top: 10px;}
/* ⛶ the weight on the whole screen (indicator.js) */
.indicatorOverlay {position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--onDisp); background: var(--disp);}
.indicatorOverlay > .x {position: absolute; top: 12px; right: 12px;}
.indicatorOverlay .indicatorWeight {font: 600 min(22vw, 30vh)/1 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap;}
.indicatorOverlay .indicatorWeight.indicatorUnstable {color: var(--dispMuted);}
.indicatorOverlay .indicatorUnit {margin-left: 0.15em; font-size: 0.35em; color: var(--dispMuted);}
.indicatorOverlay .indicatorMarks {display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3em 0.8em; margin-top: 0.5em; font: 700 min(5vw, 6vh) var(--mono); letter-spacing: 0.06em;}
.indicatorOverlay .indicatorMark {opacity: 0.28;}
.indicatorOverlay .indicatorMark.indicatorOn {opacity: 1;}
/* THE UNIT CARDS (conversions.js empty_and_recreate_conversions_on_page): a grid below the weight - name | value + unit, the 🥅 in the
   corner (a tap: the goal), the percent of the goal and its bar; a price highlighted (the trade modes: the whole width, in their colours) */
div#extraConversionsToShow {margin: 12px 0;}
.ui.vals:empty {display: none;}
.ui .val.wide {grid-column: 1 / -1;}
.ui .val .v {grid-column: 1 / -1; min-width: 0; overflow-wrap: anywhere; text-align: right;}
.ui .val .v .scaleUnit {margin-left: 4px; font: 400 var(--f2) var(--font); color: var(--muted);}
.ui .val.moving .v, .ui .val .goal.moving {color: var(--muted);}
.ui .val .k .kSel {max-width: 100%; min-height: 0; padding: 0 18px 0 0; font: inherit; letter-spacing: inherit; text-transform: uppercase; color: inherit; background-color: transparent; background-position: right 2px center; border: 0;}
.ui .val .k .kPct {font-weight: 400; letter-spacing: 0;}
.ui .val .per {grid-column: 1 / -1; font: var(--f1) var(--mono); color: var(--muted); text-align: right;}
/* THE UNIT CARDS FILL THEIR ROW (the weighing / counting page): a card alone in its row takes the whole width, two 50 % each, three 33.3 % each
   (at most three in a row; exactly four = 2 + 2; a .wide card = one row); the amount grows with its card (container query: the cards
   are the containers, 21 % of their width, between 18 and 48 px) */
#extraConversionsToShow.ui.vals:not(.dontShowDiv):not(:empty) {display: flex; flex-wrap: wrap; gap: 1px;}
#extraConversionsToShow .val {box-sizing: border-box; flex: 1 1 calc(33.333% - 1px); min-width: 0; container-type: inline-size;}
#extraConversionsToShow:has(> .val:nth-child(4):last-child) .val {flex-basis: calc(50% - 1px);}
#extraConversionsToShow .val.wide {flex-basis: 100%;}
#extraConversionsToShow .val:not(.costs):not(.lotCard) .v {font-size: clamp(18px, 21cqw, 48px);}
.ui .val.costs {opacity: 0.8;}
.ui .val.costs .v {font-size: var(--f4);}
.ui .val .goal b {font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text);}
.ui .val .goal b.gOver {color: var(--wOver);}
.ui .pop {grid-column: 1 / -1;}
.ui .pop .popUnit {align-self: center; padding: 0 4px; white-space: nowrap;}
.ui .val.lotCard .kSel {width: 100%; text-align: right;}
.ui .val.lotCard .v {font-size: var(--f4);}
body.salesModeOn .ui .val.tap .gm {opacity: 0.8;} /* (the goal weighing well visible in the trade modes) */
body.salesModeOn .ui .val.tap.hasGoal .gm {opacity: 1;}
body.salesModeOn .ui .val.price {background: var(--accentSoft); border-bottom: 3px solid var(--accent);} /* (the price of a trade mode: highlighted in the accent of the view, never a weighing colour) */
body.roastModeOn .ui .val.price {background: var(--roastSoft); border-bottom-color: var(--roast);}
/* a booking that is no sale (harvest, drying, destruction ...: sales_trades.js): no price card, in the club no THC / CBD cards */
body.salesModeOn.tradeRecordOn .ui .val.price, body.cclubModeOn.tradeRecordOn .ui .val.metric {display: none;}
body.dispModeOn .ui .val.price {background: var(--dispPriceSoft); border-bottom-color: var(--dispPrice);}
/* the sums of the log below the cards (mode_weighting.js): Weighed 2x · Total | ∅ - a tap opens the log */
div.sumsLine {margin: 12px 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); cursor: pointer;}
/* the key row of the scale pages (#tareRow, 00_upscale.js): ⚞ TARE ⚟ left | END THE PROGRAM / ∑ LOG IT right */
.ui.keyRow .btn.dontShowButton {display: none;}
@media (max-width: 899px) {.ui.keyRow.pageKeys .btn.tare {flex: 0 1 auto; min-width: 34%; white-space: nowrap;} .ui.keyRow.pageKeys .btn.main {flex: 1 1 auto;}}
.ui.keyRow.pageKeys .btn.zero {flex: 0 1 auto; white-space: nowrap;} /* (→0← ZERO next to TARE, some modes only: its own width) */
/* a phone row with the small keys (📋 ⋯ of a trade) and →0← ZERO: two lines - TARE | 📋 | ⋯ | ZERO, then the main key (BOOK NOW + its live line) the whole width */
@media (max-width: 479px) {.ui.keyRow.pageKeys:has(> .btn.ico:not(.dontShowButton)):has(> .btn.zero:not(.dontShowButton)) {flex-wrap: wrap; align-items: stretch; row-gap: var(--s2);} .ui.keyRow.pageKeys:has(> .btn.ico:not(.dontShowButton)):has(> .btn.zero:not(.dontShowButton)) > .btn.tare, .ui.keyRow.pageKeys:has(> .btn.ico:not(.dontShowButton)):has(> .btn.zero:not(.dontShowButton)) > .btn.zero {flex: 1 1 0; min-width: 0;} .ui.keyRow.pageKeys:has(> .btn.ico:not(.dontShowButton)):has(> .btn.zero:not(.dontShowButton)) > .btn.main {flex: 1 1 100%;}}
/* no data on a program page (link_watch.js, body.linkWatchDead; checkModeDiv = also the running recipe, factoryModeProgramDiv = running factory program, coffeeDiv = coffee timer + weighing): the live values of its panel are old - covered with – – –, the buttons below still work */
body.linkWatchDead #densityDiv, body.linkWatchDead #solutionDiv, body.linkWatchDead #checkModeDiv, body.linkWatchDead #checkerDiv, body.linkWatchDead #coffeeDiv, body.linkWatchDead #pouroverDiv, body.linkWatchDead #factoryModeProgramDiv {position: relative;}
body.linkWatchDead #densityDiv > *, body.linkWatchDead #solutionDiv > *, body.linkWatchDead #checkModeDiv > *, body.linkWatchDead #checkerDiv > *, body.linkWatchDead #coffeeDiv > *, body.linkWatchDead #pouroverDiv > *, body.linkWatchDead #factoryModeProgramDiv > * {filter: blur(3px);}
body.linkWatchDead #densityDiv::after, body.linkWatchDead #solutionDiv::after, body.linkWatchDead #checkModeDiv::after, body.linkWatchDead #checkerDiv::after, body.linkWatchDead #coffeeDiv::after, body.linkWatchDead #pouroverDiv::after, body.linkWatchDead #factoryModeProgramDiv::after {content: '– – –'; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: center; box-sizing: border-box; padding-top: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); opacity: 0.94; color: var(--muted); font: 600 var(--f7)/1.05 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; pointer-events: none;} /* (like the empty weight display: – – – mono, muted, on the card colour) */
.dontShowTopScale {display: none;}
.buttonsDiv {text-align: center; font-size: 1.5em; margin: 0.2em 0 0.em 0; padding: 0 0 0 0; display: block;}
.showInlineBlock {display: inline-block; width: 100%; text-align: center;}
.dontShowDiv {display: none;}
div#unitSectionVirtualWeight {display: none;} /* (its bar is shown in the window of the weight: weight_colors_info()) */
.multiscaleReferenceBox {margin: 1em auto; padding: 0.6em 0.8em; max-width: 40em; border: 1px solid var(--line); border-radius: 0.4em;}
.multiscaleReferenceBox button {margin: 0.3em;}
.highlightedButton {background-color: var(--sunk); color: var(--text); border: outset var(--edge);}
.clickMeNowButton {border-color: var(--fillOk); background-color: var(--fillOk); color: var(--onFill);}
.dontClickMeNowButton {border-color: var(--line); background-color: transparent; color: var(--muted);}
.dontShowButton, button.dontShowButton {display: none;}
.bigButton {font-size: 1.5em;}
.hunndertButton {width: 100%; text-align: center;}
.centeredDiv {text-align: center;}
.topCloseDiv {margin-top: 0; padding: 0 0 0 0;}
.margeBottom {margin-top: 2em;}
div #losProgramDiv {padding: 0 0 0 0; margin: 0 0 0 0;}
.centeredTd {text-align: center;}
.dontShowMessage {background-color: var(--warnBg); display: none;}
.debugThis {display: none;}
.disCenter {text-align: center; width: 100%;}
.iBlock{display: inline-block;}


textarea {font-family: monospace; white-space: pre; width: 100%; border: 0; padding: 5px; min-height: 500px;}
.extrasText {max-width: 4em; display: inline; font-size: 1em; text-align: center; height: 1.05em; margin: -1em 0 0 0;}
.dontShowExtraText {display: none;}
.extraOptionButtonsDiv {justify-content: space-between;}
/* INFO | SETTINGS | TEST and 📝 LOG | 📊 STATISTICS | 🗂 RECORDS: one line, the full width, equal width and height (line-height: emoji fonts are higher) */
.scaleThreeRow {display: flex; width: calc(98% + 3px); margin-left: auto; margin-right: auto; gap: 3px; align-items: stretch;} /* as wide as the rows of two buttons (49% + 3px + 49%) */
.scaleThreeRow button.scaleThreeButton {flex: 1 1 0; min-width: 0; margin: 0; padding: 0.3em 0.2em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: min(0.95em, 3.1vw);}
.scaleThreeRow button.scaleThreeButton.dontShowDiv {display: none;}
.scaleThreeRow button.logRowEmpty {opacity: 0.45;}
.scaleThreeRow button.logRowFilled {background-color: var(--fillBad); border-color: var(--fillBad); color: var(--onFill); font-weight: bold;}
.extraOptionButtonsDiv button.connectionButtons {background-color: transparent; border: 1px solid var(--line); opacity: 0.66;}
.extraOptionButtons {filter: opacity(0.33);}
.extrOptionsTableDiv {width: 100%; text-align: center;}
.extrOptionsTable {width: 100%; margin: 0 0 0 0; padding: 0 0 0 0;}
.extrOptionsTable tr:last-child {display: block; padding-bottom: 1em;}
th.buttonHere {width: 58%; text-align: left; font-size: 0.75em;}
td.valueInput {width: 22%; margin: 0 0 0 0; text-align: right; filter: opacity(0.5); white-space: nowrap;}
td.unitInput {width: 10%; filter: opacity(0.5); white-space: nowrap; text-align: left; font-size: 0.75em; padding-left: 5px;}
td.buttonDel {width: 10%; margin: 0 0 0 0; text-align: right; white-space: nowrap; filter: opacity(0.5); font-size: 0.75em; vertical-align: middle; margin-top: 0; padding-top: 0;}
td.buttonDel button {margin-left: 3px;}
.conversionsPreselection {list-style: none; margin: 0 0 0 0; padding: 0 0 0 0; width: 100%;}
.conversionsPreselection li {text-align: center; width: 100%;}
.conversionsPreselection li button {width: 100%; display: ruby-base-container;}
span.spanLeftFloat {float: left; display: inline; padding-left: 5px; mix-blend-mode: luminosity;}
span.spanRightFloat {float: right; display: inline; padding-right: 5px; text-shadow: inherit !important; mix-blend-mode: luminosity;}
 .blackInput ::placeholder {color: transparent; text-shadow: 0 0 0 var(--text); opacity: 1 !important;}
.dontShowInput {display: none;}
.isHr {color: var(--surface);  border: 5px solid  var(--surface); border-left: 0; border-right: 0; padding: 0 0 0 0; margin: 0.25em 0 0 0;}
.divideContainer {background-color: var(--sunk); padding-top: 0.2em; padding-bottom: 0.2em; padding-left: 5px; padding-right: 5px; margin-top: 0.4em; margin-bottom: 0.4em; border-radius: 0.25em;}
.divideContainer p {font-weight: bold; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0;}
.smallContainer p {text-align: left;}
.smallContainer p span.isAnInfoButton {margin-right: 1em;}
.smallContainer p span.isDaName {color: var(--muted); font-size: smaller;}
.smallContainer input {width: 5em; margin-right: 3px;}

.smallUnit {font-size: smaller; filter: opacity(0.5);}
.searchResultUl {list-style: none; margin: 0 0 0 0; padding: 0 0 0 0; width: 100%;}
.nutritionSelectionPreSelectionDivClass {width: 100%; text-align: center;}
.searchResultUl li {text-align: left; width: 100%; margin-top: 0.1em; margin-bottom: 0.1em; width: 100%; padding: 0.2em 0 0.2em 0.2em; font-weight: bold; background-color: var(--sunk); color: var(--text); max-width: 100%;}
.searchResultUl li:nth-child(2n) {background-color: var(--surface); color: var(--text);}
.searchResultUl li span {width: 99%; cursor: pointer;}
.highlight {color: var(--danger); background-color: var(--surface); border-radius: 0.25em; padding: 0 0.1em 0 0.1em;}
.biggah {font-size: larger;}
input.nutritionSearch {margin: 0.1em 0 0.5em 0; padding: 0.25em 0 0.25em 0; max-width: 90%; width: 90%; text-align: center; font-size: 1.25em; border-radius: 0.25em;}
.nutritionOptionsTable {width: 100%;}
.nutritionOptionsTable tr th {text-align: right; white-space: nowrap;}
.nutritionOptionsTable tr td {white-space: nowrap; text-align: left;}
.searchH3s {margin-bottom: 0;}
.nutriInpTable {width: 100%;}
.nutriInpTable th {width: 50%; text-align: right;}
.nutriInpTable td {text-align: left;}
.nutriInpTable th input {font-weight: bold;}
input.inputTight {width: 90%; margin-top: 0;}
.centerDiv {text-align: center;}
.isBigText h2 {margin-bottom: 0.5em; margin-top: 0.5em; text-decoration: underline;}
.isBigText p {text-align: justify;}
table.basicFullWidthTable {width: 100%; display: inline-block;}
table.basicFullWidthTable tr th {white-space: nowrap; padding-right: 0.25em; text-align: left;}
table.basicFullWidthTable tr td {width: 100%;}
table.basicFullWidthTable tr td input, table.basicFullWidthTable tr td select, table.basicFullWidthTable tr td button {width: 100%; text-align: center;}
.log-buttons button {margin-left: 5px;}
.sMaller {font-size: 0.7em; margin-bottom: 0.5em;}
.isPointer {cursor: pointer;}
p.autoBottomP {font-size: smaller; border: 1px dotted var(--line); border-top: 0; padding: 0.3em 0.25em 0.25em 0.25em; border-radius: 0 0 0.5em 0.5em; margin-top: -0.2em;}
p.smallBottomP {font-size: smaller; padding: 0.3em 0.25em 0.25em 0.25em; border-radius: 0 0 0.5em 0.5em; margin-top: -0.2em; text-align: left;}
p.smallTopZero {font-size: smaller; margin-top: 0;}
input.oneLineInput {display: block; width: 90%; border-color: var(--edge); font-size: 1.2em; text-align: center; margin-bottom: 0.25em; margin-left: 4%;}
button, select {cursor: pointer; }
span.isAnInfoButton {cursor: help; display: inline; text-shadow: inherit !important; mix-blend-mode: luminosity;}
/* 📝 THE LOG PAGE (mode_logging.js log_page_render): a page of its own below the head (its title and ✕ are in the head), over the page of
   the scale (z 6: above the weight panel, below the windows and the docked menu), scrolls by itself; room below for the message stack and
   its own key row #logKeys (the key row of the scale pages goes meanwhile). One column, at most 720 px. */
div.ui.logPage {position: fixed; z-index: 6; top: var(--headH); left: 0; right: 0; bottom: 0; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; padding: 12px 12px calc(var(--msgStackH, 0px) + var(--keyRowH, 0px) + var(--weightBoxH, 0px) + 16px) 12px; background: var(--bg);}
body.appMenuWide div.ui.logPage {left: var(--menuW);}
body.logPageOn #labelBar {display: none !important;}
.ui.logPage .logPageBody {display: grid; gap: var(--s3); max-width: 720px; margin: 0 auto;}
.ui.logPage .logTools .logSelectSlot {flex: 1; min-width: 0; display: flex;}
.ui.logPage .logTools .logOne {font: 600 var(--f2) var(--mono); font-variant-numeric: tabular-nums; color: var(--muted);}
.ui.logPage .logRows {max-height: 60vh; overflow-y: auto; overscroll-behavior: contain;}
.ui.logPage .logRow.isWait .n, .ui.logPage .logRow.isWait .lx {color: var(--muted); font-style: italic;}
.ui.logPage .logRow.isNew {box-shadow: inset 4px 0 0 var(--mark); background: var(--mainSoft);}
.ui.logPage .logRow.sum .n .lx {display: flex; padding-top: 2px; font-weight: 400;}
.ui.logPage .cardHead .grow {flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere;}
.ui.logPage .cardHead .logRunTime {font: var(--f1) var(--mono); letter-spacing: 0; color: var(--muted);}
.ui.logPage .kv > span {min-width: 0; overflow-wrap: anywhere;}
.ui.logPage .kv > span.kvSub {padding-left: 1em; color: var(--muted);}
.ui.logPage .kv3 > span {min-width: 0; overflow-wrap: anywhere;}
.ui.logPage .cardBody p {margin: 0; font-size: var(--f2);}
.ui.logPage .logEmpty .cardBody {color: var(--muted); font-size: var(--f2);}
.ui.logPage .logPortionInput {flex: 0 0 6em;}
.ui.logPage .inp[aria-invalid="true"], .ui .inp[aria-invalid="true"] {border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger);}
.ui.logPage .logPortionResult {display: grid; gap: var(--s2);}
.ui.logPage .logPortionResult:empty {display: none;}
.ui.logPage .logWith .cardActs {justify-content: flex-start;}
#logKeys.ui.keyRow .btn.ico {flex: 0 0 var(--key); width: var(--key); min-width: var(--key); font-size: var(--f4);}
.ui.logPage .logWith .cardBody {gap: var(--s2);}
/* the ℹ️ behind the title of the log page in the head */
header.appHead .ttlMain .i.headInfo {width: 18px; height: 18px; margin-left: 6px; vertical-align: 2px; font-size: var(--f0); color: var(--headMuted); border-color: var(--headMuted);}
/* 📊 THE STATISTICS PAGE (statistics.js stats_render, statistics_us.js): below the head (its title and ✕ are in the head), over the page of the
   scale and the 📝 log page - the tabs at the top, the cards scroll below them; its key row #statsKeys stands for the other key rows */
div.ui.statsPage {position: fixed; z-index: 7; top: var(--headH); left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; background: var(--bg);}
body.appMenuWide div.ui.statsPage {left: var(--menuW);}
body.statsPageOn > .ui.keyRow:not(#statsKeys):not(#recordsKeys) {display: none !important;}
body.statsPageOn #labelBar {display: none !important;}
.ui.statsPage .statsBody {flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 12px calc(var(--msgStackH, 0px) + var(--keyRowH, 0px) + var(--weightBoxH, 0px) + 16px) 12px;}
.ui.statsPage .statsInner {display: grid; gap: var(--s3); max-width: 720px; margin: 0 auto;}
.ui.statsPage p {margin: 0; font-size: var(--f2);}
.ui.statsPage .hint.bad {color: var(--danger); font-weight: 600;}
.ui.statsPage .note.warn {color: var(--warnText); background: var(--warnBg);}
.ui.statsPage .statsLive {flex: none; width: 10px; height: 10px; border-radius: 50%; background: #35c759; box-shadow: 0 0 0 3px rgba(53, 199, 89, 0.25);}
.ui.statsPage .cardHead .statsCardTitle {min-width: 0; overflow-wrap: anywhere;}
.ui.statsPage .cardHead .statsEnd, .ui.statsPage .cardHead .statsTareLive {margin-left: auto;}
.ui.statsPage .cardHead .chip {min-height: 0; padding: 0 8px; font-size: var(--f0); letter-spacing: 0.06em;}
.ui.statsPage .kv > span {min-width: 0; overflow-wrap: anywhere;}
.ui.statsPage .kv > span .i, .ui.statsPage .lab .i, .ui.statsPage .chk .i {margin-left: 6px; vertical-align: middle;}
.ui.statsPage .kv b {white-space: normal; overflow-wrap: anywhere;}
/* a result in the weighing colours (green PERFECT / pass, yellow OK range, orange below T1, red outside / fail): the value or its ✓ / ✗ */
.ui .res {display: inline-block; padding: 0 6px; border-radius: var(--rPill); font-weight: 700; white-space: nowrap;}
.ui .kv b .res:not(:first-child) {margin-left: 6px;}
.ui .res.wPerfect {color: var(--onW); background: var(--wPerfect);}
.ui .res.wOk {color: var(--onW); background: var(--wOk);}
.ui .res.wUnder {color: var(--onW); background: var(--wUnder);}
.ui .res.wOver {color: var(--onWOver); background: var(--wOver);}
.ui .verdict.bad {color: var(--wOver); border-color: var(--wOver);}
.ui .verdict.wait {color: var(--text); border-color: var(--wUnder);}
.ui.statsPage .lab {flex-wrap: wrap;}
.ui.statsPage .join .statsUnit, .ui.statsPage .statsTareRow .statsUnit {flex: none; align-self: center; font-size: var(--f2); color: var(--muted);}
.ui.statsPage textarea.inp {min-height: calc(3 * 1.35em + 14px); font-family: inherit; resize: vertical;}
.ui.statsPage .chk {align-items: flex-start; min-height: 0; padding: 4px 0;}
.ui.statsPage .chk input {flex: none; margin: 1px 0 0 0;}
.ui.statsPage .chk .statsChkText {min-width: 0;}
.ui.statsPage .chk.isLocked .lock {margin-left: auto;}
.ui.statsPage .statsPair {display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2);}
.ui.statsPage .statsNoteKey {display: flex; align-items: center; gap: var(--s2);}
.ui.statsPage .statsNoteKey .grow {flex: 1; min-width: 0;}
.ui.statsPage svg.statsChart {margin: 0;}
.ui.statsPage .statsExport .sel {flex: 1 1 auto;}
.ui.statsPage .statsExport .btn {flex: none;}
/* lists: the head row, the numbers right-aligned; the empty page: the way to the tracking mode as a row */
.ui.statsPage .row .statsNum {flex: none; font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui.statsPage .row.statsListHead {min-height: 0; padding-top: 6px; padding-bottom: 6px; font-size: var(--f0); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--sunk);}
.ui.statsPage .row.statsListHead .grow {font-weight: 700;}
.ui.statsPage button.row.statsRowKey {width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 0;}
.ui.statsPage button.row.statsRowKey.isLocked {cursor: help;}
.ui.statsPage .statsChev {flex: none; color: var(--muted);}
/* the lines of a combination weighing: weighing | reading | fit | residual */
.ui.statsPage .statsKv4 {display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 4px 12px; font-size: var(--f2);}
.ui.statsPage .statsKv4 > span {min-width: 0; overflow-wrap: anywhere;}
.ui.statsPage .statsKv4 b {font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui.statsPage .statsKv4 .hd {font-size: var(--f0); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: right;}
.ui.statsPage .statsKv4 .hd:first-child {text-align: left;}
.ui.statsPage .statsFold {background: var(--surface);}
/* the tare sample (US): a card in the LOT CHECK - the weight on the scale in its head, a row per pack: name | field | unit | ⚖ TAKE */
.ui.statsPage .card.statsTare {background: var(--sunk); border-color: var(--line);}
.ui.statsPage .statsTareLive {font: 600 var(--f2) var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; text-transform: none; white-space: nowrap;}
.ui.statsPage .statsTareRows {display: grid; gap: var(--s2);}
.ui.statsPage .statsTareRow {display: grid; grid-template-columns: minmax(0, 1fr) minmax(4.5em, 7em) auto auto; align-items: center; gap: var(--s2); font-size: var(--f2);}
.ui.statsPage .statsTareDone {font-weight: 700;}
#statsKeys.ui.keyRow .btn {flex-wrap: wrap;}
/* 🍲 the batch processing window (nutrition_cooking.js, busy_form): cards 1-4, a list of ticks with the weights right-aligned */
div.cookBatch div.busyBox {max-width: 36em;}
div.cookBatch .row {cursor: pointer;}
div.cookBatch .row input[type="checkbox"] {flex: none; width: 18px; height: 18px; margin: 0;}
div.cookBatch .row b.num {flex: none; font-family: var(--mono); font-variant-numeric: tabular-nums;}
div.cookBatch p {margin: 0; font-size: var(--f2);}
div.cookBatch p.cookFactor {font-weight: 700;}
div.cookBatch .cookTableWrap {overflow-x: auto;}
div.cookBatch .cardHead .i {margin-left: 2px;}

h2#extraTextH2 {margin-top: 0.5em;}

div.addWeightInputDiv {margin-top: 1em;}
div.addWeightInputDiv b {display: block; font-size: larger; margin-bottom: 0.2em;}



.blinkDat1s {animation: blinker 0.3s linear 3;}
.blinkRedOnce {animation: blinkRedOnce 1.2s ease-in-out 1;}
@keyframes blinkRedOnce {
  0%, 100% {background-color: transparent; box-shadow: none;}
  25%, 50% {background-color: #ff4d4d; color: white; box-shadow: 0 0 0.5em 0.25em #ff4d4d;}
}
@keyframes blinker {
  50% {
    opacity: 0;
  }
}

/* connect button: slowly turning scale while connecting */
.connectingSpinner {display: inline-block; animation: connectingSpinner 2s linear infinite;}
/* the weight while a new connection starts (link_watch.js): the line keeps the size of a weight (invisible number + unit),
   the small turning scale and the text lie on top of it */
@keyframes connectingSpinner {
  from {transform: rotate(0deg);}
  to {transform: rotate(360deg);}
}
@media (prefers-reduced-motion: reduce) {
  .connectingSpinner {animation: none;}
}

/* THE WINDOWS OF THE APP (busy_overlay.js): loading, message, alert / ℹ️, a step that waits (busy_ask), question (busy_confirm / busy_prompt).
   A clear shield at once (no clicks), the dim + the window after a moment; ✕ top right; keys in one row, the action right */
div.busyOverlay {position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 20000; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: var(--s4); background-color: transparent; cursor: progress;}
div.busyOverlay.busyShown {background-color: rgba(0, 0, 0, 0.45); transition: background-color 0.2s;}
div.busyBox {display: none; position: relative; box-sizing: border-box; width: 100%; max-width: 22em; padding: var(--s4); text-align: center; font-family: var(--font); font-size: var(--f3); line-height: 1.4; color: var(--text); background-color: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: var(--shadowWin);}
div.busyShown div.busyBox {display: block;}
div.busyBox[tabindex="-1"]:focus {outline: none;} /* (the window itself holds the focus for its Esc / Enter: no ring around it) */
div.busySpinner {font-size: var(--f6); line-height: 1.2; color: var(--muted);}
div.busyText {margin-top: var(--s2); font-size: var(--f3); white-space: pre-line;}
div.busyText:empty {display: none;}
div.busyText.busySlow {font-weight: 700; color: var(--warnText); background-color: var(--warnBg); padding: var(--s1) var(--s2); border-radius: var(--r1);}
div.busyBar {height: 6px; margin: var(--s3) 0 0 0; background-color: var(--sunk); border-radius: var(--rPill); overflow: hidden;}
div.busyBar i {display: block; height: 100%; width: 0; background-color: var(--main); transition: width 0.2s;}
div.busyCount {margin-top: var(--s1); font-size: var(--f1); color: var(--muted); font-variant-numeric: tabular-nums;}
button.busyClose {position: absolute; top: var(--s2); right: var(--s2); width: var(--hit); height: var(--hit); min-height: 0; margin: 0; padding: 0; font-size: var(--f3); line-height: 1; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 50%;}
button.busyClose:hover {background-color: var(--sunk);}
div.busyBox > button.busyClose + div.busyText {padding-right: calc(var(--hit) + var(--s1));} /* (a window without a title: its text starts beside the ✕, never under it) */
/* a message (busy_notice, closes by itself - the bar shows the time left), above a loading window */
div.busyOverlay.busyNoticeOverlay {z-index: 20001; background-color: rgba(0, 0, 0, 0.45); cursor: default;}
/* the title line (alert, step, question): left, bold, room for the ✕ */
div.busyAskTitle {margin: 0 calc(var(--hit) + var(--s1)) 0 0; font-size: var(--f4); font-weight: 700; line-height: 1.3;}
/* (window titles in capitals everywhere - the windows and the trade sheets; a unit keeps its spelling: helpers.js ui_unit_case) */
div.busyAskTitle, .ui .tradeSheetMain {text-transform: uppercase;}
/* the alert / ℹ️ texts (busy_alert) and the questions: wider, from the left, a long text scrolls inside (title, ✕ and keys stay) */
div.busyAlert div.busyBox, div.busyQuestion div.busyBox {display: flex; flex-direction: column; gap: var(--s3); max-width: 34em; max-height: 100%; text-align: left;}
div.busyAlert div.busySpinner, div.busyQuestion div.busySpinner {flex-shrink: 0; font-size: var(--f5); line-height: 1;}
div.busyAlert div.busyAskTitle, div.busyQuestion div.busyAskTitle {flex-shrink: 0;}
/* (an error window, busy_alert(…, {danger: true}): the title red - without a title the first paragraph) */
div.busyAlertDanger div.busyAskTitle, div.busyAlertDanger.busyNoTitle div.busyText > p:first-child {color: var(--danger); font-weight: 700;}
/* (the icon of a window with a title: in front of the title, grey) */
div.busyAskTitle div.busyTitleIcon {display: inline; margin-right: 0.35em; filter: grayscale(1);}
div.busyOverlay:not(.unitForm) div.busyAskTitle > button.i {margin-left: 0.4em; vertical-align: middle;} /* (the ℹ️ right behind the title, not touching it) */
div.busyAlert div.busyText, div.busyQuestion div.busyText {min-height: 0; margin: 0; overflow-y: auto; overscroll-behavior: contain; overflow-wrap: break-word; white-space: normal;}
div.busyAlert div.busyText:focus {outline: none;}
div.busyAlert div.busyText p, div.busyQuestion div.busyText p {margin: 0 0 0.7em 0;}
div.busyAlert div.busyText p:last-child, div.busyQuestion div.busyText p:last-child {margin-bottom: 0;}
div.busyAlert div.busyText a, div.busyQuestion div.busyText a {color: var(--text); text-decoration: underline;}
/* (a short alert without a title: the text stands where the title would - away from the ✕) */
div.busyAlert div.busyBox:not(.busyAlertLong) div.busyText:first-of-type {padding-right: calc(var(--hit) + var(--s1));}
/* the field of busy_prompt and its message */
input.busyField {width: 100%; flex-shrink: 0;}
div.busyFieldError {flex-shrink: 0; font-size: var(--f2); font-weight: 700; color: var(--danger);}
/* the keys of a window: one row at the bottom, right; the action (OK, main) is the last = right */
div.busyAskButtons {display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: stretch; gap: var(--s2); margin-top: var(--s3); flex-shrink: 0;}
div.busyAlert div.busyAskButtons, div.busyQuestion div.busyAskButtons {margin-top: 0;}
div.busyAsk div.busyAskButtons {justify-content: center;}
button.busyAskButton, button.busyOk {flex: 0 1 auto; min-height: var(--ctl); margin: 0; padding: 0 var(--s4); font-size: var(--f3); font-weight: 700; letter-spacing: 0.04em; color: var(--text); background-color: var(--surface); border: 1px solid var(--edge); border-radius: var(--r1); cursor: pointer;}
button.busyAskButton:hover, button.busyOk:hover {background-color: var(--sunk);}
button.busyOk, button.busyAskButton.busyKind_main {min-width: 6em; color: var(--onMain); background-color: var(--main); border-color: var(--main);}
button.busyOk:hover, button.busyAskButton.busyKind_main:hover {background-color: var(--main); filter: brightness(1.25);}
button.busyAskButton.busyKind_danger {color: var(--onDanger); background-color: var(--danger); border-color: var(--danger);}
button.busyAskButton.busyKind_danger:hover {background-color: var(--danger); filter: brightness(1.1);}
button.busyAskButton.busyKind_quiet {border-color: transparent; background-color: transparent; text-decoration: underline;}
/* a step of the scale that waits for the user (busy_ask, e.g. "empty the scale" after ∑): centred, the thing to do in bold */
div.busyAsk div.busyText {font-weight: 700;}
div.busyAskInfo {margin-top: var(--s2); font-size: var(--f2); color: var(--muted); line-height: 1.35;}
/* a window with fields (busy_form: the login, the password windows): the look of the question, below the messages, questions and the
   loading window; the fields scroll inside, title and keys stay */
div.busyOverlay.busyForm {z-index: 10000; background-color: rgba(0, 0, 0, 0.45); cursor: default;}
div.busyForm div.busyFormBody {display: grid; gap: var(--s3); min-height: 0; overflow-y: auto;}
div.busyForm div.busyBox > p.hint, div.busyForm div.busyBox > div.note {flex-shrink: 0; margin: 0;}
div.busyForm button.busyAskButton:disabled, div.busyQuestion button.busyAskButton:disabled {opacity: 0.45; cursor: default; filter: none;}
/* THE PAGE OF A CLOSED SCALE (users.js users_login_request, LP 254): the login card in the middle, LOG IN at the right end of the key row */
div.closedPage {max-width: 26em; margin: var(--s4) auto; text-align: left;}
div.closedPage p.hint {margin: 0;}
.ui.keyRow .keyGap {flex: 1 1 0;}
.ui.keyRow .btn:disabled {opacity: 0.45; cursor: default;}
/* who is logged in (the users card of the settings, users_box) */
div.usersMe {display: grid; gap: var(--s2); margin: var(--s2) 0 var(--s3) 0;}
div.usersMe div.usersMeLine {display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;}
div.usersMe div.usersMeLine span.hint {margin-left: auto;}
/* only telling (a transfer of another device): the page below stays usable, the window sits at the bottom */


/* the parts of the 🛍 FILL WEIGHING (fill_weighing.js) that came from the solution mode: the tools line, the totals table, the pulsing key */
.solutionTools {display: flex; flex-wrap: wrap; gap: 0.4em; justify-content: center; margin: 0.5em 0;}
button.solutionReady {background: var(--fillOk); color: var(--onFill); animation: solutionReadyPulse 1s ease-in-out infinite;}
@keyframes solutionReadyPulse {50% {box-shadow: 0 0 0.9em 0.2em rgba(30, 132, 73, 0.9); transform: scale(1.04);}}
.solutionTotals {border: 1px solid rgba(128, 128, 128, 0.35); border-radius: 8px; padding: 0.3em 0.5em; margin: 0.5em 0; text-align: left;}
.solutionTotals h4 {margin: 0.2em 0;}
.solutionTotalsTable {width: 100%; border-collapse: collapse; font-size: 0.9em;}
.solutionTotalsTable th, .solutionTotalsTable td {padding: 0.15em 0.3em; text-align: right; border-bottom: 1px solid rgba(128, 128, 128, 0.2);}
.solutionTotalsTable th:first-child, .solutionTotalsTable td:first-child {text-align: left;}
.solutionTotalsTable td.solutionOkText {color: var(--ok);}
.solutionTotalsTable td.solutionBadText {color: var(--danger);}
p.solutionHint {font-size: smaller; color: darkorange; text-align: center;}
/* the check box of the 🛍 FILL WEIGHING (fill_weighing.js fill_box - also in the steps of the ⚕ COMPOUNDING ASSISTANT, its look there: LAB MODES) */
button.compPrimary {font-weight: bold; font-size: 1.15em; min-height: 2.2em;}
.compBig {text-align: center; margin: 0.5em 0;}
p.compBigNow {margin: 0.2em 0; font-size: 2.4em; font-weight: bold;}
/* the check box of a weigh / fill step (like the check-weighing modes): yellow under, green on the goal, red over; pale while the weight moves */
div.compCheck {border-radius: 8px; padding: 0.4em 0.6em 0.5em 0.6em; transition: background-color 0.2s;}
div.compCheck.compUnder {background-color: var(--weighUnder); color: var(--onW);}
div.compCheck.compOk {background-color: var(--weighPerfect); color: var(--onW);}
div.compCheck.compOver {background-color: var(--weighOver); color: var(--onWOver);}
div.compCheck.compLow {background-color: var(--weighOk); color: var(--onW);}
/* (pale but readable: at 0.75 the big bold weight keeps more than 3:1 on yellow, green and red) */
div.compCheck.compMoving p.compBigNow {opacity: 0.75;}
div.compCheck p.compBigNow {margin: 0.1em 0;}
/* AUTO TARE settles (1.5 s still): the bar pulses, the line below says so */
div.compCheck.compSettling div.compBar {animation: compSettle 0.6s ease-in-out infinite alternate;}
/* (the settle line keeps its place - hidden while nothing settles: the box never changes its height) */
div.compCheck::after {content: attr(data-settle); display: block; margin-top: 0.3em; font-weight: bold; visibility: hidden;}
div.compCheck.compSettling::after {visibility: visible;}
@keyframes compSettle {from {opacity: 1;} to {opacity: 0.35;}}
p.compPct {margin: 0 0 0.2em 0; font-size: 1.2em; font-weight: bold;}
/* the bar of the goal: a light track with the edge of the text colour, filled in the weighing colour of the box (follows its state) */
div.compBar {height: 12px; margin: 0 auto; max-width: 30em; overflow: hidden; background: var(--surface); border: 1px solid currentColor; border-radius: 3px;}
div.compBar span.compBarIn {display: block; height: 100%; width: 0; transition: width 0.2s;}
div.compCheck.compUnder span.compBarIn {background-color: var(--weighUnder);}
div.compCheck.compLow span.compBarIn {background-color: var(--weighOk);}
div.compCheck.compOk span.compBarIn {background-color: var(--weighPerfect);}
div.compCheck.compOver span.compBarIn {background-color: var(--weighOver);}
p.compLight {margin: 0.3em 0 0 0; font-size: 1.15em; font-weight: bold;}
div.compAutoTareLine {text-align: center; margin: 0.3em 0;}
label.compAutoTare {display: inline-block; font-weight: bold; cursor: pointer; vertical-align: middle;}
button.compInfoButton {font-size: 0.8em; padding: 0.05em 0.35em; margin-left: 0.4em; vertical-align: middle; line-height: 1.2;}
p.compAutoTareHint {margin: 0.1em 0 0.4em 0; text-align: center; min-height: 1.3em;}
div.compStats {margin: 0.5em 0;}
p.compVerdict {font-weight: bold; padding: 0.35em 0.6em; border-radius: 6px; color: var(--onFill);}
p.compVerdictOk {background-color: var(--fillOk);}
p.compVerdictBad {background-color: var(--fillBad);}
div.compStats details summary {cursor: pointer; margin: 0.3em 0;}
div.thingIdentBox {margin-top: 0.8em; padding-top: 0.4em; border-top: 1px solid rgba(128, 128, 128, 0.4);}
p.thingIdentItem {margin: 0.1em 0; overflow-wrap: anywhere;}
div.thingIdentLine {margin: 0.2em 0;}
div.thingIdentLine input {width: 14em; max-width: 70%;}
/* 🧾 a lot past its use-by date (lots.js) */
.lotExpired {color: var(--danger) !important; font-weight: bold;}
span.recipeLotExpiry {font-size: smaller; white-space: nowrap;}

.smallah {font-size: smaller;}
.mehdium {font-size: medium;}
.smallah75 {font-size: 0.75em;}
.largeah {font-size: larger;}
.underLn {text-decoration: underline;}
.marge0Top {margin-top: 0;}
.margeOneTop {margin-top: 1em;}
.margeOneBot {margin-bottom: 1em;}
.marge025Bot {margin-bottom: 0.25em !important;}
.fett1 {font-weight: bold;}
.isLeft{text-align: left;}
.isCenter{text-align: center;}
.isJusti{text-align: justify;}
.noWrap{white-space: nowrap}
.width4em{width: 4em; margin-left: 0.1em;}

div.labelDialogOverlay {position: fixed; top: 0.5em; right: 0.5em; bottom: 0.5em; left: 0.5em; z-index: 10; padding: 1em; border-radius: 0.5em; border: 1px solid var(--line); background-color: var(--surface); text-align: center; overflow: auto;}
/* the overlays of the tool pages (diaryOverlay, diaryCard, diaryField ...: the pages not rebuilt yet - the 📒 diary has its own block
   "THE NUTRITION DIARY"; mobile first: full screen on small screens, cards and grids, no wide tables) */
div.diaryOverlay {text-align: left; padding: 0 1em 1em 1em;}
div.diaryOverlay > div {max-width: 36em; margin-left: auto; margin-right: auto;}
div.diaryOverlay h3 {font-size: 1em; margin: 0 0 0.4em 0;}
div.diaryOverlay input, div.diaryOverlay select, div.diaryOverlay button {font-size: 1em; box-sizing: border-box;}
div.diaryHead {position: sticky; top: 0; z-index: 2; background-color: var(--surface); padding: 0.6em 0 0.5em 0; margin-bottom: 0.7em; border-bottom: 1px solid var(--line);}
/* the head of a page of its own (page_head, helpers.js): the overlay head on the page - title left, ✕ right */
div.pageHead {text-align: left; margin-left: 0.3em; margin-right: 0.3em;}
div.pageHead div.diaryTitleRow h2, .isBigText div.pageHead div.diaryTitleRow h2 {margin: 0; text-decoration: none; text-align: left;}
div.diaryTitleRow {display: flex; align-items: center; justify-content: space-between; gap: 0.5em;}
div.diaryTitleRow h2 {font-size: 1.25em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
button.diaryClose {flex: 0 0 auto; width: 2.2em; height: 2.2em; padding: 0; border-radius: 50%; border: 1px solid var(--line); background-color: var(--sunk); font-weight: bold;}
div.diaryChips {display: flex; gap: 0.35em; overflow-x: auto; padding: 0.5em 0 0.1em 0; scrollbar-width: none;}
div.diaryChips::-webkit-scrollbar {display: none;}
button.diaryChip {flex: 0 0 auto; white-space: nowrap; border-radius: 1em; padding: 0.3em 0.8em; border: 1px solid var(--line); background-color: var(--sunk);}
button.diaryChip.diaryActive {background-color: var(--fillOk); border-color: var(--fillOk); color: var(--onFill); font-weight: bold;}
div.diaryTabs {display: flex; gap: 0.3em; margin-top: 0.45em;}
button.diaryTab {flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0.45em 0.2em; border: 1px solid var(--line); background-color: var(--sunk); font-size: 0.85em !important;}
button.diaryTab.diaryActive {background-color: var(--main); border-color: var(--main); color: var(--onMain); font-weight: bold;}
/* cards (other pages: the old look) */
div.diaryCard {border: 1px solid var(--line); border-radius: 0.6em; padding: 0.7em; margin-bottom: 0.8em; background-color: var(--surface);}
.diaryMuted {color: var(--muted); font-size: 0.85em;}
p.diaryMuted {margin: 0 0 0.7em 0;}
div.diaryEntryName {font-weight: bold; overflow-wrap: anywhere;}
div.diaryEntryInfo {font-size: 0.8em; color: var(--muted); margin-top: 0.1em;}
/* forms */
button.diaryWide {display: block; width: 100%; padding: 0.55em;}
input.diaryWideInput {width: 100%; margin: 0.2em 0 0.5em 0;}
ul.diaryResults {max-height: 14em; overflow: auto; margin: 0 0 0.5em 0; padding-left: 1.2em;}
ul.diaryResults li {padding: 0.2em 0;}
div.diaryFields {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5em 0.7em; align-items: end;}
div.diaryFields + div.diaryFields {margin-top: 0.8em;}
label.diaryField {display: block; min-width: 0;}
label.diaryField > span {display: block; font-size: 0.8em; color: var(--muted); margin-bottom: 0.15em; overflow-wrap: anywhere;}
label.diaryField input, label.diaryField select {width: 100%;}
.diaryFieldWide {grid-column: 1 / -1;}
table.statsTable {border-collapse: collapse; margin: 0.5em 0; width: 100%;}
table.statsTable th, table.statsTable td {padding: 0.25em 0.5em; border-bottom: 1px solid var(--line); text-align: left; font-variant-numeric: tabular-nums;}
table.statsTable td {text-align: right;}
.statsGreen td {color: var(--ok);}
.statsOrange td {color: darkorange;}
.statsRed td {color: var(--danger);}
span.statsBigE {font-size: 1.5em; line-height: 0; vertical-align: -0.1em;}
svg.statsChart {width: 100%; height: auto; display: block; margin: 0.3em 0 0.8em 0; background-color: var(--surface);}
div.diaryButtonRow {display: flex; flex-wrap: wrap; gap: 0.4em; justify-content: center; margin-top: 0.7em;}
button.diaryAddInactive {opacity: 0.45;}
button.diaryPrimary {background-color: var(--fillOk); border-color: var(--fillOk); color: var(--onFill); font-weight: bold; padding: 0.55em 1.2em;}
body.tradeSheetOpen {overflow: hidden;}
div.salesPwOverlay {position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 10000; background-color: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; padding: 0.7em; box-sizing: border-box;}
div.salesPwBox {background-color: var(--surface); border-radius: 0.8em; padding: 0.9em; width: 100%; max-width: 24em; max-height: 100%; overflow-y: auto; box-sizing: border-box; text-align: left;}
div.salesPwBox h3 {margin: 0 0 0.6em 0;}
div.salesPwBox label.diaryField {margin-bottom: 0.6em;}
div.salesActions {display: flex; flex-wrap: wrap; gap: 0.4em; justify-content: center; margin-top: 0.8em;}
div.salesActions button {flex: 1 1 auto;}
button.salesDanger {color: var(--danger); margin-top: 0.4em;}
button.diaryDanger {color: var(--danger); border-color: var(--danger); background-color: var(--surface);}
/* tick rows and the done line (scale_backup.js) */
label.diaryCheckRow {display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.6em; align-items: start; padding: 0.45em 0; border-bottom: 1px solid var(--line); cursor: pointer;}
label.diaryCheckRow input {margin: 0.2em 0 0 0; width: 1.2em; height: 1.2em;}
p.diaryAdded {font-size: 1.2em; font-weight: bold; color: var(--ok); text-align: center; margin: 1em 0;}
/* healthy cooking: recipe nutrition, batch cooking, TAKE-FROM mode */
div.cookCard {text-align: left; max-width: 36em; margin: 1em auto;}
p.cookWarn {color: var(--danger); font-size: 0.85em; margin: 0 0 0.6em 0;}
div.cookSearch {flex: 1 1 100%;}
div.cookCard h4 {margin: 1em 0 0.4em 0;}
div.cookCard input.cookSmallInput {width: 5em;}
/* the tools of the baker's dialogs (bakers_tools.js): the timer line; the batch report and allergens (recipe_tools.js) */
p.recipeTimerP {margin: 0.3em 0;}
p.recipeTimerP button {margin: 0.15em 0.2em; font-size: 0.9em;}
div.recipeReportPreview {background-color: #fff; color: #000; border: 1px solid #ddd; padding: 0.7em; margin-top: 0.8em; overflow-x: auto; font-size: 0.85em;}
div.recipeReportPreview h1 {font-size: 1.4em; margin: 0;}
div.recipeReportPreview h2 {font-size: 1.15em; margin: 0.2em 0 0.6em 0;}
div.recipeReportPreview table {border-collapse: collapse; margin-bottom: 0.8em;}
div.recipeReportPreview table.items {width: 100%;}
div.recipeReportPreview th, div.recipeReportPreview td {border: 1px solid #999; padding: 0.2em 0.35em; text-align: left; vertical-align: top;}
div.recipeReportPreview .num {text-align: right; white-space: nowrap;}
div.recipeReportPreview .ok {text-align: center;}
div.recipeReportPreview tr.sum td, div.recipeReportPreview tr.sum th {font-weight: bold;}
div.recipeReportPreview pre {white-space: pre-wrap; font-size: 0.85em;}
div.recipeReportPreview .notes {white-space: pre-wrap;}
div.recipeReportPreview .foot {font-size: 0.8em; color: #555;}
div.allergenTools {margin: 0.3em 0;}
div.allergenTools p {margin: 0.2em 0;}
/* phones: the whole screen */
@media (max-width: 600px) {
	div.diaryOverlay {top: 0; right: 0; bottom: 0; left: 0; border-radius: 0; border: 0; padding: 0 0.7em 0.8em 0.7em;}
	div.diaryTitleRow h2 {font-size: 1.05em;}
	div.pageHead div.diaryTitleRow h2 {font-size: 1.15em;} /* (the overlays have a slightly bigger base font: the same size) */
	button.diaryTab {font-size: 0.8em !important; padding: 0.45em 0.3em;}
}
/* 🛍️ SALES MODE (sales_mode.js): a sales display on the weighing page - the THING / NAME card, ∑ and the UNITS are hidden (THE WEIGHING PAGE, PART B) */
div.salesModePanel {margin: 0.4em 0 1em 0; text-align: center;}
/* the list of the THINGS (things.js): its box, the count and the state line */
div.thingsListBox {max-width: 40em; margin: 0 auto; text-align: left;}
p.thingsListCount {font-size: 0.8em; color: var(--muted); margin: 0.1em 0 0.3em 0; min-height: 1em;}
/* the rotating scale while the THINGS list / a THING comes from the scale (things_cache.js) */
p.thingsListStatus {font-size: 0.85em; margin: 0.2em 0 0 0;}
p.thingsListStatus:empty {display: none;}
.salesModeThingsStatus {font-size: 0.85em; margin-left: 0.4em; white-space: nowrap;}
.salesModeThingsStatus:empty {display: none;}
/* THE LABEL WINDOW (labels.js label_openDialog, busy_form #labelWindow): the label on a light card, its size line and ⚠ lines, the cards
   📋 LINES ON THE LABEL (one row per line), the caller's cards, 📐 SIZE & PRINTER (folded); keys ⇩ SAVE | ⎙ PRINT */
div.labelWindow div.busyBox {max-width: 40em;}
div.labelWindow div.busyFormBody {align-content: start;}
.ui .lblTop {display: grid; gap: 4px;}
.ui .lblPrev {display: flex; justify-content: center; align-items: center; padding: 10px; background: #fff; /* (paper: white in both schemes) */ border: 1px solid var(--line); border-radius: var(--r1);}
.ui .lblPrev.isEmpty {min-height: 64px;}
.ui .lblPrev canvas {display: block; max-width: 100%; max-height: 32vh; outline: 1px dashed var(--line); image-rendering: pixelated;}
.ui .lblInfo p.lblInfoLine {margin: 0; font-size: var(--f1); color: var(--muted);}
.ui .lblInfo p.lblInfoLine.warn {font-weight: 700; color: var(--text);}
.ui .lblInfo p.lblInfoLine.bad {font-weight: 700; color: var(--danger);}
.ui .lblCard .cardBody {gap: var(--s2);}
.ui .lblLines {display: grid;}
.ui .lblGroup {padding: 8px 0 2px 0; font-size: var(--f0); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);}
.ui .lblRow {display: grid; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line);}
.ui .lblLines > .lblRow:first-child, .ui .lblGroup + .lblRow {border-top: 0;}
.ui .lblLine {display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0;}
.ui .lblLine .lblMove {width: var(--ctlS); min-height: var(--ctlS); text-decoration: none;}
.ui .lblLine .lblRemove {width: var(--ctlS); min-height: var(--ctlS); margin-left: auto; text-decoration: none;}
.ui .lblLine .sel.lblIcons {width: auto; min-height: var(--ctlS); padding: 0 24px 0 8px; font-weight: 700; background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%;}
.ui .lblChk {flex: 1 1 10em; display: flex; align-items: center; gap: 8px; min-width: 0; min-height: var(--ctlS); font-size: var(--f2);}
.ui .lblChk input {flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--main);}
.ui .lblChk .lblText {flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere;}
.ui .lblChk .lblVal {flex: none; margin-left: auto; font: 600 var(--f2) var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui .lblChk .lock {margin-left: 0;}
.ui .lblRow.lblSmall .lblText {font-size: var(--f1);}
.ui .lblRow.lblFixed .lblText {font-size: var(--f2); color: var(--muted); padding-left: 26px;}
.ui .lblRow.isLocked .lblText, .ui .lblRow.isLocked .lblVal {color: var(--muted);}
/* (a part of a ticked line, e.g. a value of the NUTRI-TABLE: gray, it cannot be ticked) */
.ui .lblRow.labelRowLocked {opacity: 0.45;}
.ui .lblLine .sel.lblChoice {flex: 0 1 auto; width: auto; max-width: 100%; min-height: var(--ctlS); font-size: var(--f2);}
.ui span.labelColour {display: inline-flex; align-items: center; gap: 4px;}
.ui span.labelColour .sel.labelColourTwo {width: auto; min-height: var(--ctlS); font-size: var(--f2);}
.ui span.labelColour input.labelColourAny {width: 36px; height: var(--ctlS); padding: 0; border: 1px solid var(--line); border-radius: var(--r1); background: none; cursor: pointer;}
/* the settings of a line, below it (indented under the checkbox) */
.ui .lblRow > .lblSub {display: grid; gap: 6px; margin-left: 26px; min-width: 0;}
.ui .lblFields {display: grid; grid-template-columns: repeat(auto-fill, minmax(9em, 1fr)); gap: var(--s2);}
.ui .lblText2 {display: grid; gap: 6px;}
.ui .lblText2 textarea.inp, .ui textarea.inp {min-height: 4em; padding: 6px 10px; font-family: var(--font); white-space: pre-wrap; resize: vertical;}
.ui .lblPlaceholders {gap: 4px;}
.ui .lblPlaceholders .chip {min-height: 26px; padding: 0 8px; font-size: var(--f1); cursor: pointer;}
.ui .lblRecipePick {display: flex; gap: var(--s2);}
.ui .lblRecipePick .sel {flex: 1;}
.ui .allergenTools {display: grid; gap: 4px; justify-items: start;}
.ui .allergenTools p {margin: 0; font-size: var(--f1); color: var(--muted);}
.ui .lblKeys {display: flex; flex-wrap: wrap; gap: var(--s2);}
.ui .lblExtra {display: grid; gap: var(--s3); justify-items: stretch;}
.ui .lblExtra > .btn {justify-self: start;}
/* 📐 SIZE & PRINTER: the fields in a grid, ✂, the printer line (its state | 🖨 PRINTER ▸) */
.ui .lblSize {display: grid; grid-template-columns: repeat(auto-fill, minmax(9em, 1fr)); gap: var(--s2);}
.ui .lblSize .inp:disabled, .ui .lblSize .sel:disabled {color: var(--muted); background: var(--sunk); border-color: var(--line);}
.ui .printerSetupLine {display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--line);}
.ui .printerSetupLine .printerStatus {flex: 1 1 12em; min-width: 0; font-size: var(--f2); font-weight: 700;}
/* 🏷 the symbol slots of the weighing label (labels_weighing.js: the cannabis line, 🔣 SYMBOL WITH A BOX): the fields in a grid, the
   symbol / the text / the picture beside it in a framed part, the line about the symbol with ℹ️ */
.ui div.weighlabelSymbolBox {display: grid; gap: var(--s2); padding: var(--s2); background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r2);}
.ui div.weighlabelSymbolGrid {display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5em, 1fr)); gap: var(--s2);}
.ui div.weighlabelSymbolPart {display: grid; gap: 6px; padding: var(--s2); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--edge); border-radius: var(--r1);}
.ui div.weighlabelSymbolPart p.hint {margin: 0;}
.ui div.weighlabelSymbolButtons {display: flex; flex-wrap: wrap; gap: var(--s2);}
.ui p.weighlabelSymbolNote {margin: 0;}
.ui p.hint .i {margin-left: 4px; vertical-align: middle;}
.ui p.hint:empty {display: none;} /* (a hint that is filled later, e.g. the note of a manual weight: no gap while it is empty) */
.ui .lab .i {margin-left: 2px;}
.ui .chk .i {margin-left: 2px;}
/* THE WINDOW OF THE LABEL PRINTER (label_printers.js printer_build_setup, busy_form #printerWindow): the fields, ADVANCED folded, the state
   line above the keys TEST PRINT | CONNECT */
div.printerWindow div.busyBox {max-width: 34em;}
div.printerWindow div.busyAskButtons:empty {display: none;} /* (the print dialog of the browser: no keys) */
.ui .printerGrid {display: grid; grid-template-columns: repeat(auto-fill, minmax(9em, 1fr)); gap: var(--s2);}
.ui p.printerStatus {margin: 0; font-weight: 700;}
button.busyAskButton.isLocked {display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); background-color: var(--sunk); border-color: var(--line);}
/* COUNTING AND CHECK WEIGHING (mode_counting.js cc_*, mode_check.js): every step one column of cards (div.ui.ccPage) under the head or the
   weight - the step card with a small line before it (.ccPre), what to do now in bold (.ccDo, ℹ️ behind it), the field with its unit and
   its check line (.ccErr, red edge .isBad); the action is the main key at the right end of the key row (#stepMainButton, gray .isOff: a
   tap says why). The setup of the check weighing: choices as chips, the range rows 'From [ ] % less to [ ] % more'. The run: the result
   box in the weighing colours (under orange, OK yellow, PERFECT green, over red - only here, never on keys), 🔊 / 🔇 in its corner, the
   bar (from 90 % the fine view: the last 10 % fill the bar, the mark at its left says so), the line what to do, THIS RUN, 📊 */
.ui.ccPage {display: grid; gap: var(--s3); width: 100%; max-width: 720px; margin: 0 auto; padding: var(--s3); box-sizing: border-box;} /* (padding, no margin: a top margin would collapse into the room under the head) */
.ui.ccPage.dontShowDiv {display: none;}
.ui.ccPage p {margin: 0;}
.ui.ccPage .ccPre {font-size: var(--f2); color: var(--muted);}
.ui.ccPage .ccDo {font-size: var(--f4); font-weight: 700; line-height: 1.35;}
.ui.ccPage .ccDo .i {margin-left: 4px; vertical-align: middle;}
.ui.ccPage .ccCenter {text-align: center;}
.ui.ccPage .ccDo:empty {display: none;}
.ui.ccPage .join {align-items: center;}
.ui.ccPage .join > .inp {font-size: var(--f4); text-align: right; font-variant-numeric: tabular-nums;}
.ui.ccPage .ccUnit {flex: none; min-width: 2em; font-weight: 700; color: var(--muted);}
.ui.ccPage .ccErr {color: var(--danger); font-weight: 700;}
.ui.ccPage .ccErr:empty {display: none;}
.ui.ccPage .inp.isBad {border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger);}
.ui.ccPage button.row {width: 100%; font: inherit; text-align: left; color: var(--text); background: var(--surface); border: 0; border-top: 1px solid var(--line); border-radius: 0;}
.ui.ccPage button.row:first-child {border-top: 0;}
.ui.ccPage .row .ccW {font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap;}
.ui.ccPage .row .ccW.moving {color: var(--muted);}
.ui.ccPage .row .btn.sm.isLocked {opacity: 0.6;}
.ui.ccPage .chip {cursor: pointer;}
.ui.ccPage .chip .lock {margin-left: 2px;}
.ui.ccPage .ccRange {display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s2); font-size: var(--f2);}
.ui.ccPage .ccRange .inp {flex: 0 1 6.5em; width: 6.5em; text-align: right; font-variant-numeric: tabular-nums;}
.ui.ccPage .btn.ico.isLocked .lock {margin-left: 2px;}
.ui.ccPage .chk .i {margin-left: 2px;}
.ui.ccPage .state.ccState {display: grid; gap: 6px; padding: 14px 12px; background: var(--sunk); color: var(--text); transition: background-color 0.2s;}
.ui.ccPage .state.ccState.wUnder {background: var(--wUnder); color: var(--onW);}
.ui.ccPage .state.ccState.wOk {background: var(--wOk); color: var(--onW);}
.ui.ccPage .state.ccState.wPerfect {background: var(--wPerfect); color: var(--onW);}
.ui.ccPage .state.ccState.wOver {background: var(--wOver); color: var(--onWOver);}
.ui.ccPage .ccStateTop {position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 calc(var(--hit) + 4px);} /* (room for 🔊 on both sides: the word stays centred and never runs under it) */
@media (max-width: 479px) {.ui.ccPage .ccWord {font-size: var(--f5);}}
.ui.ccPage .ccWord {font: 700 var(--f6)/1.1 var(--font); letter-spacing: 0.02em; overflow-wrap: anywhere;}
.ui.ccPage .ccSound {position: absolute; top: 0; right: 0; width: var(--hit); height: var(--hit); padding: 0; font-size: var(--f4); line-height: 1; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 50%;}
.ui.ccPage .ccPct {font-size: var(--f3); font-variant-numeric: tabular-nums;}
.ui.ccPage .state .meter {margin-top: 2px;}
.ui.ccPage .state .meter span {width: 0; transition: width 0.15s;}
.ui.ccPage .state .meter.zoom {box-shadow: inset 4px 0 0 currentColor;}
.ui.ccPage .kv span {min-width: 0;}
.ui.ccPage .dontShowDiv {display: none;}
.ui.keyRow #stepMainButton.isOff, .ui.keyRow .btn.isOff {color: var(--muted); background: var(--sunk); border-color: var(--line);}
/* (the stations in the display: TOO LESS in orange like every 'under') */
div.inst .msState.wUnder {background: var(--wUnder);}
/* (the lines of the counting page in the display: only on LP 48 / 49 - ble_incoming.js hides them elsewhere) */
div.inst .wtGroup.ccLines.dontShowDiv {display: none;}

/* START PAGE (createStartPageHtml in 00_upscale.js, no scale connected): one column of the parts - the empty weight display, the pair key
   (highlighted), the ways to connect as a list, WHAT DO YOU WEIGH?, the list of the diary and the folds, the links as chips, the intro
   and the FAQ; the key row at the bottom (⌂ HOMEPAGE, ▤ MANUAL), the language in the head */
.ui.startPage {box-sizing: border-box; display: flex; flex-direction: column; gap: var(--s3); width: 100%; max-width: 720px; margin: 0 auto; padding: var(--s3) 0 var(--s5) 0;}
.ui.startPage p {margin: 0; font-size: var(--f2);}
.ui.startPage .btn.dontShowButton, .ui.startPage .dontShowDiv {display: none;}
/* the weight display without a scale */
.ui .startDisp {padding: 10px 12px 12px 12px; color: var(--onDisp); background: var(--disp); border: 1px solid var(--dispEdge); border-radius: var(--r2);}
.ui .startDisp .wt {display: flex; align-items: baseline; justify-content: center; gap: 6px; font-family: var(--mono); font-variant-numeric: tabular-nums; line-height: 1.05;}
.ui .startDisp .num {font-size: var(--f7); font-weight: 600; letter-spacing: -0.02em; color: var(--dispMuted);}
.ui .startDisp .un {font-size: var(--f5); color: var(--dispMuted);}
.ui .startDisp .wtInfo {margin-top: 4px; text-align: center; font: var(--f0)/1.4 var(--mono); letter-spacing: 0.06em; color: var(--dispMuted);}
/* the pair key: one line (fit_connect_button_to_one_line makes the font smaller if needed); gray with the line below it where this browser can not pair */
.ui.startPage #connectButton {white-space: nowrap; overflow: hidden;}
.ui.startPage #connectButton.isLocked {cursor: help;}
.ui.startPage #startPairNote {margin-top: calc(-1 * var(--s2)); text-align: center;}
/* the rows of the lists: a row that is a key (the diary), a fold (details) whose summary is the row */
.ui.startPage .row.isLocked .btn, .ui.startPage .row.isLocked .wayName {color: var(--muted);}
.ui.startPage #startWays .row {cursor: pointer;}
.ui.startPage #startWays .btn.sm {flex: none; min-width: 84px;}
.ui.startPage button.row {width: 100%; box-sizing: border-box; font: inherit; text-align: start; color: inherit; background: transparent; border: 0; border-radius: 0; box-shadow: none;}
.ui.startPage button.row:hover {background: var(--sunk);}
.ui.startPage #startMoreList > * {border-top: 0; border-bottom: 1px solid var(--line);}
.ui.startPage #startMoreList > :last-child {border-bottom: 0;}
.ui.startPage details.startFold > summary {list-style: none; cursor: pointer;}
.ui.startPage details.startFold > summary::-webkit-details-marker {display: none;}
.ui.startPage details.startFold .chev::after {content: '▸';}
.ui.startPage details.startFold[open] .chev::after {content: '▾';}
.ui.startPage .foldBody {display: grid; gap: var(--s2); justify-items: start; padding: 0 12px 12px 48px; color: var(--muted);}
.ui.startPage .foldBody p {hyphens: auto;}
.ui.startPage .foldBody p:empty {display: none;}
/* WHAT DO YOU WEIGH? (app_views.js): the select with the accent of the view, the line about the view in its colour */
.ui.startPage #startViewSel {border-left: 4px solid var(--accent);}
.ui.startPage .hint.startViewInfo {font-weight: 700; color: var(--accent);}
/* the links: chips (the shop keeps its red), the key row */
.ui.startPage .chips {justify-content: center;}
.ui.startPage .chips .btn {color: var(--muted);}
.ui.startPage .chips .btn.startUpgrade {color: var(--danger);}
.ui a.btn {text-decoration: none;}
.ui a.btn.quiet {text-decoration: underline;}
/* the intro and the FAQ (static HTML of index.html - also read without the app): a card, then the questions as folds of one list */
section.startIntro {color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2);}
section.startIntro h2 {padding: 10px 12px; font-size: var(--f1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid var(--line);}
section.startIntro p {margin: 0; padding: 12px; font-size: var(--f2); line-height: 1.45; hyphens: auto;}
section.startFaq {display: flex; flex-direction: column; margin-top: var(--s3);}
section.startFaq h2 {margin: 0 0 var(--s2) 0; font-size: var(--f1); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);}
section.startFaq details {background: var(--surface); border: 1px solid var(--line); border-top: 0;}
section.startFaq h2 + details {border-top: 1px solid var(--line); border-radius: var(--r2) var(--r2) 0 0;}
section.startFaq details:last-child {border-radius: 0 0 var(--r2) var(--r2);}
section.startFaq summary {display: flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 6px 12px; box-sizing: border-box; font-size: var(--f3); font-weight: 600; cursor: pointer; list-style: none;}
section.startFaq summary::-webkit-details-marker {display: none;}
section.startFaq summary::after {content: '▾'; margin-left: auto; color: var(--muted);}
section.startFaq details[open] summary::after {content: '▴';}
section.startFaq p {margin: 0; padding: 0 12px 12px 12px; font-size: var(--f2); line-height: 1.45; color: var(--muted); hyphens: auto;}
section.startIntro a, section.startFaq a {color: var(--text); font-weight: 700;}
/* the language select in the head (on the dark head: light text, a light arrow) */
header.appHead select.headSel {flex: 0 1 auto; min-width: 0; max-width: 11em; min-height: 32px; padding: 0 26px 0 8px; font-size: var(--f2); color: var(--onHead); background-color: transparent; border: 1px solid var(--headMuted); border-radius: var(--r1);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23f2f1ec'/%3E%3C/svg%3E");}
header.appHead select.headSel option {color: var(--text); background-color: var(--surface);}
/* THE MENU (app_menu.js): ☰ in the head opens a drawer over the page (phones, tablets) | a sidebar on the left from 1024px, « = a rail of
   icons. body classes: appMenuOn (a scale was connected) · appMenuOpen (drawer open) · appMenuWide (sidebar) · appMenuRail (narrow sidebar).
   Its head dark like the head of the page (the scale; the status line: view, licence, battery, user, sensors, link, DISCONNECT), one group
   open at a time (a group head = the main level, its entries indented to its text), the place you are in marked in the colour of the view,
   the emoji gray (look A) */
div.appMenuDim {display: none; position: fixed; inset: 0; z-index: 54; background: rgba(0, 0, 0, 0.5);}
body.appMenuOpen div.appMenuDim {display: block;}
nav.appMenu {display: none; position: fixed; top: 0; left: 0; bottom: 0; z-index: 55; width: min(86vw, 300px); box-sizing: border-box; flex-direction: column; overflow: hidden; background: var(--surface); border-right: 1px solid var(--line);}
body.appMenuOn nav.appMenu {display: flex; visibility: hidden; transform: translateX(-102%); transition: transform 0.2s ease, visibility 0s linear 0.2s;}
body.appMenuOpen nav.appMenu {visibility: visible; transform: none; transition: transform 0.2s ease; box-shadow: var(--shadowWin);}
body.appMenuWide {--menuW: 260px; margin-left: calc(var(--menuW) + 10px);}
body.appMenuWide.appMenuRail {--menuW: 56px;}
body.appMenuWide nav.appMenu {visibility: visible; transform: none; transition: none; width: var(--menuW); z-index: 9;}
@media (prefers-reduced-motion: reduce) {body.appMenuOn nav.appMenu, body.appMenuOpen nav.appMenu {transition: none;}}
nav.appMenu .dontShowDiv, nav.appMenu .dontShowButton {display: none !important;}
/* the head of the menu */
nav.appMenu div.appMenuHead {flex: none; padding: 10px 12px 12px 12px; color: var(--onHead); background: var(--head);}
nav.appMenu div.appMenuTop {display: flex; align-items: center; gap: 6px; min-height: 32px;}
nav.appMenu span.appMenuScale {flex: 1; min-width: 0; font-size: var(--f3); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
nav.appMenu span.appMenuScale.isOff {color: var(--dispWarn);} /* (no link / no data: the scale name in red) */
nav.appMenu button.appMenuDock, nav.appMenu button.appMenuClose {flex: none; width: 32px; height: 32px; min-height: 0; display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: var(--f2); line-height: 1; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 50%;}
nav.appMenu button.appMenuDock:hover, nav.appMenu button.appMenuClose:hover {background: rgba(255, 255, 255, 0.12);}
nav.appMenu button.appMenuDock {display: none;}
body.appMenuWide nav.appMenu button.appMenuDock {display: inline-flex;}
body.appMenuWide nav.appMenu button.appMenuClose {display: none;}
nav.appMenu div.appMenuStatus {display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: var(--f1); color: var(--headMuted);}
nav.appMenu span.appMenuStatusItem:empty {display: none;}
nav.appMenu #appMenuEdition {padding: 1px 6px; font-size: var(--f0); font-weight: 700; letter-spacing: 0.06em; color: var(--head); background: var(--onHead); border-radius: var(--rPill); cursor: pointer;}
nav.appMenu span.appViewBadge {padding: 0 6px; font-weight: 700; border: 1px solid var(--headMuted); border-radius: var(--rPill); cursor: pointer; white-space: nowrap;}
nav.appMenu #appMenuBattery {cursor: pointer;}
nav.appMenu #appMenuBattery.batteryLow {font-weight: 700; color: #ff8a7d;}
nav.appMenu span.appMenuConnDot {display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); vertical-align: middle;}
nav.appMenu span.appMenuConnDot.appMenuConnOk {background: #35c759;}
/* (the licence badge at the left and the connection status at the right in ONE line, then the other items, at the end DISCONNECT over the whole width) */
nav.appMenu div.appMenuStatusLine {order: -1; flex: 0 0 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;}
nav.appMenu span#appMenuConn {margin-left: auto; text-align: right;}
nav.appMenu button.appMenuDisconnect {order: 20; flex: 0 0 100%; width: 100%; min-height: 36px; margin: 2px 0 0 0;}
/* the groups: 📒 NUTRITION DIARY apart, always at the bottom, opens upwards */
nav.appMenu div.appMenuBody {flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;}
nav.appMenu span#appMenuVersion {order: 20; margin-inline-start: auto; font-size: var(--f0); opacity: 0.7; white-space: nowrap;}
nav.appMenu section.appMenuFooter {flex: 0 0 auto; max-height: 60%; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--edge);}
nav.appMenu button.appMenuGroupHead {display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; margin: 0; padding: 8px 12px; font-size: var(--f2); font-weight: 700; letter-spacing: 0.03em; text-align: start; color: var(--text); background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0;}
nav.appMenu div.appMenuBody > section.appMenuGroup:first-child > button.appMenuGroupHead, nav.appMenu section.appMenuFooter > button.appMenuGroupHead {border-top: 0;}
nav.appMenu button.appMenuGroupHead:hover, nav.appMenu section.appMenuGroup:not(.appMenuClosed) > button.appMenuGroupHead {background: var(--sunk);}
nav.appMenu span.appMenuIcon, nav.appMenu span.appMenuModeIcon {flex: none; width: 22px; text-align: center; filter: grayscale(1);}
nav.appMenu span.appMenuLabel {flex: 1; min-width: 0;}
nav.appMenu span.appMenuCaret {margin-left: auto; color: var(--muted);}
nav.appMenu span.appMenuCaret::after {content: '▾';}
nav.appMenu .appMenuClosed span.appMenuCaret::after {content: '▸';}
nav.appMenu section.appMenuClosed > div.appMenuGroupBody {display: none;}
nav.appMenu div.appMenuGroupBody {padding: 4px 0 8px 0;}
/* the entries (also the buttons of the bottom block that were moved in here: one look for all) */
nav.appMenu div.appMenuGroupBody button {display: flex; align-items: center; gap: 10px; width: 100% !important; height: auto !important; min-height: 40px; margin: 0 !important; padding: 6px 12px 6px 44px; font-size: var(--f2); font-weight: 400; letter-spacing: 0; line-height: 1.3; text-align: start; white-space: normal; color: var(--text); background: transparent; border: 0; border-radius: 0; box-shadow: none; opacity: 1; cursor: pointer;}
nav.appMenu div.appMenuGroupBody button:hover {background-color: var(--sunk);}
nav.appMenu div.appMenuGroupBody button.appMenuMode, nav.appMenu div.appMenuGroupBody button.appMenuTest, nav.appMenu div.appMenuGroupBody button.appMenuSubHead {padding-left: 12px;}
nav.appMenu div.appMenuGroupBody button.appMenuSubHead {font-weight: 700;}
/* (🛠︎ SCALE SETTINGS: the head of a group in line with the entries, its entries one step further in) */
nav.appMenu div.appMenuGroupBody button.appMenuSettingsHead {padding-left: 44px;}
nav.appMenu div.appMenuSettingsFold button {padding-left: 60px;}
nav.appMenu div.appMenuGroupBody button.appMenuCurrent {font-weight: 700; background: var(--accentSoft); box-shadow: inset 4px 0 0 var(--accent);}
nav.appMenu div.appMenuGroupBody button.appMenuLocked {color: var(--muted);}
nav.appMenu span.appMenuModeName {flex: 1; min-width: 0;}
nav.appMenu span.appMenuModeMark {flex: none; font-size: var(--f0); font-weight: 700; color: var(--muted);}
nav.appMenu span.appViewOut {flex: none; font-size: var(--f0); font-style: italic; color: var(--muted);}
nav.appMenu .appMenuOff {opacity: 0.4 !important; cursor: not-allowed !important;}
nav.appMenu div.appMenuSubTitle {display: flex; align-items: center; gap: 6px; padding: 8px 12px 2px 44px; font-size: var(--f0); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);}
nav.appMenu span.appMenuInfo {width: 16px; height: 16px; font-size: var(--f0); letter-spacing: 0; text-transform: none; cursor: pointer;}
nav.appMenu div.appMenuHint {margin: 4px 12px 4px 44px; padding: 6px 8px; font-size: var(--f1); color: var(--warnText); background: var(--warnBg); border-radius: var(--r1);}
nav.appMenu div.appMenuGroupBody button.logRowEmpty, nav.appMenu div.appMenuGroupBody button.diaryAddInactive {opacity: 0.55;}
nav.appMenu div.appMenuGroupBody button.logRowFilled {font-weight: 700; box-shadow: inset 4px 0 0 var(--mark);} /* (📝 WEIGHING LOG with entries) */
nav.appMenu div.appMenuGroupBody button.takefromRunning {font-weight: 700; background: var(--accentSoft); box-shadow: inset 4px 0 0 var(--accent);} /* (🍽 TAKE-FROM: a 'before' weight is stored) */
nav.appMenu div.appMenuGroupBody button.appMenuUpgrade {font-weight: 700; color: var(--danger);} /* (like ⭐ UPGRADE of the start page) */
nav.appMenu div.appMenuGroupBody button.appViewAllModes {font-weight: 700; color: var(--accent);} /* (➕ ALL MODES (FULL APP) of a view) */
nav.appMenu label.appMenuSelectLabel {display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; padding: 6px 12px 6px 44px; font-size: var(--f2);}
nav.appMenu label.appMenuSelectLabel .appMenuSelectText {flex: 1 1 auto;}
nav.appMenu label.appMenuSelectLabel select {flex: 1 1 150px; width: auto !important; min-width: 0; min-height: var(--ctlS); margin: 0 !important; font-size: var(--f2);} /* (a long label puts the select under it: the chosen text is never cut) */
nav.appMenu #textToSpeechSelectionDiv {display: block !important;}
nav.appMenu #speechOutputButton {display: none !important;} /* (the group head 💬 SPEECH OUTPUT starts it: app_menu_speech_open()) */
nav.appMenu #textToSpeechSelectionDiv select {display: block !important; width: calc(100% - 56px) !important; min-height: var(--ctlS); margin: 6px 12px 6px 44px !important; font-size: var(--f2);}
nav.appMenu #bottomRecordsButton {display: none !important;} /* (🗂 RECORDS: the entries are the tabs of the records page - the old button stays hidden in the group: a tile of a view presses it) */
/* the rail (wide screen, «): icons only */
body.appMenuRail nav.appMenu span.appMenuLabel, body.appMenuRail nav.appMenu span.appMenuCaret, body.appMenuRail nav.appMenu span.appMenuInfo, body.appMenuRail nav.appMenu div.appMenuGroupBody, body.appMenuRail nav.appMenu div.appMenuStatus, body.appMenuRail nav.appMenu span.appMenuScale {display: none !important;}
body.appMenuRail nav.appMenu div.appMenuHead {padding: 10px 0;}
body.appMenuRail nav.appMenu div.appMenuTop {justify-content: center;}
body.appMenuRail nav.appMenu button.appMenuGroupHead {justify-content: center; padding: 8px 0; font-size: var(--f4);}
body.appMenuRail nav.appMenu span.appMenuIcon {width: auto;}
/* THE WEIGHING PAGE, PART B (mode_logging.js, conversions.js, 00_upscale.js, app_views.js): below the unit cards and the sums the THING /
   NAME card (name field ▾ 📷 💾, UNITS: select, chips, ✎ editor, 📦 STOCK), the 📝 WEIGHING LOG card, then the tiles of the view - always
   the last thing of the page; on wide screens two columns: the unit cards + sums left, THING / NAME + the log right (body.wghCols) */
div#belowTheButtons > .card, div#pageLog {margin: 12px 0;}
div#belowTheButtons:empty {display: none;}
body.salesModeOn #nameAndCountOKdiv, body.salesModeOn #conversionsSelection, body.salesModeOn #conversionsInputs, body.salesModeOn #sumLogButton {display: none;}
.ui .ufCheck {margin: 0; font-size: var(--f2); font-weight: 700; color: var(--danger);}
.ui .inp.isWrong {border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger);}
.ui .ufUnit {flex: none; align-self: center; font-size: var(--f2); color: var(--muted); white-space: nowrap;}
.ui .ufWarn {margin: 0; font-size: var(--f2); font-weight: 700; color: var(--danger);}
.ui .btn.quiet.danger {color: var(--danger);}
.ui .join.isLocked {opacity: 0.5;}
.ui .unitsField .sel {text-overflow: ellipsis; white-space: nowrap; overflow: hidden;} /* (the long first line in German: never wider than the card) */
/* 📦 STOCK + 🏷 the label box of the THING card (a mini QR code + LABEL): one row, the same height, together the full width (one alone takes it all) */
.ui .thingActRow {display: flex; gap: var(--s2); align-items: stretch;}
.ui .thingActRow:not(:has(> :not(.dontShowDiv):not(:empty))) {display: none;}
#thingStockRow:empty {display: none;}
.ui .thingActRow > #thingStockRow {flex: 1 1 0; min-width: 0; display: flex; justify-content: stretch;}
.ui .thingActRow > #thingStockRow .btn {flex: 1 1 auto; min-height: 52px; font-size: var(--f2);}
.ui .thingLabelBox {flex: 1 1 0; min-width: 0; box-sizing: border-box; display: flex; align-items: center; gap: var(--s2); min-height: 52px; padding: 4px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r1);}
.ui .thingLabelBox.dontShowDiv {display: none;}
.ui .thingLabelBox .btn {flex: 1 1 auto; min-width: 0; min-height: 0; align-self: stretch; padding: 2px 6px; white-space: normal; border: 0; box-shadow: none; background: transparent;}
.ui .thingLabelQr {flex: none; display: block; width: 42px; height: 42px; padding: 0; line-height: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r1); cursor: pointer; overflow: hidden;}
.ui .thingLabelQr canvas {display: block; width: 100%; height: 100%; image-rendering: pixelated;}
/* the chips of the UNITS (small: more fit in a line), the last one ALL; a hidden unit: struck through, its 👻 in the underlined box */
.ui .unitChips {gap: 4px;}
.ui .chip.unit {min-height: var(--annH);}
.ui .chip.unit .nm {white-space: nowrap;}
.ui .chip.unit.unitChipAll {background: var(--sunk);}
/* ✎ the editor of one unit, in place of the chips: name, (Carbohydrate / BU / CU | Salt / Sodium), the number, its unit, OK, ✕ */
.ui .unitChipEditor {display: grid; gap: 6px; padding: 8px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r2);}
.ui .unitChipEditor.dontShowDiv {display: none;}
.ui .unitChipEditor .join {align-items: center; flex-wrap: wrap;}
.ui .unitChipEditor .inp {flex: 1 1 6em; width: auto;}
.ui .unitChipEditor .ufNameSel {flex: 1 1 100%; width: 100%;}
.ui .unitChipEditor .btn.sm {min-height: var(--ctl);}
/* the windows of the unit kinds (showThisConversionsInput()): below the windows they open (camera, lot list, baker's tools) */
div.busyOverlay.unitForm {z-index: 9050;}
body.unitFormOpen div.labelDialogOverlay {z-index: 9060;}
div.unitForm div.busyBox {max-width: 32em;}
div.unitForm div.busyBox > div.busyAskButtons:empty {display: none;}
div.unitForm div.busyAskTitle {display: flex; align-items: center; gap: 6px; flex-wrap: wrap;}
.ui .unitFormBody {display: grid; gap: var(--s3); min-width: 0;}
.ui .unitFormBody p {margin: 0;}
div.unitForm p, div#thingOverwriteWindow p, .ui.goldWindow p, .ui.thingsPage p, div#belowTheButtons p {font-size: var(--f2);} /* (the old p rule of the page: 1.2em) */
div.unitForm .ufKeys {position: sticky; bottom: 0; margin-top: 0; padding-top: var(--s2); background: var(--surface);}
button.busyAskButton.dontClickMeNowButton {opacity: 0.45;}
.ui .ufNarrow {flex: 0 0 6em; width: 6em;}
/* 🍉 the own product: one value per row - name | field | unit (saturated fat and sugar under their parent) */
.ui .ufRows {display: grid; gap: 4px;}
.ui .ufRow {display: grid; grid-template-columns: minmax(0, 1fr) 6.5em 5.5em; align-items: center; gap: 8px; font-size: var(--f2);}
.ui .ufRow.ufSub .ufRowName {padding-left: 1em; color: var(--muted);}
.ui .ufRow .inp {min-height: var(--ctlS); text-align: right;}
.ui .ufRow .sel.ufRowName {min-height: var(--ctlS);}
/* 🍉 the result list of the search: rows, the best matches bold, the typed text marked; a tap adds the product */
.ui #nutritionValuesSearchResults:empty {display: none;}
.ui .searchResultUl {list-style: none; max-height: 40vh; margin: 0; padding: 0; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r2);}
.ui .searchResultUl li, .ui .searchResultUl li:nth-child(2n) {margin: 0; padding: 8px 10px; font-weight: 400; color: var(--text); background: var(--surface); border-top: 1px solid var(--line); cursor: pointer;}
.ui .searchResultUl li:first-child {border-top: 0;}
.ui .searchResultUl li.fett {font-weight: 700;}
.ui .searchResultUl li.discreetText {color: var(--muted);}
.ui .searchResultUl li.biggah {font-size: var(--f3);}
.ui .searchResultUl .highlight {padding: 0; color: inherit; background: var(--mark); border-radius: 0;}
/* 🧾 the lot window: the lot store and the identity as cards */
.ui .thingIdentBox .list .row {min-height: 36px;}
.ui .thingLotStore textarea.inp {min-height: 0; white-space: pre-wrap; font-family: var(--font);}
/* 🪙 the gold calculator (in the dialog of the baker's tools): cards, fields, the keys at the bottom */
.ui.goldWindow .goldForm {display: grid; gap: var(--s3); text-align: left;}
.ui.goldWindow .goldForm p {margin: 0;}
@media (max-width: 600px) {.ui.goldWindow .goldForm .join {flex-wrap: wrap;} .ui.goldWindow .goldForm .join > .inp {flex: 1 1 100%;} .ui.goldWindow .goldForm .join > .sel {flex: 1 1 8em;}} /* (the spot price: the number on its own line, the unit and the currency under it - no cut names) */
.ui.goldWindow #goldKeys {justify-content: flex-start;}
.ui.goldWindow #goldKeys .goldThingKey:first-of-type {margin-left: auto;}
.ui.goldWindow #goldKeys button:disabled {opacity: 0.45;}
/* the THINGS of the scale (things.js things_list_build): a page on top - title ℹ️ ✕, filter + 📷, the rows (name | LOAD | 🗑, ⏳ while one
   loads or is deleted), ⬇ BACKUP | ⇄ SYNC | ⬆ RESTORE at the bottom */
div.labelDialogOverlay.thingsPage {display: flex; flex-direction: column; gap: var(--s3); padding: 12px; text-align: left; background: var(--bg); border-color: var(--line);}
div.labelDialogOverlay.thingsPage {bottom: calc(var(--msgStackH, 0px) + var(--keyRowH, 0px) + var(--weightBoxH, 0px) + 0.5em);} /* (its own keys stay above the key row of the scale, the message stack and the 🧰 box) */
.ui .thingsPageHead {display: flex; align-items: center; gap: 8px;}
.ui .thingsPageHead h2 {display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--f4);}
.ui .thingsPageHead .grow {flex: 1; min-width: 0;}
.ui.thingsPage .thingsListBox {display: grid; gap: var(--s2); width: 100%; max-width: 40em; margin: 0 auto;}
.ui.thingsPage .thingsListBox p {margin: 0;}
.ui.thingsPage .row .grow {cursor: pointer;}
.ui.thingsPage .row.pending .btn {display: none;}
.ui.thingsPage .row.pending::after {content: '⏳';}
.ui .thingsPageKeys {position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: flex-end; width: 100%; max-width: 40em; margin: auto auto 0 auto; padding: 8px 0; background: var(--bg); border-top: 1px solid var(--line);}
.ui .thingsPageKeys .btn {flex: 1 1 0;}
/* the LIVE LABEL line: docked at the bottom above the message stack and the 🧰 box (label_bar_dock()); one line - too narrow for the words:
   the signs of the keys only (.tight, label_line_fit()) */
body.labelBarDocked #labelBar {position: fixed; left: 0; right: 0; z-index: 9; margin: 0; box-sizing: border-box; box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);}
body.labelBarDocked.appMenuWide #labelBar {left: var(--menuW);}
#labelBar .btn .lock {padding: 0 3px;}
/* 📝 the weighing log on the page (page_log_refresh()): the last lines, Sum and ⌀ - the numbers right-aligned */
.ui.pageLog .cardHead .chev {display: flex; align-items: center; gap: 6px;}
.ui.pageLog .cardBody {max-height: 16em; overflow-y: auto;}
.ui.pageLog .kv span {min-width: 0; overflow-wrap: anywhere;}
.ui.pageLog .kv .pageLogSum, .ui.pageLog .kv .pageLogSum + b {padding-top: 4px; font-weight: 800; border-top: 1px solid var(--line);}
.ui.pageLog .kv .pageLogAvg, .ui.pageLog .kv .pageLogAvg + b {color: var(--muted);}
.ui .pageLogPre {margin: 0; font: var(--f1)/1.35 var(--mono); white-space: pre; overflow-x: auto;}
body.salesModeOn div.pageLog {display: none;}
/* YOUR VIEW: the tiles of the view (app_view_tiles()) */
div.viewTiles {display: grid; gap: var(--s2); margin: 16px 0 12px 0;}
div.viewTiles.viewTilesOff, body.salesModeOn div.viewTiles {display: none;}
/* wide screens: two columns - the unit cards + sums left, the THING / NAME card + the log right, the tiles below both (only with unit cards) */
@media (min-width: 900px) {
	body.wghCols:not(.salesModeOn) #isBigPage:not(.dontShowDiv):has(> #scaleButtons:not(.dontShowDiv)):not(:has(> #extraConversionsToShow:empty)) {display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 16px; align-items: start;} /* (row 4 takes the extra height of the THING card: the sums stay right under the unit cards) */
	body.wghCols:not(.salesModeOn) #isBigPage > *, body.wghCols:not(.salesModeOn) #scaleButtonsAndInbetween > * {grid-column: 1 / -1;}
	body.wghCols:not(.salesModeOn) #scaleButtons:not(.dontShowDiv), body.wghCols:not(.salesModeOn) #scaleButtonsAndInbetween {display: contents;}
	body.wghCols:not(.salesModeOn) #weightPanel {grid-row: 1;}
	body.wghCols:not(.salesModeOn) #runningStuff {grid-row: 2;}
	body.wghCols:not(.salesModeOn) #extraConversionsToShow {grid-column: 1; grid-row: 3;}
	body.wghCols:not(.salesModeOn) #countingWeightExtraInfoDiv {grid-column: 1; grid-row: 4;}
	body.wghCols:not(.salesModeOn) #belowTheButtons {grid-column: 2; grid-row: 3 / span 2;}
	body.wghCols:not(.salesModeOn) #pageLog {grid-column: 2; grid-row: 5;}
	body.wghCols:not(.salesModeOn) #viewTiles {grid-row: 6;}
	body.wghCols:not(.salesModeOn) #belowTheButtons > .card:first-child, body.wghCols:not(.salesModeOn) #extraConversionsToShow {margin-top: 12px;}
}
/* the first connect: below the weight everything builds invisibly, then shows at once (page_settle_start / _end, ble_functions.js) */
#isBigPage > *:not(:first-child), #topScaleExtraInfoDiv, #takeAwayInfoDiv, #weightKeys, #tareRow {transition: opacity 0.2s ease;}
body.pageSettling #isBigPage > *:not(:first-child), body.pageSettling #topScaleExtraInfoDiv, body.pageSettling #takeAwayInfoDiv, body.pageSettling #weightKeys, body.pageSettling #tareRow, body.pageSettling #labelBar {visibility: hidden; opacity: 0;}
@media (prefers-reduced-motion: reduce) {#isBigPage > *:not(:first-child), #topScaleExtraInfoDiv, #takeAwayInfoDiv, #weightKeys, #tareRow {transition: none;}}
/* the cards of the mode pages not rebuilt yet (ui_cards / ui_card, helpers.js: factory, sorting, tracking, lots import ...) */
div.recipeMenu {display: flex; flex-direction: column; gap: 0.6em; max-width: 36em; margin: 0.8em auto; text-align: left;}
.recipeMenuCard {display: block; border: 1px solid var(--line); border-radius: 0.5em; background: var(--surface); padding: 0.6em 0.7em;}
.recipeMenuHead {display: flex; align-items: center; gap: 0.6em; font-weight: bold; font-size: 0.95em;}
.recipeMenuHead span.recipeMenuTitle {flex: 1 1 auto;}
details.recipeMenuCard > summary {cursor: pointer; list-style: none;}
details.recipeMenuCard > summary::-webkit-details-marker {display: none;}
span.recipeMenuCaret::after {content: '▸'; color: var(--muted);}
details.recipeMenuCard[open] span.recipeMenuCaret::after {content: '▾';}
div.recipeMenuBody {display: flex; flex-direction: column; gap: 0.45em; margin-top: 0.6em;}
details.recipeMenuCard:not([open]) > div.recipeMenuBody {display: none;}
div.recipeMenuBody button.recipeMenuPrimary {width: 100%; margin: 0; padding: 0.55em; border: 1px solid var(--main); border-radius: 0.4em; background-color: var(--main); color: var(--onMain); font-weight: bold; font-size: 1.05em;}
div.recipeMenuBody button.recipeMenuWide {width: 100%; margin: 0; padding: 0.5em; font-weight: bold;}
div.recipeMenuRow {display: flex; flex-wrap: wrap; gap: 0.4em;}
div.recipeMenuRow > button {flex: 1 1 10em; margin: 0;}
div.recipeMenuBody p.recipeMenuNote {margin: 0; font-size: 0.85em; color: var(--muted);}
div.recipeMenuBody div.diaryButtonRow {margin: 0;}
div.uiCards label.recipeFormTitle {display: block; margin-top: 0.2em; font-size: 0.8em; font-weight: bold; letter-spacing: 0.04em; color: var(--muted);}
/* the cards of the mode pages (ui_cards / ui_card / ui_info_button, helpers.js): a line of text, a row of an input and its button */
div.uiCards {text-align: left;}
div.recipeMenuBody.uiCardNoHead {margin-top: 0;}
div.uiCards span.uiInfo {font-size: 0.9em; cursor: pointer;}
div.uiCards .uiCardRow {display: flex; align-items: center; gap: 0.5em; flex-wrap: wrap;}
div.uiCards p.uiCardNote {margin: 0; font-size: 0.85em; color: var(--muted);}
h2#extraTextH2:empty, p#extraTextP:empty {display: none;} /* (pages with a page title and cards: no empty space above them) */
/* a form restyled into cards (ui_infos / ui_wrap, helpers.js) */
.uiHiddenInfo {display: none !important;}
div.uiHeadLine {display: flex; align-items: center; gap: 0.5em;}
div.uiHeadLine > h2, div.uiHeadLine > h3, div.uiHeadLine > h4 {margin: 0.2em 0;}
div.recipeMenuBody h3 {font-size: 0.8em; font-weight: bold; letter-spacing: 0.04em; color: var(--muted); margin: 0.4em 0 0.2em 0;}
div.recipeMenuBody p {margin: 0.2em 0;}
div.uiButtonColumn {display: flex; flex-direction: column; gap: 0.4em;}
div.uiCards p.uiCardText {margin: 0; font-size: 0.95em; line-height: 1.4;}
div.uiCards .uiCardRow input.uiCardInput {flex: 1 1 8em; min-width: 0; width: auto; margin: 0; padding: 0.4em 0.5em; text-align: left;}
div.uiCards .uiCardRow button.uiCardRowButton {flex: 0 0 auto; margin: 0; font-weight: bold; padding: 0.4em 0.8em;}
div.cclubOffBox.uiCards {border: 0; padding: 0; background: none;} /* (the card inside is the box) */
/* 📡 the room chip and the 📡 next to typed fields (sensors.js, sensors_room.js - the window: block 'SCALE INFO, LICENCE, SENSORS') */
span.sensorChip {cursor: pointer; white-space: normal; display: inline-block; max-width: 100%; box-sizing: border-box; padding: 0.05em 0.45em; border-radius: 0.8em; background: var(--okSoft); color: var(--ok);}
/* (in the head of the ☰ menu: a row of its own at the end, the values wrap between them - never inside one: sensor_text() uses a no-break space) */
nav.appMenu div.appMenuStatus span#appMenuSensors {order: 10; flex: 0 1 auto; line-height: 1.35;}
span.sensorChip.sensorChipBad {background: var(--dangerSoft); color: var(--danger);}
span.sensorTools {display: inline-flex; align-items: center; gap: 0.3em; flex-wrap: wrap; margin-top: 0.15em;}
span.sensorTools button.sensorFill {margin: 0; padding: 0.05em 0.4em; font-size: 0.95em;}
span.sensorTools button.sensorFillOff {opacity: 0.45;}
span.sensorTools select.sensorPick {font-size: 0.85em; max-width: 12em;}
span.sensorTools span.sensorSource {color: var(--muted);}

/* THE NUTRITION DIARY (nutrition_diary.js, diary_quick.js, diary_sync.js): a page of its own below the head (#diaryPage.ui.diaryPage, z 8:
   over the weighing page, the 📝 log page and the 📊 statistics, also over the start page) - tabs and the person chips fixed at its top,
   the cards scroll below them; its key row #diaryKeys takes the place of the other key rows while it is open (body.diaryPageOn).
   Numbers right-aligned in tabular figures; goal bars in ink, the goal as a line at 80 % of the bar - near it yellow, on it green, over it
   red (the weighing colours: only for the result against a goal) */
div.ui.diaryPage {position: fixed; z-index: 8; top: var(--headH); left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; background: var(--bg);}
body.appMenuWide div.ui.diaryPage {left: var(--menuW);}
body.diaryPageOn > .ui.keyRow:not(#diaryKeys) {display: none !important;}
#diaryKeys.ui.keyRow .btn:not(.main) {flex: 0 0 auto; white-space: nowrap;} /* (🔄 SYNC 🔒 PRO in one line: the key takes its width, ＋ ADD FOOD the rest) */
body.diaryPageOn #labelBar {display: none !important;}
.ui.diaryPage > .tabs {padding: 0 4px;}
.ui.diaryPage > .tabs .tab {flex: 1 0 auto;}
.ui.diaryPage .chips.diaryPersons {flex: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);}
.ui.diaryPage .chips.diaryPersons::-webkit-scrollbar {display: none;}
.ui.diaryPage .diaryPersons .chip {flex: none; white-space: nowrap;}
.ui.diaryPage .diaryBody {flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 12px calc(var(--msgStackH, 0px) + var(--keyRowH, 0px) + var(--weightBoxH, 0px) + 16px) 12px;}
.ui.diaryPage .diaryInner {display: grid; gap: var(--s3); max-width: 720px; margin: 0 auto;}
.ui.diaryPage p, #diaryEditWindow p, #diaryAddWindow p, #diaryAddLogWindow p, #diarySyncWindow p {margin: 0; font-size: var(--f2);}
.ui.diaryPage p.hint, #diaryAddWindow p.hint, #diaryAddLogWindow p.hint, #diarySyncWindow p.hint {font-size: var(--f1);}
/* the parts: a number at the right end (tabular figures), the title of a card with its ℹ️ right behind it, keys at the end of a head */
.ui .diaryNum {flex: none; font: 600 var(--f3) var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui .diaryNum .sub {display: block; font: 400 var(--f1) var(--font); color: var(--muted);}
.ui .diaryCardTitle {min-width: 0; overflow-wrap: anywhere;}
.ui .diaryHeadEnd {margin-left: auto; display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0;}
.ui .diaryMealHead .btn.ico, .ui .diaryDel, .ui .diaryWeekNav .btn.ico {width: var(--ctlS); min-height: var(--ctlS);}
.ui .diaryGrid {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; align-items: end;}
.ui .diaryWideFld {grid-column: 1 / -1;}
.ui .diaryGrid .inp.decField, .ui .diaryOthers .inp.decField, .ui .diaryShare .inp, .ui .diaryAmount {text-align: right; font-variant-numeric: tabular-nums;}
.ui .diarySubTitle {display: flex; align-items: center; gap: 6px;}
.ui .chk .diaryChkText {min-width: 0; overflow-wrap: anywhere;}
.ui .chk.diaryChkLong {align-items: flex-start;}
.ui .chk.diaryChkLong input, .ui .chk.diaryChoice input {flex: none; margin-top: 2px;}
.ui .chk.isLocked .lock {margin-left: auto;}
.ui button.row {width: 100%; text-align: left; color: var(--text); background: var(--surface); border: 0; border-top: 1px solid var(--line);}
.ui button.row:first-child {border-top: 0;}
/* DAY: ◀ date ▶ TODAY (a tap on the date opens the date picker) */
.ui .diaryDateRow {display: flex; align-items: center; gap: var(--s2);}
.ui .diaryDatePick {position: relative; flex: 1 1 auto; min-width: 0; padding: 6px 4px; font-size: var(--f3); font-weight: 700; text-align: center; overflow-wrap: anywhere; cursor: pointer;}
.ui .diaryDatePick .diaryDateInput {position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0;}
.ui .diaryEmpty .diaryEmptyTitle {font-size: var(--f3); font-weight: 600;}
/* TOTAL OF THE DAY: kcal big, the tiles (2 per line on a phone), the foot (weight, traffic light) */
.ui .diaryEnergyLine {display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px;}
.ui .diaryEnergyValue {font: 700 var(--f6)/1.1 var(--mono); font-variant-numeric: tabular-nums;}
.ui .diaryEnergyUnit {font-size: var(--f2); color: var(--muted);}
.ui .diaryEnergyGoal {margin-left: auto; font-size: var(--f1); color: var(--muted); font-variant-numeric: tabular-nums; text-align: right;}
.ui .diaryTiles {display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s2);}
.ui .diaryTile {display: grid; gap: 2px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r2);}
.ui .diaryTileName {font-size: var(--f1); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere;}
.ui .diaryTileValue {display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 2px 6px;}
.ui .diaryTileValue .diaryNum {font-size: var(--f4);}
.ui .diaryTileGoal {font-size: var(--f1); color: var(--muted); font-variant-numeric: tabular-nums; text-align: right;}
.ui .diaryTotalsFoot {display: grid; gap: 6px;}
.ui .diaryRating .chip {font-size: var(--f1); font-variant-numeric: tabular-nums;}
.ui .diaryBar {position: relative; display: block; height: 8px; margin-top: 4px; background: var(--sunk); border-radius: var(--rPill);}
.ui .diaryBar .diaryBarFill {display: block; height: 100%; background: var(--text); border-radius: var(--rPill);}
.ui .diaryBar.isNear .diaryBarFill {background: var(--wOk);}
.ui .diaryBar.isOn .diaryBarFill {background: var(--wPerfect);}
.ui .diaryBar.isOver .diaryBarFill {background: var(--wOver);}
.ui .diaryBar .diaryBarGoal {position: absolute; left: 80%; top: -3px; bottom: -3px; width: 2px; background: var(--text);}
/* the meals: a head (name, kcal and carb units right, 💾) and the entries as rows (time | name + values | kcal | 🗑) */
.ui .diaryMeal {display: grid; gap: 6px;}
.ui .diaryMealHead {display: flex; align-items: center; gap: var(--s2); padding: 0 2px;}
.ui .diaryMealHead .grow {flex: 1 1 auto; min-width: 0;}
.ui .row.diaryEntry {cursor: pointer; align-items: flex-start;}
.ui .row.diaryEntry > * {align-self: center;}
.ui .diaryTime {flex: none; min-width: 3.2em; font: var(--f1) var(--mono); color: var(--muted); font-variant-numeric: tabular-nums;}
/* ⚡ QUICK ADD: the labelled chip rows (each scrolls sideways), the line of what was just added, the manage rows */
.ui .diaryQuickRow {display: grid; gap: 4px; min-width: 0;}
.ui .chips.diaryScrollChips {flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;}
.ui .chips.diaryScrollChips::-webkit-scrollbar {display: none;}
.ui .chip.diaryQuickChip {flex: none; white-space: nowrap;}
.ui .chip.diaryQuickChip.isLocked {color: var(--muted); background: var(--sunk);}
.ui .diaryQuickAdded {display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2);}
.ui .diaryQuickAdded .grow {flex: 1 1 auto; min-width: 0;}
.ui .diaryQuickManage .diaryAmount {flex: none; width: 6em;}
/* ⤓ EXPORT: its keys from the left */
.ui .diaryExport .cardActs {justify-content: flex-start;}
/* HISTORY: the week card (◀ title ℹ️ | this week ▶), 4 small charts, the averages, the days */
.ui .diaryWeekNav {text-transform: none; letter-spacing: 0;}
.ui .diaryWeekCharts {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px;}
@media (max-width: 480px) {.ui .diaryWeekCharts {grid-template-columns: minmax(0, 1fr);}}
.ui .diaryWeekChart {min-width: 0;}
.ui .diaryWeekHead {display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2);}
.ui .diaryWeekHead .diaryNum {font-size: var(--f1);}
.ui svg.diaryWeekSvg {display: block; width: 100%; height: auto;}
.ui .diaryWeekHit {fill: transparent;}
.ui .diaryWeekSlot:hover .diaryWeekHit {fill: var(--sunk);}
.ui .diaryWeekAxis {stroke: var(--line); stroke-width: 1;}
.ui .diaryWeekGoal {stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 5, 4;}
.ui .diaryWeekBar {fill: var(--text);}
.ui .diaryWeekBar.isNear {fill: var(--wOk);}
.ui .diaryWeekBar.isOn {fill: var(--wPerfect);}
.ui .diaryWeekBar.isOver {fill: var(--wOver);}
.ui .diaryWeekBar.isNone {fill: var(--muted);}
.ui text.diaryWeekDay {font-size: 10px; fill: var(--muted); text-anchor: middle;}
.ui text.diaryWeekDay.diaryWeekToday {font-weight: 700; fill: var(--text);}
.ui .diaryAverages {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2);}
.ui .card.diaryAverage {display: grid; gap: 4px; padding: 10px 12px;}
.ui .diaryAverageValue {display: flex; align-items: baseline; gap: 4px;}
.ui .diaryAverageValue .diaryNum {font-size: var(--f5);}
.ui .diaryDay .grow .diaryBar {margin-top: 6px;}
.ui .diaryMore {justify-content: center;}
/* PERSONS: one card per person (the active one with the accent edge): icon | name | 🗑, then the groups of goals */
.ui .diarySecHead {display: flex; align-items: center; gap: 6px;}
.ui .card.diaryPerson.isActive {border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent);}
.ui .diaryPersonHead {display: flex; align-items: center; gap: var(--s2); padding: 10px 12px; border-bottom: 1px solid var(--line);}
.ui .diaryPersonHead .sel.diaryEmoji {flex: none; width: 4.6em;}
.ui .diaryPersonHead .inp {flex: 1 1 auto;}
/* the windows: ✏️ edit, ＋ add food (search with 📷, results, the sub-page ← Which THING?), 📒 add from the log, 🔄 sync */
.ui .diaryOthers {display: grid; gap: var(--s2);}
.ui .diaryOtherLine {display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 6px; align-items: end;}
.ui .diaryAddForm, .ui .diaryThingPick {display: grid; gap: var(--s3); min-width: 0;}
.ui .diaryResultList {max-height: 14em; overflow-y: auto; overscroll-behavior: contain;}
.ui .diaryResult .grow {font-weight: 400;}
.ui .diaryResult.diaryResultStrong .grow {font-weight: 700;}
.ui .diaryResult.diaryResultWeak .grow {color: var(--muted);}
.ui .diaryStatus:empty {display: none;}
.ui .diarySourceKeys {justify-content: flex-start;}
.ui .diarySubHead {display: flex; align-items: center; gap: var(--s2); font-size: var(--f3); font-weight: 700;}
.ui .diaryThingRows {max-height: 50vh; overflow-y: auto; overscroll-behavior: contain;}
.ui .diaryChev {flex: none; color: var(--muted);}
.ui .row.diaryAddLine {cursor: pointer;}
.ui .row.diaryAddLine input {flex: none; width: 18px; height: 18px; accent-color: var(--main);}
.ui .tabs.diarySeg {border: 1px solid var(--line); border-radius: var(--r2);}
.ui .tabs.diarySeg .tab {flex: 1 1 0; min-width: 0; white-space: normal;}
.ui .diarySplit {display: grid; gap: 6px;}
.ui .diaryShare {display: grid; grid-template-columns: 5em minmax(0, 1fr); align-items: center; gap: var(--s2); font-size: var(--f2);}
.ui p.diaryDone {font-size: var(--f4); font-weight: 700;}
.ui .diarySyncLine {display: flex; align-items: center; flex-wrap: wrap;}
.ui .diarySyncCode .cardBody {text-align: center; gap: 4px;}
.ui .diarySyncDigits {font: 700 var(--f6)/1.1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0.08em;}
.ui .diarySyncSpinner {margin-right: 6px;}
.ui .diarySyncPercent {font-variant-numeric: tabular-nums; font-weight: 700;}
.ui .chk.diaryChoice {align-items: flex-start;}
.ui .diaryChoiceInfo {display: block;}
.ui .card.diarySyncInfo.isDanger {border-color: var(--danger); box-shadow: inset 4px 0 0 var(--danger);}
/* RECIPES (mode_recipes.js, recipe_tools.js, the recipe cards of nutrition_cooking.js and bakers_tools.js): the pages 101 - 120 of the
   scale are one column of cards in #extraTextDiv (classes "ui rcpPage", the cards in div.rcpCards); the run page (116) is its own column
   #recipeRunPage.ui.rcpRun in #checkModeDiv below the weight; every page has the key row #rcpKeys (TARE left only on the run page, the
   main key right, the rest behind ⋯). The RECIPES page: card YOUR RECIPES as list rows (sign | text | ›), cards 🥗 🍞 🌿 that fold. The
   list: chips of the kinds, the filter with ＋ NEW, rows (sign | name, approval line, ⏸ chips | ⤓ ✏️ ✕ - a tapped row waits with a
   turning ⚖). The form: cards, one card per ingredient (the rows of the table as a grid: name | amount, THING, food link, ⚙ opens the
   extra lines in the same card). The start page: AMOUNT, ingredients as rows with the amount right-aligned, 📦 🍞 🥗 ⎙ 💰. The run: the
   ingredient big, the goal bar, the result box in the weighing colours (under yellow, ready green, over red - only here), PROGRESS rows
   with a coloured edge (none | under orange | ready green | over red), 🧾 LOT NUMBERS. */
.ui.rcpPage {display: block; text-align: left;}
.ui.rcpPage .rcpCards, .ui.rcpRun {display: grid; gap: var(--s3); width: 100%; max-width: 720px; margin: 0 auto; padding: var(--s3) 0; box-sizing: border-box;}
.ui.rcpRun {padding: var(--s3);}
.ui.rcpPage p, .ui.rcpRun p, .ui .rcpPanel p {margin: 0;}
.ui .rcpCardTitle {flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere;} /* (the ℹ️ right behind the title, the fold sign at the right end) */
.ui details.card > summary .i, .ui .cardHead .i {flex: none;}
.ui .cardBody.rcpFlush {padding: 0;}
.ui .cardBody.rcpFlush > .list {border: 0; border-radius: 0; box-shadow: none;}
.ui button.rcpNavRow {width: 100%; font: inherit; text-align: left; color: var(--text); background: var(--surface); border: 0; border-top: 1px solid var(--line); border-radius: 0; cursor: pointer;}
.ui button.rcpNavRow:first-child {border-top: 0;}
.ui button.rcpNavRow:hover {background: var(--sunk);}
.ui .rcpChev {flex: none; font-size: var(--f4); color: var(--muted);}
.ui .rcpUnitJoin {align-items: center;}
.ui .rcpUnitJoin > .sel {flex: 0 1 auto; width: auto;}
.ui .rcpUnit {flex: none; font-size: var(--f2); font-weight: 700; color: var(--muted); white-space: nowrap;}
.ui input.rcpNum {text-align: right; font-variant-numeric: tabular-nums;}
.ui .inp.rcpBig {font-size: var(--f5); font-weight: 700;}
.ui .rcpTwo, .ui .rcpFields {display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3);}
.ui .rcpFields {align-items: end;} /* (a label in two lines: the fields of a row stay on one line) */
.ui .rcpWide {grid-column: 1 / -1;}
.ui .rcpBold {font-weight: 700;}
.ui .kv .rcpBold {font-weight: 800;}
.ui .rcpDanger {color: var(--danger); font-weight: 700;}
.ui .rcpError:empty {display: none;}
.ui .note.rcpWarn {color: var(--warnText); background: var(--warnBg);}
.ui .rcpSmall {display: block; font-size: var(--f1); font-weight: 400; color: var(--muted); font-family: var(--font);}
.ui .rcpNoWrap {white-space: nowrap;}
.ui .cardActs.rcpLeft {justify-content: flex-start;}
.ui .secLabel.rcpSecLabel {display: flex; align-items: center; gap: 6px; margin-top: 4px;}
.ui .rcpText {min-height: 8em; resize: vertical; font-family: var(--font); line-height: 1.4; white-space: pre-wrap;}
/* the rows of amounts: the name left (a small line below it), the amount right */
.ui .rcpAmounts {display: grid;}
.ui .rcpAmountRow {display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding: 6px 0; border-top: 1px solid var(--line);}
.ui .rcpAmountRow:first-child {border-top: 0;}
.ui .rcpAmountName {min-width: 0; overflow-wrap: anywhere;}
.ui .rcpAmountValue {flex: none; font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui .rcpAmountValue .rcpSmall {text-align: right;}
.ui .rcpAmountRow.rcpAmountSum {border-top: 2px solid var(--edge); font-weight: 800;}
/* the values of a recipe or a pot (cooking_values_table): name | one column per amount, the head row small, the "of which" lines indented */
.ui .cookVals {display: grid; grid-template-columns: minmax(0, 1fr) repeat(var(--cols, 1), auto); gap: 4px 12px; font-size: var(--f2);}
.ui .cookVals .hd {font-size: var(--f0); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: right;}
.ui .cookVals .nm {min-width: 0; overflow-wrap: anywhere;}
.ui .cookVals .nm.cookSub {padding-left: 1.2em; color: var(--muted);}
.ui .cookVals b {font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
/* 🍦 / 🍬 values of a recipe (sweet_cards.js): name | value | light + band (small) */
.ui .sweetVals {display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 10px; font-size: var(--f2); align-items: baseline;}
.ui .sweetVals .nm {min-width: 0; overflow-wrap: anywhere;}
.ui .sweetVals b {font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui .sweetVals .sweetBand {display: flex; gap: 4px; align-items: baseline; justify-content: flex-end; white-space: nowrap;}
.ui .sweetVals .sweetBand small {font-size: var(--f0); color: var(--muted); font-variant-numeric: tabular-nums;}
.ui .rcpSweetSign {white-space: nowrap;}
/* 🍞 the dough: name | weight | baker's % */
.ui .rcpDough {display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 12px; font-size: var(--f2);}
.ui .rcpDough .hd {font-size: var(--f0); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: right;}
.ui .rcpDough .hd:first-child {text-align: left;}
.ui .rcpDough .nm {min-width: 0; overflow-wrap: anywhere;}
.ui .rcpDough b {font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui .rcpDough .rcpSum {padding-top: 4px; border-top: 1px solid var(--edge); font-weight: 800;}
/* 📦 I ONLY HAVE: amount | unit 'of' | ingredient | ✕ */
.ui .rcpHaveRow {display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2);}
.ui .rcpHaveRow > .inp {flex: 0 0 7em; width: 7em;}
.ui .rcpHaveRow > .sel {flex: 1 1 10em; width: auto;}
/* ⎙ PORTIONS: ☐ loss + %, the result */
.ui .rcpLossRow {display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3);}
.ui .rcpLossRow .chk .i {margin-left: 2px;}
.ui .rcpLossRow .join {flex: 0 0 8em;}
.ui .rcpPortionsResult, .ui .rcpCostsResult {display: grid; gap: var(--s2);}
/* THE LIST: kinds, filter + ＋ NEW, rows */
.ui .rcpList {display: grid; gap: var(--s3);}
.ui .rcpKinds .chip {cursor: pointer;}
.ui .rcpCount:empty {display: none;}
.ui .rcpCount .btn {margin-left: 4px;}
.ui .rcpRow {align-items: flex-start;}
.ui .rcpRow > .btn {flex: none; margin-top: 4px;}
.ui .rcpRow > .e {margin-top: 6px;}
.ui .rcpRow .grow {display: grid; gap: 4px; padding: 6px 0;}
.ui button.rcpRowName {padding: 0; font: inherit; font-weight: 600; text-align: left; color: var(--text); background: transparent; border: 0; overflow-wrap: anywhere; cursor: pointer;}
.ui .btn.rcpDel {color: var(--danger);}
.ui .rcpPaused .chip {min-height: 24px; font-size: var(--f1); cursor: pointer;}
.ui .rcpWait {display: none; flex: none; font-size: var(--f4); margin-top: 8px;}
.ui .rcpRow.pending .rcpWait {display: inline-block;}
.ui .approvalLine {font-size: var(--f1); font-weight: 400; color: var(--muted);}
.ui .approvalLine.isDanger {color: var(--danger);}
.ui .approvalLine .btn {margin-left: 4px;}
/* THE FORM: one card per ingredient (the rows of the table as a grid) */
.ui table#recipe_input_ingredients_list {display: block; width: 100%; margin: 0; border-collapse: separate;}
.ui table#recipe_input_ingredients_list tr {display: grid; grid-template-columns: minmax(0, 1fr) 8em; column-gap: var(--s2);}
.ui table#recipe_input_ingredients_list tr > th, .ui table#recipe_input_ingredients_list tr > td {display: block; min-width: 0; padding: 0; font-weight: 400; text-align: left;}
.ui table#recipe_input_ingredients_list tr.headTR {padding: 0 10px; font-size: var(--f1); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);}
.ui table#recipe_input_ingredients_list tr.headTR th.headsName {text-align: right; white-space: nowrap;}
.ui table#recipe_input_ingredients_list tr.headTR th.headsName span {color: var(--text);}
.ui table#recipe_input_ingredients_list tr.ingredientMainTr {grid-template-areas: "name amount" "name hint" "vol vol" "search search" "more more"; row-gap: 4px; margin-top: var(--s2); padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2);}
.ui table#recipe_input_ingredients_list tr.ingredientMainTr.isOpen {border-bottom: 0; border-radius: var(--r2) var(--r2) 0 0;}
.ui table#recipe_input_ingredients_list tr.ingredientMainTr.isBad {border-color: var(--danger); box-shadow: inset 4px 0 0 var(--danger);}
.ui table#recipe_input_ingredients_list select {padding-right: 28px; text-overflow: ellipsis;}
.ui table#recipe_input_ingredients_list th.nameInputTh {grid-area: name; display: grid; gap: 4px; align-content: start;}
.ui table#recipe_input_ingredients_list div.ingredientNameLine {display: flex; align-items: stretch; gap: 4px;}
.ui table#recipe_input_ingredients_list input, .ui table#recipe_input_ingredients_list select {min-width: 0; min-height: var(--ctl); padding: 6px 8px; font-size: var(--fIn); color: var(--text); background-color: var(--surface); border: 1px solid var(--edge); border-radius: var(--r1);}
.ui table#recipe_input_ingredients_list th.nameInputTh input {flex: 1 1 auto; width: 100%; font-weight: 700;}
.ui table#recipe_input_ingredients_list select.ingredientActionCompact {flex: 0 0 auto; width: auto; max-width: 8em; padding-right: 22px; font-size: var(--f1); font-weight: 700;}
.ui table#recipe_input_ingredients_list td.ingredientAmountTd {grid-area: amount; align-self: start; display: flex; align-items: center; gap: 4px;}
.ui table#recipe_input_ingredients_list input.percentInput {flex: 1 1 auto; width: 100%; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums;}
.ui table#recipe_input_ingredients_list span.ingredientUnit {flex: none; font-size: var(--f2); font-weight: 700; color: var(--muted);}
.ui table#recipe_input_ingredients_list select.ingredientUnitSelect {display: block; width: 100%; min-height: var(--ctlS); margin: 0 0 4px 0; font-size: var(--f2);}
.ui table#recipe_input_ingredients_list td.ingredientVolumeTd {grid-area: vol;}
.ui table#recipe_input_ingredients_list td.ingredientVolumeTd:empty {display: none;}
.ui table#recipe_input_ingredients_list div.ingredientVolumeLine {display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; font-size: var(--f2);}
.ui table#recipe_input_ingredients_list div.ingredientVolumeLine input {width: 5em; text-align: right;}
.ui table#recipe_input_ingredients_list input.recipeVolumeMissing {border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger);}
.ui table#recipe_input_ingredients_list span.recipeVolumeGuess {font-weight: 700; color: var(--warnText); background: var(--warnBg); padding: 0 4px; border-radius: var(--r1);}
.ui table#recipe_input_ingredients_list span.recipeVolumeGrams {min-width: 4.5em; font-family: var(--mono); text-align: right; color: var(--muted);}
.ui table#recipe_input_ingredients_list td.ingredientHintTd {grid-area: hint; align-self: start; display: grid; gap: 4px;}
.ui table#recipe_input_ingredients_list td.ingredientSearchTd {grid-area: search;}
.ui table#recipe_input_ingredients_list td.ingredientSearchTd:empty {display: none;}
.ui table#recipe_input_ingredients_list td.ingredientMoreTd {grid-area: more; display: flex; justify-content: flex-end;}
.ui table#recipe_input_ingredients_list tr.ingredientMainTr.isOpen .ingredientMoreButton {background: var(--mainSoft); border-color: var(--main);}
.ui table#recipe_input_ingredients_list tr.ingredientExtraTr {display: block; padding: 0 10px 8px 10px; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-bottom: 0;}
.ui table#recipe_input_ingredients_list tr.ingredientExtraTr[style*="none"] {display: none;}
.ui table#recipe_input_ingredients_list tr.ingredientExtraTr:not(.ingredientExtraLastTr) {padding-top: 8px; border-top: 1px dashed var(--line); margin-top: -1px;}
.ui table#recipe_input_ingredients_list tr.ingredientExtraLastTr {border-bottom: 1px solid var(--line); border-radius: 0 0 var(--r2) var(--r2); padding-bottom: 10px;}
.ui table#recipe_input_ingredients_list tr.ingredientExtraTr > td {display: grid; gap: var(--s2);}
.ui table#recipe_input_ingredients_list div.ingredientExtraLine {display: flex; flex-wrap: wrap; align-items: center; gap: 6px;}
.ui table#recipe_input_ingredients_list div.ingredientExtraLine select {flex: 1 1 9em;}
.ui table#recipe_input_ingredients_list div.ingredientExtraLine input[type="number"] {width: 4.5em; text-align: right;}
.ui table#recipe_input_ingredients_list div.ingredientExtraLine input[type="text"] {flex: 1 1 10em; width: auto;}
.ui table#recipe_input_ingredients_list span.ingredientExtraLabel {font-size: var(--f1); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);}
.ui table#recipe_input_ingredients_list div.ingredientExtraOneLine {flex-wrap: nowrap;}
.ui table#recipe_input_ingredients_list div.ingredientExtraOneLine select {flex: 1 1 0; width: 0;}
.ui table#recipe_input_ingredients_list div.ingredientExtraOneLine input[type="number"] {flex: 0 0 4em; width: 4em;}
.ui table#recipe_input_ingredients_list div.ingredientMoveButtons {display: flex; gap: var(--s2); justify-content: flex-end;}
.ui table#recipe_input_ingredients_list input.thingLinked {border-color: var(--ok); box-shadow: inset 4px 0 0 var(--ok);}
.ui table#recipe_input_ingredients_list select.thingLinkSelect {display: block; width: 100%; min-height: var(--ctlS); font-size: var(--f2);}
.ui table#recipe_input_ingredients_list span.thingHint {display: grid; gap: 4px; min-width: 0;}
.ui table#recipe_input_ingredients_list span.thingHint:empty {display: none;}
.ui table#recipe_input_ingredients_list .thingSuggestButton {max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;}
.ui table#recipe_input_ingredients_list span.thingFoodLink {display: block; min-width: 0; font-size: var(--f1); overflow-wrap: anywhere;}
.ui table#recipe_input_ingredients_list span.thingFoodLink > .btn {display: block; width: 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.ui table#recipe_input_ingredients_list span.thingFoodLink.isLinked {display: flex; align-items: center; gap: 4px; max-width: 100%;}
.ui table#recipe_input_ingredients_list span.thingFoodLink.isLinked > span {flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.ui table#recipe_input_ingredients_list .bx {flex: none; width: 24px; height: 24px; padding: 0; font-size: var(--f2); line-height: 1; color: inherit; background: transparent; border: 0;}
.ui table#recipe_input_ingredients_list div.cookSearch {margin-top: 4px;}
.ui table#recipe_input_ingredients_list div.cookSearch input {width: 100%;}
.ui .thingLinkBar .hint {margin: 0;}
.ui.keyRow .btn.isBusy {opacity: 0.6; cursor: default;}
/* THE RUN: the ingredient, the chips, the goal bar, the result box, PROGRESS */
.ui .rcpRunTop {display: grid; gap: var(--s2);}
.ui .rcpIngredient {display: grid; justify-items: center; gap: 2px; padding: var(--s2) 0; text-align: center; border-bottom: 2px solid var(--edge);}
.ui .rcpAction {font-size: var(--f1); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);}
.ui .rcpIngredientName {font-size: var(--f6); font-weight: 800; line-height: 1.1; overflow-wrap: anywhere;}
.ui .rcpIngredientName.isMid {font-size: var(--f5);}
.ui .rcpIngredientName.isLong {font-size: var(--f4);}
.ui .rcpBowl {margin-top: 4px; padding: 2px 8px; font-size: var(--f2); font-weight: 700; color: var(--noteText); background: var(--noteBg); border-radius: var(--r1);}
.ui .rcpRunTop > .hint {text-align: center;}
.ui .rcpInstruction {font-size: var(--f3); font-weight: 600; text-align: center; overflow-wrap: anywhere;}
.ui .rcpChips {justify-content: center;}
.ui .rcpChips .chip {cursor: pointer;}
.ui .rcpGoal {display: grid; gap: 4px;}
.ui .rcpGoal .bar span {transition: width 0.15s;}
.ui .rcpGoalText {font-size: var(--f1); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums;}
.ui .state.rcpState {position: relative; display: grid; gap: 4px; padding: 12px calc(var(--hit) + 12px); background: var(--sunk); color: var(--text);}
.ui .state.rcpState.wUnder {background: var(--wUnder); color: var(--onW);}
.ui .state.rcpState.wPerfect {background: var(--wPerfect); color: var(--onW);}
.ui .state.rcpState.wOver {background: var(--wOver); color: var(--onWOver);}
.ui .rcpStateWord {font-size: var(--f5); font-weight: 800; letter-spacing: 0.04em; overflow-wrap: anywhere;}
.ui .rcpStateVol {font-size: var(--f3); font-weight: 600;}
.ui .rcpStateName {font-size: var(--f2); font-weight: 600; overflow-wrap: anywhere;}
.ui .rcpSound {position: absolute; top: 8px; right: 8px; width: var(--hit); height: var(--hit); padding: 0; font-size: var(--f4); line-height: 1; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 50%;}
@media (max-width: 479px) {.ui .state.rcpState .big {font-size: var(--f5);}}
.ui .rcpProg {display: grid;}
.ui button.rcpProgRow, .ui .rcpProgRow {box-sizing: border-box; display: grid; grid-template-columns: 1.2em minmax(0, 1fr) auto 4.2em; align-items: baseline; gap: 2px var(--s2); width: 100%; min-height: 40px; padding: 6px 10px 6px 8px; font: inherit; font-size: var(--f2); text-align: left; color: var(--text); background: var(--surface); border: 0; border-top: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: 0;}
.ui button.rcpProgRow {cursor: pointer;}
.ui .rcpProg > .rcpProgRow:first-child {border-top: 0;}
.ui .rcpProgRow.rcpUnder {border-left-color: var(--wUnder);}
.ui .rcpProgRow.rcpOk {border-left-color: var(--wPerfect);}
.ui .rcpProgRow.rcpOver {border-left-color: var(--wOver);}
.ui .rcpProgRow.isNow {background: var(--accentSoft); font-weight: 700;}
.ui .rcpProgRow.rcpProgSum {border-top: 2px solid var(--edge); background: var(--sunk); font-weight: 800;}
.ui .rcpProgMark {text-align: center; font-weight: 800;}
.ui .rcpProgName {min-width: 0; overflow-wrap: anywhere;}
.ui .rcpProgNum, .ui .rcpProgDiff {font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui .rcpProgVol {display: block; font-family: var(--font); font-size: var(--f0); color: var(--muted);}
.ui .rcpProgRow.rcpOver .rcpProgDiff {color: var(--danger); font-weight: 800;}
/* the main key of the run: LOCK & TARE, the new total small below it; its lower edge in the colour of the result */
.ui.keyRow .rcpKeyMain {display: block;}
.ui.keyRow .rcpKeySub {display: block; font-family: var(--mono); font-size: var(--f1); font-weight: 400; font-variant-numeric: tabular-nums; opacity: 0.85;}
.ui.keyRow .btn.main.rcpEdge_wUnder {box-shadow: inset 0 -5px 0 var(--wUnder);}
.ui.keyRow .btn.main.rcpEdge_wPerfect {box-shadow: inset 0 -5px 0 var(--wPerfect);}
.ui.keyRow .btn.main.rcpEdge_wOver {box-shadow: inset 0 -5px 0 var(--wOver);}
.ui.keyRow.rcpKeys .btn {flex-direction: column; gap: 0;}
.ui.keyRow .btn.rcpMoreKey {flex: 0 0 var(--key); width: var(--key); min-width: var(--key); font-size: var(--f4);}
@media (max-width: 899px) {.ui.keyRow.rcpKeys .btn.tare {flex: 0 1 auto; min-width: 22%; white-space: nowrap;}}
/* (wide: the keys of the run get narrower, the row stays right of the docked menu) */
/* (a phone: five keys in one row - long words of some languages break inside the key, never out of it) */
@media (max-width: 479px) {
	.ui.keyRow.rcpKeys {gap: 4px; padding-left: 8px; padding-right: 8px;}
	.ui.keyRow.rcpKeys .btn {padding: 4px; font-size: var(--f2); white-space: normal; overflow-wrap: anywhere; hyphens: auto;}
	.ui.keyRow.rcpKeys .btn.tare {flex: 1 1 0; min-width: 0; white-space: normal;}
}
/* 🧾 LOT NUMBERS of the run: name | field | 📷, the use-by date below */
.ui .recipeLotRow {display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: center; gap: 4px var(--s2); padding: 6px 0; border-top: 1px solid var(--line);}
.ui .recipeLotRow:first-child {border-top: 0;}
.ui .recipeLotName {min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600;}
.ui .recipeLotRow .recipeLotExpiry {grid-column: 1 / -1;}
.ui .recipeLotRow .recipeLotExpiry:empty {display: none;}
/* the windows: ⋯ MORE as rows, the instructions, the import of a website / cookbook */
.ui .rcpDescText {font-size: var(--f3); text-align: left; white-space: pre-wrap; overflow-wrap: anywhere;}
div#recipeDescriptionWindow div.busyBox, div#recipeWebWindow div.busyBox, div#recipeRecalcWindow div.busyBox {max-width: 36em; text-align: left;}
.ui .rcpPanel {display: grid; gap: var(--s3); text-align: left;}
.ui .rcpPanel.dontShowDiv {display: none;}
.ui .rcpSteps {margin: 0; padding-left: 1.4em;}
.ui .rcpSteps li {margin: 2px 0;}
.ui #recipeWebTabs {margin-bottom: var(--s3);}
.ui #recipeWebTabs .tab {cursor: pointer;}
.ui a.recipeBookmarklet {font-weight: 700; text-decoration: none; cursor: grab;} /* (🔖 dragged to the bookmarks bar) */
/* TRACKING, FACTORY, SORTING (mode_tracking.js, mode_factory.js, mode_sorting.js): every page one column of cards under the head or the
   weight (div.ui.ccPage - the parts of COUNTING AND CHECK WEIGHING), TARE at the left end of the key row, at most two keys between
   (.progKey: prog_keys_set), ⋯ (the other actions in the app's window, .progMoreList), the main key at the right end (#stepMainButton or END
   THE PROGRAM). A line of a form: texts and fields side by side (.trkLine); fields of numbers right-aligned (.trkNum).
   TRACKING: the name of the run + its badge, the tabs, the red alarm card, the tiles (2 columns on a phone), the chart cards (the chips of the
   ranges scroll, GROSS · NET · BOTH in the head of the weight card), the tables with right-aligned numbers, the popup of a marker.
   FACTORY: the line Mold # · Unit, the step / result panel (neutral steps, weighing colours for results), its keys under it, TOTALS rows
   (over red, under orange), the container list (row: name + ranges, '8 × 20 g' right, ▸ or 🗑), the ▸ rows of the form that unfold.
   SORTING: the category badges in their colours, the categories of the setup, the status panel of 3 fixed lines, the bar, COUNTED rows. */
@media (max-width: 899px) {.ui.keyRow .btn.progKey {min-width: var(--key);}} /* (a key between keeps at least its icon and … on a phone) */
.ui.keyRow .btn.progKey .grow {min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.ui.keyRow .btn.progMoreKey {flex: 0 0 var(--key); width: var(--key); min-width: var(--key); font-size: var(--f4);}
.ui.keyRow .btn.progKey .lock {margin-left: 4px;}
@media (max-width: 479px) { /* (a narrow phone: a key between shows only its sign - its label is the title -, TARE takes its own width, the main key the rest) */
	.ui.keyRow.pageKeys:has(.progKey:not(.dontShowButton)) {gap: 4px; padding-left: 8px; padding-right: 8px;}
	.ui.keyRow.pageKeys:has(.progKey:not(.dontShowButton)) .btn.tare {flex: 0 0 auto; min-width: 0; padding: 4px 6px; font-size: var(--f2); letter-spacing: 0;}
	.ui.keyRow.pageKeys:has(.progKey:not(.dontShowButton)) .btn.main {padding: 4px; font-size: var(--f2); letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; hyphens: auto;}
	.ui.keyRow .btn.progKey.hasSign {flex: 0 0 var(--key); width: var(--key); padding: 4px; font-size: var(--f4);}
	.ui.keyRow .btn.progKey.hasSign .txt {display: none;}
	.ui.keyRow .btn.progKey.hasSign .grow {text-overflow: clip;}
}
.ui .progMoreList button.row {width: 100%; font: inherit; font-weight: 600; text-align: left; color: var(--text); background: var(--surface); border: 0; border-top: 1px solid var(--line); border-radius: 0;}
.ui .progMoreList button.row:first-child {border-top: 0;}
.ui .progMoreList button.row.danger {color: var(--danger);}
.ui .progMoreList button.row.isLocked {color: var(--muted); background: var(--sunk);}
.ui .progMoreList .progMorePart {flex-wrap: wrap;}
.ui .progMoreList .progMorePart > span {display: flex; align-items: center; gap: var(--s2); width: 100%; min-width: 0;}
.ui .progMoreList .progMorePart select {flex: 1 1 auto; min-width: 0; min-height: var(--ctl); max-width: 100%; padding: 4px 8px; border: 1px solid var(--edge); border-radius: var(--r1); background: var(--surface);}
.ui .trkLine {display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s2); font-size: var(--f2);}
.ui .trkLine .chk {min-height: 0;}
.ui .inp.trkNum {flex: 0 1 6.5em; width: 6.5em; text-align: right; font-variant-numeric: tabular-nums;}
.ui .join > .inp.trkNum {flex: 1 1 auto;}
@media (max-width: 479px) {.ui.facPage .trkLine {gap: 6px;} .ui.facPage .trkLine > .inp.trkNum {flex: 1 1 3.5em; width: 3.5em; min-width: 3em;}} /* (the lines of the factory form: 'From [ ] % less to [ ] % more' in one line on a phone) */
.ui.ccPage .trkErr, .ui.ccPage .trackingDryResult .ccErr {color: var(--danger); font-weight: 700;}
.ui.ccPage .trackingDryResult {display: grid; gap: 2px; font-size: var(--f2);}
.ui .trkHead .trkName {display: flex; align-items: center; gap: var(--s2); font-size: var(--f4); font-weight: 700;}
.ui .trkHead .trkName .grow {flex: 1; min-width: 0; overflow-wrap: anywhere;}
.ui .trkBadge {flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; font-size: var(--f1); font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; color: var(--text); background: var(--sunk); border: 1px solid var(--line); border-radius: var(--rPill);}
.ui .trkBadge.isRec {background: var(--surface); border-color: var(--edge);}
.ui .trkBadge img, .ui .trkBadge svg {width: 1em; height: 1em;}
.ui.trkRun .trkTabs {margin: 0 calc(-1 * var(--s3));}
.ui.trkRun .trkTabs .tab {cursor: pointer;}
.ui.trkRun .trkPane {display: grid; gap: var(--s3);}
.ui.trkRun .trkPane.dontShowDiv {display: none;}
.ui.trkRun .trkPane > :empty {display: none;} /* (no grid gap for the alarm / finished / creep places while they are empty) */
.ui .trkAlarmCard {border-color: var(--danger); border-left: 6px solid var(--danger);}
.ui .trkAlarmCard .cardBody {gap: var(--s2);}
.ui .trkAlarmRow {display: flex; align-items: baseline; gap: var(--s2); font-weight: 700; color: var(--danger);}
.ui .trkAlarmRow .grow {flex: 1; min-width: 0;}
.ui .trkTime {flex: none; font: var(--f1) var(--mono); font-weight: 400; color: var(--muted); white-space: nowrap;}
.ui .trkDone .trkDoneText {margin: 0; font-weight: 700;}
.ui .trkTiles {display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: var(--r2);}
@media (max-width: 480px) {.ui .trkTiles {grid-template-columns: 1fr 1fr;}}
.ui .trkTile {min-width: 0; display: grid; align-content: start; gap: 2px; padding: 8px 10px; background: var(--surface);}
.ui .trkTile .k {font-size: var(--f1); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);}
.ui .trkTile .v {font: 600 var(--f4)/1.2 var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;}
.ui .trkTile .s {font-size: var(--f1); color: var(--muted); overflow-wrap: anywhere;}
.ui .trkTile.isHit {box-shadow: inset 0 -3px 0 var(--accent);}
.ui .trkCharts {display: grid; gap: var(--s3);}
.ui .trkCharts .card.dontShowDiv {display: none;}
.ui .trkCharts .cardHead {flex-wrap: wrap;}
.ui .trkCurve {margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400;}
.ui .trkCurve .chip, .ui .trkRanges .chip {cursor: pointer; font-size: var(--f1);}
.ui .trkRanges {display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s2); min-width: 0;}
.ui .trkRangeChips {flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); padding-right: 24px;}
.ui .trkRangeChips .chip {flex: none;}
.ui .trkZoom {display: flex; gap: 6px; margin-left: auto;}
.ui .trkZoom .btn.on {background: var(--mainSoft); border-color: var(--main);}
.ui .trkChartBody {display: grid; gap: 4px;}
.ui .trkViewText {text-align: center; font-variant-numeric: tabular-nums;}
#trackingCharts svg {display: block; width: 100%; height: auto; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;}
#trackingCharts.trackingChartsHeld svg {outline: 1px dashed var(--main); outline-offset: 2px;}
.ui .trkWide {overflow-x: auto;}
.ui table.trkTbl {width: 100%; border-collapse: collapse; font-size: var(--f2);}
.ui table.trkTbl th, .ui table.trkTbl td {padding: 6px 6px; border-top: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;}
.ui table.trkTbl tr:first-child th, .ui table.trkTbl tr:first-child td {border-top: 0;}
.ui table.trkTbl th:first-child {text-align: left; font-weight: 600; white-space: normal;}
.ui table.trkTbl td {font-family: var(--mono);}
.ui table.trkTbl:not(.trkDays) td {white-space: normal; overflow-wrap: anywhere;} /* (the two columns of the statistics stay in the width of a phone) */
.ui table.trkTbl td.trackingMuted {font: var(--f1) var(--font); color: var(--muted);}
.ui table.trkTbl.trkDays tr:first-child th {font-size: var(--f0); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);}
.ui .trkCenter {justify-content: center;}
.ui .trkEmpty {text-align: center; padding: var(--s3) 0;}
.ui .trkSteps {margin: 0; padding-left: 1.4em; display: grid; gap: 4px; font-size: var(--f2);}
.ui .trkCreepResult {display: grid; gap: var(--s2);}
.ui .trkCreepResult .kv span {min-width: 0;}
.ui .trkBold {margin: 0; font-weight: 700;}
.ui.trkMarker {position: fixed; z-index: 1000; max-width: 260px; display: grid; gap: 2px; padding: 8px 10px; font-size: var(--f2); color: var(--text); background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r2); box-shadow: var(--shadowWin);}
.ui.trkMarker .trkMarkerAlarm {margin-top: 2px; padding-top: 4px; border-top: 1px solid var(--line); color: var(--danger); font-weight: 700;}
.ui .trkForm {display: grid; gap: var(--s3);}
.ui .facWhere {display: flex; justify-content: space-between; gap: var(--s2); margin: 0; font-size: var(--f2); font-weight: 700; color: var(--muted);}
.ui .state.facState {text-align: center;}
.ui .facState .facWord {font: 700 var(--f5)/1.15 var(--font); overflow-wrap: anywhere;}
.ui .facState .facDo {font-size: var(--f3); font-weight: 600; line-height: 1.35;}
.ui .facState .facDo span {font: 700 var(--f6)/1.1 var(--mono); font-variant-numeric: tabular-nums;}
.ui .facState .facBar {display: grid; gap: 4px;}
.ui .facState .facBar.dontShowDiv {display: none;}
.ui .facState .facChecking {font-size: var(--f2); color: var(--muted);}
.ui .facActs .btn.wide {flex: 1 1 100%;}
.ui .facRows {display: grid;}
.ui .facRow {display: flex; align-items: baseline; gap: var(--s2); padding: 6px 0; border-top: 1px solid var(--line); font-size: var(--f2);}
.ui .facRow:first-child {border-top: 0;}
.ui .facRow .facK {flex: 1; min-width: 0; font-weight: 600;}
.ui .facRow .facV {display: grid; justify-items: end; gap: 2px; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums;}
.ui .facRow .facV b.facOver, .ui .facRow .facV .facOver {color: var(--wOver);}
.ui .facRow .facV b.facUnder, .ui .facRow .facV .facUnder {color: var(--wUnder);}
.ui .facMoldRow .ccW {font-weight: 700;}
.ui .facMoldRow .e {width: 20px; font-size: var(--f3); color: var(--muted);}
.ui .facFold {border-top: 1px solid var(--line);}
.ui .facFold:first-child {border-top: 0;}
.ui .facFold > summary.row {list-style: none; cursor: pointer; padding-left: 0; border-top: 0;}
.ui .facFold > summary.row::-webkit-details-marker {display: none;}
.ui .facFold > summary .chev::after {content: '▸';}
.ui .facFold[open] > summary .chev::after {content: '▾';}
.ui .facFoldBody {display: grid; gap: var(--s3); padding: 0 0 var(--s3) 0;}
.ui .facSave, .ui .sorSave, .ui .facMachine .chk {padding: 0 4px;}
.ui .sorBadge {display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 26px; min-height: 22px; padding: 1px 6px; font-weight: 700; color: #fff; text-shadow: 0 0 2px #000; border-radius: var(--r1);}
.ui .sorOptional button.row {width: 100%; font: inherit; text-align: left; color: var(--text); background: var(--surface); border: 0; border-radius: 0;}
.ui .sorOptional button.row .e {font-size: var(--f3); color: var(--muted);}
.ui .cardHead .sorHeadKey {margin-left: auto; text-transform: none; letter-spacing: 0;}
.ui .cardHead .btn.ico.sorHeadKey {width: var(--ctlS); min-height: var(--ctlS); font-size: var(--f2);}
.ui .sorCats {display: grid;}
.ui .sorCat {display: grid; gap: 6px; padding: var(--s2) 0; border-top: 1px solid var(--line);}
.ui .sorCat:first-child {border-top: 0; padding-top: 0;}
.ui .sorCatHead {display: flex; align-items: center; gap: var(--s2);}
.ui .sorCatHead .inp {flex: 1;}
.ui .sorLimits {display: flex; flex-wrap: wrap; gap: 6px var(--s3);}
.ui .sorLimit {display: grid; gap: 2px;}
.ui .sorUnit {flex: 0 0 auto; width: auto;}
.ui .chips label.chip {cursor: pointer;}
.ui .chips label.chip input {margin: 0; accent-color: var(--main);}
.ui .sorName {margin: 0; font-size: var(--f4); font-weight: 700; overflow-wrap: anywhere;}
.ui .sorStatus {padding: 6px 12px; text-align: center;}
.ui .sorStatus p {margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
.ui .sorStatus p.sortingStatusTop, .ui .sorStatus p.sortingStatusTodo {height: 1.6rem; line-height: 1.6rem; font-size: var(--f3);}
.ui .sorStatus p.sortingStatusCategory {height: 2.4rem; line-height: 2.4rem; font-size: var(--f5); font-weight: 700;}
.ui .sorStatus p.sortingStatusCategory.sortingStatusMessage {font-size: var(--f4);}
.ui .sorStatus .sorBadge {line-height: 1.3; vertical-align: middle;}
.ui .sorFixed {height: 1.4em; line-height: 1.4em; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
.ui .sortingBarDiv svg {display: block; width: 100%; height: auto;}
.ui rect.sortingSeg {opacity: 0.75;}
.ui rect.sortingSegActive {opacity: 1; stroke: var(--text); stroke-width: 4;}
.ui line.sortingSegLine {stroke: var(--text); stroke-width: 3;}
.ui text.sortingSegText {font-size: 32px; font-family: var(--font); fill: var(--text);}
.ui polygon.sortingArrow {fill: var(--text);}
.ui .sorCounted .cardHead {text-transform: none; letter-spacing: 0; font-size: var(--f2);}
.ui .sorCounted .cardHead .grow {flex: 1; min-width: 0;}
.ui .sorCounted .sorTotalW {font-family: var(--mono); font-weight: 600; text-align: right;}
.ui .sorRow {align-items: flex-start;}
.ui .sorNums {display: grid; justify-items: end; gap: 2px; font: var(--f1) var(--mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--muted);}
.ui .sorNums b {font-size: var(--f3); color: var(--text);}
/* ☕ COFFEE (mode_coffee.js, coffee_*.js): the start page (LP 125), the espresso page (121), the coffee weighing (122) and the pour-over
   page (123) - one column of parts under the weight (div.ui.cfPage): the tabs LIVE VIEW | LIVE CHART, the view with its strip on top, the
   values, the step card, HOW DOES IT TASTE?, ☕ RECIPE and 🕘 BREWS & REPORTS (folded); the key row of each page (#coffeeKeys_e / _p / _w);
   the windows (busy_form .cfWin: the brew history, a day, the brew charts, the chart on the whole screen). The coffee view keeps its
   accent (APP_VIEWS --viewAccent). */
.ui.cfPage {display: grid; gap: var(--s3); max-width: 720px; margin: var(--s3) auto 0 auto; padding-bottom: var(--s4);}
.ui.cfPage.dontShowDiv, .ui.cfPage .dontShowDiv, .ui.cfPage .dontShowButton {display: none;}
.ui.cfPage p, .ui .cfText {margin: 0; font-size: var(--f2);}
.ui .cfLead {font-size: var(--f2);}
.ui.cfPage .card > .cardBody > .cardActs .btn.wide {flex: 1 1 100%;}
/* the head of a card: the title with its ℹ️ right behind it; a card that folds: ▸ / ▾ at the end, the recipe in short as its second line */
.ui .cardHead .cfHeadT {min-width: 0;}
.ui details.cfFold > summary.cardHead {flex-wrap: wrap;}
.ui details.cfFold:not([open]) > summary.cardHead {border-bottom: 0;}
.ui .cfHeadSub {flex: 1 0 100%; font-size: var(--f1); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); overflow-wrap: anywhere;}
.ui .cfHeadSub:empty {display: none;}
.ui .cfHeadSub b {color: var(--text);}
.ui .cfLocked > .cardBody {opacity: 0.55;}
/* the groups of a card (READY-MADE, DOSE RATIO TIMES ...): a small label with its ℹ️, a line between two groups */
.ui .cfGroup, .ui .cfGroupBody {display: grid; gap: var(--s2); min-width: 0;}
.ui .cfGroup + .cfGroup {padding-top: var(--s3); border-top: 1px solid var(--line);}
.ui .cfGroup.dontShowDiv {display: none;}
.ui .cfSec {display: flex; align-items: center; gap: 6px; font-size: var(--f1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);}
/* the fields: two per line (one on a narrow phone) - the label above, the box: prefix | the number right-aligned | unit (| ⚖) */
.ui .cfGrid {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s3); align-items: end;}
.ui .cfGrid.cfOne {grid-template-columns: minmax(0, 1fr);}
@media (max-width: 359px) {.ui .cfGrid {grid-template-columns: minmax(0, 1fr);}}
.ui .cfWide {grid-column: 1 / -1;}
.ui .cfFld.dontShowDiv {display: none;}
.ui .cfBox {display: flex; align-items: center; gap: 6px; min-width: 0; min-height: var(--ctl); padding: 0 10px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r1);}
.ui .cfBox:focus-within {outline: 2px solid var(--focus); outline-offset: 1px;}
.ui .cfBox input, .ui .cfBox select {flex: 1 1 auto; min-width: 0; width: 100%; min-height: 0; margin: 0; padding: 4px 0; font: 600 var(--fIn) var(--mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--text); background: transparent; border: 0; outline: none;}
.ui .cfBox.cfTextBox input {font-family: var(--font); text-align: left;}
.ui .cfBox.cfChoice {padding-right: 0;}
.ui .cfBox.cfChoice select {padding-right: 32px; font: var(--fIn) var(--font); text-align: left; cursor: pointer; background-image: var(--selArrow); background-repeat: no-repeat; background-position: right 10px center;}
.ui .cfBox input:disabled {color: var(--text); -webkit-text-fill-color: var(--text); opacity: 1;}
.ui .cfBox.cfRo {background: var(--sunk); border-style: dashed; border-color: var(--muted);}
.ui .cfVal {flex: 1 1 auto; font: 600 var(--fIn) var(--mono); font-variant-numeric: tabular-nums; text-align: right;}
.ui .cfPre, .ui .cfUnit {flex: none; font-size: var(--f2); color: var(--muted); white-space: nowrap;}
.ui .cfBox .btn.cfBoxKey {flex: none; width: calc(var(--ctl) - 10px); min-height: 0; height: calc(var(--ctl) - 10px); margin-right: -6px; padding: 0; font-size: var(--f3); border-color: var(--line); box-shadow: none;}
.ui .fld.isLocked .cfBox, .ui .fld.isLocked select {color: var(--muted); background: var(--sunk); border-color: var(--line);}
.ui .lab.isLocked .lock {margin-left: 4px;}
/* the switch rows: the text (its ℹ️ right behind it) left, the switch right (a 🔒 chip in front of it while locked) */
.ui .cfSws {display: grid; border-top: 1px solid var(--line);}
.ui .cfSw {display: flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 4px 0; font-size: var(--f2); border-bottom: 1px solid var(--line); cursor: pointer;}
.ui .cfSwT {flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px;}
.ui .cfSw .lock {order: 1; margin-left: 0;}
.ui input.cfSwitch {-webkit-appearance: none; appearance: none; order: 2; flex: none; position: relative; width: 44px; height: 24px; margin: 0; background: var(--line); border-radius: 12px; cursor: pointer; transition: background 0.2s;}
.ui input.cfSwitch::before {content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: left 0.2s;}
.ui input.cfSwitch:checked {background: var(--main);}
.ui input.cfSwitch:checked::before {left: 23px;}
.ui .cfSw.isLocked input.cfSwitch {opacity: 0.5;}
@media (prefers-reduced-motion: reduce) {.ui input.cfSwitch, .ui input.cfSwitch::before {transition: none;}}
/* the tabs under the weight (☕ / 🫖 LIVE VIEW with its ℹ️ | 📈 LIVE CHART), the view: the scene or the chart, the strip on top of it */
.ui .cfTabs {background: transparent;}
.ui .cfTabs .cfTabInfo {align-self: center; margin: 0 6px 0 -6px;}
.ui .cfView {min-width: 0;}
.ui .cfStrip {padding: 6px 12px; font-size: var(--f3); font-weight: 700; letter-spacing: 0.04em; line-height: 1.25; text-align: center; color: var(--onFill); border-radius: var(--r1) var(--r1) 0 0;}
.ui .coffeeChartBannerSub {display: block; font-size: var(--f1); font-weight: 400; letter-spacing: 0;}
.coffeeChartBox {touch-action: pan-y; cursor: grab;}
.coffeeChartBox svg.statsChart {display: block; margin: 0 0 4px 0;}
.coffeeChartLegend {display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; font-size: var(--f1); color: var(--muted);}
.coffeeChartLegend i {display: inline-block; width: 1.5em; vertical-align: middle; margin-right: 4px;}
.ui .coffeeChartControls {justify-content: center; margin-top: 6px;}
.ui .coffeeChartControls .btn.cfFull {width: var(--ctlS);}
.ui .coffeeChartHint {flex: 1 0 100%; text-align: center;}
/* the scene (coffee_scene.js, coffee_scene_espresso.js): the drawing of the view - it moves only with measured values */
svg.coffeeScene {display: block; width: 100%; max-width: 30em; height: auto; margin: 0 auto; background: linear-gradient(var(--surface), var(--sunk)); border: 1px solid var(--line); border-radius: var(--r2);}
div.coffeeSceneWrap {position: relative; max-width: 30em; margin: 0 auto;}
svg.coffeeScene .coffeeSceneItem {transition: transform 0.4s ease, opacity 0.4s ease;}
svg.coffeeScene .coffeeSceneWaiting {opacity: 0.35; transform: translateY(-34px);}
svg.coffeeScene .coffeeSceneGlass.coffeeSceneWaiting {transform: translateY(-27px);}
svg.coffeeScene .coffeeSceneHidden {opacity: 0;}
svg.coffeeScene .coffeeSceneLifted {transform: translateY(-30px);}
svg.coffeeScene .coffeeSceneAway {transform: translate(150px, -40px); opacity: 0; transition: transform 1s ease-in, opacity 1s ease-in;}
svg.coffeeScene .coffeeSceneSteam {opacity: 0.6; animation: coffeeSceneSteam 2.1s ease-in-out infinite;}
svg.coffeeScene .coffeeSceneFlash {transform-origin: 160px 109px;}
svg.coffeeScene .coffeeSceneFlashOn {animation: coffeeSceneFlash 1.6s ease-out 1 forwards;}
@keyframes coffeeSceneFlash {0% {opacity: 0; transform: scale(0.6);} 15% {opacity: 1; transform: scale(1.1);} 30% {transform: scale(1);} 75% {opacity: 1;} 100% {opacity: 0; transform: scale(1);}}
@keyframes coffeeSceneSteam {0% {opacity: 0; transform: translateY(6px);} 40% {opacity: 0.8;} 100% {opacity: 0; transform: translateY(-10px);}}
svg.coffeeScene .coffeeSceneKettle {transition: transform 0.25s ease;}
svg.coffeeScene .coffeeSceneReady {filter: drop-shadow(0 0 3px var(--text));}
svg.coffeeScene .coffeeSceneStream {transition: opacity 0.2s;}
svg.coffeeScene .coffeeSceneGauge {transition: y 0.25s, height 0.25s;}
svg.coffeeScene .coffeeSceneArrow {animation: coffeeSceneBounce 1s ease-in-out infinite;}
svg.coffeeScene .coffeeSceneBanner {transform-origin: 160px 15px;}
svg.coffeeScene .coffeeSceneBannerNew {animation: coffeeSceneBannerPulse 1.2s ease-out 1;}
@keyframes coffeeSceneBannerPulse {0% {transform: scale(1);} 25% {transform: scale(1.12);} 100% {transform: scale(1);}}
@keyframes coffeeSceneBounce {0%, 100% {transform: translateY(0);} 50% {transform: translateY(5px);}}
/* (an immersion vessel: no jug, the brewer stands on the scale; the steps to do of a recipe) */
svg.coffeeScene .coffeeSceneGone {display: none;}
svg.coffeeScene .coffeeSceneVessel {transform: translateY(56px);}
svg.coffeeScene .coffeeSceneVessel.coffeeSceneWaiting {transform: translateY(22px);}
svg.coffeeScene .coffeeSceneVessel.coffeeSceneLifted {transform: translateY(26px);}
/* (a dripper in a stand: above the cup, with a gap for the drops) */
svg.coffeeScene .coffeeSceneStand {transform: translateY(-26px);}
svg.coffeeScene .coffeeSceneStand.coffeeSceneWaiting {transform: translateY(-58px);}
svg.coffeeScene .coffeeSceneStand.coffeeSceneLifted {transform: translateY(-54px);}
/* (everything off the scale - an AeroPress pressed next to it: in front of the scale, the foot of the cup on the counter line) */
svg.coffeeScene .coffeeSceneFront.coffeeSceneFront {transform: translate(-24px, 26px); transition: transform 0.9s ease-in-out, opacity 0.4s ease;}
svg.coffeeScene .coffeeSceneSwirl {transform-origin: 150px 146px; animation: coffeeSceneSwirl 1.4s ease-in-out infinite;}
svg.coffeeScene .coffeeSceneRelease {animation: coffeeSceneRelease 1.6s ease-in-out infinite;}
svg.coffeeScene .coffeeSceneSpoon {animation: coffeeSceneStir 1.1s linear infinite;}
svg.coffeeScene .coffeeSceneSpoonAway {transform: translate(28px, -74px); opacity: 0; transition: transform 1.5s ease-in-out, opacity 0.5s ease-in 1s;}
svg.coffeeScene .coffeeSceneSpoonIn {transform: translate(0, 0); opacity: 1; transition: transform 1s ease-out, opacity 0.3s ease-out;}
svg.coffeeScene .coffeeScenePlunger {animation: coffeeScenePress 12s ease-in-out 1 forwards;}
@keyframes coffeeSceneSwirl {0%, 100% {transform: rotate(-4deg) translateX(-3px);} 50% {transform: rotate(4deg) translateX(3px);}}
@keyframes coffeeSceneRelease {0%, 100% {transform: translateY(0);} 50% {transform: translateY(-10px);}}
@keyframes coffeeSceneStir {0%, 100% {transform: translate(-12px, 0);} 25% {transform: translate(0, 2px);} 50% {transform: translate(12px, 0);} 75% {transform: translate(0, -2px);}}
@keyframes coffeeScenePress {0% {transform: translateY(0);} 100% {transform: translateY(38px);}}
@media (prefers-reduced-motion: reduce) {svg.coffeeScene * {transition: none !important; animation: none !important;}}
/* the values: in the cup / water, time, flow, ratio - 4 in a row (2 on a phone), the number right-aligned, its target below */
.ui .cfTiles {display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: var(--r2);}
@media (max-width: 479px) {.ui .cfTiles {grid-template-columns: repeat(2, minmax(0, 1fr));}}
.ui .cfTile {display: grid; gap: 2px; min-width: 0; padding: 8px 10px; background: var(--surface);}
.ui .cfTile .k {font-size: var(--f0); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);}
.ui .cfTile .v {font: 600 var(--f4)/1.2 var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.ui .cfTile .s {min-height: 1.3em; font-size: var(--f0); text-align: right; color: var(--muted); overflow-wrap: anywhere;}
/* the step card: what to do now - a neutral edge; red STOP NOW / stop pouring now, green the result, orange pour faster / slower */
.ui .cfStep {display: grid; gap: 4px; padding: 10px 12px; border-left: 6px solid var(--edge);}
.ui .cfStep.t_stop {border-color: var(--danger); background: var(--dangerSoft);}
.ui .cfStep.t_stop .cfStepT {color: var(--danger);}
.ui .cfStep.t_ready {border-left-color: var(--ok);}
.ui .cfStep.t_pace {border-left-color: var(--wUnder);}
.ui .cfStepT {font-size: var(--f4); line-height: 1.2;}
.ui .cfStepI {font-size: var(--f2); overflow-wrap: anywhere;}
.ui .cfStep .hint {display: block; margin-top: 2px;}
.ui .cfStep .cfMore {display: block; margin-top: 6px; font-weight: 700;}
.ui ol.cfSteps {margin: 4px 0 0 0; padding-left: 1.4em;}
.ui a.cfLink {font-weight: 700; color: var(--text); text-decoration: underline; text-underline-offset: 3px;}
/* the key row of a coffee page: TARE left (gray while the cup is under the machine), the main key right */
@media (max-width: 899px) {.ui.cfKeys .btn.tare {flex: 0 1 auto; min-width: 26%;}}
.ui.cfKeys .btn:disabled {opacity: 0.45;}
/* HOW DOES IT TASTE?: the hint / the pour trainer and the pours, the six tastes as chips, the advice, 🔬 TDS + EY, then 📝 NOTES · 🕘 HISTORY */
.ui .cfTasteHint {font-size: var(--f2); font-weight: 600;}
.ui .cfTasteHint:empty, .ui .coffeeTasteAdvice:empty, .ui .coffeeEyResult:empty {display: none;}
.ui .cfTasteHint .hint {display: block; font-weight: 400;}
.ui .coffeePours {display: grid; gap: 4px; margin-top: 6px; font-weight: 400;}
.ui .cfEy {display: grid; gap: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--line);}
.ui .cfEy .join .cfBox {flex: 1 1 auto;}
.ui .cfEy .join .btn {flex: none;}
.ui .coffeeEyResult .hint, .ui .coffeeEyResult .cfVerdict {display: block;}
svg.coffeeEyChart {display: block; width: 100%; max-width: 20em; height: auto; margin: 6px auto 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r1);}
/* lists in the cards: the library (its head with 💾 SAVE AS · 🔗 SHARE · 📷 SCAN, the recipe of now marked in the accent), the steps of a
   pour-over (number, kind, at, to, in, 🗑 last), the sensors (the state right) */
.ui .cfListHead {display: flex; flex-wrap: wrap; align-items: center; gap: 6px;}
.ui .cfListHead .grow {flex: 1 1 10em; font-size: var(--f1); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);}
.ui .cfListKeys {display: flex; flex-wrap: wrap; gap: 6px;}
.ui .cfLib > .hint {padding: 4px 0;}
.ui .list .row.cfNow {box-shadow: inset 4px 0 0 var(--accent);}
.ui .list.coffeeStepRows.cfEmpty {padding: 10px 12px;}
.ui .row.coffeeStepRow {flex-wrap: wrap; gap: 6px; min-height: 0; padding: 6px 8px;}
.ui .coffeeStepRow .coffeeStepNo {flex: 0 0 1.6em; font-weight: 700; color: var(--muted);}
.ui .coffeeStepRow .sel {flex: 1 1 8em; width: auto; min-height: var(--ctlS); padding-top: 2px; padding-bottom: 2px; font-size: var(--f2);}
.ui .coffeeStepRow .inp {flex: 0 0 4.4em; width: 4.4em; min-height: var(--ctlS); padding: 2px 6px; font: 600 var(--f2) var(--mono); text-align: right; -moz-appearance: textfield; appearance: textfield;}
.ui .coffeeStepRow .inp::-webkit-outer-spin-button, .ui .coffeeStepRow .inp::-webkit-inner-spin-button {-webkit-appearance: none; margin: 0;}
.ui .coffeeStepRow .inp:disabled {color: var(--muted); background: var(--sunk);}
.ui .coffeeStepRow .coffeeStepDelete {margin-left: auto;}
/* (phones: number + kind + 🗑 in the first line, at / to / in with their fields together in the second) */
@media (max-width: 480px) {
	.ui .row.coffeeStepRow > * {order: 2;}
	.ui .row.coffeeStepRow > .coffeeStepNo, .ui .row.coffeeStepRow > .sel {order: 0;}
	.ui .row.coffeeStepRow > .coffeeStepDelete {order: 1;}
	.ui .coffeeStepRow .sel {flex: 1 1 calc(100% - 6em);}
	.ui .coffeeStepRow .inp {flex-basis: 3.8em; width: 3.8em;}
}
.ui .coffeeSensorRow .cfState {flex: 0 1 auto; font: var(--f1) var(--mono); color: var(--muted); text-align: right; overflow-wrap: normal;}
/* (no word breaks inside the name or the state: on a narrow phone the key goes to its own line, at the right) */
.ui .coffeeSensorRow {flex-wrap: wrap;}
.ui .coffeeSensorRow .coffeeSensorLabel {min-width: min-content; overflow-wrap: normal;}
.ui .coffeeSensorRow > button:first-of-type {margin-left: auto;}
/* the coffee weighing: the yield of the dose on the scale at the ratio picked */
.ui .cfYield {min-height: 1.4em; font: 600 var(--f3) var(--mono); text-align: right;}
/* the reports (a day, the cafe report): a heading line, the tables with the numbers right-aligned (they scroll inside on a phone) */
.ui .cfReport {display: grid; gap: 6px; overflow-x: auto;}
.ui .cfRepT {margin: 6px 0 0 0; font-weight: 700;}
.ui table.cfTbl {width: 100%; border-collapse: collapse; font-size: var(--f1);}
.ui .cfTbl th, .ui .cfTbl td {padding: 4px 6px; text-align: right; vertical-align: top; white-space: nowrap; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line);}
.ui .cfTbl th {font-weight: 700; color: var(--muted);}
.ui .cfTbl th:first-child, .ui .cfTbl td:first-child, .ui .cfReport .cfTbl td:nth-child(2), .ui .cfReport .cfTbl th:nth-child(2) {text-align: left;}
.ui .cfReport .cfTblWrap {min-width: 0; overflow-x: auto;} /* (the cafe report: a scroll box, the columns keep their width) */
.ui .cfReport .cfTblWrap .cfTbl th {white-space: nowrap; overflow-wrap: normal;}
.ui .cfTbl.cfCmp td {white-space: normal; overflow-wrap: anywhere;}
.ui .cfTbl.cfCmp th {white-space: normal; overflow-wrap: anywhere;}
@media (max-width: 479px) {.ui .cfReport .cfTbl th {white-space: normal; overflow-wrap: anywhere;} .ui .cfReport .cfTbl th, .ui .cfReport .cfTbl td {padding: 3px 4px; font-size: var(--f0);}} /* (a day / the cafe report on a phone: the heads wrap, a little tighter) */
.ui table.cfTbl.cfCmp {table-layout: fixed;} /* (compare: the labels a third of the width, the two brews the rest - the values wrap, not the labels) */
.ui .cfTbl.cfCmp tr > :first-child {width: 34%;}
/* the windows of the coffee pages (busy_form): large ones for the history, a day and the charts; the whole screen for the chart */
div.busyForm.cfWin div.busyBox {max-width: 48em;}
div.busyForm.cfWin div.busyFormBody {align-content: start;}
div.busyForm.cfWinFull div.busyBox {max-width: none; height: 100%;}
div.busyForm.cfWin div.busyAskTitle {display: flex; align-items: center; gap: 6px;}
.ui .cfLogChart .cardHead {letter-spacing: 0.02em; text-transform: none;}
.ui .cfHistList .coffeeHistoryItem {align-items: flex-start;}
.ui input.coffeeHistoryTick {flex: none; width: 20px; height: 20px; margin: 4px 0 0 0;}
.ui button.coffeeHistoryText {display: grid; gap: 2px; min-height: 0; padding: 0; font-size: var(--f2); font-weight: 400; letter-spacing: 0; text-align: left; color: var(--text); background: transparent; border: 0;}
.ui .cfHistTop {display: flex; align-items: baseline; gap: 8px;}
.ui .cfHistTop .coffeeHistoryName {flex: 1 1 auto; min-width: 0; font-weight: 700; overflow-wrap: anywhere;}
.ui .coffeeHistoryWhen {font-weight: 400; color: var(--muted);}
.ui .cfHistTop .cfNum {flex: 0 1 auto; font: var(--f1) var(--mono); font-variant-numeric: tabular-nums; text-align: right;}
.ui .cfStars {display: flex; gap: 2px;}
.ui button.cfStar {min-height: 0; padding: 0 2px; font-size: var(--f5); font-weight: 400; line-height: 1; color: var(--muted); background: transparent; border: 0;}
.ui button.cfStar.on {color: var(--text);}
.ui .coffeeHistoryField textarea.inp {min-height: 4.5em; resize: vertical; white-space: pre-wrap;}
.ui .cfNavRow {width: 100%; font-weight: 600; text-align: left; background: var(--surface); border: 0; border-top: 1px solid var(--line); border-radius: 0;}
.ui .cfNavRow:first-child {border-top: 0;}
.ui .cfNavRow.cfDanger {color: var(--danger);}
img.coffeeShareQr {display: block; width: 220px; max-width: 70vw; margin: 0 auto; image-rendering: pixelated;}
.ui p.coffeeShareLink {margin: 0; font: var(--f1) var(--mono); color: var(--muted); word-break: break-all; user-select: all;}
/* ☕ ROASTERY (roastery.js, the ROASTERY MODE of sales_mode.js): the tabs below the weight (#roastTabs), the page in the panel of the
   engine (div.roastPage: the card of the sale / of the chosen kind, the kinds as a scrolling chip row, the RECENT tiles), the keys 📋 ⋯
   BOOK NOW of the key row, ⚙ in the head, the report rows that unfold, the blend run (div.roastRun on LP 133) and its meter */
#roastTabs.ui.tabs {position: sticky; top: calc(var(--headH, 55px) + var(--instH, 0px)); z-index: 3; margin: 0 -10px;}
div.salesModePanel.roastPage {display: grid; gap: var(--s3); margin: 12px 0; text-align: left;}
div.roastPage > p.hint {margin: 0;}
div.roastPage .fld .join > .salesModeThingsStatus:empty {display: none;}
div.roastPage .fld .join > .salesModeThingsStatus {align-self: center;}
.ui .roastValue {display: flex; align-items: center; min-height: var(--ctl); font-family: var(--mono); font-size: var(--f2); overflow-wrap: anywhere;}
.ui .fld .join > .roastValue {flex: 1; min-width: 0;}
.ui .fld > .btn.roastLoad {justify-self: start;}
.ui .roastBad {color: var(--danger); font-weight: 700;}
.ui .strong {font-weight: 700;}
.ui p.roastLine {margin: 0; font-size: var(--f2); overflow-wrap: anywhere;}
.ui p.note.roastWarn {margin: 0; color: var(--warnText); background: var(--warnBg);}
.ui .roastTwo {display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3);}
.ui .roastSecRow {display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap;}
/* the kinds of the tab 🔥 ROASTING: one row of chips that scrolls sideways, a fading edge at the right */
.ui .chips.roastKinds {flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 32px 2px 0; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);}
.ui .chips.roastKinds::-webkit-scrollbar {display: none;}
.ui .chips.roastKinds .chip {flex: none; min-height: var(--hit); white-space: nowrap; font-weight: 600;}
.ui .chips.roastKinds .chip.on {background: var(--accentSoft); border-color: var(--accent);}
.ui .cardHead > .grow {flex: 1; min-width: 0; overflow-wrap: anywhere;}
.ui .cardHead > .btn.sm {letter-spacing: 0; text-transform: none;}
.ui .tile.isOn {box-shadow: inset 0 0 0 2px var(--accent);}
.ui details.card.roastFold > summary.cardHead {text-transform: none; letter-spacing: 0; font-size: var(--f2);}
/* the keys: 📋 ⋯ as square keys, BOOK NOW / START WEIGHING with its live line below (gray while something is missing - a tap says why) */
.ui.keyRow .btn.ico.roastKey {flex: 0 0 var(--key); width: var(--key); min-width: var(--key); font-size: var(--f4);}
.ui.keyRow .btn.col {flex-direction: column; gap: 0; padding-left: 4px; padding-right: 4px;}
.ui.keyRow .btn.col small {font-size: var(--f0); font-weight: 400; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;}
.ui.keyRow .btn.main.blocked {color: var(--muted); background: var(--sunk); border-color: var(--line);}
header.appHead button.headTool {width: 40px; height: 40px; min-height: 0; padding: 0; font-size: var(--f4); font-weight: 400; line-height: 1; border: 0;}
/* the windows: lists of reports (the last one used marked), a gray main key, a report: the rows unfold the other columns */
div.busyForm button.busyAskButton.isOff {color: var(--muted); background-color: var(--sunk); border-color: var(--line);}
.ui .row.roastPick {width: 100%; text-align: left; font: inherit; background: var(--surface); border: 0; border-top: 1px solid var(--line); border-radius: 0;}
.ui .row.roastPick:first-child {border-top: 0;}
.ui .row.roastPick.isLast {box-shadow: inset 4px 0 0 var(--accent);}
.ui .roastLastMark {flex: none; font-weight: 700; color: var(--accent);}
.ui .roastLines p.hint {margin: 0 0 2px 0;}
.ui .row.roastRow {flex-wrap: wrap; padding: 0; gap: 0;}
.ui .roastRowLine {flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 6px 8px 6px 12px; text-align: left; color: inherit; font: inherit; background: transparent; border: 0; border-radius: 0;}
.ui .roastRowLine:disabled {opacity: 1; cursor: default;}
.ui .row.roastRow > .btn {margin-right: 8px;}
.ui .row.roastRow b.num, .ui .row b.num {flex: none; font: 600 var(--f2) var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui .row b.num .sub {display: block; font-weight: 400; color: var(--muted);}
.ui .row.isSum, .ui .row.roastRow.isSum {background: var(--sunk);}
.ui .row.isSum .grow, .ui .row.isSum b.num {font-weight: 800;}
.ui .kv.roastMore {display: none; flex-basis: 100%; padding: 0 12px 10px 12px; font-size: var(--f1); color: var(--muted);}
.ui .row.roastRow.open .kv.roastMore {display: grid;}
.ui .row.roastRow.open .roastRowLine {background: var(--sunk);}
.ui .roastChart {overflow-x: auto;}
.ui .roastChart svg {display: block; max-width: 100%; height: auto;}
/* (on the page in the colours of the look - roastery_chart_svg() keeps its paper colours for the print) */
.ui .roastChart svg > rect:first-child {fill: var(--surface);}
.ui .roastChart svg line {stroke: var(--line);}
.ui .roastChart svg text {fill: var(--text);}
/* the confirmation of a booking: the values right-aligned (long ones wrap), the two price fields side by side */
.ui .kv.confKv b {white-space: normal; overflow-wrap: anywhere;}
.ui .kv.confKv b.confWeight {font-size: var(--f4);}
.ui .confTwo {display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3);}
/* the blend run (LP 133): a card per part, the active one framed in the accent; WEIGH NOW in the weighing colours; the meter of the part */
div.roastRun.ui {display: grid; gap: var(--s3); margin: 12px 0; text-align: left;}
.ui .roastPart.isActive {border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent);}
.ui .roastPart .cardHead {text-transform: none; letter-spacing: 0; font-size: var(--f2);}
.ui .roastPart .cardHead .roastBatch {font-weight: 400;}
.ui .roastPart .cardHead .inp.roastPct {width: 5.5em; min-height: var(--ctlS); text-align: right;}
.ui .btn.roastWeigh {flex: 1; min-width: 0; font-family: var(--mono);}
.ui .btn.roastWeigh.wUnder {background: var(--wUnder); color: var(--onW); border-color: transparent;}
.ui .btn.roastWeigh.wPerfect {background: var(--wPerfect); color: var(--onW); border-color: transparent;}
.ui .btn.roastWeigh.wOver {background: var(--wOver); color: var(--onWOver); border-color: transparent;}
.ui .btn.roastWeigh.isLive {box-shadow: inset 0 0 0 2px var(--edge);}
.ui .btn.roastWeigh.isMoving {opacity: 0.7;}
.ui .roastMeter {display: none; position: relative; height: 18px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r1); overflow: hidden;}
.ui .roastMeter.isOn {display: block;}
.ui .roastMeter > span {display: block; height: 100%; width: 0; background: var(--wUnder); transition: width 0.2s;}
.ui .roastMeter[data-state="ok"] > span {background: var(--wPerfect);}
.ui .roastMeter[data-state="over"] > span {background: var(--wOver);}
.ui .roastMeter > b {position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 var(--f1) var(--mono);}
.ui p.hint.roastWait::before {content: '⚖'; display: inline-block; margin-right: 6px; animation: roastSpin 1.2s linear infinite;}
@keyframes roastSpin {to {transform: rotate(360deg);}}
@media (max-width: 420px) {.ui .roastTwo, .ui .confTwo {grid-template-columns: 1fr;}}
/* ⚙ SETTINGS AND RS-232 (scale_setup.js and the cards of the other files: #isSetupPage.ui.setPage under the head - LP 69 the settings with
   the tabs GENERAL · SCALE · LINK · SPEED · QUALITY, LP 251 RS-232 SETUP (+ BOARD PINS), LP 68 ESP-NOW; the key row #setKeys). A row of a
   card: the label with its ℹ️ right behind it at the left, the control at the right (below the label when it does not fit); a card that
   folds is a <details> whose head is the summary */
div#isSetupPage.setPage {box-sizing: border-box; max-width: 760px; margin: var(--headH) auto 0 auto; padding: 0 12px var(--s5) 12px; display: grid; gap: var(--s3); text-align: left; font-size: var(--f3);}
.ui.setPage .setTabs {position: sticky; top: var(--headH); z-index: 3; margin: 0 -12px;}
.ui.setPage .setPanels, .ui.setPage .setPanel, .ui.setPage .setSlot {display: grid; gap: var(--s3); min-width: 0;}
.ui.setPage .setPanel.dontShowDiv, .ui.setPage .dontShowDiv, .ui.setPage .isAway {display: none;}
.ui.setPage .setCard, .ui.setPage .setSlot > details, .ui.setPage .setLinks {scroll-margin-top: calc(var(--headH) + 56px);}
.ui.setPage .setBack {position: sticky; top: var(--headH); z-index: 3; display: flex; align-items: center; gap: var(--s2); margin: 0 -12px; padding: 2px 12px; background: var(--surface); border-bottom: 1px solid var(--line);}
.ui.setPage .setBack .setBackText {padding: 6px 0; font-size: var(--f1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: transparent; border: 0;}
/* the head of a card: the title, its ℹ️ right behind it, the 🔒 chip, a short state at the right, ▸ / ▾ of a card that folds */
.ui .setCard > .cardHead .ttl {min-width: 0; overflow-wrap: anywhere;}
.ui .setCard > .cardHead .lock {margin-left: 0;}
.ui .setCard > .cardHead .state {flex: 1 1 0; min-width: 0; margin-left: auto; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); background: none; border-radius: 0;}
.ui details.setCard > summary.cardHead {cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent;}
.ui details.setCard > summary.cardHead::-webkit-details-marker {display: none;}
.ui details.setCard > summary .chev {flex: none; margin-left: auto;}
.ui details.setCard > summary .state + .chev {margin-left: 0;}
.ui details.setCard > summary .chev::after {content: '▸'; color: var(--muted);}
.ui details.setCard[open] > summary .chev::after {content: '▾';}
.ui details.setCard:not([open]) > summary.cardHead {border-bottom: 0;}
.ui .setCard.isLocked > .cardHead .ttl {color: var(--muted);}
/* a card inside a card (a fold of SCALE DATA, REGISTERED APPS, ⤓ EXPORT, the parts of the 🔏 window) */
.ui .setCard .setSubCard {box-shadow: none; background: var(--surface);}
.ui .setCard .setSubCard > .cardHead {padding: 8px 10px;}
.ui .setCard .setSubCard > .cardBody {padding: 10px;}
/* a long select (the export format) stays inside its card on a phone */
.ui.setPage .setCard .cardBody {grid-template-columns: minmax(0, 1fr);}
.ui.setPage .setCard .cardActs > * {min-width: 0; max-width: 100%;}
.ui.setPage .setCard .cardActs select {max-width: 100%;}
/* a file field (logo, a report file to sign): its key in the look of a small key */
.ui.setPage input[type="file"] {max-width: 100%; font-size: var(--f2); color: var(--muted);}
.ui.setPage input[type="file"]::file-selector-button {min-height: var(--ctlS); margin-right: var(--s2); padding: 2px 10px; font-family: inherit; font-size: var(--f1); font-weight: 700; letter-spacing: 0.04em; color: var(--text); background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r1); box-shadow: var(--shadow); cursor: pointer;}
/* the rows */
.ui .setRow {display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s2); min-width: 0;}
.ui .setRow > .lab {flex: 1 1 12em; min-width: 0; font-size: var(--f2); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text);}
.ui .setRow > .lab .labText {overflow-wrap: anywhere;}
.ui .setRow > .lab {display: block;} /* (the text flows: a label that wraps keeps its ℹ️ right behind its last word) */
.ui .setRow > .setCtl:has(> input[type="checkbox"]:only-child) {flex: 0 0 auto;} /* (a tick box takes only its own width: it stays beside the label) */
.ui .setRow > .lab .lock {margin-left: 2px;}
.ui .setRow > .setCtl {flex: 0 1 16em; min-width: 0; margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2);}
.ui .setRow > .setCtl > .sel, .ui .setRow > .setCtl > .inp {flex: 1 1 8em;}
.ui .setRow.wide > .setCtl {flex: 1 1 100%; justify-content: stretch;}
.ui .setRow.wide > .setCtl > * {flex: 1 1 auto;}
.ui .setRow > .hint {flex: 1 1 100%;}
.ui .setRow > .hint:empty, .ui.setPage .hint:empty {display: none;}
.ui .setRow.setIndent {padding-left: var(--s4);}
.ui .setRow.isLocked > .lab, .ui .setRow.isLocked .setVal {color: var(--muted);}
.ui .setRow.isBad > .setCtl .inp, .ui .setRow.isBad > .setCtl .sel, .ui .fld.isBad .inp, .ui .isBad .macFields .inp {border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger);}
.ui .setGroup.isBad {box-shadow: inset 3px 0 0 var(--danger); padding-left: 6px;}
.ui .setVal {font-size: var(--f2); text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums;}
.ui .setDue {font-size: var(--f1); font-weight: 700; color: var(--warnText); background: var(--warnBg); padding: 1px 6px; border-radius: var(--rPill);}
.ui .inp.num {text-align: right; font-variant-numeric: tabular-nums;}
.ui .inp.mono, .ui .mono {font-family: var(--mono);}
.ui input.setChk {flex: none; width: 22px; height: 22px; accent-color: var(--main);}
.ui .setGroup {display: grid; gap: var(--s3); min-width: 0;}
.ui .setState {display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--f2);}
.ui .setState .grow {flex: 1 1 10em; min-width: 0;}
.ui .setState.bad, .ui .hint.bad {color: var(--danger); font-weight: 600;}
.ui .hint.warn {color: var(--warnText); background: var(--warnBg); padding: 4px 8px; border-radius: var(--r1);}
.ui .setResult {font-size: var(--f3);}
.ui .cardBody .sub2 {display: flex; align-items: center; gap: 6px; margin-top: var(--s2);}
.ui .cardBody .sub2:first-child {margin-top: 0;}
/* the rows that lead somewhere (▸) and the lists of a card (register, users, the entries of the store) */
.ui .setLinks {box-shadow: none;}
.ui .row.setLink {cursor: pointer;}
.ui .row.setLink .nm {display: inline-flex; align-items: center; gap: 6px;}
/* (a long word never breaks inside: a 🔒 chip that does not fit goes to the next line, at the right) */
.ui .row.setLink {flex-wrap: wrap;}
.ui .row.setLink .grow {min-width: min-content; overflow-wrap: break-word;}
.ui .row.setLink .state {padding: 0; font-size: var(--f2); text-align: right; color: var(--muted); background: none; border-radius: 0;}
.ui .row.setLink .chev {flex: none; padding: 0 4px;}
.ui .row.setLink.isLocked .nm {color: var(--muted);}
.ui .setList {box-shadow: none;}
.ui .setList .row .setVal {flex: none; max-width: 45%;}
.ui .setList .row .btn.sm {flex: none; min-width: var(--ctlS); padding: 2px 6px;}
.ui .setList .row .sub.mono {overflow-wrap: anywhere;}
.ui img.setLogo {max-height: 40px; max-width: 120px; border: 1px solid var(--line);}
.ui pre.setCode {margin: 4px 0; padding: 6px 8px; font-size: var(--f1); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r1);}
.ui textarea.setKeyLine {min-height: 4.5em; font-size: var(--f1); resize: vertical;}
/* the d table (dstep_form.js): the d select, below it ranges + kind + ℹ️, the rows of range 2 / 3 (d | up to [Max] g), the note */
.ui .dstepBox {display: grid; gap: 6px; min-width: 0; font-size: var(--f2);}
.ui .dstepBox > div {display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0;}
.ui .dstepBox .sel {flex: 1 1 9em; width: auto;}
.ui .dstepBox .dstepUpTo {display: inline-flex; align-items: center; gap: 6px; flex: 1 1 10em;}
.ui .dstepBox .dstepUpTo .inp {flex: 1 1 6em; width: auto;}
/* ESP-NOW: the 6 fields of a MAC address, the 🔑 / ↻ keys of a saved device, its key line */
.ui .macFields {display: flex; align-items: center; gap: 2px; min-width: 0;}
.ui .macFields .inp {flex: 1 1 0; min-width: 0; width: 3em; padding: 6px 2px; text-align: center; text-transform: uppercase;}
.ui .macKeys {display: flex; gap: var(--s2); justify-content: flex-end; flex: 1 1 100%;}
.ui .macKeyBox {flex: 1 1 100%; display: grid; gap: var(--s2);}
/* SPEED & STABILITY: the slider of the presets (⚡ FAST … SLOW 🐢), the numbers below it (a tap chooses), the marks AUTO and ★ STANDARD, the card of the preset */
.ui .speedPresetBox {display: grid; gap: 2px; padding: 10px 12px; background: var(--sunk); border-radius: var(--r2);}
.ui .speedPresetEnds {display: flex; justify-content: space-between; font-size: var(--f1); font-weight: 700; color: var(--muted);}
.ui input.speedPresetSlider {-webkit-appearance: none; appearance: none; width: 100%; height: 34px; min-height: 0; margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; cursor: pointer; touch-action: pan-y;}
.ui input.speedPresetSlider::-webkit-slider-runnable-track {height: 6px; border-radius: var(--rPill); background: var(--line);}
.ui input.speedPresetSlider::-moz-range-track {height: 6px; border-radius: var(--rPill); background: var(--line);}
.ui input.speedPresetSlider::-webkit-slider-thumb {-webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--surface); border: 3px solid var(--main);}
.ui input.speedPresetSlider::-moz-range-thumb {width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 3px solid var(--main);}
.ui input.speedPresetSlider:focus-visible {outline: 2px solid var(--focus); outline-offset: 2px;}
.ui .speedPresetBox.isCustom input.speedPresetSlider::-webkit-slider-thumb {border-color: var(--muted);}
.ui .speedPresetBox.isCustom input.speedPresetSlider::-moz-range-thumb {border-color: var(--muted);}
.ui .speedPresetTicks, .ui .speedPresetMarks {position: relative; margin: 0 13px;}
.ui .speedPresetTicks {height: 26px;}
.ui .speedPresetMarks {height: 16px;}
.ui .speedPresetTicks .speedTick {position: absolute; top: 0; transform: translateX(-50%); min-width: 24px; min-height: 0; height: 24px; padding: 0 4px; font: 600 var(--f1)/1 var(--mono); color: var(--muted); background: transparent; border: 0; border-radius: var(--rPill); cursor: pointer;}
.ui .speedPresetTicks .speedTick.isStandard {color: var(--text);}
.ui .speedPresetTicks .speedTick.isSelected {color: var(--onMain); background: var(--main);}
.ui .speedPresetMarks span {position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; font-size: var(--f0); font-weight: 700; letter-spacing: 0.04em; color: var(--muted);}
.ui .speedPresetMarks span.isAuto {transform: translateX(-30%);}
.ui .speedPresetInfo {min-height: 6.5em; margin-top: 4px; padding: 8px 10px; font-size: var(--f2); line-height: 1.4; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r1);}
.ui .speedPresetValues {font-family: var(--mono); font-size: var(--f1); color: var(--muted);}
/* ENVIRONMENT TEST: the curve, the noise per averaging time (✓ / ~ / ✗), now and recommended */
.ui canvas.envTestCurve {display: block; width: 100%; height: 140px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r1);}
.ui .kv3.envNoise .hd:nth-child(2) {display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px;}
.ui .kv3.envCompare span {min-width: 0; overflow-wrap: anywhere;}
/* the windows of the settings: 🔍 LOOKING FOR YOUR SCALE, 🔏 LEGAL MODE (wider: its list of entries) */
div.busyForm .rs232WizardText {margin: 0; white-space: pre-line; font-size: var(--f3);}
div.busyForm .rs232WizardSample {margin: 0; overflow-wrap: anywhere;}
div.busyForm .rs232WizardSample:empty {display: none;}
div#legalDialog div.busyBox {max-width: 46em;}
div#legalDialog div.legalState, div#legalDialog div.legalList {display: grid; gap: var(--s3);}
div#legalDialog div.legalList:empty {display: none;}
/* 🗂 RECORDS AND BACKUP
   THE RECORDS PAGE (records.js records_render): below the head (its title, ℹ️ and ✕ are in the head), over the page of the scale, the 📝 log
   page and the 📊 statistics (z 8, below the windows and the docked menu); the tabs under the head, the body scrolls by itself (room below
   for the message stack and its own key row #recordsKeys - the other key rows go meanwhile, not under the 📒 diary). One column, at most
   720 px; lists as rows with the numbers right-aligned, the activity log a real table on a wide screen. */
div.ui.recPage {position: fixed; z-index: 8; top: var(--headH); left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; background: var(--bg);}
body.appMenuWide div.ui.recPage {left: var(--menuW);}
body.recordsPageOn:not(.diaryPageOn) > .ui.keyRow:not(#recordsKeys) {display: none !important;}
body.recordsPageOn #labelBar {display: none !important;}
.ui.recPage .recBody {flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 12px calc(var(--msgStackH, 0px) + var(--keyRowH, 0px) + var(--weightBoxH, 0px) + 16px) 12px;}
.ui.recPage .recInner {display: grid; gap: var(--s3); max-width: 720px; margin: 0 auto;}
.ui.recPage p, .ui.recCard p {margin: 0;}
.ui.recPage .tools .i {flex: none;}
.ui.recPage .recToolsEnd {justify-content: flex-end;}
.ui.recPage .recNotes {display: grid; gap: 2px; text-align: center;}
.ui .recCardTitle {min-width: 0; overflow-wrap: anywhere;}
.ui .cardHead .recCardEnd, .ui .cardHead .lock {margin-left: auto;}
.ui .cardHead .recCardEnd {font: var(--f1) var(--mono); letter-spacing: 0; text-transform: none; color: var(--muted); white-space: nowrap;}
.ui .kv > span {min-width: 0; overflow-wrap: anywhere;}
.ui .kv > span .i {margin-left: 6px; vertical-align: middle;}
.ui .kv b {white-space: normal; overflow-wrap: anywhere;}
.ui b.recBad, .ui .kv b.recBad {color: var(--danger);}
.ui p.recLine.bad, .ui .recLine.bad {font-size: var(--f2); font-weight: 700; color: var(--danger);}
.ui .recLink {display: flex; flex-wrap: wrap; align-items: center; gap: 4px;}
/* a row: sign | text (second line muted) | numbers right-aligned | its keys | ▸ (a row that opens something) */
.ui .row .recSign {flex: none; width: 1.6em; text-align: center; font-weight: 700;}
.ui .row .recNum {flex: none; min-width: 4.5em; font: 600 var(--f2) var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui .row .recChev {flex: none; color: var(--muted);}
.ui .row.isBad .recSign, .ui .row.isBad .recNum {color: var(--danger);}
.ui .row.isOff .grow {font-weight: 400; color: var(--muted);}
.ui .row.recListHead {min-height: 0; padding-top: 6px; padding-bottom: 6px; background: var(--sunk);}
.ui .row.recListHead .grow, .ui .row.recListHead .recNum, .ui .row.recListHead .sub {font: 700 var(--f0) var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);}
.ui button.row.recRowKey {width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 0; border-top: 1px solid var(--line);}
.ui .list > button.row.recRowKey:first-child {border-top: 0;}
.ui button.row.recRowKey.isLocked {cursor: help;}
.ui .row .btn.sm {flex: none;}
#recordsKeys.ui.keyRow .btn.ico {flex: 0 0 var(--key); width: var(--key); min-width: var(--key); font-size: var(--f4);}
@media (max-width: 479px) { /* (a narrow phone: a key between shows only its sign, 🔒 behind it when locked - its label is the title) */
	#recordsKeys.ui.keyRow .btn.recSignKey {flex: 0 0 auto; min-width: var(--key); padding: 4px 6px; font-size: var(--f4);}
	#recordsKeys.ui.keyRow .btn.recSignKey .txt, #recordsKeys.ui.keyRow .btn.recSignKey .lock {display: none;}
	#recordsKeys.ui.keyRow .btn.recSignKey.isLocked .sgn::after {content: '🔒'; font-size: var(--f1);}
}
.ui.recPage .kv {grid-template-columns: minmax(40%, 1fr) auto;}
div#auditRecordAsk div.busyFormBody p {margin: 0; overflow-wrap: anywhere;}
.ui.recPage .recTrend svg {display: block; width: 100%; height: auto;}
.ui.recPage .recTrend div {font-size: var(--f1); color: var(--muted);}
.ui .recCheck {display: grid; gap: 4px;}
.ui .recCheck p {margin: 0;}
.ui .recCheck .recSha {word-break: break-all;}
.ui .recArchStatus {display: grid; gap: var(--s2);}
.ui .recBatches {display: grid; gap: var(--s3);}
/* the activity log: rows on a phone (date · user, the change below), a real table from 700 px */
@media (min-width: 700px) {
	.ui.recPage .tbl.recLog thead {display: table-header-group;}
	.ui.recPage .tbl.recLog tr {display: table-row; padding: 0;}
	.ui.recPage .tbl.recLog th, .ui.recPage .tbl.recLog td {display: table-cell; padding: 6px 10px; text-align: left; vertical-align: top; border-top: 1px solid var(--line);}
	.ui.recPage .tbl.recLog th {font-size: var(--f0); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--sunk); border-top: 0;}
	.ui.recPage .tbl.recLog td.t {white-space: nowrap;}
}
/* 👥 the user access register (users_access.js, busy_form #accessRegister): wider; a block per user - number · name | role, the state, the
   five fields of the person (two columns when there is room) */
div#accessRegister div.busyBox {max-width: 46em;}
div#accessRegister .accUser {display: grid; gap: var(--s2); padding: var(--s3) 0; border-top: 1px solid var(--line);}
div#accessRegister .accUser:first-child {padding-top: 0; border-top: 0;}
div#accessRegister .accUserHead {display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;}
div#accessRegister .accUserHead b {flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere;}
div#accessRegister .accRole {font-size: var(--f2); font-weight: 700; color: var(--muted);}
div#accessRegister .accFields {display: grid; grid-template-columns: repeat(auto-fill, minmax(13em, 1fr)); gap: var(--s2);}
div#accessRegister .accFields .inp:disabled {color: var(--muted); background: var(--sunk);}
div.busyForm div.busyAskButtons button.isLocked .lock {margin-left: 2px;}
/* 💾 the backup windows (scale_backup.js): the items with their checkbox, the report lines of the result muted */
div#scaleBackupWindow .bakItems {max-height: 40vh; overflow-y: auto; overscroll-behavior: contain;}
div#scaleBackupWindow .bakItems .chk {min-height: 40px; padding: 4px 12px; border-top: 1px solid var(--line);}
div#scaleBackupWindow .bakItems .chk:first-child {border-top: 0;}
div#scaleBackupWindow .chk .i {flex: none; margin-left: 4px;}
div.busyAlert div.busyText p.bakLine {font-size: var(--f2); color: var(--muted);}
/* BAKER'S TOOLS, INFUSION, COCKTAILS (bakers_tools.js, starter_journal.js, infusion_tools.js, mode_cocktail.js): the windows 🌡 DDT |
   🫙 STARTER | 📒 JOURNAL (busy_form #bakersWindow, the tabs under the title) and 🌿 INFUSION CALCULATOR (#infusionWindow) - cards, a field
   row = label (ℹ️ behind it) left | field + unit (+ a key joined to it: ⤓ the weight, ↺) right, the results with right-aligned numbers;
   the cocktail start page (div.ui.cktPage in #runningStuff, its key row #cktKeys) */
div.busyForm.bakersWin div.busyBox {max-width: 40em;}
div.busyForm.bakersWin div.busyFormBody {align-content: start;}
div.busyForm.bakersWin div.busyAskTitle {display: flex; align-items: center; gap: 6px;}
div.busyForm.bakersWin .dontShowDiv {display: none;}
div.busyForm.bakersWin .bkTabs {margin: 0 0 var(--s3) 0;}
div.busyForm.bakersWin .bkTabs .tab {flex: 1 1 auto; min-width: 0; padding-left: 6px; padding-right: 6px; overflow: hidden; text-overflow: ellipsis;} /* (the three tabs share the width: no tab hidden beside the window on a phone) */
@media (max-width: 479px) {div.busyForm.bakersWin .bkTabs .tab {font-size: var(--f1); letter-spacing: 0;}}
div.busyForm.bakersWin .cardBody p, div.busyForm.bakersWin .cardBody h4 {margin: 0;}
div.busyForm.bakersWin .cardHead .i {margin-left: 2px;}
div.busyForm.bakersWin .bkCardTitle {min-width: 0; overflow-wrap: anywhere;}
.ui .bkUnitLine {display: flex; align-items: center; justify-content: space-between; gap: var(--s2);}
.ui .bkSeg {flex: none; border: 1px solid var(--line); border-radius: var(--r1); overflow: hidden;}
.ui .bkSeg .tab {flex: 0 0 auto; min-height: var(--ctlS); padding: 4px 14px;}
.ui .bkSeg .tab.on {background: var(--mainSoft);}
.ui .bkRow {display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); min-width: 0;}
.ui .bkLab {display: flex; flex: 1 1 7em; align-items: center; gap: 6px; min-width: 0; font-size: var(--f2); overflow-wrap: break-word;} /* (too narrow for label + field + ⤓ key: the field goes below the label, at the end) */
.ui .bkJoin {flex: none; align-items: center; gap: 6px; margin-inline-start: auto;}
.ui .bkJoin .inp.bkNum, .ui .bkJoin input.bkNum {flex: none; width: 6.5em; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums;}
.ui .bkJoin input.bkNum[readonly] {color: var(--muted); background: var(--sunk);}
.ui .bkUnit {min-width: 2.2em; font-size: var(--f2); color: var(--muted); white-space: nowrap;}
.ui .bkRatio .inp.bkNum, .ui .bkRatio input.bkNum {width: 4.5em;}
.ui .bkRatio .bkUnit {min-width: 0;}
.ui .bakersTakeKey {flex: none; min-width: 6.5em; min-height: var(--ctl); padding: 4px 8px; font-family: var(--mono); font-size: var(--f2); font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: none;}
.ui .bakersTakeKey.bkMoving {opacity: 0.6;}
.ui .bakersTakeKey.bkMoving::after {content: ' ⏳';}
.ui .bkChips {flex-wrap: wrap;} /* (all six presets visible: a second line on a phone) */
.ui .bkChips .chip {flex: none; font-family: var(--mono);}
.ui .bkResult {display: grid; gap: var(--s2);}
.ui .bkBig {font: 700 var(--f5)/1.2 var(--mono); font-variant-numeric: tabular-nums;}
.ui .bkSum {padding-top: 4px; font-weight: 800; border-top: 1px solid var(--line);}
.ui .bkDanger {color: var(--danger); font-weight: 700;}
.ui .note.bkDanger {color: var(--onDanger); background: var(--danger);}
.ui .bkBold, .ui .bkStrong {font-weight: 700;}
.ui .bkWarnText {color: var(--danger);}
.ui .bkNext {display: flex; align-items: center; gap: var(--s2); min-height: var(--hit);}
.ui .bkNext .grow {flex: 1; min-width: 0;}
.ui .cardBody.bkFlush {padding: 0; gap: 0;}
.ui .bkFeed {align-items: flex-start; padding-right: 8px;}
.ui .bkFeed .bkNote {font-style: italic;}
.ui .bkVals {flex: none; display: grid; justify-items: end; gap: 2px; font: var(--f1) var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
/* 🌿 infusion: a block per cannabinoid (select, own name, ✕ | its % fields), the result table (a column per cannabinoid, the name of a
   row left, the values right-aligned in the same row, the total bold - it scrolls sideways when too wide) */
.ui .infRows {display: grid; gap: var(--s3);}
.ui .infCanna {display: grid; gap: var(--s2); padding-bottom: var(--s3); border-bottom: 1px solid var(--line);}
.ui .infCannaHead {display: flex; align-items: center; gap: var(--s2);}
.ui .infCannaHead .sel {flex: 1 1 auto; width: auto;}
.ui .infCannaHead .inp {flex: 1 1 6em; width: auto;}
.ui .infCannaVals {display: grid; gap: var(--s2);}
.ui .infResult {display: grid; gap: var(--s2);}
.ui .infTblBox {overflow-x: auto;}
.ui table.infTbl {width: 100%; border-collapse: collapse; font-size: var(--f2);}
.ui table.infTbl th {padding: 2px 0 4px 6px; font-size: var(--f1); font-weight: 700; color: var(--muted); text-align: right; vertical-align: bottom; white-space: normal; overflow-wrap: anywhere; hyphens: auto;}
.ui table.infTbl td.rowName, .ui table.infTbl th.rowName {min-width: 5em; padding-left: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; hyphens: auto;}
.ui table.infTbl td.rowName {font-family: var(--font); font-size: var(--f1); color: var(--muted);}
.ui table.infTbl tr + tr td {padding-top: 6px; border-top: 1px solid var(--line);}
.ui table.infTbl td {padding: 0 0 2px 6px; font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui table.infTbl .tot {font-weight: 800;}
.ui .infThingInfo, .ui .infDose {display: grid; gap: var(--s2);}
/* 🍸 the cocktail start page: two cards, the results as rows (thumbnail | name | 🌍 | ⬇️ IMPORT) */
.ui.cktPage {display: grid; gap: var(--s3); max-width: 720px; margin: var(--s3) auto 0 auto; padding-bottom: var(--s4);}
.ui.cktPage.dontShowDiv, .ui.cktPage .dontShowDiv {display: none;}
.ui.cktPage p {margin: 0;}
.ui.cktPage .cardHead .i {margin-left: 2px;}
.ui button.cktNavRow {width: 100%; font: inherit; text-align: left; color: var(--text); background: var(--surface); border: 0; border-radius: 0; cursor: pointer;}
.ui button.cktNavRow:hover {background: var(--sunk);}
.ui .cktChev {flex: none; font-size: var(--f4); color: var(--muted);}
.ui .cktHit {padding-left: 8px;}
.ui .cktThumb {flex: none; width: 56px; height: 56px; object-fit: cover; border-radius: var(--r1); background: var(--sunk);}
.ui button.cktName {padding: 0; font: inherit; font-weight: 700; text-align: left; color: var(--text); background: transparent; border: 0;}
.ui .cktHit .btn {flex: none;}
.ui .cktEmpty {justify-content: center; font-weight: 700; color: var(--muted);}
/* =====================================================================================================================
   LAB MODES: 💎 DENSITY (mode_density.js, LP 132), 🧪 SOLUTION + ⚕ COMPOUNDING (mode_solution.js / mode_compounding.js, LP 133),
   💧 PIPETTES (pipette_mode.js, LP 138-140) and the 💧 PIPETTE REGISTER window (pipette_register.js, pipette_import.js, pipette_report.js).
   One column of cards under the weight (div.ui.labPage), the key row #labKeys (lab_keys_set: TARE left, the main key right, ⋯ the rest).
   ===================================================================================================================== */
.ui.labPage {display: grid; gap: var(--s3); width: 100%; max-width: 720px; margin: var(--s3) auto 0 auto; padding-bottom: var(--s4); box-sizing: border-box; text-align: left; overflow-wrap: anywhere;}
.ui.labPage.dontShowDiv, .ui.labPage .dontShowDiv, .ui .labCards .dontShowDiv {display: none;}
.ui.labPage p, .ui .labCards p, .ui.pipOverlay p, .ui .compEditor p {margin: 0;}
.ui.labPage.isBusy {opacity: 0.55; pointer-events: none;}
.ui .labCards {display: grid; gap: var(--s3);}
.ui .labCardTitle {flex: 1 1 auto; min-width: 0;}
.ui .cardHead .i {text-transform: none; letter-spacing: 0;}
.ui .cardHead .labCardMore {margin-left: auto;}
/* the line under the weight: the name of the solution / formula / batch, ℹ️ right behind it, the air chip at its end */
.ui .labName {display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--f3); font-weight: 700;}
.ui .labName.labSub {font-size: var(--f2); color: var(--muted);}
.ui .labName.isOk {color: var(--ok);}
.ui .labName.isBad, .ui .isBad {color: var(--danger);}
.ui .isOk {color: var(--ok);}
.ui .hint.isBad, .ui .note.isBad {color: var(--danger); font-weight: 600;}
.ui .labPre {white-space: pre-wrap; font-size: var(--f2);}
.ui .labArea {min-height: 4.5em; padding: 8px 10px; font-family: inherit; resize: vertical;}
.ui .labCopyText {min-height: 12em; font: var(--f1) var(--mono); white-space: pre; overflow: auto;}
.ui .labFields {display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3);}
/* a number with its unit inside the field */
.ui .labUnit {flex: none; align-self: center; font-size: var(--f2); color: var(--muted);}
.ui .join > .labNarrow, .ui .labNarrow {flex: 0 1 auto; width: auto; max-width: 45%;}
.ui .join > .inp.labNum {flex: 0 1 7em; text-align: right;}
.ui .labDate {font-size: var(--fIn);}
/* list rows: the numbers right-aligned, a row that answers a tap, the row of now */
.ui .row .labNum {flex: none; text-align: right; font: 600 var(--f2) var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap;}
.ui .row .labNum small {display: block; font-weight: 400; color: var(--muted);}
.ui .row.isTap {width: 100%; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 0; border-top: 1px solid var(--line); cursor: pointer;}
.ui .row.isTap:first-child {border-top: 0;}
.ui .row.isTap:hover {background: var(--sunk);}
.ui .row.isTap:disabled {opacity: 0.45; cursor: default;}
.ui .row.isNow {background: var(--accentSoft); box-shadow: inset 4px 0 0 var(--accent);}
.ui .row.labHeadRow {min-height: 0; padding-top: 4px; padding-bottom: 4px; font-size: var(--f0); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--sunk);}
.ui .row.labHeadRow .grow, .ui .row.labHeadRow .labNum {font: inherit; color: inherit;}
.ui .row.isLocked {color: var(--muted);}
/* 💎 the steps: ✓ done (muted) | ▶ now (bold, the accent) | ○ open; the thing to do now (blinks), a hint, the live line + the hold bar */
.ui .labSteps {display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: var(--f2);}
.ui .labSteps li {display: flex; gap: 8px; align-items: baseline;}
.ui .labSteps li.isDone {color: var(--muted);}
.ui .labSteps li.isNow {font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); padding-left: 6px;}
.ui .labMark {flex: none; width: 1.2em; text-align: center;}
.ui .labStatus {display: grid; gap: 6px;}
.ui .labAction {font-size: var(--f4); font-weight: 700; animation: labBlink 1.6s ease-in-out infinite;}
.ui .labAction.isDone {color: var(--ok); animation: none;}
@keyframes labBlink {50% {opacity: 0.55;}}
@media (prefers-reduced-motion: reduce) {.ui .labAction {animation: none;}}
.ui .labHint {font-size: var(--f2); color: var(--muted);}
.ui .labLive {font: var(--f2) var(--mono); font-variant-numeric: tabular-nums;}
.ui .bar.labHold span {width: 0; background: var(--accent); transition: width 0.2s;}
/* 💎 the result: the big number, its uncertainty, the notes, the material with its verdict chip */
.ui .labBig {font-family: var(--mono); font-variant-numeric: tabular-nums; line-height: 1.1;}
.ui .labBig .v {font-size: var(--f6); font-weight: 700;}
.ui .labBig .u {font-size: var(--f4); color: var(--muted);}
.ui .labBigSub {font: var(--f2) var(--mono);}
.ui .labNote {font-size: var(--f2);}
.ui .labNote.mut {color: var(--muted);}
.ui .labVerdict {display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: var(--f2);}
.ui .labVerdict .grow {flex: 1 1 14em; min-width: 0;}
/* the key row of the lab pages: a key marked to look at (📄 the report not opened yet); the next step: .keyGo / .keyStop (key_next()) */
.ui.keyRow.labKeys .btn.isMark {box-shadow: 0 0 0 3px var(--mark);}
@media (max-width: 899px) {.ui.keyRow.labKeys .btn.tare {flex: 0 1 auto; min-width: 22%; white-space: nowrap;} .ui.keyRow.labKeys .btn {overflow: hidden; text-overflow: ellipsis;}}
@media (max-width: 479px) { /* (a narrow phone: a key between shows only its sign - its label is the title -, TARE takes its own width, the main key the rest) */
	.ui.keyRow.labKeys {gap: 4px; padding-left: 8px; padding-right: 8px;}
	.ui.keyRow.labKeys .btn.tare {flex: 0 0 auto; min-width: 0; padding: 4px 6px; font-size: var(--f2); letter-spacing: 0;}
	.ui.keyRow.labKeys .btn.main {padding: 4px; font-size: var(--f2); letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; hyphens: auto;}
	.ui.keyRow.labKeys .btn.hasSign, .ui.keyRow.labKeys .btn.labMore {flex: 0 0 var(--key); width: var(--key); min-width: var(--key); padding: 4px; font-size: var(--f4); text-overflow: clip;}
	.ui.keyRow.labKeys .btn.hasSign .txt {display: none;}
	.ui.keyRow.labKeys .btn.hasSign .lock {display: none;} /* (a locked key between: its sign + a small 🔒) */
	.ui.keyRow.labKeys .btn.hasSign.isLocked .sign::after {content: '🔒'; font-size: var(--f1);}
}
.ui .btn .lock, .ui .row .lock {flex: none;}
/* 🧪 an ingredient: its fields in one line (📦 name goal [unit] ✕), then ⚖ WEIGH NOW ⋯, the goal line, the bar of the row on the scale */
.ui .labIng {display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r2);}
.ui .labIng.isNow {border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent);}
.ui .labIngHead {display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--f2);}
.ui .labIngHead .grow {flex: 1 1 auto; min-width: 0;}
.ui .labState {flex: none; font-size: var(--f1); font-weight: 700;}
.ui .labWho {flex: none; margin-left: auto;}
.ui .chk .grow {flex: 1 1 auto; min-width: 0;}
.ui .btn.labWeigh {flex: 1 1 auto; min-height: var(--ctl); font-size: var(--f3); font-family: var(--mono); font-variant-numeric: tabular-nums;}
.ui .btn.labWeigh.wUnder {background: var(--wUnder); color: var(--onW); border-color: var(--wUnder);}
.ui .btn.labWeigh.wPerfect {background: var(--wPerfect); color: var(--onW); border-color: var(--wPerfect);}
.ui .btn.labWeigh.wOver {background: var(--wOver); color: var(--onWOver); border-color: var(--wOver);}
.ui .btn.labWeigh.isLive {box-shadow: 0 0 0 3px var(--accent);}
.ui .btn.labWeigh.isMoving {opacity: 0.55;}
.ui .bar.labRowBar span {width: 0; transition: width 0.2s;}
.ui .bar.labRowBar.wUnder span {background: var(--wUnder);}
.ui .bar.labRowBar.wPerfect span {background: var(--wPerfect);}
.ui .bar.labRowBar.wOver span {background: var(--wOver);}
.ui .labTotals .row {min-height: 40px; font-size: var(--f2);}
.ui .labTotals .row .labNum {min-width: 4.5em;}
/* (the columns line up over all rows: one grid, every row a subgrid; the total row: '/ goal' over the % and parts columns) */
.ui .list.labTotals {display: grid; grid-template-columns: minmax(3.5em, 1fr) repeat(4, auto);}
.ui .labTotals .row {display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; column-gap: 6px;}
.ui .labTotals .row .labNum {min-width: 0; text-align: right;}
.ui .labTotals .row.labHeadRow {letter-spacing: 0;}
.ui .labTotals .row.labHeadRow .grow, .ui .labTotals .row.labHeadRow .labNum {overflow-wrap: normal;}
.ui .labTotals .row.labTotalRow .labNum:nth-child(3) {grid-column: span 2;}
.ui .row.labTotalRow {font-weight: 800;}
.ui .row.labTotalRow.wPerfect {background: var(--wPerfect); color: var(--onW);}
.ui .row.labTotalRow.wOver {background: var(--wOver); color: var(--onWOver);}
.ui .row.labTotalRow .labNum small {color: inherit;}
.ui .labTotals .labNum.isOk {color: var(--ok);}
.ui .labTotals .labNum.isBad {color: var(--danger);}
/* ⚠ a tolerance below the scale interval d: a neutral box with ⚠ and its rows */
.ui .labWarnBox {display: grid; gap: 6px; padding: 8px 10px; color: var(--warnText); background: var(--warnBg); border-radius: var(--r1);}
.ui .labWarnHead {font-size: var(--f2); font-weight: 700;}
.ui .labPickList {max-height: 55vh; overflow-y: auto;}
.ui .labSum {text-align: right;}
.ui .labNums {font-family: var(--mono); font-variant-numeric: tabular-nums;}
/* 🌬 the air chip (air_buoyancy.js air_chip: solution, compounding, the recipe run): a key - the warning look when the sensors are gone */
.ui .chip.airChip {min-height: 26px; font-size: var(--f1); font-weight: 600; white-space: nowrap; cursor: pointer;}
.ui .chip.airChip.isWarn {white-space: normal; color: var(--warnText); background: var(--warnBg); border-color: var(--warnText);}
/* ⚕ the step of the batch (a card): its title large, the check box of the weight (fill_weighing.js fill_box: the weighing colours), over the goal */
.ui .compStepCard .compStepTitle {font-size: var(--f4); font-weight: 700;}
.ui .compStepCard .compBig {margin: 0; text-align: center; border-radius: var(--r2);}
.ui .compStepCard p.compBigNow {font: 700 var(--f6)/1.1 var(--mono); font-variant-numeric: tabular-nums;}
.ui .compStepCard p.compPct, .ui .compStepCard p.compLight {font-size: var(--f3); font-weight: 700;}
.ui .compStepCard p.compBigGoal {font-size: var(--f2);}
.ui .compOverBox {display: grid; gap: 8px; padding: 8px 10px; font-size: var(--f2); border: 1px solid var(--danger); border-left-width: 4px; border-radius: var(--r1);}
.ui .compIdentLock {display: grid; gap: 8px; padding: 10px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r2);}
.ui .compIdentTitle {font-size: var(--f4); font-weight: 700;}
.ui p.compIdentMsg:empty {display: none;}
.ui p.compIdentMsg {padding: 6px 10px; font-weight: 700; color: var(--onDanger); background: var(--danger); border-radius: var(--r1);}
.ui .compRows .row .labNum {min-width: 6em;}
.ui .verdict.isBad {color: var(--danger); border-color: var(--danger);}
/* (while the steps run: the weight is in ⚖ OVERTAKE and the box, not in the big weight of the page) */
#isBigPage:has(#solutionDiv.compWeighing:not(.dontShowDiv)) #weightPanel {display: none;}
/* ⚕ the formula editor (a window): its cards in one column */
.ui .busyFormBody.compEditor {display: grid; gap: var(--s3);}
.ui .compEditor .card {box-shadow: none;}
.ui .compEditorStep .labFields {grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));}
/* 💧 the pipette pages: the run (the instruction large, the live line, the hold bar, the values per block), the result (the verdict) */
.ui .labVerdictBox {padding: 10px 12px; text-align: center; font-size: var(--f4); font-weight: 700; border-radius: var(--r2);}
.ui .labVerdictBox.wPerfect {background: var(--wPerfect); color: var(--onW);}
.ui .labVerdictBox.wUnder {background: var(--wUnder); color: var(--onW);}
.ui .labVerdictBox.wOver {background: var(--wOver); color: var(--onWOver);}
.ui div.pipInstruction {padding: 10px 12px; font-size: var(--f4); font-weight: 700; white-space: pre-line; background: var(--accentSoft); border-left: 4px solid var(--accent); border-radius: var(--r1);}
.ui p.pipLive {font: var(--f2) var(--mono); font-variant-numeric: tabular-nums;}
.ui div.pipHold {height: 8px; overflow: hidden; background: var(--sunk); border-radius: var(--rPill);}
.ui div.pipHoldBar {height: 100%; width: 0; background: var(--accent); transition: width 0.2s;}
.ui p.pipValuesLine {font: var(--f1) var(--mono); font-variant-numeric: tabular-nums; padding: 4px 0; border-top: 1px solid var(--line);}
.ui p.pipValuesLine.pipNow {background: var(--accentSoft);}
.ui p.pipRunHead, .ui p.pipChosen {font-weight: 700;}
.ui .pipWarn {color: var(--warnText); font-weight: 600;}
.ui .pipOk {color: var(--ok); font-weight: 600;}
.ui .pipBad {color: var(--danger); font-weight: 600;}
.ui label.pipCheckItem {display: flex; gap: 8px; align-items: flex-start; font-size: var(--f2);}
.ui div.pipDevBox {display: grid; gap: 2px; padding: 8px 10px; background: var(--warnBg); color: var(--warnText); border-radius: var(--r1);}
.ui .pipBatchLine {align-items: center;}
.ui .pipBatchLine .grow {flex: 1 1 auto;}
/* 💧 THE PIPETTE REGISTER: a window over the page with sub-pages (title line: ← | title ℹ️ | ✕), its forms, tables and lists */
.ui.pipOverlay {position: fixed; inset: 0; z-index: 10; overflow-y: auto; padding: var(--s3) var(--s4) var(--s6); box-sizing: border-box; background: var(--bg);}
.ui.pipOverlay .pipWinPage {display: grid; gap: var(--s3); max-width: 62em; margin: 0 auto;}
.ui .pipWinHead {position: sticky; top: calc(-1 * var(--s3)); z-index: 1; display: flex; align-items: center; gap: 8px; padding: 8px 0; background: var(--bg); border-bottom: 2px solid var(--edge);}
.ui .pipWinHead h2 {flex: 1 1 auto; min-width: 0; margin: 0; font-size: var(--f4); font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;}
.ui.pipOverlay h3, .ui .labCards h3 {margin: 0; font-size: var(--f1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px;}
.ui div.pipTools, .ui p.pipButtons, .ui div.pipSyncLine {display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center;}
.ui div.pipTools input[type=search] {flex: 1 1 14em; min-width: 0; min-height: var(--ctl); padding: 6px 10px; border: 1px solid var(--edge); border-radius: var(--r1);}
.ui div.pipTools select {min-height: var(--ctl);}
.ui p.pipButtons > button, .ui div.pipTools > button {min-height: var(--ctl);}
.ui .labCards p.pipButtons > button {padding: 6px 14px; font-size: var(--f2); font-weight: 700; letter-spacing: 0.02em; line-height: 1.15; color: var(--text); background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r1); box-shadow: var(--shadow);}
.ui .pipInfo {flex: none;}
.ui div.pipForm {display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3) var(--s4);}
@media (min-width: 700px) {.ui div.pipForm {grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);}}
.ui div.pipForm.pipForm2 {grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);}
.ui .pipField.pipFieldWide, .ui div.pipForm label.diaryFieldWide {grid-column: 1 / -1;}
.ui .pipField > .sensorTools {display: flex; flex-wrap: wrap; gap: 4px; align-items: center;}
.ui .pipField textarea, .ui div.pipForm textarea {min-height: 3.5em; padding: 8px 10px; font-family: inherit; border: 1px solid var(--edge); border-radius: var(--r1);}
.ui label.diaryField {display: grid; gap: 4px; min-width: 0;}
.ui label.diaryField > span:first-child {font-size: var(--f1); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);}
.ui label.diaryField input:not([type=checkbox]), .ui label.diaryField select, .ui label.diaryField textarea {width: 100%; min-height: var(--ctl); padding: 6px 10px; font-size: var(--fIn); border: 1px solid var(--edge); border-radius: var(--r1); box-sizing: border-box;}
.ui details.pipSection {padding: 0 12px 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2);}
.ui details.pipSection > summary {padding: 10px 0; font-size: var(--f1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;}
.ui details.pipSection textarea {width: 100%; box-sizing: border-box; font: var(--f1) var(--mono);}
.ui div.pipConflict, .ui p.pipReadOnly {padding: 8px 12px; color: var(--warnText); background: var(--warnBg); border-radius: var(--r1);}
.ui div.pipHistLine {padding: 4px 10px; font-size: var(--f2); border-left: 3px solid var(--line);}
.ui p.pipChainBad {color: var(--danger); font-weight: 700;}
/* the certificates (cert_doc.js): the checklist of a certificate form (✓ there, ✗ missing - refuses, ⚠ advice), the signatories, the images of the lab */
.ui div.certCheckTitle {margin-top: var(--s3); font-size: var(--f1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);}
.ui div.certCheck {display: grid; gap: 2px;}
.ui div.certCheckLine {padding: 2px 8px; font-size: var(--f2); border-left: 3px solid var(--line);}
.ui div.certCheckLine.isOk {border-left-color: var(--ok);}
.ui div.certCheckLine.isBad {color: var(--danger); font-weight: 700; border-left-color: var(--danger);}
.ui div.certCheckLine.isWarn {color: var(--warnText); border-left-color: var(--warnText);}
.ui div.certCheckLine .certClause {font-weight: 400; color: var(--muted);}
.ui div.certSigLine {display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px;}
.ui div.certSigLine input {flex: 1 1 10em; min-width: 0;}
.ui div.certImgLine {display: flex; flex-wrap: wrap; gap: 6px; align-items: center;}
.ui img.certImg {max-height: 60px; max-width: 220px; padding: 6px; background: #fff; border: 1px solid var(--line);}
/* the register card of a scale (scale_card.js): the status card red while OUT OF ORDER, the line of old data, a row of an out-of-order report */
.ui .scardOoo {border-color: var(--danger); border-left: 6px solid var(--danger); background: var(--dangerSoft);}
.ui p.scardOooText {color: var(--danger); font-weight: 700;}
.ui p.scardOld {padding: 8px 12px; color: var(--warnText); background: var(--warnBg); border-radius: var(--r1);}
.ui .row.scardRowOoo {border-left: 3px solid var(--danger);}
.ui p.pipRunLine {cursor: pointer;}
.ui div.pipCodes {display: flex; flex-wrap: wrap; gap: 6px; align-items: center;}
.ui span.pipCodeChip {display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 0 0 10px; font: var(--f2) var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: var(--rPill);}
.ui span.pipCodeChip button {min-height: 26px; padding: 0 8px; border: 0; border-left: 1px solid var(--line); background: transparent;}
/* the tables: a column of cards on a phone (the labels from data-label), a table on a wide screen; the register list: one row per pipette */
.ui table.pipTable {width: 100%; border-collapse: collapse; font-size: var(--f2); background: var(--surface);}
.ui table.pipTable th {font-size: var(--f0); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 6px 8px; background: var(--sunk);}
.ui table.pipTable td {padding: 6px 8px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); overflow-wrap: anywhere;}
.ui table.pipTable tr.pipClick {cursor: pointer;}
.ui table.pipTable tr.pipClick:hover td {background: var(--sunk);}
.ui table.pipStack, .ui table.pipStack tbody {display: block;}
.ui table.pipStack thead {display: none;}
.ui table.pipStack tr {display: block; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r2); margin: 0 0 var(--s2) 0; background: var(--surface);}
.ui table.pipStack td {display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 2px 0; border: 0; text-align: right; font-variant-numeric: tabular-nums;}
.ui table.pipStack td::before {content: attr(data-label); flex: 0 0 auto; max-width: 48%; text-align: left; font-size: var(--f1); font-weight: 700; color: var(--muted);}
.ui table.pipStack td[data-label=""]::before {content: none;}
.ui table.pipStack td[data-label=""] {justify-content: flex-start; text-align: left;}
.ui table.pipStack td:empty {display: none;}
.ui table.pipStack td.pipHeadCell {font-weight: 700;}
@media (min-width: 700px) {
	.ui table.pipStack {display: table;}
	.ui table.pipStack thead {display: table-header-group;}
	.ui table.pipStack tbody {display: table-row-group;}
	.ui table.pipStack tr {display: table-row; padding: 0; border: 0; margin: 0;}
	.ui table.pipStack td {display: table-cell; padding: 6px 8px; text-align: left; border-top: 1px solid var(--line); font-size: var(--f2);}
	.ui table.pipStack td::before {content: none;}
}
.ui .pipStatus_quarantine, .ui .pipStatus_out {color: var(--warnText); font-weight: 700;}
.ui .pipStatus_retired {color: var(--muted);}
.ui .pipDue_over {color: var(--danger); font-weight: 700;}
.ui .pipDue_soon {color: var(--warnText); font-weight: 700;}
.ui tr.pipImp_error td {color: var(--danger);}
.ui tr.pipImp_new td:nth-child(2), .ui tr.pipImp_update td:nth-child(2) {font-weight: 700;}
.ui table.pipCardTable, .ui table.pipCardTable tbody, .ui table.pipCardTable tr {display: block;}
.ui table.pipCardTable th {display: block; padding: 6px 0 0 0; font-size: var(--f1); text-align: left; color: var(--muted);}
.ui table.pipCardTable td {display: block; padding: 0 0 4px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere;}
@media (min-width: 700px) {
	.ui table.pipCardTable {display: table; width: 100%; border-collapse: collapse;}
	.ui table.pipCardTable tbody {display: table-row-group;}
	.ui table.pipCardTable tr {display: table-row;}
	.ui table.pipCardTable th {display: table-cell; width: 38%; padding: 4px 8px; vertical-align: top;}
	.ui table.pipCardTable td {display: table-cell; padding: 4px 8px;}
}
/* (the readings of a lab balance have 4-6 decimals: the big weight shrinks with the screen on the pipette pages) */
#isBigPage:has(#pipetteDiv:not(.dontShowDiv)) #topScale {font-size: min(4.1em, 13vw) !important;}
/* SALES MODE, FILL WEIGHING, CLUB (sales_mode.js, sales_trades.js, sales_report.js, cannabis_club.js, fill_weighing.js): the page of the
   shop and the club (trade_page: div.tradePage with the rules of div.roastPage - the tabs #tradeTabs under the weight, the kind chips, the
   card, the RECENT tiles; the keys 📋 ⋯ BOOK NOW in the key row, ⚙ in the head), the trade sheet (#tradeOverlay: its head with ← / the title
   / ✕, the box, its own key row - the page of a fill run sits above the message stack and the key row of the page), the report windows
   (rows that unfold, the summary card), the 💶 SALES tab, the fill page (chips, options, THIS RUN in the weighing colours of the results) */
#tradeTabs.ui.tabs {position: sticky; top: calc(var(--headH, 55px) + var(--instH, 0px)); z-index: 3; margin: 0 -10px;}
.ui .fld > .btn.sm, .ui .fld > .cardActs {justify-self: start;}
.ui .salesModeLimit:empty {display: none;}
.ui .salesModeLimit.over {display: grid; gap: 4px; padding: 8px 10px; background: var(--dangerSoft); border-left: 4px solid var(--danger); border-radius: var(--r1);}
.ui .salesModeLimit p {margin: 0;}
.ui .busyFormBody .chk .i, .ui .cardBody .chk .i {margin-left: 2px;}
/* the trade sheet: fixed below the head (a sheet with the weight: below the weight), its box scrolls, its key row at the bottom */
div.tradeSheet.ui {position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000; display: flex; flex-direction: column; box-sizing: border-box; background: var(--bg); border-top: 2px solid var(--edge); box-shadow: var(--shadowWin);}
body.appMenuWide div.tradeSheet.ui {left: var(--menuW);}
div.tradeSheet.ui:focus {outline: none;}
.ui .tradeSheetHead {flex: none; display: flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 4px 12px; background: var(--surface); border-bottom: 1px solid var(--line);}
.ui .tradeSheetTitle {display: grid; min-width: 0;}
.ui .tradeSheetTitle:empty {visibility: hidden;}
.ui .tradeSheetSub {font-size: var(--f1); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.ui .tradeSheetMain {display: flex; align-items: center; gap: 6px; font-size: var(--f3); font-weight: 700; overflow-wrap: anywhere;}
.ui .tradeSheetBox {flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: var(--s3); align-content: start; width: 100%; max-width: 720px; margin: 0 auto; padding: 12px 12px 24px 12px; box-sizing: border-box;}
.ui .tradeSheetBox > h3 {margin: 0; font-size: var(--f4);}
.ui .tradeSheetBox p {margin: 0;}
.ui .tradeSheetKeys {flex: none; display: flex; gap: var(--s2); padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)) 12px; background: var(--surface); border-top: 2px solid var(--edge);}
.ui .tradeSheetKeys .btn {flex: 1 1 0; min-width: 0; min-height: var(--key); font-size: var(--f3);}
.ui .tradeSheetKeys .btn.main {flex: 2 1 0;}
/* (the page of a fill run: the message stack and the key row of the page stay visible below it) */
body:has(#tradeOverlay.fillSheet) #weightPanel {display: none;} /* (🛍 FILL WEIGHING run: the weight stands big in the result box) */
div#tradeOverlay.fillSheet {z-index: 45; bottom: calc(var(--msgStackH, 0px) + var(--keyRowH, 0px) + var(--weightBoxH, 0px)); border-top: 0; box-shadow: none;}
/* the tables of the sheets not rebuilt yet (a wide one scrolls sideways) and the keys of their reports */
.ui .tradeTable {overflow-x: auto;}
table.cannabisTable {border-collapse: collapse; font-size: var(--f1); background: var(--surface);}
table.cannabisTable th, table.cannabisTable td {padding: 4px 8px; text-align: left; vertical-align: top; border: 1px solid var(--line);}
table.cannabisTable th {font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: var(--sunk);}
.ui .tradeReportKeys {position: sticky; bottom: -24px; padding: 8px 0; background: var(--bg);}
/* the report windows: wider for their rows; the lines at the top */
div#tradeReportWindow div.busyBox, div#fillReportWindow div.busyBox, div#salesSealedWindow div.busyBox, div#cannabisHarvestWindow div.busyBox, div#tradeOtherWindow div.busyBox {max-width: 46em;}
.ui .tradeLines {gap: 2px;}
.ui .row.salesDanger .grow {color: var(--danger);}
.ui label.row.chk {cursor: pointer; font-size: var(--f2);}
.ui .cannabisYearRow .join > .inp {flex: 0 0 6em;}
/* the 💶 SALES tab: the cards, the warnings with ⤓ CSV, the revenue big, the rows, the keys right */
div.ui.salesTab {display: grid; gap: var(--s3); margin-top: var(--s2);}
.ui.salesTab p {margin: 0;}
.ui.salesTab .banner {border-top: 0; border-radius: var(--r1);}
.ui .salesSum .salesBig {font: 700 var(--f6)/1.1 var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;}
.ui .salesKeys {align-items: stretch;}
.ui .salesKeys .btn {min-height: var(--ctl);}
.ui .salesFormat {margin-top: var(--s3);}
.ui .salesFormat select {width: 100%;}
/* the fill page: the chips of the run, the options, the note; the numbers of THIS RUN in the weighing colours of the results */
.ui .chips.fillChips .chip {font-weight: 600;}
.ui .fillStats {display: grid; gap: var(--s3);}
.ui .fillStats p.verdict {margin: 0;}
.ui .verdict.isBad {color: var(--danger); border-color: var(--danger);}
.ui .kv b.fillGreen, .ui .kv b.fillOrange, .ui .kv b.fillRed {justify-self: end; padding: 0 6px; border-radius: var(--r1); color: var(--onW);}
.ui .kv b.fillGreen {background: var(--wPerfect);}
.ui .kv b.fillOrange {background: var(--wUnder);}
.ui .kv b.fillRed {background: var(--wOver); color: var(--onWOver);}
.ui p.note.fillNote {display: flex; align-items: center; gap: 6px;}
.ui .note.fillBagHint {display: grid; gap: var(--s2);}
.ui .compAutoTareHint {margin: 0; min-height: 1.35em;}
/* DISPENSARY, METRC, INVENTORY, LOTS (dispensary.js, metrc_export.js, metrc_tags.js, approvals.js, inventory_tools.js, lots.js): the page of
   the DISPENSARY MODE on the page of the trades (div.tradePage.dispPage - the 🏷 METRC TAG row at the top of the weigh-out card with the full
   tag and its BALANCE, the fields of the harvest tab, the stock check list and its check card with the live difference in the weighing
   colours), the badge of ⋯, the windows 📤 TO METRC (a card per file, the rows as a list), 🧾 COLUMNS, the Metrc reports, the settings */
.ui .dispTagInput, .ui .dispTag {font-family: var(--mono); letter-spacing: 0.03em;}
.ui .dispTagInput {text-transform: uppercase;}
.ui .dispTagInput::placeholder {font-family: var(--font); letter-spacing: 0; text-transform: none;}
.ui .dispTag {font-size: var(--f3); font-weight: 700; overflow-wrap: anywhere;}
.ui .dispTop {display: grid; gap: var(--s2); padding-bottom: var(--s3); border-bottom: 1px solid var(--line);}
.ui .dispBalance {display: grid; gap: 2px;}
.ui .dispBalanceRow {align-items: center;}
.ui .dispBalanceLab {display: inline-flex; align-items: center; gap: 6px; font-size: var(--f1); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);}
.ui .dispBalanceRow b {font-size: var(--f3);}
.ui .dispBalanceRow b.dispOver {color: var(--danger);}
.ui .dispBalanceRow b.dispMuted {font-weight: 400; color: var(--muted);}
.ui .dispBalance .hint, .ui .fld > .hint, .ui .fld > .ufCheck {margin: 0;}
.ui .hint.dispWarn {color: var(--warnText); font-weight: 600;}
.ui .dispHintRow {display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2);}
.ui .dispHintRow .hint {flex: 1 1 12em; margin: 0;}
.ui .dispTagRead {display: flex; align-items: center; gap: var(--s2);}
.ui .dispTagRead .dispTag {flex: 1; min-width: 0;}
.ui .dispUnit {flex: none; align-self: center; font-size: var(--f2); color: var(--muted); white-space: nowrap;}
.ui .join > .sel.dispUnitSel {flex: 0 1 9em;}
/* the stock check: the packages as list rows (✓ / ○ | THING + …tag | quantity right), the live box of the check card */
.ui .dispRunList .row {width: 100%; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 0; border-top: 1px solid var(--line); border-radius: 0; cursor: pointer;}
.ui .dispRunList .row:first-child {border-top: 0;}
.ui .dispRunList .row.isDone .e {color: var(--ok); font-weight: 700;}
.ui .row .num {font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui .cardHead > .btn.ico.sm {width: var(--ctlS); min-height: var(--ctlS); letter-spacing: 0;}
.ui .cardHead > .x {margin: -8px -6px -8px 0;}
.ui .dispLive {display: grid; gap: 2px; padding: 10px 12px; text-align: center; color: var(--text); background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r2);}
.ui .dispLive .big {font: 700 var(--f5)/1.15 var(--mono); font-variant-numeric: tabular-nums;}
.ui .dispLive .sub {font-size: var(--f2);}
.ui .dispLive .verd {font-weight: 700;}
.ui .dispLive.isZero {color: var(--onW); background: var(--wPerfect); border-color: transparent;}
.ui .dispLive.isWithin {color: var(--onW); background: var(--wUnder); border-color: transparent;}
.ui .dispLive.isOver {color: var(--onWOver); background: var(--wOver); border-color: transparent;}
/* the settings window: the steps of the transfer check */
.ui ol.dispSteps {display: grid; gap: 6px; margin: 0; padding-left: 1.4em; font-size: var(--f2);}
/* the badge of ⋯ (the rows not sent to Metrc yet) */
.ui.keyRow #tradeMoreKey {position: relative;}
.ui.keyRow #tradeMoreKey .dispBadge {position: absolute; top: 2px; right: 2px; min-width: 18px; padding: 0 4px; font: 700 var(--f0)/18px var(--mono); color: var(--onMain); background: var(--main); border-radius: var(--rPill);}
/* 📤 TO METRC: the range line, a card per file (its count right in the head), the rows (☐ | tag | quantity; red: an error, warn: a warning) */
.ui .metrcRange {display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2);}
.ui .metrcRange .hint {margin: 0;}
.ui .metrcBadge {min-width: 22px; padding: 1px 6px; font: 700 var(--f1) var(--mono); text-align: center; letter-spacing: 0; color: var(--onMain); background: var(--main); border-radius: var(--rPill);}
.ui .metrcBadge.isNone {color: var(--muted); background: var(--sunk);}
.ui .metrcSummary {margin: 0; font-size: var(--f2); font-weight: 700;}
.ui .metrcSummary.isBad {color: var(--danger);}
.ui .metrcRows {max-height: 60vh; overflow-y: auto;}
.ui .row.metrcRow {display: grid; gap: 2px; align-items: stretch;}
.ui .row.metrcRow.isErr {box-shadow: inset 4px 0 0 var(--danger);}
.ui .row.metrcRow.isWarn {box-shadow: inset 4px 0 0 var(--warnBg);}
.ui .row.metrcRow.isOff {opacity: 0.55;}
.ui .metrcRowHead {display: flex; align-items: center; gap: var(--s2); cursor: pointer;}
.ui .metrcRowHead input {flex: none; width: 18px; height: 18px; accent-color: var(--main);}
.ui .row.metrcRow > .sub, .ui .row.metrcRow > .ufCheck, .ui .row.metrcRow > .hint {display: block; margin: 0; padding-left: 26px;}
.ui .row.metrcRow > .inp {margin-left: 26px; width: calc(100% - 26px);}
.ui .metrcLine {margin: 0; font-size: var(--f2); white-space: pre-line;}
.ui .hint.metrcOk {color: var(--ok); font-weight: 700;}
.ui .hint.metrcSmall {text-align: center;}
.ui .chk.metrcEarlierRow {font-size: var(--f1); overflow-wrap: anywhere;}
.ui .metrcArea {min-height: 6em; resize: vertical; font-family: inherit;}
.ui .metrcDays {max-width: 8em;}
.ui .metrcSettings {display: grid; gap: var(--s3);}
/* 🧾 COLUMNS: # | the column of Metrc | the field (select right); a column without a field in the warn colour */
.ui .metrcTplBox {display: grid; gap: var(--s2);}
.ui .metrcTplBox .sub2 {margin: 0;}
.ui .metrcTplList .row .grow {min-width: 9em; font-weight: 400; font-size: var(--f2);}
.ui .metrcTplList .row {flex-wrap: wrap;}
.ui .metrcTplList .row .sel {flex: 1 0 10em; width: auto; max-width: 100%;}
.ui .metrcTplList .row.isEmpty .grow {color: var(--warnText);}
/* the Metrc reports: a row = the tag + its number right, a tap unfolds the other columns; the foot row bold */
.ui .metrcRepList details.metrcRepRow {border-top: 1px solid var(--line);}
.ui .metrcRepList details.metrcRepRow:first-child {border-top: 0;}
.ui .metrcRepList summary.row {list-style: none; cursor: pointer; border-top: 0;}
.ui .metrcRepList summary.row::-webkit-details-marker {display: none;}
.ui .metrcRepList details > .kv {padding: 0 12px 10px 12px;}
.ui .metrcRepList .row.isSum {background: var(--sunk);}
.ui .metrcRepList .row.isSum .grow, .ui .metrcRepList .row.isSum .num {font-weight: 800;}
/* the Metrc tag scanner: the field row under the preview */
div.metrcTagTyped.ui {max-width: 26em; margin: 0 auto;}
/* the sign window of the approvals (✍ witness, recipe approval): the statement keeps its lines */
.ui .approvalsStatement {margin: 0; font-size: var(--f2); white-space: pre-wrap;}
/* the package label of the DISPENSARY MODE (lots_label_disp_extra, in the label window): the hints, the card of the state symbol */
.ui .lotsMetrcLabelExtra {display: grid; gap: var(--s2);}
.ui .lotsMetrcLabelExtra > .hint {margin: 0;}
.ui .lotsMetrcSymbolText {min-height: 5em; resize: vertical; font-family: inherit;}
/* SCALE INFO, LICENCE, SENSORS
   ✰ SCALE INFO (00_upscale.js createInfoPageDiv, LP 57): #isInfoPage.ui.infoPage under the head - ⚖ ABOUT THIS SCALE, the licence cards
   (licence.js #licenceInfoBlock: 🔑 LICENCE, 🛡 AUDIT TOOLS, 🛒 BUY), ⟳ UPDATES, 📖 MANUAL & FAQ, the copyright; key row #infoKeys.
   💎 the licence page (busy_form #licenceUpOverlay): a card per offer, a row per package (what | price + a month / once | ORDER).
   📡 the sensors window (sensors_room.js busy_form #sensWindow): tabs under the title, cards per tab, the keys of the tab at the bottom;
   the room chart takes its colours from the tokens --rc… (the report keeps fixed ones). The ✕ of the camera scanner (qr_scanner.js). */
div#isInfoPage.infoPage {box-sizing: border-box; max-width: 760px; margin: var(--headH) auto 0 auto; padding: var(--s3) 12px var(--s5) 12px; display: grid; gap: var(--s3); text-align: left; font-size: var(--f3);}
.ui .infoCards {display: grid; gap: var(--s3); min-width: 0;}
.ui .infoFoot {display: grid; gap: 2px; justify-items: center; padding: var(--s3) 0; text-align: center;}
.ui .infoFoot a {color: inherit;}
.ui .licState {padding: 2px 8px; font-size: var(--f2); font-weight: 700; letter-spacing: 0.04em; text-align: right; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--rPill);}
.ui .licState.isOn {background: var(--mainSoft); border-color: var(--main);}
.ui .hint.licEnt {font-size: var(--f2); font-weight: 600; color: var(--text);}
.ui .hint.licWait {font-size: var(--f4);}
.ui button.licDevice {min-height: var(--ctlS); padding: 2px 6px; font-size: var(--f3); font-weight: 700; letter-spacing: 0.04em; color: var(--danger); background: transparent; border: 1px dashed var(--line); border-radius: var(--r1);}
.ui .licBuyList .row .grow, .ui .licUpCard .row .grow {font-size: var(--f2);}
.ui .licBuyList .row .btn, .ui .licUpRow .btn {flex: none;}
.ui .licUpRow .licPrice {flex: none; display: grid; justify-items: end; font: 700 var(--f3)/1.15 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right;}
.ui .licUpRow .licPrice .sub {font-family: var(--font); font-weight: 400;}
.ui .licNow {font-weight: 700;}
.ui .verdict.licThanks {line-height: 1.4;}
div#licenceUpOverlay div.busyBox {max-width: 36em;}
div#licenceUpOverlay div.busyFormBody > .hint {margin: 0;}
div#sensWindow div.busyBox {max-width: 46em;}
div#sensWindow div.busyAskTitle {display: flex; align-items: center; gap: 4px; flex-wrap: wrap;}
div#sensWindow div.busyAskTitle > .back {margin-left: -8px;}
.ui .sensTabs {flex-shrink: 0; margin: 0 calc(-1 * var(--s4));}
.ui .sensDevices, .ui .sensSourceBox, .ui .sensSrcChannels, .ui .sensBcList {display: grid; gap: var(--s2); min-width: 0;}
.ui .sensDevice > .cardHead .ttl {flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere;}
.ui .sensDevice > .cardHead .sensState {flex: 0 1 auto; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted);}
.ui .sensDevice > .cardHead .sensState.bad, .ui .sensSrcRow .sub.bad, .ui .sensRegLine.bad, .ui .sensDue.bad, .ui .sensLive.bad {color: var(--danger); font-weight: 700;}
.ui .sensRow {display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s2); min-width: 0;}
.ui .sensRow .sensMeasurand {flex: 1 1 8em; min-width: 0; font-size: var(--f2); font-weight: 600;}
.ui .sensRow .sensValue {flex: 0 0 auto; min-width: 6em; font: 600 var(--f3) var(--mono); font-variant-numeric: tabular-nums; text-align: right;}
.ui .sensRow .sel {flex: 0 1 11em; width: auto;}
.ui .sensRegLine {display: flex; align-items: center; gap: var(--s2); font-size: var(--f1); color: var(--muted);}
.ui .sensRegLine .grow {flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere;}
.ui .sensLive {font-size: var(--f4); font-weight: 700;}
.ui .sensLive.mut {font-size: var(--f2); font-weight: 400;}
.ui .sensGrid {display: grid; grid-template-columns: repeat(auto-fill, minmax(11em, 1fr)); gap: var(--s3); min-width: 0;}
.ui .sensLocked {display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2);}
.ui .sensLocked .grow {flex: 1 1 12em;}
.ui .sensHeadKeys {margin-left: auto; display: flex; gap: var(--s2);}
.ui .cardHead .sensDay {flex: 0 1 auto; width: auto; min-height: var(--ctlS); margin-left: auto; padding-top: 2px; padding-bottom: 2px; font-size: var(--f2); font-weight: 600; letter-spacing: 0; text-transform: none;}
.ui .sensChart {--rcbg: var(--surface); --rcgrid: var(--line); --rctext: var(--muted); --rct: var(--danger); --rch: var(--cWater); --rcout: var(--danger); --rcgone: var(--muted);}
.ui .sensChart:empty {display: none;}
.ui .sensChart svg {display: block; margin: 0 auto;}
.ui .sensStats table {width: 100%; border-collapse: collapse; font-size: var(--f2);}
.ui .sensStats th, .ui .sensStats td {padding: 3px 6px; text-align: right; border-bottom: 1px solid var(--line);}
.ui .sensStats th:first-child, .ui .sensStats td:first-child {text-align: left;}
.ui .sensStats td:not(:first-child) {font-family: var(--mono); font-variant-numeric: tabular-nums;}
.ui .sensStats p {margin: var(--s2) 0 0 0; font-size: var(--f1); color: var(--muted);}
.ui .sensRegRow .sensDue {flex: none; font-size: var(--f1); white-space: nowrap;}
.ui .sensRegRow.isRetired .nm, .ui .sensRegRow.isRetired .e {color: var(--muted); opacity: 0.7;}
.ui .sensMeasures {display: flex; flex-wrap: wrap; gap: 4px var(--s4);}
.ui textarea.sensNotes {min-height: 4.5em; resize: vertical;}
.ui .sensHistLine {padding: 4px 0; font-size: var(--f1); color: var(--muted); border-top: 1px solid var(--line); overflow-wrap: anywhere;}
.ui .sensHistLine:first-child {border-top: 0;}
.ui .sensSrcCh > .cardHead .ttl {flex: 1 1 auto;}
.ui .setLink .sel.sensBaud {flex: none; width: 92px; min-height: var(--ctlS); padding: 2px 22px 2px 8px;}
.ui .hint.sensEmpty {padding: var(--s2) 0;}
/* =====================================================================================================================
   LAB TESTS: ☑ the TEST page (LP 134, selftest_link.js test_page_build: #isSetupPage.ui.setPage.testPage - tabs ✅ ROUTINE · 🔍 SELF-CHECK ·
   ⚖ CALIBRATION · 📑 VALIDATION · 🖥 DEVICES, the key row #testKeys), the panels of a running test under the weight (div.ui.tstPanel, LP 135 /
   136, key row #labKeys), the ⚖ CALIBRATION page (LP 52 - 55, div.ui.calPage in #runningStuff), the windows DEVICE QUALIFICATION, DEVICE
   REGISTER, VALIDATION PACK. Test verdicts are weighing results: ✓ green, ≈ yellow, ~ orange, ✗ red (the weighing colours); state lines plain.
   ===================================================================================================================== */
.ui.testPage .setSlot {scroll-margin-top: calc(var(--headH) + 56px);}
.ui .tstAlert {padding: 6px 10px; background: var(--sunk); border-radius: var(--r1);}
.ui .tstAlert.bad {color: var(--onDanger); background: var(--danger);}
.ui .tstAlert.bad .btn.sm {color: var(--text);}
.ui .tstTag {display: inline-block; padding: 1px 6px; font-size: var(--f0); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; color: var(--text); background: var(--sunk); border: 1px solid var(--line); border-radius: var(--rPill);}
.ui .tstTag.bad {color: var(--onDanger); background: var(--danger); border-color: var(--danger);}
.ui .btn.isOff {color: var(--muted); background: var(--sunk); border-color: var(--line);}
.ui .cardHead .tstHeadSel {flex: 0 1 auto; width: auto; min-height: var(--ctlS); margin-left: auto; padding-top: 2px; padding-bottom: 2px; font-size: var(--f1); font-weight: 600; letter-spacing: 0; text-transform: none;}
.ui .tstTapLine {cursor: pointer;}
.ui .tstExportRow > .lab {flex: 0 0 auto;}
/* the rows of a card: the name (its sub lines muted) left, the numbers right-aligned, the marks small; the head row muted */
.ui .tstRows {box-shadow: none;}
.ui .tstRows .row {min-height: 40px;}
.ui .tstRows .row.mut .grow {color: var(--muted); font-weight: 400;}
.ui .row .tstNum {flex: none; min-width: 3.5em; text-align: right; font: 600 var(--f2) var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap;}
.ui .row .tstNum small {display: block; font-weight: 400; color: var(--muted);}
.ui .row .tstMark {flex: none; width: 2.2em; text-align: center; font-size: var(--f2);}
.ui .row .tstMarkKey {flex: none; min-width: var(--ctlS); padding: 2px 6px;}
.ui .row.tstHeadRow {min-height: 0; padding-top: 4px; padding-bottom: 4px; font-size: var(--f0); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--sunk);}
.ui .row.tstHeadRow .grow, .ui .row.tstHeadRow .tstNum, .ui .row.tstHeadRow .tstMark {font: inherit; color: inherit;}
.ui .row .tstCase {display: grid; gap: 2px; max-width: 50%; white-space: normal; overflow-wrap: anywhere; font-weight: 400;}
.ui .row .tstCase .isBad {color: var(--danger);}
.ui .row .tstStState {white-space: normal; max-width: 45%;}
.ui .row .tstStState.isBad > span {color: var(--danger);}
/* a test verdict (✓ / ≈ / ~ / ✗): the weighing colours */
.ui .tstLvl {font-weight: 700;}
.ui .tstLvl.lvl_ok, .ui .tstLvl.lvl_maybe, .ui .tstLvl.lvl_warn, .ui .tstLvl.lvl_bad {padding: 0 4px; color: var(--onW); border-radius: var(--r1);}
.ui .tstLvl.lvl_ok {background: var(--wPerfect);}
.ui .tstLvl.lvl_maybe {background: var(--wOk);}
.ui .tstLvl.lvl_warn {background: var(--wUnder);}
.ui .tstLvl.lvl_bad {background: var(--wOver); color: var(--onWOver);}
.ui .tstVerdict {padding: 10px 12px; font-size: var(--f3); font-weight: 700; color: var(--text); background: var(--sunk); border-radius: var(--r2);}
.ui .tstVerdict.lvl_ok {color: var(--onW); background: var(--wPerfect);}
.ui .tstVerdict.lvl_maybe {color: var(--onW); background: var(--wOk);}
.ui .tstVerdict.lvl_warn {color: var(--onW); background: var(--wUnder);}
.ui .tstVerdict.lvl_bad {color: var(--onWOver); background: var(--wOver);}
.ui .card.tstLevel {border-left-width: 6px;}
.ui .card.tstLevel.lvl_ok {border-left-color: var(--wPerfect);}
.ui .card.tstLevel.lvl_maybe {border-left-color: var(--wOk);}
.ui .card.tstLevel.lvl_warn {border-left-color: var(--wUnder);}
.ui .card.tstLevel.lvl_bad {border-left-color: var(--wOver);}
.ui .tstResult {font-size: var(--f2); line-height: 1.5;}
/* the signature of the inspector: the whole width, ✕ CLEAR at its top right */
.ui .tstSign {position: relative; display: grid; gap: 4px;}
.ui canvas.tstSignPad {display: block; width: 100%; height: 120px; background: #ffffff; /* (paper: the ink of the signature is black) */ border: 1px solid var(--line); border-radius: var(--r1); touch-action: none;}
.ui .tstSign .tstSignClear {position: absolute; top: 18px; right: 4px;}
/* ⋯: the rows of the window */
.ui .row.tstMoreRow {width: 100%; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 0; border-top: 1px solid var(--line); cursor: pointer;}
.ui .row.tstMoreRow:first-child {border-top: 0;}
.ui .row.tstMoreRow:hover {background: var(--sunk);}
.ui .row.tstMoreRow.isLocked .grow {color: var(--muted);}
.ui .row.tstMoreRow.isDanger .grow {color: var(--danger);}
.ui .tstFileLines {display: grid; gap: 2px; overflow-wrap: anywhere;}
.ui .tstFileLines.bad {color: var(--danger);}
/* the panel of a running test under the weight: the card of the test (the thing to do - large, the live line, 'value n of m' with a bar,
   the plate of the eccentricity test), the values, the result; the reports' tables inside in the parts of look A */
.ui.tstPanel, .ui.calPage {display: grid; gap: var(--s3); width: 100%; max-width: 720px; margin: var(--s3) auto 0 auto; padding-bottom: var(--s4); box-sizing: border-box; text-align: left; overflow-wrap: anywhere;}
.ui.tstPanel.dontShowDiv, .ui.calPage.dontShowDiv, .ui.tstPanel .dontShowDiv, .ui.calPage .dontShowDiv {display: none;}
.ui.tstPanel p, .ui.calPage p {margin: 0;}
/* the key row of the test page: ⋯ keeps the width of a key (alone it takes the row), a locked key puts its 🔒 line under the label */
.ui.keyRow.tstKeys .btn {flex-wrap: wrap; justify-content: center; align-content: center; text-align: center; overflow-wrap: break-word; hyphens: auto;}
.ui.keyRow.tstKeys .btn.ico {flex: 0 0 var(--key); width: var(--key); min-width: var(--key); font-size: var(--f4);}
.ui.keyRow.tstKeys .btn.ico:only-child {flex: 1 1 0; width: auto;}
/* the export format row (⤓ + format select + ⚙): the select takes the room, the gear its own width, nothing leaves the card */
.ui .tstExportRow > .setCtl {flex: 1 1 14em; justify-content: stretch;}
.ui .tstExportRow > .setCtl > span {display: flex; align-items: center; gap: var(--s2); flex: 1 1 auto; min-width: 0;}
.ui .tstExportRow select.exportFmtSel {flex: 1 1 0; width: 100%; min-width: 0; max-width: 100%;}
.ui .tstExportRow .setCtl button {flex: none; min-width: var(--ctlS); min-height: var(--ctlS);}
.ui .tstStatus {display: grid; gap: 6px;}
.ui .tstAction {font-size: var(--f4); font-weight: 700; line-height: 1.3;}
.ui .tstAction.isDone {font-size: var(--f3);}
.ui .tstLive {font: var(--f2) var(--mono); font-variant-numeric: tabular-nums; color: var(--muted);}
.ui .tstProgress {display: flex; align-items: center; gap: var(--s2);}
.ui .tstProgress .tstBar {flex: 1 1 auto; height: 4px;}
.ui .tstProgress .tstBar span {width: 0; transition: width 0.2s;}
.ui .tstProgress .tstHint {flex: none; font-size: var(--f1); color: var(--muted); text-align: right;}
.ui .tstModeNote {margin: 0;}
.ui .tstPlate {position: relative; width: 96px; height: 72px; margin: 2px 0; background: var(--sunk); border: 2px solid var(--edge); border-radius: var(--r1);}
.ui .tstPlate .tstSpot {position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 2px solid var(--muted); border-radius: 50%; background: var(--surface);}
.ui .tstPlate .tstSpot.on {background: var(--mark); border-color: var(--edge); box-shadow: 0 0 0 3px var(--mark);}
.ui .tstPlate .tstSpot0 {left: 50%; top: 50%;}
.ui .tstPlate .tstSpot1 {left: 20%; top: 78%;}
.ui .tstPlate .tstSpot2 {left: 80%; top: 78%;}
.ui .tstPlate .tstSpot3 {left: 80%; top: 22%;}
.ui .tstPlate .tstSpot4 {left: 20%; top: 22%;}
.ui .tstDoc {display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); font-size: var(--f2); min-width: 0; overflow-x: auto;}
.ui .tstDoc h3 {margin: var(--s2) 0 0 0; font-size: var(--f1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);}
.ui .tstDoc .note {padding: 0; font-size: var(--f1); color: var(--muted); background: none;}
.ui .tstDoc table.selfcheckTable, .ui .tstDoc table.stationTable {display: table; width: 100%; border-collapse: collapse; font-size: var(--f1);}
.ui .tstDoc table.selfcheckTable th, .ui .tstDoc table.stationTable th {padding: 4px 6px; font-size: var(--f0); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; text-align: right; white-space: normal; overflow-wrap: anywhere; color: var(--muted); background: var(--sunk); border-bottom: 1px solid var(--line);}
.ui .tstDoc table.selfcheckTable td, .ui .tstDoc table.stationTable td {width: auto; padding: 5px 6px; text-align: right; white-space: normal; overflow-wrap: normal; vertical-align: top; font-family: var(--mono); font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line);}
.ui .tstDoc table.selfcheckTable th:first-child, .ui .tstDoc table.selfcheckTable td:first-child, .ui .tstDoc table.stationTable th, .ui .tstDoc table.stationTable td {text-align: left; font-family: inherit;}
.ui .tstDoc table.selfcheckTable tr.selfcheck_ok td:first-child {box-shadow: inset 4px 0 0 var(--wPerfect);}
.ui .tstDoc table.selfcheckTable tr.selfcheck_maybe td:first-child {box-shadow: inset 4px 0 0 var(--wOk);}
.ui .tstDoc table.selfcheckTable tr.selfcheck_warn td:first-child {box-shadow: inset 4px 0 0 var(--wUnder);}
.ui .tstDoc table.selfcheckTable tr.selfcheck_bad td:first-child {box-shadow: inset 4px 0 0 var(--wOver);}
.ui .tstDoc table.selfcheckTable tr.selfcheck_na td, .ui .tstDoc table.selfcheckTable tr.selfcheck_nj td {color: var(--muted);}
.ui .tstLvl.lvl_nj, .ui .tstVerdict.lvl_nj {color: var(--muted);}
.ui .tstDoc table.selfcheckTable td button {width: auto;}
.ui .tstDoc .stationDev textarea {width: 100%; min-width: 8em;}
/* the changeover step ΔL of a row: − value + */
.ui .selfcheckDlStep {display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;}
.ui .selfcheckDlStep .selfcheckDlBtn {width: var(--ctlS); min-height: var(--ctlS); padding: 0; font-weight: 700; color: var(--text); background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r1);}
.ui .tstHelp {display: grid; gap: var(--s3);}
.ui .tstHelp ul {margin: 0; padding-left: 1.2em;}
/* the calibration: a card per step (the turning ⚖ while the scale works), 'Step n of m' above it */
.ui .calStep {margin: 0; padding: 6px 2px 0 2px;}
.ui .calWait {display: flex; align-items: center; gap: var(--s3); font-size: var(--f3);}
.ui .calWait .spin {flex: none; font-size: var(--f5);}
.ui .calText {font-size: var(--f3); line-height: 1.5;}
.ui .calNote {padding: 0 2px;}
/* the window DEVICE QUALIFICATION: the tabs under its title, the test blocks (✓ / ✗ in the weighing colours at their edge), the data the
   app reads as rows; the windows DEVICE QUALIFICATION and DEVICE REGISTER wider */
div#stationWindow div.busyBox, div#stationRegister div.busyBox, div#valpackWindow div.busyBox {max-width: 46em;}
div.busyForm#stationWindow div.busyFormBody, div.busyForm#stationRegister div.busyFormBody, div.busyForm#valpackWindow div.busyFormBody {align-content: start; grid-auto-rows: max-content;} /* (the rows keep their height: the tab row does not shrink to 1 px) */
.ui .card.tstVpCard.inWin > .cardHead {display: none;}
.ui.tstPanel .setCard > .cardHead .state, .ui.calPage .setCard > .cardHead .state {flex: 0 0 auto; overflow: visible;} /* (n / m keeps its width; the long title wraps) */
.ui .tstWinTabs {position: sticky; top: 0; z-index: 2; margin: 0 0 var(--s3) 0;}
.ui .stationTab {gap: var(--s3);}
.ui .stationTab.dontShowDiv {display: none;}
.ui div.stationCard {display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "cmd" "exp" "obs" "res"; gap: 6px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: var(--r1);}
@media (min-width: 800px) {.ui div.stationCard {grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; grid-template-areas: "head head head" "cmd cmd cmd" "exp obs res"; align-items: start;}}
.ui div.stationCard_pass {border-left-color: var(--wPerfect);}
.ui div.stationCard_fail {border-left-color: var(--wOver);}
.ui div.stationCard_na {border-left-color: var(--muted);}
.ui div.stationCardHead {grid-area: head; font-size: var(--f2);}
.ui div.stationCmd {grid-area: cmd; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;}
.ui div.stationCmd code {flex: 1 1 12em; min-width: 0; padding: 4px 8px; font: var(--f1) var(--mono); overflow-wrap: anywhere; background: var(--sunk); border-radius: var(--r1);}
.ui div.stationExpect {grid-area: exp; font-size: var(--f1); color: var(--muted);}
.ui div.stationExpect span {font-weight: 700;}
.ui div.stationObserved {grid-area: obs; display: grid; gap: 4px; min-width: 0;}
.ui div.stationObserved textarea {width: 100%; min-height: 3.2em; font: var(--f1) var(--mono);}
.ui div.stationObserved p {margin: 0; overflow-wrap: anywhere;}
.ui p.stationAutoProposal {margin: 0; font-size: var(--f1); color: var(--muted);}
.ui label.stationResultSel {grid-area: res; display: flex; align-items: center; gap: 6px; font-size: var(--f1); font-weight: 700; white-space: nowrap;}
.ui label.stationResultSel .sel {width: auto;}
.ui div.stationRef {display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--f2);}
.ui div.stationRef .inp {width: auto; flex: 1 1 8em;}
.ui span.stationClock {font: 700 var(--f5) var(--mono); font-variant-numeric: tabular-nums;}
.ui div.stationAuto h3 {margin: var(--s2) 0 4px 0; font-size: var(--f1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);}
.ui table.stationMeta {width: 100%; border-collapse: collapse; font-size: var(--f2);}
.ui table.stationMeta th, .ui table.stationMeta td {padding: 4px 0; text-align: left; vertical-align: top; overflow-wrap: anywhere; border-bottom: 1px solid var(--line);}
.ui table.stationMeta th {width: 45%; padding-right: 10px; font-weight: 600;}
.ui table.stationMeta td {text-align: right; font-variant-numeric: tabular-nums;}
.ui div.stationArchive p {margin: 2px 0; font-size: var(--f1);}
p.stationNote {font-size: var(--f1); color: var(--muted);}
/* =====================================================================================================================
   INVENTORY, LOTS, SCANNER: the 🪙 GOLD and 📦 STOCK windows (bakers_tools.js bakers_stock_render, busy_form #goldWindow / #stockWindow:
   the small line of a sub-page above its title with ←, the tabs 📦 INVENTORY | 💶 SALES LOG under the title, the key row at the bottom),
   the parts of the inventory (inventory_tools.js: the list rows, the weight strip of a sub-page that weighs, the result lines in the weighing
   colours, kv rows), 🧾 LOTS and 📥 the lot import (lots.js #lotsWindow / #lotsImportWindow), the camera scanner (qr_scanner.js
   #qrScanWindow: the preview with the notice over its bottom edge) and the 🧾 BATCH REPORT window (recipe_tools.js #batchReportWindow) -
   on a phone the whole screen
   ===================================================================================================================== */
div.busyForm.stockWin div.busyBox, div.busyForm.lotsWin div.busyBox, div.busyForm.batchReportWin div.busyBox {max-width: 40em;}
div.busyForm.qrScanWin div.busyBox {max-width: 30em;}
div.busyForm.stockWin div.busyFormBody, div.busyForm.lotsWin div.busyFormBody, div.busyForm.batchReportWin div.busyFormBody {align-content: start;}
div.busyForm.stockWin div.busyAskTitle, div.busyForm.lotsWin div.busyAskTitle {display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere;}
div.busyForm.stockWin div.busyAskTitle > .back, div.busyForm.lotsWin div.busyAskTitle > .back {margin-left: -8px;}
div.busyForm .stockSub {flex-shrink: 0; margin: 0 calc(var(--hit) + var(--s1)) -6px 0; font-size: var(--f1); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
div.busyForm .stockTabs {flex-shrink: 0; margin: 0 calc(-1 * var(--s4));}
div.busyForm.stockWin div.busyAskButtons button.stockMoreKey {min-width: var(--ctl); padding: 0 var(--s3);}
div.busyForm.stockWin div.busyAskButtons .lock {margin-left: 6px;}
div.busyForm.stockWin div.busyAskButtons:empty, div.busyForm.lotsWin div.busyAskButtons:empty, div.busyForm.qrScanWin div.busyAskButtons:empty {display: none;}
div#stockMoreWindow .row.danger .grow {color: var(--danger);}
div.busyForm.stockWin div.busyAskButtons button.isLocked, div.busyForm.lotsWin div.busyAskButtons button.isLocked {color: var(--muted); background-color: var(--sunk); border-color: var(--line);}
@media (max-width: 600px) {
	div.busyForm.stockWin, div.busyForm.lotsWin, div.busyForm.qrScanWin, div.busyForm.batchReportWin {padding: 0;}
	div.busyForm.stockWin div.busyBox, div.busyForm.lotsWin div.busyBox, div.busyForm.qrScanWin div.busyBox, div.busyForm.batchReportWin div.busyBox {max-width: none; height: 100%; border-radius: 0; padding-bottom: calc(var(--s4) + env(safe-area-inset-bottom, 0px));}
	div.busyForm.stockWin div.busyFormBody, div.busyForm.lotsWin div.busyFormBody {flex: 1 1 auto;}
	div.busyForm.stockWin div.busyAskButtons, div.busyForm.lotsWin div.busyAskButtons {flex-wrap: wrap;}
	div.busyForm.stockWin div.busyAskButtons button, div.busyForm.lotsWin div.busyAskButtons button {flex: 1 1 auto; min-width: min-content; padding: 0 var(--s2); overflow-wrap: normal;}
	div.busyForm.stockWin div.busyAskButtons button.busyKind_main, div.busyForm.lotsWin div.busyAskButtons button.busyKind_main {flex: 2 1 auto;}
	div.busyForm.stockWin div.busyAskButtons button.stockMoreKey {flex: 0 0 auto;}
}
/* the pages of the 📦 STOCK window: a column of cards, tools and rows */
.ui .invPage, .ui .lotsPage, .ui .lotsImportPage {display: grid; gap: var(--s3); min-width: 0;}
.ui .invPage p, .ui .lotsPage p, .ui .lotsImportPage p {margin: 0;}
.ui .invTools {flex-wrap: wrap;}
.ui .invTools .inp {flex: 1 1 10em;}
.ui .invTools .sel {flex: 0 1 auto; width: auto;}
.ui .invList .row, .ui .invGoodsList .row, .ui .lotsList .row, .ui .lotsImportRows .row, .ui .lotsImportThings .row, .ui .lotsImportMap .row {padding-right: 8px;}
.ui .invHead {min-height: 0; padding-top: 6px; padding-bottom: 6px; font-size: var(--f0); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--sunk);}
.ui .invHead .grow {font-weight: 700;}
.ui .invList input[type="checkbox"] {flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--main);}
.ui .invOpen, .ui .lotsOpen {padding: 0; text-align: left; font: inherit; font-weight: 600; color: inherit; background: transparent; border: 0;}
.ui .invNum {flex: none; display: grid; justify-items: end; font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;}
.ui .invNum .sub {display: block; font-family: var(--font); font-size: var(--f1); font-weight: 400; color: var(--muted);}
.ui .invHead .invNum {font-family: var(--font);}
.ui .invEnd {flex: none; width: var(--ctl);}
.ui .invDel {color: var(--danger);}
.ui .invEmpty {font-weight: 400; color: var(--muted);}
.ui .invFoot {display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2);}
.ui .invPager {gap: var(--s1);}
.ui .invPager .btn {min-width: var(--ctlS);}
.ui .invBig {font: 600 var(--f5)/1.2 var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;}
.ui .invLine {font-weight: 700;}
.ui .invKv {grid-template-columns: fit-content(65%) minmax(0, 1fr);} /* (a long value wraps; the label keeps its words) */
.ui .invKv .sub {display: block; font-size: var(--f1); color: var(--muted);}
.ui .invKv b.invUnder {color: var(--warnInk);}
.ui .invTwo {display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); align-items: end;}
.ui .invHint:empty, .ui .invLive:empty, .ui .ufCheck:empty {display: none;}
.ui .invStep {font-size: var(--f3); font-weight: 700;}
.ui .invSum {font-weight: 700;}
.ui .invSum.isBad {color: var(--danger);}
.ui .invAsk {border-left: 4px solid var(--wUnder);}
.ui .invOk {color: var(--ok);}
.ui .invMark {flex: none; font-size: var(--f1); font-weight: 700; white-space: nowrap;}
.ui .invGoodsRow.isNow {box-shadow: inset 4px 0 0 var(--main); background: var(--sunk);}
.ui .invGoodsCard.isBad {box-shadow: inset 4px 0 0 var(--danger);}
.ui .invGoodsTools {justify-content: flex-start;}
.ui .cardHead .invDel {margin-left: auto;}
.ui .invEarlier .chev {flex: none; color: var(--muted);}
/* the weight strip of a sub-page that weighs: the live weight large (pale while it moves), its line below - off the weighing page red */
.ui .invStrip {display: grid; gap: 2px; padding: 10px 12px; color: var(--onDisp); background: var(--disp); border: 1px solid var(--dispEdge); border-radius: var(--r2);}
.ui .invStripW {font: 600 var(--f6)/1.1 var(--mono); font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere;}
.ui .invStripL {font-size: var(--f2); color: var(--dispMuted); text-align: right; overflow-wrap: anywhere;}
.ui .invStrip.isMoving .invStripW, .ui .invStrip.isMoving .invStripL {opacity: 0.6;}
.ui .invStrip.isOff .invStripW {font: 700 var(--f3)/1.3 var(--font); color: var(--dispWarn); text-align: left;}
/* a result line in the weighing colours: the mark at its left edge (less orange, more red, as expected green) */
.ui .invRes {padding: 4px 8px; font-size: var(--f2); font-weight: 700; border-left: 6px solid var(--line); background: var(--sunk); border-radius: var(--r1);}
.ui .invRes.wUnder {border-left-color: var(--wUnder);}
.ui .invRes.wOver {border-left-color: var(--wOver);}
.ui .invRes.wPerfect {border-left-color: var(--wPerfect);}
/* 🧾 LOTS: the search with 🔍 📷, the rows (state | lot · THING · use by | ⤓), the card (kv rows | QR), the due line */
.ui .lotsSearchFld .join .inp {flex: 1 1 auto;}
.ui .lotsList .row .e {font-size: var(--f3);}
.ui .lotsCardTop {display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3); align-items: start;}
.ui .lotsQr {width: 120px; height: auto; image-rendering: pixelated; background: #fff; padding: 4px;}
@media (max-width: 480px) {.ui .lotsCardTop {grid-template-columns: 1fr;} .ui .lotsQr {justify-self: center;}}
.ui .lotsTag, .ui .lotsMetrc .kv b.lotsTag {font-family: var(--mono); letter-spacing: 0.04em; word-break: break-all; white-space: normal;}
.ui .lotsMetrc .kv b.l {white-space: normal;}
.ui .note.lotsDue {color: var(--warnText); background: var(--warnBg);}
.ui .lotsDueText {color: var(--warnInk);}
.ui .row.isOff .grow {color: var(--muted);}
.ui .row.isBad {box-shadow: inset 4px 0 0 var(--danger);}
.ui .lotsImportMap .row .sel {flex: 0 1 14em; width: auto; min-width: 8em;}
.ui .lotsImportMap .row.isSet .grow {color: var(--text);}
.ui .lotsImportMap .row:not(.isSet) .grow {color: var(--muted);}
.ui .lotsImportThings .row .inp {flex: 0 1 12em; width: auto; min-width: 7em;}
.ui .lotsImportFailed {max-height: 40vh; overflow-y: auto;}
.ui .card.isBad {border-color: var(--danger);}
/* the camera scanner: the preview (black, its notice over the bottom edge), the state and the info lines */
.ui .qrScanCam {position: relative; overflow: hidden; background: #000; border-radius: var(--r2);}
.ui .qrScanCam video.qrScanVideo {display: block; width: 100%; max-height: 55vh; object-fit: contain; background: #000;}
.ui .qrScanNotice {position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 8px 10px; font-size: var(--f2); font-weight: 700; color: var(--onFill); background: var(--fillBad); overflow-wrap: anywhere;}
.ui .qrScanStatus, .ui .qrScanInfo {margin: 0; white-space: pre-line;}
@media (max-width: 600px) {.ui .qrScanCam video.qrScanVideo {max-height: 60vh;}}
/* 🧾 BATCH REPORT: the preview as a paper page (white in both schemes) */
.ui .recipeReportPreview {margin-top: 0; max-height: none;}
/* the tabs of a trade on a phone: the texts may wrap - the tab that is on is never cut at the right edge */
@media (max-width: 479px) {#tradeTabs.ui.tabs .tab {flex: 1 1 auto; padding: 8px 6px; white-space: normal; line-height: 1.2;}}
/* the red lines of the archive state (audit_archive.js audit_status_html) in the station window */
.ui div.stationArchive b.auditBad {color: var(--danger);}
/* the pipette register: its own key row at the bottom (#pipKeys) - the key rows of the page below hide while it is open, the page ends above
   the key row; the list of the register: a tick in front of each row */
body:has(> div.pipOverlay) > .ui.keyRow:not(#pipKeys) {display: none;}
.ui.pipOverlay {padding-bottom: calc(var(--keyRowH, 0px) + var(--s6));}
.ui .list.pipList .row .pipTick {flex: none; width: 22px; height: 22px; margin: 0;}
.ui .list.pipList .row .grow b {font-weight: 700;}
/* 🧰 TEST WEIGHTS (javascript/vscale/weight_box.js): a wooden box of test weights at the bottom - the weight of the virtual scale */
div.weightBox {position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; box-sizing: border-box; padding: 0 0.5em 0.45em 0.5em; color: #fbe9cf; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(0, 0, 0, 0.18)), repeating-linear-gradient(91deg, #a8703b 0 7px, #9e6634 7px 9px, #b47a43 9px 16px, #92592b 16px 17px, #ab733e 17px 26px), #a06a36;
	border-top: 4px solid #6b4220; box-shadow: 0 -0.25em 0.8em rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.18);}
body.appMenuWide div.weightBox {left: var(--menuW);}
div.weightBox.weightBoxOnTop {z-index: 20005;}
/* (the box above the windows: a window stands in the room above the box, its keys never under it) */
body:has(> div.weightBox.weightBoxOnTop:not(.dontShowDiv)) div.busyOverlay {padding-bottom: calc(var(--weightBoxH, 0px) + var(--msgStackH, 0px) + var(--keyRowH, 0px) + var(--s4));}
body:has(> div.weightBox.weightBoxOnTop:not(.dontShowDiv)) div.busyOverlay div.busyBox {max-height: 100%; overflow-y: auto;}
div.weightBoxHead {display: flex; align-items: center; flex-wrap: wrap; gap: 0.3em 0.5em; padding: 0.3em 0 0.3em 0; font-size: 0.85em;}
span.weightBoxTitle {font-weight: bold; letter-spacing: 0.05em; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);}
span.weightBoxTotal {font-weight: bold; background: rgba(0, 0, 0, 0.28); border-radius: 0.4em; padding: 0.1em 0.5em; font-variant-numeric: tabular-nums; white-space: nowrap;}
span.weightBoxSets {display: inline-flex; border-radius: 999px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.35);}
div.weightBox button {margin: 0; font-size: 1em; cursor: pointer;}
button.weightBoxSet {padding: 0.15em 0.6em; border: 0; border-radius: 0; background: rgba(0, 0, 0, 0.18); color: #fbe9cf; font-weight: bold;}
button.weightBoxSet.weightBoxSetOn {background: #fbe9cf; color: #5a3416;}
button.weightBoxAllOff {padding: 0.15em 0.6em; border: 1px solid rgba(0, 0, 0, 0.35); border-radius: 999px; background: rgba(0, 0, 0, 0.18); color: #fbe9cf; font-weight: bold;}
button.weightBoxAllOff:disabled {opacity: 0.45; cursor: default;}
span.weightBoxRight {display: inline-flex; align-items: center; gap: 0.5em; margin-left: auto;}
span.weightBoxInfo {cursor: pointer;}
button.weightBoxClose {width: 1.8em; height: 1.8em; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.3); color: #fff; font-weight: bold;}
div.weightBoxTray {display: flex; align-items: flex-end; gap: 0.45em; overflow-x: auto; overflow-y: hidden; padding: 0.4em 0.35em 0.35em 0.35em; border-radius: 0.4em; touch-action: pan-x;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.12)); box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.45);}
/* the cavities: green felt, the weight stands (knob) or lies (sheet) in it */
div.wbCavity {position: relative; flex: 0 0 auto; display: flex; align-items: flex-end; justify-content: center; min-width: 30px; height: 74px; padding: 4px 6px 6px 6px; box-sizing: border-box; border-radius: 0.6em 0.6em 0.45em 0.45em; cursor: pointer;
	background: radial-gradient(ellipse at 50% 35%, #2f6b45 0%, #1f4d31 70%, #173a25 100%); box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.15);}
div.wbCavity_sheet {align-items: center; background: radial-gradient(ellipse at 50% 45%, #7a2e36 0%, #5a1f26 75%, #44161c 100%);}
div.wbCavity:hover {box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.7), 0 0 0 2px rgba(255, 233, 190, 0.55);}
div.wbWeight {display: flex; flex-direction: column; align-items: center; transition: opacity 0.35s, transform 0.35s; pointer-events: none;}
div.wbWeight.wbGone {opacity: 0; transform: translateY(6px) scale(0.92);}
div.wbWeight.wbHidden {opacity: 0; transition: none;}
div.wbWeight.wbFlying {position: fixed; z-index: 30000; margin: 0; transition: none; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.35));}
div.wbKnob {border-radius: 50% 50% 40% 40%;}
div.wbNeck {border-radius: 1px;}
div.wbBody {display: flex; align-items: center; justify-content: center; border-radius: 3px 3px 5px 5px; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);}
span.wbLabel {font-weight: bold; white-space: nowrap; line-height: 1; color: rgba(40, 25, 5, 0.78); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);}
div.wb_brass div.wbKnob, div.wb_brass div.wbNeck, div.wb_brass div.wbBody {background: linear-gradient(90deg, #7a5a15 0%, #c99a35 18%, #f6dc86 38%, #d9b04a 58%, #9c7420 82%, #6d4f12 100%);}
div.wb_steel div.wbKnob, div.wb_steel div.wbNeck, div.wb_steel div.wbBody {background: linear-gradient(90deg, #5c6268 0%, #a5adb5 18%, #f4f6f8 38%, #c3cad1 58%, #858c93 82%, #50565c 100%);}
div.wb_iron div.wbKnob, div.wb_iron div.wbNeck, div.wb_iron div.wbBody {background: linear-gradient(90deg, #1e1e1e 0%, #4a4a4a 22%, #7a7a7a 40%, #555 60%, #2c2c2c 100%);}
div.wb_iron span.wbLabel {color: rgba(255, 255, 255, 0.8); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);}
div.wbWeight.wb_sheet {justify-content: center; border-radius: 1px; clip-path: polygon(0 0, 100% 0, 100% 72%, 78% 100%, 0 100%); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);}
div.wb_sheet.wb_steel {background: linear-gradient(135deg, #f2f4f6 0%, #c8ced4 45%, #e9ecef 60%, #a9b0b7 100%);}
div.wb_sheet.wb_brass {background: linear-gradient(135deg, #f6dc86 0%, #d4ab45 45%, #f0d27a 60%, #a8801f 100%);}
button.wbBadge {position: absolute; top: -2px; right: -4px; z-index: 1; padding: 0.05em 0.35em; border: 1px solid #fff; border-radius: 999px; background: #c00000; color: #fff; font-size: 0.72em !important; font-weight: bold; line-height: 1.3; white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);}
@media (max-width: 480px) {div.weightBoxHead {font-size: 0.78em;} span.weightBoxSets, button.weightBoxAllOff {order: 1;}}
@media (prefers-reduced-motion: reduce) {div.wbWeight {transition: opacity 0.35s;}}

/* APP VIEWS (app_views.js): one view per target group - the select of the start page, the accent of a view (body.appViewOn with
   --viewAccent / --viewAccentSoft / --viewAccentText from APP_VIEWS, app_view_apply), the badge + entries of the menu, the tiles of LP 0
   (below the THING / NAME block).
   The hidden tools of a view: one generated <style id="appViewStyle">. The colours of the sales / club / roastery modes keep priority. */
/* the card after the first connect (busy_ask 'view'): the views as chips */
div.appViewAsk button.busyAskButton {--chipAccent: var(--chipL, var(--muted)); --chipSoft: var(--chipSoftL, var(--sunk)); border-radius: 999px; border-color: var(--chipAccent); color: var(--chipAccent);}
@media (prefers-color-scheme: dark) {:root:not([data-scheme="light"]) div.appViewAsk button.busyAskButton {--chipAccent: var(--chipD, var(--muted)); --chipSoft: var(--chipSoftD, var(--sunk));}}
:root[data-scheme="dark"] div.appViewAsk button.busyAskButton {--chipAccent: var(--chipD, var(--muted)); --chipSoft: var(--chipSoftD, var(--sunk));}
div.appViewAsk button.busyAskButton:hover {background-color: var(--chipSoft);}
/* the accent */

/* ARABIC (body.lngRtl, language_document() in app_loader.js): right-to-left TEXT only - the layout stays left-to-right (direction is not
   changed, so rows, the menu, the weight and the charts keep their places). Every block takes its direction from its first letter:
   an Arabic text runs from the right and stands right where the alignment is the default 'start' (centered texts stay centered),
   numbers, units and Latin names stay left-to-right. No text-align here: it would beat the centered texts of the app */
body.lngRtl :is(p, li, dd, dt, td, th, caption, label, summary, legend, figcaption, blockquote, h1, h2, h3, h4, h5, h6, div, button, option, textarea, input[type="text"], input[type="search"], input:not([type])) {unicode-bidi: plaintext;}
body.lngRtl .ui .labCardTitle {unicode-bidi: plaintext;}
