.bebs-card {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  border: 2px dashed var(--babyen-peach);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

/* Honeypot: hidden from everyone; bots often fill it, real users never see it */
.bebs-hp-wrap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bebs-form,
.bebs-form-inline {
  display: grid;
  gap: 0.75rem;
}

.bebs-form label,
.bebs-form-inline label {
  display: grid;
  gap: 0.25rem;
  font-weight: 600;
}

.bebs-form input,
.bebs-form select,
.bebs-form-inline input,
.bebs-form-inline select {
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(255, 111, 174, 0.3);
  border-radius: 14px;
  background: #fff;
}

.bebs-btn-link {
  border: none;
  background: transparent;
  color: var(--babyen-accent);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.bebs-message {
  color: #c00;
  font-size: 0.9rem;
}

.bebs-message.is-success {
  color: #1a6b4a;
}

.bebs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.bebs-child {
  border: 1px dashed rgba(255, 111, 174, 0.3);
  padding: 0.75rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.bebs-child--boy {
  background: rgba(191, 231, 255, 0.35);
}

.bebs-child--girl {
  background: rgba(255, 179, 209, 0.3);
}

.bebs-favorite-toggle {
  background: unset;
  border: unset;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
  color: var(--babyen-accent);
  cursor: pointer;
}

.bebs-favorite-toggle:hover,
.bebs-favorite-toggle:focus {
  transform: translateY(-1px);
}

.bebs-favorite-toggle {
  transition: transform 0.2s ease, color 0.2s ease;
}

.bebs-favorite-toggle--effect {
  animation: bebs-heart-pop 0.35s ease;
}

@keyframes bebs-heart-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Flying hearts when adding to favorites */
.bebs-flying-hearts {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
}

.bebs-flying-heart {
  position: absolute;
  font-size: 12px;
  color: var(--babyen-accent);
  opacity: 0.9;
  animation: bebs-heart-fly 1s ease-out forwards;
  transform: translate(0, 0) scale(0.8);
}

.bebs-flying-heart i {
  display: block;
}

@keyframes bebs-heart-fly {
  0% {
    opacity: 0.9;
    transform: translate(0, 0) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translate(0, -8px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(
        calc((var(--bebs-heart-drift, 0) * 1px)),
        -45px
      )
      scale(0.6);
  }
}

/* Subtract hearts: fly into the button when removing from favorites */
.bebs-subtract-heart {
  animation: bebs-heart-subtract 0.7s ease-in forwards;
  opacity: 0.85;
}

@keyframes bebs-heart-subtract {
  0% {
    opacity: 0.85;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(
        var(--bebs-subtract-tx, 0),
        var(--bebs-subtract-ty, 0)
      )
      scale(0.2);
  }
}

.bebs-auth-dialog {
  border: none;
}

.bebs-auth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bebs-auth-tabs .btn.is-active {
  box-shadow: 0 10px 22px rgba(255, 111, 174, 0.3);
}

.bebs-auth-panel {
  display: none;
}

.bebs-auth-panel.is-active {
  display: block;
}

.bebs-sidebar .toc-list {
  gap: 0.4rem;
}

.bebs-sidebar .toc-item a {
  font-weight: 700;
}

.bebs-sidebar .toc-item a.is-active {
  background: var(--babyen-sky);
  color: var(--babyen-ink);
}

.bebs-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.bebs-favorite-item {
  border-radius: 18px;
  background: white;
  border: 2px dashed rgba(255, 111, 174, 0.25);
  overflow: hidden;
}

.bebs-favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.bebs-favorite-card {
  display: grid;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  padding: 0.75rem;
  height: 100%;
}

.bebs-favorite-media {
  background: var(--babyen-cream);
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bebs-favorite-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bebs-favorite-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--babyen-sky), var(--babyen-mint));
}

.bebs-favorite-body {
  display: grid;
  gap: 0.4rem;
}

.bebs-child-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.bebs-child-meta {
  display: block;
  color: #6c6c6c;
  font-size: 0.9rem;
}

.bebs-child-edit {
  margin-top: 0.75rem;
}

.bebs-icon-button {
  border: 1px dashed rgba(255, 111, 174, 0.25);
  background: white;
  color: var(--babyen-ink);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bebs-icon-button--danger {
  color: #b42318;
}

