/* ─────────────────────────────────────────────────────────────
   mePal app styles (Bootstrap 5 is loaded first; this file
   overrides it with mePal tokens and adds app components).
   ───────────────────────────────────────────────────────────── */

/* ── Base ─────────────────────────────────────────────────── */
/* Own minimal reset so the layout holds even if the Bootstrap CDN is slow or blocked. */
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, p { margin-top: 0; }
img, svg { vertical-align: middle; }
button { cursor: pointer; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--mp-bg);
  color: var(--mp-text);
  font-family: var(--mp-font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
a { color: var(--mp-primary); text-decoration: none; }
button { font-family: inherit; }
.mp-hidden { display: none !important; }
.mp-muted { color: var(--mp-muted); }
:focus-visible { outline: 2px solid var(--mp-primary-2); outline-offset: 2px; }

/* Bootstrap overrides */
.btn { font-weight: 700; border-radius: var(--mp-radius-pill); padding: .7rem 1.25rem; }
.btn-primary { background: var(--mp-grad); border: 0; color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--mp-grad); filter: brightness(1.06); color: #fff; }
.btn-light { background: var(--mp-surface-2); border: 0; color: var(--mp-text); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; font-size: 15px; line-height: 1.2; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm { padding: .45rem .9rem; font-size: 13px; }

/* Tiny utility set (same names as Bootstrap, so either can be present) */
.d-block { display: block; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.text-center { text-align: center; }
.form-control, .form-select { border-radius: 14px; border-color: var(--mp-border); background-color: var(--mp-surface); color: var(--mp-text); }

/* ── App frame ────────────────────────────────────────────── */
.mp-app { min-height: 100%; display: flex; flex-direction: column; }

.mp-topbar {
  position: sticky; top: 0; z-index: 30;
  height: calc(var(--mp-topbar-h) + var(--mp-safe-top));
  padding: var(--mp-safe-top) 16px 0;
  display: flex; align-items: center; gap: 12px;
  background: color-mix(in srgb, var(--mp-bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.mp-brand { display: flex; align-items: center; gap: 8px; color: var(--mp-text); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.mp-brand img { width: 30px; height: 30px; }
.mp-brand span b { color: var(--mp-primary); font-weight: 800; }
.mp-topbar .mp-spacer { flex: 1; }
.mp-icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  display: inline-grid; place-items: center;
  background: var(--mp-surface); color: var(--mp-text); box-shadow: var(--mp-shadow-1);
}
.mp-icon-btn svg { width: 20px; height: 20px; }

.mp-credit-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px 0 8px; border: 0;
  border-radius: var(--mp-radius-pill);
  background: var(--mp-surface); color: var(--mp-text); font-weight: 800; font-size: 14px;
  box-shadow: var(--mp-shadow-1);
}
.mp-credit-pill .mp-coin { width: 22px; height: 22px; }

.mp-view {
  flex: 1; width: 100%; max-width: var(--mp-max-w); margin: 0 auto;
  padding: 8px 16px calc(var(--mp-tabbar-h) + var(--mp-safe-bottom) + 20px);
}
.mp-view.mp-view--flush { padding-left: 0; padding-right: 0; }

/* ── Bottom tab bar ───────────────────────────────────────── */
.mp-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--mp-tabbar-h) + var(--mp-safe-bottom));
  padding-bottom: var(--mp-safe-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--mp-surface);
  border-top: 1px solid var(--mp-border);
}
.mp-tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--mp-faint); font-size: 11px; font-weight: 700;
}
.mp-tab svg { width: 24px; height: 24px; transition: transform .18s ease; }
.mp-tab.is-active { color: var(--mp-primary); }
.mp-tab.is-active svg { transform: translateY(-1px) scale(1.06); }
.mp-tab.is-active::before {
  content: ''; position: absolute; top: 6px; width: 46px; height: 32px; border-radius: 16px;
  background: var(--mp-primary-soft); z-index: -1;
}
.mp-badge {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--mp-like); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--mp-surface);
}
@media (min-width: 900px) {
  .mp-tabbar { left: 50%; transform: translateX(-50%); bottom: 16px; width: 560px; border-radius: 24px; border: 1px solid var(--mp-border); box-shadow: var(--mp-shadow-2); height: var(--mp-tabbar-h); padding-bottom: 0; }
}

/* ── Headings & sections ─────────────────────────────────── */
.mp-h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 2px; }
.mp-sub { color: var(--mp-muted); font-size: 14px; margin: 0 0 14px; }
.mp-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mp-section-head .mp-h1 { margin: 0; }

.mp-preview-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--mp-radius-pill);
  background: var(--mp-primary-soft); color: var(--mp-primary); font-size: 12px; font-weight: 700;
  margin-bottom: 12px;
}
.mp-preview-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Photo tiles (People Nearby grid) ─────────────────────── */
.mp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 600px) { .mp-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 1000px) { .mp-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }

.mp-tile {
  position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: var(--mp-radius-tile); background: var(--mp-skeleton); color: #fff;
  box-shadow: var(--mp-shadow-1); transform: translateZ(0);
}
.mp-tile img, .mp-tile .mp-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mp-tile::after { content: ''; position: absolute; inset: 0; background: var(--mp-photo-fade); pointer-events: none; }
.mp-tile-info { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1; }
.mp-tile-name { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 16px; line-height: 1.2; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.mp-tile-meta { font-size: 12px; opacity: .9; margin-top: 2px; }
.mp-online-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mp-online); box-shadow: 0 0 0 2px rgba(255,255,255,.9); flex: none; }
.mp-verified { width: 16px; height: 16px; flex: none; color: #fff; }
.mp-verified circle { fill: var(--mp-primary-2); }
.mp-tile:active { transform: scale(.98); }
.mp-tile.is-blurred .mp-photo, .mp-tile.is-blurred img { filter: blur(18px) saturate(1.2); transform: scale(1.2); }
.mp-tile.is-blurred .mp-photo svg { opacity: .5; }
.mp-tile-lock { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.22); backdrop-filter: blur(6px); margin-bottom: 6px; }
.mp-tile-lock svg { width: 18px; height: 18px; }

/* Placeholder "photo" for previews: duotone gradient + soft silhouette */
.mp-photo { background: var(--g, var(--mp-grad)); }
.mp-photo svg { position: absolute; left: 50%; bottom: 0; width: 86%; transform: translateX(-50%); opacity: .28; }

/* ── Skeletons ───────────────────────────────────────────── */
.mp-skel { position: relative; overflow: hidden; background: var(--mp-skeleton); border-radius: 12px; }
.mp-skel::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--mp-skeleton-shine), transparent);
  animation: mp-shine 1.3s infinite;
}
@keyframes mp-shine { to { transform: translateX(100%); } }
.mp-skel-line { height: 12px; margin: 8px 0; }

