/* In-game planning: the panel leaves the shop available and never pauses play. */
.team-builder[hidden]{display:none!important}
.team-builder{position:fixed;z-index:90;top:9vh;left:50%;transform:translateX(-50%);width:min(1100px,96vw);height:min(590px,65vh);box-sizing:border-box;display:flex;flex-direction:column;border:2px solid #b49a5b;border-radius:8px;background:linear-gradient(135deg,#163744f7,#071d2afc);color:#f6edd4;box-shadow:0 16px 48px #0009;font:13px 'Noto Sans KR',sans-serif;text-shadow:0 1px 2px #000}
.team-builder *{box-sizing:border-box}.team-builder button,.team-builder input,.team-builder select{font:inherit}.team-builder button{cursor:pointer}.team-builder button:focus-visible,.team-builder input:focus-visible,.team-builder select:focus-visible{outline:2px solid #ffe79e;outline-offset:2px}
.team-builder-heading{display:flex;align-items:center;gap:20px;padding:10px 16px;border-bottom:1px solid #947c49;background:#061b26b3}.team-builder-heading h2{font-size:20px;margin:0}.team-builder-heading small{font-size:9px;color:#d9bc78;letter-spacing:2px}.team-builder-heading p{flex:1;margin:0;font-size:12px;color:#bdced0}.team-builder button:not(.team-unit){padding:6px 10px;border:1px solid #8b784c;color:#f4ddb0;background:#102b35;border-radius:3px}
.team-builder-layout{display:grid;grid-template-columns:minmax(220px,34%) minmax(0,1fr);flex:1;min-height:0}.team-catalog{display:flex;flex-direction:column;min-height:0;padding:12px;border-right:2px solid #907647}.team-filters{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:9px}.team-filters input{grid-column:1/-1}.team-builder input,.team-builder select{min-width:0;background:#071c28;border:1px solid #6a7e7d;border-radius:3px;color:#fff;padding:6px}.team-catalog-list{overflow:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 6px;align-content:start;padding:2px 3px 8px}.team-catalog-selected{min-width:0}.team-catalog-selected .team-unit{width:100%}.team-unit{position:relative;min-width:0;display:flex;flex-direction:column;align-items:stretch;padding:0;border:2px solid #8e9da6;border-radius:3px;background:#203e4c;color:#fff;overflow:hidden}.team-unit.cost-2{border-color:#38ae68}.team-unit.cost-3{border-color:#4597df}.team-unit.cost-4{border-color:#bd66d9}.team-unit.cost-5{border-color:#e6bd58}.team-unit-art{height:75px;display:block;background:radial-gradient(at 50% 80%,#50677b,#132735)}.team-unit-art img,.team-unit-art svg{width:100%;height:100%;object-fit:cover;object-position:50% 20%}.team-unit strong{font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding:3px 1px 0;background:#071c28b3}.team-unit small{font-size:9px;min-height:16px;background:#071c28b3;color:#dcdfd7}.team-unit-cost{position:absolute;right:2px;top:2px;font-size:10px;background:#061823c9;padding:1px 3px;color:#ffe6a2}.team-unit:hover{filter:brightness(1.18)}.team-unit.planned{box-shadow:inset 0 0 0 2px #b6f0bb}.team-unit.planned strong{background:#205a3e}.team-plan-emblem{position:absolute;top:0;left:4px;display:grid;place-items:center;width:25px;height:31px;font-size:20px;line-height:1;color:#fff6ce;background:linear-gradient(#417c58,#20513a);border:1px solid #d0dfb3;clip-path:polygon(0 0,100% 0,100% 84%,50% 100%,0 84%);filter:drop-shadow(0 2px 2px #000);pointer-events:none;z-index:3}
.team-plan{display:flex;flex-direction:column;min-height:0;padding:12px;gap:9px}.team-plan-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.team-plan-toolbar label{display:flex;align-items:center;gap:6px;font-size:11px}.team-plan-toolbar label:first-child{flex:1}.team-plan-toolbar [data-team-name]{width:100%;max-width:200px}.team-plan-toolbar b{color:#edcf85;white-space:nowrap}.team-shop-toggle{white-space:nowrap}.team-plan-content{display:grid;grid-template-columns:minmax(115px,27%) minmax(0,1fr);gap:10px;min-height:0;flex:1;overflow:auto}.team-plan-traits{overflow:auto;min-width:0}.team-trait{display:flex;align-items:center;gap:6px;margin-bottom:5px;padding:5px;color:#acbcc1;border:1px solid #ffffff15;border-radius:4px;background:#07182599}.team-trait>span{font-size:18px}.team-trait>div{flex:1;min-width:0}.team-trait strong{font-size:11px;display:block}.team-trait small{font-size:9px;display:block;color:#8ca3ac}.team-trait b{font-size:11px;white-space:nowrap}.team-trait.active{border-color:#cbb26a;background:#344437;color:#ffe4a0}.team-trait.active small{color:#e0cca0}.team-plan-slots{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px 7px;align-content:start}.team-plan-slots .team-unit-art{height:95px}.team-empty-slot{min-height:128px;background:#0a222c88;border:1px dashed #6a7e7d77;display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:4px;color:#728b95}.team-empty-slot span{font-size:23px}.team-empty-slot small{font-size:10px}.team-plan footer{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.team-plan footer small{font-size:10px;color:#b6c6c7}.team-plan-status{font-size:11px;color:#ffe6a2;margin:0;min-height:16px}.team-empty{font-size:11px;line-height:1.8;color:#9fb5bb;margin:10px 5px}
.shop-card .team-plan-shop-badge{position:absolute;inset:5px auto auto 6px;z-index:6;pointer-events:none}.shop-card .team-plan-shop-badge .team-plan-emblem{position:relative;left:0}.shop-card.team-planned .combine-label{left:39px}.shop-card.team-planned:after{content:'';position:absolute;inset:0;box-shadow:inset 0 0 0 2px #87d39580;pointer-events:none;border-radius:inherit}
/* Strong contrast without changing the battlefield or sidebar dimensions. */
.synergy-panel .synergy-row.active,body.arena-focused .synergy-panel .synergy-row.active{background:linear-gradient(100deg,#102028f2,#12212ce0);border-radius:5px;box-shadow:inset 3px 0 #f0cf78,inset 0 0 0 1px #d7bc6c90,0 2px 5px #0006;color:#fff3d1}
.synergy-panel .synergy-row.active .trait-icon{color:#ffe59b;background:#55482ce6;border-color:#ebcf85;box-shadow:0 0 5px #f7d78140}.synergy-panel .synergy-row.active .trait-name{font-weight:900;color:#fff4d2;text-shadow:0 2px 2px #000,1px 0 #000,-1px 0 #000}.synergy-panel .synergy-row.active .reached{color:#ffe073}.synergy-panel .synergy-row .trait-count{display:flex;flex-direction:column;align-items:center;justify-content:center}.synergy-panel .synergy-row .trait-count small{font-size:8px;line-height:1.2;color:#ffe29a;white-space:nowrap}.synergy-panel .synergy-row:not(.active){background:#0b1e284a}.synergy-panel .synergy-row:not(.active) .trait-name{color:#cad4da}
.carousel-layout{display:grid;grid-template-columns:minmax(0,1fr) 170px;gap:12px}.carousel-owned-traits{margin-top:14px;padding:12px 10px;border:1px solid #b49a5b88;border-radius:9px;background:#09222dee;overflow:auto;max-height:clamp(500px,60vw,680px)}.carousel-owned-traits h3{font-size:15px;margin:0 0 5px;color:#ffe4a0}.carousel-owned-traits>p{font-size:10px;color:#afc4c9;margin:0 0 10px}.carousel-owned-traits .team-trait strong{font-size:11px}.carousel-offer{height:130px;width:94px}.carousel-unit{height:75px;flex-shrink:0}.carousel-offer-traits{display:flex;justify-content:center;gap:4px;font-size:12px;line-height:17px;color:#ffe3a0}.carousel-offer-traits span{display:inline-block;min-width:16px;background:#071927bb;border-radius:2px}.carousel-captain.mine{z-index:7;filter:none}.carousel-captain.mine .captain-model{filter:drop-shadow(1px 0 #fff1ac) drop-shadow(-1px 0 #fff1ac) drop-shadow(0 0 5px #ffc845)}.carousel-captain.mine:before{content:'▼ 나';display:block;width:48px;margin:0 auto 1px;padding:3px 1px;color:#162630;background:#ffe591;border:2px solid #fff3cb;border-radius:4px;box-shadow:0 2px 8px #000b;font-weight:900;font-size:13px;text-shadow:none}.carousel-captain.mine strong,.carousel-captain.mine small{width:max-content;max-width:100%;display:block;margin:auto;padding:1px 4px;background:#102937ef;color:#fff2ac;border-radius:3px;text-shadow:0 1px #000}.carousel-my-legend{color:#ffe491;font-weight:800}.carousel-unit-traits-tip{color:#d9d6b8}
@media(max-width:850px){.team-builder{width:98vw}.team-builder-layout{grid-template-columns:minmax(180px,32%) minmax(0,1fr)}.team-builder-heading{padding:6px 10px}.team-builder-heading p{font-size:10px}.team-catalog,.team-plan{padding:7px}.team-catalog-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.team-unit-art{height:54px}.team-plan-content{grid-template-columns:105px minmax(0,1fr);gap:6px}.team-plan-slots{gap:6px 4px}.team-plan-slots .team-unit-art{height:67px}.team-empty-slot{min-height:100px}.team-plan-toolbar{gap:5px}.team-unit strong{font-size:9px}.team-filters select{font-size:10px;padding:4px}.team-plan-toolbar label{font-size:10px}.carousel-layout{grid-template-columns:minmax(0,1fr) 135px;gap:6px}.carousel-owned-traits{padding:8px 6px}.carousel-offer{width:70px;height:105px}.carousel-unit{height:55px}.carousel-offer-traits{font-size:10px;line-height:15px;gap:2px}}
@media(max-height:650px){.team-builder{top:8vh;height:65vh}.team-builder-heading{gap:10px;padding:4px 10px}.team-builder-heading h2{font-size:15px}.team-builder-heading small{display:none}.team-builder input{padding:3px}.team-plan-toolbar{gap:5px}.team-plan-toolbar label:first-child{font-size:0}.team-plan-toolbar [data-team-name]{font-size:11px}.team-plan-slots .team-unit-art{height:46px}.team-unit-art{height:46px}.team-empty-slot{min-height:78px}.team-plan-content{min-height:90px}.team-plan footer button{font-size:10px!important;padding:3px 6px!important}.team-plan footer small{display:none}.team-plan-status{font-size:10px;min-height:12px}.team-plan{gap:5px}.team-filters{gap:4px;margin-bottom:4px}.team-filters input,.team-filters select{padding:3px;font-size:10px}.team-trait{padding:3px;gap:4px}.team-trait strong{font-size:10px}.carousel-owned-traits{margin-top:6px;max-height:max(205px,calc(96dvh - 175px))}.carousel-owned-traits h3{font-size:12px}.carousel-offer{height:85px;width:64px}.carousel-unit{height:37px}.carousel-offer-traits{font-size:9px;line-height:12px}.carousel-offer-traits span{min-width:13px}.carousel-captain.mine:before{font-size:10px;width:35px;padding:1px;border-width:1px}.carousel-my-legend{font-size:10px}.carousel-unit-traits-tip{font-size:11px}}
@media(max-width:560px){.team-builder-heading p{display:none}.team-builder-heading>div{flex:1}.team-builder-layout{grid-template-columns:38% minmax(0,1fr)}.team-catalog-list{grid-template-columns:repeat(2,minmax(0,1fr))}.team-plan-content{grid-template-columns:1fr}.team-plan-traits{display:none}.team-plan-slots{grid-template-columns:repeat(3,minmax(0,1fr))}.team-plan-toolbar [data-team-name]{max-width:125px}.carousel-layout{grid-template-columns:1fr}.carousel-owned-traits{max-height:130px;display:flex;flex-wrap:wrap;gap:4px}.carousel-owned-traits h3,.carousel-owned-traits>p{width:100%}.carousel-owned-traits .team-trait{flex:1 0 100px}.team-plan-emblem{width:19px;height:25px;font-size:17px}}
.team-catalog-list{grid-auto-rows:max-content;flex:1;min-height:0}.team-unit{height:max-content;align-self:start}
.carousel-dialog .carousel-help .carousel-my-legend{color:#654a1c;background:#ffe9ad;border:1px solid #b49758;padding:2px 5px;border-radius:3px;text-shadow:none}.team-unit strong,.team-unit small{flex-shrink:0}.team-catalog-list>.team-unit{min-height:max-content}@media(max-width:560px){.team-plan-traits{display:block;max-height:110px}.team-plan-content{grid-template-rows:auto 1fr}}
