/* Mainfeed — main stylesheet (v0) */

:root {
  --bg: #0b0b0e;
  --surface: #16161b;
  --surface-2: #1d1d23;
  --border: #2a2a30;
  --text: #fafafa;
  --text-mute: #9a9aa3;
  --text-dim: #6a6a73;
  /* 4-color brand gradient: deep navy -> ocean blue -> teal -> warm sand */
  --c1: #000b21;
  --c2: #003f82;
  --c3: #4ca2b5;
  --c4: #ffd27f;
  --accent: #4ca2b5;    /* teal middle — used for borders/highlights against dark bg */
  --accent-2: #ffd27f;  /* warm sand — secondary highlight */
  --accent-glow: 76, 162, 181;  /* RGB triplet for box-shadow / rgba() use */
  --accent-grad: linear-gradient(135deg, var(--c1) 0%, var(--c2) 33%, var(--c3) 66%, var(--c4) 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-btn: 14px;
  --radius-pill: 999px;
  --container: 460px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body.mf-app,
body.mf-app .mf-app-main {
  touch-action: pan-y;
}

a { color: inherit; text-decoration: none; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }

/* ============ LAYOUT ============ */

.mf-landing, .mf-auth, .mf-app {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

/* Home page: full-bleed video hero. Body inherits min-height:100dvh from base so PTR works. */
.mf-home {
  background: var(--bg);
}

/* ============ VIDEO HERO ============ */

.mf-vhero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: clip;
  isolation: isolate;
  background: var(--bg);
}

.mf-vhero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
}

.mf-vhero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 11, 14, 0.55) 0%,
    rgba(11, 11, 14, 0.25) 28%,
    rgba(11, 11, 14, 0.55) 68%,
    rgba(11, 11, 14, 0.95) 100%
  );
  z-index: -1;
  pointer-events: none;
}

.mf-vhero-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
}

.mf-vhero-nav .mf-logo {
  font-size: 20px;
}

/* Brand logo lockup (icon + wordmark) */
.mf-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mf-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: block;
  flex-shrink: 0;
}

.mf-brand-mark {
  height: 20px;
  width: 92px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

/* Menu hamburger button — rounded-square, orange gradient */
.mf-menu-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  flex-shrink: 0;
  background: var(--accent-grad);
  border: none;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(76, 162, 181, 0.32);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mf-menu-btn:active {
  transform: scale(0.94);
  box-shadow: 0 3px 12px rgba(76, 162, 181, 0.25);
}

.mf-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: white;
  border-radius: 1px;
}

/* Menu drawer (full-screen overlay) */
.mf-menu {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 14, 0.92);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  animation: mf-menu-in 0.2s ease;
}

.mf-menu[hidden] {
  display: none;
}

@keyframes mf-menu-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mf-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mf-menu-head .mf-logo {
  font-size: 20px;
}

.mf-menu-close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.mf-menu-close:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.18);
}

.mf-menu-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.mf-menu-list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mf-menu-list a {
  display: block;
  padding: 20px 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: white;
  transition: color 0.15s ease;
}

.mf-menu-list a:active {
  color: var(--accent);
}

.mf-vhero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 24px;
  text-align: center;
}

.mf-vhero-h {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-bottom: 16px;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45);
}

.mf-vhero-p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.45;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.5);
  max-width: 340px;
}

.mf-vhero-actions {
  padding: 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mf-vhero-secondary {
  display: block;
  text-align: center;
  padding: 16px 28px;
  background: linear-gradient(135deg, rgba(76, 162, 181, 0.22), rgba(255, 210, 127, 0.16));
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 17px;
  color: white;
  border: 1px solid rgba(255, 210, 127, 0.4);
  box-shadow: 0 4px 18px rgba(76, 162, 181, 0.15);
  transition: transform 0.15s ease, background 0.15s ease;
}

.mf-vhero-secondary:active {
  transform: scale(0.97);
  background: linear-gradient(135deg, rgba(76, 162, 181, 0.32), rgba(255, 210, 127, 0.24));
}

.mf-vhero-legal {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 8px;
  line-height: 1.4;
}

.mf-vhero-legal a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
}


/* ============ NAV ============ */

.mf-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
}

.mf-back {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.mf-back:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.08);
}

