/* 獨立機庫元件，只作用於hg命名範圍；不覆蓋卡框、手牌或戰場。 */
.hg-board{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;min-width:0;padding:8px 0;color:#e9f1f6;font:inherit}
.hg-panel{min-width:0;align-self:start;border:1px solid #40586c;border-radius:9px;background:#10202d;overflow:hidden}
.hg-panel>.hg-summary{display:flex;align-items:center;gap:9px;min-height:44px;padding:9px 12px;cursor:pointer;list-style:none;color:#e7f1f6;font-size:12px}
.hg-summary::-webkit-details-marker{display:none}.hg-summary:before{content:'▸';color:#bdd7e1}.hg-panel[open]>.hg-summary:before{content:'▾'}
.hg-summary strong{font-weight:600}.hg-count{font-size:11px;color:#f1d898}.hg-toggle-label{margin-left:auto;font-size:10px;color:#bdccd8}
.hg-meta{display:flex;flex-wrap:wrap;gap:4px 14px;padding:0 12px;margin:0 0 7px;color:#c3d3de;font-size:10px;line-height:1.5}
.hg-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:0 9px;min-width:0;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#63889d transparent}
.hg-slot{min-width:0;border:1px solid #3e576d;border-radius:6px;overflow:hidden;display:flex;background:#142736}
.hg-drone{width:100%;min-width:0;min-height:88px!important;border:0!important;margin:0!important;padding:8px!important;border-radius:5px!important;background:#142736!important;color:#eaf5f7!important;display:flex;flex-direction:column;gap:4px;text-align:left;cursor:pointer;font:inherit;touch-action:manipulation}
.hg-drone:hover{background:#1d3646!important}.hg-drone-top{display:flex;align-items:center;gap:5px;font-size:11px;min-width:0}.hg-drone-top strong{font-weight:600;white-space:nowrap}.hg-symbol{font-size:18px;line-height:1;color:#a1e1e9}
.hg-slot-number{font-size:9px;color:#c0d3df;white-space:nowrap}.hg-drone-top>.hg-slot-number{margin-left:auto}.hg-effect{font-size:12px;line-height:1.45;color:#f0e2bc}.hg-timing{font-size:9px;line-height:1.4;color:#c0d4e0}.hg-drone-id{font-size:9px;line-height:1.35;overflow-wrap:anywhere;color:#bdd0de}
.hg-guard .hg-symbol{color:#a5e0c0}.hg-scout .hg-symbol{color:#f0dc91}.hg-empty{min-height:88px;align-items:center;justify-content:center;flex-direction:column;gap:6px;color:#b1c4d3;background:#0e1c29;border-style:dashed}.hg-empty strong{font-size:11px;font-weight:400}.hg-empty .hg-symbol{font-size:20px;color:#7898ac}
.hg-timing-note{margin:7px 12px 10px;color:#b4c9d7;font-size:10px;line-height:1.5}.hg-unavailable{padding:8px 12px;font-size:11px;color:#efd2a1;line-height:1.6}
.hg-summary:focus-visible,.hg-drone:focus-visible{outline:3px solid #f5d38c!important;outline-offset:-3px}
#drone-picker{box-sizing:border-box;width:min(620px,calc(100% - 24px));max-width:620px;max-height:calc(100svh - 24px);padding:18px;border:1px solid #6b8a9d;border-radius:12px;background:#10202f;color:#eef4f8;overflow:auto;box-shadow:0 24px 80px #000b;font:inherit}
#drone-picker *{box-sizing:border-box}#drone-picker::backdrop{background:#020a13bd;backdrop-filter:blur(4px)}
#drone-picker .hg-picker-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}#drone-picker h2{margin:0;font-size:18px;line-height:1.5;overflow-wrap:anywhere}
#drone-picker button{font:inherit;min-height:44px!important;min-width:44px;cursor:pointer;border:1px solid #6a879c;border-radius:7px;background:#183348;color:#eff7fb;padding:8px 14px;margin:0;touch-action:manipulation}
#drone-picker button.hg-picker-close{flex:none;font-size:24px;line-height:1;padding:6px;background:transparent}
#drone-picker button:disabled{opacity:.65;cursor:not-allowed}#drone-picker button:focus-visible,#drone-picker input:focus-visible{outline:3px solid #f5d38c;outline-offset:3px}
#drone-picker .hg-picker-context,#drone-picker .hg-picker-warning,#drone-picker .hg-picker-status{font-size:12px;line-height:1.7;margin:12px 0;color:#c6d8e3;overflow-wrap:anywhere}
#drone-picker .hg-picker-warning{padding:8px 10px;border-left:2px solid #9ab9c9;background:#142b3c;font-size:11px}
#drone-picker .hg-plans{padding:0;margin:15px 0 0;border:0;min-width:0}#drone-picker .hg-plans[hidden]{display:none}#drone-picker legend{font-size:12px;color:#d7e5ed;padding:0;margin-bottom:8px}
#drone-picker .hg-plan-options{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
#drone-picker .hg-plan{display:flex;align-items:flex-start;gap:9px;min-width:0;min-height:72px;padding:11px;border:1px solid #526e82;border-radius:7px;background:#132839;cursor:pointer;text-align:left;margin:0;touch-action:manipulation}
#drone-picker .hg-plan.is-selected{border-color:#a5e2df;background:#1c3c48;box-shadow:inset 0 0 0 1px #a5e2df66}
#drone-picker .hg-plan input{appearance:auto;accent-color:#b2e9e2;flex:none;width:18px;height:18px;min-height:18px!important;padding:0;margin:2px 0 0;border:0;background:transparent}
#drone-picker .hg-plan-body{display:flex;flex-direction:column;gap:5px;min-width:0;overflow-wrap:anywhere}#drone-picker .hg-plan-body>strong{font-size:12px;color:#f2f6fa}#drone-picker .hg-plan-step{font-size:12px;line-height:1.5;color:#d5e9ed}#drone-picker .hg-plan-recycle{font-size:10px;line-height:1.5;color:#e1cfaa}
#drone-picker .hg-picker-status{min-height:21px;color:#d1e8e9}
#drone-picker .hg-picker-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:10px;border-top:1px solid #3f5b71}
#drone-picker [data-action=confirm]{background:#a4ded8;color:#0d2933;border-color:#b2e9e3;font-weight:600}
@media(max-width:699px){.hg-board{grid-template-columns:minmax(0,1fr);gap:7px;padding:5px 0}.hg-panel>.hg-summary{padding:8px 10px}.hg-slots{gap:5px;padding:0 7px}.hg-drone{padding:7px 5px!important;min-height:99px!important}.hg-drone-top{gap:3px;font-size:10px}.hg-symbol{font-size:15px}.hg-effect{font-size:11px}.hg-drone-id,.hg-timing{font-size:9px}.hg-meta{padding:0 10px;font-size:9px;gap:4px 10px}.hg-timing-note{font-size:9px;margin-left:10px;margin-right:10px}.hg-toggle-label{font-size:9px}#drone-picker{padding:13px}#drone-picker h2{font-size:16px}#drone-picker .hg-plan-options{grid-template-columns:minmax(0,1fr)}#drone-picker .hg-plan{padding:10px}#drone-picker .hg-picker-context{font-size:11px}#drone-picker .hg-picker-warning{font-size:10px}#drone-picker .hg-picker-actions{position:sticky;bottom:-13px;background:#10202f;padding:10px 0;margin-bottom:0}}
@media(prefers-reduced-motion:reduce){.hg-board *,#drone-picker *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
body[data-motion=off] .hg-board *,body[data-motion=off] #drone-picker *{scroll-behavior:auto!important;transition:none!important;animation:none!important}
