/* 英雄、招募、背包介面打磨（2026-10-04）：放在 style.css／combat.css 之後，只覆蓋這幾個畫面 */

/* ---------- 英雄面板上方分頁：背包的件數縮成小字，不再擠成兩行 ---------- */
.tabs button .tab-n { display: block; margin-top: -1px; font: 400 10px var(--num); opacity: .8; letter-spacing: 0; }

/* ---------- 英雄列表 ---------- */
.hero-sort2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 8px; }
.hs-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 999px; border: 1px solid #6a5430; background: #0004; color: var(--muted); font-size: 12px; white-space: nowrap; }
.hs-toggle i { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 4px; border: 1px solid #8a7050; font-style: normal; font-size: 11px; color: #3a2000; }
.hs-toggle.on { color: var(--text); border-color: #d9a43a; }
.hs-toggle.on i { background: linear-gradient(#ffcf4a, #e89a1a); border-color: #ffd86a; }
.hs-toggle small { opacity: .7; }
.hs-seg { display: inline-flex; flex: none; padding: 2px; border-radius: 8px; background: #0005; border: 1px solid #5a4630; }
.hs-seg button { border: 0; background: none; padding: 3px 10px; border-radius: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.hs-seg button.on { background: linear-gradient(#ffcf4a, #e89a1a); color: #3a2000; text-shadow: 0 1px 0 #fff6; }
/* 卡片：「可升星」標籤在右下、往上的綠箭頭移到左下，兩個不再疊在一起 */
.dcard .uparrow { right: auto; left: 7px; bottom: 34px; }
.dcard .tag.star-up { bottom: 32px; right: 3px; padding: 0 4px; }

/* ---------- 英雄詳情：上半部 ---------- */
.detail { grid-template-columns: 130px 1fr; gap: 10px; }
.stage-box { width: 130px; height: 150px; }
@media (max-width: 420px) { .detail { grid-template-columns: 120px 1fr; } .stage-box { width: 120px; height: 140px; } }
.dt-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dt-info h3 { margin: 0; flex-wrap: nowrap; }
.dt-info .dt-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-stars { line-height: 1; font-size: 15px; }
.dt-meta { display: flex; gap: 6px; font-size: 12px; color: var(--muted); }
.dt-meta b { font-weight: 400; }
.dt-info .realm { margin: 2px 0; }
.dt-info .stats { display: block; }
.dt-info .stats button.pw { width: 100%; padding: 6px 10px; }
.dt-info .stats button.pw b { font-size: 18px; }
/* 五項數值：一排等寬小格，標籤在上、數字在下（原本兩欄擠在右邊，「出手間隔」「升星加成」被折成兩行） */
.dt-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 8px 0 10px; }
.dt-stats > div { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px 5px; border-radius: 7px; background: #00000035; border: 1px solid #00000040; min-width: 0; }
.dt-stats span { font-size: 10px; color: var(--muted); white-space: nowrap; }
.dt-stats b { font: 400 14px var(--num); white-space: nowrap; }
.hero-tabs { margin-top: 0; }

/* 技能分頁：技能傷害、冷卻做成兩個小數字格 */
.skill-card .sk-nums { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.skill-card .sk-nums i { font-style: normal; font-size: 11px; color: var(--muted); padding: 1px 7px; border-radius: 6px; background: #0004; }
.skill-card .sk-nums b { font: 400 12px var(--num); color: var(--text); }
/* 銘文未開放：只留一條細列 */
.insc-card.lock { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px !important; min-height: 0; opacity: .7; }
.insc-card.lock p { margin: 0; }

/* 裝備分頁：每格多一行主屬性 */
.eq-slot .eq-st { font-style: normal; font-size: 10px; color: #9be38a; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* 資料分頁：羈絆成員改成一顆顆名字膠囊（原本刪除線文字換行時疊在一起） */
.bond { margin-top: 8px; }
.bond-h { display: flex; justify-content: space-between; align-items: center; }
.bond-h b { font-weight: 400; color: var(--text); }
.bond-h em { font-style: normal; font-family: var(--num); }
.bond-m { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.bond-m span { padding: 1px 7px; border-radius: 999px; background: #0004; border: 1px solid #ffffff14; color: #777; font-size: 11px; }
.bond-m span.own { color: #ffe9b0; border-color: #d9a43a88; background: #3a2c1488; }

/* ---------- 裝備列（換裝、裝備詳情）---------- */
.item-row .ir-name { display: flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-row .ir-name .evo-lv { flex: none; padding: 0 5px; border-radius: 7px; font-style: normal; font-size: 11px; line-height: 15px; color: #f1d6ff; background: #6a3f8f99; }
.item-row .ir-tags { display: flex; align-items: center; gap: 4px; min-height: 14px; }
.item-row .ir-tags .aff-tag { margin-left: 0; }
.item-row .ir-stat { color: var(--text); }
.item-row .ir-owner { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-row .item-icon b { right: 2px; bottom: 0; padding: 0 3px; border-radius: 4px; background: #000a; font-size: 11px; line-height: 14px; }
.item-row .item-btns .btn { min-height: 0; height: auto; padding: 5px 4px; font-size: 13px; line-height: 1.15; }
#modal .item-list { gap: 6px; }
.item-btns .btn:disabled small { opacity: .8; }
/* 裝備詳情：大一號的圖示與名稱 */
.item-row.big { padding: 10px; }
.item-row.big .item-icon { width: 60px; height: 60px; }
.item-row.big .item-icon img { width: 54px; height: 54px; }
.item-row.big .ir-name { font-size: 17px; }
.eq-info-h { font-size: 17px; }
.guard-tag { font-style: normal; padding: 2px 8px; border-radius: 999px; background: #2e4a2a; color: #b8f0a0; border: 1px solid #4f8a3f; }

/* ---------- 背包 ---------- */
.bag-res { margin-top: 0; }
.bag-res > span { cursor: pointer; }
.bag-acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 4px 0 2px; }
.bag-acts .btn { min-width: 0; padding-left: 2px; padding-right: 2px; white-space: nowrap; font-size: 13px; }
.chips.bag-chips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; margin: 6px 0 0; overflow: visible; }
.chips.bag-chips .chip { padding: 5px 0; font-size: 12px; white-space: nowrap; }
.bag-sort { margin: 8px 0 2px; }

/* 升星視窗：星星不折行 */
.star-up .star-big { font-size: 17px; white-space: nowrap; letter-spacing: 0; }

/* 整理背包：三段開關不折行、分解鈕整條 */
.tidy-auto .chips.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tidy-auto .chips.seg .chip { padding: 6px 0; font-size: 12px; white-space: nowrap; }
.tidy-go { width: 100%; }

/* ---------- 招募 ---------- */
.pity > div { display: flex; flex-direction: column; gap: 3px; }
.pity .pt-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 4px; white-space: nowrap; }
.pity .pt-top > span:first-child { flex-basis: 100%; font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.pity .pt-top small { font-size: 10px; margin-left: 2px; }
.gacha-btns .starter-pull { grid-column: 1 / -1; }
.gw-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.gw-res { display: inline-flex; gap: 10px; font-size: 12px; color: var(--muted); }
.gw-res > span { display: inline-flex; align-items: center; gap: 3px; }
.gw-res small { font-size: 10px; margin-right: 2px; }
.gw-res .ci { width: 18px; height: 18px; }
.gw-exch { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.gw-ex { display: flex; flex-direction: column; gap: 4px; padding: 7px 9px; border-radius: 8px; border: 1px solid #5a4630; background: #0004; color: var(--muted); text-align: left; min-width: 0; }
.gw-ex b { font-weight: 400; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-ex small { font-size: 11px; align-self: flex-end; }
.gw-ex.ok { color: var(--text); border-color: #d9a43a; background: linear-gradient(#4a3818, #2a2010); box-shadow: 0 0 8px #ffb84a55; }
.gw-bar { display: block; height: 5px; border-radius: 3px; background: #0006; overflow: hidden; }
.gw-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd24a, #ff9f2f); }
.gw-tools { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin-top: 8px; }
.gw-tools .btn { min-width: 0; white-space: nowrap; }
.gacha-opts { display: flex; justify-content: flex-end; margin: 6px 2px 2px; }
.gacha-opts .opt { font-size: 13px; color: var(--muted); }
/* 心願單、神話心願、印記兌換：四欄小格，儲存鈕黏在底部 */
.grid.cards.pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.grid.cards.pick-grid .dcard { padding: 4px 2px 5px; }
.grid.cards.pick-grid .dcard .nm { font-size: 11px; }
.grid.cards.pick-grid .gb-team { display: none; }
.pick-foot { position: sticky; bottom: -1px; padding: 8px 0 2px; background: linear-gradient(transparent, #2a2018 30%); z-index: 2; }

/* ---------- 十連結果：每張卡下面只留一行圖示＋數字 ---------- */
.gx.many .gx-name { margin-top: 5px; }
.gx-chip { display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; border-radius: 999px; background: #0007; color: #ffe08a !important; font-family: var(--num); white-space: nowrap; }
.gx-chip .ci { width: 14px; height: 14px; }
.gx-chip.troop { color: #bcd0e8 !important; font-family: inherit; }
.gx-chip .gx-up { color: #7dff9a; font-weight: 400; margin-left: 2px; }
.gx.many .gx-note { font-size: 10px; }
