/* A roomy inventory window leaves a blurred view of the game around it. */
.inventoryBackdrop { position:fixed; inset:0; z-index:999; background:#08090c55; backdrop-filter:blur(5px); opacity:0; visibility:hidden; pointer-events:none; transition:opacity .2s ease,visibility 0s linear .24s; }
body:has(#petPanel.open) .inventoryBackdrop { opacity:1; visibility:visible; pointer-events:auto; transition-delay:0s; }
body #petPanel.inventoryView {
  --inventory-edge:50px;
  --inventory-side:110px;
  position:fixed; inset:max(var(--inventory-edge),env(safe-area-inset-top)) max(var(--inventory-side),env(safe-area-inset-right)) max(var(--inventory-edge),env(safe-area-inset-bottom)) max(var(--inventory-side),env(safe-area-inset-left)) !important; width:auto !important; height:auto;
  max-width:none !important; max-height:none !important; box-sizing:border-box;
  z-index:1000 !important; display:grid; grid-template-columns:190px minmax(0,1fr);
  grid-template-rows:auto auto auto minmax(0,1fr);
  grid-template-areas:"header header" "tabs tools" "tabs actions" "tabs content";
  padding:0;
  border:1px solid #ffffff38; border-radius:24px;
  background:linear-gradient(135deg,#ffffff0f,transparent 38%),linear-gradient(160deg,#29292ef0,#16161cf5);
  -webkit-backdrop-filter:blur(22px) saturate(135%); backdrop-filter:blur(22px) saturate(135%);
  box-shadow:inset 0 1px 0 #ffffff38,inset 0 -1px 0 #ffffff0c,0 24px 80px #0008;
  overflow:hidden; isolation:isolate; clip-path:none !important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; letter-spacing:0;
  transform:translateY(14px) scale(.985) !important; opacity:0; visibility:hidden; pointer-events:none;
  animation:none !important;
  transition:opacity .22s ease,transform .34s cubic-bezier(.2,.85,.25,1.1),visibility 0s linear .34s;
}
body #petPanel.inventoryView.open { transform:translateY(0) scale(1) !important; opacity:1; visibility:visible; pointer-events:auto; transition-delay:0s; }
body #petPanel.inventoryView::before { content:none; }
body #petPanel.inventoryView button, body #petPanel.inventoryView input, body #petPanel.inventoryView select { font-family:inherit; letter-spacing:0; }
body:has(#petPanel.open) { overflow:hidden; }
body:has(#petPanel.open) #eggChoiceOverlay { z-index:1100; }
body:has(#petPanel.open) .itemDropFeed { visibility:hidden; pointer-events:none; }
body #petPanel.inventoryView > .slideHeader {
  grid-area:header; position:relative; padding:20px 76px 20px 24px;
  background:linear-gradient(180deg,#ffffff0b,#ffffff02); border-bottom:1px solid #ffffff12; backdrop-filter:none;
}
body #petPanel.inventoryView > .slideHeader b { font-size:24px; line-height:30px; }
body #petPanel.inventoryView > .slideHeader span { display:block; margin-top:3px; font-size:12px; line-height:18px; }
body #petPanel.inventoryView .panelCloseBtn { top:20px; right:24px; width:44px; height:44px; font-size:22px; background:linear-gradient(145deg,#ffffff1a,#ffffff08); border:1px solid #ffffff30; box-shadow:inset 0 1px #ffffff24,0 4px 14px #0002; }
body #petPanel.inventoryView > .panelTabs {
  grid-area:tabs; display:flex; flex-direction:column; flex-wrap:nowrap; align-content:stretch;
  gap:5px; padding:20px 12px; margin:0; border-right:1px solid #ffffff12; background:linear-gradient(120deg,#ffffff07,#ffffff02);
  overflow-y:auto; min-height:0;
  position:relative; isolation:isolate;
}
body #petPanel.inventoryView .inventoryTabLens {
  position:absolute; left:0; top:0; z-index:0; pointer-events:none; opacity:0;
  box-sizing:border-box; border:1px solid #ffffff42; border-radius:16px;
  background:linear-gradient(135deg,#ffffff23,#ffffff0a 55%,#e0ecff13);
  box-shadow:inset 0 1px 0 #ffffff59,inset 0 -1px 0 #ffffff12,0 3px 10px #0003;
  transition:transform .42s cubic-bezier(.22,1.15,.32,1),width .3s ease,height .3s ease,opacity .18s ease;
}
body #petPanel.inventoryView .lensReady .inventoryTabLens { opacity:1; }
body #petPanel.inventoryView .panelTab {
  flex:none; width:100%; min-height:44px; padding:10px 14px; text-align:left;
  border:1px solid transparent; border-radius:16px; background:transparent; color:#bdbdc5; font-size:13px; box-shadow:none;
  position:relative; z-index:1; transition:color .2s ease,background .2s ease,transform .18s ease;
}
body #petPanel.inventoryView .panelTab.active { color:#fff; background:transparent; border-color:transparent; box-shadow:none; text-shadow:0 1px 8px #ffffff16; }
@media (hover:hover) {
  body #petPanel.inventoryView .panelTab:hover { color:#fff; background:#ffffff08; }
  body #petPanel.inventoryView .panelAction:hover, body #petPanel.inventoryView .panelCloseBtn:hover { filter:brightness(1.15); }
}
body #petPanel.inventoryView .panelTab:active { transform:scale(.96); }
body #petPanel.inventoryView > .inventoryTools {
  grid-area:tools; display:grid; grid-template-columns:minmax(140px,1fr) minmax(130px,190px) minmax(130px,190px);
  gap:8px; padding:18px 24px 8px; min-width:0;
}
body #petPanel.inventoryView .inventoryTools[hidden] { display:none; }
.inventoryTools input, .inventoryTools select { box-sizing:border-box; width:100%; min-width:0; min-height:42px; padding:8px 12px; border:1px solid #ffffff24; border-radius:12px; background:linear-gradient(135deg,#ffffff0e,#ffffff05); box-shadow:inset 0 1px #ffffff0d; color:#f5f5f7; font:inherit; font-size:13px; color-scheme:dark; }
.inventoryTools option { background:#29292f; color:#fff; }
.inventoryTools input::placeholder { color:#a9a9b4; }
body #petPanel.inventoryView > .panelActions { grid-area:actions; gap:8px; padding:4px 24px 12px; margin:0; background:transparent; }
body #petPanel.inventoryView .panelAction { flex:0 1 190px; min-height:40px; border-radius:14px; font-size:12px; background:linear-gradient(135deg,#e3a28b38,#e3a28b18); border:1px solid #f1c5b447; box-shadow:inset 0 1px #ffffff29,0 4px 14px #0002; }
body #petPanel.inventoryView .panelAction.secondary { background:linear-gradient(135deg,#98d9ee30,#98d9ee0d); border-color:#b4e2f13d; }
body #petPanel.inventoryView > .panelScroll {
  grid-area:content; min-width:0; min-height:0; max-height:none !important; padding:16px 24px 28px;
  overflow:auto; overscroll-behavior:contain; scroll-behavior:smooth;
  grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px; align-content:start; align-items:start;
  scrollbar-width:thin; scrollbar-color:#66666e transparent;
}
body #petPanel.inventoryView .inventorySectionHeader,
body #petPanel.inventoryView .activePetsPanel,
body #petPanel.inventoryView .activeEnchantPanel,
body #petPanel.inventoryView .inventoryBonusCard,
body #petPanel.inventoryView .petEmpty { grid-column:1 / -1; margin:0; }
body #petPanel.inventoryView .inventorySectionHeader { padding:0 0 10px; background:transparent; border:0; border-radius:0; box-shadow:none; }
body #petPanel.inventoryView .inventoryBonusCard { display:flex; flex-wrap:wrap; align-items:center; gap:8px 24px; padding:12px 0; background:none; border:0; border-bottom:1px solid #ffffff14; border-radius:0; box-shadow:none; }
body #petPanel.inventoryView .inventoryBonusCard small { line-height:1.6; }
body #petPanel.inventoryView .activePetSlots { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,160px)); gap:10px; }
body #petPanel.inventoryView .activeEnchantSlots { display:grid; grid-template-columns:repeat(auto-fit,minmax(100px,140px)); gap:10px; }
body #petPanel.inventoryView .activeEnchantPanel { padding:0; background:none; border:0; border-radius:0; box-shadow:none; }
body #petPanel.inventoryView .activeEnchantSlot { position:relative; display:flex; flex-direction:column; justify-content:center; align-items:center; min-width:0; min-height:108px; padding:10px 6px; text-align:center; border-radius:8px; box-sizing:border-box; }
body #petPanel.inventoryView .activeEnchantSlot.empty { min-height:66px; }
body #petPanel.inventoryView .activeEnchantSlot > span { position:absolute; top:5px; left:5px; width:16px; height:16px; font-size:9px; }
body #petPanel.inventoryView .activeEnchantSlot .enchantBook { width:28px; height:36px; }
body #petPanel.inventoryView .activeEnchantSlot b { font-size:10px; line-height:14px; overflow-wrap:anywhere; }
body #petPanel.inventoryView .activePetSlot {
  box-sizing:border-box; display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
  min-height:174px; padding:30px 10px 10px; border-radius:8px; background:linear-gradient(145deg,#ffffff0c,#ffffff03);
  box-shadow:inset 0 1px #ffffff10; transform:none; overflow:hidden;
}
body #petPanel.inventoryView .activePetSlot.filled::after { display:none; }
body #petPanel.inventoryView .activePetSlot.empty { justify-content:center; }
body #petPanel.inventoryView .activePetSlot .petCircle { flex:none; width:44px; height:44px; margin:0 auto 8px; border-radius:50%; }
body #petPanel.inventoryView .activePetSlotName { width:100%; height:auto; min-height:28px; font-size:11px; line-height:14px; overflow-wrap:anywhere; }
body #petPanel.inventoryView .activePetSlot small { display:block; width:100%; font-size:9px; line-height:13px; margin:3px 0; }
body #petPanel.inventoryView .activePetSlot .petLevelBlock { margin-top:auto; padding-top:6px; }
body #petPanel.inventoryView .activePetSlot .petLevelBlock > span { font-size:9px; line-height:13px; white-space:normal; overflow:visible; }
body #petPanel.inventoryView .petLevelBar { height:17px; }
body #petPanel.inventoryView .petLevelBar em { font-size:9px; line-height:17px; color:#fff; text-shadow:0 1px 2px #000,0 0 3px #000; }
body #petPanel.inventoryView .petLevelBar i { background:linear-gradient(90deg,#467573,#619c8f); box-shadow:none; }
body #petPanel.inventoryView .petInventoryCard,
body #petPanel.inventoryView .skinInventoryCard { box-sizing:border-box; min-width:0; margin:0; padding:14px; border-radius:8px; background:linear-gradient(145deg,#ffffff0c,#ffffff04); border-color:#ffffff1c; box-shadow:inset 0 1px #ffffff10; }
body #petPanel.inventoryView .petInventoryCard { position:relative; display:flex; flex-direction:column; gap:10px; height:100%; }
body #petPanel.inventoryView .petInventoryCard .petTop { display:flex; flex-direction:column; align-items:flex-start; gap:10px; padding-right:22px; }
body #petPanel.inventoryView .petInventoryCard .petCircle { width:44px; height:44px; flex:none; }
body #petPanel.inventoryView .petInventoryCard .petMeta { min-width:0; width:100%; }
body #petPanel.inventoryView .petInventoryCard b { display:block; font-size:13px; line-height:18px; overflow-wrap:anywhere; }
body #petPanel.inventoryView .petInventoryCard small { display:block; font-size:11px; line-height:17px; overflow-wrap:anywhere; }
body #petPanel.inventoryView .petInventoryCard .petLevelBlock { margin-top:auto; }
body #petPanel.inventoryView .petStack { top:12px; right:12px; }
body #petPanel.inventoryView .petBadge { align-self:flex-start; margin-top:0; font-size:10px; line-height:15px; }
body #petPanel.inventoryView .potionCard,
body #petPanel.inventoryView .bagCard,
body #petPanel.inventoryView .inventoryEggCard,
body #petPanel.inventoryView .enchantCard,
body #petPanel.inventoryView .fruitCard { width:100%; box-sizing:border-box; min-width:0; margin:0; border-radius:8px; }
body #petPanel.inventoryView .chancePreviewBtn { position:static; display:inline-flex; align-items:center; align-self:flex-start; min-height:32px; box-sizing:border-box; margin-top:auto; padding:6px 10px; font-size:10px; }
body #petPanel.inventoryView :focus-visible { outline:2px solid #f7b16e; outline-offset:3px; }
@media (max-width:700px), (max-height:500px) and (pointer:coarse) {
  body #petPanel.inventoryView { --inventory-edge:12px; --inventory-side:24px; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto auto auto minmax(0,1fr); grid-template-areas:"header" "tabs" "tools" "actions" "content"; -webkit-backdrop-filter:blur(12px) saturate(120%); backdrop-filter:blur(12px) saturate(120%); }
  body #petPanel.inventoryView > .slideHeader { padding:12px 66px 10px 14px; }
  body #petPanel.inventoryView > .slideHeader b { font-size:20px; line-height:24px; }
  body #petPanel.inventoryView .panelCloseBtn { top:10px; right:12px; }
  body #petPanel.inventoryView > .panelTabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; padding:6px; margin:8px 10px 2px; overflow:visible; border:1px solid #ffffff20; border-radius:22px; background:linear-gradient(135deg,#ffffff0a,#ffffff03); box-shadow:inset 0 1px #ffffff12,0 4px 16px #0001; }
  body #petPanel.inventoryView .panelTab { min-height:36px; padding:6px 3px; font-size:11px; text-align:center; }
  body #petPanel.inventoryView .panelTab.active { box-shadow:none; }
  body #petPanel.inventoryView > .inventoryTools { grid-template-columns:1fr 1fr; gap:6px; padding:8px 10px; }
  body #petPanel.inventoryView .inventoryTools input { grid-column:1 / -1; }
  .inventoryTools input, .inventoryTools select { min-height:38px; font-size:12px; padding:7px 9px; }
  .inventoryTools input { font-size:16px; }
  body #petPanel.inventoryView > .panelActions { padding:0 10px 8px; gap:6px; }
  body #petPanel.inventoryView .panelAction { flex:1; min-height:38px; padding:6px; font-size:11px; }
  body #petPanel.inventoryView > .panelScroll { padding:12px 10px 24px; gap:10px; grid-template-columns:minmax(0,1fr); }
  body #petPanel.inventoryView > #petList,
  body #petPanel.inventoryView > #inventoryEggList { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body #petPanel.inventoryView .activePetSlots { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  body #petPanel.inventoryView .activeEnchantSlots { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  body #petPanel.inventoryView .activePetSlot { min-height:142px; padding:25px 6px 8px; }
  body #petPanel.inventoryView .activePetSlot .petCircle { width:38px; height:38px; margin-bottom:5px; }
  body #petPanel.inventoryView .activePetSlot small { display:none; }
  body #petPanel.inventoryView .activePetSlot .petLevelBlock > span { font-size:8px; line-height:11px; }
  body #petPanel.inventoryView .petInventoryCard { padding:12px 10px; }
  body #petPanel.inventoryView .petInventoryCard .petTop { padding-right:0; }
  body #petPanel.inventoryView .petInventoryCard .petMeta { padding-top:2px; }
  body #petPanel.inventoryView .petInventoryCard b { font-size:12px; line-height:16px; }
  body #petPanel.inventoryView .petInventoryCard small { font-size:10px; line-height:15px; }
  body #petPanel.inventoryView .inventoryEggVisual { width:54px; height:68px; }
  body #petPanel.inventoryView .inventoryEggCard { display:flex; flex-direction:column; align-items:flex-start; gap:8px; padding:12px; }
}
@media (max-height:500px) and (pointer:coarse) {
  body #petPanel.inventoryView { grid-template-columns:130px minmax(0,1fr); grid-template-rows:auto auto auto minmax(0,1fr); grid-template-areas:"header header" "tabs tools" "tabs actions" "tabs content"; }
  body #petPanel.inventoryView > .panelTabs { display:flex; overflow-y:auto; padding:8px; }
  body #petPanel.inventoryView .panelTab { text-align:left; }
  body #petPanel.inventoryView > .inventoryTools { grid-template-columns:1fr 1fr 1fr; }
  body #petPanel.inventoryView .inventoryTools input { grid-column:auto; }
  body #petPanel.inventoryView > #petList { grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); }
}
@media (prefers-reduced-motion:reduce) {
  body #petPanel.inventoryView, body #petPanel.inventoryView .inventoryTabLens, body #petPanel.inventoryView .panelTab, .inventoryBackdrop { transition:none; }
  body #petPanel.inventoryView, body #petPanel.inventoryView.open { transform:none !important; }
  body #petPanel.inventoryView .panelTab:active { transform:none; }
}
