/* ============================================================
   LinkedOut – Main Stylesheet
   Font: DM Sans + DM Serif Display
   Palette: Deep Navy · Slate · Gold accent
   ============================================================ */

:root {
  --navy:      #0d1b2a;
  --navy-mid:  #1b2d3f;
  --slate:     #3d5a73;
  --slate-lt:  #6b8fa8;
  --gold:      #d4a843;
  --gold-lt:   #f0cc7a;
  --surface:   #f4f6f8;
  --white:     #ffffff;
  --border:    #dde3ea;
  --text:      #1a2a38;
  --text-mute: #6b7f8e;
  --danger:    #c0392b;
  --success:   #1e8449;
  --radius:    10px;
  --shadow:    0 2px 12px rgba(13,27,42,.08);
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Oxygen, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-head: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Oxygen, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--slate); text-decoration: none; }
a:hover { color: var(--navy); }

img { max-width: 100%; display: block; }

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  padding: 0 1rem; height: 60px;
  box-shadow: var(--shadow);
}
.navbar-inner {
  display: flex; align-items: center; gap: 1.25rem;
  width: 100%; max-width: 1100px;
}

.navbar-inner {
  display: flex; align-items: center; gap: 1.25rem;
  width: 100%; max-width: 1100px;
}

.navbar-brand {
  display: flex; align-items: center; gap: .5rem;
  color: var(--navy); font-weight: 700;
}
.brand-icon {
  background: var(--navy);
  color: var(--gold);
  font-family: var(--font-head);
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 1.2rem; font-weight: 900;
  flex-shrink: 0;
}
.navbar-brand .brand-logo { height: 32px; max-width: 180px; border-radius: 6px; object-fit: contain; display: block; }
.brand-text { font-size: 1.15rem; font-weight: 700; letter-spacing: -.3px; }

.nav-search { flex: 1; max-width: 340px; }
.nav-search form input {
  width: 100%;
  padding: .5rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .9rem;
  background: var(--surface);
  transition: border-color .2s;
}
.nav-search form input:focus { outline: none; border-color: var(--slate); }

.nav-links {
  display: flex; list-style: none; gap: .25rem;
}
.nav-links li { position: relative; }
.nav-icon {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: .4rem .75rem;
  color: var(--text-mute); font-size: .7rem; font-weight: 600;
  border-radius: var(--radius); transition: color .2s, background .2s;
  position: relative;
}
.nav-icon svg {
  width: 22px; height: 22px; fill: none;
  stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.nav-icon:hover { color: var(--navy); background: var(--surface); }
.nav-icon.active { color: var(--navy); }

.badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--gold); color: var(--navy);
  font-size: .6rem; font-weight: 700;
  border-radius: 999px; padding: 1px 5px; min-width: 16px; text-align: center;
}

.nav-profile { position: relative; cursor: pointer; }
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.nav-dropdown {
  display: none; position: absolute; right: 0; top: 100%;
  padding-top: 8px; /* invisible bridge — keeps hover alive */
  background: transparent;
  z-index: 999;
}
.nav-dropdown-inner {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 170px; overflow: hidden;
}
.nav-dropdown a {
  display: block; padding: .65rem 1rem; font-size: .9rem; color: var(--text);
}
.nav-dropdown a:hover { background: var(--surface); }
.nav-dropdown hr { border: none; border-top: 1px solid var(--border); margin: .25rem 0; }
.nav-profile:hover .nav-dropdown { display: block; }

