/*
 * TreeScribe field stylesheet.
 *
 * Dropped legacy classes:
 * active, badge, big, bl, br, cam, cardrow, cell, del, done, fixwarn,
 * good, gps-far, gps-fix, gps-near, gpslive, grid, gridwrap, harvestbox,
 * hvhold, hvlog, hvresult, ic, jump, missed, muted, noteact, noteacts,
 * notebody, notechev, notedel, notehead, noteitem, notelabel, notelog,
 * notephoto, notephotogrid, notephotos, notesect, notetext, on, pedchev,
 * pedmissing, pednote, pedself, poor, prevhead, prevmeta, prevplant,
 * prevsect, prevtag, prevwhy, priorbody, rateundo, replantbox, results,
 * rollopt, rowplant, rpchosen, rphead, rplog, rppn, rprow, rptype, rpwas,
 * scancorner, secthead, spacer, svdist, svhold, svwarn, sync-state, synced,
 * syncstrip,
 * tabbar, tarrow, tcycle, tdot, tdots, thumb, thumbs, tihead, tirow,
 * tisect, tititle, tl, tr, traitstart, tsel, unknown, unsynced,
 * unverified, uploadpage, viewer-btn, viewer-name, warn, warnbtn, warnx,
 * working.
 */

:root {
  --ph-bin-1: #2f5d8a;
  --ph-bin-2: #9a4f12;
  --ph-bin-3: #604080;
  --ph-bin-4: #207d74;
  --ph-bin-5: #61291f;
  --ph-bulk: #3d372f;
  --ph-label: #ffffff;
  /* Blank is blue, Moldy is orange, and Shriveled is purple. */
  --smashed-fill: #dedede;
  --smashed-label: #242424;
  --smashed-pressed: #b8b8b8;
  --defect-blank-fill: #005a9c;
  --defect-fill-mix: 35%;
  --defect-blank-pressed: #003c6b;
  --defect-blank-label: #15130f;
  --defect-blank-pressed-label: #ffffff;
  --defect-moldy-fill: #e69f00;
  --defect-moldy-pressed: #bb8000;
  --defect-moldy-label: #15130f;
  --defect-moldy-pressed-label: #15130f;
  --defect-black-fill: #2b2622;
  --defect-black-pressed: #100e0c;
  --defect-black-label: #15130f;
  --defect-black-pressed-label: #ffffff;
  --defect-shriveled-fill: #59306b;
  --defect-shriveled-pressed: #3c1d4c;
  --defect-shriveled-label: #15130f;
  --defect-shriveled-pressed-label: #ffffff;
  color-scheme: light;
  --green: #176a37;
  --green-bright: #22894a;
  --marked: rgba(214,51,197,0.95);
  /* WHAT "THIS REACHED DRIVE" IS COLORED, WHICH IS NOT THE SAME THING AS THE ACCENT. The two used to
     be one token, so a button and a verified state were the same green and neither meant anything by
     being green. Splitting them is what lets the accent change without "Everything is in Drive"
     losing the one color that says it is good news. */
  --success: #176a37;
  /* HOW AN ACTION BUTTON IS FILLED, AS A TOKEN, because the two themes fill one differently and the
     rules below must not have to know which theme they are in. On a light ground the accent is the
     fill and the label is drawn out of it, which is what this app has always done. */
  --accent-fill: #176a37;
  --accent-edge: #22894a;
  --accent-label: #ffffff;
  --accent-text: #355f85;
  --switch-on-fill: #176a37;
  --switch-on-edge: #22894a;
  --switch-on-label: #ffffff;
  --bg: #f3efe6;
  --panel: #ffffff;
  --panel-2: #ece6da;
  --line: #cfc6b5;
  --text: #211d18;
  --muted: #5c5347;
  --danger: #b4291d;
  --danger-pressed: #7a1414;
  --on-danger: #ffffff;
  --warn: #8a5e0f;
  --on-accent: #ffffff;
  --overlay: rgba(33, 29, 24, 0.48);
  --overlay-half: rgba(33, 29, 24, 0.50);
  --overlay-strong: rgba(33, 29, 24, 0.58);
  --shadow: rgba(33, 29, 24, 0.28);
  --shadow-soft: rgba(33, 29, 24, 0.14);
  --shadow-faint: rgba(33, 29, 24, 0.08);
  --shadow-side: rgba(33, 29, 24, 0.18);
  --media-overlay: rgba(0, 0, 0, 0.72);
  --media-text: #ffffff;
  --toast-bg: #000000;
  --toast-text: #ffffff;
  --viewer-bg: #000000;
  --viewer-panel: #111111;
  --viewer-control: #333333;
  --viewer-text: #f0ece4;
  --viewer-muted: #b3aa9c;
  --viewer-line: #444444;
  --viewer-control-line: #555555;
  /* Row lines, trial boundaries and surveyed-tree rings drawn on the map photo. The photo looks the same in
     every theme, so light and dark draw these marks in the same green. */
  --viewer-mark: #22894a;
  --viewer-on-fill: #176a37;
  --viewer-on-edge: #22894a;
  --viewer-on-label: #ffffff;
  --scanner-frame: #ffffff;
  --scanner-bg: #000000;
  --scanner-mask: rgba(0, 0, 0, 0.34);
  --scanner-shadow: #000000;
  --scanner-miss: #ff6f61;
  --frozen-bg: #fff1f0;
  /* A neutral white flash provides familiar action feedback.
     The wash still means the record is safely stored on the phone, not just that a tap registered.
     These existing white and black tokens stay high contrast in every theme, including sunlight. */
  --flash-success: var(--media-text);
  --flash-danger: #7a1710;
  --flash-text: var(--scanner-bg);
  --line-width: 1px;
  --font-weight-body: 400;
  --font-weight-heading: 700;
  --pressed-tint: #c9bead;
  --accent-pressed-fill: #0b4723;
  --accent-pressed-label: #ffffff;
  --recording-fill: #fff1f0;
  /* The dropdown chevron, drawn rather than native, so a select can be given a shape that
     matches the rest of the controls. It is a token because the stroke has to be baked into
     the data URI: currentColor does not reach inside a background image. */
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.6 6 6.4 11 1.6' fill='none' stroke='%235c5347' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html[data-theme="dark"] {
  --ph-bin-1: #2f5d8a;
  --ph-bin-2: #9a4f12;
  --ph-bin-3: #604080;
  --ph-bin-4: #207d74;
  --ph-bin-5: #61291f;
  --ph-bulk: #3d372f;
  --ph-label: #ffffff;
  /* Blank is blue, Moldy is orange, and Shriveled is purple. */
  --smashed-fill: #dedede;
  --smashed-label: #ffffff;
  --smashed-pressed: #3a3a3a;
  --defect-blank-fill: #0072b2;
  --defect-fill-mix: 40%;
  --defect-blank-pressed: #00243a;
  --defect-blank-label: #ffffff;
  --defect-blank-pressed-label: #ffffff;
  --defect-moldy-fill: #e69f00;
  --defect-moldy-pressed: #573b00;
  --defect-moldy-label: #ffffff;
  --defect-moldy-pressed-label: #ffffff;
  --defect-black-fill: #666666;
  --defect-black-pressed: #181818;
  --defect-black-label: #ffffff;
  --defect-black-pressed-label: #ffffff;
  --defect-shriveled-fill: #d6b4e8;
  --defect-shriveled-pressed: #382244;
  --defect-shriveled-label: #ffffff;
  --defect-shriveled-pressed-label: #ffffff;
  color-scheme: dark;
  /* SLATE, NOT GREEN, ON THE DARK GROUND. The mint accent shipped before 2026-09-08 had a
     saturated green hairline that read, on a very warm, very dark ground, as a lit wire rather than an
     edge. Slate is the one
     candidate with no counterpart anywhere else in either palette: the bone tone that scored highest
     on contrast is within a hair of the light theme's own --line, so it would have been an accent in
     one theme and a divider in the other. Contrast on this ground is 7.19:1 for the accent and
     9.36:1 for the bright, both well past AA. */
  --green: #8aa4be;
  --green-bright: #a2bbd4;
  --marked: rgba(214,51,197,0.95);
  --success: #4fbd76;
  --bg: #15130f;
  --panel: #201c17;
  --panel-2: #2b2620;
  --line: #4a4238;
  --text: #f1ebe0;
  --muted: #b8ad9c;
  --danger: #ff776d;
  --danger-pressed: #c24d43;
  --on-danger: #15130f;
  --warn: #f3b34c;
  --on-accent: #15130f;
  /* AND ON THE DARK GROUND THE FILL IS THE ACCENT AT A SIXTH OF ITS STRENGTH, with the accent itself
     as the label and a stronger accent edge around it. Six treatments were compared on
     2026-09-08; the solid fill was unsuitable because a saturated block of color on a very
     dark ground is a mass rather than a control, and the hairline around it was
     hard to distinguish. The tint keeps a filled shape a thumb can aim at without the color mass. */
  --accent-fill: rgba(138, 164, 190, 0.16);
  --accent-edge: rgba(138, 164, 190, 0.42);
  --accent-label: #a2bbd4;
  --accent-text: #a2bbd4;
  /* A SETTINGS SWITCH THAT IS ON IS A SOLID SLATE MARK WITH DARK WORDS on this ground. The tint above, used for the
     mark, stood only 1.32 to 1 off the row while the muted outline of Off stood 6.78 to 1, so Off looked stronger
     than On; the solid mark is about 9 to 1 against its words. */
  --switch-on-fill: #a2bbd4;
  --switch-on-edge: #a2bbd4;
  --switch-on-label: #15130f;
  --overlay: rgba(0, 0, 0, 0.72);
  --overlay-half: rgba(0, 0, 0, 0.76);
  --overlay-strong: rgba(0, 0, 0, 0.82);
  --shadow: rgba(0, 0, 0, 0.62);
  --shadow-soft: rgba(0, 0, 0, 0.44);
  --shadow-faint: rgba(0, 0, 0, 0.32);
  --shadow-side: rgba(0, 0, 0, 0.48);
  --media-overlay: rgba(0, 0, 0, 0.82);
  --media-text: #ffffff;
  --toast-bg: #f1ebe0;
  --toast-text: #15130f;
  --viewer-bg: #000000;
  --viewer-panel: #111111;
  --viewer-control: #333333;
  --viewer-text: #f0ece4;
  --viewer-muted: #b3aa9c;
  --viewer-line: #444444;
  --viewer-control-line: #555555;
  --viewer-mark: #22894a;
  --viewer-on-fill: #176a37;
  --viewer-on-edge: #22894a;
  --viewer-on-label: #ffffff;
  --scanner-frame: #ffffff;
  --scanner-bg: #000000;
  --scanner-mask: rgba(0, 0, 0, 0.34);
  --scanner-shadow: #000000;
  --scanner-miss: #ff6f61;
  --frozen-bg: #321a17;
  --flash-success: var(--media-text);
  --flash-danger: #7a1710;
  --flash-text: var(--scanner-bg);
  --line-width: 1px;
  --font-weight-body: 400;
  --font-weight-heading: 700;
  --pressed-tint: #51483d;
  --accent-pressed-fill: #485b6e;
  --accent-pressed-label: #ffffff;
  --recording-fill: #321a17;
  /* The dropdown chevron, drawn rather than native, so a select can be given a shape that
     matches the rest of the controls. It is a token because the stroke has to be baked into
     the data URI: currentColor does not reach inside a background image. */
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.6 6 6.4 11 1.6' fill='none' stroke='%23b8ad9c' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html[data-theme="field"] {
  --ph-bin-1: #2f5d8a;
  --ph-bin-2: #9a4f12;
  --ph-bin-3: #604080;
  --ph-bin-4: #207d74;
  --ph-bin-5: #61291f;
  --ph-bulk: #3d372f;
  --ph-label: #ffffff;
  /* Blank is blue, Moldy is orange, and Shriveled is purple. */
  --smashed-fill: #dedede;
  --smashed-label: #242424;
  --smashed-pressed: #b8b8b8;
  --defect-blank-fill: #005a9c;
  --defect-fill-mix: 55%;
  --defect-blank-pressed: #003c6b;
  --defect-blank-label: #15130f;
  --defect-blank-pressed-label: #ffffff;
  --defect-moldy-fill: #e69f00;
  --defect-moldy-pressed: #bb8000;
  --defect-moldy-label: #15130f;
  --defect-moldy-pressed-label: #15130f;
  --defect-black-fill: #2b2622;
  --defect-black-pressed: #100e0c;
  --defect-black-label: #15130f;
  --defect-black-pressed-label: #ffffff;
  --defect-shriveled-fill: #59306b;
  --defect-shriveled-pressed: #3c1d4c;
  --defect-shriveled-label: #15130f;
  --defect-shriveled-pressed-label: #ffffff;
  color-scheme: light;
  /* THE FIELD THEME KEEPS ITS GREEN. It exists to be read in direct sun, where the accent is providing
     contrast rather than character, and slate at this lightness would not survive that. */
  --green: #0a7d2c;
  --green-bright: #006b24;
  --marked: rgba(214,51,197,0.95);
  --success: #0a7d2c;
  /* AND IT KEEPS THE SOLID FILL WITH IT, for the same reason: a tint read at arm's length in direct
     sun is not a control, it is a smudge. */
  --accent-fill: #0a7d2c;
  --accent-edge: #006b24;
  --accent-label: #ffffff;
  --accent-text: #355f85;
  --switch-on-fill: #0a7d2c;
  --switch-on-edge: #006b24;
  --switch-on-label: #ffffff;
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f2f2f2;
  --line: #000000;
  --text: #000000;
  --muted: #1a1a1a;
  --danger: #d00000;
  --danger-pressed: #8a0000;
  --on-danger: #ffffff;
  --warn: #b35c00;
  --on-accent: #ffffff;
  /* THE SCRIM IS A DARK WASH, NOT A SHEET OF THE SAME COLOR AS THE SHEET. These three read
     #f2f2f2, the same value as --panel-2, so a white sheet sat on a scrim it differed from by a
     contrast ratio of about 1.06 to 1, and the fully opaque value erased the screen behind it: the
     one theme built for glare gave a sheet the least separation from its surroundings of any
     theme, and took away the cue that a sheet is a layer over something. A strong translucent
     black puts the white sheet at better than six to one against its own scrim and leaves the
     screen behind faintly readable. */
  --overlay: rgba(0, 0, 0, 0.62);
  --overlay-half: rgba(0, 0, 0, 0.68);
  --overlay-strong: rgba(0, 0, 0, 0.74);
  --shadow: transparent;
  --shadow-soft: transparent;
  --shadow-faint: transparent;
  --shadow-side: transparent;
  --media-overlay: #000000;
  --media-text: #ffffff;
  --toast-bg: #000000;
  --toast-text: #ffffff;
  --viewer-bg: #ffffff;
  --viewer-panel: #ffffff;
  --viewer-control: #f2f2f2;
  --viewer-text: #000000;
  --viewer-muted: #1a1a1a;
  --viewer-line: #000000;
  --viewer-control-line: #000000;
  --viewer-mark: #006b24;
  --viewer-on-fill: #0a7d2c;
  --viewer-on-edge: #006b24;
  --viewer-on-label: #ffffff;
  --scanner-frame: #ffffff;
  --scanner-bg: #000000;
  --scanner-mask: #000000;
  --scanner-shadow: #000000;
  --scanner-miss: #d00000;
  --frozen-bg: #ffffff;
  --flash-success: var(--media-text);
  --flash-danger: #d00000;
  --flash-text: var(--scanner-bg);
  --line-width: 2px;
  --font-weight-body: 600;
  --font-weight-heading: 800;
  --pressed-tint: #c8c8c8;
  --accent-pressed-fill: #064d1c;
  --accent-pressed-label: #ffffff;
  --recording-fill: #ffe3e0;
  /* The dropdown chevron, drawn rather than native, so a select can be given a shape that
     matches the rest of the controls. It is a token because the stroke has to be baked into
     the data URI: currentColor does not reach inside a background image. */
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.6 6 6.4 11 1.6' fill='none' stroke='%235c5347' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --ph-bin-1: #2f5d8a;
    --ph-bin-2: #9a4f12;
    --ph-bin-3: #604080;
    --ph-bin-4: #207d74;
    --ph-bin-5: #61291f;
    --ph-bulk: #3d372f;
    --ph-label: #ffffff;
    /* Blank is blue, Moldy is orange, and Shriveled is purple. */
    --smashed-fill: #dedede;
    --smashed-label: #ffffff;
    --smashed-pressed: #3a3a3a;
    --defect-blank-fill: #0072b2;
    --defect-fill-mix: 40%;
    --defect-blank-pressed: #00243a;
    --defect-blank-label: #ffffff;
    --defect-blank-pressed-label: #ffffff;
    --defect-moldy-fill: #e69f00;
    --defect-moldy-pressed: #573b00;
    --defect-moldy-label: #ffffff;
    --defect-moldy-pressed-label: #ffffff;
    --defect-black-fill: #666666;
    --defect-black-pressed: #181818;
    --defect-black-label: #ffffff;
    --defect-black-pressed-label: #ffffff;
    --defect-shriveled-fill: #d6b4e8;
    --defect-shriveled-pressed: #382244;
    --defect-shriveled-label: #ffffff;
    --defect-shriveled-pressed-label: #ffffff;
    color-scheme: dark;
    /* The same slate the explicit dark theme takes, because a phone set to system dark and a phone
       set to dark are the same phone as far as anybody looking at it is concerned. */
    --green: #8aa4be;
    --green-bright: #a2bbd4;
    --marked: rgba(214,51,197,0.95);
    --success: #4fbd76;
    /* The same tinted fill the explicit dark theme takes, for the same reason. */
    --accent-fill: rgba(138, 164, 190, 0.16);
    --accent-edge: rgba(138, 164, 190, 0.42);
    --accent-label: #a2bbd4;
    --accent-text: #a2bbd4;
    --switch-on-fill: #a2bbd4;
    --switch-on-edge: #a2bbd4;
    --switch-on-label: #15130f;
    --bg: #15130f;
    --panel: #201c17;
    --panel-2: #2b2620;
    --line: #4a4238;
    --text: #f1ebe0;
    --muted: #b8ad9c;
    --danger: #ff776d;
    --danger-pressed: #c24d43;
    --on-danger: #15130f;
    --warn: #f3b34c;
    --on-accent: #15130f;
    --overlay: rgba(0, 0, 0, 0.72);
    --overlay-half: rgba(0, 0, 0, 0.76);
    --overlay-strong: rgba(0, 0, 0, 0.82);
    --shadow: rgba(0, 0, 0, 0.62);
    --shadow-soft: rgba(0, 0, 0, 0.44);
    --shadow-faint: rgba(0, 0, 0, 0.32);
    --shadow-side: rgba(0, 0, 0, 0.48);
    --media-overlay: rgba(0, 0, 0, 0.82);
    --media-text: #ffffff;
    --toast-bg: #f1ebe0;
    --toast-text: #15130f;
    --viewer-bg: #000000;
    --viewer-panel: #111111;
    --viewer-control: #333333;
    --viewer-text: #f0ece4;
    --viewer-muted: #b3aa9c;
    --viewer-line: #444444;
    --viewer-control-line: #555555;
    --viewer-mark: #22894a;
    --viewer-on-fill: #176a37;
    --viewer-on-edge: #22894a;
    --viewer-on-label: #ffffff;
    --scanner-frame: #ffffff;
    --scanner-bg: #000000;
    --scanner-mask: rgba(0, 0, 0, 0.34);
    --scanner-shadow: #000000;
    --scanner-miss: #ff6f61;
    --frozen-bg: #321a17;
    --flash-success: var(--media-text);
    --flash-danger: #7a1710;
    --flash-text: var(--scanner-bg);
    --line-width: 1px;
    --font-weight-body: 400;
    --font-weight-heading: 700;
    --pressed-tint: #51483d;
    --accent-pressed-fill: #485b6e;
    --accent-pressed-label: #ffffff;
    --recording-fill: #321a17;
    /* The dropdown chevron, drawn rather than native, so a select can be given a shape that
       matches the rest of the controls. It is a token because the stroke has to be baked into
       the data URI: currentColor does not reach inside a background image. */
      --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.6 6 6.4 11 1.6' fill='none' stroke='%23b8ad9c' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

:root {
  --radius: 14px;
  --tap: 54px;
  --font-body: 1rem;
  --font-heading-1: 1.75rem;
  --font-heading-2: 1.35rem;
  --font-heading-3: 1.125rem;
  --line-body: 1.55;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  /* THE ONE GAP BETWEEN A SCREEN'S PINNED CHROME AND ITS FIRST CONTENT. Every screen used to reach
     its own first gap through whatever margin or padding its first element happened to have, so
     the trait picker's search field touched the top bar's line, the photo category question sat
     almost on it, the mode list stood 16px clear and the plant card stood 12px clear. This value is
     the plant card's own gap, settled on 2026-09-03. It is defined once
     and never per theme: the field theme's heavier lines change what a screen draws, not how far
     its content sits below the bar. Whatever is pinned above the content owns the measurement, so
     on the mode screen the gap is counted from the receiver strip rather than from the bar. */
  --screen-gap: 12px;
  /* THE ONE GAP BETWEEN THE ROWS OF A VERTICAL LIST, AND BETWEEN A LIST AND WHATEVER SITS ABOVE IT.
     The Help home used to space its search field 16 px from its rows, its rows 8 px from each
     other, and the welcome tour row that sat between them at nothing at all, so a screen made of
     one kind of row read as three unrelated blocks. This value is the mode screen's own gap, established
     across the season, and it is defined once so every list of rows in the
     app uses the same rhythm: the mode list, the trial and trait picker, the photo category
     list, the gallery list, and the Help home's search field, results and section list. */
  --list-gap: 10px;
  --pressed-scale: 0.98;
  --pressed-transition: background-color 100ms ease-out, color 100ms ease-out, transform 100ms ease-out;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: var(--font-body)/var(--line-body) -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: var(--font-weight-body);
  overscroll-behavior-y: contain;
}

h1,
h2,
h3 {
  font-weight: var(--font-weight-heading);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: var(--font-heading-1);
  line-height: 1.2;
}

h2 {
  font-size: var(--font-heading-2);
  line-height: 1.25;
}

h3 {
  font-size: var(--font-heading-3);
  line-height: 1.3;
}

p + p {
  margin-top: var(--space-1);
}

small,
.muted-copy,
.empty-state-secondary {
  color: var(--muted);
  font-size: var(--font-body);
  line-height: var(--line-body);
}

/* THE SHELL IS EXACTLY ONE VIEWPORT TALL, SO THE SCREEN INSIDE IT IS THE ONLY THING THAT SCROLLS.
   It used to have min-height alone, which is a floor and not a ceiling: whenever a screen's content
   was taller than the phone, the flex column simply grew and the DOCUMENT scrolled, so .scroll never
   scrolled inside itself at all and everything pinned with position: sticky rode up with the page.
   The receiver strip on the mode screen is what this cost. Measured in WebKit on 2026-09-04, the
   chestnut activity list stands 1114 px against a 932 px iPhone viewport and 1106 px against a
   667 px one; the strip is sticky at top 0, which is the same place the top bar is sticky, so the
   strip slid underneath the bar and all but a sliver of the receiver entry disappeared. The
   strip needs to remain visible while the activity list scrolls.

   With a ceiling as well as a floor, the top bar and the strip are ordinary flex items that stay
   where they are put, and .scroll and .screen scroll their own content beneath them. Every overlay
   in this file is position: fixed and #app builds no containing block for one, so overflow: hidden
   here cannot clip a sheet, a toast, the viewer or the scanner. */
.app,
#app {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* A flex item's automatic minimum size is its content, which would push a long screen out of the
   shell instead of scrolling it, so both scrolling containers give that minimum up. */
.screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: var(--screen-gap) 14px calc(env(safe-area-inset-bottom) + 12px);
}

