/* Team Builder: three-column layout and the honeycomb board (also used read-only in comp guides). */
.bd-layout{display:grid;grid-template-columns:250px minmax(0,1fr) 290px;gap:16px;align-items:start;margin-top:6px}
.bd-side,.bd-main{display:grid;gap:16px;min-width:0}
.bd-panel{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:16px;min-width:0}
.bd-panel h2{font-size:16px;line-height:1.3;margin:0 0 12px;color:var(--ink)}
.bd-note{font-size:10px;line-height:1.6;color:var(--secondary);margin:10px 0 0}
.bd-label{display:block;font-size:10px;font-weight:600;letter-spacing:.3px;color:var(--secondary);margin-bottom:7px}

/* Honeycomb: pointy-top hexes, 7 per row, odd rows shifted half a hex right (as in the API's cell numbering). */
.hx-board{--gap:6px;--hx-edge:color-mix(in srgb,var(--ink) 13%,var(--surface));--hx-fill:color-mix(in srgb,var(--ink) 5%,var(--surface));background:color-mix(in srgb,var(--ink) 3%,var(--surface));border:1px solid var(--border);border-radius:10px;padding:14px 16px 12px;max-width:720px;margin:0 auto}
.hx-label{text-align:center;font-size:8px;letter-spacing:1.6px;color:var(--secondary);margin:0 0 14px}
.hx-label:last-child{margin:8px 0 0}
.hx-grid{container-type:inline-size;padding-bottom:6px}
.hx-row{--w:calc((100cqi - 6.5*var(--gap))/7.5);display:flex;gap:var(--gap)}
.hx-row+.hx-row{margin-top:calc(var(--gap)*.87 - var(--w)*.2887)}
.hx-row:nth-child(even){margin-left:calc((var(--w) + var(--gap))/2)}
.hx{position:relative;flex:0 0 var(--w);width:var(--w);height:calc(var(--w)*1.1547);padding:0;margin:0;border:0;background:none;color:inherit;font:inherit;display:block}
button.hx{cursor:pointer}
button.hx.filled{cursor:grab}
.hx-shape{position:absolute;inset:0;display:grid;place-items:center;clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);background:var(--hx-edge);transition:background .12s}
.hx-shape::before{content:'';position:absolute;inset:2px;clip-path:inherit;background:var(--hx-fill)}
.hx.filled .hx-shape{background:var(--cost)}
.hx.filled .hx-shape::before{inset:3px;background:color-mix(in srgb,var(--cost) 18%,var(--surface))}
.hx-sprite{position:relative;z-index:1;width:80%;height:auto;max-width:none;image-rendering:pixelated;pointer-events:none}
.hx-plus{position:relative;z-index:1;font-size:calc(var(--w)*.3);line-height:1;color:var(--secondary);opacity:.5}
button.hx:not(.filled):hover .hx-shape{background:color-mix(in srgb,var(--ink) 30%,var(--surface))}
button.hx.filled:hover .hx-shape{filter:brightness(1.08)}
.hx.selected .hx-shape{background:var(--accent)}
.hx.selected:not(.filled) .hx-shape::before{background:color-mix(in srgb,var(--accent) 12%,var(--surface))}
.hx.selected .hx-plus{color:var(--accent);opacity:1}
.hx.drop .hx-shape{background:var(--focus)}
.hx.moving{opacity:.45}
button.hx:focus-visible{outline:none}
button.hx:focus-visible .hx-shape{background:var(--focus)}
.hx-stars{position:absolute;left:50%;top:12%;transform:translateX(-50%);z-index:2;font-size:calc(var(--w)*.14);line-height:1;letter-spacing:-1px;color:#f0ad2e;text-shadow:0 1px 0 #00000059;white-space:nowrap;pointer-events:none}
.hx-types{position:absolute;left:50%;top:calc(var(--w)*-.1);transform:translateX(-50%);z-index:3;display:flex;gap:2px;pointer-events:none}
.hx-types i{display:grid;place-items:center;width:calc(var(--w)*.25);height:calc(var(--w)*.25);border-radius:50%;background:var(--surface);border:1.5px solid var(--type);color:var(--type)}
.hx-types .icon{width:62%;height:62%}
.hx-items{position:absolute;left:50%;bottom:calc(var(--w)*-.05);transform:translateX(-50%);z-index:3;display:flex;gap:2px;pointer-events:none}
.hx-items .item-icon{width:calc(var(--w)*.25);height:calc(var(--w)*.25);border-radius:4px;border-width:1px}
.hx-items .item-icon img{width:100%;height:100%;inset:0}
.hx-items .item-fallback,.hx-items .emblem-icon .icon{width:70%;height:70%}
.hx-compact{max-width:460px;margin:0;padding:12px 12px 10px}
.hx-compact .hx-label{margin-bottom:10px}

/* Board panel. */
.bd-board-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px}
.bd-board-head h2{margin:0}
.bd-count{font-size:12px;font-weight:600;color:var(--accent);margin-left:4px}
.bd-active{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.bd-active span{display:inline-flex;align-items:center;gap:4px;font-size:10px;font-weight:600;padding:3px 7px 3px 5px;border-radius:999px;color:var(--ink);background:color-mix(in srgb,var(--type) 18%,transparent);border:1px solid color-mix(in srgb,var(--type) 55%,transparent)}
.bd-active .icon{width:12px;height:12px;color:var(--type)}
.bd-detail{margin-top:16px;padding-top:14px;border-top:1px solid var(--border)}
.bd-detail.is-moving{border-top-color:var(--focus)}
.bd-detail-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.bd-detail-head h3{font-size:15px;margin:0;color:var(--ink);flex:1;min-width:160px}
.bd-detail-head h3 small{display:block;font-size:10px;font-weight:500;color:var(--secondary);margin-top:2px}
.bd-detail-sprite{width:44px;height:44px;image-rendering:pixelated}
.bd-detail-actions{display:flex;gap:6px;flex-wrap:wrap}
.bd-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:14px}
.bd-slots{display:grid;gap:6px}
.bd-slot{display:flex;align-items:center;gap:8px;min-height:34px;padding:4px 8px;border:1px dashed var(--border);border-radius:7px;font-size:10px;color:var(--secondary);background:none;text-align:left;font-family:inherit}
.bd-slot.filled{border-style:solid;background:var(--surface-soft);color:var(--ink);cursor:pointer}
.bd-slot.filled span{flex:1;font-weight:600}
.bd-slot.filled i{font-style:normal;font-size:14px;color:var(--secondary)}
.bd-slot.filled:hover i{color:var(--accent)}
.bd-slot .item-icon{width:26px;height:26px}
.bd-slot .item-icon img{width:22px;height:22px;inset:1px}

