/* ============================================================================
   SIDEBAR V3 — card do treinador + inventário.

   Carregado depois de menu-v3/account-v3/mobile para poder ajustar só a
   coluna direita. Todos os IDs e handlers continuam iguais; o JS só passou a
   usar ícones do sprite e a desenhar boost/helds nos slots de Pokémon.
   ========================================================================== */

/* Médio: a coluna cede alguns pixels para o mapa, sem encolher os slots. */
@media (max-width: 1360px) and (min-width: 901px) {
  :root {
    --sidebar-w-base: 256px;
  }
}

html:not(.pokeidle-mobile) #sidebar-right {
  gap: 8px;
  padding: 8px;
  background: linear-gradient(180deg, rgba(9, 14, 28, 0.72), rgba(5, 8, 16, 0.84)) !important;
  border-left: 1px solid rgba(148, 163, 184, 0.12) !important;
  box-shadow: -12px 0 34px rgba(2, 6, 17, 0.28) !important;
}
html:not(.pokeidle-mobile) #sidebar-right > #trainer-card,
html:not(.pokeidle-mobile) #sidebar-right > #inventory {
  margin: 0 !important;
}

/* ── Card do treinador ───────────────────────────────────────────────────── */
#trainer-card {
  position: relative;
  gap: 0 !important;
  padding: 11px 11px 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.13) !important;
  border-radius: 16px !important;
  background:
    radial-gradient(340px 120px at 100% 0%, rgba(56, 189, 248, 0.08), transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
  color: #e7edfd !important;
  font-family: 'Outfit', sans-serif !important;
}
#trainer-card::after {
  display: none !important;
}
#tr-map-wrap {
  margin-bottom: 8px !important;
  padding: 3px !important;
  border: 1px solid rgba(148, 163, 184, 0.13) !important;
  border-radius: 11px !important;
  background: rgba(4, 8, 18, 0.55) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035) !important;
}
#tr-map-wrap[hidden] {
  display: none !important;
}
#tr-pos {
  right: 7px !important;
  top: 6px !important;
  bottom: auto !important;
  padding: 2px 6px !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  border-radius: 999px !important;
  background: rgba(4, 8, 18, 0.82) !important;
  color: #bae6fd !important;
  font-size: 7.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  backdrop-filter: blur(6px);
}
#tr-main {
  display: block;
}

.tr-topline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-height: 21px;
}
.tr-vip-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 7px;
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.07);
  color: #fde68a;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.tr-vip-chip[hidden] {
  display: none !important;
}
.tr-vip-chip .pk-i {
  width: 11px;
  height: 11px;
}
.tr-level-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  height: 21px;
  padding: 0 8px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.09);
  color: #7dd3fc;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.tr-level-pill #tr-level {
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: #dff4ff !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

.tr-name-row {
  display: flex;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: space-between !important;
  gap: 6px;
  margin-top: 7px;
  min-width: 0;
}
.tr-name-left {
  display: flex;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
#tr-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: #f4f7ff !important;
  font-size: 15px !important;
  font-weight: 750 !important;
  letter-spacing: 0.01em !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#tr-name .god-badge,
#tr-name img {
  flex: 0 0 auto;
}
#tr-clan {
  display: inline-flex !important;
  flex: 0 1 auto !important;
  align-items: center !important;
  gap: 5px !important;
  width: auto !important;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  height: 21px !important;
  padding: 0 7px !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.035) !important;
  color: #9fb3c8 !important;
  font-family: inherit !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  cursor: pointer;
}
#tr-clan:hover {
  border-color: rgba(56, 189, 248, 0.35) !important;
  color: #bae6fd !important;
}
#tr-clan[hidden] {
  display: none !important;
}
#tr-clan-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: #7dd3fc;
  font-size: 9px !important;
}
#tr-clan-icon .pk-i {
  width: 12px;
  height: 12px;
}
#tr-clan-name {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 90px;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#tr-clan-icon img,
#tr-clan-icon .tr-clan-crest,
#tr-clan-icon .tr-clan-element {
  width: 12px;
  height: 12px;
  object-fit: contain;
}
#tr-clan-rank {
  position: static !important;
  inset: auto !important;
  flex: 0 0 auto;
  padding: 0 0 0 5px !important;
  border: 0 !important;
  border-left: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #7dd3fc !important;
  font-size: 8px !important;
}

#tr-bless {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 7px !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: #9fb3c8 !important;
  font-family: inherit !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  cursor: pointer;
}
#tr-bless .pk-i {
  width: 11px;
  height: 11px;
}
#tr-bless.has {
  border-color: rgba(250, 204, 21, 0.28) !important;
  background: rgba(250, 204, 21, 0.08) !important;
  color: #fde68a !important;
}
.tr-bless-max {
  color: #7b8bab;
  font-weight: 700;
}
#tr-bless.has .tr-bless-max {
  color: #b9a25a;
}

