/* Inventory: the pets you own and what they're worth */
.inv-page { display: flex; flex-direction: column; }
.inv-page [data-body] { display: flex; flex-direction: column; gap: 22px; }
.inv-page h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.inv-page .muted { color: var(--muted); }

/* Shared-link banner */
.inv-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 22px;
  background: linear-gradient(90deg, rgba(47, 140, 255, 0.1), rgba(47, 140, 255, 0.02) 60%), var(--surface);
  border-color: rgba(47, 140, 255, 0.28);
}
.inv-banner-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--accent-soft); color: var(--accent); }
.inv-banner-ico svg { width: 19px; height: 19px; }
.inv-banner-txt { display: flex; flex-direction: column; gap: 2px; flex: 1 1 240px; min-width: 0; }
.inv-banner-txt b { font-size: 14.5px; }
.inv-banner-txt span { font-size: 13px; color: var(--text-2); }
.inv-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Hero: total worth + most valuable pet ---------- */
.inv-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: stretch;
  padding: 32px 32px 30px 36px;
  border-radius: 26px;
  background:
    radial-gradient(640px 360px at 85% 20%, rgba(47, 140, 255, 0.2), transparent 65%),
    radial-gradient(480px 280px at 0% 0%, rgba(120, 90, 255, 0.09), transparent 60%),
    linear-gradient(180deg, #131a2b, #0d1220);
  border: 1px solid rgba(120, 160, 255, 0.16);
  box-shadow: 0 30px 80px -40px rgba(47, 140, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.inv-deco {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(560px 340px at 82% 30%, #000, transparent 75%);
  mask-image: radial-gradient(560px 340px at 82% 30%, #000, transparent 75%);
}
.inv-hero-main { min-width: 0; display: flex; flex-direction: column; }
.inv-pill {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2);
}
.inv-pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(47, 140, 255, 0.2); }
.inv-numrow { display: flex; align-items: center; gap: 14px; margin: 18px 0 12px; min-width: 0; }
.inv-numrow .tok { width: clamp(38px, 4.6vw, 58px); height: auto; flex-shrink: 0; filter: drop-shadow(0 6px 16px rgba(170, 120, 255, 0.5)); }
.inv-total {
  min-width: 0;
  font: 900 clamp(44px, 6.6vw, 84px)/0.95 var(--font-display);
  letter-spacing: -0.05em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 30%, #a9c6ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 24px rgba(47, 140, 255, 0.35));
  overflow-wrap: anywhere;
}
.inv-total.no-num { background: none; color: var(--muted); filter: none; }
.inv-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; color: var(--text-2); font-size: 14.5px; }
.inv-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); max-width: 56ch; }
/* same flags as the trade page */
.inv-page .flags { display: flex; gap: 6px; flex-wrap: wrap; }
.inv-page .flag { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; cursor: help; }
.inv-page .flag.oc { color: #ffc46b; background: rgba(255, 170, 60, 0.1); border: 1px solid rgba(255, 170, 60, 0.3); }
.inv-page .flag.none { color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line-2); }

