/* =============================================================
   JorgeTown Inventar — Mockup v2 (Char-Mitte mit Slots rundum)
   ============================================================= */

:root {
  --accent:       #da6652;
  --accent2:      #e2199a;
  --accent3:      #8b2fd6;
  --accent-grad:  linear-gradient(100deg, #da6652, #e2199a 68%, #8b2fd6);
  --accent-soft:  rgba(226, 25, 154, .14);
  --accent-glow:  rgba(226, 25, 154, .50);
  --accent-deep:  #d11930;

  --success:      #34d399;
  --warn:         #fbbf24;
  --info:         #60a5fa;
  --danger:       #ef4444;

  --text:         #f5f5f7;
  --text-mid:     #a8a8b0;
  --text-mute:    #5a5a64;

  --bg:           rgba(14, 14, 18, .96);
  --bg-input:     rgba(255, 255, 255, .04);
  --bg-hover:     rgba(255, 255, 255, .07);
  --line:         rgba(255, 255, 255, .08);
  --line-mid:     rgba(255, 255, 255, .14);

  --font:         'Inter', 'Segoe UI', system-ui, sans-serif;
  --mono:         'JetBrains Mono', 'SF Mono', ui-monospace, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* LIVE: html/body MUSS transparent sein, sonst Black-Screen über Spiel.
   Pointer-Events nur auf interaktiven Elementen. */
html, body {
  height: 100%;
  background: transparent;
  font-family: var(--font);
  color: var(--text);
  font-size: 13px;
  overflow: hidden;
  user-select: none;
  pointer-events: none;
}
button, input, [draggable="true"], .item, .cloth-slot, .weapon-slot,
.phone-slot, .bag-slot, .gear-slot, .keys-item, .x-close, .info-pill, .ctx-item,
.tm-fake-target, .col, .inv-card { pointer-events: auto; }
/* Kinder der Slots brauchen auch pointer-events, sonst rutscht der Klick durch */
.cloth-slot *, .weapon-slot *, .phone-slot *, .bag-slot *, .gear-slot *, .item *,
.keys-item * { pointer-events: auto; }
.inv-root.hidden { display: none; }
.mono { font-family: var(--mono); font-weight: 700; letter-spacing: .02em; }

/* =============================================================
   ROOT + CARD (kompakter als v1)
   ============================================================= */

.inv-root {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: transparent;
}

/* Wird vom jorge_einreise Illegal-Intro gesetzt (tourStart mit blackBg=true):
   Spieler ist noch im Container, hinter dem Inv darf keine Welt durchscheinen. */
.inv-root.illegal-intro {
  background: #000;
}

.inv-card {
  width: 1020px;       /* +100px fuer 4 Footbar-Slots ohne Text-Wrap (war 920) */
  max-width: 96vw;
  height: 650px;       /* +70px für 6 Cloth-Slots pro Seite */
  max-height: 92vh;
  /* Emergency-Leiste haengt UNTEN dran -> Card waechst um deren Hoehe (90px),
     damit Item-Liste + Silhouette exakt gleich gross bleiben. */
  background: var(--bg);
  border: 1px solid var(--line-mid);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  animation: cardIn .3s cubic-bezier(.2,.8,.2,1);
}
/* "Char-Fenster"-Modus: Card BG wird transparent (so scheint Cam-Zoom durch).
   Nur aktiv während Arms-Picker bedient wird (.inv-card.arms-window). */
.inv-card.arms-window { background: transparent; }
.inv-card.arms-window .inv-head,
.inv-card.arms-window .inv-foot { background: var(--bg); }
.inv-card.arms-window .col.col-inv,
.inv-card.arms-window .col.col-stash,
.inv-card.arms-window .col.col-keys,
.inv-card.arms-window .col.col-wallet { background: var(--bg); }
.inv-card.arms-window .col.col-char { background: transparent; }
.inv-card.arms-window .col-char > .col-head { background: var(--bg); }
.inv-card.arms-window .col-char > .bag-slot { background: var(--bg); }
.inv-card.arms-window .col-char .slots-col {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 6px 4px;
}
.inv-card.arms-window .char-stage .char-svg { display: none; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* Side-Panels offen → Card wird breiter */
.inv-card.has-emergency { height: 746px; }   /* 650 + 96 Emergency-Leiste (exakt gemessener Footer-Delta) */
.inv-card.has-stash  { width: 1200px; }
.inv-card.has-keys   { width: 1200px; }
.inv-card.has-wallet { width: 1200px; }
.inv-card.has-keys.has-stash    { width: 1480px; }
.inv-card.has-wallet.has-stash  { width: 1480px; }
.inv-card.has-wallet.has-keys   { width: 1480px; }
.inv-card.has-wallet.has-keys.has-stash { width: 1680px; }


/* =============================================================
   HEADER
   ============================================================= */

.inv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(218,102,82,.03), transparent);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 8px var(--accent-glow), 0 0 0 0 rgba(218,102,82,.4); }
  50%     { box-shadow: 0 0 14px var(--accent-glow), 0 0 0 6px rgba(218,102,82,0); }
}
.brand-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
}
.brand-sub { font-size: 10px; color: var(--text-mid); }

.head-info { display: flex; align-items: center; gap: 8px; }
.info-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: inherit;
  color: var(--text);
  cursor: default;
}
.info-pill.toggle { cursor: pointer; transition: .15s; }
.info-pill.toggle:hover { border-color: var(--accent); color: var(--accent); }
.info-pill.toggle.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.info-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-mid);
  letter-spacing: .12em;
}
.info-val { font-size: 12px; font-weight: 600; }

.x-close {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-mid);
  cursor: pointer;
  transition: .2s;
}
.x-close svg { width: 12px; height: 12px; }
.x-close:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: rotate(90deg);
}

/* =============================================================
   MAIN
   ============================================================= */

.inv-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  min-height: 0;
}
.inv-main.has-stash {
  grid-template-columns: 1fr 320px 1fr;
}
.inv-main.has-keys {
  grid-template-columns: 1fr 1fr 320px;
}
.inv-main.has-keys.has-stash {
  grid-template-columns: 1fr 1fr 320px 1fr;
}
.inv-main.has-wallet {
  grid-template-columns: 1fr 1fr 320px;
}
.inv-main.has-wallet.has-stash {
  grid-template-columns: 1fr 1fr 320px 1fr;
}
.inv-main.has-wallet.has-keys {
  grid-template-columns: 1fr 1fr 1fr 320px;
}
.inv-main.has-wallet.has-keys.has-stash {
  grid-template-columns: 1fr 1fr 1fr 320px 1fr;
}

.col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
}
.col:last-child { border-right: none; }
.col.hidden { display: none; }

.col-head {
  padding: 11px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.col-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.col-tag {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--accent);
  letter-spacing: .14em;
}
.col-title h2 {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* WEIGHT METER */
.weight-meter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  min-width: 110px;
}
.weight-bar {
  width: 110px;
  height: 5px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.weight-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), var(--warn));
  border-radius: 999px;
  transition: width .4s;
}
.weight-text { font-size: 11px; color: var(--text); }
.weight-max { color: var(--text-mid); font-weight: 500; }

/* =============================================================
   ITEMS COL (LINKS / RECHTS Stash)
   ============================================================= */

/* Filter-Row entfernt 2026-05-14 (User: keine Filterung im Inv) */

.item-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 4px 0 10px;
  min-height: 0;
}
.item-list::-webkit-scrollbar { width: 6px; }
.item-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.item-list::-webkit-scrollbar-thumb:hover { background: var(--line-mid); }

.item {
  display: grid;
  grid-template-columns: 32px 1fr 44px 50px;
  gap: 10px;
  align-items: center;
  padding: 7px 14px;
  border-left: 2px solid transparent;
  cursor: grab;
  transition: .1s;
}
.item:hover {
  background: var(--bg-hover);
  border-left-color: var(--line-mid);
}
.item.dragging { opacity: .35; cursor: grabbing; }
.item.drag-over { background: var(--accent-soft); border-left-color: var(--accent); }

