.stage{
  display:grid;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100svh - 110px);
  gap: 14px;
}

.drop-area{
  position: relative;
  border-radius: var(--radius);
  border: 3px dashed rgba(0,75,153,0.35);
  background: rgba(255,255,255,0.35);
  box-shadow: var(--shadow);
  overflow:hidden;
  min-height: clamp(320px, 60vh, 520px);
}

.drop-area .bg-img{
  width:100%;
  height:100%;
  object-fit: contain;
  display:block;
  pointer-events:none;
  user-select:none;
  box-sizing: border-box;
}

.drop-hint{
  position:absolute;
  inset: 10px 10px auto 10px;
  background: rgba(255,255,255,0.65);
  border: 2px solid rgba(0,75,153,0.18);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  display:inline-flex;
  gap:10px;
  align-items:center;
}

/* Layer über der Figur */
.snap-layer{
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

/* platziertes Ausrüstungsteil */
.snap-item{
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
}

/* Reihenfolge: Figur unten, Snap darüber */
.drop-area .bg-img{
  position: relative;
  z-index: 1;
}

.drop-hint{
  z-index: 5;
}

.progress{
  font-weight: 900;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,75,153,0.12);
  display:inline-block;
}

.itembar{
  background: rgba(255,255,255,0.35);
  border: 2px solid rgba(0,75,153,0.15);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
  height: 170px;
  display: flex;
  flex-direction: column;
}

.itembar-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 8px;
}

.scroller{
  flex: 1;
  overflow: hidden;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.scroller::-webkit-scrollbar{
  height:10px;
}

.scroller::-webkit-scrollbar-thumb{
  background: rgba(0,75,153,0.25);
  border-radius: 999px;
}

.pager{
  display:flex;
  align-items: center;
  gap:8px;
}

.pager .btn{
  height: 36px;
  padding: 0 12px;
}

.page-info{
  font-weight: 800;
}

.modal-title{
  margin-top: 0;
}

.modal-text{
  font-weight: 600;
}

.item{
  width: 92px;
  min-width: 92px;
  height: 92px;
  border-radius: 16px;
  background: rgba(255,255,255,0.7);
  border: 2px solid rgba(0,75,153,0.18);
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding: 8px;
  scroll-snap-align: start;
  user-select:none;
  touch-action:none; /* wichtig für Pointer-Drag */
}

.item img{
  width: 46px;
  height: 46px;
  object-fit: contain;
  pointer-events:none;
}

.item span{
  font-size: 11px;
  font-weight: 900;
  text-align:center;
  line-height: 1.1;

  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;

  display: -webkit-box;
  -webkit-box-orient: vertical;

  word-break: break-word;
  hyphens: auto;
}

.item.placeholder{
  opacity: 0.25;
  border-style: dashed;
  box-shadow: none;
}

.item.placeholder img{
  display:none;
}

/* Drag ghost */
.drag-ghost{
  position: fixed;
  left:0; top:0;
  width: 92px;
  height: 92px;
  z-index: 9999;
  pointer-events:none;
  transform: translate(-9999px,-9999px);
  border-radius: 16px;
  background: rgba(255,255,255,0.85);
  border: 2px solid rgba(0,75,153,0.25);
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding: 8px;
}

.drag-ghost img{
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.drag-ghost span{
  font-size: 11px;
  font-weight: 900;
  text-align:center;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  word-break: break-word;
  hyphens: auto;
}

.toast.in-drop{
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  top: auto;
  max-width: calc(100% - 40px);
  z-index: 6;
}

/* Debug-Zonen sichtbar machen (nur zum Einstellen) */
.snap-zone-debug{
  position: absolute;
  border: 3px dashed rgba(240,131,36,0.95);
  background: rgba(240,131,36,0.15);
  border-radius: 16px;
  z-index: 4;
  pointer-events: none;
}



/* RESPONSIVE */
/* Tablet */
@media (max-width: 900px){
  .container{ padding: 14px; }
  .drop-area{ min-height: 420px; }
}

/* Handy */
@media (max-width: 600px){
  .container{ padding: 12px; }

  .header{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .header-actions{
    width: 100%;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
  }

  .header-actions .btn.secondary{
    min-width: 0;
    flex: 1;
  }

  .brand h1{
    font-size: 34px;
  }

  .drop-area{
    min-height: 420px;
  }

  .drop-hint{
    inset: 8px 8px auto 8px;
    padding: 6px 10px;
    border-radius: 14px;
    gap: 6px;
    font-size: 13px;
    flex-wrap: wrap;
  }

  .progress{
    padding: 6px 10px;
  }

  .itembar{
    height: 280px;
    padding: 8px;
  }

  .scroller{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    overflow: visible;
    align-items: stretch;
  }

  .item{
    width: auto;
    min-width: 0;
    height: 92px;
  }

  .item img{
    width: 38px;
    height: 38px;
  }

  .item span{
    font-size: 10px;
  }

  .pager .btn{
    height: 34px;
    padding: 0 10px;
  }

  .toast.in-drop{
    bottom: 8px;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 16px;
    max-width: calc(100% - 18px);
  }

  .drop-area .bg-img{
    padding: 0;
  }
}

