/* S5 角色選單（能力 / 裝備 / 技能）＋撿到裝備提示＋技能等級角標 */
/* 服裝分頁沿用角色選單清單，窄螢幕允許分頁換行。 */
.cw-costume { flex: 1; overflow-y: auto; padding: 8px; }
.cw-costume-note { font-size: 12px; color: #b6c4f0; margin: 6px 8px 12px; }
.cw-costume-msg { color: #ffe9a8; padding: 6px 8px; font-size: 12px; }
.cw-costume .cw-it > img { object-fit: contain; image-rendering: pixelated; }
@media (max-width: 760px) {
  #charWin .cw-top { flex-wrap: wrap; gap: 6px; }
  #charWin .cw-tabs { order: 2; width: 100%; margin-left: 0; }
  #charWin .cw-tabs button { flex: 1; padding: 6px 8px; }
  #charWin .cw-x { margin-left: auto; }
}
#hud #rbtns #bChar svg { width: 22px; height: 22px; color: #f4e6b8; }
#hud #rbtns .btn.dot::after { content: ''; position: absolute; right: -1px; top: -1px; width: 9px; height: 9px; border-radius: 50%; background: #ff4040; box-shadow: 0 0 0 1.5px #fff, 0 0 6px #f44; }
.btn.sk .slv { position: absolute; left: 2px; top: 1px; font: bold 10px/1 "Microsoft JhengHei", sans-serif; color: #ffe27a; text-shadow: 0 0 3px #000, 0 0 2px #000; pointer-events: none; }

#lootBox { position: fixed; right: calc(env(safe-area-inset-right) + 12px); top: 34%; display: flex; flex-direction: column; gap: 4px; pointer-events: none; z-index: 30; }
#lootBox .lt { display: flex; align-items: center; gap: 6px; padding: 3px 12px 3px 4px; border-radius: 6px 0 0 6px; background: linear-gradient(90deg, rgba(10,12,34,.15), rgba(10,12,34,.85)); border-right: 3px solid #f0d58a; font: 12px "Microsoft JhengHei", sans-serif; color: #fff; text-shadow: 0 0 3px #000; animation: ltIn .25s ease-out; transition: opacity .5s, transform .5s; }
#lootBox .lt img { width: 24px; height: 24px; image-rendering: pixelated; }
#lootBox .lt b { font-weight: bold; }
#lootBox .lt.out { opacity: 0; transform: translateX(20px); }
@keyframes ltIn { from { opacity: 0; transform: translateX(30px); } }

#charWin { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(4,6,20,.55); backdrop-filter: blur(2px); font-family: "Microsoft JhengHei", sans-serif; color: #e8ecff; }
#charWin.hide { display: none; }
#charWin .cw { width: min(920px, 96vw); height: min(560px, 92vh); display: flex; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, #1b2050, #0d1030); box-shadow: 0 0 0 1.5px #cfd8f2, 0 0 0 4px #22264e, 0 10px 40px rgba(0,0,0,.7); }
#charWin button { font: bold 12px "Microsoft JhengHei", sans-serif; color: #2a1c00; border: 0; border-radius: 6px; padding: 4px 10px; cursor: pointer;
  background: linear-gradient(180deg, #ffe9a8, #e0a940); box-shadow: 0 1px 0 #fff8 inset, 0 2px 3px #0008; white-space: nowrap; }
#charWin button:disabled { filter: grayscale(1) brightness(.6); cursor: default; }
#charWin button:not(:disabled):active { transform: translateY(1px); }

.cw-side { width: 92px; flex: none; overflow-y: auto; background: rgba(0,0,0,.28); border-right: 1px solid #39407a; padding: 6px 4px; display: flex; flex-direction: column; gap: 4px; }
.cw-ch { position: relative; display: flex; flex-direction: column; align-items: center; padding: 4px 2px; border-radius: 8px; cursor: pointer; border: 1.5px solid transparent; }
.cw-ch img { width: 52px; height: 52px; object-fit: cover; object-position: top; border-radius: 6px; background: #0a0c22; }
.cw-ch b { font-size: 11px; margin-top: 2px; white-space: nowrap; }
.cw-ch i { position: absolute; top: 2px; right: 2px; font: normal 9px sans-serif; background: #e0a940; color: #2a1c00; padding: 0 3px; border-radius: 3px; }
.cw-ch.on { border-color: #f0d58a; background: rgba(240,213,138,.14); }

.cw-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cw-top { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #39407a; background: linear-gradient(90deg, rgba(240,213,138,.12), transparent 60%); }
.cw-top > img { width: 44px; height: 44px; object-fit: cover; object-position: top; border-radius: 50%; box-shadow: 0 0 0 2px #f0d58a; }
.cw-top > div:first-of-type { display: flex; flex-direction: column; }
.cw-top > div b { font-size: 16px; color: #fff3cf; }
.cw-top > div span { font-size: 12px; color: #9fb0ff; }
.cw-tabs { margin-left: auto; display: flex; gap: 4px; }
#charWin .cw-tabs button { position: relative; background: #252b63; color: #c8d0ff; padding: 6px 16px; box-shadow: 0 0 0 1px #4a52a0 inset; }
#charWin .cw-tabs button.on { background: linear-gradient(180deg, #ffe9a8, #e0a940); color: #2a1c00; }
.cw-tabs button i { position: absolute; top: -6px; right: -4px; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; background: #ff4040; color: #fff; font: bold 10px sans-serif; font-style: normal; }
#charWin .cw-x { background: #3a2040; color: #fff; padding: 4px 9px; margin-left: 4px; }

.cw-body { flex: 1; overflow: hidden; display: flex; min-height: 0; }
.cw-pts { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 13px; }
.cw-pts b { color: #ffe27a; font-size: 16px; margin-right: auto; }
.cw-pts span { font-size: 12px; color: #9fb0ff; }

.cw-stat { flex: 1; overflow-y: auto; padding: 4px 8px; }
.cw-row { display: grid; grid-template-columns: 50px 1fr 54px auto auto; align-items: center; gap: 6px; padding: 5px 6px; border-bottom: 1px solid #262c66; }
.cw-row > b { color: #f0d58a; font-size: 12px; }
.cw-row span { font-size: 13px; display: flex; flex-direction: column; }
.cw-row span small { font-size: 10px; color: #8a96cc; }
.cw-row em { font-style: normal; font-size: 15px; font-weight: bold; text-align: right; }
.cw-row em small { color: #6ad86a; font-size: 11px; }
.cw-sum { width: 200px; flex: none; padding: 8px; border-left: 1px solid #39407a; background: rgba(0,0,0,.2); overflow-y: auto; }
.cw-sum div { display: flex; justify-content: space-between; padding: 5px 4px; border-bottom: 1px dashed #2e3570; font-size: 13px; }
.cw-sum span { color: #9fb0ff; }
.cw-sum b { color: #fff3cf; }

.cw-eq { flex: 1; display: flex; min-height: 0; }
.cw-slots { width: 170px; flex: none; padding: 8px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid #39407a; }
.cw-slot { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; padding: 6px; border-radius: 8px; background: #151a46; border: 1.5px solid #333a80; cursor: pointer; min-height: 52px; }
.cw-slot small { grid-column: 1 / 3; font-size: 10px; color: #9fb0ff; }
.cw-slot img { width: 32px; height: 32px; image-rendering: pixelated; }
.cw-slot b { font-size: 12px; }
.cw-slot em { grid-column: 1 / 3; font-style: normal; font-size: 12px; color: #66709f; }
.cw-slot.on { border-color: #f0d58a; box-shadow: 0 0 8px rgba(240,213,138,.35); }
.cw-bag, .cw-sk { flex: 1; overflow-y: auto; padding: 4px 8px; min-width: 0; }
.cw-sk { display: block; }
.cw-it { display: flex; align-items: center; gap: 8px; padding: 6px; border-bottom: 1px solid #262c66; }
.cw-it > img { width: 36px; height: 36px; flex: none; image-rendering: pixelated; border-radius: 6px; background: #0a0c22; box-shadow: 0 0 0 1px #39407a; }
.cw-it > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cw-it > div b { font-size: 13px; }
.cw-it > div b .lv { color: #ffe27a; font-size: 11px; }
.cw-it > div small { font-size: 11px; color: #9fb0ff; line-height: 1.35; }
.cw-it .ng { color: #ff7070; }
.cw-it.on { background: rgba(240,213,138,.1); }
.cw-it.lock { opacity: .55; }
.cw-it button + button { margin-left: 2px; }
.cw-empty { color: #8a96cc; font-size: 13px; padding: 20px; text-align: center; }

@media (max-height: 460px) {
  #charWin .cw { height: 96vh; width: 98vw; }
  .cw-side { width: 72px; } .cw-ch img { width: 40px; height: 40px; }
  .cw-sum { width: 160px; } .cw-slots { width: 140px; }
  .cw-row { padding: 3px 4px; }
}

.cw-it .fxt { font-style: normal; font-size: 10px; font-weight: normal; margin-left: 6px; padding: 0 5px; border-radius: 3px; vertical-align: 1px; }
.cw-it .fxt.new { background: #1f5a8a; color: #bfe4ff; } .cw-it .fxt.n3d { background: #6a3aa0; color: #f0dcff; }
.cw-it .fxt.old { background: #5a4a2a; color: #f0dca8; } .cw-it .fxt.tpl { background: #6a2a2a; color: #ffd0d0; } .cw-it .fxt.no { background: #333; color: #aaa; }

.cw-wheel { display: flex; gap: 6px; align-items: center; padding: 4px 8px 8px; border-bottom: 1px solid #39407a; }
.cw-ws { width: 64px; height: 58px; border-radius: 8px; background: #151a46; border: 1.5px solid #333a80; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.cw-ws img { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 1.5px #cfd8f2; }
.cw-ws small { font-size: 10px; margin-top: 2px; max-width: 60px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cw-ws em { font-style: normal; font-size: 11px; color: #66709f; }
.cw-wheel.pick .cw-ws { border-color: #f0d58a; animation: wsPulse .8s ease-in-out infinite alternate; }
@keyframes wsPulse { to { box-shadow: 0 0 10px rgba(240,213,138,.7); } }

/* 任務分段、每日寶箱、副本星級與掃蕩 */
#dlgBody .rowHead { margin: 8px 2px 4px; padding: 3px 8px; font: bold 13px "Microsoft JhengHei", sans-serif; color: #ffe27a; border-left: 3px solid #f0d58a; background: linear-gradient(90deg, rgba(240,213,138,.15), transparent); }
#dlgBody .rowHead small { margin-left: 8px; font-weight: normal; font-size: 11px; color: #9fb0ff; }
#dlgBody .row.done { opacity: .55; }
#dlgBody .row.chest.ready { box-shadow: 0 0 0 1.5px #f0d58a inset, 0 0 12px rgba(240,213,138,.4); }
#dlgBody .stars { color: #ffd34a; letter-spacing: 1px; font-size: 12px; } #dlgBody .stars i { font-style: normal; color: #4a4f7a; }
#dlgBody .dgb { display: flex; flex-direction: column; gap: 4px; } #dlgBody .dgb .sw { background: linear-gradient(180deg, #a8e0ff, #4a8ad8); color: #08203a; }

/* 終局：強化 / 分解 / 覺醒 / 副本清單的塔與世界 BOSS */
.cw-res { margin-top: 4px; padding: 6px; border-radius: 8px; background: #151a46; font-size: 11px; color: #9fb0ff; line-height: 1.6; }
.cw-res img { width: 18px; height: 18px; vertical-align: -4px; margin-right: 3px; } .cw-res b { color: #fff3cf; }
.cw-slots > button { font-size: 11px !important; padding: 4px 6px !important; }
.cw-msg { font-size: 11px; padding: 4px; color: #fff3cf; } .cw-msg .ok, .cw-enh .ok { color: #6ad86a; } .cw-msg .ng { color: #ff7070; }
.cw-btns { display: flex; gap: 3px; flex: none; }
#charWin .cw-btns .enh { background: linear-gradient(180deg, #c8f0ff, #5aa8e8); color: #08203a; }
#charWin .cw-btns .sal { background: #3a2a4a; color: #e8d0ff; }
.cw-enh { margin: 0 6px 6px 50px; padding: 6px 8px; border-radius: 6px; background: rgba(90,168,255,.12); border: 1px solid #3a5a9a; font-size: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cw-enh b { color: #ffe27a; } .cw-enh button { margin-left: auto; }
.cw-aw { flex: 1; overflow-y: auto; padding: 8px 12px; font-size: 13px; }
.aw-top { display: flex; align-items: center; gap: 14px; padding: 6px 0 10px; border-bottom: 1px solid #39407a; } .aw-top b { color: #ffe27a; }
.aw-stars { font-size: 26px; color: #ffd34a; letter-spacing: 2px; text-shadow: 0 0 8px rgba(255,200,60,.6); } .aw-stars i { font-style: normal; color: #3a3f6a; text-shadow: none; }
.aw-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0; }
.aw-st { padding: 6px; border-radius: 8px; background: #151a46; border: 1.5px solid #333a80; display: flex; flex-direction: column; } .aw-st b { font-size: 12px; } .aw-st small { font-size: 10px; color: #8a96cc; }
.aw-st.on { border-color: #f0d58a; background: rgba(240,213,138,.12); }
.aw-cost { padding: 8px; border-radius: 8px; background: rgba(0,0,0,.25); line-height: 1.9; } .aw-cost img { width: 20px; height: 20px; vertical-align: -5px; margin: 0 3px 0 8px; } .aw-cost b { color: #ffe27a; } .aw-cost .ng { color: #ff7070; font-size: 12px; }
.aw-how { font-size: 11px; color: #8a96cc; margin-top: 8px; }
#dlgBody .row.eg .rk.eg { font: bold 16px "Microsoft JhengHei", sans-serif; color: #fff; background: radial-gradient(circle, #6a4ad8, #2a1a5a); }
#dlgBody .row.eg.world .rk.eg { background: radial-gradient(circle, #d84a4a, #5a1a1a); }
#dlgBody .row.eg { box-shadow: 0 0 0 1px rgba(240,213,138,.35) inset; }

/* 副本難度 / 野外危險度按鈕 */
#dlgBody .dgb { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; max-width: 210px; }
#dlgBody .dgb .df { background: linear-gradient(180deg, #ffb0a0, #c8402a); color: #2a0800; font-size: 11px; padding: 3px 7px; }
#dlgBody .dgb .df[data-df="2"] { background: linear-gradient(180deg, #d8a0ff, #6a2ab8); color: #fff; }
#dlgBody .dgb .df .stars { font-size: 10px; }
#dlgBody .dgb button:disabled { filter: grayscale(1) brightness(.6); }
#dlgBody .wpb { display: flex; gap: 3px; flex: none; }
#dlgBody .wpb .tier { padding: 3px 6px; font-size: 10px; background: linear-gradient(180deg, #ffd890, #c87a2a); color: #2a1400; }
#dlgBody .wpb .tier:disabled { filter: grayscale(1) brightness(.55); }

.aw-en { margin-left: auto; font-size: 12px; color: #9fb0ff; display: flex; align-items: center; gap: 6px; }
.aw-en span { width: 120px; height: 8px; border-radius: 4px; background: #151a46; box-shadow: 0 0 0 1px #39407a; overflow: hidden; display: inline-block; }
.aw-en i { display: block; height: 100%; background: linear-gradient(90deg, #a06aff, #ffd34a); }

/* 輔助技：說明、buff 列、持續傷害數字 */
.cw-it .sup { color: #9fffc0; }
#buffBar { position: fixed; left: 360px; top: 20px; display: flex; gap: 4px; pointer-events: none; z-index: 20; }
#buffBar .bf { position: relative; width: 26px; height: 26px; border-radius: 5px; overflow: hidden; box-shadow: 0 0 0 1.5px #f0d58a, 0 1px 4px #000a; background: #0a0c22; }
#buffBar .bf img { width: 100%; height: 100%; }
#buffBar .bf i { position: absolute; left: 0; right: 0; top: 0; background: rgba(0,0,0,.55); }
#buffBar .bf b { position: absolute; right: 1px; bottom: 0; font: bold 10px sans-serif; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.dmg.dot { color: #b8ff7a; font: bold 13px sans-serif; text-shadow: 0 0 3px #000, 0 0 2px #000; }

/* 隊伍面板：多顆按鈕、隊長列；左側隊友頭像可點 */
#dlgBody .row .btns { display: flex; gap: 4px; flex: none; }
#dlgBody .row .btns button:first-child { background: linear-gradient(180deg, #c8f0ff, #5aa8e8); color: #08203a; }
#dlgBody .row.lead { box-shadow: 0 0 0 1.5px #f0d58a inset; }
#party .pm.tap { pointer-events: auto; cursor: pointer; }
#party .pm.tap:active { filter: brightness(1.3); }
.cw-costume-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cw-costume-tabs button { padding: 7px 14px; border: 1px solid #7794b5; border-radius: 6px; background: #19283b; color: #dceaff; cursor: pointer; }
.cw-costume-tabs button.on { color: #fff1bb; border-color: #e1bb64; background: #3c3540; }
.cw-costume-msg { min-height: 1.5em; }