.mf-logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mf-link {
  font-size: 14px;
  color: var(--text-mute);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

/* ============ BUTTONS ============ */

.mf-cta {
  display: inline-block;
  background: var(--accent-grad);
  color: white;
  font-weight: 600;
  font-size: 17px;
  padding: 18px 28px;
  border-radius: var(--radius-btn);
  border: none;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 32px rgba(76, 162, 181, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}

.mf-cta:active {
  transform: scale(0.97);
  box-shadow: 0 4px 16px rgba(76, 162, 181, 0.22);
}

.mf-cta-block {
  display: block;
  width: 100%;
  margin-top: 16px;
}

.mf-cta-sm {
  padding: 12px 20px;
  font-size: 15px;
}

/* ============ LANDING ============ */

.mf-hero {
  padding: 56px 0 64px;
  text-align: center;
}

.mf-hero-title {
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 20px;
}

.mf-hero-sub {
  font-size: 17px;
  color: var(--text-mute);
  margin-bottom: 36px;
  line-height: 1.5;
}

.mf-hero-foot {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-dim);
}

.mf-how {
  padding: 32px 0;
  display: grid;
  gap: 16px;
}

.mf-how-step {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.mf-how-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.mf-how-step h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.mf-how-step p {
  font-size: 15px;
  color: var(--text-mute);
}

.mf-philosophy {
  padding: 64px 0 48px;
  text-align: center;
}

.mf-philosophy p {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.mf-philosophy p:last-of-type {
  margin-bottom: 32px;
}

.mf-foot {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 32px 0 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}

.mf-foot-copy {
  margin-left: auto;
}

/* ============ AUTH / SIGNUP ============ */

.mf-form-wrap {
  padding: 16px 0 48px;
}

.mf-step h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.mf-sub {
  color: var(--text-mute);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.mf-field {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 16px;
  margin-bottom: 12px;
  height: 56px;
  transition: border-color 0.15s ease;
}

.mf-field:focus-within {
  border-color: var(--accent);
}

.mf-field input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 16px;
}

.mf-field input::placeholder {
  color: var(--text-dim);
}

.mf-prefix {
  color: var(--text-mute);
  font-size: 14px;
  margin-right: 4px;
  white-space: nowrap;
}

/* Progress dots */
.mf-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 32px;
}

.mf-progress span {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}

.mf-progress[data-step="1"] span:nth-child(-n+1),
.mf-progress[data-step="2"] span:nth-child(-n+2),
.mf-progress[data-step="3"] span:nth-child(-n+3),
.mf-progress[data-step="4"] span:nth-child(-n+4),
.mf-progress[data-step="5"] span:nth-child(-n+5) {
  background: var(--accent-grad);
}
/* The step-dots are a flex row, so the UA `[hidden]{display:none}` loses to
   `.mf-progress{display:flex}` on equal specificity — the dots stayed visible
   on the loading screen even with hidden=true. Hide them explicitly. */
.mf-progress[hidden] { display: none !important; }

/* ============ ONBOARDING ============ */

.mf-ob-progress {
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.mf-ob-q {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 20px;
}

.mf-ob-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mf-ob-opt {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.mf-ob-opt:active {
  transform: scale(0.985);
  background: rgba(76, 162, 181, 0.1);
  border-color: var(--accent);
}

.mf-ob-multi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.mf-ob-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 14px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  user-select: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.mf-ob-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mf-ob-chip:has(input:checked) {
  background: rgba(76, 162, 181, 0.16);
  border-color: var(--accent);
}

.mf-ob-hint {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.mf-ob-text {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 16px 18px;
  font-size: 16px;
  color: var(--text);
  outline: 0;
  transition: border-color 0.15s ease;
}

.mf-ob-text:focus {
  border-color: var(--accent);
}

/* ============ CHECK-IN CARD (top of feed) ============ */

.mf-checkin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 16px 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mf-checkin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mf-checkin-head h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mf-checkin-head .mf-checkin-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 0;
  color: var(--text-mute);
  font-size: 20px;
  cursor: pointer;
  border-radius: 8px;
}

.mf-checkin-head .mf-checkin-close:active {
  background: var(--border);
}

.mf-checkin-q {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.mf-checkin-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.mf-checkin-opt {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.mf-checkin-opt[data-selected="true"] {
  background: rgba(76, 162, 181, 0.18);
  border-color: var(--accent);
}

.mf-checkin-text {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  outline: 0;
}

.mf-checkin-text:focus {
  border-color: var(--accent);
}

/* Selfie upload grid */
.mf-selfie-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.mf-selfie-slot {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}

.mf-selfie-slot input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.mf-selfie-slot span {
  font-size: 32px;
  color: var(--text-dim);
  font-weight: 300;
}

.mf-selfie-slot--filled {
  border-style: solid;
  border-color: var(--accent);
}

.mf-selfie-slot--filled span {
  display: none;
}

/* Liveness stage */
.mf-liveness-stage {
  padding: 20px 0;
  text-align: center;
}

/* Checkbox */
.mf-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  font-size: 15px;
  color: var(--text-mute);
  line-height: 1.5;
  cursor: pointer;
}

.mf-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: all 0.15s ease;
}

.mf-check input[type="checkbox"]:checked {
  background: var(--accent-grad);
  border-color: transparent;
}

.mf-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.mf-check a {
  color: var(--accent);
  text-decoration: underline;
}

.mf-foot-link {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-mute);
}

.mf-foot-link a {
  color: var(--accent);
  font-weight: 600;
}

/* ============ APP ============ */

/* App page: full-bleed feed (no horizontal padding on body, so video reaches
   edge-to-edge). Header floats over content as a fixed overlay. */
body.mf-app {
  padding-left: 0;
  padding-right: 0;
}

.mf-app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Default state: at the top of the feed — solid black bar, full width.
     The .--scrolled modifier flips it to transparent once user starts
     scrolling, at which point the brand + hamburger pills get their own
     translucent backgrounds (see below) to stay readable over video. */
  background: #000;
  z-index: 10;
  transition: background 0.2s ease;
  pointer-events: none;
}
.mf-app-header > * { pointer-events: auto; }

.mf-app-header--scrolled {
  background: transparent;
}

/* Brand mark (logo + Mainfeed text). Pill bg only when scrolled (when the
   header is solid black it would be invisible anyway, no need to render). */
.mf-app-header .mf-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.mf-app-header--scrolled .mf-brand {
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Hamburger menu button (top-right) */
.mf-hamburger {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.mf-app-header--scrolled .mf-hamburger {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.10);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.mf-hamburger:hover,
.mf-hamburger:focus-visible {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.18);
}

.mf-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-mute);
}

.mf-app-main {
  /* First piece sits BELOW the solid header bar (when at top of feed).
     As user scrolls, the header transitions to transparent and the
     content scrolls under the floating brand + hamburger pills. */
  padding: calc(60px + env(safe-area-inset-top)) 0 60px;
}

.mf-diary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}

.mf-diary-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.mf-diary-input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  resize: none;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 12px;
}

.mf-diary-input::placeholder {
  color: var(--text-dim);
}

.mf-diary-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mf-diary-count {
  font-size: 12px;
  color: var(--text-dim);
}

/* Feed: stacked gradient-bordered cards with breathing room between them.
   Used to be full-bleed (margin: 0 -20px, gap: 0). Switched to card layout
   2026-05-26 so each piece reads as a distinct unit. */
.mf-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

/* ============ Storytime feed: arc hero + Netflix day list + day view ============ */

/* Storytime hero — wide brand-gradient-bordered card with a gentle 3D wobble
   and cycling fade-in/out lines (Hi @user / N days in / LOST saga / …). */
