/* v8 - bag and item visuals: framed item slots with hand-drawn art (js/game/itemart.js), a rebuilt bag window and a
   dressed-up paper doll. Everything here layers over ui.css / v4–v7; no markup ids changed. */

/* ── item slot (shared: bag, paper doll, picker, forge) ── */
.cell { border-radius: 12px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(95% 70% at 50% 108%, color-mix(in srgb, var(--rc, #4a5068) 58%, transparent), transparent 68%),
    radial-gradient(70% 55% at 50% 42%, color-mix(in srgb, var(--rc, #4a5068) 16%, transparent), transparent 75%),
    linear-gradient(158deg, #2b3049 0%, #151827 46%, #0a0b14 100%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--rc, #454a62) 82%, #000), inset 0 0 0 3.5px #07080e, inset 0 0 0 4.5px rgba(255,255,255,.07),
    0 0 0 1px #000, 0 3px 7px rgba(0,0,0,.55);
  transition: transform .12s ease-out, filter .12s, box-shadow .12s; }
.cell::before { content: ''; position: absolute; inset: 4px 4px 52% 4px; border-radius: 8px 8px 40% 40%; background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,0)); pointer-events: none; z-index: 0; }
.cell::after { content: ''; position: absolute; top: auto; right: auto; left: 50%; bottom: 3.5px; width: 44%; height: 3px; border-radius: 2px; transform: translateX(-50%); background: var(--rc, transparent); box-shadow: 0 0 8px 1px var(--rc, transparent); opacity: .95; z-index: 1; }
.cell.r0::after { display: block; opacity: .4; box-shadow: none; }
.cell.empty::after, #win-bag .cell.empty::after { display: none; }
.cell img { position: relative; z-index: 1; width: 100%; height: 100%; padding: 12%; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(0,0,0,.65)); pointer-events: none; }
.cell:not(.empty):hover { transform: translateY(-3px) scale(1.04); filter: brightness(1.15); z-index: 3;
  box-shadow: inset 0 0 0 1.5px var(--rc, #8a7a50), inset 0 0 0 3.5px #07080e, inset 0 0 0 4.5px rgba(255,255,255,.12), 0 0 0 1px #000, 0 8px 14px rgba(0,0,0,.6), 0 0 16px color-mix(in srgb, var(--rc, #8a7a50) 55%, transparent); }
.cell.r2, .cell.r3, .cell.r4 { box-shadow: inset 0 0 0 1.5px var(--rc), inset 0 0 0 3.5px #07080e, inset 0 0 0 4.5px rgba(255,255,255,.08), inset 0 0 16px color-mix(in srgb, var(--rc) 38%, transparent), 0 0 0 1px #000, 0 3px 7px rgba(0,0,0,.55), 0 0 9px color-mix(in srgb, var(--rc) 30%, transparent); }
.cell.r3, .cell.r4 { animation: v8cell 2.4s ease-in-out infinite alternate; }
.cell.r4 { animation-duration: 1.7s; }
@keyframes v8cell { to { box-shadow: inset 0 0 0 1.5px var(--rc), inset 0 0 0 3.5px #07080e, inset 0 0 0 4.5px rgba(255,255,255,.1), inset 0 0 24px color-mix(in srgb, var(--rc) 60%, transparent), 0 0 0 1px #000, 0 3px 7px rgba(0,0,0,.55), 0 0 18px color-mix(in srgb, var(--rc) 62%, transparent); } }
.cell.empty { background: radial-gradient(circle at 50% 45%, #171b2b, #0a0c14 82%); box-shadow: inset 0 0 0 1px #2c3146, inset 0 0 0 3px #090a11, inset 0 3px 8px rgba(0,0,0,.7), 0 0 0 1px #000; }
.cell.empty::before { display: none; }
.cell img.ghost { padding: 16%; filter: grayscale(1) brightness(.5) contrast(.9); opacity: .34; }
.cell .ilv, .cell .upg, .cell .better { z-index: 2; }
.cell .ilv { position: absolute; top: auto; right: auto; bottom: 4px; left: 5px; min-width: 17px; padding: 0 4px; border-radius: 6px; font: 800 10.5px/15px var(--num); font-style: normal; text-align: center; color: #efe6d0; background: rgba(6,7,12,.82); box-shadow: 0 0 0 1px rgba(255,255,255,.14); -webkit-text-stroke: 0; direction: ltr; }
.cell .upg { position: absolute; top: 4px; left: 5px; bottom: auto; right: auto; padding: 0 4px; border-radius: 6px; font: 800 10.5px/15px var(--num); font-style: normal; color: #2a1604; background: linear-gradient(180deg, #fff0b0, #f0b038); box-shadow: 0 0 6px rgba(255,200,80,.7); -webkit-text-stroke: 0; direction: ltr; }
.cell .better { position: absolute; top: auto; bottom: 3px; right: 4px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font: 900 9px/1 var(--num); font-style: normal; color: #04360f; background: radial-gradient(circle at 40% 30%, #d8ffe0, #38d862); box-shadow: 0 0 8px #48ff7a, 0 0 0 1px #032; -webkit-text-stroke: 0; text-shadow: none; }

/* ── bag window ── */
#win-bag { width: min(1128px, 97vw); }
#win-bag header { gap: 14px; justify-content: flex-start; }
#win-bag header .x { margin-inline-start: auto; }
#bagHead { display: flex; gap: 8px; align-items: center; margin-inline-start: 10px; }
#bagHead .hchip { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 12px; border-radius: 17px; background: linear-gradient(180deg, rgba(40,44,68,.9), rgba(12,13,22,.9)); box-shadow: inset 0 0 0 1px rgba(240,205,120,.28), inset 0 1px 0 rgba(255,255,255,.08), 0 2px 5px rgba(0,0,0,.4); }
#bagHead .hchip img { width: 24px; height: 24px; margin-inline-start: -4px; filter: drop-shadow(0 1px 1px #000); }
#bagHead .hchip b { font: 800 16px var(--num); color: #fff4d8; direction: ltr; }
#bagHead .hchip small { font: 700 12.5px var(--body); color: #cdbfe6; }
#bagHead .hchip.pw { background: linear-gradient(180deg, rgba(92,58,150,.75), rgba(30,18,58,.9)); box-shadow: inset 0 0 0 1px rgba(200,150,255,.55), inset 0 1px 0 rgba(255,255,255,.14), 0 0 14px rgba(160,100,255,.28); }
#bagHead .hchip.pw b { font-size: 18px; color: #f0deff; text-shadow: 0 0 10px rgba(190,130,255,.8); }
#bagHead .gsico { width: 16px; height: 18px; background: linear-gradient(160deg, #f4e4ff, #a070f0 60%, #5a30b0); clip-path: polygon(50% 0, 100% 16%, 100% 58%, 50% 100%, 0 58%, 0 16%); }

#win-bag .bagwrap { display: grid; grid-template-columns: minmax(0, 1fr) 348px; gap: 16px; align-items: stretch; max-height: none; overflow: visible; }
#win-bag .bagleft { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-content: start; min-width: 0; }
#win-bag .bagleft > * { grid-column: 1 / -1; } #win-bag .bagleft > #bagInfo { grid-column: 1; } #win-bag .bagleft > .bagbulk { grid-column: 2; }

/* what you wear */
#bagEq { display: flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 14px; direction: rtl;
  background: linear-gradient(90deg, rgba(240,205,120,.13), rgba(240,205,120,.03) 60%), rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px rgba(240,205,120,.24), inset 0 1px 0 rgba(255,255,255,.05); }
#bagEq .eqlbl { display: grid; margin-inline-end: auto; line-height: 1.25; } #bagEq .eqlbl b { font: 700 17px var(--head); color: var(--gold); } #bagEq .eqlbl small { font-size: 11.5px; }
#win-bag #bagEq .cell { width: 58px; height: 58px; border-radius: 11px; flex: none; }
#win-bag #bagEq .cell .ilv { bottom: 3px; left: 4px; font-size: 9.5px; line-height: 13px; min-width: 14px; }

#win-bag .bagtools { margin: 0; }
#win-bag .btab { padding: 7px 15px; border-radius: 19px; background: linear-gradient(180deg, rgba(40,44,68,.75), rgba(12,13,22,.8)); box-shadow: inset 0 0 0 1px rgba(240,205,120,.24); transition: filter .12s; }
#win-bag .btab:hover { filter: brightness(1.25); }
#win-bag .btab.on { background: linear-gradient(180deg, #ffe9a8, #dfa23c 55%, #b87a22); color: #2a1604; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 0 0 1px #4a2e08, 0 0 14px rgba(255,200,100,.4); }
#win-bag .btab i { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px; background: rgba(0,0,0,.4); color: #f2e6c8; opacity: 1; vertical-align: 1px; }
#win-bag .btab.on i { background: rgba(60,30,0,.28); color: #2a1604; }

/* the grid: a recessed tray of framed slots */
#win-bag #bagGrid { grid-template-columns: repeat(8, var(--cs, 74px)); gap: 9px; justify-content: center; min-height: 0; padding: 14px 12px; border-radius: 16px; direction: rtl;
  background: radial-gradient(120% 80% at 50% 0%, rgba(90,100,160,.14), transparent 60%), linear-gradient(180deg, rgba(4,5,10,.62), rgba(8,9,16,.42));
  box-shadow: inset 0 0 0 1px rgba(240,205,120,.2), inset 0 3px 14px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.05); }
#win-bag #bagGrid .cell { width: var(--cs, 74px); height: var(--cs, 74px); }
#win-bag .cell:not(.empty)::after { display: block; }
#win-bag .cell img { width: 100%; height: 100%; margin: 0; padding: 8%; }
#win-bag .cell.sel { outline: 0; transform: translateY(-3px) scale(1.05); z-index: 2; animation: none;
  box-shadow: inset 0 0 0 2px #fff3c4, inset 0 0 0 3.5px #07080e, inset 0 0 20px color-mix(in srgb, var(--rc) 55%, transparent), 0 0 0 1.5px #ffe08a, 0 0 0 3px rgba(0,0,0,.8), 0 8px 16px rgba(0,0,0,.6), 0 0 22px rgba(255,224,138,.7); }
#win-bag .cell.nofit { opacity: 1; filter: none; } #win-bag .cell.nofit img { filter: grayscale(.85) brightness(.55); opacity: .7; }
#win-bag .cell.nofit:hover img { filter: grayscale(.4) brightness(.9); opacity: 1; }
#win-bag .cell .ilv { top: auto; bottom: 4px; left: 5px; right: auto; font-size: 10.5px; }
#win-bag .cell .upg { top: 4px; bottom: auto; left: 5px; right: auto; font-size: 10.5px; color: #2a1604; }
#win-bag .cell .better { top: auto; bottom: 3px; right: 4px; font-size: 9px; color: #04360f; text-shadow: none; }
#win-bag .cell .newb { top: 4px; right: 4px; padding: 0 6px; border-radius: 7px; font: 800 9.5px/14px var(--body); color: #2a1604; background: linear-gradient(180deg, #fff6c0, #ffbf3a); box-shadow: 0 0 8px rgba(255,200,60,.85), 0 0 0 1px #5a3606; animation: v8new 1.5s ease-in-out infinite alternate; }
@keyframes v8new { to { box-shadow: 0 0 14px rgba(255,220,110,1), 0 0 0 1px #5a3606; filter: brightness(1.12); } }
#win-bag .bagnone { margin: 46px 0; font-size: 15px; }

/* capacity + bulk tools on one line */
#win-bag #bagInfo { margin: 0; padding: 8px 14px; gap: 12px; flex-wrap: nowrap; border-radius: 12px; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px rgba(240,205,120,.16); font-size: 12.5px; }
#win-bag #bagInfo > b { font: 800 16px var(--num); color: #fff4d8; white-space: nowrap; } #win-bag #bagInfo > b.bad { color: #ff8a70; } #win-bag #bagInfo > b.warnc { color: #ffc060; }
#win-bag #bagInfo > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#win-bag .bagcap { flex: none; width: 120px; height: 10px; border-radius: 5px; background: #06070c; box-shadow: inset 0 0 0 1px #4a3a1c, inset 0 2px 3px #000; }
#win-bag .bagcap i { border-radius: 5px; background: linear-gradient(90deg, #4ad890, #c8e060); box-shadow: 0 0 8px rgba(120,255,160,.5); }
#win-bag .bagcap.full i { background: linear-gradient(90deg, #ff9a3a, #ff3a2a); box-shadow: 0 0 8px rgba(255,90,50,.7); }
#win-bag .bagbulk { justify-content: flex-start; } #win-bag .bagbulk select { padding: 7px 10px; border-radius: 9px; background: #0d0f18; }
#win-bag .bagbulk .btn { padding: 7px 14px; }

/* pouch: stackable things as small framed slots with a count badge */
#win-bag .pouch { margin: 0; padding: 10px 14px 12px; gap: 9px; border-radius: 14px; background: linear-gradient(180deg, rgba(0,0,0,.34), rgba(0,0,0,.2)); box-shadow: inset 0 0 0 1px rgba(240,205,120,.18); }
#win-bag .pouch h4 { font-size: 16px; }
#win-bag .pouch .prow { display: flex; flex-wrap: nowrap; gap: 8px; align-items: flex-start; justify-content: space-between; }
#win-bag .pouch .psep { flex: none; align-self: stretch; width: 1px; margin: 4px 2px 20px; background: linear-gradient(180deg, transparent, rgba(240,205,120,.4), transparent); }
#win-bag .pouch .pit { position: relative; flex: 1 1 0; min-width: 0; display: grid; justify-items: center; gap: 3px; padding: 0; background: none; box-shadow: none; border-radius: 0; }
#win-bag .pouch .pit img { width: 54px; height: 54px; padding: 6px; border-radius: 11px; background: radial-gradient(90% 70% at 50% 105%, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%), linear-gradient(158deg, #2a2f48, #0c0e18 75%); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 62%, #000), inset 0 0 0 3px #07080e, 0 0 0 1px #000, 0 3px 6px rgba(0,0,0,.5); filter: none; transition: transform .12s; }
#win-bag .pouch .pit:hover img { transform: translateY(-2px) scale(1.05); }
#win-bag .pouch .pit > b { position: absolute; top: 37px; inset-inline-start: calc(50% + 8px); min-width: 20px; padding: 0 5px; border-radius: 8px; font: 800 12px/17px var(--num); text-align: center; color: #fff; background: #0a0b12; box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 70%, #000), 0 2px 4px #000; }
#win-bag .pouch .pit > span { font-size: 11px; line-height: 1.2; color: #d8ccb0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#win-bag .pouch .pit.zero img { filter: grayscale(.75) brightness(.72); opacity: .8; } #win-bag .pouch .pit.zero > b { color: #8a8478; box-shadow: 0 0 0 1px #2c3146; } #win-bag .pouch .pit.zero > span { color: #8f887a; }
#win-bag .pouch .bagup { padding-top: 8px; border-top: 1px solid rgba(255,255,255,.07); }

/* ── detail / compare panel ── */
#win-bag #bagDetail { --rc: #c8a860; position: relative; min-height: 0; padding: 14px; gap: 11px; border-radius: 16px; align-content: start; overflow: hidden;
  background: radial-gradient(120% 46% at 50% 0%, color-mix(in srgb, var(--rc) 20%, transparent), transparent 70%), linear-gradient(180deg, rgba(22,25,42,.92), rgba(8,9,16,.9));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 46%, rgba(240,205,120,.2)), inset 0 0 0 3px rgba(0,0,0,.5), inset 0 1px 0 4px rgba(255,255,255,.04), 0 4px 14px rgba(0,0,0,.4); }
.bdshow { position: relative; height: 176px; margin: -4px -4px 0; border-radius: 12px; display: grid; place-items: center; overflow: hidden; isolation: isolate;
  background: radial-gradient(60% 62% at 50% 50%, color-mix(in srgb, var(--rc) 42%, transparent), transparent 72%), radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--rc) 30%, #0a0c14), #07080e 70%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 55%, transparent), inset 0 0 30px rgba(0,0,0,.6); }
.bdshow .bdrays { position: absolute; left: 50%; top: 50%; width: 460px; height: 460px; margin: -230px 0 0 -230px; z-index: -1; opacity: .5; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 70%, transparent) 0 7deg, transparent 7deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 12%, transparent 62%); mask-image: radial-gradient(circle, #000 12%, transparent 62%); animation: v8rays 26s linear infinite; }
.bdshow.r0 .bdrays { opacity: .16; } .bdshow.r1 .bdrays { opacity: .3; } .bdshow.r4 .bdrays { opacity: .7; animation-duration: 16s; }
@keyframes v8rays { to { transform: rotate(360deg); } }
.bdshow .bdring { position: absolute; left: 50%; bottom: 16px; width: 150px; height: 26px; margin-left: -75px; border-radius: 50%; z-index: -1; background: radial-gradient(ellipse, color-mix(in srgb, var(--rc) 55%, transparent), transparent 70%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 40%, transparent); opacity: .8; }
.bdshow img { width: 142px; height: 142px; object-fit: contain; filter: drop-shadow(0 8px 6px rgba(0,0,0,.7)) drop-shadow(0 0 14px color-mix(in srgb, var(--rc) 45%, transparent)); animation: v8float 3.2s ease-in-out infinite alternate; }
@keyframes v8float { from { transform: translateY(3px); } to { transform: translateY(-5px); } }
.bdshow .upg { position: absolute; top: 9px; left: 10px; padding: 1px 8px; border-radius: 9px; font: 800 15px/20px var(--num); font-style: normal; color: #2a1604; background: linear-gradient(180deg, #fff0b0, #f0b038); box-shadow: 0 0 10px rgba(255,200,80,.7); direction: ltr; }
.bdshow .bdpow { position: absolute; top: 9px; right: 10px; display: flex; align-items: center; gap: 5px; padding: 1px 10px; border-radius: 10px; font: 800 15px/22px var(--num); font-style: normal; color: #f0deff; background: rgba(30,18,58,.85); box-shadow: inset 0 0 0 1px rgba(200,150,255,.55); direction: ltr; }
.bdshow .bdpow::before { content: ''; width: 10px; height: 12px; background: linear-gradient(160deg, #f4e4ff, #a070f0 60%, #5a30b0); clip-path: polygon(50% 0, 100% 16%, 100% 58%, 50% 100%, 0 58%, 0 16%); }
.bdhead { display: grid; justify-items: center; gap: 6px; text-align: center; }
#bagDetail .bdname { font: 800 20px/1.35 var(--head); text-shadow: 0 0 16px color-mix(in srgb, var(--rc) 55%, transparent), 0 2px 2px #000; }
.bdtags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.bdtags span { padding: 1px 10px; border-radius: 10px; font: 700 12px/20px var(--body); color: #d8ccb0; background: rgba(0,0,0,.4); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.bdtags .rar { color: #0b0c14; background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 70%, #fff), var(--rc)); box-shadow: 0 0 10px color-mix(in srgb, var(--rc) 50%, transparent); font-weight: 800; }
#bagDetail .vd { margin: 0; padding: 3px 14px; border-radius: 12px; font-size: 13.5px; }
#bagDetail .vd.up { background: rgba(40,160,80,.18); box-shadow: inset 0 0 0 1px rgba(100,255,140,.5), 0 0 12px rgba(80,255,120,.2); }
#bagDetail .bdstats { gap: 5px; }
#bagDetail .srow { grid-template-columns: 1fr auto 74px; padding: 6px 12px; border-radius: 9px; background: linear-gradient(90deg, rgba(255,255,255,.055), rgba(255,255,255,.015)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
#bagDetail .srow span { color: #e2d8c2; } #bagDetail .srow b { font: 800 16px var(--num); color: #fff; }
#bagDetail .srow i.up, #bagDetail .srow i.dn { padding: 0 6px; border-radius: 7px; text-align: center; font-size: 12px; line-height: 19px; }
#bagDetail .srow i.up { background: rgba(60,220,110,.14); } #bagDetail .srow i.dn { background: rgba(255,100,80,.14); }
#bagDetail .bdcmp small { margin-bottom: 5px; font-size: 12px; }
#bagDetail .bdcmp > div { gap: 10px; padding: 7px 10px; border-radius: 11px; background: rgba(0,0,0,.34); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 45%, transparent); }
#win-bag #bagDetail .bdcmp .cell { width: 44px; height: 44px; flex: none; border-radius: 9px; animation: none; cursor: default; } #bagDetail .bdcmp .cell::after { display: none; }
#bagDetail .bdcmp .cell img { width: 100%; height: 100%; padding: 10%; }
#bagDetail .bdcmp b { flex: 1; font: 700 14px/1.3 var(--head); } #bagDetail .bdcmp em { font: 800 14px var(--num); font-style: normal; color: #cdbfe6; }
#bagDetail .bdact { grid-template-columns: 1fr 1fr; gap: 7px; }
#bagDetail .bdact .btn { padding: 8px 8px; font-size: 13.5px; white-space: nowrap; } #bagDetail .bdact .btn:first-child { grid-column: 1 / -1; padding: 10px; font: 700 17px var(--head); }
#bagDetail .bdact .btn img { width: 20px; height: 20px; }
/* nothing selected */
#bagDetail .bdempty { padding-top: 18px; gap: 7px; min-height: 100%; align-content: start; }
#win-bag #bagDetail:not(.has) { align-content: stretch; }
#bagDetail .bdhint { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(240,205,120,.2), transparent 70%); box-shadow: inset 0 0 0 1px rgba(240,205,120,.3), 0 0 24px rgba(240,205,120,.12); }
#bagDetail .bdempty > b { font-size: 21px; }
#bagDetail .bdempty ul { width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: 11px; background: rgba(0,0,0,.28); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
#bagDetail .bdempty .better { position: static; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font: 900 9px/1 var(--num); color: #04360f; background: radial-gradient(circle at 40% 30%, #d8ffe0, #38d862); box-shadow: 0 0 8px #48ff7a; flex: none; }
#bagDetail .bdempty .newb { top: auto; right: auto; }
#bagDetail .lgd { width: 17px; height: 17px; border-radius: 5px; flex: none; } #bagDetail .lgd.nofit { background: #3a3d48; box-shadow: inset 0 0 0 1.5px #5a5e6c; }
#bagDetail .lgd.rar { background: conic-gradient(#d7d2c8 0 20%, #5fe07a 0 40%, #4aa8ff 0 60%, #c26bff 0 80%, #ff9a2e 0); box-shadow: 0 0 0 1px #000; }
#bagDetail .keys { width: 100%; }
#bagDetail .bdact { margin-top: auto; } #win-bag #bagDetail.has { display: flex; flex-direction: column; }
@media (max-height: 800px) { .bdshow { height: 132px; } .bdshow img { width: 108px; height: 108px; } #bagDetail .bdempty ul { display: none; } }

/* ── character window: paper doll ── */
#win-char { width: min(900px, 96vw); }
#win-char .charwrap { grid-template-columns: 420px 1fr; gap: 20px; }
#paper { gap: 12px 214px; padding: 14px 16px 10px; border-radius: 16px;
  background: radial-gradient(60% 55% at 50% 44%, rgba(120,110,200,.2), transparent 72%), linear-gradient(180deg, rgba(4,5,10,.58), rgba(8,9,16,.38));
  box-shadow: inset 0 0 0 1px rgba(240,205,120,.2), inset 0 3px 14px rgba(0,0,0,.65); }
#paper .pslot { gap: 4px; }
#paper .pslot .cell { width: 72px; height: 72px; }
#paper .pslot small { font: 700 12.5px var(--body); color: #d8ccb0; }
#paper .pslot:hover { transform: none; }
#paper .pslot:hover .cell { transform: translateY(-3px) scale(1.04); box-shadow: inset 0 0 0 1.5px var(--rc, #b89a58), inset 0 0 0 3.5px #07080e, 0 0 0 1px #000, 0 8px 14px rgba(0,0,0,.6), 0 0 16px color-mix(in srgb, var(--rc, #f0cd78) 55%, transparent); }
#paper .pslot.on .cell { outline: 0; animation: none; box-shadow: inset 0 0 0 2px #fff3c4, inset 0 0 0 3.5px #07080e, 0 0 0 1.5px #ffe08a, 0 0 22px rgba(255,224,138,.7); }
#paper .pslot.hasup .cell.empty { animation: slotpulse 1.6s ease-in-out infinite; }
#paper .slotup { top: -7px; right: 4px; width: 22px; height: 22px; }
#paper .slotn { top: -6px; right: 6px; }
#paper .pfig { width: 214px; height: 330px; top: 46%; }
#paper .pfig::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 4px; height: 26px; border-radius: 50%; background: radial-gradient(ellipse, rgba(240,205,120,.34), transparent 70%); box-shadow: 0 0 0 1px rgba(240,205,120,.22); z-index: -1; }
#win-char #stats > div { padding: 7px 14px; border-radius: 9px; background: linear-gradient(90deg, rgba(255,255,255,.055), rgba(255,255,255,.015)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
#win-char #stats .gs { background: linear-gradient(90deg, rgba(150,100,255,.3), rgba(150,100,255,.06)) !important; box-shadow: inset 0 0 0 1px rgba(200,150,255,.45); } #win-char #stats .gs b { color: #f0deff; font-size: 18px; text-shadow: 0 0 10px rgba(190,130,255,.8); }

/* picker rows, forge, shop, tooltip: same art, sized to fit */
.eqpick .eqcur .cell img, .eqrow .cell img, .frow .cell img { width: 100%; height: 100%; padding: 10%; }
.eqpick .cell, .frow .cell { border-radius: 9px; } .eqpick .cell::after, .frow .cell::after { display: none; }
.eqrow .cell .ilv { bottom: 2px; left: 2px; font-size: 9px; line-height: 12px; min-width: 13px; padding: 0 3px; }
.fbig img { padding: 10%; filter: drop-shadow(0 5px 4px rgba(0,0,0,.7)); }
.shopRow .shopic { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
#tip .ticon { padding: 5px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.beast img[src^="data:image/svg"] { padding: 7px; }
#win-bag .btab i:empty { display: none; }
