.inv-segments {
  margin-bottom: 12px;
}

.inv-segments button::after {
  inset: -11px -1px;
}

.inv-note {
  margin-top: 10px;
}

.inv-letter {
  min-width: 22px;
  padding: 2px 6px;
  font-size: 12px;
  text-align: center;
  letter-spacing: 0;
}

.inv-pv {
  height: 216px;
}

.inv-pv > svg {
  height: 206px;
}

.inv-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inv-title b {
  font-family: var(--f-display);
  font-size: 20px;
  line-height: 1.1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-id {
  flex: none;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  background: #2b2036;
  border: 1px solid #2b2036;
  border-radius: 8px;
  padding: 3px 7px;
  user-select: text;
  -webkit-user-select: text;
}

.inv-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.inv-badge {
  border: 1px solid var(--line);
  background: var(--surf2);
  color: #f2e9ee;
  border-radius: 99px;
  padding: 4px 10px;
  font-weight: 900;
  font-size: 12px;
}

.inv-badge.ok {
  border-color: var(--green);
  color: var(--green);
}

.inv-badge.bad {
  border-color: var(--red);
  color: var(--red);
}

.inv-peepee {
  margin-top: 10px;
}

.inv-attrs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.inv-attrs .card {
  padding: 10px 12px;
  min-width: 0;
}

.inv-attrs b {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.2;
}

.inv-swatch {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #0b0910;
}

.inv-dead-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.inv-dead {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 12px;
}

.inv-dead-art {
  height: 96px;
  border-radius: 14px;
  background: linear-gradient(180deg, #1e1a28, #0e0a14);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.inv-dead-art svg {
  width: 72px;
  height: 90px;
  filter: grayscale(0.35);
}

.inv-dead-info {
  min-width: 0;
}

.inv-dead-info .inv-badges {
  margin-top: 6px;
}

.inv-dead-info .inv-badge {
  padding: 2px 8px;
  font-size: 12px;
}

.inv-dead-death {
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink2);
  line-height: 1.3;
}

.inv-dead-info .btn {
  margin-top: 8px;
}

.inv-scene {
  height: 190px;
}

.inv-scene .inv-scene-pet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 164px;
}
.inv-scene-pet > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.inv-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.inv-categories .chip {
  padding: 6px 10px;
}

.inv-categories .chip::after {
  content: "";
  position: absolute;
  inset: -4px;
}

.inv-categories .chip span {
  opacity: 0.7;
  margin-left: 4px;
}

.inv-categories .chip.on span {
  opacity: 1;
}

.inv-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink2);
}

.inv-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.inv-legend .inv-letter {
  min-width: 18px;
  padding: 1px 4px;
  font-size: 12px;
}

.inv-grid .it {
  padding-top: 8px;
}

.inv-grid .inv-letter {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
}

.inv-thumb {
  width: 100%;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inv-thumb .bgthumb {
  height: 70px;
  margin-top: 8px;
}

.inv-source {
  font-size: 12px;
  font-weight: 900;
  color: var(--gold);
}

.inv-empty {
  text-align: center;
  margin-top: 12px;
}

.inv-card {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 12px;
  background: var(--surf2);
  border: 2px solid var(--blue);
  border-radius: 20px;
  padding: 12px;
  box-shadow:
    0 -10px 26px rgba(0, 0, 0, 0.7),
    0 16px 0 8px var(--soft);
}

.inv-card-top {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
}

.inv-card-art {
  width: 92px;
  height: 92px;
  border-radius: 14px;
  background: var(--surf);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.inv-card-art svg {
  width: 84px;
  height: 84px;
}

.inv-card-art .bgthumb {
  height: 100%;
  border-radius: 0;
}

.inv-card-art .decthumb {
  width: 80px;
  height: 80px;
  align-items: center;
}

.inv-card-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.15;
}

.inv-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.35;
}

.inv-facts dt {
  color: var(--ink2);
  font-weight: 800;
}

.inv-facts dd {
  margin: 0;
  font-weight: 900;
  min-width: 0;
}

.inv-card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.bgx .dec svg {
  position: static;
}

.inv-letter-gameplay {
  background: #15121b;
  color: var(--gold);
  box-shadow: inset 0 0 0 2px var(--gold);
}

.inv-grid .it.inv-gameplay {
  border: 2px dashed var(--gold);
}

.inv-source {
  background: #15121b;
  border-radius: 6px;
  padding: 1px 6px;
  text-transform: uppercase;
}

.inv-dead-info .cemetery-entry-rarity {
  margin-top: 6px;
}

.inv-dead-info .text-link {
  display: block;
  margin-top: 8px;
}

.inv-double-tap-hint {
  animation: inv-double-tap 1.4s ease-in-out;
}

.inv-double-tap-hint::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: rgba(255, 255, 255, 0.25);
  opacity: 0;
  pointer-events: none;
  animation: inv-double-tap-ring 1.4s ease-out;
}

@keyframes inv-double-tap {
  0%,
  100% {
    transform: none;
  }
  12%,
  40% {
    transform: scale(0.93);
  }
  26%,
  54% {
    transform: none;
  }
}

@keyframes inv-double-tap-ring {
  0%,
  28%,
  100% {
    opacity: 0;
    transform: scale(0.5);
  }
  12%,
  40% {
    opacity: 0.9;
    transform: scale(0.8);
  }
  26%,
  70% {
    opacity: 0;
    transform: scale(1.5);
  }
}