/* Hero is now just the cycling fade text — no card, no background, no wobble. */
.mf-hero {
  position: relative; margin: 16px 2px 20px; padding: 0;
  background: none; box-shadow: none; border-radius: 0; animation: none;
}
.mf-hero-inner {
  min-height: auto; padding: 6px 8px;
  display: grid; place-items: center; text-align: center; background: none; border-radius: 0;
}
.mf-hero-line {
  margin: 0; min-height: 46px; display: flex; align-items: center; justify-content: center;
  font: 700 18px/1.4 system-ui, -apple-system, "Inter", sans-serif; letter-spacing: 0.01em;
  color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,0.45);
  opacity: 0; transform: translateY(7px);
  transition: opacity 1.4s ease, transform 1.4s ease;
}
.mf-hero-line.mf-hero-line--in { opacity: 1; transform: translateY(0); }
.mf-hero-line .mf-hero-em {
  background: linear-gradient(90deg, #7fd8e8, #ffd27f);
  -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800;
}
@keyframes mf-hero-wobble {
  0%, 100% { transform: perspective(900px) rotateX(0deg) rotateY(0deg); }
  25%      { transform: perspective(900px) rotateX(2deg) rotateY(-3deg); }
  50%      { transform: perspective(900px) rotateX(0deg) rotateY(0deg); }
  75%      { transform: perspective(900px) rotateX(-2deg) rotateY(3deg); }
}
@media (prefers-reduced-motion: reduce) { .mf-hero { animation: none; } }

/* Netflix-style episode (day) rows */
.mf-eplist { display: flex; flex-direction: column; gap: 14px; }
/* Episode cards mirror the .mf-hero card: gradient border frame + dark navy
   interior + drop-shadow/glow + a cinematic per-episode bg image with overlay. */
.mf-ep {
  position: relative; display: block; width: 100%; text-align: left;
  border-radius: 20px; padding: 2px; background: var(--accent-grad);
  box-shadow: 0 10px 28px rgba(0,0,0,0.5), 0 0 22px rgba(76,162,181,0.22);
  color: var(--text); cursor: pointer; border: 0;
  transition: transform .12s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.mf-ep:not(.mf-ep--locked):active { transform: scale(0.99); }
.mf-ep-inner {
  position: relative; overflow: hidden; border-radius: 18px; min-height: 104px;
  padding: 20px 18px; display: flex; align-items: center; gap: 14px;
  background: linear-gradient(160deg, #0c1733 0%, #0a0a0f 72%);
}
/* Per-episode background image + dark overlay for legibility. */
.mf-ep-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center; pointer-events: none;
}
.mf-ep-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,10,20,0.38) 0%, rgba(6,10,20,0.74) 100%);
}
.mf-ep-inner > .mf-ep-num,
.mf-ep-inner > .mf-ep-body,
.mf-ep-inner > .mf-ep-icon { position: relative; z-index: 2; }
.mf-ep-num {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center;
  font: 800 20px/1 Impact, "Anton", system-ui, sans-serif; border-radius: 12px; color: #fff;
  background: transparent padding-box, var(--accent-grad) border-box;
  border: 2px solid transparent; text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.mf-ep-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mf-ep-title { font: 800 17px/1.2 system-ui, sans-serif; color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,0.7); }
.mf-ep-meta { font-size: 12.5px; font-weight: 600; color: #d7dee5; text-shadow: 0 1px 8px rgba(0,0,0,0.7); }
.mf-ep-icon { flex: none; font-size: 17px; color: var(--accent-2); text-shadow: 0 1px 8px rgba(0,0,0,0.7); }
.mf-ep-icon--play { color: var(--accent-2); }
.mf-ep--locked { opacity: 0.62; }
.mf-ep--locked .mf-ep-inner { filter: grayscale(0.45); }
.mf-ep--locked .mf-ep-num { color: var(--text-mute); background: transparent padding-box, linear-gradient(135deg,#3a3a42,#4a4a52) border-box; }
.mf-ep--locked .mf-ep-icon { color: var(--text-mute); }
@media (prefers-reduced-motion: reduce) { .mf-ep:not(.mf-ep--locked):active { transform: none; } }

/* Episode detail screen (poster + summary + Play) — shown before the player. */
.mf-detail-back { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 700; font-size: 14px; padding: 12px 0; }
.mf-detail-poster {
  position: relative; border-radius: 18px; overflow: hidden; margin: 4px 0 18px; aspect-ratio: 16/11;
  box-shadow: 0 14px 36px rgba(0,0,0,0.55), 0 0 22px rgba(76,162,181,0.18);
}
.mf-detail-poster-img { position: absolute; inset: 0; background-size: cover; background-position: center 28%; }
.mf-detail-poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,12,22,0.05) 38%, rgba(8,12,22,0.85) 100%); }
.mf-detail-badge { position: absolute; left: 15px; bottom: 13px; z-index: 2; font: 800 12px/1 system-ui, sans-serif; letter-spacing: 0.09em; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,0.75); }
.mf-detail-eyebrow { font: 800 12px/1 system-ui, sans-serif; letter-spacing: 0.12em; color: var(--accent-2); text-transform: uppercase; margin-bottom: 8px; }
.mf-detail-title { font: 800 25px/1.15 system-ui, sans-serif; letter-spacing: -0.01em; margin-bottom: 13px; }
.mf-detail-summary { color: var(--text-mute); font-size: 15px; line-height: 1.6; margin-bottom: 26px; }
.mf-play {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 18px;
  border-radius: 14px; background: var(--accent-grad); color: #00131f; font: 800 18px/1 system-ui, sans-serif;
  box-shadow: 0 10px 28px rgba(76,162,181,0.35); transition: transform .1s ease;
}
.mf-play:active { transform: scale(0.99); }
.mf-play svg { display: block; }

/* Day view */
.mf-day-head { display: flex; align-items: center; gap: 12px; padding: 6px 2px 16px; }
.mf-day-back {
  background: none; border: 0; color: var(--accent);
  font: 600 14px/1 system-ui, sans-serif; cursor: pointer; padding: 6px 4px;
}
.mf-day-title {
  font: 700 13px/1 Impact, "Anton", system-ui, sans-serif; letter-spacing: 0.12em;
  color: var(--text-mute); margin-left: auto;
}
.mf-day-pieces { display: flex; flex-direction: column; gap: 18px; }
.mf-day-loading { text-align: center; padding: 48px 16px; color: var(--text-mute); }

