/* Inventar: Vergleich „Angelegt“ ↔ „Ausgewählt“ oben, angelegte Teile als erste Kacheln im Rucksack (game.js: invDetailHtml) */
.inv-window .inv-detail { padding: 8px; min-height: 0; }
.inv-cmp { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: stretch; }
.inv-cmp-vs { align-self: center; font-size: 1.3rem; font-weight: 900; color: var(--muted); }
.inv-cmp-card { position: relative; display: grid; gap: 5px; align-content: start; padding: 22px 9px 9px; border: 2.5px solid var(--cs-ink); border-radius: 9px; background: #fffaf0; min-width: 0; }
.inv-cmp-card.is-worn { box-shadow: inset 0 0 0 2px rgba(47, 157, 143, 0.55); }
.inv-cmp-card.is-sel { box-shadow: inset 0 0 0 2px rgba(240, 180, 0, 0.7); background: #fff7e0; }
.inv-cmp-card.is-empty { background: rgba(36, 28, 26, 0.05); box-shadow: none; border-style: dashed; }
.inv-cmp-card.is-empty p { margin: 0; color: var(--muted); font-weight: 700; font-size: 0.8rem; align-self: center; }
.inv-cmp-tag { position: absolute; left: -2px; top: -2px; padding: 2px 9px; font-size: 0.64rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; border: 2.5px solid var(--cs-ink); border-radius: 8px 0 8px 0; }
.is-worn .inv-cmp-tag { background: #2f9d8f; }
.is-sel .inv-cmp-tag { background: #e0a21f; color: var(--cs-ink); }
.inv-cmp-main { display: flex; gap: 8px; align-items: center; min-width: 0; }
.inv-cmp-main strong { display: block; font-size: 0.88rem; overflow-wrap: anywhere; }
.inv-cmp-main small { color: var(--muted); font-weight: 700; }
.inv-cmp-card .inv-detail-effect { font-size: 0.78rem; }
.inv-cmp-card .inv-btn { justify-self: stretch; padding: 6px 10px; text-align: center; }
.inv-btn.ghost { background: #fffaf0; color: var(--cs-ink); }
.inv-cmp-rows { margin-top: 8px; display: grid; gap: 2px; font-size: 0.78rem; font-weight: 700; }
.inv-cmp-head, .inv-cmp-row { display: grid; grid-template-columns: 1.3fr 0.8fr 14px 0.8fr; align-items: center; gap: 4px; text-align: center; }
.inv-cmp-head { font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.inv-cmp-row { padding: 2px 4px; border-radius: 4px; background: rgba(36, 28, 26, 0.05); }
.inv-cmp-row span { text-align: left; }
.inv-cmp-row i { font-style: normal; color: var(--muted); }
.inv-cmp-row b.up { color: #1f8a3c; } .inv-cmp-row b.down { color: #c0392b; }
.inv-cmp-row b.up::after { content: " ▲"; font-size: 0.7em; } .inv-cmp-row b.down::after { content: " ▼"; font-size: 0.7em; }

.inv-pool-sep { grid-column: 1 / -1; margin: 2px 0 0; font-size: 0.66rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.inv-tile { position: relative; }
.inv-tile.is-worn, .inv-tile.sel { padding-top: 15px; }
.inv-tile.is-worn::after, .inv-tile.sel::after { position: absolute; left: 0; right: 0; top: 0; padding: 1px 0; text-align: center; font-size: 0.52rem; font-weight: 900; letter-spacing: 0.07em; white-space: nowrap; border-bottom: 2px solid var(--cs-ink); border-radius: 5px 5px 0 0; z-index: 2; }
.inv-tile.is-worn::after { content: "ANGELEGT"; background: #2f9d8f; color: #fff; }
.inv-tile.sel:not(.is-worn)::after { content: "AUSGEWÄHLT"; background: #e0a21f; color: var(--cs-ink); }
.inv-tile.is-worn { box-shadow: 0 0 0 2px #2f9d8f, 2px 2px 0 var(--cs-ink); }

/* Kompakte Figur: kleinere Puppe, schmalere Spalte, knappere Werte — mehr Platz für Vergleich und Rucksack */
.inv-window { --inv-s: 1.6; grid-template-columns: minmax(196px, 232px) minmax(0, 1fr); gap: 12px; }
.inv-doll-col { gap: 5px; }
.inv-doll { grid-template-columns: 46px auto 46px; grid-template-rows: 46px auto 46px; gap: 4px; padding: 6px; border-width: 2.5px; border-radius: 10px; }
.inv-slot { width: 46px; height: 46px; border-width: 2.5px; border-radius: 7px; }
.inv-slot-ico { font-size: 1.35rem; }
.inv-slot .lx-svg, .inv-slot .ico-txt .lx-svg { width: 1.45em; height: 1.45em; }
.inv-slot-label { font-size: 0.5rem; }
.inv-name { font-size: 0.95rem; line-height: 1.1; }
.inv-stats { gap: 4px; }
.inv-stat { padding: 2px 6px; font-size: 0.7rem; box-shadow: 1px 1px 0 var(--cs-ink); border-radius: 6px; }
.inv-stat strong { font-size: 0.85rem; }
.inv-doll-col > :not(.inv-doll):not(.inv-name):not(.inv-stats) { font-size: 0.7rem; }
/* Handy: keine große Puppe — nur die vier Slots als Zeile, damit Vergleich und Rucksack ohne Scrollen sichtbar bleiben */
@media (max-width: 720px) {
  .inv-window { grid-template-columns: 1fr; gap: 6px; }
  .inv-doll-col { grid-template-columns: 1fr; gap: 4px; justify-items: stretch; }
  .inv-doll { grid-template-columns: repeat(4, 1fr); grid-template-rows: auto; grid-template-areas: none; justify-items: center; padding: 5px; gap: 4px; }
  .inv-doll > .inv-slot { grid-area: auto; width: 100%; max-width: 62px; height: 46px; }
  .inv-sprite-stage { display: none; }
  .inv-name { display: none; }
  .inv-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .inv-stat { padding: 2px 3px; font-size: 0.58rem; gap: 2px; flex-direction: column; align-items: center; }
  .inv-stat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .inv-doll-col > :not(.inv-doll):not(.inv-name):not(.inv-stats) { font-size: 0.64rem; }
  .inv-cmp-card { padding: 20px 6px 6px; gap: 3px; }
  .inv-cmp-main small { display: none; }
  .inv-cmp-card .inv-detail-effect { font-size: 0.7rem; }
  .inv-cmp-card .inv-btn { padding: 4px 8px; font-size: 0.78rem; }
  .inv-cmp-rows { margin-top: 4px; font-size: 0.7rem; }
  .inv-pool { min-height: 72px; }
}

/* niedrige Fenster: noch knapper, damit nichts gescrollt werden muss */
@media (max-width: 720px) and (max-height: 700px) {
  .inv-stats, .inv-doll-col > :not(.inv-doll):not(.inv-stats):not(.inv-name) { display: none; }
  .inv-pool { min-height: 60px; }
  .inv-tabs .inv-tab, .inv-chip { padding-top: 3px; padding-bottom: 3px; }
}
@media (min-width: 721px) and (max-height: 700px) {
  .inv-window { --inv-s: 1.25; }
  .inv-doll { grid-template-columns: 38px auto 38px; grid-template-rows: 38px auto 38px; }
  .inv-slot { width: 38px; height: 38px; }
  .inv-stat { padding: 1px 5px; }
}
@media (max-height: 700px) {
  .inv-pool { min-height: 44px; padding-top: 10px; }
  .inv-cmp-rows { margin-top: 3px; }
  .inv-cmp-head { display: none; }
}
@media (max-width: 420px) {
  .inv-cmp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .inv-cmp-vs { display: none; }
  .inv-cmp-main strong { font-size: 0.8rem; }
}
@media (max-height: 700px) { .menu-popup-body:has(.inv-window) { padding: 10px 12px 12px; } }
