/* Character left, movable bag right. Keep every cell a usable touch target. */
.dg-dialog.pack39-dialog{width:min(1100px,96vw);max-width:1100px;border:4px solid #2b1d14;border-radius:24px;background:#f8edcf;color:#2b1d14;box-shadow:0 8px 0 #2b1d14,0 20px 60px #0007}
.pack39-dialog .dg-dialog-body{max-height:82vh;padding:18px}.pack39-dialog .dg-dialog-head{background:#ead5a0;border-bottom:3px solid #2b1d14;color:#2b1d14}.pack39-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:22px;align-items:start}.pack39-character{position:sticky;top:0;display:flex;flex-direction:column;align-items:center;background:#dae8cb;border:3px solid #2b1d14;border-radius:20px;padding:14px;box-shadow:0 5px 0 #7b8059}.pack39-character>b{font:900 26px var(--f-num)}.pack39-character canvas{width:100%;height:auto;max-height:230px;object-fit:contain}.pack39-worn{display:flex;gap:8px;justify-content:center;width:100%}.pack39-wear{border:2px solid #2b1d14;background:#fff9e6;border-radius:12px;min-width:56px;min-height:70px;padding:4px;cursor:pointer}.pack39-wear span{display:block;width:42px;height:42px;margin:auto}.pack39-wear svg{width:100%;height:100%}.pack39-wear small{font-size:11px}.pack39-character dl{width:100%;margin:14px 0}.pack39-character dl>div{display:flex;justify-content:space-between;gap:6px;border-bottom:1px solid #9dad8d;padding:5px;font-size:13px}.pack39-character dd{font:bold 17px var(--f-num);margin:0}.pack39-character>.dg-button{width:100%;min-height:44px;margin:4px 0}.pack39-dialog .dg-button{color:#2b1d14;background:#fff7df;border:2px solid #2b1d14;box-shadow:0 3px 0 #8f784f;border-radius:12px;min-height:44px}.pack39-dialog .dg-button:disabled{opacity:.5}.pack39-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.pack39-heading b{display:block;font:900 24px var(--f-title)}.pack39-heading small{display:block;font-size:12px;color:#6a5639;margin-top:5px}.pack39-heading>div:last-child{display:flex;gap:8px}.pack39-tabs{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}.pack39-tabs [aria-pressed=true]{background:#b8dace}.pack39-grid{display:grid;grid-template-columns:repeat(8,minmax(44px,1fr));gap:7px;max-height:340px;overflow-y:auto;overscroll-behavior:contain;padding:6px 8px 10px 4px;background:#d7bc87;border:3px solid #2b1d14;border-radius:16px;scrollbar-color:#8c6843 #e7d5aa}.pack39-cell{position:relative;display:grid;place-items:center;aspect-ratio:1;min-width:44px;min-height:44px;padding:5px;border:2px solid #715a39;border-radius:9px;background:#eadbb6;box-shadow:inset 0 3px 5px #79613a22;cursor:pointer;touch-action:none;user-select:none}.pack39-cell.empty{touch-action:pan-y;background:#c4ae82}.pack39-cell.occupied{background:#fff3d1}.pack39-cell.worn{background:#e0eccd}.pack39-cell[aria-pressed=true]{outline:3px solid #237e7e;outline-offset:-3px;box-shadow:inset 0 0 0 4px #a7e0c9}.pack39-cell img,.pack39-cell svg,.pack39-cell .adv-kit-icon{width:100%;height:100%;max-height:62px;object-fit:contain;pointer-events:none}.pack39-cell-no{position:absolute;top:3px;left:5px;font:10px var(--f-num);color:#655439}.pack39-count{position:absolute;bottom:0;right:3px;font:900 15px var(--f-num);color:white;text-shadow:-1px -1px #2b1d14,1px 1px #2b1d14,1px -1px #2b1d14,-1px 1px #2b1d14}.pack39-equipped{position:absolute;top:1px;right:2px;font-size:10px;font-style:normal;background:#30664e;color:white;padding:1px 3px;border-radius:4px}.pack39-over{background:#a8e4ca!important;outline:4px solid #237e7e;outline-offset:-4px}.pack39-help{font-size:12px;color:#6a5639;margin:9px 0}.pack39-detail{display:flex;gap:14px;padding:14px;background:#fff9e8;border:2px solid #b79b61;border-radius:14px;min-height:128px}.pack39-detail-art{width:64px;height:64px;flex-shrink:0}.pack39-detail-art img,.pack39-detail-art svg{width:100%;height:100%;object-fit:contain}.pack39-detail h3{font-size:17px;margin:0 0 6px}.pack39-detail p{font-size:13px;line-height:1.6;margin:5px 0}.pack39-detail small{display:block;font-size:12px;color:#62614a}.pack39-detail button{margin-top:10px}.pack39-status{font-size:12px;color:#356550}.pack39-basic{display:grid;place-items:center;width:36px;height:44px;border:3px solid #2b1d14;border-radius:8px 8px 16px 16px;background:#ea8667;color:white;font-size:15px;font-weight:bold}.pack39-basic.ether{background:#79b7e0}.pack39-scroll{font-size:24px;color:#785929}.pack39-ghost{position:fixed;z-index:100000;pointer-events:none;width:64px;height:64px;transform:translate(-50%,-50%);background:#fff4d2;border:3px solid #2b1d14;border-radius:12px;box-shadow:0 6px 0 #2b1d1477;padding:7px;opacity:.9}.pack39-ghost img,.pack39-ghost svg{width:100%;height:100%;object-fit:contain}.dg-dialog-layer[data-saving=true] .pack39-layout{opacity:.7}.pack39-craft{margin-top:12px;border-top:2px solid #b79b61;padding-top:10px}.pack39-craft summary{cursor:pointer;min-height:44px;font-weight:bold}.pack39-craft .dg-pack-tabs{display:none}.pack39-craft .dg-pack-note,.pack39-craft .dg-item-grid p,.pack39-craft .dg-item-grid small{color:#344b36}.pack39-craft .dg-item-grid article,.pack39-craft .dg-pack-recipe{background:#e1e7cf}.pack39-craft h3{color:#2b1d14}.pack39-empty-hint{padding:12px;color:#6a5639;font-size:13px}
@media(max-width:700px){.pack39-dialog .dg-dialog-body{padding:9px}.pack39-layout{grid-template-columns:96px minmax(0,1fr);gap:9px}.pack39-character{padding:6px;border-radius:13px}.pack39-character canvas{max-height:125px}.pack39-character>b{font-size:20px}.pack39-character>small{font-size:11px}.pack39-worn{flex-wrap:wrap;gap:4px}.pack39-wear{min-width:44px;width:44px;min-height:53px;padding:2px}.pack39-wear span{width:30px;height:30px}.pack39-character dl>div{font-size:10px;padding:4px 0}.pack39-character dd{font-size:13px}.pack39-character>.dg-button{padding:5px 2px;font-size:10px;min-height:44px}.pack39-heading{display:block}.pack39-heading b{font-size:19px}.pack39-heading small{font-size:10px}.pack39-heading>div:last-child{margin-top:9px;gap:5px}.pack39-heading .dg-button{padding:5px;font-size:11px;flex:1}.pack39-grid{grid-template-columns:repeat(4,minmax(44px,1fr));gap:4px;padding:5px;max-height:330px;border-radius:11px}.pack39-tabs{gap:4px}.pack39-tabs .dg-button{font-size:10px;padding:4px 5px;min-height:44px;flex:1 0 40%}.pack39-detail{display:block;padding:9px;min-height:120px}.pack39-detail-art{width:45px;height:45px;float:left;margin:0 6px 5px 0}.pack39-detail h3{font-size:14px}.pack39-detail p{font-size:11px}.pack39-detail small,.pack39-help,.pack39-status{font-size:10px}.pack39-cell img,.pack39-cell svg{max-height:46px}.pack39-craft .dg-item-grid article{display:block}.pack39-craft .dg-item-grid img{width:44px;height:44px}}
/* The shared dialog button rule otherwise enables native panning on held items. */
.pack39-dialog .pack39-cell.occupied{touch-action:none}.pack39-dialog .pack39-cell.empty{touch-action:pan-y}
