/* ═══════════════════════════════════════════════════════════════════════════
   ehr_page_breeding_cards.css -- KITLOOK_20261018. Section stylesheet for the
   Breeding menu's card screens and the breeding form. Loads after
   automated.css; the shape comes from css/ehr_kit.css (pg_*), this file adds
   only what each screen MEANS.

   Screens, templates and the kit sections each one uses:
     My Sire Cards  python/_incFiles/breeding/sire_cards.py -> breeding/jinja/sire_cards.j2
                    prefix sc_, handlers js/incJS_15_sirecards.js
                    kit 2 page shell, 3 cards, 4 buttons + inputs, 5 table,
                        6 chips / notes / empty, 8 stat tiles (the seven card tiles)
     Card Tiers     breeding/sire_tiers.py -> breeding/jinja/sire_tiers.j2
                    + breeding/jinja/_card_tier_note.j2 (the "How card tiers
                    are worked out" disclosure; only sire_tiers.j2 includes it)
                    prefixes st_, ct_note, handlers js/incJS_16_siretiers.js
                    kit 2, 3, 4, 5, 6, 7 filter (pg_filter, pg_chipgroup, pg_pick)
     Breed a Foal   breeding/breed.py -> breeding/jinja/breed.j2 (bd_open('') in
                    js/automated.js loads it into main_contain; a pop-out horse
                    page loads it into its Mare tab, hp_mare_body_<id>)
                    prefix bd_, plus SHARED classes it borrows: breeding_scratch_*
                    (ehr_style_02_breeding_brp.css, also breeding_scratch.j2),
                    bt_* (automated.css BREED_THEO_20260816, also mare_detail.j2),
                    bs_viewsire / bs_loaderr / bshare_note, lz_msg_no. Those
                    shared rules are NOT edited: every override below sits under
                    .bd_wrap, the class breed.j2's root carries.
                    kit 2 (pg_head_row), 3 (pg_card, pg_card_body, pg_card_foot),
                    4 (pg_lab, pg_in, pg_btn, pg_btn_2, pg_btn_accent),
                    6 (pg_note*, pg_chip, pg_chip_warn, pg_muted), 8 (pg_conn)

   Will:
     - Card tier colours (a gold .. g grey, sampled from img/sirecards/sirecard_a..g.png) are
       --bc-tier-a .. --bc-tier-g below. They are DATA: they show as the swatch on
       the Card Tiers chips. Change the card art and these together.
     - The card tiles on My Sire Cards ARE the kit's stat tiles (.pg_tile): navy
       tile, highlight strip with the tier letter. Restyle the kit, they follow.
     - The urgent (7 days or less) row on My Sire Cards = the kit's warn tokens
       (--pg-warn-*); its "N days left" chip = .pg_chip / .pg_chip_bad.
     - Breed a Foal: the message box under the form (#bd_msg) is a kit note:
       automated.js bd_msg() toggles pg_note_ok / pg_note_info / pg_note_bad
       (KITREVIEW_20261018), so it follows the --pg-ok/info/bad-* tokens, dark too.
     - Free breedings box on My Sire Cards (FREEBREEDART_20261104, run list 558): the gift is
       --sc-fb-gift (a B card's purple) with a --sc-fb-gold ribbon, and the BBBB letters are
       --sc-fb-letters (that purple mixed toward the text colour, lighter in dark for contrast);
       ticket / chip / tick box / Build free colours are Will tokens (--ehr-action = the picked
       chip; the button is the kit's pg_btn_accent).
       All of it sits under #sc_free (sc_fb_*), so Build a horse keeps its own look.
     - Section 1 page tokens; section 2 My Sire Cards; section 3 Card Tiers;
       section 4 Breed a Foal; section 5 phones.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ---------------------------------------------------------------------------
   1. PAGE TOKENS  KITLOOK_20261018: the colours these screens need that Will's
      base has no name for. Tier colours are data (same hues in every theme).
   --------------------------------------------------------------------------- */
:root {
  --bc-tier-a: #dddd5f;   /* Classic, gold    */
  --bc-tier-b: #7341b8;   /* Elite,   purple  */
  --bc-tier-c: #ce9142;   /* Strong,  orange  */
  --bc-tier-d: #36427d;   /* Good,    navy    */
  --bc-tier-e: #713b42;   /* Solid,   maroon  */
  --bc-tier-f: #378d42;   /* Ample,   green   */
  --bc-tier-g: #747980;   /* Common,  grey    */

  /* FREEBREEDART_20261104 (run list 558): the Free breedings gift. Box art, not theme: the same in every theme. */
  --sc-fb-gift: var(--bc-tier-b);   /* the gift box (the four B cards' purple) */
  --sc-fb-gold: #e6a817;            /* its ribbon and the sparkles */
  /* the BBBB letters on a ticket: 13px bold is not large text, so 4.5:1 on the ticket and on the picked ticket's tint */
  --sc-fb-letters: color-mix(in srgb, var(--sc-fb-gift) 75%, var(--ehr-text-primary));
}
:root[data-theme="dark"] {
  --sc-fb-letters: color-mix(in srgb, var(--sc-fb-gift) 45%, var(--ehr-text-primary));   /* 75% is 3.7:1 on #242424 */
}


/* ---------------------------------------------------------------------------
   2. MY SIRE CARDS  KITLOOK_20261018: SIRECARDS_20260818, SIRECARDS_BUILD_20260819,
      CARDPICK_20260820, CARDTRADE_20260820 (+ HOMETRADE / HOMEAREA), CARDART_20260821
      and the sc_ half of CANDYSTRIPE_20260821(b), moved here from automated.css and
      rewritten on tokens. Shape = kit; this is layout and meaning only.
      Dropped: .sc_soon / .sc_slotpick / .sc_actioncell (no template or JS uses them).
   --------------------------------------------------------------------------- */
.sc_sub              { max-width: 62ch; }
.sc_sub strong       { color: var(--ehr-text-primary); }

/* #sc_result: incJS_15 sc_say() REPLACES its className with sc_result + _ok/_bad,
   so the note look is written here rather than added in the template. */
