.breed-room .breed-heading,.breed-parent-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.breed-room .breed-heading h2{font-size:20px}.breed-parent-title{min-height:46px;font-size:14px}.breed-stage{position:relative;overflow:hidden}.breed-tree{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(8,29px);border:1px solid #bbc4ae;margin-bottom:12px}.breed-blank{height:232px;display:grid;place-items:center;border:1px dashed #afb79b;background:#f5f2e9;margin-bottom:12px}.breed-cell{min-width:0;overflow:hidden;border:1px solid #fff9;display:flex;align-items:center}.breed-room .breed-cell button{background:transparent;border:0;box-shadow:none;border-radius:0;width:100%;padding:2px 4px;min-height:27px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;font-size:11px;color:#29465c}.breed-cell small{display:block;font-size:11px}.breed-mugi{position:absolute;right:-10px;bottom:-128px;width:255px;height:420px;object-fit:cover;object-position:top;pointer-events:none}.breed-dialog{position:relative;background:#fff9ed;border:2px solid #bda572;border-radius:12px;padding:14px;margin-bottom:12px}.breed-dialog>strong{background:#245c48;color:white;border-radius:7px;padding:5px 12px}.breed-dialog p{line-height:1.7;font-size:14px}.breed-dialog>button{display:block;margin-left:auto}.breed-badges{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.breed-badges span{background:#e9eed9;border-radius:7px;padding:6px;font-size:13px}.breed-candidate{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;border-bottom:1px solid #cfc6ae;padding:12px 0}.breed-candidate>div:first-child{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:14px}.breed-candidate>button{grid-column:2;grid-row:1/span 2;align-self:center}.breed-secondary{display:flex;gap:4px 10px;flex-wrap:wrap;font-size:12px}.breed-candidate strong{overflow-wrap:anywhere}.breed-room details{margin:10px 0}@media(max-width:360px){.breed-mugi{width:225px;height:370px;bottom:-112px}.breed-parent-title{font-size:12px}}
.stock-banner{padding:18px;border-radius:12px;background:#205740;color:#fff9e7;margin:0 0 14px}.stock-banner small{letter-spacing:.12em;font-size:10px}.stock-banner h2{color:inherit;font-size:21px}.stock-banner p{font-size:13px;margin-bottom:0}.stock-tabs{display:flex;gap:6px;overflow-x:auto;padding-bottom:12px;margin-bottom:12px}.stock-tabs button{white-space:nowrap;padding:9px 12px;font-size:13px;min-height:42px;flex-shrink:0}.stock-row-title{display:flex;gap:8px;justify-content:space-between;align-items:center}.stock-row-title strong{font-size:17px;overflow-wrap:anywhere}.stock-row-title span{font-size:12px;white-space:nowrap}.stock-room form{display:flex;align-items:end;gap:8px;flex-wrap:wrap}.stock-room form label{flex:1;min-width:150px}.stock-room input{max-width:100%;box-sizing:border-box}.stock-room .card{padding:14px}.stock-mugi{position:relative;padding-top:190px;overflow:hidden;min-height:360px}.stock-mugi>img{position:absolute;top:0;right:0;width:240px;max-width:75%;height:350px;object-fit:cover;object-position:top;pointer-events:none}.stock-mugi .breed-dialog{position:relative;margin-top:0;background:#fff9edee}.stock-room .stats strong{display:block;font-size:17px}.stock-room .muted{font-size:12px}
.breeding-compact{height:92svh;max-height:92svh}
.breeding-compact .panel-head{min-height:42px;padding:2px 8px}
.breeding-compact #panel-body{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;padding:8px 10px 0}
.breed-nav{display:flex;align-items:center;gap:5px;margin-bottom:6px;flex-shrink:0}
.breed-nav .tabs{flex:1;margin:0;padding:0;gap:4px}
.breed-nav button{font-size:12px;padding:5px 8px;min-height:36px;white-space:nowrap}
.breed-workspace{display:flex;flex-direction:column;flex:1;min-height:0;position:relative;isolation:isolate}
.breed-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 1px 8px}
.breed-workspace .breed-tree{grid-template-rows:repeat(8,clamp(19px,2.85svh,25px));margin-bottom:4px}
.breed-workspace .breed-blank{height:clamp(152px,22.8svh,200px);margin-bottom:4px;border-radius:8px}
.breed-workspace .breed-parent-title{min-height:39px;font-size:12px;gap:4px}
.breed-parent-title>div{min-width:0;flex:1}
.breed-parent-title strong{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.breed-parent-title small{display:block;font-size:10px;font-weight:normal;line-height:1.25}
.breed-workspace .breed-parent-title button{min-height:34px;padding:3px 7px;font-size:11px;flex-shrink:0}
.breed-workspace .breed-cell button{display:flex;align-items:center;gap:2px;min-height:0;height:100%;font-size:11px;line-height:1.2;padding:1px 3px;white-space:normal}
.breed-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;flex:1}
.breed-cell[style*="span 1"] .breed-name{-webkit-line-clamp:1}
.breed-workspace .breed-cell small{display:inline;font-size:10px;flex-shrink:0}
.breed-workspace .breed-cell[data-cross]{box-shadow:inset 0 0 0 1.5px #ad842e}
.breed-cross{border-radius:50%;background:#f5dc93;color:#573e10;min-width:12px;text-align:center;font-size:9px}
.breed-workspace .breed-badges{gap:4px;margin:5px 0;line-height:1.3}
.breed-workspace .breed-badges span{padding:3px 5px;font-size:11px}
.breed-workspace .breed-risk{background:#f8dddd;color:#8b3540}
.breed-workspace details{margin:4px 0;font-size:12px}
.breed-workspace summary{cursor:pointer;padding:5px 0;min-height:28px}
.breed-workspace .breed-settings input,.breed-workspace .breed-settings select{max-width:100%;width:100%;box-sizing:border-box}
.breed-workspace .breed-settings label{display:block;margin:8px 0}
.breed-consult{text-align:right;margin-top:4px}
.breed-consult button{font-size:12px;padding:4px 8px;min-height:34px}
.breed-footer{flex-shrink:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:3px 8px;border-top:1px solid #c8b984;padding:8px 2px max(8px,env(safe-area-inset-bottom));background:#fff9ec;z-index:3}
.breed-footer>div small{display:block;font-size:10px}
.breed-footer strong{font-size:18px}
.breed-footer>button{min-height:44px;font-size:15px;padding:7px 16px}
.breed-disabled-reason{width:100%;font-size:11px;color:#805144}
.breed-adv{position:absolute;z-index:4;left:0;right:0;bottom:72px;max-height:calc(100% - 90px);pointer-events:none;display:flex;flex-direction:column;justify-content:flex-end}
.breed-workspace .breed-mugi{position:relative;right:auto;bottom:auto;align-self:flex-end;width:170px;height:195px;max-height:28svh;object-fit:cover;object-position:top;margin-bottom:-26px;flex-shrink:1;min-height:0}
.breed-workspace .breed-dialog{pointer-events:auto;flex-shrink:0;padding:10px;margin:0;background:#fffaf1;border-width:1px;box-shadow:0 4px 20px #183e3633;max-height:45svh;overflow:auto}
.breed-workspace .breed-dialog>strong{font-size:12px;padding:3px 9px}
.breed-workspace .breed-dialog p{font-size:13px;line-height:1.6;margin:8px 0}
.breed-dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:5px}
.breed-dialog-actions button{font-size:12px;min-height:36px;padding:4px 9px}
.breed-dialog-actions small{font-size:10px}
@media(max-height:620px){.breed-workspace .breed-mugi{height:120px;width:115px}.breed-adv{bottom:82px}.breed-workspace .breed-dialog p{font-size:12px}}
/* v7.2.5 keeps the pedigree and Mugi stage, with one shared navigation path. */
#panel.breeding-mobile .panel-head .icon-button{min-width:44px;min-height:44px}
.breeding-mobile .breed-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;width:100%;min-width:0}
.breeding-mobile .breed-nav>button{min-height:44px;white-space:normal;padding:5px;font-size:12px;min-width:0}
.breeding-mobile .breed-nav>button.active,.breeding-mobile .breed-picker-filters>button.active{background:#245e4b;color:#fff9ed}
.breeding-mobile .breed-room>button,.breeding-mobile .breed-candidate>button,.breeding-mobile .breed-room>.actions>button,.breeding-mobile .breed-picker-filters>button{min-height:44px}
.breeding-mobile .breed-candidate>button{max-width:100px;white-space:normal;font-size:12px}
.breed-picker-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:10px 0}
.breed-picker-filters>button{min-width:0;white-space:normal;font-size:12px;padding:5px}
.breed-picker-mare{font-size:13px;line-height:1.6;color:#46604e}
.breed-plan-context{display:flex;align-items:center;justify-content:space-between;gap:7px;margin-bottom:7px}
.breed-plan-context>button{min-height:44px;font-size:12px;padding:5px 8px;flex-shrink:0}
.breed-plan-context>small{font-size:10px;line-height:1.5;text-align:right;color:#64735b}
.breeding-mobile .breed-parent-title>button,.breeding-mobile .breed-consult>button,.breeding-mobile .breed-dialog-actions>button{min-height:44px}
/* The commentary shares the chart row; the fee/confirmation footer owns its own row. */
.breeding-compact .breed-workspace{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}
.breeding-compact .breed-scroll{grid-area:1/1;min-width:0}
.breeding-compact .breed-footer{grid-area:2/1;min-width:0}
.breeding-compact .breed-adv{grid-area:1/1;align-self:end;position:relative;left:auto;right:auto;bottom:auto;max-height:100%;min-height:0;width:100%;padding-bottom:7px}
.breeding-compact .breed-workspace .breed-dialog{flex-shrink:1;min-height:0}
.breeding-mobile .breed-room input[type=search]{font-size:16px;min-height:44px;box-sizing:border-box;width:100%;max-width:100%}
@media(max-width:360px){.breeding-mobile .breed-nav>button{font-size:11px}.breed-plan-context>small{max-width:130px}}