/* ── Encounters (card stack) ─────────────────────────────── */
.mp-stack-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.mp-stack {
  position: relative; width: 100%; max-width: 420px;
  height: min(calc(100dvh - var(--mp-topbar-h) - var(--mp-tabbar-h) - var(--mp-safe-top) - var(--mp-safe-bottom) - 190px), 620px);
  min-height: 340px;
}
.mp-card {
  position: absolute; inset: 0; overflow: hidden; border-radius: 24px; background: var(--mp-skeleton); color: #fff;
  box-shadow: var(--mp-shadow-2); touch-action: none; user-select: none; will-change: transform;
}
.mp-card .mp-photo { position: absolute; inset: 0; }
.mp-card::after { content: ''; position: absolute; inset: 0; background: var(--mp-photo-fade); pointer-events: none; }
.mp-card.is-behind { transform: scale(.95) translateY(14px); filter: brightness(.92); }
.mp-card-dots { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 2; }
.mp-card-dots i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.4); }
.mp-card-dots i.is-on { background: #fff; }
.mp-card-info { position: absolute; left: 18px; right: 18px; bottom: 18px; z-index: 2; }
.mp-card-name { display: flex; align-items: center; gap: 8px; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.mp-card-name .mp-verified { width: 22px; height: 22px; }
.mp-card-meta { font-size: 14px; opacity: .92; margin-top: 2px; }
.mp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mp-chip { padding: 5px 10px; border-radius: var(--mp-radius-pill); background: rgba(255,255,255,.18); backdrop-filter: blur(6px); font-size: 12px; font-weight: 700; }
.mp-stamp {
  position: absolute; top: 34px; z-index: 3; padding: 6px 14px; border: 3px solid; border-radius: 10px;
  font-size: 28px; font-weight: 800; letter-spacing: .06em; opacity: 0; pointer-events: none;
}
.mp-stamp--like { left: 22px; color: #4ADE80; transform: rotate(-14deg); }
.mp-stamp--nope { right: 22px; color: #FF5A7E; transform: rotate(14deg); }

.mp-actions { display: flex; align-items: center; justify-content: center; gap: 22px; }
.mp-round {
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--mp-surface); box-shadow: var(--mp-shadow-2); transition: transform .15s ease;
}
.mp-round:active { transform: scale(.92); }
.mp-round--sm { width: 48px; height: 48px; color: var(--mp-gold); }
.mp-round--lg { width: 66px; height: 66px; }
.mp-round--pass { color: var(--mp-pass); }
.mp-round--like { background: var(--mp-grad-like); color: #fff; }
.mp-round svg { width: 28px; height: 28px; }
.mp-round--sm svg { width: 22px; height: 22px; }

/* ── Segmented control ───────────────────────────────────── */
.mp-segment { display: inline-flex; padding: 4px; border-radius: var(--mp-radius-pill); background: var(--mp-surface-2); margin-bottom: 14px; }
.mp-segment button { border: 0; background: transparent; padding: 8px 16px; border-radius: var(--mp-radius-pill); font-weight: 700; font-size: 14px; color: var(--mp-muted); }
.mp-segment button.is-active { background: var(--mp-surface); color: var(--mp-text); box-shadow: var(--mp-shadow-1); }

/* ── Cards & lists ───────────────────────────────────────── */
.mp-card-plain { background: var(--mp-surface); border-radius: var(--mp-radius-card); box-shadow: var(--mp-shadow-1); padding: 16px; }
.mp-premium-card { background: var(--mp-grad); color: #fff; border-radius: var(--mp-radius-card); padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--mp-shadow-2); margin: 14px 0; }
.mp-premium-card h3 { font-size: 17px; font-weight: 800; margin: 0 0 2px; }
.mp-premium-card p { margin: 0; font-size: 13px; opacity: .9; }
.mp-premium-card .btn { background: #fff; color: var(--mp-primary); flex: none; padding: .55rem 1rem; }

.mp-list { background: var(--mp-surface); border-radius: var(--mp-radius-card); box-shadow: var(--mp-shadow-1); overflow: hidden; }
.mp-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--mp-text); border-bottom: 1px solid var(--mp-border); width: 100%; background: transparent; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.mp-row:last-child { border-bottom: 0; }
.mp-row-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--mp-primary-soft); color: var(--mp-primary); flex: none; }
.mp-row-icon svg { width: 20px; height: 20px; }
.mp-row-main { flex: 1; min-width: 0; }
.mp-row-main > span { display: block; }
.mp-row-title { font-weight: 700; font-size: 15px; }
.mp-row-sub { font-size: 13px; color: var(--mp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-row-end { color: var(--mp-faint); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.mp-row-end svg { width: 18px; height: 18px; }

.mp-avatar { position: relative; width: 54px; height: 54px; border-radius: 50%; overflow: hidden; flex: none; }
.mp-avatar .mp-photo { position: absolute; inset: 0; }
.mp-avatar .mp-online-dot { position: absolute; right: 2px; bottom: 2px; }
.mp-unread { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--mp-primary); color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center; }

/* ── Me tab ──────────────────────────────────────────────── */
.mp-me-head { display: flex; align-items: center; gap: 16px; padding: 18px; margin-bottom: 14px; }
.mp-ring { position: relative; width: 84px; height: 84px; flex: none; }
.mp-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.mp-ring .mp-avatar { position: absolute; inset: 7px; width: auto; height: auto; }
.mp-me-name { font-size: 20px; font-weight: 800; margin: 0; }
.mp-group-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--mp-faint); margin: 18px 4px 8px; }
.mp-status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mp-faint); flex: none; }
.mp-status-dot.ok { background: var(--mp-online); }
.mp-status-dot.bad { background: var(--mp-danger); }

/* ── Empty state ─────────────────────────────────────────── */
.mp-empty { text-align: center; padding: 40px 20px; color: var(--mp-muted); }
.mp-empty svg { width: 56px; height: 56px; color: var(--mp-primary); opacity: .8; margin-bottom: 10px; }
.mp-empty h3 { color: var(--mp-text); font-size: 18px; font-weight: 800; }

/* ── Toast ───────────────────────────────────────────────── */
.mp-toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(var(--mp-tabbar-h) + var(--mp-safe-bottom) + 14px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.mp-toast { padding: 10px 16px; border-radius: 14px; background: #1B1530; color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--mp-shadow-2); animation: mp-toast-in .2s ease-out; max-width: calc(100vw - 32px); }
.mp-toast.is-error { background: var(--mp-danger); }
@keyframes mp-toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ── View transitions ────────────────────────────────────── */
.mp-view > * { animation: mp-fade-in .18s ease-out; }
@keyframes mp-fade-in { from { opacity: 0; transform: translateY(4px); } }

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ── Splash (shown until JS boots) ───────────────────────── */
.mp-splash { position: fixed; inset: 0; display: grid; place-items: center; background: var(--mp-bg); z-index: 100; transition: opacity .25s ease; }
.mp-splash img { width: 72px; height: 72px; animation: mp-pulse 1.2s ease-in-out infinite; }
.mp-splash.is-gone { opacity: 0; pointer-events: none; }
@keyframes mp-pulse { 50% { transform: scale(.92); opacity: .8; } }

/* ═════════════════════════════════════════════════════════════
   Phase 1 — sign-in, onboarding, profile editing, photos
   ═════════════════════════════════════════════════════════════ */

/* Bare screens: no top bar / tab bar */
body.mp-bare .mp-topbar, body.mp-bare .mp-tabbar { display: none; }
.mp-view--bare { padding: 0 0 calc(var(--mp-safe-bottom) + 16px); max-width: 560px; }

.w-100 { width: 100%; }
.btn-lg { padding: .95rem 1.4rem; font-size: 16px; }
.btn-outline { background: var(--mp-surface); color: var(--mp-text); border: 1.5px solid var(--mp-border); }
.btn-outline:hover { border-color: var(--mp-primary-2); }
.btn[disabled] { opacity: .55; cursor: not-allowed; filter: none; }
.form-control, .form-select { width: 100%; padding: .8rem 1rem; font-size: 16px; border: 1.5px solid var(--mp-border); outline: none; font-family: inherit; }
.form-control:focus, .form-select:focus { border-color: var(--mp-primary-2); box-shadow: 0 0 0 4px var(--mp-primary-soft); }
.form-control-lg { font-size: 20px; font-weight: 700; padding: 1rem 1.1rem; }
textarea.form-control { resize: vertical; min-height: 110px; line-height: 1.45; }
.mp-link { border: 0; background: none; color: var(--mp-primary); font-weight: 700; padding: 0; font-size: inherit; }
.mp-link[disabled] { color: var(--mp-faint); cursor: default; }
.mp-label { display: block; font-weight: 700; font-size: 14px; margin: 18px 0 8px; }
.mp-counter { font-size: 12px; color: var(--mp-muted); margin: 6px 2px 0; }
.mp-field-error { color: var(--mp-danger); font-size: 14px; font-weight: 600; min-height: 20px; margin: 8px 0; }
.mp-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--mp-primary-soft); color: var(--mp-text); font-size: 13px; margin-bottom: 14px; }
.mp-notice svg { width: 20px; height: 20px; color: var(--mp-primary); flex: none; }
.mp-spinner { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--mp-primary-soft); border-top-color: var(--mp-primary); animation: mp-spin .8s linear infinite; }
@keyframes mp-spin { to { transform: rotate(360deg); } }
.mp-back { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--mp-surface); color: var(--mp-text); display: grid; place-items: center; box-shadow: var(--mp-shadow-1); flex: none; }
.mp-back svg { width: 22px; height: 22px; }

/* ── Welcome ─────────────────────────────────────────────── */
.mp-welcome { position: relative; min-height: 100dvh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.mp-collage { position: absolute; inset: -40px -40px auto; height: 62dvh; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; transform: rotate(-8deg); opacity: .95; }
.mp-collage-tile { position: relative; aspect-ratio: 3/4; border-radius: 18px; overflow: hidden; }
.mp-collage-tile:nth-child(3n+2) { transform: translateY(36px); }
.mp-collage-tile .mp-photo { position: absolute; inset: 0; }
.mp-welcome::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 8%, color-mix(in srgb, var(--mp-bg) 70%, transparent) 30%, var(--mp-bg) 46%); z-index: 1; pointer-events: none; }
.mp-welcome-card { position: relative; z-index: 2; padding: 0 22px calc(28px + var(--mp-safe-bottom)); }
.mp-brand--lg { font-size: 30px; margin-bottom: 10px; }
.mp-brand--lg img { width: 44px; height: 44px; }
.mp-welcome-title { font-size: 27px; line-height: 1.18; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 16px; }
.mp-promises { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.mp-promises li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--mp-muted); }
.mp-promises li b { color: var(--mp-text); }
.mp-promises svg { width: 20px; height: 20px; color: var(--mp-primary); flex: none; margin-top: 1px; }
.mp-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--mp-surface); border: 1.5px solid var(--mp-border); font-size: 14px; margin-bottom: 14px; cursor: pointer; }
.mp-check input { width: 22px; height: 22px; accent-color: var(--mp-primary); flex: none; margin: 0; }
.mp-check.is-error { border-color: var(--mp-danger); animation: mp-shake .3s; }
@keyframes mp-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.mp-auth-buttons { display: grid; gap: 10px; }
.mp-fineprint { font-size: 12px; color: var(--mp-faint); text-align: center; margin: 12px 0 0; }
@media (min-width: 700px) {
  .mp-welcome { justify-content: center; }
  .mp-welcome-card { max-width: 460px; margin: 0 auto; background: var(--mp-surface); border-radius: 28px; padding: 28px; box-shadow: var(--mp-shadow-2); margin-top: 30dvh; }
}

