/* ══════════════════════════════════════════════════════════════════
   FF LOVER — style.css
   Global design tokens, base styles, shared components
══════════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ─────────────────────────────────────────────── */
:root {
  /* Background */
  --bg:    #06111f;
  --bg-1:  #08182b;
  --bg-2:  #0d2440;
  --bg-3:  rgba(255,255,255,0.04);

  /* Text */
  --t-1:   #FFFFFF;
  --t-2:   rgba(255,255,255,0.72);
  --t-3:   rgba(255,255,255,0.45);
  --t-4:   rgba(255,255,255,0.28);

  /* Borders */
  --b-1:   rgba(255,255,255,0.07);
  --b-2:   rgba(255,255,255,0.12);
  --b-3:   rgba(255,255,255,0.22);
  --b-4:   rgba(255,255,255,0.38);

  /* Brand (violet/magenta) */
  --v:     #1f8fff;
  --v-dk:  #1069c9;
  --v-lt:  #66b8ff;
  --v-bg:  rgba(31,143,255,0.14);
  --v-bdr: rgba(31,143,255,0.35);

  /* Status */
  --ok:    #22C55E;
  --err:   #EF4444;
  --warn:  #F59E0B;

  /* Roles */
  --fister: #4da3ff;
  --vers:   #86b8ff;
  --fistee: #7ec8ff;

  /* Layout */
  --font:    -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --tab-h:   64px;
  --nav-h:   56px;
  --radius:  12px;
  --radius-lg: 20px;
}

/* ── RESET & BASE ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--t-1);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

body {
  background: var(--bg);
  color: var(--t-1);
  font-family: var(--font);
  min-height: 100vh;
  min-height: 100dvh;
}

a { color: inherit; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }
img { display: block; max-width: 100%; }

/* ── UTILITIES ─────────────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ── SPINNER ───────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.12);
  border-top-color: var(--v);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

.spinner-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.spinner-page::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 2.5px solid rgba(255,255,255,0.10);
  border-top-color: var(--v);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* ── SHELL ─────────────────────────────────────────────────────── */
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── TOP NAV ───────────────────────────────────────────────────── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(10,2,26,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--b-1);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.top-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.top-nav-wordmark { font-size: 16px; font-weight: 900; letter-spacing: -.02em; }
.top-nav-brand svg { width: 32px; height: 32px; flex-shrink: 0; }
.top-nav-brand .top-nav-wordmark { font-weight: 900; font-size: 17px; letter-spacing: -.02em; }

.top-nav-links {
  display: none;
  align-items: center;
  gap: 4px;
  flex: 1;
  margin-left: 12px;
}
@media(min-width:768px) { .top-nav-links { display: flex; } }

.top-nav-link {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--t-3);
  text-decoration: none;
  border-radius: 8px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.top-nav-link:hover, .top-nav-link.active { color: var(--t-1); background: var(--bg-3); }

.top-nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.top-nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1.5px solid var(--b-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--t-2);
  text-decoration: none;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: border-color .15s;
}
.top-nav-avatar:hover { border-color: var(--b-3); }

/* ── HAMBURGER ─────────────────────────────────────────────────── */
.hamburger {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--t-2);
  border-radius: 2px;
  transition: all .2s;
}
@media(min-width:768px) { .hamburger { display: none; } }

/* ── PAGE HEADER (back button pages) ──────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--b-1);
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(10,2,26,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.ph-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--b-2);
  border-radius: 50%;
  color: var(--t-2);
  text-decoration: none;
  transition: border-color .15s, color .15s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.ph-back:hover { border-color: var(--b-3); color: var(--t-1); }
.ph-title { flex: 1; font-size: 16px; font-weight: 800; color: var(--t-1); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-action { min-height: 40px; padding: 0 16px; border: 1px solid rgba(31,143,255,.38); border-radius: 999px; background: rgba(196,30,106,.16); color: #fff; font-size: 13px; font-weight: 800; text-decoration: none; -webkit-tap-highlight-color: transparent; display:inline-flex; align-items:center; justify-content:center; }
.ph-action:hover{ background: rgba(196,30,106,.24); border-color: rgba(31,143,255,.54); }
.ph-action:disabled{ opacity:.6; cursor:not-allowed; }

/* ── BOTTOM TABS ───────────────────────────────────────────────── */
.bottom-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--tab-h);
  background: rgba(10,2,26,0.97);
  border-top: 1px solid var(--b-1);
  display: flex;
  align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--t-4);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 8px 4px;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  min-height: var(--tab-h);
}
.tab-item:hover, .tab-item.active { color: var(--v); }

.tab-label { font-size: 10px; font-weight: 600; letter-spacing: .02em; }

.tab-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 14px);
  min-width: 16px;
  height: 16px;
  background: var(--err);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
}

/* ── NAV DRAWER (complete) ──────────────────────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0);
  z-index: 199; pointer-events: none;
  transition: background .25s;
}
.drawer-overlay.show { background: rgba(0,0,0,0.65); pointer-events: all; }

.nav-drawer {
  position: fixed; top: 0; left: -288px; bottom: 0; width: 288px;
  background: #0F0622;
  border-right: 1px solid var(--b-1);
  z-index: 200;
  transition: left .25s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; overflow: hidden;
}
.nav-drawer.open { left: 0; }

/* Drawer header */
.drawer-head {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--b-1);
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}
.drawer-user-av {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-2); border: 1.5px solid var(--b-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: var(--t-2);
  flex-shrink: 0; position: relative; overflow: hidden;
}
.drawer-user-name { font-size: 15px; font-weight: 800; color: var(--t-1); }
.drawer-user-role { font-size: 12px; color: var(--t-3); margin-top: 1px; }

/* Drawer nav list */
.drawer-nav {
  flex: 1; overflow-y: auto; padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}
.drawer-nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  font-size: 14px; font-weight: 600;
  color: var(--t-2); text-decoration: none;
  transition: background .12s, color .12s;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer; border: none; background: none;
  width: 100%; text-align: left; font-family: var(--font);
}
.drawer-nav-item:hover { background: rgba(255,255,255,0.04); color: var(--t-1); }
.drawer-nav-item.active { color: var(--v); background: rgba(196,30,106,0.07); }
.drawer-nav-icon {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; opacity: 0.7;
}
.drawer-nav-item.active .drawer-nav-icon { opacity: 1; }

/* Drawer footer */
.drawer-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--b-1);
  flex-shrink: 0;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.drawer-logout {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 16px;
  background: rgba(196,30,106,0.08);
  border: 1px solid rgba(31,143,255,0.25);
  border-radius: 12px;
  color: var(--v); font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: var(--font);
  text-decoration: none;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.drawer-logout:hover { background: rgba(196,30,106,0.15); }

/* Fallback: simple link-style drawer (for pages using .drawer-link) */
.drawer-link {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  font-size: 14px; font-weight: 600;
  color: var(--t-2); text-decoration: none;
  transition: background .12s, color .12s;
  -webkit-tap-highlight-color: transparent;
  border-left: 3px solid transparent;
}
.drawer-link:hover { background: rgba(255,255,255,0.04); color: var(--t-1); }
.drawer-link.active { color: var(--v); border-left-color: var(--v); background: rgba(196,30,106,0.07); }
.drawer-link-icon { width: 22px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; opacity: .7; }
.drawer-link.active .drawer-link-icon { opacity: 1; }
.drawer-signout { padding: 20px; border-top: 1px solid var(--b-1); margin-top: auto; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.drawer-signout-btn { background: none; border: none; color: var(--t-4); font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer; padding: 8px 0; width: 100%; text-align: left; transition: color .15s; }
.drawer-signout-btn:hover { color: var(--err); }

/* ── BUTTONS ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font);
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--v); border-color: var(--v); color: #fff; }
.btn-primary:hover { background: var(--v-dk); border-color: var(--v-dk); }
.btn-ghost { background: transparent; border-color: var(--b-2); color: var(--t-2); }
.btn-ghost:hover { border-color: var(--b-3); color: var(--t-1); background: var(--bg-3); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 15px 28px; font-size: 15px; }

/* ── INPUTS ────────────────────────────────────────────────────── */
.input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1.5px solid var(--b-2);
  border-radius: var(--radius);
  color: var(--t-1);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
  appearance: none;
}
.input:focus { border-color: var(--v); }
.input::placeholder { color: var(--t-4); }
.input[readonly] { opacity: .6; cursor: default; }

/* ── ROLE BADGES ───────────────────────────────────────────────── */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.role-fister  { background: rgba(66,133,244,0.14); border: 1px solid rgba(66,133,244,0.3); color: #4285F4; }
.role-fistee  { background: rgba(196,30,106,0.14); border: 1px solid rgba(196,30,106,0.3); color: #E040A0; }
.role-vers    { background: rgba(155,89,182,0.14); border: 1px solid rgba(155,89,182,0.3); color: #B86FE8; }

/* ── SECTION LABEL ─────────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--t-4);
  margin-bottom: 14px;
  display: block;
}

/* ── CARD ──────────────────────────────────────────────────────── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--b-1);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* ── EMPTY STATE ───────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
  gap: 10px;
}
.empty-icon { font-size: 36px; margin-bottom: 4px; }
.empty-title { font-size: 16px; font-weight: 800; color: var(--t-1); }
.empty-sub { font-size: 13px; color: var(--t-3); line-height: 1.6; max-width: 280px; }

/* ── PHOTO SLOTS (profile page) ────────────────────────────────── */
.photo-slot {
  aspect-ratio: 1;
  background: var(--bg-2);
  border: 1.5px solid var(--b-2);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  transition: border-color .15s;
}
.photo-slot.clickable { cursor: pointer; }
.photo-slot.clickable:hover { border-color: var(--b-3); }
.photo-slot.has-photo { cursor: pointer; border-color: var(--b-1); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.photo-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.photo-add-icon { opacity: .35; }
.photo-add-lbl { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--t-4); }
.photo-num { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.3); letter-spacing: .06em; }
.photo-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.65); display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding: 10px; opacity: 0; transition: opacity .15s; }
.photo-slot:hover .photo-overlay { opacity: 1; }
.photo-overlay-btn { padding: 6px 12px; font-size: 11px; font-weight: 700; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); color: #fff; border-radius: 8px; cursor: pointer; font-family: var(--font); -webkit-tap-highlight-color: transparent; }
.photo-overlay-btn.del { color: var(--err); border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.12); }
.photo-uploading { position: absolute; inset: 0; background: rgba(0,0,0,0.8); display: none; align-items: center; justify-content: center; }
.photo-uploading.show { display: flex; }