/* A screen with nothing pinned above it stands at the top of the page and owns the top safe area
   itself. Under a top bar the bar already holds that inset, and adding it again here is what used
   to push a screen a whole notch further down than the gap it was asking for. */
.screen:first-child {
  padding-top: max(env(safe-area-inset-top), var(--screen-gap));
}

/* "safe" centering keeps the top of the content reachable when it is taller than the box it is
   centered in; ordinary centering pushes the overflow past the scrollable start, where no amount of
   scrolling can reach it. */
.center {
  justify-content: safe center;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: calc(54px + env(safe-area-inset-top));
  padding: max(env(safe-area-inset-top), 10px) 12px 10px;
  background: var(--panel);
  border-bottom: var(--line-width) solid var(--line);
}

.topbar-back,
.topbar-menu {
  flex: none;
}

/* The icons are drawn by the ::before rules below; any text a screen leaves inside these buttons
   renders beside the icon as a doubled glyph. The double class outranks .iconbtn's font size,
   which silently overrode a plain single-class guard here. */
.topbar-back.topbar-back,
.topbar-menu.topbar-menu {
  font-size: 0;
}

.topbar-menu {
  margin-left: auto;
}

.topbar-back::before {
  display: block;
  width: 12px;
  height: 12px;
  border-bottom: 3px solid currentColor;
  border-left: 3px solid currentColor;
  content: "";
  transform: translateX(2px) rotate(45deg);
}

.topbar-menu::before {
  display: block;
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: -8px 0 currentColor, 8px 0 currentColor;
  content: "";
}

.title,
.topbar .title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title small,
.topbar .title small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--font-body);
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--screen-gap) 14px calc(env(safe-area-inset-bottom) + 14px);
  -webkit-overflow-scrolling: touch;
}

/* The Receiver screen mounts inside the auxiliary panel's own scrolling container, so two boxes
   have the screen padding one inside the other. The inner one gives the gap up: it belongs to
   whichever container sits directly under the pinned chrome. */
.chrome-panel > .screen {
  padding-top: 0;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.login-icon {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-2);
  /* The artwork has its own cream background and no size we ship has an alpha channel, so on the
     dark theme it lands as a hard bright rectangle on near-black. Rounding it reads as an app icon
     rather than a stray square. 18px is a radius this sheet already uses, so this adds no new value. */
  border-radius: 18px;
}

/* The invitation to other breeding programs. It sits under the card rather than inside it, so it
   reads as a note about the app rather than as part of signing in, and it is the first thing a
   person who has no access code can act on. */
.login-invite {
  margin: var(--space-2) auto 0;
  max-width: 34em;
  color: var(--muted);
  font-size: var(--font-body);
  line-height: var(--line-body);
  text-align: center;
}

.login-invite a {
  color: inherit;
  text-decoration: underline;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--font-body);
  font-weight: 400;
}

.card {
  width: 100%;
  max-width: 520px;
  padding: 18px;
  background: var(--panel);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
}

.login-screen {
  min-height: 0;
}

/* The form exists for password managers; the card's stacked layout must not see it. */
.login-form {
  display: contents;
}

.mono {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}

.error-screen {
  min-height: 70dvh;
}

.error-message,
.error {
  min-height: 1.2em;
  margin-top: 12px;
  color: var(--danger);
}

.error-actions {
  width: min(100%, 420px);
}

.hint,
.empty {
  color: var(--muted);
  font-size: var(--font-body);
}

.empty {
  padding: var(--space-3);
  text-align: center;
}

.empty-state,
.error-state {
  width: min(100%, 520px);
  margin: 0 auto;
}

/* AN EMPTY STATE CENTERS ITS OWN CONTENT RATHER THAN FLOATING ON AN AUTO TOP MARGIN. The auto
   margin put the screen's first element wherever the leftover height happened to leave it, which
   on the gallery was 250px below the top bar. Growing the box instead leaves its top at the screen
   gap, where the rule says a screen's first element belongs, and leaves what a person sees in
   exactly the same place. */
.empty-state {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.empty-state-primary {
  color: var(--text);
  font-size: var(--font-heading-3);
  font-weight: 700;
  line-height: 1.35;
}

.empty-state-secondary {
  max-width: 38ch;
  margin-top: var(--space-1);
}

label {
  display: block;
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: var(--font-body);
}

/* Rule 70: every rendered input type stays at 1rem so iOS never enters sticky zoom. An input with no type
   attribute is a text box to the browser, so it is listed too; one such box rendered at 11 px and zoomed the page. */
input:not([type]),
input[type="text"],
input[type="email"],
input[type="password"],
input[type="checkbox"],
input[type="search"],
input[type="range"],
input[type="number"],
input[type="date"],
textarea {
  font: inherit;
  font-size: 1rem;
}

input:not([type]),
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"] {
  width: 100%;
  height: var(--tap);
  padding: 0 14px;
  background: var(--panel);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
}

/* Date controls fit their parent and center the native value on iOS. */
input[type="date"] {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--tap);
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}
input[type="date"]::-webkit-date-and-time-value {
  text-align: inherit;
  margin: 0;
  min-height: 1em;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--text);
}

.checkbox input {
  width: 22px;
  height: 22px;
  accent-color: var(--green);
}

/* HIDDEN MEANS HIDDEN, WHATEVER ELSE THIS FILE SAYS ABOUT THE ELEMENT. The browser hides an element
   with the hidden attribute through its own display rule, and any display declaration in this file
   beats it, so every control the app hides by setting element.hidden stayed on screen: .btn-primary
   and .btn-ghost both set display: flex, which is why "Send stopped photos" sat on the Sync panel
   and in the Uploads footer with nothing stopped, and why "Cancel this upload" sat under a finished
   sync with nothing uploading. The app hides a control by setting hidden in a dozen places, so the
   rule belongs here once rather than as a class each of those places has to remember. */
[hidden] {
  display: none !important;
}

button {
  font: inherit;
  cursor: pointer;
  border: var(--line-width) solid transparent;
  border-radius: var(--radius);
}

a {
  color: var(--green);
}

html[data-theme="field"] a {
  text-decoration: underline;
}

html[data-theme="field"] button.selected,
html[data-theme="field"] button[aria-pressed="true"] {
  border-width: 3px;
}

html[data-theme="field"] .success::before,
html[data-theme="field"] .green::before,
html[data-theme="field"] .collect-message.is-status::before,
html[data-theme="field"] .screen-answer-state.answered::before,
html[data-theme="field"] .accession-check-state.verified::before {
  content: "✓";
}

html[data-theme="field"] .warning::before,
html[data-theme="field"] .amber::before,
html[data-theme="field"] .status-chip.neutral::before {
  content: "•";
}

html[data-theme="field"] .danger::before,
html[data-theme="field"] .red::before,
html[data-theme="field"] .bad::before,
html[data-theme="field"] .collect-message.is-error::before,
html[data-theme="field"] .score-message::before,
html[data-theme="field"] .accession-check-state.not-checked::before {
  content: "×";
}

/* The card's status and score messages are always in the DOM and usually empty; a glyph on an
   empty message would float alone above the buttons. */
html[data-theme="field"] .collect-message:empty::before,
html[data-theme="field"] .score-message:empty::before {
  content: none;
}

html[data-theme="field"] .success::before,
html[data-theme="field"] .green::before,
html[data-theme="field"] .warning::before,
html[data-theme="field"] .amber::before,
html[data-theme="field"] .danger::before,
html[data-theme="field"] .red::before,
html[data-theme="field"] .bad::before,
html[data-theme="field"] .status-chip.neutral::before,
html[data-theme="field"] .collect-message::before,
html[data-theme="field"] .score-message::before,
html[data-theme="field"] .screen-answer-state.answered::before,
html[data-theme="field"] .accession-check-state::before {
  flex: none;
  margin-right: 6px;
  font-weight: 800;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.orthomap-compass:focus-visible {
  outline: 3px solid var(--green-bright);
  outline-offset: 2px;
}

.btn-primary,
.btn-go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  margin-top: 20px;
  padding: 0 14px;
  background: var(--accent-fill);
  color: var(--accent-label);
  border-color: var(--accent-edge);
  font-size: 1.05rem;
  font-weight: 700;
}

/* A TINTED CONTROL CANNOT BE DISABLED BY FADING IT. Half of a sixteen-percent fill is eight percent,
   which is nothing, and the label fades with it. "Syncing now..." IS the disabled state of the
   button a person watches while a pass runs, so it has to stay readable. A disabled control gives up
   the accent instead: it keeps its shape and its words and it is plainly not the thing to press. */
.btn-primary:disabled,
.btn-go:disabled {
  background: var(--panel-2);
  color: var(--muted);
  border-color: var(--line);
}

.btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  margin-top: 10px;
  padding: 0 14px;
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line);
}

/* THE GLYPH IN FRONT OF A CARD BUTTON'S WORDS, AND THE WORDS BESIDE IT. The glyph is decoration:
   the markup marks it aria-hidden, and this rule keeps it out of the label's way rather than
   letting the two share the button's centering. It is set larger than the words because a mark read
   at arm's length in sunlight is read by its shape. The capture button's glyph is larger still,
   which is the size the hazel field app gave the camera on that one button. */
.btnic {
  flex: none;
  margin-right: 8px;
  font-size: 1.25rem;
  line-height: 1;
}

.capture .btnic {
  font-size: 1.6rem;
}

.btnlabel {
  min-width: 0;
}

.iconbtn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line);
  border-radius: 10px;
  font-size: 1.05rem;
}

.chip,
.pedchip {
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  background: var(--panel);
  color: var(--green);
  border: var(--line-width) solid var(--line);
  border-radius: 999px;
  font-size: var(--font-body);
  font-weight: 700;
  white-space: nowrap;
}

.crop-chip,
.plant-chip,
.definition-chip,
.traitinfo {
  align-self: center;
}

.full-width {
  width: 100%;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 74px);
  z-index: 50;
  display: -webkit-box;
  box-sizing: border-box;
  width: max-content;
  max-width: 90vw;
  max-height: calc(3 * 1.4em + 32px);
  padding: 16px;
  overflow: hidden;
  transform: translateX(-50%);
  background: var(--toast-bg);
  color: var(--toast-text);
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  line-height: 1.4;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  transition: opacity 0.2s;
}

.toast-notice {
  border-radius: 12px;
}

.toast.show {
  opacity: 0.94;
}

/* A NOTICE HELD UNTIL ITS WORK ENDS STANDS OVER THE TITLE OF THE TOP BAR SHOWING, AND MOVES NOTHING. public/app/ui/shell.js
   places it from the title's left edge to its right edge and from the top of the bar's controls to the bar's foot, so the
   back button, the menu and the receiver chip stay clear of it, and it hides the title under the bar's own colors while it
   shows; the status bar above the bar's controls stays clear. It took a band of its own at the top and moved the app down
   by that band, 38.4 px, when it came and again when the read ended, so a tap aimed just before then landed one band
   lower. The bar's 54 px from the top of its controls to its foot hold three lines of body type set at 1.1, which is
   what the closing sentence of a read needs at 320 px, a long trial name breaks where it must, and an ellipsis ends
   anything longer. A timed notice, every sheet and every other overlay draw over it, and like
   every notice it takes no taps. */
.held-notice {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 49;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--panel);
  color: var(--text);
  font-size: var(--font-body);
  font-weight: var(--font-weight-body);
  line-height: 1.1;
  pointer-events: none;
}

.held-notice[hidden] {
  display: none;
}

.held-notice-text {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* Menu sheet. A sheet SLIDES UP from the bottom edge over about 220ms while the scrim fades in,
   and leaves the same way in reverse over about 160ms; before 2026-09-03 it
   snapped into existence without a transition. public/app/ui/menu.js adds is-open on the animation frame
   after the sheet mounts and is-closing when it starts to leave, then removes the overlay on the
   sheet's own transitionend or on its fallback timer, whichever arrives first.

   A SHEET THAT REPLACES ANOTHER DOES NOT REPEAT THE SCRIM FADE. Settings opening from the main
   menu, a chooser opening from Settings and Back returning all re-use the overlay that is already
   mounted, and that overlay keeps is-open, so the scrim's computed color never changes and the
   screen behind it does not flash. Only the new sheet, which mounts without is-open of its own,
   moves. A closing overlay stops taking taps, so nothing about the animation can swallow one.

   A SHEET THAT REPLACES ANOTHER ALSO MOVES SIDEWAYS RATHER THAN UP. Only a fresh open comes from
   the bottom edge and only a real close goes back down to it. Drilling in, which is Settings from
   the menu or a chooser from Settings, brings the new sheet from the right while the sheet it
   replaces leaves to the left; Back reverses both. On 2026-09-03, Back
   inside the menu used to swipe up from the bottom again, which reads as a new sheet arriving
   rather than as a step backwards. The sheet on its way out is taken out of the flow so the sheet
   replacing it holds the overlay's own place, and it takes no taps while it goes. */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  padding: max(env(safe-area-inset-top), 12px) 12px max(env(safe-area-inset-bottom), 12px);
  background: transparent;
  transition: background-color 220ms ease-out;
}

