:root {
  --accent: #ff4d6d;
  --accent-strong: #ff335d;
  --gold: #ffc857;
  --brand-top: #ffd85a;
  --brand-mid: #ffc93a;
  --brand-bottom: #ffc12d;
  --brand-text: #684519;
  --bg: #0a0a0d;
  --surface: #141419;
  --surface-2: #1b1b22;
  --surface-3: #24242c;
  --line: rgba(255,255,255,.09);
  --text: #f8f8fa;
  --muted: #a4a4ad;
  --muted-2: #777781;
  --danger: #ff5364;
  --success: #36d982;
  --warning: #ffca4d;
  --nav-h: 70px;
  --sidebar-w: 250px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 18px 54px rgba(0,0,0,.32);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 15% -10%, rgba(255,77,109,.11), transparent 32rem),
    radial-gradient(circle at 100% 10%, rgba(255,200,87,.07), transparent 28rem),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

#app { min-height: 100vh; min-height: 100dvh; }

/* Brand / auth */
.brand-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(18px, var(--safe-top)) 18px max(18px, var(--safe-bottom));
  background: linear-gradient(145deg, var(--brand-top) 0%, var(--brand-mid) 52%, var(--brand-bottom) 100%);
  color: var(--brand-text);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.brand-page.has-admin-cover {
  background:
    linear-gradient(145deg, rgba(255,216,90,.86) 0%, rgba(255,201,58,.88) 52%, rgba(255,193,45,.91) 100%),
    var(--fopiro-cover) center / cover no-repeat;
}
.brand-page::before,
.brand-page::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.23);
  pointer-events: none;
}
.brand-page::before { width: 36rem; height: 36rem; left: -18rem; top: -15rem; }
.brand-page::after { width: 28rem; height: 28rem; right: -14rem; bottom: -14rem; }
.auth-shell { width: min(100%, 480px); position: relative; z-index: 1; }
.brand-hero { text-align: center; margin-bottom: 28px; }
.brand-mark {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  object-fit: cover;
  margin: 0 auto 12px;
  box-shadow: 0 14px 32px rgba(104,69,25,.16);
}
.brand-name { font-size: clamp(38px, 10vw, 58px); font-weight: 950; line-height: .95; letter-spacing: -2.5px; }
.brand-tagline { margin: 10px auto 0; max-width: 28rem; font-weight: 750; opacity: .78; }
.auth-card {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 24px 70px rgba(104,69,25,.18);
  color: #33240f;
}
.auth-title { margin: 0 0 6px; font-size: 28px; font-weight: 950; letter-spacing: -.5px; }
.auth-subtitle { margin: 0 0 22px; color: #725b3e; line-height: 1.45; }
.auth-actions { display: grid; gap: 11px; }
.brand-footer { text-align: center; font-size: 12px; font-weight: 750; opacity: .68; margin-top: 18px; }
.auth-back {
  position: absolute; top: 10px; left: 10px; z-index: 4;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.28); color: var(--brand-text); cursor: pointer;
}
.lang-switch {
  position: absolute; top: max(14px, var(--safe-top)); right: 16px; z-index: 4;
  display: flex; gap: 6px; padding: 5px; border-radius: 999px;
  background: rgba(255,255,255,.24); backdrop-filter: blur(10px);
}
.lang-switch button { border: 0; background: transparent; color: var(--brand-text); font-weight: 900; padding: 7px 10px; border-radius: 999px; cursor: pointer; }
.lang-switch button.active { background: rgba(255,255,255,.78); }

/* Form controls */
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 850; color: inherit; }
.field small { color: var(--muted); line-height: 1.35; }
.auth-card .field small { color: #7d684a; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; color: #33240f; min-height: 50px; padding: 12px 14px;
  outline: none; transition: .18s border-color, .18s box-shadow, .18s background;
}
.app-main .input, .app-main .select, .app-main .textarea,
.modal .input, .modal .select, .modal .textarea {
  background: var(--surface-2); color: var(--text); border-color: var(--line);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,77,109,.13); }