.item-icon {
  position: relative;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 16px;
  line-height: 1;
}
/* Flüssigkeits-Markierung: kleiner blauer Tropfen oben rechts am Icon */
.liq-drop {
  position: absolute; top: -5px; right: -5px;
  width: 14px; height: 14px; display: grid; place-items: center;
  background: rgba(14,14,18,.95); border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.liq-drop svg { width: 11px; height: 11px; fill: #3fa9f5; }
/* Verpackt-Markierung (Items auf _packed): kleiner Karton oben rechts */
.pack-box {
  position: absolute; top: -6px; right: -6px;
  width: 17px; height: 17px; display: grid; place-items: center;
  background: rgba(14,14,18,.95); border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.pack-box svg { width: 12px; height: 12px; fill: #d6a45f; }
/* Gebundenes Auftrags-Item (category jobitem): kleines Schloss oben links */
.job-lock {
  position: absolute; top: -5px; left: -5px;
  width: 14px; height: 14px; display: grid; place-items: center;
  background: rgba(14,14,18,.95); border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.job-lock svg { width: 10px; height: 10px; color: #da6652; }
/* Geschlechts-Markierung: ♂ blau / ♀ pink oben rechts (nur gebundene Kleidung) */
.gender-badge {
  position: absolute; top: -6px; right: -6px;
  width: 17px; height: 17px; display: grid; place-items: center;
  background: rgba(14,14,18,.95); border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.gender-badge svg { width: 12px; height: 12px; display: block; }
.gender-badge.gender-male   { color: #3fa9f5; }
.gender-badge.gender-female { color: #ff5fa2; }
.item-body { min-width: 0; }
.item-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-meta {
  font-size: 10px;
  color: var(--text-mid);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-count, .item-weight {
  text-align: right;
  font-size: 12px;
  color: var(--text);
}
.item-count .x { color: var(--text-mute); margin-right: 1px; font-weight: 500; }
.item-weight .unit { font-size: 9px; color: var(--text-mid); margin-left: 2px; font-weight: 500; }

/* =============================================================
   CHARAKTER COL (MITTE)
   Layout: [slots-left] [char-stage] [slots-right]
   Symmetrisch, 6 Slots links / 6 Slots rechts, Char in der Mitte.
   ============================================================= */

.col-char .col-head { justify-content: space-between; gap: 10px; }

/* ARMS / TORSO Picker (Component 3) — sitzt rechts neben dem Char-Namen */
.arms-picker {
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 4px;
  height: 28px;
}
.arms-picker .ap-lab {
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--text-mid);
  padding: 0 6px 0 4px;
}
.arms-picker .ap-btn {
  pointer-events: auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: border-color .15s, color .15s, background .15s;
}
.arms-picker .ap-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.arms-picker .ap-val {
  pointer-events: auto;
  width: 42px;
  height: 22px;
  text-align: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  padding: 0 2px;
  -moz-appearance: textfield;
}
.arms-picker .ap-val::-webkit-inner-spin-button,
.arms-picker .ap-val::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.arms-picker .ap-val:focus { border-color: var(--accent); }

.char-arena {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  gap: 10px;
  padding: 14px 12px;
  align-items: stretch;
  overflow: hidden;
}

/* Slot-Spalten links/rechts (6 Slots pro Seite) */
.slots-col {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 6px;
  min-height: 0;
}

/* Char-Stage: Aura + Silhouette zentriert */
.char-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
}

.stage-aura {
  position: absolute;
  inset: 12% 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(218,102,82,.10) 0%,
    rgba(218,102,82,.04) 40%,
    transparent 70%);
  pointer-events: none;
}
.stage-aura::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed var(--line);
  opacity: .5;
}

.char-svg {
  width: auto;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.6));
  pointer-events: none;
  position: relative;
  z-index: 1;
}

/* =============================================================
   CLOTH-SLOT (in den Slot-Spalten)
   Quadratisch, gleich groß, klare Hierarchie.
   ============================================================= */

.cloth-slot {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: .18s cubic-bezier(.2,.8,.2,1);
  position: relative;
  min-height: 0;
}

.cloth-slot:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(218,102,82,.25);
}

.cloth-slot.empty {
  background: transparent;
  border-style: dashed;
  border-color: var(--line);
}
.cloth-slot.empty .cs-ico { opacity: .35; filter: grayscale(.5); }
.cloth-slot.empty .cs-lab { color: var(--text-mute); }
.cloth-slot.empty:hover .cs-ico { opacity: .8; }

.cloth-slot.drag-over {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-glow);
  transform: scale(1.05);
}

.cs-ico {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 1px;
}

.cs-lab {
  font-family: var(--mono);
  font-size: 7px;
  color: var(--text-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}

.cs-eq {
  font-size: 8.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding: 1px 4px;
  background: var(--accent-grad);
  color: #fff;
  border-radius: 3px;
  margin-top: 2px;
  letter-spacing: 0;
}

/* Equipped state */
.cloth-slot:not(.empty) {
  border-color: var(--accent);
  background:
    linear-gradient(135deg, var(--accent-soft) 0%, transparent 60%),
    rgba(255,255,255,.02);
}
.cloth-slot:not(.empty) .cs-ico {
  filter: drop-shadow(0 0 6px var(--accent-glow));
}
.cloth-slot:not(.empty) .cs-lab {
  color: var(--accent);
  font-weight: 700;
}

/* =============================================================
   BAG-SLOT (Tasche/Rucksack — eigener Slot, erhöht max_weight)
   Lebt unter der char-arena, full-width.
   ============================================================= */

.bag-slot {
  margin: 0 12px 12px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: .18s cubic-bezier(.2,.8,.2,1);
}
.bag-slot.empty {
  background: transparent;
  border-style: dashed;
}
.bag-slot.empty .bag-ico { opacity: .35; filter: grayscale(.5); }
.bag-slot:not(.empty) {
  border-color: var(--success);
  background:
    linear-gradient(90deg, rgba(52,211,153,.10) 0%, transparent 70%),
    rgba(255,255,255,.02);
  box-shadow: 0 0 16px rgba(52,211,153,.18);
}
.bag-slot:hover {
  border-color: var(--success);
  transform: translateY(-1px);
}
.bag-slot.drag-over {
  border-color: var(--success);
  border-style: solid;
  background: rgba(52,211,153,.16);
  box-shadow: 0 0 0 3px rgba(52,211,153,.4);
}

/* ============================================================
   EMERGENCY-Spalte (Dienst-Ausruestung: Holster + Einsatzguertel)
   Schmale Body-Spalte zwischen Items und Charakter, Slots untereinander.
   Nur fuer Einsatzkraefte (#colEmergency.hidden / #invMain.has-emergency).
   Die Items-Spalte wird schmaler -> Card behaelt ihre alte Breite.
   ============================================================ */
/* EMERGENCY ist jetzt eine quer-Leiste im Footer (#emgBar), keine Spalte mehr.
   .inv-main bleibt im Standard-Grid (kein has-emergency noetig). */
.emg-bar {
  border-top: 1px solid var(--line);
  /* KEIN horizontales Padding -- .inv-foot liefert die 14px schon. Sonst waere
     der Emergency-Inhalt doppelt eingerueckt und nicht spaltenbündig zur Footbar.
     Vertikal wie zuvor (10/13) -> Footer-Delta + Card-Höhe unveraendert. */
  padding: 10px 0 13px;
}
.emg-bar.hidden { display: none; }
.emg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding-left: 2px; }
.emg-head .emg-tag { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; color: var(--accent); }
.emg-head .emg-ttl { font-size: 11px; font-weight: 700; color: var(--text-mid); }
.emg-head .emg-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-mid), transparent); }
.emg-head .emg-badge { font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; color: var(--success); border: 1px solid rgba(52,211,153,.4); border-radius: 4px; padding: 2px 6px; }

/* Raster spiegelt die Footbar (3fr 1fr 1fr): Funk/Holster/Gürtel als Dreier-
   Gruppe unter Waffe 1-3, Rang unter Handy, Extra unter Tablet -> spaltenbündig. */
.emg-slots { display: grid; grid-template-columns: 3fr 1fr 1fr; gap: 14px; }
.emg-triple { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
/* ALLE Footer-Slots exakt gleich hoch + Spalten stabil. min-width:0 + overflow
   -> lange Inhalte sprengen die 1fr-Spalte nicht -> bleibt spaltenbündig. */
.footbar .weapon-slot, .footbar .phone-slot,
.emg-bar .gear-slot, .emg-bar .phone-slot.emg-funk {
  height: 46px; padding-top: 0; padding-bottom: 0; align-items: center;
  min-width: 0; overflow: hidden;
}
/* Polizei-Gear nur fuer Cops -- per .hidden (JS) ausblendbar; Funk bleibt. */
.emg-bar .coponly.hidden { display: none; }

/* Höhe exakt wie Waffen/Handy-Slots (padding 8px 10px).
   Belegt: echtes Item-Bild im Icon-Feld (wie Waffen). Leer: KEIN Platzhalter-
   Icon (kein Emoji/＋), nur Akzent-Strich + Text. */
.emg-bar .gear-slot { gap: 8px; padding: 8px 10px; }
.emg-bar .phone-slot.emg-funk { gap: 8px; padding: 8px 10px; }
/* belegt -> Icon-Spalte (Item-Bild) */
.emg-bar .gear-slot:not(.empty) { grid-template-columns: 26px 1fr auto; }
.emg-bar .phone-slot.emg-funk:not(.empty),
.emg-bar .gear-slot.gear-slot-sm:not(.empty) { grid-template-columns: 26px 1fr; }
/* leer -> kein Icon, Akzent-Strich als Indikator */
.emg-bar .gear-slot.empty { grid-template-columns: 1fr auto; }
.emg-bar .gear-slot.gear-slot-sm.empty,
.emg-bar .phone-slot.emg-funk.empty { grid-template-columns: 1fr; }
.emg-bar .empty .ws-icon { display: none; }
.emg-bar .ws-icon { display: flex; align-items: center; justify-content: center; }
.emg-bar .ws-icon img { width: 22px !important; height: 22px !important; object-fit: contain; }
/* Akzent-Strich nur bei LEEREN Slots (belegte zeigen Icon + farbigen Rahmen) */
.emg-bar .empty.gear-slot::before,
.emg-bar .empty.emg-funk::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--text-mute); opacity: .5;
}
/* Dezenter Belegt-Stil im Footer (Waffen/Handy/Tablet/Emergency): nur feiner
   farbiger Rahmen + Hauch Tönung statt satter Fläche. */