.menu-overlay.is-open {
  background: var(--overlay);
}

.menu-overlay.is-closing {
  background: transparent;
  pointer-events: none;
  transition: background-color 160ms ease-out;
}

.menu-sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: min(75dvh, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px));
  overflow: hidden;
  background: var(--panel);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 48px var(--shadow);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 220ms ease-out;
}

.menu-sheet.is-open {
  transform: translateY(0);
}

.menu-sheet.sheet-from-right:not(.is-open) {
  transform: translateX(100%);
}

.menu-sheet.sheet-from-left:not(.is-open) {
  transform: translateX(-100%);
}

.menu-sheet.sheet-leaving {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: max(env(safe-area-inset-bottom), 12px);
  pointer-events: none;
}

.menu-sheet.sheet-leaving.sheet-to-left {
  transform: translateX(-100%);
}

.menu-sheet.sheet-leaving.sheet-to-right {
  transform: translateX(100%);
}

.menu-overlay.is-closing .menu-sheet {
  transform: translateY(100%);
  transition: transform 160ms ease-out;
}

/* THE SHEET IS NOT THE APP UNDERNEATH IT, AND IT SAYS SO IN THE ONE COLOR THE APP ALREADY OWNS.
   A tint cannot do this job, because the high contrast theme is pure black on pure white by design
   and a wash disappears in it; these two were selected after comparing eleven treatments
   rendered in all three themes. The bar sits on the sheet's own top edge and the edge on each row
   repeats it down the list, so in high contrast the two read as one frame and in the other two as
   an accent. Both are structural rather than tonal, which is why they survive every theme. */
/* THE SHEET IS MARKED BY AN EDGE, NOT BY A SLAB. This was a six pixel bar in the accent across the
   top of the sheet, with a four pixel rail down the left of every entry inside it. In green on a
   pale ground that read as decoration; in slate on the dark ground it read as nine broken borders,
   because the rail is straight and the row it sits against is rounded, so each entry wore an arc of
   color on one side only. This was observed on 2026-09-08 after the accent change. */
.menu-sheet {
  border-top: 2px solid var(--accent-edge);
}

/* AND THE ENTRY THAT IS ALREADY CHOSEN IS THE ONE THING IN THE SHEET THAT WEARS THE ACCENT, in the
   same tinted fill an action button takes, so a person reads which walk order is in use from across
   the row rather than from a check mark the width of a letter. Every other entry is a control they
   might press, which is what the plain treatment says. */
.menu-item.selected {
  background: var(--accent-fill);
  color: var(--accent-label);
  border-color: var(--accent-edge);
}

.menu-sections {
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px 12px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.menu-footer {
  flex: none;
  padding: 0 12px 12px;
  background: var(--panel);
  border-top: var(--line-width) solid var(--line);
}

/* EVERY ENTRY WEARS A FULL OUTLINE IN THE ACCENT. Two earlier treatments failed on 2026-09-08:
   the four pixel rail down one side read as nine broken arcs in slate, and removing the rail left
   only the hairline every button has, which was indistinguishable. The outline goes all the way round,
   in the accent
   edge, on every theme; the selected entry keeps the tinted fill inside it. */
.menu-item {
  justify-content: flex-start;
  margin-top: 8px;
  text-align: left;
  border: 2px solid var(--accent-edge);
}

/* A Settings row that cannot apply where it runs, such as Buzz in the iPhone web app, is drawn faded
   so it does not look like a control that will answer a tap. */
.menu-item:disabled {
  opacity: 0.55;
  cursor: default;
}

.menu-cancel {
  justify-content: center;
  margin-top: 10px;
  border-width: 2px;
}

/* TWO ENTRIES SIDE BY SIDE ON ONE LINE, each half the width and each the full height of a row, so
   neither half is a smaller tap target than any other entry in the sheet. The line has the gap
   above it and the two buttons inside have none of their own, so a pair costs one row's height
   however many entries share it. */
.menu-pair {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.menu-pair .menu-item {
  flex: 1 1 0;
  min-width: 0;
  margin-top: 0;
}

.menudiv {
  margin: 14px 0 4px;
  border-top: var(--line-width) solid var(--line);
}

.menu-heading {
  margin: 8px 2px 2px;
  color: var(--muted);
  font-size: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* On iOS, a tap during a coasting scroll stops the scroll and can produce no click;
   the 2026-09-05 browser finding explained why Settings once ignored its first tap.
   Even 12px divider spaces and 8px heading gaps now make this menu scroll on most phones.
   The shared menu code waits for a click, then recovers a still touch after a recent scroll
   once, while final confirmations require a click. The rules below keep that spacing,
   the safe-area cap, full touch targets and a pinned footer. */
.page-menu-sheet {
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
}

.page-menu-sheet .menu-sections {
  padding: var(--space-1) var(--screen-gap);
}

.page-menu-sheet .menu-heading {
  margin: 0 2px;
  line-height: var(--line-body);
}

.page-menu-sheet .menudiv {
  margin: var(--screen-gap) 0;
}

.page-menu-sheet .menu-item {
  min-height: 44px;
  margin-top: 4px;
}

.page-menu-sheet .menu-pair {
  margin-top: 4px;
}

.page-menu-sheet .menu-heading + .menu-pair .menu-item {
  margin-top: 0;
}

.page-menu-sheet .menu-footer {
  padding: 0 12px 4px;
}

.page-menu-sheet .menu-cancel {
  min-height: 44px;
  margin-top: 4px;
}

.menu-sheet-message {
  margin: 12px 2px 4px;
  line-height: 1.45;
}

/* The eight Settings groups keep full tap targets with a shorter gap between rows. */
.settings-menu-sheet {
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
}

.settings-menu-sheet .menu-item {
  margin-top: 4px;
}

/* A SETTINGS ROW READS AS A SETTING: ITS NAME AND THE COLON IN BOLD, THEN WHAT IT IS SET TO IN THE ROW'S
   REGULAR TYPE, so a row whose value is a phrase still reads as a setting rather than as a sentence. The
   value is an element at the end of the bold words and takes the body weight back. Both follow the
   theme's own weights, which are heavier in the high contrast theme. A row with no value, such as
   Diagnostics or a row only the store apps can honor, keeps the row's one weight. */
.settings-label {
  font-weight: var(--font-weight-heading);
}

.settings-value {
  font-weight: var(--font-weight-body);
}

/* THE LINE UNDER A ROW THAT ONLY THE STORE APPS CAN HONOR, saying where it applies. It sits close under
   its row in the muted color, so it reads as that row's note rather than as a row of its own, and the
   row above it stays on one line. */
.menu-sheet-message.settings-row-note {
  margin: 4px 2px 0;
  color: var(--muted);
}

/* THE UPLOADED PHOTOS SHEET SAYS EACH CHOICE IN A SENTENCE, which takes two lines on most phones, so its
   choices keep a little room above and below their words. A choice of one line keeps the shared row height. */
.after-upload-sheet .menu-section .menu-item {
  padding-top: 8px;
  padding-bottom: 8px;
}

/* A SETTINGS ROW THAT SWITCHES ONE THING ON AND OFF ENDS IN ITS STATE, DRAWN AS A SMALL ROUNDED MARK, and
   the mark is what tells a switch apart from a row that opens a list of choices, which ends in plain words.
   On is a solid mark in each theme's switch colors: green with white words in the light and high contrast
   themes, and slate with dark words in the dark one, where the accent's tint read weaker than Off. Off is an
   outline in the muted color. The mark is an inline box in the row's own type, so it sits on the words'
   baseline and leaves the row the height its words give it. The run that holds the description's last word
   and the mark does not break, so on a narrow phone the state never wraps onto a line by itself. */
.settings-toggle-end {
  white-space: nowrap;
}

.settings-toggle-state {
  padding: 0.05em 0.6em;
  color: var(--muted);
  border: var(--line-width) solid var(--muted);
  border-radius: 999px;
  font-weight: 700;
}

.menu-item[aria-pressed="true"] .settings-toggle-state {
  background: var(--switch-on-fill);
  color: var(--switch-on-label);
  border-color: var(--switch-on-edge);
}

/* THE MARK'S WORD SITS IN THE MIDDLE OF THE MARK. The inline box above is as tall as the font's whole line of
   type, which keeps more room above the system font's capitals than below its baseline, so in WebKit, at three
   device pixels to each CSS pixel, the mark left 0.46 px more room above the ink of On than below it. Trimmed to
   the cap height above and the baseline below, the box is as tall as a capital letter. WebKit draws the round O
   of On 0.72 px above the cap height and 0.37 px below the baseline, so the top padding is 0.03em larger than the
   bottom; the room above and below the ink of On then differs by at most 0.3 px, and for the tall letters of
   Off, Shown and Hidden by at most 0.8 px. The mark stays as tall as it was, and its top and bottom stay inside
   the row's line of type, so no row grows. A browser without the trim keeps the inline box above. */
@supports (text-box: trim-both cap alphabetic) {
  .settings-toggle-state {
    display: inline-block;
    padding-top: 0.3em;
    padding-bottom: 0.27em;
    text-box: trim-both cap alphabetic;
  }
}

.menu-section,
.menu-section-trial,
.menu-section-data,
.menu-section-navigation,
.menu-section-account {
  scroll-margin-top: 10px;
}

/* Lists and mode selection */
.list {
  display: flex;
  flex-direction: column;
  gap: var(--list-gap);
  padding: 0 0 12px;
}

/* Search, Start, workflows and trait groups share the standard list gap. */
.traits-screen {
  display: flex;
  flex-direction: column;
  gap: var(--list-gap);
}

.traits-screen > * {
  flex-shrink: 0;
}

/* The trait groups and lab disclosure share the same outer spacing. */
#traitList {
  display: flex;
  flex-direction: column;
  gap: var(--list-gap);
  padding: 0;
}

#traitList > .list {
  margin: 0;
  padding: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: var(--tap);
  padding: 14px;
  background: var(--panel);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
  text-align: left;
}

.row.ghead {
  background: var(--panel-2);
}

.grow {
  flex: 1;
  min-width: 0;
}

.grow b,
.trait-choice b {
  display: block;
  overflow-wrap: anywhere;
}

.grow small,
.trait-choice small {
  display: block;
  color: var(--muted);
}

.chev,
.disclosure-chevron {
  flex: none;
  width: 11px;
  height: 11px;
  margin-right: 4px;
  overflow: hidden;
  color: transparent;
  border-top: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  font-size: 0;
  transform: rotate(45deg);
  transition: transform 140ms ease-out;
}

.disclosure-row {
  align-items: center;
}

.disclosure-label {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.row[aria-expanded="true"] > .chev,
.disclosure-row[aria-expanded="true"] .disclosure-chevron {
  transform: rotate(135deg);
}

.traitrow {
  align-items: stretch;
}

.trait-choice {
  min-height: 52px;
  padding: 4px 0;
  background: transparent;
  color: var(--text);
  border: 0;
  text-align: left;
}

/* THE CHOSEN TRAIT IS MARKED THE WAY THE CHOSEN MENU ENTRY IS: an even outline all the way round and the
   tinted fill inside it, not a rail down one side. Same reason, same day (2026-09-08): a one-sided
   accent stripe against a rounded row reads as a broken edge in slate. */
.traitrow.selected,
.workflow-preset[aria-pressed="true"] {
  background: var(--accent-fill);
  border: 2px solid var(--accent-edge);
  border-radius: var(--radius);
}

.traitrow.selected .trait-choice,
.workflow-preset[aria-pressed="true"] {
  color: var(--accent-label);
}

/* Inheriting keeps details readable when the shared pressed treatment changes the label. */
.traitrow.selected .trait-choice small,
.workflow-preset[aria-pressed="true"] small {
  color: inherit;
}

.trait-order {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  margin-right: 8px;
  background: var(--green);
  color: var(--on-accent);
  border-radius: 50%;
  font-weight: 700;
}

.trait-start {
  width: 100%;
  margin: 0;
}

.trait-group,
.search-results {
  width: 100%;
}

/* The lab disclosure shares the category row box in every theme and both states. */
.trait-advanced-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  background: var(--panel-2);
  color: var(--muted);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
  font-weight: var(--font-weight-heading);
}

.modelist {
  display: flex;
  flex-direction: column;
  gap: var(--list-gap);
}

.mode-heading {
  margin: 0 2px;
  color: var(--text);
  font-size: var(--font-heading-3);
  font-weight: var(--font-weight-heading);
}

.modebtn + .mode-heading {
  margin-top: var(--list-gap);
}

/* THE RECEIVER STRIP SCROLLS WITH THE ACTIVITY LIST (settled 2026-09-04). It was pinned under the top
   bar for a while, held there by position sticky and
   drawn outside the scrolling region; what that produced in the hand was a band riding over a list
   somebody was scrolling. It is the first row of the list again, in its own surface so it still
   reads as a thing apart from the activities under it. The shell change that made #app exactly one
   viewport tall stays: that is what makes every screen scroll inside itself. */
.mode-receiver-strip {
  /* The surface and the line are pulled out to the edges so they run the full width, as they did
     when the strip was pinned. It used to have no top padding at all, on the reasoning that the
     scrolling region already gives a screen gap above it; on the iPad, where the region is taller
     and the panel is wider, that left the control sitting on the panel's own top edge
     (observed 2026-09-07). */
  padding: 12px 14px;
  margin: 0 -14px var(--screen-gap);
  background: var(--panel-2);
  border-bottom: var(--line-width) solid var(--line);
}

.modebtn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  padding: 16px 14px;
  background: var(--panel);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
  text-align: left;
}

.modeic {
  flex: none;
  font-size: 1.6rem;
}

.modetxt {
  flex: 1;
  min-width: 0;
}

.modetxt b {
  display: block;
  font-size: 1.05rem;
}

.modetxt small {
  color: var(--muted);
  font-size: var(--font-body);
}

.receiver-action .modeic {
  color: var(--muted);
}

/* Collection shell */
.collect-topbar {
  flex: none;
}

/* THE CLOUD STRIP NEVER CLIPS ITS LAST LINE. It is a flex item of the one-viewport shell, and the press rule below
   gives it overflow: hidden, so as a shrinkable item it was squeezed whenever the shell ran short. Measured in WebKit
   with the strip's longest sentence at 667 by 375, a phone on its side, the text needed about 163 px and the strip
   was squeezed to about 141 px, cutting off its last line. It keeps its full height, as the top bar and the tab bar
   do, and the card area below it, whose minimum height is zero, is what gives up room and scrolls. */
.syncstrip {
  display: none;
  flex: none;
  width: 100%;
  min-height: 38px;
  padding: 7px 14px;
  background: var(--panel-2);
  color: var(--green);
  border: 0;
  border-bottom: var(--line-width) solid var(--line);
  border-radius: 0;
  font-size: var(--font-body);
  font-weight: 700;
  text-align: center;
}

.syncstrip.show {
  display: block;
}

.syncstrip.working {
  color: var(--warn);
}

.photo-category-screen,
.bulk-upload-screen {
  width: min(100%, 640px);
  margin: 0 auto;
}

.category-new {
  margin-top: 18px;
}

.category-new .btn-primary {
  margin-top: 8px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: var(--list-gap);
  margin-top: 12px;
}

.category-row {
  width: 100%;
}

.badge {
  padding: 2px 7px;
  background: var(--panel-2);
  color: var(--green);
  border: var(--line-width) solid var(--line);
  border-radius: 999px;
  font-size: var(--font-body);
}

.big {
  min-height: 58px;
}

/* The shortcut row's marker, and the row it sits in. The trait the person last recorded is moved
   here out of its group rather than copied, so the list never offers one trait twice. */
.trait-pinned { margin-bottom: var(--space-1); }
.trait-last { margin-left: var(--space-1); }

.plant-photo-count {
  color: var(--muted);
}

.bulk-upload-screen > .btn-primary {
  width: 100%;
}

.bulk-rtk {
  margin-top: 22px;
}

.walk-memo,
.bulk-progress,
.bulk-receipt {
  margin-top: 22px;
  padding: 14px;
  background: var(--panel);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
}

.walk-memo h2,
.bulk-receipt h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.walk-memo textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 10px;
  background: var(--bg);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
}

.bulk-track {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  background: var(--line);
  border-radius: 6px;
}

.bulk-bar {
  width: 0;
  height: 100%;
  background: var(--green);
  transition: width 200ms ease-out;
}

.bulk-receipt ul {
  padding: 0;
  list-style: none;
}

.bulk-receipt li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: var(--line-width) solid var(--line);
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.thumbs .thumb {
  position: relative;
  min-height: 76px;
  overflow: hidden;
  padding: 0;
  background: var(--panel-2);
  border-color: var(--line);
}

.thumbs .thumb img {
  width: 100%;
  height: 76px;
  object-fit: cover;
}

.thumbs .photo-sync-badge,
.thumbs .synced,
.thumbs .unsynced {
  display: block;
  padding: 2px 4px;
  background: var(--media-overlay);
  color: var(--media-text);
  border-radius: 4px;
  font-size: var(--font-body);
}

/* A PHOTOGRAPH CONFIRMED IN DRIVE IS GOOD NEWS, NOT AN ACCENT. This one was missed when --success
   was split out of --green on 2026-09-08: left on the accent it would have turned slate on the dark
   theme, and a badge that says "In Drive" has to keep the one color that means the work is safe. */
.thumbs .photo-sync-badge.synced {
  background: var(--success);
  color: var(--on-accent);
}

.photo-empty {
  grid-column: 1 / -1;
}

/* THE REST OF A PLANT'S PHOTOGRAPHS, AS A COUNT. The card draws the newest few and says how many
   more the Gallery holds, so a plant with hundreds costs the same to enter as a plant with three. */
.thumb-more {
  grid-column: 1 / -1;
  padding: var(--space-1) 0;
  font-size: var(--font-body);
}

/* Equal tracks keep selection from shifting the row. The text-sized minimum preserves complete
   words when text is enlarged, with scrolling available after all four tracks outgrow the phone. */
.bottom-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(4.5em, 1fr));
  flex: none;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 2px calc(env(safe-area-inset-bottom) + 6px);
  background: var(--panel);
  color: var(--text);
  border-top: var(--line-width) solid var(--line);
  /* Compact navigation text fits a 320px phone without shrinking the touch targets. */
  font-size: clamp(0.875rem, 4vw, var(--font-body));
}

.bottom-bar button {
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 4px 2px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: inherit;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  /* No destination label contains a space any more, so nothing wraps; this stays permissive so
     that an enlarged text setting can wrap rather than clip a word. */
  white-space: normal;
}