/* ── Phone + code ────────────────────────────────────────── */
.mp-auth { padding: calc(16px + var(--mp-safe-top)) 22px 24px; min-height: 100dvh; }
.mp-auth .mp-back { margin-bottom: 18px; }
.mp-phone-field { display: flex; align-items: stretch; border: 1.5px solid var(--mp-border); border-radius: 16px; background: var(--mp-surface); overflow: hidden; }
.mp-phone-field:focus-within { border-color: var(--mp-primary-2); box-shadow: 0 0 0 4px var(--mp-primary-soft); }
.mp-phone-cc { display: flex; align-items: center; padding: 0 12px 0 14px; font-weight: 700; border-right: 1.5px solid var(--mp-border); white-space: nowrap; }
.mp-phone-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--mp-text); font: 700 20px var(--mp-font); padding: 16px 14px; letter-spacing: .02em; }
.mp-otp { display: flex; gap: 8px; justify-content: space-between; margin-bottom: 4px; }
.mp-otp input { width: 100%; max-width: 54px; aspect-ratio: 1/1.15; text-align: center; font: 800 24px var(--mp-font); border: 1.5px solid var(--mp-border); border-radius: 14px; background: var(--mp-surface); color: var(--mp-text); outline: none; }
.mp-otp input:focus { border-color: var(--mp-primary-2); box-shadow: 0 0 0 4px var(--mp-primary-soft); }
.mp-resend { text-align: center; color: var(--mp-muted); font-size: 14px; margin-top: 14px; }
.mp-dev-code { padding: 10px 14px; border-radius: 12px; background: rgba(245, 179, 1, .14); color: var(--mp-text); font-size: 14px; margin-bottom: 14px; }

