/* 第 14 輪 D2 角色狀態欄、D3 包包格狀道具頁 */
/* ---------- D2：角色狀態欄（#statcard.cs） ---------- */
#statcard.cs { position: fixed; left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); width: min(920px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); overflow-y: auto; overflow-x: hidden; padding: 0 0 18px; border-radius: 22px; background: var(--card); -webkit-overflow-scrolling: touch; }
body.mui #statcard.cs { left: 0 !important; right: 0 !important; top: 0 !important; width: auto !important; height: 100%; max-height: none !important; transform: none !important; border-radius: 0 !important; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) and (pointer: coarse) {
  body.mui #statcard.cs { left: 50% !important; right: auto !important; top: 50% !important; width: min(900px, calc(100vw - 32px)) !important; height: auto; max-height: calc(100dvh - 32px) !important; transform: translate(-50%, -50%) !important; border-radius: 22px !important; padding-bottom: 18px; }
  body.mui #statcard.cs .cs-x { position: static !important; width: 44px !important; height: 44px !important; border-radius: 50% !important; }
  body.mui #statcard.cs .cs-x::after { content: none !important; }
}
.cs .cs-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) var(--r-gut, 14px) 10px; background: var(--card); border-bottom: 1px solid var(--line); }
.cs .cs-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cs .cs-name { font-size: var(--r-fs-h, 20px); color: var(--title); line-height: 1.2; }
.cs .cs-title { font-size: 13px; opacity: .8; }
.cs .cs-lv { background: var(--acc); color: var(--acc-tx); border-radius: 999px; padding: 3px 14px; font-weight: 900; font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cs .cs-x { margin-left: 0; flex-shrink: 0; }
.cs .cs-grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 12px var(--r-gut, 14px) 0; }
@media (min-width: 700px) { .cs .cs-grid { grid-template-columns: 1fr 1fr; } .cs .cs-stats, .cs .cs-coll { grid-column: 1 / -1; } }
.cs .cs-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 14px; min-width: 0; }
.cs .cs-card h4 { margin: 0 0 8px; font-size: 15px; color: var(--title); } .cs .cs-card h4 small { font-weight: 400; opacity: .7; font-size: 12px; margin-left: 6px; }
.cs .cs-exp { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .cs .cs-exp b { font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cs .cs-bar { position: relative; flex: 1; display: block; height: 12px; border-radius: 7px; background: rgba(74,58,92,.14); overflow: hidden; } .cs .cs-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb347, #ff7f4f); border-radius: 7px; }
.cs .cs-bar.sm { height: 8px; flex: 0 0 100%; margin-top: 2px; }
.cs .cs-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 10px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 14px; } .cs .cs-line:first-of-type { border-top: 0; } .cs .cs-line b { font-variant-numeric: tabular-nums; text-align: right; }
.cs .cs-coin { font-size: 20px; color: #b56f00; }
.cs .cs-stats { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.cs .cs-stats > h4, .cs .cs-stats > .cs-line, .cs .cs-stats > .cs-note { grid-column: 1 / -1; }
@media (min-width: 900px) { .cs .cs-stats { grid-template-columns: repeat(3, 1fr); } }
.cs .cs-stat { padding: 8px 0 10px; border-top: 1px dashed var(--line); }
@media (min-width: 900px) { .cs .cs-stat { border-top: 0; background: rgba(255,176,46,.07); border-radius: 12px; padding: 10px 12px; } }
.cs .cs-stat-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; } .cs .cs-sn { font-weight: 800; font-size: 15px; flex: 1; }
.cs .cs-big { font-size: clamp(30px, 8vw, 40px); line-height: 1; font-weight: 900; color: var(--tx); } .cs .cs-stat-h small { opacity: .6; font-size: 12px; }
.cs .cs-stat:nth-of-type(2) .cs-bar i { background: linear-gradient(90deg, #7fb2ff, #5b8def); } .cs .cs-stat:nth-of-type(3) .cs-bar i { background: linear-gradient(90deg, #ffd23a, #ffb02e); }
.cs .cs-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 8px; font-size: 12.5px; } .cs .cs-chips > span { background: rgba(74,58,92,.08); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.cs .cs-chips .cs-tot { background: rgba(31,157,85,.14); color: #14733f; font-weight: 800; } .cs .cs-chips .cs-tot small { font-weight: 500; opacity: .8; }
.cs em { font-style: normal; font-weight: 800; } .cs .plus, .cs em.plus { color: #1f9d55; font-weight: 800; }
.cs .cs-note { margin: 8px 0 0; font-size: 12.5px; opacity: .78; line-height: 1.55; }
.cs .cs-buffs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; } .cs .cs-buff { border-radius: 999px; background: rgba(74,58,92,.08); padding: 5px 12px; font-size: 13px; } .cs .cs-buff.on { background: rgba(255,176,46,.28); font-weight: 700; } .cs .cs-buff small { margin-left: 6px; opacity: .8; } .cs .cs-buff.none { opacity: .7; }
.cs .cs-eqgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.cs .cs-eq { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px 10px; min-height: 58px; border-radius: 12px; background: #fff; border: 2px solid var(--line); border-left: 6px solid var(--rc, #ccc); font: inherit; color: inherit; } .cs .cs-eq small { opacity: .65; font-size: 11.5px; } .cs .cs-eq b { font-size: 13.5px; line-height: 1.25; overflow-wrap: anywhere; } .cs .cs-eq:not(.worn) b { opacity: .5; font-weight: 600; } .cs .cs-eq i { font-style: normal; font-size: 12px; } .cs .cs-eq.sel { border-color: var(--acc); background: #fff7dc; }
.cs .cs-eqdet { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: #fff7dc; border: 1px solid rgba(200,140,0,.35); border-left: 6px solid var(--rc, #ccc); } .cs .cs-eqdet b { display: block; font-size: 15px; } .cs .cs-eqdet small { opacity: .75; } .cs .cs-eqdet p { margin: 6px 0; font-size: 13.5px; }
.cs .cs-btn { margin-top: 6px; padding: 8px 18px; font-weight: 800; border-radius: 999px; background: var(--acc); color: var(--acc-tx); border: 1px solid var(--acc); min-height: 44px; }
.cs .cs-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; margin-bottom: 6px; } .cs .cs-kpis > div { background: rgba(74,58,92,.06); border-radius: 12px; padding: 8px 2px; min-width: 0; } .cs .cs-kpis b { display: block; font-size: clamp(17px, 4.6vw, 24px); font-variant-numeric: tabular-nums; } .cs .cs-kpis small { font-size: 11.5px; opacity: .75; }
@media (max-width: 360px) { .cs .cs-kpis { grid-template-columns: repeat(3, 1fr); } }
.cs .cs-rate { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; } .cs .cs-rate b { font-size: 34px; font-weight: 900; color: #b56f00; } .cs .cs-rate small { opacity: .75; }

/* ---------- D3：包包格狀道具頁 ---------- */
.bg-inv { display: flex; flex-direction: column; gap: 8px; }
.bg-cats { display: flex; flex-wrap: wrap; gap: 6px; } .bg-cats button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; font-size: 14px; font-weight: 700; border-radius: 999px; } .bg-cats button i { font-style: normal; font-size: 11.5px; opacity: .75; background: rgba(0,0,0,.08); border-radius: 999px; padding: 0 7px; } .bg-cats button.on { background: var(--acc); color: var(--acc-tx); border-color: var(--acc); }
.bg-tools { display: flex; gap: 8px; align-items: center; } .bg-tools input[type=search] { flex: 1; min-width: 0; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font-size: 16px; color: var(--tx); }
.bg-sort { display: flex; align-items: center; gap: 6px; font-size: 13px; flex-shrink: 0; } .bg-sort select { min-height: 44px; padding: 6px 10px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-size: 14px; color: var(--tx); }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
@media (min-width: 600px) { .bg-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; } }
.bg-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding: 6px 2px 5px; min-height: 84px; border-radius: 14px; background: #fff; border: 3px solid var(--rc, #ccc); font: inherit; color: var(--tx); cursor: pointer; touch-action: manipulation; }
.bg-cell .ico { display: block; width: 44px; height: 44px; line-height: 0; } .bg-cell .ico canvas { width: 44px; height: 44px; }
.bg-cell .nm { font-size: 11.5px; line-height: 1.2; text-align: center; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
@media (min-width: 600px) { .bg-cell .nm { font-size: 12.5px; } }
.bg-cell .cnt { position: absolute; right: -4px; top: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #4a3a5c; color: #fff; font-style: normal; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.bg-cell .wr { position: absolute; left: -2px; top: -6px; background: #1f9d55; color: #fff; border-radius: 999px; padding: 0 6px; font-style: normal; font-size: 10.5px; font-weight: 800; line-height: 18px; }
.bg-cell.sel { box-shadow: 0 0 0 3px var(--acc), 0 4px 12px rgba(0,0,0,.18); background: #fff7dc; }
.bg-detail { position: sticky; bottom: 0; z-index: 2; margin-top: 4px; padding: 12px 14px; border-radius: 16px; background: #fff7dc; border: 2px solid var(--rc, var(--line)); box-shadow: 0 -6px 18px rgba(60,40,80,.18); }
.bg-detail.empty { position: static; box-shadow: none; background: rgba(74,58,92,.05); border: 1px dashed var(--line); padding: 4px 14px; }
body.mui .bg-detail { bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) and (pointer: coarse) { body.mui .bg-detail { bottom: 0; } }
.bg-detail .bd-top { display: flex; align-items: center; gap: 10px; } .bg-detail .bd-t { flex: 1; min-width: 0; display: flex; flex-direction: column; } .bg-detail .bd-t b { font-size: 16px; } .bg-detail .bd-t small { font-size: 12.5px; opacity: .8; } .bg-detail .rar { font-style: normal; font-weight: 800; color: var(--rc); }
.bg-detail .bd-x { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; padding: 0; font-size: 15px; }
.bg-detail .bd-fx { margin: 8px 0 2px; font-size: 14px; font-weight: 700; color: #1f7a48; } .bg-detail .bd-fx.dim { color: inherit; font-weight: 400; opacity: .7; }
.bg-detail .bd-sell { margin: 4px 0; font-size: 13px; } .bg-detail .bd-sell.ok { color: #1f7a48; } .bg-detail .bd-sell.no { opacity: .75; }
.bg-detail .bd-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; } .bg-detail .bd-acts .gw-btn { min-height: 44px; }
.bg-detail .bd-msg { margin: 8px 0 0; padding: 6px 12px; border-radius: 999px; background: #4a3a5c; color: #fff; font-size: 13.5px; text-align: center; }
.bg-empty { text-align: center; padding: 24px 8px; }
.ico-fb { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 22px; line-height: 1; box-shadow: inset 0 0 0 3px rgba(255,255,255,.55); }
.bg-cell .nm { line-break: anywhere; }
.cs .cs-str.ok b { color: #1f9d55; } .cs .cs-str.warn b { color: #d98200; } .cs .cs-str.bad b { color: #d33; } .cs .cs-note.warn { color: #d98200; }