.bottom-bar button.selected {
  color: var(--green);
  /* The rail marks selection without adding a box or changing the label's metrics. */
  box-shadow: inset 0 -3px 0 var(--green);
}

/* A HAIRLINE BETWEEN DESTINATIONS, ON A PSEUDO-ELEMENT ON PURPOSE. A border or a second inset
   shadow would either shift every label by a pixel or be overwritten by the selected item's rail,
   which is itself an inset shadow. This draws beside the button without entering its box model.
   It stops short at both ends so the row reads as separated rather than ruled into four cells, and
   the lower gap clears the three pixel selection rail. */
.bottom-bar button + button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 28%;
  width: var(--line-width);
  background: var(--line);
  pointer-events: none;
}

.bottom-bar button:focus-visible {
  /* Keep the keyboard focus ring inside the scroll container at either edge of the phone. */
  outline-offset: -3px;
}

.chrome-panel {
  display: flex;
  flex-direction: column;
}

.utility-panel {
  justify-content: center;
  gap: var(--space-2);
  width: min(100%, 620px);
  margin: 0 auto;
}

.utility-intro,
.utility-status {
  line-height: var(--line-body);
}

/* THE UPLOAD SCREEN. Unlike the other utility panels it is a list that can be long, so it starts
   at the top and scrolls rather than sitting centered in the panel. */
.uploads-panel {
  justify-content: flex-start;
}

/* THE ONE LIVE SENTENCE ABOUT THE WHOLE PHONE, at the top of the upload screen where the Sync
   panel's outcome used to be. It reads at heading weight because it is the answer a person opens
   this screen for, and it takes the same three state colors and the same field-theme glyphs every
   other status line in the app takes. */
.upload-headline {
  color: var(--text);
  font-size: var(--font-heading-3);
  font-weight: var(--font-weight-heading);
  line-height: var(--line-body);
}

.upload-headline.success {
  color: var(--success);
}

.upload-headline.warning {
  color: var(--warn);
}

.upload-headline.danger {
  color: var(--danger);
}

/* THE INSTRUCTION THAT STANDS FOR AS LONG AS IT IS TRUE. It was a toast that disappeared
   while the instruction still applied; here it is part of the screen, so it is set apart
   from the counts above it by a rule and a little air rather than by shouting. */
.upload-keep-open {
  padding: var(--space-1) 0;
  border-top: var(--line-width) solid var(--line);
  border-bottom: var(--line-width) solid var(--line);
  color: var(--text);
  line-height: var(--line-body);
}

/* NOTHING LEFT TO UPLOAD IS THE ANSWER TO THIS SCREEN'S QUESTION, so it is drawn as the same
   centered headline the Gallery and the Sync panel use. It borrows .empty-state for the centering
   and .empty-state-primary for the weight and the text color, and gives up only the growing 220px
   box: this panel starts at the top and keeps the Sync control and its sentence directly under the
   headline rather than pushed to the bottom of the screen. */
.uploads-empty {
  flex: none;
  min-height: 0;
  padding: var(--space-3) 0;
}

.upload-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.upload-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2);
  border: var(--line-width) solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.upload-row-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  align-items: baseline;
  justify-content: space-between;
}

.upload-meta {
  color: var(--muted);
  font-size: var(--font-body);
}

.upload-state {
  font-weight: var(--font-weight-heading);
}

.upload-state-failed {
  color: var(--danger);
}

.upload-state-waiting {
  color: var(--warn);
}

/* A photo a person stopped is neither an error nor work in progress; it reads as the settled thing
   it is, with its Retry now beside it. */
.upload-state-canceled {
  color: var(--muted);
}

.upload-note {
  font-size: var(--font-body);
}

.upload-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.photo-sync-badge.verifying,
.photo-sync-badge.verifying-failed {
  background: var(--panel-2);
  color: var(--text);
}

/* THE CONTROLS THAT START THE WORK, ABOVE THE WORK. They used to sit at the foot, which on a queue
   of hundreds of rows meant a person arriving at this screen saw no way to start anything. */
.upload-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

/* WHAT THE LAST PASS DID SITS CLEAR OF THE LIST ABOVE IT, because it is about a pass that has ended
   rather than about what the phone is doing now, and the two ran together with nothing between
   them. */
.upload-foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: var(--line-width) solid var(--line);
}

/* One line per kind, and a line of air between the kinds, so Photos is found without reading the
   rest. */
.pass-report-row {
  margin-top: var(--space-1);
  line-height: var(--line-body);
}

/* THE CARD AREA GIVES UP EVERY PIXEL BEFORE ANYTHING ELSE DOES. The Cloud strip above it and the walk controls and
   tabs below it keep their heights, so on a phone held on its side with the strip's longest sentence the card area
   is what has to shrink. Padding is the one part of a flex item that cannot shrink, and the 36 px this container
   held as padding pushed the column 22 px past the screen, under the pinned walk controls (measured in WebKit at 667
   by 375). The container therefore has no vertical padding of its own; the screen gap above the card and the room
   below it are padding on the card region inside it, where they scroll with the card. */
.collect-scroll {
  display: flex;
  flex-direction: column;
  padding-top: 0;
  padding-bottom: 0;
}

.collect-card-region {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: var(--screen-gap) 0 24px;
}

/* The question control sits at the right of the counter row with Info, the two chips together, so the plant
   name above keeps its full width. The auto margin packs both chips against the right edge. */
.counter .plant-ask {
  margin-left: auto;
}

.collect-card {
  box-shadow: 0 2px 8px var(--shadow-faint);
}

.plotcard {
  margin: 0 0 12px;
  padding: 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
}

.plotname {
  font-size: 1.5rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.accession {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.plotmeta {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--font-body);
}

/* THE CARD-FACE BADGE. The photography status is read at arm's length in sun, so it is bold, boxed,
   and colored by meaning: green has a matched photograph and orange explains why it does not. */
.unit-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  border: var(--line-width) solid currentColor;
  border-radius: 10px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.unit-badge b {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.unit-badge span {
  font-weight: 600;
}

.unit-badge-count {
  color: var(--success);
}

.unit-badge-skip {
  color: var(--warn);
}

/* THE NEXT-TREE WARNING: the one line on the card that asks for a walk before a tap. */
.walk-gap {
  margin-top: 8px;
  padding: 8px 10px;
  border: var(--line-width) solid var(--warn);
  border-radius: 10px;
  color: var(--warn);
  font-weight: 700;
}

.counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: var(--font-body);
}

.navrow {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.navrow button {
  flex: 1;
  min-height: var(--tap);
  margin-top: 0;
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line);
  font-size: 1.05rem;
  font-weight: 700;
}

.navrow button:disabled {
  opacity: 0.4;
}

#unitLevels button[aria-pressed="true"],
.auto-row button.selected {
  background: var(--green);
  color: var(--on-accent);
  border-color: var(--green-bright);
}

.collect-message,
.score-message {
  min-height: 1.3em;
  margin-top: 8px;
  font-size: var(--font-body);
}

.collect-message,
.collect-message.is-status {
  color: var(--green);
}

.collect-message.is-error,
.score-message {
  color: var(--danger);
}

/* WHAT BREEDBASE ALREADY HOLDS FOR THIS PLANT. It is somebody else's record rather than this card's
   own state, so it is set quieter than the score and reads under the input instead of beside it. It
   must never look like a value waiting to be saved. */
.score-history {
  margin-top: 8px;
  font-size: 0.9em;
  color: var(--muted);
}

.score-history-row,
.score-earlier {
  overflow-wrap: anywhere;
}

.collect-mode-slot,
.mode-card-placeholder {
  width: 100%;
}

.mode-card-placeholder {
  padding: 18px;
  color: var(--muted);
  border: var(--line-width) dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.capture {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 84px;
  margin-top: 12px;
  background: var(--accent-fill);
  color: var(--accent-label);
  border-color: var(--accent-edge);
  font-size: 1.2rem;
  font-weight: 800;
}

.capture.survey,
.capture.harvest,
.capture.replant {
  background: var(--panel-2);
  color: var(--text);
  border: 2px solid var(--accent-edge);
}

.notebox,
.new-note {
  width: 100%;
  min-height: 72px;
  padding: 10px;
  background: var(--panel-2);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  resize: vertical;
}

.notebox.talkarea {
  min-height: 170px;
}

.notesave {
  display: block;
  width: 100%;
  min-height: var(--tap);
  margin-top: 8px;
  padding: 12px;
}

/* Scoring */
.walk-score-status { margin: 8px 0; color: var(--muted); }
.multi-item-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.multi-arrow {
  min-width: 0;
  padding: 6px;
  white-space: normal;
  overflow-wrap: anywhere;
  min-height: 44px;
  background: var(--panel-2);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: 8px;
}

.multi-dots {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  justify-content: center;
  gap: 7px;
}

.multi-dot {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  border: 2px solid var(--line);
  border-radius: 50%;
  font-size: 1rem;
}

.all-done,
.find-results,
.method-group,
.multi-next,
.multi-previous,
.replant-check,
.replant-scan,
.screening-cycler,
.trait-cycler {
  min-width: 0;
}

.multi-dot.done {
  background: var(--green);
  color: var(--on-accent);
  border-color: var(--green);
}

.multi-dot.current {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.score-layout-all .score-trait-slot + .score-trait-slot {
  margin-top: 14px;
  padding-top: 2px;
  border-top: var(--line-width) solid var(--line);
}

.ratebox,
.score-card {
  margin-top: 12px;
  padding: 12px;
  background: var(--panel);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
}

.ratehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.ratename {
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ratescale {
  color: var(--muted);
  font-size: var(--font-body);
}

.score-controls {
  margin-top: 8px;
}

.ratebtns {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.rb {
  position: relative;
  display: flex;
  flex: 1 1 52px;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 52px;
  background: var(--panel-2);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: 12px;
  font-size: var(--font-heading-3);
  font-weight: 700;
  user-select: none;
}

.rb.sel,
.ratetick.sel {
  background: var(--green);
  color: var(--on-accent);
  border-color: var(--green-bright);
}

.ratefoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--muted);
  font-size: var(--font-body);
}

.scorenum {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.scoreinput {
  flex: 1;
  min-width: 0;
}

.scoreset {
  flex: 0 0 86px;
}

.ratebig {
  min-height: 2.4rem;
  margin-top: 4px;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.ratebig.unset {
  color: var(--muted);
}

.rateslider {
  width: 100%;
  height: 40px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
}

.rateslider::-webkit-slider-runnable-track {
  height: 10px;
  background: var(--panel-2);
  border: var(--line-width) solid var(--line);
  border-radius: 5px;
}

.rateslider::-webkit-slider-thumb {
  width: 30px;
  height: 30px;
  margin-top: -11px;
  background: var(--green);
  border: 2px solid var(--green-bright);
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
}

.rateslider.unset::-webkit-slider-thumb {
  background: var(--panel);
  border-color: var(--line);
}

.rateticks {
  display: flex;
  gap: 4px;
}

.ratetick {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 4px;
  background: transparent;
  color: var(--muted);
  border: 0;
  font-size: var(--font-body);
  font-weight: 700;
  user-select: none;
}

.score-confirm {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  align-items: flex-end;
  padding: max(env(safe-area-inset-top), 12px) 12px max(env(safe-area-inset-bottom), 12px);
  background: var(--overlay-half);
}

.score-confirm-sheet {
  width: min(100%, 520px);
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
  overflow-y: auto;
  margin: 0 auto;
  padding: 18px 18px calc(env(safe-area-inset-bottom) + 18px);
  background: var(--panel);
  color: var(--text);
  border-radius: 18px;
}

.score-confirm-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: var(--line-width) solid var(--line);
}

.score-confirm-error {
  min-height: 1.3em;
  color: var(--danger);
}

.score-confirm-actions {
  display: flex;
  gap: 10px;
}

.score-confirm-actions button {
  flex: 1;
  margin-top: 0;
}

/* Survey and shared swipe rows */
.surveybox,
.survey-card,
.harvest-card,
.replant-card,
.planting-card,
.screening-card,
.tally-card {
  margin-top: 12px;
  padding: 12px;
  background: var(--panel);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
}

.rtknet,
.connectivity-banner {
  margin: 10px 0;
  padding: 9px 11px;
  color: var(--warn);
  border: var(--line-width) solid var(--warn);
  border-radius: 8px;
  text-align: center;
}

/* The update notice starts each screen below its top bar, outlined like the rows below it, with
   Update and Dismiss together at the end. The empty slot takes no room. */
.update-notice-slot:empty {
  display: none;
}

.workflow-notice-host {
  flex: none;
}

.update-notice-screen {
  flex: none;
  margin: var(--screen-gap) 14px 0;
}

.update-notice-screen .update-notice {
  margin-bottom: 0;
}

.update-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 var(--list-gap);
  padding: 8px 8px 8px 14px;
  background: var(--panel);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
}

.update-notice-text {
  overflow-wrap: anywhere;
  flex: 1 1 auto;
  min-width: 0;
}

.update-notice-sentence {
  display: block;
}

.update-notice-message {
  display: block;
  white-space: pre-wrap;
}

.update-notice-actions {
  display: flex;
  flex: none;
  gap: 12px;
  margin-left: auto;
}

/* Update and Dismiss are chips with their own text colors. A press uses the shared chip press, which
   fills them with the pressed tint and draws their labels in the text color. */
.update-notice .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.update-notice-update {
  color: var(--accent-text);
}

.update-notice-dismiss {
  color: var(--danger);
}

/* The blocking screen reads top to bottom in the order its steps are taken, spaced by its gap alone. */
.update-required {
  gap: var(--space-2);
}

.update-required-text {
  margin: 0;
}

.update-required .btn-primary,
.update-required .btn-ghost,
.update-required .list {
  margin-top: 0;
}

/* The store link is a link, because a link is what the shells open outside the app, so it takes the
   border and corners the button rule gives every button, and its class gives the colors. */
.update-required a.update-store-link {
  border-style: solid;
  border-width: var(--line-width);
  border-radius: var(--radius);
  text-decoration: none;
}

.svresult {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--panel-2);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}

.svresult.green,
.svresult.receiver {
  border-color: var(--green);
}

.svresult.amber,
.svresult.acquiring,
.svresult.degraded {
  color: var(--warn);
  border-color: var(--warn);
}

.svresult.red,
.svresult.phone,
.svresult.frozen,
.svresult.noisy {
  color: var(--danger);
  border-color: var(--danger);
}

.survey-verdict-detail {
  display: block;
  margin-top: 4px;
  color: inherit;
}

.svlog,
.harvest-log,
.replant-log {
  margin-top: 12px;
}

.svitem {
  position: relative;
  overflow: hidden;
  margin-bottom: 6px;
  border-radius: 8px;
  touch-action: pan-y;
}

.svact {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  padding: 0;
  background: var(--danger);
  border: 0;
  border-radius: 8px;
}

.svactlab {
  position: absolute;
  top: 50%;
  left: 0;
  width: 84px;
  color: var(--on-accent);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  transform: translate(100vw, -50%);
  transition: none;
  will-change: transform;
}

.svin {
  position: relative;
  z-index: 10;
  padding: 8px 10px;
  background: var(--panel-2);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 8px;
  transition: none;
  will-change: transform;
}

.svitem.open .svin {
  box-shadow: 2px 0 8px var(--shadow-side);
}

.svitem.deleting {
  pointer-events: none;
  transition: height 300ms cubic-bezier(0.2, 0.8, 0.2, 1), margin-bottom 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.svitem.noisy .svin {
  border-left-color: var(--danger);
}

.notemeta,
.bag-meta,
.replant-old {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--font-body);
  font-variant-numeric: tabular-nums;
}

.svcoord,
.bag-harvest-code,
.replant-new {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.day-strip {
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 8px;
  font-size: var(--font-body);
  text-align: center;
}

.harvest-hold,
.replant-hold,
.screening-alert,
.tally-alert {
  min-height: 1.3em;
  margin-top: 10px;
  padding: 9px 11px;
  border: var(--line-width) solid transparent;
  border-radius: 8px;
}

.harvest-hold.bad,
.replant-hold.bad,
.screening-alert.bad,
.tally-alert.bad {
  color: var(--danger);
  border-color: var(--danger);
}

/* Previous plant and replant forms */
.previous-plants {
  margin-top: 14px;
  border-left: 3px solid var(--line);
  padding-left: 10px;
}

.previous-toggle {
  width: 100%;
  min-height: 48px;
  padding: 8px 0;
  background: transparent;
  color: var(--text);
  border: 0;
  text-align: left;
  font-weight: 700;
}

.previous-body {
  padding-top: 4px;
}

.previous-plant {
  padding: 9px 0;
  border-top: var(--line-width) solid var(--line);
}

.previous-accession,
.previous-name {
  display: block;
  overflow-wrap: anywhere;
}

.previous-generation {
  color: var(--muted);
  font-size: var(--font-body);
}

.old-accession {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--panel-2);
  border-radius: 10px;
}

.new-accession-label,
.new-id-label,
.new-source-label,
.new-note-label {
  margin-top: 10px;
}

.new-accession,
.new-germplasm-id,
.new-source {
  margin-bottom: 4px;
}

.replant-accession-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.accession-check-state {
  grid-column: 1 / -1;
  padding: 8px 10px;
  border: var(--line-width) solid currentColor;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
}

.accession-check-state.verified {
  color: var(--green);
}

.accession-check-state.not-checked {
  color: var(--danger);
}

.trait-missed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0;
  padding: 10px 12px;
  color: var(--danger);
  border: var(--line-width) solid var(--danger);
  border-radius: 8px;
}

.trait-missed > span { flex-basis: 100%; }

.trait-missed button {
  width: auto;
  min-width: 92px;
  margin: 0;
}

.replant-row,
.planting-row {
  padding: 8px 0;
  border-top: var(--line-width) solid var(--line);
}

/* On a tablet the planting form and its session list are centered, as the plant card is. */
.planting-card,
.planting-card + .card {
  margin-left: auto;
  margin-right: auto;
}

/* Screening */
.screening-criteria {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.screening-criterion {
  padding: 12px;
  background: var(--panel-2);
  border: var(--line-width) solid var(--line);
  border-radius: 10px;
}

.criterion-name {
  margin: 0;
  font-size: 1rem;
}

.criterion-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: var(--font-body);
}

.yes-no-controls {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.screen-answer {
  flex: 1;
  min-height: 56px;
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  font-size: 1.05rem;
  font-weight: 700;
}

.screen-answer.selected {
  background: var(--green);
  color: var(--on-accent);
  border-color: var(--green-bright);
}

.screen-answer-state {
  margin-top: 7px;
  font-size: var(--font-body);
}

.screen-answer-state.absent {
  color: var(--muted);
}

.screen-answer-state.answered {
  color: var(--success);
  font-weight: 700;
}

.screen-clear {
  min-height: 44px;
  margin-top: 4px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  border: 0;
  text-decoration: underline;
}

/* Tally */
.running-tally {
  padding: 12px;
  background: var(--panel-2);
  border-radius: 10px;
  text-align: center;
}

.tally-count,
.tally-total,
.tally-ground-total {
  font-size: 1.7rem;
  font-variant-numeric: tabular-nums;
}

.tally-count-label,
.tally-total-label,
.tally-ground-label,
.tally-done-state {
  color: var(--muted);
}

.tally-ground-figure {
  white-space: nowrap;
}

.tally-done-state {
  display: block;
  margin-top: 4px;
}

.tally-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.tally-button {
  min-height: 64px;
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line);
  font-size: 1.2rem;
  font-weight: 800;
}

.tally-button.overflow {
  border-color: var(--green-bright);
}

.tally-whole-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.tally-typed,
.tally-none {
  width: 100%;
  min-height: var(--tap);
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  font-weight: 700;
}

.tally-ground {
  margin-top: 10px;
  padding: 10px;
  background: var(--panel-2);
  border-radius: 10px;
}

.tally-ground-toggle {
  margin: 0;
}

.tally-ground-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.tally-card input.tally-ground-input {
  min-width: 0;
  width: 100%;
  font-size: 1.2rem;
}

.tally-ground-save {
  width: 100%;
  min-height: var(--tap);
  margin-top: 0;
  padding: 0 12px;
}

.tally-completion-help {
  margin: 10px 0;
  color: var(--muted);
  font-size: var(--font-body);
}

.tally-ground-prompt {
  margin-top: 8px;
}

.tally-state-input {
  width: 100%;
  min-height: var(--tap);
  margin: 8px 0;
}

.tally-height-input {
  margin: 8px 0;
}

.tally-height-save {
  margin-top: 4px;
}

.tally-controls {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.tally-undo,
.tally-done {
  flex: 1;
  min-height: var(--tap);
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  font-weight: 700;
}

.tally-event-history {
  margin-top: 12px;
}

.tally-event-heading {
  font-size: var(--font-heading-3);
}

.tally-event-list {
  display: flex;
  flex-direction: column;
  margin-top: 6px;
}

.tally-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: var(--line-width) solid var(--line);
}

.tally-event-text {
  min-width: 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.tally-event-remove {
  min-height: 44px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
  font-weight: 700;
}

.tally-event-more {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--font-body);
}

/* Field map with sticky axes */
/* The map panel is a flex column that scrolls, and a flex item that hides its overflow can shrink below
   its content. Without flex-shrink: 0 the bottom of the map was cut off, with no way to scroll to it,
   once the update notice stood above the panel. Measured in WebKit on 2026-11-11: at 320 x 568 the grid's
   box was 294 px tall for 486 px of content (398 px without the notice), and at 375 x 667 the imagery
   stage lost its bottom 38 px, which holds the note that positions are approximate. */
.mapview {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  flex-shrink: 0;
  margin: 0 0 12px;
}

.maphelp,
.map-too-large {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: var(--font-body);
}

.map-too-large {
  padding: 18px;
  border: var(--line-width) solid var(--line);
  border-radius: 10px;
  text-align: center;
}

.mapwrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: calc(100dvh - 240px);
  overflow: auto;
  border: var(--line-width) solid var(--line);
  border-radius: 10px;
}