/* ── Onboarding ──────────────────────────────────────────── */
.mp-ob { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(12px + var(--mp-safe-top)) 22px 0; }
.mp-ob-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.mp-progress { flex: 1; height: 6px; border-radius: 3px; background: var(--mp-surface-2); overflow: hidden; }
.mp-progress i { display: block; height: 100%; background: var(--mp-grad); border-radius: 3px; transition: width .3s ease; }
.mp-skip { min-width: 40px; text-align: right; color: var(--mp-muted); }
.mp-ob-body { flex: 1; }
.mp-ob-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--mp-primary-soft); color: var(--mp-primary); display: grid; place-items: center; margin-bottom: 16px; }
.mp-ob-icon svg { width: 28px; height: 28px; }
.mp-ob-title { font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; }
.mp-ob-sub { color: var(--mp-muted); font-size: 15px; margin: 0 0 22px; line-height: 1.45; }
.mp-ob-foot { position: sticky; bottom: 0; padding: 10px 0 calc(18px + var(--mp-safe-bottom)); background: linear-gradient(180deg, transparent, var(--mp-bg) 30%); }
.mp-dob { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 10px; }
.mp-age-preview { font-weight: 700; color: var(--mp-primary); min-height: 22px; margin-top: 12px; }
.mp-choices { display: grid; gap: 10px; }
.mp-choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border-radius: 18px; border: 1.5px solid var(--mp-border); background: var(--mp-surface); color: var(--mp-text); text-align: left; transition: border-color .15s, background .15s, transform .1s; }
.mp-choice:active { transform: scale(.99); }
.mp-choice-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--mp-surface-2); color: var(--mp-primary); flex: none; }
.mp-choice-icon svg { width: 22px; height: 22px; }
.mp-choice-text { flex: 1; display: flex; flex-direction: column; }
.mp-choice-text b { font-size: 17px; }
.mp-choice-text small { color: var(--mp-muted); font-size: 13px; margin-top: 2px; }
.mp-choice-tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--mp-border); display: grid; place-items: center; color: transparent; flex: none; }
.mp-choice-tick svg { width: 16px; height: 16px; }
.mp-choice.is-selected { border-color: var(--mp-primary); background: var(--mp-primary-soft); }
.mp-choice.is-selected .mp-choice-tick { background: var(--mp-primary); border-color: var(--mp-primary); color: #fff; }
.mp-chipset { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.mp-chipset--wrap { flex-wrap: wrap; overflow: visible; }
.mp-chip-select { flex: none; border: 1.5px solid var(--mp-border); background: var(--mp-surface); color: var(--mp-text); border-radius: var(--mp-radius-pill); padding: 9px 15px; font-weight: 600; font-size: 14px; transition: all .12s; }
.mp-chip-select.is-selected { background: var(--mp-primary); border-color: var(--mp-primary); color: #fff; }
.mp-or { display: flex; align-items: center; gap: 10px; color: var(--mp-faint); font-size: 13px; margin: 18px 0; }
.mp-or::before, .mp-or::after { content: ''; flex: 1; height: 1px; background: var(--mp-border); }
.mp-loc-status { margin-top: 12px; font-weight: 600; color: var(--mp-primary); min-height: 22px; }
.mp-blocked { text-align: center; padding-top: 18vh; }
.mp-blocked .mp-ob-icon { margin: 0 auto 16px; }

/* ── Photo manager ───────────────────────────────────────── */
.mp-pm { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 10px; }
.mp-pm-slot { position: relative; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; border: 0; padding: 0; background: var(--mp-surface-2); }
.mp-pm-slot.is-main { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.mp-pm-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mp-pm-empty { border: 2px dashed var(--mp-border); background: var(--mp-surface); }
.mp-pm-plus { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; font-weight: 400; color: var(--mp-primary); }
.mp-pm-slot.is-main.mp-pm-empty .mp-pm-plus { font-size: 52px; }
.mp-pm-badge { position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: var(--mp-radius-pill); background: rgba(14, 10, 28, .65); color: #fff; font-size: 11px; font-weight: 800; }
.mp-pm-badge--wait { top: auto; bottom: 8px; background: var(--mp-gold); color: #3B2A00; }
.mp-pm-hint { color: var(--mp-muted); font-size: 13px; margin: 12px 2px 0; }

/* ── Bottom sheet ────────────────────────────────────────── */
.mp-sheet-wrap { position: fixed; inset: 0; z-index: 80; }
.mp-sheet-backdrop { position: absolute; inset: 0; background: var(--mp-overlay); animation: mp-fade .18s ease-out; }
.mp-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto; background: var(--mp-surface); border-radius: 24px 24px 0 0; padding: 8px 12px calc(12px + var(--mp-safe-bottom)); animation: mp-up .22s cubic-bezier(.2, .9, .3, 1); }
.mp-sheet-wrap.is-closing .mp-sheet { transform: translateY(100%); transition: transform .18s ease-in; }
.mp-sheet-wrap.is-closing .mp-sheet-backdrop { opacity: 0; transition: opacity .18s; }
.mp-sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--mp-border); margin: 4px auto 10px; }
.mp-sheet-title { font-weight: 800; text-align: center; padding: 4px 0 10px; }
.mp-sheet-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 0; background: transparent; color: var(--mp-text); border-radius: 14px; font-weight: 600; font-size: 16px; text-align: left; }
.mp-sheet-btn:hover, .mp-sheet-btn:focus-visible { background: var(--mp-surface-2); }
.mp-sheet-btn svg { width: 22px; height: 22px; color: var(--mp-primary); }
.mp-sheet-btn.is-danger, .mp-sheet-btn.is-danger svg { color: var(--mp-danger); }
.mp-sheet-cancel { justify-content: center; color: var(--mp-muted); margin-top: 4px; }
@keyframes mp-up { from { transform: translateY(100%); } }
@keyframes mp-fade { from { opacity: 0; } }

/* ── Pages (edit profile, photos, legal) ─────────────────── */
.mp-page { padding: calc(12px + var(--mp-safe-top)) 18px 24px; }
.mp-page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mp-page-title { font-size: 20px; font-weight: 800; margin: 0; flex: 1; }
.mp-form { padding-bottom: 24px; }
.mp-locked { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; padding: 14px; border-radius: 14px; background: var(--mp-surface-2); font-size: 14px; }
.mp-locked svg { width: 20px; height: 20px; color: var(--mp-muted); flex: none; margin-top: 2px; }
.mp-prose { background: var(--mp-surface); border-radius: var(--mp-radius-card); padding: 18px; line-height: 1.6; box-shadow: var(--mp-shadow-1); }
.mp-prose h2 { font-size: 20px; } .mp-prose h3 { font-size: 17px; } .mp-prose h4 { font-size: 15px; }
.mp-prose p, .mp-prose ul { margin: 0 0 12px; }

/* ── Me tab additions ────────────────────────────────────── */
button.mp-ring { border: 0; background: none; padding: 0; }
.mp-me-info { min-width: 0; }
.mp-me-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mp-me-name .mp-verified { width: 20px; height: 20px; }
.mp-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mp-avatar-initial { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 26px; font-weight: 800; }
.mp-inline-icon { width: 14px; height: 14px; vertical-align: -2px; }
.mp-pill-ok { display: inline-flex; padding: 4px 10px; border-radius: var(--mp-radius-pill); background: rgba(34, 197, 94, .14); color: #15803D; font-weight: 800; font-size: 12px; }
.mp-row-value { color: var(--mp-primary); font-weight: 700; font-size: 13px; }
.mp-invite p { font-size: 14px; color: var(--mp-muted); }
.mp-invite-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mp-invite-code { flex: 1; min-width: 110px; font: 800 18px ui-monospace, Consolas, monospace; letter-spacing: .12em; color: var(--mp-text); }

/* Brighter accent on dark backgrounds */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mp-brand span b { color: var(--mp-primary-2); } }
:root[data-theme="dark"] .mp-brand span b { color: var(--mp-primary-2); }

/* ═════════════════════════════════════════════════════════════
   Phase 2 — discovery, profiles, likes, matches, privacy
   ═════════════════════════════════════════════════════════════ */

.btn-ghost { background: transparent; color: var(--mp-muted); border: 0; }
.mp-wrap { white-space: normal !important; }
.mp-more { min-height: 60px; display: grid; place-items: center; font-size: 13px; }
.mp-empty--wide { grid-column: 1 / -1; }
.mp-hint { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; text-align: left; margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; background: var(--mp-primary-soft); color: var(--mp-primary); font-weight: 700; font-size: 14px; }
.mp-hint svg { width: 18px; height: 18px; flex: none; }

/* Tiles */
.mp-tile-blurnote, .mp-card-blurnote { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 6px 10px; border-radius: var(--mp-radius-pill); background: rgba(14, 10, 28, .55); color: #fff; font-size: 11px; font-weight: 700; backdrop-filter: blur(6px); }
.mp-tile-blurnote { top: 38%; }
.mp-tile-blurnote svg, .mp-card-blurnote svg { width: 14px; height: 14px; }
.mp-tile.is-blurred:not(.is-locked) img { filter: none; transform: none; } /* the server already sends a blurred copy */

/* Encounters */
.mp-card-photo { position: absolute; inset: 0; }
.mp-card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.mp-card-blurnote { top: 42%; font-size: 13px; padding: 8px 14px; }
.mp-card-meta { display: flex; align-items: center; gap: 6px; }
.mp-card-more { position: absolute; right: 0; bottom: 4px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.22); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); transform: rotate(-90deg); }
.mp-card-more svg { width: 22px; height: 22px; }
.mp-card.mp-skel { border-radius: 24px; }

/* Filters sheet */
.mp-sheet--tall { max-height: 88dvh; display: flex; flex-direction: column; }
.mp-filter-body { overflow-y: auto; padding: 0 6px 12px; }
.mp-filter-body .mp-label:first-child { margin-top: 4px; }
.mp-age-range { display: flex; align-items: center; gap: 10px; }
.mp-age-range span { color: var(--mp-muted); font-size: 14px; }
.mp-switch { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-weight: 600; cursor: pointer; }
.mp-switch input { width: 22px; height: 22px; accent-color: var(--mp-primary); }
.mp-advanced { margin-top: 20px; padding: 14px; border-radius: 16px; background: var(--mp-surface-2); }
.mp-advanced-head { display: flex; align-items: center; gap: 8px; }
.mp-advanced-head svg { width: 18px; height: 18px; color: var(--mp-gold); }
.mp-advanced.is-locked .mp-label, .mp-advanced.is-locked .mp-age-range, .mp-advanced.is-locked .mp-chipset { opacity: .5; }
.mp-pill-premium { margin-left: auto; padding: 3px 10px; border-radius: var(--mp-radius-pill); background: var(--mp-gold); color: #3B2A00; font-size: 11px; font-weight: 800; }
.mp-sheet-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 10px 6px 4px; border-top: 1px solid var(--mp-border); }

/* Match overlay */
.mp-match { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 30%, #9B5CFF 0%, #6A2BE0 45%, #2A0E6E 100%); color: #fff; animation: mp-fade .25s ease-out; overflow: hidden; }
.mp-match.is-closing { opacity: 0; transition: opacity .2s; }
.mp-match-inner { position: relative; z-index: 1; width: 100%; max-width: 380px; text-align: center; }
.mp-match-title { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; animation: mp-pop .5s cubic-bezier(.2, 1.4, .4, 1) both .15s; }
.mp-match-sub { opacity: .9; margin: 0 0 26px; }
.mp-match-photos { position: relative; display: flex; justify-content: center; align-items: center; margin-bottom: 32px; height: 170px; }
.mp-match-photo { position: relative; width: 132px; height: 160px; border-radius: 22px; overflow: hidden; border: 4px solid #fff; box-shadow: 0 12px 30px rgba(0,0,0,.3); background: rgba(255,255,255,.2); }
.mp-match-photo img, .mp-match-photo .mp-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mp-match-photo.is-left { transform: rotate(-8deg) translateX(14px); animation: mp-slide-l .5s cubic-bezier(.2, 1.2, .4, 1) both; }
.mp-match-photo.is-right { transform: rotate(8deg) translateX(-14px); animation: mp-slide-r .5s cubic-bezier(.2, 1.2, .4, 1) both; }
.mp-match-heart { position: absolute; z-index: 2; width: 58px; height: 58px; border-radius: 50%; background: #fff; color: var(--mp-like); display: grid; place-items: center; box-shadow: 0 8px 20px rgba(0,0,0,.25); animation: mp-pop .45s cubic-bezier(.2, 1.6, .4, 1) both .35s; }
.mp-match-heart svg { width: 30px; height: 30px; }
.mp-match .btn-primary { background: #fff; color: var(--mp-primary); margin-bottom: 8px; }
.mp-match .btn-ghost { color: #fff; opacity: .85; }
.mp-match-confetti i { position: absolute; top: -20px; left: calc(var(--i) * 5.5%); width: 8px; height: 14px; border-radius: 2px; background: hsl(calc(var(--i) * 40), 90%, 65%); animation: mp-confetti 2.4s linear calc(var(--i) * -0.13s) infinite; }
@keyframes mp-pop { from { transform: scale(.3); opacity: 0; } }
@keyframes mp-slide-l { from { transform: translateX(-160px) rotate(-20deg); opacity: 0; } }
@keyframes mp-slide-r { from { transform: translateX(160px) rotate(20deg); opacity: 0; } }
@keyframes mp-confetti { to { transform: translateY(110vh) rotate(540deg); } }

/* Profile view */
.mp-pv { padding-bottom: 110px; }
.mp-pv-photo { position: relative; aspect-ratio: 3 / 4; max-height: 68dvh; width: 100%; overflow: hidden; background: var(--mp-skeleton); }
.mp-pv-img, .mp-pv-img img, .mp-pv-img .mp-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mp-pv-photo::after { content: ''; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(transparent, rgba(10,6,24,.35)); pointer-events: none; }
.mp-pv-back { position: absolute; top: calc(12px + var(--mp-safe-top)); left: 12px; z-index: 3; }
.mp-pv-menu { position: absolute; top: calc(12px + var(--mp-safe-top)); right: 12px; z-index: 3; }
.mp-pv-photo .mp-card-dots { top: calc(64px + var(--mp-safe-top)); }
.mp-pv-body { padding: 18px 20px 10px; }
.mp-pv-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.mp-pv-name .mp-verified { width: 24px; height: 24px; }
.mp-pv-meta { display: flex; align-items: center; gap: 6px; color: var(--mp-muted); margin: 0 0 12px; flex-wrap: wrap; }
.mp-pv-matched { color: var(--mp-like); }
.mp-pill-intent { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--mp-radius-pill); background: var(--mp-primary-soft); color: var(--mp-primary); font-weight: 700; font-size: 13px; }
.mp-pill-intent svg { width: 16px; height: 16px; }
.mp-pv-h { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--mp-faint); margin: 22px 0 8px; }
.mp-pv-bio { white-space: pre-line; line-height: 1.55; margin: 0; }
.mp-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-facts span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--mp-surface); border: 1px solid var(--mp-border); font-size: 14px; font-weight: 600; }
.mp-facts svg { width: 16px; height: 16px; color: var(--mp-primary); }
.mp-pv .mp-chip-select { cursor: default; }
.mp-pv-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 12px 16px calc(14px + var(--mp-safe-bottom)); background: linear-gradient(transparent, var(--mp-bg) 35%); }
.mp-pv-msg { flex: 1; max-width: 220px; }
.mp-round.is-done { box-shadow: 0 0 0 4px rgba(255, 61, 113, .3); }

/* Privacy toggles */
.mp-toggle-row { cursor: pointer; align-items: flex-start; }
.mp-toggle { position: relative; flex: none; margin-top: 4px; }
.mp-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.mp-toggle i { display: block; width: 46px; height: 28px; border-radius: 14px; background: var(--mp-border); transition: background .18s; }
.mp-toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }
.mp-toggle input:checked + i { background: var(--mp-primary); }
.mp-toggle input:checked + i::after { transform: translateX(18px); }
.mp-toggle input:focus-visible + i { outline: 2px solid var(--mp-primary-2); outline-offset: 2px; }

