/*
 * SVM Social - main stylesheet
 * Change colours, fonts and spacing in the variables below; the whole site follows.
 * Sections: 1 Variables  2 Base  3 Buttons  4 Forms  5 Header  6 Layout  7 Cards and sidebars
 *           8 Account pages  9 Messages and toasts  10 Mobile bottom bar  11 Responsive
 */

/* ---------- 1. Variables ---------- */
:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #e8effd;
  --green: #1f7a4a;
  --green-soft: #e3f4ea;
  --red: #d92d20;
  --red-soft: #fdecea;
  --text: #1b2430;
  --text-body: #27313d;
  --text-soft: #475467;
  --text-muted: #667085;
  --border: #e6e9ee;
  --border-strong: #d0d5dd;
  --page: #f6f7f9;
  --card: #ffffff;
  --input: #f4f6f8;
  --radius: 10px;
  --radius-small: 8px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-height: 59px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--page);
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
p { margin: 0; }
.icon {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; vertical-align: middle;
}
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 22px; height: 22px; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-muted);
}

/* Avatars: coloured initials or a photo */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px; object-fit: cover;
}
.avatar-xl { width: 94px; height: 94px; font-size: 32px; }
.avatar-lg { width: 50px; height: 50px; font-size: 17px; }
.avatar-sm { width: 32px; height: 32px; font-size: 12.5px; }
.avatar-xs { width: 27px; height: 27px; font-size: 11px; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 33px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-small);
  background: #fff; color: var(--text);
  font: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--page); color: var(--text); text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-small { height: 28px; padding: 0 10px; font-size: 13.5px; }
.btn-block { width: 100%; height: 38px; font-size: 15px; }
.icon-button {
  width: 34px; height: 34px; padding: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius-small); background: none;
  color: var(--text-muted); cursor: pointer;
}
.icon-button:hover { background: #f2f4f7; color: var(--text); }
.link-button {
  border: 0; background: none; padding: 0; font: inherit;
  color: var(--blue); font-weight: 600; cursor: pointer;
}
.link-button:hover { text-decoration: underline; }

/* ---------- 4. Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field label, .field .label { font-size: 14px; font-weight: 600; color: #344054; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.input {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid #e1e5eb; border-radius: 10px;
  background: #f9fafb; color: var(--text); font: inherit; font-size: 15px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: #98a2b3; }
.input:hover { border-color: #cdd3db; }
.input:focus, .code-input:focus {
  outline: none; border-color: var(--blue); background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input-with-button { position: relative; }
.input-with-button .input { padding-right: 38px; }
.input-with-button .icon-button { position: absolute; right: 4px; top: 4px; }
.help { font-size: 13px; color: var(--text-muted); }
.checkbox { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #344054; cursor: pointer; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--blue); }
.code-input {
  width: 100%; height: 54px; text-align: center;
  font: inherit; font-size: 30px; font-weight: 700; letter-spacing: 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-small);
}

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1400px; margin: 0 auto; height: var(--header-height);
  padding: 0 16px; display: flex; align-items: center; gap: 13px;
}
.logo { display: flex; align-items: center; gap: 6px; color: var(--text); white-space: nowrap; }
.logo:hover { color: var(--text); text-decoration: none; }
.logo-mark {
  width: 29px; height: 29px; border-radius: 8px; background: var(--blue);
  color: #fff; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.logo-name { font-size: 21px; font-weight: 700; letter-spacing: -0.3px; }
.logo-small { font-size: 14px; color: #4b5563; margin-left: -2px; }
.header-search {
  display: flex; align-items: center; gap: 8px;
  flex: 0 1 360px; min-width: 0; height: 38px; margin-left: 16px; padding: 0 11px;
  border: 1px solid #e3e7ec; border-radius: var(--radius-small);
  background: var(--input); color: var(--text-muted);
}
.header-search input {
  border: 0; background: transparent; outline: none;
  width: 100%; min-width: 0; font: inherit; font-size: 14.5px; color: var(--text);
}
.main-nav { display: flex; align-items: stretch; gap: 3px; margin-left: auto; height: var(--header-height); }
.main-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 74px; padding: 0 6px; color: #4b5563; font-size: 13px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--blue); text-decoration: none; }
.main-nav a.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 500; }
.main-nav .icon { width: 20px; height: 20px; }
.nav-icon { position: relative; display: flex; }
.count-badge {
  position: absolute; top: -5px; right: -10px;
  min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 8px; border: 2px solid #fff; box-sizing: content-box;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}
.count-badge:empty { display: none; }

/* Account menu (top right) */
.account-menu { position: relative; }
.account-button {
  display: flex; align-items: center; gap: 8px; height: 36px;
  padding: 0 0 0 14px; margin-left: 6px;
  border: 0; border-left: 1px solid var(--border); background: none;
  font: inherit; font-size: 15px; color: var(--text); cursor: pointer;
}
.dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  min-width: 207px; padding: 5px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.12);
}
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: var(--radius-small);
  background: none; color: var(--text); font: inherit; font-size: 14.5px;
  text-align: left; cursor: pointer;
}
.dropdown a:hover, .dropdown button:hover { background: var(--page); text-decoration: none; color: var(--text); }
.dropdown hr { border: 0; border-top: 1px solid var(--border); margin: 5px 0; }
.dropdown-user { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.dropdown-user strong { display: block; }

/* ---------- 6. Page layout ---------- */
.page-wrap {
  max-width: 1400px; margin: 0 auto; padding: 24px 16px 32px;
  display: flex; gap: 22px; align-items: flex-start; justify-content: center;
}
.sidebar-left { flex: 0 0 240px; position: sticky; top: calc(var(--header-height) + 30px); }
.content { flex: 1 1 auto; min-width: 0; max-width: 570px; display: flex; flex-direction: column; gap: 13px; }
.sidebar-right { flex: 0 0 360px; display: flex; flex-direction: column; gap: 13px; }
.narrow-wrap { max-width: 1060px; margin: 0 auto; padding: 24px 16px 32px; }

/* ---------- 7. Cards and sidebars ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.card-body { padding: 16px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 6px; font-weight: 700; font-size: 15px;
}
.card-header a { font-size: 13px; font-weight: 500; }

.category-nav { list-style: none; margin: 8px 0 0; padding: 0; }
.category-nav a {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px;
  border-radius: var(--radius-small); color: #344054; font-size: 15.5px;
}
.category-nav a:hover { background: #eceff3; color: var(--text); text-decoration: none; }
.category-nav a.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.category-icon {
  width: 27px; height: 27px; border-radius: 8px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.category-icon .icon { width: 14px; height: 14px; }
.sidebar-footer {
  margin: 14px 6px 0; padding-top: 14px; border-top: 1px solid #e3e7ec;
  font-size: 13px; color: var(--text-muted);
}
.sidebar-footer nav { display: flex; flex-wrap: wrap; gap: 3px 14px; margin-bottom: 6px; }
.sidebar-footer a { color: var(--text-muted); }

.empty-state { padding: 32px 19px; text-align: center; }
.empty-state .empty-icon {
  width: 58px; height: 58px; margin: 0 auto 11px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.empty-state h2 { font-size: 19px; margin-bottom: 5px; }
.empty-state p { color: var(--text-muted); max-width: 420px; margin: 0 auto; }

/* ---------- 8. Account pages (sign in, register, codes) ---------- */
.guest-page { min-height: 100vh; display: flex; flex-direction: column; }
.guest-header {
  height: var(--header-height); display: flex; align-items: center;
  padding: 0 22px; background: #fff; border-bottom: 1px solid var(--border);
}
.guest-main {
  flex: 1; width: 100%; max-width: 1060px; margin: 0 auto; padding: 45px 16px;
  display: flex; gap: 48px; align-items: center; justify-content: space-between;
}
.guest-intro { flex: 1 1 380px; max-width: 480px; display: flex; flex-direction: column; gap: 18px; }
.guest-intro h1 { font-size: 38px; letter-spacing: -0.8px; margin-top: 6px; }
.feature { display: flex; gap: 11px; align-items: flex-start; }
.feature .category-icon { width: 36px; height: 36px; border-radius: 10px; }
.feature .category-icon .icon { width: 18px; height: 18px; }
.feature strong { display: block; font-size: 15.5px; }
.feature span { color: var(--text-muted); font-size: 14px; }
.auth-card { width: 100%; max-width: 420px; padding: 26px; }
.auth-card h2 { font-size: 24px; letter-spacing: -0.3px; }
.auth-card .lead { color: var(--text-muted); margin: 3px 0 18px; font-size: 14.5px; }
.auth-footer {
  border-top: 1px solid #eef0f3; margin-top: 16px; padding-top: 13px;
  text-align: center; font-size: 14px; color: var(--text-soft);
}
.guest-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 3px 14px; padding: 14px; font-size: 13px; color: var(--text-muted); }
.guest-footer a { color: var(--text-muted); }