.tr-barline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.tr-bar-label {
  color: #6f81a3;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
#tr-hp-text {
  position: static !important;
  inset: auto !important;
  display: inline-block !important;
  z-index: auto !important;
  color: #9fb3c8 !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  text-shadow: none !important;
  font-variant-numeric: tabular-nums;
}
#tr-hp-wrap {
  height: 7px !important;
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13) !important;
  border-radius: 999px !important;
  background: rgba(4, 8, 18, 0.65) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
#tr-hp {
  border-radius: inherit !important;
  background: linear-gradient(90deg, #10b981, #34d399) !important;
  box-shadow: 0 0 9px rgba(52, 211, 153, 0.45);
}

.tr-vitals-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  margin-top: 9px;
}
#tr-vitals,
#tr-hunt-time {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 0;
  padding: 7px 8px !important;
  border: 1px solid rgba(148, 163, 184, 0.11) !important;
  border-radius: 10px !important;
  background: rgba(4, 8, 18, 0.26) !important;
  color: inherit !important;
  font-family: inherit !important;
  text-align: left;
}
button#tr-vitals {
  cursor: pointer;
}
button#tr-vitals:hover {
  border-color: rgba(56, 189, 248, 0.35) !important;
  background: rgba(56, 189, 248, 0.07) !important;
}
.tr-vital-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 7px;
}
.tr-vital-ico .pk-i {
  width: 13px;
  height: 13px;
}
#tr-vitals .tr-vital-ico {
  color: #fbbf24;
  background: rgba(250, 204, 21, 0.09);
}
#tr-hunt-time .tr-vital-ico {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.09);
}
.tr-vital-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}
.tr-vital-value {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
#tr-stamina {
  color: #dbe7ff !important;
  font-size: 10.5px !important;
  font-weight: 750 !important;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
#tr-hunt-time-value {
  color: #dbe7ff !important;
  font-size: 10.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.tr-vital-label {
  color: #6f81a3;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}
#tr-stamina-mode {
  padding: 0 4px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  color: #d8b4fe;
  font-size: 6.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
#tr-stamina-mode[hidden] {
  display: none;
}
#tr-balls {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 3px;
}
#tr-balls .tr-ball {
  width: 5px !important;
  height: 5px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(148, 163, 184, 0.28) !important;
  box-shadow: none !important;
}
#tr-balls .tr-ball.on {
  background: #f87171 !important;
  box-shadow: 0 0 5px rgba(248, 113, 113, 0.65) !important;
}
#tr-hunt-time.low #tr-hunt-time-value {
  color: #fca5a5 !important;
}

.tr-xp-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
#tr-xptext {
  min-width: 0;
  overflow: hidden;
  color: #7b8bab !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#tr-xp-wrap {
  height: 6px !important;
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  border-radius: 999px !important;
  background: rgba(4, 8, 18, 0.65) !important;
}
#tr-xp {
  border-radius: inherit !important;
  background: linear-gradient(90deg, #6366f1, #a855f7) !important;
  box-shadow: 0 0 9px rgba(139, 92, 246, 0.45);
}

.tr-bonus-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.tr-bonus-row:not(:has(button:not([hidden]))) {
  display: none;
}
.tr-bonus[hidden] {
  display: none !important;
}
.tr-bonus {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 7px !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  border-radius: 999px !important;
  background: rgba(56, 189, 248, 0.08) !important;
  color: #bae6fd !important;
  font-family: inherit !important;
  font-size: 8.5px !important;
  font-weight: 800 !important;
  white-space: nowrap;
  cursor: pointer;
}
.tr-bonus .pk-i {
  width: 10px;
  height: 10px;
}
.tr-bonus.negative {
  border-color: rgba(239, 68, 68, 0.32) !important;
  background: rgba(239, 68, 68, 0.08) !important;
  color: #fca5a5 !important;
}
.tr-bonus-shiny {
  border-color: rgba(139, 92, 246, 0.28) !important;
  background: rgba(139, 92, 246, 0.08) !important;
  color: #d8b4fe !important;
}