/* ─────────────────────────────────────────────────────────────
   Phase 3 — wallet, Premium, Boost, rewards
   ───────────────────────────────────────────────────────────── */
.mp-swal .swal2-html-container { white-space: pre-line; }
.mp-topbar-actions { display: flex; gap: 8px; }
.mp-icon-btn--boost { color: var(--mp-primary); }
.mp-credit-pill { cursor: pointer; }
.mp-credit-pill.is-bump { animation: mp-bump .6s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes mp-bump { 0% { transform: scale(1); } 35% { transform: scale(1.18); box-shadow: 0 0 0 6px rgba(245, 179, 1, .25); } 100% { transform: scale(1); } }
.mp-coin--xs { width: 16px; height: 16px; vertical-align: -3px; }
.mp-coin--xl { width: 54px; height: 54px; }
.mp-small { font-size: 12.5px; margin: 8px 4px 0; }
.mp-cost { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-size: 12px; }
.mp-cost.is-free { color: var(--mp-online); }
.mp-test-note { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 9px 12px; border-radius: 12px; background: rgba(245, 179, 1, .14); color: #8A5A00; font-size: 13px; font-weight: 600; }
.mp-test-note svg { width: 18px; height: 18px; flex: none; }
:root[data-theme="dark"] .mp-test-note { color: #F5C451; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mp-test-note { color: #F5C451; } }

.mp-wallet { max-width: 640px; margin: 0 auto; }
.mp-balance {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 22px 20px; border-radius: 24px;
  background: var(--mp-grad); color: #fff; box-shadow: var(--mp-shadow-2); overflow: hidden;
}
.mp-balance::after { content: ''; position: absolute; right: -40px; top: -50px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .10); }
.mp-balance-coin { flex: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .2)); }
.mp-balance-num { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.mp-balance-label { font-size: 14px; opacity: .85; font-weight: 600; margin-top: 4px; }
.mp-balance-costs { position: absolute; right: 14px; bottom: 14px; z-index: 1; background: rgba(255, 255, 255, .18) !important; color: #fff !important; border: 0; font-weight: 700; font-size: 12px; }

.mp-boost { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px; border-radius: var(--mp-radius-card); background: var(--mp-surface); box-shadow: var(--mp-shadow-1); }
.mp-boost.is-on { outline: 2px solid var(--mp-primary); }
.mp-boost-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--mp-primary-soft); color: var(--mp-primary); flex: none; }
.mp-boost-icon svg { width: 24px; height: 24px; }
.mp-boost-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mp-boost-main b { font-size: 15px; }
.mp-boost-main span { font-size: 12.5px; color: var(--mp-muted); }
.mp-boost .btn { flex: none; display: inline-flex; align-items: center; gap: 4px; }