.inv-foot .weapon-slot.equipped    { border-color: rgba(218,102,82,.55); background: rgba(218,102,82,.05); }
.inv-foot .phone-slot.bound        { border-color: rgba(96,165,250,.55); background: rgba(96,165,250,.05); }
.emg-bar .gear-slot:not(.empty)    { border-color: rgba(218,102,82,.55); background: rgba(218,102,82,.05); }
.emg-bar .phone-slot.emg-funk.bound{ border-color: rgba(52,211,153,.55); background: rgba(52,211,153,.05); }

/* Einheitliche ×-Buttons: eckig, vertikal zentriert am rechten Rand -- wie die
   Waffen-Slots (statt rund/oben-rechts bei gear bzw. verrutscht bei funk). */
.emg-bar .gear-slot .ws-clear,
.emg-bar .phone-slot .ws-clear {
  position: absolute; top: 50%; right: 8px; bottom: auto; transform: translateY(-50%);
  width: 22px; height: 22px; font-size: 14px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); color: var(--text-mid);
}
.emg-bar .gear-slot .ws-clear:hover,
.emg-bar .phone-slot .ws-clear:hover { color: var(--danger); border-color: var(--danger); }
/* belegte Slots: rechts Platz fuer den × -- Bonus/Text laeuft sonst drunter */
.emg-bar .gear-slot:not(.empty),
.emg-bar .phone-slot.emg-funk:not(.empty) { padding-right: 36px; }

/* Dienst-Slots (Holster/Einsatzguertel) -- gemeinsame .gear-slot-Optik.
   Eigene Klasse (nicht .weapon-/.phone-slot), damit das Drop-Routing per #id
   greift statt als Waffe/Handy zu zaehlen. In EMERGENCY untereinander gestapelt. */
.gear-slot {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 13px 11px;
  min-width: 0;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: .15s;
  position: relative;
}
.gear-slot:hover { border-color: var(--line-mid); }
.gear-slot:not(.empty) { border-color: var(--accent); background: var(--accent-soft); }
.gear-slot.empty { border-style: dashed; opacity: .6; }
.gear-slot.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-glow);
  opacity: 1;
}
.gear-slot .ws-icon { font-size: 21px; }
.gear-slot.empty .ws-icon { font-size: 19px; color: var(--text-mute); }
.gear-slot.empty .ws-name { color: var(--text-mute); }
.gear-slot.empty .ws-meta { font-style: italic; }
.emg-bonus { font-size: 11px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.gear-slot.empty .emg-bonus { color: var(--text-mute); }
/* Halbhoher Slot (Rang-Aufnäher) -- ~halbe Höhe der Holster/Gürtel-Slots. */
.gear-slot.gear-slot-sm { padding: 5px 11px; grid-template-columns: 22px 1fr auto; gap: 8px; }
.gear-slot.gear-slot-sm .ws-icon { font-size: 14px; }
.gear-slot.gear-slot-sm.empty .ws-icon { font-size: 13px; }
.gear-slot.gear-slot-sm .ws-name { font-size: 12px; line-height: 1.2; }
.gear-slot.gear-slot-sm .ws-meta { font-size: 10px; line-height: 1.2; }
.gear-slot.gear-slot-sm .ws-icon img { width: 18px !important; height: 18px !important; }
/* × (Ablegen) als kleiner Kreis oben rechts -- sonst landet der Button als 4.
   Grid-Kind in einer neuen Zeile. */
.gear-slot .ws-clear {
  position: absolute; top: 6px; right: 7px;
  width: 16px; height: 16px; font-size: 11px;
  border-radius: 50%;
}

.bag-ico {
  font-size: 26px;
  line-height: 1;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(52,211,153,.08);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.bag-slot:not(.empty) .bag-ico {
  border-color: var(--success);
  filter: drop-shadow(0 0 6px rgba(52,211,153,.5));
}

.bag-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bag-lab {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-mute);
  letter-spacing: .12em;
}
.bag-slot:not(.empty) .bag-lab { color: var(--success); }
.bag-eq {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bag-slot.empty .bag-eq { color: var(--text-mute); font-weight: 500; }

.bag-bonus {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(52,211,153,.16);
  color: var(--success);
  border: 1px solid rgba(52,211,153,.4);
  white-space: nowrap;
}
.bag-slot.empty .bag-bonus {
  background: var(--line);
  color: var(--text-mute);
  border-color: transparent;
}

/* =============================================================
   FOOTER: 3 Waffen + 1 Handy
   ============================================================= */

.inv-foot {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,.2);
}

.footbar {
  display: grid;
  /* WAFFEN | HANDY | TABLET -- eine Reihe. FUNK liegt jetzt in der EMERGENCY-
     Spalte (Police + Ambulance), Dienst-Ausruestung ebenfalls dort. */
  grid-template-columns: 3fr 1fr 1fr;
  gap: 14px;
}

.fb-section { display: flex; flex-direction: column; gap: 5px; }
.fb-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--accent);
  letter-spacing: .14em;
  padding-left: 2px;
}
.fb-section.phone .fb-label { color: var(--info); }
.fb-section.radio .fb-label { color: var(--success); }
.fb-section.tablet .fb-label { color: var(--warn); }

.fb-slots { display: grid; gap: 6px; }
.fb-section.weapons .fb-slots { grid-template-columns: repeat(3, 1fr); }
.fb-section.phone   .fb-slots { grid-template-columns: 1fr; }
.fb-section.radio   .fb-slots { grid-template-columns: 1fr; }
.fb-section.tablet  .fb-slots { grid-template-columns: 1fr; }

.weapon-slot, .phone-slot {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: .15s;
  position: relative;
}
.weapon-slot:hover, .phone-slot:hover { border-color: var(--line-mid); }
.weapon-slot.equipped, .phone-slot.bound {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.phone-slot.bound { border-color: var(--info); background: rgba(96,165,250,.10); }
.weapon-slot.empty { border-style: dashed; opacity: .6; }
.weapon-slot.drag-over, .phone-slot.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-glow);
  opacity: 1;
}

.ws-icon { font-size: 22px; line-height: 1; }
.weapon-slot.empty .ws-icon { font-size: 18px; color: var(--text-mute); }
.ws-body { min-width: 0; }
.ws-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.weapon-slot.empty .ws-name { color: var(--text-mute); }
.ws-meta {
  font-size: 10px;
  color: var(--text-mid);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.weapon-slot.empty .ws-meta { font-style: italic; }

.ws-clear {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-mid);
  font-size: 14px;
  cursor: pointer;
  transition: .15s;
}
.ws-clear:hover { color: var(--danger); border-color: var(--danger); }

/* Cloth-Slot × Button (Ausziehen) */
.cloth-slot .ws-clear {
  position: absolute;
  top: 4px; right: 4px;
  width: 18px; height: 18px;
  font-size: 12px;
  background: rgba(0,0,0,.5);
  pointer-events: auto;
}
.cloth-slot { position: relative; }

/* =============================================================
   CONTEXT MENU
   ============================================================= */

