:root {
  --bg: #0c0c0e;
  --surface: #141417;
  --surface-2: #1a1a1e;
  --ink: #f1efe8;
  --muted: #8c8b84;
  --faint: #5f5e58;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #d8a24a;
  --accent-soft: rgba(216, 162, 74, 0.14);
  --danger: #e0928f;
  --radius: 10px;
  --serif: Georgia, "Times New Roman", "Iowan Old Style", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.phone {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(12, 12, 14, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  z-index: 5;
}

.wordmark {
  font-family: var(--serif);
  font-size: 25px;
  letter-spacing: 1px;
  color: var(--ink);
}

.mentor-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  padding: 5px 11px;
  border-radius: 2px;
}

main { padding: 24px 22px 40px; flex: 1; }

.screen-pane { animation: fade 0.3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.mentor-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.5px;
}

.mentor-name { margin: 0; font-weight: 500; font-size: 15px; letter-spacing: 0.2px; }
.mentor-sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

.lead {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 24px;
}

.dropzone {
  display: block;
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 22px;
}
.photo-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-remove:active { background: rgba(0, 0, 0, 0.82); }
.dz-hint { font-size: 12px; color: var(--muted); text-align: center; margin: -12px 0 16px; }

.dropzone-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 56px 16px;
  color: var(--muted);
}
.dz-icon { font-size: 30px; line-height: 1; font-weight: 200; color: var(--accent); }
.dz-text { font-size: 12px; text-transform: uppercase; letter-spacing: 1.4px; }
.dz-formats { font-size: 11px; color: var(--muted); letter-spacing: 0.3px; margin-top: -4px; }
.setting-hint { font-size: 12px; color: var(--muted); margin: -6px 0 14px; line-height: 1.4; }
.ai-note { font-size: 12.5px; color: var(--muted); margin: -14px 0 20px; line-height: 1.4; }
.sub-annual { margin-top: 10px; background: var(--surface-2); color: var(--accent); border: 1px solid var(--accent); }

#preview { width: 100%; display: block; }

.field { margin-bottom: 18px; }
.field-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 8px;
}
.opt { color: var(--faint); letter-spacing: 0.5px; }

select,
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 13px 14px;
  font-size: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus { outline: none; border-color: var(--accent); }
input::placeholder { color: var(--faint); }

.exif {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.4px;
  margin: 0 0 18px;
}

.primary {
  width: 100%;
  padding: 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.05s;
}
.primary:disabled { opacity: 0.3; cursor: default; }
.primary:not(:disabled):active { transform: scale(0.99); }

.spinner {
  width: 36px;
  height: 36px;
  margin: 72px auto 18px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  text-align: center;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
}

.result-photo {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 24px;
  display: block;
  border: 1px solid var(--line);
}

/* Score */
.score-block { text-align: center; margin: 4px 0 26px; }
.score-num {
  font-family: var(--serif);
  font-size: 64px;
  line-height: 1;
  color: var(--accent);
  font-weight: 400;
}
.score-max { font-size: 22px; color: var(--faint); margin-left: 2px; }
.score-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2.4px;
  color: var(--muted);
  margin-top: 10px;
}
.score-rule {
  width: 40px;
  height: 1px;
  background: var(--line-strong);
  margin: 18px auto 0;
}

.critique { font-size: 15px; line-height: 1.7; margin-bottom: 26px; color: var(--ink); }
.critique h3 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin: 26px 0 8px;
  font-weight: 600;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}
.critique h3:first-child { margin-top: 0; }
.critique p { margin: 0 0 12px; }
.critique ol, .critique ul { margin: 0 0 12px; padding-left: 20px; }
.critique li { margin-bottom: 8px; }
.critique strong { font-weight: 600; color: #fff; }
.critique .signoff {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
  text-align: right;
  margin-top: 18px;
}

.error {
  background: rgba(163, 45, 45, 0.18);
  color: var(--danger);
  border: 1px solid rgba(224, 146, 143, 0.25);
  border-radius: 8px;
  padding: 13px 15px;
  font-size: 14px;
  margin-top: 18px;
}

/* ---------- Phase 3: auth, onboarding, nav, history, profile, feedback ---------- */

.serif-h {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  margin: 0 0 6px;
  letter-spacing: 0.3px;
}
.auth-lead { margin-top: 8px; }

.tabs {
  display: flex;
  gap: 6px;
  margin: 8px 0 22px;
  border-bottom: 1px solid var(--line);
}
.tab {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  padding: 10px 4px;
  margin-right: 18px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input { width: 100%; }

textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--sans);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
}
textarea:focus { outline: none; border-color: var(--accent); }
textarea::placeholder { color: var(--faint); }