#tr-xp-boost-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 7px 8px !important;
  border: 1px solid rgba(250, 204, 21, 0.16) !important;
  border-radius: 10px !important;
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.06), rgba(255, 255, 255, 0.015)) !important;
}
.tr-xp-boost-star {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #facc15;
}
.tr-xp-boost-star .pk-i {
  width: 14px;
  height: 14px;
  filter: drop-shadow(0 0 5px rgba(250, 204, 21, 0.4));
}
.tr-xp-boost-label {
  min-width: 0;
  flex: 1;
  color: #ffe08a !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em;
}
.tr-xp-boost-time {
  color: #9a8350 !important;
  font-size: 8px !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
}
.tr-xp-boost-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}
#tr-xp-boost-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0 !important;
  border: 1px solid rgba(148, 163, 184, 0.15) !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #9fb3c8 !important;
  cursor: pointer;
}
#tr-xp-boost-toggle[hidden] {
  display: none !important;
}
#tr-xp-boost-toggle .pk-i {
  width: 12px;
  height: 12px;
}
#tr-xp-boost-toggle .tr-boost-play {
  display: none;
}
#tr-xp-boost-toggle.is-paused .tr-boost-pause {
  display: none;
}
#tr-xp-boost-toggle.is-paused .tr-boost-play {
  display: block;
}
#tr-xp-boost-buy {
  height: 24px !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: linear-gradient(135deg, #38bdf8, #4f8ef7) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 8.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(79, 142, 247, 0.3);
}
#tr-xp-boost-buy:hover {
  filter: brightness(1.08);
}

/* ── Inventário ──────────────────────────────────────────────────────────── */
#inventory {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 !important;
  padding: 10px !important;
  border: 1px solid rgba(148, 163, 184, 0.13) !important;
  border-radius: 16px !important;
  background:
    radial-gradient(340px 120px at 100% 0%, rgba(56, 189, 248, 0.07), transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.016)) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  color: #e7edfd !important;
  font-family: 'Outfit', sans-serif !important;
}
#inventory .inv-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
}
#inventory .inv-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  color: #dfe8fb !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
}
#inventory .inv-title::before {
  display: none !important;
}
#inventory .inv-title .pk-i {
  width: 14px;
  height: 14px;
  color: #7dd3fc;
}
.inv-count {
  color: #5f708e;
  font-size: 8.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#inventory .inv-min {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px !important;
  height: 22px !important;
  padding: 0 !important;
  border: 1px solid rgba(148, 163, 184, 0.15) !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #9fb3c8 !important;
  cursor: pointer;
}
#inventory .inv-min .pk-i {
  width: 12px;
  height: 12px;
  transition: transform 0.16s ease;
}
#inventory .inv-min.is-collapsed .pk-i {
  transform: rotate(180deg);
}
#inventory .inv-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 3px !important;
  margin-top: 9px !important;
  padding: 3px !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  border-radius: 9px !important;
  background: rgba(4, 8, 18, 0.4) !important;
  box-shadow: none !important;
}
#inventory .inv-tab {
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: 27px !important;
  padding: 0 4px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #7b8bab !important;
  font-size: 8.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
#inventory .inv-tab:hover {
  color: #b9c8e8 !important;
}
#inventory .inv-tab.active {
  border-color: rgba(56, 189, 248, 0.26) !important;
  background: rgba(56, 189, 248, 0.12) !important;
  color: #bae6fd !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

#inventory > #inv-grid {
  flex: 1 1 auto;
  min-height: 0;
  height: auto !important;
  max-height: none !important;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: minmax(0, auto);
  align-content: start;
  gap: 5px;
  margin-top: 8px;
  padding: 7px !important;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(148, 163, 184, 0.1) !important;
  border-radius: 11px !important;
  background: rgba(4, 8, 18, 0.36) !important;
  background-image: none !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22) !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.24) transparent;
}
#inventory > #inv-grid.poke-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
#inventory > #inv-grid[hidden] {
  display: none !important;
}

#inventory .inv-cell {
  position: relative;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
#inventory .inv-cell:hover {
  border-color: rgba(56, 189, 248, 0.42) !important;
  background: rgba(56, 189, 248, 0.08) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}
#inventory .inv-cell.inv-cell-empty {
  border-color: rgba(148, 163, 184, 0.055) !important;
  background: rgba(255, 255, 255, 0.014) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018) !important;
}
#inventory .inv-cell img {
  width: 68%;
  height: 68%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}
#inventory .inv-cell .cnt {
  position: absolute;
  right: 2px !important;
  left: auto !important;
  bottom: 2px !important;
  min-width: 13px;
  height: 12px;
  padding: 0 3px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 5px !important;
  background: rgba(3, 6, 14, 0.82) !important;
  color: #f1f5f9 !important;
  font-size: 7px !important;
  font-weight: 800 !important;
  line-height: 10px !important;
  text-align: center;
  text-shadow: none !important;
  font-variant-numeric: tabular-nums;
}
#inventory .inv-cell .cnt:empty {
  display: none !important;
}
#inventory .inv-cell.inv-has-menu {
  border-color: rgba(250, 204, 21, 0.30) !important;
}
#inventory .inv-cell.inv-has-menu:hover {
  border-color: rgba(250, 204, 21, 0.52) !important;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.18) !important;
}

/* Pokémon: bola de fundo, sprite grande, boost e helds sobrepostos. */
#inventory .inv-cell.inv-poke {
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 50% !important;
  background: linear-gradient(to bottom, #df3b31 0 46%, #0b0e16 46% 54%, #f1f5f9 54% 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}
#inventory .inv-cell.inv-poke::before {
  content: none !important;
}
#inventory .inv-cell.inv-poke:hover {
  border-color: rgba(125, 211, 252, 0.62) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}
