/* Nexora design system.
   Own brand identity: a fresh indigo on a clean light-gray chrome,
   with a familiar social layout (top bar, feed, side rails). */

:root {
  --brand: #1877f2;
  --brand-dark: #0d65d9;
  --brand-soft: #e7f3ff;
  --brand-grad: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);

  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #1c1e21;
  --text-soft: #65676b;
  --line: #e4e6eb;
  --hover: #f0f2f5;

  --like: #e0245e;
  --green: #16a34a;
  --danger: #dc2626;

  --radius: 8px;
  --radius-lg: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .12);
  --shadow-lg: 0 2px 12px rgba(0, 0, 0, .16);
  --topbar-h: 56px;
}

/* Dark theme: override the same variables, so every surface adapts. Toggled by
   setting data-theme="dark" on <html> (persisted in localStorage). */
html[data-theme="dark"] {
  --brand: #4593ff;
  --brand-dark: #1877f2;
  --brand-soft: #1e3150;

  --bg: #11131a;
  --card: #242526;
  --text: #e4e6eb;
  --text-soft: #c9cdd3;
  --line: #303442;
  --hover: #282c38;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

body { background-image: none; }

a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.35);
  outline-offset: 2px;
}

/* ---------- Brand wordmark ---------- */
.brand {
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--brand);
  padding-right: 0.06em;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--brand-grad);
  color: #fff;
  font-weight: 800;
  font-size: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

/* Crisp, monochrome UI icons. SVG masks keep the icon color in sync with the
   active/hover state and avoid the inconsistent look of platform emoji. */