/* ── Layout ────────────────────────────────────────────────── */
.main-content { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; }
.page-grid { display: grid; grid-template-columns: 240px 1fr 280px; gap: 1.25rem; }
.page-grid-2 { display: grid; grid-template-columns: 240px 1fr; gap: 1.25rem; }
.page-grid-wide { display: grid; grid-template-columns: 1fr 300px; gap: 1.25rem; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.card-body { padding: 1.25rem; }
.card-title { font-family: var(--font-head); font-size: 1.1rem; margin-bottom: .75rem; }
.card-section { padding: 1rem 1.25rem; border-top: 1px solid var(--border); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.25rem; border-radius: 999px;
  font-family: var(--font-body); font-size: .88rem; font-weight: 600;
  cursor: pointer; border: none; transition: all .2s;
}
.btn-primary   { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-mid); color: var(--white); }
.btn-outline   { background: transparent; border: 2px solid var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-gold      { background: var(--gold); color: var(--navy); }
.btn-gold:hover{ background: var(--gold-lt); }
.btn-sm        { padding: .35rem .9rem; font-size: .82rem; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-success   { background: var(--success); color: #fff; }
.btn-ghost     { background: transparent; color: var(--text-mute); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .88rem; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: .6rem .9rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-body); font-size: .93rem;
  background: var(--white); transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--slate); }
.form-group textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Alert banners ─────────────────────────────────────────── */
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .9rem; }
.alert-error   { background: #fde8e8; color: var(--danger); border: 1px solid #f5c6c6; }
.alert-success { background: #e8f8ee; color: var(--success); border: 1px solid #b2dfcb; }
.alert-info    { background: #e8f0f8; color: var(--slate); border: 1px solid #b0c8df; }

/* ── Profile cover + avatar ────────────────────────────────── */
.profile-cover { width: 100%; height: 180px; object-fit: cover; display: block; }
.profile-header-body {
  padding: 0 1.5rem 1.25rem;
  display: flex; gap: 1.25rem; align-items: flex-end;
  position: relative; margin-top: -52px;
}
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar {
  width: 104px; height: 104px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--white); background: var(--white);
}
.profile-meta { flex: 1; padding-top: 56px; }
.profile-name { font-family: var(--font-head); font-size: 1.5rem; line-height: 1.2; }
.profile-headline { color: var(--text-mute); margin-top: .2rem; }
.profile-location { color: var(--text-mute); font-size: .85rem; margin-top: .2rem; }
.profile-stats { display: flex; gap: 1.5rem; margin-top: .5rem; }
.profile-stats span { font-size: .85rem; color: var(--text-mute); }
.profile-stats strong { color: var(--text); }

/* ── Feed / Post ───────────────────────────────────────────── */
.post-compose { padding: 1rem; display: flex; gap: .75rem; align-items: center; }
.post-compose input[type="text"],
.post-compose input[type="search"] {
  flex: 1; padding: .6rem 1rem; border: 1.5px solid var(--border);
  border-radius: 999px; font-family: var(--font-body); font-size: .93rem;
  background: var(--surface); cursor: pointer;
}
.post { border-top: 1px solid var(--border); }
.post-header { padding: .9rem 1rem .4rem; display: flex; gap: .75rem; }
.post-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.post-user-info a { font-weight: 600; color: var(--text); font-size: .95rem; }
.post-user-info .post-time { font-size: .8rem; color: var(--text-mute); }
.post-content { padding: .3rem 1rem .7rem; white-space: pre-wrap; }
.post-image { width: 100%; max-height: 450px; object-fit: cover; }
.post-actions {
  padding: .5rem 1rem; border-top: 1px solid var(--border);
  display: flex; gap: .25rem;
}
.post-actions .btn { color: var(--text-mute); font-weight: 600; }
.post-actions .btn:hover { color: var(--navy); background: var(--surface); }
.post-actions .btn.liked { color: var(--gold); }
.post-comments { background: var(--surface); border-top: 1px solid var(--border); }
.comment { display: flex; gap: .65rem; padding: .65rem 1rem; border-top: 1px solid var(--border); }
.comment:first-child { border-top: none; }
.comment-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-body { background: var(--white); border-radius: var(--radius); padding: .5rem .8rem; flex: 1; }
.comment-author { font-weight: 600; font-size: .87rem; }
.comment-text { font-size: .9rem; }
.comment-form { display: flex; gap: .65rem; padding: .65rem 1rem; }
.comment-form input { flex: 1; padding: .5rem .9rem; border: 1.5px solid var(--border); border-radius: 999px; font-family: var(--font-body); font-size: .9rem; }

/* ── Job cards ─────────────────────────────────────────────── */
.job-card { padding: 1.25rem; border-top: 1px solid var(--border); display: flex; gap: 1rem; }
.job-card:first-child { border-top: none; }
.job-logo { width: 54px; height: 54px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.job-info .job-title { font-weight: 700; font-size: 1rem; color: var(--navy); }
.job-info .job-company { color: var(--text-mute); font-size: .88rem; }
.job-meta { display: flex; gap: .75rem; margin-top: .35rem; flex-wrap: wrap; }
.job-tag { font-size: .75rem; padding: .2rem .6rem; border-radius: 999px; background: var(--surface); color: var(--slate); border: 1px solid var(--border); }

/* ── Company cards ─────────────────────────────────────────── */
.company-card { padding: 1.25rem; text-align: center; }
.company-logo { width: 64px; height: 64px; border-radius: var(--radius); object-fit: cover; margin: 0 auto .5rem; border: 1px solid var(--border); }
.company-name { font-weight: 700; font-size: .97rem; color: var(--navy); }
.company-industry { font-size: .83rem; color: var(--text-mute); margin-top: .15rem; }

/* ── People cards ──────────────────────────────────────────── */
.people-card { padding: 1rem; display: flex; gap: .9rem; align-items: center; border-top: 1px solid var(--border); }
.people-card:first-child { border-top: none; }
.people-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.people-info .people-name { font-weight: 600; color: var(--text); }
.people-info .people-headline { font-size: .83rem; color: var(--text-mute); }

/* ── Messages ──────────────────────────────────────────────── */
.messages-main {
  max-width: 1100px;
  height: calc(100dvh - 72px);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.msg-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.msg-sidebar { border-right: 1px solid var(--border); overflow-y: auto; min-height: 0; }
.msg-thread { font-size: .9rem; padding: .85rem 1rem; display: flex; gap: .75rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.msg-thread:hover,.msg-thread.active { background: var(--surface); }
.msg-thread-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-thread-name { font-weight: 600; color: var(--text); }
.msg-thread-preview { color: var(--text-mute); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.msg-unread .msg-thread-name::after { content: '•'; color: var(--gold); margin-left: .3rem; }
.msg-window { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.msg-header { padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; font-weight: 600; }
.msg-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--surface); }
.msg-bubble { max-width: 68%; padding: .6rem .9rem; border-radius: 18px; font-size: .92rem; line-height: 1.45; }
.msg-bubble.sent { background: var(--navy); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-bubble.recv { background: var(--white); color: var(--text); align-self: flex-start; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg-time { font-size: .7rem; color: var(--text-mute); text-align: center; margin: .5rem 0; }
.msg-input-bar { padding: .9rem 1.25rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; background: var(--white); flex-shrink: 0; }
.msg-input-bar input { flex: 1; padding: .6rem 1rem; border: 1.5px solid var(--border); border-radius: 999px; font-family: var(--font-body); font-size: .93rem; }

/* ── Auth pages ────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--navy); }
.auth-card { background: var(--white); border-radius: 18px; padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: 0 8px 40px rgba(0,0,0,.3); }
.auth-logo { text-align: center; margin-bottom: 1.75rem; }
.auth-logo .brand-icon { width: 52px; height: 52px; font-size: 2rem; margin: 0 auto .5rem; }
.auth-logo h1 { font-family: var(--font-head); font-size: 1.8rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .88rem; color: var(--text-mute); }

/* ── Sidebar widgets ───────────────────────────────────────── */
.widget-title { font-weight: 700; font-size: .88rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .75rem; }

/* ── Notifications ─────────────────────────────────────────── */
.notif-item { padding: .8rem 1rem; display: flex; gap: .75rem; border-bottom: 1px solid var(--border); transition: background .15s; }
.notif-item.unread { background: #f0f6ff; }
.notif-item:hover { background: var(--surface); }
.notif-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.notif-text { font-size: .9rem; color: var(--text); }
.notif-time { font-size: .78rem; color: var(--text-mute); margin-top: .15rem; }

/* ── Page headings ─────────────────────────────────────────── */
.page-title { font-family: var(--font-head); font-size: 1.6rem; margin-bottom: 1rem; }
.section-title { font-weight: 700; font-size: 1rem; margin-bottom: .75rem; padding-bottom: .4rem; border-bottom: 2px solid var(--gold); display: inline-block; }

/* ── Tabs ──────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.25rem; }
.tab { padding: .65rem 1.25rem; font-weight: 600; font-size: .9rem; color: var(--text-mute); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.tab.active, .tab:hover { color: var(--navy); border-bottom-color: var(--navy); }

/* ── Open to work badge ────────────────────────────────────── */
.otw-badge { display: inline-block; background: var(--success); color: #fff; font-size: .75rem; font-weight: 700; padding: .2rem .65rem; border-radius: 999px; margin-top: .35rem; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .page-grid, .page-grid-2 { grid-template-columns: 1fr; }
  .page-grid > :first-child, .page-grid > :last-child { display: none; }
  .page-grid-wide { grid-template-columns: 1fr; }
  .messages-main { height: calc(100dvh - 64px); padding: .75rem; }
  .msg-layout { grid-template-columns: 1fr; grid-template-rows: minmax(120px, 32%) minmax(0, 1fr); height: 100%; }
  .msg-sidebar { height: auto; border-right: none; border-bottom: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .navbar { padding: 0 1rem; gap: .75rem; }
  .nav-search { display: none; }
  .messages-main { height: calc(100dvh - 58px); padding: .5rem; }
  .msg-layout { border-radius: 12px; }
  .msg-header { padding: .75rem; }
  .msg-body { padding: .75rem; }
  .msg-bubble { max-width: 85%; }
  .msg-input-bar { padding: .65rem; gap: .5rem; }
  .msg-input-bar input { min-width: 0; }
  .form-row { grid-template-columns: 1fr; }
}



/* ── Language switcher ─────────────────────────────────────── */
.lang-switcher { }  /* inherits post-menu-wrap positioning */
.lang-btn {
  display: flex; align-items: center; gap: .35rem;
  background: none; border: 1.5px solid var(--border);
  border-radius: 999px; padding: .3rem .75rem;
  font-family: var(--font-body); font-size: .82rem; font-weight: 600;
  color: var(--text); cursor: pointer; transition: all .2s; white-space: nowrap;
}
.lang-btn:hover { border-color: var(--slate); color: var(--navy); }
.lang-menu { min-width: 180px; background: transparent !important;
             border: none !important; box-shadow: none !important; padding: 0 !important; }
.active-lang { background: var(--surface) !important; font-weight: 700; }


.lang-flag-img{width:20px;height:14px;border-radius:2px;object-fit:cover;display:inline-block;flex:0 0 auto;box-shadow:0 0 0 1px rgba(13,27,42,.12)}
.lang-flag-fallback{display:inline-flex;align-items:center;justify-content:center;width:20px;height:14px;font-size:.75rem;line-height:1}
.lang-menu .post-menu-item{gap:.6rem;align-items:center}
.lang-menu .post-menu-item span{white-space:nowrap}
.lang-btn .lang-flag-img{width:18px;height:13px}

/* ── Post action menu (···) ────────────────────────────────── */
.post-menu-wrap { position: relative; margin-left: auto; }
.post-menu-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1.3rem; color: var(--text-mute); padding: .25rem .6rem;
  border-radius: var(--radius); line-height: 1; letter-spacing: .05em;
  transition: background .15s, color .15s;
}
.post-menu-btn:hover { background: var(--surface); color: var(--text); }
.post-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 4px);
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 4px 20px rgba(13,27,42,.13);
  min-width: 220px; z-index: 200; overflow: hidden;
  padding: .35rem 0;
}
.post-menu.open { display: block; }
.post-menu-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 1rem; font-size: .92rem; color: var(--text);
  cursor: pointer; background: none; border: none; width: 100%;
  text-align: left; font-family: var(--font-body); transition: background .12s;
}
.post-menu-item:hover { background: var(--surface); }
.post-menu-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.post-menu-item.danger { color: var(--danger); }
.post-menu-divider { border: none; border-top: 1px solid var(--border); margin: .3rem 0; }

/* ── Comment action menu ───────────────────────────────────── */
.comment-menu-wrap { position: relative; margin-left: auto; flex-shrink: 0; }
.comment-menu-btn {
  background: none; border: none; cursor: pointer; font-size: 1rem;
  color: var(--text-mute); padding: .15rem .4rem; border-radius: 6px;
  letter-spacing: .05em; transition: background .15s;
}
.comment-menu-btn:hover { background: var(--border); }
.comment-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 2px);
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 4px 16px rgba(13,27,42,.12);
  min-width: 160px; z-index: 200; overflow: hidden; padding: .3rem 0;
}
.comment-menu.open { display: block; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer { background: var(--navy); color: #aaa; font-size: .82rem; margin-top: 3rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem; display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.footer-inner .brand-text { color: var(--gold); font-weight: 700; }
.footer-inner nav a { color: #aaa; margin-left: .75rem; }
.footer-inner nav a:hover { color: var(--white); }

/* ── Post compose trigger ──────────────────────────────────── */
.compose-trigger {
  flex: 1; text-align: left; padding: .6rem 1rem;
  border: 1.5px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-mute);
  font-family: var(--font-body); font-size: .93rem;
  cursor: pointer; transition: border-color .2s, background .2s;
}
.compose-trigger:hover { border-color: var(--slate); background: #fff; }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
.modal-box {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 560px;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
  display: flex; flex-direction: column;
  max-height: 90vh; overflow: hidden;
  animation: slideUp .2s ease;
}
@keyframes slideUp { from { transform:translateY(20px);opacity:0 } to { transform:translateY(0);opacity:1 } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.modal-close {
  background: none; border: none; font-size: 1.1rem; cursor: pointer;
  color: var(--text-mute); width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; transition: background .15s;
}
.modal-close:hover { background: var(--surface); color: var(--text); }
.modal-body { padding: 1rem 1.25rem; flex: 1; overflow-y: auto; }
.modal-textarea {
  width: 100%; min-height: 140px; border: none; resize: none;
  font-family: var(--font-body); font-size: 1rem; line-height: 1.6;
  color: var(--text); outline: none;
}
.modal-textarea::placeholder { color: var(--text-mute); }
.modal-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1.25rem; border-top: 1px solid var(--border);
}

/* ── Comment modal ─────────────────────────────────────────── */
.comment-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0; animation: fadeIn .15s ease;
}
.comment-modal-box {
  background: #fff; border-radius: 16px 16px 0 0;
  width: 100%; max-width: 600px;
  box-shadow: 0 -4px 24px rgba(0,0,0,.15);
  animation: slideUp .2s ease;
}
.comment-modal-header {
  padding: .75rem 1.25rem; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; font-size: .95rem;
}
.comment-modal-body { padding: .75rem 1.25rem; display: flex; gap: .75rem; }
.comment-modal-footer {
  padding: .75rem 1.25rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

/* ── Emoji picker ──────────────────────────────────────────── */
.emoji-btn {
  background: none; border: none; cursor: pointer; font-size: 1.25rem;
  padding: .25rem; border-radius: 50%; transition: background .15s;
  line-height: 1;
}
.emoji-btn:hover { background: var(--surface); }
.emoji-picker {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 4px 20px rgba(0,0,0,.12);
  padding: .5rem; width: 280px;
}
.emoji-picker-grid {
  display: grid; grid-template-columns: repeat(8,1fr); gap: 2px;
  max-height: 200px; overflow-y: auto;
}
.emoji-picker-grid button {
  background: none; border: none; cursor: pointer;
  font-size: 1.3rem; padding: .2rem; border-radius: 6px;
  transition: background .1s; line-height: 1;
}
.emoji-picker-grid button:hover { background: var(--surface); }
.emoji-picker-cats {
  display: flex; gap: .25rem; margin-bottom: .4rem;
  border-bottom: 1px solid var(--border); padding-bottom: .4rem;
}
.emoji-cat-btn {
  background: none; border: none; cursor: pointer; font-size: 1rem;
  padding: .2rem .4rem; border-radius: 6px; opacity: .6; transition: all .15s;
}
.emoji-cat-btn.active, .emoji-cat-btn:hover { opacity: 1; background: var(--surface); }

/* ── Bookmark / save button ────────────────────────────────── */
.save-post-btn { color: var(--text-mute); font-size: .85rem; }
.save-post-btn.saved { color: var(--gold); }
.save-post-btn:hover { color: var(--gold); }

/* v5.3 Company owner dashboard */
.company-dashboard-layout{max-width:1120px;margin:0 auto;display:grid;grid-template-columns:260px minmax(0,1fr);gap:1.25rem;align-items:start}.company-admin-sidebar{overflow:hidden;position:sticky;top:88px}.company-admin-cover{height:76px;background:var(--navy);overflow:hidden}.company-admin-cover img{width:100%;height:100%;object-fit:cover}.company-admin-profile{padding:0 1rem 1rem;margin-top:-30px}.company-admin-logo{width:72px;height:72px;border-radius:50%;object-fit:cover;background:#fff;border:3px solid #fff;box-shadow:0 1px 4px rgba(15,23,42,.14)}.company-admin-profile h2{font-size:1.1rem;line-height:1.25;margin:.5rem 0 .15rem;color:var(--text)}.company-admin-improve{display:block;font-size:.82rem;font-weight:700;color:var(--accent);margin-bottom:.35rem}.company-admin-followers{font-size:.82rem;color:var(--text-mute);margin-bottom:.75rem}.company-admin-create,.company-admin-view{width:100%;justify-content:center;margin-bottom:.45rem}.company-admin-nav{display:flex;flex-direction:column;border-top:1px solid var(--border);padding:.55rem 0}.company-admin-nav a{padding:.72rem 1rem;color:var(--text);font-weight:600;font-size:.9rem}.company-admin-nav a:hover,.company-admin-nav a.active{background:#eef7f1;color:var(--success);box-shadow:inset 3px 0 0 var(--success);text-decoration:none}.company-admin-main{display:grid;gap:1rem}.company-action-card h1,.company-stats-card h2,.company-posts-card h2{font-size:1.15rem;margin:0;color:var(--text)}.muted{color:var(--text-mute);font-size:.9rem;margin:.25rem 0 .75rem}.company-action-list{display:grid;gap:.75rem}.company-action-item{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:1rem;align-items:center;border:1px solid var(--border);border-radius:10px;padding:1rem;background:#fff}.company-action-item strong{display:block;margin-bottom:.2rem}.company-action-item p{margin:0;color:var(--text-mute);font-size:.86rem}.company-action-item a{font-weight:700;font-size:.85rem}.company-action-item button{border:0;background:transparent;font-size:1.5rem;line-height:1;cursor:pointer;color:var(--text-mute)}.company-stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.75rem}.company-stat-box{border:1px solid var(--border);border-radius:10px;padding:1rem;background:#fff}.company-stat-box strong{display:block;font-size:1.6rem;color:var(--text)}.company-stat-box span{display:block;font-weight:700;color:var(--slate);font-size:.86rem}.company-stat-box small{display:block;color:var(--danger);font-size:.76rem;margin-top:.2rem}.company-section-head{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.company-post-carousel{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(220px,1fr);gap:.8rem;overflow-x:auto;padding-bottom:.35rem;scroll-snap-type:x proximity}.company-post-preview{border:1px solid var(--border);border-radius:10px;background:#fff;overflow:hidden;min-height:280px;scroll-snap-align:start}.company-post-boost{padding:.75rem;border-bottom:1px solid var(--border);font-size:.78rem;color:var(--text);background:#f8fafc}.company-post-boost button{float:right;border:1px solid var(--slate);background:#fff;color:var(--slate);border-radius:999px;font-weight:700;padding:.2rem .55rem}.company-post-head{display:flex;align-items:center;gap:.55rem;padding:.75rem}.company-post-head img{width:34px;height:34px;border-radius:50%;object-fit:cover;border:1px solid var(--border)}.company-post-head small{display:block;color:var(--text-mute);font-size:.75rem}.company-post-head span{margin-left:auto;color:var(--text-mute);font-weight:700}.company-post-preview p{padding:0 .75rem;margin:0 0 .7rem;font-size:.88rem;line-height:1.45}.company-post-image{width:100%;height:140px;object-fit:cover;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}.company-post-metrics{padding:.65rem .75rem;color:var(--text-mute);font-size:.82rem}.company-empty-state{border:1px dashed var(--border);border-radius:10px;padding:1rem;color:var(--text-mute);background:#f8fafc}.company-feed-link{display:block;text-align:center;margin-top:.9rem;color:var(--text);font-weight:700}.company-conversation-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.75rem}.company-conversation-card{border:1px solid var(--border);border-radius:10px;background:#fff;padding:1rem;min-height:150px}.company-conversation-card p{font-size:.86rem;color:var(--text);margin:.5rem 0 1rem}.company-conversation-card small{color:var(--text-mute)}
@media(max-width:900px){.company-dashboard-layout{grid-template-columns:1fr}.company-admin-sidebar{position:static}.company-admin-nav{display:grid;grid-template-columns:repeat(2,1fr)}.company-stat-grid,.company-conversation-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:560px){.company-action-item{grid-template-columns:1fr}.company-stat-grid,.company-conversation-grid{grid-template-columns:1fr}.company-section-head{display:block}.company-post-carousel{grid-auto-columns:86%}}

/* v5.5 company page contributions management */
.company-posts-admin-layout{grid-template-columns:260px minmax(0,560px) 260px;align-items:start}.company-page-posts-main{min-width:0}.company-page-posts-panel{overflow:hidden}.company-page-tabs-head{padding:1rem 1.25rem .5rem}.company-page-tabs-head h1{font-size:1.2rem;margin:0;color:var(--text)}.company-page-tabs-head p{margin:.25rem 0 0;color:var(--text-mute);font-size:.86rem}.company-page-tabs{display:flex;gap:1.25rem;border-bottom:1px solid var(--border);padding:0 1.25rem}.company-page-tabs span{padding:.75rem 0;font-weight:700;font-size:.9rem;color:var(--text-mute)}.company-page-tabs span.active{color:var(--success);border-bottom:3px solid var(--success)}.company-page-composer{padding:1rem 1.25rem;border-bottom:1px solid var(--border);background:#fff}.company-page-composer-row{display:flex;gap:.75rem;align-items:flex-start}.company-page-composer-row img{width:44px;height:44px;border-radius:50%;object-fit:cover;border:1px solid var(--border)}.company-page-composer-row textarea{flex:1;border:1px solid var(--border);border-radius:999px;resize:vertical;min-height:44px;padding:.75rem 1rem;font:inherit}.company-page-composer-actions{display:flex;gap:1rem;align-items:center;justify-content:flex-end;margin-top:.8rem;color:var(--slate);font-size:.86rem;font-weight:700}.company-page-composer-actions label{cursor:pointer}.company-managed-post{border-top:1px solid var(--border);background:#fff}.company-post-boost-line{font-size:.78rem;color:var(--text-mute);background:#f8fafc;border-bottom:1px solid var(--border);padding:.65rem 1rem}.company-post-boost-line button{float:right;border:1px solid var(--slate);background:#fff;color:var(--slate);border-radius:999px;padding:.2rem .6rem;font-weight:700}.company-managed-post-inner{padding:.85rem 1rem}.company-post-author-line{font-size:.78rem;color:var(--text-mute);margin-bottom:.55rem}.company-post-author-line span{float:right;font-weight:700}.company-post-head.big{padding:0;margin-bottom:.7rem}.company-post-head.big img{width:42px;height:42px}.company-managed-content{font-size:.92rem;line-height:1.5;margin:.4rem 0 .8rem}.company-managed-image{width:100%;max-height:380px;object-fit:cover;border:1px solid var(--border);border-radius:8px;background:#f8fafc}.company-managed-metrics{font-size:.8rem;color:var(--text-mute);padding:.65rem 0;border-bottom:1px solid var(--border)}.company-managed-actions{display:flex;justify-content:space-around;border-bottom:1px solid var(--border);padding:.5rem 0}.company-managed-actions button{border:0;background:transparent;color:var(--text-mute);font-weight:700;cursor:pointer}.company-comment-preview{padding:.7rem 0}.company-comment-preview input{width:100%;border:1px solid var(--border);border-radius:999px;padding:.55rem .85rem}.company-small-comment{font-size:.8rem;margin-top:.55rem;background:#f8fafc;border-radius:8px;padding:.55rem}.company-post-footer-line{display:flex;justify-content:space-between;gap:1rem;color:var(--text-mute);font-size:.76rem;padding-top:.55rem}.company-page-posts-side{display:grid;gap:1rem;position:sticky;top:88px}.company-page-posts-side h3{font-size:1rem;margin:0 0 .25rem;color:var(--text)}.company-side-top-post{display:flex;gap:.6rem;align-items:flex-start;margin:.75rem 0}.company-side-top-post img{width:42px;height:42px;border-radius:50%;object-fit:cover;border:1px solid var(--border)}.company-side-top-post small{display:block;color:var(--text-mute);font-size:.75rem;margin-top:.25rem}@media(max-width:1100px){.company-posts-admin-layout{grid-template-columns:220px minmax(0,1fr)}.company-page-posts-side{grid-column:2;position:static}}@media(max-width:820px){.company-posts-admin-layout{grid-template-columns:1fr}.company-page-posts-side{grid-column:auto}.company-page-composer-actions{justify-content:flex-start;flex-wrap:wrap}.company-post-footer-line{display:block}.company-admin-sidebar{position:static}}

/* v5.8 video posts */
.post-video{width:100%;max-height:520px;background:#000;display:block;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.company-managed-video{width:100%;max-height:520px;background:#000;display:block;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}

/* Company public page more menu */
.company-public-actions .company-public-more { margin-left: 0; display: inline-flex; }
.company-public-actions .company-more-btn { min-width: 48px; padding-left: 1rem; padding-right: 1rem; font-weight: 800; }
.company-public-actions .company-public-menu { min-width: 250px; top: calc(100% + 8px); border-radius: 14px; }
.company-public-actions .company-public-menu a.post-menu-item { text-decoration: none; }
@media (max-width: 640px) {
  .company-public-actions .company-public-more { width: auto; }
  .company-public-actions .company-public-menu { right: auto; left: 0; }
}

/* v6.7 company public menu layering fix */
.company-public-layout,
.company-public-main,
.company-public-hero,
.company-public-info,
.company-public-actions,
.company-public-tabs {
  overflow: visible;
}
.company-public-hero {
  position: relative;
  z-index: 30;
}
.company-public-tabs {
  position: relative;
  z-index: 1;
}
.company-public-actions .company-public-more {
  position: relative;
  z-index: 80;
}
.company-public-actions .company-public-menu {
  z-index: 9999;
  background: var(--white);
  box-shadow: 0 14px 36px rgba(13,27,42,.18);
}
.company-public-actions .company-public-menu.open {
  display: block;
}
.company-public-layout .card:not(.company-public-hero) {
  position: relative;
  z-index: 1;
}

/* v6.8 definitive company public more-menu clipping fix */
.card.company-public-hero,
.company-public-hero,
.company-public-info,
.company-public-actions,
.company-public-more {
  overflow: visible !important;
}
.company-public-hero {
  position: relative !important;
  z-index: 50 !important;
}
.company-public-actions {
  position: relative !important;
  z-index: 80 !important;
}
.company-public-more {
  position: relative !important;
  z-index: 120 !important;
}
.company-public-menu {
  z-index: 99999 !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
}

/* v7.2: keep company conversation cards in original compact 3-card style */
.company-conversation-card{display:block;text-decoration:none;color:var(--text);border:1px solid var(--border);border-radius:12px;background:#fff;padding:1.15rem 1.25rem;min-height:150px;overflow:hidden}
.company-conversation-card:hover{text-decoration:none;box-shadow:0 6px 18px rgba(15,23,42,.08);transform:translateY(-1px)}
.company-conversation-card strong{display:block;font-size:1.05rem;line-height:1.3;margin-bottom:.55rem;color:var(--text)}
.company-conversation-card p{font-size:.98rem;line-height:1.48;color:var(--text);margin:0 0 1rem}
.company-conversation-card small{display:block;color:var(--text-mute);font-size:.88rem;margin-top:auto}
.company-member-post-head,.company-member-post-media{display:none!important}

/* Chat photo/video attachments */
.msg-input-bar{gap:.55rem;align-items:flex-end}
.msg-input-wrap{flex:1;min-width:0;display:grid;gap:.35rem}
.msg-attach-btn{width:38px;height:38px;border:1px solid var(--border);border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#fff;color:var(--slate);cursor:pointer;font-size:1rem;flex:0 0 auto}
.msg-attach-btn:hover{background:#f8fafc;border-color:var(--primary)}
.msg-attachment-preview{display:flex;align-items:center;justify-content:space-between;gap:.5rem;border:1px solid var(--border);border-radius:999px;background:#fff;padding:.35rem .55rem;font-size:.82rem;color:var(--text-mute);max-width:100%}
.msg-clear-attachment{border:0;background:transparent;color:var(--danger);font-size:1.05rem;line-height:1;cursor:pointer;font-weight:700}
.msg-bubble .msg-text + .msg-media{margin-top:.45rem}
.msg-media{display:block;border-radius:12px;max-width:min(360px,70vw);background:#000;overflow:hidden}
.msg-image{max-height:360px;object-fit:cover;border:1px solid rgba(15,23,42,.08)}
.msg-video{max-height:360px;width:min(360px,70vw)}
.msg-bubble.sent .msg-media{margin-left:auto}
.msg-bubble.recv .msg-media{margin-right:auto}
.msg-bubble[data-pending="1"]{opacity:.72}
@media(max-width:640px){.msg-media,.msg-video{max-width:72vw}.msg-attach-btn{width:34px;height:34px}.msg-input-bar{padding:.55rem}}

/* Chat UX fixes: hide empty attachment preview, emoji picker, message likes */
.msg-attachment-preview[hidden], .msg-emoji-picker[hidden]{display:none!important}
.msg-emoji-btn{width:38px;height:38px;border:1px solid var(--border);border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#fff;color:var(--slate);cursor:pointer;font-size:1rem;flex:0 0 auto}
.msg-emoji-btn:hover{background:#f8fafc;border-color:var(--primary)}
.msg-input-wrap{position:relative}
.msg-emoji-picker{position:absolute;left:0;bottom:calc(100% + 8px);display:grid;grid-template-columns:repeat(6,32px);gap:.25rem;padding:.5rem;background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);z-index:50}
.msg-emoji-picker button{border:0;background:transparent;border-radius:8px;width:32px;height:32px;cursor:pointer;font-size:1.1rem;line-height:1}
.msg-emoji-picker button:hover{background:#f1f5f9}
.msg-bubble-wrap{display:flex;flex-direction:column;max-width:68%;gap:.2rem}
.msg-bubble-wrap.sent{align-self:flex-end;align-items:flex-end}
.msg-bubble-wrap.recv{align-self:flex-start;align-items:flex-start}
.msg-bubble-wrap .msg-bubble{max-width:100%;align-self:unset}
.msg-bubble-wrap[data-pending="1"]{opacity:.72}
.msg-like-btn{border:0;background:transparent;color:var(--text-mute);font-size:.78rem;line-height:1;cursor:pointer;padding:.15rem .35rem;border-radius:999px;opacity:.75}
.msg-like-btn:hover,.msg-like-btn.liked{background:#eef2f7;color:var(--primary);opacity:1}
.msg-like-btn span:empty{display:none}
@media(max-width:640px){.msg-bubble-wrap{max-width:85%}.msg-emoji-btn{width:34px;height:34px}.msg-emoji-picker{grid-template-columns:repeat(4,32px)}}

/* v7.9 post media zoom modal */
.post-image,
.post-video,
.company-managed-image,
.company-managed-video,
.company-post-image,
.company-public-post-media,
.li-feature-card img,
.li-feature-card video,
.li-activity-card img.media,
.li-activity-card video.media {
  cursor: zoom-in;
}
.media-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .86);
  padding: 28px;
}
.media-zoom-modal.is-open { display: flex; }
.media-zoom-dialog {
  position: relative;
  width: min(1180px, 96vw);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-zoom-content img,
.media-zoom-content video {
  max-width: 100%;
  max-height: 92vh;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
.media-zoom-content video { width: min(1100px, 94vw); }
.media-zoom-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: #fff;
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.media-zoom-hint {
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.78);
  font-size: .85rem;
  white-space: nowrap;
}
@media(max-width:640px){
  .media-zoom-modal{padding:14px}
  .media-zoom-close{top:8px;right:8px}
  .media-zoom-hint{display:none}
  .media-zoom-content img,.media-zoom-content video{max-height:86vh;border-radius:10px}
}

.comment-profile-link { color: inherit; text-decoration: none; cursor: pointer; }
.comment-profile-link:hover .comment-avatar, .comment-profile-link.comment-author:hover { opacity: .9; text-decoration: underline; }

/* v8.2 comment replies, media, emoji and likes */
.comment { display:block; }
.comment-main-row { display:flex; gap:.65rem; width:100%; }
.comment-replies { margin-left:3rem; border-left:2px solid var(--border); padding-left:.65rem; }
.comment-reply-form-wrap { margin:.45rem 0 .2rem 3rem; }
.comment-actions-mini { display:flex; gap:.75rem; align-items:center; margin-top:.35rem; color:var(--text-mute); font-size:.8rem; }
.comment-actions-mini button { border:0; background:transparent; padding:0; color:var(--text-mute); font-weight:700; cursor:pointer; font-family:inherit; }
.comment-actions-mini button:hover, .comment-actions-mini button.liked { color:var(--gold); }
.comment-media { display:block; margin-top:.45rem; border-radius:12px; border:1px solid var(--border); background:#000; max-width:min(100%,420px); cursor:zoom-in; }
.comment-media-image { max-height:320px; object-fit:cover; }
.comment-media-video { max-height:320px; }
.enhanced-comment-form { align-items:flex-start; }
.comment-tool-btn { width:34px; height:34px; min-width:34px; border:1px solid var(--border); border-radius:50%; background:#fff; color:var(--navy); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; font-size:1rem; }
.comment-tool-btn:hover { background:var(--surface); }
.comment-media-preview { margin-top:.45rem; position:relative; max-width:260px; }
.comment-media-preview img, .comment-media-preview video { max-width:260px; max-height:180px; border-radius:10px; border:1px solid var(--border); display:block; object-fit:cover; background:#000; }
.comment-preview-clear { position:absolute; top:4px; right:4px; width:24px; height:24px; border:0; border-radius:50%; background:rgba(0,0,0,.7); color:#fff; cursor:pointer; }
@media(max-width:640px){.comment-replies,.comment-reply-form-wrap{margin-left:1.2rem}.enhanced-comment-form{gap:.35rem}.comment-tool-btn{width:30px;height:30px;min-width:30px}.comment-media{max-width:100%}}
.comment { display:flex; flex-wrap:wrap; }
.comment > .comment-main-row { display:flex; gap:.65rem; width:100%; }
.comment > .comment-replies, .comment > .comment-reply-form-wrap { flex-basis:100%; }


/* v8.4 mentions + hashtags */
.mention-link,
.hashtag-link { color: var(--slate); font-weight: 700; text-decoration: none; }
.mention-link:hover,
.hashtag-link:hover { text-decoration: underline; }
.comment-text .mention-link,
.comment-text .hashtag-link,
.post-content .mention-link,
.post-content .hashtag-link { color: var(--slate); }
.modal-textarea::placeholder,
.comment-form input::placeholder { color: var(--text-mute); }
.hashtag-hint { display:inline-flex; align-items:center; gap:.35rem; border:1px solid var(--border); border-radius:999px; padding:.25rem .65rem; font-weight:700; color:var(--slate); background:#fff; cursor:pointer; }
.hashtag-hint:hover { background:#f8fafc; }

.company-mention-link{font-weight:800;}

/* v9.9 vacancy management + clearer unread messages */
.msg-thread-top { display:flex; align-items:center; gap:.45rem; min-width:0; }
.msg-thread-top .msg-thread-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.msg-thread.msg-unread { background:#fff7e8; border-left:4px solid var(--gold); padding-left:calc(1rem - 4px); }
.msg-thread.msg-unread:hover,.msg-thread.msg-unread.active { background:#fff2d6; }
.msg-thread.msg-unread .msg-thread-name { font-weight:800; color:var(--navy); }
.msg-thread.msg-unread .msg-thread-preview { font-weight:700; color:var(--text); }
.msg-unread .msg-thread-name::after { content:'' !important; margin:0 !important; }
.msg-unread-badge { margin-left:auto; min-width:1.35rem; height:1.35rem; padding:0 .35rem; border-radius:999px; display:inline-flex; align-items:center; justify-content:center; background:var(--gold); color:#fff; font-size:.72rem; font-weight:800; flex-shrink:0; }
.msg-new-label { margin-top:.2rem; display:inline-block; color:var(--gold); font-size:.74rem; font-weight:800; }

/* v9.9.1: robust unread chat badge */
.msg-thread { position: relative; }
.msg-thread.msg-unread { background:#eef6ff !important; border-left:4px solid var(--navy) !important; }
.msg-thread.msg-unread:hover,.msg-thread.msg-unread.active { background:#e3f0ff !important; }
.msg-thread.msg-unread .msg-thread-name,
.msg-thread.msg-unread .msg-thread-preview { font-weight:800 !important; color:var(--navy) !important; }
.msg-thread .msg-unread-badge { position:absolute !important; right:.85rem !important; top:.85rem !important; min-width:1.55rem !important; height:1.55rem !important; padding:0 .42rem !important; border-radius:999px !important; display:inline-flex !important; align-items:center !important; justify-content:center !important; background:var(--navy) !important; color:#fff !important; font-size:.78rem !important; font-weight:900 !important; line-height:1 !important; box-shadow:0 2px 6px rgba(15,59,99,.22) !important; z-index:2 !important; }
.msg-new-label { color:var(--navy) !important; font-size:.74rem !important; font-weight:800 !important; }


/* v10.0 mobile/PWA responsive improvements */
.mobile-nav-toggle{display:none;border:1px solid var(--border);background:#fff;color:var(--navy);border-radius:12px;width:40px;height:40px;font-size:1.35rem;font-weight:800;align-items:center;justify-content:center;cursor:pointer}
@media (max-width: 1024px){
  .main-content{max-width:100%;padding:1rem .85rem 5.5rem}
  .page-grid,.page-grid-2,.page-grid-wide{grid-template-columns:1fr;gap:1rem}
  .page-grid>aside,.page-grid-2>aside,.page-grid-wide>aside{order:2}
  .page-grid>main,.page-grid-2>main,.page-grid-wide>main{order:1}
  .card{border-radius:14px}
}
@media (max-width: 820px){
  body{font-size:16px;overflow-x:hidden}
  .navbar{height:64px;padding:0 .75rem}
  .navbar-inner{gap:.6rem;max-width:100%}
  .navbar-brand .brand-logo{height:34px;max-width:120px}.brand-text{display:none}.brand-icon{width:36px;height:36px;border-radius:50%}
  .nav-search{max-width:none;flex:1}.nav-search form input{height:42px;font-size:.94rem}
  .mobile-nav-toggle{display:inline-flex;order:9}
  .nav-links{position:fixed;left:0;right:0;bottom:0;z-index:1000;background:#fff;border-top:1px solid var(--border);box-shadow:0 -8px 22px rgba(13,27,42,.08);display:flex;justify-content:space-around;gap:0;padding:.35rem .25rem calc(.35rem + env(safe-area-inset-bottom));transform:none}
  .nav-links li{flex:1}.nav-icon{padding:.35rem .15rem;font-size:.64rem;border-radius:10px}.nav-icon svg{width:22px;height:22px}.badge{top:2px;right:22%}
  .lang-switcher{display:none}.nav-profile{order:8}.nav-avatar{width:38px;height:38px}
  .form-row{grid-template-columns:1fr}.btn{min-height:40px}.post-compose{align-items:flex-start}.post-compose input[type="text"]{min-height:44px}
  .profile-header-body{display:block;margin-top:-44px;padding:0 1rem 1rem}.profile-avatar{width:88px;height:88px}.profile-meta{padding-top:.5rem}.profile-actions{display:flex;flex-wrap:wrap;gap:.5rem}.profile-actions .btn{flex:1;justify-content:center}
  .company-admin-layout,.company-public-layout,.company-dashboard-layout{grid-template-columns:1fr!important;max-width:100%!important;padding:.75rem!important}
  .company-admin-sidebar,.company-public-sidebar{position:static!important;width:100%!important}.company-tabs{overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch}.company-tabs a{display:inline-flex}
  .messages-page,.messages-shell,.messages-container{height:calc(100vh - 84px - env(safe-area-inset-bottom))!important;min-height:560px;display:grid!important;grid-template-columns:1fr!important}.messages-sidebar,.messages-list{max-height:220px;overflow:auto;border-right:0!important;border-bottom:1px solid var(--border)}.message-pane,.chat-pane{min-height:0}.message-input,.chat-input,.message-form{position:sticky;bottom:calc(56px + env(safe-area-inset-bottom));background:#fff;z-index:20}
  .post-card img,.post-media img,.post-media video,.activity-media video,.activity-media img{max-height:62vh;object-fit:contain;background:#000}
}
@media (max-width: 560px){
  .main-content{padding:.75rem .55rem 5.25rem}.navbar{padding:0 .45rem}.nav-search form input{padding:.5rem .75rem}.nav-icon span:not(.badge){font-size:.58rem}.nav-icon svg{width:20px;height:20px}
  .card-body{padding:1rem}.card-section{padding:.85rem 1rem}.hero,.eu-section{padding-left:1rem!important;padding-right:1rem!important}.login-card{padding:1.25rem!important}.hero-text h1{font-size:2rem!important}
  .features-inner,.eu-section{grid-template-columns:1fr!important}.feature-item{padding:1.4rem 1rem!important}.jobs-cta{padding:2rem 1rem!important}
  .post-actions{display:flex;justify-content:space-around}.comment-main-row{gap:.45rem}.comment-replies,.comment-reply-form-wrap{margin-left:.75rem!important}
  .activity-feed,.profile-activity-list{display:block!important}.activity-card,.post-card{width:100%!important;margin-bottom:1rem}.activity-grid{grid-template-columns:1fr!important}
  .table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}.hide-mobile{display:none!important}
}

/* v10.0.1 responsive navigation + mobile overflow fixes */
.mobile-nav-toggle { display:none !important; }
.mobile-nav-backdrop,
.mobile-nav-drawer { display:none; }

/* General overflow guard for all pages */
html, body { max-width:100%; overflow-x:hidden; }
*, *::before, *::after { box-sizing:border-box; }
img, video, iframe, canvas, svg { max-width:100%; }
.card, .post-card, .company-card, .profile-card, .sidebar-card,
.company-section, .profile-section, .messages-container, .messages-shell,
.post-menu, .modal, .modal-content { min-width:0; }
input, textarea, select, button { max-width:100%; }
pre, code { white-space:pre-wrap; word-break:break-word; }
.post-content, .comment-body, .msg-bubble, .profile-section, .company-section,
.company-about, .company-public-hero, .notification-card { overflow-wrap:anywhere; word-break:break-word; }
.table-responsive, .responsive-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }

@media (min-width: 821px) {
  .mobile-nav-toggle { display:none !important; visibility:hidden !important; }
  body.mobile-nav-open { overflow:auto; }
  .mobile-nav-backdrop, .mobile-nav-drawer { display:none !important; }
}

@media (max-width: 820px) {
  .mobile-nav-toggle { display:inline-flex !important; }
  .mobile-nav-backdrop {
    display:block; position:fixed; inset:0; background:rgba(13,27,42,.34);
    opacity:0; pointer-events:none; transition:opacity .18s ease; z-index:1400;
  }
  .mobile-nav-drawer {
    display:flex; flex-direction:column; gap:.1rem; position:fixed; top:0; right:0;
    width:min(86vw, 340px); height:100dvh; background:#fff; z-index:1500;
    box-shadow:-18px 0 45px rgba(13,27,42,.18); transform:translateX(105%);
    transition:transform .2s ease; padding:1rem; overflow:auto;
  }
  body.mobile-nav-open { overflow:hidden; }
  body.mobile-nav-open .mobile-nav-backdrop { opacity:1; pointer-events:auto; }
  body.mobile-nav-open .mobile-nav-drawer { transform:translateX(0); }
  .mobile-drawer-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding-bottom:.75rem; border-bottom:1px solid var(--border); }
  .mobile-drawer-close { border:0; background:var(--surface); color:var(--navy); width:38px; height:38px; border-radius:50%; font-size:1.5rem; line-height:1; cursor:pointer; }
  .mobile-drawer-user { display:flex; align-items:center; gap:.75rem; padding:1rem 0; border-bottom:1px solid var(--border); margin-bottom:.4rem; }
  .mobile-drawer-user img { width:48px; height:48px; border-radius:50%; object-fit:cover; border:1px solid var(--border); flex:0 0 auto; }
  .mobile-drawer-user small { display:block; color:var(--text-mute); line-height:1.3; }
  .mobile-nav-drawer a { display:block; padding:.85rem .4rem; color:var(--text); font-weight:700; text-decoration:none; border-radius:10px; }
  .mobile-nav-drawer a:hover { background:var(--surface); color:var(--navy); }
  .mobile-nav-drawer hr { width:100%; border:0; border-top:1px solid var(--border); margin:.5rem 0; }

  .navbar { width:100%; }
  .navbar-inner { min-width:0; }
  .navbar-brand { flex:0 0 auto; }
  .nav-search { min-width:0; }
  .nav-profile { flex:0 0 auto; }
  .nav-dropdown { display:none !important; }

  .main-content, .page-grid, .page-grid-2, .page-grid-wide,
  .company-dashboard-layout, .company-public-layout, .company-admin-layout,
  .profile-layout, .notifications-layout, .jobs-layout { width:100% !important; max-width:100% !important; }
  .feed-layout, .home-layout { grid-template-columns:1fr !important; }
  .right-sidebar, .left-sidebar { width:100% !important; max-width:100% !important; position:static !important; }

  .post-actions, .company-actions, .profile-actions, .card-actions { flex-wrap:wrap; }
  .post-actions > *, .company-actions > *, .profile-actions > * { min-width:0; }
  .company-page-tabs, .profile-tabs, .notification-tabs { overflow-x:auto; white-space:nowrap; -webkit-overflow-scrolling:touch; }

  .modal-content, .post-modal, .media-modal-content { width:calc(100vw - 1rem) !important; max-width:calc(100vw - 1rem) !important; }
  .media-lightbox img, .media-lightbox video { max-width:96vw; max-height:82dvh; object-fit:contain; }
}

@media (max-width: 560px) {
  .navbar-inner { gap:.45rem; }
  .nav-search form input { min-width:0; }
  .navbar-brand .brand-logo { max-width:42px; }
  .brand-logo { object-fit:contain; }
  .card, .post-card, .sidebar-card { border-radius:12px; }
  .company-stat-grid, .company-conversation-grid, .features-inner, .profile-stats-grid { grid-template-columns:1fr !important; }
  .post-media img, .post-media video, .company-managed-image, .company-managed-video { width:100%; height:auto; max-height:70dvh; object-fit:contain; }
  .messages-container, .messages-shell { border-radius:0 !important; margin:0 !important; width:100% !important; }
  .messages-sidebar, .messages-list { max-width:100% !important; }
}

/* v10.1 conservative responsive rollback/fix
   Keep desktop/tablet layout stable; only switch to mobile layout at smaller widths. */
@media (min-width: 901px) {
  .main-content { max-width:1100px !important; margin-left:auto !important; margin-right:auto !important; padding:1.5rem 1rem !important; }
  .page-grid { display:grid !important; grid-template-columns:240px minmax(0,1fr) 280px !important; gap:1.25rem !important; }
  .page-grid-2 { display:grid !important; grid-template-columns:240px minmax(0,1fr) !important; gap:1.25rem !important; }
  .page-grid-wide { display:grid !important; grid-template-columns:minmax(0,1fr) 300px !important; gap:1.25rem !important; }
  .page-grid > *, .page-grid-2 > *, .page-grid-wide > * { display:block !important; order:initial !important; }
  .feed-layout, .home-layout { grid-template-columns:240px minmax(0,1fr) 280px !important; }
  .left-sidebar, .right-sidebar { display:block !important; position:static !important; width:auto !important; max-width:none !important; }
  .nav-links { position:static !important; display:flex !important; transform:none !important; box-shadow:none !important; border-top:0 !important; padding:0 !important; background:transparent !important; }
  .mobile-nav-toggle, .mobile-nav-backdrop, .mobile-nav-drawer { display:none !important; visibility:hidden !important; }
  body { padding-bottom:0 !important; }
}

@media (max-width: 900px) {
  .main-content { max-width:720px !important; width:100% !important; padding:1rem .85rem 5rem !important; }
  .page-grid, .page-grid-2, .page-grid-wide,
  .feed-layout, .home-layout { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:1rem !important; }
  .page-grid > :first-child, .page-grid > :last-child,
  .feed-layout > aside, .home-layout > aside,
  .left-sidebar, .right-sidebar { display:none !important; }
  .page-grid > main, .feed-layout > main, .home-layout > main { width:100% !important; max-width:100% !important; }
}

@media (max-width: 820px) {
  .navbar { height:60px !important; padding:0 .65rem !important; }
  .navbar-inner { gap:.55rem !important; max-width:100% !important; min-width:0 !important; }
  .navbar-brand { flex:0 0 auto !important; }
  .navbar-brand .brand-logo { height:34px !important; max-width:42px !important; object-fit:contain !important; }
  .brand-text { display:none !important; }
  .nav-search { flex:1 1 auto !important; min-width:0 !important; max-width:none !important; }
  .nav-search form input { height:42px !important; min-width:0 !important; }
  .nav-links { display:none !important; }
  .mobile-nav-toggle { display:inline-flex !important; visibility:visible !important; flex:0 0 40px !important; }
  .nav-profile { flex:0 0 auto !important; }
  .nav-avatar { width:36px !important; height:36px !important; max-width:36px !important; border-radius:50% !important; object-fit:cover !important; }
  .lang-switcher { display:none !important; }
  body { overflow-x:hidden !important; }
}

@media (max-width: 560px) {
  .main-content { padding:.75rem .55rem 4.75rem !important; }
  .card, .post-card, .sidebar-card { max-width:100% !important; overflow:hidden; }
  .post-card img, .post-card video, .post-media img, .post-media video { width:100% !important; height:auto !important; max-height:70dvh !important; object-fit:contain !important; }
  .post-actions, .comment-actions, .profile-actions, .company-actions { flex-wrap:wrap !important; gap:.4rem !important; }
}

/* Keep all common avatars from stretching on responsive pages. */
.nav-avatar, .avatar, .user-avatar, .profile-avatar, .post-avatar, .comment-avatar,
.msg-avatar, .company-logo, .company-admin-logo, .company-public-logo {
  object-fit:cover;
  flex-shrink:0;
}

/* v10.2 mobile-first stabilization and drawer fix
   Desktop remains untouched; these overrides only apply to small screens. */
@media (min-width: 821px) {
  .mobile-nav-toggle,
  .mobile-nav-backdrop,
  .mobile-nav-drawer { display:none !important; visibility:hidden !important; }
}

@media (max-width: 820px) {
  body { min-width:0 !important; overflow-x:hidden !important; }
  .navbar { height:58px !important; padding:0 .5rem !important; }
  .navbar-inner { width:100% !important; max-width:100% !important; gap:.45rem !important; }
  .navbar-brand { flex:0 0 36px !important; width:36px !important; overflow:hidden !important; }
  .navbar-brand .brand-logo,
  .brand-icon { width:34px !important; height:34px !important; min-width:34px !important; max-width:34px !important; border-radius:50% !important; object-fit:contain !important; }
  .brand-text { display:none !important; }
  .nav-search { flex:1 1 auto !important; min-width:0 !important; max-width:none !important; }
  .nav-search form input { width:100% !important; min-width:0 !important; height:40px !important; font-size:.92rem !important; padding:.45rem .75rem !important; }
  .nav-links { display:none !important; }
  .lang-switcher { display:none !important; }
  .nav-profile { display:none !important; }
  .mobile-nav-toggle { display:inline-flex !important; visibility:visible !important; flex:0 0 40px !important; width:40px !important; height:40px !important; position:relative !important; z-index:1601 !important; }

  .mobile-nav-backdrop { display:block !important; visibility:visible !important; position:fixed !important; inset:0 !important; background:rgba(13,27,42,.38) !important; opacity:0 !important; pointer-events:none !important; z-index:1400 !important; transition:opacity .18s ease !important; }
  .mobile-nav-drawer { display:flex !important; visibility:visible !important; flex-direction:column !important; position:fixed !important; top:0 !important; right:0 !important; width:min(88vw, 340px) !important; height:100dvh !important; max-height:100dvh !important; background:#fff !important; z-index:1500 !important; transform:translateX(105%) !important; transition:transform .22s ease !important; box-shadow:-18px 0 45px rgba(13,27,42,.22) !important; padding:1rem !important; overflow-y:auto !important; }
  body.mobile-nav-open { overflow:hidden !important; }
  body.mobile-nav-open .mobile-nav-backdrop { opacity:1 !important; pointer-events:auto !important; }
  body.mobile-nav-open .mobile-nav-drawer { transform:translateX(0) !important; }

  .main-content { width:100% !important; max-width:680px !important; margin:0 auto !important; padding:.75rem .55rem 4.75rem !important; }
  .page-grid,
  .page-grid-2,
  .page-grid-wide,
  .feed-layout,
  .home-layout,
  .profile-layout,
  .company-public-layout,
  .company-dashboard-layout,
  .notifications-layout,
  .jobs-layout { display:block !important; width:100% !important; max-width:100% !important; }
  .page-grid > aside,
  .feed-layout > aside,
  .home-layout > aside,
  .left-sidebar,
  .right-sidebar { display:none !important; }
  .page-grid > section,
  .page-grid > main,
  .feed-layout > main,
  .home-layout > main { width:100% !important; max-width:100% !important; }

  .card,
  .post-card,
  .sidebar-card,
  .profile-section,
  .company-section { width:100% !important; max-width:100% !important; border-radius:12px !important; overflow:hidden !important; }
  .post-compose { gap:.65rem !important; padding:.75rem !important; }
  .compose-trigger { min-width:0 !important; width:100% !important; height:auto !important; min-height:42px !important; font-size:.95rem !important; }
  .post-avatar,
  .comment-avatar { flex:0 0 auto !important; }
  .post-content,
  .comment-body,
  .msg-bubble { overflow-wrap:anywhere !important; word-break:break-word !important; }
  .post-actions { display:flex !important; justify-content:space-between !important; gap:.25rem !important; }
  .post-actions > * { flex:1 1 auto !important; min-width:0 !important; }
  .comment-replies { margin-left:.75rem !important; }
  .comment-main-row { gap:.45rem !important; }
  .post-media img,
  .post-media video,
  .activity-media img,
  .activity-media video { width:100% !important; height:auto !important; max-height:68dvh !important; object-fit:contain !important; background:#000 !important; }
}


/* v10.3 mobile UX polish + install prompt */
.pwa-install-card{position:fixed;left:12px;right:12px;bottom:calc(74px + env(safe-area-inset-bottom));z-index:1800;display:flex;align-items:center;gap:.75rem;background:#fff;border:1px solid var(--border);border-radius:16px;box-shadow:0 12px 35px rgba(13,27,42,.22);padding:.75rem .9rem}
.pwa-install-card[hidden]{display:none!important}.pwa-install-icon img{width:42px;height:42px;border-radius:12px}.pwa-install-copy{display:flex;flex-direction:column;min-width:0;flex:1;line-height:1.25}.pwa-install-copy strong{color:var(--navy);font-size:.95rem}.pwa-install-copy span{color:var(--text-mute);font-size:.82rem}.pwa-install-close{border:0;background:var(--surface);color:var(--text-mute);width:30px;height:30px;border-radius:50%;font-size:1.15rem;line-height:1;cursor:pointer;flex:0 0 auto}
@media (min-width:821px){.pwa-install-card{left:auto;right:24px;bottom:24px;width:min(420px,calc(100vw - 48px))}}

@media (max-width:820px){
  .navbar{height:64px!important;padding:0 .7rem!important}.navbar-inner{justify-content:flex-start!important;gap:.65rem!important}.navbar-brand{flex:0 0 48px!important;width:48px!important}.navbar-brand .brand-logo,.brand-icon{width:46px!important;height:46px!important;max-width:46px!important}.nav-search{display:none!important}.mobile-nav-toggle{order:2!important;border:1px solid var(--border)!important;border-radius:14px!important;background:#fff!important;color:var(--navy)!important;width:52px!important;height:52px!important;font-size:1.8rem!important;box-shadow:0 2px 10px rgba(13,27,42,.06)!important}.mobile-nav-drawer{left:0!important;right:auto!important;transform:translateX(-105%)!important;width:min(88vw,360px)!important}.mobile-nav-open .mobile-nav-drawer{transform:translateX(0)!important}
  .main-content{padding:.85rem .75rem calc(5rem + env(safe-area-inset-bottom))!important;max-width:100%!important}.card,.post-card,.profile-section,.company-section{border-radius:16px!important}.card-body{padding:1rem!important}.post-compose{padding:1rem!important;gap:.75rem!important}.post-compose .post-avatar{width:46px!important;height:46px!important}.compose-trigger,.post-compose input[type="text"]{font-size:1rem!important;min-height:50px!important;border-radius:999px!important}.post-compose-actions{padding:.8rem 1rem!important;gap:1.1rem!important;display:flex!important;flex-wrap:wrap!important}
  .post-header{padding:1rem 1rem .45rem!important;gap:.75rem!important}.post-avatar{width:48px!important;height:48px!important}.post-content{font-size:1.05rem!important;line-height:1.45!important;padding:.45rem 1rem 1rem!important}.post-actions{padding:.75rem .65rem!important;gap:.2rem!important}.post-actions .btn{font-size:.98rem!important;padding:.55rem .35rem!important;justify-content:center!important;min-height:42px!important}.post-media img,.post-media video,.post-image,.post-video{width:100%!important;max-height:70vh!important;object-fit:contain!important;background:#000!important}
  .post-menu-wrap,.comment-menu-wrap{position:static!important}.post-menu.open,.comment-menu.open{position:fixed!important;left:12px!important;right:12px!important;top:auto!important;bottom:calc(12px + env(safe-area-inset-bottom))!important;width:auto!important;min-width:0!important;max-width:none!important;border-radius:18px!important;z-index:1900!important;box-shadow:0 -12px 35px rgba(13,27,42,.28)!important;overflow:hidden!important}.post-menu-item{font-size:1.05rem!important;padding:1rem 1.15rem!important;min-height:56px!important}.post-menu-btn,.comment-menu-btn{min-width:44px!important;min-height:38px!important}
  .post-comments{overflow:visible!important}.comment{padding:.75rem .75rem!important}.comment-main-row{gap:.6rem!important}.comment-avatar{width:40px!important;height:40px!important}.comment-body{padding:.7rem .85rem!important;border-radius:14px!important}.comment-text{font-size:.98rem!important}.comment-actions-mini{font-size:.92rem!important;gap:1rem!important}.comment-replies{margin-left:1.1rem!important;padding-left:.6rem!important}.enhanced-comment-form,.comment-form{display:grid!important;grid-template-columns:auto auto auto minmax(0,1fr) auto!important;align-items:center!important;gap:.4rem!important;padding:.75rem!important}.comment-form .comment-avatar{display:none!important}.comment-form input,.enhanced-comment-form input[name=content]{min-width:0!important;width:100%!important;height:48px!important;font-size:1rem!important}.comment-tool-btn,.emoji-btn{width:44px!important;height:44px!important;min-width:44px!important}.comment-form .btn,.enhanced-comment-form .btn{width:48px!important;min-width:48px!important;height:48px!important;padding:0!important;overflow:hidden!important;border-radius:50%!important;font-size:0!important}.comment-form .btn::before,.enhanced-comment-form .btn::before{content:'➤';font-size:1rem!important;color:inherit}.emoji-picker,.mention-dropdown{max-width:calc(100vw - 24px)!important}
  .msg-input-bar,.message-input,.chat-input,.message-form{gap:.45rem!important;padding:.7rem!important}.msg-input-bar input,.message-form input{height:48px!important;font-size:1rem!important}.msg-input-bar .btn,.message-form .btn{height:48px!important;min-width:52px!important;padding:.4rem .8rem!important}.msg-bubble{max-width:88%!important}.msg-layout,.messages-shell,.messages-container{width:100%!important;max-width:100%!important}
}
@media (max-width:420px){.main-content{padding-left:.55rem!important;padding-right:.55rem!important}.post-card,.card{border-radius:14px!important}.post-actions .btn{font-size:.92rem!important}.comment-form,.enhanced-comment-form{grid-template-columns:auto auto auto minmax(0,1fr) 46px!important;gap:.32rem!important}.comment-tool-btn,.emoji-btn{width:40px!important;height:40px!important;min-width:40px!important}.comment-form .btn,.enhanced-comment-form .btn{width:46px!important;min-width:46px!important}.post-menu.open,.comment-menu.open{left:8px!important;right:8px!important}}

/* v10.4 - modal editor for posts/comments */
.edit-content-modal-overlay { z-index: 2200; }
.edit-content-modal-box { max-width: 620px; }
.edit-content-modal-textarea {
  min-height: 220px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: .9rem 1rem;
  background: #fff;
}
.edit-content-modal-textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(10,102,194,.10); }
.edit-content-modal-footer { gap: .75rem; }
.edit-content-tools, .edit-content-actions { display:flex; align-items:center; gap:.5rem; }
.edit-content-actions .btn { min-width: 92px; }
@media (max-width: 640px) {
  .edit-content-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .edit-content-modal-box {
    width: 100%;
    max-width: none;
    border-radius: 18px 18px 0 0;
    max-height: 88vh;
  }
  .edit-content-modal-body { padding: .85rem; }
  .edit-content-modal-textarea {
    min-height: 34vh;
    font-size: 1rem;
    line-height: 1.55;
  }
  .edit-content-modal-footer {
    padding: .75rem .85rem calc(.75rem + env(safe-area-inset-bottom));
  }
  .edit-content-actions { flex:1; justify-content:flex-end; }
  .edit-content-actions .btn { min-height: 44px; }
}

/* v10.5 - Comment/reply create modal */
.comment-modal-context{
  padding:.65rem 1.25rem;
  font-size:.9rem;
  color:var(--text-mute);
  border-bottom:1px solid var(--border);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.comment-modal-input-wrap{flex:1;position:relative;min-width:0}
.comment-modal-input-wrap textarea{
  width:100%;
  min-height:140px;
  border:1.5px solid var(--border);
  border-radius:var(--radius);
  padding:.8rem 1rem;
  font-family:inherit;
  font-size:1rem;
  line-height:1.45;
  resize:vertical;
  outline:none;
  background:#fff;
}
.comment-modal-input-wrap textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(10,102,194,.08)}
.comment-modal-tools{display:flex;align-items:center;gap:.5rem}
.comment-modal-emoji{position:absolute;left:0;bottom:calc(100% + .5rem);z-index:1200}
.comment-modal-media-preview{margin-top:.75rem;max-width:100%}
.comment-modal-media-preview img,.comment-modal-media-preview video{max-width:100%;max-height:260px;border-radius:12px;border:1px solid var(--border);object-fit:contain;background:#000}
.js-open-comment-modal input[readonly]{cursor:pointer;background:#fff}
.js-open-comment-modal{cursor:pointer}
@media (min-width: 760px){
  .comment-modal-overlay{align-items:center;padding:1rem}
  .comment-modal-box{border-radius:18px;max-width:640px;box-shadow:0 18px 50px rgba(0,0,0,.22)}
}
@media (max-width: 640px){
  .comment-modal-box{max-height:calc(100vh - 24px);display:flex;flex-direction:column}
  .comment-modal-body{padding:.85rem;gap:.6rem;overflow:auto}
  .comment-modal-header,.comment-modal-footer{padding:.8rem .95rem}
  .comment-modal-context{padding:.6rem .95rem;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .comment-modal-input-wrap textarea{min-height:170px;font-size:1.05rem;border-radius:16px}
  .comment-modal-submit{min-width:92px;height:44px;border-radius:999px}
}

/* v10.6 chat message edit/delete + branded PWA polish */
.msg-bubble-tools{display:flex;align-items:center;gap:.25rem;position:relative;margin-top:.05rem}
.msg-bubble-wrap.sent .msg-bubble-tools{justify-content:flex-end}
.msg-more-btn{border:0;background:transparent;color:var(--text-mute);font-weight:900;letter-spacing:.08em;line-height:1;border-radius:999px;padding:.12rem .35rem;cursor:pointer;opacity:.72}
.msg-more-btn:hover{background:#eef2f7;color:var(--navy);opacity:1}
.msg-action-menu{position:absolute;right:0;bottom:1.7rem;min-width:150px;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:0 12px 30px rgba(15,23,42,.16);overflow:hidden;z-index:30}
.msg-action-menu button{display:block;width:100%;border:0;background:#fff;padding:.75rem .85rem;text-align:left;font-weight:750;color:var(--text);cursor:pointer;white-space:nowrap}
.msg-action-menu button:hover{background:#f3f6f9}
.msg-action-menu button.danger{color:#d93025}
.msg-edited-label{font-size:.68rem;opacity:.7;margin-top:.18rem;text-align:right}
.msg-deleted-text{font-style:italic;opacity:.72}
.msg-bubble-wrap.deleted .msg-bubble{background:#eef2f7!important;color:#6b7b8d!important;border:1px dashed var(--border)!important}
@media(max-width:640px){.msg-action-menu{position:fixed;left:1rem;right:1rem;bottom:calc(env(safe-area-inset-bottom,0px) + 1rem);min-width:0;border-radius:18px}.msg-action-menu button{font-size:1rem;padding:1rem 1.1rem}.msg-more-btn{min-width:36px;min-height:30px}}


/* v11.2.4 - compact open-to-work badge redesign */
.open-work-mini-badge,
.open-work-search-badge,
.li-profile-open-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: .38rem !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin-top: .35rem !important;
  padding: .28rem .58rem !important;
  border-radius: 999px !important;
  background: #eef8f1 !important;
  color: #157347 !important;
  border: 1px solid #caead6 !important;
  font-size: .76rem !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  white-space: normal !important;
}
.open-work-mini-badge .work-badge-icon,
.open-work-search-badge .work-badge-icon,
.li-profile-open-badge .work-badge-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 16px !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 999px !important;
  background: #1a8f54 !important;
  color: #fff !important;
  font-size: .62rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}
.li-profile-open-badge:before { content: none !important; }
.open-work-widget-person {
  align-items: flex-start !important;
}
.open-work-widget-person > div {
  min-width: 0 !important;
}
.open-work-widget-person img,
.open-work-widget-person .avatar,
.open-work-widget-person .profile-avatar {
  flex: 0 0 auto !important;
}
@media (max-width: 700px) {
  .open-work-mini-badge,
  .open-work-search-badge,
  .li-profile-open-badge {
    font-size: .72rem !important;
    padding: .25rem .5rem !important;
  }
}


/* Release notes */
.release-page{max-width:920px;margin:0 auto;display:grid;gap:1rem}.release-hero{background:linear-gradient(135deg,var(--navy),var(--navy-mid));color:#fff;overflow:hidden}.release-hero h1{font-size:2rem;margin:.2rem 0 .4rem}.release-hero p{color:rgba(255,255,255,.82);margin:0}.release-eyebrow{text-transform:uppercase;letter-spacing:.08em;font-size:.78rem;font-weight:800;color:var(--gold)!important}.release-list{display:grid;gap:1rem}.release-card{overflow:hidden}.release-sticky{border:1px solid rgba(212,168,67,.55);box-shadow:0 10px 28px rgba(13,27,42,.09)}.release-card-body{padding:1.25rem}.release-card-top{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-bottom:.75rem}.release-version{font-weight:900;color:var(--navy);font-size:.95rem}.release-badge{display:inline-flex;align-items:center;gap:.25rem;border-radius:999px;padding:.2rem .55rem;background:#f3f6f8;color:var(--slate);font-size:.78rem;font-weight:800}.release-badge-sticky{background:#fff7db;color:#8a6500}.release-card h2{font-size:1.25rem;margin:0 0 .25rem;color:var(--text)}.release-date{font-size:.82rem;color:var(--text-mute);margin-bottom:.6rem}.release-summary{font-size:.95rem;color:var(--text);line-height:1.55}.release-body{color:var(--text);font-size:.92rem;line-height:1.6}.release-body h3{font-size:1rem;margin:1rem 0 .35rem}.release-body ul{margin:.4rem 0 .75rem;padding-left:1.25rem}.release-empty{text-align:center;color:var(--text-mute)}.release-sidebar-card strong{display:block;font-size:.95rem;line-height:1.3;margin:.15rem 0}.release-sidebar-card p{font-size:.84rem;color:var(--text-mute);line-height:1.45;margin:.4rem 0 .75rem}.release-sidebar-version{display:inline-flex;width:max-content;border-radius:999px;background:#eef7f1;color:var(--success);font-size:.76rem;font-weight:900;padding:.15rem .5rem;margin-bottom:.35rem}@media(max-width:680px){.release-page{padding:0 .25rem}.release-hero h1{font-size:1.55rem}.release-card-body{padding:1rem}}

/* v11.9.1 Comfinnity header logo polish */
.navbar-brand {
  display: flex;
  align-items: center;
  padding-right: 14px;
  min-width: 0;
}
.navbar-brand .brand-logo {
  height: 46px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  image-rendering: auto;
}
.navbar-brand .brand-icon {
  width: 46px;
  height: 46px;
}
@media (max-width: 820px) {
  .navbar-brand {
    flex: 0 0 52px !important;
    width: 52px !important;
    padding-right: 0 !important;
  }
  .navbar-brand .brand-logo,
  .navbar-brand .brand-icon {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    object-fit: contain !important;
  }
}
@media (max-width: 420px) {
  .navbar-brand {
    flex-basis: 46px !important;
    width: 46px !important;
  }
  .navbar-brand .brand-logo,
  .navbar-brand .brand-icon {
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
  }
}


/* Comfinnity v14.4 language flag dropdown + PWA install polish */
.auth-lang-menu-wrap{position:relative;display:inline-block;text-align:left;margin-bottom:1rem;z-index:20}
.auth-lang-btn{display:inline-flex;align-items:center;gap:.45rem;padding:.35rem .75rem;border:1.5px solid var(--border);border-radius:999px;background:#fff;color:var(--text);font-family:inherit;font-size:.86rem;line-height:1;cursor:pointer;min-width:156px;justify-content:space-between}
.auth-lang-btn-main{display:inline-flex;align-items:center;gap:.45rem;min-width:0}.auth-lang-caret{color:var(--text-mute);font-size:.75rem}
.auth-lang-menu{position:absolute;right:0;top:calc(100% + 6px);min-width:230px;max-height:340px;overflow:auto;background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:0 16px 40px rgba(13,27,42,.18);padding:.35rem;display:none;z-index:2000}
.auth-lang-menu-wrap.open .auth-lang-menu{display:block}.auth-lang-item{display:flex;align-items:center;gap:.55rem;padding:.55rem .65rem;border-radius:10px;color:var(--text);text-decoration:none;font-weight:650;font-size:.9rem;white-space:nowrap}.auth-lang-item:hover,.auth-lang-item.active{background:var(--surface);color:var(--navy)}
.lang-flag-img,.auth-lang-flag{width:20px;height:14px;border-radius:2px;object-fit:cover;box-shadow:0 0 0 1px rgba(13,27,42,.08);flex:0 0 auto}.lang-flag-fallback{font-size:1rem;line-height:1;display:inline-block;width:20px;text-align:center}.auth-lang-code{font-size:.72rem;font-weight:900;color:var(--text-mute);min-width:22px;text-transform:uppercase}.auth-lang-name{overflow:hidden;text-overflow:ellipsis}
@media(max-width:620px){.auth-lang-menu{left:50%;right:auto;transform:translateX(-50%);max-width:calc(100vw - 32px)}}


/* Comfinnity v14.4.1 - language switcher alignment fix */
.land-nav-inner,
.land-nav-links {
  align-items: center;
}

.land-nav-links {
  gap: .65rem;
}

.land-nav-links .auth-lang-menu-wrap {
  margin-bottom: 0 !important;
  display: flex;
  align-items: center;
  align-self: center;
  line-height: 1;
}

.land-nav-links .auth-lang-btn,
.land-nav-links .btn-land-outline,
.land-nav-links .btn-land-fill {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
}

.land-nav-links .auth-lang-btn {
  min-width: 196px;
  padding: 0 .85rem;
}

.land-nav-links .auth-lang-btn-main {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  line-height: 1;
}

.land-nav-links .auth-lang-caret {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.land-nav-links .lang-flag-img {
  display: block;
  flex: 0 0 auto;
}

@media (max-width: 620px) {
  .land-nav {
    padding: 0 1rem;
  }

  .land-nav-inner {
    gap: .5rem;
  }

  .land-nav-links {
    gap: .45rem;
  }

  .land-nav-links .auth-lang-btn {
    min-width: auto;
    width: 74px;
    padding: 0 .55rem;
  }

  .land-nav-links .auth-lang-btn-main span:nth-of-type(2) {
    display: none;
  }

  .land-nav-links .btn-land-outline,
  .land-nav-links .btn-land-fill {
    height: 38px;
    padding: 0 .9rem;
  }
}

/* Comfinnity v14.6 - Mobile LinkedIn-style layout */
@media (max-width: 768px) {
  html, body { max-width: 100%; overflow-x: hidden; background: #f3f2ef; }
  body { padding-bottom: 72px; }

  .navbar {
    position: sticky; top: 0; height: 58px; padding: 0 .75rem;
    box-shadow: 0 1px 0 rgba(0,0,0,.08); border-bottom: 1px solid #e6e2dc;
    background: #fff; z-index: 1000;
  }
  .navbar-inner { max-width: none; width: 100%; gap: .55rem; justify-content: flex-start; }
  .navbar-brand { flex: 0 0 auto; width: 38px; overflow: hidden; }
  .navbar-brand .brand-logo {
    width: 36px !important; height: 36px !important; max-width: 36px !important;
    object-fit: contain; object-position: left center; border-radius: 8px;
  }
  .nav-search { display: block !important; flex: 1 1 auto; max-width: none; min-width: 0; order: 2; }
  .nav-search form { position: relative; }
  .nav-search form::before {
    content: "⌕"; position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
    color: #5f6f7a; font-size: 1.65rem; line-height: 1; z-index: 1;
  }
  .nav-search form input {
    height: 40px; padding: .55rem .9rem .55rem 2.35rem; border: 0; border-radius: 10px;
    background: #eef3f8; font-size: 1rem; color: #263238; box-shadow: none;
  }
  .mobile-nav-toggle { display: none !important; }
  .nav-links {
    position: fixed; left: 0; right: 0; bottom: 0; height: 62px; background: #fff;
    border-top: 1px solid #dadde1; display: grid !important; grid-template-columns: repeat(5, 1fr);
    gap: 0; padding: .22rem .15rem calc(.22rem + env(safe-area-inset-bottom));
    z-index: 1200; box-shadow: 0 -1px 6px rgba(0,0,0,.08);
  }
  .nav-links li { min-width: 0; }
  .nav-icon {
    height: 56px; padding: .25rem .1rem; border-radius: 0; justify-content: center;
    gap: .1rem; font-size: .68rem; color: #5f6368;
  }
  .nav-icon svg { width: 24px; height: 24px; }
  .nav-icon.active, .nav-icon:hover { background: transparent; color: var(--navy); }
  .badge { top: 3px; right: 22%; }
  .lang-switcher, .nav-profile { display: none !important; }

  .main-content { padding: .55rem 0 0 !important; margin: 0 !important; width: 100%; }
  .container, .page-container, .content, .feed-container, .feed-layout, .main-grid, .layout,
  .profile-layout, .search-layout {
    width: 100% !important; max-width: 100% !important; margin: 0 !important;
    padding-left: 0 !important; padding-right: 0 !important; grid-template-columns: 1fr !important;
  }
  .left-sidebar, .right-sidebar, .sidebar, .feed-sidebar, .desktop-only, aside:not(.mobile-nav-drawer) {
    display: none !important;
  }
  .card, .post-card, .feed-card, .composer-card, .profile-card, .job-card, .company-card {
    border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important;
    margin: 0 0 .5rem !important; box-shadow: none !important;
  }
  .post-card, .feed-card { background: #fff; }
  .post-header, .feed-post-header { padding: .75rem .9rem .35rem !important; gap: .65rem; }
  .post-body, .post-content, .feed-post-body {
    padding-left: .9rem !important; padding-right: .9rem !important; font-size: 1rem; line-height: 1.42;
  }
  .post-media, .post-image, .post-video, .post-card img.post-img, .feed-card img.post-img {
    width: 100% !important; max-width: 100% !important; border-radius: 0 !important;
  }
  .post-actions, .feed-actions {
    display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 0;
    border-top: 1px solid #eef0f2; padding: .25rem 0 !important;
  }
  .post-actions button, .post-actions a, .feed-actions button, .feed-actions a {
    justify-content: center; padding: .65rem .25rem !important; font-size: .92rem;
  }
  .comment-row, .comment-item, .reply-row, .reply-item { padding: .55rem .85rem !important; }
  .comment-composer, .comment-form, .reply-composer, .reply-form {
    position: sticky; bottom: 62px; background: #fff; padding: .55rem .75rem !important;
    border-top: 1px solid #e7e7e7; z-index: 50;
  }
  .comment-modal, .modal-content {
    width: 100vw !important; max-width: 100vw !important; min-height: 100dvh;
    border-radius: 0 !important; margin: 0 !important;
  }
  .modal-dialog { margin: 0 !important; max-width: 100vw !important; }

  .messages-main, .messages-page, .msg-layout {
    height: calc(100dvh - 120px) !important; padding: 0 !important;
    border-radius: 0 !important; border: 0 !important; box-shadow: none !important;
  }
  .msg-sidebar, .conversation-list, .messages-list {
    width: 100% !important; max-width: 100% !important; border-right: 0 !important; background: #fff;
  }
  .conversation-item, .msg-thread, .message-thread {
    min-height: 74px; padding: .75rem .9rem !important; border-bottom: 1px solid #edf0f2;
    display: flex; align-items: center; gap: .75rem;
  }
  .conversation-item img, .msg-thread img, .message-thread img {
    width: 54px !important; height: 54px !important; border-radius: 50% !important; object-fit: cover;
  }
  .conversation-title, .msg-thread-title, .message-thread-title {
    font-size: 1.05rem !important; font-weight: 650; color: #1f2933;
  }
  .conversation-preview, .msg-thread-preview, .message-thread-preview {
    font-size: .95rem !important; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .msg-panel, .message-panel, .chat-panel {
    position: fixed; inset: 58px 0 62px 0; background: #fff; z-index: 1100;
  }

  .land-nav { padding: 0 .85rem; }
  .land-nav-inner { height: 58px; gap: .5rem; }
  .land-brand img { height: 34px !important; max-width: 96px !important; }
  .land-nav-links { gap: .35rem; }
  .land-nav-links .auth-lang-btn {
    width: 68px; min-width: 68px; height: 36px; padding: 0 .45rem;
  }
  .land-nav-links .auth-lang-btn-main span:nth-of-type(2) { display: none; }
  .land-nav-links .btn-land-outline, .land-nav-links .btn-land-fill {
    height: 36px; padding: 0 .8rem; font-size: .86rem;
  }
  .hero { display: block !important; padding: 1rem 1rem 2rem !important; }
  .hero-text { display: none; }
  .login-card { border-radius: 14px; padding: 1.25rem; }
}
.mobile-compose-fab { display:none; }
@media (max-width:768px) {
  .mobile-compose-fab {
    display:flex; position:fixed; right:1rem; bottom:5.2rem; width:58px; height:58px;
    border-radius:50%; background:var(--navy); color:#fff; align-items:center; justify-content:center;
    font-size:1.65rem; font-weight:800; text-decoration:none; box-shadow:0 6px 18px rgba(13,27,42,.28);
    z-index:1150;
  }
}
@media (max-width: 420px) {
  .land-nav-links .btn-land-outline { display: none; }
  .nav-icon span { font-size: .62rem; }
  .nav-search form input { font-size: .95rem; }
}


/* Comfinnity v14.6.1 - mobile comment/upload cleanup */
.mobile-compose-fab { display: none !important; }

.comment-form input[type="file"],
.comment-composer input[type="file"],
.comment-modal input[type="file"],
.comment-modal label[for*="file"],
.comment-form label[for*="file"],
.comment-composer label[for*="file"],
.reply-form input[type="file"],
.reply-composer input[type="file"],
.reply-form label[for*="file"],
.reply-composer label[for*="file"],
.comment-modal .attachment-btn,
.comment-modal .upload-btn,
.comment-modal .media-upload-btn,
.comment-modal .comment-upload-btn,
.comment-modal .reply-upload-btn,
.comment-composer .attachment-btn,
.comment-composer .upload-btn,
.comment-composer .media-upload-btn,
.reply-composer .attachment-btn,
.reply-composer .upload-btn,
.reply-composer .media-upload-btn {
  display: none !important;
}

.comment-modal .comment-composer > button:nth-of-type(3),
.comment-modal .comment-form > button:nth-of-type(3),
.comment-modal .comment-input-bar > button:nth-of-type(3),
.comment-composer .comment-tools > button:nth-of-type(3),
.comment-form .comment-tools > button:nth-of-type(3) {
  display: none !important;
}

@media (max-width: 768px) {
  .comment-composer,
  .comment-form,
  .reply-composer,
  .reply-form {
    gap: .45rem;
  }
}


/* Comfinnity v14.6.2 - mobile comments/replies/header polish */
@media (max-width: 768px) {
  /* Header search: remove broken pseudo icon and make spacing clean */
  .nav-search form::before {
    content: none !important;
    display: none !important;
  }

  .nav-search form input {
    padding-left: .95rem !important;
    height: 42px !important;
    line-height: 42px !important;
    font-size: .96rem !important;
  }

  .navbar-brand {
    width: 44px !important;
    min-width: 44px !important;
    flex-basis: 44px !important;
  }

  .navbar-brand .brand-logo {
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
  }

  /* Comment modal/list: keep all comments and replies visible above composer */
  .comment-modal,
  .modal-content {
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .comment-modal .modal-body,
  .comment-modal .comments-list,
  .comment-modal .comment-list,
  .comment-modal .comments-body,
  .comment-modal .comments-scroll,
  .comments-modal-body,
  .comments-list,
  .comment-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    padding-bottom: 96px !important;
    -webkit-overflow-scrolling: touch;
  }

  .comment-row,
  .comment-item,
  .reply-row,
  .reply-item {
    display: flex !important;
    align-items: flex-start !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .comment-bubble,
  .reply-bubble,
  .comment-content,
  .reply-content {
    width: auto !important;
    max-width: calc(100vw - 96px) !important;
    min-width: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* Composer fixed to bottom, but not covering the visible list */
  .comment-composer,
  .comment-form,
  .comment-input-bar,
  .reply-composer,
  .reply-form {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    min-height: 72px !important;
    background: #fff !important;
    border-top: 1px solid #dfe3e7 !important;
    z-index: 2500 !important;
    display: flex !important;
    align-items: center !important;
    gap: .45rem !important;
    padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom)) !important;
    box-sizing: border-box !important;
  }

  .comment-composer input[type="text"],
  .comment-form input[type="text"],
  .comment-input-bar input[type="text"],
  .comment-composer textarea,
  .comment-form textarea,
  .comment-input-bar textarea,
  .reply-composer input[type="text"],
  .reply-form input[type="text"],
  .reply-composer textarea,
  .reply-form textarea {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 88px !important;
    border-radius: 999px !important;
    padding: .55rem .95rem !important;
    font-size: .95rem !important;
    resize: none !important;
  }

  /* Make the post/send button smaller and aligned */
  .comment-composer button[type="submit"],
  .comment-form button[type="submit"],
  .comment-input-bar button[type="submit"],
  .reply-composer button[type="submit"],
  .reply-form button[type="submit"],
  .comment-composer .send-comment,
  .comment-form .send-comment,
  .comment-input-bar .send-comment,
  .comment-composer .btn-submit,
  .comment-form .btn-submit {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0 !important;
    line-height: 1 !important;
  }

  .comment-composer button[type="submit"]::before,
  .comment-form button[type="submit"]::before,
  .comment-input-bar button[type="submit"]::before,
  .reply-composer button[type="submit"]::before,
  .reply-form button[type="submit"]::before,
  .comment-composer .send-comment::before,
  .comment-form .send-comment::before,
  .comment-input-bar .send-comment::before,
  .comment-composer .btn-submit::before,
  .comment-form .btn-submit::before {
    content: "➤";
    font-size: 1.15rem;
    color: #fff;
    transform: translateX(1px);
  }

  .comment-composer .emoji-btn,
  .comment-form .emoji-btn,
  .comment-input-bar .emoji-btn,
  .comment-composer button:not([type="submit"]),
  .comment-form button:not([type="submit"]),
  .comment-input-bar button:not([type="submit"]) {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 50% !important;
    flex: 0 0 auto !important;
  }

  /* Hide any remaining upload/paperclip style control, including unlabeled third action button */
  .comment-composer button:nth-of-type(n+3):not([type="submit"]),
  .comment-form button:nth-of-type(n+3):not([type="submit"]),
  .comment-input-bar button:nth-of-type(n+3):not([type="submit"]),
  .reply-composer button:nth-of-type(n+3):not([type="submit"]),
  .reply-form button:nth-of-type(n+3):not([type="submit"]),
  .comment-composer label,
  .comment-form label,
  .comment-input-bar label,
  .reply-composer label,
  .reply-form label {
    display: none !important;
  }
}

/* Desktop comment modal should also not show upload/paperclip actions */
.comment-composer input[type="file"],
.comment-form input[type="file"],
.comment-input-bar input[type="file"],
.reply-composer input[type="file"],
.reply-form input[type="file"],
.comment-composer label[for*="file"],
.comment-form label[for*="file"],
.comment-input-bar label[for*="file"],
.reply-composer label[for*="file"],
.reply-form label[for*="file"] {
  display: none !important;
}


/* Comfinnity v14.6.3 - mobile reply context bar */
@media (max-width: 768px) {
  .comment-composer,
  .comment-form,
  .comment-input-bar,
  .reply-composer,
  .reply-form {
    min-height: 82px !important;
    padding-top: 1.35rem !important;
  }

  .mobile-reply-context {
    position: fixed;
    left: .75rem;
    right: .75rem;
    bottom: 64px;
    z-index: 2600;
    background: #eef3f8;
    color: #536b7a;
    border: 1px solid #d7e0e7;
    border-radius: 999px;
    min-height: 30px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .3rem .45rem .3rem .75rem;
    font-size: .82rem;
    line-height: 1.15;
    box-shadow: 0 3px 12px rgba(13,27,42,.12);
  }

  .mobile-reply-context.is-visible {
    display: flex;
  }

  .mobile-reply-context strong {
    color: var(--navy);
    font-weight: 800;
  }

  .mobile-reply-context button {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: #617180 !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    padding: 0 !important;
  }

  .mobile-reply-target {
    outline: 2px solid rgba(13, 91, 153, .18);
    outline-offset: 2px;
  }

  .post-actions,
  .feed-actions,
  .comment-actions,
  .reply-actions {
    position: relative;
    z-index: 10;
  }

  .post-actions .comment-btn,
  .post-actions [data-action="comment"],
  .feed-actions .comment-btn,
  .feed-actions [data-action="comment"],
  .comment-actions .reply-btn,
  .comment-actions [data-action="reply"],
  .reply-actions .reply-btn,
  .reply-actions [data-action="reply"] {
    display: inline-flex !important;
    visibility: visible !important;
  }

  .comment-modal .comments-list,
  .comment-modal .comment-list,
  .comments-list,
  .comment-list {
    padding-bottom: 126px !important;
  }
}


/* Comfinnity v14.6.4 - keep mobile bottom navigation visible */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
  }

  .nav-links {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 64px !important;
    z-index: 5000 !important;
    background: #fff !important;
    border-top: 1px solid #d8dde3 !important;
  }

  .nav-profile,
  .lang-switcher {
    display: none !important;
  }

  /* Composer must sit ABOVE bottom navigation, not over it */
  .comment-composer,
  .comment-form,
  .comment-input-bar,
  .reply-composer,
  .reply-form {
    position: sticky !important;
    bottom: calc(64px + env(safe-area-inset-bottom)) !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    min-height: 66px !important;
    padding: .45rem .75rem !important;
    margin: 0 !important;
    z-index: 2100 !important;
    background: #fff !important;
    border-top: 1px solid #dfe3e7 !important;
    box-sizing: border-box !important;
  }

  /* If the comment bar is inside a modal, still keep nav visible below */
  .comment-modal .comment-composer,
  .comment-modal .comment-form,
  .comment-modal .comment-input-bar,
  .comment-modal .reply-composer,
  .comment-modal .reply-form,
  .modal-content .comment-composer,
  .modal-content .comment-form,
  .modal-content .comment-input-bar {
    position: sticky !important;
    bottom: calc(64px + env(safe-area-inset-bottom)) !important;
  }

  .comment-modal,
  .modal-content {
    max-height: calc(100dvh - 64px - env(safe-area-inset-bottom)) !important;
    min-height: auto !important;
    height: calc(100dvh - 64px - env(safe-area-inset-bottom)) !important;
    margin-bottom: calc(64px + env(safe-area-inset-bottom)) !important;
  }

  .comment-modal .modal-body,
  .comment-modal .comments-list,
  .comment-modal .comment-list,
  .comment-modal .comments-body,
  .comment-modal .comments-scroll,
  .comments-modal-body,
  .comments-list,
  .comment-list {
    padding-bottom: 92px !important;
  }

  .mobile-reply-context {
    bottom: calc(132px + env(safe-area-inset-bottom)) !important;
    z-index: 2200 !important;
  }

  /* Make mobile send button calm and aligned */
  .comment-composer button[type="submit"],
  .comment-form button[type="submit"],
  .comment-input-bar button[type="submit"],
  .reply-composer button[type="submit"],
  .reply-form button[type="submit"],
  .mobile-comment-submit {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    border-radius: 999px !important;
    padding: 0 !important;
  }

  .comment-composer input[type="text"],
  .comment-form input[type="text"],
  .comment-input-bar input[type="text"],
  .comment-composer textarea,
  .comment-form textarea,
  .comment-input-bar textarea,
  .reply-composer input[type="text"],
  .reply-form input[type="text"],
  .reply-composer textarea,
  .reply-form textarea {
    height: 44px !important;
    min-height: 44px !important;
  }
}

/* Force mobile nav back if old modal CSS hides it */
@media (max-width: 768px) {
  body.comment-open .nav-links,
  body.modal-open .nav-links {
    display: grid !important;
  }
}


/* Comfinnity v14.7 - Mobile UX overhaul: single comment sheet + mobile action sheet */
@media (max-width: 768px) {
  :root {
    --mobile-topbar-h: 58px;
    --mobile-bottomnav-h: 64px;
  }

  body {
    padding-bottom: calc(var(--mobile-bottomnav-h) + env(safe-area-inset-bottom)) !important;
  }

  body.mobile-comment-sheet-open {
    overflow: hidden !important;
  }

  /* Bottom nav always wins */
  .nav-links {
    display: grid !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: var(--mobile-bottomnav-h) !important;
    z-index: 9000 !important;
    background: #fff !important;
    border-top: 1px solid #d8dde3 !important;
    box-shadow: 0 -1px 8px rgba(0,0,0,.08) !important;
  }

  /* Do not show old inline/sticky composers inside the feed on mobile */
  body:not(.mobile-comment-sheet-open) .comment-composer,
  body:not(.mobile-comment-sheet-open) .comment-form,
  body:not(.mobile-comment-sheet-open) .comment-input-bar,
  body:not(.mobile-comment-sheet-open) .reply-composer,
  body:not(.mobile-comment-sheet-open) .reply-form {
    display: none !important;
  }

  /* Hide legacy modal layer on mobile when the new sheet is active */
  body.mobile-comment-sheet-open .comment-modal,
  body.mobile-comment-sheet-open .modal-content,
  body.mobile-comment-sheet-open .modal-dialog {
    display: none !important;
  }

  .mobile-reply-context {
    display: none !important;
  }

  .cf-mobile-sheet-backdrop {
    position: fixed;
    inset: 0 0 var(--mobile-bottomnav-h) 0;
    background: rgba(0,0,0,.42);
    z-index: 8100;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
  }

  .cf-mobile-sheet-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .cf-mobile-comment-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-bottomnav-h) + env(safe-area-inset-bottom));
    height: min(74dvh, calc(100dvh - var(--mobile-topbar-h) - var(--mobile-bottomnav-h)));
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 34px rgba(13,27,42,.22);
    z-index: 8200;
    display: none;
    flex-direction: column;
    overflow: hidden;
  }

  .cf-mobile-comment-sheet.is-open {
    display: flex;
  }

  .cf-mobile-sheet-handle {
    width: 42px;
    height: 4px;
    background: #c8d0d8;
    border-radius: 99px;
    margin: .5rem auto .25rem;
    flex: 0 0 auto;
  }

  .cf-mobile-sheet-head {
    min-height: 48px;
    padding: .35rem .9rem .55rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eef0f2;
    flex: 0 0 auto;
  }

  .cf-mobile-sheet-title {
    font-weight: 800;
    color: var(--navy);
    font-size: .98rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .cf-mobile-sheet-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #f2f5f7;
    color: #53616e;
    font-size: 1.35rem;
    line-height: 1;
  }

  .cf-mobile-sheet-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #f3f2ef;
    padding: .35rem 0;
  }

  .cf-mobile-sheet-list .comment-row,
  .cf-mobile-sheet-list .comment-item,
  .cf-mobile-sheet-list .reply-row,
  .cf-mobile-sheet-list .reply-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: .6rem !important;
    padding: .6rem .85rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .cf-mobile-sheet-list .comment-bubble,
  .cf-mobile-sheet-list .reply-bubble,
  .cf-mobile-sheet-list .comment-content,
  .cf-mobile-sheet-list .reply-content {
    max-width: calc(100vw - 84px) !important;
    width: 100% !important;
    border-radius: 14px !important;
    background: #fff !important;
    padding: .7rem .85rem !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .cf-mobile-sheet-list img,
  .cf-mobile-sheet-list .avatar,
  .cf-mobile-sheet-list .comment-avatar {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex: 0 0 auto !important;
  }

  .cf-mobile-reply-chip {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    background: #eef3f8;
    color: #536b7a;
    border-top: 1px solid #d7e0e7;
    padding: .45rem .75rem;
    font-size: .82rem;
    flex: 0 0 auto;
  }

  .cf-mobile-reply-chip.is-visible {
    display: flex;
  }

  .cf-mobile-reply-chip strong {
    color: var(--navy);
  }

  .cf-mobile-reply-chip button {
    border: 0;
    background: transparent;
    color: #617180;
    font-size: 1.1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
  }

  .cf-mobile-sheet-composer {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom));
    border-top: 1px solid #dfe3e7;
    background: #fff;
    flex: 0 0 auto;
  }

  .cf-mobile-sheet-composer .cf-mobile-emoji,
  .cf-mobile-sheet-composer .cf-mobile-hash {
    width: 42px;
    height: 42px;
    border: 1px solid #dce4eb;
    background: #fff;
    border-radius: 999px;
    color: var(--navy);
    font-size: 1rem;
    flex: 0 0 auto;
  }

  .cf-mobile-sheet-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    border-radius: 999px;
    border: 1px solid #dce4eb;
    background: #fff;
    padding: .55rem .95rem;
    font-size: .95rem;
    outline: none;
  }

  .cf-mobile-sheet-submit {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
    flex: 0 0 auto;
  }

  .cf-mobile-sheet-submit:disabled {
    opacity: .45;
  }

  /* Mobile post three-dot menu as bottom action sheet */
  .cf-mobile-action-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 8300;
    display: none;
  }

  .cf-mobile-action-backdrop.is-open {
    display: block;
  }

  .cf-mobile-action-sheet {
    position: fixed;
    left: .75rem;
    right: .75rem;
    bottom: calc(var(--mobile-bottomnav-h) + .75rem + env(safe-area-inset-bottom));
    z-index: 8400;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 -10px 28px rgba(13,27,42,.22);
    overflow: hidden;
    display: none;
  }

  .cf-mobile-action-sheet.is-open {
    display: block;
  }

  .cf-mobile-action-sheet a,
  .cf-mobile-action-sheet button {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border: 0;
    border-bottom: 1px solid #eef0f2;
    background: #fff;
    color: #1f2933;
    font-size: 1rem;
    text-align: left;
    text-decoration: none;
  }

  .cf-mobile-action-sheet a:last-child,
  .cf-mobile-action-sheet button:last-child {
    border-bottom: 0;
  }

  .post-menu:not(.cf-mobile-action-sheet),
  .nav-dropdown {
    max-height: calc(100dvh - 120px);
  }
}


/* Comfinnity v14.7.1 - mobile modal cleanup */
@media (max-width: 768px) {
  /* Hide old desktop comment modal completely on mobile */
  body.mobile-comment-sheet-open .comment-modal,
  body.mobile-comment-sheet-open .modal,
  body.mobile-comment-sheet-open .modal-dialog,
  body.mobile-comment-sheet-open .modal-content,
  body.mobile-comment-sheet-open [role="dialog"]:not(.cf-mobile-comment-sheet),
  body.mobile-comment-sheet-open .comment-dialog,
  body.mobile-comment-sheet-open .comments-dialog {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Keep our mobile sheet visible */
  body.mobile-comment-sheet-open .cf-mobile-comment-sheet {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .cf-mobile-sheet-backdrop {
    background: rgba(0,0,0,.28) !important;
  }

  .cf-mobile-comment-sheet {
    height: min(82dvh, calc(100dvh - 84px - var(--mobile-bottomnav-h))) !important;
    max-height: calc(100dvh - 84px - var(--mobile-bottomnav-h)) !important;
  }

  .cf-mobile-sheet-list {
    padding-bottom: .75rem !important;
  }

  .cf-mobile-sheet-composer {
    min-height: 62px !important;
  }

  .cf-mobile-sheet-input {
    height: 42px !important;
  }

  .cf-mobile-sheet-submit,
  .cf-mobile-sheet-composer .cf-mobile-emoji,
  .cf-mobile-sheet-composer .cf-mobile-hash {
    width: 42px !important;
    height: 42px !important;
  }
}


/* Comfinnity v14.7.2 - hard block legacy comment modal on mobile */
@media (max-width: 768px) {
  body.cf-mobile-comment-active .comment-modal,
  body.cf-mobile-comment-active .comments-modal,
  body.cf-mobile-comment-active .modal.comment-modal,
  body.cf-mobile-comment-active .modal.comments-modal,
  body.cf-mobile-comment-active .modal-dialog,
  body.cf-mobile-comment-active .modal-content,
  body.cf-mobile-comment-active [class*="comment"][class*="modal"]:not(.cf-mobile-comment-sheet),
  body.cf-mobile-comment-active [id*="comment"][id*="modal"],
  body.cf-mobile-comment-active [role="dialog"]:not(.cf-mobile-comment-sheet) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(100vh) !important;
  }

  body.cf-mobile-comment-active .cf-mobile-comment-sheet {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  body.cf-mobile-comment-active .cf-mobile-sheet-backdrop {
    display: block !important;
  }

  body.cf-mobile-comment-active .modal-backdrop,
  body.cf-mobile-comment-active .comment-backdrop,
  body.cf-mobile-comment-active [class*="backdrop"]:not(.cf-mobile-sheet-backdrop):not(.cf-mobile-action-backdrop) {
    display: none !important;
  }

  .cf-mobile-comment-sheet {
    bottom: calc(64px + env(safe-area-inset-bottom)) !important;
    z-index: 9200 !important;
  }

  .cf-mobile-sheet-backdrop {
    z-index: 9100 !important;
  }

  .nav-links {
    z-index: 9500 !important;
  }
}

/* Comfinnity v14.7.3 - mobile comment buttons */
@media (max-width: 768px) {
  .cf-mobile-sheet-composer .cf-mobile-emoji,
  .cf-mobile-sheet-composer .cf-mobile-hash {
    cursor: pointer !important;
    pointer-events: auto !important;
  }
  .cf-optimistic-comment {
    opacity: .8;
  }
}

/* Comfinnity v14.7.5 - mobile comment action sheet */
@media (max-width: 768px) {
  .cf-comment-action-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.32);
    z-index: 9600;
  }

  .cf-comment-action-sheet {
    position: fixed;
    left: .75rem;
    right: .75rem;
    bottom: calc(64px + .75rem + env(safe-area-inset-bottom));
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 -10px 28px rgba(13,27,42,.24);
    overflow: hidden;
    z-index: 9700;
  }

  .cf-comment-action-sheet button {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-bottom: 1px solid #eef0f2;
    background: #fff;
    color: #1f2933;
    text-align: left;
    padding: .85rem 1rem;
    font-size: 1rem;
  }

  .cf-comment-action-sheet button.danger {
    color: #b42318;
  }

  .cf-comment-action-sheet button:last-child {
    border-bottom: 0;
    text-align: center;
    color: #64748b;
  }
}

/* Comfinnity v14.7.6 - force visible mobile comment dots menu */
@media (max-width: 768px) {
  .cf-comment-action-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,.35) !important;
    z-index: 9900 !important;
    display: block !important;
  }

  .cf-comment-action-sheet {
    position: fixed !important;
    left: .75rem !important;
    right: .75rem !important;
    bottom: calc(64px + .75rem + env(safe-area-inset-bottom)) !important;
    background: #fff !important;
    border-radius: 18px !important;
    box-shadow: 0 -10px 28px rgba(13,27,42,.28) !important;
    overflow: hidden !important;
    z-index: 10000 !important;
    display: block !important;
  }

  .cf-comment-action-sheet button {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 58px !important;
    border: 0 !important;
    border-bottom: 1px solid #eef0f2 !important;
    background: #fff !important;
    color: #1f2933 !important;
    text-align: left !important;
    padding: .9rem 1rem !important;
    font-size: 1rem !important;
    font-weight: 650 !important;
  }

  .cf-comment-action-sheet button.danger {
    color: #b42318 !important;
  }

  .cf-comment-action-sheet button:last-child {
    justify-content: center !important;
    color: #64748b !important;
    font-weight: 700 !important;
  }
}

/* Comfinnity v14.7.7 - mobile reply/comment dots action sheet */
@media (max-width: 768px) {
  .cf-reply-action-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,.36) !important;
    z-index: 2147483600 !important;
  }

  .cf-reply-action-sheet {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: calc(64px + 12px + env(safe-area-inset-bottom)) !important;
    background: #fff !important;
    border-radius: 18px !important;
    box-shadow: 0 -12px 34px rgba(0,0,0,.32) !important;
    overflow: hidden !important;
    z-index: 2147483601 !important;
  }

  .cf-reply-action-sheet button {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 58px !important;
    border: 0 !important;
    border-bottom: 1px solid #eef0f2 !important;
    background: #fff !important;
    color: #1f2933 !important;
    text-align: left !important;
    padding: .9rem 1rem !important;
    font-size: 1rem !important;
    font-weight: 650 !important;
  }

  .cf-reply-action-sheet button.danger {
    color: #b42318 !important;
  }

  .cf-reply-action-sheet button:last-child {
    justify-content: center !important;
    color: #64748b !important;
  }
}

/* Comfinnity v14.7.8 - mobile Jobs + Network pages */
@media (max-width:768px){
  .main-content{padding-bottom:calc(78px + env(safe-area-inset-bottom))!important}
  .page-title,.content h1,.main-content h1{font-size:1.85rem!important;line-height:1.15!important;padding:1rem 1rem .75rem!important;margin:0!important}

  .jobs-page,.jobs-container,.jobs-layout,.jobs-wrapper,.job-search-page{width:100%!important;max-width:100%!important;margin:0!important;padding:0!important}
  .jobs-search,.job-search,.jobs-filter,.job-filters,form[action*="jobs"],.jobs-page form,.job-search-page form{
    display:grid!important;grid-template-columns:1fr!important;gap:.75rem!important;width:100%!important;
    padding:1rem!important;margin:0!important;box-sizing:border-box!important;background:#fff!important;
    border-top:1px solid #e4e7eb!important;border-bottom:1px solid #e4e7eb!important
  }
  .jobs-search input,.job-search input,.jobs-filter input,.job-filters input,.jobs-search select,.job-search select,.jobs-filter select,.job-filters select,.jobs-page form input,.jobs-page form select,.job-search-page form input,.job-search-page form select{
    width:100%!important;min-width:0!important;height:48px!important;border-radius:12px!important;font-size:.98rem!important;padding:0 .95rem!important;box-sizing:border-box!important
  }
  .jobs-search button,.job-search button,.jobs-filter button,.job-filters button,.jobs-page form button,.job-search-page form button{
    width:100%!important;height:50px!important;border-radius:999px!important;font-size:1rem!important;font-weight:800!important;justify-content:center!important
  }
  .jobs-empty,.empty-state,.no-results,.no-jobs,.jobs-page .muted,.job-search-page .muted{
    margin:0!important;padding:1.6rem 1rem!important;text-align:center!important;font-size:1rem!important;color:#6b7f91!important;background:#fff!important;border-bottom:1px solid #e4e7eb!important
  }
  .job-card,.jobs-list .card,.jobs-list article,.job-list .card,.job-list article{
    margin:.6rem .75rem!important;padding:1rem!important;border-radius:16px!important;border:1px solid #e4e7eb!important;background:#fff!important;box-shadow:none!important
  }

  .network-page,.connections-page,.network-container,.connections-container{width:100%!important;max-width:100%!important;margin:0!important;padding:0!important}
  .tabs,.network-tabs,.connections-tabs,.profile-tabs{
    display:flex!important;overflow-x:auto!important;white-space:nowrap!important;gap:0!important;padding:0 .75rem!important;background:#fff!important;border-bottom:1px solid #dbe2ea!important;position:sticky!important;top:58px!important;z-index:50!important
  }
  .tabs a,.tabs button,.network-tabs a,.network-tabs button,.connections-tabs a,.connections-tabs button,.profile-tabs a,.profile-tabs button{
    flex:0 0 auto!important;min-height:48px!important;padding:0 .85rem!important;display:inline-flex!important;align-items:center!important;font-size:.95rem!important;font-weight:750!important
  }

  .connection-card,.connection-row,.network-card,.network-row,.connections-list .card,.connections-list li,.connections-list>div,.network-list .card,.network-list li,.network-list>div{
    display:grid!important;grid-template-columns:64px 1fr!important;grid-template-areas:"avatar info" "avatar actions"!important;
    gap:.3rem .75rem!important;align-items:center!important;width:100%!important;margin:0!important;padding:.95rem 1rem!important;
    border-radius:0!important;border-left:0!important;border-right:0!important;border-top:0!important;border-bottom:1px solid #e4e7eb!important;
    box-shadow:none!important;background:#fff!important;box-sizing:border-box!important
  }
  .connection-card img,.connection-row img,.network-card img,.network-row img,.connections-list img,.network-list img,.avatar{
    grid-area:avatar!important;width:56px!important;height:56px!important;min-width:56px!important;border-radius:50%!important;object-fit:cover!important
  }
  .connection-info,.network-info,.connection-meta,.network-meta,.connections-list .info,.network-list .info{grid-area:info!important;min-width:0!important}
  .connection-info h3,.network-info h3,.connections-list h3,.network-list h3,.connection-name,.network-name{
    font-size:1.08rem!important;line-height:1.25!important;margin:0 0 .2rem!important;color:#334e68!important;overflow-wrap:anywhere!important
  }
  .connection-info p,.network-info p,.connections-list p,.network-list p,.connection-title,.connection-location,.network-title,.network-location{
    font-size:.92rem!important;line-height:1.35!important;color:#6b7f91!important;margin:.1rem 0!important;overflow-wrap:anywhere!important
  }
  .connection-actions,.network-actions,.connections-list .actions,.network-list .actions{grid-area:actions!important;display:flex!important;align-items:center!important;gap:.6rem!important;margin-top:.45rem!important;min-width:0!important}
  .connection-actions .btn,.network-actions .btn,.connections-list .btn,.network-list .btn,.connection-actions a,.network-actions a,.connections-list a[href*="message"],.network-list a[href*="message"],.connections-list button,.network-list button{
    min-height:38px!important;border-radius:999px!important;padding:0 .85rem!important;font-size:.88rem!important;font-weight:800!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important
  }
  .connection-actions a[href*="remove"],.network-actions a[href*="remove"],.connections-list a[href*="remove"],.network-list a[href*="remove"],.connection-actions .remove,.network-actions .remove,.connections-list .remove,.network-list .remove{
    color:#c0392b!important;background:transparent!important;border:0!important;padding:0 .25rem!important;min-height:36px!important
  }
  .land-footer,footer,.footer{margin-bottom:calc(64px + env(safe-area-inset-bottom))!important;padding:1.25rem 1rem!important}
  .land-footer-inner,.footer-inner{display:flex!important;flex-wrap:wrap!important;gap:.75rem 1rem!important;justify-content:center!important;text-align:center!important}
  .land-footer-copy{margin-left:0!important;width:100%!important}
}
@media (max-width:430px){
  .connection-card,.connection-row,.network-card,.network-row,.connections-list .card,.connections-list li,.connections-list>div,.network-list .card,.network-list li,.network-list>div{grid-template-columns:58px 1fr!important;padding:.85rem .8rem!important}
  .connection-card img,.connection-row img,.network-card img,.network-row img,.connections-list img,.network-list img,.avatar{width:52px!important;height:52px!important;min-width:52px!important}
}

/* Comfinnity v14.7.9 - targeted mobile Network/Connections layout fix */
@media (max-width: 768px) {
  body.network-page-mobile .main-content,
  body.network-page-mobile main,
  .network-page {
    overflow-x: hidden !important;
  }

  body.network-page-mobile .tabs,
  body.network-page-mobile .network-tabs,
  body.network-page-mobile .connections-tabs,
  body.network-page-mobile .profile-tabs {
    position: static !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    width: 100% !important;
    padding: 0 .75rem !important;
    gap: 1.2rem !important;
    box-sizing: border-box !important;
    background: #fff !important;
  }

  body.network-page-mobile .tabs::after,
  body.network-page-mobile .network-tabs::after,
  body.network-page-mobile .connections-tabs::after,
  body.network-page-mobile .profile-tabs::after {
    display: none !important;
    content: none !important;
  }

  body.network-page-mobile .tabs a,
  body.network-page-mobile .tabs button,
  body.network-page-mobile .network-tabs a,
  body.network-page-mobile .network-tabs button,
  body.network-page-mobile .connections-tabs a,
  body.network-page-mobile .connections-tabs button,
  body.network-page-mobile .profile-tabs a,
  body.network-page-mobile .profile-tabs button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    white-space: nowrap !important;
  }

  /* Reset the overly broad previous grid rules */
  body.network-page-mobile .connections-list,
  body.network-page-mobile .network-list {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.network-page-mobile .connections-list > *,
  body.network-page-mobile .network-list > *,
  body.network-page-mobile .connection-card,
  body.network-page-mobile .connection-row,
  body.network-page-mobile .network-card,
  body.network-page-mobile .network-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: .95rem 1rem !important;
    gap: .75rem !important;
    border: 0 !important;
    border-bottom: 1px solid #e3e9ef !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    float: none !important;
    clear: both !important;
    position: relative !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
  }

  body.network-page-mobile .connections-list > * + *,
  body.network-page-mobile .network-list > * + * {
    margin-top: 0 !important;
  }

  body.network-page-mobile .connections-list img,
  body.network-page-mobile .network-list img,
  body.network-page-mobile .connection-card img,
  body.network-page-mobile .connection-row img,
  body.network-page-mobile .network-card img,
  body.network-page-mobile .network-row img {
    flex: 0 0 56px !important;
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin: 0 !important;
    position: static !important;
    transform: none !important;
  }

  body.network-page-mobile .connection-info,
  body.network-page-mobile .network-info,
  body.network-page-mobile .connection-meta,
  body.network-page-mobile .network-meta,
  body.network-page-mobile .connections-list .info,
  body.network-page-mobile .network-list .info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    transform: none !important;
  }

  body.network-page-mobile .connection-name,
  body.network-page-mobile .network-name,
  body.network-page-mobile .connection-info h3,
  body.network-page-mobile .network-info h3,
  body.network-page-mobile .connections-list h3,
  body.network-page-mobile .network-list h3,
  body.network-page-mobile .connections-list strong,
  body.network-page-mobile .network-list strong {
    display: block !important;
    font-size: 1.04rem !important;
    line-height: 1.25 !important;
    margin: 0 0 .18rem !important;
    color: #334e68 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  body.network-page-mobile .connection-info p,
  body.network-page-mobile .network-info p,
  body.network-page-mobile .connections-list p,
  body.network-page-mobile .network-list p,
  body.network-page-mobile .connection-title,
  body.network-page-mobile .connection-location,
  body.network-page-mobile .network-title,
  body.network-page-mobile .network-location {
    display: block !important;
    font-size: .9rem !important;
    line-height: 1.35 !important;
    margin: .08rem 0 !important;
    color: #6b7f91 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  body.network-page-mobile .connection-actions,
  body.network-page-mobile .network-actions,
  body.network-page-mobile .connections-list .actions,
  body.network-page-mobile .network-list .actions {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 92px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: .45rem !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    transform: none !important;
  }

  body.network-page-mobile .connection-actions a,
  body.network-page-mobile .network-actions a,
  body.network-page-mobile .connections-list .actions a,
  body.network-page-mobile .network-list .actions a,
  body.network-page-mobile .connection-actions button,
  body.network-page-mobile .network-actions button,
  body.network-page-mobile .connections-list .actions button,
  body.network-page-mobile .network-list .actions button {
    width: auto !important;
    min-width: 86px !important;
    max-width: 112px !important;
    min-height: 36px !important;
    padding: 0 .65rem !important;
    border-radius: 999px !important;
    font-size: .82rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  body.network-page-mobile .connection-actions .remove,
  body.network-page-mobile .network-actions .remove,
  body.network-page-mobile .connections-list .remove,
  body.network-page-mobile .network-list .remove,
  body.network-page-mobile .connection-actions a[href*="remove"],
  body.network-page-mobile .network-actions a[href*="remove"],
  body.network-page-mobile .connections-list a[href*="remove"],
  body.network-page-mobile .network-list a[href*="remove"] {
    min-width: auto !important;
    max-width: none !important;
    min-height: 28px !important;
    padding: 0 .2rem !important;
    border: 0 !important;
    background: transparent !important;
    color: #d93025 !important;
    font-size: .82rem !important;
  }
}

@media (max-width: 430px) {
  body.network-page-mobile .connections-list > *,
  body.network-page-mobile .network-list > *,
  body.network-page-mobile .connection-card,
  body.network-page-mobile .connection-row,
  body.network-page-mobile .network-card,
  body.network-page-mobile .network-row {
    gap: .65rem !important;
    padding: .85rem .75rem !important;
  }

  body.network-page-mobile .connections-list img,
  body.network-page-mobile .network-list img,
  body.network-page-mobile .connection-card img,
  body.network-page-mobile .connection-row img,
  body.network-page-mobile .network-card img,
  body.network-page-mobile .network-row img {
    flex-basis: 50px !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
  }

  body.network-page-mobile .connection-actions,
  body.network-page-mobile .network-actions,
  body.network-page-mobile .connections-list .actions,
  body.network-page-mobile .network-list .actions {
    min-width: 82px !important;
  }

  body.network-page-mobile .connection-actions a,
  body.network-page-mobile .network-actions a,
  body.network-page-mobile .connections-list .actions a,
  body.network-page-mobile .network-list .actions a,
  body.network-page-mobile .connection-actions button,
  body.network-page-mobile .network-actions button,
  body.network-page-mobile .connections-list .actions button,
  body.network-page-mobile .network-list .actions button {
    min-width: 78px !important;
    max-width: 96px !important;
    font-size: .78rem !important;
    padding: 0 .5rem !important;
  }
}

/* Comfinnity v14.8.0 - mobile messenger overhaul */
@media (max-width: 768px) {
  body.messages-page-mobile {
    overflow-x: hidden !important;
  }

  body.messages-page-mobile .main-content,
  body.messages-page-mobile main {
    padding: 0 0 calc(132px + env(safe-area-inset-bottom)) !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body.messages-page-mobile .messages-main,
  body.messages-page-mobile .messages-page,
  body.messages-page-mobile .msg-layout,
  body.messages-page-mobile .messages-layout {
    height: calc(100dvh - 58px - 64px) !important;
    min-height: calc(100dvh - 58px - 64px) !important;
    max-height: calc(100dvh - 58px - 64px) !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    background: #fff !important;
  }

  /* Conversation list should scroll independently */
  body.messages-page-mobile .msg-sidebar,
  body.messages-page-mobile .conversation-list,
  body.messages-page-mobile .messages-list {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    max-height: 240px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-right: 0 !important;
    border-bottom: 1px solid #dfe5eb !important;
    background: #fff !important;
    -webkit-overflow-scrolling: touch;
  }

  body.messages-page-mobile .conversation-item,
  body.messages-page-mobile .msg-thread,
  body.messages-page-mobile .message-thread {
    width: 100% !important;
    min-height: 72px !important;
    padding: .75rem 1rem !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  body.messages-page-mobile .msg-panel,
  body.messages-page-mobile .message-panel,
  body.messages-page-mobile .chat-panel,
  body.messages-page-mobile .chat-area,
  body.messages-page-mobile .conversation-panel {
    position: relative !important;
    inset: auto !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  body.messages-page-mobile .msg-header,
  body.messages-page-mobile .chat-header,
  body.messages-page-mobile .conversation-header {
    flex: 0 0 auto !important;
    min-height: 72px !important;
    padding: .75rem 1rem !important;
    border-bottom: 1px solid #dfe5eb !important;
    background: #fff !important;
    box-sizing: border-box !important;
  }

  body.messages-page-mobile .msg-body,
  body.messages-page-mobile .chat-body,
  body.messages-page-mobile .messages-body,
  body.messages-page-mobile .conversation-body,
  body.messages-page-mobile .message-history {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: .9rem .75rem 88px !important;
    background: #f3f2ef !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Composer fixed above bottom nav */
  body.messages-page-mobile .msg-input-bar,
  body.messages-page-mobile .message-input-bar,
  body.messages-page-mobile .chat-input,
  body.messages-page-mobile .composer,
  body.messages-page-mobile form.message-form,
  body.messages-page-mobile form[action*="message"] {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(64px + env(safe-area-inset-bottom)) !important;
    min-height: 74px !important;
    width: 100% !important;
    max-width: 100% !important;
    z-index: 5200 !important;
    display: flex !important;
    align-items: center !important;
    gap: .45rem !important;
    padding: .55rem .75rem !important;
    background: #fff !important;
    border-top: 1px solid #dfe5eb !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  body.messages-page-mobile .msg-input-bar input,
  body.messages-page-mobile .msg-input-bar textarea,
  body.messages-page-mobile .message-input-bar input,
  body.messages-page-mobile .message-input-bar textarea,
  body.messages-page-mobile .chat-input input,
  body.messages-page-mobile .chat-input textarea,
  body.messages-page-mobile form.message-form input[type="text"],
  body.messages-page-mobile form.message-form textarea,
  body.messages-page-mobile form[action*="message"] input[type="text"],
  body.messages-page-mobile form[action*="message"] textarea {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 86px !important;
    border-radius: 999px !important;
    padding: .6rem 1rem !important;
    font-size: 1rem !important;
    resize: none !important;
    box-sizing: border-box !important;
  }

  body.messages-page-mobile .msg-input-bar button,
  body.messages-page-mobile .message-input-bar button,
  body.messages-page-mobile .chat-input button,
  body.messages-page-mobile form.message-form button,
  body.messages-page-mobile form[action*="message"] button {
    flex: 0 0 auto !important;
    min-width: 44px !important;
    height: 44px !important;
    border-radius: 999px !important;
    padding: 0 .85rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }

  body.messages-page-mobile .msg-input-bar button[type="submit"],
  body.messages-page-mobile .message-input-bar button[type="submit"],
  body.messages-page-mobile .chat-input button[type="submit"],
  body.messages-page-mobile form.message-form button[type="submit"],
  body.messages-page-mobile form[action*="message"] button[type="submit"] {
    min-width: 54px !important;
    height: 46px !important;
    background: var(--navy) !important;
    color: #fff !important;
    font-weight: 800 !important;
  }

  /* Bubbles */
  body.messages-page-mobile .msg-bubble,
  body.messages-page-mobile .message-bubble,
  body.messages-page-mobile .bubble,
  body.messages-page-mobile .chat-message {
    max-width: 78% !important;
    width: fit-content !important;
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
  }

  body.messages-page-mobile .msg-bubble.me,
  body.messages-page-mobile .message-bubble.me,
  body.messages-page-mobile .bubble.me,
  body.messages-page-mobile .chat-message.me,
  body.messages-page-mobile .outgoing {
    margin-left: auto !important;
  }

  body.messages-page-mobile .msg-bubble.them,
  body.messages-page-mobile .message-bubble.them,
  body.messages-page-mobile .bubble.them,
  body.messages-page-mobile .incoming {
    margin-right: auto !important;
  }

  /* Media in messages must never create horizontal scroll */
  body.messages-page-mobile .msg-body img,
  body.messages-page-mobile .chat-body img,
  body.messages-page-mobile .messages-body img,
  body.messages-page-mobile .message-history img,
  body.messages-page-mobile .msg-body video,
  body.messages-page-mobile .chat-body video,
  body.messages-page-mobile .messages-body video,
  body.messages-page-mobile .message-history video {
    max-width: min(100%, 320px) !important;
    height: auto !important;
    border-radius: 12px !important;
    object-fit: contain !important;
  }

  body.messages-page-mobile .msg-body *,
  body.messages-page-mobile .chat-body *,
  body.messages-page-mobile .messages-body *,
  body.messages-page-mobile .message-history * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Kill horizontal scrollbar */
  body.messages-page-mobile .msg-body,
  body.messages-page-mobile .chat-body,
  body.messages-page-mobile .messages-body,
  body.messages-page-mobile .message-history,
  body.messages-page-mobile .msg-layout,
  body.messages-page-mobile .messages-layout {
    overflow-x: hidden !important;
  }

  body.messages-page-mobile .nav-links {
    z-index: 9000 !important;
  }
}

@media (max-width: 430px) {
  body.messages-page-mobile .msg-sidebar,
  body.messages-page-mobile .conversation-list,
  body.messages-page-mobile .messages-list {
    max-height: 210px !important;
  }

  body.messages-page-mobile .msg-input-bar,
  body.messages-page-mobile .message-input-bar,
  body.messages-page-mobile .chat-input,
  body.messages-page-mobile form.message-form,
  body.messages-page-mobile form[action*="message"] {
    padding: .5rem .6rem !important;
    gap: .35rem !important;
  }

  body.messages-page-mobile .msg-input-bar button:not([type="submit"]),
  body.messages-page-mobile .message-input-bar button:not([type="submit"]),
  body.messages-page-mobile .chat-input button:not([type="submit"]) {
    min-width: 40px !important;
    width: 40px !important;
    padding: 0 !important;
  }

  body.messages-page-mobile .msg-input-bar button[type="submit"],
  body.messages-page-mobile .message-input-bar button[type="submit"],
  body.messages-page-mobile .chat-input button[type="submit"],
  body.messages-page-mobile form.message-form button[type="submit"],
  body.messages-page-mobile form[action*="message"] button[type="submit"] {
    min-width: 54px !important;
    padding: 0 .7rem !important;
  }
}

/* Comfinnity v14.8.1 - Profile QR share */
.qr-share-wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.qr-share-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(13,27,42,.08);
  padding: 1.5rem;
}

.qr-share-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.qr-share-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.qr-share-head h1 {
  margin: 0 0 .35rem;
  font-size: 1.8rem;
  color: var(--navy);
}

.qr-share-head p {
  margin: 0;
  color: var(--text-mute);
  line-height: 1.45;
}

.qr-code-box {
  display: grid;
  place-items: center;
  background: #f7fafc;
  border: 1px solid #e4eaf0;
  border-radius: 20px;
  padding: 1.25rem;
  margin: 1rem 0;
}

.qr-code-box img {
  width: min(100%, 360px);
  height: auto;
  border-radius: 12px;
  background: #fff;
}

.qr-profile-url {
  padding: .8rem 1rem;
  background: #eef3f8;
  border-radius: 12px;
  color: #536b7a;
  font-size: .92rem;
  overflow-wrap: anywhere;
  text-align: center;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.qr-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .6rem;
}

@media (max-width: 768px) {
  .qr-share-wrap {
    padding: 1rem .75rem calc(88px + env(safe-area-inset-bottom));
  }

  .qr-share-card {
    border-radius: 18px;
    padding: 1rem;
  }

  .qr-share-head {
    align-items: flex-start;
  }

  .qr-share-avatar {
    width: 58px;
    height: 58px;
  }

  .qr-share-head h1 {
    font-size: 1.45rem;
    padding: 0 !important;
  }

  .qr-code-box {
    padding: .8rem;
  }

  .qr-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .qr-actions .btn,
  .qr-actions a,
  .qr-actions button {
    width: 100%;
    justify-content: center;
  }
}

/* Comfinnity v14.8.2 - QR visual improvements */
.qr-code-box {
  position: relative;
}

.qr-logo-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 82px;
  height: 82px;
  border-radius: 22px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 22px rgba(0,0,0,.12);
  padding: 10px;
  z-index: 5;
}

.qr-logo-overlay img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.qr-profile-btn,
a.qr-profile-btn,
button.qr-profile-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 2px solid var(--navy);
  background: #fff;
  color: var(--navy);
  text-decoration: none;
  box-sizing: border-box;
}

.qr-profile-btn:hover {
  background: var(--navy);
  color: #fff;
}

@media (max-width: 768px) {
  .qr-logo-overlay {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    padding: 8px;
  }
}

/* Comfinnity v14.8.3 - mobile profile access */
.mobile-profile-quick-link {
  display: none;
}

@media (max-width: 768px) {
  .navbar-brand {
    display: none !important;
  }

  .mobile-profile-quick-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    text-decoration: none;
  }

  .mobile-profile-quick-link img {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(13,27,42,.12);
  }

  .nav-search {
    order: 2;
  }
}

/* Comfinnity v14.8.4 - QR logo fix */
.qr-logo-overlay {
  width: 96px !important;
  height: 96px !important;
  border-radius: 26px !important;
  padding: 10px !important;
  background: rgba(255,255,255,.98) !important;
}

.qr-logo-overlay img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
}

@media (max-width: 768px) {
  .qr-logo-overlay {
    width: 82px !important;
    height: 82px !important;
    border-radius: 22px !important;
    padding: 8px !important;
  }
}


/* Comfinnity v14.8.5 - remove QR overlay logo */
.qr-logo-overlay {
  display: none !important;
}

/* Comfinnity v14.8.6 - cleanup stray reply bars */
body:not(.messages-page-mobile) .reply-context-bar,
body:not(.messages-page-mobile) .reply-preview,
body:not(.messages-page-mobile) .mobile-reply-bar,
body:not(.messages-page-mobile) .replying-to,
body:not(.messages-page-mobile) .floating-reply-box,
body:not(.messages-page-mobile) .mobile-comment-composer {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Hide broken orphaned reply forms outside modal/chat */
body:not(.messages-page-mobile) form.reply-form:not(.active),
body:not(.messages-page-mobile) .reply-form.orphaned {
  display: none !important;
}

/* Comfinnity v14.8.7 - hard cleanup orphan reply ui */
body .reply-context-bar,
body .reply-preview,
body .mobile-reply-bar,
body .replying-to,
body .floating-reply-box,
body .mobile-comment-composer,
body .reply-form.orphaned,
body .reply-inline-form,
body .reply-box-placeholder,
body .comment-reply-fixed,
body .reply-target-bar {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Hide raw malformed text nodes rendered in footer area */
body footer + *,
body .site-footer + * {
  display: none !important;
}

/* Keep actual active comment modal visible */
.comment-modal .reply-context-bar,
.comment-sheet .reply-context-bar,
.comment-modal .mobile-comment-composer,
.comment-sheet .mobile-comment-composer,
.comment-modal form,
.comment-sheet form {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-height: none !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

/* Comfinnity v14.8.8 - hide orphan global reply/comment UI */
body > .mobile-reply-context,
body > .mobile-reply-bar,
body > .reply-context-bar,
body > .comment-input-bar,
body > .comment-composer,
body > .reply-composer,
body > .comment-form,
body > .reply-form,
footer ~ .mobile-reply-context,
footer ~ .mobile-reply-bar,
footer ~ .reply-context-bar,
footer ~ .comment-input-bar,
footer ~ .comment-composer,
footer ~ .reply-composer,
footer ~ .comment-form,
footer ~ .reply-form,
.land-footer ~ .mobile-reply-context,
.land-footer ~ .mobile-reply-bar,
.land-footer ~ .reply-context-bar,
.land-footer ~ .comment-input-bar,
.land-footer ~ .comment-composer,
.land-footer ~ .reply-composer,
.land-footer ~ .comment-form,
.land-footer ~ .reply-form {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Comfinnity v14.8.9 - PWA install page/button */
.pwa-install-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.pwa-install-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(13,27,42,.08);
  padding: 2rem;
  text-align: center;
}

.pwa-install-icon {
  font-size: 3rem;
  margin-bottom: .75rem;
}

.pwa-install-card h1 {
  margin: 0 0 .75rem;
  color: var(--navy);
  font-size: 2rem;
}

.pwa-install-card p {
  color: var(--text-mute);
  line-height: 1.5;
  margin: 0 auto 1.25rem;
  max-width: 520px;
}

.pwa-install-main-btn {
  min-width: 220px;
  min-height: 52px;
  border-radius: 999px;
  font-weight: 800;
}

.pwa-install-main-btn.is-installed,
[data-pwa-install].is-installed {
  opacity: .65;
  cursor: default;
}

.pwa-install-help {
  display: none;
  margin-top: 1.4rem;
  padding: 1rem;
  text-align: left;
  background: #eef3f8;
  border-radius: 16px;
  color: #536b7a;
}

.pwa-install-help.is-visible {
  display: block;
}

.pwa-install-help h3 {
  color: var(--navy);
  margin: 0 0 .5rem;
}

.pwa-install-help ul {
  margin: .75rem 0 0 1.1rem;
  padding: 0;
}

@media (max-width: 768px) {
  .pwa-install-wrap {
    padding: 1rem .75rem calc(88px + env(safe-area-inset-bottom));
  }

  .pwa-install-card {
    padding: 1.25rem;
    border-radius: 18px;
  }

  .pwa-install-card h1 {
    font-size: 1.55rem;
  }

  .pwa-install-main-btn {
    width: 100%;
  }
}

/* Comfinnity v14.9.0 - forgot password */
.auth-card-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background: #f3f2ef;
}

.auth-reset-card {
  width: min(100%, 520px);
}

.auth-muted {
  color: var(--text-mute);
  line-height: 1.5;
  margin: 0 0 1rem;
}

.forgot-password-link {
  text-align: right;
  margin: -.25rem 0 .8rem;
  font-size: .9rem;
}

.forgot-password-link a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.forgot-password-link a:hover {
  text-decoration: underline;
}

.success-msg {
  background: #e7f7ef;
  color: #166534;
  border: 1px solid #b7e4c7;
  border-radius: var(--radius);
  padding: .75rem .9rem;
  font-size: .92rem;
  margin-bottom: 1rem;
}

.auth-full-link {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 768px) {
  .auth-card-wrap {
    padding: 1rem;
  }

  .auth-reset-card {
    border-radius: 18px;
  }

  .forgot-password-link {
    text-align: center;
  }
}


/* Comfinnity v14.9.1 - auth reset styling fix */
body.auth-page {
  margin: 0 !important;
  background: #f3f2ef !important;
  font-family: inherit;
}

.auth-card-wrap {
  width: 100%;
  min-height: 100vh;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  box-sizing: border-box;
}

.auth-reset-card,
.login-card.auth-reset-card {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(15,23,42,.08);
  border: 1px solid #e5e7eb;
  box-sizing: border-box;
}

.auth-reset-card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #0f2747;
  font-size: 2rem;
  font-weight: 800;
}

.auth-reset-card .form-field {
  margin-bottom: 18px;
}

.auth-reset-card label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #1f2937;
}

.auth-reset-card input[type="email"],
.auth-reset-card input[type="password"] {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid #d6dde6;
  padding: 0 16px;
  font-size: 1rem;
  box-sizing: border-box;
}

.auth-reset-card .btn-signin {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: #0f3768;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}

.auth-reset-card .btn-signin:hover {
  opacity: .95;
}

.auth-reset-card .join-link {
  margin-top: 18px;
  text-align: center;
}

.auth-reset-card .join-link a {
  color: #0f3768;
  font-weight: 700;
  text-decoration: none;
}

.error-msg,
.success-msg {
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .auth-card-wrap {
    padding: 20px 12px;
  }

  .auth-reset-card,
  .login-card.auth-reset-card {
    border-radius: 20px;
    padding: 24px;
  }

  .auth-reset-card h2 {
    font-size: 1.8rem;
  }
}

/* Comfinnity v14.9.2 - desktop messenger layout fix */
@media (min-width:769px){
  body.messages-page-mobile .main-content,
  body.messages-page-mobile main{padding-bottom:0!important;overflow:visible!important}

  .messages-main,.messages-page,.msg-layout,.messages-layout{
    height:calc(100vh - 150px)!important;
    min-height:680px!important;
    max-height:calc(100vh - 150px)!important;
    display:grid!important;
    grid-template-columns:360px minmax(0,1fr)!important;
    overflow:hidden!important;
    border-radius:14px!important;
    background:#fff!important;
  }

  .msg-sidebar,.conversation-list,.messages-list{
    width:360px!important;
    max-width:360px!important;
    height:100%!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    border-right:1px solid #dfe5eb!important;
    border-bottom:0!important;
    background:#fff!important;
  }

  .msg-panel,.message-panel,.chat-panel,.chat-area,.conversation-panel{
    position:relative!important;
    inset:auto!important;
    height:100%!important;
    min-height:0!important;
    width:100%!important;
    max-width:100%!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    background:#fff!important;
  }

  .msg-header,.chat-header,.conversation-header{
    flex:0 0 auto!important;
    min-height:74px!important;
    padding:.85rem 1rem!important;
    border-bottom:1px solid #dfe5eb!important;
    background:#fff!important;
  }

  .msg-body,.chat-body,.messages-body,.conversation-body,.message-history{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:1rem 1.25rem 1.25rem!important;
    background:#f3f2ef!important;
  }

  .msg-input-bar,.message-input-bar,.chat-input,form.message-form,form[action*="message"]{
    position:relative!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
    width:100%!important;
    max-width:100%!important;
    min-height:72px!important;
    z-index:auto!important;
    display:flex!important;
    align-items:center!important;
    gap:.55rem!important;
    padding:.65rem .9rem!important;
    background:#fff!important;
    border-top:1px solid #dfe5eb!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }

  .msg-input-bar input,.msg-input-bar textarea,
  .message-input-bar input,.message-input-bar textarea,
  .chat-input input,.chat-input textarea,
  form.message-form input[type="text"],form.message-form textarea,
  form[action*="message"] input[type="text"],form[action*="message"] textarea{
    flex:1 1 auto!important;
    min-width:0!important;
    height:44px!important;
    min-height:44px!important;
    border-radius:999px!important;
    padding:.55rem 1rem!important;
    resize:none!important;
  }

  .msg-input-bar button,.message-input-bar button,.chat-input button,
  form.message-form button,form[action*="message"] button{
    position:relative!important;
    flex:0 0 auto!important;
  }

  .msg-body img,.chat-body img,.messages-body img,.message-history img{
    max-width:520px!important;
    width:auto!important;
    height:auto!important;
    object-fit:contain!important;
  }

  .msg-bubble,.message-bubble,.bubble,.chat-message{
    max-width:65%!important;
    box-sizing:border-box!important;
    overflow-wrap:anywhere!important;
  }

  .outgoing,.msg-bubble.me,.message-bubble.me,.bubble.me,.chat-message.me{
    margin-left:auto!important;
  }
}

/* Comfinnity v14.9.4 - language settings fix */
.profile-language-edit {
  margin: 1rem 0;
}

.profile-language-edit select,
select[name="language"],
select#profile_language {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d6dde6;
  border-radius: 12px;
  padding: 0 .85rem;
  font-size: 1rem;
  background: #fff;
}

.profile-language-edit small {
  display: block;
  margin-top: .35rem;
  color: var(--text-mute);
}

.profile-language-edit-link {
  float: right;
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
}

.profile-language-edit-link:hover {
  text-decoration: underline;
}

/* Comfinnity v14.9.5-url - clickable URL styling */
.cf-auto-link,
.post-content a.cf-auto-link,
.post-body a.cf-auto-link,
.feed-post-body a.cf-auto-link,
.comment-content a.cf-auto-link,
.reply-content a.cf-auto-link,
.comment-bubble a.cf-auto-link,
.reply-bubble a.cf-auto-link {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Comfinnity v14.9.6 - hard URL hyperlink styling */
.cf-auto-link,
.post-card a.cf-auto-link,
.feed-card a.cf-auto-link,
.timeline-post a.cf-auto-link,
.post a.cf-auto-link,
article a.cf-auto-link {
  color: var(--navy, #0f3768) !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  cursor: pointer !important;
}

/* Comfinnity v14.9.7 - persistent URL hyperlink styling */
.cf-auto-link,
.post-card a.cf-auto-link,
.feed-card a.cf-auto-link,
.timeline-post a.cf-auto-link,
.post a.cf-auto-link,
article a.cf-auto-link,
.comment-content a.cf-auto-link,
.reply-content a.cf-auto-link {
  color: var(--navy, #0f3768) !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* Comfinnity v14.9.8 - multiple post photos masonry */
.cf-post-masonry {
  display: grid;
  gap: 4px;
  margin-top: .75rem;
  overflow: hidden;
  border-radius: 12px;
  background: #eef2f6;
}

.cf-post-masonry-item {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  background: #dbe4ec;
}

.cf-post-masonry-item img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  display: block;
}

.cf-post-masonry-1 {
  grid-template-columns: 1fr;
}

.cf-post-masonry-1 .cf-post-masonry-item img {
  max-height: 620px;
  object-fit: contain;
  background: #000;
}

.cf-post-masonry-2 {
  grid-template-columns: 1fr 1fr;
}

.cf-post-masonry-3 {
  grid-template-columns: 1.2fr .8fr;
  grid-template-rows: 1fr 1fr;
}

.cf-post-masonry-3 .cf-post-masonry-item:first-child {
  grid-row: span 2;
}

.cf-post-masonry-4 {
  grid-template-columns: 1fr 1fr;
}

.cf-post-masonry-5,
.cf-post-masonry-many {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.cf-post-masonry-5 .cf-post-masonry-item:first-child,
.cf-post-masonry-many .cf-post-masonry-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.cf-post-masonry-item.is-hidden {
  display: none;
}

.cf-post-masonry-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.48);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
}

.cf-photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 6px;
  margin-top: .6rem;
}

.cf-photo-preview img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
}

@media (max-width: 768px) {
  .cf-post-masonry {
    border-radius: 0;
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .cf-post-masonry-item img {
    min-height: 140px;
  }

  .cf-post-masonry-1 .cf-post-masonry-item img {
    max-height: 520px;
  }
}


/* Comfinnity v14.9.8a - desktop messages restore */
@media (min-width: 769px) {
  body:not(.messages-page-mobile) main.messages-main,
  body:not(.messages-page-mobile) .messages-main {
    max-width: 1100px !important;
    height: calc(100vh - 92px) !important;
    min-height: 640px !important;
    padding: 1rem !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body:not(.messages-page-mobile) .msg-layout {
    display: grid !important;
    grid-template-columns: 300px minmax(0, 1fr) !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border-radius: 14px !important;
    background: #fff !important;
  }

  body:not(.messages-page-mobile) .msg-sidebar {
    display: block !important;
    width: 300px !important;
    max-width: 300px !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-right: 1px solid var(--border) !important;
    background: #fff !important;
  }

  body:not(.messages-page-mobile) .msg-window {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body:not(.messages-page-mobile) .msg-header {
    display: flex !important;
    flex: 0 0 auto !important;
    min-height: 74px !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body:not(.messages-page-mobile) .msg-body {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 1rem !important;
    background: var(--surface) !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body:not(.messages-page-mobile) .msg-input-bar,
  body:not(.messages-page-mobile) form.msg-send-form {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    display: flex !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 72px !important;
    padding: .9rem 1.25rem !important;
    border-top: 1px solid var(--border) !important;
    background: #fff !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body:not(.messages-page-mobile) .msg-layout .cf-post-masonry,
  body:not(.messages-page-mobile) .msg-layout .cf-photo-preview {
    display: none !important;
  }
}


/* Comfinnity v14.9.8b - desktop message bubble width fix */
@media (min-width: 769px) {
  .msg-window,
  .msg-panel,
  .message-panel,
  .chat-panel,
  .chat-area,
  .conversation-panel {
    min-width: 0 !important;
  }

  .msg-body,
  .chat-body,
  .messages-body,
  .conversation-body,
  .message-history {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: .75rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .msg-bubble-wrap {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: .2rem !important;
    box-sizing: border-box !important;
  }

  .msg-bubble-wrap.sent {
    align-self: stretch !important;
    align-items: flex-end !important;
  }

  .msg-bubble-wrap.recv {
    align-self: stretch !important;
    align-items: flex-start !important;
  }

  .msg-bubble,
  .message-bubble,
  .bubble,
  .chat-message {
    display: block !important;
    width: auto !important;
    min-width: 96px !important;
    max-width: min(70%, 680px) !important;
    padding: .7rem 1rem !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    line-height: 1.45 !important;
  }

  .msg-bubble .msg-text,
  .message-bubble .msg-text,
  .bubble .msg-text,
  .chat-message .msg-text {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: pre-wrap !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    line-height: 1.45 !important;
  }

  .msg-bubble.sent,
  .message-bubble.sent,
  .bubble.sent,
  .chat-message.sent,
  .outgoing {
    margin-left: auto !important;
    align-self: flex-end !important;
  }

  .msg-bubble.recv,
  .message-bubble.recv,
  .bubble.recv,
  .chat-message.recv,
  .incoming {
    margin-right: auto !important;
    align-self: flex-start !important;
  }

  .msg-author-label,
  .msg-bubble-tools {
    max-width: min(70%, 680px) !important;
    width: auto !important;
  }

  .msg-bubble-wrap.sent .msg-author-label,
  .msg-bubble-wrap.sent .msg-bubble-tools {
    align-self: flex-end !important;
    text-align: right !important;
  }

  .msg-bubble-wrap.recv .msg-author-label,
  .msg-bubble-wrap.recv .msg-bubble-tools {
    align-self: flex-start !important;
    text-align: left !important;
  }

  .msg-media,
  .msg-image,
  .msg-video,
  .msg-bubble img,
  .msg-bubble video {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
  }
}

@media (min-width: 1200px) {
  .msg-bubble,
  .message-bubble,
  .bubble,
  .chat-message,
  .msg-author-label,
  .msg-bubble-tools {
    max-width: min(58%, 680px) !important;
  }
}

/* Comfinnity v14.9.8c - mobile messages full list fix */
@media (max-width: 768px) {
  body.messages-page-mobile {
    overflow-x: hidden !important;
  }

  body.messages-page-mobile .messages-layout,
  body.messages-page-mobile .messages-main,
  body.messages-page-mobile .messages-page,
  body.messages-page-mobile .msg-layout,
  body.messages-page-mobile .messages-wrapper {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100dvh - 74px - env(safe-area-inset-bottom)) !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  body.messages-page-mobile .messages-sidebar,
  body.messages-page-mobile .msg-sidebar,
  body.messages-page-mobile .conversation-list,
  body.messages-page-mobile .messages-list {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 38dvh !important;
    min-height: 260px !important;
    max-height: 44dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    border-right: 0 !important;
    border-bottom: 1px solid #dfe5eb !important;
    background: #fff !important;
  }

  body.messages-page-mobile .conversation-item,
  body.messages-page-mobile .msg-thread,
  body.messages-page-mobile .message-thread,
  body.messages-page-mobile .messages-list-item,
  body.messages-page-mobile .conversation-row {
    min-height: 78px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
  }

  body.messages-page-mobile .messages-conversation,
  body.messages-page-mobile .message-conversation,
  body.messages-page-mobile .conversation-panel,
  body.messages-page-mobile .messages-panel,
  body.messages-page-mobile .msg-panel,
  body.messages-page-mobile .chat-panel,
  body.messages-page-mobile .chat-area {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #f3f2ef !important;
  }

  body.messages-page-mobile .messages-thread,
  body.messages-page-mobile .message-thread-body,
  body.messages-page-mobile .conversation-body,
  body.messages-page-mobile .messages-body,
  body.messages-page-mobile .msg-body,
  body.messages-page-mobile .chat-body,
  body.messages-page-mobile .message-history {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 88px !important;
  }

  body.messages-page-mobile .message-composer,
  body.messages-page-mobile .messages-composer,
  body.messages-page-mobile .msg-input-bar,
  body.messages-page-mobile .message-input-bar,
  body.messages-page-mobile .chat-input,
  body.messages-page-mobile form.message-form,
  body.messages-page-mobile form[action*="message"] {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(64px + env(safe-area-inset-bottom)) !important;
    z-index: 6000 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 74px !important;
    display: flex !important;
    align-items: center !important;
    gap: .45rem !important;
    padding: .55rem .75rem !important;
    box-sizing: border-box !important;
    background: #fff !important;
    border-top: 1px solid #dfe5eb !important;
  }

  body.messages-page-mobile .message-composer input,
  body.messages-page-mobile .messages-composer input,
  body.messages-page-mobile .msg-input-bar input,
  body.messages-page-mobile .message-input-bar input,
  body.messages-page-mobile .chat-input input,
  body.messages-page-mobile form.message-form input[type="text"],
  body.messages-page-mobile form[action*="message"] input[type="text"],
  body.messages-page-mobile .message-composer textarea,
  body.messages-page-mobile .messages-composer textarea,
  body.messages-page-mobile .msg-input-bar textarea,
  body.messages-page-mobile .message-input-bar textarea,
  body.messages-page-mobile .chat-input textarea,
  body.messages-page-mobile form.message-form textarea,
  body.messages-page-mobile form[action*="message"] textarea {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 90px !important;
    border-radius: 999px !important;
    resize: none !important;
  }

  body.messages-page-mobile .bottom-nav,
  body.messages-page-mobile .mobile-bottom-nav,
  body.messages-page-mobile .nav-links {
    z-index: 7000 !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  body.messages-page-mobile .messages-sidebar,
  body.messages-page-mobile .msg-sidebar,
  body.messages-page-mobile .conversation-list,
  body.messages-page-mobile .messages-list {
    overflow-y: auto !important;
    max-height: calc(100vh - 170px) !important;
  }
}

/* Comfinnity v14.9.8d - desktop messages restore */
@media (min-width: 769px) {
  body:not(.messages-page-mobile) .messages-layout,
  body:not(.messages-page-mobile) .messages-main,
  body:not(.messages-page-mobile) .messages-page,
  body:not(.messages-page-mobile) .msg-layout,
  body:not(.messages-page-mobile) .messages-wrapper {
    display: grid !important;
    grid-template-columns: 340px minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 1100px !important;
    height: calc(100vh - 140px) !important;
    min-height: 620px !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    background: #fff !important;
    border-radius: 14px !important;
  }

  body:not(.messages-page-mobile) .messages-sidebar,
  body:not(.messages-page-mobile) .msg-sidebar,
  body:not(.messages-page-mobile) .conversation-list,
  body:not(.messages-page-mobile) .messages-list {
    grid-column: 1 !important;
    width: 340px !important;
    max-width: 340px !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-right: 1px solid #dfe5eb !important;
    border-bottom: 0 !important;
    background: #fff !important;
    position: relative !important;
  }

  body:not(.messages-page-mobile) .messages-conversation,
  body:not(.messages-page-mobile) .message-conversation,
  body:not(.messages-page-mobile) .conversation-panel,
  body:not(.messages-page-mobile) .messages-panel,
  body:not(.messages-page-mobile) .msg-panel,
  body:not(.messages-page-mobile) .chat-panel,
  body:not(.messages-page-mobile) .chat-area {
    grid-column: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    background: #f3f2ef !important;
    position: relative !important;
    inset: auto !important;
  }

  body:not(.messages-page-mobile) .msg-header,
  body:not(.messages-page-mobile) .chat-header,
  body:not(.messages-page-mobile) .conversation-header {
    flex: 0 0 auto !important;
    min-height: 70px !important;
    display: flex !important;
    align-items: center !important;
    padding: .85rem 1rem !important;
    border-bottom: 1px solid #dfe5eb !important;
    background: #fff !important;
  }

  body:not(.messages-page-mobile) .messages-thread,
  body:not(.messages-page-mobile) .message-thread-body,
  body:not(.messages-page-mobile) .conversation-body,
  body:not(.messages-page-mobile) .messages-body,
  body:not(.messages-page-mobile) .msg-body,
  body:not(.messages-page-mobile) .chat-body,
  body:not(.messages-page-mobile) .message-history {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 1rem 1.25rem !important;
    background: #f3f2ef !important;
  }

  body:not(.messages-page-mobile) .message-composer,
  body:not(.messages-page-mobile) .messages-composer,
  body:not(.messages-page-mobile) .msg-input-bar,
  body:not(.messages-page-mobile) .message-input-bar,
  body:not(.messages-page-mobile) .chat-input,
  body:not(.messages-page-mobile) form.message-form,
  body:not(.messages-page-mobile) form[action*="message"] {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: .55rem !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 68px !important;
    padding: .6rem .9rem !important;
    background: #fff !important;
    border-top: 1px solid #dfe5eb !important;
    box-sizing: border-box !important;
  }

  body:not(.messages-page-mobile) .msg-bubble,
  body:not(.messages-page-mobile) .message-bubble,
  body:not(.messages-page-mobile) .bubble,
  body:not(.messages-page-mobile) .chat-message,
  body:not(.messages-page-mobile) .message-outgoing,
  body:not(.messages-page-mobile) .message-incoming {
    max-width: min(68%, 680px) !important;
    width: fit-content !important;
    min-width: 60px !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    white-space: pre-wrap !important;
    line-height: 1.45 !important;
  }

  body:not(.messages-page-mobile) .message-outgoing,
  body:not(.messages-page-mobile) .outgoing,
  body:not(.messages-page-mobile) .msg-bubble.me,
  body:not(.messages-page-mobile) .message-bubble.me {
    margin-left: auto !important;
  }
}

/* Comfinnity v14.9.8e - desktop message bubble width/alignment fix */
@media (min-width: 769px) {
  body:not(.messages-page-mobile) .messages-conversation,
  body:not(.messages-page-mobile) .message-conversation,
  body:not(.messages-page-mobile) .conversation-panel,
  body:not(.messages-page-mobile) .messages-panel,
  body:not(.messages-page-mobile) .msg-panel,
  body:not(.messages-page-mobile) .chat-panel,
  body:not(.messages-page-mobile) .chat-area {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  body:not(.messages-page-mobile) .messages-thread,
  body:not(.messages-page-mobile) .message-thread-body,
  body:not(.messages-page-mobile) .conversation-body,
  body:not(.messages-page-mobile) .messages-body,
  body:not(.messages-page-mobile) .msg-body,
  body:not(.messages-page-mobile) .chat-body,
  body:not(.messages-page-mobile) .message-history {
    display: flex !important;
    flex-direction: column !important;
    gap: .65rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 1.1rem 1.5rem !important;
  }

  body:not(.messages-page-mobile) .message-row,
  body:not(.messages-page-mobile) .msg-row,
  body:not(.messages-page-mobile) .chat-message-row {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body:not(.messages-page-mobile) .message-row.outgoing,
  body:not(.messages-page-mobile) .msg-row.outgoing,
  body:not(.messages-page-mobile) .chat-message-row.outgoing,
  body:not(.messages-page-mobile) .message-row.me,
  body:not(.messages-page-mobile) .msg-row.me,
  body:not(.messages-page-mobile) .chat-message-row.me {
    justify-content: flex-end !important;
  }

  body:not(.messages-page-mobile) .message-row.incoming,
  body:not(.messages-page-mobile) .msg-row.incoming,
  body:not(.messages-page-mobile) .chat-message-row.incoming,
  body:not(.messages-page-mobile) .message-row.them,
  body:not(.messages-page-mobile) .msg-row.them,
  body:not(.messages-page-mobile) .chat-message-row.them {
    justify-content: flex-start !important;
  }

  body:not(.messages-page-mobile) .msg-bubble,
  body:not(.messages-page-mobile) .message-bubble,
  body:not(.messages-page-mobile) .bubble,
  body:not(.messages-page-mobile) .chat-message,
  body:not(.messages-page-mobile) .message-outgoing,
  body:not(.messages-page-mobile) .message-incoming {
    display: block !important;
    width: auto !important;
    min-width: 72px !important;
    max-width: min(68%, 720px) !important;
    box-sizing: border-box !important;
    padding: .85rem 1rem !important;
    border-radius: 18px !important;
    line-height: 1.45 !important;
    white-space: pre-wrap !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
  }

  body:not(.messages-page-mobile) .message-outgoing,
  body:not(.messages-page-mobile) .outgoing .message-bubble,
  body:not(.messages-page-mobile) .outgoing .msg-bubble,
  body:not(.messages-page-mobile) .outgoing .bubble,
  body:not(.messages-page-mobile) .chat-message.me,
  body:not(.messages-page-mobile) .message-bubble.me,
  body:not(.messages-page-mobile) .msg-bubble.me {
    margin-left: auto !important;
    margin-right: 0 !important;
    background: #0f3768 !important;
    color: #fff !important;
  }

  body:not(.messages-page-mobile) .message-incoming,
  body:not(.messages-page-mobile) .incoming .message-bubble,
  body:not(.messages-page-mobile) .incoming .msg-bubble,
  body:not(.messages-page-mobile) .incoming .bubble,
  body:not(.messages-page-mobile) .chat-message.them,
  body:not(.messages-page-mobile) .message-bubble.them,
  body:not(.messages-page-mobile) .msg-bubble.them {
    margin-right: auto !important;
    margin-left: 0 !important;
    background: #fff !important;
    color: #1f2937 !important;
  }

  body:not(.messages-page-mobile) .message-meta,
  body:not(.messages-page-mobile) .msg-meta,
  body:not(.messages-page-mobile) .bubble-meta {
    max-width: min(68%, 720px) !important;
  }

  body:not(.messages-page-mobile) .message-composer,
  body:not(.messages-page-mobile) .messages-composer,
  body:not(.messages-page-mobile) .msg-input-bar,
  body:not(.messages-page-mobile) .message-input-bar,
  body:not(.messages-page-mobile) .chat-input,
  body:not(.messages-page-mobile) form.message-form,
  body:not(.messages-page-mobile) form[action*="message"] {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body:not(.messages-page-mobile) .message-composer input,
  body:not(.messages-page-mobile) .messages-composer input,
  body:not(.messages-page-mobile) .msg-input-bar input,
  body:not(.messages-page-mobile) .message-input-bar input,
  body:not(.messages-page-mobile) .chat-input input,
  body:not(.messages-page-mobile) form.message-form input[type="text"],
  body:not(.messages-page-mobile) form[action*="message"] input[type="text"] {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
  }
}

/* Comfinnity v14.9.8f - desktop chat full width/bubble alignment fix */
@media (min-width: 769px) {
  body:not(.messages-page-mobile) .messages-layout,
  body:not(.messages-page-mobile) .messages-main,
  body:not(.messages-page-mobile) .messages-page,
  body:not(.messages-page-mobile) .msg-layout,
  body:not(.messages-page-mobile) .messages-wrapper {
    max-width: 1120px !important;
    grid-template-columns: 340px minmax(0, 1fr) !important;
  }

  body:not(.messages-page-mobile) .messages-conversation,
  body:not(.messages-page-mobile) .message-conversation,
  body:not(.messages-page-mobile) .conversation-panel,
  body:not(.messages-page-mobile) .messages-panel,
  body:not(.messages-page-mobile) .msg-panel,
  body:not(.messages-page-mobile) .chat-panel,
  body:not(.messages-page-mobile) .chat-area {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    align-items: stretch !important;
  }

  body:not(.messages-page-mobile) .messages-thread,
  body:not(.messages-page-mobile) .message-thread-body,
  body:not(.messages-page-mobile) .conversation-body,
  body:not(.messages-page-mobile) .messages-body,
  body:not(.messages-page-mobile) .msg-body,
  body:not(.messages-page-mobile) .chat-body,
  body:not(.messages-page-mobile) .message-history {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    align-items: stretch !important;
    padding: 1rem 2rem !important;
    box-sizing: border-box !important;
  }

  body:not(.messages-page-mobile) .message-row,
  body:not(.messages-page-mobile) .msg-row,
  body:not(.messages-page-mobile) .chat-message-row,
  body:not(.messages-page-mobile) .message-item,
  body:not(.messages-page-mobile) .msg-item {
    width: 100% !important;
    max-width: none !important;
    display: flex !important;
    box-sizing: border-box !important;
  }

  body:not(.messages-page-mobile) .message-row.outgoing,
  body:not(.messages-page-mobile) .msg-row.outgoing,
  body:not(.messages-page-mobile) .chat-message-row.outgoing,
  body:not(.messages-page-mobile) .message-item.outgoing,
  body:not(.messages-page-mobile) .msg-item.outgoing,
  body:not(.messages-page-mobile) .message-row.me,
  body:not(.messages-page-mobile) .msg-row.me,
  body:not(.messages-page-mobile) .chat-message-row.me {
    justify-content: flex-end !important;
    padding-left: 15% !important;
  }

  body:not(.messages-page-mobile) .message-row.incoming,
  body:not(.messages-page-mobile) .msg-row.incoming,
  body:not(.messages-page-mobile) .chat-message-row.incoming,
  body:not(.messages-page-mobile) .message-item.incoming,
  body:not(.messages-page-mobile) .msg-item.incoming,
  body:not(.messages-page-mobile) .message-row.them,
  body:not(.messages-page-mobile) .msg-row.them,
  body:not(.messages-page-mobile) .chat-message-row.them {
    justify-content: flex-start !important;
    padding-right: 15% !important;
  }

  body:not(.messages-page-mobile) .msg-bubble,
  body:not(.messages-page-mobile) .message-bubble,
  body:not(.messages-page-mobile) .bubble,
  body:not(.messages-page-mobile) .chat-message,
  body:not(.messages-page-mobile) .message-outgoing,
  body:not(.messages-page-mobile) .message-incoming {
    max-width: 78% !important;
    min-width: 74px !important;
    width: fit-content !important;
    display: block !important;
    box-sizing: border-box !important;
    padding: .85rem 1rem !important;
    white-space: pre-wrap !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    line-height: 1.45 !important;
  }

  body:not(.messages-page-mobile) .message-outgoing,
  body:not(.messages-page-mobile) .chat-message.me,
  body:not(.messages-page-mobile) .message-bubble.me,
  body:not(.messages-page-mobile) .msg-bubble.me,
  body:not(.messages-page-mobile) .bubble.me,
  body:not(.messages-page-mobile) .outgoing .message-bubble,
  body:not(.messages-page-mobile) .outgoing .msg-bubble,
  body:not(.messages-page-mobile) .outgoing .bubble {
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  body:not(.messages-page-mobile) .message-incoming,
  body:not(.messages-page-mobile) .chat-message.them,
  body:not(.messages-page-mobile) .message-bubble.them,
  body:not(.messages-page-mobile) .msg-bubble.them,
  body:not(.messages-page-mobile) .bubble.them,
  body:not(.messages-page-mobile) .incoming .message-bubble,
  body:not(.messages-page-mobile) .incoming .msg-bubble,
  body:not(.messages-page-mobile) .incoming .bubble {
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  body:not(.messages-page-mobile) .message-meta,
  body:not(.messages-page-mobile) .msg-meta,
  body:not(.messages-page-mobile) .bubble-meta,
  body:not(.messages-page-mobile) .message-actions,
  body:not(.messages-page-mobile) .msg-actions {
    max-width: 78% !important;
  }

  body:not(.messages-page-mobile) .message-composer,
  body:not(.messages-page-mobile) .messages-composer,
  body:not(.messages-page-mobile) .msg-input-bar,
  body:not(.messages-page-mobile) .message-input-bar,
  body:not(.messages-page-mobile) .chat-input,
  body:not(.messages-page-mobile) form.message-form,
  body:not(.messages-page-mobile) form[action*="message"] {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Comfinnity v14.9.8g - compact LinkedIn-style desktop chat bubbles */
@media (min-width: 769px) {
  body:not(.messages-page-mobile) .messages-thread,
  body:not(.messages-page-mobile) .message-thread-body,
  body:not(.messages-page-mobile) .conversation-body,
  body:not(.messages-page-mobile) .messages-body,
  body:not(.messages-page-mobile) .msg-body,
  body:not(.messages-page-mobile) .chat-body,
  body:not(.messages-page-mobile) .message-history {
    gap: .42rem !important;
    padding: .9rem 1.65rem !important;
  }

  body:not(.messages-page-mobile) .message-row,
  body:not(.messages-page-mobile) .msg-row,
  body:not(.messages-page-mobile) .chat-message-row,
  body:not(.messages-page-mobile) .message-item,
  body:not(.messages-page-mobile) .msg-item {
    margin: .18rem 0 !important;
  }

  body:not(.messages-page-mobile) .message-row.outgoing,
  body:not(.messages-page-mobile) .msg-row.outgoing,
  body:not(.messages-page-mobile) .chat-message-row.outgoing,
  body:not(.messages-page-mobile) .message-item.outgoing,
  body:not(.messages-page-mobile) .msg-item.outgoing,
  body:not(.messages-page-mobile) .message-row.me,
  body:not(.messages-page-mobile) .msg-row.me,
  body:not(.messages-page-mobile) .chat-message-row.me {
    padding-left: 24% !important;
  }

  body:not(.messages-page-mobile) .message-row.incoming,
  body:not(.messages-page-mobile) .msg-row.incoming,
  body:not(.messages-page-mobile) .chat-message-row.incoming,
  body:not(.messages-page-mobile) .message-item.incoming,
  body:not(.messages-page-mobile) .msg-item.incoming,
  body:not(.messages-page-mobile) .message-row.them,
  body:not(.messages-page-mobile) .msg-row.them,
  body:not(.messages-page-mobile) .chat-message-row.them {
    padding-right: 24% !important;
  }

  body:not(.messages-page-mobile) .msg-bubble,
  body:not(.messages-page-mobile) .message-bubble,
  body:not(.messages-page-mobile) .bubble,
  body:not(.messages-page-mobile) .chat-message,
  body:not(.messages-page-mobile) .message-outgoing,
  body:not(.messages-page-mobile) .message-incoming {
    width: fit-content !important;
    max-width: min(58%, 560px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: .58rem .9rem !important;
    border-radius: 14px !important;
    line-height: 1.35 !important;
    font-size: .96rem !important;
    box-sizing: border-box !important;
    white-space: pre-wrap !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  body:not(.messages-page-mobile) .message-outgoing,
  body:not(.messages-page-mobile) .chat-message.me,
  body:not(.messages-page-mobile) .message-bubble.me,
  body:not(.messages-page-mobile) .msg-bubble.me,
  body:not(.messages-page-mobile) .bubble.me,
  body:not(.messages-page-mobile) .outgoing .message-bubble,
  body:not(.messages-page-mobile) .outgoing .msg-bubble,
  body:not(.messages-page-mobile) .outgoing .bubble {
    background: #0f3768 !important;
    color: #fff !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  body:not(.messages-page-mobile) .message-incoming,
  body:not(.messages-page-mobile) .chat-message.them,
  body:not(.messages-page-mobile) .message-bubble.them,
  body:not(.messages-page-mobile) .msg-bubble.them,
  body:not(.messages-page-mobile) .bubble.them,
  body:not(.messages-page-mobile) .incoming .message-bubble,
  body:not(.messages-page-mobile) .incoming .msg-bubble,
  body:not(.messages-page-mobile) .incoming .bubble {
    background: #fff !important;
    color: #1f2937 !important;
    border: 1px solid #dbe4ec !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  body:not(.messages-page-mobile) .message-meta,
  body:not(.messages-page-mobile) .msg-meta,
  body:not(.messages-page-mobile) .bubble-meta,
  body:not(.messages-page-mobile) .message-actions,
  body:not(.messages-page-mobile) .msg-actions {
    max-width: min(58%, 560px) !important;
    font-size: .82rem !important;
    line-height: 1.2 !important;
    margin-top: .18rem !important;
  }

  body:not(.messages-page-mobile) .message-label,
  body:not(.messages-page-mobile) .msg-label,
  body:not(.messages-page-mobile) .message-author-label {
    margin-bottom: .16rem !important;
    font-size: .82rem !important;
    line-height: 1.2 !important;
  }

  body:not(.messages-page-mobile) .message-composer,
  body:not(.messages-page-mobile) .messages-composer,
  body:not(.messages-page-mobile) .msg-input-bar,
  body:not(.messages-page-mobile) .message-input-bar,
  body:not(.messages-page-mobile) .chat-input,
  body:not(.messages-page-mobile) form.message-form,
  body:not(.messages-page-mobile) form[action*="message"] {
    min-height: 62px !important;
    padding: .5rem .85rem !important;
  }
}

/* Comfinnity v14.9.8h - final compact desktop messages layout */
@media (min-width: 769px) {
  body:not(.messages-page-mobile) .messages-layout,
  body:not(.messages-page-mobile) .messages-main,
  body:not(.messages-page-mobile) .messages-page,
  body:not(.messages-page-mobile) .msg-layout,
  body:not(.messages-page-mobile) .messages-wrapper {
    max-width: 1080px !important;
    grid-template-columns: 340px minmax(0, 1fr) !important;
  }

  body:not(.messages-page-mobile) .messages-thread,
  body:not(.messages-page-mobile) .message-thread-body,
  body:not(.messages-page-mobile) .conversation-body,
  body:not(.messages-page-mobile) .messages-body,
  body:not(.messages-page-mobile) .msg-body,
  body:not(.messages-page-mobile) .chat-body,
  body:not(.messages-page-mobile) .message-history {
    padding: .75rem 1.35rem !important;
    gap: .22rem !important;
    align-items: stretch !important;
  }

  body:not(.messages-page-mobile) .message-row,
  body:not(.messages-page-mobile) .msg-row,
  body:not(.messages-page-mobile) .chat-message-row,
  body:not(.messages-page-mobile) .message-item,
  body:not(.messages-page-mobile) .msg-item {
    width: 100% !important;
    display: flex !important;
    margin: .08rem 0 !important;
    box-sizing: border-box !important;
  }

  body:not(.messages-page-mobile) .message-row.outgoing,
  body:not(.messages-page-mobile) .msg-row.outgoing,
  body:not(.messages-page-mobile) .chat-message-row.outgoing,
  body:not(.messages-page-mobile) .message-item.outgoing,
  body:not(.messages-page-mobile) .msg-item.outgoing,
  body:not(.messages-page-mobile) .message-row.me,
  body:not(.messages-page-mobile) .msg-row.me,
  body:not(.messages-page-mobile) .chat-message-row.me {
    justify-content: flex-end !important;
    padding-left: 38% !important;
    padding-right: .25rem !important;
  }

  body:not(.messages-page-mobile) .message-row.incoming,
  body:not(.messages-page-mobile) .msg-row.incoming,
  body:not(.messages-page-mobile) .chat-message-row.incoming,
  body:not(.messages-page-mobile) .message-item.incoming,
  body:not(.messages-page-mobile) .msg-item.incoming,
  body:not(.messages-page-mobile) .message-row.them,
  body:not(.messages-page-mobile) .msg-row.them,
  body:not(.messages-page-mobile) .chat-message-row.them {
    justify-content: flex-start !important;
    padding-right: 38% !important;
    padding-left: .25rem !important;
  }

  body:not(.messages-page-mobile) .msg-bubble,
  body:not(.messages-page-mobile) .message-bubble,
  body:not(.messages-page-mobile) .bubble,
  body:not(.messages-page-mobile) .chat-message,
  body:not(.messages-page-mobile) .message-outgoing,
  body:not(.messages-page-mobile) .message-incoming {
    width: fit-content !important;
    max-width: 420px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: .46rem .78rem !important;
    border-radius: 10px !important;
    line-height: 1.28 !important;
    font-size: .91rem !important;
    box-sizing: border-box !important;
    white-space: pre-wrap !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  body:not(.messages-page-mobile) .message-outgoing,
  body:not(.messages-page-mobile) .chat-message.me,
  body:not(.messages-page-mobile) .message-bubble.me,
  body:not(.messages-page-mobile) .msg-bubble.me,
  body:not(.messages-page-mobile) .bubble.me,
  body:not(.messages-page-mobile) .outgoing .message-bubble,
  body:not(.messages-page-mobile) .outgoing .msg-bubble,
  body:not(.messages-page-mobile) .outgoing .bubble {
    background: #0f3768 !important;
    color: #fff !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  body:not(.messages-page-mobile) .message-incoming,
  body:not(.messages-page-mobile) .chat-message.them,
  body:not(.messages-page-mobile) .message-bubble.them,
  body:not(.messages-page-mobile) .msg-bubble.them,
  body:not(.messages-page-mobile) .bubble.them,
  body:not(.messages-page-mobile) .incoming .message-bubble,
  body:not(.messages-page-mobile) .incoming .msg-bubble,
  body:not(.messages-page-mobile) .incoming .bubble {
    background: #fff !important;
    color: #1f2937 !important;
    border: 1px solid #dbe4ec !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  body:not(.messages-page-mobile) .message-label,
  body:not(.messages-page-mobile) .msg-label,
  body:not(.messages-page-mobile) .message-author-label,
  body:not(.messages-page-mobile) .message-meta,
  body:not(.messages-page-mobile) .msg-meta,
  body:not(.messages-page-mobile) .bubble-meta,
  body:not(.messages-page-mobile) .message-actions,
  body:not(.messages-page-mobile) .msg-actions {
    max-width: 420px !important;
    font-size: .76rem !important;
    line-height: 1.15 !important;
    margin-top: .08rem !important;
    margin-bottom: .08rem !important;
  }

  body:not(.messages-page-mobile) .message-composer,
  body:not(.messages-page-mobile) .messages-composer,
  body:not(.messages-page-mobile) .msg-input-bar,
  body:not(.messages-page-mobile) .message-input-bar,
  body:not(.messages-page-mobile) .chat-input,
  body:not(.messages-page-mobile) form.message-form,
  body:not(.messages-page-mobile) form[action*="message"] {
    min-height: 58px !important;
    padding: .42rem .75rem !important;
  }

  body:not(.messages-page-mobile) .message-composer input,
  body:not(.messages-page-mobile) .messages-composer input,
  body:not(.messages-page-mobile) .msg-input-bar input,
  body:not(.messages-page-mobile) .message-input-bar input,
  body:not(.messages-page-mobile) .chat-input input,
  body:not(.messages-page-mobile) form.message-form input[type="text"],
  body:not(.messages-page-mobile) form[action*="message"] input[type="text"] {
    height: 40px !important;
    min-height: 40px !important;
    font-size: .92rem !important;
  }
}

/* Comfinnity v14.9.8i - messages emoji picker visibility fix */
.messages-layout,
.messages-main,
.messages-page,
.msg-layout,
.messages-wrapper,
.messages-conversation,
.message-conversation,
.conversation-panel,
.messages-panel,
.msg-panel,
.chat-panel,
.chat-area {
  overflow: visible !important;
}

.messages-thread,
.message-thread-body,
.conversation-body,
.messages-body,
.msg-body,
.chat-body,
.message-history {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.emoji-picker,
.emoji-menu,
.emoji-popover,
.emoji-panel,
.emoticon-picker,
.emoticon-menu,
.emoticon-popover,
.message-emoji-picker,
.chat-emoji-picker,
[data-emoji-picker] {
  position: absolute !important;
  z-index: 99999 !important;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: .25rem;
  width: 280px;
  max-width: calc(100vw - 24px);
  max-height: 260px;
  overflow-y: auto;
  padding: .75rem;
  background: #fff;
  border: 1px solid #d6dde6;
  border-radius: 16px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .18);
}

.emoji-picker.is-hidden,
.emoji-menu.is-hidden,
.emoji-popover.is-hidden,
.emoji-panel.is-hidden,
.emoticon-picker.is-hidden,
.emoticon-menu.is-hidden,
.emoticon-popover.is-hidden,
.message-emoji-picker.is-hidden,
.chat-emoji-picker.is-hidden {
  display: none !important;
}

.emoji-picker button,
.emoji-menu button,
.emoji-popover button,
.emoji-panel button,
.emoticon-picker button,
.emoticon-menu button,
.emoticon-popover button,
.message-emoji-picker button,
.chat-emoji-picker button,
[data-emoji-picker] button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.emoji-picker button:hover,
.emoji-menu button:hover,
.emoji-popover button:hover,
.emoji-panel button:hover,
.emoticon-picker button:hover,
.emoticon-menu button:hover,
.emoticon-popover button:hover,
.message-emoji-picker button:hover,
.chat-emoji-picker button:hover,
[data-emoji-picker] button:hover {
  background: #eef3f8;
}

.message-composer,
.messages-composer,
.msg-input-bar,
.message-input-bar,
.chat-input,
form.message-form,
form[action*="message"] {
  overflow: visible !important;
  position: relative !important;
  z-index: 50 !important;
}

@media (max-width: 768px) {
  .emoji-picker,
  .emoji-menu,
  .emoji-popover,
  .emoji-panel,
  .emoticon-picker,
  .emoticon-menu,
  .emoticon-popover,
  .message-emoji-picker,
  .chat-emoji-picker,
  [data-emoji-picker] {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: calc(140px + env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: none !important;
    grid-template-columns: repeat(8, 1fr);
  }
}

/* Comfinnity v15.0.0 - Push Notifications Foundation */
.push-settings-wrap,.notifications-wrap{max-width:760px;margin:0 auto;padding:2rem 1rem}.push-settings-card{background:#fff;border:1px solid #dfe5eb;border-radius:22px;padding:2rem;box-shadow:0 10px 30px rgba(15,23,42,.08)}.push-warning{margin:1rem 0;padding:.85rem 1rem;border-radius:14px;background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}.push-help{margin-top:1.4rem;padding:1rem;border-radius:16px;background:#eef3f8}.push-settings-card .btn{margin-right:.6rem;margin-top:.8rem}.notifications-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}.notifications-list{display:grid;gap:.75rem}.notification-item{display:block;padding:1rem;border-radius:16px;background:#fff;border:1px solid #dfe5eb;color:inherit;text-decoration:none}.notification-item.is-unread{border-color:var(--navy,#0f3768);box-shadow:0 0 0 1px rgba(15,55,104,.12)}.notification-item p{margin:.35rem 0;color:#64748b}.notification-item span{font-size:.82rem;color:#94a3b8}.notification-empty{padding:2rem;border-radius:18px;background:#fff;text-align:center;color:#64748b}

/* Comfinnity v15.0.7 - LinkedIn-style notifications layout */
.notifications-linkedin-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 3.2rem 1rem;
    display: grid;
    grid-template-columns: 255px minmax(0, 1fr) 300px;
    gap: 1.4rem;
}

.notifications-profile-card,
.notifications-center-card,
.notifications-info-card,
.notifications-manage-card {
    background: #fff;
    border: 1px solid #dfe5eb;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}

.notifications-profile-card {
    overflow: hidden;
    align-self: start;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.notifications-profile-cover {
    height: 95px;
    background: linear-gradient(135deg, #0f3768, #365c7d);
    border-radius: 10px 10px 0 0;
}

.notifications-profile-body {
    background: #fff;
    border: 1px solid #dfe5eb;
    border-top: 0;
    border-radius: 0 0 10px 10px;
    padding: 0 1rem 1.2rem;
}

.notifications-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 5px solid #fff;
    object-fit: cover;
    margin-top: -40px;
    background: #eef3f8;
}

.notifications-profile-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.notifications-profile-body h2 {
    margin: .45rem 0 .2rem;
    font-size: 1.15rem;
    color: #1f2d3d;
}

.notifications-profile-body p {
    margin: 0;
    color: #64748b;
    line-height: 1.35;
}

.notifications-manage-card {
    margin-top: 1rem;
    padding: 1.05rem;
}

.notifications-manage-card strong {
    display: block;
    margin-bottom: .8rem;
    color: #1f2d3d;
}

.notifications-manage-card a {
    color: #284b6d;
    font-weight: 700;
    text-decoration: none;
}

.notifications-center-card {
    overflow: hidden;
}

.notifications-center-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem .4rem;
}

.notifications-center-head h1 {
    margin: 0;
    color: #1f2d3d;
    font-size: 1.65rem;
}

.notifications-mark-read,
.notifications-info-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 1.6rem;
    border: 2px solid #0f3768;
    border-radius: 999px;
    color: #0f3768;
    font-weight: 800;
    text-decoration: none;
    background: #fff;
}

.notifications-tabs {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    padding: 0 1.25rem .85rem;
    border-bottom: 1px solid #dfe5eb;
}

.notifications-tabs a {
    padding: .45rem 1rem;
    border: 1px solid #dbe4ec;
    border-radius: 999px;
    color: #1f2d3d;
    font-weight: 800;
    text-decoration: none;
    background: #fff;
}

.notifications-tabs a.active {
    background: #0f3768;
    border-color: #0f3768;
    color: #fff;
}

.notification-feed-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 20px;
    gap: .85rem;
    padding: 1rem 1.25rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #dfe5eb;
    background: #fff;
}

.notification-feed-item:hover,
.notification-feed-item.is-unread {
    background: #f8fbff;
}

.notification-feed-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #eef3f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
}

.notification-feed-title {
    font-size: 1rem;
    color: #1f2d3d;
    line-height: 1.35;
}

.notification-feed-body {
    color: #64748b;
    margin-top: .2rem;
    line-height: 1.4;
}

.notification-feed-time {
    color: #64748b;
    font-size: .9rem;
    margin-top: .2rem;
}

.notification-feed-action {
    color: #284b6d;
    font-weight: 800;
    margin-top: .4rem;
    font-size: .93rem;
}

.notification-feed-arrow {
    color: #64748b;
    font-size: 1.4rem;
    align-self: center;
}

.notifications-empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: #64748b;
}

.notifications-empty-state div {
    font-size: 2.4rem;
    margin-bottom: .5rem;
}

.notifications-empty-state strong {
    display: block;
    color: #1f2d3d;
    margin-bottom: .2rem;
}

.notifications-info-card {
    align-self: start;
    padding: 1.4rem;
    text-align: center;
}

.notifications-info-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #f4f7fb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 1px solid #dfe5eb;
}

.notifications-info-card h2 {
    margin: 0 0 .6rem;
    color: #1f2d3d;
    font-size: 1.1rem;
}

.notifications-info-card p {
    color: #64748b;
    line-height: 1.45;
    margin-bottom: 1.2rem;
}

.notifications-info-card a {
    width: 100%;
    box-sizing: border-box;
}

.notifications-footer-links {
    margin-top: 1.4rem;
    color: #64748b;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    font-size: .88rem;
}

.notifications-footer-links strong {
    color: #64748b;
}

@media (max-width: 980px) {
    .notifications-linkedin-page {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .notifications-profile-card,
    .notifications-info-card {
        display: none;
    }

    .notifications-center-head {
        padding: 1rem 1rem .4rem;
    }

    .notifications-tabs {
        padding: 0 1rem .8rem;
    }

    .notification-feed-item {
        padding: 1rem;
    }
}

/* Comfinnity v15.1.4 notification link fix */
.notification-feed-item {
    cursor: pointer;
}
.notification-feed-action {
    pointer-events: none;
}

/* Comfinnity v15.1.9 QR profile friendly URL force fix */
.qr-profile-page{max-width:860px;margin:0 auto;padding:3rem 1rem}
.qr-profile-card{background:#fff;border:1px solid #dfe5eb;border-radius:22px;padding:2rem;box-shadow:0 18px 45px rgba(15,23,42,.08)}
.qr-profile-header{display:flex;align-items:center;gap:1.2rem;margin-bottom:2rem}
.qr-profile-avatar{width:78px;height:78px;border-radius:50%;object-fit:cover;background:#eef3f8}
.qr-profile-avatar-placeholder{display:flex;align-items:center;justify-content:center;font-size:2rem}
.qr-profile-header h1{margin:0 0 .35rem;color:#0f3768;font-size:2.1rem}
.qr-profile-header p{margin:0;color:#708399;font-size:1.05rem}
.qr-profile-box{background:#f7fafc;border:1px solid #dfe8ef;border-radius:18px;padding:1.5rem;display:flex;justify-content:center}
.qr-profile-code{background:#fff;border-radius:14px;padding:1rem}
.qr-profile-code img{display:block;width:min(430px,100%);height:auto}
.qr-profile-url{margin:1.25rem 0;background:#eef6fb;color:#60758a;border-radius:12px;padding:.95rem 1rem;text-align:center;overflow-wrap:anywhere;font-weight:600}
.qr-profile-actions{display:flex;justify-content:center;gap:.85rem;flex-wrap:wrap}
@media(max-width:620px){.qr-profile-header{align-items:flex-start}.qr-profile-card{padding:1.25rem}}

/* Comfinnity v15.2.1 QR avatar path fix */
.qr-profile-avatar{
    width:78px;
    height:78px;
    min-width:78px;
    border-radius:50%;
    object-fit:cover;
    background:#eef3f8;
}
.qr-profile-avatar-placeholder{
    align-items:center;
    justify-content:center;
    font-size:2rem;
    color:#94a3b8;
}

/* Comfinnity v15.2.2 strict public profile view */
.public-profile-page{max-width:1120px;margin:0 auto;padding:2rem 1rem}
.public-profile-main{max-width:780px}
.public-profile-card,.public-profile-section{background:#fff;border:1px solid #dfe5eb;border-radius:16px;box-shadow:0 10px 30px rgba(15,23,42,.06);overflow:hidden;margin-bottom:1rem}
.public-profile-cover{height:210px;background:#123a63;background-size:cover;background-position:center}
.public-profile-body{padding:0 1.5rem 1.5rem}
.public-profile-avatar{width:150px;height:150px;border-radius:50%;object-fit:cover;border:7px solid #fff;background:#eef3f8;margin-top:-75px}
.public-profile-avatar-placeholder{display:flex;align-items:center;justify-content:center;font-size:3rem;color:#94a3b8}
.public-profile-body h1{margin:.6rem 0 .2rem;color:#1f2d3d;font-size:2rem}
.profile-check{font-size:1rem;color:#0f3768}
.public-profile-headline,.public-profile-meta{margin:.25rem 0;color:#64748b}
.public-profile-company{font-weight:800;color:#1f2d3d}
.public-profile-company a{color:inherit;text-decoration:none}
.public-profile-actions{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:1.2rem}
.public-profile-section{padding:1.5rem}
.public-profile-section h2{margin-top:0;color:#1f2d3d}

/* Comfinnity v15.2.3 public profile layout refresh */
.public-profile-v1523{
    max-width:1180px;
    margin:0 auto;
    padding:2rem 1rem 3rem;
}

.public-profile-grid{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 320px;
    gap:1.25rem;
    align-items:start;
}

.public-profile-main{
    min-width:0;
}

.public-profile-card,
.public-profile-stats-card,
.public-profile-section,
.public-profile-side-card,
.public-profile-not-found{
    background:#fff;
    border:1px solid #dfe5eb;
    border-radius:16px;
    box-shadow:0 10px 30px rgba(15,23,42,.06);
    overflow:hidden;
    margin-bottom:1rem;
}

.public-profile-cover{
    height:250px;
    background:#123a63;
    background-size:cover;
    background-position:center;
    position:relative;
}

.public-profile-cover-pattern{
    position:absolute;
    inset:0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.14), transparent 28%),
        linear-gradient(135deg, #0f3768, #365c7d);
}

.public-profile-body{
    padding:0 1.5rem 1.5rem;
}

.public-profile-avatar-wrap{
    height:82px;
}

.public-profile-avatar{
    width:154px;
    height:154px;
    border-radius:50%;
    object-fit:cover;
    border:7px solid #fff;
    background:#eef3f8;
    margin-top:-78px;
    box-shadow:0 10px 24px rgba(15,23,42,.14);
}

.public-profile-avatar-placeholder{
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:3rem;
    color:#94a3b8;
}

.public-profile-title-row h1{
    margin:.4rem 0 .25rem;
    color:#1f2d3d;
    font-size:2.15rem;
    line-height:1.1;
}

.profile-check{
    color:#0f3768;
    font-size:1rem;
    vertical-align:middle;
}

.public-profile-headline,
.public-profile-meta{
    margin:.25rem 0;
    color:#64748b;
    font-size:1.02rem;
}

.public-profile-company{
    margin:.8rem 0 0;
    font-weight:800;
    color:#1f2d3d;
}

.public-profile-company a{
    color:inherit;
    text-decoration:none;
}

.public-profile-actions,
.public-profile-side-actions{
    display:flex;
    gap:.65rem;
    flex-wrap:wrap;
    margin-top:1.1rem;
}

.public-profile-stats-card,
.public-profile-section,
.public-profile-side-card,
.public-profile-not-found{
    padding:1.35rem 1.5rem;
}

.public-profile-stats-card h2,
.public-profile-section h2,
.public-profile-side-card h3{
    margin:0 0 1rem;
    color:#1f2d3d;
}

.public-profile-stats{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:1rem;
}

.public-profile-stats div{
    border-right:1px solid #dfe5eb;
    padding-right:1rem;
}

.public-profile-stats div:last-child{
    border-right:0;
}

.public-profile-stats strong{
    display:block;
    font-size:1.35rem;
    color:#0f3768;
}

.public-profile-stats span{
    display:block;
    color:#64748b;
    margin-top:.25rem;
}

.public-profile-section p,
.public-profile-side-card p{
    color:#475569;
    line-height:1.6;
}

.public-profile-sidebar{
    position:sticky;
    top:86px;
}

.public-profile-url{
    background:#eef6fb;
    color:#60758a;
    border-radius:12px;
    padding:.85rem 1rem;
    font-weight:700;
    overflow-wrap:anywhere;
}

.btn-full{
    width:100%;
    justify-content:center;
}

@media(max-width:980px){
    .public-profile-grid{
        grid-template-columns:1fr;
    }
    .public-profile-sidebar{
        position:static;
    }
}

@media(max-width:620px){
    .public-profile-v1523{
        padding:1rem .75rem 5rem;
    }
    .public-profile-cover{
        height:160px;
    }
    .public-profile-avatar{
        width:116px;
        height:116px;
        margin-top:-60px;
    }
    .public-profile-avatar-wrap{
        height:62px;
    }
    .public-profile-title-row h1{
        font-size:1.65rem;
    }
    .public-profile-stats{
        grid-template-columns:1fr;
    }
    .public-profile-stats div{
        border-right:0;
        border-bottom:1px solid #dfe5eb;
        padding-bottom:.75rem;
    }
    .public-profile-stats div:last-child{
        border-bottom:0;
    }
}


/* Comfinnity v15.2.4 profile header avatar overlap fix */
.public-profile-cover{
    overflow:visible !important;
}

.public-profile-body{
    position:relative;
    padding:90px 1.5rem 1.5rem !important;
}

.public-profile-avatar-wrap{
    position:absolute;
    left:32px;
    top:-78px;
    height:auto !important;
    z-index:20;
}

.public-profile-avatar{
    width:160px !important;
    height:160px !important;
    margin-top:0 !important;
    border-radius:50%;
    object-fit:cover;
    border:6px solid #fff;
    background:#eef3f8;
    box-shadow:0 10px 24px rgba(15,23,42,.14);
}

.public-profile-title-row{
    margin-left:190px;
    min-height:90px;
}

@media(max-width:620px){
    .public-profile-avatar-wrap{
        left:20px;
        top:-54px;
    }

    .public-profile-avatar{
        width:110px !important;
        height:110px !important;
    }

    .public-profile-title-row{
        margin-left:0;
        padding-top:60px;
    }

    .public-profile-body{
        padding:70px 1rem 1rem !important;
    }
}

/* Comfinnity v15.2.5 restore full profile page */
.profile-restore-v1525{max-width:1180px;margin:0 auto;padding:1.25rem 1rem 3rem}
.profile-layout-grid{display:grid;grid-template-columns:minmax(0,760px) 320px;gap:1.25rem;align-items:start;justify-content:center}
.profile-card{background:#fff;border:1px solid #dfe5eb;border-radius:12px;box-shadow:0 8px 24px rgba(15,23,42,.05);overflow:hidden;margin-bottom:1rem}
.profile-cover{height:220px;background:#123a63;background-size:cover;background-position:center;position:relative}
.profile-cover-fallback{position:absolute;inset:0;background:linear-gradient(135deg,#0f3768,#365c7d)}
.profile-hero-body{position:relative;padding:82px 1.5rem 1.5rem}
.profile-avatar-wrap{position:absolute;left:1.5rem;top:-74px;z-index:5}
.profile-avatar{width:150px;height:150px;border-radius:50%;object-fit:cover;border:7px solid #fff;background:#eef3f8;box-shadow:0 10px 24px rgba(15,23,42,.12)}
.profile-avatar-placeholder{display:flex;align-items:center;justify-content:center;font-size:3rem;color:#94a3b8}
.profile-hero-body h1{margin:0 0 .25rem;color:#1f2d3d;font-size:2rem;line-height:1.1}
.profile-check{color:#0f3768;font-size:1rem}
.profile-headline,.profile-meta{color:#64748b;margin:.25rem 0}
.profile-company{font-weight:800;color:#1f2d3d;margin:.7rem 0}
.profile-qr-bar{display:flex;justify-content:center;align-items:center;margin:1.2rem 0 .7rem;border:2px solid #0f3768;border-radius:999px;min-height:48px;color:#0f3768;font-weight:800;text-decoration:none}
.profile-actions{display:flex;gap:.6rem;flex-wrap:wrap}
.profile-stats-card,.profile-section,.sidebar-card{padding:1.25rem 1.5rem}
.profile-stats-card h2,.profile-section h2,.sidebar-card h3{margin:0 0 1rem;color:#1f2d3d}
.profile-stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
.profile-stats-grid div{border-right:1px solid #dfe5eb;padding-right:1rem}
.profile-stats-grid div:last-child{border-right:0}
.profile-stats-grid strong{display:block;font-size:1.4rem;color:#0f3768}
.profile-stats-grid span{display:block;color:#64748b;margin-top:.25rem}
.profile-card-footer{display:block;text-align:center;border-top:1px solid #dfe5eb;margin:1rem -1.5rem -1.25rem;padding:1rem;color:#64748b;font-weight:800;text-decoration:none}
.featured-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.featured-card{border:1px solid #dfe5eb;border-radius:10px;padding:1rem;overflow:hidden}
.featured-card img,.activity-item img{max-width:100%;border-radius:8px;margin-top:.6rem}
.section-title-row,.sidebar-title-row{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.btn-small{min-height:34px;padding:.35rem .9rem}
.activity-item,.profile-list-item,.recommendation-item{border-top:1px solid #edf2f7;padding:1rem 0}
.activity-item:first-of-type,.profile-list-item:first-of-type{border-top:0}
.activity-author{font-weight:800;color:#1f2d3d}
.profile-list-item{display:grid;grid-template-columns:42px minmax(0,1fr);gap:.8rem}
.list-icon{width:36px;height:36px;border-radius:8px;background:#eef3f8;display:flex;align-items:center;justify-content:center}
.skills-list div,.language-item{border-top:1px solid #edf2f7;padding:.8rem 0}
.skills-list div:first-child,.language-item:first-child{border-top:0}
.language-item strong{display:block}
.language-item span,.muted{color:#64748b}
.profile-sidebar-column{position:sticky;top:86px}
.sidebar-url{background:#eef6fb;color:#60758a;border-radius:12px;padding:.8rem;overflow-wrap:anywhere;font-weight:700}
.sidebar-actions{display:flex;gap:.5rem;margin-top:.8rem}
.also-viewed-list div{border-top:1px solid #edf2f7;padding:.85rem 0}
.also-viewed-list div:first-child{border-top:0}
.also-viewed-list strong{display:block;color:#1f2d3d}
.also-viewed-list span{display:block;color:#64748b;font-size:.9rem}
.also-viewed-list a{display:inline-flex;margin-top:.4rem;border:1px solid #0f3768;border-radius:999px;padding:.3rem .85rem;color:#0f3768;text-decoration:none;font-weight:800}
@media(max-width:980px){.profile-layout-grid{grid-template-columns:1fr}.profile-sidebar-column{position:static}}
@media(max-width:620px){.profile-restore-v1525{padding:.75rem .75rem 5rem}.profile-cover{height:160px}.profile-hero-body{padding:66px 1rem 1rem}.profile-avatar-wrap{top:-56px;left:1rem}.profile-avatar{width:112px;height:112px}.profile-hero-body h1{font-size:1.55rem}.profile-stats-grid,.featured-grid{grid-template-columns:1fr}.profile-stats-grid div{border-right:0;border-bottom:1px solid #dfe5eb;padding-bottom:.8rem}.profile-stats-grid div:last-child{border-bottom:0}.sidebar-actions{flex-direction:column}}

/* Comfinnity v15.2.8 company follow button fix */
[data-company-follow]{
    cursor:pointer;
}
[data-company-follow].is-following{
    background:#eef8f1 !important;
    color:#15803d !important;
    border-color:#86efac !important;
}
[data-company-follow]:disabled{
    opacity:.65;
    cursor:wait;
}
.company-follow-btn{
    white-space:nowrap;
}

/* Comfinnity v15.2.9 company follow autodetect fix */
[data-company-follow]{
    cursor:pointer;
}
[data-company-follow].is-following{
    background:#eef8f1 !important;
    color:#15803d !important;
    border-color:#86efac !important;
}
[data-company-follow]:disabled{
    opacity:.65;
    cursor:wait;
}
