/* Weave flow styles — matching landing page design language */
.weave-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Step wrapper */
.weave-content {
  flex: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  width: 100%;
}

.weave-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.5rem;
  line-height: 1.15;
}
.weave-subtitle {
  font-size: 1rem;
  color: var(--cream-dim);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* Form elements */
.field {
  margin-bottom: 1.75rem;
}
.field-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 0.5rem;
}
.field-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: rgba(200, 196, 232, 0.06);
  border: 1px solid rgba(200, 196, 232, 0.15);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(232, 168, 62, 0.5);
}
input::placeholder,
textarea::placeholder { color: var(--muted); }
select option { background: var(--bg-2); color: var(--cream); }
textarea { resize: vertical; min-height: 80px; }

/* Interest tags */
.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.interest-tag {
  background: rgba(200, 196, 232, 0.06);
  border: 1px solid rgba(200, 196, 232, 0.12);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  color: var(--cream-dim);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.interest-tag:hover { border-color: rgba(232, 168, 62, 0.4); }
.interest-tag.selected {
  background: rgba(232, 168, 62, 0.15);
  border-color: rgba(232, 168, 62, 0.5);
  color: var(--accent);
}

/* Moments list */
.moments-list { display: flex; flex-direction: column; gap: 0.75rem; }
.moment-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.moment-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--accent);
  min-width: 1.5rem;
  padding-top: 0.8rem;
  text-align: right;
}
.moment-item input { flex: 1; }

/* Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #0f0f1a;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  width: 100%;
  margin-top: 1rem;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Loading state */
.btn-loading .btn-text { display: none; }
.btn-loading .btn-spinner { display: block; }
.btn-spinner { display: none; width: 20px; height: 20px; border: 2px solid rgba(15,15,26,0.3); border-top-color: #0f0f1a; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Error */
.error-msg {
  background: rgba(200, 80, 80, 0.1);
  border: 1px solid rgba(200, 80, 80, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #e88080;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Story page */
.story-page { min-height: 100vh; }
.story-container { max-width: 640px; margin: 0 auto; padding: 3rem 2rem 5rem; }
.story-headline {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.35rem;
  line-height: 1.2;
}
.story-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-style: italic;
}
.story-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--cream);
  line-height: 1.9;
}
.story-text p { margin-bottom: 1.4em; }
.story-text p:last-child { margin-bottom: 0; }

/* Audio controls */
.audio-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(200, 196, 232, 0.08);
  flex-wrap: wrap;
}
.btn-audio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(232, 168, 62, 0.1);
  border: 1px solid rgba(232, 168, 62, 0.3);
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-audio:hover { background: rgba(232, 168, 62, 0.2); }
.btn-audio.playing { background: rgba(232, 168, 62, 0.25); border-color: rgba(232, 168, 62, 0.5); }
.btn-new-story {
  background: transparent;
  border: 1px solid rgba(200, 196, 232, 0.15);
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  color: var(--cream-dim);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.btn-new-story:hover { border-color: rgba(200, 196, 232, 0.4); color: var(--cream); }

/* Moon accent in header */
.moon-small {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 40% 40%, #f5e9c8 0%, #e8c97a 40%, #c9a843 100%);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(232, 200, 100, 0.2);
  display: inline-block;
  flex-shrink: 0;
}

/* Stars decoration */
.stars-deco { position: relative; display: inline-block; }
.stars-deco::before, .stars-deco::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--cream);
  border-radius: 50%;
  opacity: 0.4;
  top: -8px;
}
.stars-deco::before { left: 8px; }
.stars-deco::after { right: 6px; }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--cream); }

/* Progress dots */
.progress-steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(200, 196, 232, 0.15);
}
.progress-dot.active { background: var(--accent); }
.progress-line {
  flex: 1;
  height: 1px;
  background: rgba(200, 196, 232, 0.08);
  max-width: 40px;
}

@media (max-width: 600px) {
  .weave-content { padding: 2rem 1.25rem 3rem; }
  .story-container { padding: 2rem 1.25rem 4rem; }
}