.ctx-menu {
  position: fixed;
  display: none;
  flex-direction: column;
  min-width: 180px;
  background: var(--bg);
  border: 1px solid var(--line-mid);
  border-radius: var(--r-md);
  padding: 5px;
  box-shadow: 0 16px 40px rgba(0,0,0,.6);
  z-index: 100;
  animation: ctxIn .12s ease-out;
}
.ctx-menu.visible { display: flex; }
@keyframes ctxIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}
.ctx-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: .1s;
}
.ctx-item:hover { background: var(--bg-hover); color: var(--accent); }
.ctx-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  transition: color .1s;
}
.ctx-icon svg { width: 15px; height: 15px; display: block; }
.ctx-item:hover .ctx-icon { color: var(--accent); }
.ctx-danger .ctx-icon,
.ctx-danger:hover .ctx-icon { color: var(--danger); }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.ctx-danger { color: var(--danger); }
.ctx-danger:hover { background: rgba(239,68,68,.1); color: var(--danger); }

/* =============================================================
   ÜBERGEBEN — Target-Mode Overlay (Inv weg, Maus zielt auf 3D-Char)
   IM LIVE: Inv-Card komplett unsichtbar, Cursor wird Crosshair,
   Linksklick = raycast auf Player → Animation + Transfer.
   ============================================================= */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Wenn Target-Mode aktiv ist: Inv-Card weg */
.inv-root.targeting .inv-card { display: none; }

.target-mode {
  position: fixed;
  inset: 0;
  z-index: 280;
  pointer-events: auto;
  cursor: crosshair;
  animation: fadeIn .15s ease;
}
.target-mode.hidden { display: none; }

/* Top-Center Hint-Badge */
.tm-badge {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,.55), 0 0 24px var(--accent-glow);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  user-select: none;
}
.tm-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: .14em;
}
.tm-item {
  font-weight: 700;
  color: var(--text);
}
.tm-hint {
  font-size: 11px;
  color: var(--text-mid);
  font-weight: 500;
}

/* Custom Crosshair (folgt Maus, nur Mockup — im Live ist es der Game-Cursor) */
.tm-cursor {
  position: fixed;
  width: 22px; height: 22px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px var(--accent-glow), inset 0 0 6px var(--accent-soft);
  transition: transform .08s ease;
}
.tm-cursor::before, .tm-cursor::after {
  content: '';
  position: absolute;
  background: var(--accent-grad);
}
.tm-cursor::before { left: 50%; top: -8px; bottom: -8px; width: 1px; transform: translateX(-50%); }
.tm-cursor::after  { top: 50%; left: -8px; right: -8px; height: 1px; transform: translateY(-50%); }
.tm-cursor.hit { transform: translate(-50%, -50%) scale(1.3); border-color: var(--success); }
.tm-cursor.hit::before, .tm-cursor.hit::after { background: var(--success); }

/* Mockup-Demo-Hitbox (existiert im Live nicht — da raycastest du auf 3D-Player) */
.tm-fake-target {
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 280px;
  border: 1.5px dashed var(--accent);
  border-radius: 70px 70px 12px 12px;
  background: var(--accent-soft);
  display: grid;
  place-items: end center;
  padding-bottom: 10px;
  cursor: crosshair;
  transition: .15s;
}
.tm-fake-target:hover {
  background: rgba(218,102,82,.22);
  box-shadow: 0 0 28px var(--accent-glow);
}
.tm-fake-tag {
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--accent);
  background: rgba(0,0,0,.7);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.btn-ghost {
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-mid);
  transition: .15s;
  font-family: inherit;
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }

/* =============================================================
   CASH ITEM (oben in der Item-Liste, klar abgehoben)
   ============================================================= */

.item-cash {
  background: linear-gradient(90deg, rgba(52,211,153,.06), transparent 70%);
  border-left-color: var(--success) !important;
  cursor: default;
}
.item-cash:hover { background: linear-gradient(90deg, rgba(52,211,153,.10), transparent 70%); }
.item-cash .item-icon {
  background: rgba(52,211,153,.10);
  border-color: rgba(52,211,153,.4);
}
.item-cash .cash-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}
.item-cash .cash-body .item-name {
  font-size: 11px;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 2px;
}
.item-cash .cash-amount {
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 18px;
  font-weight: 700;
  color: var(--success);
  letter-spacing: .02em;
}
.money-amt {
  color: var(--success) !important;
  font-size: 13px !important;
}

/* =============================================================
   POWERBANK (jorge_powerbank) — Ladestand-Bar in der Meta-Zeile
   ============================================================= */

.item-meta .pb-akku {
  display: inline-block; vertical-align: middle;
  width: 64px; height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,.09);
  overflow: hidden;
  margin-right: 6px;
}
.item-meta .pb-akku i {
  display: block; height: 100%;
  border-radius: 3px;
}
.item-meta .pb-akku-val {
  font-size: 10px; font-weight: 600;
  color: var(--text-mid);
  vertical-align: middle;
}

/* Haltbarkeit gekochter Gerichte (metadata.freshness, food_expiry.lua):
   HALTBARKEIT-Label farbig nach Rest-%, Wert daneben in Mono. */
.item-meta .halt-lbl {
  font-size: 10px; font-weight: 800;
  letter-spacing: .08em;
  margin-right: 6px;
  vertical-align: middle;
}
.item-meta .halt-lbl.halt-rot    { color: var(--danger); }   /* 0-15% */
.item-meta .halt-lbl.halt-orange { color: #fb923c; }         /* 16-80% */
.item-meta .halt-lbl.halt-gruen  { color: var(--success); }  /* 81-95% */
.item-meta .halt-lbl.halt-frisch {                           /* 96-100% */
  background: linear-gradient(90deg, #fb923c 0%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.item-meta .halt-val {
  font-size: 10px; font-weight: 600;
  color: var(--text-mid);
  vertical-align: middle;
}

/* Handschuhfach: feste Powerbank-Lade-Slots (jorge_powerbank).
   Kachel-Stil wie die Handy/Tablet-Equipment-Slots: nur Icon + Lade-%. */
.pb-slots {
  display: flex; gap: 8px;
  padding: 2px 0 8px;
  list-style: none;
}
.pb-slot {
  flex: 1; min-width: 0;
  border: 1px dashed var(--line-mid);
  border-radius: 10px;
}
.pb-slot.filled {
  border-style: solid;
  border-color: rgba(52,211,153,.35);
  background: linear-gradient(180deg, rgba(52,211,153,.06), transparent 75%);
}
.pb-tile {
  /* .item-Basis-Styles (Grid/Border) fuer die Kachel neutralisieren */
  display: flex !important;
  grid-template-columns: none;
  align-items: center; justify-content: center; gap: 10px;
  padding: 9px 8px;
  border-left: none !important;
  background: none;
  cursor: grab;
}
.pb-tile:hover { background: rgba(255,255,255,.04); border-radius: 10px; }
.pb-tile img {
  width: 34px; height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
}
.pb-tile-col {
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  min-width: 0;
}
.pb-tile-lbl {
  font-size: 8px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-mute);
  white-space: nowrap;
}
.pb-tile-pct {
  font-size: 16px; font-weight: 700;
  letter-spacing: .02em;
}
.pb-slot.charging .pb-tile-pct { animation: pbChargePulse 1.4s ease-in-out infinite; }
@keyframes pbChargePulse { 0%,100%{opacity:1} 50%{opacity:.5} }
.pb-tile.empty { cursor: default; opacity: .22; }
.pb-tile.empty img { filter: grayscale(1); }

/* =============================================================
   COIN ITEM (jorge_coin) — wie Bargeld, aber GOLD.
   Kein Gewicht, keine Stück-Badge; rechts der $-Wert zum Live-Kurs.
   ============================================================= */

.item-coin {
  background: linear-gradient(90deg, rgba(255,196,80,.08), transparent 70%);
  border-left-color: #e8b64c !important;
}
.item-coin:hover { background: linear-gradient(90deg, rgba(255,196,80,.15), transparent 70%); }

/* Geklautes Gut (metadata.stolen, z.B. fremdes Kennzeichen): rot hinterlegt */
.item-stolen {
  background: linear-gradient(90deg, rgba(239,68,68,.10), transparent 70%);
  border-left-color: var(--danger) !important;
}
.item-stolen:hover { background: linear-gradient(90deg, rgba(239,68,68,.16), transparent 70%); }
.item-stolen .item-icon {
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.45);
}
.item-stolen .item-name { color: #f87171; }
.item-coin .item-icon {
  background: rgba(255,196,80,.10);
  border-color: rgba(255,196,80,.45);
}
.item-coin .coin-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}
.item-coin .item-name {
  color: #ffd76a;
  font-weight: 700;
}
.item-coin .coin-kurs {
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-mid);
  letter-spacing: .04em;
  margin-top: 2px;
}
.item-coin .coin-amount {
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 16px;
  font-weight: 700;
  color: #ffd76a;
  letter-spacing: .02em;
  text-shadow: 0 0 14px rgba(255,196,80,.4);
  white-space: nowrap;
}

/* =============================================================
   CASH-GIVE-MODAL (Betragseingabe)
   ============================================================= */
