/* =========================================================
   冒險區介面打磨（2026-10-04）：秘境、試煉塔、無盡之塔、探索、遠征、據點、競技場、世界魔王、排行、今日、任務、戰令、設定
   沿用商城的質感：石板卡片、像素字、圖示＋數字；只放數字、圖示、按鈕，不寫機制說明。
   放在 style.css、combat.css 之後，只覆寫這幾個面板。
   ========================================================= */
.good-t { color: #8fe08a; }
.sheet-body .seg button, .sheet-body .tabs button { min-width: 0; white-space: nowrap; }

/* ---------- 冒險：區段標題列（標題左、按鈕右） ---------- */
.adv-sec { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 6px; min-height: 34px; }
.adv-sec h4 { margin: 0; }
.adv-sec .btn { flex-direction: row; gap: 4px; }
.adv-sec .btn small { font-size: 11px; }
.dg2-foot > .btn { min-height: 40px; }
.adv-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #e04a3a; color: #fff; font: 400 13px/20px var(--num); vertical-align: 1px; }

/* 探索、無盡之塔入口卡：圖示｜名稱＋一行數字｜按鈕 */
.card.dg.ex-entry, .card.dg.rg-entry { flex-wrap: nowrap; padding: 2px 2px; }
.card.dg.ex-entry .btn, .card.dg.rg-entry .btn { flex: none; min-width: 72px; min-height: 40px; }
.card.dg.ex-entry small, .card.dg.rg-entry small { font: 400 13px var(--num); color: #e9dcc6; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- 秘境卡（dg2） ---------- */
.card.dg.dg2 { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 4px; padding: 2px 2px 0; }
.dg2-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dg2-top .skic { flex: none; }
.dg2-top .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; text-align: left; }
.dg2-top .grow .dg-rule { font-size: 10px; padding: 0 6px; }
.dg2-top .grow b { font-weight: 400; font-size: 16px; color: var(--gold); text-shadow: 0 1px 0 #000; white-space: nowrap; }
.dg2-top .grow small { font: 400 13px var(--num); color: #e9dcc6; }
.dg2-res { flex: none; width: 24px; height: 24px; }
.dg2-key { flex: none; display: inline-flex; align-items: center; gap: 2px; padding: 1px 8px 1px 4px; border-radius: 10px; background: #0006; }
.dg2-key .ci { width: 20px; height: 20px; }
.dg2-key b { font-size: 15px; color: #ffe08a; }
.dg2-key.none b { color: #ff8a7a; }
.dg2-lock { flex: none; font-size: 12px; color: var(--muted); padding: 2px 8px; border-radius: 8px; background: #0006; }
.dg2-lock::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 3px; vertical-align: -1px; background: url('../assets/ui/stone/picto_lock.png') center / contain no-repeat; image-rendering: pixelated; }
.card.dg.dg2.locked { opacity: .6; padding-bottom: 2px; }
.card.dg.dg2 .dg-prog { margin: 0; }
.card.dg.dg2 .dg-prog i { height: 7px; }
.dg2-foot { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0 0 2px; }
.dg2-foot > .btn { flex: none; min-width: 74px; }
.dg2-foot > .btn small { font-size: 10px; }
.dg2-next { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 3px; }
.dg2-next b { font: 400 12px/18px var(--num); padding: 0 6px; border-radius: 9px; background: #ffd24a26; color: #ffe08a; white-space: nowrap; }
.dg2-next.done { color: #8fe08a; font: 400 13px var(--num); }
@media (max-width: 480px) { .card.dg.dg2 { flex-wrap: nowrap; } .card.dg.dg2 .dg-btns { width: auto; } }

/* 試煉塔（今天開放的完整卡片＋其他屬性一列小卡） */
.trial2 .trial-el { width: 36px; height: 36px; font-size: 17px; border-radius: 8px; box-shadow: inset 0 -3px 0 #0004, 0 0 0 2px #0006; }
.trial-open { flex: none; font-size: 12px; padding: 1px 8px; border-radius: 8px; background: #3fbf6a33; color: #8fe08a; }
.trial2 .dg-team { margin: 0; flex-wrap: nowrap; }
.trial2 .dg-team .btn { min-width: 58px; }
.trial-rw { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; }
.trial-rw small { font: 400 11px var(--num); color: var(--muted); }
.trial-rw .rw-chip { padding: 1px 6px 1px 2px; }
.trial-rw .rw-chip .ci { width: 18px; height: 18px; }
.trial-rest { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; margin: 6px 0 4px; }
.trial-rest:empty { display: none; }
.trial-mini { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 8px; background: #0005; border: 1px solid #0008; opacity: .75; }
.trial-mini .trial-el { width: 28px; height: 28px; font-size: 14px; border-radius: 6px; }
.trial-mini b { font-size: 13px; color: #fff; }
.trial-mini small { font-size: 10px; color: var(--muted); }

/* ---------- 無盡之塔 ---------- */
.rg-hero2 { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 6px 6px 4px; }
.rg-hero2 > .q-help { position: absolute; top: 0; right: 0; z-index: 1; }
.rg-top { display: flex; align-items: center; justify-content: center; gap: 14px; }
.rg-top .skic { filter: drop-shadow(0 0 8px #ffd24a66); }
.rg-hero2 .rg-stats { gap: 16px; }
.rg-hero2 .rg-stats small { font-size: 12px; color: var(--muted); }
.rg-hero2 .rg-stats b { font-size: 26px; text-shadow: 0 2px 0 #000; }
.rg-go.btn.big { width: 100%; min-height: 54px; max-height: 60px; }
.rg-go small { font: 400 11px var(--num); opacity: .85; }
.rg-rewards { display: flex; flex-direction: column; gap: 6px; padding: 4px 4px; }
.rg-rwrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rg-rwrow > small { flex: none; display: inline-flex; align-items: center; gap: 2px; min-width: 52px; font: 400 12px var(--num); color: var(--muted); }
.rg-rwrow.mile > small { color: #ffe08a; }
.rg-rws { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 8px; }
.rg-rw { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.rg-rw .ci { width: 20px; height: 20px; }
.rg-rw b { font-size: 14px; color: #fff; text-shadow: 0 1px 0 #000; }
.rg-atk { flex: none; font-style: normal; font: 400 12px var(--num); color: #ffb36a; }

/* ---------- 探索 ---------- */
.ex-top .ex-stats { align-items: center; justify-content: center; gap: 4px 22px; margin: 0; font-size: 14px; }
.ex-top .ex-stats span { display: inline-flex; align-items: center; gap: 6px; }
.ex-top .ex-stats b { font-family: var(--num); font-size: 18px; color: #ffe08a; }
.ex-lv { margin-left: 4px; padding: 0 6px; border-radius: 8px; background: #0006; color: #ffb36a; font: 400 11px/16px var(--num); vertical-align: 1px; }
.ex-acts .btn.big { min-height: 50px; max-height: 56px; }

/* ---------- 遠征：頭像疊在一起，5 位主將放得下，不被切掉 ---------- */
.bx-foot .tc-leads { flex: 0 1 auto; overflow: visible; gap: 0; }
.bx-foot .tc-leads > * + * { margin-left: -5px; }
.bx-foot .tc-leads .px-av { box-shadow: 0 0 0 1px #0009; }
.bx-card.locked { opacity: .55; }
.bx-card.locked, .bx-card.idle { padding-top: 0; padding-bottom: 0; }

/* ---------- 據點 ---------- */
.src-pick { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 4px; }
.src-pick button { position: relative; padding: 6px 2px; }
.src-pick b em { position: absolute; top: -7px; right: -3px; font-size: 10px; line-height: 14px; }
.src-pick b { font-size: 13px; }
.op-next .op-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.op-next .op-foot > .num { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; }
.op-next .op-foot .ci { width: 18px; height: 18px; }
.op-next .op-foot .btn { margin-left: auto; min-width: 74px; }
.op-next { box-shadow: 0 0 0 0 transparent; filter: drop-shadow(0 0 4px #ffd24a55); }
.card.outpost.op-own { flex-direction: row; align-items: center; gap: 8px; }
.op-own .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.op-own .grow > b { font-weight: 400; font-size: 15px; }
.op-own .grow > small { font-size: 12px; color: #d8c8a8; }
.op-own .grow > small b { color: #8fe08a; }
.op-own .btn { flex: none; min-width: 84px; }
.asg-leads { display: inline-flex; }
.asg-leads > * + * { margin-left: -6px; }
.op-mini { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; background: #0004; color: #bfae8c; opacity: .8; }
.op-mini + .op-mini { margin-top: -3px; }
.op-mini b { font-weight: 400; font-size: 13px; color: #d8c8a8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-mini small { font-size: 11px; white-space: nowrap; }
.op-mini .num { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; min-width: 64px; justify-content: flex-end; }
.op-mini .ci { width: 14px; height: 14px; }

/* ---------- 競技場 ---------- */
.ar-head.ar-head2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 14px; margin-bottom: 4px; text-align: left; }
.ar-head2 .ar-vs { font: 400 18px var(--pixel); letter-spacing: 1px; color: #ffd76a; text-shadow: 0 2px 0 #5a2a00; }
.ar-head2 .ar-tickets { margin: 0; padding: 2px 4px 2px 8px; gap: 6px; }
.ar-head2 .ar-tickets b { font-size: 20px; }
.ar-me .ar-pw2 { display: inline-flex; align-items: center; gap: 3px; }
.ar-me .ar-pw2 em { font-size: 15px; }
.arena-v2 .rk-row { padding: 6px 10px; }

/* ---------- 世界魔王：里程碑 5 格平分、不超出 ---------- */
.wb-miles { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.wb-mile { min-width: 0; padding: 6px 1px; }
.wb-mile .wb-mr { flex-direction: column; align-items: center; gap: 1px; }
.wb-mile .wb-r { margin: 0; font-size: 11px; }
.wb-mile .wb-r .ci { width: 14px; height: 14px; }
.wb-day { margin-left: 8px; padding: 0 6px; border-radius: 8px; background: #0005; font-style: normal; font-size: 12px; color: #bfae8c; vertical-align: 2px; }

/* ---------- 排行：頒獎台位置固定（第一名永遠在中間，人少時也不靠左） ---------- */
.rk-podium .rk-pod { grid-row: 1; }
.rk-podium .rk-pod.p1 { grid-column: 2; }
.rk-podium .rk-pod.p2 { grid-column: 1; }
.rk-podium .rk-pod.p3 { grid-column: 3; }
.rk-pod.empty { min-height: 84px; background: #0004; border-style: dashed; border-color: #ffffff22; box-shadow: none; cursor: default; opacity: .6; }
.rk-pod.p1.empty { min-height: 110px; }

/* ---------- 今日 ---------- */
.today-ev2 { display: flex; flex-direction: column; gap: 4px; margin: 0 0 8px; }
.today-ev2 > div { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: linear-gradient(90deg, #5a2a8acc, #2a1a3a88); border: 1px solid #c07aff88; }
.today-ev2 span { display: flex; flex-direction: column; min-width: 0; }
.today-ev2 b { font-weight: 400; color: #ffd6ff; }
.today-ev2 small { font-size: 12px; color: #e8d0ff; }
.today-head2 { display: flex; margin: 0 0 8px; }
.today-head2 .btn.big { flex: 1; min-height: 52px; max-height: 56px; }
.today-row { gap: 10px; padding: 6px 10px; }
.today-row .td-ic { flex: none; }
.today-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.today-row small { display: inline-flex; align-items: center; gap: 4px; font: 400 12px var(--num); color: #d8c8a8; }
.today-row small .ci { width: 16px; height: 16px; }
.today-row .btn { flex: none; min-width: 62px; }
.td-bar { display: inline-block; width: 70px; height: 6px; border-radius: 3px; background: #120e0b; border: 1px solid #5d5040; overflow: hidden; }
.td-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffcf5a, #f08a1c); }

/* ---------- 每日任務、賽季任務 ---------- */
.act-card .act-bar { margin-left: 18px; margin-right: 22px; }
.pass-all.btn.big { display: flex; width: 100%; min-height: 48px; max-height: 54px; margin: 0 0 8px; }
.task-list { display: flex; flex-direction: column; gap: 4px; }
.tech.task2 { display: flex; align-items: center; gap: 8px; padding: 0 2px; min-height: 52px; }
.tech.task2 .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tech.task2 .grow > b { font-weight: 400; font-size: 14px; }
.task-rw { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 12px; }
.task-rw .cost { font: 400 13px var(--num); }
.task-rw .cost .ci { width: 18px; height: 18px; }
.task-pt { font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 8px; background: #0006; color: #ffd27a; white-space: nowrap; }
.task-prog { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 74px; }
.task-prog .lvbar { flex: none; display: block; width: 100%; height: 8px; }
.task-prog small { font-size: 11px; color: #d8c8a8; }
.task-ok { flex: none; width: 74px; text-align: center; font-size: 20px; color: #8fe08a; text-shadow: 0 1px 0 #000; }
.tech.task2.ready { filter: drop-shadow(0 0 4px #ffd24a88); }
.tech.task2.done { opacity: .55; }
.tech.task2 .btn { flex: none; min-width: 74px; }

/* 戰令標題、覺醒石一列 */
.pass-title { display: flex; align-items: baseline; gap: 6px; font-weight: 400; }
.pass-title > small:first-child { font-size: 12px; color: var(--muted); margin-right: 4px; }
.pass-title .num { font-size: 20px; }
.aw-line2 { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 12px; }
.aw-line2 > span { white-space: nowrap; color: #d8c8a8; }
.aw-line2 > span b { color: #fff; }
.pass-head .lvbar { flex: none; display: block; }

/* ---------- 七日登錄：簽到鈕和上面的格子同寬 ---------- */
.signin + .center .btn.big { width: 100%; max-height: 56px; margin-top: 4px; }

/* ---------- 設定 ---------- */
.set-who { display: flex; align-items: center; gap: 8px; }
.set-who .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.set-name { font-weight: 400; font-size: 17px; color: var(--gold); }
.set-who small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-who .btn { flex: none; min-width: 64px; }
.set-who .btn small { font-size: 10px; }
.set-st { display: flex; align-items: center; gap: 4px; margin: 4px 0 8px; }
.set-dot { width: 8px; height: 8px; border-radius: 50%; background: #888; }
.set-dot.on { background: #4ad46a; box-shadow: 0 0 4px #4ad46a; }
.set-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 6px 0; }
.set-btns .btn { min-width: 0; white-space: normal; line-height: 1.1; }