/* Pokémon pool. */
/* Pool: Pokémon and items share a sticky column beside the board, so drag targets stay in view. */
.bd-side-pool{position:sticky;top:12px}
.bd-pool-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:3px;margin-bottom:12px;border-radius:8px;background:var(--surface-soft)}
.bd-pool-tabs button{border:0;border-radius:6px;padding:8px 6px;background:none;font:inherit;font-size:12px;font-weight:600;color:var(--secondary);cursor:pointer}
.bd-pool-tabs button[aria-selected=true]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px #0000001f}
.bd-pool input[type=search]{width:100%}
.bd-pool-filters{margin-top:8px;gap:4px}
.bd-pool-filters .chip{padding:5px 8px;font-size:10px}
.bd-pool-list{max-height:calc(100vh - 300px);min-height:220px;overflow:auto;padding:2px;margin-top:10px}
.bd-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:6px}
.bd-pick{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 4px 6px;border:1px solid var(--border);border-bottom:3px solid var(--cost);border-radius:7px;background:var(--surface);color:var(--ink);cursor:grab;font-family:inherit;min-width:0}
.bd-pick:hover{border-color:var(--cost)}
.bd-pick img{width:46px;height:46px;image-rendering:pixelated;pointer-events:none}
.bd-pick b{font-size:9px;font-weight:600;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bd-pick-types{display:flex;gap:2px}
.bd-pick-types i{display:grid;place-items:center;width:14px;height:14px;color:var(--type)}
.bd-pick-types .icon{width:12px;height:12px}
.bd-pick.placed{opacity:.42}
.bd-pick.placed::after{content:'✓';position:absolute;top:3px;right:6px;font-size:10px;font-weight:700;color:var(--secondary)}

/* Items. */
.bd-item-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(42px,1fr));gap:6px;align-content:start}
.bd-item{aspect-ratio:1;display:grid;place-items:center;padding:0;border:1px solid var(--border);border-radius:8px;background:var(--surface-soft);cursor:grab}
.bd-item:hover,.bd-item:focus-visible{border-color:var(--accent)}
.bd-item .item-icon{width:30px;height:30px;border:0;background:none}
.bd-item .item-icon img{width:28px;height:28px;inset:1px;background:none}