.cash-give-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  pointer-events: auto;
}
.cash-give-modal.hidden { display: none; }
.cash-give-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
}
.cash-give-card {
  position: relative;
  width: 360px; max-width: calc(100vw - 48px);
  background: rgba(14,14,18,.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  padding: 18px 18px 14px;
  animation: cgmIn .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes cgmIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cash-give-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.cash-give-icon { font-size: 18px; }
.cash-give-title {
  font-weight: 700; color: var(--text); font-size: 14px;
  text-transform: uppercase; letter-spacing: .06em;
}
.cash-give-body { padding: 14px 0 8px; }
.cash-give-label {
  display: block;
  font-size: 11px; color: var(--text-mid);
  text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 6px;
}
.cash-give-input-wrap {
  display: flex; align-items: center;
  background: rgba(0,0,0,.36);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  transition: border-color .15s;
}
.cash-give-input-wrap:focus-within { border-color: var(--accent); }
.cash-give-prefix {
  color: var(--success);
  font-weight: 700;
  margin-right: 6px;
}
.cash-give-input {
  flex: 1;
  background: transparent;
  border: 0; outline: 0;
  color: var(--text);
  font-size: 18px; font-weight: 700;
  padding: 12px 0;
  letter-spacing: .02em;
}
.cash-give-input::-webkit-outer-spin-button,
.cash-give-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cash-give-max {
  font-size: 11px; color: var(--text-mute);
  margin-top: 6px;
}
.cash-give-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.cash-give-foot .btn-ghost,
.cash-give-foot .btn-primary {
  padding: 8px 14px; font-size: 13px; font-weight: 600;
  border-radius: 6px; cursor: pointer;
  font-family: inherit;
}
.cash-give-foot .btn-ghost {
  background: transparent; color: var(--text-mid);
  border: 1px solid var(--line);
}
.cash-give-foot .btn-ghost:hover { background: rgba(255,255,255,.04); color: var(--text); }
.cash-give-foot .btn-primary {
  background: var(--accent-grad); color: #fff;
  border: 1px solid var(--accent);
}
.cash-give-foot .btn-primary:hover { box-shadow: 0 0 0 3px var(--accent-soft); }

/* =============================================================
   SCHLÜSSELBUND (Side-Panel — Spiegelbild zum Kofferraum)
   ============================================================= */

.keys-list {
  list-style: none;
  padding: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.keys-list::-webkit-scrollbar { width: 6px; }
.keys-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }

.keys-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: .15s;
  margin-bottom: 6px;
}
.keys-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateX(2px);
}
.keys-item:last-child { margin-bottom: 0; }
.keys-item.current {
  border-color: var(--accent);
  background: linear-gradient(90deg, var(--accent-soft), transparent 70%);
}

.ki-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font-size: 20px;
  background: rgba(255,255,255,.04);
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}
.ki-body { min-width: 0; }
.ki-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ki-meta {
  font-size: 10px;
  color: var(--text-mid);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ki-tag {
  font-size: 9px;
  letter-spacing: .1em;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--line);
  color: var(--text-mid);
}
.ki-tag.current-tag {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.ki-tag.job-tag {
  background: rgba(96,165,250,.18);
  color: var(--info);
  border: 1px solid rgba(96,165,250,.4);
}
/* Master/Job-Key bekommt goldenen Akzent damit's optisch auffällt */
.keys-item.key-job {
  border-left: 3px solid #f2c14e;
  background: linear-gradient(90deg, rgba(242,193,78,.10), transparent 70%);
}
.keys-item.key-job:hover {
  background: linear-gradient(90deg, rgba(242,193,78,.16), transparent 70%);
}
.keys-item.key-job .ki-icon {
  filter: drop-shadow(0 0 6px rgba(242,193,78,.6));
}

/* =============================================================
   BRIEFTASCHE (Dokumente-Liste, Karten-Look)
   ============================================================= */
.wallet-list {
  list-style: none;
  padding: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.wallet-list::-webkit-scrollbar { width: 6px; }
.wallet-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }

.wallet-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .15s;
  pointer-events: auto;
}
.wallet-item:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 70%), var(--bg-input);
}
.wallet-item:last-child { margin-bottom: 0; }
.wallet-item * { pointer-events: auto; }

.wi-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 20px;
}
.wi-body { min-width: 0; }
.wi-name {
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wi-meta {
  font-size: 11px;
  color: var(--text-mid);
  margin-top: 2px;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */

@media (max-width: 1700px) {
  .inv-card.has-wallet.has-keys.has-stash { width: 96vw; }
}
@media (max-width: 1500px) {
  .inv-card.has-keys.has-stash,
  .inv-card.has-wallet.has-stash,
  .inv-card.has-wallet.has-keys { width: 96vw; }
}
@media (max-width: 1200px) {
  .inv-card.has-stash, .inv-card.has-keys, .inv-card.has-wallet { width: 96vw; }
}
@media (max-width: 700px) {
  .inv-card { height: 96vh; }
  .inv-main,
  .inv-main.has-stash,
  .inv-main.has-keys,
  .inv-main.has-wallet,
  .inv-main.has-keys.has-stash,
  .inv-main.has-wallet.has-stash,
  .inv-main.has-wallet.has-keys,
  .inv-main.has-wallet.has-keys.has-stash { grid-template-columns: 1fr; }
  .col-char, .col-stash, .col-keys, .col-wallet { border-top: 1px solid var(--line); border-right: none; }
}

/* =============================================================
   TUTORIAL-TOUR OVERLAY (wird nur bei aktiver Tour gezeigt)
   ============================================================= */
.inv-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  font-family: var(--font);
  color: var(--text);
}
.inv-tour-overlay.hidden { display: none; }

/* Spotlight: glowing Outline + dunkler Rest via huge box-shadow */
.inv-tour-spotlight {
  position: fixed;
  border-radius: 12px;
  background: transparent;
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, .58),
    inset 0 0 0 2px var(--accent),
    0 0 24px 4px var(--accent-glow);
  transition: top .28s cubic-bezier(.2,.8,.2,1),
              left .28s cubic-bezier(.2,.8,.2,1),
              width .28s cubic-bezier(.2,.8,.2,1),
              height .28s cubic-bezier(.2,.8,.2,1),
              opacity .2s;
  pointer-events: none;
}

/* Pfeil: zeigt zum aktiven Slot */
.inv-tour-arrow {
  position: fixed;
  width: 40px; height: 40px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-glow));
  pointer-events: none;
  transition: top .28s cubic-bezier(.2,.8,.2,1),
              left .28s cubic-bezier(.2,.8,.2,1),
              transform .28s cubic-bezier(.2,.8,.2,1);
  animation: tourArrowBounce 1.4s ease-in-out infinite;
}
@keyframes tourArrowBounce {
  0%, 100% { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
  50%      { transform: translate(-6px, 0) rotate(var(--rot, 0deg)); }
}

/* Tour-Card: Step-Counter + Titel + Text + OK */
.inv-tour-card {
  position: fixed;
  width: 360px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: var(--r-lg);
  padding: 18px 20px 16px;
  box-shadow:
    0 24px 60px rgba(0,0,0,.65),
    0 0 0 1px rgba(218,102,82,.18),
    0 0 36px var(--accent-glow);
  pointer-events: auto;
  transition: top .28s cubic-bezier(.2,.8,.2,1),
              left .28s cubic-bezier(.2,.8,.2,1);
}
.inv-tour-tag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 10px;
  letter-spacing: .14em;
}
.inv-tour-tag-step {
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
}
.inv-tour-tag-step .tag-sep,
.inv-tour-tag-step .tag-max { color: var(--text-mute); }
.inv-tour-tag-sep {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.inv-tour-tag-section {
  font-family: var(--mono);
  color: var(--text-mid);
  font-weight: 700;
}
.inv-tour-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.25;
}
.inv-tour-text {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 14px;
}
.inv-tour-btn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.inv-tour-btn-skip {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-mid);
  font: 600 11px var(--font);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  letter-spacing: .04em;
  transition: .15s;
}
.inv-tour-btn-skip:hover { color: var(--text); border-color: var(--line-mid); }
.inv-tour-btn-ok {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-grad);
  color: #fff;
  border: none;
  font: 700 12px var(--font);
  padding: 9px 16px;
  border-radius: var(--r-sm);
  cursor: pointer;
  letter-spacing: .04em;
  transition: .15s;
  box-shadow: 0 4px 14px rgba(218,102,82,.35);
}
.inv-tour-btn-ok:hover { background: var(--accent-deep); transform: translateY(-1px); }
.inv-tour-btn-ok svg { width: 14px; height: 14px; }