.sc_result           { font-size: 13px; }
.sc_result:empty     { display: none; }
.sc_result_ok,
.sc_result_bad       { margin-bottom: var(--pg-gap); padding: 10px 12px; border: 1px solid; border-left-width: 4px; line-height: 1.5; }
.sc_result_ok        { border-color: var(--pg-ok-border);  background: var(--pg-ok-bg);  color: var(--pg-ok-text); }
.sc_result_bad       { border-color: var(--pg-bad-border); background: var(--pg-bad-bg); color: var(--pg-bad-text); }

.sc_panel_empty      { margin-bottom: var(--pg-gap); text-align: left; }
.sc_panel_note       { text-align: right; color: var(--ehr-text-muted); }
.sc_buildnote        { color: var(--ehr-text-muted); }
.sc_expired          { margin: 0 0 var(--pg-gap); }
/* the notices that sit between a card's header and its body: one gap, not two */
.sc_panel > .sc_buildbody:not(:last-child) { padding-bottom: 0; }

/* -- waiting to be redeemed: the kit table; the urgent row is a warn tint.
      The doubled class is deliberate (CANDYSTRIPE_20260821): it must out-rank
      the kit's zebra (.pg_table tbody tr:nth-child(even), 0,2,2) on specificity,
      not on file order, or the 35-day warning vanishes on every other row. */
.sc_cardcell         { white-space: nowrap; }
.sc_cardimg          { width: 26px; height: auto; margin-right: 8px; vertical-align: middle; }
.sc_days             { margin-left: 8px; font-weight: 600; }
.sc_table tbody tr.sc_row_urgent.sc_row_urgent       { background: var(--pg-warn-bg); color: var(--pg-warn-text); }
.sc_table tbody tr.sc_row_urgent.sc_row_urgent:hover { background: color-mix(in srgb, var(--pg-warn-bg), var(--pg-warn-border) 35%); }
.sc_table tbody tr.sc_row_urgent .pg_key             { color: inherit; }

