/* Spawn — Spawnling creator & account slot */

.account-spawnling-hero {
  margin: 0 var(--space-4) var(--space-4);
  padding: var(--space-4);
  background: var(--bg-elevated);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-smooth), box-shadow var(--duration-fast);
}
.account-spawnling-hero:hover,
.account-spawnling-hero:focus-visible {
  border-color: rgba(0, 212, 238, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 212, 238, 0.15);
  outline: none;
}
.account-spawnling-hero--empty {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 212, 238, 0.08), transparent 70%),
    var(--bg-elevated);
}
.account-spawnling-viewport {
  width: 100%;
  height: min(52vw, 240px);
  max-height: 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.45) 55%, rgba(0, 212, 238, 0.06) 100%);
}
.account-spawnling-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.account-spawnling-cta {
  width: 100%;
  max-width: 280px;
}
.account-spawnling-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.account-spawnling-edit {
  margin-top: var(--space-2);
  font-size: 13px;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.account-profile-meta {
  margin: 0 var(--space-4) var(--space-4);
  padding: 0 var(--space-2);
  text-align: center;
}
.account-profile-meta h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.account-profile-meta p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* Creator flow */
body.spawnling-creator-open { overflow: hidden; }

.spawnling-creator {
  position: fixed;
  inset: 0;
  z-index: 31000;
  background: var(--bg-void);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out-expo);
}
.spawnling-creator.is-visible { opacity: 1; }
.spawnling-creator.hidden { display: none !important; }

.spawnling-creator::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 45% at 50% -8%, rgba(0, 212, 238, 0.12), transparent 68%);
  pointer-events: none;
}

.spawnling-creator__chrome {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) var(--space-4) var(--space-3);
}
.spawnling-creator__close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.spawnling-progress {
  display: flex;
  gap: 8px;
}
.spawnling-progress__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background var(--duration-fast), transform var(--duration-fast);
}
.spawnling-progress__dot.is-active {
  background: var(--accent);
  transform: scale(1.2);
}
.spawnling-progress__dot.is-done { background: rgba(0, 212, 238, 0.45); }

.spawnling-creator__body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(200px, 42vh) 1fr;
}
@media (min-width: 768px) {
  .spawnling-creator__body {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
  }
}

.spawnling-creator__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  min-height: 0;
}
#spawnling-viewport {
  width: 100%;
  max-width: 420px;
  height: 100%;
  min-height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.5) 50%, rgba(0, 212, 238, 0.08) 100%);
}

.spawnling-creator__panel {
  position: relative;
  min-height: 0;
  overflow: hidden;
}
.spawnling-step {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: var(--space-4) var(--space-4) calc(80px + env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
  transform: translateX(12px);
  transition: opacity var(--duration-normal), transform var(--duration-normal), visibility var(--duration-normal);
  pointer-events: none;
}
.spawnling-step.active {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.spawnling-step__title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}
.spawnling-step__hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: var(--space-4);
  line-height: 1.45;
}

.spawnling-field {
  display: block;
  margin-bottom: var(--space-4);
}
.spawnling-field__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-2);
}
.spawnling-field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.spawnling-field input[type="color"] {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.spawnling-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.spawnling-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  text-transform: capitalize;
  transition: border-color var(--duration-fast), color var(--duration-fast), background var(--duration-fast);
}
.spawnling-chip.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 212, 238, 0.08);
}

.spawnling-part-tabs,
.spawnling-feature-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-3);
}
.spawnling-part-tab,
.spawnling-feature-tab {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  text-transform: capitalize;
}
.spawnling-part-tab.is-active,
.spawnling-feature-tab.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.spawnling-creator__footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--bg-void) 24%);
  border-top: 1px solid var(--border);
}
.spawnling-creator__footer .btn { flex: 1; }

/* LFG + profile thumb */
.lfg-card__avatar-img,
.sv-chat-profile__spawnling-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}