.mp-packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .mp-packs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mp-pack {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 14px 14px;
  border: 2px solid transparent; border-radius: var(--mp-radius-card); background: var(--mp-surface); color: var(--mp-text);
  box-shadow: var(--mp-shadow-1); text-align: left; transition: transform .15s ease, border-color .15s ease;
}
.mp-pack:active { transform: scale(.97); }
.mp-pack.is-best { border-color: var(--mp-primary); }
.mp-pack-ribbon { position: absolute; top: -9px; right: 12px; padding: 2px 9px; border-radius: var(--mp-radius-pill); background: var(--mp-grad); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; }
.mp-pack-credits { display: flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.mp-pack-credits .mp-coin { width: 22px; height: 22px; }
.mp-pack-name { font-size: 12.5px; color: var(--mp-muted); font-weight: 600; }
.mp-pack-price { margin-top: 8px; font-size: 16px; font-weight: 800; color: var(--mp-primary); }
.mp-pack-per { font-size: 11.5px; color: var(--mp-faint); }
.mp-pack:disabled { opacity: .6; }

.mp-premium-banner {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 16px; padding: 14px 16px; border: 0; text-align: left;
  border-radius: var(--mp-radius-card); color: #3B2A00; background: linear-gradient(135deg, #FFD460 0%, #F5B301 100%); box-shadow: var(--mp-shadow-1);
}
.mp-premium-banner > svg { width: 20px; height: 20px; flex: none; }
.mp-premium-crown { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .45); display: grid; place-items: center; flex: none; }
.mp-premium-crown svg { width: 22px; height: 22px; }
.mp-premium-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mp-premium-main b { font-size: 15.5px; }
.mp-premium-main span { font-size: 12.5px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mp-earns { display: grid; gap: 10px; }
.mp-earn { display: block; width: 100%; padding: 14px; border: 0; border-radius: var(--mp-radius-card); background: var(--mp-surface); color: var(--mp-text); box-shadow: var(--mp-shadow-1); text-align: left; }
.mp-earn--row { display: flex; align-items: center; gap: 10px; }
.mp-earn--row:disabled { opacity: 1; }
.mp-earn-head { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; }
.mp-earn-head > svg { width: 22px; height: 22px; color: var(--mp-primary); flex: none; margin-top: 2px; }
.mp-earn-head b { display: block; font-size: 14.5px; }
.mp-earn-head span { display: block; font-size: 12.5px; color: var(--mp-muted); }
.mp-earn-end { flex: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--mp-primary); font-size: 14px; }
.mp-earn-end svg { width: 16px; height: 16px; }
.mp-earn-foot { margin: 10px 0 0; font-size: 12px; color: var(--mp-muted); }
.mp-earn .mp-invite-row { margin-top: 12px; }
.mp-streak { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.mp-streak-day { display: flex; flex-direction: column; align-items: center; padding: 7px 0; border-radius: 12px; background: var(--mp-surface-2); }
.mp-streak-day small { font-size: 10px; color: var(--mp-muted); font-weight: 600; }
.mp-streak-day b { font-size: 13px; }
.mp-streak-day.is-done { background: var(--mp-grad); color: #fff; }
.mp-streak-day.is-done small { color: rgba(255, 255, 255, .8); }
.mp-streak-day.is-next { outline: 2px dashed var(--mp-primary); }
.mp-bar { height: 8px; margin-top: 12px; border-radius: 4px; background: var(--mp-surface-2); overflow: hidden; }
.mp-bar i { display: block; height: 100%; background: var(--mp-grad); border-radius: 4px; }

.mp-ledger-row { align-items: center; }
.mp-ledger-sign { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.mp-ledger-sign svg { width: 18px; height: 18px; }
.mp-ledger-sign.is-in { background: rgba(34, 197, 94, .14); color: #16A34A; }
.mp-ledger-sign.is-out { background: var(--mp-primary-soft); color: var(--mp-primary); }
.mp-ledger-amt { flex: none; font-weight: 800; font-size: 15px; }
.mp-ledger-amt.is-in { color: #16A34A; }

/* Premium page */
.mp-premium-page { max-width: 640px; margin: -8px auto 0; }
.mp-premium-hero {
  position: relative; padding: 70px 24px 30px; text-align: center; color: #fff; border-radius: 0 0 32px 32px;
  background: radial-gradient(120% 90% at 50% 0%, var(--mp-primary-2) 0%, var(--mp-primary) 55%, #3A1590 100%);
}
.mp-premium-back { position: absolute; left: 16px; top: 16px; }
.mp-premium-hero-icon { display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: linear-gradient(135deg, #FFD460, #F5B301); color: #3B2A00; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.mp-premium-hero-icon svg { width: 34px; height: 34px; }
.mp-premium-hero h1 { margin: 14px 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.mp-premium-hero p { margin: 0; opacity: .9; }
.mp-feature-list { display: grid; gap: 4px; margin-top: 18px; padding: 8px 14px; border-radius: var(--mp-radius-card); background: var(--mp-surface); box-shadow: var(--mp-shadow-1); }
.mp-feature { display: flex; gap: 12px; padding: 10px 0; }
.mp-feature + .mp-feature { border-top: 1px solid var(--mp-border); }
.mp-feature > svg { width: 22px; height: 22px; flex: none; padding: 3px; border-radius: 50%; background: var(--mp-primary-soft); color: var(--mp-primary); }
.mp-feature b { display: block; font-size: 14.5px; }
.mp-feature span { display: block; font-size: 12.5px; color: var(--mp-muted); }
.mp-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.mp-plan { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 10px; border: 2px solid var(--mp-border); border-radius: var(--mp-radius-card); background: var(--mp-surface); color: var(--mp-text); }
.mp-plan.is-selected { border-color: var(--mp-primary); background: var(--mp-primary-soft); }
.mp-plan-name { font-weight: 700; font-size: 13px; color: var(--mp-muted); }
.mp-plan-price { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.mp-plan-per { font-size: 11.5px; color: var(--mp-faint); }
.mp-plan-bonus { margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--mp-radius-pill); background: rgba(245, 179, 1, .16); font-size: 11.5px; font-weight: 700; }

/* ─────────────────────────────────────────────────────────────
   Phase 4 — chat
   ───────────────────────────────────────────────────────────── */
.mp-inline-icon { width: 15px; height: 15px; vertical-align: -2px; }
.mp-verified-mini { color: var(--mp-primary); }

/* Chats list */
.mp-newmatches { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.mp-newmatches::-webkit-scrollbar { display: none; }
.mp-newmatch { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; border: 0; background: none; color: var(--mp-text); }
.mp-newmatch-ring { padding: 3px; border-radius: 50%; background: var(--mp-grad-like); }
.mp-newmatch-ring .mp-avatar { width: 62px; height: 62px; border: 3px solid var(--mp-bg); }
.mp-newmatch-name { font-size: 12.5px; font-weight: 700; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-chat-row { align-items: center; }
.mp-chat-row .mp-row-sub { display: flex; align-items: center; gap: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-chat-row.is-unread .mp-row-title, .mp-chat-row.is-unread .mp-row-sub { font-weight: 800; color: var(--mp-text); }
.mp-chat-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.mp-chat-time { font-size: 12px; color: var(--mp-faint); }
.mp-chat-row.is-unread .mp-chat-time { color: var(--mp-primary); font-weight: 700; }
.mp-chat-unread { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--mp-like); color: #fff; font-size: 12px; display: grid; place-items: center; }
.mp-chip-intro { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--mp-radius-pill); background: var(--mp-primary-soft); color: var(--mp-primary); font-size: 11px; font-weight: 700; vertical-align: 1px; }
.mp-chip-intro.is-muted { background: var(--mp-surface-2); color: var(--mp-muted); }
.mp-ticks { display: inline-flex; color: var(--mp-faint); flex: none; }
.mp-ticks svg { width: 16px; height: 16px; }
.mp-ticks.is-read { color: #34B7F1; }

/* Chat screen */
.mp-chat { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; max-width: 760px; margin: 0 auto; background: var(--mp-bg); }
.mp-chat-head { display: flex; align-items: center; gap: 10px; padding: calc(var(--mp-safe-top) + 10px) 12px 10px; background: var(--mp-surface); box-shadow: var(--mp-shadow-1); z-index: 1; }
.mp-chat-head .mp-back { box-shadow: none; background: var(--mp-surface-2); width: 38px; height: 38px; }
.mp-chat-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--mp-text); text-align: left; padding: 0; }
.mp-chat-who .mp-avatar { width: 42px; height: 42px; }
.mp-chat-who-main { min-width: 0; display: flex; flex-direction: column; }
.mp-chat-name { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-chat-status { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--mp-muted); }
.mp-chat-status em { color: var(--mp-primary); font-style: normal; font-weight: 700; }
.mp-chat-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px 6px; -webkit-overflow-scrolling: touch; }
.mp-chat-older { text-align: center; }
.mp-chat-older .btn { margin: 4px 0 10px; }
.mp-chat-day { text-align: center; margin: 12px 0 8px; }
.mp-chat-day span { display: inline-block; padding: 3px 12px; border-radius: var(--mp-radius-pill); background: var(--mp-surface-2); color: var(--mp-muted); font-size: 11.5px; font-weight: 700; }
.mp-chat-hello { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 20px; text-align: center; color: var(--mp-muted); }
.mp-chat-hello .mp-avatar { width: 92px; height: 92px; }
.mp-msg { display: flex; flex-direction: column; margin: 3px 0; }
.mp-msg.is-mine { align-items: flex-end; }
.mp-msg.is-theirs { align-items: flex-start; }
.mp-msg-bubble { position: relative; max-width: min(78%, 480px); padding: 8px 12px 6px; border-radius: 18px; font-size: 15px; line-height: 1.38; word-wrap: break-word; overflow-wrap: anywhere; }
.mp-msg.is-theirs .mp-msg-bubble { background: var(--mp-surface); color: var(--mp-text); border-bottom-left-radius: 6px; box-shadow: var(--mp-shadow-1); }
.mp-msg.is-mine .mp-msg-bubble { background: var(--mp-grad); color: #fff; border-bottom-right-radius: 6px; }
.mp-msg.is-sending .mp-msg-bubble { opacity: .75; }
.mp-msg.is-failed .mp-msg-bubble { background: var(--mp-surface-2); color: var(--mp-text); outline: 1.5px solid var(--mp-danger); }
.mp-msg-meta { display: inline-flex; align-items: center; gap: 3px; float: right; margin: 6px 0 -2px 10px; font-size: 11px; opacity: .75; }
.mp-msg.is-mine .mp-ticks { color: rgba(255, 255, 255, .8); }
.mp-msg.is-mine .mp-ticks.is-read { color: #9BE7FF; }
.mp-msg-retry { margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--mp-danger); font-size: 12px; font-weight: 700; }
.mp-msg-retry svg { width: 14px; height: 14px; }
.mp-msg-removed { font-style: italic; opacity: .7; }
.mp-msg.is-media .mp-msg-bubble { padding: 4px; }
.mp-msg.is-media .mp-msg-meta { position: absolute; right: 10px; bottom: 8px; margin: 0; padding: 1px 6px; border-radius: 8px; background: rgba(0, 0, 0, .35); color: #fff; opacity: 1; }
.mp-msg-img { display: block; width: min(260px, 62vw); max-height: 340px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--mp-surface-2); }
.mp-msg-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-voice { display: flex; align-items: center; gap: 10px; min-width: 200px; padding: 2px 0; }
.mp-msg.is-voice .mp-msg-bubble { padding: 8px 12px 6px 8px; }
.mp-voice-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .22); color: inherit; }
.mp-msg.is-theirs .mp-voice-btn { background: var(--mp-primary-soft); color: var(--mp-primary); }
.mp-voice-btn svg { width: 18px; height: 18px; }
.mp-voice-bar { flex: 1; height: 4px; border-radius: 2px; background: currentColor; opacity: .3; position: relative; min-width: 80px; }
.mp-voice-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: currentColor; opacity: 1; }
.mp-voice-time { font-size: 12px; font-variant-numeric: tabular-nums; }
.mp-chat-typing { display: inline-flex; gap: 4px; margin: 6px 0; padding: 10px 14px; border-radius: 18px; background: var(--mp-surface); box-shadow: var(--mp-shadow-1); }
.mp-chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--mp-faint); animation: mp-typing 1.2s infinite ease-in-out; }
.mp-chat-typing span:nth-child(2) { animation-delay: .15s; }
.mp-chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes mp-typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.mp-chat-newpill { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px; border: 0; border-radius: var(--mp-radius-pill); background: var(--mp-primary); color: #fff; font-weight: 700; font-size: 13px; box-shadow: var(--mp-shadow-2); }
.mp-chat-newpill svg { width: 14px; height: 14px; transform: rotate(90deg); }
.mp-chat-foot { padding: 6px 10px calc(var(--mp-safe-bottom) + 10px); background: var(--mp-bg); }
.mp-chat-notice, .mp-chat-guard { display: flex; align-items: flex-start; gap: 8px; margin: 0 2px 8px; padding: 10px 12px; border-radius: 14px; font-size: 13px; line-height: 1.4; }
.mp-chat-notice { background: var(--mp-primary-soft); color: var(--mp-text); }
.mp-chat-notice svg, .mp-chat-guard svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--mp-primary); }
.mp-chat-guard { background: rgba(229, 72, 77, .10); color: var(--mp-text); outline: 1.5px solid rgba(229, 72, 77, .35); }
.mp-chat-guard > svg { color: var(--mp-danger); }
.mp-chat-guard span { flex: 1; }
.mp-chat-guard button { border: 0; background: none; color: var(--mp-muted); padding: 0; }
.mp-composer, .mp-recorder { display: flex; align-items: flex-end; gap: 8px; }
.mp-composer[hidden], .mp-recorder[hidden] { display: none; }
.mp-composer.is-disabled { opacity: .55; }
.mp-composer textarea {
  flex: 1; min-height: 44px; max-height: 140px; resize: none; padding: 11px 16px; border: 0; border-radius: 22px;
  background: var(--mp-surface); color: var(--mp-text); font: inherit; font-size: 15px; line-height: 1.4; box-shadow: var(--mp-shadow-1);
}
.mp-composer textarea:focus { outline: 2px solid var(--mp-primary); }
.mp-comp-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; flex: none; background: var(--mp-surface); color: var(--mp-primary); box-shadow: var(--mp-shadow-1); }
.mp-comp-btn[hidden] { display: none; }
.mp-comp-btn svg { width: 22px; height: 22px; }
.mp-comp-send { position: relative; width: 48px; height: 48px; border-radius: 50%; border: 0; flex: none; display: grid; place-items: center; background: var(--mp-grad); color: #fff; box-shadow: var(--mp-shadow-1); }
.mp-comp-send:disabled { opacity: .5; }
.mp-comp-send svg { width: 22px; height: 22px; }
.mp-send-cost { position: absolute; top: -8px; right: -6px; display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px 1px 3px; border-radius: var(--mp-radius-pill); background: var(--mp-surface); color: var(--mp-text); font-size: 11px; font-weight: 800; box-shadow: var(--mp-shadow-1); }
.mp-recorder { align-items: center; padding: 2px 0; }
.mp-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mp-danger); animation: mp-pulse 1s infinite; }
@keyframes mp-pulse { 50% { opacity: .3; } }
.mp-rec-time { font-weight: 800; font-variant-numeric: tabular-nums; }
.mp-rec-hint { flex: 1; color: var(--mp-muted); font-size: 13px; }
.mp-lightbox { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(0, 0, 0, .92); }
.mp-lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.mp-lightbox .mp-back { position: absolute; top: calc(var(--mp-safe-top) + 14px); right: 14px; }
/* `hidden` must win over the display rules above */
.mp-chat [hidden], .mp-chat-typing[hidden], .mp-chat-newpill[hidden], .mp-chat-notice[hidden], .mp-chat-guard[hidden] { display: none !important; }

/* ─────────────────────────────────────────────────────────────
   Phase 5 — voice calls
   ───────────────────────────────────────────────────────────── */
.mp-chat-callbtn { position: relative; color: var(--mp-primary); }
.mp-chat-callbtn .mp-send-cost { top: -6px; right: -10px; font-size: 10px; }
.mp-msg-system { display: flex; justify-content: center; margin: 10px 0; }
.mp-msg-system span { padding: 5px 12px; border-radius: var(--mp-radius-pill); background: var(--mp-surface); color: var(--mp-muted); font-size: 12.5px; font-weight: 600; box-shadow: var(--mp-shadow-1); }

.mp-call {
  position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: calc(var(--mp-safe-top) + 18px) 20px calc(var(--mp-safe-bottom) + 34px); color: #fff; text-align: center;
  background: radial-gradient(120% 80% at 50% 0%, #3A1590 0%, #1A0E3A 55%, #0B0718 100%);
  animation: mp-call-in .25s ease-out;
}
@keyframes mp-call-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.mp-call-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--mp-radius-pill); background: rgba(255, 255, 255, .1); font-size: 12px; font-weight: 600; }
.mp-call-badge svg { width: 14px; height: 14px; }
.mp-call-who { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mp-call-photo { width: 132px; height: 132px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 6px rgba(155, 92, 255, .25), 0 0 0 14px rgba(155, 92, 255, .1); margin-bottom: 14px; }
.mp-call-photo { position: relative; flex: none; }
.mp-call-photo img, .mp-call-photo .mp-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mp-call-photo .mp-photo svg { width: 100%; height: 100%; }
.mp-call-who h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.mp-call-status { margin: 0; font-size: 17px; font-variant-numeric: tabular-nums; opacity: .9; }
.mp-call-cost { margin: 4px 0 0; max-width: 300px; font-size: 13px; opacity: .75; }
.mp-call-cost .mp-coin { vertical-align: -3px; }
.mp-call-test { max-width: 300px; margin: 14px 0 0; display: flex; gap: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(245, 179, 1, .16); color: #FFD979; font-size: 12.5px; text-align: left; }
.mp-call-test svg { width: 16px; height: 16px; flex: none; }
.mp-call-test[hidden], .mp-call-low[hidden] { display: none !important; }
.mp-call-low { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 61, 113, .18); color: #FFC2D2; font-size: 13px; }
.mp-call-low svg { width: 18px; height: 18px; }
.mp-call-low button { margin-left: 6px; border: 0; border-radius: var(--mp-radius-pill); padding: 5px 12px; background: #fff; color: var(--mp-like); font-weight: 800; font-size: 12.5px; }
.mp-call-actions { display: flex; gap: 46px; }
.mp-call-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: none; color: #fff; font-size: 12.5px; font-weight: 600; }
.mp-call-btn svg { width: 64px; height: 64px; padding: 19px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.mp-call-btn.is-end svg { background: #E5484D; transform: rotate(0deg); }
.mp-call-btn.is-answer svg { background: #22C55E; animation: mp-ring 1.2s infinite; }
.mp-call-btn.is-on svg { background: #fff; color: #1A0E3A; }
@keyframes mp-ring { 0%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } 50% { transform: rotate(0); } }
/* Minimised while topping up: a bar at the top; tap to open again */
.mp-call.is-mini { inset: auto 10px auto 10px; top: calc(var(--mp-safe-top) + 8px); height: 60px; flex-direction: row; padding: 8px 14px; border-radius: 18px; justify-content: flex-start; gap: 10px; box-shadow: var(--mp-shadow-2); cursor: pointer; }
.mp-call.is-mini .mp-call-top, .mp-call.is-mini .mp-call-cost, .mp-call.is-mini .mp-call-low, .mp-call.is-mini .mp-call-test { display: none !important; }
.mp-call.is-mini .mp-call-who { flex-direction: row; gap: 10px; }
.mp-call.is-mini .mp-call-photo { width: 40px; height: 40px; margin: 0; box-shadow: none; }
.mp-call.is-mini h2 { font-size: 15px; }
.mp-call.is-mini .mp-call-status { font-size: 13px; }
.mp-call.is-mini .mp-call-actions { margin-left: auto; gap: 10px; }
.mp-call.is-mini .mp-call-btn span { display: none; }
.mp-call.is-mini .mp-call-btn svg { width: 40px; height: 40px; padding: 10px; }

/* ─────────────────────────────────────────────────────────────
   Phase 5.1 — chat upgrades
   ───────────────────────────────────────────────────────────── */
.mp-comp-field { position: relative; flex: 1; display: flex; min-width: 0; }
.mp-comp-field textarea { padding-right: 46px !important; width: 100%; }
.mp-comp-emoji { position: absolute; right: 4px; bottom: 4px; width: 36px; height: 36px; border: 0; border-radius: 50%; display: grid; place-items: center; background: none; color: var(--mp-muted); }
.mp-comp-emoji svg { width: 22px; height: 22px; }
.mp-composer textarea::placeholder { color: var(--mp-faint); }
.mp-emoji-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 2px; max-height: 200px; overflow-y: auto; margin: 0 2px 8px; padding: 8px; border-radius: 16px; background: var(--mp-surface); box-shadow: var(--mp-shadow-1); }
.mp-emoji-panel button { height: 40px; border: 0; border-radius: 10px; background: none; font-size: 24px; line-height: 1; }
.mp-emoji-panel button:active { background: var(--mp-surface-2); }
.mp-unverified { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--mp-radius-pill); background: rgba(245, 179, 1, .16); color: #B07D00; font-size: 11px; font-weight: 700; }
.mp-unverified--pv { margin: 4px 0 0; font-size: 12px; }
[data-theme="dark"] .mp-unverified { color: #FFD979; }
.mp-recbanner { position: absolute; top: calc(var(--mp-safe-top) + 70px); left: 50%; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 32px); padding: 9px 16px; border-radius: var(--mp-radius-pill); background: var(--mp-text); color: var(--mp-bg); font-size: 13px; font-weight: 600; box-shadow: var(--mp-shadow-2); animation: mp-up .2s ease-out; }
.mp-recbanner svg { width: 16px; height: 16px; color: var(--mp-danger); flex: none; }
.mp-replybar { display: flex; align-items: center; gap: 10px; margin: 0 2px 8px; padding: 8px 10px 8px 12px; border-radius: 14px; background: var(--mp-surface); border-left: 4px solid var(--mp-primary); box-shadow: var(--mp-shadow-1); }
.mp-replybar > svg { width: 18px; height: 18px; color: var(--mp-primary); flex: none; }
.mp-replybar span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--mp-muted); }
.mp-replybar span b { color: var(--mp-primary); font-size: 12.5px; }
.mp-replybar span, .mp-replybar span b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-replybar button { border: 0; background: none; color: var(--mp-muted); padding: 4px; }
.mp-replybar button svg { width: 18px; height: 18px; }
.mp-msg-quote { display: flex; flex-direction: column; width: 100%; margin: 0 0 6px; padding: 5px 9px; border: 0; border-left: 3px solid currentColor; border-radius: 10px; background: rgba(0, 0, 0, .06); color: inherit; text-align: left; font-size: 13px; line-height: 1.3; }
.mp-msg.is-mine .mp-msg-quote { background: rgba(255, 255, 255, .18); }
.mp-msg-quote b { font-size: 12px; }
.mp-msg-quote span { opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mp-msg.is-media .mp-msg-quote { margin: 4px 4px 6px; width: auto; }
.mp-msg-reacts { display: flex; gap: 4px; margin: -8px 8px 2px; position: relative; z-index: 1; }
.mp-msg-reacts button { display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px; border: 1.5px solid var(--mp-bg); border-radius: var(--mp-radius-pill); background: var(--mp-surface); color: var(--mp-text); font-size: 13px; font-weight: 700; box-shadow: var(--mp-shadow-1); }
.mp-msg-reacts button.is-mine { background: var(--mp-primary-soft); }
.mp-msg-star svg { width: 11px; height: 11px; }
.mp-msg { transition: transform .15s; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mp-msg.is-flash .mp-msg-bubble { animation: mp-flash 1.2s ease-out; }
@keyframes mp-flash { 0%, 40% { box-shadow: 0 0 0 4px var(--mp-primary-soft); } 100% { box-shadow: none; } }
.mp-react-row { display: flex; justify-content: space-around; padding: 4px 4px 2px; }
.mp-react-row button { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--mp-surface-2); font-size: 26px; line-height: 1; }
.mp-react-row button.is-mine { background: var(--mp-primary-soft); outline: 2px solid var(--mp-primary); }
.mp-react-note { margin: 4px 0 6px; text-align: center; color: var(--mp-faint); font-size: 12px; }
.mp-sheet-btn.is-danger { color: var(--mp-danger); }
.mp-ice { margin: 0 2px 8px; }
.mp-ice-title { display: flex; align-items: center; gap: 6px; margin: 0 4px 6px; color: var(--mp-muted); font-size: 12.5px; font-weight: 600; }
.mp-ice-title svg { width: 15px; height: 15px; color: var(--mp-primary); }
.mp-ice-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.mp-ice-chips button { flex: none; max-width: 260px; padding: 9px 14px; border: 1.5px solid var(--mp-primary-soft); border-radius: 18px; background: var(--mp-surface); color: var(--mp-text); font-size: 13.5px; text-align: left; white-space: normal; line-height: 1.3; }
.mp-chat .mp-ice[hidden], .mp-chat .mp-replybar[hidden], .mp-chat .mp-emoji-panel[hidden], .mp-chat .mp-recbanner[hidden] { display: none !important; }

/* Chats list: search, tabs, starred */
.mp-section-head #mp-starred { width: 42px; height: 42px; border-radius: 50%; border: 0; flex: none; display: grid; place-items: center; background: var(--mp-surface); color: var(--mp-primary); box-shadow: var(--mp-shadow-1); }
.mp-section-head #mp-starred svg { width: 20px; height: 20px; }
.mp-chat-tools[hidden] { display: none; }
.mp-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 44px; border-radius: var(--mp-radius-pill); background: var(--mp-surface); box-shadow: var(--mp-shadow-1); color: var(--mp-muted); }
.mp-search svg { width: 18px; height: 18px; flex: none; }
.mp-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--mp-text); font: inherit; font-size: 15px; outline: none; }
.mp-tabs { display: flex; gap: 6px; margin: 12px 0 0; overflow-x: auto; scrollbar-width: none; }
.mp-tabs button { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 7px 14px; border: 0; border-radius: var(--mp-radius-pill); background: var(--mp-surface-2); color: var(--mp-muted); font-weight: 700; font-size: 13.5px; }
.mp-tabs button.is-active { background: var(--mp-primary); color: #fff; }
.mp-tabs button b { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--mp-like, #FF3D71); color: #fff; font-size: 11px; }
.mp-fav-mini { color: #F5B301; }
.mp-starred-row { cursor: pointer; }
.mp-starred-off { border: 0; background: none; color: #F5B301; padding: 4px; }
.mp-starred-off svg { width: 18px; height: 18px; fill: currentColor; }
.mp-chat-status { white-space: nowrap; min-width: 0; overflow: hidden; }
.mp-status-txt { display: inline-flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; }
.mp-chat-status .mp-unverified { flex: none; padding: 0 7px; font-size: 10.5px; }
.mp-recbanner { width: max-content; }

/* ─────────────────────────────────────────────────────────────
   Phase 6 — trust & safety
   ───────────────────────────────────────────────────────────── */
.mp-panel { max-height: 88dvh; overflow-y: auto; }
.mp-panel-body { padding: 0 6px 6px; }
.mp-panel-body > p { line-height: 1.45; }
.mp-report-reasons { display: grid; gap: 6px; }
.mp-radio { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: var(--mp-surface-2); font-weight: 600; cursor: pointer; }
.mp-radio input { width: 18px; height: 18px; accent-color: var(--mp-primary); flex: none; }
.mp-radio:has(input:checked) { background: var(--mp-primary-soft); outline: 2px solid var(--mp-primary); }
.mp-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.35; cursor: pointer; }
.mp-check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--mp-primary); flex: none; }
.mp-check small { color: var(--mp-muted); }
.mp-report-quote { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid var(--mp-danger); border-radius: 10px; background: var(--mp-surface-2); font-size: 14px; }

.mp-verify .mp-verify-hero { width: 92px; height: 92px; margin: 8px auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--mp-primary-soft); color: var(--mp-primary); }
.mp-verify .mp-verify-hero svg { width: 46px; height: 46px; }
.mp-verify .mp-verify-hero.is-ok { background: rgba(34, 197, 94, .14); color: #16A34A; }
.mp-verify .mp-verify-hero.is-bad { background: rgba(229, 72, 77, .12); color: var(--mp-danger); }
.mp-verify-h { text-align: center; font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 10px; }
.mp-verify-how { margin-top: 14px; padding: 14px 16px; border-radius: 18px; background: var(--mp-surface); box-shadow: var(--mp-shadow-1); font-size: 14px; }
.mp-verify-how ol { margin: 6px 0 10px; padding-left: 20px; }
.mp-pose { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; background: var(--mp-grad); color: #fff; font-weight: 700; font-size: 16px; line-height: 1.3; }
.mp-pose.is-small { font-size: 14px; padding: 8px 14px; }
.mp-pose-emoji { font-size: 34px; line-height: 1; flex: none; }
.mp-pose.is-small .mp-pose-emoji { font-size: 24px; }
.mp-cam { position: relative; margin-top: 12px; aspect-ratio: 3 / 4; max-height: 60dvh; margin-left: auto; margin-right: auto; border-radius: 24px; overflow: hidden; background: #111; }
.mp-cam video, .mp-cam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mp-cam video { transform: scaleX(-1); } /* mirror like a real mirror; the photo itself is not mirrored */
.mp-cam-oval { position: absolute; left: 14%; right: 14%; top: 10%; bottom: 18%; border: 3px dashed rgba(255, 255, 255, .75); border-radius: 50%; pointer-events: none; }
.mp-cam-msg { position: absolute; left: 16px; right: 16px; bottom: 16px; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 14px; text-align: center; }
.mp-cam-msg[hidden] { display: none; }
.mp-shutter { display: block; width: 74px; height: 74px; margin: 14px auto 4px; border-radius: 50%; border: 5px solid var(--mp-primary); background: #fff; box-shadow: 0 0 0 4px var(--mp-primary-soft); }
.mp-shutter:disabled { opacity: .4; }
.mp-shutter:active { transform: scale(.94); }

.mp-meet { margin: 0 2px 8px; }
.mp-chat .mp-meet[hidden] { display: none !important; }
.mp-meet-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--mp-surface); box-shadow: var(--mp-shadow-1); font-size: 13.5px; line-height: 1.4; }
.mp-meet-card.is-ask { outline: 2px solid var(--mp-primary); background: var(--mp-primary-soft); }
.mp-meet-card b { display: block; font-size: 14.5px; }
.mp-meet-card span { color: var(--mp-muted); }
.mp-meet-emoji { font-size: 28px; line-height: 1; flex: none; color: inherit !important; }
.mp-meet-actions { display: flex; gap: 8px; margin-top: 8px; }
.mp-req { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--mp-border); font-size: 14.5px; color: var(--mp-muted); }
.mp-req svg { width: 20px; height: 20px; flex: none; }
.mp-req.is-ok { color: var(--mp-text); }
.mp-req.is-ok svg { color: #16A34A; }
.mp-tips .mp-feature { margin-bottom: 10px; }
.mp-notice-card { text-align: center; padding: 6px 4px 4px; }
.mp-notice-card > svg { width: 54px; height: 54px; padding: 12px; border-radius: 50%; background: var(--mp-primary-soft); color: var(--mp-primary); }
.mp-notice-card.is-verified > svg { background: rgba(34, 197, 94, .14); color: #16A34A; }
.mp-notice-card.is-warning > svg, .mp-notice-card.is-suspended > svg, .mp-notice-card.is-photo_removed > svg { background: rgba(229, 72, 77, .12); color: var(--mp-danger); }
.mp-notice-card h3 { margin: 12px 0 6px; font-size: 19px; font-weight: 800; }
.mp-notice-card p { color: var(--mp-muted); margin-bottom: 16px; }
.mp-req-join { margin: -2px 0 -2px 30px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--mp-faint); }

/* ── Phase 8: notification ask + settings ── */
/* The install / offline / update banners style themselves (lib/pwa.js), so they look right even mid-update. */
.mp-ask { text-align: center; }
.mp-ask-ic { width: 64px; height: 64px; margin: 4px auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--mp-primary-soft); color: var(--mp-primary); }
.mp-ask-ic svg { width: 30px; height: 30px; }
.mp-ask p { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.mp-ask-list { list-style: none; padding: 0; margin: 0 0 16px; text-align: left; font-size: 14px; color: var(--mp-muted); }
.mp-ask-list li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.mp-ask-list svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--mp-online); }
.mp-steps { padding-left: 20px; margin-bottom: 12px; }
.mp-steps li { padding: 4px 0; }
.mp-ios-share { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--mp-surface-2); font-size: 13px; }
.mp-push-status { display: flex; align-items: center; gap: 12px; }
.mp-push-status.is-on .mp-row-icon { color: var(--mp-online); }
.mp-push-status.is-blocked .mp-row-icon { color: var(--mp-danger); }
.mp-quiet-row select { flex: none; }
html.is-offline .mp-credit-pill { opacity: .6; }