/* ============ Episode player: one continuous video (intro → final card) ============
   Every segment (intro, swap clips, text cards, final card) plays back-to-back
   in a single persistent <video>; in/out fades are baked into the mp4s, so the
   joins are invisible. No toggle, no per-piece timer. Save/Share float ON the
   clip for shareable footage only — never on cards/intro/final. */
.mf-player { width: 100%; }
.mf-player-stage {
  position: relative; width: 100%; max-width: 480px; margin: 0 auto;
  aspect-ratio: 9 / 16; background: #000;
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}
.mf-player-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; background: #000;
}
.mf-player-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; gap: 10px; justify-content: flex-end; align-items: center;
  padding: 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  pointer-events: none;                       /* gradient is decorative */
}
.mf-player-overlay[hidden] { display: none; }
.mf-player-act {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 999px; cursor: pointer;
  color: #fff; font: 600 14px/1 system-ui, -apple-system, "Inter", sans-serif;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(18, 18, 22, 0.42);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background .15s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.mf-player-act:hover { background: rgba(40, 40, 48, 0.6); }
.mf-player-act:active { transform: scale(0.96); }
.mf-player-act:disabled { opacity: 0.6; cursor: default; }
.mf-player-act-ic { flex: none; }
/* One-tap unmute — shown only if the browser blocks autoplay-with-sound. */
.mf-player-unmute {
  position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 3;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  color: #fff; font: 600 13px/1 system-ui, -apple-system, "Inter", sans-serif;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(18, 18, 22, 0.62);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.mf-player-unmute[hidden] { display: none; }

/* In-app caption (the monologue — NEVER burned into media). Instagram-style
   card body: white text on solid black, NOT on the brand gradient (which the
   bare .mf-piece background is — it's meant to be only the 2px ring). The black
   here meets the black .mf-piece-actions below it for one continuous dark card. */
.mf-piece-caption {
  margin: 0; padding: 13px 16px 13px;
  font: 500 15.5px/1.45 system-ui, -apple-system, "Inter", sans-serif;
  color: #f4f4f6;
  background: #000;
}

/* Subtle 1→N chapter-sequence counter, pinned top-right of the media stage. */
.mf-piece-num {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  display: inline-flex; align-items: baseline;
  font: 700 12px/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.04em; color: #fff;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 5px 9px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.15);
}
.mf-piece-num-sep { opacity: 0.55; margin: 0 2px; font-weight: 500; }

/* Saga baking / loading state */
.mf-saga-loading { text-align: center; padding: 52px 20px; color: var(--text-mute); }
.mf-saga-loading h2 { font-size: 20px; font-weight: 700; color: var(--text); margin: 18px 0 8px; }
.mf-saga-loading p { font-size: 14px; max-width: 320px; margin: 0 auto 20px; }
.mf-saga-spinner {
  width: 44px; height: 44px; margin: 0 auto; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.12); border-top-color: var(--accent);
  animation: mf-spin 0.9s linear infinite;
}
@keyframes mf-spin { to { transform: rotate(360deg); } }
/* Feed "saga baking" fallback bar. UNIQUE class names — must NOT collide with
   the signup form's .mf-progress step-dots (style.css:557) or the signup
   progress screen's .mf-progress-bar determinate track (style.css:2623). An
   earlier version reused those names and bled this slide animation onto the
   signup bar (made it skate left-right) + squashed the 3 step-dots into a pill. */
.mf-saga-progress {
  width: 200px; max-width: 70%; height: 6px; margin: 0 auto;
  background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden;
}
.mf-saga-progress-bar {
  height: 100%; width: 40%; border-radius: 999px; background: var(--accent-grad);
  animation: mf-saga-slide 1.6s ease-in-out infinite;
}
@keyframes mf-saga-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* ============ Content-mode selector ============
   Three full-width cards sitting under the header, above the feed. State-only
   for now — `data-mode` is read by app.js to update visual state. Backend
   filtering wires later via a piece→mode mapping. */
.mf-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 12px 14px;
  margin: 0;
}

.mf-mode {
  /* Inactive cards: subtle dark surface, no gradient. The whole point of
     the "active" state visually popping is that inactive ones recede. */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px 11px;
  min-height: 64px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--text-mute, rgba(255, 255, 255, 0.6));
  font: 600 12px/1.1 system-ui, -apple-system, "Inter", sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.mf-mode:active {
  transform: scale(0.97);
}

.mf-mode-icon {
  width: 22px;
  height: 22px;
  opacity: 0.85;
}

.mf-mode-label {
  display: block;
  white-space: nowrap;
}

/* Active card — 2px brand-gradient ring (matches the .mf-piece treatment)
   and a soft inner dark fill that's still readable. Foreground text + icon
   go full-white at active state. */
.mf-mode--active {
  position: relative;
  background:
    /* inner dark fill */
    linear-gradient(rgba(0, 11, 33, 0.92), rgba(0, 11, 33, 0.92)) padding-box,
    /* 4-color brand gradient as the border-box */
    linear-gradient(135deg, #000b21 0%, #003f82 35%, #4ca2b5 65%, #ffd27f 100%) border-box;
  border-color: transparent;
  color: #fff;
}

.mf-mode--active .mf-mode-icon {
  opacity: 1;
}

.mf-feed-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-mute);
}

.mf-feed-empty h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.mf-feed-empty p {
  font-size: 15px;
}