.inv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 22px 0 0; max-width: 540px; }
.inv-stats div { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); min-width: 0; }
.inv-stats dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.inv-stats dt svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }
.inv-stats dd { margin: 0; font: 800 24px/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 0; }
.inv-stats dd.sm { font-size: 17px; line-height: 24px; }
.inv-rr { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: color-mix(in srgb, var(--rc) 70%, #fff); overflow: hidden; text-overflow: ellipsis; }
.inv-rr .r-ico { width: 16px; height: 16px; flex-shrink: 0; color: var(--rc); }
.inv-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 24px; flex-wrap: wrap; }
.inv-actions .btn { height: 44px; padding: 0 16px; }
.inv-actions .btn.is-busy { opacity: 0.75; cursor: progress; }

/* Most valuable pet */
.inv-top {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 16px 16px 18px; border-radius: 20px; text-decoration: none; color: var(--text);
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 10%, rgba(255, 255, 255, 0.03)), rgba(255, 255, 255, 0.02));
  border: 1px solid color-mix(in srgb, var(--rc) 30%, var(--line));
  transition: border-color 0.18s, transform 0.18s;
}
.inv-top:hover { border-color: color-mix(in srgb, var(--rc) 55%, transparent); transform: translateY(-2px); }
.inv-top-label { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #ffcf4a; }
.inv-top-label svg { width: 14px; height: 14px; }
.inv-top-stage { position: relative; width: 74%; margin: 6px 0 4px; }
.inv-top-stage .art { width: 100%; border-radius: 18px; }
.inv-top-stage .art-inner { border-radius: 17px; }
.inv-top-glow { position: absolute; inset: 14%; border-radius: 50%; background: var(--rc); opacity: 0.35; filter: blur(30px); }
.inv-top-stage .vtag { position: absolute; top: 9px; left: 9px; z-index: 3; }
.inv-top-name { font-weight: 750; font-size: 16px; letter-spacing: -0.02em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-top-val { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; }
.inv-top-val .val { font-size: 26px; font-weight: 850; letter-spacing: -0.04em; display: inline-flex; align-items: center; gap: 7px; }
.inv-top-val .val .tok { width: 22px; height: 22px; }
.inv-top-val .each { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* Quantity badge on art tiles */
.qty-badge {
  position: absolute; top: 8px; right: 8px; z-index: 4;
  min-width: 30px; height: 24px; padding: 0 8px; border-radius: 999px;
  display: inline-grid; place-items: center;
  font: 800 12.5px/1 var(--font-display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: #fff;
  background: rgba(8, 12, 22, 0.82); border: 1px solid var(--line-3);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.8);
}
.qty-badge.one { opacity: 0.6; }
.qty-badge.lg { top: 10px; right: 10px; height: 28px; font-size: 14px; padding: 0 10px; background: var(--accent); border-color: transparent; }

/* ---------- Pets + rarity columns ---------- */
.inv-cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; grid-template-areas: 'pets rarity'; gap: 22px; align-items: start; }
.inv-pets { grid-area: pets; min-width: 0; }
.inv-rarity { grid-area: rarity; position: sticky; top: calc(var(--header-h) + 16px); padding: 20px; }
.inv-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.inv-sec-head > div:first-child { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.inv-sec-head .muted { font-size: 13px; font-variant-numeric: tabular-nums; }
.inv-seg { height: 36px; }
.inv-seg button { padding: 0 11px; font-size: 12.5px; }
.inv-page .seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Rarity bar + legend */
.ibar { display: flex; gap: 3px; height: 14px; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5); }
.ibar-seg {
  min-width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 65%, #fff), var(--rc) 55%, color-mix(in srgb, var(--rc) 75%, #000));
  box-shadow: 0 0 12px -2px color-mix(in srgb, var(--rc) 70%, transparent);
  transform-origin: left center; animation: fx-fill 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.ibar-seg:first-child { border-radius: 999px 4px 4px 999px; }
.ibar-seg:last-child { border-radius: 4px 999px 999px 4px; }
.ibar-seg:only-child { border-radius: 999px; }
.ilegend { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.ileg {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 9px 12px 11px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line);
}
.ileg-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--rc) 16%, transparent); color: var(--rc); }
.ileg-ico .r-ico { width: 15px; height: 15px; }
.ileg-txt { display: flex; flex-direction: column; min-width: 0; }
.ileg-txt b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ileg-txt span, .ileg-num span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ileg-num { display: flex; flex-direction: column; align-items: flex-end; }
.ileg-num b { font: 800 14px var(--font-display); font-variant-numeric: tabular-nums; }
.ileg-num span { display: inline-flex; align-items: center; gap: 4px; }
.ileg-num .tok { width: 12px; height: 12px; }
.ileg-track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.ileg-track i { display: block; height: 100%; background: var(--rc); border-radius: 0 3px 3px 0; box-shadow: 0 0 8px var(--rc); }

/* ---------- Owned pet cards ---------- */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 30px 14px; padding-top: 22px; }
.inv-card {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; gap: 10px;
  padding: 10px 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.inv-card:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, 0.14); }
.inv-card.tier-secret { border-color: color-mix(in srgb, var(--rc) 22%, var(--line)); box-shadow: 0 18px 40px -26px color-mix(in srgb, var(--rc) 70%, transparent); }
.inv-card.tier-legend {
  border-color: color-mix(in srgb, var(--rc) 40%, var(--line));
  box-shadow: 0 0 34px -12px color-mix(in srgb, var(--rc) 75%, transparent);
  background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--rc) 12%, transparent), transparent 70%), var(--surface);
}
.inv-card.is-top { border-color: rgba(255, 207, 74, 0.45); box-shadow: 0 0 0 1px rgba(255, 207, 74, 0.12), 0 18px 44px -24px rgba(255, 190, 60, 0.6); }
.inv-card.flash { animation: inv-flash 0.9s ease; }
@keyframes inv-flash { 0% { box-shadow: 0 0 0 0 rgba(47, 140, 255, 0.7); } 100% { box-shadow: 0 0 0 14px rgba(47, 140, 255, 0); } }