/* -- my cards: seven kit stat tiles (letter strip, card art, count) -- */
.sc_grid             { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 8px; padding: 1em; }
.sc_tile             { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-bottom: 10px; }
.sc_tile .pg_tile_lab { align-self: stretch; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.sc_tile_empty       { opacity: 0.55; }
.sc_tileimg          { width: 75px; height: auto; margin-top: 6px; }   /* 75px = the art's own width: never upscale */
.sc_tilecount        { padding: 0 .5em; font-size: 20px; line-height: 1.2; }
.sc_tilenote         { font-size: 11px; opacity: .8; }
.sc_tile .pg_btn     { max-width: calc(100% - 8px); margin-top: 2px; padding-left: 7px; padding-right: 7px; white-space: normal; }
/* [hidden] restated: the kit gives .pg_btn display:inline-block, which would show a
   Trade 2 at ... button the picked Draw from track lacks. The !important is the one
   HOMEAREA_20261016 already had, carried over. */
.sc_btn_home[hidden] { display: none !important; }

/* the inline confirm incJS_15 hangs inside a tile (trade), the home strip
   (home track) or under the build row (build). Its buttons are made in JS with
   only sc_btn + sc_btn_primary / sc_btn_quiet, so they get the kit's pg_btn /
   pg_btn_2 look here (see the report: add the pg classes in the JS instead). */
.sc_tradeask         { align-self: stretch; margin: 6px 6px 0; padding: 8px; border: 1px solid var(--ehr-border);
                       background: var(--ehr-surface-bg); color: var(--ehr-text-primary); text-align: left; }
.sc_tradeask_q       { margin-bottom: 8px; font-size: 12px; line-height: 1.45; }
.sc_tradeask_row     { display: flex; flex-wrap: wrap; gap: 6px; }
.sc_tradeask .sc_btn { display: inline-block; padding: 4px 12px; border: 1px solid transparent; border-radius: var(--pg-radius-ctl);
                       font: inherit; font-size: 12px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.sc_tradeask .sc_btn_primary { background: var(--ehr-button-primary-bg); color: var(--ehr-button-primary-text); }
.sc_tradeask .sc_btn_quiet   { background: var(--ehr-surface-bg); color: var(--ehr-text-primary); border-color: var(--ehr-border); }
.sc_tradeask .sc_btn:hover   { filter: brightness(0.92); }
.sc_tradeask .sc_btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.sc_buildbody > .sc_tradeask { margin: 0 0 12px; }
/* -- Upgrade all (TAG_20261109, run list 630 GCARDMASS, owner 11-09: a mass G-card upgrade so folks do not need to click
      over and over again): the question under the card grid. The grid has 1em padding (.75em on phones), so the box lines
      up with the tiles; the Keep box is the kit pg_in, narrowed. It reuses every .sc_tradeask rule. -- */
.sc_panel > .sc_upask    { margin: 0 1em 1em; }
.sc_upask_note           { color: var(--ehr-text-muted); }
.sc_upask_keeprow        { align-items: center; margin-bottom: 8px; font-size: 12px; }
.sc_upask_keeplab        { font-weight: 700; }
.sc_upask .sc_upask_keep { width: 8.5em; max-width: 100%; padding: 3px 6px; }

/* -- the residency's home track strip (HOMETRADE_20261015, HOMEAREA_20261016) -- */
.sc_home             { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: .75em 1em;
                       border-bottom: 1px solid var(--ehr-border); background: var(--pg-info-bg); color: var(--pg-info-text); }
.sc_home .pg_lab     { margin: 0; color: inherit; opacity: .8; }
.sc_home .sc_home_sel { width: auto; max-width: 100%; }
.sc_home_none        { opacity: .75; }
.sc_home_note        { flex: 1 1 100%; color: inherit; opacity: .85; }
.sc_home_open        { color: var(--pg-pos); opacity: 1; }
.sc_home_draw        { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sc_home > .sc_tradeask { flex: 1 1 100%; margin: 4px 0 0; }

/* -- build a horse: four card slots, the shared picker, name / age -- */
.sc_slots            { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.sc_slot             { flex: 1 1 170px; min-width: 150px; }
.sc_slotbtn          { display: block; padding: 3px; border: 2px solid var(--ehr-border); border-radius: var(--pg-radius-ctl);
                       background: var(--ehr-surface-bg); cursor: pointer; }
.sc_slotbtn:hover    { border-color: var(--ehr-theme-strong); }
.sc_slotbtn_on       { border-color: var(--ehr-theme-strong); background: var(--ehr-hover-bg); }
.sc_slotbtn:focus-visible,
.sc_cardpick:focus-visible { outline: 2px solid var(--ehr-theme-strong); outline-offset: 2px; }
.sc_slotimg          { display: block; width: 75px; height: auto; }
.sc_slotcap          { display: block; margin-top: 3px; font-size: 11px; font-weight: 700; text-align: center; color: var(--ehr-text-primary); }

/* #sc_picker is shown and hidden with the hidden attribute: never give it a display */
.sc_picker           { margin-top: 8px; padding: 8px; border: 1px solid var(--ehr-border); background: var(--ehr-table-row-alt-bg); }
.sc_picker_head      { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px;
                       font-size: 12px; font-weight: 700; color: var(--ehr-text-primary); }
.sc_picker_x         { padding: 0 2px; border: 0; background: none; font-size: 18px; line-height: 1; color: var(--ehr-text-secondary); cursor: pointer; }
.sc_picker_x:hover   { color: var(--ehr-text-primary); }
.sc_cardrow          { display: flex; flex-wrap: wrap; gap: 4px; }
.sc_cardpick         { position: relative; padding: 2px; border: 2px solid transparent; border-radius: 6px; background: none;
                       line-height: 0; cursor: pointer; }
.sc_cardpick:hover:not(:disabled) { border-color: var(--ehr-theme-accent); }
.sc_cardpick_img     { display: block; width: 75px; height: auto; }
.sc_cardpick_on      { border-color: var(--ehr-theme-strong); background: var(--ehr-hover-bg); }
.sc_cardpick_out     { opacity: 0.32; cursor: default; }
.sc_cardpick_clear   { opacity: 0.75; }
/* the live "left after the other slots" count: a navy bubble, gold when picked */
.sc_cardpick_left    { position: absolute; right: -2px; bottom: -2px; min-width: 20px; padding: 0 5px; border-radius: 10px;
                       background: var(--ehr-theme-base); color: var(--ehr-theme-on-brand); font-size: 12px; line-height: 20px;
                       text-align: center; font-variant-numeric: tabular-nums; }
.sc_cardpick_on .sc_cardpick_left { background: var(--ehr-action); color: var(--ehr-on-action); }

.sc_buildrow         { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.sc_buildrow:last-child { margin-bottom: 0; }
.sc_buildrow .pg_lab { margin-bottom: 0; }
.sc_buildrow .sc_nameinput { flex: 1 1 240px; width: auto; }
.sc_agepick          { font-size: 13px; color: var(--ehr-text-primary); cursor: pointer; }

/* -- free breedings (FREEBREED_20261101 paste 523 + 531). FREEBREEDART_20261104 (run list 558, owner 11-04: "can you add
      some cuted graphics to this?"): a gift by the title, each kind a ticket with its four cards fanned (the card art) and
      the x count as a badge, 2yo / 3yo chips with a foal, the home-track draw as a rounded tick box with a map pin (a tick
      box, not a switch: the help says "tick Draw the sire from", incJS_15 says "Untick the box"), Build free as the kit's
      gold pill (pg_btn_accent) with a horseshoe. Everything is under #sc_free: Build a horse uses the same sc_buildrow /
      sc_agepick classes and keeps its look. The radios and the checkbox stay real inputs, visually hidden inside their
      labels (.sc_fb_in); the shape right after each one shows its state (:checked + ...) and its keyboard focus
      (:focus-visible + ...), and a forced-colors block at the end keeps the state visible in Windows high contrast. The
      one-kind radio carries the hidden attribute: nothing here gives .sc_fb_in a display, so it stays hidden. -- */
#sc_free > .pg_card_hd { background: linear-gradient(100deg, color-mix(in srgb, var(--sc-fb-gift) 16%, var(--ehr-table-header-bg)) 0%,
                                                   var(--ehr-table-header-bg) 60%); }
/* the "N waiting" note sits on the wash (on a phone it wraps under the title, onto the strongest part): a little darker
   than the kit's muted text, so it keeps 4.5:1 there */
#sc_free > .pg_card_hd .pg_muted { color: color-mix(in srgb, var(--ehr-text-secondary) 75%, var(--ehr-text-primary)); }
#sc_free .pg_card_title { display: inline-flex; align-items: center; gap: 7px; }
.sc_fb_gift          { flex: 0 0 auto; margin: -4px 0 -2px; overflow: visible; }
.sc_fb_gift .sc_fb_box { fill: var(--sc-fb-gift); }
.sc_fb_gift .sc_fb_lid { fill: color-mix(in srgb, var(--sc-fb-gift), #fff 18%); }
.sc_fb_gift .sc_fb_rib,
.sc_fb_gift .sc_fb_spk { fill: var(--sc-fb-gold); }
/* the sparkles twinkle twice and settle (4.8s, under WCAG 2.2.2's five seconds: nothing blinks beside the form) */
.sc_fb_spk           { transform-box: fill-box; transform-origin: center; animation: sc_fb_twinkle 2.4s ease-in-out 2; }
.sc_fb_spk2          { animation-delay: -1.2s; }
@keyframes sc_fb_twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.55); } }

#sc_free .sc_fb_in   { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; padding: 0; border: 0;
                       opacity: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#sc_free .sc_fb_in:focus-visible + .sc_fb_face,
#sc_free .sc_fb_in:focus-visible + .sc_fb_pill,
#sc_free .sc_fb_in:focus-visible + .sc_fb_tick,
#sc_free .sc_fb_go:focus-visible { outline: 2px solid var(--ehr-link); outline-offset: 2px; }

/* the kinds: a ticket each (label > radio + .sc_fb_face: fan, words, the radio dot) */
#sc_free .sc_fb_userow { align-items: flex-start; }
#sc_free .sc_fb_userow > .pg_lab { padding-top: 30px; }   /* level with the middle of the first ticket (section 5: not under 360px) */
.sc_fb_kinds         { display: flex; flex-wrap: wrap; gap: 12px 10px; flex: 1 1 280px; min-width: 0; padding-top: 8px; }
#sc_free .sc_fb_kind { position: relative; flex: 0 1 360px; min-width: 0; }
.sc_fb_face          { --fb-pad: 10px; --fb-fan-w: 90px; --fb-fan-h: 48px;
                       position: relative; display: flex; align-items: center; gap: 10px; box-sizing: border-box; min-height: 60px;
                       padding: 5px 36px 5px var(--fb-pad); border: 2px solid var(--ehr-border); border-radius: 12px;
                       background: var(--ehr-surface-bg); transition: border-color .15s ease, background-color .15s ease; }
.sc_fb_in:checked + .sc_fb_face { border-color: var(--ehr-action); background: color-mix(in srgb, var(--ehr-action) 9%, var(--ehr-surface-bg)); }
.sc_fb_in[hidden] + .sc_fb_face { padding-right: 14px; cursor: default; }
@media (hover: hover) {
  .sc_fb_in:not(:checked):not([hidden]) + .sc_fb_face:hover { border-color: var(--ehr-theme-accent); }
}
/* the four cards: one inline SVG (sire_cards.j2 fbfan); each card turns about its bottom middle. The transforms below
   restate the template's transform attributes (CSS overrides them; keep the numbers together) so a hover can spread them. */
.sc_fb_fan           { flex: 0 0 auto; width: var(--fb-fan-w); height: var(--fb-fan-h); overflow: visible; }
.sc_fb_card          { transform-box: fill-box; transform-origin: 50% 100%; filter: drop-shadow(0 1px 1.2px rgba(0, 0, 0, .4));
                       transition: transform .2s ease; }
.sc_fb_fan > :nth-child(1) { transform: rotate(-12deg); }
.sc_fb_fan > :nth-child(2) { transform: rotate(-4deg); }
.sc_fb_fan > :nth-child(3) { transform: rotate(4deg); }
.sc_fb_fan > :nth-child(4) { transform: rotate(12deg); }
@media (hover: hover) {
  .sc_fb_face:hover .sc_fb_fan > :nth-child(1) { transform: rotate(-17deg); }
  .sc_fb_face:hover .sc_fb_fan > :nth-child(2) { transform: translateY(-2px) rotate(-6deg); }
  .sc_fb_face:hover .sc_fb_fan > :nth-child(3) { transform: translateY(-2px) rotate(6deg); }
  .sc_fb_face:hover .sc_fb_fan > :nth-child(4) { transform: rotate(17deg); }
}
/* a letter with no card art (never expected: grants are four B cards) */
.sc_fb_tile          { fill: var(--ehr-theme-strong); stroke: var(--ehr-surface-bg); stroke-width: 1.5; }
.sc_fb_tiletxt       { fill: var(--ehr-theme-on-brand); font-family: inherit; }
/* x count: a badge perched on the fan's corner (in the words for a screen reader, placed here for the eye) */
.sc_fb_n             { position: absolute; top: -10px; left: calc(var(--fb-pad) + var(--fb-fan-w) - 22px); z-index: 1;
                       min-width: 24px; box-sizing: border-box; padding: 0 6px; border-radius: 11px;
                       background: var(--ehr-action); color: var(--ehr-on-action); box-shadow: 0 0 0 2px var(--ehr-surface-bg);
                       font-size: 11.5px; font-weight: 800; line-height: 20px; text-align: center; white-space: nowrap;
                       font-variant-numeric: tabular-nums; }
.sc_fb_txt           { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 1.4; color: var(--ehr-text-primary); overflow-wrap: anywhere; }
/* the label on its own line, then the letters (a B card's purple, --sc-fb-letters) and the expiry; the dot between label
   and letters is for a screen reader only (the line break does that job on screen) */
.sc_fb_lbl           { display: block; font-weight: 700; }
#sc_free .sc_fb_sep  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sc_fb_sub           { display: block; margin-top: 1px; }
.sc_fb_letters       { margin-right: 4px; font-weight: 800; letter-spacing: .16em; white-space: nowrap; color: var(--sc-fb-letters); }
.sc_fb_exp           { font-size: 11.5px; white-space: nowrap; }
.sc_fb_dot           { position: absolute; top: 50%; right: 11px; width: 16px; height: 16px; margin-top: -8px; box-sizing: border-box;
                       border: 2px solid var(--ehr-text-secondary); border-radius: 50%; background: var(--ehr-surface-bg); }
.sc_fb_in:checked + .sc_fb_face .sc_fb_dot { border-color: var(--ehr-action); background: var(--ehr-action);
                                             box-shadow: inset 0 0 0 3px var(--ehr-surface-bg); }
.sc_fb_in[hidden] + .sc_fb_face .sc_fb_dot { display: none; }

/* 2yo / 3yo: chips with a foal (the 3yo a size up) */
.sc_fb_ages          { display: inline-flex; flex-wrap: wrap; gap: 8px; }
#sc_free .sc_fb_age  { position: relative; }
.sc_fb_pill          { display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box; min-height: 32px; padding: 3px 14px 3px 9px;
                       border: 1px solid var(--ehr-border); border-radius: var(--pg-radius-pill); background: var(--ehr-surface-bg);
                       color: var(--ehr-text-primary); font-weight: 600; transition: background-color .15s ease, color .15s ease; }
.sc_fb_foal          { flex: 0 0 auto; }
.sc_fb_eye           { fill: var(--ehr-surface-bg); }
.sc_fb_in:checked + .sc_fb_pill { border-color: var(--ehr-action); background: var(--ehr-action); color: var(--ehr-on-action); }
.sc_fb_in:checked + .sc_fb_pill .sc_fb_eye { fill: var(--ehr-action); }
@media (hover: hover) {
  .sc_fb_in:not(:checked) + .sc_fb_pill:hover { border-color: var(--ehr-theme-accent); background: var(--ehr-hover-bg); }
}

/* the home-track draw: the checkbox drawn as a rounded tick box, then a map pin (both green when ticked) */
#sc_free .sc_fb_draw { position: relative; display: inline-flex; align-items: center; gap: 7px; }
.sc_fb_tick          { position: relative; flex: 0 0 auto; width: 18px; height: 18px; box-sizing: border-box;
                       border: 2px solid var(--ehr-text-secondary); border-radius: 5px; background: var(--ehr-surface-bg);
                       transition: background-color .15s ease, border-color .15s ease; }
.sc_fb_tick::after   { content: ""; position: absolute; left: 50%; top: 45%; width: 6.5px; height: 10.5px; box-sizing: border-box;
                       border: solid var(--ehr-surface-bg); border-width: 0 2.5px 2.5px 0;
                       transform: translate(-50%, -55%) rotate(45deg) scale(0); transition: transform .12s ease; }
.sc_fb_in:checked + .sc_fb_tick { border-color: var(--pg-pos); background: var(--pg-pos); }
.sc_fb_in:checked + .sc_fb_tick::after { transform: translate(-50%, -55%) rotate(45deg) scale(1); }
@media (hover: hover) {
  .sc_fb_draw:hover .sc_fb_in:not(:checked) + .sc_fb_tick { background: var(--ehr-hover-bg); }
}
.sc_fb_pin           { flex: 0 0 auto; color: var(--ehr-text-secondary); transition: color .15s ease; }
.sc_fb_in:checked ~ .sc_fb_pin { color: var(--pg-pos); }
#sc_free .js-sc-drawcode { font-weight: 700; }

/* Build free: the kit's gold pill (pg_btn_accent: colours, radius, hover) with a lucky horseshoe that tips on hover */
#sc_free .sc_fb_go   { display: inline-flex; align-items: center; gap: 7px; padding: 7px 18px 7px 14px; font-size: 14px; }
.sc_fb_shoe          { flex: 0 0 auto; transform: rotate(-12deg); transition: transform .2s ease; }
@media (hover: hover) {
  #sc_free .sc_fb_go:not([disabled]):hover .sc_fb_shoe { transform: rotate(10deg); }
}
@media (prefers-reduced-motion: reduce) {
  .sc_fb_spk         { animation: none; }
  .sc_fb_card, .sc_fb_shoe, .sc_fb_face, .sc_fb_pill, .sc_fb_tick, .sc_fb_tick::after, .sc_fb_pin { transition: none; }
}
/* Windows high contrast / forced colors: borders and fills turn to system colours and box-shadows go, so every picked
   look above would read the same as the others. Mark the picked ticket, its dot, the picked chip and the ticked box in
   Highlight (the ticket gets an inner ring too); the unpicked ones keep the forced CanvasText borders. */
@media (forced-colors: active) {
  .sc_fb_in:checked + .sc_fb_face { border-color: Highlight; outline: 2px solid Highlight; outline-offset: -4px; }
  .sc_fb_in:checked + .sc_fb_face .sc_fb_dot,
  .sc_fb_in:checked + .sc_fb_pill,
  .sc_fb_in:checked + .sc_fb_tick { forced-color-adjust: none; border-color: Highlight; background: Highlight; color: HighlightText; }
  .sc_fb_in:checked + .sc_fb_face .sc_fb_dot { box-shadow: inset 0 0 0 3px Canvas; }
  .sc_fb_in:checked + .sc_fb_pill .sc_fb_eye { fill: Highlight; }
  .sc_fb_in:checked + .sc_fb_tick::after { border-color: HighlightText; }
}


/* ---------------------------------------------------------------------------
   3. CARD TIERS  KITLOOK_20261018: CARDTIERS_20260820, CARDTIERS_20260821 +
      LOCTIERS_20261015 and the st_ half of CANDYSTRIPE_20260821(b), moved here
      from automated.css on tokens. The four selector rows sit in the kit's Filter
      card: Line / Card / Order are chip capsules (pg_chipgroup + pg_pick) like
      My Stable's filter; the table is the kit table in a kit card.
   --------------------------------------------------------------------------- */
.st_sub              { max-width: 62ch; }

/* -- the explainer (<details>, native; the marker is left to the browser) -- */
.ct_note_sum         { padding: .6em .75em; font-size: 13px; font-weight: 700; cursor: pointer; list-style-position: inside;
                       background: var(--ehr-table-header-bg); color: var(--ehr-card-primary-header-text); }
.ct_note_sum:hover   { color: var(--ehr-link); }
.ct_note[open] > .ct_note_sum { border-bottom: 1px solid var(--ehr-border); }
.ct_note_body        { font-size: 13px; line-height: 1.6; color: var(--ehr-text-primary); }
.ct_note_body > *    { max-width: 68ch; }
/* ehr_base.css gives every <p> color #333 and 1.1em: unreadable on the dark card */
.ct_note_body p      { margin: 0 0 10px; color: inherit; font-size: inherit; line-height: inherit; }
.ct_note_list        { margin: 0 0 10px; padding-left: 20px; list-style: disc; }
.ct_note_list li     { margin-bottom: 5px; }
.ct_note_body .ct_note_foot { margin: 0; color: var(--ehr-text-secondary); font-size: 12px; }

/* -- selectors -- */
.st_filter .pg_filter_body { display: flex; flex-direction: column; align-items: flex-start; gap: .75em; }
.st_row              { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.st_row.pg_chipgroup { width: fit-content; max-width: 100%; gap: .6em; }
.st_btns             { display: flex; flex-wrap: wrap; gap: .5em; }
.st_btn_n            { margin-left: 6px; font-size: 11px; opacity: 0.75; font-variant-numeric: tabular-nums; }

/* the tier chip: tier colour swatch (data), letter, how many sires that card reaches */
.st_chip             { gap: .4em; }
.st_chip::before     { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--bc-tier, transparent);
                       box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3); }
.st_chip_a           { --bc-tier: var(--bc-tier-a); }
.st_chip_b           { --bc-tier: var(--bc-tier-b); }
.st_chip_c           { --bc-tier: var(--bc-tier-c); }
.st_chip_d           { --bc-tier: var(--bc-tier-d); }
.st_chip_e           { --bc-tier: var(--bc-tier-e); }
.st_chip_f           { --bc-tier: var(--bc-tier-f); }
.st_chip_g           { --bc-tier: var(--bc-tier-g); }
.st_chip_on::before  { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85); }
.st_chip_l           { font-size: 13px; font-weight: 700; }
.st_chip_n           { font-size: 11px; opacity: 0.75; font-variant-numeric: tabular-nums; }
.st_chip_none        { opacity: 0.45; border-style: dashed; }
/* a search overrides the tier (CARDTIERS_20260821): greyed, not hidden, the
   counts still read; the picked tier stops looking picked */