/* ── SECTION ACCORDION ─────────────────────────────────────────── */
.p-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--b-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 10px;
}
.p-section-hd {
  padding: 15px 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  gap: 10px;
}
.p-section-hd:hover { background: rgba(255,255,255,0.02); }
.p-sec-arrow { color: var(--t-4); font-size: 14px; transition: transform .2s; margin-left: auto; }
.p-sec-arrow.open { transform: rotate(180deg); }
.p-sec-body { overflow: hidden; transition: max-height .3s ease; }
.p-sec-body.collapsed { max-height: 0 !important; }

/* ── SEARCH / FILTER CHIPS ─────────────────────────────────────── */
.chip, .f-chip {
  padding: 7px 14px;
  border: 1.5px solid var(--b-2);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t-3);
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
  transition: all .15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.chip:hover, .f-chip:hover { border-color: var(--b-3); color: var(--t-1); }
.chip.active, .f-chip.active { border-color: var(--v-bdr); color: var(--v-lt); background: var(--v-bg); }

/* ── SELECT ────────────────────────────────────────────────────── */
.sel {
  padding: 8px 12px;
  background: var(--bg-2);
  border: 1.5px solid var(--b-2);
  border-radius: var(--radius);
  color: var(--t-2);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.sel:focus { border-color: var(--v); }

/* ── SEARCH WRAP ───────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon { position: absolute; left: 14px; color: var(--t-4); pointer-events: none; flex-shrink: 0; }
.search-input { padding-left: 40px !important; }

/* ── MEMBER / FRIEND CARDS ─────────────────────────────────────── */
.fp-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--b-1);
  text-decoration: none;
  color: inherit;
  transition: background .12s;
  -webkit-tap-highlight-color: transparent;
}
.fp-item:last-child { border-bottom: none; }
.fp-item:hover { background: var(--bg-3); }

