*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html,body{background:var(--c-page);color:var(--c-text);-webkit-text-size-adjust:100%}
/* Two quick taps (Next batter, Next batter) zoomed Safari in, cutting off the screen (Mallory 2026-11-21).
   manipulation turns off double-tap zoom only: pinch zoom and scrolling still work. */
html{touch-action:manipulation}
body{font-family:var(--font-body);font-variant-numeric:tabular-nums;max-width:520px;margin:0 auto;min-height:100vh;padding-bottom:60px}
button,input,select{font-family:inherit;-webkit-tap-highlight-color:transparent;cursor:pointer}
/* ================= DESIGN SYSTEM (110) =================
   From Scott's prototype, round five (2026-11-18). Every color, font, text
   size, weight, corner and shadow in the app is set HERE, once. Change a value here and it changes
   everywhere. Full guide: docs/design-system.md.
   - PALETTE (--p-...): the only raw colors in the app.
   - ROLES (--c-...): what each thing is (infield, bench, primary button...). To recolor one kind of
     thing, change its role here. Soft and line versions are mixed from the main color, so changing
     --c-infield also changes the IF count pills.
   - Styles and the script use roles and the scales below only, never a raw value or a palette name:
     tests/test_design_tokens.js fails if one creeps in.
   - A team's own color (picked on New Team, saved with the team) is data, not styling: --team. */