.st_row_off .st_chip    { opacity: 0.38; }
.st_row_off .st_chip_on { filter: grayscale(1); }

.st_row_loc          { gap: 6px 10px; }
.st_row_loc .pg_lab  { margin: 0; }
.st_row_loc .st_sel  { width: auto; max-width: 100%; }
.st_locnote          { flex: 1 1 100%; }

.st_row_tools        { align-self: stretch; justify-content: space-between; gap: 10px; }
.st_form             { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.st_form .st_input   { flex: 1 1 200px; width: auto; min-width: 200px; }
.st_sort             { display: flex; align-items: center; }

.st_count            { margin: 0 2px .5em; font-variant-numeric: tabular-nums; color: var(--ehr-text-muted); }
.st_built            { margin-left: 10px; }
.st_note_over        { display: block; margin-bottom: 3px; font-weight: 600; color: var(--ehr-text-primary); }

/* -- the list -- */
.st_th_rk, .st_td_rk   { width: 60px; }
.st_th_pct, .st_td_pct { width: 90px; }
/* a button, not an <a>: it opens the sire in a new window through a delegated
   handler. pg_name gives it the stable list's name face. */
.st_sire             { padding: 0; border: 0; background: none; color: var(--ehr-text-primary); text-align: left; cursor: pointer; }
.st_sire:hover       { color: var(--ehr-link); text-decoration: underline; }
.st_loc              { margin-left: 6px; font-size: 0.75em; color: var(--ehr-text-secondary); }
.st_home             { margin-left: 6px; }
.st_copies           { margin-left: 6px; font-size: 0.8em; color: var(--ehr-text-secondary); }
.st_td_name .st_hittier { margin-left: 6px; }
.st_td_pct .st_hittier  { margin-right: 6px; }

.st_empty            { margin-bottom: var(--pg-gap); text-align: left; }
.st_empty_build      { border-style: solid; border-color: var(--pg-info-border); background: var(--pg-info-bg); color: var(--pg-info-text); }


/* ---------------------------------------------------------------------------
   4. BREED A FOAL  KITLOOK_20261018: bd_ rules moved here from automated.css
      (LIMITS_20260923's bd_limits lines, COOLDOWN_20261016) on tokens, plus
      scoped overrides of the SHARED breeding_scratch_* / bt_* / bs_* rules,
      which stay where they are for breeding_scratch.j2 and mare_detail.j2.
   --------------------------------------------------------------------------- */
.bd_wrap             { border-radius: 0; overflow: visible;
                       container-type: inline-size; container-name: bd; }   /* TAG_20261109 (run list 629): the Summary layout queries this width, see the end of this section */

/* title row: Breed a foal + the balances as the horse page's connection chips (pg_conn) */
.bd_wrap .breeding_scratch_header       { padding: 0; background: none; color: var(--ehr-text-primary); align-items: center; }
.bd_wrap .breeding_scratch_header_right { flex-wrap: wrap; gap: 8px; font-size: 13px; }
.bd_bal .pg_conn_val { font-variant-numeric: tabular-nums; }

/* preview this mating: the gold pill (the horse page's Show Calls) */
.bd_wrap .bt_bar     { margin: 0 0 var(--pg-gap); }
.bd_wrap .bt_btn     { padding: 6px 14px; border: 1px solid transparent; border-radius: 20px;
                       background: var(--ehr-action); color: var(--ehr-on-action); font-weight: 600; }
.bd_wrap .bt_btn:hover { background: var(--ehr-action); filter: brightness(0.92); }
.bd_wrap .bt_btn:focus-visible { outline-color: var(--ehr-theme-strong); }
.bd_wrap .bt_bar_hint { opacity: 1; }
/* the preview itself (breeding_theoretical.j2, fetched into #bt_panel) */
.bd_wrap .bt_wrap    { border-color: var(--ehr-border); border-radius: 0; background: var(--ehr-surface-bg); color: var(--ehr-text-primary); }
.bd_wrap .bt_empty   { color: var(--ehr-text-secondary); opacity: 1; }
.bd_wrap .bt_line    { border-color: var(--ehr-theme-strong); background: var(--ehr-surface-bg); color: var(--ehr-text-primary); }
.bd_wrap .bt_line_mare { border-color: var(--ehr-action); }
.bd_wrap .bt_line_off  { border-color: var(--ehr-border); background: var(--ehr-table-row-alt-bg); color: var(--ehr-text-secondary); }
.bd_wrap .bt_note    { border-left-color: var(--pg-warn-border); border-radius: 0; background: var(--pg-warn-bg); color: var(--pg-warn-text); }
.bd_wrap .bt_note p  { color: inherit; font-size: inherit; line-height: inherit; }

.bd_wrap .bshare_note,
.bd_wrap .bs_loaderr { margin: 0 0 var(--pg-gap); border-radius: 0; }
.bd_wrap .bshare_note { border-color: var(--pg-ok-border); background: var(--pg-ok-bg); color: var(--pg-ok-text); }
.bd_wrap .bs_loaderr  { border-color: var(--pg-bad-border); background: var(--pg-bad-bg); color: var(--pg-bad-text); }
.bd_wrap .bs_loaderr code { background: color-mix(in srgb, var(--ehr-theme-base) 50%, transparent); }

/* this week's allowance strip (LIMITS_20260923) */
.bd_limits           { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 var(--pg-gap); padding: 8px 10px;
                       border: 1px solid var(--ehr-border); background: var(--ehr-surface-bg);
                       color: var(--ehr-card-primary-body-text); font-size: 12px; }
.bd_lim_hd           { margin: 0 2px 0 0; }
.bd_lim              { font-weight: 400; }
.bd_lim b            { font-weight: 700; }
.bd_lim_note         { flex-basis: 100%; font-size: 11px; }

/* the form card: mare + sire lines in a grey well, then the settings grid */
.bd_wrap .breeding_scratch_content      { margin-bottom: 0; }
.bd_wrap .breeding_scratch_info_section { margin-bottom: 1.25em; padding: 1em; border: 1px solid var(--ehr-border); border-radius: 0;
                                          background: var(--ehr-table-row-alt-bg); }
.bd_wrap .breeding_scratch_info_grid    { gap: 14px; }
.bd_wrap .breeding_scratch_info_row,
.bd_wrap .breeding_scratch_form_section { gap: 14px 20px; }
.bd_wrap .breeding_scratch_form_section { margin-bottom: 1.25em; }
.bd_wrap .breeding_scratch_field        { gap: 4px; }
.bd_wrap .breeding_scratch_field .pg_lab { margin-bottom: 0; }
.bd_wrap .breeding_scratch_select,
.bd_wrap .breeding_scratch_input        { padding: 7px 10px; font-size: 14px; }
.bd_wrap .breeding_scratch_age_select   { width: auto; min-width: 120px; }
.bd_wrap .breeding_scratch_radio_label  { font-size: 13.5px; color: var(--ehr-text-primary); }
.bd_wrap .bs_viewsire                   { margin-left: 2px; color: var(--ehr-link); }
.bd_wrap .bs_viewsire:hover             { color: var(--ehr-link); filter: brightness(0.85); }
.bd_opt              { text-transform: none; letter-spacing: 0; font-weight: 400; }
.bd_note             { font-size: 12.5px; line-height: 1.5; color: var(--ehr-text-secondary); }
.bd_wrap .bd_note.lz_msg_no { color: var(--pg-neg); font-weight: 600; }
.bd_wrap .bd_note a  { color: var(--ehr-link); font-weight: 600; }
.bd_supersede        { font-size: 13px; font-style: italic; color: var(--ehr-text-secondary); }
.bd_wrap .breeding_scratch_content > .breeding_scratch_footer_alert { margin-bottom: 1em; font-weight: 600; }

/* cost: a small table inside the card (header row, lines, bold total) */
.bd_wrap .breeding_scratch_cost_section { margin: 0; padding: 0; border: 1px solid var(--ehr-border); border-radius: 0;
                                          background: var(--ehr-surface-bg); }
.bd_wrap .breeding_scratch_cost_title   { margin: 0; padding: 8px 12px; font-size: 13px; background: var(--ehr-table-header-bg);
                                          color: var(--ehr-table-header-text); }
.bd_wrap .breeding_scratch_cost_row     { padding: 7px 12px; border-bottom: 1px solid var(--ehr-border); font-size: 13.5px;
                                          color: var(--ehr-text-primary); }
.bd_wrap .breeding_scratch_cost_row:last-child { margin-top: 0; border-bottom: 0; background: var(--ehr-table-row-alt-bg); }
.bd_wrap .breeding_scratch_cost_row strong     { font-variant-numeric: tabular-nums; }

/* footer: Breed Foal is the primary button of the page, sized up.
   TAG_20261109 (run list 629): the footer moved into the Summary card (aside#bd_sum), so no foot strip or border of its own
   (the light grey fill of the shared rule is cleared too); one column, the buttons full width, the hint small under them. */
.bd_wrap .breeding_scratch_footer       { gap: 8px; padding: 0; border: 0; background: none; font-size: 13px; }
.bd_wrap .breeding_scratch_footer_content { flex-direction: column; align-items: stretch; gap: 8px; }
.bd_wrap .breeding_scratch_message      { flex: none; color: var(--ehr-text-secondary); font-size: 12px; line-height: 1.45; }
.bd_wrap .breeding_scratch_breed_btn    { width: 100%; padding: 9px 16px; font-size: 15px; }
.bd_wrap .breeding_scratch_breed_btn:active { transform: none; }
.bd_wrap .breeding_scratch_again_btn    { margin-left: 0; }
/* TAG_20261109 (run list 629, owner 11-09: the Breed Foal button greyed until everything is met): a disabled Breed button
   LOOKS disabled now (was the enabled colour). After a breeding (data-bd-state done, "Foal in the shed") it reads as done,
   not broken: the ok colours of the kit. */
.bd_wrap .breeding_scratch_breed_btn:disabled,
.bd_wrap .breeding_scratch_breed_btn:disabled:hover { border-color: var(--ehr-border); background: var(--ehr-surface-subtle);
                                                      color: var(--ehr-text-muted); opacity: 1; filter: none; cursor: not-allowed; }
.bd_wrap[data-bd-state="done"] .breeding_scratch_breed_btn:disabled,
.bd_wrap[data-bd-state="done"] .breeding_scratch_breed_btn:disabled:hover { border-color: var(--pg-ok-border); background: var(--pg-ok-bg);
                                                      color: var(--pg-ok-text); cursor: default; }
/* #bd_msg: KITREVIEW_20261018: the kit's note colours in every theme. bd_msg (automated.js) toggles pg_note_ok / pg_note_info /
   pg_note_bad instead of writing an inline colour; the light-only message tokens that were here are retired. Specificity
   beats the ehr_style_02 red alert and the kit's own pg_note_* lines. */
.bd_wrap .breeding_scratch_footer .breeding_scratch_footer_alert              { border-color: var(--pg-bad-border);  background: var(--pg-bad-bg);  color: var(--pg-bad-text); }
.bd_wrap .breeding_scratch_footer .breeding_scratch_footer_alert.pg_note_info { border-color: var(--pg-info-border); background: var(--pg-info-bg); color: var(--pg-info-text); }
.bd_wrap .breeding_scratch_footer .breeding_scratch_footer_alert.pg_note_ok,
.bd_wrap .breeding_scratch_footer .breeding_scratch_footer_alert.breeding_alert_ok { border-color: var(--pg-ok-border); background: var(--pg-ok-bg); color: var(--pg-ok-text); }

/* the week-so-far bar under the message after a breeding (COOLDOWN_20261016, bd_weekBar in automated.js) */
.bd_wkbar            { max-width: 440px; margin: 8px 0 4px; }
.bd_wkbar_track      { height: 8px; overflow: hidden; border-radius: 4px; background: var(--ehr-table-row-alt-bg); box-shadow: inset 0 0 0 1px var(--ehr-border); }
.bd_wkbar_fill       { height: 100%; border-radius: 4px; background: var(--pg-pos); }
.bd_wkbar_over .bd_wkbar_fill { background: var(--pg-warn-border); }
.bd_wkbar_txt        { margin-top: 4px; font-size: 12px; color: var(--ehr-text-secondary); }

/* TAG_20261109 (run list 629 BREEDSUMMARY, owner 11-09: "Add a Summary that shows everything grouped together").
   .bd_layout holds the form card and the Summary card (aside#bd_sum, filled by bd_summary() in automated.js). One column
   by default: the Summary sits under the form, static, where the footer was. When .bd_wrap is wide enough the Summary is
   a 300px column on the right, sticky under the fixed header, its height capped (it scrolls inside) so the Breed button
   stays reachable on a short screen. A CONTAINER query on .bd_wrap, not a viewport one: the same template also renders in
   the horse page Mare tab, the mare one-pager and the bigboi page. minmax(0, 1fr) and the 100% wide selects keep long
   option text from widening the page; names wrap inside the card. */
.bd_layout           { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--pg-gap); align-items: start; }
.bd_layout > .breeding_scratch_content { min-width: 0; }
.bd_sum              { min-width: 0; margin-bottom: 0; }
@container bd (min-width: 860px) {
  .bd_layout         { grid-template-columns: minmax(0, 1fr) 300px; }
  /* BREEDSUMMARY_20261109 (run list 629, web review): no height cap and no own scroll -- on a short laptop screen the cap hid
     the Breed button inside the box, out of reach of the page scroll; it sticks only while the form is the taller one. */
  .bd_sum            { position: sticky; top: calc(var(--ehr-header-height) + 12px); }
  .horsepage_wrapper .bd_sum { position: static; }   /* the horse page Mare tab clips (overflow hidden): no sticky there */
}
.bd_sum_body         { display: flex; flex-direction: column; gap: 10px; padding: .75em; }

