/* ==========================================================================
   Ensemble Fitness — member app styles (reuses the marketing site's design tokens)
   ========================================================================== */

:root {
  --navy-950: #05070d;
  --navy-900: #0b0f1a;
  --navy-800: #121a2c;
  --navy-700: #1c2740;
  --navy-600: #2a3652;

  --accent: #db1f52;
  --accent-2: #ff3d68;
  --accent-dark: #a81440;
  --accent-tint: rgba(219, 31, 82, 0.12);

  --green: #1fae6e;
  --green-tint: rgba(31, 174, 110, 0.14);
  --amber: #e2a63a;
  --amber-tint: rgba(226, 166, 58, 0.14);
  --red: #e2483a;
  --red-tint: rgba(226, 72, 58, 0.14);

  --muted-invert: #a7afc0;
  --faint-invert: #6b7690;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-hard: 0 30px 60px -25px rgba(11, 15, 26, 0.55);
  --container: 720px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
  background: radial-gradient(circle at 15% 0%, #170a13 0%, var(--navy-950) 55%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Poppins", "Inter", sans-serif;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  color: #fff;
}

p { margin: 0 0 14px; color: var(--muted-invert); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.config-warning {
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
}

.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 17px;
}

.app-brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.app-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted-invert);
}

.app-nav-links a:hover { color: #fff; }

.app-shell {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.app-shell.narrow { max-width: 440px; }

.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}

.card h2 { font-size: 19px; margin-bottom: 4px; }
.card .card-sub { font-size: 13.5px; margin-bottom: 20px; }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 10px;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0;
}

.admin-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted-invert);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 14px;
  cursor: pointer;
  font-family: inherit;
}

.admin-tab-btn:hover { color: #fff; }

.admin-tab-btn.active {
  color: #fff;
  border-bottom-color: var(--accent-2);
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-invert);
  margin-bottom: 6px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14.5px;
  color: #fff;
  font-family: inherit;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--faint-invert); }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent-2);
}

.field textarea { resize: vertical; min-height: 80px; }

.password-field-wrap { position: relative; }
.password-field-wrap input { padding-right: 46px; }
.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  padding: 8px 10px;
  color: var(--faint-invert);
}
.password-toggle:hover,
.password-toggle:focus { color: #fff; outline: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-danger { background: rgba(226, 72, 58, 0.16); color: #ff9a8f; border: 1px solid rgba(226, 72, 58, 0.4); }

.category-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 24px;
  scrollbar-width: none;
}
.category-filters::-webkit-scrollbar { display: none; }

.category-chip {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-invert);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.category-chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-color: transparent;
}

.tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted-invert);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.tab-btn.active { background: var(--accent); color: #fff; }

.form-msg {
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: none;
}

.form-msg.show { display: block; }
.form-msg.error { background: var(--red-tint); color: #ff9a8f; }
.form-msg.success { background: var(--green-tint); color: #6fe0ac; }

.avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.avatar-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--navy-800));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

.avatar-circle-uploadable {
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.avatar-circle-uploadable:hover,
.avatar-circle-uploadable:focus-visible {
  transform: scale(1.03);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
  outline: none;
}
.avatar-upload-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent, #ff5a5f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 2px solid var(--navy-900, #10131c);
  pointer-events: none;
}

/* Quote Voiceover Library — one row per member recording under a quote. */
.quote-recording-list { margin-top: 4px; }
.quote-recording-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.quote-recording-row:last-child { border-bottom: none; }
.quote-recording-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--navy-800));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}
.quote-recording-body { flex: 1; min-width: 0; }
.quote-recording-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; color: #fff; }
.quote-recording-audio { width: 100%; max-width: 260px; height: 32px; }

.dropzone {
  border: 1.5px dashed rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent-2);
  background: rgba(255, 61, 104, 0.06);
}

.dropzone input[type="file"] { display: none; }

.dropzone-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--accent-2);
}

.dropzone strong { display: block; color: #fff; font-size: 14.5px; margin-bottom: 4px; }
.dropzone span { font-size: 12.5px; color: var(--faint-invert); }

.upload-progress {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-top: 14px;
  display: none;
}

.upload-progress.show { display: block; }

.upload-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-2);
  transition: width 0.2s ease;
}

.narration-section {
  display: none;
  margin: 4px 0 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 61, 104, 0.3);
  background: var(--accent-tint);
}
.narration-section.show { display: block; }

.narration-section .field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.narration-section .field-label-row label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.narration-timer {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
  display: none;
}