.mapgrid {
  display: grid;
  gap: 3px;
  width: max-content;
  padding: 3px;
  background: var(--bg);
}

.mcell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-width: 44px;
  height: 52px;
  min-height: 44px;
  overflow: hidden;
  padding: 0;
  border-radius: 6px;
  font-size: var(--font-body);
}

.mhead {
  background: var(--bg);
  color: var(--muted);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.mtop {
  position: sticky;
  top: 0;
  z-index: 2;
}

.mleft {
  position: sticky;
  left: 0;
  z-index: 2;
}

.mcorner {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 3;
  background: var(--bg);
  color: var(--muted);
}

.mempty {
  background: transparent;
}

.mplot {
  background: var(--panel-2);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  line-height: 1;
}

.mplot.has {
  background: var(--green);
  color: var(--on-accent);
  border-color: var(--green-bright);
}

.mplot.marked {
  background: var(--marked);
  border-color: var(--marked);
}

.map-marks-summary {
  white-space: pre-line;
}

.mplot.here {
  outline: 3px solid var(--warn);
  outline-offset: -3px;
}

/* Orthomosaic map. The marker canvas never accepts a pointer, so every gesture reaches the viewer.
   It keeps its full height in the map panel for the reason given above .mapview. */
.orthomap {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  flex-shrink: 0;
  border: var(--line-width) solid var(--viewer-control-line);
  border-radius: 10px;
  background: var(--viewer-bg);
}

.orthomap-stage {
  position: relative;
  width: 100%;
  height: min(70dvh, 720px);
  min-height: 420px;
  overflow: hidden;
  background: var(--viewer-bg);
}

.orthomap-viewer,
.orthomap-markers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.orthomap-markers {
  z-index: 2;
  pointer-events: none;
}

.orthomap-compass {
  position: absolute;
  z-index: 3;
  right: 8px;
  top: 62px; /* under the control bar; the note at the foot can run to three lines and covered it there */
  width: 44px;
  height: 44px;
  border: var(--line-width) solid var(--viewer-control-line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--viewer-panel) 82%, transparent);
  box-shadow: 0 2px 7px var(--shadow);
  cursor: pointer;
  pointer-events: auto;
}

.orthomap-compass-arrow {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: center;
  pointer-events: none;
}

.orthomap-compass-north {
  height: 17px;
  color: var(--accent-label);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.orthomap-compass-needle {
  display: block;
  width: 10px;
  height: 23px;
  background: linear-gradient(to bottom, var(--accent-label) 0 50%, var(--viewer-muted) 50% 100%);
  clip-path: polygon(50% 0, 100% 50%, 62% 50%, 50% 100%, 38% 50%, 0 50%);
}

html[data-theme="field"] .orthomap-compass-north {
  color: var(--accent-edge);
}

html[data-theme="field"] .orthomap-compass-needle {
  background: linear-gradient(to bottom, var(--accent-edge) 0 50%, var(--viewer-muted) 50% 100%);
}

.orthomap-controls {
  position: absolute;
  z-index: 4;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}

.orthomap-controls button {
  min-height: 44px;
  padding: 0 12px;
  border: var(--line-width) solid var(--viewer-control-line);
  border-radius: 9px;
  background: var(--viewer-control);
  color: var(--viewer-text);
  font-size: var(--font-body);
  font-weight: 700;
  box-shadow: 0 2px 7px var(--shadow);
  pointer-events: auto;
}

.orthomap-lines,
.orthomap-current,
.orthomap-follow {
  touch-action: manipulation;
}

/* A pressed map control sits on the photo, which looks the same in every theme, so it is a solid fill in light and dark
   rather than the dark theme's translucent tint, which let the photo show through Follow when it was on. */
.orthomap-controls button[aria-pressed="true"] {
  border-color: var(--viewer-on-edge);
  background: var(--viewer-on-fill);
  color: var(--viewer-on-label);
}

.orthomap-status,
.orthomap-callout {
  position: absolute;
  z-index: 4;
  border: var(--line-width) solid var(--viewer-control-line);
  background: var(--viewer-panel);
  color: var(--viewer-text);
  box-shadow: 0 3px 12px var(--shadow);
}

.orthomap-status {
  right: 8px;
  bottom: 8px;
  left: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: var(--font-body);
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
}

.orthomap-callout {
  width: min(236px, calc(100% - 16px));
  padding: 12px;
  border-radius: 10px;
  font-size: var(--font-body);
}

.orthomap-callout strong {
  display: block;
  overflow-wrap: anywhere;
}

.orthomap-callout-badge,
.orthomap-callout-labels {
  margin-top: 6px;
}

.orthomap-callout-position {
  margin: 8px 0 0;
  color: var(--viewer-muted);
  font-size: var(--font-body);
}

.orthomap-callout-badge.count {
  color: var(--success);
}

.orthomap-callout-badge.skip {
  color: var(--viewer-muted);
}

.orthomap-go {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  font-size: var(--font-body);
}

.orthomap-fallback-note {
  margin-bottom: 8px;
  padding: 10px 12px;
  border: var(--line-width) solid var(--warn);
  border-radius: 9px;
  color: var(--text);
  font-size: var(--font-body);
}

.map-imagery-screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(100%, 620px);
  margin: 0 auto;
  padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
}

.map-imagery-summary,
.map-imagery-state,
.map-imagery-persistence {
  padding: 16px;
  background: var(--panel-2);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
}

.map-imagery-summary h1 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  line-height: 1.25;
}

.map-imagery-summary p,
.map-imagery-captured,
.map-imagery-size,
.map-imagery-state,
.map-imagery-persistence,
.map-imagery-wifi {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.map-imagery-state {
  border-left: 4px solid var(--green);
  font-weight: 700;
}

.map-imagery-persistence {
  color: var(--muted);
}

.map-imagery-actions .btn-primary {
  margin-top: 0;
}

.map-imagery-actions .btn-ghost {
  font-size: 1rem;
}

.map-imagery-actions .danger {
  color: var(--danger);
  border-color: var(--danger);
}

.map-imagery-wifi {
  margin-top: 8px;
  color: var(--muted);
}

/* Pedigree panel */
.pedscreen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}

.pedscreen .scroll {
  padding-bottom: calc(env(safe-area-inset-bottom) + 24px);
}

.plantfacts {
  margin-bottom: 12px;
}

/* The Plant panel opens on whichever of these three comes first, so none of them has the gap
   below the top bar any more. Each keeps the space it used to put above itself only where it
   follows something on the same screen. */
.pedwho {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.factgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 2px;
}

.factgrid > div {
  padding: 9px 11px;
  background: var(--panel);
  border: var(--line-width) solid var(--line);
  border-radius: 10px;
}

.factgrid span {
  display: block;
  color: var(--muted);
  font-size: var(--font-body);
}

.plantfacts + .pedwho,
.pedstatus + .pedwho {
  margin-top: 16px;
}

.pedstatus {
  margin: 0 0 2px;
  padding: 9px 11px;
  background: var(--panel-2);
  color: var(--warn);
  border: var(--line-width) solid var(--warn);
  border-radius: 8px;
}

.plantfacts + .pedstatus {
  margin-top: 12px;
}

.pednone {
  margin-top: 10px;
  padding: 14px;
  background: var(--panel);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: 10px;
}

.pedtree,
.pedtree ul,
.pedpair {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pedtree {
  padding: 0 0 4px;
}

.plantfacts + .pedtree,
.pedstatus + .pedtree {
  padding-top: 14px;
}

.pedtree ul,
.pedpair {
  padding-left: 22px;
}

.pedtree ul > li {
  position: relative;
  padding-top: 8px;
}

.pedtree ul > li::before {
  position: absolute;
  top: 26px;
  left: -14px;
  width: 12px;
  height: 2px;
  background: var(--line);
  content: "";
}

.pedtree ul > li::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -14px;
  width: 2px;
  background: var(--line);
  content: "";
}

.pedbox {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 9px 12px;
  background: var(--panel);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: 10px;
  text-align: left;
}

.pedbox.drill {
  padding-right: 32px;
}

/* The drill affordance is the app's own chevron, sat at the right edge of the card; a bare span here
   printed a literal > after every parent name. */
.pedbox.drill .chev {
  position: absolute;
  right: 14px;
  top: 50%;
  margin: -6px 0 0;
}

.pedbox.missing {
  background: transparent;
  border-style: dashed;
}

.pedrole {
  display: block;
  color: var(--muted);
  font-size: var(--font-body);
}

/* Gallery and deliberate dark viewer */
.gallery-list {
  display: flex;
  flex-direction: column;
  gap: var(--list-gap);
}

/* THE SCOPE OF THE LIST STAYS ON SCREEN WHILE THE LIST SCROLLS UNDER IT. The sentence explaining
   whether the gallery held one trial's photos or every photo on the phone scrolled away on the first
   flick. It paints on a surface token because rows
   pass beneath it. */
/* THE CONTROL THAT DRAWS THE NEXT PAGE OF THE GALLERY. The list is paged because drawing 1,700 rows
   at once froze the whole app on 2026-09-07, so this is how the rest are reached. It sits under the
   list, full width, and reads as an ordinary action rather than as a warning. */
.gallery-more {
  display: block;
  width: 100%;
  margin: 12px 0 0;
}

.gallery-summary {
  position: sticky;
  top: 0;
  z-index: 3;
  margin-bottom: 8px;
  padding: 8px 0;
  background: var(--bg);
}

#gallerySync {
  width: 100%;
  margin-bottom: 12px;
}

.gallery-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  text-align: left;
}

.gallery-row small {
  display: block;
  color: var(--muted);
}

.gallery-thumb {
  display: flex;
  flex: 0 0 54px;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  background: var(--panel-2);
  border-radius: 8px;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-copy {
  flex: 1;
  min-width: 0;
}

/* THE ROW LEADS WITH THE PLANT AND WRAPS. It used to lead with the raw filename on one clipped
   line, so the identity a person actually says out loud was the part that got cut off. */
.gallery-name {
  display: block;
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
  white-space: normal;
}

.gallery-row small,
.gallery-file {
  overflow-wrap: anywhere;
  white-space: normal;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: var(--viewer-bg);
  color: var(--viewer-text);
}

.viewer-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px;
  background: var(--viewer-panel);
  color: var(--viewer-text);
}

/* THE TOP BAR SHOWS A POSITION COUNTER AND NOTHING ELSE BETWEEN ITS TWO CONTROLS. It used to
   show the filename on one line with text-overflow: ellipsis, so on every phone the identity ended
   in "..."; the identity now lives in the foot, where it wraps and nothing is cut off. */
.viewer-count {
  flex: 1;
  text-align: center;
}

.viewer-top button {
  min-height: 44px;
  padding: 0 10px;
  background: var(--viewer-control);
  color: var(--viewer-text);
  border: 0;
}

.viewer-img {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.viewer-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* THREE LINES, EACH WRAPPING, NONE TRUNCATED: the plant, then where and when the photo was taken
   with its filename, then what the phone is doing about it. */
.viewer-foot {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px calc(env(safe-area-inset-bottom) + 8px);
  background: var(--viewer-panel);
  color: var(--viewer-muted);
  text-align: left;
}

.viewer-line {
  overflow-wrap: anywhere;
  white-space: normal;
}

.viewer-foot .viewer-line:first-child {
  color: var(--viewer-text);
  font-weight: 700;
}

/* PREVIOUS AND NEXT ARE ALWAYS DRAWN. A swipe with no visible affordance is not discoverable, and
   the technicians wear gloves. */
.viewer-nav {
  display: flex;
  flex: none;
  gap: 8px;
  padding: 8px 12px;
  background: var(--viewer-panel);
}

.viewer-step {
  flex: 1;
  min-height: 44px;
  background: var(--viewer-control);
  color: var(--viewer-text);
  border: 0;
}

.viewer-step:disabled {
  opacity: 0.4;
}

/* A photo whose local original has gone shows its stored thumbnail scaled up rather than nothing at
   all, and it must not be blown up beyond what a 320 px thumbnail can show. */
.viewer-img-scaled img {
  width: auto;
  max-width: min(100%, 640px);
  image-rendering: auto;
}

.viewer-img-missing::before {
  color: var(--viewer-muted);
  content: "No picture is stored on this phone";
}

/* Full screen scanner and manual entry */
.scanscreen {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--scanner-bg);
  color: var(--viewer-text);
}

.scanscreen .topbar {
  position: relative;
  flex: none;
  background: var(--viewer-panel);
  color: var(--viewer-text);
  border-color: var(--viewer-line);
}

.scanscreen .topbar button,
.scanfoot button {
  min-height: 44px;
  background: var(--viewer-control);
  color: var(--viewer-text);
  border-color: var(--viewer-control-line);
}

.scanwrap {
  position: relative;
  flex: 1;
  min-height: 300px;
  overflow: hidden;
  background: var(--scanner-bg);
}

.scanwrap video,
.scanfreeze {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanfreeze {
  display: none;
}

.scanbox {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(62vw, 260px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 4px solid var(--scanner-frame);
  border-radius: 18px;
  box-shadow: 0 0 0 9999px var(--scanner-mask);
  pointer-events: none;
}

.scanid {
  position: absolute;
  top: 50%;
  left: 50%;
  display: none;
  max-width: 86%;
  padding: 10px 18px;
  transform: translate(-50%, -50%);
  background: var(--media-overlay);
  color: var(--media-text);
  border: 2px solid var(--scanner-frame);
  border-radius: 12px;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  overflow-wrap: anywhere;
}

.scantip {
  position: absolute;
  right: 0;
  bottom: 14px;
  left: 0;
  padding: 0 18px;
  /* Camera brightness varies, so the tip needs its own contrasting backdrop. */
  background: var(--media-overlay);
  color: var(--media-text);
  text-align: center;
  text-shadow: 0 1px 3px var(--scanner-shadow);
}

.scanfoot {
  flex: none;
  padding: 12px 14px calc(env(safe-area-inset-bottom) + 12px);
  background: var(--viewer-panel);
  color: var(--viewer-text);
}

.scanhit {
  min-height: 0;
  color: var(--viewer-text);
}

.scanhit.ok {
  padding-left: 10px;
  border-left: 4px solid var(--green-bright);
}

.scanhit.miss {
  padding-left: 10px;
  border-left: 4px solid var(--scanner-miss);
}

.scanactions:empty {
  display: none;
}

.scanactions .btn-go {
  margin-top: 10px;
  background: var(--accent-fill);
  color: var(--accent-label);
  border-color: var(--accent-edge);
}

.manualtag {
  position: fixed;
  inset: 0;
  z-index: 76;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(env(safe-area-inset-top), 14px) 14px max(env(safe-area-inset-bottom), 14px);
  background: var(--overlay-strong);
}

.manualtag-panel {
  width: min(100%, 460px);
  padding: 18px;
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius);
}

.manualtag-panel button {
  min-width: 96px;
  min-height: var(--tap);
  margin: 12px 8px 0 0;
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line);
}