/* Synergies. */
.bd-synergies{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.bd-syn{display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;gap:4px 8px;padding:8px 10px;border:1px solid var(--border);border-radius:8px;color:var(--secondary)}
.bd-syn.on{border-color:color-mix(in srgb,var(--type) 60%,var(--border));background:color-mix(in srgb,var(--type) 12%,var(--surface));color:var(--ink)}
.bd-syn-icon{display:grid;place-items:center;color:var(--type)}
.bd-syn-icon .icon{width:17px;height:17px}
.bd-syn-count{font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.bd-syn.on .bd-syn-count{color:color-mix(in srgb,var(--type) 60%,var(--ink))}
.bd-syn b{font-size:12px;font-weight:600}
.bd-syn-steps{display:flex;gap:3px}
.bd-syn-steps i{font-style:normal;font-size:9px;min-width:16px;text-align:center;padding:2px 3px;border-radius:4px;border:1px solid var(--border)}
.bd-syn-steps i.on{background:color-mix(in srgb,var(--type) 30%,transparent);border-color:var(--type);color:var(--ink);font-weight:700}
.bd-syn small{grid-column:1/-1;font-size:10px;line-height:1.5;color:var(--secondary)}
.bd-syn small b{color:color-mix(in srgb,var(--type) 55%,var(--ink))}

/* Seals. */
.bd-seals{display:grid;gap:8px}
.bd-seal{--rarity:#8d969b;display:flex;flex-direction:column;gap:4px;padding:10px 12px;border:1px solid var(--border);border-left:3px solid var(--rarity);border-radius:8px}
.bd-seal.rarity-2{--rarity:#4b7bd4}
.bd-seal.rarity-3{--rarity:#b9821c}
html[data-theme=dark] .bd-seal.rarity-2,html[data-theme=dark] .bd-seal-choice.rarity-2{--rarity:#8db1f3}
html[data-theme=dark] .bd-seal.rarity-3,html[data-theme=dark] .bd-seal-choice.rarity-3{--rarity:#f0c463}
.bd-seal-round{font-size:10px;font-weight:700;color:var(--rarity)}
.bd-seal b{font-size:12px;color:var(--ink)}
.bd-seal small{font-size:10px;line-height:1.5;color:var(--secondary)}
.bd-seal em,.bd-seal-choice em{font-style:normal;font-weight:600;color:var(--accent)}
.bd-seal select{font-size:11px;margin-top:2px}
.bd-seal-actions{display:flex;gap:6px;margin-top:4px}
.bd-seal-choose{display:flex;justify-content:space-between;align-items:center;width:100%;padding:4px 0;border:0;background:none;font:inherit;font-size:12px;font-weight:600;color:var(--ink);cursor:pointer}
.bd-seal-choose span{font-size:16px;color:var(--rarity)}
.bd-seal-choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px;margin-top:14px}
.bd-seal-choice{--rarity:#8d969b;display:flex;flex-direction:column;gap:4px;text-align:left;padding:10px 12px;border:1px solid var(--border);border-left:3px solid var(--rarity);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit;cursor:pointer}
.bd-seal-choice.rarity-2{--rarity:#4b7bd4}
.bd-seal-choice.rarity-3{--rarity:#b9821c}
.bd-seal-choice:hover{border-color:var(--rarity)}
.bd-seal-choice b{font-size:12px}
.bd-seal-choice small{font-size:10px;line-height:1.5;color:var(--secondary)}
#seal-choice-search{width:100%;margin-top:10px}

.bd-help summary{cursor:pointer;font-size:14px;font-weight:600;color:var(--ink)}
.bd-help ul{margin:10px 0 0;padding-left:18px;font-size:11px;line-height:1.8;color:var(--secondary)}

@media(max-width:1150px){.bd-layout{grid-template-columns:minmax(0,1fr) 270px}.bd-main{grid-column:1;grid-row:1}.bd-side-pool{grid-column:2;grid-row:1/span 2}.bd-side:not(.bd-side-pool){grid-column:1;grid-row:2}}
@media(max-width:760px){.bd-layout{grid-template-columns:minmax(0,1fr);gap:12px}.bd-main{order:-1}.bd-side:not(.bd-side-pool){order:1}.bd-main,.bd-side-pool,.bd-side:not(.bd-side-pool){grid-column:1;grid-row:auto}.bd-side-pool{position:static}.bd-pool-list{max-height:340px}.bd-panel{padding:12px}.hx-board{--gap:4px;padding:12px 8px 10px}.bd-detail-grid{grid-template-columns:1fr}.bd-picker{grid-template-columns:repeat(auto-fill,minmax(64px,1fr))}.bd-pick img{width:40px;height:40px}}