.narration-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#musicTrackSelect {
  flex: 1;
  min-width: 180px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: #fff;
  font-family: inherit;
}
#musicTrackSelect:focus { outline: none; border-color: var(--accent-2); }
#musicTrackSelect option { color: #111; }

.record-btn.recording {
  background: var(--red);
  color: #fff;
  border-color: transparent;
  animation: pulse-rec 1.1s ease-in-out infinite;
}

@keyframes pulse-rec { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

.narration-preview { margin-top: 12px; }
.narration-preview audio { width: 100%; height: 34px; }

.narrated-note {
  font-size: 12px;
  color: var(--faint-invert);
  margin-top: 2px;
}

.field-hint {
  display: block;
  font-size: 12px;
  color: var(--faint-invert);
  margin-top: 4px;
}

.trim-preview-video {
  width: 100%;
  max-height: 260px;
  border-radius: var(--radius-sm);
  background: #000;
  margin-bottom: 12px;
  display: block;
}

.trim-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.trim-slider-row label {
  width: 40px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--faint-invert);
}
.trim-slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent-2);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.media-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--navy-800);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-tile img, .media-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-tile .kind-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(5, 7, 13, 0.6);
  color: #fff;
  text-transform: uppercase;
}

/* A voice/audio upload has no image to show, so it gets its own card treatment
   inside the same thumbnail boxes (.media-tile, .feed-card-thumb, .review-thumb)
   used for photos and videos — an icon plus the native player. */
.audio-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-800));
}
.audio-card .audio-ico { font-size: 26px; line-height: 1; }
.audio-card audio { width: 100%; max-width: 220px; height: 32px; }
.review-thumb .audio-card { padding: 6px; gap: 4px; }
.review-thumb .audio-card .audio-ico { font-size: 18px; }
.review-thumb .audio-card audio { height: 24px; }

.status-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-badge.pending { background: var(--amber-tint); color: var(--amber); }
.status-badge.approved { background: var(--green-tint); color: var(--green); }
.status-badge.rejected { background: var(--red-tint); color: #ff8579; }
.status-badge.denied { background: var(--red-tint); color: #ff8579; }
.status-badge.resolved { background: var(--green-tint); color: var(--green); }
.status-badge.dismissed { background: rgba(255, 255, 255, 0.08); color: var(--faint-invert); }

.media-tile-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.media-tile-reason {
  font-size: 11.5px;
  line-height: 1.4;
  color: #ff8579;
  background: var(--red-tint);
  border-radius: 8px;
  padding: 7px 9px;
}

.media-tile-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(5, 7, 13, 0.65);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.empty-state {
  text-align: center;
  padding: 30px 16px;
  color: var(--faint-invert);
  font-size: 13.5px;
}

/* ---------- Music Library / tip wallet ---------- */

.track-row {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.track-row:last-child { border-bottom: none; }

.track-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.track-title { font-weight: 700; font-size: 15px; color: #fff; }
.track-artist { font-size: 12.5px; color: var(--muted-invert); margin-top: 1px; }

/* "100% Royalties" — a visible hook for independent/unsigned artists (Ken's
   ask: draw creators in with "I can post my music and keep it all"). Only
   shown on tracks admin has confirmed aren't tied to a label/publisher. */
.track-royalty-badge {
  display: inline-block;
  vertical-align: middle;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
}
.track-bio { font-size: 13px; margin: 8px 0 0; }
.track-link { display: inline-block; font-size: 12.5px; color: var(--accent-2); margin-top: 2px; word-break: break-all; }

.track-audio {
  width: 100%;
  margin-top: 12px;
  height: 34px;
}

.tip-area { margin-top: 12px; }

.tip-toggle {
  background: none;
  border: none;
  color: var(--muted-invert);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.tip-toggle:hover { color: #fff; }

.tip-amounts {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.tip-amount-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.tip-amount-btn:hover { background: rgba(255, 255, 255, 0.12); }
.tip-amount-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.tip-status {
  display: none;
  font-size: 12.5px;
  margin-top: 8px;
  font-weight: 600;
}
.tip-status.show { display: block; }
.tip-status.success { color: var(--green); }
.tip-status.error { color: #ff9a8f; }

.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.feed-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.feed-card-thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--navy-800);
}

.feed-card-thumb img, .feed-card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-card-thumb .kind-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(5, 7, 13, 0.6);
  color: #fff;
  text-transform: uppercase;
}

.feed-card-meta { padding: 14px 16px 16px; }

.feed-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.feed-card-sub {
  font-size: 12px;
  color: var(--faint-invert);
  margin-bottom: 8px;
}

.feed-card-caption {
  font-size: 13px;
  color: var(--muted-invert);
  margin: 0;
}

/* ---------- Dense scrollable feed grid + lightbox ----------
   Replaces the large one-per-row cards above with a compact multi-column
   grid of square tiles, so members can browse a hundred videos back to
   back without leaving the page — tapping a tile opens it large in a
   lightbox with Prev/Next to keep moving through the feed. */

.feed-tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
@media (max-width: 900px) {
  .feed-tile-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .feed-tile-grid { grid-template-columns: repeat(2, 1fr); }
}

.feed-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--navy-800);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.feed-tile img, .feed-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.feed-tile-audio {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  background: linear-gradient(150deg, var(--accent-dark), var(--navy-900));
}

.feed-tile .kind-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(5, 7, 13, 0.65);
  color: #fff;
  text-transform: uppercase;
}

.feed-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 7, 13, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
}

/* Row on wide screens (video + "Up next" strip side by side), column and
   full-width on narrow ones — there's no spare width on a phone to show a
   peek of what's next without shrinking the main video, so the strip is a
   desktop-only bonus, not a mobile requirement. */
.feed-lightbox-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 92vw;
  max-height: 90vh;
  padding: 64px 0;
  box-sizing: border-box;
}
@media (min-width: 900px) {
  .feed-lightbox-layout { flex-direction: row; align-items: center; gap: 30px; max-width: 94vw; }
}

.feed-lightbox-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.feed-lightbox-inner.transitioning { opacity: 0; }
.feed-lightbox-inner.transitioning.slide-next { transform: translateY(-22px); }
.feed-lightbox-inner.transitioning.slide-prev { transform: translateY(22px); }

.feed-lightbox-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--faint-invert);
  font-size: 11.5px;
  margin-top: 2px;
}
.feed-lightbox-hint .chev {
  display: inline-block;
  animation: feedHintBounceY 1.6s ease-in-out infinite;
}
@keyframes feedHintBounceY {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(3px); opacity: 1; }
}