#inventory .inv-cell.inv-poke .inv-poke-art,
#inventory .inv-cell.inv-poke canvas.inv-poke-art {
  position: relative;
  z-index: 1;
  width: 80% !important;
  height: 80% !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain;
  transform: translateY(-2%);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.42));
}
#inventory .inv-cell.inv-poke.fainted {
  opacity: 0.55;
}
#inventory .inv-boost {
  position: absolute !important;
  top: 2px !important;
  right: 2px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 5;
  min-width: 19px !important;
  height: 13px !important;
  padding: 0 3px !important;
  border: 1px solid rgba(250, 204, 21, 0.42) !important;
  border-radius: 999px !important;
  background: rgba(4, 7, 14, 0.84) !important;
  color: #fde68a !important;
  font-size: 7px !important;
  font-weight: 800 !important;
  line-height: 11px !important;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: none !important;
}
#inventory .inv-helds {
  position: absolute;
  left: 50%;
  bottom: 3px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 1px 3px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(4, 7, 14, 0.78);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
#inventory .inv-helds img {
  width: 13px;
  height: 13px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: none;
}
#inventory .inv-lock,
#inventory .inv-unique {
  position: absolute;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(4, 7, 14, 0.82);
  color: #cbd5e1;
  pointer-events: none;
}
#inventory .inv-lock {
  top: 2px;
  left: 2px;
}
#inventory .inv-unique {
  bottom: 2px;
  left: 2px;
}
#inventory .inv-lock .pk-i,
#inventory .inv-unique .pk-i {
  width: 8px;
  height: 8px;
}
#inventory .inv-cell.inv-poke.inv-cell-empty {
  border: 1px dashed rgba(148, 163, 184, 0.13) !important;
  background: rgba(255, 255, 255, 0.012) !important;
  box-shadow: none !important;
}

/* ── Tela pequena (sidebar de 200px) ────────────────────────────────────── */
@media (max-width: 900px) {
  html:not(.pokeidle-mobile) #sidebar-right {
    gap: 7px;
    padding: 6px;
  }
  #trainer-card {
    padding: 9px 9px 10px !important;
  }
  #inventory {
    padding: 8px !important;
  }
  #tr-name {
    font-size: 13.5px !important;
  }
  #tr-clan-name {
    display: none !important;
  }
  .tr-vitals-grid {
    gap: 5px;
  }
  #tr-vitals,
  #tr-hunt-time {
    gap: 5px;
    padding: 6px !important;
  }
  .tr-vital-ico {
    width: 19px;
    height: 19px;
  }
  #tr-xp-boost-row {
    gap: 5px;
    padding: 6px !important;
  }
  #tr-xp-boost-buy {
    padding: 0 6px !important;
    font-size: 8px !important;
  }
  #inventory .inv-title {
    font-size: 9px !important;
  }
  #inventory .inv-tab {
    height: 25px !important;
    font-size: 8px !important;
  }
  html:not(.pokeidle-mobile) #inventory > #inv-grid:not(.poke-grid) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 6px !important;
  }
  #inventory .inv-helds img {
    width: 11px;
    height: 11px;
  }
  #inventory .inv-boost {
    font-size: 6.5px !important;
  }
}

/* ── Mobile: drawer, grade sem altura fixa e slots maiores ───────────────── */
html.pokeidle-mobile #sidebar-right > #inventory {
  margin: 8px 4px 0 !important;
  padding: 8px !important;
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}
html.pokeidle-mobile #sidebar-right > #trainer-card {
  margin: 8px 4px 0 !important;
  padding: 10px !important;
}
html.pokeidle-mobile #inventory > #inv-grid,
html.pokeidle-mobile #inventory > #inv-grid.poke-grid {
  flex: 0 0 auto;
  height: auto !important;
  max-height: none !important;
  grid-auto-rows: auto !important;
  overflow: visible !important;
}
html.pokeidle-mobile #sidebar-right > #inventory > #inv-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 7px !important;
}
html.pokeidle-mobile #sidebar-right > #inventory > #inv-grid.poke-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
}
html.pokeidle-mobile #inventory .inv-cell {
  min-height: 0 !important;
}
html.pokeidle-mobile #inventory .inv-helds img {
  width: 14px;
  height: 14px;
}
html.pokeidle-mobile #inventory .inv-boost {
  min-width: 20px !important;
  height: 14px !important;
  font-size: 7.5px !important;
  line-height: 12px !important;
}
html.pokeidle-mobile #inventory .inv-lock,
html.pokeidle-mobile #inventory .inv-unique {
  width: 16px;
  height: 16px;
}