/* =============================================================
   WOUND-OVERLAY (jorge_medic Phase B)
   Sitzt auf der char-svg, Position+Size per JS gepinnt
   (object-fit: contain Bounding-Box-Berechnung).
   ============================================================= */
.wound-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 5;
}
.wound {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 16px; height: 16px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid transparent;
  pointer-events: auto;
  cursor: pointer;
  padding: 0;
  transition: width .2s, height .2s, background .2s, box-shadow .2s, border-color .2s;
}
.wound[data-state="healthy"] {
  width: 6px; height: 6px;
  background: #34d399;
  opacity: .35;
}
.wound[data-state="light"] {
  background: #fbbf24;
  border-color: rgba(251,191,36,.65);
  box-shadow: 0 0 8px rgba(251,191,36,.55);
  width: 14px; height: 14px;
}
.wound[data-state="medium"] {
  background: #ff8a2e;
  border-color: rgba(255,138,46,.7);
  box-shadow: 0 0 14px rgba(255,138,46,.65);
  width: 18px; height: 18px;
}
.wound[data-state="severe"] {
  background: #ef4444;
  border-color: rgba(239,68,68,.85);
  box-shadow: 0 0 22px rgba(239,68,68,.55);
  width: 22px; height: 22px;
  animation: bleedPulse 1.2s ease-in-out infinite;
}
@keyframes bleedPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(239,68,68,.55); transform: translate(-50%, -50%) scale(1); }
  50%      { box-shadow: 0 0 28px rgba(239,68,68,.55); transform: translate(-50%, -50%) scale(1.15); }
}
.wound:hover {
  border-color: #fff !important;
  box-shadow: 0 0 22px rgba(255,255,255,.5) !important;
}

/* ============================================================
   Wound-Tooltip (Hover + Klick auf Body-Part-Dots)
   ============================================================ */
.wound-tooltip {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    min-width: 240px;
    max-width: 320px;
    background: rgba(14,14,18,.98);
    border: 1px solid var(--line-mid);
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.7);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    animation: woundTtIn .15s ease-out;
}
.wound-tooltip.hidden { display: none; }
@keyframes woundTtIn { from {opacity:0; transform:translateY(4px);} to {opacity:1; transform:translateY(0);} }