.mf-piece {
  /* The card itself is the 2px brand-gradient border; the inner stage +
     actions paint over the middle, leaving the gradient visible as a ring. */
  background: linear-gradient(135deg, #000b21 0%, #003f82 35%, #4ca2b5 65%, #ffd27f 100%);
  padding: 2px;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
}

.mf-piece-stage {
  position: relative;
  width: 100%;
  background: var(--surface-2);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.mf-piece-media {
  width: 100%;
  height: auto;
  display: block;
}

/* ============ Image-only premium treatment ============
   Static images can feel flat next to autoplaying videos. Three subtle
   touches on `.mf-piece--image` only — NEVER on video/GIF pieces:

   1. Glass overlay (always on) — a thin highlight on the top edge + a soft
      inner shadow at the bottom, so the image reads like a physical pane.
   2. Periodic sheen sweep — a diagonal light streak that travels across
      every ~7s. CSS animation, no JS, no interaction needed.
   3. Subtle 3D wobble — ±1.5° rotateY on a 9s ease-in-out cycle. Gives the
      "displayed object" feel without becoming a fidget toy.

   All three are gated by the `.mf-piece--image` class — videos and GIFs
   render with the same shell minus these effects. The `.mf-piece-glass`
   wrapper is added by app.js when type==='image'. */

.mf-piece--image {
  /* Tighter perspective = more apparent 3D — same rotation angle reads as
     a stronger tilt. Bumped from 1200 → 900 on 2026-05-28 user request. */
  perspective: 900px;
  perspective-origin: 50% 50%;
}

.mf-piece--image .mf-piece-stage {
  transform-style: preserve-3d;
  animation: mf-piece-wobble 9s ease-in-out infinite;
  will-change: transform;
}

/* Stagger the wobble phase across cards so the feed doesn't look like a
   marching band. Odd / even kicker is enough — feels organic. */
.mf-piece--image:nth-child(even) .mf-piece-stage {
  animation-direction: alternate-reverse;
  animation-duration: 11s;
}

@keyframes mf-piece-wobble {
  /* Amplitude bumped 2026-05-28: ±1.5° → ±3.5° on Y, ±0.6° → ±1.5° on X.
     Combined with the tighter perspective (1200 → 900), the visible tilt
     is noticeably stronger without crossing into seasick territory. */
  0%   { transform: rotateY(-3.5deg) rotateX(1.5deg); }
  50%  { transform: rotateY( 3.5deg) rotateX(-1.5deg); }
  100% { transform: rotateY(-3.5deg) rotateX(1.5deg); }
}

/* Glass overlay — a thin highlight band along the top edge and a darker
   feathered band at the bottom inside the stage. Pointer-events off so it
   doesn't intercept touches on the underlying image. */
.mf-piece--image .mf-piece-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    /* top-edge highlight (suggests glass thickness catching light) */
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(255, 255, 255, 0.04) 6%,
      transparent 14%),
    /* very subtle bottom-edge shadow */
    linear-gradient(0deg,
      rgba(0, 0, 0, 0.12) 0%,
      transparent 18%);
  mix-blend-mode: screen;
  z-index: 2;
  border-radius: inherit;
}

/* Sheen — diagonal light streak that periodically sweeps across. Uses a
   long animation duration with a brief active window (the streak is visible
   in the first ~12% then off-screen for the rest of the cycle, giving the
   "occasional flash" feel without a JS timer). */
.mf-piece--image .mf-piece-stage::after {
  content: "";
  position: absolute;
  top: -10%;
  bottom: -10%;
  width: 55%;
  pointer-events: none;
  background: linear-gradient(110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.00) 38%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.00) 62%,
    transparent 70%);
  transform: translateX(-200%) rotate(8deg);
  animation: mf-piece-sheen 7.5s ease-in-out infinite;
  z-index: 3;
  border-radius: inherit;
  will-change: transform, opacity;
  mix-blend-mode: screen;
}

/* Stagger sheens too — feels less synchronized across the feed. */
.mf-piece--image:nth-child(3n+1) .mf-piece-stage::after { animation-delay: 0s;    animation-duration: 7.5s; }
.mf-piece--image:nth-child(3n+2) .mf-piece-stage::after { animation-delay: 2.5s;  animation-duration: 8.5s; }
.mf-piece--image:nth-child(3n)   .mf-piece-stage::after { animation-delay: 5s;    animation-duration: 9.5s; }

@keyframes mf-piece-sheen {
  0%   { transform: translateX(-200%) rotate(8deg); opacity: 0; }
  6%   { opacity: 1; }
  18%  { transform: translateX( 280%) rotate(8deg); opacity: 1; }
  20%  { opacity: 0; }
  /* long quiet phase — sheen sits off-screen, image looks static */
  100% { transform: translateX( 280%) rotate(8deg); opacity: 0; }
}

/* Respect reduced-motion — disable wobble + sheen, keep static glass edge.
   Static glass highlight is fine even at reduced-motion since it doesn't move. */
@media (prefers-reduced-motion: reduce) {
  .mf-piece--image .mf-piece-stage {
    animation: none;
    transform: none;
  }
  .mf-piece--image .mf-piece-stage::after {
    animation: none;
    opacity: 0;
  }
}

/* Meme caption overlays — Impact-style, big and centered. Uses a
   multi-direction text-shadow outline instead of -webkit-text-stroke,
   which renders unevenly on Samsung/Android (white fill drops out on
   some letters). Multi-shadow is consistent across all browsers. */
.mf-piece-overlay {
  position: absolute;
  left: 0;
  right: 0;
  padding: max(env(safe-area-inset-top), 64px) 6% 0;  /* clears the fixed header */
  text-align: center;
  font-family: "Arial Black", "Helvetica Neue", Impact, system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(22px, 6vw, 38px);
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: #fff;
  text-transform: uppercase;
  text-shadow:
    -2px -2px 0 #000,
     2px -2px 0 #000,
    -2px  2px 0 #000,
     2px  2px 0 #000,
     0   -2px 0 #000,
     0    2px 0 #000,
    -2px  0   0 #000,
     2px  0   0 #000,
     0    3px 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  user-select: none;
}

.mf-piece-overlay--top {
  top: 0;
}

.mf-piece-overlay--bottom {
  bottom: 64px; /* clears the watermark bar */
  padding: 0 6%;
}

/* Watermark — full-width bar at the bottom of the video, INSIDE the
   stage. Subtle dark gradient so it blends into video content; logo +
   handle centered. */
