.deck-workshop{width:min(1000px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);padding:0;border:1px solid #dedede;border-radius:16px;background:#fff;color:#222;box-shadow:0 16px 60px #0002;text-align:left}
.deck-workshop::backdrop{background:#0007}
.deck-workshop-header-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px}.deck-shop-balance{font-size:14px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.deck-workshop-heading{display:flex;align-items:center;gap:12px;min-width:0}.deck-workshop .deck-shop-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;flex:none}.deck-workshop .deck-shop-button[hidden]{display:none}.deck-workshop-content:empty{min-height:240px}
#deck-builder-modal .deck-quantity button{width:44px;min-height:44px}
#deck-builder-modal.deck-workshop .deck-preset-preview .card{width:76px;min-width:0;max-width:76px;flex:1 1 76px;height:108px;min-height:108px;max-height:108px}
#deck-builder-modal.deck-workshop .deck-workshop-card>.card{width:112px;min-width:0;flex:none;height:152px;min-height:152px;max-height:152px}
/* Selected cards drop to the board-card size, so a glance separates deck from pool. */
#deck-builder-modal.deck-workshop .deck-workshop-card>.card.mini-card-render{width:88px;max-width:88px;height:122px;min-height:122px;max-height:122px}
#deck-builder-modal.deck-workshop .deck-workshop-card>.card.mini-card-render{--card-spirit-track-display:none}
#deck-builder-modal.deck-workshop .deck-workshop-card>.card.mini-card-render .spirit-track{display:none}
.deck-workshop>header,.deck-workshop>footer{display:flex;align-items:center;gap:12px;padding:18px 24px;background:#fff}
.deck-workshop>header{justify-content:space-between;border-bottom:1px solid #e5e5e5}.deck-workshop h2{margin:0;font-size:24px}.deck-workshop h3{margin:0 0 12px;font-size:20px}
.deck-workshop>footer{position:sticky;bottom:0;border-top:1px solid #e5e5e5;z-index:5;flex-wrap:wrap}.deck-workshop-status{flex:1;margin:0;font-size:14px;min-width:180px}
.deck-workshop-content{padding:24px}.deck-workshop-hint{color:#666;font-size:14px;line-height:1.6}.deck-workshop-error{margin:0 24px;color:#a82727}.deck-workshop-error:empty{display:none}
.deck-workshop button{min-height:40px;border-radius:8px}.deck-workshop button:disabled{opacity:.45;cursor:not-allowed}.deck-workshop button.secondary{background:#f5f5f5;color:#333;border:1px solid #ddd}
.deck-preset-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin:12px 0}.deck-preset-tile{min-width:0;border:1px solid #dedede;border-radius:12px;padding:14px}.deck-preset-tile>p{margin:8px 0;font-size:14px;line-height:1.5}.deck-preset-header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:8px}.deck-preset-header h3{min-width:0;margin:4px 0;font-size:18px;overflow-wrap:anywhere}.deck-preset-actions{display:flex;flex:none;gap:6px}.deck-workshop .deck-preset-actions button{min-height:34px;padding:6px 10px;font-size:13px;white-space:nowrap}.deck-workshop .deck-preset-view{background:#fff;color:#222;border:1px solid #ccc}.deck-workshop .deck-preset-select{background:#111;color:#fff;border:1px solid #111}.deck-workshop>footer:has(.deck-workshop-status[hidden]){justify-content:flex-end}.deck-preset-tag{display:inline-block;background:#f1f1f1;border-radius:5px;padding:4px 8px;color:#555;font-size:12px}
.deck-preset-preview{display:flex;gap:8px;overflow:hidden;padding:6px 0}.deck-workshop .card{position:relative;display:flex;flex:none;box-sizing:border-box;width:112px;height:152px;min-height:152px;max-height:152px;margin:0;padding:8px;overflow:hidden;font-size:11px;text-align:center}.deck-preset-preview .card{width:76px;height:108px;min-height:108px;max-height:108px}
.deck-workshop-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:16px 0 24px}.deck-workshop-toolbar input[type=search]{flex:1;min-width:160px}.deck-workshop-toolbar :is(input[type=search],select){height:44px;border:1px solid #ccc;border-radius:8px;padding:8px 12px;background:#fff;color:#222;font:inherit;font-size:14px}.deck-workshop-toolbar label{display:flex;align-items:center;gap:6px;font-size:14px}
.deck-workshop-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:22px 14px}.deck-workshop-card{display:grid;grid-template-rows:152px auto;place-items:center;gap:12px;min-width:0}.deck-workshop-card[hidden]{display:none}.deck-workshop .card.selected{outline:2px solid #333;outline-offset:3px;box-shadow:none}
.deck-quantity{display:flex;align-items:center;justify-content:space-between;width:112px;gap:4px}.deck-quantity button{width:36px;min-height:36px;padding:0;font-size:20px}.deck-quantity output{font-size:14px;font-variant-numeric:tabular-nums}.deck-quantity output.deck-count-two{color:#2563eb}.deck-quantity output.deck-count-many{color:#dc2626}
.deck-workshop .card:not(.mini-card-render) :is(.card-title){font-size:9px}.deck-workshop .card:not(.mini-card-render) .card-ability{font-size:7px}.deck-workshop .card:not(.mini-card-render) :is(.card-level,.card-element,.card-stat){font-size:8px}.deck-workshop .card:not(.mini-card-render) .card-abilities{top:38px;bottom:26px}.deck-workshop .card-details-modal .card{width:168px;height:214px;min-height:214px;max-height:none;margin:10px auto 16px}
@media(max-width:600px){#deck-builder-modal.deck-workshop .deck-workshop-card>.card.mini-card-render{width:80px;max-width:80px;height:110px;min-height:110px;max-height:110px}.deck-workshop{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.deck-workshop-content{padding:16px}.deck-workshop>header,.deck-workshop>footer{padding:14px 16px}.deck-workshop-status{flex-basis:100%}.deck-preset-grid{grid-template-columns:1fr}.deck-workshop-cards{gap:20px 10px;grid-template-columns:repeat(auto-fill,minmax(112px,1fr))}}
.deck-shop-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:16px}
.deck-shop-item{display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px 10px;border:1px solid #dedede;border-radius:12px;text-align:center}
.deck-workshop .deck-shop-item h3{font-size:16px;margin:10px 0 0;overflow-wrap:anywhere}.deck-shop-item p{margin:0;color:#555}.deck-shop-item small{color:#777}.deck-shop-item>button:last-of-type{width:100%;font-size:14px;padding:8px 4px;white-space:nowrap}
.deck-workshop .deck-card-locked>.card{opacity:1;cursor:pointer}
.deck-card-lock{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:rgba(15,23,42,.7);color:#fff;font-size:13px;pointer-events:auto;border-radius:inherit}