.ghost {
  width: 100%;
  padding: 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 12px;
}
.ghost:active { background: var(--surface); }
.danger-ghost { color: var(--danger); border-color: rgba(224, 146, 143, 0.3); }

/* bottom nav */
.nav {
  position: sticky;
  bottom: 0;
  display: flex;
  border-top: 1px solid var(--line);
  background: rgba(12, 12, 14, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
}
.nav-item {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  padding: 16px 0;
  cursor: pointer;
}
.nav-item.active { color: var(--accent); }

/* history */
.history-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.history-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}
.history-thumb {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
}
.history-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.history-meta { min-width: 0; }
.history-score { font-family: var(--serif); font-size: 26px; color: var(--accent); line-height: 1; }
.history-score span { font-size: 13px; color: var(--faint); }
.history-date { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-top: 4px; }
.history-assign { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* profile */
.profile-email { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.profile-facts { margin: 0 0 24px; }
.profile-facts dt { font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); margin-top: 14px; }
.profile-facts dd { margin: 4px 0 0; font-size: 15px; color: var(--ink); }

.inbox { margin-top: 18px; }
.fb-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.fb-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.fb-kind { font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--accent); }
.fb-from { font-size: 11px; color: var(--muted); }
.fb-msg { font-size: 14px; line-height: 1.5; }

/* feedback modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 20;
}
.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border-top: 1px solid var(--line-strong);
  padding: 22px;
}
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.modal-actions .ghost, .modal-actions .primary { margin-bottom: 0; }
.fb-status { font-size: 13px; margin: 12px 0 0; text-align: center; }
.fb-status.is-ok { color: var(--accent); }
.fb-status.is-error { color: var(--danger); }

/* ---------- equipment picker + chips ---------- */
.gear-row { display: flex; gap: 8px; }
.gear-row select { flex: 1; }
.gear-add {
  flex-shrink: 0;
  padding: 0 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
}
.gear-add:active { background: var(--surface); }
.gear-other { margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 6px 6px 12px;
  font-size: 13px;
}
.chip button {
  background: rgba(216, 162, 74, 0.25);
  border: none;
  color: var(--accent);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- profile head + avatar ---------- */
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.avatar-button {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  padding: 0;
}
.avatar-button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--accent);
}
.avatar-edit {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  padding: 4px 0;
}
.profile-head .serif-h { margin-bottom: 2px; }
.profile-head .profile-email { margin: 0; }

/* ---------- topbar avatar ---------- */
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* thumbs on a critique */
.rate-block {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin: 4px 0 22px;
}
.rate-label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.rate-btn {
  width: 44px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 18px;
  cursor: pointer;
  filter: grayscale(1) opacity(0.75);
}
.rate-btn.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  filter: none;
}

/* "In the edit" — the mentor's Lightroom recipe card inside a critique */
.edit-card {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
  padding: 14px 16px;
  margin: 16px 0;
}
.ec-label {
  margin: 0 0 10px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--accent);
}
.edit-card ol { margin: 0; padding-left: 20px; }
.edit-card li { font-size: 14px; line-height: 1.5; margin-bottom: 10px; }
.edit-card li:last-child { margin-bottom: 0; }
.edit-card li strong { color: var(--accent); }
.edit-card li em { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* current assignment card on the profile */
.assignment-card {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 16px;
  margin: 0 0 22px;
}
.ac-label {
  margin: 0 0 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--accent);
}
.ac-text { margin: 0; font-family: var(--serif); font-size: 16px; line-height: 1.45; }
.ac-from { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.ac-label-gap { margin-top: 14px; }
.focus-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.focus-chip {
  font-size: 12px;
  padding: 4px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
}
.topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: transparent;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ta-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--accent);
}