/* ---------- 9. Messages on the page and toasts ---------- */
.alert {
  padding: 10px 11px; border-radius: var(--radius-small); margin-bottom: 13px;
  font-size: 14px; border: 1px solid transparent;
}
.alert-error { background: var(--red-soft); border-color: #f7c6c1; color: #912018; }
.alert-success { background: var(--green-soft); border-color: #bfe3cc; color: #145232; }
.alert-info { background: var(--blue-soft); border-color: #c7d7fa; color: #1e429f; }
.toast-area {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.toast {
  padding: 10px 14px; border-radius: var(--radius-small);
  background: #1b2430; color: #fff; font-size: 14px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.2);
}
.toast-error { background: #b42318; }

/* ---------- 10. Mobile bottom bar and drawer ---------- */
.bottom-nav { display: none; }
.mobile-only { display: none; }
.drawer-backdrop { display: none; }

/* ---------- 12. Shared pieces: chips, tabs, lists ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px;
  border-radius: 6px; background: #f2f4f7; color: var(--text-soft); font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.chip .icon { width: 12px; height: 12px; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid #e3e7ec; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 5px; height: 41px; flex: none; white-space: nowrap;
  color: var(--text-soft); font-size: 14.5px; border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.count { font-size: 11.5px; font-weight: 500; line-height: 18px; padding: 0 6px; border-radius: 9px; background: #f2f4f7; color: var(--text-soft); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; font-weight: 700; font-size: 15px; }
.section-title a { font-size: 13px; font-weight: 500; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--text); }
.list-row:hover { text-decoration: none; color: var(--text); }
.list-row strong { display: block; font-size: 14px; }
.list-row .muted { display: block; }
.team-logo {
  border-radius: 10px; flex: none; object-fit: cover; color: #fff; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.page-title { font-size: 26px; letter-spacing: -0.4px; margin-bottom: 14px; }

/* ---------- 13. Profile ---------- */
.profile-page { display: flex; flex-direction: column; gap: 14px; }
.profile-header { padding: 21px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile-identity { flex: 1 1 320px; min-width: 0; }
.profile-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-name-row h1 { font-size: 26px; letter-spacing: -0.4px; }
.profile-bio { margin-top: 3px; font-size: 15px; color: var(--text-soft); }
.profile-facts { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 8px; font-size: 13.5px; color: var(--text-muted); }
.profile-facts span, .profile-facts a { display: inline-flex; align-items: center; gap: 4px; }
.profile-facts a { color: var(--text-soft); }
.profile-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.profile-columns { display: flex; gap: 19px; align-items: flex-start; flex-wrap: wrap; }
.profile-side { flex: 1 1 300px; max-width: 380px; display: flex; flex-direction: column; gap: 13px; }
.profile-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 13px; }
.profile-main-wide { max-width: none; }
.intro-about { margin: 8px 0 5px; font-size: 14px; line-height: 1.6; color: var(--text-soft); }
.detail-list { margin: 6px 0 0; }
.detail-list > div {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  padding: 7px 0; border-top: 1px solid #f0f2f5; font-size: 13.5px;
}
.detail-list dt { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); white-space: nowrap; }
.detail-list dd { margin: 0; text-align: right; }
.link-list { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.link-list a { display: inline-flex; align-items: center; gap: 4px; word-break: break-all; }
.friends-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px 8px; margin-top: 11px; }
.friends-mini a { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; color: var(--text); font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.friends-mini a:hover { text-decoration: none; }
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.person-card { padding: 11px 13px; display: flex; gap: 11px; align-items: center; color: var(--text); }
.person-card:hover { text-decoration: none; color: var(--text); border-color: var(--border-strong); }
.person-card strong { display: block; }
.person-card .muted { display: block; }

/* ---------- 14. Settings ---------- */
.settings-layout { display: flex; gap: 19px; align-items: flex-start; }
.settings-nav { flex: 0 0 240px; padding: 6px; position: sticky; top: calc(var(--header-height) + 20px); }
.settings-nav a {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-small);
  color: #344054; font-size: 14.5px;
}
.settings-nav a:hover { background: var(--page); text-decoration: none; color: var(--text); }
.settings-nav a.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.settings-nav a:last-child { border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-small) var(--radius-small); margin-top: 5px; padding-top: 11px; }
.settings-panel { flex: 1; min-width: 0; padding: 21px 22px; }
.settings-panel h2 { font-size: 20px; letter-spacing: -0.2px; }
.panel-lead { color: var(--text-muted); margin: 3px 0 18px; padding-bottom: 16px; border-bottom: 1px solid #eef0f3; font-size: 14.5px; }
.settings-panel form > .btn-primary:last-child, .settings-panel form > div:last-child > .btn-primary { margin-top: 4px; }
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field-pair { display: flex; gap: 11px; }
.field-pair .field { flex: 1; min-width: 0; }
.avatar-editor { display: flex; align-items: center; gap: 16px; padding: 14px; margin-bottom: 18px; border: 1px solid #eef0f3; border-radius: 12px; background: #fafbfc; }
.avatar-editor label.btn { cursor: pointer; }
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex; gap: 11px; align-items: flex-start; padding: 13px; cursor: pointer;
  border: 1px solid #e1e5eb; border-radius: 12px; transition: border-color 0.15s, background 0.15s;
}
.choice:hover { border-color: #cdd3db; background: #fafbfc; }
.choice:has(input:checked) { border-color: var(--blue); background: #f5f8ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08); }
.choice input { margin-top: 2px; accent-color: var(--blue); width: 15px; height: 15px; flex: none; }
.choice strong { display: block; }
.choice .muted { display: block; margin-top: 2px; }
.choice-icon { width: 32px; height: 32px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: none; }
.link-row { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; }
.link-row .input:first-child { flex: 0 0 34%; }
.link-row .input { flex: 1; min-width: 0; }
.switch-list { display: flex; flex-direction: column; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 13px; padding: 11px 0; border-top: 1px solid #f0f2f5; font-size: 14.5px; cursor: pointer; }
.switch-row:first-child { border-top: 0; }
.switch {
  appearance: none; -webkit-appearance: none; flex: none; cursor: pointer;
  width: 38px; height: 22px; border-radius: 12px; background: #d0d5dd; position: relative; transition: background 0.15s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.2); transition: left 0.15s;
}
.switch:checked { background: var(--blue); }
.switch:checked::after { left: 21px; }
.switch:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- 15. Friends ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 13px; flex-wrap: wrap; margin-bottom: 14px; }
.page-search { margin-left: 0; flex: 0 1 300px; background: #fff; }
.friends-page .tabs { margin-bottom: 14px; }
.count-alert { background: var(--red-soft); color: #b3261e; }
.person-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.person-name { font-weight: 700; font-size: 15px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-name:hover { color: var(--text); }
.friend-box { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.person-card .friend-box { margin-top: 8px; }
.person-card .friend-box .btn { flex: 1; }
.btn-square { width: 33px; padding: 0; }
.plus-button {
  width: 31px; height: 31px; border-radius: 50%; flex: none; padding: 0; cursor: pointer;
  border: 1px solid var(--border-strong); background: #fff; color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
}
.plus-button:hover { background: #eef3fe; }
.plus-button.done { background: var(--blue-soft); border-color: var(--blue-soft); }
.suggestion-row { display: flex; align-items: center; gap: 11px; padding: 7px 14px; }
.suggestion-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.suggestion-text .person-name { font-size: 14.5px; }
.panel-subtitle { font-size: 16px; margin-top: 24px; padding-top: 19px; border-top: 1px solid #eef0f3; }
.simple-list { display: flex; flex-direction: column; }
.simple-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #f0f2f5; }
.simple-row:first-child { border-top: 0; }
.simple-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.loader { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px; color: var(--text-muted); font-size: 13px; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: #98a2b3; }
.dot:nth-child(2) { opacity: 0.6; }
.dot:nth-child(3) { opacity: 0.3; }

/* ---------- 16. Composer and editor ---------- */
.composer { padding: 0; }
.composer-top { display: flex; gap: 11px; align-items: center; padding: 14px 16px; }
.composer-open {
  flex: 1; min-width: 0; height: 41px; padding: 0 14px; text-align: left; cursor: text;
  border: 1px solid #e3e7ec; border-radius: var(--radius-small); background: var(--page);
  color: var(--text-muted); font: inherit; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.composer.open .composer-open { display: none; }
.composer.open .composer-top { padding-bottom: 5px; }
.composer-body { padding: 0 16px 10px; }
.composer-bottom { display: flex; align-items: center; gap: 3px; padding: 8px 16px 8px 11px; border-top: 1px solid #eef0f3; }
.tool {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; cursor: pointer;
  border: 0; border-radius: var(--radius-small); background: none; color: #344054; font: inherit; font-size: 14.5px;
}
.tool:hover { background: var(--page); }
.icon-photo { color: #1f9254; }
.icon-video { color: #e0453a; }
.composer-post { padding: 0 19px; }
.editor-toolbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 3px; border: 1px solid #e3e7ec; border-bottom: 0; border-radius: var(--radius-small) var(--radius-small) 0 0; background: #fafbfc; }
.editor-toolbar button {
  min-width: 29px; height: 27px; padding: 0 6px; border: 0; border-radius: 6px; background: none;
  color: #344054; font: inherit; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.editor-toolbar button:hover { background: #eceff3; }
.toolbar-gap { width: 1px; height: 16px; background: #e3e7ec; margin: 0 3px; }
.editor {
  min-height: 99px; max-height: 378px; overflow-y: auto; padding: 10px 11px; outline: none;
  border: 1px solid #e3e7ec; border-radius: 0 0 var(--radius-small) var(--radius-small);
  font-size: 15.5px; line-height: 1.6; color: var(--text-body);
}
.editor:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.editor:empty::before { content: attr(data-placeholder); color: var(--text-muted); pointer-events: none; }
.editor p, .post-text p { margin: 0 0 6px; }
.editor h3, .post-text h3 { font-size: 17px; margin: 3px 0 6px; }
.editor ul, .editor ol, .post-text ul, .post-text ol { margin: 0 0 6px; padding-left: 19px; }
.composer-options { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-top: 10px; }
.composer-options .help { flex: 1 1 260px; }
.composer-select { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: #344054; }
.composer-select select { height: 34px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-small); background: #fff; font: inherit; font-size: 14px; color: var(--text); }
.composer-media { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.composer-media:empty { display: none; }
.media-tile { position: relative; width: 86px; height: 82px; border-radius: var(--radius-small); overflow: hidden; background: #e9edf2; }
.tile-preview, .tile-preview img { width: 100%; height: 100%; object-fit: cover; display: flex; align-items: center; justify-content: center; }
.tile-video-label { font-size: 13px; font-weight: 600; color: var(--text-soft); }
.tile-progress { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.7); display: none; }
.media-tile.uploading .tile-progress { display: block; }
.media-tile.uploading img { opacity: 0.6; }
.tile-progress span { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--blue); transition: width 0.2s; }
.tile-remove {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(16, 24, 40, 0.65); color: #fff; font-size: 16px; line-height: 24px; padding: 0;
}
.post-editor { margin-top: 11px; }
.editor-buttons { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.post.editing > .post-text, .post.editing > .see-more { display: none; }

/* ---------- 17. Post card ---------- */
.post { padding: 13px 14px 0; }
.post-head { display: flex; gap: 10px; align-items: flex-start; }
.post-head-text { flex: 1; min-width: 0; }
.post-title-line { display: flex; align-items: center; flex-wrap: wrap; row-gap: 2px; }
.post-author { font-weight: 700; font-size: 15.5px; color: var(--text); }
.post-author:hover { color: var(--text); }
.post-category { font-size: 14px; margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--border-strong); line-height: 1.1; }
.post-meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 2px; font-size: 13px; color: var(--text-muted); }
.post-meta a { color: var(--text-muted); }
.post-visibility { display: inline-flex; }
.post-visibility .icon { width: 13px; height: 13px; }
.post-team { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.post-head .icon-button { margin: -5px -6px 0 0; }
.post-text { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--text-body); overflow-wrap: anywhere; }
.post-text > :last-child { margin-bottom: 0; }
.post-text.clamped { max-height: 8.2em; overflow: hidden; }
.see-more { display: block; margin-top: 2px; padding: 0; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--blue); cursor: pointer; }
.post-media { margin: 10px -14px 0; background: #e9edf2; }
.video-frame { position: relative; max-height: 438px; background: #111; display: flex; justify-content: center; }
.video-frame .post-video { display: block; width: 100%; height: 100%; max-height: 438px; object-fit: contain; background: #111; }
.video-frame.no-poster { min-height: 240px; background: #1b2430; }
.video-frame::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%231b2430'/%3E%3C/svg%3E") no-repeat 56% 50% / 26px;
  pointer-events: none; z-index: 1;
}
.video-frame.played::before { display: none; }
.video-tile-blank { position: absolute; inset: 0; background: #1b2430; }
.tile-preview { position: relative; }
.tile-video-play { position: absolute; color: #fff; font-size: 18px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.media-grid { display: grid; gap: 2px; }
.media-1 { grid-template-columns: 1fr; }
.media-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.media-3 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, 156px); }
.media-3 .media-item:first-child { grid-row: span 2; }
.media-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 172px; }
.media-item { position: relative; display: block; padding: 0; border: 0; background: #e9edf2; cursor: zoom-in; overflow: hidden; }
.media-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-1 .media-item img { height: auto; max-height: 484px; object-fit: contain; background: #e9edf2; }
.media-2 .media-item { height: 235px; }
.media-more {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(16, 24, 40, 0.5); color: #fff; font-size: 28px; font-weight: 700;
}
.post-stats { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 0; font-size: 13px; color: var(--text-muted); }
.like-badge { width: 18px; height: 18px; border-radius: 50%; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-right: 6px; vertical-align: -5px; }
.like-badge .icon { width: 10px; height: 10px; }
.post-actions { display: flex; align-items: center; margin: 8px -14px 0; padding: 3px 0 3px 6px; border-top: 1px solid #eef0f3; }
.post-action {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px;
  border: 0; border-radius: var(--radius-small); background: none; color: var(--text-soft); font: inherit; font-size: 14px; cursor: pointer;
}
.post-action:hover { background: var(--page); color: var(--text-soft); text-decoration: none; }
.post-action.active { color: var(--blue); }
.post-save { width: 47px; height: 38px; border: 0; border-left: 1px solid #eef0f3; background: none; color: var(--text-soft); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.post-save.active { color: var(--blue); }
.post-list { display: flex; flex-direction: column; gap: 13px; }
.back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--text-soft); }
.author-card-top { display: flex; gap: 11px; align-items: center; }
.author-card-top > div { display: flex; flex-direction: column; }
.author-card .friend-box { margin-top: 11px; }
.author-card .friend-box .btn { flex: 1; }
.related-post { display: block; padding: 7px 14px; color: var(--text); }
.related-post:hover { text-decoration: none; background: var(--page); color: var(--text); }
.related-post strong { display: block; font-weight: 600; font-size: 14px; line-height: 1.4; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 5px; }
.photo-tile { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: var(--radius-small); overflow: hidden; background: #e9edf2; }
.photo-tile img, .photo-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-badge { position: absolute; right: 8px; bottom: 8px; width: 25px; height: 25px; border-radius: 50%; background: rgba(16, 24, 40, 0.65); color: #fff; display: flex; align-items: center; justify-content: center; }
.video-badge .icon { width: 13px; height: 13px; }

/* Photo viewer */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(10, 14, 20, 0.92); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer; border-radius: 50%; }
.lightbox button:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox-close { top: 16px; right: 16px; width: 40px; height: 40px; font-size: 28px; line-height: 44px; }
.lightbox-nav { top: 50%; width: 43px; height: 43px; margin-top: -19px; font-size: 32px; line-height: 44px; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; }

/* ---------- 18. Likes, saves, shares, suggestions strip ---------- */
.post-action.active { color: var(--blue); font-weight: 600; }
.post-action:disabled { opacity: 0.45; cursor: default; }
.post-stats a { color: var(--text-muted); }
.shared-post {
  display: block; margin-top: 11px; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); background: #fff;
}
.shared-post:hover { text-decoration: none; color: var(--text); border-color: var(--border-strong); }
.shared-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.shared-head strong { font-size: 14px; }
.shared-text { display: block; margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: var(--text-body); }
.shared-image { display: block; width: 100%; max-height: 251px; object-fit: cover; margin-top: 8px; border-radius: var(--radius-small); }
.shared-more { display: block; margin-top: 5px; font-size: 12.5px; color: var(--text-muted); }
.shared-video { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 13px; color: var(--text-soft); }
.shared-missing { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 14px; background: var(--page); }
.suggestion-strip { padding-bottom: 13px; }
.strip-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 3px 14px 0; scrollbar-width: none; }
.strip-card {
  flex: 0 0 150px; padding: 13px 8px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
}
.strip-card .person-name { max-width: 100%; margin-top: 6px; font-size: 14px; }
.strip-card .friend-box { width: 100%; margin-top: 8px; }
.strip-card .friend-box .btn { width: 100%; }
@media (min-width: 1181px) {
  /* On wide screens the right column already shows "People you may know" */
  .content .suggestion-strip { display: none; }
}
.modal-backdrop { position: fixed; inset: 0; z-index: 250; background: rgba(16, 24, 40, 0.45); display: flex; align-items: center; justify-content: center; padding: 13px; }
.modal { width: 100%; max-width: 480px; padding: 16px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.modal-head h2 { font-size: 18px; }
.modal-head .icon-button { font-size: 24px; }
.modal-buttons { display: flex; justify-content: flex-end; gap: 6px; margin-top: 13px; }

/* ---------- 19. Comments ---------- */
.comments-panel { margin: 0 -16px; padding: 11px 16px 13px; border-top: 1px solid #eef0f3; }
.comment-form { display: flex; gap: 8px; align-items: flex-start; }
.comment-form .avatar { margin-top: 2px; }
.comment-input {
  flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 5px;
  border: 1px solid #e3e7ec; border-radius: 20px; background: var(--page); padding: 3px 5px 3px 11px;
}
.comment-input:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.comment-input textarea {
  flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: transparent;
  font: inherit; font-size: 14.5px; line-height: 1.45; padding: 5px 0; max-height: 198px; color: var(--text);
}
.comment-tools { display: flex; align-items: center; gap: 2px; flex: none; }
.privacy-toggle {
  display: inline-flex; align-items: center; height: 27px; padding: 0 6px; border: 0; border-radius: 15px;
  background: none; color: var(--text-muted); font: inherit; font-size: 12.5px; cursor: pointer;
}
.privacy-toggle span { display: inline-flex; align-items: center; gap: 3px; }
.privacy-toggle .icon { width: 13px; height: 13px; }
.privacy-toggle .when-private { display: none; }
.privacy-toggle[aria-pressed="true"] { background: #efeafb; color: #5b45c2; font-weight: 600; }
.privacy-toggle[aria-pressed="true"] .when-private { display: inline-flex; }
.privacy-toggle[aria-pressed="true"] .when-public { display: none; }
.privacy-toggle:disabled { cursor: default; }
.send-button { width: 29px; height: 29px; border: 0; border-radius: 50%; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.send-button:hover { background: var(--blue-dark); }
.comment-list { display: flex; flex-direction: column; gap: 11px; margin-top: 13px; }
.comment-list:empty { margin-top: 0; }
.comment { display: flex; gap: 8px; }
.comment-avatar { flex: none; }
.comment-main { flex: 1; min-width: 0; }
.comment-bubble { display: inline-block; max-width: 100%; padding: 6px 10px; border-radius: 14px; background: #f2f4f7; }
.comment-private { background: #fff; border: 1px dashed #a9b4c4; }
.comment-removed { font-style: italic; color: var(--text-muted); font-size: 14px; }
.comment-name { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 13.5px; font-weight: 700; }
.comment-name a { color: var(--text); }
.author-badge { font-size: 10.5px; font-weight: 700; color: var(--blue); background: var(--blue-soft); border-radius: 4px; padding: 1px 5px; }
.private-label { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: #5b45c2; }
.private-label .icon { width: 11px; height: 11px; }
.comment-text { font-size: 14.5px; line-height: 1.5; color: var(--text-body); margin-top: 1px; overflow-wrap: anywhere; }
.comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 11px; margin: 3px 0 0 3px; font-size: 12.5px; color: var(--text-muted); }
.comment-meta button { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--text-soft); cursor: pointer; }
.comment-meta button:hover { text-decoration: underline; }
.comment-meta button.active { color: var(--blue); }
.comment-likes { display: inline-flex; align-items: center; gap: 2px; color: var(--blue); }
.comment-likes .icon { width: 12px; height: 12px; }
.replies { display: flex; flex-direction: column; gap: 10px; }
.replies:not(:empty) { margin-top: 10px; }
.view-replies { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 0 3px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--blue); cursor: pointer; }
.view-replies .line { width: 18px; height: 1px; background: #a9b4c4; }
.more-comments { display: inline-block; margin-top: 11px; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--blue); cursor: pointer; }
.comment-edit { margin-top: 5px; }
.comment-edit textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-small); padding: 6px 10px; font: inherit; font-size: 14.5px; resize: none; }
.stats-link { color: var(--text-muted); font-weight: 400; font-size: 13px; }

/* ---------- 20. Teams ---------- */
[hidden] { display: none !important; }
.team-logo.round { border-radius: 50%; }
.btn-joined { background: #f1f5f2; border-color: #d3dfd6; color: #35573f; }
.btn-joined:hover { background: #e8efe9; color: #35573f; }
.muted-button { color: var(--text-soft); background: var(--page); }
.btn-danger { background: #fff; border-color: #f3b4ad; color: #b42318; }
.btn-danger:hover { background: var(--red-soft); color: #912018; }
.btn-active { border-color: #bcd0fa; background: var(--blue-soft); color: var(--blue); }
.teams-page { display: flex; flex-direction: column; gap: 14px; }
.teams-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 13px; flex-wrap: wrap; }
.teams-hero h1 { font-size: 34px; letter-spacing: -0.6px; margin-top: 5px; }
.teams-hero p { margin-top: 6px; font-size: 15px; }
.teams-hero-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.teams-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.filter-chips form { display: contents; }
.chip-filter, .chip-select {
  display: inline-flex; align-items: center; height: 32px; padding: 0 11px; border: 1px solid #dfe3e8; border-radius: var(--radius-small);
  background: #fff; color: #344054; font: inherit; font-size: 13.5px; white-space: nowrap;
}
.chip-filter:hover { text-decoration: none; color: var(--text); border-color: var(--border-strong); }
.chip-filter.active { background: var(--blue-soft); border-color: #bcd0fa; color: var(--blue); }
.chip-select { padding-right: 6px; cursor: pointer; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 11px; }
.team-card { padding: 16px; display: flex; gap: 13px; align-items: flex-start; }
.team-card-logo { flex: none; }
.team-card-body { flex: 1; min-width: 0; }
.team-card-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.team-name { font-weight: 700; font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.team-name:hover { color: var(--text); }
.team-privacy { display: inline-flex; align-items: center; gap: 3px; flex: none; font-size: 12.5px; color: var(--text-muted); }
.team-privacy .icon { width: 12px; height: 12px; }
.team-tagline { margin-top: 3px; font-size: 14px; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.team-card-meta { display: flex; gap: 11px; margin-top: 8px; font-size: 12.5px; color: var(--text-muted); }
.team-box { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.team-page { display: flex; flex-direction: column; gap: 14px; }
.team-identity { padding: 19px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.team-identity-text { flex: 1 1 320px; min-width: 0; }
.team-identity .team-logo { border-radius: 14px; font-size: 24px; }
.avatar-stack { display: flex; flex-wrap: wrap; margin-top: 10px; }
.avatar-stack a, .avatar-stack .avatar-more { margin-right: -6px; }
.avatar-stack .avatar { border: 2px solid #fff; }
.avatar-more { background: #f2f4f7; color: var(--text-soft); font-size: 11px; }
.owner-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 500; }
.owner-link:hover { color: var(--text); }
.danger-zone { border-color: #f7d4d0; }
.invite-results { max-height: 324px; overflow-y: auto; margin-top: 10px; }
.team-row { color: var(--text); }
.team-row:hover { text-decoration: none; color: var(--text); background: var(--page); }

/* ---------- 21. Messages ---------- */
.icon-xs { width: 12px; height: 12px; vertical-align: -2px; }
.messages-wrap { max-width: 1180px; margin: 0 auto; padding: 19px 16px; }
.chat-shell {
  display: flex; overflow: hidden; padding: 0;
  height: calc(100vh - var(--header-height) - 43px); min-height: 432px;
}
.convo-pane { flex: 0 0 340px; display: flex; flex-direction: column; border-right: 1px solid var(--border); min-width: 0; }
.convo-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 13px 8px 16px; }
.convo-head h1 { font-size: 22px; }
.convo-search { position: relative; margin: 0 13px 8px; }
.convo-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.convo-search .input { padding-left: 29px; height: 36px; border-radius: 20px; }
.convo-list { flex: 1; overflow-y: auto; padding: 0 6px 6px; }
.convo-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); color: var(--text); }
.convo-row:hover { background: var(--page); text-decoration: none; color: var(--text); }
.convo-row.active { background: var(--blue-soft); }
.convo-avatar { position: relative; flex: none; }
.online-dot { position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: #22a35a; border: 2px solid #fff; }
.convo-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.convo-top, .convo-bottom { display: flex; align-items: center; gap: 6px; min-width: 0; }
.convo-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-time { flex: none; font-size: 12px; color: var(--text-muted); }
.convo-preview { flex: 1; min-width: 0; font-size: 13.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-row.unread .convo-name, .convo-row.unread .convo-preview { color: var(--text); font-weight: 700; }
.convo-row.unread .convo-time { color: var(--blue); font-weight: 600; }
.convo-badge { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.convo-muted { flex: none; font-size: 11.5px; color: var(--text-muted); }
.convo-empty { padding: 24px 13px; text-align: center; }

.chat-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 6px; padding: 8px 11px; border-bottom: 1px solid var(--border); }
.chat-back { display: none; }
.chat-person { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--text); }
.chat-person:hover { text-decoration: none; color: var(--text); }
.chat-person > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.chat-person strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropdown button.danger { color: #b42318; }
.chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 13px 16px; background: #fbfcfd; overscroll-behavior: contain; }
.chat-older { text-align: center; margin-bottom: 8px; }
.chat-start { text-align: center; padding: 24px 8px; }
.chat-start .avatar { margin: 0 auto 10px; }
.chat-start h2 { font-size: 18px; margin-bottom: 3px; }
.chat-messages { display: flex; flex-direction: column; gap: 3px; }
.chat-day { text-align: center; margin: 11px 0 6px; }
.chat-day span { font-size: 12px; color: var(--text-muted); background: #eef1f4; padding: 2px 8px; border-radius: 10px; }
.msg { max-width: min(72%, 520px); display: flex; flex-direction: column; gap: 3px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; align-items: flex-start; }
.msg-text {
  padding: 6px 10px; border-radius: 18px; font-size: 14.5px; line-height: 1.45;
  white-space: normal; overflow-wrap: anywhere;
}
.msg.theirs .msg-text { background: #fff; border: 1px solid #e8ebef; color: var(--text-body); border-bottom-left-radius: 6px; }
.msg.mine .msg-text { background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
.msg-photo { padding: 0; border: 0; background: #eef1f4; border-radius: 14px; overflow: hidden; cursor: zoom-in; display: block; }
.msg-photo img { display: block; max-width: min(280px, 60vw); max-height: 272px; object-fit: cover; }
.msg-time { font-size: 11px; color: var(--text-muted); padding: 0 5px; }
.msg { position: relative; }
.msg-deleted { font-style: italic; }
.msg.mine .msg-text.msg-deleted, .msg.theirs .msg-text.msg-deleted { background: transparent; color: var(--text-muted); border: 1px dashed #d5dae1; }
.msg-delete {
  position: absolute; left: -36px; top: 4px; width: 27px; height: 27px; border: 0; border-radius: 50%;
  background: #fff; color: var(--text-muted); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
  display: none; align-items: center; justify-content: center; cursor: pointer;
}
.msg-delete:hover { color: #b42318; }
.msg.mine:hover .msg-delete, .msg.mine.show-actions .msg-delete { display: inline-flex; }
@media (hover: none) { .msg.mine:hover .msg-delete { display: none; } .msg.mine.show-actions .msg-delete { display: inline-flex; } }
.chat-seen { text-align: right; font-size: 11.5px; color: var(--text-muted); padding: 2px 5px 0; }
.chat-composer { border-top: 1px solid var(--border); padding: 8px 10px; background: #fff; }
.chat-input-row { display: flex; align-items: flex-end; gap: 5px; }
.chat-photo { cursor: pointer; color: #1f7a4a; }
.chat-input {
  flex: 1; min-height: 36px; max-height: 126px; resize: none; padding: 7px 11px; border: 1px solid transparent;
  border-radius: 20px; background: var(--input); font: inherit; font-size: 14.5px; line-height: 1.45; color: var(--text);
}
.chat-input:focus { outline: none; border-color: #bcd0fa; background: #fff; }
.chat-send { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.chat-send:hover { background: var(--blue-dark); }
.chat-send:disabled { opacity: 0.6; cursor: default; }
.chat-send .icon { width: 16px; height: 16px; }
.chat-preview { position: relative; display: inline-block; margin: 0 0 6px 35px; }
.chat-preview img { display: block; height: 72px; border-radius: 10px; }
.chat-preview-remove { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #1b2430; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.chat-locked { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 11px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--text-soft); background: #fff; text-align: center; }
.chat-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 5px; }
.chat-placeholder .empty-icon { width: 58px; height: 58px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.chat-placeholder h2 { font-size: 19px; }
.chat-placeholder .btn { margin-top: 10px; }
.friend-pick { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.friend-pick:hover { background: var(--page); }

/* ---------- 22. Notifications ---------- */
.notif-page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; flex-wrap: wrap; }
.notif-page-tools { display: flex; align-items: center; gap: 5px; }
.notif-card { padding: 5px 6px; }
.notif-heading { font-size: 13px; font-weight: 700; color: var(--text-soft); padding: 10px 10px 5px; text-transform: none; }
.notif { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 10px 32px 10px 10px; border-radius: var(--radius); }
.notif:hover { background: var(--page); }
.notif.is-new { background: #f1f6ff; }
.notif.is-new:hover { background: #e8f0fe; }
.notif-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.notif-avatar { position: relative; flex: none; }
.notif-icon {
  position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff; color: #fff;
}
.notif-icon .icon { width: 11px; height: 11px; }
.tone-blue { background: var(--blue); }
.tone-green { background: #1f9254; }
.tone-red { background: #e0384b; }
.tone-purple { background: #7357d8; }
.notif-body { flex: 1; min-width: 0; }
.notif-body p { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--text-body); overflow-wrap: anywhere; }
.notif-time { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-muted); }
.notif.is-new .notif-time { color: var(--blue); font-weight: 600; }
.notif-actions { position: relative; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.notif-actions .muted { display: inline-flex; align-items: center; gap: 4px; }
.notif-dot { position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -3px; border-radius: 50%; background: var(--blue); }
.notif-remove { position: absolute; right: 4px; top: 8px; z-index: 2; width: 27px; height: 27px; opacity: 0; }
.notif:hover .notif-remove, .notif-remove:focus { opacity: 1; }
.notif:hover .notif-dot { display: none; }
@media (hover: none) { .notif-remove { opacity: 0.7; } .notif-dot { right: 40px; } }
.notif-dropdown {
  position: fixed; z-index: 200; width: 360px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.16);
}
.notif-dropdown-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px 5px; }
.notif-dropdown-head strong { font-size: 17px; }
.notif-dropdown-list { max-height: min(468px, calc(100vh - 144px)); overflow-y: auto; padding: 0 5px 5px; }
.notif-dropdown .notif { padding: 8px 24px 8px 8px; gap: 8px; }
.notif-dropdown .notif-body p { font-size: 13.5px; }
.notif-dropdown .notif-dot { right: 12px; }
.notif-dropdown .notif:hover .notif-dot { display: block; }
.notif-empty { padding: 19px 13px; text-align: center; }
.notif-dropdown-foot { display: block; padding: 10px; text-align: center; border-top: 1px solid var(--border); font-weight: 600; font-size: 14px; }
.notif-dropdown-foot:hover { background: var(--page); text-decoration: none; }

/* ---------- 23. Search ---------- */
.search-page { display: flex; flex-direction: column; gap: 13px; }
.search-box { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 6px 6px 6px 13px; }
.search-box > .icon { color: var(--text-muted); flex: none; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 16px; color: var(--text); background: none; height: 36px; }
.search-box:focus-within { border-color: #bcd0fa; box-shadow: 0 0 0 3px var(--blue-soft); }
.search-section { display: flex; flex-direction: column; gap: 10px; }
.search-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.search-section-head h2 { font-size: 18px; }
.search-section-head a { font-size: 14px; font-weight: 600; }
.search-more { text-align: center; }
.search-none { padding: 18px; text-align: center; color: var(--text-muted); }

/* ---------- 24. Reports and admin ---------- */
.report-modal { max-width: 440px; }
.report-modal > p { margin: -5px 0 10px; }
.report-reasons { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.report-reason { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--radius-small); cursor: pointer; font-size: 14.5px; }
.report-reason:hover { background: var(--page); }
.report-reason input { width: 15px; height: 15px; accent-color: var(--blue); margin: 0; }
.comment-meta .comment-report { color: var(--text-muted); font-weight: 400; }
.team-actions { display: flex; gap: 6px; align-items: flex-start; }
.msg.theirs .msg-report { left: auto; right: -36px; }
.msg.theirs:hover .msg-report, .msg.theirs.show-actions .msg-report { display: inline-flex; }
.msg-report:hover { color: #b54708; }
@media (hover: none) { .msg.theirs:hover .msg-report { display: none; } .msg.theirs.show-actions .msg-report { display: inline-flex; } }

.admin-page { display: flex; flex-direction: column; gap: 13px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat-card { padding: 13px 14px; }
.stat-card .stat-number { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; color: var(--text); }
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); }
.stat-card.stat-warning .stat-number { color: #b42318; }
.report-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.report-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.report-type { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-soft); background: #f2f4f7; padding: 2px 6px; border-radius: 6px; }
.report-count { font-size: 13px; font-weight: 600; color: #b42318; }
.report-preview { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 11px; background: #fbfcfd; }
.report-owner { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 6px; }
.report-text { font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; max-height: 162px; overflow-y: auto; color: var(--text-body); }
.report-images { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.report-images img { width: 86px; height: 82px; object-fit: cover; border-radius: 8px; display: block; }
.report-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; }
.report-list li { color: var(--text-soft); }
.report-list strong { color: var(--text); font-weight: 600; }
.report-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.report-closed { font-size: 13px; color: var(--text-muted); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 8px 10px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.admin-person span { display: flex; flex-direction: column; min-width: 0; }
.admin-person .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.status-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 10px; background: var(--green-soft); color: var(--green); }
.status-pill.suspended { background: var(--red-soft); color: #b42318; }
.status-pill.pending { background: #fef6e7; color: #b54708; }
.admin-table-wrap { overflow-x: auto; padding: 0; }
.pager { display: flex; justify-content: center; gap: 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.activity-table td { padding-top: 8px; padding-bottom: 8px; }
.page-title .icon { width: 23px; height: 23px; vertical-align: -4px; color: var(--blue); }
.info-page h1 { font-size: 28px; margin-bottom: 5px; }
.info-page .info-body { padding: 22px 26px; }
.info-page .info-body h2 { font-size: 17px; margin: 18px 0 5px; }
.info-page .info-body p, .info-page .info-body li { color: var(--text-body); line-height: 1.65; }
.info-page .info-body ul { padding-left: 16px; margin: 5px 0; }
.guest-main.guest-plain { display: block; max-width: 820px; }
.guest-info { padding: 22px 26px; }
.guest-info h1 { font-size: 28px; margin-bottom: 5px; }
.guest-info h2 { font-size: 17px; margin: 18px 0 5px; }
.guest-info p, .guest-info li { line-height: 1.65; }
.guest-info ul { padding-left: 16px; }
.info-back { display: inline-flex; margin-bottom: 10px; }
.info-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 11px; }

/* ---------- 26. Team directory ---------- */
.dir-search { flex: 1 1 320px; max-width: 460px; padding: 4px 6px 4px 12px; }
.dir-search input { height: 34px; font-size: 14px; }
.dir-letters { display: flex; flex-wrap: wrap; gap: 3px; }
.dir-letters a, .dir-letters span { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; font-size: 13px; font-weight: 600; }
.dir-letters a { background: #fff; border: 1px solid var(--border); color: var(--text); }
.dir-letters a:hover { text-decoration: none; border-color: #bcd0fa; color: var(--blue); }
.dir-letters span { color: #c3cad4; }
.dir-groups { display: flex; flex-direction: column; gap: 10px; }
.dir-group { padding: 4px 0 6px; scroll-margin-top: calc(var(--header-height) + 12px); }
.dir-group-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; padding: 10px 14px 6px; }
.dir-group-icon { display: flex; color: var(--text-muted); }
.dir-group-icon .icon { width: 16px; height: 16px; }
.dir-count { font-size: 12px; font-weight: 600; color: var(--text-muted); background: #f2f4f7; border-radius: 10px; padding: 1px 7px; }
.dir-rows { display: flex; flex-direction: column; }
.dir-row { display: flex; align-items: center; gap: 10px; padding: 6px 14px; color: var(--text); min-width: 0; }
.dir-row + .dir-row { border-top: 1px solid #f0f2f5; }
.dir-row:hover { text-decoration: none; color: var(--text); background: var(--page); }
.dir-row .team-logo { flex: none; font-size: 12px !important; }
.dir-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.dir-privacy { display: flex; color: var(--text-muted); flex: none; }
.dir-privacy .icon { width: 13px; height: 13px; }
.dir-tagline { flex: 1; min-width: 0; font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir-joined { flex: none; font-size: 11.5px; font-weight: 600; color: #35573f; background: #f1f5f2; border-radius: 10px; padding: 1px 8px; }
.dir-members { flex: none; font-size: 12.5px; color: var(--text-muted); min-width: 84px; text-align: right; }
.dir-none, .dir-empty-note { padding: 16px; text-align: center; }
.dir-none { color: var(--text-muted); }

/* ---------- 27. Guests (browsing without an account) ---------- */
.guest-header-buttons { display: flex; gap: 6px; flex: none; }
.guest-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.guest-banner > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.guest-banner strong { font-size: 14.5px; }
.guest-banner-buttons { display: flex; gap: 6px; flex: none; }
.guest-join h2 { font-size: 16px; margin-bottom: 10px; }
.guest-join ul { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-body); }
.guest-join li { display: flex; align-items: center; gap: 8px; }
.guest-join li .icon { color: var(--blue); flex: none; }
.guest-wall { padding: 26px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.guest-wall h2 { font-size: 18px; }
.guest-wall p { color: var(--text-muted); max-width: 380px; }
.guest-wall .guest-banner-buttons { margin-top: 6px; }
.guest-actions a.post-action:hover, .guest-actions a.post-save:hover { text-decoration: none; }

/* ---------- 28. Photos while loading, and photos that failed ---------- */
.media-item img, .msg-photo img, .shared-image, .report-images img { background: #eef1f4; }
.media-item img[loading="lazy"] { min-height: 60px; }
.img-failed { position: relative; }
.img-failed img { visibility: hidden; }
.img-failed::after {
  content: "Photo didn't load. Tap to retry"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 10px; text-align: center; font-size: 13px; color: var(--text-muted); background: #eef1f4; cursor: pointer;
}

/* ---------- 29. Links in posts, comments and messages ---------- */
/* Same colour as the text around them; blue when pointed at or focused */
.text-link { color: inherit; text-decoration: underline; text-decoration-color: rgba(102, 112, 133, 0.45); text-underline-offset: 2px; overflow-wrap: anywhere; }
.text-link:hover, .text-link:focus-visible { color: var(--blue); text-decoration-color: currentColor; }
.text-link:focus-visible { outline: 2px solid rgba(37, 99, 235, 0.35); outline-offset: 1px; border-radius: 3px; }
.ext-tail { white-space: nowrap; }
.ext-icon { width: 11px; height: 11px; margin-left: 2px; vertical-align: -1px; opacity: 0.6; }
.text-link:hover .ext-icon, .text-link:focus-visible .ext-icon { opacity: 1; }
/* On my own (blue) message bubbles, stay white */
.msg.mine .text-link { text-decoration-color: rgba(255, 255, 255, 0.6); }
.msg.mine .text-link:hover, .msg.mine .text-link:focus-visible { color: #fff; text-decoration-thickness: 2px; outline-color: rgba(255, 255, 255, 0.6); }

/* ---------- 11. Responsive ---------- */
@media (max-width: 1180px) {
  .sidebar-right { display: none; }
}
@media (max-width: 900px) {
  .main-nav a { min-width: 50px; }
  .main-nav .nav-label { display: none; }
  .account-name { display: none; }
  .header-search { flex-basis: 220px; margin-left: 6px; }
  .guest-main { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 19px; padding-top: 26px; }
  .guest-intro { max-width: none; flex: none; }
  .guest-intro h1 { font-size: 30px; }
  .auth-card { max-width: none; }
}
@media (max-width: 760px) {
  body { padding-bottom: 58px; }
  .header-inner { padding: 0 6px 0 11px; gap: 5px; height: 50px; }
  .site-header .main-nav, .site-header .header-search, .account-button .icon { display: none; }
  .mobile-only { display: inline-flex; }
  .logo-name { font-size: 19px; }
  .logo-mark { width: 27px; height: 27px; font-size: 16px; }
  .account-button { border-left: 0; padding: 0; margin-left: 0; }
  .page-wrap { padding: 0 0 16px; display: block; }
  .content { max-width: none; gap: 6px; }
  .content > .card { border-radius: 0; border-left: 0; border-right: 0; }
  .narrow-wrap { padding: 13px 10px 19px; }

  /* Left sidebar becomes a slide-in drawer opened by the menu button */
  .sidebar-left {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 120;
    width: 252px; padding: 16px 11px; overflow-y: auto;
    background: #fff; transform: translateX(-100%); transition: transform 0.2s;
  }
  body.drawer-open .sidebar-left { transform: none; }
  body.drawer-open .drawer-backdrop {
    display: block; position: fixed; inset: 0; z-index: 110; background: rgba(16, 24, 40, 0.4);
  }

  .toast-area { bottom: 78px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: 56px; background: #fff; border-top: 1px solid var(--border);
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: 10.5px; color: #4b5563;
  }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav a.active { color: var(--blue); font-weight: 600; }
  .bottom-nav .icon { width: 20px; height: 20px; }

  .guest-header { padding: 0 14px; height: 52px; }
  .guest-main { padding: 19px 13px; }
  .auth-card { padding: 18px 14px; }
  .guest-intro .feature { display: none; }
  .guest-intro h1 { font-size: 26px; }

  /* Messages on phones: the list or the chat, one at a time, filling the screen */
  .messages-wrap { padding: 0; }
  .chat-shell { height: calc(100vh - 50px - 56px); height: calc(100dvh - 50px - 56px); min-height: 0; border-radius: 0; border: 0; }
  .convo-pane { flex: 1; border-right: 0; }
  .chat-pane { display: none; }
  .chat-shell.has-chat .convo-pane { display: none; }
  .chat-shell.has-chat .chat-pane { display: flex; }
  body.chat-open { padding-bottom: 0; }
  body.chat-open .bottom-nav { display: none; }
  body.chat-open .chat-shell { height: calc(100vh - 50px); height: calc(100dvh - 50px); }
  .chat-back { display: inline-flex; margin-left: -5px; }
  .chat-head { padding: 6px 8px; }
  .chat-body { padding: 10px; }
  .msg { max-width: 82%; }
  .chat-input { font-size: 16px; }
  .notif-page.narrow-wrap { padding: 0 0 16px; }
  .notif-page-head { padding: 11px 8px 0 11px; margin-bottom: 6px; flex-wrap: nowrap; }
  .notif-page-head .page-title { font-size: 22px; }
  .notif-card { border-radius: 0; border-left: 0; border-right: 0; padding: 3px 0; }
  .notif { border-radius: 0; padding: 10px 35px 10px 11px; }
  .search-page.narrow-wrap { gap: 10px; }
  .search-box { padding: 5px 5px 5px 10px; }
  .search-box .btn { padding: 0 10px; }
  .search-page .post-list .card, .search-page .search-none { border-radius: 0; border-left: 0; border-right: 0; }
  .search-page .post-list { margin: 0 -10px; gap: 6px; }
  .dir-group { border-radius: 0; border-left: 0; border-right: 0; }
  /* Team names: show in full on phones (wrap instead of "...") */
  .team-card-title { flex-wrap: wrap; row-gap: 2px; }
  .team-name { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
  .team-row .person-name, .team-row .suggestion-text .person-name { white-space: normal; overflow-wrap: anywhere; }
  .dir-name { white-space: normal; overflow-wrap: anywhere; max-width: calc(100% - 120px); line-height: 1.3; }
  .team-identity h1 { overflow-wrap: anywhere; line-height: 1.25; }
  .post-team { overflow-wrap: anywhere; }
  .guest-header-buttons .btn { padding: 0 9px; }
  .guest-banner { flex-direction: column; align-items: stretch; gap: 10px; }
  .guest-banner-buttons .btn { flex: 1; }
  .dir-letters { padding: 0 12px; }
  .dir-letters a, .dir-letters span { width: 26px; height: 26px; }
  .dir-row { flex-wrap: wrap; row-gap: 0; padding: 7px 14px; }
  .dir-name { flex: 0 1 auto; max-width: calc(100% - 150px); }
  .dir-tagline { flex-basis: 100%; order: 5; padding-left: 42px; margin-top: -4px; font-size: 12.5px; }
  .dir-tagline:empty { display: none; }
  .dir-members { min-width: 0; margin-left: auto; }
  .profile-page.narrow-wrap { padding: 0 0 19px; gap: 0; }
  .hide-on-mobile { display: none !important; }
  .profile-header { padding: 16px 13px; gap: 13px; border-radius: 0; border-left: 0; border-right: 0; }
  .profile-header .avatar-xl { width: 72px; height: 72px; font-size: 26px; }
  .profile-name-row h1 { font-size: 21px; }
  .profile-actions { width: 100%; }
  .profile-actions .btn { flex: 1; }
  .profile-page .tabs { background: #fff; padding: 0 13px; gap: 18px; border-bottom: 1px solid var(--border); }
  .profile-columns { padding-top: 6px; gap: 6px; }
  .profile-side, .profile-main { max-width: none; flex-basis: 100%; gap: 6px; }
  .profile-page .card:not(.profile-header) { border-radius: 0; border-left: 0; border-right: 0; }
  .profile-page .person-grid { padding: 0 10px; }
  .profile-page .person-grid .card { border-radius: var(--radius); border: 1px solid var(--border); }
  .locked-profile { margin-top: 6px; }

  .post { padding: 11px 11px 0; }
  .post-media, .post-actions, .comments-panel { margin-left: -11px; margin-right: -11px; }
  .comments-panel { padding: 10px 11px 11px; }
  .media-2 .media-item { height: 156px; }
  .media-3 { grid-template-rows: repeat(2, 102px); }
  .media-4 { grid-auto-rows: 126px; }
  .media-1 .media-item img { max-height: 408px; }
  .video-frame, .video-frame .post-video { max-height: 357px; }
  .composer-top { padding: 10px 11px; }
  .composer-body { padding: 0 11px 10px; }
  .composer-bottom { padding: 6px 11px 6px 6px; }
  .composer-open { height: 38px; font-size: 14.5px; }
  .post-list { gap: 6px; }
  .suggestion-strip { border-radius: 0; border-left: 0; border-right: 0; }
  .content > .post-list > .card, .content [data-post-list] > .card, .profile-main .card { border-radius: 0; border-left: 0; border-right: 0; }
  .back-link { padding: 10px 11px 0; }
  .friends-page .page-head { margin-bottom: 10px; }
  .teams-page, .team-page { gap: 10px; }
  .teams-hero { padding: 3px 3px 0; }
  .teams-hero h1 { font-size: 26px; }
  .teams-hero-actions { width: 100%; }
  .teams-hero-actions .btn { flex: 1; }
  .filter-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .team-grid { grid-template-columns: 1fr; gap: 8px; }
  .team-card { padding: 11px; gap: 10px; }
  .team-card .team-logo { width: 43px !important; height: 43px !important; font-size: 15px !important; }
  .team-page.narrow-wrap { padding: 0 0 19px; }
  .team-page .back-link { padding: 10px 11px 0; }
  .team-identity { padding: 14px 11px; border-radius: 0; border-left: 0; border-right: 0; gap: 11px; }
  .team-identity .team-logo { width: 58px !important; height: 58px !important; font-size: 20px !important; }
  .team-identity .profile-actions { width: 100%; }
  .team-identity .profile-actions > .btn, .team-identity .profile-actions > .account-menu { flex: 1; }
  .team-identity .account-menu > .btn { width: 100%; }
  .team-page .tabs { background: #fff; padding: 0 11px; gap: 18px; }
  .team-page .card:not(.team-identity):not(.post) { border-radius: 0; border-left: 0; border-right: 0; }
  .page-search { flex: 1 1 100%; }
  .friends-page .person-grid { grid-template-columns: 1fr; gap: 6px; }
  .settings-layout { flex-direction: column; gap: 10px; }
  .settings-nav { position: static; display: flex; overflow-x: auto; gap: 3px; width: 100%; flex: none; scrollbar-width: none; }
  .settings-nav a { flex: none; white-space: nowrap; }
  .settings-nav a:last-child { border-top: 0; margin-top: 0; padding-top: 8px; }
  .settings-panel { width: 100%; padding: 16px 13px; }
  .field-pair { flex-direction: column; gap: 0; }
  .avatar-editor .avatar-xl { width: 72px; height: 72px; font-size: 26px; }
  .link-row { flex-wrap: wrap; }
  .link-row .input:first-child { flex: 1 1 100%; }
}
