/* Stable Tracker v2.5.7 — mobile polish, sync visibility and safe bulk edits. */
.st257-name-warning{margin:6px 0 14px;padding:10px 13px;border-radius:12px;background:rgba(193,122,40,.11);border:1px solid rgba(193,122,40,.4);font-size:.9rem;line-height:1.45;color:inherit}
.st257-name-warning[hidden],.st257-sync-progress[hidden]{display:none!important}
.st257-name-warning[data-kind="exact"]{background:rgba(193,67,67,.09);border-color:rgba(193,67,67,.52)}
.st257-bulk-open{margin:8px 0 18px;min-height:44px}
.st257-sync-indicator{display:inline-flex;align-items:center;gap:7px;border:1px solid rgba(120,120,120,.35);border-radius:999px;padding:6px 9px;white-space:nowrap;max-width:240px;font-size:12px;font-weight:650;line-height:1.2;color:inherit;background:rgba(120,120,120,.08)}
.st257-sync-dot{width:8px;height:8px;border-radius:50%;background:#9a9a9a;flex:none}
.st257-sync-indicator[data-phase="ok"] .st257-sync-dot{background:#40966b}
.st257-sync-indicator[data-phase="pending"] .st257-sync-dot{background:#b88d32}
.st257-sync-indicator[data-phase="error"] .st257-sync-dot{background:#c64d58}
.st257-sync-indicator[data-phase="offline"] .st257-sync-dot{background:#888}
.st257-sync-indicator[data-phase="working"] .st257-sync-dot{background:#3c86cb;animation:st257-pulse 1.35s ease-in-out infinite}
.st257-sync-last{font-size:12px;line-height:1.45;opacity:.75;margin:5px 0 8px}
.st257-sync-progress{position:fixed;right:max(14px,env(safe-area-inset-right));bottom:max(18px,calc(env(safe-area-inset-bottom) + 12px));display:flex;align-items:center;gap:13px;max-width:min(360px,calc(100vw - 28px));z-index:1500;border-radius:16px;padding:13px 15px;background:var(--panel,#fff);color:var(--ink,#27212b);box-shadow:0 9px 30px rgba(0,0,0,.21);border:1px solid rgba(120,120,120,.35);pointer-events:none}
.st257-sync-progress div{display:flex;flex-direction:column;gap:3px;min-width:0}
.st257-sync-progress small{font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.st257-sync-progress strong{font-size:14px}
.st257-sync-spinner{height:19px;width:19px;flex:none;border:2px solid rgba(80,80,80,.18);border-top-color:currentColor;border-radius:50%;animation:st257-rotate .9s linear infinite}
@keyframes st257-pulse{50%{opacity:.3;transform:scale(.8)}}
@keyframes st257-rotate{to{transform:rotate(360deg)}}
.st257-bulk-modal{position:fixed;box-sizing:border-box;width:min(1000px,calc(100vw - 26px));max-width:1000px;max-height:min(92dvh,950px);padding:0;border-radius:17px;border:1px solid rgba(120,120,120,.35);background:var(--panel,#fff);color:var(--ink,#25212a);box-shadow:0 18px 60px rgba(0,0,0,.32);overscroll-behavior:contain}
.st257-bulk-modal:not([open]){display:none}
.st257-bulk-modal::backdrop{background:rgba(12,10,19,.64)}
.st257-bulk-modal h2{font-size:1.45rem;line-height:1.3;margin:0 0 6px}
.st257-bulk-modal h3{font-size:1.03rem;margin:0}
.st257-bulk-head{display:flex;justify-content:space-between;gap:15px;align-items:flex-start;border-bottom:1px solid rgba(125,125,125,.25);padding:18px 20px}
.st257-bulk-head p{font-size:13px;margin:0;color:inherit;opacity:.7}
.st257-bulk-layout{display:grid;grid-template-columns:minmax(245px,.85fr) minmax(340px,1.15fr);gap:15px;padding:14px 20px;min-height:160px;max-height:min(64dvh,615px);overflow:hidden}
.st257-bulk-layout>section{min-width:0;display:flex;flex-direction:column;gap:10px;overflow:hidden}
.st257-bulk-filters{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.st257-bulk-filters label,.st257-bulk-fields label{font-size:12px;font-weight:700;display:flex;flex-direction:column;gap:5px;min-width:0}
.st257-bulk-modal input:not([type=checkbox]),.st257-bulk-modal select{box-sizing:border-box;width:100%;font-size:16px;min-height:44px;border-radius:10px;padding:7px 9px;border:1px solid rgba(126,126,126,.45);background:var(--input-bg,transparent);color:inherit}
.st257-bulk-list,.st257-bulk-selected{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:4px}
.st257-bulk-option{display:flex;align-items:center;gap:11px;min-height:49px;padding:8px;border-bottom:1px solid rgba(128,128,128,.17);cursor:pointer}
.st257-bulk-option input{width:19px;height:19px;flex:none;accent-color:var(--accent,#875063)}
.st257-bulk-option span{display:flex;flex-direction:column;gap:2px;min-width:0}
.st257-bulk-option small{opacity:.7;font-size:11px}
.st257-bulk-selected-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.st257-bulk-selected-head span{font-size:12px;opacity:.75}
.st257-bulk-edit{padding:10px 11px;margin-bottom:10px;background:rgba(125,125,125,.06);border:1px solid rgba(125,125,125,.23);border-radius:12px}
.st257-bulk-edit-head{display:flex;gap:7px;align-items:center;margin-bottom:9px}
.st257-bulk-edit-head strong{min-width:0;overflow:hidden;text-overflow:ellipsis}
.st257-bulk-edit-head small{opacity:.7;font-size:11px;margin-right:auto}
.st257-bulk-edit-head button{min-width:38px;min-height:38px}
.st257-bulk-fields{display:grid;grid-template-columns:minmax(120px,1.5fr) minmax(90px,.9fr) minmax(75px,.7fr);gap:8px}
.st257-bulk-footer{border-top:1px solid rgba(120,120,120,.25);padding:11px 20px 16px}
.st257-bulk-footer p{font-size:12px;opacity:.8;line-height:1.45;margin:0 0 10px}
.st257-bulk-footer>div{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.st257-bulk-footer button{min-height:44px;white-space:normal}
@media(max-width:850px){.st257-bulk-modal{max-height:94dvh}.st257-bulk-layout{grid-template-columns:1fr;max-height:min(66dvh,660px);overflow-y:auto;overscroll-behavior:contain}.st257-bulk-list{max-height:200px;min-height:80px}.st257-bulk-selected{overflow:visible}.st257-bulk-layout>section{overflow:visible}.st257-bulk-fields{grid-template-columns:1.3fr .9fr .8fr}}
@media(max-width:550px){.st257-sync-indicator{max-width:100px;padding:5px 7px}.st257-sync-indicator span:last-child{overflow:hidden;text-overflow:ellipsis}.st257-bulk-modal{width:calc(100vw - 12px);max-height:96dvh;border-radius:13px}.st257-bulk-head{padding:13px 14px}.st257-bulk-layout{padding:12px 14px;max-height:62dvh}.st257-bulk-filters{grid-template-columns:1fr 1fr}.st257-bulk-fields{grid-template-columns:1fr 1fr}.st257-bulk-fields label:first-child{grid-column:1/-1}.st257-bulk-footer{padding:10px 14px calc(10px + env(safe-area-inset-bottom))}.st257-bulk-footer>div{justify-content:stretch}.st257-bulk-footer button{flex:1 1 auto;font-size:13px}.st257-bulk-footer button:first-child{flex-basis:100%}.st257-sync-progress{bottom:max(14px,calc(env(safe-area-inset-bottom) + 12px));right:12px}}
@media(prefers-reduced-motion:reduce){.st257-sync-dot,.st257-sync-spinner{animation:none!important}}
/* Prevent obscured focused fields behind the iPhone software keyboard / safe-area controls. */
@supports(padding:max(0px)){.st257-bulk-modal{scroll-padding-bottom:max(20px,env(safe-area-inset-bottom))}}
@media(max-width:550px){.st257-sync-indicator{max-width:none;min-width:24px;padding:7px;gap:0;justify-content:center}.st257-sync-indicator #st257-sync-label{display:none}.st257-sync-dot{width:9px;height:9px}}

/* V2.5.24 — mass breed/date corrections with explicit opt-in, mobile-safe fields. */
.st2524-common{padding:12px;border:1px solid rgba(130,100,120,.32);border-radius:12px;background:rgba(140,116,112,.055);flex:none;min-width:0}
.st2524-common h3{margin:0 0 5px;font-size:1rem}
.st2524-common>p{margin:0 0 10px;font-size:12px;line-height:1.4}
.st2524-common-grid{display:grid;grid-template-columns:minmax(135px,.9fr) minmax(0,1.1fr);gap:9px 12px;align-items:center}
.st2524-common-grid>label:not(.st2524-common-toggle){display:flex;flex-direction:column;gap:5px;min-width:0;font-size:12px;font-weight:700}
.st2524-common-toggle{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;cursor:pointer;min-width:0;line-height:1.3}
.st2524-common-toggle input[type=checkbox]{width:19px;height:19px;flex:none;accent-color:var(--accent,#875063)}
.st2524-common input:disabled{opacity:.55;cursor:not-allowed}
.st2524-selection-tools{display:flex;gap:6px;flex-wrap:wrap}
.st2524-selection-tools button{font-size:12px;min-height:38px;padding:7px 10px}
.st2524-row-breed{grid-column:span 2}
.st2524-row-date{grid-column:span 1}
.st257-bulk-modal input[type=date]{min-width:0;max-width:100%;-webkit-appearance:auto;appearance:auto}
@media(max-width:850px){.st2524-common-grid{grid-template-columns:minmax(135px,1fr) minmax(0,1fr)}}
@media(max-width:550px){
 .st2524-common{padding:10px}
 .st2524-common-grid{grid-template-columns:1fr;gap:6px}
 .st2524-common-grid>label:not(.st2524-common-toggle){margin-bottom:6px}
 .st2524-row-breed{grid-column:1/-1}
 .st2524-row-date{grid-column:1/-1}
 .st2524-selection-tools button{flex:1 1 auto}
}


/* Stable Tracker V2.5.26 — compact picker for group corrections */
.st257-bulk-modal{width:min(900px,calc(100vw - 18px))}
.st257-bulk-layout.st2526-layout{display:flex;flex-direction:column;gap:18px;overflow-y:auto;overflow-x:hidden;max-height:min(67dvh,710px);padding:16px 22px;overscroll-behavior:contain}
.st2526-layout>section{display:flex;flex-direction:column;gap:10px;min-width:0;overflow:visible}
.st2526-layout .st257-bulk-filters{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:12px}
.st2526-layout .st257-bulk-filters>label{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:.86rem;font-weight:650}
.st2526-search-wrap,.st2526-breed-wrap{position:relative;display:block;min-width:0}
.st2526-layout .st257-bulk-filters input,.st2526-layout .st257-bulk-filters select{width:100%}
.st2526-horse-suggestions,.st2526-breed-hits{display:grid;gap:3px;overflow-y:auto;max-height:210px;border:1px solid var(--line,rgba(126,126,126,.32));border-radius:11px;background:var(--panel,#fff);padding:5px;margin-top:5px;overscroll-behavior:contain;box-shadow:0 4px 12px rgba(0,0,0,.07)}
.st2526-horse-suggestions[hidden],.st2526-breed-hits[hidden]{display:none!important}
.st2526-horse-option,.st2526-breed-option{display:flex;flex-direction:column;gap:2px;align-items:flex-start;box-sizing:border-box;width:100%;padding:10px 12px;min-height:46px;border:0;border-radius:8px;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}
.st2526-horse-option:hover,.st2526-horse-option:focus-visible,.st2526-breed-option:hover,.st2526-breed-option:focus-visible{background:var(--st-accent-bg,rgba(132,79,79,.12));outline-offset:-2px}
.st2526-horse-option strong{font-size:.92rem}.st2526-horse-option small,.st2526-breed-option small{font-size:.78rem;opacity:.7}
.st2526-breed-option{flex-direction:row;align-items:center;justify-content:space-between;gap:8px}.st2526-breed-option span{overflow-wrap:anywhere}
.st2526-hits-empty{font-size:.85rem;padding:6px}
.st2526-layout .st2524-selection-tools{flex-wrap:wrap;align-items:center}
.st2526-layout .st2524-selection-tools button{white-space:normal;text-align:center}
.st2526-list-head{flex-wrap:wrap;align-items:baseline}.st2526-list-head small{font-weight:400;opacity:.7;font-size:.8rem}
.st2526-selected-list{max-height:260px;overflow-y:auto;overflow-x:hidden;padding:2px;min-height:0}
.st2526-selected-card{padding:0!important;margin:0 0 7px!important;border-radius:12px!important}
.st2526-card-summary{display:flex;align-items:center;gap:8px;min-width:0;padding:8px 10px}
.st2526-selected-badge{background:var(--st-accent-bg,rgba(132,79,79,.12));color:var(--accent,#965900);width:25px;height:25px;border-radius:8px;display:grid;place-items:center;flex:none;font-size:.8rem}
.st2526-card-title{display:flex;flex-direction:column;flex:1;min-width:0;gap:2px}.st2526-card-title strong{font-size:.91rem;overflow-wrap:anywhere}.st2526-card-title small{font-size:.76rem;opacity:.7;overflow-wrap:anywhere}
.st2526-expand{min-height:39px;padding:7px 10px;font-size:.84rem;flex:none}.st2526-remove{width:38px;height:38px;border:1px solid var(--line,rgba(126,126,126,.3));border-radius:10px;background:transparent;color:inherit;font-size:1.3rem;cursor:pointer;flex:none}
.st2526-fields{padding:12px 12px 14px;border-top:1px solid var(--line,rgba(126,126,126,.22));}
.st2526-empty-selection{padding:14px 4px;margin:0}
.st2526-layout .st2524-common{padding:14px}.st2526-layout .st2524-common-grid{grid-template-columns:minmax(140px,.75fr) minmax(0,1.25fr)}
@media(max-width:650px){
 .st257-bulk-layout.st2526-layout{max-height:min(66dvh,700px);padding:12px 14px;gap:15px}
 .st2526-layout .st257-bulk-filters{grid-template-columns:1fr 1fr;gap:9px}
 .st2526-layout .st2524-common-grid{grid-template-columns:1fr;gap:7px}
 .st2526-layout .st2524-common{padding:12px}
 .st2526-selected-list{max-height:205px}
 .st2526-breed-option{min-height:44px}
}
@media(max-width:390px){
 .st2526-layout .st257-bulk-filters{grid-template-columns:1fr}
 .st2526-layout .st2524-selection-tools button{flex:1 1 auto}
 .st2526-card-summary{gap:5px;padding:7px}
 .st2526-expand{padding:6px 7px}
 .st2526-remove{width:34px;height:38px}
}


/* V2.5.27 — batch editor uses the *visible* iOS viewport, including keyboard.
   clean-design.js wraps the dialog in a fixed .st-dialog-bar + .st-dialog-scroll.
   Keep precisely ONE scrolling region; do not limit inner content to 66dvh. */
@media (max-width: 700px){
 #st257-bulk-dialog[open]{
  display:flex!important;flex-direction:column!important;
  position:fixed!important;
  inset:auto!important;
  top:calc(var(--st2527-visual-top, 0px) + 6px)!important;
  left:50%!important;
  right:auto!important;
  bottom:auto!important;
  margin:0!important;
  transform:translateX(-50%)!important;
  box-sizing:border-box!important;
  width:calc(100vw - 12px)!important;
  max-width:calc(100vw - 12px)!important;
  height:calc(var(--st2527-visual-height, 100dvh) - 12px)!important;
  max-height:calc(var(--st2527-visual-height, 100dvh) - 12px)!important;
  min-height:0!important;
  padding:0!important;
  overflow:hidden!important;
  overscroll-behavior:contain;
 }
 #st257-bulk-dialog[open]>.st-dialog-bar{
  flex:0 0 auto!important;min-width:0!important;width:100%;box-sizing:border-box;
 }
 #st257-bulk-dialog[open]>.st-dialog-scroll{
  flex:1 1 auto!important;display:block!important;min-height:0!important;
  box-sizing:border-box!important;width:100%!important;max-width:100%!important;
  overflow-x:hidden!important;overflow-y:auto!important;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  scroll-padding-top:14px;
  scroll-padding-bottom:24px;
 }
 /* Do not nest a capped 66dvh scroller inside the main dialog scroll. */
 #st257-bulk-dialog[open] .st257-bulk-layout.st2526-layout{
  max-height:none!important;min-height:0!important;
  overflow:visible!important;
  height:auto!important;
  display:flex;flex-direction:column;
 }
 #st257-bulk-dialog[open] .st2526-selected-list{
  max-height:none!important;overflow:visible!important;
 }
 #st257-bulk-dialog[open] .st257-bulk-head,
 #st257-bulk-dialog[open] .st257-bulk-footer{
  width:100%;min-width:0;box-sizing:border-box;
 }
 #st257-bulk-dialog[open].st2527-keyboard-visible .st257-bulk-head{
  padding:10px 14px 8px;
 }
 #st257-bulk-dialog[open].st2527-keyboard-visible .st257-bulk-head h2{
  font-size:1.08rem;line-height:1.22;margin:0;
 }
 #st257-bulk-dialog[open].st2527-keyboard-visible .st257-bulk-head p{
  display:none;
 }
 #st257-bulk-dialog[open].st2527-keyboard-visible .st257-bulk-layout.st2526-layout{
  gap:10px;padding-top:9px;
 }
 #st257-bulk-dialog[open].st2527-keyboard-visible .st257-bulk-footer>p{
  display:none;
 }
}

/* V2.5.30: extensive batch fields without expanding the dialog horizontally. */
.st2530-common-grid,.st2530-bulk-fields{min-width:0}
.st2530-common-grid>label,.st2530-common-grid>div,.st2530-bulk-fields>label{min-width:0}
.st2530-common-grid input,.st2530-common-grid textarea,.st2530-common-grid select,
.st2530-bulk-fields input,.st2530-bulk-fields select,.st2530-bulk-fields textarea{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.st2530-common-grid .st2530-common-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.st2530-common-grid .st2530-common-pair>label{min-width:0}
.st2530-common-grid .st2530-field-hint{margin:0 0 8px}
.st2530-bulk-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.st2530-bulk-fields .st2530-full{grid-column:1/-1}
.st2530-check{display:flex!important;flex-direction:row!important;align-items:center;gap:9px}
.st2530-check input[type=checkbox]{width:20px;max-width:20px;min-width:20px;flex:0 0 20px}
@media(max-width:550px){.st2530-bulk-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.st2530-common-grid{grid-template-columns:1fr}.st2530-common-grid .st2530-common-pair{grid-template-columns:repeat(2,minmax(0,1fr))}.st2530-bulk-fields label:has(textarea){grid-column:1/-1}}

.st2530-common-disclosure{min-width:0}
.st2530-common-disclosure>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;font-weight:750;font-size:1rem;padding:12px 7px;border-radius:10px}
.st2530-common-disclosure>summary::-webkit-details-marker{display:none}
.st2530-common-disclosure>summary::after{content:'+';margin-left:auto;font-size:1.2rem;line-height:1;opacity:.75}
.st2530-common-disclosure[open]>summary::after{content:'−'}
.st2530-common-disclosure>summary:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.st2530-common-disclosure .st2530-common-grid{margin-top:10px}

/* V2.5.31: rename an existing breed across the entire collection, safely. */
.st2531-rename-section{border:1px solid rgba(151,109,77,.3);border-radius:14px;padding:4px 12px;background:color-mix(in srgb,var(--input-bg,#fff) 88%,#ddaa72 12%);min-width:0}
.st2531-rename-section .st2530-summary{font-size:1rem}
.st2531-rename-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
.st2531-rename-grid label{min-width:0;display:flex;flex-direction:column;gap:6px;font-weight:650}
.st2531-rename-grid input,.st2531-rename-grid select{max-width:100%;width:100%;min-width:0;box-sizing:border-box}
.st2531-rename-preview{margin:10px 0;padding:12px;border-radius:12px;border:1px solid rgba(128,128,128,.25);font-size:.9rem;min-width:0}
.st2531-rename-preview ul{padding-left:22px;margin:8px 0;max-height:185px;overflow-y:auto}
.st2531-rename-preview li{overflow-wrap:anywhere;margin-bottom:4px}
.st2531-rename-preview small{opacity:.72}
#st2531-rename-submit{min-height:44px;max-width:100%;white-space:normal}
@media(max-width:600px){.st2531-rename-grid{grid-template-columns:minmax(0,1fr)}.st2531-rename-section{padding:4px 10px}}

/* V2.5.33: prevent label activation swallowing suggestion taps on iPhone. */
.st2526-layout .st2532-search-field{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:.86rem;font-weight:650}
.st2526-layout .st2532-search-field>label{font-size:inherit;font-weight:inherit}
.st2526-layout .st2532-search-field .st2526-search-wrap{display:block;min-width:0}
.st2526-layout .st2532-one-pick{display:block;box-sizing:border-box;width:100%;max-width:100%;min-height:52px;margin-top:8px;padding:12px;text-align:left;white-space:normal;overflow-wrap:anywhere;font-weight:700;touch-action:manipulation;cursor:pointer}
.st2526-layout .st2532-one-pick[hidden]{display:none!important}
.st2526-layout .st2526-horse-option{touch-action:manipulation}

/* V2.5.37: exact breed selection in bulk editor, scoped to current stable */
.st2534-breed-picker{display:flex;flex-direction:column;gap:7px;padding:13px;border:1px solid var(--line,rgba(126,126,126,.30));border-radius:13px;min-width:0;background:var(--panel,#fff)}
.st2534-breed-picker>label{font-size:.94rem;font-weight:750}
.st2534-breed-actions{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:10px;align-items:stretch;min-width:0}
.st2534-breed-actions select,.st2534-breed-actions button{box-sizing:border-box;min-width:0;width:100%;max-width:100%;min-height:46px}
.st2534-breed-actions button{white-space:normal;overflow-wrap:anywhere;padding:9px 10px}
.st2534-breed-picker p{margin:0;font-size:.83rem;overflow-wrap:anywhere}
@media(max-width:600px){.st2534-breed-actions{grid-template-columns:minmax(0,1fr)}.st2534-breed-picker{padding:11px}}

/* Drafts must never look cloud-green while a text/time field is being edited. */
.st257-sync-indicator[data-phase="draft"] .st257-sync-dot{background:#b88d32;box-shadow:0 0 0 3px rgba(184,141,50,.14)}
.st257-sync-indicator[data-phase="draft"]{border-color:#b88d32}
@media(min-width:800px){.st257-sync-indicator{max-width:300px;white-space:normal}}