/* ---------- profile home-base buttons ---------- */
.ask-cta { margin-top: 0; }
.profile-facts { margin-top: 22px; }
.serif-h.sub { font-size: 20px; margin: 26px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.profile-actions { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ---------- ask your mentor ---------- */
.ask-thread { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.ask-bubble {
  max-width: 90%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.6;
}
.ask-bubble.user {
  align-self: flex-end;
  background: var(--accent-soft);
  color: var(--ink);
  border-bottom-right-radius: 4px;
}
.ask-bubble.cole {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.ask-bubble.cole p:first-child { margin-top: 0; }
.ask-bubble.cole p:last-child { margin-bottom: 0; }
.ask-bubble.cole h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px;
  color: var(--accent); margin: 10px 0 6px;
}
.ask-bubble.cole ul, .ask-bubble.cole ol { margin: 6px 0; padding-left: 18px; }
.ask-bubble.thinking { color: var(--muted); font-style: italic; }

.ask-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.suggest {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}
.suggest:active { background: var(--surface-2); }

.tech-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-chip {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.tech-chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #0e0e10;
  font-weight: 600;
}

/* ---------- portrait light diagram ---------- */
.light-mode { display: flex; gap: 8px; margin-bottom: 10px; }
.light-pill {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  cursor: pointer;
}
.light-pill.selected { background: var(--accent); border-color: var(--accent); color: #0e0e10; font-weight: 600; }
.light-reflector { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.light-reflector input { width: auto; }
.light-hint { font-size: 13px; color: var(--muted); margin: 6px 0 10px; }

.light-diagram {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--surface) 0%, transparent 70%);
}
.light-subject {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; font-size: 26px; line-height: 1;
}
.light-subject span { font-size: 10px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }
.light-camera { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); }
.light-dot {
  position: absolute; width: 30px; height: 30px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface-2); border: 1px solid var(--line-strong);
  color: var(--accent); font-size: 13px; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.light-dot.active { background: var(--accent); border-color: var(--accent); color: #0e0e10; }

.light-list { display: flex; flex-direction: column; gap: 8px; }
.light-row { display: flex; align-items: center; gap: 6px; }
.light-num {
  flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #0e0e10;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.light-row select {
  flex: 1; min-width: 0; padding: 7px 6px; font-size: 12px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px;
}
.light-x {
  flex: none; width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-strong); color: var(--muted);
}

/* ---------- mentor bios page ---------- */
.bios-intro { color: var(--muted); font-size: 14px; margin: 0 0 18px; line-height: 1.5; }
.bios-list { display: flex; flex-direction: column; gap: 14px; }
.bio-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.bio-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bio-head .avatar { width: 56px; height: 56px; font-size: 18px; flex: none; }
.bio-meta { min-width: 0; }
.bio-name { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.ai-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .6px;
  color: var(--accent); border: 1px solid var(--accent);
  padding: 1px 7px; border-radius: 20px; text-transform: uppercase;
}
.bio-spec { font-size: 13px; color: var(--muted); margin-top: 2px; }
.bio-text { font-size: 14px; line-height: 1.55; color: var(--ink); margin: 0 0 12px; }
.bio-links { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 14px; }
.bio-links a {
  font-size: 13px; color: var(--accent); text-decoration: none;
  border-bottom: 1px solid rgba(216, 162, 74, 0.4); padding-bottom: 1px;
}
.bio-links a:active { opacity: 0.7; }
.bio-pick { width: 100%; }

.ask-input { display: flex; gap: 8px; position: sticky; bottom: 12px; }
.ask-input input { flex: 1; }

/* ---------- follow-up chat on a critique ---------- */
.followup {
  margin: 22px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
}
.followup-head {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}
.followup .ask-thread:empty { margin-bottom: 0; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  max-width: 88%;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  text-align: center;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.toast.is-error { border-color: rgba(224, 146, 143, 0.5); color: var(--danger); }
.toast.is-ok { border-color: var(--accent); }

/* ---------- tappable history cards + detail ---------- */
.history-card {
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  color: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.history-card:active { background: var(--surface-2); }
.history-meta { flex: 1; }
.history-chevron { color: var(--faint); font-size: 22px; padding-right: 4px; }
.detail-back { width: auto; padding: 10px 16px; margin-bottom: 18px; }
#result-done { margin-top: 10px; }

/* ---------- iPhone safe areas ---------- */
.topbar { padding-top: calc(18px + env(safe-area-inset-top, 0px)); }
.nav { padding-bottom: env(safe-area-inset-bottom, 0px); }
main { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
.modal-card { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }

/* ---------- legal + auth footer links ---------- */
.legal-links { text-align: center; margin-top: 22px; font-size: 13px; }
.legal-links a, .forgot a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; }
.forgot { text-align: center; margin-top: 14px; font-size: 13px; }
.legal-body { font-size: 15px; line-height: 1.7; color: var(--ink); }
.legal-body h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--accent); margin: 22px 0 8px; }
.legal-body p { margin: 0 0 12px; color: var(--muted); }
.legal-body ul { margin: 0 0 12px; padding-left: 20px; color: var(--muted); }
.legal-body li { margin-bottom: 6px; }
.legal-body b { color: var(--ink); font-weight: 600; }
.legal-note { font-style: italic; font-size: 13px; }

/* ---------- progress chart ---------- */
.progress-chart {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.progress-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.progress-stats b { color: var(--accent); font-size: 15px; margin-left: 4px; }

/* ---------- admin reset ---------- */
.admin-reset { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.admin-reset input { margin-bottom: 10px; }

/* ---------- topbar dropdown menu ---------- */
.topbar-menu {
  position: absolute;
  top: calc(64px + env(safe-area-inset-top, 0px));
  right: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 6px;
  min-width: 180px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}
.menu-item {
  background: none;
  border: none;
  color: var(--ink);
  text-align: left;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.menu-item:active { background: var(--surface); }
.menu-logout { color: var(--danger); border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 8px 8px; }

.cta-gap { margin-top: 12px; }
.logout-btn { margin-top: 28px; }

/* ---------- mentor switcher ---------- */
.mentor-row-btn {
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  color: inherit;
}
.mentor-row-btn .mentor-meta { flex: 1; }
.mentor-change {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 11px;
}

.modal-sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.mentor-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.mentor-option {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  color: var(--ink);
}
.mentor-option.active { border-color: var(--accent); }
.mentor-option:active { background: var(--surface-2); }
.mentor-opt-meta { flex: 1; }
.mentor-opt-meta .mentor-name { font-size: 15px; }
.mentor-opt-meta .mentor-sub { text-transform: uppercase; letter-spacing: 1px; font-size: 11px; }
.mentor-blurb { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.mentor-current {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
}

/* ---------- editable camera settings hint ---------- */
.exif-hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }

/* ---------- mentor photo avatars ---------- */
.avatar { overflow: hidden; }
.avatar-photo { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

/* ---------- voice narration ---------- */
.listen-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 18px;
}
.listen-ico { color: var(--accent); font-size: 13px; }

.player-controls { display: flex; align-items: center; gap: 10px; margin: -6px 0 18px; }
.player-skip {
  flex: none; background: transparent; border: 1px solid var(--line-strong); color: var(--muted);
  border-radius: 999px; padding: 5px 10px; font-size: 11px; cursor: pointer;
}
.player-skip:active { color: var(--accent); border-color: var(--accent); }
.player-seek { flex: 1; min-width: 0; height: 4px; cursor: pointer; accent-color: var(--accent); }
.player-time { flex: none; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- welcome / how it works ---------- */
.welcome-mark { color: var(--ink); display: flex; justify-content: center; margin: 8px 0 14px; }
.welcome-tag { text-align: center; color: var(--accent); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 16px; }
.welcome-steps { list-style: none; margin: 20px 0 22px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.welcome-steps li { display: flex; gap: 14px; align-items: flex-start; }
.ws-num {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #1a1a1a; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.ws-h { font-weight: 600; color: var(--ink); margin: 0 0 3px; }
.ws-p { font-size: 14px; color: var(--muted); line-height: 1.5; margin: 0; }
.welcome-note { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin: 0 0 20px; }

.avatar.speaking { animation: speakPulse 1.1s ease-in-out infinite; }
@keyframes speakPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(216, 162, 74, 0.55); }
  50% { box-shadow: 0 0 0 7px rgba(216, 162, 74, 0); }
}