.wound-tooltip .wt-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
}
.wound-tooltip .wt-part {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: .03em;
}
.wound-tooltip .wt-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(218,102,82,.08);
    border: 1px solid rgba(218,102,82,.4);
    color: var(--accent);
    letter-spacing: .04em;
}
.wound-tooltip .wt-sev {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.wound-tooltip .wt-sev.light   { background: rgba(251,191,36,.12); color: #fbbf24; border: 1px solid rgba(251,191,36,.4); }
.wound-tooltip .wt-sev.medium  { background: rgba(255,138,46,.12); color: #ff8a2e; border: 1px solid rgba(255,138,46,.4); }
.wound-tooltip .wt-sev.severe  { background: rgba(239,68,68,.12);  color: #ef4444; border: 1px solid rgba(239,68,68,.4); }
.wound-tooltip .wt-sev.healthy { background: rgba(52,211,153,.12); color: #34d399; border: 1px solid rgba(52,211,153,.4); }

.wound-tooltip .wt-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.wound-tooltip .wt-wound {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 5px 0;
}
.wound-tooltip .wt-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-mute, #6a6a72);
}
.wound-tooltip .wt-hint {
    font-size: 11px;
    color: var(--accent);
    padding-top: 7px;
    border-top: 1px solid var(--line);
    line-height: 1.45;
}
.wound-tooltip .wt-empty {
    font-size: 11px;
    color: var(--text-mid, #a8a8b0);
    text-align: center;
    padding: 4px 0;
}

.wound-tooltip .wt-more {
    font-size: 10px;
    color: var(--text-mute, #6a6a72);
    text-align: center;
    padding: 4px 0;
    font-style: italic;
    font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   BEWEIS-INFO MODAL (Tüte/Box-Details inkl. Beschriftung)
   ============================================================ */
.ev-modal {
    position: fixed; inset: 0; z-index: 4000;
    display: grid; place-items: center;
    pointer-events: auto;
}
.ev-modal.hidden { display: none; }
.ev-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
    pointer-events: auto;
}
.ev-modal .ev-card {
    position: relative;
    width: 360px;
    background: var(--bg, rgba(14,14,18,.96));
    border: 1px solid var(--line, rgba(255,255,255,.07));
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0,0,0,.55);
    overflow: hidden;
    pointer-events: auto;
    animation: evPop .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes evPop {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
.ev-card .ev-head {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line, rgba(255,255,255,.07));
    background: linear-gradient(180deg, var(--accent-soft, rgba(218,102,82,.14)), transparent);
}
.ev-card .ev-ico {
    width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px;
    display: grid; place-items: center; font-size: 20px;
    background: var(--accent-soft, rgba(218,102,82,.14));
    border: 1px solid var(--accent-glow, rgba(218,102,82,.5));
}
.ev-card .ev-head h2 { font-size: 15px; font-weight: 700; letter-spacing: .3px; margin: 0; }
.ev-card .ev-head .sub {
    font-size: 11px; color: var(--text-mute, #5a5a64); margin-top: 2px;
    text-transform: uppercase; letter-spacing: .6px;
}
.ev-card .x-close {
    position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid var(--line-mid, rgba(255,255,255,.14)); background: transparent;
    color: var(--text-mid, #a8a8b0);
    display: grid; place-items: center; cursor: pointer; font-size: 15px; transition: .18s;
}
.ev-card .x-close:hover { border-color: var(--accent, #da6652); color: var(--accent, #da6652); }

.ev-card .ev-label {
    margin: 16px 18px 4px; padding: 14px; border-radius: 10px;
    background: var(--bg-input, rgba(0,0,0,.36));
    border: 1px solid var(--line, rgba(255,255,255,.07));
}
.ev-card .ev-label .ltag {
    font-size: 10px; text-transform: uppercase; letter-spacing: .7px;
    color: var(--text-mute, #5a5a64);
}
.ev-card .ev-label .row1 { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; }
.ev-card .ev-label .row1:empty { display: none; }
.ev-card .case-badge {
    font-family: var(--mono, 'JetBrains Mono', monospace);
    font-size: 12px; font-weight: 600; color: var(--accent, #da6652);
    background: var(--accent-soft, rgba(218,102,82,.14));
    border: 1px solid var(--accent-glow, rgba(218,102,82,.5));
    padding: 3px 9px; border-radius: 6px; letter-spacing: .5px;
}
.ev-card .case-empty {
    font-family: var(--mono, 'JetBrains Mono', monospace);
    font-size: 12px; color: var(--text-mute, #5a5a64); font-style: italic;
}
.ev-card .case-title {
    font-size: 12px; color: var(--text-mid, #a8a8b0); font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ev-card .ev-label .note {
    font-size: 14px; font-weight: 500; color: var(--text, #f5f5f7);
    line-height: 1.4; margin-top: 8px;
}
.ev-card .ev-label .note.empty { color: var(--text-mute, #5a5a64); font-style: italic; font-weight: 400; }

.ev-card .ev-rows { padding: 8px 18px 6px; }
.ev-card .ev-rows:empty { display: none; }
.ev-card .ev-row {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    padding: 9px 0; border-bottom: 1px solid var(--line, rgba(255,255,255,.07));
}
.ev-card .ev-row:last-child { border-bottom: none; }
.ev-card .ev-row .k { font-size: 12px; color: var(--text-mid, #a8a8b0); }
.ev-card .ev-row .v { font-size: 13px; color: var(--text, #f5f5f7); text-align: right; font-weight: 500; }
.ev-card .ev-row .v.mono { font-family: var(--mono, 'JetBrains Mono', monospace); font-size: 12px; }

.ev-card .ev-fill-wrap { padding: 6px 18px 16px; }
.ev-card .ev-fill-wrap.hidden { display: none; }
.ev-card .ev-fill-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 7px; }
.ev-card .ev-fill-head .lbl { color: var(--text-mid, #a8a8b0); }
.ev-card .ev-fill-head .amt { color: var(--text, #f5f5f7); }
.ev-card .ev-bar {
    height: 8px; border-radius: 5px; overflow: hidden;
    background: var(--bg-input, rgba(0,0,0,.36));
    border: 1px solid var(--line, rgba(255,255,255,.07));
}
.ev-card .ev-bar > i {
    display: block; height: 100%; border-radius: 5px;
    background: linear-gradient(90deg, #da6652, #e2199a 68%, #8b2fd6);
    transition: width .3s cubic-bezier(.2,.8,.2,1);
}
.ev-card .ev-foot {
    padding: 11px 18px; border-top: 1px solid var(--line, rgba(255,255,255,.07));
    font-size: 11px; color: var(--text-mute, #5a5a64);
    display: flex; align-items: center; gap: 6px;
}
.ev-card .ev-foot .kbd {
    font-family: var(--mono, 'JetBrains Mono', monospace); font-size: 10px;
    padding: 2px 6px; border-radius: 4px;
    background: var(--bg-input, rgba(0,0,0,.36));
    border: 1px solid var(--line-mid, rgba(255,255,255,.14));
    color: var(--text-mid, #a8a8b0);
}

/* ===== Aufteilen-Modal (Hover+Q / Kontextmenü) ===== */
.split-modal { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; }
.split-modal.hidden { display: none; }
.split-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.split-card {
  position: relative; width: 320px;
  background: var(--bg); border: 1px solid var(--line-mid); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6); padding: 18px 18px 16px;
  animation: splitIn .2s cubic-bezier(.2,.8,.2,1);
}
@keyframes splitIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.split-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 16px; }
.split-kicker { font-family: var(--mono); font-size: 9px; letter-spacing: .18em; color: var(--accent); }
.split-item { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split-body { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.split-range { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 999px; background: rgba(255,255,255,.10); outline: none; }
.split-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-grad); cursor: pointer; box-shadow: 0 0 10px var(--accent-glow); border: 2px solid #1a1a1f; }
.split-row { display: flex; align-items: center; gap: 8px; }
.split-step {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px;
  background: var(--bg-input); border: 1px solid var(--line); color: var(--text);
  font-size: 18px; font-weight: 700; cursor: pointer; display: grid; place-items: center; transition: .15s;
}
.split-step:hover { border-color: var(--accent); color: var(--accent); }
.split-num {
  flex: 1; min-width: 0; height: 34px; text-align: center;
  background: var(--bg-input); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font-size: 16px; font-weight: 700; outline: none;
}
.split-num:focus { border-color: var(--accent); }
.split-num::-webkit-outer-spin-button, .split-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.split-of { font-size: 13px; color: var(--text-mid); flex-shrink: 0; }
.split-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.split-btn { height: 38px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; border: 1px solid var(--line); }
.split-btn.ghost { background: transparent; color: var(--text-mid); }
.split-btn.ghost:hover { color: var(--text); border-color: var(--line-mid); }
.split-btn.primary { background: var(--accent-grad); color: #fff; border-color: var(--accent); }
.split-btn.primary:hover { filter: brightness(1.08); }

/* =============================================================
   REDESIGN 2026-06-22 — Layout-Override (gewinnt als letzte Regel).
   Bestehende Komponenten-/Modal-/Toast-Styles bleiben unberührt.
   ============================================================= */

/* --- Fenster frei verschiebbar + kompakter --- */
.inv-root { display: block; }
/* FESTE Breiten (KEIN max-content — CEF ignoriert sonst flex-basis -> Silhouette kollabiert).
   Breite = Summe sichtbarer Spalten: items440 + felder96 + char460 (+rail312 +stash320). */
.inv-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 1004px; max-width: 97vw; height: 592px; max-height: 94vh;
  animation: cardInJT .28s cubic-bezier(.2,.8,.2,1);
}
.inv-card.dragging { transition: none; box-shadow: 0 34px 90px rgba(0,0,0,.75); }
@keyframes cardInJT {
  from { opacity: 0; transform: translate(-50%,-48%) scale(.985); }
  to   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}
.inv-card.has-keys                      { width: 1316px; }
.inv-card.has-wallet                    { width: 1316px; }
.inv-card.has-keys.has-wallet           { width: 1628px; }
.inv-card.has-stash                     { width: 1324px; }
.inv-card.has-keys.has-stash            { width: 1636px; }
.inv-card.has-wallet.has-stash          { width: 1636px; }
.inv-card.has-keys.has-wallet.has-stash { width: 1948px; }
.inv-card.has-emergency                 { height: 682px; }

/* --- MAIN als Flex (Spalten klappen sauf, Fenster wächst mit) --- */
.inv-main, .inv-main.has-stash, .inv-main.has-keys, .inv-main.has-wallet,
.inv-main.has-keys.has-stash, .inv-main.has-wallet.has-stash,
.inv-main.has-wallet.has-keys, .inv-main.has-wallet.has-keys.has-stash {
  display: flex; align-items: stretch; grid-template-columns: none;
}
.col { border-right: 1px solid var(--line); min-width: 0; }
.col-keys, .col-wallet { flex: 0 0 312px; }
.col-items { flex: 0 0 440px; }
.tilecol   { flex: 0 0 96px; min-width: 0; }
.col-char  { flex: 1 1 460px; min-width: 460px; }   /* wächst/füllt — kann nie kollabieren */
.col-stash { flex: 0 0 320px; }
.col.hidden { display: none; }

/* --- HEADER als Drag-Griff + Logo + Icon-Buttons --- */
.inv-head { cursor: grab; user-select: none; }
.inv-head:active { cursor: grabbing; }
.drag-dots { display: grid; grid-template-columns: repeat(2,3px); gap: 3px; opacity: .4; margin-right: 4px; }
.drag-dots i { width: 3px; height: 3px; border-radius: 50%; background: var(--text-mid); }
.brand-dot { width: 30px; height: 30px; border-radius: 9px; overflow: hidden; display: grid; place-items: center;
  background: rgba(218,102,82,.12); box-shadow: 0 0 14px var(--accent-glow); }
.brand-dot img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.22); }
.head-sep { width: 1px; height: 22px; background: var(--line-mid); margin: 0 3px; }
.icon-btn { position: relative; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  background: var(--bg-input); border: 1px solid var(--line); color: var(--text-mid); cursor: pointer; transition: .15s; }
.icon-btn svg.i { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.icon-btn.emg-toggle:hover, .icon-btn.emg-toggle.active {
  border-color: var(--success); color: var(--success); background: rgba(52,211,153,.12); }
.icon-btn.hidden { display: none; }

/* --- FELDER-SPALTE (Waffe 1-3 + Handy/Tablet/Funk) als Kacheln --- */
.tilecol { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 11px; }
.tile-div { width: 34px; height: 1px; background: var(--line-mid); margin: 2px 0; flex: none; }
.tilecol .tile { position: relative; width: 74px; height: 62px; min-width: 0; padding: 0; flex: none;
  display: grid; place-items: center; grid-template-columns: none; gap: 0;
  background: var(--bg-input); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; cursor: pointer; }
.tilecol .tile .ws-body { display: none; }
.tilecol .tile .ws-icon { width: auto; height: auto; font-size: 24px; line-height: 1; display: grid; place-items: center;
  background: none; border: none; color: var(--text-mute); }
.tilecol .tile .ws-icon img { width: 38px !important; height: 38px !important; object-fit: contain; }
.tilecol .tile .ghost-ico { opacity: .16; filter: grayscale(.4); }
.tilecol .tile.empty { border-style: dashed; }
.tilecol .weapon-slot.equipped { border-color: rgba(218,102,82,.6); background: rgba(218,102,82,.06); }
.tilecol .phone-slot.bound { border-color: rgba(96,165,250,.6); background: rgba(96,165,250,.06); }
.tilecol .phone-slot.emg-funk.bound { border-color: rgba(52,211,153,.6); background: rgba(52,211,153,.06); }
.tilecol .tile .ws-clear { position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; bottom: auto;
  font-size: 11px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.5); border: 1px solid var(--line-mid); color: var(--text-mid); }
.tilecol .tile .ws-clear:hover { border-color: var(--danger); color: var(--danger); }

/* --- CHARAKTER: Name statt CHARAKTER + ♂/♀, prominente Silhouette ohne Kreis/Schimmer --- */
.col-char .char-title { display: flex; align-items: center; gap: 8px; }
.col-char .char-title h2 { font-size: 15px; font-weight: 700; }
.gender-chip { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; }
.gender-chip svg { width: 11px; height: 11px; stroke: currentColor; stroke-width: 2; fill: none; }
.gender-chip.male { color: #3fa9f5; background: rgba(63,169,245,.16); border: 1px solid rgba(63,169,245,.5); }
.gender-chip.female { color: #ff5fa2; background: rgba(255,95,162,.16); border: 1px solid rgba(255,95,162,.5); }
.gender-chip.hidden { display: none; }
.stage-aura { display: none; }
.char-svg { filter: brightness(1.9) saturate(.55) drop-shadow(0 12px 26px rgba(0,0,0,.7)); }

/* Belegte Kleidungs-Slots: nur Item-Name (Typ steckt im Icon) -> kein Doppelname */
.cloth-slot:not(.empty) .cs-lab { display: none; }
.cloth-slot .cs-eq { position: static; left: auto; bottom: auto; transform: none; margin-top: 2px; max-width: 100%; }

/* --- EMERGENCY-Leiste (nur noch Gear, Funk wandert in die Felder-Spalte) --- */
.emg-slots { grid-template-columns: repeat(4, 1fr); }
.emg-bar .gear-slot { grid-template-columns: 26px 1fr auto; }

/* Footer kollabiert wenn Emergency-Leiste zu ist (kein leerer Streifen) */
.inv-foot { padding: 0; border-top: 0; background: transparent; }
.emg-bar:not(.hidden) { padding: 10px 16px 13px; }
/* Spalten-Trennlinien sauber: tilecol trennt zur Silhouette, Char kein Rand am Ende */
.tilecol { border-right: 1px solid var(--line); }
.col-char { border-right: 0; }

/* Silhouette: feste px-GROESSE (Breite UND Hoehe). CEF berechnet width:auto aus
   dem viewBox-Aspekt NICHT zuverlaessig -> Box undefiniert -> Wundpunkte (an die
   SVG-Box gepinnt) verrutschen. 123x372 = exakt der viewBox-Aspekt (358.5/1086). */
.char-stage { overflow: visible; }
.char-stage .char-svg { width: 123px; height: 372px; max-width: 123px; max-height: 372px; }

/* Rail-Listen (Autoschluessel/Dokumente) im selben kompakten Look wie die Item-Zeilen */
.keys-item { grid-template-columns: 32px 1fr auto; gap: 9px; padding: 7px 9px; margin-bottom: 5px; border-radius: var(--r-sm); }
.wallet-item { grid-template-columns: 32px 1fr; gap: 9px; padding: 7px 9px; margin-bottom: 5px; border-radius: var(--r-sm); }
.keys-item:hover, .wallet-item:hover { transform: none; }
.ki-icon, .wi-icon { width: 32px; height: 32px; border-radius: 7px; font-size: 16px;
  background: rgba(255,255,255,.045); border: 1px solid var(--line); }
.ki-icon img, .wi-icon img { width: 26px !important; height: 26px !important; object-fit: contain; display: block; }
.ki-name, .wi-name { font-size: 12.5px; }
.ki-meta, .wi-meta { font-size: 10px; }
.ki-tag { font-size: 8px; padding: 2px 6px; }

/* --- ARME-/ANSICHT-Button im Char-Header --- */
.arms-open-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  background: var(--bg-input); border: 1px solid var(--line); color: var(--text-mid);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; transition: .15s;
}
.arms-open-btn:hover { border-color: var(--accent); color: var(--accent); }

/* --- CHARAKTER-ANSICHT Overlay (Inv aus, Char frei drehbar) --- */
.charview { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.charview.hidden { display: none; }
/* Vollflaechiger Drag-Bereich (Char drehen). Bewusst transparent -> man sieht den Char. */
.cv-drag { position: absolute; inset: 0; pointer-events: auto; cursor: ew-resize; }
.cv-panel {
  position: absolute; left: 28px; top: 50%; transform: translateY(-50%);
  width: 220px; pointer-events: auto;
  background: var(--bg); border: 1px solid var(--line-mid); border-radius: var(--r-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,.6); padding: 18px 16px;
  display: flex; flex-direction: column; gap: 16px;
  animation: cvIn .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes cvIn { from { opacity: 0; transform: translate(-12px,-50%); } to { opacity: 1; transform: translate(0,-50%); } }
.cv-head { display: flex; flex-direction: column; gap: 2px; }
.cv-kicker { font-size: 9px; letter-spacing: .16em; color: var(--accent); }
.cv-title { font-size: 15px; font-weight: 700; }
.cv-group { display: flex; flex-direction: column; gap: 7px; }
.cv-label { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: var(--text-mute); }
.cv-stepper { display: grid; grid-template-columns: 38px 1fr 38px; gap: 8px; align-items: center; }
.cv-step {
  height: 38px; border-radius: var(--r-sm); cursor: pointer; font-size: 16px;
  background: var(--bg-input); border: 1px solid var(--line); color: var(--text); transition: .14s;
  display: grid; place-items: center;
}
.cv-step:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.cv-step:active { transform: scale(.94); }
.cv-val { text-align: center; font-size: 16px; font-weight: 700; }
.cv-rot-hint { font-family: var(--font); font-size: 10px; font-weight: 500; color: var(--text-mute); letter-spacing: 0; }
.cv-hint { font-size: 10px; color: var(--text-mute); line-height: 1.3; }
.cv-ok {
  margin-top: 4px; height: 42px; border-radius: var(--r-md); cursor: pointer;
  background: var(--accent-grad); border: 1px solid var(--accent); color: #1a1207;
  font-weight: 700; font-size: 13px; letter-spacing: .04em; transition: .14s;
}
.cv-ok:hover { filter: brightness(1.08); }
.cv-ok:active { transform: scale(.98); }

/* --- UI-Groessen-Steuerung im Header (− % +), passend zu den Icon-Buttons --- */
.size-ctrl { display: flex; align-items: center; gap: 4px; }
.size-btn { width: 30px; height: 30px; border-radius: 8px; }
.size-btn svg.i { width: 14px; height: 14px; }
.size-val { min-width: 42px; text-align: center; font-size: 11px; color: var(--text-mid); }
/* Ganzes Fenster skalierbar (Standard 1.0). Drag setzt den Scale im JS mit. */
.inv-card { transform: translate(-50%, -50%) scale(var(--inv-scale, 1)); transform-origin: center center; }

/* --- Klamotten-Namen sauber: Icon kleiner, Name als Bottom-Leiste mit Ellipsis --- */
.cloth-slot { overflow: hidden; position: relative; }
/* belegte Slots reservieren unten Platz fuer das Namens-Badge */
.cloth-slot:not(.empty) { padding-bottom: 15px; }
/* Icon nicht den ganzen Slot fuellen, damit das Badge nicht ueberlappt */
.cloth-slot:not(.empty) .cs-ico { max-height: 60%; display: flex; align-items: center; justify-content: center; }
.cloth-slot:not(.empty) .cs-ico img { max-height: 26px !important; max-width: 80% !important; width: auto !important; height: auto !important; object-fit: contain; }
/* Name = saubere Leiste am unteren Slot-Rand, immer ein-zeilig mit Ellipsis */
.cloth-slot .cs-eq {
  position: absolute; left: 3px; right: 3px; bottom: 3px; top: auto; margin: 0;
  width: auto; max-width: none; box-sizing: border-box;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
  font-size: 7.5px; padding: 1px 4px; line-height: 1.4; border-radius: 3px;
}

/* Cloth-Slot "+"-Platzhalter (kein Emoji): schlicht + dezent */
.cloth-slot .cs-ico { font-size: 20px; line-height: 1; }
.cloth-slot.empty .cs-ico { opacity: .5; color: var(--text-mute); filter: none; font-weight: 400; }

/* Haus-Schluessel (jorge_housing): groesseres Icon — bei 26px ist das
   detaillierte PNG unlesbar. Ueberschreibt die !important-Regel oben. */
.keys-item.key-house .ki-icon { width: 46px; height: 46px; }
.keys-item.key-house .ki-icon img { width: 42px !important; height: 42px !important; }
.keys-item.key-house { border-color: rgba(226,25,154,.28); }

/* --- Bild-Vorschau der Behoerden-Dienstkleidung (jorge_gov_kleidung) --- */
.govcloth-tip {
    position: fixed;
    z-index: 9000;
    pointer-events: none;
    width: 190px;
    padding: 9px;
    background: rgba(10, 10, 13, .97);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 10px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .6);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .12s, transform .12s;
}
.govcloth-tip.on { opacity: 1; transform: none; }
.govcloth-tip img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 7px;
    background: linear-gradient(155deg, #23242c, #16171c);
    display: block;
}
.govcloth-tip .t {
    margin-top: 7px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.35;
    color: #f5f5f7;
}

/* ============================================================
   LEERE GERAETE-SLOTS (Handy / Tablet / Funk)
   ------------------------------------------------------------
   Das Platzhalter-Icon soll deutlich zuruecktreten, damit ein leerer
   Slot auf einen Blick als leer erkennbar ist. Die bisherige Regel
   hing an `.tilecol` und griff deshalb NICHT in der Fussleiste
   (.footbar) und der Einsatzleiste (.emg-bar) -- dort standen die
   Icons in voller Deckkraft und sahen aus wie belegt.
   ============================================================ */
.phone-slot.empty .ghost-ico,
.weapon-slot.empty .ghost-ico,
.gear-slot.empty .ghost-ico,
.bag-slot.empty .ghost-ico {
  opacity: .16;
  filter: grayscale(.6);
}
