/* 武器研究頁（排行、配裝、彈種、護甲）專用。Page.css 載入。顏色走 tokens。 */
.hg{font-family:inherit}
.hg button,.hg select,.hg-dialog button,.hg-dialog select{font:inherit;color:var(--color-text);background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px;padding:7px 11px;cursor:pointer}
.hg button:hover,.hg-dialog button:hover{border-color:var(--color-brand)}
.hg button:focus-visible,.hg-dialog button:focus-visible,.hg select:focus-visible{outline:3px solid var(--color-brand);outline-offset:3px}
.hg button[aria-pressed=true],.hg-dialog button[aria-selected=true]{color:var(--color-brand);background:var(--color-action-soft);border-color:var(--color-brand)}
.hg-kicker{font-size:13px;color:var(--color-text-muted);letter-spacing:.04em}
.hg-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px}
.hg-controls>label{display:flex;gap:6px;align-items:center;font-size:13px}
.hg-segments{display:flex;gap:4px;flex-wrap:wrap}
.hg-segments button{font-size:13px;padding:6px 10px}
.hg-condition{font-size:13px;color:var(--color-text-muted);margin:8px 0 12px!important}
.hg-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.hg-card{border:1px solid var(--color-border);background:var(--color-surface);border-radius:12px;padding:14px;min-width:0}
.hg-card-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.hg-card-head b{font-size:15px}
.hg-number{font-size:22px;font-variant-numeric:tabular-nums;color:var(--color-brand)}
.hg-number small{font-size:13px;color:var(--color-text-muted)}
.hg-gun{display:grid;grid-template-columns:130px 1fr;align-items:center;gap:12px;min-height:126px}
.hg-gun>img{width:130px;height:112px;object-fit:contain;filter:drop-shadow(0 5px 5px #0003)}
.hg h3{font-size:18px!important;line-height:1.35!important;margin:3px 0 7px!important}
.hg-ammo-tag{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--color-text-muted)}
.hg-ammo-tag img{width:32px;height:32px;object-fit:contain}
.hg-metrics{display:flex;justify-content:space-between;gap:8px;background:var(--color-surface-muted);border-radius:8px;padding:8px 10px;font-size:13px}
.hg-metrics strong{display:block;color:var(--color-text);font-size:15px}
.hg-mods{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;margin-top:10px}
.hg-mod{min-width:0;padding:5px 2px!important;display:flex;flex-direction:column;align-items:center;gap:4px}
.hg-mod img{width:39px;height:36px;object-fit:contain}
.hg-mod span{font-size:13px;line-height:1.2}
.hg-actions{display:flex;justify-content:space-between;gap:5px;margin-top:10px}
.hg-actions button{font-size:13px}
.hg-armor{display:flex;align-items:center;gap:12px;margin-top:12px;padding:10px 14px;background:var(--color-surface-muted);border-radius:10px}
.hg-armor-title{min-width:105px;font-size:13px}
.hg-armor-title small{display:block;font-size:13px;color:var(--color-text-muted)}
.hg-armor-items{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;flex:1}
.hg-armor-items button{display:flex;align-items:center;gap:8px;text-align:left;border:0;background:transparent;padding:0;font-size:13px}
.hg-armor-items img{width:48px;height:53px;object-fit:contain}
.hg-bottom{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:10px}
.hg-bottom p{font-size:13px;color:var(--color-text-muted);margin:0!important}
.hg-bottom button{font-size:13px}
.hg-dialog{width:min(900px,calc(100vw - 32px));max-height:86dvh;box-sizing:border-box;padding:0;color:var(--color-text);background:var(--color-surface);border:1px solid var(--color-border);border-radius:14px;box-shadow:0 20px 90px #0005}
.hg-dialog::backdrop{background:var(--color-scrim);backdrop-filter:blur(3px)}
.hg-dialog-head{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 20px;background:var(--color-surface);border-bottom:1px solid var(--color-border);z-index:2}
.hg-dialog-head h3{font-size:18px;margin:0}
.hg-dialog-head button{font-size:17px}
.hg-dialog-nav{display:flex;gap:6px;padding:10px 20px;flex-wrap:wrap;border-bottom:1px solid var(--color-border)}
.hg-dialog-nav button{font-size:13px}
.hg-dialog-body{padding:18px 22px;line-height:1.7;font-size:14px;overflow-wrap:anywhere}
.hg-dialog-body h4{margin:14px 0 7px;font-size:16px}
.hg-dialog-body p{margin:8px 0}
.hg-dialog-body table{border-collapse:collapse;width:100%;font-size:13px}
.hg-dialog-body th,.hg-dialog-body td{padding:9px 7px;border-bottom:1px solid var(--color-border);text-align:left}
.hg-dialog-body .hg-thumb{width:44px;height:44px;object-fit:contain;vertical-align:middle;margin-right:8px}
.hg-list-item{display:grid;grid-template-columns:60px 1fr;gap:12px;padding:12px 0;border-bottom:1px solid var(--color-border)}
.hg-list-item>img{width:56px;height:56px;object-fit:contain}
.hg-list-item p{font-size:13px;color:var(--color-text-muted)}
.hg-list-item code{font-size:13px}
.hg-cost{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px;background:var(--color-surface-muted);border-radius:9px;margin:8px 0}
.hg-cost span{display:flex;align-items:center;gap:4px;font-size:13px}
.hg-cost img{width:35px;height:35px;object-fit:contain}
.hg-pill{display:inline-block;padding:2px 7px;border-radius:5px;background:var(--color-action-soft);color:var(--color-brand);font-size:13px}
.hg-bar{height:5px;background:var(--color-border);border-radius:4px;margin-top:5px}
.hg-bar i{display:block;height:100%;background:var(--color-brand);border-radius:4px}
.hg-table-wrap{overflow-x:auto}
.hg-dialog details{border-top:1px solid var(--color-border);margin-top:12px;padding-top:8px}
.hg-dialog pre{white-space:pre-wrap;font-size:13px;max-height:260px;overflow:auto;background:var(--color-surface-muted);padding:10px}
.hg-muted{color:var(--color-text-muted)}

.hg-dialog button[aria-pressed=true]{color:var(--color-brand);background:var(--color-action-soft);border-color:var(--color-brand)}

@media(max-width:720px){.hg-grid{grid-template-columns:1fr}.hg-armor{align-items:flex-start;flex-direction:column}.hg-armor-items{width:100%}.hg-armor-items button{flex-direction:column;text-align:center;font-size:13px;gap:3px}.hg-gun{grid-template-columns:110px 1fr}.hg-gun>img{width:110px}.hg-dialog-body{padding:13px}.hg-dialog-head{padding:12px}.hg-dialog-nav{padding:9px}.hg-number{font-size:20px}}

.w-note{display:block;font-size:13px;color:var(--color-text-muted);margin-top:3px}
.w-armor-mod-card{padding:14px 0;border-bottom:1px solid var(--color-border)}
.w-ranking{width:100%;border-collapse:collapse;font-size:13px}
.w-ranking th,.w-ranking td{padding:6px;border-bottom:1px solid var(--color-border);text-align:left}
.w-ranking button{display:flex;align-items:center;gap:8px;width:100%;border:0;background:transparent;text-align:left;padding:2px 0}
.w-rank{min-width:20px;color:var(--color-brand)}
.w-ranking .hg-thumb{width:54px;height:42px;object-fit:contain}
.w-pagination{display:flex;justify-content:center;align-items:center;gap:16px;font-size:13px;margin-top:12px}
.hg input{font:inherit;color:var(--color-text);background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px;padding:7px;width:150px}
.w-armor-row{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.w-armor-row button{display:flex;flex-direction:column;align-items:center;font-size:13px}
.w-armor-row img{width:64px;height:64px;object-fit:contain}
.w-condition{display:flex;align-items:baseline;gap:14px;border-bottom:1px solid var(--color-border)}
.w-condition>b{color:var(--color-brand)}
.hg button:disabled,.hg select:disabled{cursor:default;opacity:.8}
@media(max-width:560px){.w-ranking th:nth-child(2),.w-ranking td:nth-child(2){display:none}.w-ranking .hg-thumb{width:44px}.hg-mods{grid-template-columns:repeat(4,1fr)}}

/* 手機觸控區至少 44px（守則 UI-7） */
@media(max-width:720px){.hg button,.hg select,.hg-dialog button,.hg-dialog select{min-height:44px}}
@media(max-width:720px){.hg input{min-height:44px}}
