/* 戰鬥英雄辨識（docs/design/COMBAT_IDENTITY_HANDOFF.md）：主將頭像列 */
.leader-bar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100px + var(--safe-b, 0px)); display: flex; gap: 6px; pointer-events: auto; z-index: 6; }
.lb-item { position: relative; width: 46px; height: 46px; padding: 0; border-radius: 10px; border: 2px solid #5d5040; background: #1d1813cc; overflow: visible; box-shadow: 0 2px 6px #0009; }
.lb-item.r5 { border-color: #ff3b6b; } .lb-item.r4 { border-color: #ff8f1f; } .lb-item.r3 { border-color: #a653ea; } .lb-item.r2 { border-color: #3f8ee0; }
.lb-item > .px-av, .lb-item > img { position: absolute; inset: 1px; width: auto !important; height: auto !important; border-radius: 8px; background-position: center; }
/* 冷卻：從 12 點鐘方向順時針退去的暗色扇形（讀戰鬥裡實際的剩餘冷卻） */
.lb-cd { position: absolute; inset: 0; border-radius: 8px; background: conic-gradient(rgba(0, 0, 0, .42) calc(var(--cd, 0) * 360deg), transparent 0); pointer-events: none; }
.lb-hp { position: absolute; left: 3px; right: 3px; bottom: -5px; height: 4px; border-radius: 2px; background: #000a; overflow: hidden; }
.lb-hp b { display: block; height: 100%; width: calc(var(--hp, 1) * 100%); background: #4cd964; }
.lb-item.ready { box-shadow: 0 0 10px #ffd24a, 0 2px 6px #0009; }
.lb-item.dead { filter: grayscale(1) brightness(.55); }
.lb-item.dead .lb-cd { background: rgba(0, 0, 0, .5); }
.lb-item.focus { outline: 2px solid #ffe27a; outline-offset: 2px; }
.lb-skill { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 4px; white-space: nowrap; font-style: normal; font-size: 12px; text-shadow: 0 1px 0 #000, 1px 0 0 #000, -1px 0 0 #000, 0 -1px 0 #000; opacity: 0; pointer-events: none; }
.lb-item.cast { animation: lbCast .9s ease-out; }
.lb-item.cast .lb-skill { animation: lbName 1.4s ease-out; }
@keyframes lbCast { 0% { transform: scale(1.18); box-shadow: 0 0 16px #fff; } 100% { transform: scale(1); } }
@keyframes lbName { 0% { opacity: 1; transform: translate(-50%, 4px); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -6px); } }
body.sheet-open .leader-bar { display: none; }
/* 手機：放在右側、技能按鈕上方的直排，不蓋住技能、任務、導覽 */
@media (max-width: 640px) {
  .leader-bar { left: auto; right: 6px; transform: none; bottom: calc(222px + var(--safe-b, 0px)); flex-direction: column-reverse; gap: 8px; }
  .lb-item { width: 40px; height: 40px; }
  .lb-skill { left: auto; right: 100%; bottom: 50%; transform: translateY(50%); margin: 0 6px 0 0; }
  @keyframes lbName { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
  .lb-item.cast .lb-skill { animation: lbNameM 1.4s ease-out; }
  @keyframes lbNameM { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { .lb-item.cast, .lb-item.cast .lb-skill { animation-duration: .01s; } .lb-item.cast .lb-skill { opacity: 1; } }
/* 首領進場提示：收在血條上方，不佔畫面中央（D） */
#bossbar.intro::before { content: attr(data-intro); position: absolute; left: 50%; top: -22px; transform: translateX(-50%); font-size: 14px; color: #ffd24a; text-shadow: 0 2px 0 #000, 0 0 8px #ff3b3b; white-space: nowrap; animation: bbIntro 1.8s ease-out forwards; }
@keyframes bbIntro { 0% { opacity: 0; transform: translate(-50%, 6px) scale(1.3); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
/* 手機：追蹤卡移到左下（任務框上方），不蓋住右側的主將頭像列與技能鈕 */
@media (max-width: 640px) {
  #heroFocus { left: 6px !important; right: auto !important; bottom: calc(150px + var(--safe-b, 0px)) !important; top: auto !important; width: min(220px, 58vw) !important; }
}
body.sheet-open #heroFocus { display: none; } /* 開著面板時不顯示追蹤卡 */

/* ---------- 養成深度：技能圖示、秘境、會長技能、技能特化、附魔（ui-depth.js）---------- */
.skic { display: inline-block; flex-shrink: 0; image-rendering: pixelated; background-repeat: no-repeat; border-radius: 4px; vertical-align: middle; }
.cmd-bar [data-cmd] .skic { pointer-events: none; }
.dg-list, .tal-list { display: flex; flex-direction: column; gap: 8px; }
.card.dg, .card.tal { display: flex; gap: 10px; align-items: center; }
.card.dg .grow, .card.tal .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card.dg.locked, .card.tal.locked { opacity: 0.55; }
.card.tal.on { box-shadow: inset 0 0 0 2px var(--gold, #ffd24a); }
.dg-btns { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.dg .lvbar { height: 6px; margin: 2px 0; }
.dg .lvbar.warn i { background: #e0703a; }
.tal-loadout { display: flex; gap: 10px; justify-content: center; margin: 8px 0; }
.tal-slot { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 72px; padding: 6px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); }
.tal-slot.empty { justify-content: center; color: #aaa; font-size: 24px; min-height: 64px; }
.mast-row.spec { align-items: flex-start; gap: 8px; }
.spec-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.spec-chip { font-size: 11px; padding: 2px 6px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); }
.spec-chip.A { background: rgba(80, 200, 110, 0.3); }
.spec-chip.B { background: rgba(230, 80, 70, 0.3); }
.spec-chip.empty { color: #aaa; }
.spec-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 6px 0 2px; }
.spec-pick .btn { display: flex; flex-direction: column; align-items: flex-start; text-align: left; white-space: normal; height: auto; padding: 6px 8px; }
.ench-slot { margin: 6px 0; }
.ench-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin-top: 6px; }
.ench-grid .btn { display: flex; flex-direction: column; align-items: flex-start; text-align: left; white-space: normal; height: auto; padding: 6px 8px; }
@media (max-width: 480px) { .card.dg, .card.tal { flex-wrap: wrap; } .dg-btns { flex-direction: row; flex-wrap: wrap; width: 100%; } }
/* 後援軍團人數（ui-leaders.js）：畫面外齊射的英雄與士兵 */
.leader-bar .lb-reserve { align-self: center; font-size: 12px; font-weight: 700; color: #ffe16b; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 225, 107, 0.5); border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
/* 背包裝備列：手機上按鈕（強化／進化／附魔／分解）排到名稱下方一整排，名稱不再被擠成一字一行 */
@media (max-width: 600px) {
  .item-row { flex-wrap: wrap; }
  .item-row .grow { flex: 1 1 140px; }
  .item-btns { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; }
  .item-btns .btn { flex: 1 1 30%; min-width: 0; white-space: normal; height: auto; padding: 4px 6px; }
  .item-btns .btn small { white-space: normal; font-size: 10px; line-height: 1.2; }
}
/* 陣容技（ui.js comboHtml）*/
.combo-row { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.combo-chip { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); }
.combo-chip.on { background: color-mix(in srgb, var(--cc) 22%, rgba(0, 0, 0, 0.35)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 60%, transparent); }
.combo-chip div { display: flex; flex-direction: column; min-width: 0; }
.combo-chip small { font-size: 11px; opacity: 0.85; }
.combo-hint { font-size: 12px; color: #ffe08a; padding-left: 4px; }
.combo-hint::before { content: '▸ '; }

/* ---------- 英魂圖示：技能圖集的紫色靈魂水晶（magic_crystal_A，第 21 欄第 5 列；圖集 24×23 格）----------
   用百分比定位，任何尺寸都能縮放（頂欄 34／28／20px、費用小圖 18px） */
.ci-souls, .ic.souls { background: url('../assets/ui/skillicons.png') 91.3043% 22.7273% / 2400% 2300% no-repeat; image-rendering: pixelated; }
.ic.souls { color: transparent; border-radius: 8px; box-shadow: 0 2px 4px #0008; }

/* ---------- 星級分階、升星卡、升級變化彈窗（2026-09-28） ---------- */
.stars.t1 { color: #ffd24a; }
.stars.t2 { color: #c58cff; text-shadow: 0 0 6px #9a5aff; }
.stars.t3 { color: #ff5a6a; text-shadow: 0 0 8px #ff2a4a; }
.tag.star-up { background: linear-gradient(#ffcf4a, #e89a1a); color: #3a2400; top: auto; bottom: 30px; }
.star-card { display: grid; gap: 8px; text-align: center; }
.star-card .sc-stars { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 20px; }
.star-card .sc-stars i, .wc-rows i, .sc-stats i { color: var(--muted); font-style: normal; font-size: 12px; }
.star-card .sc-body { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; justify-content: center; }
.sc-stats, .wc-rows { display: grid; gap: 4px; }
.sc-stats > div, .wc-rows > div { display: grid; grid-template-columns: 3em auto 1em auto; gap: 6px; align-items: center; justify-items: end; }
.sc-stats span, .wc-rows span { justify-self: start; color: var(--muted); font-size: 13px; }
.sc-stats .up, .wc-rows .up { color: #7dff9a; }
.sc-skill { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; background: #0003; border: 1px solid #ffffff14; text-align: left; }
.sc-skill .skic { flex: none; border-radius: 6px; box-shadow: 0 0 0 1px #0008; }
.sc-sk-body { flex: 1; display: grid; gap: 2px; min-width: 0; }
.sc-sk-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.sc-sk-head em { font-style: normal; font-size: 11px; color: #d8b8ff; white-space: nowrap; }
.sc-sk-row { display: grid; grid-template-columns: 3em 1fr auto 1fr; gap: 6px; font-size: 13px; align-items: center; }
.sc-sk-row span { color: var(--muted); }
.sc-sk-row i { font-style: normal; text-align: right; }
.sc-sk-row i.arr { color: var(--muted); font-size: 10px; }
.sc-sk-row b { color: #7dff9a; }
.sc-bar { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; }
.sc-bar .lvbar { height: 12px; }
.whatchanged { text-align: center; display: grid; gap: 10px; }
.whatchanged .stars { font-size: 24px; }
.wc-rows { justify-content: center; font-size: 16px; }
.wc-new { animation: wcPop .5s ease-out; }
.wc-new small { display: block; color: #d8b8ff; }
@keyframes wcPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- 圖鑑：陣容技牆、怪物圖鑑 ---------- */
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cb-cell { position: relative; display: grid; justify-items: center; gap: 2px; padding: 10px 8px; border-radius: 12px; background: #0004; border: 2px solid #ffffff14; text-align: center; }
.cb-cell small { font-size: 11px; color: var(--muted); }
.cb-cell .cb-pass { color: #e8e0c8; }
.cb-cell em { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 8px; background: #ffffff18; }
.cb-cell.on { border-color: var(--cc); box-shadow: 0 0 14px color-mix(in srgb, var(--cc) 60%, transparent); }
.cb-cell.on em { background: var(--cc); color: #1a1208; }
.cb-cell.lit { border-color: color-mix(in srgb, var(--cc) 55%, transparent); }
.cb-cell.can em { background: #3a6a3a; }
.cb-cell.lock { filter: grayscale(1) brightness(.6); }
.bs-region.lock { opacity: .55; }
.bs-mons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bs-mon { display: grid; justify-items: center; width: 70px; }
.bs-mon canvas { width: 56px; height: 56px; image-rendering: pixelated; background: #0003; border-radius: 10px; }
.bs-mon.lock canvas { filter: brightness(0); opacity: .5; }
.bs-mon small { font-size: 11px; text-align: center; }

/* ---------- 下一步目標、一鍵收成、失敗分析（ui-growth.js） ---------- */
#goalbar { position: absolute; left: 50%; transform: translateX(-50%); top: calc(128px + var(--safe-t)); display: flex; justify-content: center; max-width: min(420px, calc(100vw - 170px)); pointer-events: auto; }
@media (max-width: 640px) { #goalbar { top: calc(166px + var(--safe-t)); max-width: calc(100vw - 150px); } }
@media (max-height: 560px) and (orientation: landscape) { #goalbar { top: calc(118px + var(--safe-t)); } }
#goalbar[hidden] { display: none; }
body.town #goalbar { display: none; }
.hv-btn { position: relative; flex: none; }
.hv-btn span img { image-rendering: pixelated; }
.hv-btn:not(.ready) span { filter: grayscale(.6) brightness(.8) drop-shadow(0 3px 2px #0008); }
.hv-btn.ready span { animation: wiggle 2.4s infinite; }
.hv-btn .hv-n { position: absolute; right: 0; top: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #e8453b; border: 2px solid #fff; color: #fff; font: 700 11px/14px var(--num); font-style: normal; box-shadow: 0 1px 2px #0008; }
.hv-btn .hv-n:empty { display: none; }
/* 目標列：和左下任務條同一種木框底，左邊技能圖示 */
.goal-chip { display: flex; align-items: center; gap: 8px; min-width: 0; height: 34px; padding: 3px 14px 3px 4px; border-radius: 999px; border: 0; background: linear-gradient(180deg, rgba(18, 14, 10, 0.82), rgba(34, 27, 20, 0.82)); box-shadow: inset 0 0 0 1.5px rgba(232, 197, 121, 0.42), 0 3px 8px rgba(0, 0, 0, 0.35); color: #fff4dc; font-size: 13px; text-align: left; }
.goal-chip .gc-ico { border-radius: 999px !important; }
.goal-chip.hot { box-shadow: inset 0 0 0 2px #ffd24a, 0 0 12px rgba(255, 210, 74, 0.5); }
.goal-chip .gc-ico { flex: none; width: 26px; height: 26px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px #0008; }
.goal-chip .gc-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-chip.pop { animation: wcPop .35s ease-out; }
.harvest { text-align: center; display: grid; gap: 8px; }
.hv-chest { width: 72px; height: 72px; margin: 0 auto; background: url('../assets/ui/px/eq/chest_2.png') center/contain no-repeat; image-rendering: pixelated; animation: hvOpen .6s ease-out; }
@keyframes hvOpen { 0% { transform: scale(.4) rotate(-12deg); } 60% { transform: scale(1.2) rotate(6deg); } 100% { transform: scale(1); } }
.hv-list { display: grid; gap: 4px; }
.hv-list > div { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 4px 10px; border-radius: 8px; background: #0003; opacity: 0; animation: hvRow .35s ease-out var(--d) forwards; }
.hv-list b { color: #ffe08a; }
@keyframes hvRow { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
.gp-list { display: grid; gap: 3px; padding: 8px; border-radius: 10px; background: #2a4a2a55; text-align: left; }
.gp-list > div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.gp-list em { color: #7dff9a; font-style: normal; }
.lost { display: grid; gap: 10px; text-align: center; }
.lost-why { display: grid; gap: 4px; padding: 10px; border-radius: 10px; background: #5a1a1a66; }
.lost-why > b { font-size: 18px; color: #ff9a8a; }
.lost-tips { display: grid; gap: 6px; }

/* ---------- 競技場 5 對 5：頂欄頭像與戰力（render/war.js 小隊模式） ---------- */
#warView .wv-pow { display: block; color: #ffe08a; font-size: 13px; }
#warView .wv-faces { display: flex; gap: 3px; margin: 3px 0; }
#warView .wv-side.b .wv-faces { justify-content: flex-end; }
#warView .wv-faces span { width: 34px; height: 34px; border-radius: 8px; overflow: hidden; background: #0006; border: 2px solid #ffffff30; display: grid; place-items: center; transition: filter .3s; }
#warView .wv-side.a .wv-faces span { border-color: #5a9ae8aa; }
#warView .wv-side.b .wv-faces span { border-color: #e85a5aaa; }
#warView .wv-faces span.dead { filter: grayscale(1) brightness(.45); }
#warView .wv-vs { display: none; font: 900 22px var(--font); color: #ffd24a; text-shadow: 0 2px 0 #7a3000, 0 0 10px #ff8a00; }
#warView.small .wv-vs { display: block; }
@media (max-width: 640px) { #warView .wv-faces span { width: 26px; height: 26px; } }

/* ---------- 頂欄數字過長時縮小（ui.js setNum） ---------- */
.res b { white-space: nowrap; }
.res b.long { font-size: 13px; letter-spacing: -.5px; }
.res b.xlong { font-size: 11px; }
@media (max-width: 640px) { .res b.long { font-size: 11px; } .res b.xlong { font-size: 10px; } }
#stageName .st-tag { font-style: normal; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: 11px; background: #c0461a; color: #fff; vertical-align: 1px; }
.lead-head > b { white-space: nowrap; }

/* ---------- 隊伍分頁、地圖總覽（ui-warbands.js） ---------- */
.team-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.team-tabs::-webkit-scrollbar { display: none; }
.team-tab { flex: none; display: grid; gap: 1px; min-width: 76px; padding: 6px 10px; border-radius: 10px; border: 2px solid #564a3c; background: linear-gradient(#3b322a, #2a231c); color: var(--text); text-align: left; }
.team-tab b { font-size: 13px; white-space: nowrap; }
.team-tab small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.team-tab.on { border-color: #ffd24a; background: linear-gradient(#5a4a2a, #3a2f1c); }
.team-tab:disabled { opacity: .5; }
.map-row { display: flex; align-items: center; gap: 10px; }
.map-row .grow { display: grid; gap: 1px; min-width: 0; }
.map-row .skic { flex: none; border-radius: 8px; }
.map-row.locked { opacity: .55; }
.map-chip { display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 8px; background: #0004; }
.map-chip b { display: block; font-size: 12px; } .map-chip small { font-size: 11px; color: var(--muted); }
.map-list { display: grid; gap: 6px; }
.map-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 2px solid #564a3c; background: linear-gradient(#3b322a, #2a231c); color: var(--text); text-align: left; }
.map-opt.on { border-color: #ffd24a; } .map-opt small { display: block; color: var(--muted); font-size: 12px; } .map-opt em { margin-left: auto; font-style: normal; color: #ffd24a; font-size: 12px; }
.map-opt:disabled { opacity: .5; }

/* ---------- 圖鑑：推薦隊伍 ---------- */
.tm-card { display: grid; gap: 6px; }
.tm-card.tier-legend { border-color: #ff8f1f66; } .tm-card.tier-myth { border-color: #ff5ad066; }
.tm-card.full { box-shadow: 0 0 12px #ffd24a55; }
.tm-tier { font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 6px; background: #ffffff18; margin-left: 4px; }
.tier-legend .tm-tier { background: #ff8f1f; color: #2a1400; } .tier-myth .tm-tier { background: #ff5ad0; color: #2a0020; }
.tm-members { display: flex; gap: 6px; flex-wrap: wrap; }
.tm-m { display: grid; justify-items: center; width: 58px; }
.tm-m small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 58px; }
.tm-m:not(.own) .px-av, .tm-m:not(.own) img { filter: grayscale(1) brightness(.45); }
.tm-combos { display: flex; flex-wrap: wrap; gap: 4px; }
.tm-combos span { font-size: 11px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--cc, #ffffff30); color: var(--cc, #e8e0c8); }
.tm-combos .bond { border-color: #ffd24a; color: #ffd24a; }
.fp-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0; }
.fp-pick { display: grid; justify-items: center; gap: 2px; padding: 8px; border-radius: 12px; border: 2px solid #564a3c; background: linear-gradient(#3b322a, #2a231c); color: var(--text); }
.fp-pick.on { border-color: #ff8f1f; box-shadow: 0 0 12px #ff8f1f88; }
.fp-pick small { font-size: 11px; }
.gb-h .gb-team { display: block; font-size: 10px; color: #ffe08a; text-shadow: 0 1px 0 #000; font-style: normal; }

/* ---------- 裝備職業傾向 ---------- */
.aff-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: 10px; font-style: normal; color: #1a1208; background: var(--ac); vertical-align: 2px; }
.eq-slot.aff-on { box-shadow: 0 0 0 2px var(--ac), 0 0 10px var(--ac); }
.aff-set { margin: -2px 0 8px; text-align: center; font-size: 12px; color: var(--ac); text-shadow: 0 0 6px var(--ac); }

/* ---------- 頂欄資源與關卡條：乾淨的膠囊（取代石板框，2026-09-28） ---------- */
.res > div {
  border: 0 !important; border-image: none !important; border-radius: 999px;
  height: 28px; padding: 0 12px 0 30px;
  background: linear-gradient(180deg, rgba(18, 14, 10, 0.82), rgba(34, 27, 20, 0.82));
  box-shadow: inset 0 0 0 1.5px rgba(232, 197, 121, 0.42), inset 0 2px 5px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
}
.res > div.jade { padding-right: 30px; }
.res b { color: #fff4dc; letter-spacing: .5px; text-shadow: 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, 0.6); }
.res .ic { left: -6px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6)); }
.res > div.jade .plus { right: 2px; border-radius: 999px; }
.stagebar {
  border: 0 !important; border-image: none !important; border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(18, 14, 10, 0.82), rgba(34, 27, 20, 0.82)) !important;
  box-shadow: inset 0 0 0 1.5px rgba(232, 197, 121, 0.42), inset 0 2px 5px rgba(0, 0, 0, 0.55), 0 3px 8px rgba(0, 0, 0, 0.35);
  padding: 5px 12px !important;
}
@media (max-width: 640px) {
  .res > div { height: 24px; padding: 0 8px 0 22px; }
  .res > div.jade { padding-right: 30px; }
  .res .ic { left: -4px; }
  .stagebar { padding: 3px 8px !important; }
}
.tag.main { background: #3a5a8a; }
.tag.band { background: #6a4a2a; }
.tag.band.lead, .tag.lead { background: #c08a1a; color: #1a1208; }
.idle-card { text-align: center; } .idle-card ul { text-align: left; display: inline-block; }
.tp-row { display: flex; align-items: center; gap: 10px; } .tp-row .grow { display: grid; } .tp-row.ok { border-color: #ffd24a66; }

/* ---------- 競技場回合制（render/arena-turn.js） ---------- */
#turnView { position: fixed; inset: 0; z-index: 80; background: #120e18; }
#turnView canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#turnView .tv-top { position: absolute; top: calc(8px + var(--safe-t)); left: 8px; right: 8px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
#turnView .tv-side { flex: 1; display: grid; gap: 4px; color: #fff; font-size: 14px; }
#turnView .tv-side.b { text-align: right; }
#turnView .tv-side i { display: block; height: 10px; border-radius: 6px; background: #0008; overflow: hidden; box-shadow: inset 0 0 0 1px #ffffff30; }
#turnView .tv-side em { display: block; height: 100%; width: 100%; transition: width .25s; background: linear-gradient(#6fe39a, #2fa35a); }
#turnView .tv-side.b em { background: linear-gradient(#ff9a8a, #d0453a); margin-left: auto; }
#turnView .tv-mid { display: grid; justify-items: center; color: #fff; }
#turnView .tv-vs { font: 900 24px 'Lilita One', var(--font); color: #ffd24a; text-shadow: 0 2px 0 #7a3000, 0 0 10px #ff8a00; }
#turnView .tv-round { font-size: 12px; color: #e8d8b8; }
#turnView .tv-ctrl { position: absolute; bottom: calc(14px + var(--safe-b)); left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
#turnView .tv-ctrl button { padding: 6px 12px; border-radius: 999px; border: 0; background: #0009; color: #fff; box-shadow: inset 0 0 0 1.5px #ffffff40; }
#turnView .tv-ctrl button.on { box-shadow: inset 0 0 0 2px #ffd24a; color: #ffd24a; }
#turnView .tv-end { position: absolute; inset: 0; display: grid; place-items: center; background: #0008; }

/* 國戰擊殺播報：左側，最新在上，4.5 秒後消失 */
#warView .wv-feed { position: absolute; left: 10px; top: calc(100px + var(--safe-t)); display: grid; gap: 4px; pointer-events: none; font-size: 12px; }
#warView .wv-feed div { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 6px; background: linear-gradient(90deg, #000c, #0000); animation: feedIn .25s ease-out; }
#warView .wv-feed div.s0 { border-left: 3px solid #4aa3ff; }
#warView .wv-feed div.s1 { border-left: 3px solid #ff5a4a; }
#warView .wv-feed b, #warView .wv-feed span { color: #ddd; font-weight: 700; }
#warView .wv-feed .q3 { color: #c77dff; } #warView .wv-feed .q4 { color: #ffb03a; } #warView .wv-feed .q5 { color: #ff6ad5; }
#warView .wv-feed i { font-style: normal; color: #ff8a4a; font-weight: 900; }
@keyframes feedIn { from { transform: translateX(-16px); opacity: 0; } }
@media (max-aspect-ratio: 10/11) { #warView .wv-feed { top: calc(96px + var(--safe-t)); font-size: 11px; } }

/* 全畫面橫幅大字（寶箱怪、會長技能、系統開放…）：原本透明漸層字＋細描邊＋光暈，疊在戰場上會糊。
   改成實心亮金字＋一圈粗深色描邊（八方向陰影，iOS 也穩定），背後底條加深 */
.banner::before { background: linear-gradient(90deg, transparent, #000d 18%, #000d 82%, transparent); }
.banner b {
  font-weight: 900; color: #ffe066; background: none; -webkit-text-fill-color: #ffe066; -webkit-text-stroke: 0; filter: none;
  text-shadow: 2px 0 0 #2a1200, -2px 0 0 #2a1200, 0 2px 0 #2a1200, 0 -2px 0 #2a1200, 2px 2px 0 #2a1200, -2px 2px 0 #2a1200, 2px -2px 0 #2a1200, -2px -2px 0 #2a1200, 0 4px 0 #2a1200, 0 5px 8px #000c;
}
.banner span { font-size: 15px; font-weight: 700; text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000; }

/* 換陣容 */
.lead-btns { display: inline-flex; gap: 6px; margin-left: auto; }
.lu-heads { display: flex; gap: 6px; margin: 6px 0 4px; flex-wrap: wrap; }
.lu-heads > div { display: grid; justify-items: center; gap: 2px; width: 52px; }
.lu-heads small { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52px; }

/* 戰力提升：沿用最早的版面（深色發光底板、放射光、金色漸層大數字），改成像素風：直角、兩層硬邊、像素字標題；數字用拉霸滾輪 */
#powpop { border-radius: 0; border: 0; padding: 10px 30px 12px;
  box-shadow: inset 0 0 0 2px #ffd24a, inset 0 0 0 4px #7a4a10, inset 0 0 22px #ffb03a55; }
#powpop .pp-lbl { font-family: var(--pixel); font-size: 14px; letter-spacing: 3px; }
#powpop .pp-num { display: inline-flex; align-items: flex-end; animation: none; background: none; color: #ffd24a; }
/* 金色漸層字要套在每一個字上：套在外層時，裡面會移動的滾輪不會被畫出來 */
#powpop .rl-in i, #powpop .rl-s { background: linear-gradient(#fff6c8, #ffd24a 45%, #ff9a1a); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
#powpop .rl { display: inline-block; height: 1.1em; overflow: hidden; vertical-align: bottom; }
#powpop .rl-in { display: flex; flex-direction: column; transform: translateY(0); }
#powpop .rl-in.go { transform: translateY(calc(var(--n) * -1.1em)); transition: transform var(--d) cubic-bezier(.15, .75, .3, 1.12); }
#powpop .rl-in i, #powpop .rl-s { display: block; height: 1.1em; line-height: 1.1em; font-style: normal; text-align: center; }
#powpop .rl-s { display: inline-block; }
#powpop.mega { box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px #ff9a3a, inset 0 0 30px #ffd24a88; }

/* 強化石圖示：原本是鐵砧（像鐵匠鋪），改成琥珀色像素晶石（內嵌 SVG，不新增素材檔）；和藍色鑽石區分 */
.ci-iron { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='7' y='0' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='8' y='0' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='6' y='1' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='7' y='1' width='1' height='1' fill='%23fff4c8'/%3E%3Crect x='8' y='1' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='9' y='1' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='6' y='2' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='7' y='2' width='1' height='1' fill='%23fff4c8'/%3E%3Crect x='8' y='2' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='9' y='2' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='3' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='6' y='3' width='1' height='1' fill='%23fff4c8'/%3E%3Crect x='7' y='3' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='8' y='3' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='9' y='3' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='10' y='3' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='4' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='6' y='4' width='1' height='1' fill='%23fff4c8'/%3E%3Crect x='7' y='4' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='8' y='4' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='9' y='4' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='10' y='4' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='4' y='5' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='5' width='1' height='1' fill='%23fff4c8'/%3E%3Crect x='6' y='5' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='7' y='5' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='8' y='5' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='9' y='5' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='10' y='5' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='11' y='5' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='4' y='6' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='6' width='1' height='1' fill='%23fff4c8'/%3E%3Crect x='6' y='6' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='7' y='6' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='8' y='6' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='9' y='6' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='10' y='6' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='11' y='6' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='3' y='7' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='4' y='7' width='1' height='1' fill='%23fff4c8'/%3E%3Crect x='5' y='7' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='6' y='7' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='7' y='7' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='8' y='7' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='9' y='7' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='10' y='7' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='11' y='7' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='12' y='7' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='3' y='8' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='4' y='8' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='5' y='8' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='6' y='8' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='7' y='8' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='8' y='8' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='9' y='8' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='10' y='8' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='11' y='8' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='12' y='8' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='3' y='9' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='4' y='9' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='5' y='9' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='6' y='9' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='7' y='9' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='8' y='9' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='9' y='9' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='10' y='9' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='11' y='9' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='12' y='9' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='4' y='10' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='10' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='6' y='10' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='7' y='10' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='8' y='10' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='9' y='10' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='10' y='10' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='11' y='10' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='4' y='11' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='11' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='6' y='11' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='7' y='11' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='8' y='11' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='9' y='11' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='10' y='11' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='11' y='11' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='12' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='6' y='12' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='7' y='12' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='8' y='12' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='9' y='12' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='10' y='12' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='13' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='6' y='13' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='7' y='13' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='8' y='13' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='9' y='13' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='10' y='13' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='6' y='14' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='7' y='14' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='8' y='14' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='9' y='14' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='7' y='15' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='8' y='15' width='1' height='1' fill='%233a1a06'/%3E%3C/svg%3E") !important; image-rendering: pixelated; }
[data-res="iron"] .ic img { content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='7' y='0' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='8' y='0' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='6' y='1' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='7' y='1' width='1' height='1' fill='%23fff4c8'/%3E%3Crect x='8' y='1' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='9' y='1' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='6' y='2' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='7' y='2' width='1' height='1' fill='%23fff4c8'/%3E%3Crect x='8' y='2' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='9' y='2' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='3' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='6' y='3' width='1' height='1' fill='%23fff4c8'/%3E%3Crect x='7' y='3' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='8' y='3' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='9' y='3' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='10' y='3' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='4' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='6' y='4' width='1' height='1' fill='%23fff4c8'/%3E%3Crect x='7' y='4' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='8' y='4' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='9' y='4' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='10' y='4' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='4' y='5' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='5' width='1' height='1' fill='%23fff4c8'/%3E%3Crect x='6' y='5' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='7' y='5' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='8' y='5' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='9' y='5' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='10' y='5' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='11' y='5' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='4' y='6' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='6' width='1' height='1' fill='%23fff4c8'/%3E%3Crect x='6' y='6' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='7' y='6' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='8' y='6' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='9' y='6' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='10' y='6' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='11' y='6' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='3' y='7' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='4' y='7' width='1' height='1' fill='%23fff4c8'/%3E%3Crect x='5' y='7' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='6' y='7' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='7' y='7' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='8' y='7' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='9' y='7' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='10' y='7' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='11' y='7' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='12' y='7' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='3' y='8' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='4' y='8' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='5' y='8' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='6' y='8' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='7' y='8' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='8' y='8' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='9' y='8' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='10' y='8' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='11' y='8' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='12' y='8' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='3' y='9' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='4' y='9' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='5' y='9' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='6' y='9' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='7' y='9' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='8' y='9' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='9' y='9' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='10' y='9' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='11' y='9' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='12' y='9' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='4' y='10' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='10' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='6' y='10' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='7' y='10' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='8' y='10' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='9' y='10' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='10' y='10' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='11' y='10' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='4' y='11' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='11' width='1' height='1' fill='%23ffc45a'/%3E%3Crect x='6' y='11' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='7' y='11' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='8' y='11' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='9' y='11' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='10' y='11' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='11' y='11' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='12' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='6' y='12' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='7' y='12' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='8' y='12' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='9' y='12' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='10' y='12' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='5' y='13' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='6' y='13' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='7' y='13' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='8' y='13' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='9' y='13' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='10' y='13' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='6' y='14' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='7' y='14' width='1' height='1' fill='%23f08a24'/%3E%3Crect x='8' y='14' width='1' height='1' fill='%23b04a12'/%3E%3Crect x='9' y='14' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='7' y='15' width='1' height='1' fill='%233a1a06'/%3E%3Crect x='8' y='15' width='1' height='1' fill='%233a1a06'/%3E%3C/svg%3E"); image-rendering: pixelated; } /* 頂部資源列（素材清單指定的圖）也換成晶石 */

/* 主城「自動建造」還沒開：金色呼吸光提醒（新手引導第 5 步、主線任務都指向它） */
#townAutoBtn:not(.on) { animation: autoHint 1.4s ease-in-out infinite; }
@keyframes autoHint { 0%, 100% { box-shadow: 0 0 0 0 #ffd24a00; } 50% { box-shadow: 0 0 0 4px #ffd24acc, 0 0 16px #ffd24a; } }

/* 目標提示（收成、可升星…）：縮小並靠右上，不擋戰鬥中央 */
#goalbar { left: auto; right: 8px; transform: none; justify-content: flex-end; max-width: min(300px, 55vw); }
.goal-chip { height: 28px; gap: 6px; padding: 2px 10px 2px 3px; font-size: 12px; opacity: .92; }
.goal-chip .gc-ico { width: 22px !important; height: 22px !important; }

/* 開場讀取畫面還沒收起來時（取名字、登入），視窗要疊在它上面 */
body.booting .modal { z-index: 110; }

/* 每日任務的活躍度寶箱：外框靠 transform 置中，動畫不能動外框（會把置中蓋掉、整個跳出畫面），改成裡面的圖原地縮放閃光 */
.act-chest.ready { animation: none; }
.act-chest.ready img { animation: chestPulse 0.9s ease-in-out infinite; }
@keyframes chestPulse { 0%, 100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.14); filter: brightness(1.35); } }

/* 世界爭奪：出征結果卡（地圖下方） */
#worldMap .wm-result { position: absolute; left: 50%; bottom: calc(40px + var(--safe-b)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: #120e0bee; border: 1px solid #6a5a44; color: #fff; font-size: 14px; z-index: 3; }
#worldMap .wm-result[hidden] { display: none; }
#worldMap .wm-result b, #worldMap .wm-result span, #worldMap .wm-result .btn { white-space: nowrap; }
