/* =====================================================================
   Deadphase Redesign – Etappe 1 (Grundgerüst)
   Wird als letzte Datei geladen und überschreibt nur gezielt.
   Handgeschrieben, weil css/style.css Regeln enthält, die nicht im SCSS stehen.
   ===================================================================== */

/* ---------- Statusleiste: dunkel, eine Zeile, Icon + Zahl + dünner Balken ---------- */
.app-status-bar,
.app-status-bar .compact-weather-display {
  background: #101418;
  color: #ece6d8;
}

.app-status-bar .compact-weather-display {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: max(6px, env(safe-area-inset-top)) 12px 6px;
  border-bottom: 1px solid rgba(236, 230, 216, 0.1);
  backdrop-filter: none;
}

body.task-timer-active .app-status-bar .compact-weather-display {
  padding-top: 6px;
}

.app-status-bar .compact-player-stats {
  order: 1;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
}

.app-status-bar .compact-weather-row {
  order: 2;
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  gap: 8px;
}

.app-status-bar .compact-weather-summary {
  flex: 0 0 auto;
}

.compact-player-stat {
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon value" "track track";
  gap: 3px 4px;
  min-height: 0;
}

.compact-player-stat i {
  grid-area: icon;
  font-size: 10px;
}

.compact-player-stat-value {
  grid-area: value;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
  color: #ece6d8;
  font-variant-numeric: tabular-nums;
}

.compact-player-stat-track {
  grid-area: track;
  height: 2px;
  background: rgba(236, 230, 216, 0.14);
}