:root{
  /* ---- PALETTE ---- */
  --p-white:#ffffff;
  --p-cream:#F4F1EA;                      /* page */
  --p-cream-2:#F8F5EE;                    /* bench rows, pressed rows */
  --p-sand-100:#EFEAE0;                   /* lines between rows */
  --p-sand-200:#ECE8DD;                   /* quiet fills: chips, section headers, number squares */
  --p-sand-300:#DDD6C4;                   /* input and card outlines */
  --p-gray-200:#D6D6DA;                   /* a neutral light gray, the only cool neutral; as far from the glass sheet as sand-300 (1.34 / 1.26, Mallory 2026-11-28) */
  --p-sand-500:#A89E89;                   /* strong outlines: checkboxes, number squares */
  --p-sand-700:#6B6253;                   /* hints; the bench badge */
  --p-brown-ink:#554C3F;                  /* secondary text */
  --p-ink-900:#16130E;                    /* main text */
  --p-navy:#13233F;                       /* primary buttons, selected things */
  --p-infield-blue:#0B3A8C;
  --p-outfield-rust:#98400D;
  --p-yellow:#FFC81F;                     /* brand: the current inning */
  --p-blue:#1B5FC9;--p-blue-soft:#E8F0FE;--p-blue-line:#B9CFF5;
  --p-green:#0B6B2E;--p-green-soft:#E4F1E3;--p-green-line:#9CCB9F;
  --p-amber:#B45309;--p-amber-soft:#FEF3C7;--p-amber-line:#E0A63A;
  --p-orange:#F5A524;--p-orange-ink:#2B1A00; /* injured, Needs IF */
  --p-red:#B00020;
  --p-grass-0:#B9D19C;--p-grass-1:#C4DCA6;--p-grass-2:#D6E8BC;--p-grass-in:#C9E0AC;--p-fence:#7FA463;
  --p-dirt-1:#EAD6AC;--p-dirt-2:#DEC593;--p-mound:#E3CB9B;--p-track:#E7D8B4; /* the Field view (Scott) */
  --p-out-red:#D32F2F;--p-sand-600:#8B826F; /* the outs diamonds (Scott) */
  --p-shade:rgba(22,19,14,.55);--p-shade-dark:rgba(22,19,14,.65);--p-shade-0:rgba(22,19,14,0);
  --p-shade-6:rgba(22,19,14,.06);--p-shade-7:rgba(22,19,14,.07);
  --p-white-90:rgba(255,255,255,.9);--p-white-35:rgba(255,255,255,.35);--p-white-20:rgba(255,255,255,.2);--p-black-15:rgba(0,0,0,.15);--p-white-0:rgba(255,255,255,0);
  /* Safari colors the status bar from these: each is the shade above laid over the cream header */
  --p-statusbar-dim:rgb(122,119,113);--p-statusbar-dim-dark:rgb(100,97,91); /* 110: over the cream header (every header is cream now) */
  --p-cream-0:rgba(244,241,234,0);
  --p-navy-shade-12:rgba(20,30,50,.12);--p-navy-shade-16:rgba(20,30,50,.16);--p-navy-shade-22:rgba(20,30,50,.22); /* floating buttons (Scott) */
  --p-logo-cream:#FBF4E4;--p-logo-blue:#0A3A8C;--p-logo-rust:#9A4010; /* the app's logo (Scott) */

  /* ---- ROLES: surfaces, lines, text ---- */
  --c-page:var(--p-cream);                /* behind everything, and every header */
  --c-page-clear:var(--p-cream-0);
  --c-surface:var(--p-white);             /* headers, cards, rows, sheets */
  --c-surface-2:var(--p-cream-2);         /* pressed rows, quiet buttons */
  --c-surface-3:var(--p-sand-200);        /* section headers, chips, number squares */
  --c-surface-4:var(--p-sand-300);        /* quiet fills that must stand out: Menu icons, Copy previous (Mallory 2026-11-20) */
  --c-section-band:var(--p-gray-200);     /* the note sheet's Errors / Mistakes section headers: gray, so they don't read as the sand buttons (Mallory 2026-11-28) */
  --c-surface-clear:var(--p-white-0);
  --c-line:var(--p-sand-100);             /* lines between rows */
  --c-line-glass:var(--p-shade-7);       /* lines between rows on a glass sheet: a faint dark hairline; the sand line is lighter than the glass and showed as a white line (Mallory 2026-11-22) */
  --c-line-strong:var(--p-sand-300);      /* input, card and button outlines */
  --c-jersey-line:var(--p-sand-500);      /* number squares, checkboxes */
  --c-text:var(--p-ink-900);              /* names, titles */
  --c-text-2:var(--p-brown-ink);          /* secondary text */
  --c-text-3:var(--p-sand-700);           /* hints, subtitles */
  --c-placeholder-lg:var(--p-sand-600);   /* a large bold field's placeholder (3.8:1 on white: large text only; 2026-11-24) */
  --c-text-disabled:var(--p-sand-500);    /* text on a disabled button (Mallory 2026-11-21) */
  --c-disabled-bg:var(--p-sand-300);      /* fill of a disabled button: solid, never faded (Mallory 2026-11-21) */
  --c-on-color:var(--p-white);            /* text on a colored fill (buttons, badges) */
  --c-on-color-soft:var(--p-white-90);
  --c-on-color-faint:var(--p-white-35);   /* the ring around a team patch */
  --c-on-color-wash:var(--p-white-20);    /* a quiet button on a colored fill */

  /* ---- ROLES: actions and states ---- */
  --c-primary:var(--p-navy);              /* main buttons, links, selected things */
  --c-primary-soft:color-mix(in srgb,var(--c-primary) 9%,var(--p-white));
  --c-row-picked:color-mix(in srgb,var(--c-primary) 20%,var(--p-white));
  --c-row-alt:color-mix(in srgb,var(--p-cream-2) 60%,var(--p-white)); /* Season Stats' alternating rows: lighter than an open row (surface-2), Mallory 2026-11-24 */ /* a picked row in a sheet list: whole row, shows on glass (Mallory 2026-11-21) */
  --c-primary-line:color-mix(in srgb,var(--c-primary) 35%,var(--p-white));
  --c-ink:var(--p-navy);                  /* segmented controls, chips that are on, outs dots */
  --c-brand:var(--p-yellow);--c-on-brand:var(--p-ink-900); /* the current inning, highlights */
  --c-ok:var(--p-green);--c-ok-soft:var(--p-green-soft);--c-ok-line:var(--p-green-line);
  --c-warn:var(--p-amber);--c-warn-soft:var(--p-amber-soft);--c-warn-line:var(--p-amber-line);
  --c-danger:var(--p-red);
  --c-danger-soft:color-mix(in srgb,var(--c-danger) 8%,var(--p-white));
  --c-danger-line:color-mix(in srgb,var(--c-danger) 40%,var(--p-white));
  --c-toast:var(--c-ink);                 /* a toast with no color of its own */

  /* ---- ROLES: baseball ---- */
  --c-infield:var(--p-infield-blue);      /* infield position badge (P, C, 1B, 2B, 3B, SS) */
  --c-infield-text:var(--c-infield);      /* IF count pill */
  --c-infield-soft:color-mix(in srgb,var(--c-infield) 13%,var(--p-white));
  --c-infield-line:color-mix(in srgb,var(--c-infield) 55%,var(--p-white));
  --c-outfield:var(--p-outfield-rust);    /* outfield position badge */
  --c-outfield-text:var(--c-outfield);    /* OF count pill */
  --c-outfield-soft:color-mix(in srgb,var(--c-outfield) 13%,var(--p-white));
  --c-outfield-line:color-mix(in srgb,var(--c-outfield) 55%,var(--p-white));
  --c-bench:var(--p-sand-700);            /* bench badge */
  --c-bench-text:var(--c-text);           /* BENCH count pill */
  --c-bench-soft:var(--p-sand-200);
  --c-bench-line:var(--p-sand-500);
  --c-bench-row:var(--p-cream-2);         /* Bench rows on the game screen and in sheets */
  --c-streak:var(--p-amber);--c-streak-soft:var(--p-amber-soft);--c-streak-line:var(--p-amber-line); /* "sat 2 in a row" */
  --c-coach-pick:var(--p-blue);           /* Coach Pick row stripe */
  --c-coach-pick-soft:var(--p-blue-soft); /* Coach Pick row */
  --c-coach-tag:var(--c-ok);--c-coach-tag-soft:var(--c-ok-soft);--c-coach-tag-line:var(--c-ok-line); /* the Coach Pick pill */
  --c-needs-if:var(--p-orange);--c-on-needs-if:var(--p-orange-ink); /* Needs IF tag */
  --c-needs-if-soft:var(--p-amber-soft);  /* Needs IF row */
  --c-injured:var(--p-orange);--c-on-injured:var(--p-orange-ink); /* INJ badge and tag */
  --c-removed:var(--p-red);               /* OUT badge and tag */
  --c-out-soft:var(--p-amber-soft);--c-out-line:var(--p-amber-line); /* Out of Lineup rows */
  /* Notes pills, one color everywhere (Mallory 2026-11-24): game rows' "2 notes", the summary's inning stamps, Season Stats' "24 Notes" */
  --c-notes-pill-fill:var(--p-blue-soft);--c-notes-pill-text:var(--p-blue);--c-notes-pill-line:var(--p-blue-line);
  /* Note thumbs, one look everywhere (Mallory 2026-11-24): 👍 doing well, a navy circle; 👎 needs help, a red dashed circle.
     Drawn by thumbCircle() (.xi) and the note sheet's picked buttons (.th2.on); nothing else colors a note's thumb. */
  --c-thumb-up:var(--c-ink);--c-on-thumb-up:var(--c-on-color);
  --c-thumb-down:var(--c-danger);--c-thumb-down-soft:var(--c-danger-soft);--thumb-down-border:2px dashed var(--c-thumb-down);
  --c-win:var(--c-ok);--c-loss:var(--c-danger);
  --c-field-grass-0:var(--p-grass-0);--c-field-grass-1:var(--p-grass-1);--c-field-grass-2:var(--p-grass-2);--c-field-infield:var(--p-grass-in);
  --c-field-fence:var(--p-fence);--c-field-dirt-1:var(--p-dirt-1);--c-field-dirt-2:var(--p-dirt-2);--c-field-mound:var(--p-mound);--c-field-track:var(--p-track);
  --c-out:var(--p-out-red);--c-outs-line:var(--p-sand-600); /* the outs diamonds */
  --c-inning-line:var(--p-sand-600); /* outline of the inning / outs pill AND the current inning in the innings bar: always the same color (Mallory 2026-11-21) */
  --c-out-ring:var(--p-amber-line); /* gold ring on a recorded out in the inning pill (Mallory 2026-11-21) */

  /* ---- ROLES: overlays and shadows ---- */
  --c-logo-fill:var(--p-logo-cream);--c-logo-ink:var(--p-logo-blue);--c-logo-accent:var(--p-logo-rust); /* the Home logo */
  --c-backdrop:var(--p-shade);            /* the dim behind a sheet */
  --c-backdrop-dark:var(--p-shade-dark);  /* the dim behind help cards */
  --c-backdrop-clear:var(--p-shade-0);
  --c-press:var(--p-shade-6);
  --c-statusbar-dim:var(--p-statusbar-dim);--c-statusbar-dim-dark:var(--p-statusbar-dim-dark);
  --shadow-card:0 1px 2px var(--p-shade-6),0 6px 16px var(--p-shade-7);
  --shadow-seg:0 1px 3px var(--p-black-15); /* the chosen option of a segmented control */
  --shadow-header:0 1px 2px var(--p-shade-6);
  --shadow-float:0 2px 8px var(--p-navy-shade-16),0 0 0 1px var(--c-line-strong);      /* the bottom bar's Tools card (Scott) */
  --shadow-float-up:0 4px 14px var(--p-navy-shade-22),0 0 0 1px var(--c-line-strong);  /* …while the main button is away */
  --shadow-float-glass:0 2px 10px var(--p-navy-shade-12),0 0 0 1px color-mix(in srgb,var(--c-line-strong) 70%,transparent); /* setup bars' Home */

  /* ---- TYPE ---- */
  --font-body:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; /* Inter from Google Fonts; the phone's own font when offline */
  --fs-xs:12px;                           /* table headers, small captions */
  --fs-sm:14px;                           /* section labels, tags, subtitles */
  --fs-md:15px;                           /* secondary text, hints */
  --fs-base:16px;                         /* body text, chips */
  --fs-lg:17px;                           /* buttons */
  --fs-xl:18px;                           /* player names in rows */
  --fs-2xl:20px;                          /* screen titles */
  --fs-3xl:22px;                          /* sheet titles */
  --fs-4xl:26px;                          /* big headings, stat numbers */
  --fs-display:30px;                      /* the outs buttons, big marks */
  --fs-caption:13px;                      /* card section labels, small counts */
  --fs-title:19px;                        /* screen titles in the top bar */
  --fs-dialog:21px;                       /* centered dialog titles */
  --fs-input:18px;                        /* text fields (Scott); never under 16px, or iPhone Safari zooms in on tap */
  /* Tracking by size (Apple: tighten large text, small caps a little open; Mallory 2026-11-28). Inter's optical
     sizes (opsz axis, gameday_app.html) do the rest: 20px and up gets its display cut. */
  --ls-caps:.06em;                        /* small all-caps labels (12-14px bold) */
  --ls-head:-.015em;                      /* headings and titles, 19-22px */
  --ls-big:-.02em;                        /* big numbers and headings, 26px and up */
  --lh-head:1.15;                         /* headings that can wrap */
  --font-logo:"Barlow Condensed","Arial Narrow","Avenir Next Condensed",sans-serif; /* the Home logo's words (Scott) */
  --fw-regular:400;--fw-semibold:600;--fw-bold:700;
  --fw-logo-1:500;--fw-logo-2:800;          /* the Home logo's two words only (Scott) */

  /* ---- SHAPE (corner radius) ---- */
  --r-sm:8px;                             /* checkboxes, small badges */
  --r-control:9px;                        /* segmented control options, number squares */
  --r-badge:10px;                        /* position badges, inning boxes (Scott) */
  --r-md:12px;                            /* segmented controls, small buttons, info boxes */
  --r-lg:18px;                            /* buttons, text fields, the outs buttons, popovers (Scott's round 6) */
  --r-tile:16px;                          /* banners, toasts, field cards */
  --r-xl:20px;                            /* the bottom bar's Tools card, team badges, the game screen's cards (nested around the 10px position badges) */
  --r-card:26px;                          /* cards: team cards, roster, game and summary cards (Scott's round 6) */
  --r-dialog:28px;                        /* centered dialogs (Scott's round 6) */
  --r-sheet:32px;                         /* top corners of bottom sheets (Scott's round 6) */
  --sheet-pad-top:20px;--sheet-pad-x:16px;--sheet-pad-bottom:max(20px,calc(env(safe-area-inset-bottom) + 12px)); /* inside every bottom sheet, the Menu too (.sheet-panel, Mallory 2026-11-21); the bottom sized to the phone: 20px without a home bar, the bar + 12px with one */
  --sheet-max-w:520px;                    /* widest a bottom sheet gets */
  --bar-pad-bottom:max(16px,calc(env(safe-area-inset-bottom) - 4px)); /* under the bottom bar's buttons */
  --bar-h:calc(62px + var(--bar-pad-bottom)); /* the bottom bar: 6px + 56px buttons + its bottom padding */
  --toast-gap:10px;                       /* a toast sits this far above the bottom bar (Mallory 2026-11-21) */
  --r-pill:999px;                         /* tags, pills, chips */
  --r-round:50%;                          /* circles */

  /* ---- SIZES ---- */
  --tap-min:44px;                         /* smallest tap target (CLAUDE.md) */
  --h-button:40px;                        /* buttons (Scott) */
  --h-field:48px;                         /* text fields (Scott) */
  --h-seg:36px;                           /* segmented control options (Scott) */
  --h-chip:38px;                          /* chips (Scott) */

  /* ---- KEYBOARD (sheets with a text field: fitKeyboardSheet) ---- */
  --kb:0px;                               /* the keyboard's height under a sheet, set while a field in it has focus */
  --kb-t:.32s cubic-bezier(.2,.8,.25,1);  /* the sheet's slide with the keyboard (15 Pro Max: about 0.3s) */

  --team:var(--p-blue);                   /* replaced by the team's own color (applyTeamColor) */
}

.screen{display:none}.screen.on{display:block;padding-top:calc(56px + env(safe-area-inset-top))}

#fc-loaded-tokens{} /* last line: this file arrived whole (log 116; checked in gameday_app.html) */