.manualtag-panel .btn-go {
  background: var(--accent-fill);
  color: var(--accent-label);
  border-color: var(--accent-edge);
}

.findscreen {
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}

.find-content {
  height: calc(100% - 64px);
}

.find-position {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 8px;
}

/* Row and Plant are the first thing on the Find screen, and the shared label rule's own top margin
   would sit on top of the screen gap. The container owns that distance here as everywhere else. */
.find-position > label {
  margin-top: 0;
}

.find-position .btn-go {
  min-width: 72px;
  min-height: var(--tap);
}

.find-message {
  min-height: 1.5em;
  margin: 8px 0;
  color: var(--danger);
  font-weight: 700;
}

.find-search-label {
  display: block;
}

.find-result {
  width: 100%;
  text-align: left;
}

.find-more { color: var(--muted); padding: 12px 16px; }
.find-photo-count {
  color: var(--muted);
  white-space: nowrap;
}

/* Definition dialog is mounted by the application shell, outside the UI module tree. */
.definition-overlay {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(env(safe-area-inset-top), 14px) 14px max(env(safe-area-inset-bottom), 14px);
  background: var(--overlay-strong);
}

.definition-panel {
  width: min(100%, 460px);
  max-height: 100%;
  overflow-y: auto;
  padding: 18px;
  background: var(--panel);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
}

.definition-panel button {
  width: 100%;
  min-height: var(--tap);
  padding: 0 14px;
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line);
}

/* The status row keeps its label and chevron apart without adding a second card border. */
.receiver-corrections-link {
  justify-content: space-between;
  border: 0;
  min-height: var(--tap);
}

/* Receiver status */
.receiver-datum-lookup {
  background: none;
  border: 0;
  padding: 8px 0;
  min-height: 44px;
  color: var(--green);
  font: inherit;
  font-size: .9rem;
  text-align: left;
  text-decoration: underline;
  white-space: normal;
}

.correction-services-viewer .title {
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 1.1rem;
  margin: 0;
}

.correction-services-content {
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin: 0 auto;
  padding: 12px;
  overflow-wrap: anywhere;
}

.correction-service-entry {
  min-width: 0;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-wrap: anywhere;
}

.correction-service-entry p { margin: .3rem 0; }
.correction-services-content h2 { margin: 1.5rem 0 .5rem; }

.receiver-screen,
.corrections-screen {
  gap: 12px;
  min-width: 0;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

/* The heading opens the Receiver screen, so its distance below the top bar comes from the
   scrolling container like every other screen's. */
.receiver-title {
  margin: 0;
}

.receiver-connection,
.receiver-verification,
.receiver-truth,
.receiver-corrections,
.receiver-failure,
.receiver-accuracy,
.receiver-satellites,
.receiver-position,
.receiver-mark-check,
.receiver-site-mark,
.receiver-mark-result,
.receiver-tested {
  min-width: 0;
  padding: 12px;
  background: var(--panel);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: 10px;
}

.receiver-verification-title,
.receiver-mark-confirmation-text {
  margin: 0 0 7px;
  color: var(--text);
  font-size: var(--font-body);
}

.receiver-verification-state {
  margin-bottom: 8px;
  color: var(--warn);
  font-size: var(--font-body);
  font-weight: 800;
}

.receiver-verification-state.success {
  color: var(--success);
}

.receiver-verification-note {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: var(--font-body);
  line-height: var(--line-body);
}

.receiver-connection-state,
.receiver-solution {
  font-size: var(--font-body);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 4px 12px;
  background: var(--panel-2);
  border: var(--line-width) solid var(--line);
  border-radius: 999px;
  font-size: var(--font-body);
  font-weight: 800;
  line-height: 1.2;
}

.receiver-solution-chip {
  flex: none;
  max-width: none;
  min-width: max-content;
  color: var(--muted);
  appearance: none;
  white-space: nowrap;
}

.receiver-solution-chip.success {
  color: var(--success);
}

.receiver-solution-chip.warning {
  color: var(--warn);
}

.receiver-solution-chip.neutral {
  color: var(--muted);
}

.receiver-connection-detail,
.receiver-solution-detail,
.receiver-device,
.receiver-baseline,
.receiver-epoch,
.receiver-mark-detail,
.receiver-mark-status,
.correction-tick {
  margin-top: 5px;
  color: var(--muted);
  font-size: var(--font-body);
}

/* All three columns wrap at the screen body size so the table fits a phone card. */
.receiver-tested-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.receiver-tested-cell {
  padding: 6px 8px 6px 0;
  color: var(--text);
  font-size: var(--font-body);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* Firmware values can wrap even when they contain no spaces. */
.receiver-tested-firmware {
  overflow-wrap: anywhere;
}

/* Dates may wrap at their separators without automatic hyphenation. */
.receiver-tested-date {
  -webkit-hyphens: manual;
  hyphens: manual;
}

.receiver-tested-head .receiver-tested-cell {
  color: var(--muted);
  font-weight: var(--font-weight-heading);
}

.receiver-tested-body .receiver-tested-row {
  border-top: var(--line-width) solid var(--line);
}

.receiver-accuracy-label,
.receiver-corrections-title,
.receiver-position-label,
.receiver-mark-title,
.receiver-mark-result-title,
.receiver-tested-title {
  margin: 0 0 7px;
  color: var(--text);
  font-size: var(--font-body);
}

/* The tested receivers list opens from its title, which keeps a heading's weight and a touch target
   of about 44 px; the open list sits the usual 7 px below it. */
summary.receiver-tested-title {
  margin: 0;
  padding: 10px 0;
  font-weight: var(--font-weight-heading);
  cursor: pointer;
}

.receiver-tested-details[open] > summary.receiver-tested-title {
  margin-bottom: 7px;
}

.receiver-accuracy-east,
.receiver-accuracy-north,
.receiver-accuracy-up,
.receiver-sat-rover,
.receiver-sat-base,
.receiver-sat-valid,
.receiver-position-latitude,
.receiver-position-longitude,
.receiver-position-height,
.receiver-mark-mean-latitude,
.receiver-mark-mean-longitude,
.receiver-mark-mean-height,
.receiver-mark-count,
.receiver-mark-rms {
  font-variant-numeric: tabular-nums;
}

.receiver-mark-check {
  display: grid;
  gap: 8px;
}

.receiver-mark-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.receiver-mark-result {
  background: var(--panel-2);
}

.receiver-mark-check .btn-primary {
  width: 100%;
  margin-top: 0;
}

/* The row shows its own name first and its status second, so the name is the weighted one and the
   status reads as a subtitle. Before this the status was the only text in the row, which left a
   tappable card whose whole label was "Receiver counters unchanged". */
.receiver-corrections-name {
  font-weight: 700;
  margin-right: auto;
}

.receiver-correction-state {
  font-weight: 400;
  opacity: 0.8;
  margin-right: 8px;
}

.receiver-correction-state.success {
  font-weight: 700;
  opacity: 1;
}

.receiver-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.receiver-chooser {
  display: grid;
  gap: var(--space-1);
}

.receiver-chooser button {
  min-width: 0;
  min-height: 48px;
  overflow-wrap: anywhere;
  text-align: left;
}

.receiver-controls .btn-primary {
  flex: 1 1 180px;
  margin-top: 0;
}

.receiver-error {
  margin-top: 0;
}

.success,
.green {
  color: var(--green);
}

.warning,
.amber {
  color: var(--warn);
}

.danger,
.red,
.bad {
  color: var(--danger);
}

.receiver-epoch.frozen-stream {
  padding: 8px;
  background: var(--frozen-bg);
  color: var(--danger);
  border: var(--line-width) solid var(--danger);
  border-radius: 8px;
}

/* Recorded value wash. The show class controls entry and the default state fades out. */
.okflash {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--flash-success);
  color: var(--flash-text);
  font-size: 24vw;
  overflow: hidden;
  font-weight: 800;
  line-height: 1;
  padding: max(env(safe-area-inset-top), 12px) 12px max(env(safe-area-inset-bottom), 12px);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-out;
}

.okflash.show {
  opacity: 1;
  transition: none;
}

.okflash.bad {
  background: var(--flash-danger);
  color: var(--media-text);
  font-size: 12vw;
}

/* Every tappable component uses the mode-row pressed treatment. */
.btn-primary,
.btn-go,
.btn-ghost,
.iconbtn,
.chip,
.pedchip,
.row,
.category-row,
.trait-choice,
.modebtn,
.capture,
.notesave,
.rb,
.ratetick,
.disclosure-row,
.notesect,
.previous-toggle,
.screen-answer,
.screen-clear,
.tally-button,
.tally-typed,
.tally-none,
.tally-ground-save,
.tally-event-remove,
.tally-undo,
.tally-done,
.mplot,
.orthomap-compass,
.pedbox.drill,
.gallery-row,
.find-result,
.syncstrip,
.thumbs .thumb,
.svact,
.receiver-solution-chip,
.menu-item,
.multi-arrow,
.multi-dot,
.topbar-back,
.topbar-menu,
.noteact,
.replant-scan,
.replant-check,
.navrow button,
.score-confirm-actions button,
.pedscreen .topbar button,
.viewer-top button,
.scanscreen .topbar button,
.scanfoot button,
.manualtag-panel button,
.definition-panel button,
.settings-menu-sheet .menu-item,
.sign-out-overlay .menu-item,
.manual-nav-button,
.bottom-bar button {
  /* The separator hairline is positioned against this. */
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: var(--pressed-transition);
}

/* The shared press rule above makes every control position: relative, which for the compass
   replaces the position: absolute of its own rule: it then falls into the stage's normal flow at the
   top-left corner, and its right: 8px becomes a shift 8px past the stage's left edge, where the
   stage's overflow clips it. The compass floats over the map, so it stays absolute. */
.orthomap-stage .orthomap-compass {
  position: absolute;
}

/* Filled accents need their own press colors because a neutral tint can match their resting fill.
   Custom properties let the shared menu and footer rules preserve the same feedback. */
.btn-primary,
.btn-go,
.capture,
.menu-item.selected,
.traitrow.selected .trait-choice {
  --button-pressed-fill: var(--accent-pressed-fill);
  --button-pressed-label: var(--accent-pressed-label);
}

.capture.survey,
.capture.harvest,
.capture.replant {
  --button-pressed-fill: var(--pressed-tint);
  --button-pressed-label: var(--text);
}

/* A type selector in :where keeps existing class active rules stronger than this fallback. */
:where(button):active:not(:disabled),
#ntripStart:active:not(:disabled),
#ntripStop:active:not(:disabled),
#unitLevels button:active:not(:disabled),
.btn-primary:active:not(:disabled),
.btn-go:active:not(:disabled),
.btn-ghost:active:not(:disabled),
.iconbtn:active:not(:disabled),
.chip:active:not(:disabled),
.pedchip:active:not(:disabled),
.row:active:not(:disabled),
.category-row:active:not(:disabled),
.trait-choice:active:not(:disabled),
.modebtn:active:not(:disabled),
.capture:active:not(:disabled),
.notesave:active:not(:disabled),
.rb:active:not(:disabled),
.ratetick:active:not(:disabled),
.disclosure-row:active:not(:disabled),
.notesect:active:not(:disabled),
.previous-toggle:active:not(:disabled),
.screen-answer:active:not(:disabled),
.screen-clear:active:not(:disabled),
.tally-button:active:not(:disabled),
.tally-typed:active:not(:disabled),
.tally-none:active:not(:disabled),
.tally-ground-save:active:not(:disabled),
.tally-event-remove:active:not(:disabled),
.tally-undo:active:not(:disabled),
.tally-done:active:not(:disabled),
.mplot:active:not(:disabled),
.orthomap-compass:active:not(:disabled),
.orthomap-controls button:active:not(:disabled),
.pedbox.drill:active:not(:disabled),
.gallery-row:active:not(:disabled),
.find-result:active:not(:disabled),
.syncstrip:active:not(:disabled),
.thumbs .thumb:active:not(:disabled),
.svact:active:not(:disabled),
.receiver-solution-chip:active:not(:disabled),
.menu-item:active:not(:disabled),
.multi-arrow:active:not(:disabled),
.multi-dot:active:not(:disabled),
.topbar-back:active:not(:disabled),
.topbar-menu:active:not(:disabled),
.noteact:active:not(:disabled),
.replant-scan:active:not(:disabled),
.replant-check:active:not(:disabled),
.navrow button:active:not(:disabled),
.score-confirm-actions button:active:not(:disabled),
.pedscreen .topbar button:active:not(:disabled),
.viewer-top button:active:not(:disabled),
.scanscreen .topbar button:active:not(:disabled),
.scanfoot button:active:not(:disabled),
.manualtag-panel button:active:not(:disabled),
.definition-panel button:active:not(:disabled),
.settings-menu-sheet .menu-item:active:not(:disabled),
.sign-out-overlay .menu-item:active:not(:disabled),
.manual-nav-button:active,
.bottom-bar button:active:not(:disabled) {
  background: var(--button-pressed-fill, var(--pressed-tint));
  color: var(--button-pressed-label, var(--text));
  transform: scale(var(--pressed-scale));
  transition: none;
}

/* Full screen and in-button loading treatments. */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  text-align: center;
}

.loading-screen .loading-topbar {
  flex: none;
  z-index: 1;
  text-align: left;
}

.loading-screen > .update-notice-slot {
  position: relative;
  z-index: 1;
  text-align: left;
}

.loading-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: max(env(safe-area-inset-top), 24px) 24px max(env(safe-area-inset-bottom), 24px);
}

/* A shown line reserves its own space; an absent or dismissed line keeps the original center. */
.loading-screen > .update-notice-slot:not(:empty) + .loading-body {
  position: relative;
  inset: auto;
  flex: 1 0 auto;
}

.loading-label {
  color: var(--muted);
  font-weight: 600;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spinner-turn 700ms linear infinite;
}

.btn-busy {
  position: relative;
  padding-right: 42px;
  opacity: 0.62;
  pointer-events: none;
}

.btn-busy::after {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: spinner-turn 700ms linear infinite;
}

@keyframes spinner-turn {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner,
  .btn-busy::after {
    animation: none;
    border-right-color: currentColor;
  }

  /* A person who has asked for less motion gets the sheet and its scrim at once, in both
     directions. menu.js reads the same preference and removes a closed overlay immediately rather
     than waiting for a transition that will never run. */
  .menu-overlay,
  .menu-sheet {
    transition: none;
  }
}

/* The field manual stays inside the standalone app with app-owned navigation. */
.manual-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg);
}

/* The welcome tour keeps horizontal movement in the browser's native scroller. Buttons only move
   to the next snap point; touch and trackpad gestures need no JavaScript translation. */
.tour-screen {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  padding-bottom: max(env(safe-area-inset-bottom), 12px);
  background: var(--bg);
}

.tour-track {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tour-track::-webkit-scrollbar {
  display: none;
}

.tour-slide {
  display: flex;
  flex: 0 0 100%;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  padding: max(env(safe-area-inset-top), 16px) 18px 8px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.tour-image {
  display: block;
  width: min(100%, 480px);
  height: min(51dvh, 520px);
  object-fit: contain;
  margin: 0 auto;
  border: var(--line-width) solid var(--line);
  border-radius: 18px;
  box-shadow: 0 3px 14px var(--shadow-soft);
}

.tour-copy {
  width: min(100%, 540px);
  margin: 18px auto 0;
  text-align: center;
}

.tour-title {
  color: var(--green);
}

.tour-body {
  margin-top: 10px;
  color: var(--text);
  line-height: var(--line-body);
}

.tour-actions {
  display: flex;
  gap: 12px;
  width: min(100%, 540px);
  margin: auto auto 0;
  padding-top: 18px;
}

.tour-actions button {
  flex: 1;
  margin: 0;
}

.tour-skip,
.tour-next {
  min-width: 0;
}

.tour-dots {
  display: flex;
  flex: none;
  justify-content: center;
  gap: 9px;
  min-height: 24px;
  padding: 8px 18px 0;
}

.tour-dot {
  width: 9px;
  height: 9px;
  background: var(--line);
  border-radius: 50%;
}

.tour-dot.current {
  background: var(--green);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--green);
}

@media (max-height: 640px) {
  .tour-image { height: 37dvh; }
  .tour-copy { margin-top: 12px; }
  .tour-actions { padding-top: 12px; }
}

.manual-toolbar {
  flex: 0 0 auto;
}

.manual-back {
  flex: none;
}

.manual-close {
  flex: none;
  width: auto;
  margin-left: auto;
  padding: 0 12px;
}

.manual-body {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  background: var(--bg);
}

.manual-home,
.manual-section-content {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.manual-version {
  margin: 0 0 var(--list-gap);
  color: var(--muted);
  font-size: var(--font-body);
}

/* THE VERSION ON THE SETTINGS TITLE LINE, after the word SETTINGS, in the muted regular type rather than
   the heading's bold capitals. It never breaks inside itself, so on a phone too narrow for the whole
   line it wraps under the title as one piece. */
.settings-version {
  color: var(--muted);
  font-weight: var(--font-weight-body);
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
}

/* ONE GAP BETWEEN EVERYTHING ON THE HELP HOME: the search field, the section rows, and the Browse
   sections heading a fruitless search puts above them. The heading keeps its side margin, which
   lines its text up with a row's text, and gives up its own vertical margin to the list gap. */
.manual-search {
  margin-bottom: var(--list-gap);
}

.manual-tour {
  margin-bottom: var(--list-gap);
}

.manual-results,
.manual-list {
  display: flex;
  flex-direction: column;
  gap: var(--list-gap);
}

.manual-search-empty {
  min-height: 180px;
  padding: 24px 12px;
}

.manual-list-heading {
  margin: 0 2px;
}

.manual-section-content {
  padding: 18px;
  overflow-wrap: anywhere;
  background: var(--panel);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
}

.manual-section-content h2,
.manual-section-content h3 {
  scroll-margin-top: 16px;
}

.manual-section-content h3 {
  margin-top: 24px;
}

.manual-section-content p,
.manual-section-content ol,
.manual-section-content ul,
.manual-section-content .figs,
.manual-section-content .fig,
.manual-section-content .fright {
  margin-top: 12px;
}

.manual-section-content img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

.manual-section-content .figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 16px;
}

.manual-section-content .cap {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--font-body);
  line-height: var(--line-body);
}

.manual-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: var(--line-width) solid var(--line);
}

