/* =============================================
   FABELINO – Adventure Wizard (Hero Right Column)
   ============================================= */

/* ── Right column wrapper: image on top, wizard below ── */
.st-hero-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.st-hero-right .st-hero-image-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}
.st-hero-right .st-hero-image-wrap img {
  max-width: 320px;
  width: 100%;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.12));
  animation: st-float 4s ease-in-out infinite;
}

/* ── Wizard Card ── */
.fab-wizard {
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 8px 40px hsla(270, 50%, 55%, 0.16);
  overflow: hidden;
  width: 100%;
  max-width: 440px;
}

/* ── Step Indicator ── */
.fab-wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 1.5rem 0;
  gap: 0;
}
.fab-step-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted-foreground);
  transition: color 0.25s;
}
.fab-step-item.active { color: var(--primary); }
.fab-step-item.done   { color: var(--primary); }
.fab-step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.78rem;
  background: var(--muted); color: var(--muted-foreground);
  transition: all 0.25s ease; flex-shrink: 0;
}
.fab-step-item.active .fab-step-num,
.fab-step-item.done   .fab-step-num { background: var(--primary); color: #fff; }
.fab-step-connector {
  flex: 1; height: 2px; background: var(--border);
  margin: 0 0.4rem; max-width: 50px; border-radius: 2px; transition: background 0.3s;
}
.fab-step-connector.done { background: var(--primary); }

/* ── Wizard Body ── */
.fab-wizard-body { padding: 1.1rem 1.4rem 1.4rem; }

.fab-wizard-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.05rem; font-weight: 700;
  color: var(--foreground); margin-bottom: 0.9rem;
}

/* ── Hero Chips ── */
.fab-hero-list {
  display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.85rem;
}
.fab-hero-list:empty { display: none; }
.fab-hero-chip {
  display: flex; align-items: center; gap: 0.35rem;
  background: var(--primary); color: #fff;
  border-radius: 9999px; padding: 0.3rem 0.65rem 0.3rem 0.45rem;
  font-weight: 700; font-size: 0.82rem;
  animation: chipIn 0.2s ease;
}
@keyframes chipIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.fab-hero-chip-avatar { font-size: 1rem; }
.fab-hero-chip-avatar .fab-gender-img {
  width: 20px;
  height: 20px;
}
.fab-hero-chip-remove {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.7); font-size: 1rem; line-height: 1;
  padding: 0; margin-left: 0.15rem; transition: color 0.15s;
}
.fab-hero-chip-remove:hover { color: #fff; }

/* ── Form Fields ── */
.fab-field { margin-bottom: 0.65rem; }
.fab-field label {
  display: block; font-size: 0.75rem; font-weight: 700;
  color: var(--muted-foreground); margin-bottom: 0.25rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.fab-input {
  width: 100%; padding: 0.6rem 0.95rem;
  border: 2px solid var(--border); border-radius: 9999px;
  font-family: 'Nunito', sans-serif; font-size: 0.9rem;
  color: var(--foreground); background: var(--background);
  outline: none; transition: border-color 0.2s;
  appearance: none; -webkit-appearance: none;
}
.fab-input:focus { border-color: var(--primary); }
select.fab-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238c8c9e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.fab-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }

/* ── Gender Buttons (Boy / Girl only) ── */
.fab-gender-group { display: flex; gap: 0.4rem; }
.fab-gender-btn {
  flex: 1; padding: 0.5rem 0.25rem;
  border: 2px solid var(--border); border-radius: 9999px;
  background: var(--background); cursor: pointer;
  font-family: 'Nunito', sans-serif; font-size: 0.78rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 0.3rem;
  color: var(--foreground); transition: all 0.2s; line-height: 1;
}
.fab-gender-btn:hover { border-color: var(--primary); }
.fab-gender-btn.selected {
  border-color: var(--primary); background: var(--lavender); color: var(--primary);
}
.fab-gender-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

/* ── Add Child Button ── */
.fab-add-child {
  width: 100%; margin-top: 0.4rem; padding: 0.55rem 1rem;
  border: 2px dashed var(--border); border-radius: 9999px;
  background: transparent; cursor: pointer;
  font-family: 'Nunito', sans-serif; font-size: 0.85rem; font-weight: 700;
  color: var(--primary); transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.fab-add-child:hover:not(:disabled) { border-color: var(--primary); background: var(--lavender); }
.fab-add-child:disabled { opacity: 0.5; cursor: not-allowed; color: var(--muted-foreground); }

/* ── Primary CTA ── */
.fab-wizard-cta {
  width: 100%; margin-top: 0.85rem; padding: 0.8rem 1rem;
  border: none; border-radius: 9999px;
  background: var(--primary); color: #fff;
  font-family: 'Nunito', sans-serif; font-size: 0.95rem; font-weight: 800;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  box-shadow: 0 4px 20px var(--shadow-primary); transition: all 0.2s ease;
}
.fab-wizard-cta:hover {
  background: hsl(270, 50%, 48%); transform: translateY(-1px);
  box-shadow: 0 6px 28px hsla(270, 50%, 55%, 0.4);
}

/* ── Error ── */
.fab-error-msg {
  color: hsl(0, 70%, 55%); font-size: 0.78rem; font-weight: 700;
  margin-top: 0.2rem; padding-left: 0.75rem; display: none;
}

/* ── World Grid (Step 2) ── */
.fab-world-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }

.fab-world-card {
  aspect-ratio: 1 / 1; border-radius: 0.875rem;
  background: var(--lavender); border: 2.5px solid transparent;
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.25rem;
  transition: all 0.2s ease; padding: 0.4rem;
}
.fab-world-card:hover {
  border-color: var(--primary); transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--shadow-primary);
}
.fab-world-card.selected {
  border-color: var(--gold); background: hsla(40, 80%, 65%, 0.12);
  box-shadow: 0 0 0 3px hsla(40, 80%, 65%, 0.25);
}