.ti, .menu-icon { display: inline-block; width: 21px; height: 21px; flex: none; background: currentColor; mask: center / contain no-repeat; -webkit-mask: center / contain no-repeat; }
.menu-icon { width: 19px; height: 19px; }
.icon-home { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 10 9-7 9 7v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1Z'/%3E%3Cpath d='M9 21v-7h6v7'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 10 9-7 9 7v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1Z'/%3E%3Cpath d='M9 21v-7h6v7'/%3E%3C/svg%3E"); }
.icon-users { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.icon-bag { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z'/%3E%3Cpath d='M3 6h18M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z'/%3E%3Cpath d='M3 6h18M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E"); }
.icon-chart { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='m7 16 4-5 3 3 5-7'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='m7 16 4-5 3 3 5-7'/%3E%3C/svg%3E"); }
.icon-message { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-9 8.5 9.6 9.6 0 0 1-4.1-.9L3 21l1.6-4.7A8.2 8.2 0 0 1 3 11.5 8.4 8.4 0 0 1 12 3a8.4 8.4 0 0 1 9 8.5Z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-9 8.5 9.6 9.6 0 0 1-4.1-.9L3 21l1.6-4.7A8.2 8.2 0 0 1 3 11.5 8.4 8.4 0 0 1 12 3a8.4 8.4 0 0 1 9 8.5Z'/%3E%3C/svg%3E"); }
.icon-bell { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9M10 21h4'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9M10 21h4'/%3E%3C/svg%3E"); }
.icon-moon { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 15.5A8.5 8.5 0 0 1 8.5 3.5 8.5 8.5 0 1 0 20.5 15.5Z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 15.5A8.5 8.5 0 0 1 8.5 3.5 8.5 8.5 0 1 0 20.5 15.5Z'/%3E%3C/svg%3E"); }
.icon-sun { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.42 1.42M17.65 17.65l1.42 1.42M2 12h2M20 12h2M4.93 19.07l1.42-1.42M17.65 6.35l1.42-1.42'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.42 1.42M17.65 17.65l1.42 1.42M2 12h2M20 12h2M4.93 19.07l1.42-1.42M17.65 6.35l1.42-1.42'/%3E%3C/svg%3E"); }
.icon-user { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
.icon-plus { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.icon-logout { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 17l5-5-5-5M15 12H3M21 19V5a2 2 0 0 0-2-2h-6'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 17l5-5-5-5M15 12H3M21 19V5a2 2 0 0 0-2-2h-6'/%3E%3C/svg%3E"); }
.icon-language { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.4 2.5 3.6 5.5 3.6 9s-1.2 6.5-3.6 9c-2.4-2.5-3.6-5.5-3.6-9S9.6 5.5 12 3Z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.4 2.5 3.6 5.5 3.6 9s-1.2 6.5-3.6 9c-2.4-2.5-3.6-5.5-3.6-9S9.6 5.5 12 3Z'/%3E%3C/svg%3E"); }
.icon-rocket { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 10 4 20M5 14l-1 5 5-1M13 4c3-3 7-2 7-2s1 4-2 7l-7 7-5-5 7-7Z'/%3E%3Cpath d='M14 5 19 10M8 16l-3 3'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 10 4 20M5 14l-1 5 5-1M13 4c3-3 7-2 7-2s1 4-2 7l-7 7-5-5 7-7Z'/%3E%3Cpath d='M14 5 19 10M8 16l-3 3'/%3E%3C/svg%3E"); }
.icon-bookmark { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18l-6-4-6 4V4Z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18l-6-4-6 4V4Z'/%3E%3C/svg%3E"); }
.icon-gift { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12v9H4v-9M2 7h20v5H2zM12 7v14M12 7H8.5a2.5 2.5 0 1 1 2.5-2.5V7ZM12 7h3.5A2.5 2.5 0 1 0 13 4.5V7Z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12v9H4v-9M2 7h20v5H2zM12 7v14M12 7H8.5a2.5 2.5 0 1 1 2.5-2.5V7ZM12 7h3.5A2.5 2.5 0 1 0 13 4.5V7Z'/%3E%3C/svg%3E"); }
.icon-globe { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.5 3.8 5.5 3.8 9s-1.3 6.5-3.8 9c-2.5-2.5-3.8-5.5-3.8-9S9.5 5.5 12 3Z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.5 3.8 5.5 3.8 9s-1.3 6.5-3.8 9c-2.5-2.5-3.8-5.5-3.8-9S9.5 5.5 12 3Z'/%3E%3C/svg%3E"); }
.icon-scale { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M5 6h14M5 6l-3 6a3 3 0 0 0 6 0L5 6ZM19 6l-3 6a3 3 0 0 0 6 0l-3-6ZM8 21h8'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M5 6h14M5 6l-3 6a3 3 0 0 0 6 0L5 6ZM19 6l-3 6a3 3 0 0 0 6 0l-3-6ZM8 21h8'/%3E%3C/svg%3E"); }
.icon-lightbulb { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M8 14a6 6 0 1 1 8 0c-1 1-1 2-1 4H9c0-2 0-3-1-4Z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M8 14a6 6 0 1 1 8 0c-1 1-1 2-1 4H9c0-2 0-3-1-4Z'/%3E%3C/svg%3E"); }
.icon-heart { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 8.7c0 5-8.8 10.3-8.8 10.3S3.2 13.7 3.2 8.7A4.7 4.7 0 0 1 12 6a4.7 4.7 0 0 1 8.8 2.7Z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 8.7c0 5-8.8 10.3-8.8 10.3S3.2 13.7 3.2 8.7A4.7 4.7 0 0 1 12 6a4.7 4.7 0 0 1 8.8 2.7Z'/%3E%3C/svg%3E"); }
.icon-settings { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z'/%3E%3Cpath d='m19.4 15 .1.1a2 2 0 1 1-2.8 2.8l-.1-.1a2 2 0 0 0-3.4 1.4V19a2 2 0 1 1-4 0v-.2a2 2 0 0 0-3.4-1.4l-.1.1A2 2 0 1 1 3 14.7l.1-.1A2 2 0 0 0 1.7 11H2a2 2 0 1 1 0-4h.2a2 2 0 0 0 1.4-3.4L3.5 3.5A2 2 0 1 1 6.3.7l.1.1A2 2 0 0 0 9.8-.6V-1a2 2 0 1 1 4 0v.2a2 2 0 0 0 3.4 1.4l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1A2 2 0 0 0 21.4 7h.2a2 2 0 1 1 0 4h-.2a2 2 0 0 0-2 4Z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z'/%3E%3Cpath d='m19.4 15 .1.1a2 2 0 1 1-2.8 2.8l-.1-.1a2 2 0 0 0-3.4 1.4V19a2 2 0 1 1-4 0v-.2a2 2 0 0 0-3.4-1.4l-.1.1A2 2 0 1 1 3 14.7l.1-.1A2 2 0 0 0 1.7 11H2a2 2 0 1 1 0-4h.2a2 2 0 0 0 1.4-3.4L3.5 3.5A2 2 0 1 1 6.3.7l.1.1A2 2 0 0 0 9.8-.6V-1a2 2 0 1 1 4 0v.2a2 2 0 0 0 3.4 1.4l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1A2 2 0 0 0 21.4 7h.2a2 2 0 1 1 0 4h-.2a2 2 0 0 0-2 4Z'/%3E%3C/svg%3E"); }
.icon-edit { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 16-1 5 5-1L19 9l-4-4L4 16Z'/%3E%3Cpath d='m13 6 4 4'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 16-1 5 5-1L19 9l-4-4L4 16Z'/%3E%3Cpath d='m13 6 4 4'/%3E%3C/svg%3E"); }
.icon-eye { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3C/svg%3E"); }
.icon-ban { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m5.6 5.6 12.8 12.8'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m5.6 5.6 12.8 12.8'/%3E%3C/svg%3E"); }
.icon-check { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E"); }
.icon-lock { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }
.icon-unlock { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 7.5-2'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 7.5-2'/%3E%3C/svg%3E"); }
.icon-pin { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 3 6 6-2 2 4 4-2 2-4-4-2 2-6-6 2-2-2-2 4-4 2 2 2-2Z'/%3E%3Cpath d='m12 12-8 8M4 20l-2 2'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 3 6 6-2 2 4 4-2 2-4-4-2 2-6-6 2-2-2-2 4-4 2 2 2-2Z'/%3E%3Cpath d='m12 12-8 8M4 20l-2 2'/%3E%3C/svg%3E"); }
.icon-trash { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 14h10l1-14M9 7V4h6v3'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 14h10l1-14M9 7V4h6v3'/%3E%3C/svg%3E"); }
.icon-rotate { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12a8 8 0 0 1 13.7-5.7L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.7L4 16m0 4v-4h4'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12a8 8 0 0 1 13.7-5.7L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.7L4 16m0 4v-4h4'/%3E%3C/svg%3E"); }
.icon-link { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.1.1l2-2a5 5 0 0 0-7.1-7.1l-1.1 1.1M14 11a5 5 0 0 0-7.1-.1l-2 2A5 5 0 0 0 12 20l1.1-1.1'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.1.1l2-2a5 5 0 0 0-7.1-7.1l-1.1 1.1M14 11a5 5 0 0 0-7.1-.1l-2 2A5 5 0 0 0 12 20l1.1-1.1'/%3E%3C/svg%3E"); }
.icon-warning { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 10 18H2L12 3Z'/%3E%3Cpath d='M12 9v5M12 17h.01'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 10 18H2L12 3Z'/%3E%3Cpath d='M12 9v5M12 17h.01'/%3E%3C/svg%3E"); }
.icon-close { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 6 12 12M18 6 6 18'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 6 12 12M18 6 6 18'/%3E%3C/svg%3E"); }
.icon-star { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2-5.6-3-5.6 3 1.1-6.2L3 9.6l6.2-.9L12 3Z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2-5.6-3-5.6 3 1.1-6.2L3 9.6l6.2-.9L12 3Z'/%3E%3C/svg%3E"); }
.ui-glyph { vertical-align: -0.18em; width: 1em; height: 1em; margin-right: .28em; }
.ui-glyph + .ui-glyph { margin-left: .12em; }
.field { margin-bottom: 16px; }
.section-title { margin-bottom: 14px; }
#view > .card, #view > .messenger { margin-bottom: 20px; }
.card + .card { margin-top: 12px; }
.mk-head, .phead-row, .comm-act, .pactions, .sug-admin, .modal .mh, .modal .mc { gap: 10px; }
.post-actions { gap: 6px; }
.post-action { padding-inline: 10px; }
.empty { padding: 24px 16px; }
.topbar-right { gap: 6px; }
.account-menu, .dropdown { padding: 10px; }
.account-menu-item { min-height: 42px; }
.modal { padding: 20px; }
.icon-calendar { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E"); }

/* ---------- Buttons ---------- */
.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  background: var(--hover);
  color: var(--text);
  transition: filter 0.15s ease, background 0.15s ease, transform 0.05s ease;
}
.btn:hover { filter: brightness(0.96); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); filter: none; }
.btn-soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: var(--hover); }
.btn-danger { background: #fde8e8; color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 14px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Inputs ---------- */
.input, textarea.input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
textarea.input { resize: vertical; min-height: 60px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 5px; font-weight: 600; }

/* ---------- Avatars ---------- */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-soft);
  flex: none;
  max-width: none; /* override the global img max-width so a fixed-size avatar never shrinks into an oval */
  aspect-ratio: 1 / 1;
}
.avatar-fallback {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  flex: none;
  text-transform: uppercase;
}

/* ---------- Landing / auth ---------- */
.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 72px 24px 48px;
  background: var(--bg);
}
.landing::before,
.landing::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.landing::before { width: 230px; height: 230px; right: -74px; top: 17%; background: rgba(24, 119, 242, .05); }
.landing::after { width: 170px; height: 170px; left: -64px; bottom: 12%; background: rgba(24, 119, 242, .04); }
.landing-grid {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.landing-pitch h1 { font-size: 56px; letter-spacing: -0.04em; margin: 0 0 8px; line-height: 1; max-width: 650px; }
.landing-pitch > p { font-size: 22px; line-height: 1.35; color: var(--text); max-width: 480px; margin: 0; }
.landing-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.landing-logo .name { font-size: 34px; }
.landing-logo::after { display: none; }

/* Manifesto / promises checklist (left pitch column, visible during login + signup) */
.promises { margin-top: 30px; max-width: 460px; }
.landing-pitch .promises-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  max-width: none;
  margin: 0 0 16px;
}
.promise-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.promise {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  text-align: left;
}
.promise-check {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--brand-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
  margin-top: 1px;
}
.promise-check svg { width: 15px; height: 15px; display: block; }
.promise-text {
  font-size: 16px;
  line-height: 1.45;
  color: var(--text-soft);
}
.promise-text strong {
  display: block;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 1px;
}
/* Supporting line sits muted and a touch smaller under each bold claim, so the
   five headlines are the primary scan layer. */
.promise-sub {
  display: block;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.4;
}
.promise-link {
  color: var(--brand);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.promise-link:hover { color: var(--brand-dark); }
/* Defense in depth: the entrance animation is JS-only (no opacity:0 default in
   CSS), but if motion is reduced we also force rows visible so nothing can be
   left hidden. */
@media (prefers-reduced-motion: reduce) {
  .promise { opacity: 1 !important; }
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  backdrop-filter: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}
.auth-card h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: 0; }
.auth-card .sub { color: var(--text-soft); margin: 0 0 18px; }
.auth-card .btn-primary { background: var(--brand); box-shadow: none; }
.auth-card .btn-primary:hover { background: var(--brand-dark); transform: none; }
.auth-card .input { min-height: 46px; border-radius: 6px; }
.auth-switch { text-align: center; margin-top: 14px; color: var(--text-soft); }
.auth-switch button { background: none; border: none; color: var(--brand); font-weight: 600; cursor: pointer; }
/* Sign in with Google */
.google-auth { margin-top: 12px; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--text-soft); font-size: 12.5px; margin: 4px 0 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #ffffff; color: #3c4043; border: 1px solid #dadce0; font-weight: 600; }
.btn-google:hover { background: #f6f7f9; border-color: #cfd2d6; }
.btn-google .g-ic { flex: none; }
/* Alternative sign-in (passkey + Google) under the login form */
.alt-auth { margin-top: 12px; }
.alt-auth .btn-google, .alt-auth .btn-passkey { margin-bottom: 10px; }
.alt-auth .btn-google:last-child, .alt-auth .btn-passkey:last-child { margin-bottom: 0; }
/* Sign in with a passkey (biometric) */
.btn-passkey { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--card); color: var(--text); border: 1px solid var(--line); font-weight: 600; }
.btn-passkey:hover { border-color: var(--brand); color: var(--brand); }
.btn-passkey .pk-ic { flex: none; }
/* Passkey manager (Settings) */
/* Blocked / muted accounts list (Settings). */
.rel-list { display: flex; flex-direction: column; gap: 6px; }
.rel-row { display: flex; align-items: center; gap: 10px; }
.rel-row .rel-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.passkey-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.passkey-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.passkey-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.passkey-name { font-weight: 600; font-size: 13.5px; }
.passkey-del { flex: none; color: #e5484d; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

.alert {
  background: #fde8e8;
  color: var(--danger);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 12px;
}
.alert-ok { background: #e7f6ec; color: var(--green); }
.hidden { display: none !important; }

/* ---------- Supporter verified tick + badges + tiers ---------- */
/* Blue verified tick shown next to supporter names. Cosmetic only. */
.vtick {
  width: 1em; height: 1em;
  vertical-align: -0.14em;
  margin-left: 2px;
  fill: var(--brand);
  flex: none;
}
.vtick-check { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
html[data-theme="dark"] .vtick-check { stroke: #18191a; }

/* Colored supporter badge chip. */
.badge-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 999px;
  color: #3a2a00;
  vertical-align: middle;
}
.badge-bronze { background: linear-gradient(135deg, #e8b27a, #cd7f32); color: #3a2400; }
.badge-silver { background: linear-gradient(135deg, #e4e7eb, #9aa4ad); color: #2a2f34; }
.badge-gold   { background: linear-gradient(135deg, #ffe08a, #e3b341); color: #3a2c00; }

.pill-ok { background: var(--brand-soft); color: var(--brand); font-weight: 700; }

/* Tier cards on the Support / upgrade page. */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.tier-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tier-card.tier-current { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.tier-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tier-price { font-size: 22px; font-weight: 800; color: var(--text); }
.tier-price span { font-size: 12px; font-weight: 600; color: var(--text-soft); }
.tier-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tier-perks li { font-size: 13px; color: var(--text-soft); padding-left: 18px; position: relative; line-height: 1.35; }
.tier-perks li::before { content: "\2713"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.tier-card .btn { width: 100%; }

@media (max-width: 860px) {
  .tier-grid { grid-template-columns: 1fr; }
}

/* ---------- Invite / referrals ---------- */
.invite-link-row { display: flex; gap: 8px; align-items: center; }
.invite-link-row .input { flex: 1; min-width: 0; }
.prog-wrap { height: 10px; background: var(--hover); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.prog-bar { height: 100%; background: var(--brand-grad); border-radius: 999px; transition: width 0.4s ease; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lb-row:last-child { border-bottom: none; }
.lb-rank { width: 22px; text-align: center; font-weight: 800; color: var(--text-soft); flex: none; }
.lb-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-count { font-weight: 800; color: var(--brand); flex: none; }

/* ---------- Owner analytics bar lists ---------- */
.bar-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.bar-label { flex: 0 0 38%; min-width: 0; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 10px; background: var(--hover); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--brand-grad); border-radius: 999px; }
.bar-val { flex: none; font-weight: 700; color: var(--text-soft); font-size: 13px; min-width: 32px; text-align: right; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  box-shadow: 0 8px 24px rgba(23, 28, 48, 0.06);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.topbar .logo { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.topbar .logo .name { font-size: 22px; }
.topbar .logo:hover .brand-mark { transform: rotate(-4deg) scale(1.04); }
.topbar .logo .brand-mark { transition: transform .18s ease; }
.topbar .search {
  width: 240px;
  position: relative;
}
.topbar .search input {
  width: 100%;
  border: none;
  background: color-mix(in srgb, var(--hover) 88%, transparent);
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 9px 16px;
  font-size: 14px;
  outline: none;
}
.topbar .search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* Center: primary destination tabs, Facebook-style with an active underline.
   Auto width with equal-width (flex:1) left and right zones keeps these tabs at
   the true center of the viewport. */
.nav-primary {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  height: 100%;
}
.nav-tab {
  position: relative;
  border: none;
  background: transparent;
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 92px;
  padding: 0 16px;
  height: 100%;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  font-size: 12px;
  font-weight: 600;
}
.nav-tab .ti { font-size: 21px; line-height: 1; }
.nav-tab:hover { background: var(--hover); }
.nav-tab.active { color: var(--brand); border-bottom-color: var(--brand); background: transparent; }
.nav-tab.active .ti { transform: translateY(-1px); }
.nav-tab .ti { transition: transform .18s ease; }

/* Right: utility cluster (messages, notifications, your avatar). flex:1 mirrors
   the left zone so the center tabs stay centered; content is pushed right. */
.topbar-right { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; justify-content: flex-end; }

/* Mobile bottom navigation: the primary tabs move here on small screens so they
   are always visible and tappable (the top bar can't fit them on a phone). */
.bottom-nav { display: none; }
.topbar .nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--hover);
  color: var(--text-soft);
  font-size: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-btn:hover { background: var(--line); }
.nav-btn.active { color: var(--brand); background: var(--brand-soft); }
.account-trigger { overflow: hidden; padding: 0; }
.account-trigger .avatar { border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }

.account-menu {
  position: fixed;
  z-index: 80;
  top: calc(var(--topbar-h) + 10px);
  right: 16px;
  width: min(300px, calc(100vw - 24px));
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(23, 28, 48, 0.18);
}
.account-menu-head { padding: 10px 12px 12px; font-weight: 700; }
.account-menu-head .account-email { display: block; color: var(--text-soft); font-size: 12px; font-weight: 500; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-divider { height: 1px; background: var(--line); margin: 0 4px 6px; }
.account-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text); text-align: left; font-size: 14px; font-weight: 600; }
.account-menu-item:hover { background: var(--hover); }
.account-menu-item > span:first-child { width: 22px; text-align: center; font-size: 18px; }
.account-menu-danger { color: var(--danger); }
/* Top-bar dark-mode toggle: a pill with an icon + short label (moon "Dark" in light mode,
   sun "Light mode" in dark mode). On phones the label hides so the top bar stays uncluttered. */
.nav-btn.theme-btn { width: auto; border-radius: 21px; padding: 0 12px; gap: 6px; font-size: 14px; font-weight: 600; }
.nav-btn.theme-btn .ti { font-size: 17px; line-height: 1; }
.nav-btn.theme-btn .tl { line-height: 1; }
@media (max-width: 640px) {
  .nav-btn.theme-btn { width: 42px; padding: 0; }
  .nav-btn.theme-btn .tl { display: none; }
}
.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--like);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card);
}
/* Brief attention pulse on the messages icon when a new DM lands. */
@keyframes navPing {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.28); }
  50% { transform: scale(0.94); }
  75% { transform: scale(1.14); }
}
.nav-btn.nav-ping { animation: navPing 0.55s ease 0s 2; }
.nav-btn.nav-ping .badge { box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.25); }

/* ---------- App layout ---------- */
.layout {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 280px;
  gap: 16px;
  padding: 22px 16px 40px;
  align-items: start;
}
.rail { position: sticky; top: calc(var(--topbar-h) + 16px); }
.center { min-width: 0; }

.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
.side-link:hover { background: var(--hover); }
.side-link.active { background: var(--brand-soft); color: var(--brand); }
.side-link { transition: background .16s ease, color .16s ease, transform .16s ease; }
.side-link:hover { transform: translateX(2px); }
.side-link .ic { font-size: 20px; width: 24px; text-align: center; }
.side-link .side-badge { position: static; margin-left: auto; border: none; }

/* ---------- Email verification banner ---------- */
.verify-banner {
  max-width: 1280px;
  margin: 12px auto 0;
  padding: 10px 16px;
  background: #fff7e6;
  border: 1px solid #f0c36d;
  color: #6b4e00;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.verify-banner span { flex: 1; }
/* Yellow "install this as an app" (PWA) banner */
.install-banner {
  max-width: 1280px;
  margin: 12px auto 0;
  padding: 10px 14px;
  background: #ffd84d;
  border: 1px solid #e0b400;
  color: #4a3a00;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
}
.install-banner .ib-text { flex: 1; min-width: 170px; line-height: 1.4; }
.install-banner .ib-btn { background: #4a3a00; color: #ffd84d; border: none; border-radius: 8px; padding: 8px 14px; font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.install-banner .ib-btn:hover { background: #5e4a00; }
.install-banner .ib-x { background: transparent; border: none; color: #4a3a00; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; opacity: 0.65; }
.install-banner .ib-x:hover { opacity: 1; }

/* New-user welcome banner: shown on the home feed to accounts under 30 days old,
   dismissible. Brand-tinted and theme-aware so it stays readable in dark mode. */
.welcome-banner { position: relative; background: var(--brand-soft); border: 1px solid var(--brand); }
.welcome-body { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-right: 22px; }
.welcome-text { flex: 1; min-width: 200px; font-size: 14px; line-height: 1.5; color: var(--text); }
.welcome-emoji { font-size: 16px; }
.welcome-cta { flex: none; white-space: nowrap; }
.welcome-x { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--text-soft); font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 7px; border-radius: 6px; }
.welcome-x:hover { background: var(--hover); color: var(--text); }

/* Profile visibility chooser (public / friends / private) inside the modal. */
.vis-opts { display: flex; flex-direction: column; gap: 8px; }
.vis-opt { display: flex; align-items: flex-start; gap: 12px; text-align: left; width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
.vis-opt:hover { border-color: var(--brand); }
.vis-opt.sel { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.vis-opt .vis-ic { font-size: 22px; flex: none; line-height: 1.2; }
.vis-opt .vis-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vis-opt .vis-label { font-weight: 700; font-size: 15px; color: var(--text); }
.vis-opt .vis-desc { font-size: 12.5px; color: var(--text-soft); line-height: 1.45; }
.vis-opt .vis-check { flex: none; color: var(--brand); font-weight: 800; opacity: 0; align-self: center; }
.vis-opt.sel .vis-check { opacity: 1; }

/* ---------- Moderation ---------- */
.modbanner {
  background: #fdecea;
  border: 1px solid #f5b5ae;
  color: #8a1c10;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  margin: 8px 0;
}
.modbanner-soft { background: var(--hover); border-color: #ddd; color: var(--text-soft); }
.cbubble.cremoved { opacity: 0.6; font-style: italic; }

/* ---------- Password show/hide ---------- */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 64px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 8px;
}
.pw-toggle:hover { text-decoration: underline; }

/* ---------- Dashboard ---------- */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.stat .sval { font-size: 28px; font-weight: 800; color: var(--brand); line-height: 1.1; }
.stat .slabel { font-weight: 700; margin-top: 4px; }
.stat .shint { font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.analytics-table { width: 100%; border-collapse: collapse; }
.analytics-table th, .analytics-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.analytics-table th { color: var(--text-soft); font-weight: 600; }
.analytics-table td:not(:first-child), .analytics-table th:not(:first-child) { text-align: right; width: 70px; }
.analytics-table tr.link:hover td { background: var(--hover); }

/* ---------- Reels (vertical video) ---------- */
.reels-viewer {
  height: calc(100vh - var(--topbar-h) - 96px);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
}
.reel-stage {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  background: #000;
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reel-video { width: 100%; height: 100%; object-fit: contain; background: #000; cursor: pointer; }
.reel-overlay { position: absolute; inset: 0; pointer-events: none; }
.reel-overlay > * { pointer-events: auto; }
.reel-actions { position: absolute; right: 12px; bottom: 96px; display: flex; flex-direction: column; gap: 14px; }
.reel-act {
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  gap: 1px;
}
.reel-act .ra-ic { font-size: 22px; line-height: 1; }
.reel-meta {
  position: absolute;
  left: 14px;
  right: 76px;
  bottom: 16px;
  color: #fff;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
.reel-meta .rname { font-weight: 700; cursor: pointer; }
.reel-meta .rcap { font-size: 14px; margin-top: 2px; }
.reel-meta .rcap a { color: #cfe1ff; }
.reel-meta .rviews { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.reel-mute {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  padding: 14px;
  margin-bottom: 16px;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.card-pad-0 { padding: 0; overflow: hidden; }
.section-title { font-size: 17px; font-weight: 700; margin: 0 0 10px; }

.center > .card:first-child { box-shadow: 0 10px 30px rgba(79, 70, 229, 0.07); }

/* ---------- Composer ---------- */
.composer .row { display: flex; gap: 10px; align-items: center; }
.composer textarea {
  border: none;
  background: var(--hover);
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 11px 16px;
  width: 100%;
  resize: none;
  font-size: 15px;
  outline: none;
  min-height: 42px;
}
.composer textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.composer .preview { margin-top: 10px; position: relative; }
.composer .preview img { border-radius: 10px; max-height: 320px; width: 100%; object-fit: cover; }
.composer .preview .remove {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.6); color: #fff; border: none;
  width: 30px; height: 30px; border-radius: 50%; font-size: 16px;
}
.composer .actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.composer .actions .spacer { flex: 1; }
.icon-action { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 8px; background: transparent; border: none; color: var(--text-soft); font-weight: 600; }
.icon-action:hover { background: var(--hover); }
/* Composer: compact "Add" menu (mobile) vs spread-out icons (desktop) */
.composer-add-wrap { display: none; position: relative; }
.composer-add-menu { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 40; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; display: flex; flex-direction: column; min-width: 150px; }
.composer-add-menu button { background: transparent; border: none; text-align: left; padding: 8px 10px; border-radius: 7px; cursor: pointer; color: var(--text); font-size: 14px; }
.composer-add-menu button:hover { background: var(--hover); }
@media (max-width: 600px) {
  .composer-spread { display: none; }
  .composer-add-wrap { display: inline-block; }
  .composer .actions { gap: 6px; }
  .composer-audience { max-width: 130px; }
}

/* ---------- Stories ---------- */
.stories { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.story {
  flex: none;
  width: 110px;
  height: 180px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #ddd;
  box-shadow: var(--shadow);
}
.story img { width: 100%; height: 100%; object-fit: cover; }
.story .who {
  position: absolute; bottom: 8px; left: 8px; right: 8px;
  color: #fff; font-size: 12px; font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
.story .ring {
  position: absolute; top: 8px; left: 8px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--brand);
}
.story.add { background: var(--card); display: flex; flex-direction: column; }
.story.add .plus {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand); font-size: 30px;
}
.story.add .label { padding: 8px; font-size: 12px; font-weight: 700; text-align: center; }

/* ---------- Posts ---------- */
.post-head { display: flex; align-items: center; gap: 10px; }
.post-head .meta { flex: 1; min-width: 0; }
.post-head .name { font-weight: 700; cursor: pointer; }
.post-head .name:hover { text-decoration: underline; }
.post-head .time { font-size: 12px; color: var(--text-soft); }
/* A clickable avatar that opens the author's profile (feed posts, comments, people cards). */
.avatar-link { display: inline-flex; flex: none; cursor: pointer; line-height: 0; border-radius: 50%; }
/* The "N comments" count is a real button that opens the comments. */
.stat-link { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--text-soft); cursor: pointer; }
.stat-link:hover { text-decoration: underline; }
.post-body { margin: 10px 0; white-space: pre-wrap; word-wrap: break-word; }
/* @mention of a person: a clickable link to their profile. */
.mention { color: var(--brand); font-weight: 600; text-decoration: none; cursor: pointer; }
.mention:hover { text-decoration: underline; }
/* @everyone / @friends: a broadcast highlight, not a profile link. */
.mention-all { color: var(--brand); font-weight: 700; }
.post-image { margin: 0 -14px; }
.post-image img { width: 100%; max-height: 560px; object-fit: cover; }
.post-stats { display: flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: 13px; padding: 8px 0; }
.post-stats .heart { color: var(--like); }
.post-actions { display: flex; align-items: center; border-top: 1px solid var(--line); padding-top: 4px; }
.post-action {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: transparent; border: none; color: var(--text-soft);
  font-weight: 600; padding: 8px; border-radius: 8px; white-space: nowrap; min-width: 0;
}
.post-action:hover { background: var(--hover); }
.post-action.liked { color: var(--like); }
/* On phones the action row's text labels crowd the icons together, so hide the labels
   and keep just the icons (each button keeps a title tooltip, and the Share count stays).
   Like / comment / share / save / report icons + the vote arrows are self-explanatory. */
@media (max-width: 640px) {
  .post-actions .al { display: none; }
  .votebox.inline .vlabel { display: none; }
  .post-actions .post-action { gap: 0; padding-left: 4px; padding-right: 4px; font-size: 17px; }
}
.menu-btn { background: transparent; border: none; color: var(--text-soft); font-size: 20px; width: 34px; height: 34px; border-radius: 50%; }
.menu-btn:hover { background: var(--hover); }

/* comments */
.comments { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.comment { display: flex; gap: 8px; margin-bottom: 10px; }
.comment .bubble { background: var(--hover); border-radius: 16px; padding: 8px 12px; }
/* The name is an inline link (only the name text navigates, not the whole bubble). */
.comment .bubble .name { font-weight: 700; font-size: 13px; cursor: pointer; }
.comment .bubble .name:hover { text-decoration: underline; }
.comment .bubble .ctext, .cbubble .ctext { white-space: pre-wrap; word-wrap: break-word; }
/* Inline comment editor (Edit button). */
.cedit { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.cedit-area { width: 100%; resize: vertical; min-height: 40px; font: inherit; }
.cedit-actions { display: flex; gap: 6px; }
.cedited { color: var(--text-soft); }
.comment-form { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.comment-form input {
  flex: 1; border: none; background: var(--hover); border-radius: 18px;
  padding: 9px 14px; outline: none; font-size: 14px;
}

/* ---------- Profile ---------- */
/* Premium theme skin: a gradient that frames the whole profile background.
   The vibrant gradient paints the top identity area (background-size height);
   below that, the inline background-color (a soft accent tint) washes behind the
   posts. Cards float on top as solid surfaces, so text stays readable. Untheme
   leaves .profile-skin as a plain transparent wrapper. */
.profile-skin.themed {
  padding: 14px;
  border-radius: var(--radius);
  background-repeat: no-repeat;
  background-size: 100% 300px;
}
.profile-skin.themed > :last-child { margin-bottom: 0; }
.profile-skin.themed .profile-cover { border-radius: var(--radius); }

.profile-cover {
  height: 260px;
  background: var(--brand-grad);
  border-radius: 0 0 var(--radius) var(--radius);
  position: relative;
  background-size: cover;
  background-position: center;
}
.profile-cover .edit-cover {
  position: absolute; right: 14px; bottom: 14px;
  background: rgba(255,255,255,0.9); color: var(--text);
}
.profile-head {
  display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 18px;
  margin: 0; padding: 0 24px 16px;
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 1; /* paint above the positioned cover */
}
/* Lift ONLY the avatar up over the cover. The name column then stays in the white
   area below the cover, so the cover (which is position:relative and would
   otherwise paint over the non-positioned name) can never cover the name. */
.profile-head .av-wrap { position: relative; margin-top: -60px; flex: none; }
.profile-head .av-wrap .cam {
  position: absolute; right: 4px; bottom: 4px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--hover); border: 2px solid var(--card);
  display: flex; align-items: center; justify-content: center;
}
.profile-head .pname { font-size: 28px; font-weight: 800; color: var(--name-accent, var(--text)); }
/* In dark mode the name is always bright for readability: a custom name color
   (var(--name-accent), often a dark shade picked in light mode) would otherwise
   render near-black on the dark card and disappear. The accent still shows in
   light mode. */
html[data-theme="dark"] .profile-head .pname { color: var(--text); }
.profile-head .pmeta { color: var(--text-soft); }
/* Name + actions sit on one row; the bio flows full-width below it (so action
   buttons never squeeze the bio). */
.profile-head .phead-row { display: flex; align-items: flex-start; gap: 12px; }
.profile-head .phead-id { flex: 1 1 auto; min-width: 0; }
/* Actions sit in a compact 2-up grid (two buttons per row, wrapping) with a capped
   width, so a long action set (Message / Friends / Follow / Share / More) never eats
   the space the name + stats need. Grid items stretch to equal-width columns. */
.profile-head .pactions {
  flex: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
  width: 220px;
  max-width: 46%;
}
.profile-head .pactions .btn { white-space: nowrap; }
.btn-icon { padding: 8px 11px; font-size: 16px; line-height: 1; }

/* ---------- Lists / people ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.person {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; text-align: center; padding-bottom: 12px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.person:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(23, 28, 48, .12); }
.person .ph { height: 120px; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; }
.person .pn { font-weight: 700; margin: 10px 8px 2px; cursor: pointer; }
.person .phandle { color: var(--text-soft); font-size: 12.5px; margin: 0 8px 8px; }
.person .pb { padding: 0 10px; display: flex; flex-direction: column; gap: 6px; }
/* "Follow Nexora" discovery card in the right rail. */
.ob-follow .ob-follow-row { display: flex; align-items: center; gap: 10px; }
.ob-follow .ob-follow-id { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.ob-follow .ob-follow-meta { display: flex; flex-direction: column; min-width: 0; }
.ob-follow .ob-follow-meta .nm { font-weight: 700; }
.ob-follow #obFollowBtn { flex: none; }
.contact { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; cursor: pointer; transition: background .16s ease; }
.contact:hover { background: var(--hover); }
.contact .nm { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot-online { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }
.dot-online.off { background: #9aa3ad; }
.dot-online:not(.off) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 16%, transparent); }
/* Cosmetic Founder badge next to a name (distinct from supporter badges). */
.founder-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 800; line-height: 1;
  padding: 2px 7px; border-radius: 999px; vertical-align: middle;
  color: #4a3200; background: linear-gradient(135deg, #ffd34d, #f7a823);
  border: 1px solid rgba(0,0,0,0.08); white-space: nowrap;
}
/* Golden ring around the founder's avatar (cosmetic). */
.av-gold { box-shadow: 0 0 0 2px var(--card, #fff), 0 0 0 4px #f5b301, 0 0 0 6px rgba(245,179,1,0.28); }
/* The official Nexora account: brand "O" mark + an Official badge. */
.avatar-official { display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--brand); color: #fff; border-radius: 30%; font-weight: 800; line-height: 1; }
.official-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; line-height: 1; padding: 2px 7px; border-radius: 999px; vertical-align: middle; color: #fff; background: var(--brand); white-space: nowrap; }

/* Blue Pioneer badge for the first 5,000 members (cosmetic, never reputation). */
.pioneer-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 800; line-height: 1;
  padding: 2px 7px; border-radius: 999px; vertical-align: middle;
  color: #fff; background: linear-gradient(135deg, #4f8cff, #2563eb);
  border: 1px solid rgba(0,0,0,0.08); white-space: nowrap;
}
/* A Pioneer who supports: the Pioneer badge takes their tier color (matching the
   supporter badge colors), reverting to the default blue when support lapses. */
.pioneer-badge.pio-bronze { background: linear-gradient(135deg, #e8b27a, #cd7f32); color: #3a2400; }
.pioneer-badge.pio-silver { background: linear-gradient(135deg, #e4e7eb, #9aa4ad); color: #2a2f34; }
.pioneer-badge.pio-gold   { background: linear-gradient(135deg, #ffe08a, #e3b341); color: #3a2c00; }
/* Growth-phase ladder on the Support page (done / current / upcoming). Scrolls
   horizontally on narrow screens so the four phases never crush together. */
.phase-ladder { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.phase-step { flex: 1 1 0; min-width: 78px; border-radius: 10px; padding: 8px 10px; text-align: center; border: 1px solid var(--line); background: var(--hover); }
.phase-step .ps-n { font-size: 12.5px; font-weight: 800; }
.phase-step .ps-to { font-size: 11px; color: var(--text-soft); margin-top: 1px; }
.phase-step.phase-done { background: var(--brand-soft); border-color: var(--brand); }
.phase-step.phase-done .ps-n { color: var(--brand-dark); }
.phase-step.phase-cur { background: linear-gradient(135deg, #4f8cff, #2563eb); border-color: transparent; }
.phase-step.phase-cur .ps-n, .phase-step.phase-cur .ps-to { color: #fff; }
.phase-step.phase-next { opacity: 0.85; }
/* Premium profile theme swatches in the Edit profile dialog. */
.theme-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.theme-sw { width: 56px; height: 34px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.theme-sw.sel { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.theme-sw.theme-none { background: var(--hover); color: var(--text-soft); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* Pinned, clearly-labeled site announcement at the top of the feed (transparent
   pin, never a hidden feed boost). */
.ann-wrap { margin-bottom: 14px; border: 1.5px solid #2563eb; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 16px rgba(37,99,235,0.12); }
.ann-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, #4f8cff, #2563eb); padding: 7px 14px; }
.ann-wrap > .card { margin: 0; border: none; border-radius: 0; box-shadow: none; }
/* Profile header name column: take the remaining width and let long names wrap
   cleanly instead of being clipped under the avatar / cover overlap. */
/* The name column claims at least ~240px and grows; if the row is too tight for
   the avatar + name + actions, the actions wrap to their own line below (so the
   name is never squeezed into a 1-letter-per-line column). */
.profile-head .phead-main { flex: 1 1 240px; min-width: 0; }
.profile-head .pname { overflow-wrap: break-word; word-break: normal; line-height: 1.2; }
/* Composer audience (Public / Friends) selector. */
.composer-audience {
  font: inherit; font-size: 13px; padding: 6px 8px; margin-right: 8px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--text); cursor: pointer;
}

/* ---------- Rich posts: colored text backgrounds, polls, file chips ---------- */
/* Background gradients, shared by post backgrounds, the composer textarea, and swatches. */
/* !important so the gradient wins over the base textarea/button backgrounds when
   applied to the composer textarea and the swatches. */
.cbg-1 { background: linear-gradient(135deg, #667eea, #764ba2) !important; }
.cbg-2 { background: linear-gradient(135deg, #f093fb, #f5576c) !important; }
.cbg-3 { background: linear-gradient(135deg, #11998e, #38ef7d) !important; }
.cbg-4 { background: linear-gradient(135deg, #ff8008, #ffc837) !important; }
.cbg-5 { background: linear-gradient(135deg, #2193b0, #6dd5ed) !important; }
.cbg-6 { background: linear-gradient(135deg, #3a3d5c, #4286f4) !important; }

.post-bg {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 200px; padding: 26px; margin: 8px 0; border-radius: 12px;
  color: #fff; font-size: 26px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere;
}
/* When a background is picked the composer textarea BECOMES a live preview of the
   final post: big, bold, centered white text with a shadow so it reads clearly on
   any gradient (it was thin/faint before). */
.composer-bg {
  color: #fff !important; font-weight: 800; text-align: center;
  font-size: 24px !important; line-height: 1.35;
  min-height: 150px; border: none !important; border-radius: 12px;
  padding: 30px 20px !important; margin-top: 6px; resize: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.composer-bg::placeholder { color: rgba(255, 255, 255, 0.92); font-weight: 700; }

.cbg-strip { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 0; }
.cbg-swatch {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line);
  color: #fff; font-weight: 700; font-size: 12px; line-height: 1;
}
.cbg-swatch.cbg-none { background: var(--hover); color: var(--text); }
.cbg-swatch.on { outline: 2px solid var(--brand); outline-offset: 1px; }

.cpoll { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.cpoll-opt { width: 100%; }
.cpoll-add { align-self: flex-start; }
.cfile-chip { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.cfile-chip .remove { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--text-soft); }

.poll { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.poll-opt {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; padding: 10px 12px; font-size: 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden;
}
.poll-opt:hover { border-color: var(--brand); }
.poll-opt.mine { border-color: var(--brand); font-weight: 700; }
.poll-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--brand-soft); z-index: 0; transition: width .4s; }
.poll-text, .poll-pct { position: relative; z-index: 1; }
.poll-pct { color: var(--text-soft); font-weight: 700; }
.poll-total { font-size: 12px; color: var(--text-soft); }

.file-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin: 8px 0;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--hover); color: var(--text); text-decoration: none;
}
.file-chip:hover { border-color: var(--brand); }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Suggestion board ---------- */
.sug-row { display: flex; gap: 12px; align-items: flex-start; }
.sug-main { flex: 1; min-width: 0; }
.sug-title { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.sug-body { color: var(--text-soft); font-size: 14px; margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sug-meta { font-size: 12px; color: var(--text-soft); margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sug-cat, .sug-status { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: capitalize; }
.sug-cat { background: var(--hover); color: var(--text); }
.sug-status-open { background: var(--hover); color: var(--text-soft); }
.sug-status-planned { background: #fde68a; color: #92400e; }
.sug-status-in_progress { background: #dbeafe; color: #1e40af; }
.sug-status-shipped { background: #bbf7d0; color: #166534; }
.sug-status-declined { background: #fecaca; color: #991b1b; }
.sug-note { font-size: 12.5px; color: var(--text-soft); font-style: italic; line-height: 1.45; margin-top: 8px; overflow-wrap: anywhere; }
.sug-admin { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sug-admin:empty { display: none; }
/* Owner dashboard: suggestions inbox summary chips */
.adm-sug-summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 14px; }
.adm-sug-chip { font-size: 12.5px; color: var(--text-soft); background: var(--hover); border-radius: 999px; padding: 4px 11px; }
.adm-sug-chip b { color: var(--text); }

/* ---------- Photo repositioning ---------- */
.profile-cover .cover-tools { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
/* The cover buttons always sit on a near-white pill (same in both themes), so the
   label must be a fixed dark color. Using var(--text) made it light-on-white and
   invisible in dark mode. */
.cover-tools .cover-btn { background: rgba(255, 255, 255, 0.92); color: #1c1e21; }
.profile-head .av-wrap .cam.cam-repos { right: auto; left: 4px; }
.repos-frame { position: relative; overflow: hidden; background: #000; width: 100%; touch-action: none; cursor: grab; user-select: none; }
.repos-frame:active { cursor: grabbing; }
.repos-frame img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; user-select: none; }
.rf-cover { aspect-ratio: 5 / 2; min-height: 150px; border-radius: 10px; }
.rf-avatar { width: 260px; max-width: 80vw; aspect-ratio: 1 / 1; border-radius: 50%; margin: 0 auto; }

/* ---------- Notifications dropdown ---------- */
.dropdown {
  position: absolute; right: 16px; top: calc(var(--topbar-h) - 4px);
  width: 360px; max-width: calc(100vw - 24px);
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 60; overflow: hidden;
}
.dropdown .dhead { display: flex; align-items: center; padding: 12px 14px; }
.dropdown .dhead h3 { margin: 0; flex: 1; }
.notif {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 14px; cursor: pointer;
}
.notif:hover { background: var(--hover); }
.notif.unread { background: var(--brand-soft); }
.notif .nt { flex: 1; min-width: 0; }
.notif .nt .tm { font-size: 12px; color: var(--text-soft); }
.empty { text-align: center; color: var(--text-soft); padding: 28px 14px; }

/* ---------- Messages ---------- */
.messenger { display: grid; grid-template-columns: 300px 1fr; height: calc(100vh - var(--topbar-h) - 32px); }
/* min-height:0 lets these grid/flex children shrink to the row height so their inner
   lists actually scroll instead of overflowing the messenger box (the thread-scroll bug). */
.mlist { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.msearch { padding: 8px; border-bottom: 1px solid var(--line); flex: none; }
.msearch input { width: 100%; border: none; background: var(--hover); border-radius: 20px; padding: 9px 14px; outline: none; color: var(--text); font: inherit; }
.mlist-items { flex: 1; min-height: 0; overflow-y: auto; }
.mlist .convo { display: flex; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; }
.mlist .convo:hover, .mlist .convo.active { background: var(--hover); }
.mlist .convo .cm { flex: 1; min-width: 0; }
.mlist .convo .cm .nm { font-weight: 700; }
.mlist .convo .cm .lm { font-size: 13px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mthread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.mthread .thead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex: none; }
.mbody { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.bubble-msg { max-width: 70%; padding: 9px 13px; border-radius: 16px; background: var(--card); color: var(--text); box-shadow: var(--shadow); word-wrap: break-word; }
.bubble-msg.mine { align-self: flex-end; background: var(--brand); color: #fff; }
.bubble-msg .bt { font-size: 11px; opacity: 0.7; margin-top: 3px; }
/* Message edit / delete (Telegram-style) */
.bubble-msg { position: relative; }
.bubble-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-edited { font-style: italic; opacity: 0.85; margin-left: 4px; }
.msg-menu-btn { position: absolute; top: 2px; right: 6px; border: none; background: transparent; color: inherit; opacity: 0; cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 5px; border-radius: 6px; }
.bubble-msg:hover .msg-menu-btn, .msg-menu-btn:focus { opacity: 0.6; }
.msg-menu-btn:hover { opacity: 1; background: rgba(0, 0, 0, 0.14); }
.msg-menu { position: absolute; top: 22px; right: 6px; z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; display: flex; flex-direction: column; min-width: 124px; }
.msg-menu button { background: transparent; border: none; text-align: left; padding: 7px 10px; border-radius: 7px; cursor: pointer; color: var(--text); font-size: 13.5px; }
.msg-menu button:hover { background: var(--hover); }
.msg-menu button.danger { color: var(--like); }
.msg-editor { display: flex; flex-direction: column; gap: 6px; min-width: 230px; }
.msg-edit-input { width: 100%; resize: vertical; border-radius: 10px; border: 1px solid var(--line); padding: 7px 9px; font: inherit; background: var(--bg); color: var(--text); }
.msg-edit-actions { display: flex; gap: 6px; justify-content: flex-end; }
/* Onboarding checklist card in the official Nexora conversation */
.onboard-card { align-self: stretch; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
.onboard-h { font-weight: 800; font-size: 15px; margin: 2px 2px 10px; }
.onboard-steps { display: flex; flex-direction: column; gap: 7px; }
.onboard-step { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; cursor: pointer; color: var(--text); font: inherit; transition: background .12s, border-color .12s; }
.onboard-step:hover { background: var(--hover); border-color: var(--brand); }
.onboard-step .oi { font-size: 20px; width: 26px; text-align: center; flex: none; }
.onboard-step .ot { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.onboard-step .o1 { font-weight: 700; font-size: 14px; }
.onboard-step .o2 { font-size: 12.5px; color: var(--text-soft); line-height: 1.35; }
.onboard-step .oc { font-size: 20px; color: var(--text-soft); flex: none; }
/* Get started guide (modal): a tappable tour of each section */
.gs-list { display: flex; flex-direction: column; gap: 7px; }
.gs-row { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; cursor: pointer; color: var(--text); font: inherit; transition: background .12s, border-color .12s; }
.gs-row:hover { background: var(--hover); border-color: var(--brand); }
.gs-ic { font-size: 20px; width: 26px; text-align: center; flex: none; }
.gs-tx { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.gs-name { font-weight: 700; font-size: 14px; }
.gs-desc { font-size: 12.5px; color: var(--text-soft); line-height: 1.35; }
.gs-go { font-size: 20px; color: var(--text-soft); flex: none; }
.official-pill { background: var(--brand); color: #fff; }
.mfoot-note { padding: 13px 16px; font-size: 12.5px; color: var(--text-soft); line-height: 1.5; border-top: 1px solid var(--line); background: var(--card); }
.mfoot { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.mfoot input { flex: 1; border: none; background: var(--hover); border-radius: 20px; padding: 11px 16px; outline: none; }
.chat-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-soft); }

/* ---------- Modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal {
  background: var(--card); border-radius: var(--radius-lg);
  width: 100%; max-width: 500px; box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto; position: relative;
}
/* Always-present close button at the top-left, so a full-screen modal on mobile is
   easy to dismiss even when there is no backdrop to tap. */
.modal-x {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: var(--hover); color: var(--text); font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.modal-x:hover { background: var(--line); }
.modal .mh { display: flex; align-items: center; padding: 14px 44px; border-bottom: 1px solid var(--line); }
.modal .mh h3 { margin: 0; flex: 1; text-align: center; font-size: 18px; }
.modal .mc { padding: 18px; }

/* story viewer */
.story-view-back { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 110; display: flex; align-items: center; justify-content: center; }
.story-view { width: min(420px, 92vw); height: min(86vh, 760px); border-radius: 14px; overflow: hidden; position: relative; background: #000; }
.story-view img { width: 100%; height: 100%; object-fit: contain; }
.story-view .sv-head { position: absolute; top: 0; left: 0; right: 0; padding: 14px; display: flex; gap: 10px; align-items: center; background: linear-gradient(rgba(0,0,0,0.6), transparent); color: #fff; }
.story-view .sv-cap { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,0.7)); }
.story-view .sv-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(0,0,0,0.5); color: #fff; border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #1c1e21; color: #fff; padding: 11px 18px; border-radius: 10px;
  box-shadow: var(--shadow-lg); z-index: 200; font-size: 14px;
}

/* ---------- Shared bits ---------- */
.mk-head { display: flex; align-items: center; gap: 10px; }
.pill { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 8px; vertical-align: middle; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 2px; }
.chip { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--text-soft); border-radius: 16px; padding: 6px 14px; font-size: 13px; font-weight: 600; }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Marketplace ---------- */
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.mk-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: transform 0.08s ease; }
.mk-card:hover { transform: translateY(-2px); }
.mk-photo { position: relative; aspect-ratio: 1 / 1; background: var(--hover); }
.mk-photo img { width: 100%; height: 100%; object-fit: cover; }
.mk-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 34px; opacity: 0.5; }
.mk-sold { position: absolute; top: 8px; left: 8px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px; }
.mk-info { padding: 8px 10px 12px; }
.mk-price { font-weight: 800; }
.mk-title { font-size: 14px; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-loc { font-size: 12px; color: var(--text-soft); }

/* ---------- Groups ---------- */
.grp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.grp-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.grp-cover { height: 90px; background: var(--brand-grad); background-size: cover; background-position: center; cursor: pointer; }
.grp-body { padding: 10px; }
.grp-name { font-weight: 700; cursor: pointer; }
.grp-name:hover { text-decoration: underline; }
.grp-act { margin-top: 8px; }
.grp-hero { height: 200px; background: var(--brand-grad); background-size: cover; background-position: center; border-radius: 0 0 var(--radius) var(--radius); }
.grp-hd { display: flex; align-items: flex-end; gap: 12px; padding: 14px 18px; }
.grp-hd-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Albums ---------- */
.alb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.alb-card { cursor: pointer; }
.alb-cover { aspect-ratio: 4 / 3; border-radius: 10px; background: var(--brand-soft) center/cover no-repeat; box-shadow: var(--shadow); }
.alb-info { padding: 6px 2px; }
.alb-title { font-weight: 700; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ph-item { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.ph-item img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.ph-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,0.7)); }

/* ---------- Communities + voting ---------- */
.link { color: var(--brand); cursor: pointer; }
.link:hover { text-decoration: underline; }

.votebox { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 34px; flex: none; }
.votebox .vrow { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.votebox.inline { min-width: 0; padding: 0 4px; }
.votebox.inline .vrow { flex-direction: row; gap: 4px; }
/* Small caption UNDER the arrows so the control reads clearly as a vote, without
   taking horizontal space on the action line. */
.vlabel { font-size: 9.5px; line-height: 1; color: var(--text-soft); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.vote { background: none; border: none; color: var(--text-soft); font-size: 14px; line-height: 1; padding: 2px 4px; border-radius: 6px; }
.vote:hover { background: var(--hover); }
.vote.up.on { color: var(--brand); }
.vote.down.on { color: var(--like); }
.vscore { font-weight: 700; font-size: 13px; }
.vscore.pos { color: var(--brand); }
.vscore.neg { color: var(--like); }

.cpost { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.cpost-full { cursor: default; }
.cpost-body { flex: 1; min-width: 0; }
.cpost-title { font-weight: 700; font-size: 16px; cursor: pointer; }
.cpost-link { font-size: 13px; word-break: break-all; }
.cpost-snippet { color: var(--text-soft); font-size: 14px; margin-top: 4px; white-space: pre-wrap; }
.cpost-thumb { margin-top: 8px; }
.cpost-thumb img { max-height: 340px; width: 100%; object-fit: cover; border-radius: 10px; }
.cpost-meta { color: var(--text-soft); font-size: 12px; margin-top: 8px; }

.comm-hero { height: 90px; background: var(--brand-grad); border-radius: 0 0 var(--radius) var(--radius); }
.comm-hd { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.comm-hd .avatar, .comm-hd .avatar-fallback { margin-top: -44px; border: 4px solid var(--card); }
.comm-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.comm-row { display: flex; gap: 10px; align-items: center; cursor: pointer; }

.tabs { display: flex; gap: 4px; }
.tab { background: none; border: none; padding: 6px 14px; border-radius: 18px; font-weight: 600; color: var(--text-soft); }
.tab.active { background: var(--brand-soft); color: var(--brand-dark); }

.ctree { margin-top: 10px; }
.crow { display: flex; gap: 8px; align-items: flex-start; }
.cmain { flex: 1; min-width: 0; }
.cbubble { background: var(--hover); border-radius: 12px; padding: 8px 12px; }
.cname { font-weight: 700; font-size: 13px; }
.ctime { font-size: 11px; color: var(--text-soft); margin-left: 6px; }
.cactions { display: flex; gap: 10px; padding: 4px 0 0 12px; }
.clink { background: none; border: none; color: var(--text-soft); font-weight: 600; font-size: 12px; cursor: pointer; }
.clink:hover { color: var(--text); }
.cchildren { margin-left: 22px; border-left: 2px solid var(--line); padding-left: 10px; }

/* ---------- Reactions + edit history ---------- */
.post-actions { position: relative; }
.rx-ctl { position: relative; display: inline-flex; }
.post-actions > [data-react] { flex: 1; display: flex; }
.post-actions > [data-react] > .rx-ctl { flex: 1; }
.post-actions .post-action.react { flex: 1; }
.rx-mine { color: var(--brand); font-weight: 700; }
.rx-picker {
  position: absolute; bottom: 115%; left: 0; z-index: 40;
  background: var(--card); border-radius: 24px; box-shadow: var(--shadow-lg);
  display: flex; gap: 2px; padding: 5px 8px;
}
.rx-opt { background: none; border: none; font-size: 24px; line-height: 1; padding: 5px; border-radius: 50%; transition: transform 0.1s ease; }
.rx-opt:hover { transform: scale(1.3); }
.rx-opt.on { background: var(--brand-soft); }
.rx-sum { color: var(--text-soft); font-size: 13px; }
.rx-icon { display: inline-flex; width: 19px; height: 19px; align-items: center; justify-content: center; vertical-align: -4px; font-family: Georgia, serif; font-size: 21px; line-height: 1; font-weight: 700; }
.rx-like::before { content: '♡'; color: #1877f2; }
.rx-love::before { content: '♥'; color: #e54870; }
.rx-care::before { content: '✦'; color: #f0a000; }
.rx-haha::before { content: '◡'; color: #e2a400; }
.rx-wow::before { content: '○'; color: #d18c00; }
.rx-sad::before { content: '◒'; color: #4d8fd8; }
.rx-angry::before { content: '◆'; color: #e05252; font-size: 14px; }
.rxbtn-sm { background: none; border: none; color: var(--text-soft); font-weight: 600; font-size: 12px; cursor: pointer; padding: 0; }
.cmeta { display: flex; align-items: center; gap: 8px; margin-left: 12px; margin-top: 3px; font-size: 12px; color: var(--text-soft); flex-wrap: wrap; }
.edited-link { color: var(--text-soft); cursor: pointer; }
.edited-link:hover { text-decoration: underline; }
.hist-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; white-space: pre-wrap; word-wrap: break-word; }
.hist-current { border-color: var(--brand); background: var(--brand-soft); }
.hist-when { font-size: 12px; color: var(--text-soft); margin-bottom: 4px; font-weight: 600; }
.hist-title { font-weight: 700; margin-bottom: 2px; }

/* ---------- Page descriptions (explain Groups vs Communities, etc.) ---------- */
.page-desc { color: var(--text-soft); font-size: 13.5px; line-height: 1.55; padding: 6px 6px 2px; }
.page-desc a { color: var(--brand); cursor: pointer; text-decoration: none; }
.page-desc a:hover { text-decoration: underline; }

/* ---------- Profile bio + clickable bio links (Plus tier / trusted accounts) ---------- */
.profile-bio { white-space: pre-wrap; word-break: break-word; }
/* Keep a link (e.g. a domain) intact: it wraps to the next line as a whole unit
   instead of being split mid-word. word-break:normal overrides the parent
   .profile-bio break-word, which was slicing the domain across two lines. */
.bio-link { color: var(--brand); text-decoration: underline; word-break: normal; overflow-wrap: normal; white-space: nowrap; }

/* ---------- Shared site footer (landing page + "Our Mission") ---------- */
.site-footer { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 26px 16px 34px; color: var(--text-soft); font-size: 13px; }
.site-footer a { color: var(--brand); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer-tag { color: var(--text-soft); }

/* Facebook-style text links at the bottom of the left rail */
.rail-foot { padding: 12px 10px 4px; line-height: 1.7; }
.rail-foot a { color: var(--text-soft); font-size: 12px; text-decoration: none; }
.rail-foot a:hover { color: var(--brand); text-decoration: underline; }
.rail-foot a:not(:last-of-type)::after { content: "\00B7"; display: inline-block; margin: 0 6px; color: var(--text-soft); text-decoration: none; }
.rail-foot-copy { margin-top: 7px; font-size: 11px; color: var(--text-soft); opacity: .75; }

/* ---------- Repost header (Share / repost) ---------- */
.repost-hdr { font-size: 12.5px; color: var(--text-soft); font-weight: 600; margin: -2px 0 8px; }
.repost-hdr .avatar-link { cursor: pointer; }
.repost-hdr b { color: var(--text, inherit); }
.repost-comment { white-space: pre-wrap; word-break: break-word; margin: 0 0 10px; }

/* Saved action active state */
.post-action.on { color: var(--brand); font-weight: 600; }

/* ---------- Content warning cover (sensitive content blur) ---------- */
.cw-cover { border: 1px dashed var(--line); border-radius: 12px; padding: 26px 16px; margin: 4px 0 10px; text-align: center; background: var(--brand-soft); cursor: pointer; }
.cw-cover .cw-ic { font-size: 26px; }
.cw-cover .cw-label { font-weight: 700; margin-top: 6px; }
.cw-cover .cw-sub { font-size: 12px; color: var(--text-soft); margin: 4px 0 12px; }

/* Composer content-warning row + active toggle */
.ccw { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.ccw-ic { font-size: 16px; }
.ccw-input { flex: 1; }
.icon-action.on, .composer-spread.on, .composer-add-btn.on { color: var(--brand); }

/* ---------- Link preview card (text only) ---------- */
.link-preview { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 4px 0 10px; text-decoration: none; color: inherit; transition: background .15s; }
.link-preview:hover { background: var(--brand-soft); }
.link-preview .lp-site { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); }
.link-preview .lp-title { font-weight: 700; margin: 2px 0; }
.link-preview .lp-desc { font-size: 13px; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Search: community results ---------- */
.search-comm-list { display: flex; flex-direction: column; gap: 6px; }
.search-comm { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.search-comm:hover { background: var(--brand-soft); }
.search-comm .sc-name { font-weight: 700; }
.search-comm .sc-desc { font-size: 12.5px; color: var(--text-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  /* Hide the suggestions (right) rail, but keep the destination menu reachable
     by turning the left rail into a horizontal scroller above the content. */
  #rightRail { display: none; }
  #leftRail { position: static; }
  #leftRail .card { display: flex; flex-direction: row; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 8px; }
  #leftRail .side-link { flex: 0 0 auto; white-space: nowrap; }
  /* Primary tabs move to the bottom bar on mobile, so hide them in the top bar
     and let the search flex to fill the space next to the utility cluster. */
  .nav-primary { display: none; }
  .topbar .search { width: auto; flex: 1; min-width: 0; }
  .topbar { gap: 8px; padding: 0 10px; }
  /* Bottom navigation bar: the four primary destinations, always tappable. */
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    height: 58px;
    background: var(--card);
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.08);
  }
  .bottom-nav .nav-tab { flex: 1; min-width: 0; padding: 0; height: 100%; border-bottom: none; border-top: 3px solid transparent; }
  .bottom-nav .nav-tab .tl { display: block; font-size: 10px; }
  .bottom-nav .nav-tab.active { color: var(--brand); border-top-color: var(--brand); border-bottom-color: transparent; }
  /* Leave room above the fixed bottom bar so content is never hidden behind it. */
  .layout { padding-bottom: 76px; }
  .landing-grid { grid-template-columns: 1fr; gap: 24px; }
  .landing-pitch { text-align: center; }
  .landing-pitch h1 { font-size: 40px; }
  .landing-pitch > p { margin-left: auto; margin-right: auto; }
  .landing-logo { justify-content: center; }
  /* Center the manifesto block and left-align the eyebrow + each row inside it
     for legibility (the column itself is centered on mobile). */
  .promises { margin-left: auto; margin-right: auto; }
  .promise-list { grid-template-columns: 1fr; text-align: left; }
  .promises-eyebrow, .promise { text-align: left; }
  .messenger { grid-template-columns: 1fr; }
  .messenger.show-thread .mlist { display: none; }
  .messenger:not(.show-thread) .mthread { display: none; }

  /* Stack the profile header so the avatar never overlaps the name. */
  .profile-cover { height: 180px; }
  .profile-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    margin-top: -64px;
  }
  /* On mobile the whole (column) header lifts over the cover, so the avatar must
     not also lift on its own, or it would ride too far up. */
  .profile-head .av-wrap { margin-top: 0; }
  .profile-head .phead-row { flex-direction: column; align-items: center; width: 100%; }
  /* On mobile the name is centered above; the 2-up action grid sits centered below it
     at a comfortable width (the desktop 46% cap does not apply here). */
  .profile-head .pactions { width: 100%; max-width: 320px; justify-self: center; }
}
@media (max-width: 520px) {
  .topbar .search { max-width: none; }
  .topbar .logo .name { display: none; }
  .landing { padding: 38px 16px 28px; }
  .landing-logo::after { display: none; }
  .landing-pitch h1 { font-size: 43px; }
  .landing-pitch > p { font-size: 17px; }
  .promises { margin-top: 30px; }
  .auth-card { padding: 24px 20px; }
}

/* Logged-out / public read-only view (a shared /p or /u link seen without an account). */
.public-shell { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding: 8px 0 40px; }
.public-mode .layout { justify-content: center; }
.public-mode .rail { display: none; }
.pub-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(120deg, var(--brand, #4f46e5), #8b5cf6); color: #fff;
  padding: 12px 16px; border-radius: 12px; font-size: 14px; flex-wrap: wrap; }
.pub-cta .btn { flex: none; }
.pub-cta a.btn-primary { background: #fff; color: var(--brand, #4f46e5); }
.pp-title { font-size: 22px; font-weight: 800; margin: 0 0 8px; line-height: 1.25; }
.pp-stats { color: var(--text-soft); font-weight: 600; margin-top: 10px; }
.pp-comment { padding: 8px 0; border-top: 1px solid var(--line, #e4e6eb); font-size: 15px; }
.pp-comments .section-title { margin-bottom: 4px; }
.pub-foot { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.pp-crumb a, .pp-post .name a { color: var(--brand, #4f46e5); text-decoration: none; }
.pp-linkcard { display: block; text-decoration: none; color: inherit; }
.pp-linkcard:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.explore-list { list-style: none; margin: 8px 0 0; padding: 0; }
.explore-list li { padding: 7px 0; border-top: 1px solid var(--line, #e4e6eb); }
.explore-list li:first-child { border-top: none; }
.explore-list a { color: var(--brand, #4f46e5); text-decoration: none; font-weight: 600; }
.explore-list .muted { color: var(--text-soft); font-weight: 400; }
.upd-item .post-body { color: var(--text-soft); }

/* New-member "fill your feed" starter card. */
.starter-card .starter-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.starter-card .pmeta { margin-top: 4px; }

/* Founding-member scarcity nudge on the signup card. */
.founding-spots { background: rgba(79, 70, 229, 0.08); border: 1px solid rgba(79, 70, 229, 0.25);
  color: var(--text, #1c1e21); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px;
  font-size: 13.5px; line-height: 1.4; }
.founding-spots b { color: var(--brand, #4f46e5); }

/* The little "how to turn on notifications" guide inside Settings, Notifications. A
   soft brand-tinted callout that adapts to light / dark via the theme variables. */
.push-guide { background: var(--brand-soft, #eef0ff); border: 1px solid var(--line, #e4e6eb);
  border-radius: 10px; padding: 10px 12px; }
.push-guide-title { font-size: 12px; font-weight: 700; color: var(--brand, #4f46e5);
  text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }
.push-guide-steps { margin: 0 0 8px; padding-left: 18px; }
.push-guide-steps li { font-size: 12.5px; line-height: 1.5; color: var(--text-soft, #65676b);
  margin-bottom: 5px; }
.push-guide-steps li strong { color: var(--text, #1c1e21); font-weight: 600; }
.push-guide-note { font-size: 11.5px; line-height: 1.45; color: var(--text-soft, #65676b);
  border-top: 1px solid var(--line, #e4e6eb); padding-top: 7px; }

/* ---------- Nexora visual refresh ----------
   A calmer Facebook/VK-inspired chrome: stronger hierarchy, softer surfaces,
   generous feed spacing and touch-friendly controls. Kept as an additive layer
   so existing templates and interaction states remain compatible. */
:root {
  --bg: #eef1f6;
  --card: #ffffff;
  --line: #e1e6ef;
  --hover: #f3f6fa;
  --text-soft: #687386;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 2px 5px rgba(24, 39, 75, .06), 0 10px 28px rgba(24, 39, 75, .045);
  --shadow-lg: 0 18px 50px rgba(24, 39, 75, .18);
  --topbar-h: 64px;
}

html[data-theme="dark"] {
  --bg: #10141d;
  --card: #1a202b;
  --line: #2b3444;
  --hover: #222a37;
  --text-soft: #a8b1c1;
  --shadow: 0 2px 6px rgba(0, 0, 0, .24), 0 12px 30px rgba(0, 0, 0, .18);
}

body { background: var(--bg); }
.topbar {
  height: 64px;
  padding: 0 max(16px, calc((100vw - 1280px) / 2));
  background: var(--card);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
  backdrop-filter: none;
}
.topbar .logo .name { font-size: 24px; letter-spacing: -.7px; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); box-shadow: none; }
.topbar .search { width: 260px; }
.topbar .search input { height: 40px; padding-left: 42px; background: var(--hover); border-color: transparent; border-radius: 20px; }
.topbar .search::before { content: '⌕'; position: absolute; z-index: 1; left: 15px; top: 7px; color: var(--text-soft); font-size: 23px; line-height: 1; }
.nav-primary { gap: 2px; }
.nav-tab { min-width: 104px; border-radius: 0; font-size: 12px; }
.nav-tab .ti { font-size: 20px; }
.nav-tab:hover { background: var(--hover); }
.nav-btn { width: 40px; height: 40px; background: var(--hover); }
.account-trigger { border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }

.layout {
  max-width: 1280px;
  grid-template-columns: 240px minmax(520px, 680px) 280px;
  justify-content: center;
  gap: 16px;
  padding: 20px 16px 48px;
}
.rail { top: calc(var(--topbar-h) + 22px); }
.center { width: 100%; }
.card {
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.card:hover { box-shadow: var(--shadow); }
.section-title { font-size: 17px; letter-spacing: 0; }
.side-link { padding: 9px 10px; border-radius: 8px; font-size: 15px; }
.side-link .ic { width: 24px; font-size: 20px; }
.side-link.active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 15%, transparent); }

.stories { gap: 12px; padding: 2px 2px 8px; }
.story { width: 116px; height: 184px; border-radius: 10px; box-shadow: var(--shadow); }
.story .ring { width: 42px; height: 42px; border-width: 3px; box-shadow: 0 0 0 3px rgba(255,255,255,.74); }
.story.add .plus { background: linear-gradient(145deg, var(--brand-soft), var(--hover)); }
.composer .row { gap: 12px; }
.composer textarea { min-height: 46px; border-radius: 22px; background: var(--hover); padding: 12px 18px; }
.composer .actions { margin-top: 14px; padding-top: 13px; }
.icon-action { min-height: 38px; border-radius: 10px; }
.post-head { gap: 12px; }
.post-body { font-size: 16px; line-height: 1.55; margin: 14px 0; }
.post-image { margin: 0 -18px; }
.post-image img { max-height: 620px; }
.post-stats { padding: 11px 0; }
.post-actions { margin: 0 -4px; padding-top: 6px; }
.post-action { min-height: 42px; border-radius: 10px; }
.comment .bubble { border-radius: 18px; padding: 9px 13px; }

/* Messenger surfaces: a clear two-pane layout with distinct active state. */
.messenger { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.messenger .mlist, .messenger .mthread { background: var(--card); }
.messenger .contact { padding: 12px 14px; border-radius: 12px; margin: 3px 6px; }
.messenger .contact:hover, .messenger .contact.active { background: var(--brand-soft); }
.messenger .mthread-head { padding: 15px 18px; border-bottom: 1px solid var(--line); }
.messenger .mthread-body { background: var(--bg); padding: 18px; }
.messenger .bubble { border-radius: 18px; padding: 10px 13px; box-shadow: 0 1px 2px rgba(24,39,75,.06); }

@media (max-width: 1120px) {
  .layout { grid-template-columns: 220px minmax(0, 680px); }
  .layout > .rail:last-child { display: none; }
  .nav-tab { min-width: 86px; padding-inline: 10px; }
}
@media (max-width: 760px) {
  .topbar { height: 58px; padding: 0 12px; gap: 8px; }
  .topbar .logo .name { display: none; }
  .topbar .search { flex: 1; width: auto; }
  .topbar .search input { height: 40px; }
  .nav-primary { display: none; }
  .topbar-right { gap: 5px; }
  .nav-btn { width: 40px; height: 40px; }
  .layout { display: block; padding: 16px 10px 78px; }
  .layout > .rail:first-child, .layout > .rail:last-child { display: none; }
  .card { border-radius: 16px; padding: 14px; margin-bottom: 12px; }
  .post-image { margin-inline: -14px; }
  .story { width: 104px; height: 164px; }
}

/* ---------- Product-wide Facebook-inspired polish ---------- */
body { font-family: Helvetica, Arial, sans-serif; letter-spacing: 0; }
.btn { border-radius: 9px; font-weight: 700; min-height: 40px; }
.btn-sm { min-height: 32px; }
.btn-soft { color: var(--brand); background: var(--brand-soft); }
.btn-ghost:hover, .btn:hover { filter: none; }
.input, textarea.input, select.input { border-radius: 10px; border-color: #ccd0d5; background: var(--card); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(24,119,242,.18); }
.card, .auth-card, .dropdown, .modal, .account-menu { border-color: var(--line); box-shadow: var(--shadow); }
.card { padding: 16px; }
.card { transition: box-shadow .15s ease, border-color .15s ease; }
.card:hover { border-color: var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.topbar { height: 60px; }
.topbar .logo .name { color: var(--brand); }
.topbar .logo:hover .brand-mark { transform: none; }
.topbar .search input { color: var(--text); }
.nav-tab { color: #65676b; }
.nav-tab.active { color: var(--brand); }
.nav-btn { border-radius: 50%; }
.nav-btn:hover { background: #e4e6eb; }
.layout { padding-top: 22px; gap: 20px; }
.rail { top: calc(var(--topbar-h) + 12px); }
.side-link { font-weight: 700; }
.side-link.active { background: var(--brand-soft); box-shadow: none; }
.side-link:hover { transform: none; background: #e4e6eb; }
.story { box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.composer { padding-bottom: 8px; }
.composer textarea { border: 0; background: var(--hover); }
.composer textarea:focus { box-shadow: inset 0 0 0 2px rgba(24,119,242,.32); }
.icon-action, .post-action { border-radius: 6px; }
.icon-action:hover, .post-action:hover { background: #f0f2f5; }
.post-head { gap: 10px; }
.post-body { margin: 12px 0; font-size: 15px; line-height: 1.45; }
.post-stats { border-top: 1px solid var(--line); }
.post-actions { border-top: 1px solid var(--line); }
.comment .bubble, .cbubble { background: #f0f2f5; border-radius: 18px; }
.comment-form textarea { border-radius: 18px; background: #f0f2f5; border: 0; }
.profile-cover, .comm-hero { border-radius: 0; }
.profile-head, .comm-hd { border-bottom: 1px solid var(--line); }
.tabs { border-bottom: 1px solid var(--line); }
.tab { border-radius: 0; padding: 10px 14px; }
.tab.active { background: transparent; color: var(--brand); box-shadow: inset 0 -3px 0 var(--brand); }
.messenger { border-radius: 8px; box-shadow: var(--shadow); }
.messenger .contact { border-radius: 6px; }
.messenger .contact:hover, .messenger .contact.active { background: var(--brand-soft); }
.messenger .bubble { border-radius: 18px; box-shadow: none; }
.modal-back { background: rgba(0,0,0,.45); }
.modal { border-radius: 14px; }
.modal-x { border-radius: 50%; }
.dropdown { border-radius: 12px; }
.toast { border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.site-footer { border-top: 1px solid var(--line); background: var(--card); }
.page-desc { background: var(--card); border-radius: 8px; }
.link-preview, .search-comm, .hist-item, .push-guide { border-radius: 10px; }
.translate-btn { width: auto; min-width: 40px; padding: 0 12px; gap: 7px; border-radius: 20px; }
.translate-btn .ti { width: 18px; height: 18px; }
.translator-modal { width: min(720px, calc(100vw - 28px)); }
.translator-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 4px 0 16px; }
.translator-title { margin: 0; font-size: 22px; letter-spacing: -.2px; }
.translator-sub { color: var(--text-soft); font-size: 13px; margin: 4px 0 0; }
.translator-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.translator-pane { min-width: 0; }
.translator-pane label { display: block; font-size: 12px; color: var(--text-soft); font-weight: 700; margin-bottom: 6px; }
.translator-pane select { width: 100%; height: 38px; margin-bottom: 8px; padding: 0 10px; }
.translator-pane textarea { width: 100%; min-height: 170px; resize: vertical; padding: 12px; line-height: 1.5; }
.translator-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.translator-status { margin-right: auto; color: var(--text-soft); font-size: 12px; }
.translator-output { background: var(--hover) !important; border-color: transparent !important; }
@media (max-width: 640px) {
  .translate-btn { width: 40px; min-width: 40px; padding: 0; }
  .translate-btn .tl { display: none; }
  .translator-grid { grid-template-columns: 1fr; }
  .translator-pane textarea { min-height: 120px; }
}

@media (max-width: 980px) {
  .layout { padding-top: 10px; }
  .topbar { height: 56px; }
  .bottom-nav { border-top: 1px solid var(--line); box-shadow: 0 -1px 3px rgba(0,0,0,.12); }
  .bottom-nav .nav-tab.active { box-shadow: inset 0 3px 0 var(--brand); }
}