.manual-nav-button {
  min-width: 0;
  margin-top: 0;
  text-align: center;
}

.manual-nav-button:only-child {
  grid-column: 1 / -1;
}

/* Wave two shared field context. These components did not exist in the TreeScribe shell before this port. */
.cardrow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cardrow > button {
  margin-top: 8px;
}

.fixwarn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--danger);
  border-color: var(--danger);
  text-align: left;
}

.warnbtn {
  color: var(--danger);
  border-color: var(--danger);
  font-weight: 800;
}

.warnx {
  flex: 0 0 auto;
  width: auto;
  margin: 0 0 0 auto;
}

.disclosure-section {
  margin-top: 12px;
}

.notesect {
  margin: 0;
  overflow: hidden;
  background: var(--panel);
  border: var(--line-width) solid var(--line);
  border-radius: 10px;
}

.notehead {
  justify-content: space-between;
  width: 100%;
  margin: 0;
  text-align: left;
}

.notesect[aria-expanded="true"] {
  border-radius: 10px 10px 0 0;
}

.notebody,
.priorbody {
  padding: 12px;
  overflow: hidden;
  background: var(--panel);
  border: var(--line-width) solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
}

.notelabel {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: var(--font-body);
}

.notelog {
  margin-top: 12px;
}

.secthead {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: var(--font-body);
  font-weight: 700;
}

.noteitem {
  padding: 10px 0;
  border-top: var(--line-width) solid var(--line);
}

.noteitem:first-child {
  border-top: 0;
}

.notetext {
  margin-top: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.noteacts {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.noteact {
  width: auto;
  min-width: 88px;
  margin: 0;
}

.prevsect {
  border-color: var(--warn);
}

.prevsect + .priorbody {
  border-color: var(--warn);
}

.prevplant {
  padding: 12px 0;
  border-top: var(--line-width) solid var(--line);
}

.prevplant:first-child {
  padding-top: 0;
  border-top: 0;
}

.prevhead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 10px;
}

.prevtag,
.prevmeta {
  color: var(--muted);
  font-size: var(--font-body);
}

.prevwhy {
  margin: 6px 0;
  color: var(--danger);
  font-weight: 700;
}

.pednote {
  display: block;
  color: var(--muted);
  font-size: var(--font-body);
}

.pedmeta {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--panel);
  border: var(--line-width) solid var(--line);
  border-radius: 10px;
  line-height: 1.5;
}

/* TEMPORARY: THE DIAGNOSTICS SHEET. This block belongs to public/app/ui/diagnostics.js, a screen
   built for the phone-testing phase that comes out before the technicians' cutover; deleting that module,
   the Settings entry that opens it, and this block is the whole removal. The report is a readonly
   textarea rather than a paragraph so that a phone with no clipboard permission can still hand the
   whole text over as a selection, and its lines are left unwrapped so a tap log reads as a column. */
.diagnostics-sections {
  display: grid;
  gap: var(--list-gap);
  min-width: 0;
}

.diagnostics-section {
  min-width: 0;
  padding: 8px 12px;
  background: var(--panel);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}

.diagnostics-section label {
  display: block;
  margin-bottom: 6px;
}

.diagnostics-section textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* The dot identifies a live recording even when color is hard to distinguish. */
.diagnostics-section .is-recording {
  background: var(--recording-fill);
  color: var(--danger);
  border-color: var(--danger);
}

.diagnostics-section .is-recording::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-right: 8px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.diagnostics-report {
  width: 100%;
  min-height: 220px;
  max-height: 45dvh;
  margin: 10px 0;
  padding: 10px;
  background: var(--panel-2);
  color: var(--text);
  border: var(--line-width) solid var(--line);
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--font-body);
  line-height: 1.4;
  white-space: pre;
  overflow: auto;
  resize: none;
}

/* The one action that removes a trial's records sits in its own group on that sheet, so the report
   above it and the removal below it cannot be mistaken for one control. It leaves with the rest of
   this block. */
.menu-section-trial-reset {
  margin-top: 4px;
}

/* The campaign seeder and its remover sit in a group of their own on the same sheet, for the same
   reason: two dangerous actions and a count chooser must not read as one control. The chooser is
   given the same height as a row so a thumb finds it where it expects a row. It leaves with the
   rest of this block. */
.menu-section-campaign-seed {
  margin-top: 4px;
}

.menu-section-campaign-seed select {
  margin: 4px 0;
}

.orthomap-note { margin: 0; }
.orthomap-counted { margin-top: 4px; }
.orthomap-counted-entries { overflow-wrap: anywhere; }
.orthomap-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.orthomap-legend span { display: inline-flex; align-items: center; gap: 4px; }
.orthomap-legend i { width: 10px; height: 10px; border: 1px solid rgba(0,0,0,0.72); border-radius: 50%; }
.tally-counted-entries { margin-bottom: 8px; }

/* Caster settings stay in one column so long mountpoint names fit a phone in the field. */
.receiver-correction-source {
  min-width: 0;
  padding: 12px;
  background: var(--panel);
  border: var(--line-width) solid var(--line);
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.ntrip-write-target { display: grid; gap: 6px; min-width: 0; }
.ntrip-write-target select { width: 100%; min-width: 0; box-sizing: border-box; }
.ntrip-settings { display: grid; gap: 8px; }
.ntrip-settings label { display: grid; gap: 4px; margin: 0; }
.ntrip-settings input:not([type="checkbox"]) { width: 100%; min-width: 0; box-sizing: border-box; }
.ntrip-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.ntrip-list-heading strong { flex: 1 1 auto; min-width: 0; }
/* RELOAD IS A SMALL CONTROL BESIDE THE HEADING. The ghost button's full width pushed the heading onto two
   lines and read as one more thing to press before the list. */
.ntrip-list-heading .ntrip-reload { flex: none; width: auto; min-height: 44px; margin: 0; padding: 4px 14px; font-size: 0.9em; }
/* THE MOUNTPOINTS ARE DRAWN AS A LIST: a gap below the heading, rows divided by rules, the name
   left-aligned with its frame in gray beneath it, and a shadow at an edge while more rows lie past it.
   As a stack of filled buttons touching the heading they did not read as a list until scrolled. The
   height shows three and a half rows, so a cut row says there is more. */
.ntrip-mountpoints { display: block; margin-top: 8px; min-height: 60px; max-height: 214px; overflow-y: auto;
  border: var(--line-width) solid var(--line); border-radius: 8px;
  background:
    linear-gradient(var(--panel) 30%, transparent) top / 100% 28px no-repeat local,
    linear-gradient(transparent, var(--panel) 70%) bottom / 100% 28px no-repeat local,
    radial-gradient(farthest-side at 50% 0, var(--shadow-soft), transparent) top / 100% 12px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, var(--shadow-soft), transparent) bottom / 100% 12px no-repeat scroll,
    var(--panel); }
.ntrip-mountpoints button { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  width: 100%; min-height: 60px; margin: 0; padding: 10px 14px; border: 0; border-bottom: var(--line-width) solid var(--line);
  border-radius: 0; background: transparent; }
.ntrip-mountpoints button:last-child { border-bottom: 0; }
.ntrip-mountpoints button[aria-pressed="true"] { background: var(--accent-fill); color: var(--accent-label); border-color: var(--accent-edge); }
.ntrip-mountpoints button span { font-size: 0.9em; color: var(--muted); }
.ntrip-mountpoints button[aria-pressed="true"] span { color: inherit; }
.ntrip-status { margin-top: 24px; }
.ntrip-checkbox { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.ntrip-mountpoints button { text-align: left; white-space: normal; overflow-wrap: anywhere; }
.ntrip-status { font-variant-numeric: tabular-nums; }

/* Pairing controls must leave the camera view fully visible. */
.lab-scanner[hidden] { display: none; }

/* A SIX CHARACTER CODE DESERVES SIX CHARACTERS' WORTH OF ROOM, and under 16px iOS zooms the page in
   when the field takes focus and will not zoom back out, which is what made this unusable rather than
   merely small. The code is read aloud off a screen across the room and typed once, so it is set
   large, spaced and centered, the way the desktop displays it. */
.lab-scanner input {
  width: 100%;
  box-sizing: border-box;
  text-transform: uppercase;
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  text-align: center;
  min-height: 64px;
  padding: 8px 10px;
}

.lab-scanner #labNotice { overflow-wrap: anywhere; }

/* Larger type and compact spacing keep receiver actions readable within a phone viewport. */
.receiver-screen,
.corrections-screen { --font-body: 1.125rem; font-size: var(--font-body); }
.receiver-screen > .receiver-controls button { flex: 1; min-height: 52px; margin: 0; }
.receiver-correction-source p { margin: 8px 0; }
.ntrip-settings input:not([type="checkbox"]) { min-height: 48px; font-size: var(--font-body); margin: 0; }
.ntrip-settings .ntrip-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
}
.ntrip-checkbox input[type="checkbox"] {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--green);
}
.receiver-correction-source .receiver-controls button { flex: 1 1 100px; min-height: 48px; margin: 0; }
#ntripStart[aria-pressed="true"] { background: var(--green); color: var(--bg); opacity: 1; }
#ntripStop[aria-pressed="true"] { background: var(--panel-2); border-color: var(--muted); color: var(--text); opacity: 1; }

/* THE LAB'S SIDE-BY-SIDE ROWS. Without this the row holding a heading and its button had no
   alignment at all, so "Change trial" stood taller than the trial name it sat beside and read as the
   more important of the two. The heading takes the space and the button takes only what it needs. */
.lab-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.lab-row > h2 {
  margin: 0;
  margin-right: auto;
}

.lab-row > button {
  width: auto;
  flex: 0 0 auto;
  margin-top: 0;
  padding: 6px 14px;
  min-height: var(--tap);
}

/* Confirming a phone is a real decision, so it is the accent control rather than another ghost
   button, but it is one short answer and does not need the full width btn-go gives a form's submit. */
.lab-confirm {
  width: auto;
  align-self: flex-start;
  padding: 8px 18px;
}

/* THE LAB PAGE HAD NO VERTICAL RHYTHM AT ALL. .lab-layout had no styling, so its sections butted
   against each other and a rule sat hard on the buttons below it with no gap, which reads as a
   rendering fault rather than a boundary. */
.lab-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.lab-layout > section {
  padding-top: 4px;
}

.lab-layout > section + section {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

/* THE ASSISTANT SCREEN. A page somebody stands in a field holding at arm's length, so the answer is
   the largest thing on it and the controls are thumb-sized. Everything takes its color from the
   existing tokens, so it follows the light, dark and field themes without a second palette.
   NOTHING HERE SHRINKS BELOW THE BODY SIZE. This app is read at arm's length in sunlight, so the
   stylesheet uses no type under 1rem anywhere and de-emphasis is done with color instead. Six
   small sizes were written here and the type guard refused all six. */
.assistant-screen {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.assistant-scope {
  color: var(--muted);
  font-size: var(--font-body);
  margin: 0;
}

.assistant-ask {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.assistant-talk {
  min-height: 72px;
  font-size: 1.15rem;
}

.assistant-talk.is-listening {
  background: var(--accent-edge);
  border-color: var(--accent-edge);
}

.assistant-hint {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-body);
  min-height: 1.3em;
}

.assistant-status {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-body);
}

.assistant-status.is-error {
  color: var(--warn);
}

.assistant-log {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Newest first, because the answer just spoken is the one being read. */
.assistant-exchange {
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.assistant-exchange.is-failed {
  border-color: var(--warn);
}

.assistant-asked {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-body);
}

/* The answer gets the emphasis on the screen, since it is what was asked for. */
.assistant-answer {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
}

.assistant-spoken {
  color: var(--muted);
  font-size: var(--font-body);
}

/* The question box takes the buttons' corners, and its example question reads as an example: italic, faded,
   and gone the moment the box is focused, since the same question is one tap away in the list below. */
#assistantText {
  border-radius: var(--radius);
}

#assistantText::placeholder {
  font-style: italic;
  opacity: 0.55;
}

#assistantText:focus::placeholder {
  opacity: 0;
}

.assistant-suggestions {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-1);
}

.assistant-suggestions-title {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.assistant-suggestion {
  font: inherit;
  text-align: left;
  color: var(--text);
  background: var(--panel-2);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-height: var(--tap);
  cursor: pointer;
}

.assistant-suggestion:active:not(:disabled) {
  background: var(--accent-fill);
  color: var(--accent-label);
  border-color: var(--accent-edge);
}

/* THE VOICE RECORDING SCREEN. One button and a list, because the only two things a person does here
   are start talking and check that what they said is still somewhere. */
.voice-screen {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.voice-scope {
  color: var(--muted);
  font-size: var(--font-body);
  margin: 0;
}

/* THE LIMITATION IS NOT SMALL PRINT. It is the same size as everything else and it sits above the
   button, because a person who pockets the phone and keeps talking has lost the walk, and a warning
   they did not read is a warning that was not given. */
.voice-limit {
  margin: 0;
  font-size: var(--font-body);
  border-left: 4px solid var(--warn);
  padding: var(--space-2);
  background: var(--panel-2);
}

.voice-control {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

/* Sized for a gloved thumb, the same as the assistant's. */
.voice-toggle {
  min-height: 72px;
  font-size: 1.15rem;
  user-select: none;
}

.voice-toggle.is-recording {
  background: var(--warn);
  border-color: var(--warn);
}

/* THE CLOCK IS THE ONLY PROOF THE MICROPHONE IS ALIVE, so it holds its line whether or not it is
   running; a figure that appears and collapses the layout reads as a glitch rather than a state. */
.voice-elapsed {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-body);
  font-variant-numeric: tabular-nums;
  min-height: 1.3em;
}

.voice-blocked,
.voice-status {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-body);
}

.voice-status.is-error {
  color: var(--warn);
}

.voice-listhead {
  margin: var(--space-2) 0 0;
  font-size: var(--font-body);
}

.voice-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.voice-empty {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-body);
}

.voicerow {
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* A recording that exists on this phone alone is bordered, not labeled quietly, because it is the
   one state where closing the app in the wrong place loses an hour of somebody's work. */
.voicerow.is-pending,
.voicerow.is-warn {
  border-color: var(--warn);
}

.voicerow.is-live {
  border-color: var(--accent-edge);
}

.voicerow-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-1);
  font-variant-numeric: tabular-nums;
}

.voicerow-state,
.voicerow-who {
  margin: 0;
  font-size: var(--font-body);
}

.voicerow-who {
  color: var(--muted);
}

/* ===================== THE TWO DESKTOP SHELLS, SHARING ONE LOOK =====================
 *
 * The lab and the dashboard are two windows onto one system, and they used to read as two products.
 * The lab showed the app mark and set TreeScribe in the heading weight with Lab in the regular
 * one; the dashboard showed no mark at all and bolded the other half. One brand block now serves
 * both, and in each the shell's own name is the lighter half, because the product is the constant
 * and the window onto it is the variable. */
.app-brand { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.app-brand img { border-radius: var(--radius); flex: none; }
.app-brand h1 {
  margin: 0; font-size: 1.15rem; line-height: 1.25;
  letter-spacing: -0.01em; font-weight: var(--font-weight-heading);
}
.app-brand h1 span { font-weight: 400; }
/* The subtitle takes its size from the shell that mounts it. This sheet holds the field app's own
   floor, which is that content type never drops below 1rem, and a desktop header is not the place
   to argue with a rule about reading a phone in direct sun. */
.app-brand p { margin: 2px 0 0; color: var(--muted); line-height: 1.3; }

/* A DROPDOWN THAT FINISHES A SENTENCE HAS TO SIT ON THAT SENTENCE'S OWN LINE.
 *
 * Measured in WebKit on 2026-10-04: the control completing "Group by" and the one completing
 * "Target" each sat four pixels above the words that introduce them. The row was centering the two
 * BOXES, which is not the same as lining up the two runs of text: the label was set at 0.8rem and
 * the control inherited the page's 1rem, so the boxes agreed while the glyphs did not. The control
 * therefore takes the row's own font rather than one of its own, both halves share a line height,
 * and the vertical padding is symmetric, which leaves the centering nothing to get wrong.
 *
 * The native control is replaced rather than restyled. A platform select cannot be given a radius,
 * a border or a hover state that matches the buttons beside it, and on a bench monitor a row of
 * controls that disagree about their own shape is the thing that reads as unfinished. */
.field-row { display: flex; align-items: center; gap: 0.6ch; flex-wrap: wrap; line-height: 1.45; font-size: max(16px, 1em); min-width: 0; }
.field-row > label, .field-row > .field-label { color: var(--muted); margin: 0; font-weight: inherit; font-size: inherit; }

select {
  font: inherit;
  font-size: max(16px, 1em);
  line-height: 1.45;
  color: var(--text);
  background-color: var(--panel);
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 12px 8px;
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius);
  padding: 7px 32px 7px 11px;
  min-height: 48px;
  margin: 0;
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
  vertical-align: middle;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}
select:hover:not(:disabled) { border-color: var(--accent-edge); background-color: var(--panel-2); }
select:focus-visible {
  outline: none;
  border-color: var(--accent-edge);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-edge) 26%, transparent);
}
select:disabled { opacity: 0.55; cursor: default; }
.field-row select { display: inline-block; width: auto; }
.receiver-screen select,
.corrections-screen select { min-height: 52px; }
/* A select that fills its own line rather than finishing a sentence, which is what the lab's
   resolution form and any narrow layout need. */
select.field-select.is-block { display: block; width: 100%; }

@media (prefers-reduced-motion: reduce) {
  select { transition: none; }
}

.trait-reminder { min-height: 44px; }
.score-keyboard { min-width: 44px; min-height: 44px; flex: 0 0 auto; }

/* A WRITTEN ANSWER NEEDS THE WIDTH. Beside the letters switch, Record and Not scorable, the answer
   box shrank to about 60 px on a 390 px phone, so it takes its own line and the buttons sit under
   it. The line is the same in either keyboard, so switching moves nothing. */
.scorenum.scorenum-switch { flex-wrap: wrap; }
.scorenum.scorenum-switch .scoreinput { flex: 1 1 100%; }
.scorenum.scorenum-switch > button:not(.score-keyboard) { flex: 1 1 auto; }

/* The walk controls share the shell's bottom edge with the tabs, outside its scroll area. */
.walk-dock {
  flex: none;
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: var(--panel);
}
.walk-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  margin: 0;
  border-top: var(--line-width) solid var(--line);
}
.walk-nav button { min-height: 48px; min-width: 0; margin: 0; }
.score-keyboard-hold {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  font-size: 16px;
}
.score-confirm.keyboard-open { align-items: flex-start; }
.score-confirm.keyboard-open .score-confirm-sheet { padding: 12px; }