.feed-lightbox-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.feed-lightbox-media img,
.feed-lightbox-media video {
  max-width: 80vw;
  max-height: 56vh;
  border-radius: 10px;
  object-fit: contain;
  background: #000;
}
@media (min-width: 900px) {
  .feed-lightbox-media img,
  .feed-lightbox-media video {
    max-width: min(60vw, 480px);
    max-height: 62vh;
  }
}

.feed-lightbox-media .audio-card { min-width: 280px; }

.feed-lightbox-meta {
  color: #fff;
  text-align: center;
  max-width: 520px;
  padding: 0 16px;
}

.feed-lightbox-name { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.feed-lightbox-sub { font-size: 12.5px; color: var(--faint-invert); margin-bottom: 8px; }
.feed-lightbox-caption { font-size: 13.5px; color: var(--muted-invert); margin: 0; }

/* Note + signature — a member's own note about their post, "signed" either
   with a typed name (shown in a cursive font) or a hand-drawn mark. Shown
   to every viewer once saved; only the post's owner sees the add/edit
   controls (feed.html decides that by comparing user ids, not this CSS). */
.feed-lightbox-note { max-width: 320px; margin-top: 4px; }

.note-link-btn {
  background: none;
  border: none;
  color: var(--accent-2);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 0;
}
.note-link-btn:hover { text-decoration: underline; }
.note-link-btn-add {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
}

.feed-lightbox-note-display {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: left;
}
.feed-lightbox-note-text {
  font-size: 13.5px;
  color: var(--muted-invert);
  margin: 0 0 8px;
  white-space: pre-wrap;
}
.signature-row { display: flex; align-items: baseline; gap: 8px; }
.signature-label { font-size: 11.5px; color: var(--faint-invert); }
.signature-mark.signature-typed {
  font-family: "Dancing Script", cursive;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.signature-mark.signature-drawn {
  height: 34px;
  background: #fff;
  border-radius: 4px;
  padding: 2px 6px;
}

.note-editor {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: left;
}
.note-editor label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-invert);
  margin-bottom: 6px;
}
.note-editor textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  color: #fff;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 12px;
}
.signature-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.signature-tab {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--faint-invert);
  cursor: pointer;
  font-family: inherit;
}
.signature-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.signature-pane { margin-bottom: 12px; }
.signature-pane input[type="text"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: #fff;
  font-family: inherit;
  margin-bottom: 10px;
}
.signature-preview { min-height: 34px; display: flex; align-items: center; }
#signatureCanvas {
  width: 100%;
  max-width: 300px;
  height: 110px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  touch-action: none;
  cursor: crosshair;
  display: block;
  margin-bottom: 8px;
}
.note-editor-actions { display: flex; justify-content: flex-end; gap: 8px; }