.mf-piece-watermark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
  user-select: none;
}
.mf-piece-watermark-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
}
.mf-piece-watermark-text {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Action row under the video, inside the card. The outer card border (on
   .mf-piece) replaces the old top/bottom gradient hairlines this row used
   to draw, so those ::before/::after pseudo-elements are now no-ops. */
.mf-piece-actions {
  display: flex;
  gap: 0;
  padding: 0;
  margin: 0;
  background: #000;
  position: relative;
  border-radius: 0 0 16px 16px;
}
.mf-piece-actions::before,
.mf-piece-actions::after {
  display: none;
}

.mf-piece-action {
  flex: 1;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  position: relative;
  transition: color 0.15s ease, background 0.15s ease;
}

/* Vertical gradient separator between buttons (every button except first
   gets a short gradient line on its left edge). 25%/25% inset so the
   separator is shorter than the button height — reads as a divider,
   not a wall. */
.mf-piece-action + .mf-piece-action::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: linear-gradient(180deg, #003f82, #4ca2b5, #ffd27f);
  pointer-events: none;
}

.mf-piece-action:active {
  background: rgba(255, 255, 255, 0.05);
}

/* Published state: text turns brand-gold so the user can see which
   pieces are live on their public profile */
.mf-piece-action--active {
  color: #ffd27f;
}

/* ============ APP MENU DRAWER (logout, profile, etc) ============ */

.mf-app-header .mf-avatar {
  cursor: pointer;
  border: 0;
  background: var(--surface);
  font: inherit;
  padding: 0;
}

.mf-app-menu-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mf-app-menu-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: white;
  flex-shrink: 0;
}

.mf-app-menu-handle {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-app-menu-email {
  font-size: 13px;
  color: var(--text-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============ PUBLIC PROFILE PAGE ============ */

.mf-profile {
  background: var(--bg);
}

.mf-profile .mf-app-header {
  padding-left: 20px;
  padding-right: 20px;
}

.mf-profile-cta-pill {
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-grad);
  color: white;
  box-shadow: 0 4px 14px rgba(76, 162, 181, 0.28);
}

.mf-profile-main {
  padding-bottom: max(40px, env(safe-area-inset-bottom));
}

.mf-profile-hero {
  text-align: center;
  padding: 32px 20px 24px;
}

.mf-profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  color: white;
  margin: 0 auto 16px;
  box-shadow: 0 8px 28px rgba(76, 162, 181, 0.3);
}

.mf-profile-handle {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.mf-profile-tag {
  font-size: 14px;
  color: var(--text-mute);
}

.mf-profile-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-mute);
  font-size: 15px;
}

.mf-profile .mf-feed {
  margin: 0;
}

.mf-profile-footer {
  padding: 56px 24px 24px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.mf-profile-cta-h {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.mf-profile-cta-p {
  font-size: 15px;
  color: var(--text-mute);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* ============ Signup: gender toggle (no fieldset/legend, clean grid) ============ */
.mf-gender-group {
  margin: 20px 0 4px;
}
.mf-gender-label {
  display: block;
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.mf-gender-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mf-gender-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.mf-gender-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.mf-gender-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(76, 162, 181, 0.10);
  box-shadow: 0 0 0 1px var(--accent), 0 6px 20px rgba(76, 162, 181, 0.18);
}
.mf-gender-option:hover {
  border-color: rgba(76, 162, 181, 0.45);
}
.mf-err {
  background: rgba(255, 68, 68, 0.12);
  color: #ff8a8a;
  border: 1px solid rgba(255, 68, 68, 0.25);
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0;
  font-size: 14px;
}

/* ============ Feed: processing placeholder for in-flight pod swaps ============ */
.mf-piece-stage--processing,
.mf-piece-stage--failed {
  background: linear-gradient(135deg, #16161b 0%, #1d1d23 100%);
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  position: relative;
}
.mf-piece-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(76, 162, 181, 0.18);
  border-top-color: var(--accent);
  animation: mf-spin 0.9s linear infinite;
}
@keyframes mf-spin { to { transform: rotate(360deg); } }
.mf-piece-processing-msg {
  color: var(--text-mute);
  font-size: 14px;
  text-align: center;
  padding: 0 24px;
  line-height: 1.5;
}
.mf-piece-stage--failed .mf-piece-processing-msg {
  color: #ff8a8a;
}

/* ============ Password show/hide ============ */
.mf-field-password {
  position: relative;
}
.mf-field-password input {
  padding-right: 56px;
}
.mf-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mf-eye-btn:hover { color: var(--text); }
.mf-eye-btn:active { background: rgba(255,255,255,0.04); }

/* Single eye icon: slash line stays hidden when password is hidden (eye open),
   slash line shows when password is visible (eye crossed). One SVG always. */
.mf-eye-btn .mf-eye-slash {
  opacity: 0;
  transition: opacity 0.15s;
}
.mf-eye-btn[data-state="visible"] .mf-eye-slash {
  opacity: 1;
}

/* ============ Selfie grid: 2 slots side-by-side ============ */
.mf-selfie-grid--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.mf-selfie-slot {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  border: 2px dashed var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}
.mf-selfie-slot input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.mf-selfie-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-mute);
  font-size: 14px;
  pointer-events: none;
  width: 100%;
  height: 100%;
  justify-content: center;
  text-align: center;
  padding: 12px;
}
.mf-selfie-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.mf-selfie-slot--filled {
  border-style: solid;
  border-color: var(--accent);
}

/* ============ 5-sec video slot ============ */
.mf-video-slot {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  border: 2px dashed var(--border);
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 20px;
}
.mf-video-slot input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.mf-video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-mute);
  font-size: 14px;
  height: 100%;
  text-align: center;
  padding: 24px;
  pointer-events: none;
}
.mf-video-placeholder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.mf-video-slot--filled {
  border-style: solid;
  border-color: var(--accent);
}

/* ============ Progress 4 dots ============ */
.mf-progress[data-step="1"] span:nth-child(-n+1),
.mf-progress[data-step="2"] span:nth-child(-n+2),
.mf-progress[data-step="3"] span:nth-child(-n+3),
.mf-progress[data-step="4"] span:nth-child(-n+4) {
  background: var(--accent);
}

/* ============ Bigger / always-visible back button (mobile PWA needs this) ============ */
.mf-nav .mf-back {
  display: inline-flex !important;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  cursor: pointer;
}
.mf-nav .mf-back:hover { background: rgba(255,255,255,0.08); }
.mf-nav .mf-back:active { background: rgba(255,255,255,0.12); }