.textarea { min-height: 108px; resize: vertical; }
.input[disabled], .select[disabled] { opacity: .58; cursor: not-allowed; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid .field { margin: 0; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span {
  display: inline-flex; align-items: center; min-height: 38px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 750;
}
.check-chip input:checked + span { color: #fff; border-color: rgba(255,77,109,.55); background: rgba(255,77,109,.19); }

.btn {
  min-height: 46px; border: 0; border-radius: 14px; padding: 11px 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 900; cursor: pointer; transition: transform .12s, filter .12s, background .12s;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-strong)); box-shadow: 0 9px 24px rgba(255,77,109,.2); }
.btn-gold { color: #382608; background: linear-gradient(135deg, #ffd96d, #ffc13d); }
.btn-dark { color: var(--text); background: var(--surface-2); border: 1px solid var(--line); }
.btn-light { color: #33240f; background: #fff; }
.btn-ghost { color: inherit; background: transparent; border: 1px solid currentColor; }
.btn-danger { background: rgba(255,83,100,.13); color: #ff7b89; border: 1px solid rgba(255,83,100,.26); }
.btn-block { width: 100%; }
.icon-btn {
  width: 44px; height: 44px; min-width: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); display: inline-grid; place-items: center; cursor: pointer;
}
.icon-btn.primary { background: var(--accent); border-color: var(--accent); }
.icon-btn.gold { background: var(--gold); border-color: var(--gold); color: #3b2908; }
.link-btn { border: 0; background: none; color: var(--accent); font-weight: 850; cursor: pointer; padding: 5px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* App shell */
.app-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0,1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 14px; border-right: 1px solid var(--line);
  background: rgba(12,12,16,.92); backdrop-filter: blur(18px); z-index: 30;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 2px 10px 22px; }
.sidebar-brand img { width: 42px; height: 42px; border-radius: 13px; }
.sidebar-brand strong { font-size: 23px; letter-spacing: -1px; }
.nav-list { display: grid; gap: 6px; }
.nav-item {
  width: 100%; min-height: 48px; border: 0; border-radius: 14px; padding: 10px 12px;
  background: transparent; color: var(--muted); display: flex; align-items: center; gap: 12px;
  font-weight: 800; cursor: pointer; text-align: left;
}
.nav-item .mi { font-size: 23px; }
.nav-item.active { background: rgba(255,77,109,.13); color: #fff; }
.nav-item.active .mi { color: var(--accent); }
.nav-badge { margin-left: auto; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 10px; }
.sidebar-bottom { position: absolute; left: 14px; right: 14px; bottom: 22px; display: grid; gap: 8px; }
.mini-user { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 15px; background: var(--surface); }
.avatar-sm { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.avatar-md { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.app-main { min-width: 0; padding-bottom: 28px; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 70px; display: flex; align-items: center; gap: 12px;
  padding: 0 clamp(16px, 3vw, 36px); border-bottom: 1px solid var(--line);
  background: rgba(10,10,13,.84); backdrop-filter: blur(18px);
}
.topbar-title { min-width: 0; flex: 1; }
.topbar-title h1 { margin: 0; font-size: clamp(20px, 3vw, 27px); letter-spacing: -.5px; }
.topbar-title p { margin: 2px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content { width: min(100%, 1240px); margin: 0 auto; padding: 22px clamp(14px, 3vw, 36px) 40px; }
.mobile-nav { display: none; }

/* Generic cards / state */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 34px rgba(0,0,0,.12); }
.card-pad { padding: 18px; }
.section-title { margin: 0 0 14px; font-size: 18px; font-weight: 950; letter-spacing: -.2px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.empty-state { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty-state .mi { display: block; font-size: 64px; color: rgba(255,255,255,.17); margin-bottom: 12px; }
.loading { min-height: 260px; display: grid; place-items: center; }
.loader-ring { width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgba(255,255,255,.12); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--muted); font-size: 11px; font-weight: 800; }
.status-pill.online { color: #7df0ab; background: rgba(54,217,130,.11); }
.status-pill.gold { color: var(--gold); background: rgba(255,200,87,.12); }
.status-pill.verified { color: #70bdff; background: rgba(83,166,255,.12); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); display: inline-block; }
.dot.online { background: #52e797; box-shadow: 0 0 0 3px rgba(82,231,151,.11); }

/* Discovery */
.filters-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filters-bar .input, .filters-bar .select { width: auto; min-width: 130px; min-height: 42px; padding: 8px 11px; }
.profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.profile-card {
  min-height: 430px; border-radius: 24px; overflow: hidden; position: relative; isolation: isolate;
  background: var(--surface-2); border: 1px solid var(--line); cursor: pointer;
}
.profile-card-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--surface-3); }
.profile-card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,.16) 48%, rgba(0,0,0,.93) 100%); pointer-events: none; }
.profile-card-top { position: absolute; z-index: 2; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; gap: 8px; }
.score-chip { background: rgba(15,15,18,.72); backdrop-filter: blur(8px); color: #fff; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.profile-card-info { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 14px; }
.profile-name { margin: 0; font-size: 22px; font-weight: 950; letter-spacing: -.35px; }
.profile-location { margin-top: 4px; font-size: 12px; color: rgba(255,255,255,.72); }
.profile-actions { display: flex; gap: 9px; margin-top: 13px; }
.profile-actions .btn { flex: 1; min-height: 42px; padding: 8px 10px; }
.photo-placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(145deg, #24242d, #141419); color: rgba(255,255,255,.2); }
.photo-placeholder .mi { font-size: 80px; }

/* Lists */
.list { display: grid; gap: 10px; }
.list-item { display: flex; gap: 13px; align-items: center; padding: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; cursor: pointer; min-width: 0; }
.list-item:hover { background: var(--surface-2); }
.list-item.locked { overflow: hidden; position: relative; }
.blur { filter: blur(8px); user-select: none; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.count-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); font-size: 11px; font-weight: 900; }

/* Public profile */
.profile-hero { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.gallery { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.gallery .gallery-main { grid-column: 1 / -1; aspect-ratio: 4 / 5; }
.gallery img { width: 100%; height: 100%; min-height: 130px; object-fit: cover; border-radius: 17px; background: var(--surface-2); }
.profile-info-card { padding: 22px; }
.profile-info-card h2 { font-size: 30px; margin: 0 0 6px; letter-spacing: -.6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 750; }
.info-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.info-box { padding: 12px; border-radius: 14px; background: var(--surface-2); }
.info-box small { display: block; color: var(--muted); margin-bottom: 5px; }
.info-box strong { display: block; word-break: break-word; }

/* Chat */
.chat-layout { width: min(100%, 980px); height: calc(100dvh - 116px); min-height: 520px; margin: 0 auto; display: grid; grid-template-rows: auto 1fr auto; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--surface); }
.chat-head { padding: 11px 14px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); background: rgba(20,20,25,.96); }
.chat-messages { overflow-y: auto; padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; scroll-behavior: smooth; }
.date-separator { align-self: center; margin: 12px 0 8px; padding: 6px 10px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 850; }
.bubble-row { display: flex; flex-direction: column; max-width: min(78%, 620px); }
.bubble-row.mine { align-self: flex-end; align-items: flex-end; }
.bubble-row.theirs { align-self: flex-start; align-items: flex-start; }
.bubble { padding: 10px 12px; border-radius: 17px; background: var(--surface-3); line-height: 1.38; overflow-wrap: anywhere; }
.bubble-row.mine .bubble { background: linear-gradient(135deg, #fe5271, #f33f62); color: #fff; border-bottom-right-radius: 5px; }
.bubble-row.theirs .bubble { border-bottom-left-radius: 5px; }
.message-meta { margin: 3px 5px 2px; color: var(--muted-2); font-size: 10px; }
.message-meta-line { display: flex; align-items: center; gap: 3px; min-height: 23px; }
.bubble-row.mine .message-meta-line { justify-content: flex-end; }
.message-action-btn { width: 25px; height: 25px; border: 0; border-radius: 50%; background: transparent; color: var(--muted-2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.message-action-btn:hover { color: #fff; background: rgba(255,255,255,.07); }
.message-action-btn .mi { font-size: 17px; }
.message-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -3px; padding: 0 4px; }
.bubble-row.mine .message-reactions { justify-content: flex-end; }
.reaction-pill { padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; background: #18181e; font-size: 12px; line-height: 1.2; }
.reaction-pill.selected { border-color: rgba(255,77,109,.65); background: rgba(255,77,109,.12); }
.reaction-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.reaction-choice { min-width: 48px; height: 48px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); font-size: 23px; cursor: pointer; }
.reaction-choice:hover, .reaction-choice.selected { border-color: var(--accent); background: rgba(255,77,109,.14); transform: translateY(-1px); }
.message-action-list { display: grid; gap: 9px; }
.deleted-message { display: inline-flex; align-items: center; gap: 6px; font-style: italic; opacity: .72; }
.deleted-message .mi { font-size: 17px; }
.bubble-photo { width: min(330px, 62vw); max-height: 440px; object-fit: cover; border-radius: 13px; cursor: pointer; }
.bubble audio { max-width: min(300px, 65vw); }
.chat-composer { padding: 10px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; gap: 8px; background: rgba(20,20,25,.98); align-items: end; }
.chat-composer textarea { min-height: 44px; max-height: 130px; resize: none; border-radius: 19px; padding: 11px 13px; }
.attach-pop { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; padding-top: 4px; }

/* Profile settings / plans */
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.setting-row { padding: 14px 0; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.toggle { position: relative; width: 48px; height: 28px; flex: 0 0 auto; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: #34343c; border-radius: 999px; transition: .2s; cursor: pointer; }
.toggle span::after { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::after { transform: translateX(20px); }
.plans-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.plan-card { padding: 20px; position: relative; overflow: hidden; }
.plan-card.gold-plan { border-color: rgba(255,200,87,.34); }
.plan-price { font-size: 30px; font-weight: 950; color: var(--gold); margin: 10px 0 14px; }
.plan-features { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; color: var(--muted); }
.plan-features li::before { content: "✓"; color: var(--accent); font-weight: 950; margin-right: 8px; }

/* Photos editor */
.photo-editor { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.photo-slot { aspect-ratio: 1 / 1.15; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); position: relative; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot-actions { position: absolute; left: 5px; right: 5px; bottom: 5px; display: flex; gap: 5px; }
.photo-slot-actions button { flex: 1; min-height: 32px; border: 0; border-radius: 9px; background: rgba(0,0,0,.7); color: #fff; font-size: 10px; font-weight: 850; cursor: pointer; }
.add-photo { display: grid; place-items: center; text-align: center; color: var(--muted); cursor: pointer; padding: 10px; }

/* Modal/toasts */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.7); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; }
.modal { width: min(100%, 520px); max-height: min(90dvh, 760px); overflow-y: auto; background: #15151b; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 20px; }
.modal h3 { margin: 0 0 8px; font-size: 23px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; flex-wrap: wrap; }
#toasts { position: fixed; z-index: 400; right: 16px; bottom: 18px; display: grid; gap: 8px; width: min(92vw, 390px); pointer-events: none; }
.toast { background: #24242c; color: #fff; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 13px; padding: 12px 14px; box-shadow: var(--shadow); animation: toastin .18s ease-out; pointer-events: auto; }
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }
@keyframes toastin { from { transform: translateY(10px); opacity: 0; } }

/* Payment result */
.payment-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 50% -10%, rgba(255,200,87,.12), transparent 38rem), var(--bg); }
.payment-card { width: min(100%, 520px); padding: 28px; text-align: center; }
.payment-card .brand-mark { width: 70px; height: 70px; border-radius: 20px; }
.result-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 20px auto; font-size: 42px; background: var(--surface-2); }
.result-icon.success { color: var(--success); background: rgba(54,217,130,.12); }
.result-icon.fail { color: var(--danger); background: rgba(255,83,100,.12); }

/* Configuration warning */
.config-banner { margin: 10px 0 18px; padding: 13px; border-radius: 13px; border: 1px solid rgba(255,200,87,.3); background: rgba(255,200,87,.08); color: #ffe09a; font-size: 12px; line-height: 1.5; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 1040px) {
  .profile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-hero { grid-template-columns: minmax(250px,.8fr) minmax(0,1.2fr); }
}

@media (max-width: 820px) {
  :root { --nav-h: 68px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .app-main { padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 10px); }
  .topbar { height: 62px; padding: 0 14px; top: 0; }
  .topbar-title p { display: none; }
  .content { padding: 14px 12px 28px; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(6,1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    min-height: calc(var(--nav-h) + var(--safe-bottom)); padding: 6px 3px calc(5px + var(--safe-bottom));
    background: rgba(15,15,19,.96); border-top: 1px solid var(--line); backdrop-filter: blur(20px);
  }
  .mobile-nav .nav-item { min-width: 0; min-height: 54px; padding: 5px 2px; border-radius: 12px; display: grid; place-items: center; gap: 1px; font-size: 9px; position: relative; }
  .mobile-nav .nav-item .mi { font-size: 22px; }
  .mobile-nav .nav-item span.label { display: none; }
  .mobile-nav .nav-item.active span.label { display: block; }
  .mobile-nav .nav-badge { position: absolute; top: 1px; right: calc(50% - 23px); margin: 0; }
  .profile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .profile-card { min-height: 330px; border-radius: 19px; }
  .profile-name { font-size: 17px; }
  .profile-actions { gap: 5px; }
  .profile-actions .btn { min-height: 37px; font-size: 11px; padding: 6px; }
  .profile-hero { display: block; }
  .profile-info-card { margin-top: 12px; padding: 17px; }
  .settings-grid, .plans-grid { grid-template-columns: 1fr; }
  .photo-editor { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .chat-layout { height: calc(100dvh - 89px - var(--nav-h) - var(--safe-bottom)); min-height: 420px; border-radius: 16px; }
}

@media (max-width: 520px) {
  .brand-page { padding-left: 14px; padding-right: 14px; }
  .auth-card { border-radius: 23px; padding: 18px; }
  .brand-mark { width: 82px; height: 82px; border-radius: 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-card { min-height: min(66vh, 520px); }
  .filters-bar { gap: 6px; }
  .filters-bar .input, .filters-bar .select { flex: 1 1 45%; min-width: 0; }
  .gallery { grid-template-columns: repeat(3,1fr); }
  .gallery .gallery-main { grid-column: 1 / -1; aspect-ratio: 4 / 5; }
  .gallery img:not(.gallery-main) { min-height: 100px; }
  .info-grid { grid-template-columns: 1fr; }
  .photo-editor { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bubble-row { max-width: 88%; }
  .chat-composer { grid-template-columns: auto 1fr auto; padding: 8px; }
  .modal { padding: 17px; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
.photo-bg { background-size: cover; background-position: center; background-repeat: no-repeat; display: grid; place-items: center; overflow: hidden; }
.photo-fallback, .photo-bg > .material-symbols-rounded { color: rgba(255,255,255,.22); }


/* FOPIRO WEB COMPLET 2026-09-18 */
.registration-section { margin-bottom: 12px; }
.discover-filters-card { margin-bottom: 4px; }
.discover-filter-grid { align-items: end; }
.discover-toggle-row { gap: 10px; margin-top: 12px; }
.discover-filters-card input[type="range"] { accent-color: #ff4d6d; }
@media (max-width: 760px) {
  .discover-filter-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .discover-filter-grid { grid-template-columns: 1fr; }
  .registration-section { padding: 16px; }
}

/* FOPIRO WEB LANGUAGES + COMPACT DISCOVERY FILTERS 2026-09-19 */
.lang-switch {
  align-items: center;
  gap: 7px;
  color: var(--brand-text);
}
.lang-switch .material-symbols-rounded { font-size: 19px; }
.lang-switch select {
  appearance: none;
  border: 0;
  outline: 0;
  background: rgba(255,255,255,.78);
  color: #33240f;
  border-radius: 999px;
  min-height: 34px;
  max-width: 150px;
  padding: 6px 28px 6px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.topbar .lang-switch {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  backdrop-filter: none;
  color: var(--text);
  flex: 0 0 auto;
}
.topbar .lang-switch select {
  background: transparent;
  color: var(--text);
  max-width: 126px;
  padding-right: 8px;
}
.topbar .lang-switch select option { color: #111; background: #fff; }

.discover-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 12px;
}
.discover-filter-button {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
}
.discover-filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 2px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}
.discover-filters-card {
  display: none;
  margin: 0 0 16px;
  transform-origin: top center;
}
.discover-filters-card.is-open {
  display: block;
  animation: fopiroFilterOpen .16s ease-out;
}
@keyframes fopiroFilterOpen {
  from { opacity: 0; transform: translateY(-6px) scale(.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.discover-filter-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.discover-filter-actions .btn { min-width: 150px; }
#discover-grid { margin-top: 0; }

html[dir="rtl"] .nav-item { text-align: right; }
html[dir="rtl"] .nav-badge { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .sidebar { border-right: 0; border-left: 1px solid var(--line); }
html[dir="rtl"] .discover-toolbar { justify-content: flex-start; }
html[dir="rtl"] .topbar-title { text-align: right; }

@media (max-width: 760px) {
  .topbar .lang-switch { max-width: 122px; }
  .topbar .lang-switch .material-symbols-rounded { display: none; }
  .topbar .lang-switch select { max-width: 112px; font-size: 11px; }
  .discover-toolbar { justify-content: flex-start; }
  .discover-filter-button { width: auto; }
}

@media (max-width: 520px) {
  .lang-switch { right: 10px; }
  .lang-switch select { max-width: 122px; }
  .topbar { gap: 8px; }
  .topbar-title p { display: none; }
  .topbar .lang-switch { max-width: 92px; }
  .topbar .lang-switch select { max-width: 84px; padding-left: 7px; padding-right: 7px; }
  .discover-filter-actions .btn { width: 100%; }
}

/* Legal clickwrap: 18+ + Terms of Use */
.fopiro-adult-check{display:flex;align-items:flex-start;gap:10px;padding:12px 13px;border:1px solid rgba(255,255,255,.14);border-radius:14px;background:rgba(255,255,255,.035);font-size:.9rem;line-height:1.4;color:rgba(255,255,255,.82)}
.fopiro-adult-check input{margin-top:3px;accent-color:#ff3f6c;flex:0 0 auto}
.fopiro-adult-check a{color:#ff7898;font-weight:800;text-decoration:underline;text-underline-offset:2px}
.fopiro-adult-check a:hover{color:#ff9ab1}


/* ============================================================
   FOPIRO WEB PARITY 2026-09-28
   Mobile-first, albums prives, voice, reply/pin, compact discover
   ============================================================ */
.private-album-card{margin-top:16px;padding:12px 13px;border:1px solid rgba(255,200,87,.25);border-radius:16px;background:rgba(255,200,87,.06);display:flex;align-items:center;justify-content:space-between;gap:12px}
.private-album-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.private-album-grid img{width:100%;aspect-ratio:1/1.2;object-fit:cover;border-radius:15px;background:var(--surface-2)}
.pinned-message-bar{padding:9px 12px;border-bottom:1px solid var(--line);background:rgba(255,200,87,.08);display:flex;align-items:center;gap:10px}.pinned-message-bar.hidden{display:none}.pinned-message-bar .tiny{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:70vw}
.reply-compose{padding:8px 12px;border-top:1px solid var(--line);background:rgba(255,255,255,.035);display:flex;align-items:center;gap:10px}.reply-compose.hidden{display:none}.reply-compose .tiny{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:70vw}
.reply-quote{margin:-2px -2px 8px;padding:7px 9px;border-left:3px solid rgba(255,255,255,.55);border-radius:8px;background:rgba(0,0,0,.16);font-size:11px;opacity:.9}
.quick-emoji-row{padding:6px 10px 0;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}.quick-emoji-row::-webkit-scrollbar{display:none}.quick-emoji-row button{flex:0 0 auto;width:34px;height:30px;border:1px solid var(--line);border-radius:999px;background:var(--surface-2);cursor:pointer;font-size:17px}
.voice-recording{margin:5px 10px 7px;padding:9px 10px;border:1px solid rgba(255,77,109,.25);border-radius:14px;background:rgba(255,77,109,.08);display:flex;align-items:center;gap:9px}.voice-recording.hidden{display:none}.voice-recording .btn{min-height:34px;padding:6px 10px;margin-left:auto}.recording-dot{width:9px;height:9px;border-radius:50%;background:#ff496b;box-shadow:0 0 0 5px rgba(255,73,107,.11);animation:fopiroPulse 1.1s infinite}.icon-btn.recording{color:#ff496b;background:rgba(255,73,107,.12)}
@keyframes fopiroPulse{50%{transform:scale(.72);opacity:.55}}

@media(max-width:520px){
  .content{padding:8px 7px 20px}
  #discover-grid.profile-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  #discover-grid .profile-card{min-height:158px;border-radius:15px}
  #discover-grid .profile-card-top{left:6px;right:6px;top:6px;gap:3px}
  #discover-grid .score-chip{font-size:8px;padding:4px 5px}
  #discover-grid .status-pill{font-size:0;padding:4px;background:rgba(15,15,18,.68)}
  #discover-grid .status-pill .dot{width:7px;height:7px}
  #discover-grid .profile-card-info{left:8px;right:8px;bottom:8px}
  #discover-grid .profile-name{font-size:13px;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #discover-grid .profile-location{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}
  #discover-grid .profile-actions{margin-top:6px;gap:5px}
  #discover-grid .profile-actions .btn{min-height:30px;height:30px;padding:3px;border-radius:9px;font-size:0}
  #discover-grid .profile-actions .mi{font-size:17px}
  #discover-grid .profile-action-label{display:none}
  .discover-toolbar{margin-bottom:7px}
  .discover-filter-button{min-height:38px;padding:7px 11px}
  .chat-layout{height:calc(100dvh - 75px - var(--nav-h) - var(--safe-bottom));border-radius:0;border-left:0;border-right:0}
  .chat-composer{grid-template-columns:auto auto 1fr auto;gap:5px;padding:7px}
  .chat-composer .icon-btn{width:36px;height:36px}
  .private-album-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:521px) and (max-width:820px){#discover-grid.profile-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}#discover-grid .profile-card{min-height:240px}}