.fp-av {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1.5px solid var(--b-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.fp-av img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.fp-online { position: absolute; bottom: 1px; right: 1px; width: 10px; height: 10px; background: var(--ok); border: 2px solid var(--bg); border-radius: 50%; }

.fp-info { flex: 1; min-width: 0; }
.fp-name { font-size: 14px; font-weight: 700; color: var(--t-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-meta { font-size: 12px; color: var(--t-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── CONVERSATION ITEM (chat) ──────────────────────────────────── */
.conv-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--b-1);
  cursor: pointer;
  transition: background .12s;
  -webkit-tap-highlight-color: transparent;
}
.conv-item:hover { background: var(--bg-3); }
.conv-item.active { background: rgba(196,30,106,0.07); border-left: 3px solid var(--v); }

.conv-av { width: 46px; height: 46px; border-radius: 50%; background: var(--bg-2); border: 1.5px solid var(--b-2); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; flex-shrink: 0; position: relative; overflow: hidden; }
.conv-av img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.conv-ol { position: absolute; bottom: 1px; right: 1px; width: 10px; height: 10px; background: var(--ok); border: 2px solid var(--bg); border-radius: 50%; }

.conv-info { flex: 1; min-width: 0; }
.conv-name { font-size: 14px; font-weight: 700; color: var(--t-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-prev { font-size: 12px; color: var(--t-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-unread { min-width: 20px; height: 20px; background: var(--v); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; padding: 0 5px; flex-shrink: 0; }
.conv-time { font-size: 11px; color: var(--t-4); flex-shrink: 0; }

/* ── MESSAGES ──────────────────────────────────────────────────── */
.msg { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 6px; }
.msg.own { flex-direction: row-reverse; }
.msg-bubble { max-width: 72%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5; word-break: break-word; }
.msg.other .msg-bubble { background: var(--bg-2); border: 1px solid var(--b-1); color: var(--t-1); border-bottom-left-radius: 4px; }
.msg.own .msg-bubble { background: var(--v); color: #fff; border-bottom-right-radius: 4px; }
.msg-time { font-size: 10px; color: var(--t-4); flex-shrink: 0; margin-bottom: 4px; }

/* ── MESSAGE INPUT ─────────────────────────────────────────────── */
.msg-bar { display: flex; align-items: flex-end; gap: 10px; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--b-1); background: var(--bg-1); }
.msg-input { flex: 1; min-height: 42px; max-height: 120px; padding: 10px 14px; background: var(--bg-2); border: 1.5px solid var(--b-2); border-radius: 21px; color: var(--t-1); font-size: 15px; font-family: var(--font); resize: none; outline: none; line-height: 1.4; overflow-y: auto; transition: border-color .15s; }
.msg-input:focus { border-color: var(--v); }
.msg-input::placeholder { color: var(--t-4); }
.msg-send { width: 42px; height: 42px; background: var(--v); border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background .15s; -webkit-tap-highlight-color: transparent; }
.msg-send:hover { background: var(--v-dk); }
.msg-send:disabled { opacity: .4; cursor: not-allowed; }

/* ── CITY AC DROPDOWN ──────────────────────────────────────────── */
.city-ac-wrap { position: relative; flex: 1; }
.city-ac-input { width: 100%; }
.city-ac-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #1B0A38; border: 1px solid var(--b-2); border-radius: var(--radius);
  z-index: 200; max-height: 260px; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.city-ac-item { padding: 11px 14px; font-size: 13px; color: var(--t-2); cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: background .1s; }
.city-ac-item:hover { background: rgba(255,255,255,0.05); color: var(--t-1); }

/* ── NOTIFICATION BADGE ────────────────────────────────────────── */
.notif-dot {
  width: 8px; height: 8px; background: var(--err);
  border-radius: 50%; border: 2px solid var(--bg);
  position: absolute; top: 6px; right: 6px;
}

/* ── MODAL OVERLAY ─────────────────────────────────────────────── */
.modal-ov {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75);
  z-index: 500; display: none; align-items: flex-end;
  justify-content: center; padding: 0;
}
.modal-ov.open { display: flex; }
@media(min-width:600px) { .modal-ov { align-items: center; padding: 20px; } }

.modal-card {
  background: #160834; border: 1px solid var(--b-2);
  border-radius: 24px 24px 0 0; width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  padding: 24px 20px; padding-bottom: max(24px, env(safe-area-inset-bottom));
}
@media(min-width:600px) { .modal-card { border-radius: 24px; } }

/* ── TRAVEL CARD ───────────────────────────────────────────────── */
.t-card { background: var(--bg-2); border: 1px solid var(--b-1); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
.t-icon { font-size: 22px; flex-shrink: 0; }
.t-info { flex: 1; min-width: 0; }
.t-city { font-size: 14px; font-weight: 700; color: var(--t-1); }
.t-dates { font-size: 12px; color: var(--t-3); margin-top: 2px; }
.t-vis { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ── TOGGLE SWITCH ─────────────────────────────────────────────── */
.toggle-switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-switch label { position: absolute; inset: 0; background: var(--bg-3); border: 1px solid var(--b-2); border-radius: 13px; cursor: pointer; transition: background .2s; }
.toggle-switch input:checked + label { background: var(--v); border-color: var(--v); }
.toggle-switch label::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: transform .2s; }
.toggle-switch input:checked + label::after { transform: translateX(18px); }

/* ── ONLINE DOT ────────────────────────────────────────────────── */
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }

/* ── SCROLLBAR ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ══════════════════════════════════════════════════════════════
   READABILITY & UI CONSISTENCY IMPROVEMENTS v2
   Larger type, stronger contrast, better tap targets
══════════════════════════════════════════════════════════════ */

/* ── GLOBAL TYPOGRAPHY SCALE ───────────────────────────────── */
body { font-size: 15px; line-height: 1.55; }

/* ── TOP NAV ───────────────────────────────────────────────── */
.top-nav { height: 58px; padding: 0 16px; }
.top-nav-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 2px solid rgba(255,255,255,0.15);
  font-size: 14px; font-weight: 800;
}
.top-nav-link { font-size: 14px; padding: 7px 13px; }

/* ── CONTACT INFO ICON (global top-right) ───────────────────── */
.top-nav-contact-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.65); text-decoration: none;
  transition: all .15s; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.top-nav-contact-btn:hover,
.top-nav-contact-btn.active {
  background: rgba(196,30,106,0.15);
  border-color: rgba(196,30,106,0.4);
  color: #C41E6A;
}

/* ── BOTTOM TABS — larger for older audience ─────────────────── */
.bottom-tabs { height: 68px; }
.tab-item { min-height: 68px; gap: 5px; }
.tab-label { font-size: 11px; font-weight: 700; letter-spacing: .03em; }

/* ── BUTTONS — stronger, more tappable ──────────────────────── */
.btn { padding: 13px 22px; font-size: 14px; min-height: 46px; border-radius: 14px; }
.btn-sm { padding: 9px 16px; font-size: 13px; min-height: 38px; }
.btn-primary { background: #C41E6A; border-color: #C41E6A; letter-spacing: .02em; }

/* ── INPUTS — more legible ───────────────────────────────────── */
.input { padding: 14px 16px; font-size: 15px; border-radius: 14px; border-width: 1.5px; }
.input:focus { border-color: #C41E6A; background: rgba(255,255,255,0.08); }

/* ── ROLE BADGES — slightly larger ──────────────────────────── */
.role-badge { padding: 4px 11px; font-size: 11px; border-radius: 8px; font-weight: 800; }

/* ── CARDS — stronger border & contrast ─────────────────────── */
.card { border-color: rgba(255,255,255,0.1); padding: 20px; }

/* ── SECTION LABEL ───────────────────────────────────────────── */
.section-label { font-size: 12px; font-weight: 800; letter-spacing: .16em; color: rgba(255,255,255,0.42); }

/* ── PROFILE SPECIFIC ────────────────────────────────────────── */
.p-name { font-size: 24px; font-weight: 900; letter-spacing: -.03em; }
.p-about { font-size: 15px; line-height: 1.8; color: rgba(255,255,255,0.75); }
.p-loc { font-size: 14px; color: rgba(255,255,255,0.5); }

/* ── CONVERSATION ITEMS ──────────────────────────────────────── */
.conv-name { font-size: 15px; font-weight: 800; }
.conv-prev { font-size: 13px; }
.conv-item { padding: 15px 16px; min-height: 68px; }

/* ── MEMBER ROWS ─────────────────────────────────────────────── */
.fp-name { font-size: 15px; font-weight: 800; }
.fp-meta { font-size: 13px; }
.fp-item { min-height: 68px; }
.fp-av { width: 50px; height: 50px; }

/* ── FRIEND/FFLOVER REQUESTS BANNER ─────────────────────────── */
.req-banner {
  background: rgba(196,30,106,0.08);
  border: 1px solid rgba(196,30,106,0.2);
  border-radius: 18px; overflow: hidden; margin-bottom: 12px;
}
.req-banner-title {
  font-size: 12px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: #C41E6A;
  padding: 14px 18px 10px;
  border-bottom: 1px solid rgba(196,30,106,0.12);
}
.friend-request {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.friend-request:last-child { border-bottom: none; }
.fr-actions { display: flex; gap: 8px; margin-left: auto; flex-shrink: 0; }
.btn-accept {
  padding: 8px 16px; font-size: 12px; font-weight: 800;
  background: rgba(34,197,94,0.15); border: 1.5px solid rgba(34,197,94,0.35);
  border-radius: 20px; color: #4ade80; cursor: pointer; font-family: var(--font);
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.btn-accept:hover { background: rgba(34,197,94,0.25); }
.btn-decline {
  padding: 8px 14px; font-size: 12px; font-weight: 700;
  background: transparent; border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 20px; color: rgba(255,255,255,0.4); cursor: pointer; font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
.btn-decline:hover { border-color: rgba(239,68,68,0.4); color: #f87171; }

/* ── PROFILE ACTION BUTTONS ──────────────────────────────────── */
.p-act {
  padding: 11px 18px; font-size: 12px; font-weight: 800;
  letter-spacing: .06em; border-radius: 22px; min-height: 42px;
}
.pa-primary { background: #C41E6A; border-color: #C41E6A; }
.pa-ghost { border: 1.5px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.75); }
.pa-ghost:hover { border-color: rgba(255,255,255,0.3); color: #fff; }

/* ── TOASTS — more readable ──────────────────────────────────── */
#toast-container > div {
  font-size: 14px !important;
  padding: 13px 18px !important;
  border-radius: 16px !important;
}

/* ── SPINNER IMPROVED ────────────────────────────────────────── */
.spinner-page::after { width: 36px; height: 36px; border-width: 3px; }

/* ── DRAWER — heavier ────────────────────────────────────────── */
.drawer-nav-item { padding: 14px 20px; font-size: 15px; min-height: 52px; }
.drawer-user-name { font-size: 16px; font-weight: 900; }

/* ── PAGE HEADER ─────────────────────────────────────────────── */
.ph-title { font-size: 17px; font-weight: 900; }
.ph-back { width: 40px; height: 40px; }

/* ── HAMBURGER — larger ──────────────────────────────────────── */
.hamburger { width: 40px; height: 40px; }
.hamburger span { width: 22px; height: 2px; }

/* ── EMPTY STATES ────────────────────────────────────────────── */
.empty-title { font-size: 17px; font-weight: 900; }
.empty-sub { font-size: 14px; }

/* ══════════════════════════════════════════════════════════════════
   FF LOVER 2026 BRAND SYSTEM OVERRIDES
══════════════════════════════════════════════════════════════════ */
:root {
  --bg: #040b1a;
  --bg-1: #081327;
  --bg-2: #0d1b33;
  --bg-3: rgba(136, 196, 255, 0.08);
  --surface: rgba(10, 22, 42, 0.92);
  --surface-2: rgba(16, 30, 55, 0.82);
  --surface-glass: rgba(12, 22, 42, 0.78);
  --text-1: #f4f9ff;
  --text-2: rgba(222, 235, 255, 0.78);
  --text-3: rgba(173, 194, 222, 0.54);
  --border-1: rgba(110, 160, 220, 0.16);
  --border-2: rgba(133, 183, 255, 0.24);
  --brand: #2d8cff;
  --brand-strong: #0f6dff;
  --brand-soft: rgba(45, 140, 255, 0.16);
  --brand-glow: rgba(45, 140, 255, 0.34);
  --success: #36d399;
  --warning: #f5bf4f;
  --danger: #ff6b7a;
  --t-1: var(--text-1);
  --t-2: var(--text-2);
  --t-3: var(--text-3);
  --t-4: rgba(173, 194, 222, 0.34);
  --b-1: var(--border-1);
  --b-2: var(--border-2);
  --b-3: rgba(157, 201, 255, 0.34);
  --b-4: rgba(198, 226, 255, 0.46);
  --v: var(--brand);
  --v-dk: var(--brand-strong);
  --v-lt: #8ac8ff;
  --v-bg: var(--brand-soft);
  --v-bdr: rgba(45, 140, 255, 0.34);
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 12px 36px rgba(0,0,0,.34);
  --shadow-brand: 0 12px 36px rgba(12,82,232,.26);
}

html, body {
  background:
    radial-gradient(circle at top left, rgba(41,102,214,.18), transparent 28%),
    radial-gradient(circle at top right, rgba(93,173,255,.12), transparent 26%),
    linear-gradient(180deg, #050d1b 0%, #07111f 42%, #040a15 100%) fixed !important;
  color: var(--text-1);
}
body.ff-theme-ready { color: var(--text-1); }

.top-nav,
.page-header {
  background: linear-gradient(180deg, rgba(6,15,30,.94), rgba(7,18,34,.84)) !important;
  border-bottom: 1px solid var(--border-1) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.hamburger span { background: rgba(236,245,255,.82) !important; }

.ff-brand,
.top-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.ff-brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ff-brand-mark svg { width: 100%; height: 100%; display: block; }
.ff-brand-wordmark,
.top-nav-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  letter-spacing: -.03em !important;
  font-weight: 800;
  color: var(--text-1) !important;
}
.ff-brand-ff {
  font-size: 1.22em;
  font-weight: 900;
  color: #eef8ff;
  text-shadow: 0 0 18px rgba(69,159,255,.24);
}
.ff-brand-lover {
  font-size: .9em;
  font-weight: 700;
  color: rgba(236,245,255,.92);
}
.top-nav .ff-brand-wordmark,
.top-nav .top-nav-wordmark { font-size: 19px !important; }

.top-nav-right { gap: 10px !important; }
.top-nav-contact-btn,
.top-nav-avatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 14px !important;
  border: 1px solid var(--border-2) !important;
  background: linear-gradient(180deg, rgba(18,35,61,.9), rgba(12,22,41,.96)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 6px 18px rgba(0,0,0,.18);
  color: var(--text-1) !important;
}
.top-nav-contact-btn:hover,
.top-nav-contact-btn.active,
.top-nav-avatar:hover {
  border-color: rgba(120, 191, 255, .46) !important;
  background: linear-gradient(180deg, rgba(24,47,84,.98), rgba(12,27,51,.98)) !important;
  color: var(--brand) !important;
}
.top-nav-contact-btn svg { width: 19px; height: 19px; }

.nav-drawer {
  background: linear-gradient(180deg, rgba(6,15,30,.98), rgba(8,19,39,.96)) !important;
  border-right: 1px solid var(--border-1) !important;
  box-shadow: 12px 0 40px rgba(0,0,0,.34);
}
.drawer-head {
  background: linear-gradient(180deg, rgba(12,28,51,.72), rgba(8,19,39,.5));
}
.drawer-user-av {
  border-radius: 16px !important;
  background: linear-gradient(180deg, rgba(28,53,88,.9), rgba(14,29,54,.96)) !important;
}
.drawer-nav-item,
.drawer-link {
  border-radius: 14px;
  margin: 2px 10px;
  width: calc(100% - 20px);
}
.drawer-nav-item.active,
.drawer-link.active {
  color: var(--text-1) !important;
  background: linear-gradient(180deg, rgba(29,91,172,.22), rgba(18,51,95,.18)) !important;
  border-left-color: var(--brand) !important;
}
.drawer-logout,
.drawer-signout-btn,
.drawer-signout {
  color: var(--text-2);
}

.bottom-tabs {
  background: linear-gradient(180deg, rgba(6,15,30,.88), rgba(6,15,30,.98)) !important;
  border-top: 1px solid var(--border-1) !important;
  box-shadow: 0 -12px 28px rgba(0,0,0,.22);
}
.tab-item {
  color: var(--text-3) !important;
  gap: 5px;
}
.tab-item svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
}
.tab-item.active,
.tab-item:hover {
  color: var(--brand) !important;
}
.tab-item.active .tab-label {
  color: var(--text-1);
}
.tab-item.active::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ed0ff, var(--brand));
  box-shadow: 0 0 18px rgba(45, 140, 255, .42);
}
.tab-badge { border-color: rgba(6,15,30,.96) !important; }

.btn,
.primary-btn,
.save-btn,
.send-btn,
button[type="submit"],
.btn-glass-primary,
.auth-btn,
.ph-action,
.cta-btn-primary {
  background: linear-gradient(180deg, #2386ff, #0f6dff) !important;
  border: 1px solid rgba(144, 202, 255, 0.32) !important;
  color: #fff !important;
  box-shadow: var(--shadow-brand) !important;
}
.btn:hover,
.primary-btn:hover,
.save-btn:hover,
.send-btn:hover,
button[type="submit"]:hover,
.btn-glass-primary:hover,
.auth-btn:hover,
.ph-action:hover,
.cta-btn-primary:hover {
  filter: brightness(1.06);
}
.btn-secondary,
.btn-ghost,
.ghost-btn,
.btn-glass-ghost,
.filter-toggle-btn,
.mode-btn,
.ph-back,
.icon-btn,
.country-select,
.g-field .g-input + button {
  background: rgba(255,255,255,.04) !important;
  border: 1px solid var(--border-2) !important;
  color: var(--text-1) !important;
}
.mode-btn.active,
.filter-toggle-btn.has-filters,
.active-chip,
.f-chip.active,
.role-chip.active,
.segment-btn.active {
  background: rgba(45, 140, 255, 0.18) !important;
  border-color: rgba(113, 185, 255, 0.46) !important;
  color: var(--text-1) !important;
}

input,
textarea,
select,
.search-input,
.g-input,
.ch-input,
.country-select,
.search-inp,
.cbox {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid var(--border-2) !important;
  color: var(--text-1) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
input::placeholder,
textarea::placeholder,
.search-input::placeholder,
.g-input::placeholder,
.ch-input::placeholder,
.search-inp::placeholder { color: var(--text-3) !important; }
input:focus,
textarea:focus,
select:focus,
.search-input:focus,
.g-input:focus,
.ch-input:focus,
.country-select:focus,
.search-inp:focus,
.cbox:focus {
  border-color: rgba(113, 185, 255, 0.62) !important;
  box-shadow: 0 0 0 3px rgba(45,140,255,.12), inset 0 1px 0 rgba(255,255,255,.04) !important;
  outline: none;
}

.auth-card,
.gate,
.card,
.ch-card,
.profile-card,
.section-card,
.community-card,
.item,
.system-card,
.sheet,
.list-card,
.stat-card,
.recent-item,
.member-card,
.info-card,
.empty-card {
  background: linear-gradient(180deg, rgba(14,27,48,.88), rgba(10,20,38,.88)) !important;
  border: 1px solid var(--border-1) !important;
  border-radius: 22px !important;
  box-shadow: var(--shadow-soft);
}
.empty-card { color: var(--text-3) !important; }

.sidebar,
.sheet,
.filter-panel,
.filter-drawer,
.chat-head,
.composer,
.banner,
.code-list-wrap,
.ci-wrap,
.auth-card,
.gate {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.row.own .bubble,
.bubble.is-own,
.message-own {
  background: linear-gradient(180deg, #2386ff, #0f6dff) !important;
  border-color: rgba(144, 202, 255, 0.28) !important;
}
.bubble,
.message-bubble {
  background: rgba(255,255,255,.06) !important;
  border-color: var(--border-1) !important;
}
.banner {
  background: rgba(45,140,255,.08) !important;
  border-bottom-color: var(--border-1) !important;
}

.auth-wordmark,
.gate-wordmark {
  color: rgba(205, 225, 248, 0.72) !important;
  letter-spacing: .18em !important;
}
.auth-sub,
.gate-sub,
.ch-helper,
.code-hint,
.member-login-arrow,
.drawer-user-role,
.meta-sub,
.sub,
.chat-sub,
.tab-label,
.code-status {
  color: var(--text-3) !important;
}
.auth-title,
.gate-title,
.title,
.chat-title,
.drawer-user-name,
.ch-label,
.name,
.profile-name,
.section-title,
.ph-title {
  color: var(--text-1) !important;
}

.member-login,
.ch-preview,
.age-warn {
  background: rgba(45,140,255,.08) !important;
  border-color: rgba(113,185,255,.26) !important;
  color: var(--text-1) !important;
}
.member-login-text,
.ch-preview { color: #a8d9ff !important; }

@media (max-width: 640px) {
  .top-nav,
  .page-header { padding-left: 14px; padding-right: 14px; }
  .top-nav .ff-brand-wordmark,
  .top-nav .top-nav-wordmark { font-size: 17px !important; gap: 6px; }
  .ff-brand-mark { width: 32px; height: 32px; }
}
.bg-orb.orb-1{background:rgba(45,140,255,.16)!important}
.bg-orb.orb-2{background:rgba(23,91,209,.14)!important}
.bg-orb.orb-3{background:rgba(132,199,255,.08)!important}


/* ===== FINAL BLUE CI OVERRIDES ===== */
html, body {
  background: radial-gradient(circle at top, rgba(34,123,255,0.12), transparent 34%), linear-gradient(180deg, #07101d 0%, #081427 45%, #06111f 100%) !important;
}
.top-nav, .page-header {
  background: linear-gradient(180deg, rgba(4,14,28,.96), rgba(7,18,34,.92)) !important;
  border-bottom: 1px solid rgba(120,180,255,.16) !important;
}
.top-nav-brand svg, .top-nav-brand img { filter: drop-shadow(0 0 8px rgba(56,149,255,.18)); }
.top-nav-wordmark, .drawer-brand-wordmark { color: #fff !important; }
.top-nav-contact-btn, .top-nav-avatar, .ph-back {
  background: rgba(18,41,71,.55) !important;
  border-color: rgba(108,170,255,.24) !important;
  color: rgba(235,245,255,.92) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 0 0 1px rgba(31,143,255,.04);
}
.top-nav-contact-btn:hover, .top-nav-avatar:hover, .ph-back:hover {
  background: rgba(26,59,100,.72) !important;
  border-color: rgba(108,170,255,.42) !important;
  color: #fff !important;
}
.bottom-tabs {
  background: rgba(5,12,24,.96) !important;
  border-top: 1px solid rgba(120,180,255,.14) !important;
}
.tab-item { color: rgba(219,233,255,.46) !important; }
.tab-item.active, .tab-item:hover { color: var(--v) !important; }
.drawer-overlay { background: rgba(2,8,18,.62) !important; }
.nav-drawer {
  background: linear-gradient(180deg,#06101c,#08162a 72%,#09192f) !important;
  border-right: 1px solid rgba(120,180,255,.14) !important;
}
.drawer-nav-item, .drawer-link {
  color: rgba(228,239,255,.8) !important;
  border-color: rgba(120,180,255,.08) !important;
}
.drawer-nav-item.active, .drawer-link.active, .drawer-nav-item:hover, .drawer-link:hover {
  background: rgba(31,143,255,.12) !important;
  color: #fff !important;
  border-left-color: var(--v) !important;
}
.drawer-signout-btn, .drawer-logout {
  background: linear-gradient(180deg, rgba(20,53,92,.88), rgba(12,35,61,.96)) !important;
  color: #fff !important;
  border: 1px solid rgba(110,172,255,.28) !important;
  border-radius: 24px !important;
}
.btn-primary, .btn-g-primary, .pa-primary, .msg-send, .send-btn, .join-btn, .create-btn,
button[class*='primary'], a[class*='primary'], .save-btn, .save-contact-btn {
  background: linear-gradient(180deg, #2a99ff, #1772e6) !important;
  border-color: rgba(119,183,255,.45) !important;
  color: #fff !important;
  box-shadow: 0 10px 30px rgba(24,106,219,.28) !important;
}
.btn-primary:hover, .btn-g-primary:hover, .pa-primary:hover, .msg-send:hover, .send-btn:hover { background: linear-gradient(180deg, #44a8ff, #1b7ff5) !important; }
.input, .g-input, .ch-input, .msg-input, .country-select, .sel, input[type='text'], input[type='email'], input[type='password'], textarea, select {
  background: rgba(17,34,58,.86) !important;
  border-color: rgba(112,172,255,.18) !important;
  color: #eef6ff !important;
}
.input:focus, .g-input:focus, .ch-input:focus, .msg-input:focus, .country-select:focus, .sel:focus, input:focus, textarea:focus, select:focus {
  border-color: rgba(87,161,255,.62) !important;
  box-shadow: 0 0 0 3px rgba(31,143,255,.12) !important;
  background: rgba(20,42,72,.94) !important;
}
.card, .surface, .auth-card, .gate, .invite-panel, .section-card, .profile-card, .contact-card,
.nc, .recent-card, .ac, .invite-banner, .chip-panel, .comm-card, .city-card, .group-card,
.inv-block, .panel, .composer, .conv-item, .msg-bubble, .community-detail, .member-card {
  border-color: rgba(111,172,255,.14) !important;
}
.invite-banner {
  background: linear-gradient(135deg, rgba(13,54,102,.82), rgba(10,30,56,.92)) !important;
  border-color: rgba(87,161,255,.32) !important;
}
.ib-icon, .nc-badge { background: rgba(31,143,255,.16) !important; border-color: rgba(87,161,255,.35) !important; }
.ib-sub, .section-accent, .link-accent, .hero-name-accent { color: var(--v) !important; }
.role-fister, .role-fistee, .role-vers, .role-badge, .chip.active, .f-chip.active, .tag-btn.on, .chip.on, .st.on {
  background: rgba(31,143,255,.12) !important;
  border-color: rgba(87,161,255,.34) !important;
  color: #8fccff !important;
}
.msg.own .msg-bubble, .row.own .bubble { background: linear-gradient(180deg, #1f8fff, #146fd8) !important; border-color: #1f8fff !important; }
.conv-item.active { background: rgba(31,143,255,.1) !important; border-left-color: #1f8fff !important; }
.conv-unread, .nc-badge { background: #1f8fff !important; }
.auth-switch a, .invite-link, a[href='/'] { color: #8fccff !important; }
.auth-wordmark, .gate-wordmark { color: rgba(255,255,255,.94) !important; letter-spacing: .02em !important; text-transform:none !important; font-size: clamp(22px, 4vw, 34px) !important; font-weight: 800 !important; }
.auth-logo img, .gate-logo img { width: min(540px, 92vw) !important; max-width: 100%; height: auto !important; }
/* hide legacy pink inline brand art on auth screens */
.auth-logo svg, .gate-logo svg { display:none !important; }
/* page-specific tune */
.home-label, .sec-label, .eyebrow, .section-title-sm { color: rgba(212,228,255,.55) !important; }


/* ── FINAL BLUE UNIFICATION PATCH ───────────────────────────── */
html, body {
  background: radial-gradient(circle at top, rgba(22,76,140,0.24), transparent 34%), linear-gradient(180deg, #071120 0%, #08172a 55%, #06101d 100%) !important;
}
.top-nav { background: rgba(5,18,34,0.88) !important; border-bottom: 1px solid rgba(102,184,255,0.14) !important; }
.top-nav-links { display: none !important; }
.top-nav-brand { gap: 10px !important; }
.ff-brand-mark { width: 38px !important; height: 38px !important; display:inline-flex; }
.ff-brand-wordmark { display:inline-flex; align-items:baseline; gap:8px; }
.ff-brand-ff { color:#f7fbff; font-weight:900; letter-spacing:-.04em; }
.ff-brand-lover { color:rgba(255,255,255,0.9); font-weight:800; letter-spacing:-.04em; }
.top-nav-contact-btn, .top-nav-avatar, .ph-back, .page-header .back-btn {
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(102,184,255,.18) !important;
  color: rgba(240,248,255,.92) !important;
}
.top-nav-contact-btn:hover, .top-nav-avatar:hover, .ph-back:hover, .page-header .back-btn:hover {
  background: rgba(31,143,255,.12) !important;
  border-color: rgba(102,184,255,.34) !important;
  color: #8fd0ff !important;
}
.nav-drawer, .drawer-panel { background: linear-gradient(180deg,#081426 0%,#07111f 100%) !important; }
.drawer-logout, .drawer-signout-btn {
  background: linear-gradient(180deg,#1f8fff,#146fd8) !important;
  border: 1px solid rgba(102,184,255,.4) !important;
  color: #fff !important;
  box-shadow: 0 14px 34px rgba(10,83,165,.28);
}
.btn-primary, .pa-primary, .btn.btn-primary, .btn-g-primary, .btn-glass-primary, .send-btn, .share-btn {
  background: linear-gradient(180deg,#2a99ff,#1772e6) !important;
  border-color: rgba(102,184,255,.45) !important;
  color:#fff !important;
  box-shadow: 0 12px 28px rgba(23,114,230,.22);
}
.btn-primary:hover, .pa-primary:hover, .btn.btn-primary:hover, .btn-g-primary:hover, .btn-glass-primary:hover, .send-btn:hover, .share-btn:hover {
  background: linear-gradient(180deg,#45a8ff,#1f8fff) !important;
}
.invite-banner, .share-card, .travel-card, .contact-field, .widget, .notif-card, .highlight-card, .p-section, .s-sect, .conv-item, .req-card, .code-card, .history-card {
  background: linear-gradient(180deg, rgba(8,24,43,.94), rgba(7,20,38,.92)) !important;
  border: 1px solid rgba(102,184,255,.14) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.input, textarea.input, select.input, .g-input, .cbox, .contact-input, .msg-inp {
  background: rgba(255,255,255,.05) !important;
  border: 1.5px solid rgba(102,184,255,.16) !important;
  color: #fff !important;
}
.input:focus, textarea.input:focus, select.input:focus, .g-input:focus, .cbox:focus, .contact-input:focus, .msg-inp:focus {
  background: rgba(255,255,255,.07) !important;
  border-color: rgba(102,184,255,.42) !important;
  box-shadow: 0 0 0 3px rgba(31,143,255,.14) !important;
}
.role-badge.fister, .role-chip.fister, .chip-role-fister { background: rgba(31,143,255,.14) !important; border: 1px solid rgba(102,184,255,.35) !important; color:#89caff !important; }
.role-badge.fistee, .role-chip.fistee, .chip-role-fistee { background: rgba(83,170,255,.12) !important; border: 1px solid rgba(126,200,255,.32) !important; color:#b8e2ff !important; }
.role-badge.versatile, .role-chip.versatile, .chip-role-versatile { background: rgba(58,130,246,.12) !important; border: 1px solid rgba(134,184,255,.32) !important; color:#d2ebff !important; }
.auth-card, .gate { background: rgba(7,20,38,.78) !important; border:1px solid rgba(102,184,255,.14) !important; }
.bg-orb.orb-1 { background: rgba(31,143,255,.16) !important; }
.bg-orb.orb-2 { background: rgba(15,79,166,.14) !important; }
.bg-orb.orb-3 { background: rgba(102,184,255,.10) !important; }
.auth-logo img, .gate-logo img {
  width:min(420px, 82vw) !important;
  max-width:100% !important;
  height:auto !important;
  filter: drop-shadow(0 10px 34px rgba(31,143,255,.22));
}
.auth-logo .auth-wordmark, .gate-logo .gate-wordmark { display:none !important; }
.home-shell, .hw, .p-wrap, .s-wrap { background: transparent !important; }
.recent-card, .ac, .nc { background: linear-gradient(180deg, rgba(8,24,43,.94), rgba(7,20,38,.92)) !important; border-color: rgba(102,184,255,.14) !important; }
.hero-name, .p-name, .page-title { color:#f7fbff !important; }
.hero-greeting, .muted, .section-label, .field-hint, .home-label, .gate-sub, .auth-sub { color: rgba(226,237,248,.62) !important; }
.top-nav, .page-header { backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }


/* COMMUNITY MASTER UI ALIGN */
html,body{filter:none!important} body{color:#f3f8ff!important}
.top-nav,.page-header{background:linear-gradient(180deg,rgba(6,20,38,.96),rgba(7,24,44,.92))!important;border-bottom:1px solid rgba(126,200,255,.14)!important} 
.top-nav-links{display:none!important} 
.top-nav-brand{display:inline-flex;align-items:center;gap:10px!important} 
.top-nav-brand .ff-brand-mark{width:40px!important;height:40px!important} 
.top-nav-wordmark,.ff-brand-wordmark{font-size:18px!important;font-weight:900!important;color:#f7fbff!important} 
.home-shell,.hw,.p-wrap,.ci-wrap,.chat-shell,.inv-shell,.profile-shell{background:transparent!important} 
.invite-banner,.recent-card,.ac,.contact-card,.share-card,.travel-card,.p-section,.s-sect,.comm-card,.conv-item,.result-card,.city-item,.person-card{background:linear-gradient(180deg,rgba(10,28,50,.94),rgba(8,22,40,.92))!important;border:1px solid rgba(126,200,255,.14)!important;box-shadow:0 16px 32px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.03)!important} 
.hero-greeting,.muted,.home-label,.field-hint,.p-meta,.city-meta,.comm-meta{color:rgba(224,236,249,.7)!important} 
.hero-name,.p-name,.page-title,.comm-name{color:#f8fbff!important} 
.input,.g-input,.country-select,.sel,textarea,input[type=text],input[type=email],input[type=password],select{background:rgba(255,255,255,.06)!important;border-color:rgba(126,200,255,.18)!important;color:#f8fbff!important} 
.input:focus,.g-input:focus,.country-select:focus,.sel:focus,textarea:focus,input:focus,select:focus{box-shadow:0 0 0 3px rgba(31,143,255,.16)!important;border-color:rgba(126,200,255,.42)!important} 
.btn-primary,.join-btn,.create-btn,.send-btn,.save-btn,.drawer-signout-btn,.drawer-logout,.share-btn,.ph-action{background:linear-gradient(180deg,#39a2ff,#1772e6)!important;border:1px solid rgba(126,200,255,.34)!important;color:#fff!important} 
.btn-primary:hover,.join-btn:hover,.create-btn:hover,.send-btn:hover,.save-btn:hover,.share-btn:hover,.ph-action:hover{background:linear-gradient(180deg,#5bb4ff,#238aff)!important} 
.role-fister,.role-fistee,.role-vers,.role-badge,.f-chip.active,.tag-btn.on,.chip.active{background:rgba(31,143,255,.12)!important;border-color:rgba(126,200,255,.3)!important;color:#9fd4ff!important} 
.auth-card,.gate{background:rgba(8,22,40,.74)!important;border:1px solid rgba(126,200,255,.16)!important;box-shadow:0 22px 40px rgba(0,0,0,.2)!important} 
.auth-sub,.gate-sub{color:rgba(224,236,249,.78)!important} 
.auth-logo img,.gate-logo img{background:radial-gradient(circle at center, rgba(31,143,255,.14), transparent 62%);border-radius:28px;padding:10px} 
.bottom-tabs{background:rgba(4,12,24,.98)!important;border-top:1px solid rgba(126,200,255,.12)!important} 
.tab-item{color:rgba(225,235,247,.54)!important}.tab-item.active,.tab-item:hover{color:#7ec8ff!important} 
.nav-drawer{background:linear-gradient(180deg,#081426,#07111f)!important;border-right:1px solid rgba(126,200,255,.14)!important} 
.drawer-link.active,.drawer-nav-item.active{background:rgba(31,143,255,.12)!important;color:#fff!important} 
.banner.show{border:1px solid rgba(126,200,255,.16);border-radius:16px} 


/* ── APP BRIGHTNESS + TYPO SCALE HOTFIX ─────────────────────── */
html{font-size:17px!important}
body{color:#f8fbff!important;background:radial-gradient(circle at top, rgba(76,155,255,.22), transparent 30%), linear-gradient(180deg,#0d1f38 0%, #102746 44%, #0d213b 100%)!important}
.top-nav,.page-header{background:linear-gradient(180deg,rgba(10,31,56,.98),rgba(13,36,64,.96))!important;border-bottom:1px solid rgba(162,212,255,.18)!important;box-shadow:0 10px 34px rgba(0,0,0,.20)!important}
.nav-drawer,.drawer-panel{background:linear-gradient(180deg,#102746,#0d213b)!important;border-right:1px solid rgba(162,212,255,.18)!important}
.bottom-tabs{background:rgba(10,25,46,.98)!important;border-top:1px solid rgba(162,212,255,.16)!important}
.top-nav-contact-btn,.top-nav-avatar,.ph-back,.page-header .back-btn,.drawer-user-av{background:rgba(255,255,255,.075)!important;border:1px solid rgba(162,212,255,.24)!important;color:#fff!important}
.auth-card,.gate{background:rgba(13,31,56,.82)!important}
.invite-banner,.recent-card,.ac,.contact-card,.share-card,.travel-card,.p-section,.s-sect,.comm-card,.conv-item,.result-card,.city-item,.person-card,.card,.surface,.auth-card,.gate,.invite-panel,.section-card,.profile-card,.contact-card,.nc,.inv-block,.panel,.composer,.msg-bubble,.community-detail,.member-card,.widget,.notif-card,.highlight-card,.req-card,.code-card,.history-card,.community-card,.item,.system-card,.sheet,.list-card,.stat-card,.member-card,.info-card,.empty-card,.community-preview,.group-card,.city-card{background:linear-gradient(180deg,rgba(16,42,74,.96),rgba(15,39,68,.94))!important;border:1px solid rgba(162,212,255,.18)!important;box-shadow:0 16px 32px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.05)!important}
.hero-greeting,.muted,.home-label,.field-hint,.p-meta,.city-meta,.comm-meta,.tab-label,.auth-sub,.gate-sub,.drawer-user-role,.meta-sub,.sub,.chat-sub,.code-status,.hero-label,.section-label,.small,.help,.helper,.legend,.eyebrow,.sec-label{color:rgba(235,244,255,.84)!important}
.hero-name,.p-name,.page-title,.comm-name,.title,.chat-title,.drawer-user-name,.ch-label,.name,.profile-name,.section-title,.ph-title,h1,h2,h3,h4,h5,strong,label{color:#ffffff!important}
input,textarea,select,.input,.g-input,.country-select,.sel,.ch-input,.msg-input,.search-input,.search-inp,.cbox,.contact-input,.msg-inp{background:rgba(255,255,255,.09)!important;border-color:rgba(162,212,255,.24)!important;color:#fff!important}
input::placeholder,textarea::placeholder,.input::placeholder,.search-input::placeholder,.search-inp::placeholder,.g-input::placeholder{color:rgba(236,244,255,.72)!important}
input:focus,textarea:focus,select:focus,.input:focus,.g-input:focus,.country-select:focus,.sel:focus,.contact-input:focus,.msg-inp:focus{box-shadow:0 0 0 3px rgba(76,155,255,.18)!important;border-color:rgba(162,212,255,.48)!important;background:rgba(255,255,255,.12)!important}
.btn,.primary-btn,.save-btn,.send-btn,button[type="submit"],.btn-glass-primary,.auth-btn,.ph-action,.cta-btn-primary,.btn-primary,.pa-primary,.btn.btn-primary,.btn-g-primary,.share-btn,.join-btn,.create-btn,.drawer-signout-btn,.drawer-logout{background:linear-gradient(180deg,#4cb1ff,#238aff)!important;border:1px solid rgba(177,222,255,.46)!important;color:#fff!important;box-shadow:0 12px 28px rgba(35,138,255,.25)!important}
.btn:hover,.primary-btn:hover,.save-btn:hover,.send-btn:hover,button[type="submit"]:hover,.btn-glass-primary:hover,.auth-btn:hover,.ph-action:hover,.cta-btn-primary:hover,.btn-primary:hover,.pa-primary:hover,.btn.btn-primary:hover,.btn-g-primary:hover,.share-btn:hover,.join-btn:hover,.create-btn:hover,.drawer-signout-btn:hover,.drawer-logout:hover{background:linear-gradient(180deg,#71c0ff,#3b99ff)!important}
.btn-secondary,.btn-ghost,.ghost-btn,.btn-glass-ghost,.filter-toggle-btn,.mode-btn,.ph-back,.icon-btn{background:rgba(255,255,255,.08)!important;border:1px solid rgba(162,212,255,.22)!important;color:#fff!important}
.role-fister,.role-fistee,.role-vers,.role-badge,.chip.active,.f-chip.active,.tag-btn.on,.chip.on,.st.on,.role-chip.active{background:rgba(76,155,255,.16)!important;border-color:rgba(162,212,255,.36)!important;color:#dff1ff!important}
.tab-item{color:rgba(238,245,255,.7)!important}.tab-item.active,.tab-item:hover{color:#a9daff!important}.tab-item.active .tab-label{color:#fff!important}
.conv-item.active,.drawer-link.active,.drawer-nav-item.active{background:rgba(76,155,255,.16)!important;color:#fff!important}
.banner.show,.contact-shared-banner,.contact-share-banner,.contact-status-shared{background:rgba(53,196,118,.16)!important;border:1px solid rgba(113,221,157,.34)!important;color:#dfffee!important}
.auth-logo img,.gate-logo img{background:radial-gradient(circle at center, rgba(76,155,255,.18), transparent 64%)!important;border-radius:32px!important;padding:12px!important}
@media (max-width: 640px){
  html{font-size:18px!important}
  .top-nav .ff-brand-wordmark,.top-nav .top-nav-wordmark{font-size:20px!important}
  .tab-label{font-size:0.86rem!important}
  .hero-name,.p-name,.page-title,h1{font-size:clamp(2rem,7vw,2.6rem)!important}
  .hero-greeting,.muted,.home-label,.field-hint,.p-meta,.city-meta,.comm-meta,.section-label{font-size:0.98rem!important}
  input,textarea,select,.input,.g-input,.country-select,.sel,.ch-input,.msg-input,.search-input,.search-inp,.cbox,.contact-input,.msg-inp{font-size:1rem!important}
  .btn,.primary-btn,.save-btn,.send-btn,button[type="submit"],.btn-glass-primary,.auth-btn,.ph-action,.cta-btn-primary,.btn-primary,.pa-primary,.btn.btn-primary,.btn-g-primary,.share-btn,.join-btn,.create-btn{font-size:1rem!important}
}


/* APP ANTI-BLUR READABILITY FIX */
body.ff-theme-ready .top-nav, body.ff-theme-ready .page-header, body.ff-theme-ready .bottom-tabs, body.ff-theme-ready .nav-drawer, body.ff-theme-ready .drawer-overlay, body.ff-theme-ready .card, body.ff-theme-ready .hero, body.ff-theme-ready .hero-card, body.ff-theme-ready .p-card, body.ff-theme-ready .p-section, body.ff-theme-ready .community-card, body.ff-theme-ready .contact-card, body.ff-theme-ready .create-card, body.ff-theme-ready .gen-card, body.ff-theme-ready .code-table-wrap, body.ff-theme-ready .result-card, body.ff-theme-ready .city-item, body.ff-theme-ready .comm-card, body.ff-theme-ready .person-card, body.ff-theme-ready .see-more-card, body.ff-theme-ready .sheet, body.ff-theme-ready .modal-card, body.ff-theme-ready .recent-card, body.ff-theme-ready .ac, body.ff-theme-ready .nc, body.ff-theme-ready .widget, body.ff-theme-ready .stat-card, body.ff-theme-ready .item, body.ff-theme-ready .conv-item, body.ff-theme-ready .bubble, body.ff-theme-ready .system-card {backdrop-filter:none!important;-webkit-backdrop-filter:none!important;filter:none!important;opacity:1!important;text-shadow:none!important;}
body.ff-theme-ready .title, body.ff-theme-ready h1, body.ff-theme-ready h2, body.ff-theme-ready h3, body.ff-theme-ready .hero-name, body.ff-theme-ready .p-name, body.ff-theme-ready .page-title {color:#ffffff!important;}
body.ff-theme-ready .muted, body.ff-theme-ready .section-label, body.ff-theme-ready .helper, body.ff-theme-ready .field-hint, body.ff-theme-ready .meta, body.ff-theme-ready .subtle {color:rgba(233,242,250,.76)!important;}

/* ── LOCK SCROLL (used by modals / info popups) ─────────────────── */
.ff-lock-scroll { overflow: hidden !important; }

/* ── INFO BUTTON (global, fallback if ui-system not loaded) ────── */
.ff-info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid rgba(162,212,255,.35);
  background: rgba(31,143,255,.12); color: #a8d8ff;
  font-size: 11px; font-weight: 800; font-style: normal;
  cursor: pointer; flex-shrink: 0; vertical-align: middle;
  margin-left: 6px; line-height: 1; transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.ff-info-btn:hover { background: rgba(31,143,255,.25); color: #dff1ff; }

/* ── GLOBAL GRADIENT THEME ─────────────────────────────────────── */
html.ff-ui-on {
  background:
    radial-gradient(circle at top right, rgba(46,156,255,.14), transparent 26%),
    linear-gradient(180deg,#0d1d31 0%,#132742 46%,#0e1c30 100%) fixed !important;
}
html.ff-ui-on body { background: transparent !important; }

/* ── GREEN CTA BUTTON ──────────────────────────────────────────── */
.btn-cta-green {
  background: rgba(34,197,94,.15) !important;
  border-color: rgba(34,197,94,.4) !important;
  color: #4ade80 !important;
}

/* ══════════════════════════════════════════════════════════════════
   FF LOVER V30 — MOBILE-FIRST ALIGNMENT & TOUCH FIXES
══════════════════════════════════════════════════════════════════ */

/* ── GLOBAL TOUCH TARGETS — all interactive min 44px ───────────── */
button, .btn, a.btn,
.tab-item, .drawer-nav-item, .drawer-link,
.chip, .tag-btn, .f-chip, .chip2,
.p-act, .role-opt, .exp-opt, .exp-card, .role-card,
.vis3, .ph-action, .ph-back,
.top-nav-avatar, .top-nav-contact-btn,
.icon-btn, .ghost-btn, .join-btn, .create-btn, .mini-btn {
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

/* ── PAGE-HEADER — improved for mobile ─────────────────────────── */
.page-header {
  height: 56px;
  min-height: 56px;
  padding: 0 16px !important;
  gap: 10px;
}
.ph-back {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px;
  border-radius: 50% !important;
}
.ph-title {
  font-size: 17px !important;
  font-weight: 900 !important;
  letter-spacing: -.03em !important;
}
.ph-action {
  padding: 0 18px !important;
  min-height: 40px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  background: rgba(31,143,255,.18) !important;
  border-color: rgba(31,143,255,.45) !important;
  color: #fff !important;
  white-space: nowrap;
}
.ph-action:hover { background: rgba(31,143,255,.28) !important; }
.ph-action:active { background: rgba(31,143,255,.36) !important; transform: scale(.97); }

/* ── TOP NAV — consistent height ───────────────────────────────── */
.top-nav { height: 56px !important; min-height: 56px; }

/* ── BOTTOM TABS — better mobile ───────────────────────────────── */
.bottom-tabs { height: 64px !important; padding: 0 !important; }
.tab-item {
  min-height: 64px !important;
  padding: 10px 4px 12px !important;
  gap: 4px !important;
  font-size: 10px !important;
}
.tab-label { font-size: 10px !important; letter-spacing: .02em; }

/* ── INPUTS — bigger on mobile ──────────────────────────────────── */
.input, .g-input, .inputx, .selectx,
textarea.input, select.input {
  min-height: 48px;
  font-size: 15px !important;
  border-radius: 14px;
  padding: 12px 16px;
}

/* ── BUTTON SIZES ───────────────────────────────────────────────── */
.btn { padding: 12px 20px; font-size: 14px; border-radius: 14px; }
.btn-sm { padding: 9px 14px; font-size: 12px; min-height: 38px; }
.btn-full { width: 100%; justify-content: center; }
.btn-primary {
  background: #1f8fff !important;
  border-color: #1f8fff !important;
  color: #fff !important;
}
.btn-ghost {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.8);
}
.btn-ghost:hover { border-color: rgba(255,255,255,.38); color: #fff; }

/* ── SECTION / CARD SPACING ─────────────────────────────────────── */
.p-section { border-radius: 18px !important; padding: 0 !important; overflow: hidden; }
.p-section-hd { padding: 14px 16px !important; min-height: 52px; }
.p-sec-arrow { font-size: 18px; color: rgba(255,255,255,.35); }

/* ── PROFILE ACTION BUTTONS — full width stack on mobile ────────── */
@media (max-width: 480px) {
  .p-actions { flex-direction: column !important; gap: 10px !important; }
  .p-act { width: 100% !important; justify-content: center !important; padding: 14px 20px !important; font-size: 14px !important; border-radius: 28px !important; }
}

/* ── PHOTO GRID — 3 equal slots ─────────────────────────────────── */
.photo-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.photo-slot { aspect-ratio: 1; border-radius: 14px; overflow: hidden; position: relative; background: rgba(255,255,255,.05); border: 1.5px solid rgba(255,255,255,.1); cursor: pointer; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* ── FRIENDS AVATAR ROW ─────────────────────────────────────────── */
.friend-av-row { display: flex; flex-wrap: wrap; gap: 12px; padding: 4px 0; }
.friend-av-bubble { display: flex; flex-direction: column; align-items: center; gap: 5px; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.fab-circle { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; border: 2px solid rgba(255,255,255,.12); position: relative; overflow: hidden; }
.fab-circle img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fab-ol { position: absolute; bottom: 2px; right: 2px; width: 10px; height: 10px; background: #22c55e; border: 2px solid #0a021a; border-radius: 50%; }
.fab-name { font-size: 10px; color: rgba(255,255,255,.5); max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── SETTINGS TABS — scrollable, no visual scrollbar ───────────── */
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tabs { scrollbar-width: none; }

/* ── CHIP GROUPS — wrap nicely ──────────────────────────────────── */
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 9px 14px !important; border-radius: 999px !important; min-height: 40px !important; font-size: 12px; font-weight: 700; }

/* ── RANGE INPUT — full width ───────────────────────────────────── */
input[type=range] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  accent-color: #1f8fff;
  cursor: pointer;
}

/* ── SAFE AREA (iPhone X+) ──────────────────────────────────────── */
.bottom-tabs { padding-bottom: env(safe-area-inset-bottom,0) !important; }
.s-wrap, .p-wrap, .hw, .page { padding-bottom: calc(80px + env(safe-area-inset-bottom,0)) !important; }

/* ── TYPOGRAPHY SCALE ───────────────────────────────────────────── */
@media (max-width: 380px) {
  .p-name { font-size: 20px !important; }
  .hero-name { font-size: 26px !important; }
  .s-ttl, .sec-title { font-size: 16px !important; }
}

/* ── VISIBILITY BADGE ───────────────────────────────────────────── */
.vis-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.vis-badge.pub  { background: rgba(34,197,94,.1);   border: 1px solid rgba(34,197,94,.3);  color: #4ade80; }
.vis-badge.frnd { background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.3); color: #fbbf24; }
.vis-badge.hid  { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.4); }

/* ── ROLE BADGE SIZES ───────────────────────────────────────────── */
.role-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.role-fister  { background: rgba(77,163,255,.12); border: 1.5px solid rgba(77,163,255,.3); color: #4da3ff; }
.role-fistee  { background: rgba(126,200,255,.10); border: 1.5px solid rgba(126,200,255,.28); color: #7ec8ff; }
.role-vers    { background: rgba(134,184,255,.10); border: 1.5px solid rgba(134,184,255,.28); color: #86b8ff; }

/* ══════════════════════════════════════════════════════════════════
   FF LOVER — PREMIUM DARK THEME (shared, previously duplicated per-page)
   Extracted from per-page inline styles — applies site-wide
══════════════════════════════════════════════════════════════════ */

/* ── CSS CUSTOM PROPERTIES (extended) ──────────────────────────── */
:root {
  --pk:     #1f8fff;
  --pk-lt:  rgba(31,143,255,0.14);
  --pk-bdr: rgba(31,143,255,0.40);

  /* Role colour tokens */
  --fister-b:  rgba(77,163,255,0.5);
  --fister-bg: rgba(77,163,255,0.10);
  --fistee-b:  rgba(126,200,255,0.45);
  --fistee-bg: rgba(126,200,255,0.08);
  --vers-b:    rgba(134,184,255,0.45);
  --vers-bg:   rgba(134,184,255,0.08);
}

/* ── BACKGROUND — deep dark blue/purple ────────────────────────── */
html {
  background:
    linear-gradient(180deg, #0d1d31 0%, #132742 46%, #0e1c30 100%)
    fixed !important;
}
body { background: transparent !important; }
.shell, .home-wrap, .s-wrap, .p-wrap,
.chat-body, .hw, .page { background: transparent !important; }

/* ── TOP NAV — glass ────────────────────────────────────────────── */
.top-nav {
  background: rgba(15,6,34,0.72) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

/* ── BOTTOM TABS — dark glass ───────────────────────────────────── */
.bottom-tabs {
  background: rgba(10,2,22,0.96) !important;
  border-top: 1px solid rgba(255,255,255,0.10) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}
.tab-item {
  color: rgba(255,255,255,0.38) !important;
  flex: 1;
  padding: 8px 4px !important;
  transition: color .15s !important;
}
.tab-item.active { color: #1f8fff !important; }
.tab-label {
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: .04em;
}
.hamburger span { background: rgba(255,255,255,0.72) !important; }

/* ── NAV DRAWER ─────────────────────────────────────────────────── */
.nav-drawer { background: #0F0622 !important; }
.drawer-nav-item {
  border-radius: 12px !important;
  margin: 0 8px !important;
}
.drawer-nav-item.active {
  background: rgba(31,143,255,0.15) !important;
  color: #1f8fff !important;
}
.drawer-logout {
  border-radius: 24px !important;
  background: rgba(31,143,255,0.10) !important;
  border: 1px solid rgba(31,143,255,0.30) !important;
  color: #1f8fff !important;
  width: 100%;
  padding: 13px !important;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

/* ── ROLE BADGE ─────────────────────────────────────────────────── */
.role-badge {
  border-radius: 20px !important;
  padding: 4px 12px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
}

/* ── TOP NAV CONTACT BUTTON ─────────────────────────────────────── */
.top-nav-contact-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.72);
  transition: background .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.top-nav-contact-btn:hover {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.18);
}

/* ── BUTTONS — consistent pill shape ────────────────────────────── */
.btn, .p-act, .f-chip, .chip, .tag-btn,
.role-opt, .exp-opt, .vis3,
.sb-new, .send-btn, .share-btn, .mc-btn {
  border-radius: 999px !important;
}
.btn-primary, .pa-primary, .btn.btn-primary {
  background: #1f8fff !important;
  border-color: #1f8fff !important;
  color: #fff !important;
}
.btn-primary:hover { background: #1069c9 !important; }
.btn-ghost {
  border: 1.5px solid rgba(255,255,255,0.18) !important;
  background: transparent !important;
  color: rgba(255,255,255,0.82) !important;
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.35) !important;
  color: #fff !important;
}

/* ── GLASS CARDS ────────────────────────────────────────────────── */
.conv-item, .travel-card, .share-card, .contact-field,
.notif-card, .highlight-card, .widget, .nc, .recent-card,
.stat-pill {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 16px !important;
}

/* ── PROFILE SIGNAL PILLS ───────────────────────────────────────── */
.profile-signal {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 12px; font-weight: 800; color: #fff;
}
.profile-signal.role { box-shadow: 0 8px 18px rgba(31,143,255,0.12); }
.profile-signal.exp {
  background: rgba(16,185,129,0.12);
  border: 1.5px solid rgba(16,185,129,0.30);
  color: #d7ffee;
  box-shadow: 0 8px 18px rgba(16,185,129,0.10);
}
.profile-signal .sig-label {
  opacity: .82; font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 800;
}
.profile-signal .sig-value { font-size: 12px; font-weight: 900; letter-spacing: .01em; }

/* ── SECTION HEADER ─────────────────────────────────────────────── */
.section-label, .home-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,0.38);
}

/* ── AVATAR CIRCLES ─────────────────────────────────────────────── */
.p-av, .friend-av, .fab-circle, .rc-av, .nc-icon {
  border-radius: 14px !important;
}

/* ── PROFILE ACTION BUTTONS — full-width on mobile ──────────────── */
@media (max-width: 480px) {
  .p-actions { flex-direction: column !important; gap: 10px !important; }
  .p-act {
    width: 100% !important;
    justify-content: center !important;
    padding: 14px 20px !important;
    font-size: 14px !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
   FF LOVER — PROFILE PAGE COMPONENTS
   Moved from profile.html inline styles
══════════════════════════════════════════════════════════════════ */

/* ── PROFILE ROLE / EXP BADGE VARIANTS ──────────────────────────── */
.role-badge.fister   { background: rgba(77,163,255,.15)  !important; border: 1.5px solid rgba(77,163,255,.40)  !important; color: #86b8ff !important; }
.role-badge.fistee   { background: rgba(16,185,129,.12)  !important; border: 1.5px solid rgba(16,185,129,.35)  !important; color: #34D399  !important; }
.role-badge.versatile{ background: rgba(245,158,11,.12)  !important; border: 1.5px solid rgba(245,158,11,.35)  !important; color: #FBBF24  !important; }

.profile-signal.exp.exp-beginner     { background: rgba(34,197,94,.12);  border-color: rgba(34,197,94,.35);  color: #6ee7b7; }
.profile-signal.exp.exp-intermediate { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.35); color: #fcd34d; }
.profile-signal.exp.exp-experienced  { background: rgba(139,92,246,.12); border-color: rgba(139,92,246,.35); color: #c4b5fd; }

/* ── PROFILE CARDS / SECTIONS ───────────────────────────────────── */
.p-section {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.09) !important;
  border-radius: 18px !important;
  padding: 16px !important;
  margin-bottom: 10px !important;
}
.stat-box  { background: transparent !important; border: none !important; }
.stats-row { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09); border-radius: 18px; padding: 14px 8px; margin-bottom: 10px; }
.photo-slot { border-radius: 14px !important; }
.photo-slot img { border-radius: 14px; }
.p-pill { border-radius: 20px !important; padding: 5px 12px !important; }
.friend-av { border-radius: 14px !important; }
.friend-card:hover { background: rgba(255,255,255,0.08) !important; }

/* ── COLLAPSIBLE SECTION HEADERS ───────────────────────────────── */
.p-section-hd {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.p-section-hd:hover .p-sec-arrow { color: #1f8fff; }
.p-sec-arrow {
  font-size: 16px; color: rgba(255,255,255,0.3);
  transition: transform .2s; flex-shrink: 0;
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
}
.p-sec-arrow.open { transform: rotate(180deg); }
.p-sec-body { overflow: hidden; transition: max-height .3s ease; }
.p-sec-body.collapsed { max-height: 0 !important; }

/* ── CONTACT CARD ───────────────────────────────────────────────── */
.contact-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10); border-radius: 18px; overflow: hidden; margin-bottom: 10px; }
.contact-card-locked { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.contact-card-locked-icon { width: 44px; height: 44px; background: rgba(255,255,255,0.06); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.contact-card-locked-title { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.5); margin-bottom: 2px; }
.contact-card-locked-sub { font-size: 12px; color: rgba(255,255,255,0.3); }

/* ── CONTACT CHANNELS LIST ──────────────────────────────────────── */
.contact-channels { display: flex; flex-direction: column; gap: 0; margin-top: 8px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10); border-radius: 20px; overflow: hidden; }
.contact-channel-row { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-bottom: 1px solid rgba(255,255,255,0.07); text-decoration: none; transition: background .12s; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.contact-channel-row:last-child { border-bottom: none; }
.contact-channel-row:hover, .contact-channel-row:active { background: rgba(255,255,255,0.06); }
.cc-brand { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
.cc-name  { font-size: 15px; font-weight: 700; color: #fff; flex: 1; }
.cc-value { font-size: 12px; color: rgba(255,255,255,0.45); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-chevron { color: rgba(255,255,255,0.3); font-size: 16px; flex-shrink: 0; }

/* ── SHARE CONTACT BUTTON ───────────────────────────────────────── */
.share-contact-main-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 15px 20px;
  background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 28px; color: rgba(255,255,255,0.85);
  font-family: var(--font); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .2s; -webkit-tap-highlight-color: transparent; margin-top: 2px;
}
.share-contact-main-btn:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.25); }
.share-contact-main-btn.shared { background: rgba(34,197,94,0.15) !important; border-color: rgba(34,197,94,0.40) !important; color: #4ade80 !important; }
.scmb-left  { display: flex; align-items: center; gap: 10px; }
.scmb-icon  { font-size: 18px; }
.scmb-arrow { color: rgba(255,255,255,0.3); font-size: 18px; }

/* ── PROFILE PHOTO LIGHTBOX ─────────────────────────────────────── */
.p-photo-lb, .photo-slot.has-photo { cursor: zoom-in; }
.p-av { cursor: pointer; }
.p-av:active { opacity: 0.85; transform: scale(0.97); }

/* ── PROFILE HERO LAYOUT ────────────────────────────────────────── */
.p-hero { padding: 24px 0 20px; border-bottom: none !important; margin-bottom: 12px; }
.p-hero-top { flex-direction: row; align-items: flex-start; gap: 16px; }
.p-av-wrap  { order: 2; flex-shrink: 0; }
.p-av { width: 96px !important; height: 96px !important; border-radius: 20px !important; border: 2px solid rgba(255,255,255,0.15) !important; }
@media (max-width: 380px) { .p-av { width: 80px !important; height: 80px !important; } }
.p-meta { order: 1; flex: 1; }
.p-name { font-size: 26px !important; font-weight: 900 !important; letter-spacing: -.04em !important; }
.p-actions { flex-direction: column; gap: 10px; margin-top: 16px; width: 100%; }
.p-act { width: 100%; justify-content: center; border-radius: 28px !important; padding: 15px 20px !important; font-size: 14px !important; font-weight: 700 !important; }
.pa-primary { background: rgba(31,143,255,0.85) !important; border: none !important; color: #fff !important; }
.pa-primary:hover { background: #1f8fff !important; }
.pa-ghost { background: rgba(255,255,255,0.06) !important; border: 1.5px solid rgba(255,255,255,0.15) !important; color: rgba(255,255,255,0.85) !important; }

/* ── EXTERNAL PROFILE (viewed by others) ────────────────────────── */
body.external-profile .page-header { position: sticky; top: 0; z-index: 30; background: rgba(15,6,34,.92); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(255,255,255,.08); }

/* ── CONTACT SECTION HEADER ─────────────────────────────────────── */
.contact-section-header { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,0.38); margin: 20px 0 10px; }