/* ============ Selfie slot — face-oval guide + dual action (camera / upload) ============ */
.mf-selfie-preview {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: linear-gradient(135deg, #16161b 0%, #1d1d23 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mf-selfie-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mf-face-oval {
  position: absolute;
  inset: 8% 18%;
  width: 64%;
  height: 84%;
  pointer-events: none;
  z-index: 2;
}
.mf-selfie-slot--filled .mf-face-oval { display: none; }
.mf-selfie-num {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-mute);
  z-index: 3;
}
.mf-selfie-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.mf-cta-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
}
.mf-cta-soft:hover { border-color: var(--accent); }
.mf-link-upload {
  text-align: center;
  font-size: 12px;
  color: var(--text-mute);
  cursor: pointer;
  padding: 4px;
}
.mf-link-upload:hover { color: var(--accent); text-decoration: underline; }

/* ============ Video slot ============ */
.mf-video-preview {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: linear-gradient(135deg, #16161b 0%, #1d1d23 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.mf-video-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.mf-video-preview .mf-face-oval { z-index: 2; }
.mf-video-icon {
  position: relative;
  z-index: 3;
  font-size: 40px;
  opacity: 0.6;
}
.mf-video-slot--filled .mf-face-oval,
.mf-video-slot--filled .mf-video-icon { display: none; }
#mf-video-record-btn { width: 100%; }

/* ============ Camera modal (fullscreen, mirrored video + face oval) ============ */
.mf-camera-modal,
.mf-video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.mf-camera-modal[hidden],
.mf-video-modal[hidden] { display: none !important; }
.mf-camera-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);   /* mirror front camera */
  background: #000;
}
.mf-camera-oval {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.mf-camera-hint {
  position: absolute;
  top: env(safe-area-inset-top, 16px);
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 14px;
  pointer-events: none;
  z-index: 2;
}
.mf-camera-controls {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 24px;
  z-index: 3;
}
.mf-camera-cancel {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
}
.mf-camera-shutter {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid rgba(255,255,255,0.4);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.95);
  cursor: pointer;
}
.mf-camera-shutter:active { transform: scale(0.95); }
.mf-camera-shutter--record { background: #ff3b30; }
.mf-camera-shutter--recording {
  background: #ff3b30;
  animation: mf-pulse 1s ease-in-out infinite;
}
@keyframes mf-pulse { 50% { box-shadow: 0 0 0 8px rgba(255,59,48,0.6); } }
.mf-video-countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 120px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0,0,0,0.6);
  z-index: 3;
  pointer-events: none;
}

/* ============ v11: rebuilt selfie + video step + face oval + back button ============ */

/* Selfie cards: stacked, big tap targets, 2 buttons each, oval guide always present until photo replaces it */
.mf-selfie-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}
.mf-selfie-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mf-selfie-preview {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d1d23 0%, #16161b 100%);
  overflow: hidden;
}
.mf-selfie-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mf-selfie-num {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  background: rgba(11,11,14,0.7);
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 3;
}
.mf-selfie-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mf-link-retake {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
  padding: 6px;
  align-self: center;
}

/* Properly proportioned face oval (NOT stretched). Uses border-radius:50% which
   makes a true ellipse based on the div's own w/h, so the ratio stays a
   face-like 4:5 regardless of the parent's aspect ratio. */
.mf-face-oval {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  aspect-ratio: 4 / 5;
  border: 3px dashed rgba(76,162,181,0.85);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}

/* Video card */
.mf-video-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 20px;
}
.mf-video-preview {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d1d23 0%, #16161b 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mf-video-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mf-video-icon {
  position: relative;
  z-index: 3;
  font-size: 48px;
  opacity: 0.5;
}

/* Big action buttons — two of them per slot, both equally weighted */
.mf-btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
}
.mf-btn-action:active { transform: scale(0.98); }
.mf-btn-action--primary {
  border-color: var(--accent);
  background: rgba(76,162,181,0.10);
}
.mf-btn-action--primary:hover { background: rgba(76,162,181,0.18); }
.mf-red-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 0 0 rgba(255,59,48,0.6);
  animation: mf-redpulse 1.5s ease-in-out infinite;
}
@keyframes mf-redpulse { 50% { box-shadow: 0 0 0 8px rgba(255,59,48,0); } }

/* Back button under Continue */
.mf-back-bottom {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: none;
  color: var(--text-mute);
  font-size: 14px;
  cursor: pointer;
  padding: 10px 16px;
}
.mf-back-bottom:hover { color: var(--text); }

/* ============ Camera modal (fullscreen) — v11 cleaned up ============ */
.mf-cam-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mf-cam-modal[hidden] { display: none !important; }
.mf-cam-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);  /* mirror front camera */
  background: #000;
}
.mf-cam-oval {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(70%, 360px);
  aspect-ratio: 4 / 5;
  border: 3px dashed rgba(255,255,255,0.9);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}
.mf-cam-hint {
  position: absolute;
  top: calc(env(safe-area-inset-top, 16px) + 16px);
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 14px;
  z-index: 3;
  pointer-events: none;
  white-space: nowrap;
}
.mf-cam-countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 120px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0,0,0,0.8);
  z-index: 4;
  pointer-events: none;
  line-height: 1;
}
.mf-cam-countdown--rec {
  color: #ff3b30;
  text-shadow: 0 0 30px rgba(255,59,48,0.7);
}
.mf-cam-rec-badge {
  position: absolute;
  top: calc(env(safe-area-inset-top, 16px) + 16px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  z-index: 3;
  animation: mf-redpulse 1.5s ease-in-out infinite;
}
.mf-cam-controls {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 24px;
  z-index: 5;
}
.mf-cam-cancel {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
}
.mf-cam-shutter {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid rgba(255,255,255,0.4);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.95);
  cursor: pointer;
}
.mf-cam-shutter:active { transform: scale(0.95); }

/* ============ v12: side-by-side square cards + crop UI + proper face oval ============ */