.ic-tile { position: relative; display: block; border-radius: 12px; }
.ic-tile .art { width: 100%; border-radius: 12px; }
.ic-tile .art-inner { border-radius: 11px; }
.ic-tile .vtag { position: absolute; top: 8px; left: 8px; z-index: 4; }
.ic-crown { position: absolute; left: 8px; bottom: 8px; z-index: 4; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; color: #2b1d00; background: linear-gradient(135deg, #ffe592, #f2b13a); box-shadow: 0 6px 14px -6px rgba(255, 180, 40, 0.8); }
.ic-crown svg { width: 15px; height: 15px; }
/* pets pop out of the tile, like the values grid */
.inv-card.has-pic .ic-tile .art-inner { overflow: visible; }
.inv-card.has-pic .ic-tile .art-inner img {
  inset: auto; left: -4%; top: -24%; width: 108%; height: 108%; padding: 2%; z-index: 3;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.6));
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1.2);
}
.inv-card.has-pic .ic-tile .art.v-golden .art-inner img { filter: sepia(0.85) saturate(2.4) hue-rotate(-12deg) brightness(1.08) contrast(1.05) drop-shadow(0 14px 16px rgba(0, 0, 0, 0.6)); }
.inv-card.has-pic .ic-tile .art.v-diamond .art-inner img { filter: grayscale(1) brightness(0.65) sepia(1) hue-rotate(190deg) saturate(7) contrast(1.2) brightness(1.1) drop-shadow(0 14px 16px rgba(0, 0, 0, 0.6)); }
.inv-card.has-pic .ic-tile .art.v-rainbow .art-inner img { filter: saturate(1.6) drop-shadow(0 14px 16px rgba(0, 0, 0, 0.6)); }
.inv-card.has-pic .ic-tile::after {
  content: ''; position: absolute; z-index: 1; pointer-events: none;
  left: 14%; right: 14%; bottom: 8%; height: 26%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 70%, transparent), transparent);
  filter: blur(10px); opacity: 0.75;
}
.inv-card.has-pic:hover .ic-tile .art-inner img { transform: translateY(-6px) scale(1.06); }