/* NEU: Bild statt Emoji im World-Grid */
.fab-world-image {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  margin: 0 auto 4px;
}

/* Icon-Klasse bleibt für Rückwärtskompatibilität, wird aber nicht mehr genutzt */
.fab-world-emoji {
  font-size: 1.8rem;
  line-height: 1;
}

.fab-world-label {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--foreground);
  text-align: center;
}

/* ── Loading ── */
.fab-loading {
  text-align: center;
  padding: 2rem 1rem;
}
.fab-spinner {
  width: 38px; height: 38px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.fab-loading-text {
  font-weight: 700; color: var(--foreground); font-size: 0.9rem;
}
.fab-loading-stars {
  font-size: 1.1rem; margin-top: 0.5rem;
  animation: twinkle 1.5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.4; } to { opacity: 1; } }

/* ── Player ── */
.fab-player { padding: 0; }

.fab-player-story-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.95rem; font-weight: 800;
  color: var(--foreground); text-align: center; margin-bottom: 0.2rem;
}

.fab-player-chapter {
  text-align: center; font-size: 0.75rem; color: var(--primary);
  font-weight: 700; margin-bottom: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Artwork-Container + Bild */
.fab-player-artwork {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.25rem 0 0.5rem;
  min-height: 100px;
}

.fab-story-artwork-image {
  width: auto;
  height: 75px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.fab-story-artwork-fallback {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  line-height: 1;
  margin: 0 auto;
}

.fab-audio-controls {
  background: var(--lavender); border-radius: 1rem;
  padding: 0.9rem; margin-bottom: 0.85rem;
}
.fab-audio-row {
  display: flex; align-items: center; gap: 0.65rem;
}
.fab-play-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0; transition: all 0.2s;
  box-shadow: 0 2px 10px var(--shadow-primary);
}
.fab-play-btn:hover {
  background: hsl(270,50%,48%); transform: scale(1.05);
}
.fab-progress-wrap { flex: 1; }
.fab-progress-bar {
  width: 100%; height: 4px; background: rgba(255,255,255,0.6);
  border-radius: 2px; overflow: hidden; margin-bottom: 0.3rem;
  cursor: pointer;
}
.fab-progress-fill {
  height: 100%; background: var(--primary);
  border-radius: 2px; transition: width 0.1s linear; width: 0%;
}
.fab-time-row {
  display: flex; justify-content: space-between;
  font-size: 0.72rem; color: var(--muted-foreground); font-weight: 600;
}

.fab-player-actions { display: flex; gap: 0.45rem; }
.fab-player-actions .fab-wizard-cta {
  flex: 1; font-size: 0.82rem; padding: 0.65rem 0.5rem; margin-top: 0;
}

.fab-btn-secondary {
  flex: 1; padding: 0.65rem 0.5rem;
  border: 2px solid var(--border); border-radius: 9999px;
  background: transparent; font-family: 'Nunito', sans-serif;
  font-size: 0.82rem; font-weight: 700; color: var(--foreground);
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 0.3rem;
}
.fab-btn-secondary:hover {
  border-color: var(--primary); color: var(--primary);
}

/* ── Register ── */
.fab-register { text-align: center; }
.fab-register-icon { font-size: 2.2rem; margin-bottom: 0.6rem; }
.fab-register h3 {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.05rem; font-weight: 800; margin-bottom: 0.35rem;
}
.fab-register p {
  font-size: 0.82rem; color: var(--muted-foreground); margin-bottom: 1rem;
}
.fab-oauth-btns {
  display: flex; flex-direction: column;
  gap: 0.45rem; margin-bottom: 0.75rem;
}
.fab-oauth-btn {
  width: 100%; padding: 0.7rem 1rem; border-radius: 9999px;
  border: 2px solid var(--border); background: #fff;
  font-family: 'Nunito', sans-serif; font-size: 0.85rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 0.55rem; transition: all 0.2s; color: var(--foreground);
}
.fab-oauth-btn:hover {
  border-color: var(--primary); box-shadow: 0 2px 10px var(--shadow-primary);
}
.fab-divider {
  display: flex; align-items: center; gap: 0.65rem;
  color: var(--muted-foreground); font-size: 0.78rem; font-weight: 600;
  margin: 0.6rem 0;
}
.fab-divider::before,
.fab-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.fab-email-fields {
  display: flex; flex-direction: column;
  gap: 0.45rem; margin-bottom: 0.65rem;
}
.fab-register-note {
  font-size: 0.72rem; color: var(--muted-foreground); margin-top: 0.65rem;
}
.fab-register-note a {
  color: var(--primary); text-decoration: underline;
}

/* ── Desktop: sticky right column ── */
@media (min-width: 901px) {
  .st-hero-grid { align-items: start; }
  .st-hero-right { position: sticky; top: 5rem; }
  .st-hero-right .st-hero-image-wrap img { max-width: 260px; }
}

/* ── Mobile ── */
@media (max-width: 900px) {
  .fab-wizard { max-width: 100%; }

  .fab-story-artwork-image,
  .fab-story-artwork-fallback {
    width: auto;
    height: 75px;
  }
}