/* Ghost cosmetics: Wardrobe modal (public/js/cosmetics.js) */
.wardrobe {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 4, 16, 0.6);
  backdrop-filter: blur(3px);
}
.wardrobe.hidden {
  display: none;
}
.wardrobe-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px 20px 20px;
  animation: wardrobe-in 0.22s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes wardrobe-in {
  from {
    transform: scale(0.92) translateY(10px);
    opacity: 0;
  }
}
.wardrobe-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.wardrobe-head h2 {
  margin: 0;
  font-family: 'Creepster', 'Fredoka', cursive;
  font-weight: 400;
  font-size: 34px;
  letter-spacing: 1px;
  color: var(--accent-2, #ffb347);
  text-shadow: 0 0 18px rgba(255, 179, 71, 0.45);
}
.icon-x {
  background: none;
  border: none;
  color: var(--muted, #b3a6cc);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.icon-x:hover {
  color: var(--text, #fff);
  background: rgba(255, 255, 255, 0.08);
}
.wardrobe-body {
  display: flex;
  gap: 18px;
  align-items: stretch;
}
.wardrobe-stage {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-radius: 14px;
  padding: 8px 0 10px;
  background: radial-gradient(ellipse at 50% 40%, rgba(157, 123, 255, 0.35), rgba(20, 10, 35, 0.2) 70%);
  border: 1px solid var(--card-border, rgba(190, 160, 255, 0.22));
}
.wardrobe-canvas {
  width: 300px;
  height: 340px;
  max-width: 100%;
  cursor: grab;
  touch-action: none;
}
.wardrobe-canvas:active {
  cursor: grabbing;
}
.wardrobe-name {
  font-weight: 600;
  text-align: center;
  padding: 0 10px;
  min-height: 1.3em;
}
.wardrobe-note {
  text-align: center;
  padding: 0 14px;
}
.wardrobe-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wardrobe-tabs {
  display: flex;
  gap: 6px;
}
.wtab {
  flex: 1;
  font: inherit;
  font-weight: 600;
  color: var(--muted, #b3a6cc);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border, rgba(190, 160, 255, 0.22));
  border-radius: 10px;
  padding: 8px 6px;
  cursor: pointer;
}
.wtab.active {
  color: var(--text, #fff);
  background: rgba(157, 123, 255, 0.3);
  border-color: var(--accent, #9d7bff);
}
.wardrobe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  align-content: start;
  flex: 1;
  min-height: 250px;
}
.witem {
  font: inherit;
  color: var(--text, #fff);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 0.12s, background 0.12s, border-color 0.12s;
}
.witem:hover {
  transform: translateY(-2px) scale(1.04);
  background: rgba(157, 123, 255, 0.18);
}
.witem.active {
  border-color: var(--accent-2, #ffb347);
  background: rgba(255, 179, 71, 0.16);
  box-shadow: 0 0 14px rgba(255, 179, 71, 0.35);
}
.wicon {
  font-size: 28px;
  line-height: 1;
}
.wlabel {
  font-size: 12px;
  text-align: center;
  line-height: 1.15;
}
.wardrobe-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.wardrobe-btn {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .wardrobe-body {
    flex-direction: column;
  }
  .wardrobe-stage {
    flex: none;
  }
  .wardrobe-canvas {
    width: 220px;
    height: 250px;
  }
  .wardrobe-grid {
    min-height: 0;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
}