/* Spoken observations use the same list rhythm as the other field screens. */
.proposals-screen { display: flex; flex-direction: column; gap: var(--list-gap); }
.proposal-list, .proposal-group, .proposal-editor { display: flex; flex-direction: column; gap: var(--list-gap); }
.proposal-card { padding: var(--space-2); border: 1px solid var(--line); border-radius: var(--radius); }
.proposal-card p, .proposal-card blockquote { margin: 0 0 var(--list-gap); }
.proposal-card blockquote { padding-left: var(--space-3); border-left: 2px solid var(--line); }
.proposal-actions { display: flex; flex-wrap: wrap; gap: var(--list-gap); }
.proposal-editor { margin-top: var(--list-gap); }

.assistant-screen .assistant-talk { touch-action: manipulation; }

/* The listening fill uses the same audited palette in every field theme. */
.assistant-screen .assistant-talk.is-listening {
  background: var(--text);
  color: var(--panel);
  outline: 3px solid var(--text);
  outline-offset: 3px;
}
.assistant-screen .assistant-talk:active:not(:disabled) {
  background: var(--pressed-tint);
  color: var(--text);
  transform: scale(var(--pressed-scale));
  transition: none;
}
.assistant-screen #assistantForm { display: grid; gap: 12px; }
.assistant-screen #assistantText { width: 100%; box-sizing: border-box; }
.assistant-screen .assistant-menu { padding: 12px; }

.receiver-mark-result .danger {
  color: var(--danger);
}

/* The tab bar already owns the bottom safe area. Give Survey the full content box,
   without the scroll screen's extra padding, and let the image take what the strip leaves. */
.survey-map {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.survey-map .orthomap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.survey-map .orthomap-stage { flex: 1; height: auto; min-height: 0; }
.survey-map .mapview { flex: 1; min-height: 0; overflow: auto; }
.survey-strip {
  flex: none;
  padding: 10px;
  background: var(--panel);
  color: var(--text);
  border-top: var(--line-width) solid var(--line);
  /* The panel shows every control; it scrolls only on a screen too short to keep 180 points of map above it. */
  max-height: calc(100% - 180px);
  overflow: auto;
}
.survey-strip-title { display: block; overflow-wrap: anywhere; margin-bottom: 8px; }
.survey-strip-name { display: block; }
.survey-strip-position { display: block; font-size: 0.875em; font-weight: 400; }
.survey-strip-position:empty { display: none; }
.survey-strip-actions { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: stretch; }
.survey-strip-actions-with-dead { grid-template-columns: auto 1fr auto auto; }
.survey-strip-actions button { min-height: 44px; padding: 8px; }
.survey-strip-actions .survey-strip-record { min-height: 56px; font-size: 1.1em; }
.survey-strip-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.survey-strip-confirm span { flex: 1 1 100%; }
.survey-strip-confirm button { min-height: 44px; padding: 8px 14px; }
.orthomap-dead { border: var(--line-width) solid var(--danger); border-radius: 9px; background: var(--danger); color: var(--on-danger); font-weight: 700; min-height: 44px; padding: 0 12px; touch-action: manipulation; }
.orthomap-dead:active { background: var(--danger-pressed); border-color: var(--danger-pressed); color: var(--on-danger); transform: scale(var(--pressed-scale)); }
.orthomap-controls .orthomap-dead { margin-left: auto; background: var(--danger); color: var(--on-danger); border-color: var(--danger); }
.orthomap-controls .orthomap-dead:active { background: var(--danger-pressed); border-color: var(--danger-pressed); }
.survey-strip .surveybox { margin: 0; padding: 0; border: 0; }
.survey-strip .svresult { margin-top: 8px; }
/* The panel's result lines sit tight, so a saved point reads as one short block above the row controls. */
.survey-strip .svresult .survey-distances,
.survey-strip .svresult .survey-tilt-result { margin: 0 0 4px; }
/* In the map panel a question's choices share one row under it, so the panel keeps the map in view. */
.survey-strip .svresult-question { display: flex; flex-wrap: wrap; gap: 8px; }
.survey-strip .svresult-question > b { flex: 1 1 100%; }
.survey-strip .svresult-question > button { flex: 1 1 0; min-width: 0; }
.row-survey-counts,
.row-crop-check,
.survey-live-distance { margin: 6px 0; }
/* Reserve the warning space while the receiver reports a tilt state, so a tilt change leaves the survey buttons in
   place; with no tilt report the space is not held. Both messages share the height of the full warning, even when the
   shorter one is shown. */
.survey-tilt-space { display: grid; }
.survey-tilt-space[hidden] { display: none; }
.survey-tilt-reserve,
.survey-tilt-warning { grid-area: 1 / 1; font-size: 1rem; line-height: 1.35; margin: 8px 0; }
.survey-tilt-reserve { visibility: hidden; }
.survey-tilt-warning[aria-hidden="true"] { visibility: hidden; }

.orthomap-distance { margin: 6px 0; }

.survey-strip-result-label { margin-top: 6px; font-weight: var(--font-weight-heading); }
.survey-strip-result-label:empty { display: none; }

.help-panel { position: fixed; z-index: 3000; top: calc(5rem + env(safe-area-inset-top)); right: max(1rem, env(safe-area-inset-right)); box-sizing: border-box; width: min(32rem, calc(100% - 2rem - env(safe-area-inset-left) - env(safe-area-inset-right))); max-height: calc(100dvh - 6rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow: auto; padding: 1.25rem; background: var(--panel); color: var(--text); border: var(--line-width) solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 32px var(--shadow); }
.help-panel h2 { margin-top: 0; }
.help-questions:not(:empty) { margin-bottom: 1rem; }
.file-questions { padding-top: 1rem; border-top: var(--line-width) solid var(--line); }
.file-dataset { color: var(--muted); }
.help-status:empty { display: none; }
.help-agree, .help-decline, .help-withdraw { min-height: 44px; margin-block: .5rem; }
.help-form { display: grid; gap: .6rem; margin: 1rem 0; }
.help-form input { box-sizing: border-box; width: 100%; min-height: 44px; padding: .6rem; font: inherit; }
.help-form button, .help-close { min-height: 44px; }
.help-answer { white-space: pre-wrap; overflow-wrap: anywhere; }
.help-consent p { line-height: 1.5; }

/* Phone workflows keep nut taps visible and weight keys large enough for one-handed entry. */
.workflow-card { display:flex; flex-direction:column; gap:var(--space-1); padding:var(--screen-gap) 14px calc(env(safe-area-inset-bottom) + 12px); }

.workflow-connection:not([open]) { display:block; }
.workflow-connection { padding:10px; border:var(--line-width) solid var(--line); border-radius:var(--radius); }
.workflow-missing { padding:10px; border:var(--line-width) solid var(--line); border-radius:var(--radius); }
.workflow-missing summary { font-weight:600; }
.workflow-body h2, .workflow-body h3, .workflow-card label, .workflow-card p, .workflow-card button { margin:0; }
.workflow-card label { display:flex; flex-direction:column; gap:var(--space-1); }
.workflow-card input { box-sizing:border-box; min-width:0; }
.workflow-card input[data-value="nuts"] { font-size:var(--font-body); text-align:left; min-height:var(--tap); }
.workflow-body > div:empty, .workflow-devices:empty { display:none; }
.workflow-message:empty { display:none; }
.workflow-message { color:var(--danger); }
.workflow-counts { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-1); }
.workflow-tap { min-height:96px; padding:12px; font-family:inherit; font-size:24px; font-weight:600; line-height:1.2; border:var(--line-width) solid var(--line); border-radius:var(--radius); touch-action:manipulation; }
.workflow-tap[data-count="smashed"] { grid-column:1 / -1; min-height:56px; background:color-mix(in srgb, var(--smashed-fill) var(--defect-fill-mix), transparent); color:var(--smashed-label); --button-pressed-fill:var(--smashed-pressed); --button-pressed-label:var(--smashed-label); }
.workflow-tap[data-count="blank"] { background:color-mix(in srgb, var(--defect-blank-fill) var(--defect-fill-mix), transparent); color:var(--defect-blank-label); --button-pressed-fill:var(--defect-blank-pressed); --button-pressed-label:var(--defect-blank-pressed-label); }
.workflow-tap[data-count="black"] { background:color-mix(in srgb, var(--defect-black-fill) var(--defect-fill-mix), transparent); color:var(--defect-black-label); --button-pressed-fill:var(--defect-black-pressed); --button-pressed-label:var(--defect-black-pressed-label); }
.workflow-tap[data-count="moldy"] { background:color-mix(in srgb, var(--defect-moldy-fill) var(--defect-fill-mix), transparent); color:var(--defect-moldy-label); --button-pressed-fill:var(--defect-moldy-pressed); --button-pressed-label:var(--defect-moldy-pressed-label); }
.workflow-tap[data-count="shriveled"] { background:color-mix(in srgb, var(--defect-shriveled-fill) var(--defect-fill-mix), transparent); color:var(--defect-shriveled-label); --button-pressed-fill:var(--defect-shriveled-pressed); --button-pressed-label:var(--defect-shriveled-pressed-label); }
.workflow-total { display:block; text-align:center; font-size:18px; font-weight:700; }
/* The title keeps its disclosure target; its status is a small, passive badge. */
.workflow-connection summary .badge {
  float:right; color:var(--success); font-weight:700; font-size:14px; line-height:18px;
  background:var(--panel); border-color:color-mix(in srgb, var(--success) 45%, transparent);
  cursor:default; white-space:nowrap;
}
.workflow-connection summary .badge::before {
  content:""; display:inline-block; width:10px; height:10px; border-radius:50%;
  background:var(--success); margin-right:8px; vertical-align:1px;
}
html[data-theme="field"] .workflow-connection summary .success::before {
  content:"✓"; width:auto; height:auto; border-radius:0; background:none; margin-right:6px; vertical-align:0;
}
.workflow-value { width:100%; min-height:var(--tap); box-sizing:border-box; font-size:var(--font-body); text-align:right; }
.workflow-value.workflow-keypad-target { outline:3px solid var(--green-bright); outline-offset:2px; }
.workflow-keypad { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.workflow-keypad button { min-height:var(--tap); font-size:24px; border:var(--line-width) solid var(--line); border-radius:var(--radius); touch-action:manipulation; }
.workflow-devices { display:flex; flex-direction:column; gap:var(--space-1); }
.workflow-card button { white-space:normal; }
.workflow-sample { overflow-wrap:anywhere; }

/* Raw balance evidence stays inside the collapsed bench controls. */
.workflow-raw pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 16rem; overflow: auto; }
.workflow-actions { margin:0; }

.workflow-plant { display:flex; flex-direction:column; font-size:var(--font-body); line-height:var(--line-body); overflow-wrap:anywhere; }
.workflow-steps { display:flex; gap:4px; }
.workflow-steps button { flex:1; min-width:0; padding:8px 4px; font-size:12px; font-weight:400; min-height:var(--tap); flex-direction:column; }
.workflow-steps [aria-current="step"] { background:var(--accent-fill); color:var(--accent-label); }
.workflow-step-name, .workflow-step-value { display:block; }
.workflow-steps [data-done="false"] .workflow-step-value { color:var(--muted); }
.workflow-bag-form { display:flex; flex-direction:column; gap:var(--space-1); }
.workflow-bag-form .checkbox { flex-direction:row; min-height:var(--tap); color:var(--text); }
.workflow-bag-form .checkbox input { flex:none; width:22px; height:22px; }
.workflow-bag-form input[type="date"] { text-align:left; }
.workflow-heading { margin-bottom:0; }
.workflow-scan { min-height:80px; font-size:26px; }
.workflow-preset { width:100%; text-align:left; margin:0; }
.workflow-preset small { display:block; }

/* The last sample stays in one readable status line as its day sheet reaches Drive. */
.workflow-previous { overflow-wrap:anywhere; }
.workflow-saved { text-align:center; color:var(--accent-text); overflow-wrap:anywhere; }
.workflow-saved[data-state="sent"] { color:var(--success); }
.workflow-saved[data-state="offline"] { color:var(--warn); }
.workflow-saved[data-state="failed"] { color:var(--danger); }

/* control spacing: start
   The standard space between control rows is --space-1. A stack owns that space,
   including the contents of an open disclosure. Rows that wrap use the same rule.
   Larger existing section gaps stay with their containers. */
:is(.control-stack, .card, .error-actions, .score-card, .score-controls, .notebody,
    .tally-ground, .manualtag-panel, .help-consent, .workflow-body, .workflow-entry, .workflow-actions, .workflow-confirmation,
    details[open], .menu-section:not(details), .ntrip-mountpoints, .dash-list,
    .lab-menu [role="group"], .dash form:not(.login-form)) {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
:is(.control-stack, .card, .error-actions, .score-card, .score-controls, .notebody,
    .tally-ground, .manualtag-panel, .help-consent, .workflow-body, .workflow-entry, .workflow-actions, .workflow-confirmation,
    details[open], .menu-section, .ntrip-mountpoints, .dash-list, .lab-menu [role="group"],
    .dash form:not(.login-form), .counter, .multi-dots, .ratebtns, .orthomap-controls,
    .prevhead, .ntrip-write-target, .assistant-exchange, .voicerow, .field-row) {
  row-gap: var(--space-1);
}
:is(.control-stack, .card, .error-actions, .score-card, .score-controls, .notebody,
    .tally-ground, .manualtag-panel, .help-consent, .workflow-body, .workflow-entry, .workflow-actions, .workflow-confirmation,
    details[open], .menu-section, .ntrip-mountpoints, .dash-list, .lab-menu [role="group"], .dash form:not(.login-form)) > * {
  margin-block: 0;
  flex-shrink: 0;
}
.login-form > * { margin-block: 0; }
/* Keep this selector separate so an older browser keeps the ordinary stack rule. */
details[open]::details-content {
  display: flex;
  flex-direction: column;
  row-gap: inherit;
  min-width: 0;
}
/* control spacing: end */

/* Add one space only when Record is the next visible row after a value. */
.workflow-entry > .workflow-value + .btn-primary,
.workflow-entry > .workflow-unit + .btn-primary,
.workflow-entry > .workflow-value + .workflow-keypad[hidden] + .btn-primary,
.workflow-entry > .workflow-unit + .workflow-keypad[hidden] + .btn-primary {
  margin-top: var(--space-1);
}

.workflow-undo { background:color-mix(in srgb, var(--text) 7%, var(--panel)); width:100%; }
.workflow-next { border-color:color-mix(in srgb, var(--green) 35%, var(--panel)); background:color-mix(in srgb, var(--green) 16%, var(--panel)); color:var(--green); font-weight:700; width:100%; }
.workflow-unit { display:flex; align-items:center; gap:8px; }
.workflow-unit input { flex:1; min-width:0; }

.workflow-switch { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.workflow-switch::after { content:""; width:48px; height:28px; border:2px solid var(--muted); border-radius:999px; background:radial-gradient(circle at 12px 50%, var(--panel) 9px, transparent 10px), var(--muted); flex:none; }
.workflow-switch[aria-checked="true"]::after { border-color:var(--switch-on-edge); background:radial-gradient(circle at 36px 50%, var(--switch-on-label) 9px, transparent 10px), var(--switch-on-fill); }
.workflow-sum { text-align:right; font-weight:700; }

.workflow-notes textarea { width:100%; min-height:96px; box-sizing:border-box; font:inherit; }

.workflow-plant { display:flex; flex-direction:row; align-items:flex-start; justify-content:space-between; gap:12px; }
.workflow-plant .traitinfo { flex:none; margin:0; }
.workflow-plant h2 { margin:0; }
.workflow-plant span { display:block; color:var(--muted); }

/* Post-harvest tote entry and this phone's pile counts. */
.post-harvest { padding: 14px; }
.ph-tote { display: block; font-size: 1.5rem; font-weight: 700; }
.ph-tote input { font: inherit; text-align: center; min-height: 52px; }
.post-harvest button { min-height: 48px; margin: 6px 0; }
.post-harvest form { display: grid; gap: 8px; margin: 14px 0; }
.post-harvest input { min-width: 0; }
.post-harvest table { width: 100%; border-collapse: collapse; }
.post-harvest th, .post-harvest td { padding: 8px 4px; text-align: left; }
#phStatus { min-height: 1.5em; }

/* Fixed pile colors use white text in every theme. Numbers and names also identify each bin. */
.ph-result { display: grid; gap: 10px; padding: 22px; border-radius: var(--radius); color: var(--ph-label); margin: 12px 0; }
.ph-result strong { font-size: 3rem; line-height: 1.1; }
.ph-result b { font-size: 1.45rem; }
.ph-bin-1 { background: var(--ph-bin-1); }
.ph-bin-2 { background: var(--ph-bin-2); }
.ph-bin-3 { background: var(--ph-bin-3); }
.ph-bin-4 { background: var(--ph-bin-4); }
.ph-bin-5 { background: var(--ph-bin-5); }
.ph-bulk { background: var(--ph-bulk); }
.ph-aside { color: var(--text); background: var(--panel); border: 3px dashed currentColor; }
.ph-badge { justify-self: start; border: 2px solid currentColor; border-radius: 999px; padding: 7px 14px; font-size: 1.25rem; font-weight: 700; }
.ph-under-40 { background: var(--danger); color: var(--on-danger); }
.ph-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ph-choices button { min-height: 80px; font-size: 1.75rem; }
.ph-stick-ons { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ph-stick-ons input { width: 6ch; min-height: 48px; text-align: center; font-size: 1.5rem; }
.ph-stick-ons [role="status"] { flex-basis: 100%; }
.ph-plant { overflow-wrap: anywhere; }
.ph-matches { font-size: 1.5rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.post-harvest button:active:not(:disabled) { background: var(--pressed-tint); color: var(--text); transform: scale(var(--pressed-scale)); box-shadow: inset 0 0 0 3px currentColor; }
.scanscreen[hidden] { display: none; }
.scanscreen .scan-heading { font-size: 1.5rem; font-weight: 700; }

/* The day table scrolls across without widening the sorting screen. */
.ph-day-scroll { max-width: 100%; overflow-x: auto; }
.ph-day-table { font-size: .875rem; white-space: nowrap; }
.ph-day-table th, .ph-day-table td { padding: 6px 8px; text-align: left; }

/* Row survey keeps the field lines and numbered choices available without imagery. */