.feed-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feed-lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

/* Nav arrows are grouped in one row, floating just below the whole card —
   an up/down pair matching the vertical swipe gesture (swipe up for next,
   down for previous). Positioned relative to .feed-lightbox-inner (not the
   whole overlay) so they stay centered on the video itself even when the
   "Up next" strip is showing beside it. */
.feed-lightbox-navrow {
  position: absolute;
  bottom: -58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 14px;
}
.feed-lightbox-nav {
  position: static;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feed-lightbox-nav:hover { background: rgba(255, 255, 255, 0.2); }
.feed-lightbox-nav:disabled { opacity: 0.3; cursor: default; }
@media (max-width: 640px) {
  .feed-lightbox-nav { width: 38px; height: 38px; font-size: 16px; }
  .feed-lightbox-navrow { bottom: -48px; }
}

/* "Up next" strip — desktop only (see .feed-lightbox-layout above). Static
   preview frames, not autoplaying video, so several don't compete for
   bandwidth/CPU with the one actually playing. The nearest upcoming item
   is a little bigger/brighter to draw the eye toward it specifically. */
.feed-lightbox-upnext {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 92px;
  flex-shrink: 0;
}
@media (min-width: 900px) {
  .feed-lightbox-upnext { display: flex; }
}

.feed-lightbox-upnext-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--faint-invert);
}

.feed-lightbox-upnext-item {
  position: relative;
  width: 78px;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  transform: scale(0.9);
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  background: var(--navy-800);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.feed-lightbox-upnext-item:hover { opacity: 0.85; }
.feed-lightbox-upnext-item.next-up {
  opacity: 0.95;
  transform: scale(1);
  border-color: rgba(255, 255, 255, 0.4);
}
.feed-lightbox-upnext-item img,
.feed-lightbox-upnext-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.feed-lightbox-upnext-audio {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: linear-gradient(150deg, var(--accent-dark), var(--navy-900));
}

.review-row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.review-row:last-child { border-bottom: none; }

.review-thumb {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--navy-800);
}

.review-thumb img, .review-thumb video { width: 100%; height: 100%; object-fit: cover; }

.review-meta { flex: 1; min-width: 0; }
.review-meta strong { display: block; font-size: 14px; color: #fff; margin-bottom: 2px; }
.review-meta span { font-size: 12.5px; color: var(--faint-invert); }

.review-actions { display: flex; gap: 8px; flex-shrink: 0; }

.member-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.member-row:last-child { border-bottom: none; }

.member-row-clickable {
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin: 0 -10px;
  padding: 16px 10px;
}
.member-row-clickable:hover,
.member-row-clickable:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.member-row .avatar-circle {
  width: 54px;
  height: 54px;
  font-size: 17px;
  margin: 0;
}

.member-row-meta { flex: 1; min-width: 0; }
.member-row-meta strong { display: block; font-size: 15px; color: #fff; margin-bottom: 3px; }
.member-row-meta p { font-size: 13px; color: var(--muted-invert); margin: 0 0 4px; }
.member-row-meta span { font-size: 12px; color: var(--faint-invert); }

.thumb-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 42px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--navy-800));
}

.match-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: rgba(5, 7, 13, 0.65);
  color: #fff;
  white-space: nowrap;
}
.match-badge.great { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); }
.match-badge.zip { background: var(--green-tint); color: var(--green); }
.match-badge.wake { background: var(--amber-tint); color: var(--amber); }

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .app-shell { padding: 32px 16px 64px; }
  .card { padding: 20px; }
}

/* ==========================================================================
   Follow / Message — person-level follow relationships + a simple one-way
   message, used in the feed lightbox and on a member's profile page.
   ========================================================================== */
.follow-actions-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.follow-btn.following { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--accent-2); color: var(--accent-2); }

/* Generic small modal — reused for "Send a message", and for the
   followers/following lists on the profile page. */
.simple-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 13, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1100; /* above .feed-lightbox (1000) so "Message" still works from inside it */
}
.simple-modal-overlay.show { display: flex; }

.simple-modal {
  background: var(--navy-900);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 26px;
  max-width: 420px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-hard);
}