/* what is chosen: the label left, the choice right; a placeholder (not chosen, none) is muted */
.bd_sum_rows         { display: grid; gap: 5px; margin: 0; }
.bd_sum_row          { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 8px; align-items: baseline; }
.bd_sum_row dt       { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
                       color: var(--ehr-text-secondary); }
.bd_sum_row dd       { margin: 0; min-width: 0; overflow-wrap: anywhere; text-align: right; font-size: 13.5px; font-weight: 600;
                       color: var(--ehr-text-primary); }
.bd_sum_row dd.bd_sum_none { font-weight: 400; font-style: italic; color: var(--ehr-text-secondary); }

/* the inner box: the moved Cost rows on the info tint of the kit; the total is the line that matters */
.bd_wrap .bd_sum_cost { border-color: var(--pg-info-border); background: var(--pg-info-bg); }
.bd_wrap .bd_sum_cost .breeding_scratch_cost_row   { gap: 8px; padding: 6px 10px; border-bottom-color: var(--pg-info-border);
                                                     color: var(--pg-info-text); }
.bd_wrap .bd_sum_cost .breeding_scratch_cost_total { background: transparent; font-size: 15px; font-weight: 700; }
.bd_sum_note         { font-size: 12px; font-weight: 400; font-style: italic; }

/* balance after, and the weekly count with this breeding */
.bd_sum_line         { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px;
                       font-size: 13px; color: var(--ehr-text-primary); }
