/* Composer — the POST sheet (Phase 0 §2.3): three stages
   (Intent → Message → Reach), sticky stage nav, keyboard-safe. */

.composer-sheet { display: flex; flex-direction: column; overflow: hidden; }
.composer-body { overflow-y: auto; padding-bottom: var(--sp-2); }
.composer-title { font-size: var(--fs-title); font-weight: var(--fw-bold); margin: 0 var(--sp-8) var(--sp-1) 0; }

/* Stage indicator */
.stage-dots {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text-3);
  font-size: var(--fs-caption);
  margin-bottom: var(--sp-4);
}
.stage-dots .dot-step { display: flex; align-items: center; gap: var(--sp-1); }
.stage-dots .dot-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
}
.stage-dots .dot-step.current { color: var(--accent); }
.stage-dots .dot-step.current .dot-num { border-color: var(--accent); background: var(--accent-soft); }
.stage-dots .dot-line { flex: 0 0 14px; height: 1px; background: var(--border-strong); }

/* Sticky Back / Continue bar at the sheet's foot, above the keyboard */
.stage-nav {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  background: var(--surface-1);
}
.stage-nav .spacer { flex: 1; }
.stage-nav .primary-btn { min-width: 132px; }

/* Stage 1 — intent grid */
.intent-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); margin-bottom: var(--sp-3); }
.intent-btn {
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 10px 4px;
  color: var(--text-1);
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  cursor: pointer;
}
.intent-btn span { font-size: 0.68rem; }
.intent-btn.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); }

/* Stage 2 — message */
.intent-fields { margin-bottom: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }
.intent-pills { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.intent-input { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-body-sm); color: var(--text-2); }
.intent-input input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--sp-2) 10px;
  color: var(--text-1);
  font-size: var(--fs-body); /* 16px: no iOS focus zoom (§2.3) */
  min-width: 0;
}
.intent-input input[type="datetime-local"] { color-scheme: dark; }

.composer textarea {
  width: 100%;
  background: transparent;
  border: none;
  resize: vertical;
  color: var(--text-1);
  font-size: var(--fs-body);
  font-family: inherit;
  outline: none;
  min-height: 76px;
}
.composer textarea::placeholder { color: var(--text-3); }
.composer-row { display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-2); }
.char-count { font-size: var(--fs-caption); color: var(--text-2); }

#post-btn {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: var(--r-full);
  padding: 10px 22px;
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-bold);
  cursor: pointer;
}
#post-btn:disabled { opacity: 0.5; cursor: default; }

/* Vibe (photo / color / mood) — content styling stays literal (§1.2) */
.vibe-panel { margin: var(--sp-3) 0; padding: var(--sp-3); background: var(--surface-2); border-radius: var(--r-md); }
#vibe-toggle { margin-top: var(--sp-2); }
.vibe-choices { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.vibe-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--r-md);
  background: var(--surface-1);
  color: var(--text-1);
  border: 1px solid transparent;
  font-size: var(--fs-body-sm);
  cursor: pointer;
}
.vibe-btn.active { border-color: var(--accent); }
.vibe-sub { margin-top: var(--sp-2); }
.swatch-row { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.mood-sunset { background: linear-gradient(160deg, #2b1055, #e0574f 70%, #ffb36b); }
.mood-ocean { background: linear-gradient(160deg, #0b2c4d, #1f8a70 80%); }
.mood-forest { background: linear-gradient(160deg, #123524, #3f7f4f 75%); }
.mood-neon { background: linear-gradient(160deg, #12041f, #6d4fd0 60%, #ff4fd8); }

/* Stage 3 — reach */
.reach-pills { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.reach-pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: var(--r-full);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-meta);
  cursor: pointer;
}
.reach-pill.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: var(--fw-bold);
}
.retention-line { color: var(--text-2); font-size: var(--fs-meta); margin: var(--sp-1) 0; }

/* Read-only persona line (the editor itself lives in YOU/profile.css) */
.persona-line {
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: var(--fs-meta);
  padding: var(--sp-1) 0;
  text-align: left;
  width: 100%;
}
.persona-line #persona-name { color: var(--accent); font-weight: var(--fw-bold); }