.ic-body { display: flex; flex-direction: column; gap: 4px; padding: 0 3px; min-width: 0; }
.ic-name { font-weight: 700; font-size: 14.5px; line-height: 1.25; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-name:hover { color: var(--accent-hover); }
.ic-line { display: flex; align-items: center; min-height: 28px; }
.ic-line .val { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; display: inline-flex; align-items: center; gap: 6px; }
.ic-line .val .tok { width: 18px; height: 18px; }
.ic-line .val-none { font-size: 14px; }
.ic-each { min-height: 22px; display: flex; align-items: center; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 0; }
.ic-each .rarity { max-width: 100%; overflow: hidden; }
.ic-ctrl { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.stepper {
  flex: 1; min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; height: 36px;
  border-radius: 11px; background: var(--inset); border: 1px solid var(--line-2); overflow: hidden;
}
.stepper button { border: 0; background: transparent; color: var(--text-2); display: grid; place-items: center; transition: background 0.15s, color 0.15s; }
.stepper button svg { width: 15px; height: 15px; }
.stepper button:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.stepper button:active:not(:disabled) { background: var(--surface-4); }
.stepper button:disabled { opacity: 0.3; cursor: default; }
.stepper input {
  width: 100%; min-width: 0; border: 0; background: transparent; color: var(--text); text-align: center;
  font: 800 15px/1 var(--font-display); font-variant-numeric: tabular-nums; padding: 0; -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; background: rgba(47, 140, 255, 0.1); }
.stepper:focus-within { border-color: rgba(47, 140, 255, 0.55); box-shadow: var(--ring); }
.stepper button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ic-remove {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center;
  border: 1px solid var(--line-2); background: transparent; color: var(--muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.ic-remove svg { width: 16px; height: 16px; }
.ic-remove:hover { color: var(--lose); border-color: rgba(255, 91, 110, 0.5); background: rgba(255, 91, 110, 0.06); }

/* "Add pet" tile at the end of the grid */
.inv-add-tile {
  min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: var(--radius); border: 1.5px dashed var(--line-3); background: rgba(255, 255, 255, 0.015);
  color: var(--text-2); transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.inv-add-tile:hover { border-color: rgba(47, 140, 255, 0.6); background: var(--accent-soft); color: var(--text); }
.iat-ico { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 8px; background: var(--accent-soft); color: var(--accent); transition: transform 0.2s var(--ease); }
.inv-add-tile:hover .iat-ico { transform: scale(1.08); }
.iat-ico svg { width: 22px; height: 22px; }
.inv-add-tile b { font-size: 14.5px; }
.inv-add-tile span:last-child { font-size: 12.5px; color: var(--muted); }

/* ---------- Empty state ---------- */
.inv-empty {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); align-items: center; gap: 28px;
  padding: 44px 44px; border-radius: 26px;
  background:
    radial-gradient(520px 320px at 22% 50%, rgba(47, 140, 255, 0.16), transparent 70%),
    linear-gradient(180deg, #131a2b, #0d1220);
  border: 1px solid rgba(120, 160, 255, 0.14);
}
.inv-empty-art { position: relative; height: 260px; }
.iea { position: absolute; width: 38%; filter: saturate(0.9); }
.iea .art { width: 100%; border-radius: 18px; }
.iea .art-inner { border-radius: 17px; }
.iea-0 { left: 4%; top: 22%; transform: rotate(-8deg); opacity: 0.7; }
.iea-1 { left: 31%; top: 4%; width: 44%; z-index: 2; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8); border-radius: 18px; }
.iea-2 { right: 4%; top: 26%; transform: rotate(8deg); opacity: 0.7; }
.iea-q {
  position: absolute; top: 8px; right: 8px; z-index: 4; height: 24px; padding: 0 8px; border-radius: 999px;
  display: grid; place-items: center; font: 800 12.5px/1 var(--font-display); color: #fff;
  background: rgba(8, 12, 22, 0.85); border: 1px solid var(--line-3);
}
.inv-empty-body { display: flex; flex-direction: column; align-items: flex-start; }
.inv-empty-ico { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 16px; background: var(--accent-soft); color: var(--accent); }
.inv-empty-ico svg { width: 22px; height: 22px; }
.inv-empty-body h2 { font-size: clamp(22px, 2.6vw, 30px) !important; line-height: 1.15; letter-spacing: -0.035em; max-width: 20ch; }
.inv-empty-body p { margin: 12px 0 0; color: var(--text-2); max-width: 48ch; }
.inv-empty-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

/* Share preview (same look as the trade image preview) */
.inv-share .share-modal { width: min(760px, 100%); max-height: none; }
.inv-share .share-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.inv-share .share-frame { border-radius: 14px; overflow: hidden; background: var(--inset); border: 1px solid var(--line-2); aspect-ratio: 16 / 9; }
.inv-share .share-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.inv-share .share-hint { margin: 0; font-size: 13px; color: var(--muted); }
.inv-share .share-fallback { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: var(--text-2); background: rgba(255, 170, 60, 0.06); border: 1px solid rgba(255, 170, 60, 0.25); }
.inv-share .share-fallback[hidden] { display: none; }
.inv-share .share-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inv-share .share-actions .btn { flex: 1 1 160px; height: 46px; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .inv-cols { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'rarity' 'pets'; }
  .inv-rarity { position: static; }
  .ilegend { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 860px) {
  .inv-hero { grid-template-columns: minmax(0, 1fr); padding: 24px 20px 22px; border-radius: 22px; }
  .inv-top { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto auto auto auto; column-gap: 16px; row-gap: 4px; text-align: left; align-items: center; justify-items: start; order: 2; padding: 14px; }
  .inv-top-label { grid-column: 2; grid-row: 1; }
  .inv-top-stage { grid-column: 1; grid-row: 1 / 5; width: 100%; margin: 0; }
  .inv-top-name { grid-column: 2; }
  .inv-top-meta { grid-column: 2; }
  .inv-top-val { grid-column: 2; }
  .inv-top-val .val { font-size: 22px; }
  .inv-empty { grid-template-columns: minmax(0, 1fr); padding: 28px 22px 30px; text-align: left; }
  .inv-empty-art { height: 190px; max-width: 360px; width: 100%; justify-self: center; }
}
@media (max-width: 520px) {
  .inv-page [data-body] { gap: 18px; }
  .inv-numrow { margin: 14px 0 10px; gap: 10px; }
  .inv-stats { gap: 8px; margin-top: 18px; }
  .inv-stats div { padding: 10px 11px; }
  .inv-stats dd { font-size: 20px; }
  .inv-stats dd.sm { font-size: 14px; line-height: 20px; }
  .inv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 20px; }
  .inv-actions .btn { padding: 0 10px; font-size: 13.5px; }
  .inv-actions .btn-primary, .inv-actions [data-act='clear'] { grid-column: 1 / -1; }
  .inv-stats { grid-template-columns: 1fr 1fr; }
  .inv-stats div:last-child { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .inv-rarity { padding: 16px; }
  .ilegend { grid-template-columns: minmax(0, 1fr); }
  .inv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 10px; padding-top: 20px; }
  .inv-card { padding: 8px 8px 10px; border-radius: 16px; gap: 8px; }
  .ic-name { font-size: 13.5px; }
  .ic-line .val { font-size: 19px; }
  .ic-line .val .tok { width: 16px; height: 16px; }
  .stepper { grid-template-columns: 30px minmax(0, 1fr) 30px; height: 34px; }
  .ic-remove { width: 34px; height: 34px; }
  .inv-add-tile { min-height: 180px; }
  .inv-empty-actions { width: 100%; }
  .inv-empty-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ibar-seg, .inv-card.flash { animation: none; }
  .inv-card.has-pic .ic-tile .art-inner img, .inv-top { transition: none; }
}
.inv-page.settled .ibar-seg { animation: none; }