/* Override v11: selfies go back to 2-up square grid */
.mf-selfie-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.mf-selfie-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mf-selfie-stage {
  position: relative;
  aspect-ratio: 1 / 1;       /* SQUARE, not 3:4 */
  border-radius: 12px;
  background: linear-gradient(135deg, #1d1d23, #16161b);
  overflow: hidden;
  touch-action: none;        /* pan/pinch managed in JS */
}
.mf-selfie-stage img.mf-saved-img,
.mf-selfie-stage video.mf-saved-img,
.mf-video-stage video.mf-saved-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mf-crop-img {
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  user-select: none;
  pointer-events: none;
  max-width: none;
  max-height: none;
}
.mf-selfie-stage--cropping {
  cursor: grab;
}
.mf-crop-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 11px;
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
}
.mf-selfie-num {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  background: rgba(11,11,14,0.7);
  padding: 3px 7px;
  border-radius: 6px;
  z-index: 3;
}

/* Proper face-oval: 75% wide, 85% tall = realistic head shape */
.mf-face-oval {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 75%;
  height: 85%;
  border: 3px dashed rgba(76,162,181,0.85);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}

/* Video card stays full-width (1 column) */
.mf-video-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 20px;
}
.mf-video-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d1d23, #16161b);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mf-video-stage .mf-video-icon {
  position: relative;
  z-index: 3;
  font-size: 48px;
  opacity: 0.5;
}
.mf-video-stage--captured .mf-face-oval,
.mf-video-stage--captured .mf-video-icon { display: none; }

/* Crop-mode action buttons (Save / Retake) — sit below the stage when cropping */
.mf-crop-actions {
  display: flex;
  gap: 8px;
}
.mf-crop-actions .mf-btn-action {
  flex: 1;
  padding: 12px 10px;
  font-size: 14px;
}

/* ============ v13: simplified — no crop UI, no oval ============ */
.mf-stage-icon {
  position: relative;
  z-index: 2;
  font-size: 36px;
  opacity: 0.5;
}
.mf-busy {
  font-size: 13px;
  color: var(--text-mute);
  text-align: center;
  margin: 6px 0;
}
.mf-busy.mf-busy--ok {
  color: #4ade80;
  font-weight: 600;
  font-size: 14px;
}
.mf-cam-blocked {
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 8px 0 16px;
  color: #fde68a;
}
.mf-cam-blocked-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fcd34d;
}
.mf-cam-blocked-body {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px;
  color: #fef3c7;
}
.mf-cam-blocked ol {
  margin: 0 0 14px;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.6;
  color: #fef3c7;
}
.mf-cam-blocked ol li {
  margin-bottom: 6px;
}
.mf-cam-blocked ol li b {
  color: #ffffff;
  font-weight: 700;
}
#mf-cam-retry {
  background: #fcd34d;
  color: #1a1a1a;
  font-weight: 700;
}
.mf-selfie-stage,
.mf-video-stage {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Override v12 oval (kept the class but unused now) */
.mf-face-oval { display: none; }

/* ============ Verify-account modal (in /app) ============ */
.mf-verify-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow-y: auto;
}
.mf-verify-modal[hidden] { display: none !important; }
.mf-verify-sheet {
  width: 100%;
  max-width: 480px;
  background: #0b0b0e;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  padding: 56px 24px 32px;
  min-height: 100%;
}
.mf-verify-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  z-index: 5;
}
.mf-verify-panel h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.mf-verify-lead {
  font-size: 15px;
  line-height: 1.55;
  color: #cfd2d8;
  margin: 0 0 20px;
}
.mf-verify-why {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mf-verify-why li {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #cfd2d8;
}
.mf-verify-why li b {
  color: #fff;
  display: block;
  margin-bottom: 2px;
}
.mf-verify-fineprint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 22px;
  line-height: 1.5;
}
.mf-verify-fineprint a {
  color: #4ca2b5;
  text-decoration: underline;
}
.mf-verify-panel--rec {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: calc(100vh - 56px);
  padding: 0;
  margin: 0 -24px;
}
.mf-verify-panel--rec .mf-cam-video {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #000;
  border-radius: 0;
}
.mf-verify-done-icon {
  width: 64px;
  height: 64px;
  margin: 8px auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4ca2b5, #ffd27f);
  color: #0b0b0e;
  font-size: 36px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 22px rgba(255, 210, 127, 0.45);
}
.mf-verify-panel#mf-verify-panel-done {
  text-align: center;
}
.mf-verify-panel#mf-verify-panel-done p {
  font-size: 14px;
  line-height: 1.5;
  color: #cfd2d8;
  margin: 0 0 26px;
}

/* ============ Signup → progress screen (after submit, before feed) ============ */
.mf-progress-screen {
  padding: 80px 28px 60px;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
}
.mf-progress-screen h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 36px;
  letter-spacing: -0.01em;
}
.mf-progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.mf-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.1s linear;
  /* Brand gradient — slightly extended/repeated so the shimmer animation
     can slide a full cycle across the bar without looking choppy at the
     ends. */
  background: linear-gradient(
    90deg,
    #003f82 0%,
    #4ca2b5 35%,
    #ffd27f 70%,
    #4ca2b5 100%
  );
  background-size: 200% 100%;
  animation: mf-progress-shimmer 3.2s linear infinite;
  box-shadow:
    0 0 10px rgba(76, 162, 181, 0.65),
    0 0 22px rgba(255, 210, 127, 0.45),
    0 0 36px rgba(76, 162, 181, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
@keyframes mf-progress-shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.mf-progress-pct {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-mute, #9aa);
  letter-spacing: 0.02em;
}
/* Estimate line ABOVE the "Creating your Mainfeed" title — frames the wait as
   premium anticipation, not an apology. The bar below tracks real ready/total. */
.mf-progress-eta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffd27f;
  margin-bottom: 14px;
}
/* Cycling brand taglines under the bar — slow fade in/out (JS toggles --in). */
.mf-progress-taglines {
  margin-top: 30px;
  min-height: 46px;
  font: 600 15.5px/1.45 system-ui, -apple-system, "Inter", sans-serif;
  color: var(--text);
  opacity: 0;
  transition: opacity 1.5s ease;
}
.mf-progress-taglines.mf-tagline--in { opacity: 1; }
/* Room under the bar for exciting copy / hint imagery while the chapter bakes. */
.mf-progress-teaser {
  margin-top: 40px;
  padding: 22px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  text-align: center;
}
.mf-progress-teaser-lead {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.mf-progress-teaser-sub {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-mute, #9aa);
}