.compact-player-stat--health i { color: #d9534a; }
.compact-player-stat--focus i { color: #4dbab3; }
.compact-player-stat--energy i { color: #e3a33a; }
.compact-player-stat--hydration i { color: #5aa6e0; }

.compact-player-stat--health .compact-player-stat-fill { background: #c0443b; }
.compact-player-stat--focus .compact-player-stat-fill { background: #3aa6a0; }
.compact-player-stat--energy .compact-player-stat-fill { background: #d4902a; }
.compact-player-stat--hydration .compact-player-stat-fill { background: #3d8fd1; }

.app-status-bar .compact-weather-desc,
.app-status-bar .compact-weather-chip,
.app-status-bar .compact-weather-location {
  color: rgba(236, 230, 216, 0.8);
}

.app-status-bar .compact-weather-summary i,
.app-status-bar .compact-weather-chip i {
  color: #f0c27a;
}

.app-status-bar .compact-weather-summary i {
  min-width: 0;
  font-size: 0.85rem;
}

/* Mobil: nur Wetter-Icon und Temperatur */
@media (max-width: 719px) {
  .app-status-bar .compact-weather-desc,
  .app-status-bar .compact-weather-values .compact-weather-chip:not(:first-child) {
    display: none;
  }
  .app-status-bar .compact-weather-values .compact-weather-chip:first-child i {
    display: none;
  }
}

@media (min-width: 720px) {
  .app-status-bar .compact-weather-display {
    padding-inline: max(12px, calc((100vw - 1200px) / 2));
  }
  .app-status-bar .compact-player-stats {
    max-width: 640px;
  }
  .app-status-bar .compact-weather-row {
    margin-left: auto;
  }
}

/* ---------- Hauptnavigation: niedriger ---------- */
.app-bottom-nav {
  min-height: 0;
  padding: 2px 6px max(2px, env(safe-area-inset-bottom));
  background: #12171b;
  border-top: 1px solid rgba(226, 211, 177, 0.16);
}

body.app-layout-enabled #app-bottom-nav {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  box-shadow: none;
}

.app-nav-item {
  min-height: 44px;
  padding: 3px 2px;
  gap: 2px;
  border-radius: 10px;
}

.app-nav-item > i {
  font-size: 1.12rem;
}

.app-nav-item > span:last-child {
  font-size: 0.58rem;
}

/* ---------- Mobil: Fenster vollflächig, ohne Rand und runde Ecken ---------- */
@media (max-width: 600px) {
  .app-sheet {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .simplified-modal {
    padding: 0;
    align-items: stretch;
  }

  .simplified-modal-content,
  #building-modal .simplified-modal-content {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .building-modal {
    padding: 0;
  }

  .building-modal .building-modal-content {
    max-width: none;
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .building-loot-overlay {
    padding: 0;
    justify-content: stretch;
  }

  .building-loot-panel {
    width: 100%;
    max-height: 100%;
    flex: 1 1 auto;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  #game-modal.item-modal-shell {
    width: 100vw;
    max-height: var(--app-modal-viewport-height);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  #game-modal.item-modal-shell #game-modal-content {
    max-height: var(--app-modal-viewport-height);
  }
}

/* =====================================================================
   Etappe 2 – Item-Kachel (Item.renderItemTile)
   Haltbarkeit oben, Menge oben links, Boni unten links, Gewicht unten rechts.
   ===================================================================== */
.item-tile .item-durability-bar-outer {
  top: 3px;
  left: 4px;
  right: 4px;
  width: auto;
  height: 2px;
  border-radius: 2px;
  background: rgba(245, 241, 230, 0.14);
  z-index: 3;
}

.item-tile .item-durability-bar-inner {
  border-radius: 2px;
  background: #8fa863;
}

.item-tile .dur-mid .item-durability-bar-inner { background: #e8b86a; }
.item-tile .dur-low .item-durability-bar-inner { background: #d45a52; }

.item-tile .item-durability-label {
  position: absolute;
  z-index: 4;
  top: 7px;
  right: 4px;
  color: rgba(245, 241, 230, 0.78);
  font-size: 0.47rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}

.item-tile.is-defective .item-durability-label { color: #e57a71; }

.item-tile.is-defective .item-img,
.item-tile.is-defective .item-icon-fallback {
  opacity: 0.4;
  filter: grayscale(1);
}

.item-tile .item-amount {
  top: 6px;
  left: 4px;
  z-index: 4;
  min-width: 0;
  padding: 1px 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  font-size: 0.5rem;
  line-height: 1.3;
}

.item-tile .item-weight {
  padding: 1px 3px;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(245, 241, 230, 0.85);
  font-size: 0.47rem;
}

.item-tile .item-bonus-corner {
  top: auto;
  bottom: 4px;
  left: 3px;
  gap: 1px;
}

#item-list .item-tile .item-bonus-corner,
#base-item-list .item-tile .item-bonus-corner,
.sheet-item-grid .item-tile .item-bonus-corner {
  bottom: 1.75rem;
}

.item-tile .item-bonus,
.item-tile .item-bonus-capacity,
.item-tile .item-bonus-attack,
.item-tile .item-bonus-defense,
.item-tile .item-bonus-speed,
.item-tile .item-bonus-dexterity,
.item-tile .item-bonus-strength,
.item-tile .item-bonus-craft,
.item-tile .item-bonus-farming,
.item-tile .item-bonus-electronics,
.item-tile .item-bonus-medicine {
  gap: 2px;
  margin: 0;
  padding: 1px 3px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.62);
  box-shadow: none;
  font-size: 0.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.item-tile .item-bonus-capacity { color: #e58a32; }
.item-tile .item-bonus-attack { color: #e0726a; }
.item-tile .item-bonus-defense { color: #7fadda; }
.item-tile .item-bonus-speed,
.item-tile .item-bonus-dexterity { color: #78b6a8; }
.item-tile .item-bonus-strength { color: #b48ad6; }
.item-tile .item-bonus-craft { color: #c8a873; }
.item-tile .item-bonus-farming { color: #83a95f; }
.item-tile .item-bonus-electronics { color: #3fb3d6; }
.item-tile .item-bonus-medicine { color: #c06f78; }


/* =====================================================================
   Etappe 3 – Ausrüstung (Item.renderEquipmentUI, Item.openSlotPicker)
   Leere Slots ohne Icon, Boni-Chips auf den Slot-Kanten (2/3 außen),
   Fußleiste "Grundwert (+Bonus)", Slot-Auswahl als Liste.
   ===================================================================== */

/* Leere Slots: gestrichelt, kein "+" */
#equipment-ui .equip-slot:not(:has(.item-tile))::after { content: none; }
#equipment-ui .equip-slot:not(:has(.item-tile)) {
  border-style: dashed;
  border-color: rgba(225, 216, 194, 0.26);
  background: rgba(10, 13, 13, 0.2);
  box-shadow: none;
}
#equipment-ui .equip-slot:not(:has(.item-tile))::before { opacity: 0.3; }
#equipment-ui .equip-slot:not(:has(.item-tile)):hover { border-color: rgba(229, 218, 191, 0.55); }

/* Kachel im Slot: Name als schlichte Zeile unter dem Slot, kein Gewicht */
#equipment-ui .equip-slot .item-tile { background: none; }
#equipment-ui .equip-slot .item-tile .item-img,
#equipment-ui .equip-slot .item-tile .item-icon-fallback {
  width: 80%;
  height: 80%;
  transform: none;
}
#equipment-ui .equip-slot .item-tile .item-weight,
#equipment-ui .equip-slot .item-tile .item-amount { display: none; }
#equipment-ui .equip-slot .item-tile .item-name {
  left: 50%;
  right: auto;
  top: calc(100% + 3px);
  bottom: auto;
  width: auto;
  max-width: calc(100% + 28px);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transform: translateX(-50%);
  overflow: hidden;
  color: rgba(241, 235, 220, 0.78);
  font-size: 0.5rem;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px #000;
}

/* Boni-Chips auf der Slot-Kante, vertikal mittig, max. 3 je Seite */
#equipment-ui .equip-chips {
  position: absolute;
  z-index: 7;
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}
#equipment-ui .equip-chips--left { left: 0; align-items: flex-end; transform: translate(-66%, -50%); }
#equipment-ui .equip-chips--right { right: 0; align-items: flex-start; transform: translate(66%, -50%); }
#equipment-ui .equip-chips .item-bonus {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 2px 3px;
  border: 1px solid rgba(225, 216, 194, 0.3);
  border-radius: 4px;
  background: rgba(10, 13, 13, 0.9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  color: #f1ebdc;
  font-size: 0.5rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
#equipment-ui .equip-chips .item-bonus i { font-size: 0.47rem; }
#equipment-ui .equip-chips .item-bonus-capacity { color: #e58a32; }
#equipment-ui .equip-chips .item-bonus-attack { color: #e0726a; }
#equipment-ui .equip-chips .item-bonus-defense { color: #7fadda; }
#equipment-ui .equip-chips .item-bonus-speed,
#equipment-ui .equip-chips .item-bonus-dexterity { color: #78b6a8; }
#equipment-ui .equip-chips .item-bonus-strength { color: #b48ad6; }
#equipment-ui .equip-chips .item-bonus-craft { color: #c8a873; }
#equipment-ui .equip-chips .item-bonus-farming { color: #83a95f; }
#equipment-ui .equip-chips .item-bonus-electronics { color: #3fb3d6; }
#equipment-ui .equip-chips .item-bonus-medicine { color: #c06f78; }

/* Fußleiste: hängt unter der Figur, die Figur gibt unten Platz frei */
#equipment-ui:has(.equipment-totals) {
  margin-bottom: 46px;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
#equipment-ui .equipment-bonus-summary { display: none; }
#equipment-ui .equipment-totals {
  position: absolute;
  z-index: 4;
  top: 100%;
  left: -1px;
  right: -1px;
  height: 46px;
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(229, 218, 191, 0.2);
  border-radius: 0 0 16px 16px;
  background: #151a18;
  color: #f1ebdc;
}
#equipment-ui .equipment-total {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
#equipment-ui .equipment-total + .equipment-total { border-left: 1px solid rgba(229, 218, 191, 0.08); }
#equipment-ui .equipment-total i { font-size: 0.75rem; }
#equipment-ui .equipment-total b {
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
#equipment-ui .equipment-total em {
  margin-left: 3px;
  color: #9fbf72;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
}
#equipment-ui .equipment-total em.is-negative { color: #e57a71; }
#equipment-ui .equipment-total--capacity i { color: #e58a32; }
#equipment-ui .equipment-total--attack i { color: #e0726a; }
#equipment-ui .equipment-total--defense i { color: #7fadda; }
#equipment-ui .equipment-total--speed i,
#equipment-ui .equipment-total--dexterity i { color: #78b6a8; }
#equipment-ui .equipment-total--strength i { color: #b48ad6; }
#equipment-ui .equipment-total--craft i { color: #c8a873; }
#equipment-ui .equipment-total--farming i { color: #83a95f; }
#equipment-ui .equipment-total--electronics i { color: #3fb3d6; }
#equipment-ui .equipment-total--medicine i { color: #c06f78; }

/* Slot-Auswahl */
.slot-pick { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; }
.slot-pick-box {
  position: relative;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(226, 211, 177, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}
.slot-pick-box .sheet-item-img,
.slot-pick-box img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}
.slot-pick-box.is-defective img { opacity: 0.45; filter: grayscale(1); }
.slot-pick-dur {
  position: absolute;
  top: 3px;
  left: 4px;
  right: 4px;
  height: 2px;
  border-radius: 2px;
  background: rgba(245, 241, 230, 0.14);
}
.slot-pick-dur i { display: block; height: 2px; border-radius: 2px; background: #8fa863; }
.slot-pick-dur.dur-mid i { background: #e8b86a; }
.slot-pick-dur.dur-low i { background: #d45a52; }
.slot-pick-dpc {
  position: absolute;
  top: 7px;
  right: 4px;
  color: rgba(245, 241, 230, 0.75);
  font-size: 0.47rem;
  font-weight: 800;
  line-height: 1;
}
.slot-pick-box.is-defective .slot-pick-dpc { color: #e57a71; }

.slot-pick-current,
.slot-pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(226, 211, 177, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}
.slot-pick-current {
  margin-bottom: 4px;
  padding: 10px;
  border: 1.5px solid #8fa863;
  background: rgba(95, 115, 64, 0.16);
}
.slot-pick-current .slot-pick-box { border-color: rgba(143, 168, 99, 0.6); }
.slot-pick-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.slot-pick-text b {
  overflow: hidden;
  font-family: var(--font-display, "Special Elite", cursive);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slot-pick-text small { color: rgba(245, 241, 230, 0.55); font-size: 0.64rem; font-weight: 700; }
.slot-pick-text small .is-broken { color: #e57a71; }
.slot-pick-kicker { color: #8fa863; font-size: 0.56rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.slot-pick-stats { display: flex; flex-wrap: wrap; gap: 4px; }
.slot-pick-stat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 16px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(10, 13, 13, 0.82);
  color: rgba(245, 241, 230, 0.8);
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1;
}
.slot-pick-stat i { font-size: 0.48rem; }
.slot-pick-stat em { margin-left: 2px; font-size: 0.5rem; font-style: normal; font-weight: 900; }
.slot-pick-stat em.is-up { color: #9fbf72; }
.slot-pick-stat em.is-down { color: #e57a71; }
.slot-pick-stat em.is-same,
.slot-pick-stat.is-plain,
.slot-pick-stat.is-zero { color: rgba(245, 241, 230, 0.45); }
.slot-pick-stat--capacity { color: #e58a32; }
.slot-pick-stat--attack { color: #e0726a; }
.slot-pick-stat--defense { color: #7fadda; }
.slot-pick-stat--speed,
.slot-pick-stat--dexterity { color: #78b6a8; }
.slot-pick-stat--strength { color: #b48ad6; }
.slot-pick-stat--craft { color: #c8a873; }
.slot-pick-stat--farming { color: #83a95f; }
.slot-pick-stat--electronics { color: #3fb3d6; }
.slot-pick-stat--medicine { color: #c06f78; }

.slot-pick-btn {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(143, 168, 99, 0.55);
  border-radius: 9px;
  background: none;
  color: #cfe0ad;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.slot-pick-btn:hover { background: rgba(143, 168, 99, 0.14); }
.slot-pick-btn.is-quiet { border-color: rgba(226, 211, 177, 0.22); color: rgba(245, 241, 230, 0.8); }

.slot-pick-sorts {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.slot-pick-sorts > span {
  margin-right: 2px;
  color: rgba(245, 241, 230, 0.5);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.slot-pick-sort {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(226, 211, 177, 0.16);
  border-radius: 999px;
  background: none;
  color: #f5f1e6;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}
.slot-pick-sort.is-active { border-color: #f5f1e6; background: #f5f1e6; color: #1b211f; }
.slot-pick-list { display: flex; flex-direction: column; gap: 6px; }
.slot-pick-section {
  margin-top: 6px;
  color: rgba(245, 241, 230, 0.45);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.slot-pick-row--broken { padding: 6px 10px; opacity: 0.55; }
.slot-pick-row--broken .slot-pick-box { flex-basis: 42px; width: 42px; height: 42px; }
.slot-pick-row--broken .slot-pick-text b { font-size: 0.82rem; }

/* =====================================================================
   Etappe 4a – Spieler-Screen
   Beige Akte nur für Kopf (Figur, Name, Level, XP), Rest dunkel.
   Vitalwerte stehen in der Statusleiste, hier ausgeblendet.
   ===================================================================== */
#app-screen-player {
  padding-inline: clamp(12px, 2vw, 16px);
  box-sizing: border-box;
}
#app-screen-player .user-data-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  margin-block: 0 14px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #ece6d8;
  overflow: visible;
}
#app-screen-player .user-data-card::before { content: none; }

#app-screen-player .user-data-header {
  position: relative;
  min-height: 0;
  padding: 10px 12px 10px 10px;
  gap: 12px;
  align-items: stretch;
  border-radius: 12px;
  background: linear-gradient(135deg, #e9dfc6, #d9cbab);
  color: #28231b;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}
#app-screen-player .user-avatar {
  flex: 0 0 70px;
  width: 70px;
  height: 92px;
  border: 1px solid rgba(66, 51, 31, 0.35);
  border-radius: 2px;
  background: linear-gradient(180deg, #8d8774, #5b5747);
  box-shadow: none;
  align-items: flex-end;
}
#app-screen-player .user-avatar::after { content: none; }
#app-screen-player .user-avatar img {
  width: auto;
  height: 104px;
  margin-bottom: -14px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45));
}
#app-screen-player .user-profile-kicker {
  margin: 0;
  color: rgba(54, 44, 31, 0.6);
  font-size: 0.53rem;
  letter-spacing: 0.16em;
}
#app-screen-player .user-name-row {
  margin-top: 4px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}
#app-screen-player .user-info h1 {
  color: #28231b;
  font-size: 1.75rem;
  font-weight: 400;
}
#app-screen-player .user-level-badge {
  padding: 2px 7px;
  border-radius: 4px;
  background: #28231b;
  color: #f0c27a;
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
#app-screen-player .user-xp { margin-top: auto; padding-top: 10px; }
#app-screen-player .user-xp-text {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.63rem;
  font-weight: 800;
}
#app-screen-player .user-xp-rest { color: #8a4a12; white-space: nowrap; }
#app-screen-player .user-xp-track {
  margin-top: 4px;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(66, 51, 31, 0.18);
}
#app-screen-player .user-xp-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #c98a2e, #e8b86a);
  box-shadow: 0 0 8px rgba(232, 184, 106, 0.8);
  transition: width 0.4s ease;
}

#app-screen-player .user-stats { display: none; }

/* Fähigkeiten: 4 Spalten, Bonus durch Ausrüstung grün */
#app-screen-player .user-skills {
  padding: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  border: 0;
}
#app-screen-player .user-skills::before {
  content: "Fähigkeiten";
  margin-bottom: 1px;
  color: rgba(236, 230, 216, 0.55);
  font-size: 0.63rem;
  letter-spacing: 0.16em;
}
@media (min-width: 900px) {
  #app-screen-player .user-skills { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
#app-screen-player .user-skill {
  min-height: 0;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-content: stretch;
  align-items: start;
  justify-items: start;
  gap: 3px;
  border: 1px solid rgba(236, 230, 216, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  text-align: left;
}
#app-screen-player .user-skill-label {
  color: rgba(236, 230, 216, 0.6);
  font-size: 0.53rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#app-screen-player .user-skill > div:last-child {
  justify-content: flex-start;
  align-items: baseline;
  gap: 5px;
}
#app-screen-player .user-skill i { font-size: 0.7rem; }
#app-screen-player .user-skill .user-skill-value {
  color: #ece6d8;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1;
}
#app-screen-player .user-skill-bonus {
  color: #9fbf72;
  font-size: 0.6rem;
  font-weight: 800;
}
#app-screen-player .user-skill-bonus.is-negative { color: #e57a71; }
#app-screen-player .user-skill--attack { --user-skill-color: #e0726a; }
#app-screen-player .user-skill--defense { --user-skill-color: #7fadda; }
#app-screen-player .user-skill--dexterity { --user-skill-color: #78b6a8; }
#app-screen-player .user-skill--strength { --user-skill-color: #b48ad6; }
#app-screen-player .user-skill--craft { --user-skill-color: #c8a873; }
#app-screen-player .user-skill--farming { --user-skill-color: #83a95f; }
#app-screen-player .user-skill--electronics { --user-skill-color: #3fb3d6; }
#app-screen-player .user-skill--medicine { --user-skill-color: #c06f78; }

/* Aktionen: dunkel, ohne Karte */
#app-screen-player #user-tasks {
  margin-block: 0 12px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #ece6d8;
}
#app-screen-player #user-tasks::before { content: none; }
#app-screen-player .task-actions-header { margin-bottom: 7px; }
#app-screen-player .task-actions-header .task-actions-kicker,
#app-screen-player .task-actions-header-icon { display: none; }
#app-screen-player #user-tasks .task-actions-header h2 {
  margin: 0;
  color: #e8b86a;
  font-family: inherit;
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Aktions-Kacheln (Spieler und Basis): Farbe nach Belohnung */
.task-action-card[data-task-accent] { --task-accent: #e8b86a; --task-tint: rgba(232, 184, 106, 0.2); }
.task-action-card[data-task-accent="attack"] { --task-accent: #e0726a; --task-tint: rgba(212, 90, 82, 0.28); }
.task-action-card[data-task-accent="defense"] { --task-accent: #7fadda; --task-tint: rgba(111, 159, 207, 0.26); }
.task-action-card[data-task-accent="dexterity"],
.task-action-card[data-task-accent="speed"] { --task-accent: #78b6a8; --task-tint: rgba(120, 182, 168, 0.24); }
.task-action-card[data-task-accent="strength"] { --task-accent: #b48ad6; --task-tint: rgba(154, 98, 199, 0.26); }
.task-action-card[data-task-accent="craft"] { --task-accent: #c8a873; --task-tint: rgba(200, 168, 115, 0.24); }
.task-action-card[data-task-accent="farming"] { --task-accent: #83a95f; --task-tint: rgba(131, 169, 95, 0.26); }
.task-action-card[data-task-accent="electronics"] { --task-accent: #3fb3d6; --task-tint: rgba(39, 159, 194, 0.26); }
.task-action-card[data-task-accent="medicine"] { --task-accent: #c06f78; --task-tint: rgba(192, 111, 120, 0.26); }
.task-action-card[data-task-accent="health"] { --task-accent: #d9534a; --task-tint: rgba(192, 68, 59, 0.26); }
.task-action-card[data-task-accent="focus"] { --task-accent: #4dbab3; --task-tint: rgba(58, 166, 160, 0.26); }
.task-action-card[data-task-accent="energy"] { --task-accent: #e3a33a; --task-tint: rgba(212, 144, 42, 0.26); }
.task-action-card[data-task-accent="hydration"] { --task-accent: #5aa6e0; --task-tint: rgba(61, 143, 209, 0.26); }

/* Kompakte Zeile (Karte) bleibt Zeile; Reward/Meta schlank */
.task-action-card--compact .task-action-reward,
.task-action-card--compact .task-action-cost,
.task-action-card--compact .task-action-lockhint { display: none; }
.task-action-card--compact .task-action-meta { display: contents; }
.task-action-card--compact .task-action-duration i { display: none; }

/* Kachel-Darstellung für Spieler und Basis */
#user-tasks .task-action-grid[data-task-action-grid=player],
.relation-task-panel--base .task-action-grid[data-task-action-grid=base] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 721px) {
  #user-tasks .task-action-grid[data-task-action-grid=player],
  .relation-task-panel--base .task-action-grid[data-task-action-grid=base] {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
}
#user-tasks [data-task-action-grid] .task-action-card.task-action-card--compact,
.relation-task-panel--base [data-task-action-grid] .task-action-card.task-action-card--compact {
  position: relative;
  min-height: 84px;
  padding: 10px;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  border: 1px solid rgba(236, 230, 216, 0.14);
  border-radius: 14px;
  background: linear-gradient(160deg, var(--task-tint, rgba(236, 230, 216, 0.08)), rgba(30, 35, 40, 0.96) 65%);
  box-shadow: none;
  color: #ece6d8;
  filter: none;
  opacity: 1;
  transform: none;
}
#user-tasks [data-task-action-grid] .task-action-card--compact:hover:not(:disabled),
.relation-task-panel--base [data-task-action-grid] .task-action-card--compact:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--task-accent, #e8b86a) 55%, transparent);
  background: linear-gradient(160deg, var(--task-tint, rgba(236, 230, 216, 0.1)), rgba(36, 42, 48, 0.98) 65%);
  transform: none;
}
#user-tasks .task-action-card--compact .task-action-glyph,
.relation-task-panel--base .task-action-card--compact .task-action-glyph {
  color: var(--task-accent, #e8b86a);
  font-size: 1.35rem;
}
#user-tasks .task-action-card--compact .task-action-name,
.relation-task-panel--base .task-action-card--compact .task-action-name {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 8px 0 0;
  color: #ece6d8;
  font-family: var(--font-display, "Special Elite", cursive);
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.05;
  overflow-wrap: anywhere;
  hyphens: auto;
}
#user-tasks .task-action-card--compact .task-action-meta,
.relation-task-panel--base .task-action-card--compact .task-action-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  color: rgba(236, 230, 216, 0.7);
  font-size: 0.63rem;
  font-weight: 800;
}
#user-tasks .task-action-card--compact .task-action-duration,
.relation-task-panel--base .task-action-card--compact .task-action-duration {
  color: inherit;
  font-size: inherit;
}
#user-tasks .task-action-card--compact .task-action-duration i,
.relation-task-panel--base .task-action-card--compact .task-action-duration i { display: inline; font-size: 0.6rem; }
#user-tasks .task-action-card--compact .task-action-cost,
.relation-task-panel--base .task-action-card--compact .task-action-cost {
  display: inline;
  color: rgba(236, 230, 216, 0.5);
}
#user-tasks .task-action-card--compact .task-action-reward,
.relation-task-panel--base .task-action-card--compact .task-action-reward {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--task-accent, #e8b86a);
  font-size: 0.63rem;
  font-weight: 900;
}
#user-tasks .task-action-card--compact .task-action-chevron,
.relation-task-panel--base .task-action-card--compact .task-action-chevron { display: none; }

/* Gesperrt: gestrichelt, kleiner, mit Grund */
#user-tasks [data-task-action-grid] .task-action-card--compact.is-locked,
.relation-task-panel--base [data-task-action-grid] .task-action-card--compact.is-locked {
  min-height: 62px;
  border-style: dashed;
  background: none;
  color: rgba(236, 230, 216, 0.55);
}
#user-tasks .task-action-card--compact.is-locked .task-action-glyph,
.relation-task-panel--base .task-action-card--compact.is-locked .task-action-glyph { display: none; }
#user-tasks .task-action-card--compact.is-locked .task-action-name,
.relation-task-panel--base .task-action-card--compact.is-locked .task-action-name {
  padding-top: 0;
  color: rgba(236, 230, 216, 0.75);
  font-size: 0.8rem;
}
#user-tasks .task-action-card--compact.is-locked .task-action-reward,
.relation-task-panel--base .task-action-card--compact.is-locked .task-action-reward {
  background: none;
  color: rgba(236, 230, 216, 0.5);
}
#user-tasks .task-action-card--compact.is-locked .task-action-duration,
.relation-task-panel--base .task-action-card--compact.is-locked .task-action-duration { display: none; }
#user-tasks .task-action-card--compact .task-action-lockhint,
.relation-task-panel--base .task-action-card--compact .task-action-lockhint {
  display: inline;
  color: rgba(236, 230, 216, 0.45);
  font-weight: 700;
}

/* Laufende Aktion */
#app-screen-player #active-task-container {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(232, 184, 106, 0.35);
  border-radius: 12px;
  background: rgba(232, 184, 106, 0.08);
  color: #ece6d8;
}

/* Aufträge: eingeklappte Zeile */
#app-screen-player .trigger-info-banner {
  margin: 0 0 12px;
  padding: 0;
  border: 1px solid rgba(232, 184, 106, 0.35);
  border-radius: 12px;
  background: rgba(232, 184, 106, 0.06);
  box-shadow: none;
  color: #ece6d8;
  overflow: hidden;
}
#app-screen-player .trigger-info-header {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  color: #ece6d8;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  cursor: pointer;
}
#app-screen-player .trigger-info-icon { color: #e8b86a; }
#app-screen-player .trigger-info-title { flex: 1; }
#app-screen-player .trigger-info-count {
  min-width: 0;
  height: auto;
  padding: 0;
  background: none;
  box-shadow: none;
  color: #e8b86a;
  font-size: 0.75rem;
  font-weight: 900;
}
#app-screen-player .trigger-info-chevron {
  color: rgba(236, 230, 216, 0.5);
  transition: transform 0.18s ease;
}
#app-screen-player .trigger-info-banner.is-open .trigger-info-chevron { transform: rotate(180deg); }
#app-screen-player .trigger-info-banner:not(.is-open) .trigger-info-list { display: none; }
#app-screen-player .trigger-info-list {
  padding: 4px 10px 10px;
  border-top: 1px solid rgba(232, 184, 106, 0.18);
}
#app-screen-player .trigger-info-line {
  color: rgba(236, 230, 216, 0.82);
  border-top-color: rgba(236, 230, 216, 0.1);
}
#app-screen-player .trigger-info-list { gap: 6px; padding-top: 8px; }
#app-screen-player .trigger-info-list .trigger-info-line,
#app-screen-player .trigger-info-list .trigger-info-line.is-npc-task {
  margin: 0;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label actions" "value actions";
  align-items: center;
  gap: 4px 10px;
  border: 1px solid rgba(236, 230, 216, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  color: rgba(236, 230, 216, 0.82);
}
#app-screen-player .trigger-info-line-label {
  grid-area: label;
  color: #ece6d8;
  font-family: var(--font-display, "Special Elite", cursive);
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.1;
}
#app-screen-player .trigger-info-line-value {
  grid-area: value;
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(236, 230, 216, 0.55);
  font-size: 0.63rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}
#app-screen-player .trigger-info-line-actions {
  grid-area: actions;
  margin: 0;
  display: flex;
  justify-content: flex-end;
}
#app-screen-player .trigger-info-line-actions button {
  height: 34px;
  min-height: 0;
  margin: 0;
  padding: 0 11px;
  border: 1px solid rgba(143, 168, 99, 0.55);
  border-radius: 9px;
  background: none;
  box-shadow: none;
  color: #cfe0ad;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  text-shadow: none;
  white-space: nowrap;
  transform: none;
}
#app-screen-player .trigger-info-line-actions button:hover { background: rgba(143, 168, 99, 0.14); }
#app-screen-player .trigger-info-line-actions .trigger-info-line-skip {
  border-color: rgba(226, 211, 177, 0.22);
  color: rgba(245, 241, 230, 0.8);
}

/* =====================================================================
   Etappe 4b – Karten-Overlays: schlank, Glasflächen, keine Debug-Knöpfe
   ===================================================================== */
#map-overlay {
  --glass-bg: rgba(12, 15, 18, 0.42);
  --glass-line: rgba(236, 230, 216, 0.12);
}
/* Diagnose-Knopf "Performance" nicht im Spiel zeigen */
#map-overlay .map-performance-control { display: none !important; }

/* Quest-Tracker: Glas, schmal, eine Zeile pro Quest */
#map-overlay .map-top-left-hud { top: 8px; }
#map-overlay .map-top-left-hud > .map-quest-tracker,
#map-overlay .map-quest-tracker {
  width: auto;
  max-width: min(290px, 100%);
  border: 0.5px solid var(--glass-line);
  border-radius: 12px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  backdrop-filter: blur(8px) saturate(1.1);
  box-shadow: none;
  text-shadow: none;
}
#map-overlay .map-quest-head {
  min-height: 32px;
  padding: 2px 4px 2px 10px;
  gap: 6px;
  color: rgba(236, 230, 216, 0.75);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
}
#map-overlay .map-quest-head > i { color: #e8b86a; font-size: 0.78rem; }
#map-overlay .map-quest-count {
  min-width: 0;
  height: auto;
  padding: 0;
  background: none;
  color: #e8b86a;
  font-size: 0.68rem;
  font-weight: 900;
}
#map-overlay .map-quest-toggle {
  width: 28px;
  height: 28px;
  border: 0;
  background: none;
  color: rgba(236, 230, 216, 0.6);
}
#map-overlay .map-quest-list { padding: 0 6px 6px; gap: 2px; max-height: 34vh; }
#map-overlay .map-quest-row,
#map-overlay .map-quest-item {
  border: 0;
  border-radius: 8px;
  background: none;
}
#map-overlay .map-quest-row {
  padding: 4px 6px;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  gap: 6px;
  color: #ece6d8;
  font-size: 0.7rem;
}
#map-overlay .map-quest-row:hover,
#map-overlay .map-quest-row:focus-visible { background: rgba(236, 230, 216, 0.06); }
#map-overlay .map-quest-row i { color: rgba(236, 230, 216, 0.55); font-size: 0.7rem; }
#map-overlay .map-quest-row .map-quest-label {
  font-family: var(--font-display, "Special Elite", cursive);
  font-weight: 400;
}
#map-overlay .map-quest-row .map-quest-value { color: #e8b86a; font-size: 0.62rem; }
#map-overlay .map-quest-row.is-ready i,
#map-overlay .map-quest-row.is-ready .map-quest-value { color: #b9cf8f; }
#map-overlay .map-quest-item { padding-bottom: 4px; gap: 2px; }
#map-overlay .map-quest-item > .map-quest-row { grid-template-columns: 1rem minmax(0, 1fr); }
#map-overlay .map-quest-item .map-quest-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#map-overlay .map-quest-go {
  min-height: 28px;
  margin-right: 4px;
  padding: 3px 8px;
  font-size: 0.66rem;
}

/* Kamera und GPS: Glasleiste, nur Icons */
#map-overlay .movement-map-controls {
  top: 8px;
  right: max(8px, env(safe-area-inset-right));
  padding: 2px;
  gap: 0;
  border: 0.5px solid var(--glass-line);
  border-radius: 12px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  backdrop-filter: blur(8px) saturate(1.1);
}
#map-overlay .movement-map-controls button,
#map-overlay .movement-camera,
#map-overlay .movement-gps {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  box-shadow: none;
  color: rgba(236, 230, 216, 0.88);
  text-shadow: none;
}
#map-overlay .movement-map-controls button:hover:not(:disabled) { background: rgba(236, 230, 216, 0.08); }
#map-overlay .movement-map-controls button[aria-pressed="true"] { color: #e57a71; }
#map-overlay .movement-map-controls span { display: none; }
#map-overlay .movement-map-controls svg { width: 18px; height: 18px; filter: none; }
#map-overlay .map-top-left-hud { right: 60px; }
#map-overlay .map-quest-tracker { right: auto; }

/* Rechte untere Knöpfe: Aktionen und Orte als Glas */
#map-overlay > #map-task-toggle,
#map-overlay .map-poi-toggle {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 0.5px solid var(--glass-line);
  border-radius: 12px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  backdrop-filter: blur(8px) saturate(1.1);
  box-shadow: none;
  color: #ece6d8;
  text-shadow: none;
}
#map-overlay > #map-task-toggle.is-open,
#map-overlay .map-poi-toggle.is-open {
  border-color: rgba(229, 122, 113, 0.6);
  background: rgba(155, 31, 31, 0.35);
}

/* Zoom-Regler dezenter */
#map-overlay .zoom-slider-container { opacity: 0.75; }
#map-overlay .zoom-slider-container:hover,
#map-overlay .zoom-slider-container:focus-within { opacity: 1; }

/* Bewegungsstatus unten links: klein und ruhig */
#movement-status-badge {
  color: rgba(236, 230, 216, 0.7);
  font-size: 10px;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.9);
}

/* Aktionsmenü der Karte: Namen 15 % kleiner, Panel als Glas */
#map-overlay .relation-task-panel--map {
  border: 0.5px solid var(--glass-line);
  border-radius: 14px;
  background: rgba(12, 15, 18, 0.72);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.relation-task-panel--map .task-action-card--compact .task-action-name { font-size: 0.72rem; }
.relation-task-panel--map .task-action-card--compact .task-action-duration { font-size: 0.62rem; }
#map-overlay .relation-task-panel--map { top: auto; height: auto; color: #ece6d8; }
#map-overlay .relation-task-panel--map .task-relation-form,
#map-overlay .relation-task-panel--map .task-actions-header { color: #ece6d8; }
#map-overlay .relation-task-panel--map .task-actions-kicker { color: rgba(236, 230, 216, 0.55); }
#map-overlay .relation-task-panel--map h2 { color: #ece6d8; }
#map-overlay .relation-task-panel--map .task-actions-header-icon {
  width: 32px;
  height: 32px;
  border-color: rgba(229, 122, 113, 0.35);
  border-radius: 10px;
  background: rgba(155, 31, 31, 0.2);
  color: #e57a71;
  font-size: 0.9rem;
}
#map-overlay .relation-task-panel--map .task-actions-state { color: rgba(236, 230, 216, 0.65); }
#map-overlay .relation-task-panel--map .task-action-card {
  border-color: rgba(236, 230, 216, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #ece6d8;
  box-shadow: none;
}
#map-overlay .relation-task-panel--map .task-action-card:hover:not(:disabled) {
  border-color: rgba(236, 230, 216, 0.3);
  background: rgba(255, 255, 255, 0.09);
  transform: none;
}
#map-overlay .relation-task-panel--map .task-action-card .task-action-glyph { color: var(--task-accent, #e8b86a); }
#map-overlay .relation-task-panel--map .task-action-card.is-locked { filter: none; opacity: 0.55; }

/* =====================================================================
   Etappe 4c – Basis: Ausbau als grüner Bauplan auf Beton, Tätigkeiten
   ===================================================================== */
#base-infrastructure-overlay .base-infrastructure-panel {
  border-color: rgba(223, 227, 216, 0.16);
  background-color: #1f2321;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.86 0 0 0 0 0.88 0 0 0 0 0.83 0 0 0 0.09 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='640' height='640'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='0.007' numOctaves='3' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.92 0 0 0 0 0.86 0 0 0 0.16 -0.05'/></filter><rect width='640' height='640' filter='url(%23m)'/></svg>"),
    linear-gradient(rgba(223, 227, 216, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(223, 227, 216, 0.035) 1px, transparent 1px);
  background-size: 220px 220px, 640px 640px, 16px 16px, 16px 16px;
  color: #dfe3d8;
}
#base-infrastructure-overlay .base-infrastructure-header {
  padding: 14px 18px 8px;
  border-bottom: 0;
  background: none;
}
#base-infrastructure-overlay .base-infrastructure-header h2 {
  color: #eef0e8;
  font-family: var(--font-display, "Special Elite", cursive);
  font-weight: 400;
  font-size: 1.85rem;
}
#base-infrastructure-overlay .base-infrastructure-kicker { color: rgba(223, 227, 216, 0.6); font-size: 0.62rem; }
#base-infrastructure-overlay .base-infrastructure-close {
  border-color: rgba(223, 227, 216, 0.25);
  background: rgba(31, 35, 33, 0.8);
  color: #dfe3d8;
}
#base-infrastructure-overlay .base-infrastructure-body { padding: 4px 18px 18px; }

/* Status mit Stufenbalken */
.base-plan-status { margin-bottom: 14px; }
.base-plan-status-text {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #b9cf8f;
}
.base-plan-status-next { color: rgba(223, 227, 216, 0.6); }
.base-plan-status-bar { margin-top: 6px; display: flex; gap: 3px; }
.base-plan-status-bar > span {
  flex-basis: 0;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(223, 227, 216, 0.15);
}
.base-plan-status-bar > span > i { display: block; height: 100%; background: #8fa863; }
.base-plan-status-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: rgba(223, 227, 216, 0.55);
  font-size: 0.64rem;
  font-weight: 700;
}
.base-plan-status-meta .is-busy { color: #e8b86a; }

/* Bauplan: Räume mit dünnen Linien */
.base-plan-foundation { margin-bottom: 6px; display: flex; gap: 6px; }
.base-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid rgba(223, 227, 216, 0.42);
}
@media (min-width: 900px) {
  .base-plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.base-plan-room {
  position: relative;
  min-height: 102px;
  box-sizing: border-box;
  padding: 22px 6px 8px;
  box-shadow: inset 0 0 0 0.5px rgba(223, 227, 216, 0.3);
  background: rgba(223, 227, 216, 0.018);
}
.base-plan-room--storage { grid-column: 1 / -1; }
.base-plan-room--energy {
  box-shadow: inset 0 0 0 1px rgba(232, 184, 106, 0.55);
  background: linear-gradient(160deg, rgba(232, 184, 106, 0.1), rgba(232, 184, 106, 0.02));
}
.base-plan-room-label {
  position: absolute;
  top: 6px;
  left: 8px;
  right: 8px;
  overflow: hidden;
  color: rgba(223, 227, 216, 0.55);
  font-size: 0.53rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.base-plan-room-label em { font-style: normal; color: rgba(223, 227, 216, 0.9); }
.base-plan-room--energy .base-plan-room-label,
.base-plan-room--energy .base-plan-room-label em { color: #f0c27a; }
.base-plan-cells {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
}
.base-plan-room--storage .base-plan-cells { justify-content: flex-start; }
.base-plan-divider {
  align-self: center;
  width: 1px;
  height: 54px;
  background: rgba(223, 227, 216, 0.22);
}
.base-plan-cell {
  width: 66px;
  padding: 2px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  color: rgba(223, 227, 216, 0.85);
  font: inherit;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
  hyphens: auto;
  cursor: pointer;
}
.base-plan-cell-icon {
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #e6e9e0;
  font-size: 1.35rem;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.base-plan-cell.is-free { color: #a9c27c; }
.base-plan-cell.is-free .base-plan-cell-icon { border: 1px dashed rgba(143, 168, 99, 0.75); color: #a9c27c; font-size: 1.05rem; }
.base-plan-cell.is-lock,
.base-plan-cell.is-empty { color: rgba(223, 227, 216, 0.38); }
.base-plan-cell.is-lock .base-plan-cell-icon,
.base-plan-cell.is-empty .base-plan-cell-icon { border: 1px dashed rgba(223, 227, 216, 0.22); color: rgba(223, 227, 216, 0.32); font-size: 0.85rem; }
.base-plan-cell.is-empty { cursor: default; }
.base-plan-cell.is-building { color: #f0c27a; }
.base-plan-cell.is-building .base-plan-cell-icon { border: 1px dashed rgba(232, 184, 106, 0.8); color: #f0c27a; animation: base-plan-pulse 1.6s ease-in-out infinite; }
.base-plan-cell.is-disabled { color: #e8b86a; }
.base-plan-cell.is-disabled .base-plan-cell-icon { color: #e8b86a; opacity: 0.6; }
.base-plan-cell:hover .base-plan-cell-icon { background: rgba(223, 227, 216, 0.06); }
.base-plan-cell.is-selected .base-plan-cell-icon {
  border: 1.5px solid #8fa863;
  background: rgba(95, 115, 64, 0.28);
  box-shadow: 0 0 0 4px rgba(95, 115, 64, 0.22);
}
.base-plan-cell:focus-visible { outline: none; }
.base-plan-cell:focus-visible .base-plan-cell-icon { box-shadow: 0 0 0 2px #b9cf8f; }
@keyframes base-plan-pulse { 50% { opacity: 0.55; } }

.base-plan-cell.is-inline,
.base-plan-cell.is-annex {
  width: auto;
  min-height: 44px;
  padding: 0 10px 0 4px;
  flex-direction: row;
  gap: 8px;
  border: 1px solid rgba(223, 227, 216, 0.3);
  font-size: 0.62rem;
  text-align: left;
}
.base-plan-cell.is-inline .base-plan-cell-icon,
.base-plan-cell.is-annex .base-plan-cell-icon { width: 34px; height: 34px; border: 0; font-size: 1rem; }
.base-plan-cell.is-annex.is-free { border: 1px dashed rgba(143, 168, 99, 0.7); }
.base-plan-cell.is-annex.is-lock { border: 1px dashed rgba(223, 227, 216, 0.2); }
.base-plan-cell.is-annex.is-selected,
.base-plan-cell.is-inline.is-selected { border-color: #8fa863; background: rgba(95, 115, 64, 0.2); }
.base-plan-cell.is-annex.is-selected .base-plan-cell-icon,
.base-plan-cell.is-inline.is-selected .base-plan-cell-icon { box-shadow: none; border: 0; background: none; }
.base-plan-annexes { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.base-plan-legend {
  margin: 8px 0 0;
  display: flex;
  align-items: center;
  gap: 4px 12px;
  flex-wrap: wrap;
  color: rgba(223, 227, 216, 0.45);
  font-size: 0.58rem;
  font-weight: 700;
}
.base-plan-legend span { display: inline-block; width: 10px; height: 10px; margin-right: -6px; border-radius: 2px; }
.base-plan-legend .is-built { background: rgba(223, 227, 216, 0.5); }
.base-plan-legend .is-free { border: 1px dashed #8fa863; }
.base-plan-legend .is-lock { border: 1px dashed rgba(223, 227, 216, 0.35); }

/* Detail des gewählten Moduls: grün gefärbte Fußzone wie im Entwurf */
.base-plan-detail { margin-top: 14px; }
.base-plan-detail .base-module-card {
  border: 0;
  border-top: 1px solid rgba(143, 168, 99, 0.55);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(52, 67, 31, 0.55), rgba(25, 29, 27, 0.9) 70%);
  box-shadow: none;
  filter: none;
  opacity: 1;
}
.base-plan-detail .base-module-icon {
  border: 1px solid #8fa863;
  background: none;
  color: #b9cf8f;
}
.base-plan-detail .base-module-card h4 {
  color: #eef0e8;
  font-family: var(--font-display, "Special Elite", cursive);
  font-weight: 400;
  font-size: 1.1rem;
  white-space: normal;
}
.base-plan-detail .base-module-points { color: #b9cf8f; }
.base-plan-detail .base-module-requirements { display: flex; flex-wrap: wrap; gap: 6px; }
.base-plan-detail .base-module-requirements li {
  min-height: 30px;
  padding: 0 9px 0 4px;
  border: 1px dashed rgba(223, 227, 216, 0.4);
  border-radius: 999px;
  background: none;
  color: #dfe3d8;
  font-size: 0.68rem;
  font-weight: 800;
}
.base-plan-detail .base-module-requirements li.is-met { border-style: solid; border-color: rgba(143, 168, 99, 0.7); color: #b9cf8f; }
.base-plan-detail .base-module-requirements li.is-item { min-height: 30px; padding: 0 9px 0 3px; }
.base-plan-detail .base-module-requirements li small { display: none; }
.base-plan-detail .base-requirement-item-image { width: 24px; height: 24px; flex-basis: 24px; border: 0; background: none; }
.base-plan-detail .base-module-build {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #6c8146, #5f7340 62%, #34431f 160%);
  box-shadow: 0 4px 0 #34431f;
  color: #fbf7e6;
  font-family: var(--font-display, "Special Elite", cursive);
}
.base-plan-detail .base-module-build:disabled { opacity: 0.45; box-shadow: none; }
.base-plan-detail .base-module-card-footer { border-top-color: rgba(223, 227, 216, 0.12); }

.base-plan-capabilities {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(223, 227, 216, 0.12);
  color: rgba(223, 227, 216, 0.7);
  font-size: 0.68rem;
  font-weight: 800;
}
.base-plan-capabilities summary { cursor: pointer; letter-spacing: 0.1em; text-transform: uppercase; }
.base-plan-capabilities summary b { color: #b9cf8f; }

/* Mobile: Ausbau vollflächig, ohne Rundung */
@media (max-width: 600px) {
  #base-infrastructure-overlay { padding: 0; background: #1f2321; }
  #base-infrastructure-overlay .base-infrastructure-panel { border: 0; border-radius: 0; }
}

/* Tätigkeiten der Basis: grün und größer */
.relation-task-panel--base [data-task-action-grid] .task-action-card.task-action-card--compact:not(.is-locked) {
  min-height: 104px;
  padding: 12px 12px 10px;
  border-color: rgba(143, 168, 99, 0.55);
  background: linear-gradient(160deg, rgba(95, 115, 64, 0.42), rgba(40, 46, 42, 0.95) 70%);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}
.relation-task-panel--base .task-action-card--compact:not(.is-locked) .task-action-glyph { color: #c9dc9f; font-size: 1.85rem; }
.relation-task-panel--base .task-action-card--compact:not(.is-locked) .task-action-name { font-size: 0.97rem; }
.relation-task-panel--base .task-action-card--compact:not(.is-locked) .task-action-meta { color: #b9cf8f; font-size: 0.7rem; }
.relation-task-panel--base .task-action-card--compact:not(.is-locked) .task-action-reward { color: #c9dc9f; }

/* =====================================================================
   Etappe 4d – Tagebuch: echte Kapiteltitel und Anriss
   ===================================================================== */
.diary-chapter { justify-content: flex-end; padding-inline: 1rem; }
.diary-chapter-number {
  position: absolute;
  top: 2rem;
  right: 0.8rem;
  font-size: clamp(3.4rem, 16vw, 5.6rem);
  color: rgba(54, 43, 29, 0.13);
}
.diary-chapter-folio { right: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diary-chapter-title {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: #241f18;
  font-size: clamp(1.3rem, 5.6vw, 1.95rem);
  line-height: 1.04;
  text-align: left;
  text-wrap: balance;
}
.diary-chapter-excerpt {
  width: 100%;
  margin-top: 0.55rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: rgba(49, 41, 30, 0.7);
  font-size: 0.74rem;
  line-height: 1.4;
  text-align: left;
}
.diary-chapter-excerpt:empty { display: none; }
.diary-chapter-date { align-self: flex-start; margin-top: 0.55rem; }
.diary-jump-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =====================================================================
   Etappe 4e – Safe: Stahltür mit Zahlenrädern, Notizzettel mit Pins
   ===================================================================== */
.building-safe-overlay .building-safe-panel {
  border: 1px solid rgba(225, 232, 238, 0.18);
  background-color: #0f1317;
  background-image:
    linear-gradient(rgba(225, 232, 238, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 232, 238, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(225, 232, 238, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 232, 238, 0.08) 1px, transparent 1px);
  background-size: 16px 16px, 16px 16px, 64px 64px, 64px 64px;
  color: #e1e8ee;
}
.building-safe-panel .building-room-toolbar { background: none; border-bottom: 0; padding: 14px 16px 0; }
.building-safe-panel .building-room-toolbar h4 {
  margin: 0;
  color: #eef2f5;
  font-family: var(--font-display, "Special Elite", cursive);
  font-size: 1.75rem;
  font-weight: 400;
}
.building-safe-panel .building-room-toolbar p {
  order: -1;
  margin: 0 0 4px;
  color: rgba(225, 232, 238, 0.6);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.building-safe-panel .building-room-toolbar > div { display: flex; flex-direction: column; }
.building-safe-panel .building-loot-close {
  border: 1px solid rgba(225, 232, 238, 0.3);
  border-radius: 999px;
  background: rgba(15, 19, 23, 0.8);
  color: #e1e8ee;
}
.building-safe-body .building-safe-rules,
.building-safe-body .building-safe-duplicates,
.building-safe-body .building-safe-rules-notice {
  margin: 0 0 4px;
  color: rgba(225, 232, 238, 0.6);
  font-size: 0.7rem;
  line-height: 1.45;
}
.building-safe-body .building-safe-attempts {
  margin: 12px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #e1e8ee;
  font-size: 0.7rem;
  font-weight: 800;
}
.building-safe-notches { display: flex; gap: 3px; }
.building-safe-notches i {
  flex: 1;
  height: 14px;
  border-radius: 2px;
  background: rgba(225, 232, 238, 0.22);
}
.building-safe-notches i.is-used {
  border: 1px solid rgba(225, 232, 238, 0.12);
  background: repeating-linear-gradient(135deg, rgba(225, 232, 238, 0.08) 0 3px, transparent 3px 6px);
}
.building-safe-notches i.is-next { background: #e8b86a; }

/* Tür mit Nieten, Ziffern als Räder */
.building-safe-form {
  position: relative;
  padding: 22px 14px 14px;
  border: 1px solid rgba(225, 232, 238, 0.25);
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 30%, #9aa3ab, #3b4247 70%) 12px 12px / 9px 9px no-repeat,
    radial-gradient(circle at 35% 30%, #9aa3ab, #3b4247 70%) calc(100% - 12px) 12px / 9px 9px no-repeat,
    radial-gradient(circle at 35% 30%, #9aa3ab, #3b4247 70%) 12px calc(100% - 12px) / 9px 9px no-repeat,
    radial-gradient(circle at 35% 30%, #9aa3ab, #3b4247 70%) calc(100% - 12px) calc(100% - 12px) / 9px 9px no-repeat,
    linear-gradient(160deg, #454c53 0%, #2a3035 45%, #1b1f23 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -2px 0 rgba(0, 0, 0, 0.5), 0 18px 34px rgba(0, 0, 0, 0.55);
}
.building-safe-digits {
  max-width: 300px;
  padding: 10px;
  gap: 10px;
  border-radius: 14px;
  background: #0b0d0f;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.1);
}
.building-safe-slot > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.building-safe-slot input {
  height: 88px;
  min-width: 0;
  border: 1px solid rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  background: linear-gradient(180deg, #07090b 0%, #1a1e22 22%, #2a2f34 50%, #1a1e22 78%, #07090b 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 6px 10px rgba(0, 0, 0, 0.6), inset 0 -6px 10px rgba(0, 0, 0, 0.6);
  color: #eef2f5;
  font: 400 2.6rem var(--font-display, "Special Elite", cursive);
  text-shadow: 0 1px 0 #000;
  caret-color: #e8b86a;
}
.building-safe-slot input::placeholder { color: rgba(232, 184, 106, 0.45); }
.building-safe-slot input:focus-visible {
  outline: none;
  border-color: #e8b86a;
  box-shadow: 0 0 0 3px rgba(232, 184, 106, 0.25), inset 0 6px 10px rgba(0, 0, 0, 0.6), inset 0 -6px 10px rgba(0, 0, 0, 0.6);
}
.building-safe-slot input[aria-invalid="true"] { border-color: #e57a71; background: #2a1715; }
.building-safe-actions { grid-template-columns: 1fr 2fr; margin: 14px 0 0; }
.building-safe-actions .building-safe-clear { order: -1; }
.building-safe-submit {
  --accent: #9b1f1f;
  --accent-light: #b93a33;
  --accent-deep: #4d1816;
  --accent-ink: #f2e9d7;
}

/* Notizzettel */
.building-safe-body h5 {
  margin: 18px 0 0;
  padding: 10px 14px 4px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  border-radius: 4px 4px 0 0;
  background: #e9dfc6;
  color: rgba(40, 35, 27, 0.6);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.building-safe-legend { letter-spacing: 0; font-weight: 800; text-transform: none; white-space: nowrap; }
.building-safe-legend i,
.building-safe-pins i {
  display: inline-block;
  width: 11px;
  height: 11px;
  box-sizing: border-box;
  border: 1.5px solid rgba(40, 35, 27, 0.35);
  border-radius: 999px;
  vertical-align: -1px;
}
.building-safe-legend i.is-green,
.building-safe-pins i.is-green { border-color: #4a5a32; background: #5f7340; }
.building-safe-legend i.is-yellow,
.building-safe-pins i.is-yellow { border-color: #a7762c; background: #d39b42; }
.building-safe-history,
.building-safe-body .building-safe-history-empty {
  margin: 0;
  padding: 0 14px 10px;
  border-radius: 0 0 4px 4px;
  background: repeating-linear-gradient(180deg, transparent 0, transparent 25px, rgba(66, 51, 31, 0.13) 25px, rgba(66, 51, 31, 0.13) 26px), #e9dfc6;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  color: #28231b;
}
.building-safe-body .building-safe-history-empty { padding-top: 6px; font-size: 0.75rem; }
.building-safe-history:empty { display: none; }
.building-safe-guess {
  height: 26px;
  margin: 0;
  padding: 0;
  grid-template-columns: 30px 1fr auto;
  gap: 6px;
  border: 0;
  border-radius: 0;
  background: none;
  animation: none;
}
.building-safe-guess-number { color: rgba(40, 35, 27, 0.5); font-size: 0.75rem; font-weight: 800; }
.building-safe-guess-digits {
  color: #28231b;
  font: 400 1.2rem var(--font-display, "Special Elite", cursive);
  letter-spacing: 0.3em;
}
.building-safe-guess-hits {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.building-safe-pins { display: flex; gap: 4px; }
.building-safe-body .building-safe-result { border-color: #8fa863; background: rgba(95, 115, 64, 0.15); color: #cfe0ad; }
@media (max-width: 600px) {
  .building-safe-overlay { padding: 0; }
  .building-safe-overlay .building-safe-panel { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; }
}
.building-safe-actions .building-safe-clear {
  border: 1px solid rgba(225, 232, 238, 0.22);
  background: rgba(15, 19, 23, 0.6);
  box-shadow: none;
  color: #e1e8ee;
  text-shadow: none;
  font-family: inherit;
  font-size: 0.75rem;
}

/* =====================================================================
   Etappe 4f – Zugang (Login, ausgeloggt)
   ===================================================================== */
body.access-layout {
  min-height: 100vh;
  min-height: 100dvh;
  background: #0b0c0b;
  color: #ece6d8;
}
body.access-layout::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0 0 auto;
  height: 280px;
  background:
    linear-gradient(180deg, rgba(11, 12, 11, 0.55) 0%, rgba(11, 12, 11, 0.1) 40%, #0b0c0b 100%),
    url("../img/place-imgs/55543_zur-tanne.png") center 35% / cover no-repeat;
  filter: grayscale(0.5) contrast(1.1) brightness(0.62) sepia(0.2);
  pointer-events: none;
}
body.access-layout .app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 16px 24px 32px;
  box-sizing: border-box;
}
.access-hero { padding-top: 4px; }
.access-brand {
  display: block;
  color: rgba(244, 239, 226, 0.9);
  font-family: var(--font-display, "Special Elite", cursive);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-align: center;
}
.access-intro { margin-top: 112px; }
.access-kicker {
  color: #e8b86a;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.access-intro h1 {
  margin: 6px 0 0;
  color: #f4efe2;
  font-family: var(--font-display, "Special Elite", cursive);
  font-size: 2.35rem;
  font-weight: 400;
  line-height: 1;
}
.access-intro p {
  margin: 10px 0 0;
  color: rgba(236, 230, 216, 0.72);
  font-size: 0.85rem;
  line-height: 1.55;
}
body.access-layout #rex-yform { margin-top: 26px; }
body.access-layout #rex-yform fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
body.access-layout #rex-yform legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
body.access-layout #rex-yform .form-group { margin: 0; }
body.access-layout #rex-yform .control-label {
  display: block;
  margin-bottom: 7px;
  color: rgba(236, 230, 216, 0.66);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
body.access-layout #rex-yform .form-control {
  width: 100%;
  height: 52px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid rgba(236, 230, 216, 0.2);
  border-radius: 12px;
  background: #131513;
  box-shadow: none;
  color: #f4efe2;
  font: inherit;
  font-size: 0.95rem;
}
body.access-layout #rex-yform .form-control:focus {
  outline: none;
  border-color: #e8b86a;
  box-shadow: 0 0 0 3px rgba(232, 184, 106, 0.18);
}
body.access-layout #rex-yform .checkbox,
body.access-layout #rex-yform .formcheckbox { margin: 0; }
body.access-layout #rex-yform .checkbox label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(236, 230, 216, 0.82);
  font-size: 0.82rem;
  cursor: pointer;
}
body.access-layout #rex-yform .checkbox input[type="checkbox"] {
  order: -1;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #5f7340;
}
body.access-layout #rex-yform button[type="submit"],
body.access-layout #rex-yform .btn-primary {
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #b93a33, #9b1f1f 62%, #4d1816 160%);
  box-shadow: 0 5px 0 #4d1816, 0 14px 28px rgba(155, 31, 31, 0.25);
  color: #f2e9d7;
  font-family: var(--font-display, "Special Elite", cursive);
  font-size: 1.2rem;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.38);
  cursor: pointer;
}
body.access-layout #rex-yform .alert,
body.access-layout #rex-yform .help-block,
body.access-layout #rex-yform .text-danger {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(229, 122, 113, 0.5);
  border-radius: 10px;
  background: rgba(155, 31, 31, 0.18);
  color: #f2c4bd;
  font-size: 0.8rem;
}
body.access-layout #message-to-unlogged { margin-top: 26px; }
.access-cta {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, #b93a33, #9b1f1f 62%, #4d1816 160%);
  box-shadow: 0 5px 0 #4d1816;
  color: #f2e9d7;
  font-family: var(--font-display, "Special Elite", cursive);
  font-size: 1.2rem;
  text-decoration: none;
}
@media (min-width: 900px) {
  #base-infrastructure-overlay .base-infrastructure-panel { width: min(900px, 100%); }
}

/* =====================================================================
   Etappe 5a: Ort (POI)
   ===================================================================== */
#poi-modal.poi-modal-v2 {
  padding: 0;
  align-items: stretch;
  justify-content: center;
  background: #0b0c0b;
}
.poi-modal-v2 .poi-sheet {
  --poi-hero-height: clamp(250px, 46vh, 430px);
  --poi-title-size: clamp(2.2rem, 12vw, 2.9rem);
  position: relative;
  width: 100%;
  max-width: 1180px;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow-x: hidden;
  overflow-y: auto;
  background: #0b0c0b;
  color: #ece6d8;
  font-family: "Courier New", "IBM Plex Mono", monospace;
}
.poi-modal-v2 .poi-sheet::before { display: none; }
.poi-modal-v2 .poi-hero {
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--poi-hero-height);
  min-height: 250px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 80% at 30% 20%, rgba(226, 170, 96, 0.22), transparent 62%),
    linear-gradient(180deg, #1a1c18, #0b0c0b);
}
.poi-modal-v2 #poi-photo-container,
.poi-modal-v2 #poi-photo-container .poi-modal-photo {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: 50% 40%;
}
.poi-modal-v2 #poi-photo-container .poi-modal-photo {
  filter: contrast(1.08) saturate(0.75) sepia(0.15);
}
.poi-modal-v2 .poi-hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 12, 11, 0.7) 0%, rgba(11, 12, 11, 0) 24%, rgba(11, 12, 11, 0) 50%, #0b0c0b 100%);
}
.poi-modal-v2 .poi-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 5px);
}
.poi-modal-v2 .poi-sheet-top {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left));
  pointer-events: none;
}
.poi-modal-v2 .poi-sheet-top > * { pointer-events: auto; }
.poi-modal-v2 .poi-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(10, 11, 10, 0.65);
  border: 1px solid rgba(236, 230, 216, 0.25);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.poi-modal-v2 .poi-type-chip i { font-size: 0.72rem; color: #f0c27a; }
.poi-modal-v2 .poi-close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(236, 230, 216, 0.25);
  background: rgba(10, 11, 10, 0.55);
  color: #ece6d8;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.poi-modal-v2 .poi-close svg { display: block; width: 18px; height: 18px; }
.poi-modal-v2 .poi-close:hover,
.poi-modal-v2 .poi-close:focus-visible { background: rgba(236, 230, 216, 0.14); }
.poi-modal-v2 .poi-sheet-body {
  position: relative;
  z-index: 1;
  min-height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  /* Let the first title line straddle the lower edge of the photo. */
  padding: calc(var(--poi-hero-height) - var(--poi-title-size) * 0.475) 20px 20px;
  pointer-events: none;
}
.poi-modal-v2 .poi-sheet-body > * { pointer-events: auto; }
.poi-modal-v2 .poi-title {
  margin: 0;
  color: #f4efe2;
  font-family: "Special Elite", cursive;
  font-size: var(--poi-title-size);
  font-weight: 700;
  line-height: 0.95;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
  overflow-wrap: anywhere;
}
.poi-modal-v2 .poi-meta-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.poi-modal-v2 .poi-address { font-size: 0.75rem; color: rgba(236, 230, 216, 0.75); }
.poi-modal-v2 .poi-level { display: inline-flex; align-items: center; gap: 6px; }
.poi-modal-v2 .poi-level-label {
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(236, 230, 216, 0.6);
}
.poi-modal-v2 .poi-pips { display: flex; gap: 2px; }
.poi-modal-v2 .poi-pip {
  width: 14px;
  height: 6px;
  border-radius: 2px;
  background: rgba(236, 230, 216, 0.18);
}
.poi-modal-v2 .poi-pip.is-on { background: #e8b86a; }
.poi-modal-v2 .poi-stamps { margin-top: 16px; display: flex; gap: 8px; }
.poi-modal-v2 .poi-stamp {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 4px;
  border: 1px solid rgba(236, 230, 216, 0.16);
  border-radius: 10px;
  background: rgba(24, 26, 24, 0.9);
  text-align: center;
}
.poi-modal-v2 .poi-stamp i { font-size: 1rem; color: rgba(240, 214, 166, 0.9); }
.poi-modal-v2 .poi-stamp b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 800;
}
.poi-modal-v2 .poi-stamp small {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(236, 230, 216, 0.55);
}
.poi-modal-v2 .poi-wares { margin-top: 16px; }
.poi-modal-v2 .poi-wares[hidden] { display: none; }
.poi-modal-v2 .poi-wares-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.poi-modal-v2 .poi-kicker {
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e8b86a;
}
.poi-modal-v2 .poi-wares-title {
  margin-left: 6px;
  font-family: "Special Elite", cursive;
  font-size: 1.05rem;
}
.poi-modal-v2 .poi-wares-count { font-size: 0.66rem; color: rgba(236, 230, 216, 0.55); white-space: nowrap; }
.poi-modal-v2 .poi-wares-list {
  margin: 10px -20px 0 0;
  padding-right: 20px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.poi-modal-v2 .poi-wares-list::-webkit-scrollbar { display: none; }
.poi-modal-v2 .poi-ware {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(236, 230, 216, 0.18);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}
.poi-modal-v2 .poi-ware em { font-style: normal; color: #f0c27a; }
.poi-modal-v2 .poi-ware.is-more { border-style: dashed; color: rgba(236, 230, 216, 0.55); font-weight: 700; }
.poi-modal-v2 .poi-actions {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.poi-modal-v2 .poi-actions-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
}
.poi-modal-v2 .poi-actions-row.is-single { grid-template-columns: 1fr; }
.poi-modal-v2 .poi-actions .btn {
  min-height: 52px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-family: "Special Elite", cursive;
  font-size: 0.95rem;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.poi-modal-v2 .poi-actions .btn-primary {
  border: 0;
  background: linear-gradient(180deg, #b93a33, #9b1f1f 62%, #4d1816 160%);
  color: #f2e9d7;
  box-shadow: 0 5px 0 #4d1816;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.38);
}
.poi-modal-v2 .poi-actions .poi-loot-button:not(.btn-primary) {
  border: 1px solid rgba(236, 230, 216, 0.2);
  background: #1a1c1a;
  color: #ece6d8;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
}
.poi-modal-v2 .poi-actions .btn:active { transform: translateY(2px); }
.poi-modal-v2 .poi-claim-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px dashed rgba(236, 230, 216, 0.22);
  color: rgba(236, 230, 216, 0.55);
  font-size: 0.75rem;
}
.poi-modal-v2 .poi-claim-row span { flex: 1; }
.poi-modal-v2 .poi-claim-row b {
  font-family: "Special Elite", cursive;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(236, 230, 216, 0.75);
}
@media (min-width: 900px) {
  #poi-modal.poi-modal-v2 .poi-sheet { display: grid; grid-template-columns: 700px minmax(0, 1fr); }
  .poi-modal-v2 .poi-hero { position: relative; grid-column: 1; grid-row: 1; height: 100%; min-height: 0; }
  .poi-modal-v2 .poi-hero-shade {
    background: linear-gradient(90deg, rgba(11, 12, 11, 0) 55%, #0b0c0b 100%), linear-gradient(180deg, rgba(11, 12, 11, 0.6) 0%, rgba(11, 12, 11, 0) 22%, rgba(11, 12, 11, 0) 70%, rgba(11, 12, 11, 0.85) 100%);
  }
  .poi-modal-v2 .poi-sheet-top { padding: 12px 16px 0; }
  .poi-modal-v2 .poi-sheet-body { grid-column: 2; grid-row: 1; padding: 92px 40px 36px 8px; }
  .poi-modal-v2 .poi-title { font-size: clamp(3rem, 5vw, 4rem); }
  .poi-modal-v2 .poi-stamp { padding: 12px 6px; }
  .poi-modal-v2 .poi-wares-list { flex-wrap: wrap; margin-right: 0; padding-right: 0; overflow: visible; }
}

/* =====================================================================
   Etappe 5b: Warenübergabe (Handel / Versorgung, POI und NPC)
   ===================================================================== */
.poi-item-exchange-modal { background: rgba(8, 10, 9, 0.9); }
.poi-item-exchange-panel {
  border: 1px solid rgba(226, 211, 177, 0.14);
  border-radius: 16px;
  background: #262e2a;
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.35);
}
.poi-item-exchange-header { border-bottom: 1px solid rgba(226, 211, 177, 0.14); background: none; }
.poi-item-exchange-kicker,
.poi-exchange-section-head span {
  color: rgba(245, 241, 230, 0.6);
  font-weight: 900;
  letter-spacing: 0.14em;
}
.poi-item-exchange-header h2 { font-size: 1.3rem; font-weight: 700; line-height: 1.05; }
.poi-item-exchange-close {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border-color: rgba(226, 211, 177, 0.14);
  background: none;
}
.poi-exchange-receiver {
  border-bottom: 1px solid rgba(226, 211, 177, 0.14);
  background: none;
}
.poi-exchange-receiver.is-drag-over { background: rgba(143, 168, 99, 0.12); box-shadow: inset 0 0 0 2px rgba(143, 168, 99, 0.55); }
.poi-exchange-inventory { background: rgba(0, 0, 0, 0.16); }
.poi-exchange-empty {
  border-radius: 12px;
  border-color: rgba(226, 211, 177, 0.32);
  color: rgba(245, 241, 230, 0.6);
}
.poi-exchange-basket-row {
  border-radius: 12px;
  border: 2px solid #8fa863;
  background: rgba(143, 168, 99, 0.08);
}
.poi-exchange-basket-row small { color: #b9cf8f; }
.poi-exchange-score span {
  border-color: rgba(143, 168, 99, 0.45);
  background: rgba(143, 168, 99, 0.12);
  color: #c9dba0;
  font-weight: 800;
}
.poi-exchange-message { color: rgba(245, 241, 230, 0.6); }
.poi-exchange-message.is-error { color: #e5a091; }
.poi-exchange-confirm {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #b93a33, #9b1f1f 62%, #4d1816 160%);
  box-shadow: 0 4px 0 #4d1816;
  color: #f2e9d7;
  font-family: "Special Elite", cursive;
  font-size: 1rem;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.38);
}
.poi-exchange-confirm:disabled {
  opacity: 1;
  background: #3a443e;
  box-shadow: none;
  color: rgba(245, 241, 230, 0.6);
  text-shadow: none;
}
.poi-exchange-item {
  border-radius: 12px;
  border: 1px solid rgba(226, 211, 177, 0.14);
  background: rgba(255, 255, 255, 0.045);
}
.poi-exchange-item.is-unavailable:hover { border-color: rgba(226, 211, 177, 0.14); background: rgba(255, 255, 255, 0.045); }
.npc-exchange-reward { border-radius: 999px; }
@media (max-width: 600px) {
  .poi-item-exchange-modal { padding: 0; align-items: stretch; }
  .poi-item-exchange-panel { width: 100%; height: 100%; border-left: 0; border-right: 0; border-radius: 0; }
  .poi-exchange-confirm { min-width: 0; width: 100%; justify-self: stretch; }
}

/* =====================================================================
   Etappe 5c: NPC-Begegnung (Karte)
   ===================================================================== */
#game-modal.npc-map-modal-shell {
  position: fixed;
  width: min(92vw, 560px);
  border: 1px solid rgba(236, 230, 216, 0.16);
  border-radius: 16px;
  background: #0b0c0b;
  font-family: "Courier New", "IBM Plex Mono", monospace;
  color: #ece6d8;
}
.npc-map-modal-shell #game-modal-actions { display: none; }
.npc-map-modal-shell #game-modal-content { font-size: 0.9rem; position: relative; }
.npc-map-topbar {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
  pointer-events: none;
}
.npc-map-topbar > * { pointer-events: auto; }
.npc-map-topchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240, 214, 166, 0.9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}
.npc-map-topchip i { font-size: 0.9rem; }
.npc-map-topclose {
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(236, 230, 216, 0.25);
  background: rgba(10, 11, 10, 0.55);
  color: #ece6d8;
  font-size: 1.1rem;
  cursor: pointer;
}
.npc-map-stage {
  border-bottom: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(232, 184, 106, 0.16), transparent 55%),
    linear-gradient(180deg, #1a1c18, #0b0c0b);
}
.npc-map-contact .npc-map-stage { aspect-ratio: auto; height: min(330px, 38vh); }
.npc-map-card .npc-map-stage { aspect-ratio: auto; height: min(520px, 58vh); }
.npc-map-stage::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 12, 11, 0.6) 0%, rgba(11, 12, 11, 0) 26%);
}
.npc-map-stage::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 5px);
}
.npc-map-card-icon img { object-position: 50% 18%; filter: contrast(1.05) saturate(0.85); }
.npc-map-card-copy {
  z-index: 2;
  padding: 90px 20px 4px;
  background: linear-gradient(transparent, #0b0c0b 85%);
}
.npc-map-card h2,
.npc-map-contact h2 {
  font-size: clamp(2.4rem, 12vw, 3.4rem);
  font-weight: 700;
  line-height: 0.95;
  color: #f4efe2;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}
.npc-map-speech {
  margin: 4px 20px 0;
  padding: 12px 14px 12px 38px;
  position: relative;
  border-left: 2px solid #e8b86a;
  background: linear-gradient(90deg, rgba(232, 184, 106, 0.1), rgba(232, 184, 106, 0));
}
.npc-map-speech::before {
  content: "\201C";
  position: absolute;
  z-index: 0;
  top: 2px;
  left: 12px;
  width: auto;
  height: auto;
  border: 0;
  background: none;
  transform: none;
  color: #e8b86a;
  font-family: "Special Elite", cursive;
  font-size: 2.2rem;
  line-height: 1;
}
.npc-map-response {
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #f4efe2;
  font-family: "Courier New", "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.55;
}
.npc-map-description {
  padding: 14px 20px 0;
  color: rgba(236, 230, 216, 0.75);
  font-size: 0.86rem;
  font-style: italic;
}
.npc-map-facts {
  margin: 16px 20px 0;
  border-radius: 14px;
  border-color: rgba(236, 230, 216, 0.16);
  background: rgba(22, 24, 22, 0.85);
}
.npc-map-facts div { background: none; border-top-color: rgba(236, 230, 216, 0.1); }
.npc-map-facts dt i { color: #f0c27a; }
.npc-map-actions { padding: 16px 20px 20px; }
.npc-map-card .npc-map-talk {
  min-height: 50px;
  border-radius: 12px;
  border: 1px dashed rgba(236, 230, 216, 0.3);
  background: none;
  color: rgba(236, 230, 216, 0.6);
  box-shadow: none;
  font-family: "Special Elite", cursive;
  font-size: 1rem;
}
.npc-map-challenge {
  margin: 16px 20px 0;
  padding: 14px;
  border: 1px solid rgba(232, 184, 106, 0.3);
  border-radius: 14px;
  background: rgba(18, 17, 14, 0.85);
}
.npc-map-kicker {
  display: block;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e8b86a;
}
.npc-map-challenge h3 {
  margin: 3px 0 6px;
  color: #f4efe2;
  font-family: "Special Elite", cursive;
  font-size: 1.15rem;
  font-weight: 400;
}
.npc-map-challenge p { font-size: 0.8rem; color: rgba(236, 230, 216, 0.7); }
.npc-map-challenge .npc-map-reqs { margin: 10px 0 12px; padding: 0; list-style: none; display: grid; gap: 6px; }
.npc-map-reqs li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(236, 230, 216, 0.3);
  font-size: 0.78rem;
}
.npc-map-reqs li b { font-size: 0.74rem; color: rgba(236, 230, 216, 0.75); white-space: nowrap; }
.npc-map-reqs li.is-ok { border: 1px solid #8fa863; background: rgba(143, 168, 99, 0.08); }
.npc-map-reqs li.is-ok b { color: #b9cf8f; }
.npc-challenge-done { color: #b9cf8f; }
.npc-map-offers { margin: 16px 20px 20px; gap: 8px; }
.npc-map-challenge + .npc-map-offers,
.npc-map-challenge ~ .npc-map-challenge { margin-top: 16px; }
.npc-map-offer {
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  min-height: 60px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(236, 230, 216, 0.16);
  background: rgba(28, 30, 28, 0.9);
  color: #ece6d8;
  box-shadow: none;
  text-shadow: none;
}
.npc-map-offer > i { font-size: 1.25rem; text-align: center; color: #f0c27a; }
.npc-map-offer strong { font-family: "Special Elite", cursive; font-size: 1rem; font-weight: 700; }
.npc-map-offer small { color: rgba(236, 230, 216, 0.6); font-size: 0.7rem; }
.npc-map-offer:disabled { opacity: 0.55; }
.npc-map-offer:not(:disabled):hover { border-color: rgba(240, 194, 122, 0.5); }
.npc-map-challenge .npc-map-offer { margin-top: 4px; }
.npc-map-contact.is-loading .npc-map-description { font-style: normal; }
@media (max-width: 600px) {
  #game-modal.npc-map-modal-shell {
    top: var(--app-top-stack-height);
    left: 0;
    transform: none;
    animation: none;
    width: 100%;
    max-width: none;
    height: calc(100dvh - var(--app-top-stack-height) - var(--app-bottom-nav-height));
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  #game-modal-overlay:has(+ #game-modal.npc-map-modal-shell) { background: #0b0c0b; }
}

/* =====================================================================
   Etappe 5d: Story-Modal (Tagebuch-Erzählung)
   ===================================================================== */
#story-modal-overlay { background: #0a0b0a; }
#story-modal {
  --ink: #ece6d8;
  --ink-muted: rgba(236, 230, 216, 0.6);
  --line: rgba(232, 206, 160, 0.25);
  width: min(100vw, 760px);
  margin: 0 auto;
  background:
    radial-gradient(ellipse 120% 70% at 22% 10%, rgba(226, 170, 96, 0.17), rgba(226, 170, 96, 0) 58%),
    radial-gradient(ellipse 140% 60% at 50% 110%, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0) 70%),
    linear-gradient(180deg, #121411 0%, #0a0b0a 100%);
  color: #ece6d8;
  display: flex;
  flex-direction: column;
}
#story-modal::after { display: none; }
#story-modal .story-modal-header {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: max(18px, env(safe-area-inset-top)) 70px 0 22px;
  border: 0;
  background: none;
}
#story-modal .story-modal-kicker {
  order: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  margin: 0;
  color: rgba(232, 206, 160, 0.85);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}
#story-modal .story-modal-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e8b86a;
}
#story-modal .story-modal-date {
  order: 1;
  margin: 18px 0 0;
  color: rgba(236, 230, 216, 0.6);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#story-modal #story-modal-title {
  order: 2;
  margin: 12px 0 0;
  color: #f4efe2;
  font-size: clamp(2.2rem, 11vw, 2.9rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow: 0 0 1px rgba(244, 239, 226, 0.6), 0 0 18px rgba(232, 184, 106, 0.18);
}
#story-modal #story-modal-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin-top: 16px;
  background: #e8b86a;
}
#story-modal .story-audio-repeat {
  top: max(18px, env(safe-area-inset-top));
  right: 22px;
  width: 44px;
  height: 44px;
  border-color: rgba(232, 206, 160, 0.25);
  background: rgba(10, 11, 10, 0.6);
  color: #ece6d8;
  box-shadow: none;
  font-size: 0.95rem;
}
#story-modal .story-audio-repeat:hover,
#story-modal .story-audio-repeat:focus-visible { background: rgba(232, 184, 106, 0.2); border-color: #e8b86a; color: #fff; }
#story-modal #story-modal-image {
  position: relative;
  width: min(268px, calc(100% - 60px));
  margin: 24px auto 4px;
  padding: 10px 10px 34px;
  background: #e9e1cc;
  transform: rotate(-2.2deg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}
#story-modal #story-modal-image::before,
#story-modal #story-modal-image::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 74px;
  height: 22px;
  background: rgba(222, 210, 180, 0.55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
#story-modal #story-modal-image::before { left: -16px; transform: rotate(-32deg); }
#story-modal #story-modal-image::after { right: -16px; transform: rotate(30deg); }
#story-modal #story-modal-image img {
  width: 100%;
  max-height: 220px;
  aspect-ratio: 248 / 220;
  border: 0;
  box-shadow: none;
  filter: sepia(0.3) contrast(1.05) saturate(0.8);
}
#story-modal #story-modal-text {
  flex: 1 1 auto;
  padding: 18px 22px 20px;
  color: #ece6d8 !important;
  -webkit-text-fill-color: #ece6d8;
  font-size: 1rem;
  line-height: 1.72;
  text-shadow: none;
}
#story-modal #story-modal-text,
#story-modal #story-modal-text * {
  color: #ece6d8 !important;
  -webkit-text-fill-color: #ece6d8 !important;
}
#story-modal #story-modal-choices {
  gap: 8px;
  padding: 0 22px max(22px, env(safe-area-inset-bottom));
}
#story-modal #story-modal-choices .btn {
  min-height: 54px;
  border: 1px solid rgba(236, 230, 216, 0.2);
  border-radius: 12px;
  background: #1a1c1a;
  color: #ece6d8;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
  font-family: "Special Elite", cursive;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: none;
  filter: none;
}
#story-modal #story-modal-choices .btn:only-child,
#story-modal #story-modal-choices .btn.btn-primary {
  border: 0;
  background: linear-gradient(180deg, #b93a33, #9b1f1f 62%, #4d1816 160%);
  color: #f2e9d7;
  box-shadow: 0 5px 0 #4d1816, 0 14px 28px rgba(155, 31, 31, 0.25);
  font-size: 1.1rem;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.38);
}
#story-modal #story-modal-choices .btn:hover:not(:disabled),
#story-modal #story-modal-choices .btn:focus-visible { filter: brightness(1.12); transform: none; border-color: rgba(240, 194, 122, 0.5); }
#story-modal #story-modal-choices .btn:active:not(:disabled) { transform: translateY(2px); }
@media (max-width: 720px) {
  #story-modal #story-modal-image { margin: 24px auto 4px; }
  #story-modal #story-modal-text { padding: 18px 22px 20px; font-size: 1rem; }
  #story-modal #story-modal-choices { padding: 0 22px 22px; }
  #story-modal #story-modal-choices .btn { padding: 0.7rem 1rem; }
}

/* =====================================================================
   Etappe 6a: Gebäude – Fenster, Grundriss, Raum (Blaupausen-Look)
   ===================================================================== */
#building-modal.simplified-modal { background: rgba(0, 0, 0, 0.55); }
#building-modal .simplified-modal-content {
  background: #161c21;
  color: #e1e8ee;
  border: 1px solid rgba(225, 232, 238, 0.18);
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6);
  white-space: normal;
  font-family: "Courier New", "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}
#building-modal .simplified-modal-content::before { display: none; }
#building-modal .simplified-modal-header {
  min-height: 0;
  padding: 14px 16px 12px;
  border: 0;
  border-bottom: 1px solid rgba(225, 232, 238, 0.12);
  background: none;
}
#building-modal .simplified-modal-header h2 {
  color: #e1e8ee;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.05;
  text-shadow: none;
}
#building-modal .building-modal-subtitle {
  margin-top: 3px;
  color: rgba(225, 232, 238, 0.6);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
#building-modal .simplified-modal-body { background: none; color: inherit; padding: 12px 12px 0; }
#building-modal .modal-section { border: 0; background: none; color: inherit; }
#building-modal .building-floorplan-heading { padding: 0 4px; }
#building-modal .building-floorplan-heading h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #e1e8ee;
  font-family: "Special Elite", cursive;
  font-size: 0.95rem;
  font-weight: 400;
  text-shadow: none;
}
#building-modal .building-floorplan-meta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
#building-modal .building-floorplan-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#building-modal .building-floorplan-meta .modal-label {
  color: rgba(225, 232, 238, 0.6);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
#building-modal .building-floorplan-meta .modal-value,
#building-modal .modal-value {
  padding: 2px 6px;
  border: 1px solid rgba(225, 232, 238, 0.22);
  border-radius: 6px;
  background: none;
  color: #e1e8ee;
  font-size: 0.68rem;
  font-weight: 800;
}
#building-modal .building-floorplan,
#building-modal .building-room-canvas {
  border: 1px solid rgba(225, 232, 238, 0.16);
  border-radius: 12px;
  background-color: #0f1317;
  background-image:
    linear-gradient(rgba(225, 232, 238, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 232, 238, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(225, 232, 238, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 232, 238, 0.025) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px, 16px 16px, 16px 16px;
  box-shadow: none;
}
.building-floorplan-paper { fill: transparent; }
.building-floorplan-grid { opacity: 0.5; }
.building-floorplan-grid-line { stroke: rgba(225, 232, 238, 0.12); }
.building-floorplan-path { stroke: #e1e8ee; stroke-width: 1.8; }
.building-floorplan-hole { stroke: rgba(225, 232, 238, 0.5); }
.building-floorplan-room {
  fill: rgba(225, 232, 238, 0.07);
  stroke: rgba(225, 232, 238, 0.75);
  stroke-width: 1;
}
.building-floorplan-room:hover { fill: rgba(240, 194, 122, 0.16); stroke: #f0c27a; }
.building-floorplan-room--unexplored { fill: rgba(225, 232, 238, 0.07); }
.building-floorplan-room--explored { fill: rgba(143, 168, 99, 0.16); }
.building-floorplan-room--active { fill: rgba(240, 194, 122, 0.2); }
.building-floorplan-room-label {
  fill: #e1e8ee;
  stroke: rgba(15, 19, 23, 0.9);
  stroke-width: 3;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.building-floorplan-empty { color: rgba(225, 232, 238, 0.6); }
.building-floor-tabs {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  gap: 6px;
}
.building-floor-tabs button {
  min-width: 44px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(225, 232, 238, 0.3);
  border-radius: 8px;
  background: rgba(15, 19, 23, 0.8);
  color: #e1e8ee;
  font-family: "Courier New", monospace;
  font-weight: 800;
  font-size: 0.7rem;
}
.building-floor-tabs button.is-active { background: #e1e8ee; color: #0f1317; border-color: #e1e8ee; }

/* Raum */
#building-modal .building-room-overlay { background: #161c21; }
#building-modal .building-room-panel { background: none; box-shadow: none; padding: 0 0 0; }
#building-modal .building-room-title {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 12px;
  min-height: 0;
  color: #e1e8ee;
  font-size: 1.25rem;
  text-shadow: none;
  pointer-events: none;
}
.building-room-shape { fill: rgba(225, 232, 238, 0.06); stroke: #e1e8ee; stroke-width: 1.6; }
.building-room-iso-stage svg { filter: none; }
.building-room-object { color: #e1e8ee; text-shadow: none; }
.building-room-object .building-room-object-icon { filter: drop-shadow(0 0 6px rgba(15, 19, 23, 0.95)); }
.building-room-object i {
  color: #e1e8ee;
  --fa-primary-color: #e1e8ee;
  --fa-secondary-color: #8fa0ae;
}
.building-room-object .building-room-object-label {
  display: inline-block;
  width: auto;
  max-width: none;
  white-space: nowrap;
  hyphens: none;
  overflow-wrap: normal;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(15, 19, 23, 0.85);
  font-family: "Courier New", monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.building-room-object:hover { color: #f0c27a; }
.building-room-object:hover i { color: #f0c27a; --fa-primary-color: #f0c27a; }

/* Aktionsleiste */
#building-modal #building-gameplay-section {
  margin: 12px -12px 0;
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(225, 232, 238, 0.12);
}
#building-modal .building-action-info { color: rgba(225, 232, 238, 0.6); font-size: 0.7rem; line-height: 1.35; }
#building-modal .building-action-context i { color: rgba(225, 232, 238, 0.7); }
#building-modal .building-action-meta .building-action-cost,
#building-modal .building-action-meta .building-action-saving {
  border: 0;
  background: none;
  padding: 0;
  color: rgba(225, 232, 238, 0.7);
}
#building-modal #building-actions .btn {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(225, 232, 238, 0.22);
  border-radius: 12px;
  background: #1d242a;
  color: #e1e8ee;
  font-family: "Special Elite", cursive;
  font-size: 0.95rem;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.42);
  text-shadow: none;
}
#building-modal #building-actions .btn:hover:not(:disabled) { background: #232c33; border-color: rgba(225, 232, 238, 0.4); filter: none; }
#building-modal #building-actions .btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.42); }
#building-modal #building-actions .building-action-primary {
  min-width: 0;
  border: 0;
  background: linear-gradient(180deg, #b93a33, #9b1f1f 62%, #4d1816 160%);
  color: #f2e9d7;
  box-shadow: 0 4px 0 #4d1816;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.38);
}
#building-modal #building-actions .building-action-primary:hover:not(:disabled) { background: linear-gradient(180deg, #c4443d, #a82424 62%, #4d1816 160%); }
#building-modal #building-actions .btn-warning {
  border: 0;
  background: linear-gradient(180deg, #d9a24a, #a8752b 62%, #6e4a17 160%);
  color: #fff7df;
  box-shadow: 0 4px 0 #6e4a17;
}
@media (max-width: 719px) {
  #building-modal .simplified-modal-content { border-radius: 0; border-left: 0; border-right: 0; }
  #building-modal #building-gameplay-section { margin: 12px -10px 0; }
}

/* =====================================================================
   Etappe 6b: Gebäude – Loot-Fenster (Fundstücke)
   ===================================================================== */
.building-loot-overlay {
  padding: 0;
  justify-content: flex-end;
  background: rgba(8, 10, 12, 0.62);
  backdrop-filter: none;
}
.building-loot-panel {
  flex: 0 1 auto;
  width: min(100%, 560px);
  min-height: 260px;
  max-height: min(100% - 96px, 680px);
  border: 0;
  border-top: 1px solid rgba(226, 211, 177, 0.2);
  border-radius: 16px 16px 0 0;
  background: #242b31;
  color: #f5f5f0;
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.35);
}
.building-loot-panel::before {
  content: "";
  display: block;
  flex: 0 0 auto;
  width: 40px;
  height: 4px;
  margin: 8px auto 2px;
  border-radius: 999px;
  background: rgba(245, 245, 240, 0.3);
}
.building-loot-panel .building-room-toolbar {
  min-height: 0;
  padding: 4px 16px 10px;
  border: 0;
  background: none;
  align-items: center;
}
.building-loot-panel h4 {
  order: 2;
  color: #f5f5f0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}
.building-loot-panel .building-room-toolbar > div:first-child { display: flex; flex-direction: column; }
.building-loot-panel p.building-loot-status {
  order: 1;
  margin: 0 0 2px;
  color: rgba(245, 245, 240, 0.62);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.building-loot-close {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-radius: 12px;
  border-color: rgba(226, 211, 177, 0.2);
  background: none;
  color: #f5f5f0;
  font-size: 1.1rem;
}
.building-loot-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 8px;
  padding: 0 16px 14px;
  align-content: start;
}
.building-loot-grid .item-tile,
.building-loot-grid .building-loot-tile {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(226, 211, 177, 0.2);
  background: rgba(255, 255, 255, 0.045);
}
.building-loot-drop-overlay {
  width: min(100%, 560px);
  height: auto;
  margin: 0;
  padding: 0 16px 12px;
  box-sizing: border-box;
  gap: 8px;
  background: #242b31;
}
.building-loot-drop-zone {
  min-height: 52px;
  flex-direction: row;
  gap: 8px;
  border-radius: 12px;
  border-color: rgba(226, 211, 177, 0.2);
  background: #1d242a;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.42);
  backdrop-filter: none;
  color: #f5f5f0;
}
.building-loot-drop-zone span { font-family: "Special Elite", cursive; font-size: 0.95rem; font-weight: 400; }
.building-loot-drop-zone small { max-width: none; }
.building-loot-drop-zone.is-hover,
.building-loot-drop-zone.ui-droppable-hover {
  border-color: #8fa863;
  background: rgba(143, 168, 99, 0.25);
  color: #f5f5f0;
  box-shadow: 0 0 0 2px rgba(143, 168, 99, 0.55);
}
.building-loot-drop-zone.is-hover i,
.building-loot-drop-zone.ui-droppable-hover i,
.building-loot-drop-zone.is-hover small,
.building-loot-drop-zone.ui-droppable-hover small,
.building-loot-drop-zone.is-hover small b,
.building-loot-drop-zone.ui-droppable-hover small b { color: #f5f5f0; }
.building-breakin-overlay { background: rgba(8, 10, 12, 0.72); backdrop-filter: none; }
.building-breakin-panel {
  border-color: rgba(225, 232, 238, 0.18);
  border-radius: 16px;
  background: #161c21;
  color: #e1e8ee;
}
.building-breakin-panel h4 { font-weight: 400; }
.building-breakin-panel p { color: rgba(225, 232, 238, 0.6); }
@media (min-width: 720px) {
  .building-loot-overlay { justify-content: center; }
  .building-loot-panel { border-radius: 16px 16px 0 0; }
}

/* =====================================================================
   Etappe 7a: Item-Detail (Vollbild-Sheet mit Bühne)
   ===================================================================== */
#game-modal.item-modal-shell {
  --item-accent: #8fa863;
  --item-sheet: #262e2a;
  position: fixed;
  width: min(100vw, 520px);
  max-width: none;
  border: 0;
  border-top: 2px solid var(--item-accent);
  border-radius: 0;
  background: var(--item-sheet);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  font-family: "Courier New", "IBM Plex Mono", monospace;
}
#game-modal.item-modal-shell:has([data-accent="found"]) {
  --item-accent: #3f7aa2;
  --item-sheet: #242b31;
}
#game-modal.item-modal-shell #game-modal-actions { display: none; }
#game-modal.item-modal-shell #game-modal-content {
  height: 100%;
  max-height: none;
  overflow-y: auto;
  font-size: 0.9rem;
}
#game-modal.item-modal-shell .item-detail-modal {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-height: none;
  padding-top: 8px;
  color: #f5f1e6;
}
#game-modal.item-modal-shell .item-detail-modal::before {
  content: "";
  align-self: center;
  width: 40px;
  height: 4px;
  margin-bottom: 2px;
  border-radius: 999px;
  background: rgba(245, 241, 230, 0.3);
}
.item-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 8px;
}
.item-nav-btn {
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: none;
  color: #f5f1e6;
  font-size: 1rem;
  cursor: pointer;
}
.item-nav-btn:disabled { opacity: 0.3; cursor: default; }
.item-nav-close { border: 1px solid rgba(226, 211, 177, 0.2); font-size: 1.1rem; }
.item-nav-count {
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 241, 230, 0.62);
}
.item-nav-spacer { flex: 1; }

.item-detail-modal .item-stage {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-height: 300px;
  max-height: 456px;
  margin: 0 12px;
  border: 1px solid color-mix(in srgb, var(--item-accent) 60%, transparent);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--item-accent) 14%, transparent), transparent 70%),
    #1b2228;
  overflow: hidden;
}
.item-detail-modal .item-stage::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(16, 20, 24, 0.92) 0%, rgba(16, 20, 24, 0) 26%, rgba(16, 20, 24, 0) 72%, rgba(16, 20, 24, 0.92) 100%);
}
.item-detail-modal .item-stage-media {
  inset: 0;
  padding: 56px 16px 56px;
}
.item-detail-modal .item-stage-media .item-modal-img {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
}
.item-detail-modal .item-stage-caption {
  position: absolute;
  z-index: 3;
  left: 16px;
  top: 14px;
  right: 120px;
  width: auto;
  padding: 0;
  background: none;
}
.item-detail-modal .item-modal-kicker {
  margin: 0;
  gap: 7px;
  color: var(--item-accent);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}
.item-detail-modal .item-modal-kicker em { opacity: 1; letter-spacing: 0.14em; }
.item-detail-modal .item-stage-caption h2 {
  margin: 5px 0 0;
  font-size: clamp(1.7rem, 9vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  color: #f5f1e6;
}
.item-stage-badges {
  position: absolute;
  z-index: 3;
  right: 12px;
  top: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.item-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(10, 13, 16, 0.72);
  border: 1px solid rgba(226, 211, 177, 0.2);
  font-size: 0.72rem;
  font-weight: 800;
  color: #f5f1e6;
}
.item-badge i { font-size: 0.75rem; }
.item-badge--durability.is-good { color: #8fa863; border-color: rgba(143, 168, 99, 0.5); }
.item-badge--durability.is-mid { color: #e8b86a; border-color: rgba(232, 184, 106, 0.5); }
.item-badge--durability.is-low { color: #d45a52; border-color: rgba(212, 90, 82, 0.5); }
.item-stage-effects {
  position: absolute;
  z-index: 3;
  left: 16px;
  right: 16px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 8px 14px;
}
.item-fx { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 800; }
.item-fx i { font-size: 0.95rem; }
.item-fx b { font-weight: 800; }
.item-fx small {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(245, 241, 230, 0.62);
}
.item-fx--capacity i { color: #e58a32; }
.item-fx--attack i { color: #e0726a; }
.item-fx--defense i { color: #7fadda; }
.item-fx--speed i, .item-fx--dexterity i { color: #78b6a8; }
.item-fx--strength i { color: #b48ad6; }
.item-fx--craft i { color: #c8a873; }
.item-fx--farming i { color: #83a95f; }
.item-fx--electronics i { color: #3fb3d6; }
.item-fx--medicine i { color: #c06f78; }
.item-fx--health i { color: #d9534a; }
.item-fx--focus i { color: #4dbab3; }
.item-fx--energy i { color: #e3a33a; }
.item-fx--hydration i { color: #5aa6e0; }

.item-detail-modal .item-modal-body {
  flex: 0 0 auto;
  padding: 0;
  gap: 0;
  background: none;
}
.item-detail-modal .item-modal-description {
  margin: 12px 16px 0;
  color: rgba(245, 241, 230, 0.72);
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1.45;
  letter-spacing: 0;
}
.item-detail-modal .item-compare { margin: 10px 16px 0; border-radius: 12px; }
.item-modal-actions-dock {
  margin-top: 12px;
  padding: 0 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.item-modal-actions-dock .item-consume-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
}
.item-modal-actions-dock .item-consume-controls label {
  color: rgba(245, 241, 230, 0.62);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.item-modal-actions-dock .item-consume-btn,
.item-modal-actions-dock .item-actions .btn-3d--quiet {
  min-height: 44px;
  border: 1px solid rgba(226, 211, 177, 0.2);
  border-radius: 12px;
  background: #1a2026;
  color: #f5f1e6;
  font-family: "Special Elite", cursive;
  font-size: 0.95rem;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.42);
  text-shadow: none;
}
.item-modal-actions-dock .item-consume-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.item-modal-actions-dock .item-actions .item-action--danger { color: #f0b0a6; }
.item-modal-actions-dock .item-actions .btn-3d:not(.btn-3d--quiet),
.item-modal-actions-dock .item-actions .item-loot-take {
  grid-column: 1 / -1;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #6c8146, #5f7340 62%, #34431f 160%);
  color: #fbf7e6;
  font-family: "Special Elite", cursive;
  font-size: 1.05rem;
  box-shadow: 0 5px 0 #34431f;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
#game-modal.item-modal-shell:has([data-accent="found"]) .item-actions .item-loot-take {
  background: linear-gradient(180deg, #3f7aa2, #2f6286 62%, #1b3a52 160%);
  color: #eef5fa;
  box-shadow: 0 5px 0 #1b3a52;
}
@media (max-width: 600px) {
  #game-modal.item-modal-shell {
    top: var(--app-top-stack-height);
    left: 0;
    transform: none;
    animation: none;
    width: 100%;
    height: calc(100dvh - var(--app-top-stack-height) - var(--app-bottom-nav-height));
    max-height: none;
  }
}
@media (min-width: 601px) {
  #game-modal.item-modal-shell {
    border-radius: 16px;
    border: 1px solid rgba(226, 211, 177, 0.18);
    border-top: 2px solid var(--item-accent);
    max-height: min(var(--app-modal-viewport-height) - 16px, 760px);
  }
}

/* =====================================================================
   Etappe 8b: Lager-Sheet (Lager + Rucksack, Tippen verschiebt)
   ===================================================================== */
.storage-chips {
  display: flex;
  gap: 6px;
  margin: 0 -16px 12px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.storage-chips::-webkit-scrollbar { display: none; }
.storage-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(226, 211, 177, 0.14);
  border-radius: 999px;
  background: none;
  color: #f5f1e6;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.storage-chip small { font-size: 0.64rem; color: rgba(245, 241, 230, 0.6); }
.storage-chip.is-active { background: #f5f1e6; border-color: #f5f1e6; color: #1b211f; }
.storage-chip.is-active small { color: #1b211f; }
.storage-section .sheet-item-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 8px;
  padding: 0;
  border: 0;
  background: none;
}
.storage-section .sheet-tile { position: relative; min-width: 0; transition: opacity 0.15s; }
.storage-section .sheet-tile .item-tile {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(226, 211, 177, 0.14);
  background: rgba(255, 255, 255, 0.045);
  user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}
.storage-section .sheet-tile.is-off { opacity: 0.38; }
.storage-section .sheet-tile.is-stack .item-tile { border: 2px solid #8fa863; }
.sheet-stack-mark {
  position: absolute;
  right: 4px;
  top: 4px;
  padding: 1px 5px;
  border-radius: 6px;
  background: #8fa863;
  color: #1b211f;
  font-size: 0.56rem;
  font-weight: 800;
  pointer-events: none;
}
.storage-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  padding: 8px 12px;
  border: 1px solid rgba(229, 138, 50, 0.45);
  border-radius: 10px;
  font-size: 0.7rem;
  line-height: 1.35;
}
.storage-note i { font-size: 0.95rem; color: #e58a32; }
.storage-empty { margin: 8px 0 0; text-align: center; color: rgba(245, 241, 230, 0.6); font-size: 0.78rem; }
.storage-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 4px;
  color: rgba(245, 241, 230, 0.6);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.storage-bag-head { display: flex; align-items: center; gap: 10px; margin: 10px 0 10px; }
.storage-bag-head h3 { margin: 0; font-family: "Special Elite", cursive; font-size: 1.1rem; font-weight: 700; color: #f5f1e6; }
.storage-bag-meter { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.storage-bag-nums { display: flex; justify-content: flex-end; gap: 10px; font-size: 0.65rem; font-weight: 800; color: #f5f1e6; }
.storage-bag-nums .is-dim { color: rgba(245, 241, 230, 0.6); }
.storage-bag-bar { height: 5px; border-radius: 999px; background: rgba(226, 211, 177, 0.14); overflow: hidden; }
.storage-bag-bar span { display: block; height: 5px; border-radius: 999px; background: #8fa863; }
.storage-bag-bar span[data-level="high"] { background: #e58a32; }
.storage-bag-bar span[data-level="over"] { background: #d45a52; }
.storage-bag-head + .storage-note { margin: -2px 0 10px; }
.storage-toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 14px;
  display: flex;
  align-items: center;
  border-radius: 12px;
  background: #f2e9d7;
  color: #2d2922;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  font-size: 0.78rem;
  font-weight: 700;
  z-index: 5;
}
.storage-toast[hidden] { display: none; }
.app-sheet--storage .app-sheet-body,
.app-sheet--storage [data-sheet-body] { padding-bottom: 24px; }

/* =====================================================================
   Etappe 8c: Inventar-Seite (Rucksack · Ausrüstung · Lager)
   ===================================================================== */
#app-screen-inventory { display: flex; flex-direction: column; gap: 12px; }
#app-screen-inventory.is-active { display: flex; }
#app-screen-inventory[hidden] { display: none; }
#app-screen-inventory .inv-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 0;
}
#app-screen-inventory .inv-head > i { display: none; }
.inv-kicker {
  display: block;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 241, 230, 0.6);
}
#app-screen-inventory .inv-head h1 {
  margin: 2px 0 0;
  font-family: "Special Elite", cursive;
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 700;
  color: #f5f1e6;
}
#app-screen-inventory .inv-sort {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(226, 211, 177, 0.14);
  background: #262e2a;
  color: #f5f1e6;
  font-size: 1.05rem;
}
#app-screen-inventory .inv-sort:hover { background: #2d3732; color: #f5f1e6; border-color: rgba(226, 211, 177, 0.3); }
#app-screen-inventory .inventory-capacity-slot:empty { display: none; }
#app-screen-inventory .inventory-capacity-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
#app-screen-inventory .inv-meter { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
#app-screen-inventory .inv-meter-row { display: flex; justify-content: space-between; gap: 6px; font-size: 0.68rem; font-weight: 800; color: #f5f1e6; }
#app-screen-inventory .inv-meter-row span { color: rgba(245, 241, 230, 0.6); text-transform: uppercase; }
#app-screen-inventory .inv-meter-bar { height: 5px; border-radius: 999px; background: rgba(226, 211, 177, 0.14); overflow: hidden; }
#app-screen-inventory .inv-meter-bar span { display: block; height: 5px; border-radius: 999px; background: #8fa863; }
#app-screen-inventory .inv-meter-bar span[data-level="high"] { background: #e58a32; }
#app-screen-inventory .inv-meter-bar span[data-level="over"] { background: #d45a52; }
#app-screen-inventory .inventory-overload-warning { grid-column: 1 / -1; }

.inv-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #262e2a;
  border: 1px solid rgba(226, 211, 177, 0.14);
}
.inv-tab {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #f5f1e6;
  font-family: "Special Elite", cursive;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.inv-tab small { font-family: "Courier New", monospace; font-size: 0.62rem; font-weight: 800; color: rgba(245, 241, 230, 0.6); }
.inv-tab small:empty { display: none; }
.inv-tab.is-active { background: #5f7340; color: #fbf7e6; box-shadow: 0 3px 0 #34431f; }

#app-screen-inventory .item-list-actions--chips { display: block; margin: 0; }
.inv-chips { display: flex; gap: 8px; margin: 0 -14px 0 0; padding-right: 14px; overflow-x: auto; scrollbar-width: none; }
.inv-chips::-webkit-scrollbar { display: none; }
.inv-chips:empty { display: none; }

#app-screen-inventory .inventory-base-items { display: none !important; }
#app-screen-inventory .user-items-list { padding: 0; background: none; border: 0; border-radius: 0; }
#app-screen-inventory #inventory { display: block; }
#app-screen-inventory #inventory #user-items { background: none; overflow: visible; gap: 12px; padding: 0; }
#app-screen-inventory #item-list.item-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 8px;
  background: none;
  border-radius: 0;
}
#app-screen-inventory #item-list .item-tile {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(226, 211, 177, 0.14);
  background: rgba(255, 255, 255, 0.045);
}
#app-screen-inventory #item-list .item-tile.is-filtered-out { display: none; }
#app-screen-inventory[data-inv-pane="equipment"] .inv-head,
#app-screen-inventory[data-inv-pane="equipment"] #inventory-capacity-slot,
#app-screen-inventory[data-inv-pane="equipment"] #user-items { display: none; }
#app-screen-inventory[data-inv-pane="bag"] #equipment-ui { display: none; }
#app-screen-inventory { padding: 14px 14px 18px; box-sizing: border-box; overflow-x: hidden; }
#app-screen-inventory[data-inv-pane="equipment"] { padding-top: 12px; }

/* =====================================================================
   Etappe 8d: Auswahl-Sheet (Werkbank, Kochstelle, Werkstatt)
   ===================================================================== */
.pick-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  border-radius: 14px;
  background: #1b211f;
  border: 1px solid rgba(226, 211, 177, 0.14);
}
.pick-tab {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #f5f1e6;
  font-family: "Special Elite", cursive;
  font-size: 0.85rem;
  cursor: pointer;
}
.pick-tab small { font-family: "Courier New", monospace; font-size: 0.62rem; color: rgba(245, 241, 230, 0.6); }
.pick-tab.is-active { background: #5f7340; color: #fbf7e6; box-shadow: 0 3px 0 #34431f; }
.pick-tab.is-active small { color: #fbf7e6; }
.pick-grid.base-cooking-ingredient-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 8px;
}
.pick-tile.base-cooking-ingredient {
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  text-align: center;
  color: #f5f1e6;
}
.pick-tile.is-filtered-out { display: none; }
.pick-tile.base-cooking-ingredient:hover,
.pick-tile.base-cooking-ingredient:focus-visible { background: none; outline: none; }
.pick-tile:hover .pick-box,
.pick-tile:focus-visible .pick-box { border: 2px solid #8fa863; background: rgba(95, 115, 64, 0.18); }
.pick-box {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(226, 211, 177, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}
.pick-box .base-cooking-item-icon,
.pick-box img { width: 68%; height: 68%; object-fit: contain; display: flex; align-items: center; justify-content: center; border: 0; background: none; padding: 0; }
.pick-amt {
  position: absolute;
  top: 5px;
  left: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1;
}
.pick-tag {
  position: absolute;
  bottom: 3px;
  right: 3px;
  padding: 2px 4px;
  border-radius: 4px;
  background: #f5f1e6;
  color: #1b211f;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
}
.pick-dur { position: absolute; left: 4px; right: 4px; top: 3px; height: 2px; border-radius: 2px; background: rgba(245, 241, 230, 0.14); }
.pick-dur i { display: block; height: 2px; border-radius: 2px; background: #8fa863; }
.pick-dur i[data-level="mid"] { background: #e8b86a; }
.pick-dur i[data-level="low"] { background: #d45a52; }
.pick-dpc { position: absolute; top: 7px; right: 4px; font-size: 0.5rem; font-weight: 800; line-height: 1; color: rgba(245, 241, 230, 0.75); }
.pick-name { font-size: 0.66rem; line-height: 1.2; letter-spacing: -0.02em; min-height: 2.4em; overflow: hidden; hyphens: auto; }
.pick-note { font-size: 0.55rem; color: #8fa863; }
.pick-empty { margin: 8px 0 0; text-align: center; color: rgba(245, 241, 230, 0.6); font-size: 0.78rem; }
.pick-hint { margin: 14px 0 0; font-size: 0.72rem; line-height: 1.45; color: rgba(245, 241, 230, 0.6); }
.pick-name { font-weight: 400; }

/* =====================================================================
   Etappe 8e: Ausbau – Modul-Detail (Bauplan)
   ===================================================================== */
#base-infrastructure-overlay.is-detail .base-infrastructure-header { display: none; }
#base-infrastructure-overlay.is-detail .base-infrastructure-body { padding: 14px 20px 0; }
.bm-detail { display: flex; flex-direction: column; min-height: 100%; color: #dfe3d8; }
.bm-top { display: flex; align-items: center; justify-content: space-between; }
.bm-back {
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid rgba(223, 227, 216, 0.3);
  background: rgba(31, 35, 33, 0.8);
  color: #dfe3d8; font-size: 1.05rem; cursor: pointer;
}
.bm-top-label { font-size: 0.62rem; font-weight: 900; letter-spacing: 0.16em; color: rgba(223, 227, 216, 0.6); }
.bm-top-spacer { width: 44px; }
.bm-hero { margin-top: 12px; display: flex; gap: 14px; align-items: center; }
.bm-hero-icon {
  position: relative; flex: 0 0 96px; height: 96px;
  border: 1.5px dashed rgba(223, 227, 216, 0.55);
  display: flex; align-items: center; justify-content: center;
}
.bm-hero-icon > i { font-size: 3.1rem; color: #dfe3d8; }
.bm-hero-icon span { position: absolute; left: -1px; right: -1px; bottom: -18px; text-align: center; font-size: 0.56rem; color: rgba(223, 227, 216, 0.5); white-space: nowrap; }
.bm-hero-text { flex: 1; min-width: 0; }
.bm-kicker { font-size: 0.62rem; font-weight: 900; letter-spacing: 0.14em; color: rgba(223, 227, 216, 0.6); text-transform: uppercase; }
.bm-hero-text h1 { margin: 4px 0 0; font-family: "Special Elite", cursive; font-size: 1.9rem; font-weight: 400; line-height: 1; color: #dfe3d8; }
.bm-hero-text p { margin: 6px 0 0; font-size: 0.75rem; line-height: 1.45; color: rgba(223, 227, 216, 0.72); }
.bm-after {
  margin-top: 26px; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  border: 1px solid rgba(143, 168, 99, 0.5); background: rgba(52, 67, 31, 0.35);
}
.bm-after > i { font-size: 1.4rem; color: #b9cf8f; }
.bm-after > div { flex: 1; min-width: 0; }
.bm-after-k { font-size: 0.6rem; font-weight: 900; letter-spacing: 0.14em; color: #8fa863; }
.bm-after-v { font-size: 0.95rem; font-weight: 800; }
.bm-after-v s { color: rgba(223, 227, 216, 0.5); }
.bm-after-v span { color: #b9cf8f; }
.bm-after-text { font-size: 0.82rem; line-height: 1.35; }
.bm-points { font-size: 0.75rem; font-weight: 900; color: #b9cf8f; white-space: nowrap; }
.bm-sec {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 16px; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.14em;
  color: rgba(223, 227, 216, 0.62);
}
.bm-sec small { font-size: 0.66rem; font-weight: 700; letter-spacing: 0; color: rgba(223, 227, 216, 0.5); }
.bm-tiles { margin-top: 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bm-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bm-span2 { grid-column: span 2; }
.bm-b {
  position: relative; height: 74px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(36, 41, 38, 0.92);
}
.bm-b .base-requirement-item-image, .bm-b img { width: 52px; height: 52px; object-fit: contain; border: 0; background: none; padding: 0; display: flex; align-items: center; justify-content: center; }
.bm-b em {
  position: absolute; left: 5px; bottom: 4px; font-style: normal;
  font-size: 0.65rem; font-weight: 900; padding: 1px 5px; border-radius: 999px;
}
.bm-t small { font-size: 0.62rem; font-weight: 700; line-height: 1.2; color: rgba(223, 227, 216, 0.8); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bm-t.ok .bm-b { border: 1.5px solid #8fa863; }
.bm-t.ok .bm-b em { background: #8fa863; color: #1b211f; }
.bm-t.no .bm-b { border: 1.5px dashed rgba(223, 227, 216, 0.45); }
.bm-t.no .bm-b em { background: #e8b86a; color: #1f2321; }
.bm-t.no .bm-b img { opacity: 0.75; }
.bm-slot { justify-content: flex-start; gap: 10px; padding: 0 12px; font-size: 0.68rem; font-weight: 800; line-height: 1.3; }
.bm-slot i { font-size: 1.5rem; color: #b9cf8f; }
.bm-slot b { color: #b9cf8f; font-weight: 800; }
.bm-t.no .bm-slot i, .bm-t.no .bm-slot b { color: #e8b86a; }
.bm-cost { margin-top: 8px; display: flex; border-radius: 12px; border: 1px solid rgba(223, 227, 216, 0.18); background: rgba(36, 41, 38, 0.88); }
.bm-cost > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; font-size: 0.8rem; font-weight: 800; }
.bm-cost i { font-size: 0.95rem; color: #e8b86a; }
.bm-cost small { font-size: 0.55rem; font-weight: 900; letter-spacing: 0.1em; color: rgba(223, 227, 216, 0.55); }
.bm-footer { margin-top: auto; padding: 18px 0 20px; position: sticky; bottom: 0; background: linear-gradient(180deg, transparent, #1f2321 30%); }
.bm-build {
  width: 100%; min-height: 52px; border-radius: 12px;
  border: 1px dashed rgba(223, 227, 216, 0.3); background: none;
  color: rgba(223, 227, 216, 0.6);
  font-family: "Special Elite", cursive; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.bm-build.is-ready {
  border: 0; cursor: pointer; color: #fbf7e6;
  background: linear-gradient(180deg, #6c8146, #5f7340 62%, #34431f 160%);
  box-shadow: 0 4px 0 #34431f;
}
.bm-build.is-ready:active { transform: translateY(2px); box-shadow: 0 2px 0 #34431f; }
.bm-footer { background: none; position: static; }
.base-plan-detail .base-module-open { white-space: nowrap; font-size: 0.9rem; gap: 6px; padding-left: 14px; padding-right: 14px; }


/* =====================================================================
   Etappe 9a: Loot-Fenster im Fokus (schwarzer Grund, Panel oben, 2 Drop-Zonen)
   ===================================================================== */
.building-loot-overlay {
  position: fixed;
  padding: 12px 12px 0;
  justify-content: flex-start;
  align-items: center;
  background: rgba(0, 0, 0, 0.97);
}
.building-loot-panel {
  flex: 0 1 auto;
  width: min(100%, 560px);
  min-height: 0;
  max-height: calc(100% - 112px);
  border: 1px solid rgba(226, 211, 177, 0.2);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
.building-loot-panel::before { display: none; }
.building-loot-panel .building-room-toolbar { padding: 14px 16px 10px; }
.building-loot-grid { flex: 1 1 auto; min-height: 96px; max-height: none; overflow-y: auto; }
.building-loot-grid .building-loot-tile { cursor: grab; user-select: none; -webkit-touch-callout: none; }
.building-loot-drop-overlay {
  width: min(100%, 560px);
  height: auto;
  margin: 12px 0 0;
  padding: 0;
  background: none;
  overflow: visible;
}
.building-loot-drop-zone { min-height: 64px; }
.building-loot-grid .item-tile .item-bonus-corner { z-index: 2; }

/* Lager-Sheet: Ziehen zwischen Lager und Rucksack */
.storage-section.is-drop-target { outline: 2px dashed rgba(143, 168, 99, 0.55); outline-offset: 4px; border-radius: 12px; }
.storage-section.is-hover { background: rgba(143, 168, 99, 0.12); }
.storage-section .item-tile.dragging { opacity: 0.35; }
.storage-section .sheet-tile .item-tile { cursor: grab; }

/* ---------- 10a: Statusleiste zweizeilig – Wetter oben (alle Werte), Stats darunter, volle Breite ---------- */
.app-status-bar .compact-weather-display {
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
}

.app-status-bar .compact-weather-row {
  order: 1;
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
  gap: 8px;
  min-width: 0;
}

.app-status-bar .compact-player-stats {
  order: 2;
  width: 100%;
  max-width: none;
  flex: 0 0 auto;
}

.app-status-bar .compact-weather-summary {
  flex: 0 1 auto;
  min-width: 0;
}

.app-status-bar .compact-weather-desc {
  display: inline;
}

.app-status-bar .compact-weather-values {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
}

.app-status-bar .compact-weather-values .compact-weather-chip,
.app-status-bar .compact-weather-values .compact-weather-chip:not(:first-child) {
  display: inline-flex;
}

.app-status-bar .compact-weather-values .compact-weather-chip:first-child i {
  display: inline-block;
}

.app-status-bar .compact-weather-location {
  margin-left: auto;
}

@media (max-width: 719px) {
  .app-status-bar .compact-weather-desc,
  .app-status-bar .compact-weather-values .compact-weather-chip:not(:first-child) {
    display: inline-flex;
  }
  .app-status-bar .compact-weather-values .compact-weather-chip:first-child i {
    display: inline-block;
  }
  .app-status-bar .compact-weather-row { font-size: 11px; }
}

@media (min-width: 720px) {
  .app-status-bar .compact-player-stats { max-width: none; }
  .app-status-bar .compact-weather-row { margin-left: 0; }
}

@media (min-width: 720px) {
  .app-status-bar .compact-weather-display { padding-inline: 16px; }
}

/* ---------- 10a-2: Wetterzeile (auch mobil) – alle Elemente gleichmäßig per Space-Between verteilt ---------- */
.app-status-bar .compact-weather-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}
.app-status-bar .compact-weather-values {
  display: contents;
}
.app-status-bar .compact-weather-summary {
  flex: 0 1 auto;
  min-width: 0;
}
.app-status-bar .compact-weather-condition {
  min-width: 0;
  max-width: 100%;
}
.app-status-bar .compact-weather-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.app-status-bar .compact-weather-chip {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* ---------- 10b: Desktop – auf 1200px zentriert, Wetter links (50 %), Stats rechts (50 %) in einer Zeile ---------- */
@media (min-width: 720px) {
  .app-status-bar .compact-weather-display {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding-inline: max(16px, calc((100vw - 1200px) / 2));
  }
  .app-status-bar .compact-weather-row {
    order: 1;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    justify-content: space-between;
  }
  /* Wetter-Elemente (Zustand + Chips) direkt als Flex-Kinder der Zeile -> gleichmäßig verteilt */
  .app-status-bar .compact-weather-values {
    display: contents;
  }
  .app-status-bar .compact-weather-row {
    gap: 0;
  }
  .app-status-bar .compact-weather-summary {
    flex: 0 0 auto;
  }
  .app-status-bar .compact-player-stats {
    order: 2;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
  }
}

/* =====================================================================
   Etappe 11a – Basis-Übersicht nach Entwurf (Foto-Kopf, Fortschritt,
   Tätigkeiten, Stationen, Ausbau-Hinweis)
   ===================================================================== */
#app-screen-base { background: #1c201e; }
#app-screen-base .user-base-card { background: #1c201e; border: 0; border-radius: 0; box-shadow: none; }

/* Kopf: Foto, Zustands-Chip und Betreten/Verlassen, Titel, Fortschritt */
#app-screen-base .user-base-hero {
  min-height: 262px;
  background: linear-gradient(160deg, #262e2a, #1c201e);
}
@media (min-width: 900px) {
  #app-screen-base .user-base-hero { min-height: 660px; }
}
#app-screen-base .user-base-card.is-inside .user-base-street-view:not([hidden]),
#app-screen-base .user-base-card.is-inside .user-base-scene-shade { display: block; }
#app-screen-base .base-mode-stage { display: none !important; }
#app-screen-base .user-base-street-view img {
  filter: saturate(0.6) contrast(1.05) brightness(0.78);
  object-position: 50% 40%;
}
#app-screen-base .user-base-scene-shade {
  background: linear-gradient(180deg, rgba(28, 32, 30, 0.55) 0%, rgba(28, 32, 30, 0) 30%, rgba(28, 32, 30, 0.35) 60%, #1c201e 100%);
}
#app-screen-base .user-base-header { padding: 0 18px 4px; max-width: none; }
#app-screen-base .user-base-kicker {
  margin: 0;
  color: rgba(232, 235, 226, 0.55);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
}
#app-screen-base .user-base-title {
  margin: 4px 0 0;
  color: #f3f1e8;
  font-family: var(--font-display, "Special Elite", cursive);
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}
#app-screen-base .user-base-title.is-long { font-size: 28px; }
#app-screen-base .user-base-title.is-very-long { font-size: 23px; }
#app-screen-base .user-base-info,
#app-screen-base .user-base-status { display: none; }
#app-screen-base .user-base-card:not(.has-base) .user-base-header,
#app-screen-base .user-base-card:not(.has-base) .user-base-title { color: #f3f1e8; text-shadow: none; }
#app-screen-base .user-base-card:not(.has-base) .user-base-kicker { color: rgba(232, 235, 226, 0.55); }

#app-screen-base .ub-top {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
#app-screen-base .ub-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(232, 235, 226, 0.28);
  background: rgba(20, 24, 22, 0.7);
  color: rgba(232, 235, 226, 0.75);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
#app-screen-base .ub-dot { width: 7px; height: 7px; border-radius: 999px; background: rgba(232, 235, 226, 0.4); }
#app-screen-base .ub-chip.is-inside,
#app-screen-base .ub-chip.is-near { border-color: rgba(143, 168, 99, 0.55); color: #b9cf8f; }
#app-screen-base .ub-chip.is-inside .ub-dot,
#app-screen-base .ub-chip.is-near .ub-dot { background: #8fa863; box-shadow: 0 0 8px #8fa863; }
#app-screen-base .ub-chip[hidden] { display: none; }

#app-screen-base #user-base-presence-actions {
  position: static;
  display: flex;
  align-items: center;
  margin: 0 0 0 auto;
  padding: 0;
}
#app-screen-base .ub-pill.btn {
  width: auto;
  min-height: 30px;
  height: 30px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgba(232, 235, 226, 0.28);
  border-radius: 999px;
  background: rgba(20, 24, 22, 0.7);
  color: rgba(232, 235, 226, 0.75);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: none;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  filter: none;
  transform: none;
}
#app-screen-base .ub-pill.btn.is-primary { border-color: rgba(143, 168, 99, 0.55); color: #b9cf8f; }
#app-screen-base .ub-pill.btn:hover:not(:disabled) { background: rgba(20, 24, 22, 0.85); }
#app-screen-base .ub-pill.btn:disabled { opacity: 0.6; border-style: dashed; }
#app-screen-base .ub-pill.btn:active:not(:disabled) { transform: translateY(1px); }

#app-screen-base .ub-progress { margin-top: 10px; }
#app-screen-base .ub-progress-text {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 800;
  text-shadow: none;
}
#app-screen-base .ub-progress-text > span:first-child { color: #f3f1e8; }
#app-screen-base .ub-progress-text i { color: #b9cf8f; }
#app-screen-base .ub-progress-next { color: rgba(232, 235, 226, 0.6); font-weight: 700; }
#app-screen-base .ub-progress-bar { margin-top: 6px; display: flex; gap: 3px; }
#app-screen-base .ub-progress-bar > span {
  position: relative;
  flex-basis: 0;
  height: 5px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(232, 235, 226, 0.15);
}
#app-screen-base .ub-progress-bar i { position: absolute; inset: 0 auto 0 0; background: #8fa863; }
#app-screen-base .ub-progress-bar i[style*="width:100%"] { background: #6c8146; }

/* Inhalt: Tätigkeiten, Stationen, Ausbau */
#app-screen-base .user-base-content {
  min-height: 0;
  padding: 0 18px 18px;
  gap: 0;
}
#app-screen-base .user-base-controls { display: contents; }
#app-screen-base .base-section-panels { order: 1; }
#app-screen-base .base-section-tabs { order: 2; }
#app-screen-base .base-section-tools { order: 3; }

#app-screen-base .relation-task-panel--base { padding: 0; margin-top: 16px; color: #f3f1e8; }
#app-screen-base .relation-task-panel--base .task-actions-header {
  margin: 0 0 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
#app-screen-base .relation-task-panel--base .task-actions-header h2 { display: none; }
#app-screen-base .relation-task-panel--base .task-actions-kicker {
  color: #b9cf8f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
#app-screen-base .base-task-count { font-size: 11px; font-weight: 700; color: rgba(232, 235, 226, 0.55); }
#app-screen-base .relation-task-panel--base .task-actions-header-icon { display: none; }

/* Kacheln: grün mit rundem Start-Knopf; „Basis umziehen“ als schmale Zeile */
.relation-task-panel--base [data-task-action-grid] .task-action-card.task-action-card--compact:not(.is-locked) {
  border-radius: 16px;
}
.relation-task-panel--base .task-action-card--compact:not(.is-locked) .task-action-glyph { font-size: 30px; }
.relation-task-panel--base .task-action-card--compact:not(.is-locked) .task-action-name { font-size: 15.5px; line-height: 1.05; }
.relation-task-panel--base .task-action-card--compact:not(.is-locked) .task-action-meta { margin-top: 3px; font-size: 11.5px; font-weight: 800; }
.relation-task-panel--base .task-action-card--compact:not(.is-locked) .task-action-reward { display: none; }
.relation-task-panel--base .task-action-card--compact:not(.is-locked) .task-action-chevron {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #5f7340;
  color: #fbf7e6;
  font-size: 12px;
}
.relation-task-panel--base [data-task-action-grid] .task-action-card--row.task-action-card--compact {
  order: 99;
  grid-column: 1 / -1;
  min-height: 44px;
  padding: 0 14px;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(232, 235, 226, 0.14);
  border-radius: 12px;
  background: rgba(40, 45, 42, 0.9);
  box-shadow: none;
}
.relation-task-panel--base .task-action-card--row .task-action-glyph { order: 0; font-size: 16px !important; color: #b9cf8f !important; }
.relation-task-panel--base .task-action-card--row .task-action-name { order: 1; flex: 1; margin: 0; padding: 0; font-family: inherit; font-size: 13px !important; font-weight: 700; text-align: left; }
.relation-task-panel--base .task-action-card--row .task-action-meta { order: 2; margin: 0; font-size: 11.5px !important; color: rgba(232, 235, 226, 0.6) !important; }
.relation-task-panel--base .task-action-card--row .task-action-chevron { display: none !important; }

/* Stationen */
#app-screen-base .base-section-tabs {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
#app-screen-base #base-tasks-tab { display: none; }
#app-screen-base .user-base-controls .base-section-tab {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 10px 4px 9px;
  border: 1px solid rgba(232, 235, 226, 0.12);
  border-radius: 12px;
  background: rgba(40, 45, 42, 0.9);
  color: #f3f1e8;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}
#app-screen-base .base-section-tab i { margin: 0; font-size: 20px; color: #b9cf8f; }
#app-screen-base .base-section-tab small {
  margin: 0;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #8fa863;
  opacity: 1;
  text-transform: uppercase;
}
#app-screen-base .user-base-controls .base-section-tab:disabled { opacity: 1; }
#app-screen-base .user-base-controls .base-section-tab:disabled > span { color: rgba(243, 241, 232, 0.5); }
#app-screen-base .user-base-controls .base-section-tab:disabled i { color: rgba(185, 207, 143, 0.4); }
#app-screen-base .user-base-controls .base-section-tab:disabled small { color: rgba(232, 235, 226, 0.4); }
#app-screen-base .user-base-controls .base-section-tab.is-away small { color: rgba(232, 235, 226, 0.6); }
#app-screen-base .user-base-controls .base-section-tab.is-active:not(#base-tasks-tab) {
  border-color: #8fa863;
  background: linear-gradient(160deg, rgba(95, 115, 64, 0.5), rgba(40, 46, 42, 0.95));
  color: #fbf7e6;
  box-shadow: none;
}
#app-screen-base .user-base-controls .base-storage-station.is-full { border-color: rgba(185, 58, 51, 0.55); }
#app-screen-base .base-storage-station.is-full i,
#app-screen-base .base-storage-station.is-full small { color: #e57a71; }
#app-screen-base .user-base-controls .base-storage-station:disabled { cursor: not-allowed; }

/* Ausbau-Hinweis */
#app-screen-base .base-section-tools { margin-top: 10px; display: block; }
#app-screen-base .user-base-controls .base-build-shortcut {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed rgba(143, 168, 99, 0.6);
  border-radius: 14px;
  background: none;
  color: #f3f1e8;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: inherit;
  text-align: left;
}
#app-screen-base .base-build-shortcut i { margin: 0; color: #b9cf8f; }
#app-screen-base .base-build-shortcut .base-build-icon { font-size: 20px; }
#app-screen-base .base-build-shortcut > i:last-child { color: rgba(232, 235, 226, 0.6); }
#app-screen-base .base-build-text { flex: 1; min-width: 0; display: block; }
#app-screen-base .base-build-text small {
  display: block;
  margin: 0;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #8fa863;
  opacity: 1;
  text-transform: uppercase;
}
#app-screen-base .base-build-text b { display: block; font-size: 12.5px; font-weight: 700; }

@media (min-width: 720px) {
  #app-screen-base .user-base-header,
  #app-screen-base .user-base-content { padding-inline: max(18px, calc((100% - 1200px) / 2)); }
  #app-screen-base .ub-top { left: max(18px, calc((100% - 1200px) / 2)); right: max(18px, calc((100% - 1200px) / 2)); }
  #app-screen-base .user-base-header { padding-bottom: 6px; }
  #app-screen-base .ub-progress { max-width: 420px; }
  #app-screen-base .base-section-tabs { max-width: 640px; }
  #app-screen-base .base-section-tools { max-width: 640px; }
}

#app-screen-base .user-base-meta { display: none; }
.relation-task-panel--base [data-task-action-grid] .task-action-card.task-action-card--row.task-action-card--compact:not(.is-locked) {
  order: 99;
  grid-column: 1 / -1;
  min-height: 44px;
  padding: 0 14px;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(232, 235, 226, 0.14);
  border-radius: 12px;
  background: rgba(40, 45, 42, 0.9);
  box-shadow: none;
}
.relation-task-panel--base .task-action-card--row:not(.is-locked) .task-action-glyph { font-size: 16px; color: #b9cf8f; }
.relation-task-panel--base .task-action-card--row:not(.is-locked) .task-action-name { font-size: 13px; }
.relation-task-panel--base .task-action-card--row:not(.is-locked) .task-action-meta { margin: 0; font-size: 11.5px; color: rgba(232, 235, 226, 0.6); }

/* Station geöffnet: Stationsleiste steht oben und dient als Umschalter (erneut tippen = zurück) */
#app-screen-base .user-base-content:has(.base-section-panel:not(#base-tasks-panel):not([hidden])) .base-section-tabs { order: 0; margin-top: 14px; }
#app-screen-base .user-base-content:has(.base-section-panel:not(#base-tasks-panel):not([hidden])) .base-section-panels { margin-top: 14px; }
#app-screen-base .base-cooking-header .task-actions-kicker { color: #8fa863; }

@media (min-width: 720px) {
  #app-screen-base .base-section-tabs,
  #app-screen-base .base-section-tools { max-width: none; }
  #app-screen-base .ub-progress { max-width: 480px; }
}

/* Mobil steht die Adresse unter dem Foto, damit der Bildbereich frei bleibt. */
@media (max-width: 899px) {
  #app-screen-base .user-base-card.has-base .user-base-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 262px auto;
    align-items: stretch;
  }
  #app-screen-base .user-base-card.has-base .user-base-street-view,
  #app-screen-base .user-base-card.has-base .user-base-scene-shade {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
  }
  #app-screen-base .user-base-card.has-base .user-base-scene-shade {
    background: linear-gradient(180deg, rgba(28, 32, 30, 0.3), transparent 40%);
  }
  #app-screen-base .user-base-card.has-base .user-base-header {
    grid-column: 1;
    grid-row: 2;
    padding: 16px 18px;
    background: #1c201e;
    text-shadow: none;
  }
}

/* ---------- 11b: Ausbau auf dem Desktop – Bauplan links, Modul-Detail als Seitenpanel ---------- */
@media (min-width: 1000px) {
  #base-infrastructure-overlay .base-infrastructure-panel { width: min(1280px, 100%); }
  .base-plan-desk { display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: stretch; min-height: 100%; }
  .base-plan-desk-main { min-width: 0; padding-right: 28px; }
  .base-plan-desk-side.base-plan-detail {
    margin: 0;
    padding: 4px 0 0 28px;
    border-left: 1px solid rgba(143, 168, 99, 0.5);
    background: none;
    display: flex;
    flex-direction: column;
  }
  .base-plan-desk-side .bm-detail { flex: 1; min-height: 0; }
  .bm-inline .bm-hero { margin-top: 0; }
  .bm-inline .bm-hero-icon { flex-basis: 72px; height: 72px; }
  .bm-inline .bm-hero-icon > i { font-size: 2.3rem; }
  .bm-inline .bm-hero-icon span { display: none; }
  .bm-inline .bm-hero-text h1 { font-size: 1.9rem; }
  .bm-inline .bm-after { margin-top: 18px; }
  .bm-inline .bm-tiles { grid-template-columns: repeat(5, 1fr); }
  .bm-inline .bm-footer { padding-bottom: 8px; }
}

/* ---------- 12a: Stationsleiste steht über den Tätigkeiten ---------- */
#app-screen-base .base-section-tabs { order: 0; margin-top: 16px; }
#app-screen-base .base-section-panels { order: 1; }
#app-screen-base .base-section-tools { order: 2; }
#app-screen-base .user-base-content:has(.base-section-panel:not(#base-tasks-panel):not([hidden])) .base-section-panels { margin-top: 14px; }

/* =====================================================================
   Etappe 12b – Werkstatt: Baupläne zuerst, Werkzeugwand dahinter
   ===================================================================== */
#app-screen-base #base-workshop-panel {
  padding: 16px 14px 18px;
  border: 1px solid rgba(223, 227, 216, 0.26);
  border-radius: 16px;
  background-color: #1f2321;
  background-image:
    linear-gradient(rgba(223, 227, 216, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(223, 227, 216, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(223, 227, 216, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(223, 227, 216, 0.08) 1px, transparent 1px);
  background-size: 14px 14px, 14px 14px, 70px 70px, 70px 70px;
  color: #dfe3d8;
}
#base-workshop-panel .base-cooking-header { margin-bottom: 14px; }
#base-workshop-panel .base-cooking-header .task-actions-kicker { color: rgba(223, 227, 216, 0.6); letter-spacing: 0.16em; }
#base-workshop-panel .base-cooking-header h2 { color: #eef0e8; font-size: 30px; }
#base-workshop-panel .base-cooking-header p { color: rgba(223, 227, 216, 0.7); font-size: 12px; }
#base-workshop-panel .base-cooking-header > i {
  border: 1px dashed rgba(223, 227, 216, 0.5);
  border-radius: 8px;
  background: none;
  color: #dfe3d8;
}

#base-workshop-panel .ws { display: flex; flex-direction: column; gap: 16px; }
#base-workshop-panel .ws-plans { display: flex; flex-direction: column; gap: 14px; }
#base-workshop-panel .ws-empty { margin: 8px 0; color: rgba(223, 227, 216, 0.6); font-size: 12px; }
#base-workshop-panel button:disabled { opacity: 1; }

#base-workshop-panel .ws-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px dashed rgba(232, 184, 106, 0.55);
  border-radius: 10px;
  background: rgba(232, 184, 106, 0.07);
  color: #f0c27a;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
}
#base-workshop-panel .ws-note span { flex: 1; }
#base-workshop-panel .ws-note button {
  min-height: 0; padding: 4px 10px; border: 1px solid #e8b86a; border-radius: 999px;
  background: none; color: #f0c27a; font: inherit; font-size: 11px; font-weight: 800;
}

/* Bauplanblatt */
#base-workshop-panel .ws-plan {
  position: relative;
  padding: 14px 14px 14px;
  border: 1px solid rgba(223, 227, 216, 0.42);
  background: rgba(223, 227, 216, 0.025);
}
#base-workshop-panel .ws-plan::before,
#base-workshop-panel .ws-plan::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 0 solid #8fa863;
}
#base-workshop-panel .ws-plan::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
#base-workshop-panel .ws-plan::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }
#base-workshop-panel .ws-plan.is-ready { border-color: rgba(143, 168, 99, 0.8); }
#base-workshop-panel .ws-plan-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 10px; font-weight: 900; letter-spacing: 0.16em; }
#base-workshop-panel .ws-plan-no { color: rgba(223, 227, 216, 0.62); }
#base-workshop-panel .ws-plan-state { color: #f0c27a; letter-spacing: 0.1em; text-transform: uppercase; }
#base-workshop-panel .ws-plan.is-ready .ws-plan-state { color: #b9cf8f; }
#base-workshop-panel .ws-draw { margin-top: 10px; display: flex; gap: 14px; align-items: center; }
#base-workshop-panel .ws-draw-frame {
  position: relative;
  flex: 0 0 92px;
  height: 92px;
  border: 1.5px dashed rgba(223, 227, 216, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
#base-workshop-panel .ws-draw-frame img { width: 64px; height: 64px; object-fit: contain; }
#base-workshop-panel .ws-dim {
  position: absolute; left: -1px; right: -1px; bottom: -17px;
  text-align: center; font-size: 9px; color: rgba(223, 227, 216, 0.5); white-space: nowrap;
}
#base-workshop-panel .ws-draw-text { min-width: 0; flex: 1; }
#base-workshop-panel .ws-draw-text h4 { margin: 0; font-family: "Special Elite", cursive; font-size: 22px; font-weight: 400; line-height: 1.05; color: #eef0e8; }
#base-workshop-panel .ws-draw-text p { margin: 6px 0 0; font-size: 11.5px; line-height: 1.4; color: rgba(223, 227, 216, 0.72); }
#base-workshop-panel .ws-draw-text small { display: block; margin-top: 6px; font-size: 11px; font-weight: 800; color: #b9cf8f; }
#base-workshop-panel .ws-plan .bm-sec { margin-top: 24px; }
#base-workshop-panel .ws-plan .bm-sec + .bm-tiles,
#base-workshop-panel .ws-plan .bm-sec + .bm-cost { margin-top: 8px; }
#base-workshop-panel .ws-plan .bm-sec ~ .bm-sec { margin-top: 16px; }
#base-workshop-panel .ws-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#base-workshop-panel .ws-tiles .bm-t small { display: block; }
#base-workshop-panel .ws-tiles .ws-sub { margin-top: -2px; font-size: 9.5px; color: rgba(223, 227, 216, 0.5); }
#base-workshop-panel .bm-b img { width: 52px; height: 52px; object-fit: contain; }
#base-workshop-panel .ws-where { margin: 12px 0 0; font-size: 10.5px; line-height: 1.4; color: rgba(223, 227, 216, 0.5); }
#base-workshop-panel .ws-missing { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
#base-workshop-panel .ws-missing li {
  padding: 3px 9px; border: 1px dashed rgba(232, 184, 106, 0.6); border-radius: 999px;
  font-size: 10.5px; font-weight: 800; color: #f0c27a;
}
#base-workshop-panel .ws-plan .bm-build { margin-top: 14px; }

/* Werkzeugwand: ruhig, eingeklappt */
#base-workshop-panel .ws-tools { border: 1px solid rgba(223, 227, 216, 0.2); border-radius: 12px; background: rgba(36, 41, 38, 0.82); overflow: hidden; }
#base-workshop-panel .ws-tools-head {
  width: 100%; min-height: 0; margin: 0; padding: 10px 12px;
  display: flex; align-items: center; gap: 12px;
  border: 0; border-radius: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
#base-workshop-panel .ws-tools-head > i:first-child { font-size: 20px; color: #b9cf8f; }
#base-workshop-panel .ws-tools-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
#base-workshop-panel .ws-tools-title small { font-size: 9.5px; font-weight: 900; letter-spacing: 0.14em; color: #8fa863; }
#base-workshop-panel .ws-tools-title b { font-size: 12.5px; font-weight: 700; color: #f3f1e8; }
#base-workshop-panel .ws-tools-thumbs { display: flex; }
#base-workshop-panel .ws-tools-thumbs img { width: 24px; height: 24px; margin-left: -6px; object-fit: contain; border-radius: 50%; background: #2a302d; border: 1px solid rgba(143, 168, 99, 0.6); }
#base-workshop-panel .ws-tools-chev { color: rgba(223, 227, 216, 0.6); font-size: 13px; }
#base-workshop-panel .ws-tools-body { padding: 0 12px 14px; border-top: 1px solid rgba(223, 227, 216, 0.1); }
#base-workshop-panel .ws-tools-intro { margin: 10px 0 0; font-size: 11px; line-height: 1.45; color: rgba(223, 227, 216, 0.62); }
#base-workshop-panel .ws-tools-intro i { color: #e8b86a; }
#base-workshop-panel .ws-chips { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
#base-workshop-panel .ws-chip {
  min-height: 0; padding: 5px 11px; border: 1px solid rgba(223, 227, 216, 0.25); border-radius: 999px;
  background: none; color: rgba(223, 227, 216, 0.8); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer;
}
#base-workshop-panel .ws-chip.is-active { border-color: #8fa863; background: rgba(95, 115, 64, 0.35); color: #fbf7e6; }
#base-workshop-panel .ws-tool-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
#base-workshop-panel .ws-tool {
  position: relative; min-height: 0; margin: 0; padding: 7px 3px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: 1.5px solid #8fa863; border-radius: 11px;
  background: rgba(95, 115, 64, 0.16); color: #f3f1e8; font: inherit; text-align: center; cursor: pointer;
}
#base-workshop-panel .ws-tool:disabled { cursor: default; }
#base-workshop-panel .ws-tool-img { position: relative; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
#base-workshop-panel .ws-tool-img img { width: 44px; height: 44px; object-fit: contain; }
#base-workshop-panel .ws-tool b { max-width: 100%; font-size: 9.5px; font-weight: 700; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#base-workshop-panel .ws-tool-state { font-size: 9px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: #b9cf8f; }
#base-workshop-panel .ws-tool-bar { width: 70%; height: 3px; border-radius: 2px; background: rgba(223, 227, 216, 0.15); overflow: hidden; }
#base-workshop-panel .ws-tool-bar i { display: block; height: 100%; background: #8fa863; }
#base-workshop-panel .ws-tool.is-empty { border: 1.5px dashed rgba(223, 227, 216, 0.3); background: none; }
#base-workshop-panel .ws-tool.is-empty .ws-tool-img img { opacity: 0.38; filter: grayscale(1); }
#base-workshop-panel .ws-tool.is-empty b { color: rgba(223, 227, 216, 0.6); }
#base-workshop-panel .ws-tool.is-empty .ws-tool-state { color: rgba(223, 227, 216, 0.4); }
#base-workshop-panel .ws-tool-plus { position: absolute; right: -2px; bottom: -2px; width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #1f2321; border: 1px solid rgba(223, 227, 216, 0.45); color: #dfe3d8; font-size: 8px; }
#base-workshop-panel .ws-tool.is-defective { border-color: #e8b86a; background: rgba(232, 184, 106, 0.1); }
#base-workshop-panel .ws-tool.is-defective .ws-tool-state { color: #f0c27a; }
#base-workshop-panel .ws-tool.is-defective .ws-tool-bar i { background: #e8b86a; }
#base-workshop-panel .ws-tool-need { position: absolute; top: 4px; right: 5px; font-size: 10px; color: #e8b86a; }
#base-workshop-panel .ws-tool.is-empty.is-needed { border-color: rgba(232, 184, 106, 0.6); }

@media (min-width: 720px) {
  #base-workshop-panel .ws { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  #base-workshop-panel .ws-note { grid-column: 1 / -1; margin: 0; }
  #base-workshop-panel .ws-tool-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Werkzeug entnehmen (Sheet) */
.base-workshop-destinations { display: grid; gap: 10px; margin-top: 12px; }
.base-workshop-destinations button {
  min-height: 52px; padding: 0 16px; border: 1px solid rgba(143, 168, 99, 0.6); border-radius: 12px;
  background: rgba(95, 115, 64, 0.28); color: #f3f1e8; font-family: "Special Elite", cursive; font-size: 15px; text-align: left;
}
#base-workshop-panel .ws-draw-text h4 { font-size: 19px; overflow-wrap: anywhere; hyphens: auto; }
#base-workshop-panel .ws-tool b { white-space: normal; overflow-wrap: anywhere; hyphens: auto; font-size: 9px; min-height: 2.3em; display: flex; align-items: center; justify-content: center; }

/* =====================================================================
   Etappe 12c – Kochstelle: Herd mit Spiralplatten, Fliesenspiegel
   ===================================================================== */
#app-screen-base #base-cooking-panel {
  padding: 16px 14px 18px;
  border: 1px solid rgba(236, 230, 216, 0.14);
  border-radius: 16px;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(229, 110, 40, 0.16), transparent 70%),
    linear-gradient(rgba(236, 230, 216, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 230, 216, 0.045) 1px, transparent 1px),
    #1b1e1f;
  background-size: auto, 30px 30px, 30px 30px, auto;
  color: #ece6d8;
}
#base-cooking-panel .base-cooking-header .task-actions-kicker { color: #e58a32; }
#base-cooking-panel .base-cooking-header h2 { color: #f6efe0; }
#base-cooking-panel .base-cooking-header p { color: rgba(236, 230, 216, 0.7); }
#base-cooking-panel .base-cooking-header > i { border: 1px solid rgba(229, 138, 50, 0.5); background: rgba(229, 138, 50, 0.12); color: #f0a35a; box-shadow: 0 0 16px rgba(229, 110, 40, 0.25); }

#base-cooking-panel .base-cooking-station {
  border: 1px solid #3b4144;
  border-radius: 14px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
    linear-gradient(145deg, #2c3133, #181b1c 75%);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
#base-cooking-panel .base-cooking-station-head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.3);
  color: #f0e6d0;
}
#base-cooking-panel .base-cooking-heat { gap: 8px; }
#base-cooking-panel .base-cooking-heat i {
  width: 16px; height: 16px;
  border: 2px solid #5b6163;
  background: radial-gradient(circle at 50% 30%, #3a3f41, #15181a);
  box-shadow: inset 0 0 0 2px #0e1011;
  position: relative;
}
#base-cooking-panel .base-cooking-heat i::after { content: ""; position: absolute; left: 50%; top: 1px; width: 2px; height: 5px; margin-left: -1px; background: #8e9496; }
#base-cooking-panel .base-cooking-heat i:nth-child(1) { border-color: #e58a32; box-shadow: 0 0 10px rgba(229, 110, 40, 0.65), inset 0 0 0 2px #0e1011; opacity: 1; }
#base-cooking-panel .base-cooking-heat i:nth-child(1)::after { background: #f0a35a; }
#base-cooking-panel .base-cooking-heat i:nth-child(2) { opacity: 0.8; }
#base-cooking-panel .base-cooking-heat i:nth-child(3) { opacity: 0.55; }

/* Platten */
#base-cooking-panel .base-cooking-grid { gap: 10px; }
#base-cooking-panel .base-cooking-slot,
#base-cooking-panel .base-cooking-result-slot {
  position: relative;
  min-height: 132px;
  border: 1px solid #343a3d;
  border-radius: 14px;
  background: #121516;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
#base-cooking-panel .base-cooking-slot.is-empty { border-style: solid; }
#base-cooking-panel .base-cooking-slot::before,
#base-cooking-panel .base-cooking-result-slot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82%;
  aspect-ratio: 1;
  max-height: 82%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #0b0d0e 0 3px, #2f3538 3px 5px);
  box-shadow: 0 0 0 3px #1d2123, inset 0 0 14px rgba(0, 0, 0, 0.85);
  opacity: 0.85;
  pointer-events: none;
}
#base-cooking-panel .base-cooking-slot > *,
#base-cooking-panel .base-cooking-result-slot > * { position: relative; z-index: 1; }
#base-cooking-panel .base-cooking-slot > .base-cooking-slot-number { position: absolute; z-index: 2; }
#base-cooking-panel .base-cooking-slot > .base-cooking-slot-remove { position: absolute; z-index: 2; }
#base-cooking-panel .base-cooking-slot.is-filled {
  border-color: rgba(229, 110, 40, 0.55);
  background: #1a1210;
  box-shadow: inset 0 0 22px rgba(229, 110, 40, 0.16), 0 0 14px rgba(229, 110, 40, 0.22);
}
#base-cooking-panel .base-cooking-slot.is-filled::before {
  background: repeating-radial-gradient(circle, #3a160a 0 3px, #e5622a 3px 5px);
  box-shadow: 0 0 0 3px #2a1510, 0 0 20px rgba(229, 110, 40, 0.5), inset 0 0 12px rgba(0, 0, 0, 0.7);
  opacity: 0.55;
}
#base-cooking-panel .base-cooking-slot.is-empty > i { color: rgba(236, 230, 216, 0.55); text-shadow: 0 0 6px #000; }
#base-cooking-panel .base-cooking-slot-select,
#base-cooking-panel .base-cooking-slot strong { text-shadow: 0 1px 4px #000; }
#base-cooking-panel .base-cooking-slot.is-drop-target { border-color: #f0a35a; }

/* Ergebnis: Teller */
#base-cooking-panel .base-cooking-result-slot::before {
  background: radial-gradient(circle, #34302a 0 46%, #d9d2bf 47% 57%, #b7b09c 58% 62%, #efe9d8 63% 100%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.55);
  opacity: 0.92;
  width: 88%;
  max-height: 88%;
}
#base-cooking-panel .base-cooking-result-slot.is-ready { border-color: rgba(229, 138, 50, 0.6); background: #1a1713; }
#base-cooking-panel .base-cooking-result-slot > i { color: rgba(236, 230, 216, 0.7); }
#base-cooking-panel .base-cooking-result-slot strong,
#base-cooking-panel .base-cooking-result-slot small { text-shadow: 0 1px 4px #000; }
#base-cooking-panel .base-cooking-arrow { color: #e58a32; filter: drop-shadow(0 0 6px rgba(229, 110, 40, 0.5)); }
#base-cooking-panel .base-cooking-label { color: rgba(240, 230, 208, 0.7); }

/* =====================================================================
   Etappe 12d – Werkbank: Holzplatte, Lochwand, Messing
   ===================================================================== */
#app-screen-base #base-workbench-panel {
  padding: 16px 14px 18px;
  border: 1px solid #5a4430;
  border-radius: 16px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0 2px, transparent 2px 76px),
    repeating-linear-gradient(0deg, rgba(255, 232, 190, 0.035) 0 1px, transparent 1px 6px),
    linear-gradient(180deg, #3a2b1f, #261c14);
  color: #f0e6d0;
}
#base-workbench-panel .base-cooking-header .task-actions-kicker { color: #c8a873; }
#base-workbench-panel .base-cooking-header h2 { color: #f6efe0; }
#base-workbench-panel .base-cooking-header p { color: rgba(240, 230, 208, 0.72); }
#base-workbench-panel .base-cooking-header > i { border: 1px solid #c8a873; border-radius: 8px; background: rgba(200, 168, 115, 0.14); color: #e0c58f; }

#base-workbench-panel .base-workbench-modes { display: flex; gap: 6px; margin-bottom: 12px; }
#base-workbench-panel .base-workbench-modes button {
  flex: 1; min-height: 40px; padding: 0 10px; border: 1px solid #6a5238; border-radius: 8px;
  background: #1f1710; color: rgba(240, 230, 208, 0.75); font: inherit; font-size: 12px; font-weight: 800;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}
#base-workbench-panel .base-workbench-modes button[aria-pressed="true"] {
  border-color: #e0c58f; background: linear-gradient(180deg, #d9bb82, #b08d58); color: #2a1e12;
  box-shadow: 0 2px 0 #6a5238; text-shadow: none;
}

#base-workbench-panel .base-cooking-station {
  border: 1px solid #5a4430;
  border-radius: 12px;
  background: linear-gradient(180deg, #2f2419, #231a12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 232, 190, 0.08);
}
#base-workbench-panel .base-cooking-station-head {
  border-bottom: 1px solid #5a4430;
  background: radial-gradient(circle, #130e09 2px, transparent 2.6px) 0 0 / 14px 14px, #4a3a2b;
  color: #f6efe0;
  text-shadow: 0 1px 2px #000;
}
#base-workbench-panel .base-cooking-label { color: rgba(240, 230, 208, 0.7); }
#base-workbench-panel .base-cooking-slot,
#base-workbench-panel .base-cooking-result-slot {
  border: 2px solid #5a4430;
  border-radius: 8px;
  background:
    radial-gradient(circle at 9px 9px, #c8a873 0 2.2px, transparent 2.8px),
    radial-gradient(circle at calc(100% - 9px) 9px, #c8a873 0 2.2px, transparent 2.8px),
    radial-gradient(circle at 9px calc(100% - 9px), #c8a873 0 2.2px, transparent 2.8px),
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), #c8a873 0 2.2px, transparent 2.8px),
    #1b140d;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.7);
}
#base-workbench-panel .base-cooking-slot.is-empty { border-style: solid; }
#base-workbench-panel .base-cooking-slot.is-empty > i { color: #c8a873; }
#base-workbench-panel .base-cooking-slot.is-filled { border-color: #c8a873; box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.6), 0 0 12px rgba(200, 168, 115, 0.25); }
#base-workbench-panel .base-cooking-slot.is-unused { opacity: 0.4; }
#base-workbench-panel .base-cooking-result-slot.is-ready { border-color: #e0c58f; background-color: #261d12; }
#base-workbench-panel .base-cooking-arrow { color: #c8a873; }
#base-workbench-panel .base-workbench-tools {
  margin-top: 10px; padding: 8px 10px 10px; border: 1px solid #5a4430; border-radius: 8px;
  background: radial-gradient(circle, #130e09 1.6px, transparent 2.2px) 0 0 / 12px 12px, #3a2e22;
}
#base-workbench-panel .base-workbench-tool { color: #f0e6d0; }
#base-workbench-panel .base-workbench-help { border-color: #5a4430; color: #f0e6d0; background: rgba(0, 0, 0, 0.18); }
#base-cooking-panel .base-cooking-result-slot::before { width: auto; height: 88%; max-height: none; aspect-ratio: 1; }
#base-workbench-panel .base-cooking-slot-number { top: 13px; left: 20px; color: rgba(240, 230, 208, 0.5); }
#base-workbench-panel .base-cooking-slot-remove { top: 14px; right: 18px; }

/* ---------- 12e: Kochstelle – Zutatenfelder als Edelstahl-Schalen statt Herdplatten ---------- */
#base-cooking-panel .base-cooking-grid {
  padding: 8px;
  gap: 8px;
  border: 2px solid #4b5256;
  border-radius: 12px;
  background: linear-gradient(145deg, #3a4144, #262b2d);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
#base-cooking-panel .base-cooking-slot {
  border: 1px solid #5a6367;
  border-radius: 8px;
  background: linear-gradient(180deg, #0f1213, #1a1e20);
  box-shadow: inset 0 0 0 3px #20252a, inset 0 5px 12px rgba(0, 0, 0, 0.75);
  overflow: visible;
}
#base-cooking-panel .base-cooking-slot::before { content: none; }
#base-cooking-panel .base-cooking-slot.is-empty > i { color: rgba(236, 230, 216, 0.5); text-shadow: none; }
#base-cooking-panel .base-cooking-slot.is-filled {
  border-color: #c9a36a;
  background: linear-gradient(180deg, #17120d, #221a12);
  box-shadow: inset 0 0 0 3px #2a2118, inset 0 5px 12px rgba(0, 0, 0, 0.6);
}
#base-cooking-panel .base-cooking-slot-select,
#base-cooking-panel .base-cooking-slot strong { text-shadow: none; }
#base-cooking-panel .base-cooking-result-slot::before { content: none; }
#base-cooking-panel .base-cooking-result-slot {
  border: 1px solid #5a6367;
  background: linear-gradient(180deg, #14110d, #1d1812);
  box-shadow: inset 0 0 0 3px #231d15, inset 0 5px 12px rgba(0, 0, 0, 0.6);
}
#base-cooking-panel .base-cooking-result-slot.is-ready { border-color: #e58a32; }

/* ---------- 13a: Inventar-Overlay (aus dem Lootfenster): Rucksack im Vordergrund, Ausrüstung per Umschalter ---------- */
#inventory.inventory-overlay-panel[data-ov-pane="bag"] #equipment-ui { display: none; }
#inventory.inventory-overlay-panel[data-ov-pane="equipment"] #user-items { display: none; }
@media (max-width: 720px) {
  #inventory.inventory-overlay-panel #item-list {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    grid-template-rows: none;
    grid-auto-columns: auto;
    grid-auto-rows: auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: visible;
    touch-action: pan-y;
  }
}
.poi-polaroid-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(236, 230, 216, .16);
}
.poi-polaroid-panel small, .poi-photo-message {
  margin: 0;
  color: rgba(236, 230, 216, .72);
  font-size: .78rem;
  line-height: 1.4;
}
.poi-photo-documented { margin: 0; color: #d7e6bc; }
.poi-photo-compare {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y pinch-zoom;
}
.poi-photo-compare:focus-visible { outline: 2px solid #f0c27a; outline-offset: -4px; }
.unlabeled-poi-modal #poi-photo-container { position: relative; }
.base-photo-message {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  color: #eee8da;
  background: rgba(15, 18, 17, .82);
  font-size: .72rem;
}


/* =====================================================================
   Etappe 9b: Zahlenschloss – Vollfläche, ruhiger Kopf, Tastatur-Scroll
   ===================================================================== */
.building-loot-overlay.building-safe-overlay {
  padding: 0;
  justify-content: stretch;
  align-items: stretch;
}
.building-loot-overlay.building-safe-overlay .building-safe-panel {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
/* Inhalt bleibt auf breiten Screens bei max. 520px, mittig */
.building-safe-panel .building-room-toolbar { padding: 14px max(16px, calc((100% - 520px) / 2)) 0; align-items: flex-start; }
.building-safe-body { padding: 6px max(16px, calc((100% - 520px) / 2)) 20px; }
.building-safe-panel .building-room-toolbar { flex: 0 0 auto; }
.building-safe-panel .building-safe-body { flex: 1 1 auto; min-height: 0; }

/* Schließen – wie POI-Fenster, in Safe-Stahlgrau */
.building-safe-panel .building-loot-close.building-safe-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(225, 232, 238, 0.25);
  background: rgba(15, 19, 23, 0.55);
  color: #e1e8ee;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.building-safe-close svg { display: block; width: 18px; height: 18px; }
.building-safe-panel .building-safe-close:hover,
.building-safe-panel .building-safe-close:focus-visible { background: rgba(225, 232, 238, 0.14); }

/* Erklärtext: ein ruhiger Absatz, dicht am Titel */
.building-safe-body .building-safe-rules { margin: 0; }
.building-safe-body .building-safe-duplicates { margin: 0; }
.building-safe-rules b { font-weight: 800; }
.building-safe-rules b.is-green { color: #a9c27a; }
.building-safe-rules b.is-yellow { color: #e0b061; }
.building-safe-body .building-safe-rules-notice { margin-top: 6px; }
.building-safe-body .building-safe-attempts { margin: 14px 0 12px; }

/* Löschen-Button: kurz, kein Überlauf */
.building-safe-actions .btn.building-safe-clear { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.8rem; }

/* Platz zum Hochziehen, solange der Ziffernblock offen ist */
.building-safe-overlay.is-typing .building-safe-body { padding-bottom: 70dvh; }

/* Notizzettel wächst nach unten mit, kein eigener Scrollbereich */
.building-safe-body .building-safe-history { max-height: none; overflow: visible; }

/* Buttons so breit wie das Ziffernfeld, kompakter, frei von den Nieten */
.building-safe-form .building-safe-actions { max-width: 300px; margin: 12px auto 4px; gap: 8px; }
.building-safe-form .building-safe-actions .btn { min-height: 40px; padding: 0.45rem 0.4rem; font-size: 0.85rem; }
.building-safe-form .building-safe-actions .btn.building-safe-clear { font-size: 0.75rem; }


/* =====================================================================
   Etappe 9c: POI-Warenübergabe – feste 50/50-Teilung, schlanke Karten
   ===================================================================== */
#poi-item-exchange-modal .poi-item-exchange-panel {
  height: min(780px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#poi-item-exchange-modal .poi-item-exchange-header { flex: 0 0 auto; height: auto; position: static; }
#poi-item-exchange-modal .poi-item-exchange-workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
}

/* Oben: steht fest, Liste scrollt in sich, Neues kommt unten dazu */
#poi-item-exchange-modal .poi-exchange-receiver {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
#poi-item-exchange-modal .poi-exchange-section-head,
#poi-item-exchange-modal .poi-exchange-message,
#poi-item-exchange-modal .poi-exchange-confirm { flex: 0 0 auto; }
#poi-item-exchange-modal .poi-exchange-basket-items {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
#poi-item-exchange-modal .poi-exchange-basket-items > :first-child { margin-top: auto; }
#poi-item-exchange-modal .poi-exchange-empty { flex: 1 1 auto; min-height: 54px; }
#poi-item-exchange-modal .poi-exchange-message { min-height: 16px; margin: 0; }
#poi-item-exchange-modal .poi-exchange-message:empty { min-height: 0; }

/* Unten: Inventar füllt seine Hälfte */
#poi-item-exchange-modal .poi-exchange-inventory {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
#poi-item-exchange-modal .poi-exchange-inventory .poi-exchange-section-head { flex: 0 0 auto; }
#poi-item-exchange-modal .poi-exchange-inventory-grid {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  max-height: none;
}

/* Vorgemerkte Karte: schlank, ohne grünen Rahmen */
#poi-item-exchange-modal .poi-exchange-basket-row {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto 30px;
  grid-template-rows: auto auto;
  grid-template-areas:
    "icon text out remove"
    "icon range range .";
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  padding: 8px 6px 8px 10px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(226, 196, 138, 0.07), rgba(255, 255, 255, 0.025) 60%);
  box-shadow: inset 0 0 0 1px rgba(226, 211, 177, 0.1);
}
#poi-item-exchange-modal .poi-exchange-basket-icon { grid-area: icon; width: 36px; height: 36px; }
#poi-item-exchange-modal .poi-exchange-basket-row > span:nth-child(2) { grid-area: text; min-width: 0; }
#poi-item-exchange-modal .poi-exchange-basket-row strong {
  color: #f5f1e6;
  font-size: 0.8rem;
  font-weight: 700;
}
#poi-item-exchange-modal .poi-exchange-basket-row small {
  margin-top: 1px;
  color: #d9bd84;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
#poi-item-exchange-modal .poi-exchange-quantity,
#poi-item-exchange-modal .poi-exchange-quantity-row { display: contents; }
#poi-item-exchange-modal .poi-exchange-quantity label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
#poi-item-exchange-modal .poi-exchange-quantity input[type=range] {
  grid-area: range;
  width: 100%;
  height: 18px;
  margin: 0;
  accent-color: #c9a45c;
}
#poi-item-exchange-modal .poi-exchange-quantity output {
  grid-area: out;
  min-width: 0;
  color: #f5f1e6;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
#poi-item-exchange-modal .poi-exchange-quantity output span { color: rgba(245, 241, 230, 0.45); }
#poi-item-exchange-modal .poi-exchange-remove {
  grid-area: remove;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: none;
  color: rgba(245, 241, 230, 0.55);
}
#poi-item-exchange-modal .poi-exchange-remove:hover,
#poi-item-exchange-modal .poi-exchange-remove:focus-visible { background: rgba(245, 241, 230, 0.08); color: #f5f1e6; }

@media (max-width: 680px) {
  #poi-item-exchange-modal .poi-item-exchange-panel { height: 100%; }
  #poi-item-exchange-modal .poi-exchange-receiver,
  #poi-item-exchange-modal .poi-exchange-inventory { padding: 10px 12px; }
}
