.workshop-dialog{width:min(1020px,96vw)}
.family-workshop{display:grid;grid-template-columns:minmax(270px,.85fr) minmax(340px,1.2fr);grid-template-areas:"selection stock" "actions stock";gap:16px 22px;align-items:start}
.workshop-selection{grid-area:selection;min-width:0;border:1px solid #cadac5;border-radius:13px;padding:14px;background:linear-gradient(135deg,#e7efe0,#f9f9eb)}
.workshop-heading{display:flex;align-items:center;gap:14px}
.workshop-heading h3{font-size:20px;margin-bottom:7px}
.workshop-heading h3 b{color:#9e7332;font-size:17px}
.workshop-heading .tags{display:flex;gap:5px;margin-bottom:8px}
.workshop-heading>div>span{font-size:12px;color:#536a56}
.workshop-portrait{flex-shrink:0;width:100px;height:104px;display:grid;place-items:center;border:3px solid var(--stage-color);border-radius:12px;background:radial-gradient(circle,#fff8e4,color-mix(in srgb,var(--stage-color) 32%,#f6efda));box-shadow:inset 0 0 0 2px #fff9e4a1}
.workshop-portrait img{width:92px;height:92px;object-fit:contain;image-rendering:auto;filter:drop-shadow(0 4px 2px #223d3326)}
.workshop-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
.workshop-stats>div{text-align:center;border-right:1px solid #cfdac5;min-width:0}
.workshop-stats>div:last-child{border:0}
.workshop-stats small{display:block;font-size:11px;color:#6d7c69}
.workshop-stats b{font-size:15px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.workshop-selection .pokemon-skill{margin:0;padding:11px;background:#fffbedb3}
.workshop-selection .pokemon-skill h3{font-size:14px;margin-bottom:4px}
.workshop-selection .pokemon-skill p{font-size:12px;line-height:1.65}
.workshop-stock{grid-area:stock;min-width:0;border:2px solid #537b71;border-radius:13px;background:#e1e9de;overflow:hidden}
.workshop-stock-head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:11px 13px;background:#2e5951;color:#fff6d9;min-height:51px}
.workshop-stock-head h3{font-size:14px}
.workshop-inventory{max-height:min(570px,64dvh);overflow:auto;overscroll-behavior:contain;padding:12px;scrollbar-color:#779887 #dce5d7;scrollbar-width:thin}
.evolution-row+.evolution-row{margin-top:14px;padding-top:12px;border-top:1px solid #b9cdbb}
.evolution-row-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.evolution-row-head h3{font-size:13px;color:#35584a;margin:0;display:flex;align-items:center;gap:6px}
.evolution-row-head h3:before{content:"";width:10px;height:10px;border-radius:3px;background:var(--stage-color);border:1px solid #324b4238}
.family-auto-merge{font-size:12px;min-height:40px;padding:6px 12px;border:1px solid #b9ceab;background:#fff4ce;color:#294f42;border-radius:7px;white-space:nowrap}
.family-auto-merge:hover{background:#ffe6a0}
.evolution-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.evolution-card{position:relative;min-width:0;display:flex;flex-direction:column;align-items:center;border:3px solid var(--stage-color);border-radius:10px;padding:9px 2px 5px;background:radial-gradient(ellipse at 50% 35%,#fff6d6,color-mix(in srgb,var(--stage-color) 42%,#e7ecd8));box-shadow:inset 0 0 0 2px #fff6dd70,0 2px 0 #29443a60;min-height:104px;color:#273e32}
.evolution-card:hover{background:color-mix(in srgb,var(--stage-color) 30%,#fff9df)}
.evolution-card img{width:64px;height:64px;max-width:100%;object-fit:contain;image-rendering:auto;filter:drop-shadow(0 3px 1px #20382b38)}
.evolution-card>strong{font-size:14px;line-height:1.3;text-shadow:0 1px #fff9eaa1}
.evolution-card.unowned img{opacity:.37;filter:grayscale(.35)}
.evolution-card.unowned .tier-count{color:#718072;background:#f1f2e1d1}
.evolution-card.selected{outline:3px solid #e3b750;outline-offset:1px;box-shadow:inset 0 0 0 2px #fff6cf,0 2px 0 #29443a60}
.evolution-card:focus-visible{outline:3px solid #174d49;outline-offset:2px}
.tier-count{position:absolute;top:3px;right:3px;z-index:1;font-size:10px;line-height:1.4;padding:0 3px;border-radius:4px;background:#fffbeaeb;color:#264839}
.tier-count b{font-size:16px}.tier-count small{font-size:9px;margin-left:1px}
.tier-equipped{position:absolute;left:2px;top:3px;border-radius:3px;background:#235950;color:#fff6d8;font-size:8px;padding:1px 3px}
.workshop-actions{grid-area:actions;min-width:0}
.target-path{font-size:13px;font-weight:650;line-height:1.5;color:#315d50}
.target-outcome{font-size:12px;color:#776443;margin:6px 0 12px}
.target-merge-button{min-height:44px;font-size:13px}
.workshop-extra{border-top:1px solid #d5dfcb;margin-top:10px;padding-top:7px;font-size:12px}
.workshop-extra>summary{cursor:pointer;padding:6px 0;font-weight:650;min-height:34px}
.workshop-extra>p{font-size:11px;margin-top:8px;color:#62705c}
.workshop-extra .instance-panel{padding:8px;margin-top:4px;border:0}
.workshop-extra .row{gap:5px;flex-wrap:wrap;margin-top:8px}
.workshop-dialog .selection-footer{font-size:14px;white-space:nowrap}
.workshop-dialog .dialog-foot{flex-wrap:wrap;gap:8px;padding:12px 20px}
.merge-target-summary{text-align:center;margin-bottom:16px}
.merge-target-summary strong{font-size:20px;color:#226c5e}
.merge-target-summary p{font-size:12px;margin-top:6px;color:#75816d}
@media(max-width:700px){
 .workshop-dialog .dialog-head{padding:12px 14px}.workshop-dialog .dialog-head h2{font-size:19px}
 .workshop-dialog .dialog-body{padding:12px}
 .family-workshop{grid-template-columns:minmax(0,1fr);grid-template-areas:"selection" "stock" "actions";gap:12px}
 .workshop-selection{padding:10px}.workshop-heading{gap:10px}.workshop-heading h3{font-size:18px;margin-bottom:5px}.workshop-heading h3 b{font-size:16px}
 .workshop-portrait{width:76px;height:80px}.workshop-portrait img{width:72px;height:72px}
 .workshop-heading .tags{margin-bottom:5px}.workshop-heading>div>span{font-size:11px}
 .workshop-stats{margin:9px 0}.workshop-stats b{font-size:14px}
 .workshop-selection .pokemon-skill{padding:9px}.workshop-selection .pokemon-skill p{font-size:11px}
 .workshop-stock-head{padding:8px 10px;min-height:42px}
 .workshop-inventory{max-height:305px;padding:9px}
 .evolution-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
 .evolution-card{min-height:95px;padding-top:8px;border-width:2px}.evolution-card img{width:59px;height:59px}.evolution-card>strong{font-size:13px}
 .evolution-row+.evolution-row{margin-top:11px;padding-top:9px}.evolution-row-head{margin-bottom:6px}.evolution-row-head h3{font-size:12px}.family-auto-merge{font-size:11px;padding:5px 9px}
 .tier-count b{font-size:15px}.tier-equipped{top:22px;font-size:8px}
 .workshop-dialog .dialog-foot{padding:10px 12px;gap:7px}.workshop-dialog .selection-footer{font-size:12px;width:auto;flex:1 1 auto}
 .workshop-dialog .target-merge-button{flex:1 0 100%;font-size:13px;min-height:44px}
}
@media(max-height:550px) and (orientation:landscape){.workshop-inventory{max-height:58dvh}.workshop-selection{padding:10px}.workshop-dialog .dialog-head{padding:8px 15px}.workshop-dialog .dialog-foot{padding:8px 15px}}