.simple-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.simple-modal-close:hover { background: rgba(255, 255, 255, 0.18); }

.simple-modal textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  color: #fff;
  font-family: inherit;
  resize: vertical;
}

.simple-modal-list { display: flex; flex-direction: column; }
.simple-modal-list .member-row { padding: 12px 0; }

.simple-modal input[type="text"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  color: #fff;
  font-family: inherit;
  box-sizing: border-box;
}

.simple-modal select {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  color: #fff;
  font-family: inherit;
  margin-bottom: 12px;
}
.simple-modal select option { color: #111; }
.simple-modal label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted-invert);
  margin-bottom: 6px;
}
.simple-modal .report-target-preview {
  font-size: 12.5px;
  color: var(--faint-invert);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 14px;
}

/* ==========================================================================
   Reactions (👍 / 💪 / ❤️) + comments — public, visible to every member,
   shown while watching a video/photo in the feed lightbox. Separate from
   the post owner's own private "note & signature" feature above.
   ========================================================================== */
.reaction-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 4px;
}

.reaction-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: 14px;
  color: var(--muted-invert);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.reaction-btn:hover { border-color: rgba(255, 255, 255, 0.3); }
.reaction-btn.active {
  background: var(--accent-tint);
  border-color: var(--accent-2);
  color: #fff;
}
.reaction-btn .reaction-count { font-size: 12.5px; }

.comments-section {
  max-width: 380px;
  margin: 10px auto 0;
  text-align: left;
}

.comments-list {
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 8px;
}

.comment-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.comment-item:last-child { border-bottom: none; }
.comment-item-name { font-size: 12.5px; font-weight: 700; color: #fff; margin-right: 6px; }
.comment-item-time { font-size: 11px; color: var(--faint-invert); }
.comment-item-body { font-size: 13px; color: var(--muted-invert); margin-top: 2px; }
.comment-report-btn {
  background: none;
  border: none;
  padding: 0;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--faint-invert);
  cursor: pointer;
  text-decoration: underline;
}
.comment-report-btn:hover { color: var(--muted-invert); }

.comment-input-row { display: flex; gap: 8px; }
.comment-input-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  padding: 9px 14px;
  font-size: 13px;
  color: #fff;
  font-family: inherit;
}
.comment-input-row input::placeholder { color: var(--faint-invert); }

/* ==========================================================================
   Followers / Following counts on a member's own profile page
   ========================================================================== */
.follow-stats-row {
  display: flex;
  gap: 20px;
  margin: 10px 0 4px;
}
.follow-stat {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  text-align: left;
  color: inherit;
}
.follow-stat strong { display: block; font-size: 19px; color: #fff; }
.follow-stat span { font-size: 12px; color: var(--faint-invert); font-weight: 700; }
.follow-stat:hover strong { color: var(--accent-2); }

/* ==========================================================================
   Inbox — one-way messages received on the profile page
   ========================================================================== */
.inbox-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}
.inbox-item:last-child { border-bottom: none; }
.inbox-item-name { font-size: 13.5px; font-weight: 700; color: #fff; }
.inbox-item-time { font-size: 11.5px; color: var(--faint-invert); margin-left: 6px; }
.inbox-item-body { font-size: 13.5px; color: var(--muted-invert); margin-top: 3px; }
.inbox-item.unread::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
}

/* ==========================================================================
   Notification bell — injected into .app-nav by js/notifications.js on
   every signed-in page. See sql/notifications.sql for what creates these
   rows (reactions, comments, follows, messages).
   ========================================================================== */
.efit-notif-wrap {
  position: relative;
  display: inline-flex;
}

.efit-notif-bell {
  position: relative;
  background: none;
  border: none;
  color: var(--muted-invert);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.efit-notif-bell:hover { color: #fff; }

.efit-notif-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--accent-2);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.efit-notif-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 320px;
  max-width: min(320px, calc(100vw - 32px));
  max-height: 420px;
  overflow-y: auto;
  background: var(--navy-900);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard);
  z-index: 1200; /* above the "Send a message" modal (1100) */
}

.efit-notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.efit-notif-mark-all {
  background: none;
  border: none;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.efit-notif-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  color: var(--muted-invert);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
}
.efit-notif-item:last-child { border-bottom: none; }
.efit-notif-item:hover { background: rgba(255, 255, 255, 0.04); }
.efit-notif-item.unread { background: var(--accent-tint); color: #fff; }
.efit-notif-item-time { display: block; color: var(--faint-invert); font-size: 11px; margin-top: 3px; }