.bd_sum_line strong  { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }
.bd_sum_line strong.bd_sum_neg,
.bd_sum_line strong.bd_sum_warn { color: var(--pg-neg); }

/* the checklist: an empty circle, a filled one with a tick when met. The words for screen readers are in .bd_sum_sr. */
.bd_sum_checks       { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.bd_sum_checks li    { position: relative; margin: 0; padding-left: 24px; line-height: 18px; color: var(--ehr-text-secondary); }
.bd_sum_checks li::before { content: ""; position: absolute; left: 0; top: 1px; box-sizing: border-box; width: 16px; height: 16px;
                       border: 2px solid var(--ehr-border); border-radius: 50%;
                       font-size: 10px; font-weight: 700; line-height: 12px; text-align: center; }
.bd_sum_checks li.bd_sum_ok { color: var(--ehr-text-primary); }
.bd_sum_checks li.bd_sum_ok::before { content: "\2713"; border-color: var(--pg-pos); background: var(--pg-pos); color: var(--ehr-surface-bg); }
.bd_sum_sr           { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bd_sum_fine         { margin-top: -4px; font-size: 11.5px; line-height: 1.4; }
/* Still needed: three lines reserved, so the words changing as you type never move what is under them */
.bd_sum_need         { min-height: calc(3 * 1.4em); font-size: 12.5px; line-height: 1.4; color: var(--ehr-text-secondary); }
.bd_sum_need.bd_sum_ready { color: var(--pg-pos); font-weight: 600; }
@media (forced-colors: active) {
  .bd_sum_checks li.bd_sum_ok::before { forced-color-adjust: none; border-color: CanvasText; background: CanvasText; color: Canvas; }
}


/* ---------------------------------------------------------------------------
   5. PHONES  KITLOOK_20261018: CARDART_20260821's compact card sizes (seven tiles
      and a four-slot picker at 75px would wrap badly), and the breed footer.
   --------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .sc_grid           { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); padding: .75em; }
  .sc_panel > .sc_upask  { margin: 0 .75em .75em; }   /* TAG_20261109 (run list 630): matches the phone grid padding */
  .sc_tileimg        { width: 56px; }
  .sc_slot           { flex-basis: 130px; min-width: 120px; }
  .sc_slotimg        { width: 48px; }
  .sc_cardpick_img   { width: 34px; }
  .sc_cardpick_left  { min-width: 15px; padding: 0 3px; border-radius: 8px; font-size: 10px; line-height: 15px; }
  .sc_panel_note     { text-align: left; }
  /* FREEBREEDART_20261104: a smaller fan on the free-breeding tickets */
  .sc_fb_face       { --fb-fan-w: 78px; --fb-fan-h: 42px; gap: 8px; }
  .st_form .st_input { min-width: 0; }
}
/* FREEBREEDART_20261104: under 360px (a 320 phone, or 390 zoomed past about 115%) the tickets wrap under Use; put Use on
   its own line above them, as before 558, instead of 30px down with a gap under the header */
@media (max-width: 359px) {
  #sc_free .sc_fb_userow > .pg_lab { flex-basis: 100%; padding-top: 0; }
}
/* ehr_style_02 stacks the breed title row at 768px; keep it left-aligned, the balances together.
   TAG_20261109 (run list 629): the breed Summary card needs no phone rule here: on a narrow .bd_wrap the container query
   at the end of section 4 already puts it under the form, static, with the Breed button full width. */
@media (max-width: 768px) {
  .bd_wrap .breeding_scratch_header       { align-items: flex-start; }
  .bd_wrap .breeding_scratch_header_right { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .bd_lim            { white-space: normal; }
}
