/* ==========================================================================
   Snikus — Design System
   ========================================================================== */

/* Self-hosted variable font (weights 400-800 in one file) — see header.php
   for why this replaced the Google Fonts CDN link. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
}

:root {
  --bg: #e9edf5;
  --bg-soft: #e3e8f1;
  --bg-card: #e9edf5;
  --border: #d7deec;
  --text: #10182b;
  --text-soft: #667085;
  --text-faint: #98a2b3;
  --accent: #2e7dff;
  --accent-dark: #1d5fd1;
  --accent-soft: #dde8ff;
  --success: #0f766e;
  --gold: #ffb800;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --neu-light: rgba(255, 255, 255, 0.6);
  --neu-dark: rgba(163, 177, 198, 0.5);
  --neu-light-strong: rgba(255, 255, 255, 0.7);
  --neu-dark-strong: rgba(163, 177, 198, 0.65);

  --shadow-sm: 3px 3px 7px var(--neu-dark), -3px -3px 7px var(--neu-light);
  --shadow: 6px 6px 14px var(--neu-dark), -6px -6px 14px var(--neu-light);
  --shadow-lg: 10px 10px 24px var(--neu-dark-strong), -10px -10px 24px var(--neu-light-strong);
  --shadow-pressed: inset 4px 4px 8px var(--neu-dark), inset -4px -4px 8px var(--neu-light);
  --shadow-pressed-sm: inset 2px 2px 5px var(--neu-dark), inset -2px -2px 5px var(--neu-light);
  --avatar-shadow: var(--avatar-shadow);
  --max-width: 1120px;
}

* { box-sizing: border-box; }

/* Slim, trackless scrollbars everywhere — inner panels (tabs, chip rows,
   dropdowns, sidebars) get a subtle thumb instead of the bulky OS default. */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(163, 177, 198, 0.6) transparent;
}
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(163, 177, 198, 0.6); border-radius: 10px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(163, 177, 198, 0.9); }
*::-webkit-scrollbar-corner { background: transparent; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(233, 237, 245, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(163, 177, 198, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  flex-shrink: 0;
}

.logo-icon { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }

.main-nav {
  display: flex;
  gap: 28px;
  flex: 1;
}

.main-nav a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-soft);
  transition: color 0.15s ease;
}

.main-nav a:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-search-wrap { display: none; position: relative; flex: 1 1 auto; min-width: 0; margin: 0 8px; }
.mobile-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 32px 9px 14px;
  color: var(--text-faint);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mobile-search-box-icon {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  opacity: 0.55;
  pointer-events: none;
}
.mobile-search-box input,
.mobile-search-box input:focus {
  border: none;
  outline: none;
  box-shadow: none;
  background: none;
  padding: 0;
  font-size: 13.5px;
  color: var(--text);
  width: 100%;
  min-width: 0;
}
.mobile-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 200;
}
@media (max-width: 768px) {
  /* The search box itself is squeezed narrow between the logo and header
     icons, but its results dropdown doesn't need to match that width —
     widen it out toward the screen edges so results are actually readable. */
  .mobile-search-dropdown { left: -40px; right: -40px; }
}
.mobile-search-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--text-faint);
  padding: 6px 8px 4px;
}
.mobile-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.mobile-search-row:hover { background: var(--bg); }
.mobile-search-row-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.mobile-search-row-sub { font-size: 12px; color: var(--text-faint); }
.mobile-search-empty { padding: 14px 8px; font-size: 13px; color: var(--text-faint); text-align: center; }

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(0,0,0,0.16);
  padding: 10px 6px calc(6px + env(safe-area-inset-bottom));
  align-items: flex-start;
  justify-content: space-around;
}
.mobile-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  padding: 4px 2px;
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1px;
  position: relative;
}
.mobile-bottom-nav-item svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.8px;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mobile-bottom-nav-item.active { color: var(--accent); font-weight: 800; }
.mobile-bottom-nav-item.active svg { stroke-width: 2.1px; transform: scale(1.08); }
.mobile-bottom-nav-item.active::before {
  content: "";
  position: absolute;
  top: -10px;
  width: 16px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
}
.mobile-bottom-nav-item:active svg { transform: scale(0.85); }

.mobile-bottom-nav-icon-wrap { position: relative; display: inline-flex; }
.mobile-bottom-nav-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e0245e;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

@media (max-width: 360px) {
  .mobile-bottom-nav-item { font-size: 9.5px; }
  .mobile-bottom-nav-item svg { width: 21px; height: 21px; }
}

.menu-toggle {
  display: none;
  background: var(--bg);
  border: none;
  border-radius: 50%;
  color: var(--text);
  padding: 8px;
  box-shadow: var(--shadow-sm);
}

.menu-toggle:active { box-shadow: var(--shadow-pressed-sm); }

/* ==========================================================================
   Mobile sidebar menu
   ========================================================================== */

.mobile-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.5);
  backdrop-filter: blur(2px);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-sidebar-backdrop.open { display: block; opacity: 1; }

.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 84vw;
  background: var(--bg);
  z-index: 201;
  display: flex;
  flex-direction: column;
  padding: 20px;
  transform: translateX(-105%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}

.mobile-sidebar.open { transform: translateX(0); }

.mobile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.mobile-sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 18px;
}

.mobile-sidebar-profile .name { font-size: 14.5px; font-weight: 700; }
.mobile-sidebar-profile .username { font-size: 12.5px; color: var(--text-faint); margin-top: 1px; }

.mobile-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.mobile-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-soft);
  position: relative;
}

.mobile-sidebar-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-soft);
  margin-top: 4px;
}
.mobile-sidebar-theme-row span:first-child { display: flex; align-items: center; gap: 12px; }

.settings-about-links { display: flex; flex-direction: column; gap: 10px; }
.settings-about-links a { font-size: 13.5px; font-weight: 600; color: var(--text-soft); }
.settings-about-links a:hover { color: var(--accent-dark); }

/* Settings index (Reddit-style): a plain list of rows, each its own page. */
.settings-index-group { margin-bottom: 28px; }
.settings-index-heading {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-faint);
  padding: 0 4px 10px;
}
.settings-build-info {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  padding: 10px 4px 4px;
}
.settings-build-info-link:hover { color: var(--accent); }

.build-info-grid { display: flex; gap: 28px; flex-wrap: wrap; }
.build-info-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-faint); margin-bottom: 4px; }
.build-info-value { font-size: 16px; font-weight: 700; }

.build-changelog-list { margin: 0; padding-left: 18px; }
.build-changelog-list li { font-size: 13.5px; color: var(--text-soft); margin-bottom: 8px; line-height: 1.5; }
.settings-index-list {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.settings-index-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.settings-index-row:last-child { border-bottom: none; }
.settings-index-row:hover { background: var(--bg); }
.settings-index-row-icon { flex-shrink: 0; color: var(--text-faint); display: flex; }
.settings-index-row-text { flex: 1; min-width: 0; }
.settings-index-row-title { display: block; font-size: 14.5px; font-weight: 700; }
.settings-index-row-sub { display: block; font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }
.settings-index-row-value { font-size: 13px; color: var(--text-faint); font-weight: 600; }
.settings-index-row-caret { flex-shrink: 0; color: var(--text-faint); }
.settings-index-row.danger { color: #d9364a; }
.settings-index-row.danger .settings-index-row-icon { color: #d9364a; }

/* Sub-page header: back arrow + page title, like Reddit's drilled-in pages. */
.settings-subpage-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.settings-subpage-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text);
  flex-shrink: 0;
}
.settings-subpage-back:hover { background: var(--bg-card); }
.settings-subpage-header h1 { font-size: 22px; margin: 0; }

.switch-profile-row { display: flex; align-items: center; gap: 16px; }
.switch-profile-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-sidebar-nav a:hover, .mobile-sidebar-nav a.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.mobile-sidebar-badge {
  margin-left: auto;
  background: #e63946;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

.mobile-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

.mobile-sidebar-widgets {
  padding-top: 16px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mobile-sidebar-widgets:empty { display: none; border-top: none; margin-top: 0; padding-top: 0; }

@media (min-width: 769px) {
  .mobile-sidebar, .mobile-sidebar-backdrop { display: none !important; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14.5px;
  border-radius: 999px;
  border: none;
  padding: 11px 20px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(145deg, #3f8bff, #2670eb);
  color: #fff;
  box-shadow: 5px 5px 12px rgba(46, 125, 255, 0.35), -3px -3px 10px rgba(127, 178, 255, 0.35);
}

.btn-primary:hover { background: linear-gradient(145deg, #4993ff, #1d5fd1); }
.btn-primary:active { box-shadow: inset 3px 3px 8px rgba(20, 70, 160, 0.4), inset -2px -2px 6px rgba(127, 178, 255, 0.3); }

.btn-ghost {
  background: var(--bg);
  color: var(--text);
  border: none;
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover { box-shadow: var(--shadow); }
.btn-ghost:active { box-shadow: var(--shadow-pressed-sm); }

.btn-danger {
  background: linear-gradient(145deg, #ef4444, #c22a20);
  color: #fff;
  box-shadow: 5px 5px 12px rgba(194, 42, 32, 0.3), -3px -3px 10px rgba(255, 130, 120, 0.25);
}
.btn-danger:hover { background: linear-gradient(145deg, #f65a5a, #b3241b); }
.btn-danger:active { box-shadow: inset 3px 3px 8px rgba(140, 20, 15, 0.4), inset -2px -2px 6px rgba(255, 150, 140, 0.3); }

.danger-zone { border: 1px solid rgba(217, 52, 43, 0.3); }
.danger-zone .settings-section-title { color: #d9342b; margin-bottom: 4px; }

.danger-zone-header { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.danger-zone-mascot { width: 72px; flex-shrink: 0; }
.danger-zone-header .hint { margin: 0; }

.delete-reason-other {
  width: 100%;
  min-height: 60px;
  margin: 10px 0 18px;
  padding: 9px 12px;
  font-size: 13px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pressed-sm);
  color: var(--text);
}

/* Delete-account modal — two steps: emotional appeal, then feedback+confirm */
.delete-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.6);
  z-index: 210;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.delete-modal-overlay.open { display: flex; }

/* This modal is also used for deleting a single chat message, which must
   render above the mobile full-screen thread (z-index 500) — a plain
   .delete-modal-overlay would otherwise sit behind it, invisible. */
#chatDeleteMessageModal { z-index: 900; }

.delete-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px 32px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
}

.delete-modal-mascot { width: 130px; display: block; margin: 0 auto 16px; }
.delete-modal-step h3 { text-align: center; font-size: 19px; margin-bottom: 10px; }
.delete-modal-step > p.hint { text-align: center; font-size: 13.5px; line-height: 1.6; }

.delete-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.delete-modal-actions-center { justify-content: center; margin-top: 22px; }

.btn-block { width: 100%; }

.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* ==========================================================================
   Avatar
   ========================================================================== */

.avatar {
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
  box-shadow: var(--avatar-shadow);
}

.avatar-img { object-fit: cover; flex-shrink: 0; }
.card-logo-img { object-fit: cover; flex-shrink: 0; box-shadow: var(--avatar-shadow); }

.avatar-btn {
  background: none;
  border: none;
  padding: 0;
  border-radius: 50%;
  line-height: 0;
}

/* ==========================================================================
   User dropdown
   ========================================================================== */

.user-menu { position: relative; }

.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--bg);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 200px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.dropdown.open { display: flex; }

.notification-bell-btn { position: relative; }

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #e63946;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  box-shadow: 0 0 0 2px var(--bg);
}

.notification-dropdown { width: 340px; padding: 0; overflow: hidden; }

/* Report modal */
.report-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.report-modal-overlay.open { display: flex; }

.report-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px 28px;
  width: 100%;
  max-width: 380px;
}
.report-modal h3 { margin-bottom: 6px; }
.report-modal .hint { margin-bottom: 16px; }

.report-reason-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.report-reason-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.report-reason-row:hover { background: var(--bg); }
.report-reason-row input { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }

.report-other-text { width: 100%; min-height: 60px; margin-bottom: 14px; }

.report-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Share-to-messages modal */
.share-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.share-modal-overlay.open { display: flex; }

.share-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px 24px 20px;
  width: 100%;
  max-width: 380px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.share-modal h3 { margin-bottom: 14px; }
.share-modal-search { width: 100%; margin-bottom: 12px; flex-shrink: 0; }

.share-conversation-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: -4px; padding: 4px; }
.share-conversation-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: var(--radius-sm);
}
.share-conversation-row:hover { background: var(--bg); }
.share-conversation-name { font-size: 13.5px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-send-btn { flex-shrink: 0; padding: 6px 14px; }
.share-send-btn.sent { pointer-events: none; opacity: 0.7; }
.share-modal-empty { text-align: center; color: var(--text-soft); font-size: 13.5px; padding: 20px 0; }
.share-modal-close-row { display: flex; justify-content: flex-end; margin-top: 14px; flex-shrink: 0; }

.notification-dropdown-header {
  font-size: 14px;
  font-weight: 800;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}

.notification-list { max-height: 400px; overflow-y: auto; display: flex; flex-direction: column; padding: 6px; }

.notification-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.notification-row:hover { background: var(--bg-soft); }
.notification-row.unread { background: var(--accent-soft); }
.notification-row.unread:hover { background: var(--accent-soft); }

.notification-row-body { flex: 1; min-width: 0; }

.notification-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-msg { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; }
.notification-time { font-size: 11.5px; color: var(--text-faint); margin-top: 3px; }

.notification-row .notification-unread-dot { position: absolute; top: 16px; right: 12px; }

.notification-empty { padding: 32px 16px; text-align: center; font-size: 13px; color: var(--text-faint); }

.notification-see-all {
  display: block;
  text-align: center;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  border-top: 1px solid var(--border);
}

.dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.dropdown a:hover { background: var(--bg-soft); }

.dropdown-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.dropdown-toggle-row:hover { background: var(--bg-soft); }
.dropdown-toggle-row span:first-child { display: flex; align-items: center; gap: 10px; }

.signup-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.5;
  margin-bottom: 16px;
  cursor: pointer;
}
.signup-consent-row input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }
.signup-consent-row a { color: var(--accent-dark); font-weight: 700; }

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.settings-toggle-row span:first-child { display: flex; align-items: center; gap: 10px; }

/* Theme toggle switch */
.theme-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.theme-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.theme-switch-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-pressed-sm);
  transition: background 0.2s ease;
}
.theme-switch-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: var(--bg);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}
.theme-switch input:checked + .theme-switch-slider { background: var(--accent); }
.theme-switch input:checked + .theme-switch-slider::before { transform: translateX(18px); }

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.site-main { min-height: calc(100vh - 68px - 140px); padding: 40px 0 80px; }

.hide-mobile { display: inline-flex; }

/* ==========================================================================
   Hero / Page header
   ========================================================================== */

.page-hero {
  padding: 8px 0 32px;
}

.page-hero h1 {
  font-size: 34px;
}

.page-hero p {
  color: var(--text-soft);
  font-size: 16px;
  margin-top: 8px;
  max-width: 560px;
}

/* ==========================================================================
   Tabs
   ========================================================================== */

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-soft);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.search-row {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  align-items: center;
}

.search-box {
  flex: 1;
  position: relative;
}

.search-box .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
}

.search-box input[type="text"] {
  width: 100%;
  padding: 12px 16px 12px 42px;
}

/* ==========================================================================
   Startup Grid + Card
   ========================================================================== */

.startup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.startup-card {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  position: relative;
  box-shadow: var(--shadow);
}

.startup-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.rank-badge {
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--text);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
}

.rank-badge.top3 { background: var(--gold); color: #4a3600; }

.card-top { display: flex; gap: 12px; align-items: flex-start; }

.card-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--avatar-shadow);
}

.card-title { flex: 1; min-width: 0; }

.card-title h3 {
  font-size: 16.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-title .tagline {
  font-size: 13.5px;
  color: var(--text-soft);
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  width: fit-content;
}

.card-team {
  display: flex;
  align-items: center;
}

.card-team .avatar {
  margin-left: -8px;
  border: 2.5px solid var(--bg-card);
}

.card-team .avatar:first-child { margin-left: 0; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.stat-group {
  display: flex;
  gap: 14px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.stat-group span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.like-btn, .pill-count-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: none;
  color: var(--text-soft);
  font-weight: 700;
  font-size: 13px;
  padding: 7px 13px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.like-btn:hover, .pill-count-btn:hover { color: var(--accent-dark); box-shadow: var(--shadow); }

.like-btn.liked, .pill-count-btn.liked {
  color: var(--accent-dark);
  box-shadow: var(--shadow-pressed-sm);
}

.like-btn.liked .icon, .pill-count-btn.liked .icon { fill: var(--accent); stroke: var(--accent); }

/* ==========================================================================
   Empty state
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: 70px 20px;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pressed-sm);
}

.empty-state h3 { font-size: 19px; margin-bottom: 8px; }
.empty-state p { color: var(--text-soft); margin-bottom: 22px; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-card {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.form-card.wide { max-width: 680px; }

.form-card h2 { font-size: 24px; margin-bottom: 6px; }
.form-card .sub { color: var(--text-soft); margin-bottom: 28px; font-size: 14px; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 7px;
}

.field .hint {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  transition: box-shadow 0.15s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: var(--shadow-pressed-sm), 0 0 0 2px rgba(46, 125, 255, 0.35);
}

input[type="file"] {
  width: 100%;
  font-size: 13px;
  color: var(--text-soft);
}

textarea { resize: vertical; min-height: 100px; }

.form-row { display: flex; gap: 14px; }
.form-row .field { flex: 1; }

.form-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-soft);
}

.form-footer a { color: var(--accent-dark); font-weight: 700; }

.form-inline-link { text-align: right; margin: -10px 0 16px; }
.form-inline-link a { font-size: 13px; font-weight: 700; color: var(--accent-dark); }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.alert-error { background: #fdeceb; color: #c22a20; }
.alert-success { background: #e6f7f1; color: #00795a; }

/* ==========================================================================
   Startup detail page
   ========================================================================== */

.startup-header {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding-top: 44px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.startup-header .card-logo { width: 76px; height: 76px; font-size: 30px; border-radius: var(--radius); }

.startup-header-info { flex: 1; min-width: 240px; }
.startup-header-info h1 { font-size: 26px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.startup-header-info .tagline { font-size: 15.5px; color: var(--text-soft); }
.category-tag-inline { font-size: 12px; vertical-align: middle; }

.mascot-motivation-card {
  text-align: center;
  padding: 20px 18px;
  background: linear-gradient(160deg, var(--accent-soft), var(--bg-card));
}

.mascot-motivation-img {
  width: 90px;
  margin: 0 auto 12px;
  filter: drop-shadow(0 8px 14px rgba(16, 24, 43, 0.15));
}

.mascot-motivation-line {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-dark);
  line-height: 1.4;
}

.startup-header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: none;
  color: var(--text-soft);
  font-weight: 700;
  font-size: 13px;
  padding: 7px 13px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
.follow-btn:hover { color: var(--accent-dark); box-shadow: var(--shadow); }
.follow-btn.following { color: #fff; background: var(--accent); box-shadow: none; }

.startup-tab-panel { display: none; }
.startup-tab-panel.active { display: block; }

.product-showcase-section { padding-bottom: 6px; }
.product-showcase-badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.target-audience-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin: 0;
}
.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: #b45300;
  background: #fff2cf;
  padding: 7px 13px;
  border-radius: 999px;
  flex-shrink: 0;
}

.product-showcase-carousel { margin-bottom: 16px; }
.product-video-slide { background: #000; }
.product-video-slide iframe { width: 100%; height: 100%; border: none; display: block; }

.video-placeholder-play-btn {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: none;
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.video-placeholder-play-btn span { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.6); }
.product-video-fallback-link { display: inline-flex; margin-bottom: 12px; }

.startup-try-cta { display: inline-flex; }

.traction-highlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #b45300;
  background: #fff2cf;
  padding: 8px 13px;
  border-radius: 999px;
  margin-top: 14px;
}

.empty-state-sm { padding: 22px 20px; }
.empty-state-sm p { margin: 0; color: var(--text-soft); font-size: 13.5px; }

.milestone-add-form {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.milestone-add-form input[type="text"] { flex: 1; min-width: 200px; }
.milestone-add-form input[type="date"] { flex-shrink: 0; width: 160px; }

/* Roadmap: a straight vertical line from "Founded" to "Today", with each
   public goal plotted as a dot along it — the visual is the point (a real
   timeline, not just a list of rows), so this only really reads correctly
   with the connecting rail drawn behind every item. */
.milestone-progress-summary { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0 6px; }
.milestone-progress-stat { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--text-faint); }
.milestone-progress-done { color: #17a34a; }
.milestone-progress-missed { color: #d9342b; }

.roadmap-timeline { position: relative; padding-left: 26px; }
.roadmap-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}
.roadmap-timeline-item { position: relative; padding-bottom: 24px; }
.roadmap-timeline-item:last-child { padding-bottom: 0; }
.roadmap-timeline-dot {
  position: absolute;
  left: -26px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--text-faint);
  z-index: 1;
}
.roadmap-timeline-dot-start { border-color: var(--accent); }
.roadmap-timeline-dot-now { border-color: var(--text-faint); border-style: dashed; background: var(--bg); }
.milestone-item.milestone-done .roadmap-timeline-dot { border-color: #17a34a; background: #17a34a; }
.milestone-item.milestone-missed .roadmap-timeline-dot { border-color: #d9342b; }

.roadmap-timeline-anchor-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); }
.roadmap-timeline-anchor-date { font-size: 14px; font-weight: 700; color: var(--text-soft); margin-top: 2px; }

.milestone-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.milestone-item-title { font-size: 14px; font-weight: 700; }
.milestone-item.milestone-done .milestone-item-title { color: var(--text-soft); text-decoration: line-through; text-decoration-color: var(--text-faint); }
.milestone-item-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.milestone-status-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-faint);
}
.milestone-status-tag-done { background: rgba(23, 163, 74, 0.14); color: #17a34a; }
.milestone-status-tag-missed { background: rgba(217, 52, 43, 0.12); color: #d9342b; }
.milestone-item-actions { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

.milestone-move-btn[data-direction="up"] .icon { transform: rotate(-90deg); }
.milestone-move-btn[data-direction="down"] .icon { transform: rotate(90deg); }

.milestone-item-desc {
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 6px;
  white-space: pre-line;
}

.milestone-edit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.milestone-edit-form textarea { min-height: 60px; resize: vertical; }
.milestone-edit-form-actions { display: flex; gap: 8px; }

.investor-view-signal {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-faint);
  background: var(--bg);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.investor-interested-btn { display: inline-flex; margin-bottom: 16px; }

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 36px;
}

.detail-section { margin-bottom: 30px; }
.detail-section h3 { font-size: 15px; margin-bottom: 12px; }
.detail-section p { color: var(--text); font-size: 14.5px; white-space: pre-line; }

.side-box {
  border: none;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.side-box h4 {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.side-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.side-box-header h4, .side-box-header h3 { margin-bottom: 0; }

.team-list { display: flex; flex-direction: column; gap: 14px; }

.team-member {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-member .name { font-weight: 700; font-size: 14px; }
.team-member .role { font-size: 12.5px; color: var(--text-soft); }
.team-member { position: relative; }
.team-member form { margin-left: auto; }
.team-message-btn { margin-left: auto; flex-shrink: 0; }
.team-member .remove-btn {
  background: none; border: none; color: var(--text-faint); padding: 4px;
}
.team-member .remove-btn:hover { color: #d9342b; }

.team-member-wrap { flex-wrap: wrap; }
.team-member-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }

.founder-hero-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  margin-bottom: 30px;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-card));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.founder-hero-info { flex: 1; min-width: 0; }
.founder-hero-name { font-size: 19px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.founder-hero-role {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-top: 3px;
}

.team-member-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.team-member-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 22px 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.team-member-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.team-member-card-name { font-weight: 700; font-size: 14px; }
.team-member-card-role {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.team-member-card-message {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 480px) {
  .founder-hero-card { flex-direction: column; text-align: center; }
  .founder-hero-name { white-space: normal; overflow: visible; text-overflow: clip; }
}

.open-role-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 22px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.team-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.team-card-name { font-weight: 700; font-size: 14.5px; }

.team-card-role {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.team-card-startup {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-faint);
}

.incoming-request-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.role-assign-select, .role-edit-select, .role-edit-custom {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  box-shadow: var(--shadow-pressed-sm);
}

.role-edit-custom { width: 140px; margin-top: 4px; }
.role-edit-toggle-btn, .role-edit-save-btn { flex-shrink: 0; }

/* Open roles — settings.php management view */
.open-role-manage-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.open-role-manage-row:last-child { border-bottom: none; }
.open-role-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.open-role-head .name { font-weight: 700; font-size: 14.5px; }
.open-role-desc { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; max-width: 480px; }
.role-filled-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #0f766e;
  background: #d9f5e6;
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.open-role-applicants { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.application-role-input { width: 130px; }

.applicant-card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pressed-sm);
  padding: 14px 16px;
}
.applicant-card-top { display: flex; align-items: center; gap: 10px; }
.applicant-card-info { flex: 1; min-width: 0; }
.applicant-card-info .name { font-weight: 700; font-size: 14px; color: var(--text); }
.applicant-card-applied { font-size: 11.5px; color: var(--text-faint); }
.applicant-card-message {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
}
.applicant-card-message .icon { flex-shrink: 0; margin-top: 3px; color: var(--text-faint); }
.applicant-card-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }

/* Open roles — public startup.php view */
.open-role-public-row {
  padding: 18px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.open-role-public-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.open-role-public-row .name { font-weight: 700; font-size: 15px; }
.open-role-public-row .open-role-desc { margin-bottom: 10px; max-width: none; }
.open-role-apply-btn { margin-top: 6px; }

.apply-role-form { flex-direction: column; gap: 8px; margin-top: 10px; }
.apply-role-message {
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  font-size: 13px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pressed-sm);
  color: var(--text);
}
.apply-role-send { align-self: flex-start; }

/* Weekly team check-ins */
.active-team-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-faint);
  background: var(--bg);
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-pressed-sm);
}
.active-team-badge.is-active { color: #b45300; background: #fff2cf; box-shadow: none; }

.checkin-progress-track { height: 6px; border-radius: 999px; background: var(--bg); box-shadow: var(--shadow-pressed-sm); overflow: hidden; margin: 12px 0 18px; }
.checkin-progress-fill { height: 100%; background: linear-gradient(90deg, #ffb800, #ff8a00); border-radius: 999px; transition: width 0.4s ease; }

.checkin-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pressed-sm);
  padding: 14px;
}
.checkin-form-top { display: flex; gap: 10px; align-items: flex-start; }
.checkin-form-top textarea { flex: 1; min-height: 56px; background: var(--bg-card); }
.checkin-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checkin-form-actions .hint { margin: 0; max-width: 320px; }
.checkin-form-actions .btn { flex-shrink: 0; }

.checkin-list { display: flex; flex-direction: column; gap: 10px; }
.checkin-row {
  display: flex;
  gap: 10px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
}
.checkin-row-body { flex: 1; min-width: 0; }
.checkin-row-head { display: flex; align-items: baseline; gap: 8px; }
.checkin-row-head .name { font-weight: 700; font-size: 13.5px; }
.checkin-row-time { font-size: 11.5px; color: var(--text-faint); }
.checkin-row-content { font-size: 13.5px; color: var(--text); margin-top: 2px; line-height: 1.5; white-space: pre-line; }

.checkin-empty-hint { display: flex; align-items: center; gap: 7px; }

.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.meta-row:last-child { border-bottom: none; }
.meta-row span:first-child { color: var(--text-soft); }
.meta-row span:last-child { font-weight: 700; }

.rank-highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  color: var(--accent-dark);
  box-shadow: var(--shadow-pressed-sm);
}

.rank-highlight-num { font-size: 20px; font-weight: 800; line-height: 1.1; }
.rank-highlight-label { font-size: 12px; font-weight: 700; color: var(--text-soft); margin-top: 2px; }

.stat-tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-tile {
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  color: var(--text-faint);
  box-shadow: var(--shadow-sm);
}

.stat-tile-num { font-size: 17px; font-weight: 800; color: var(--text); margin-top: 6px; }
.stat-tile-label { font-size: 11.5px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }

/* ==========================================================================
   Profile page
   ========================================================================== */

.profile-header {
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 30px;
  border: none;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.profile-header .avatar { width: 84px; height: 84px; font-size: 32px; }
.profile-header h1 { font-size: 23px; }
.profile-header .username { color: var(--text-soft); font-size: 14px; margin-top: 2px; }
.profile-header .bio { margin-top: 10px; font-size: 14.5px; max-width: 480px; }
.profile-header-info { flex: 1; min-width: 220px; }

.founder-score-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius);
  padding: 14px 20px;
  color: var(--accent-dark);
  box-shadow: var(--shadow-pressed-sm);
}

.founder-score-badge-num { font-size: 21px; font-weight: 800; line-height: 1.1; }
.founder-score-badge-label { font-size: 12px; font-weight: 700; color: var(--text-soft); margin-top: 2px; }

.community-score-badge {
  background: linear-gradient(135deg, #e6f7f1, var(--bg-card));
  color: #0f766e;
}

.quest-list { display: flex; flex-direction: column; gap: 10px; }

.quest-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

.quest-row.done { opacity: 0.6; }

.quest-check {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.quest-row.done .quest-check { background: #d9f5e6; color: #0f766e; }

.quest-info { flex: 1; min-width: 0; }
.quest-title { font-size: 13px; font-weight: 700; }
.quest-desc { font-size: 11.5px; color: var(--text-faint); margin-top: 1px; }

.quest-xp {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--accent-dark);
  flex-shrink: 0;
}

.quest-row.tier-2 { border-left: 3px solid #b45300; padding-left: 7px; }
.quest-row.tier-3 { border-left: 3px solid #d9342b; padding-left: 7px; }
.quest-row.tier-2 .quest-xp { color: #b45300; }
.quest-row.tier-3 .quest-xp { color: #d9342b; }

.quest-progress-track {
  margin-top: 6px;
  height: 5px;
  border-radius: 3px;
  background: var(--bg-card);
  box-shadow: var(--shadow-pressed-sm);
  overflow: hidden;
}
.quest-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.quest-row.done .quest-progress-fill { background: #0f766e; }
.quest-progress-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-faint);
  margin-top: 3px;
}

.quest-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-soft);
  padding: 10px 2px;
  line-height: 1.4;
}
.quest-empty .icon { flex-shrink: 0; color: var(--gold); }

.badge-shelf {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.badge-shelf-item {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-card));
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: default;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.badge-shelf-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.badge-shelf-link { display: block; }
.badge-shelf-heading {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
  margin-top: 14px;
}
.badge-shelf-link .badge-shelf { margin-top: 8px; }

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.achievement-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.achievement-card.is-locked { opacity: 0.55; }

.achievement-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-card));
  color: var(--accent-dark);
}
.achievement-card.is-locked .achievement-icon { background: var(--bg); color: var(--text-faint); }

.badge-icon-img { display: block; object-fit: contain; }
.achievement-card.is-locked .badge-icon-img { filter: grayscale(1); opacity: 0.35; }

.achievement-name { font-size: 14px; font-weight: 700; }
.achievement-desc { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; line-height: 1.4; }
.achievement-earned {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #0f766e;
  margin-top: 6px;
}
.achievement-locked-label { font-size: 11.5px; font-weight: 700; color: var(--text-faint); margin-top: 6px; }

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

.level-bar-wrap { margin-top: 10px; }
.level-hover-target { position: relative; cursor: help; }

.level-hover-card {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 240px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 16px 18px;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.level-hover-target:hover .level-hover-card,
.level-hover-target:focus-visible .level-hover-card { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(-10px); }

.level-hover-title { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13.5px; margin-bottom: 10px; color: var(--accent-dark); }
.level-hover-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-soft); margin-bottom: 6px; }
.level-hover-row strong { color: var(--text); font-weight: 700; }
.level-hover-progress-track { height: 6px; border-radius: 999px; background: var(--bg); box-shadow: var(--shadow-pressed-sm); overflow: hidden; margin: 8px 0 12px; }
.level-hover-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-dark)); border-radius: 999px; }
.level-hover-link { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--accent-dark); }

.level-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-faint);
  margin-bottom: 5px;
}
.level-bar-label span:first-child { color: var(--accent-dark); }

.level-bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  overflow: hidden;
}

.level-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #63a4ff);
  transition: width 0.4s ease;
}

.profile-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.profile-stat {
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.profile-stat .num { font-size: 20px; font-weight: 800; }
.profile-stat .label { font-size: 12px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 3px; }

.section-title {
  font-size: 18px;
  margin-bottom: 16px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: none;
  padding: 0 0 40px;
  margin-top: 24px;
}

.footer-cta {
  background: linear-gradient(135deg, #2e7dff 0%, #1d5fd1 100%);
  padding: 36px 0;
  margin-bottom: 36px;
}

.footer-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-cta h3 { color: #fff; font-size: 22px; }
.footer-cta p { color: rgba(255, 255, 255, 0.85); margin-top: 4px; font-size: 14.5px; }
.footer-cta .btn-primary { background: #fff; color: var(--accent-dark); box-shadow: var(--shadow); }
.footer-cta .btn-primary:hover { background: #f2f6ff; }

.footer-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.footer-stat { text-align: center; }
.footer-stat .num { display: block; font-size: 26px; font-weight: 800; color: var(--text); }
.footer-stat .label { font-size: 12.5px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }

.footer-col h4 { display: flex; align-items: center; gap: 6px; }

.footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

/* ==========================================================================
   Nav active state / icon button
   ========================================================================== */

.main-nav a.active { color: var(--text); }

.hide-desktop { display: none; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--text-soft);
  background: var(--bg);
  border: none;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, color 0.15s ease;
}

.icon-btn:hover { box-shadow: var(--shadow); color: var(--accent); }
.icon-btn:active { box-shadow: var(--shadow-pressed-sm); }

/* ==========================================================================
   Hero section
   ========================================================================== */

.hero-section {
  background: linear-gradient(180deg, #f2f7ff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 56px 24px 40px;
}

.hero-copy { flex: 1; min-width: 280px; }

.hero-kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-copy h1 {
  font-size: 42px;
  line-height: 1.15;
  margin-bottom: 18px;
}

.accent-underline {
  position: relative;
  color: var(--accent-dark);
}

.hero-copy p {
  font-size: 16.5px;
  color: var(--text-soft);
  max-width: 480px;
  margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-art {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.hero-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 72%);
  opacity: 0.10;
  z-index: 0;
}

.hero-mascot {
  position: relative;
  z-index: 1;
  width: 260px;
  max-width: 100%;
  filter: drop-shadow(0 22px 28px rgba(16, 24, 43, 0.16));
  animation: floaty 5s ease-in-out infinite;
}

.hero-float-card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 10px 14px;
  animation: floaty 4.2s ease-in-out infinite;
}

.card-top-right { top: 8%; right: 4%; animation-delay: 0.4s; }
.card-bottom-left {
  bottom: 12%;
  left: 0%;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: #d7e6ff;
  animation-delay: 1.1s;
}

.card-bottom-left .icon { color: var(--accent-dark); }

.hfc-rank {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffdb70, #ffb800);
  color: #4a3600;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hfc-line { width: 60px; height: 6px; border-radius: 3px; background: #e8e8e8; margin-top: 5px; }
.hfc-line-strong { width: 44px; height: 7px; background: var(--text); margin-top: 0; margin-bottom: 5px; }

.hero-dot, .hero-square {
  position: absolute;
  z-index: 1;
  animation: floaty 3.6s ease-in-out infinite;
}

.hero-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
}

.dot-1 { top: 4%; left: 12%; animation-delay: 0.2s; }
.dot-2 { bottom: 6%; right: 10%; background: #0F766E; width: 10px; height: 10px; border-radius: 50%; animation-delay: 0.9s; }

.hero-square {
  width: 16px; height: 16px;
  border-radius: 4px;
  background: #7FB2FF;
  top: 46%;
  right: 0%;
  animation-delay: 1.6s;
}

.float-slow, .float-med, .float-fast { transform-box: fill-box; transform-origin: center; }
.float-slow { animation: floaty 6s ease-in-out infinite; }
.float-med { animation: floaty 4.2s ease-in-out infinite; }
.float-fast { animation: floaty 3s ease-in-out infinite; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ==========================================================================
   Category chips
   ========================================================================== */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 6px;
  margin-bottom: 26px;
}

.rankings-filter-group { margin-bottom: 22px; }
.rankings-filter-group .chip-row { margin-bottom: 0; }
.rankings-filter-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
  padding-left: 2px;
}
.rankings-arena .rankings-filter-label { color: #6d7690; }

.rankings-select-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.rankings-select-field { display: flex; flex-direction: column; gap: 7px; min-width: 190px; }
.rankings-select-field label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.rankings-select-field label .icon { width: 13px; height: 13px; opacity: 0.8; }
.rankings-select-field select {
  width: auto;
  min-width: 190px;
  padding: 10px 34px 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238892a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}
.rankings-select-clear {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-faint);
  padding-bottom: 11px;
}
.rankings-select-clear:hover { color: var(--text); }
.rankings-arena .rankings-select-field select {
  background-color: #1a1e2c;
  color: #e7ebf5;
  box-shadow: 4px 4px 9px rgba(0, 0, 0, 0.5), -3px -3px 8px rgba(58, 66, 92, 0.3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23b7bfd6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}
.rankings-arena .rankings-select-field label { color: #6d7690; }
.rankings-arena .rankings-select-clear { color: #6d7690; }
.rankings-arena .rankings-select-clear:hover { color: #e7ebf5; }

.chip {
  flex-shrink: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-soft);
  background: var(--bg);
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.chip:hover { color: var(--text); box-shadow: var(--shadow); }

.chip.active {
  background: linear-gradient(145deg, #3f8bff, #2670eb);
  color: #fff;
  box-shadow: var(--shadow-pressed-sm);
}

.search-category-row { margin-top: 18px; margin-bottom: 8px; }
.search-result-count { font-size: 13px; color: var(--text-faint); font-weight: 600; margin-bottom: 14px; }

/* ==========================================================================
   Auth pages
   ========================================================================== */

.standalone-page {
  min-height: 100vh;
  padding-bottom: 60px;
}

.standalone-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.mod-queue { display: flex; flex-direction: column; gap: 12px; }

.mod-report-row {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}

.mod-report-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.mod-report-reporter { font-size: 12.5px; color: var(--text-soft); font-weight: 600; }
.mod-report-reason { font-size: 13px; color: #d9342b; font-weight: 600; margin-bottom: 8px; }
.mod-report-preview { font-size: 14px; color: var(--text); background: var(--bg); box-shadow: var(--shadow-pressed-sm); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 12px; }
.mod-report-actions { display: flex; gap: 10px; }

.investor-status {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.investor-status .icon { flex-shrink: 0; margin-top: 2px; }
.investor-status strong { display: block; font-size: 14.5px; margin-bottom: 4px; }
.investor-status p { font-size: 13px; color: var(--text-soft); line-height: 1.5; }
.investor-status-approved { background: #e6f7f1; color: #0f766e; }
.investor-status-rejected { background: #fdeceb; color: #b91c1c; }
:root[data-theme="dark"] .investor-status-rejected { background: #3a1414; color: #f87171; }
.investor-status + .investor-status { margin-top: 12px; }

.investor-apply-card { max-width: 640px; }
.investor-apply-header { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.investor-apply-mascot { width: 78px; flex-shrink: 0; }
.investor-apply-header h2 { margin-bottom: 6px; }
.investor-apply-header .sub { margin: 0; }

.investor-rules-box {
  max-height: 190px;
  overflow-y: auto;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pressed-sm);
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.55;
}
.investor-rules-box p { margin: 0 0 10px; }
.investor-rules-box p:last-child { margin-bottom: 0; }
.investor-rules-box strong { color: var(--text); }

.investor-agree-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
}
.investor-agree-row input { margin-top: 2px; }
.investor-agree-row input:disabled { cursor: not-allowed; }

.applicant-type-toggle { display: flex; gap: 10px; }
.applicant-type-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.applicant-type-option:has(input:checked) { box-shadow: 0 0 0 2px var(--accent); color: var(--accent-dark); }

.work-email-row, .work-email-code-row { display: flex; gap: 8px; }
.work-email-row input, .work-email-code-row input { flex: 1; }
.work-email-code-row { margin-top: 10px; }
.work-email-status { font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.work-email-status.ok { color: #15803d; }
.work-email-status.error { color: #d9342b; }
:root[data-theme="dark"] .work-email-status.ok { color: #4ade80; }
:root[data-theme="dark"] .work-email-status.error { color: #f87171; }

.onboarding-intro { text-align: center; max-width: 560px; margin: 20px auto 36px; }
.onboarding-intro h1 { font-size: 28px; margin-bottom: 10px; }
.onboarding-intro p { color: var(--text-soft); font-size: 15px; }

.intent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 720px;
  margin: 0 auto;
}

.intent-card {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  text-align: left;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.intent-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.intent-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.intent-card h3 { font-size: 16px; margin-bottom: 6px; }
.intent-card p { font-size: 13px; color: var(--text-soft); line-height: 1.4; }

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

.interest-filter {
  max-width: 480px;
  margin: 0 auto 10px;
  display: block;
}

.country-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
}

.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: none;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.country-chip:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.country-chip-flag { font-size: 16px; }
.country-chip img.flag-icon { border-radius: 2px; }

.country-picker { position: relative; }

.country-picker-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pressed-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  text-align: left;
}

#countryPickerLabel { flex: 1; }

.country-picker-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--text-faint);
  flex-shrink: 0;
}

.country-picker-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 12px;
}

.country-grid-popover {
  max-width: none;
  max-height: 260px;
  margin: 0;
  justify-content: flex-start;
}

.country-grid-popover .country-chip {
  padding: 7px 12px;
  font-size: 13px;
}

.interest-counter {
  max-width: 480px;
  margin: 0 auto 14px;
  text-align: right;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-faint);
}
.interest-counter #interestCount { color: var(--accent-dark); }

.interest-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 720px;
  margin: 0 auto 24px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
}

.interest-category-heading {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.interest-category-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.interest-chip {
  position: relative;
  cursor: pointer;
}

.interest-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.interest-chip span {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  transition: box-shadow 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.interest-chip input:checked + span {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-pressed-sm);
}

.interest-chip input:disabled:not(:checked) + span { opacity: 0.4; cursor: not-allowed; }

form:has(#interestGrid) { max-width: 760px; margin: 0 auto; }

.founder-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.founder-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-faint);
}

.founder-checklist-item .icon { color: #d9342b; flex-shrink: 0; }
.founder-checklist-item.done { color: var(--text); }
.founder-checklist-item.done .icon { color: #0f766e; }

.founder-guidelines {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.founder-guidelines h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-dark); margin-bottom: 12px; }
.founder-guidelines ul { display: flex; flex-direction: column; gap: 10px; }
.founder-guidelines li { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--text); line-height: 1.4; }
.founder-guidelines li .icon { color: #0f766e; flex-shrink: 0; margin-top: 2px; }

.settings-card { margin-bottom: 20px; }
.settings-section-title { font-size: 15px; margin-bottom: 18px; }
.settings-subsection-title { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); margin: 22px 0 12px; font-weight: 700; }
.field label .icon { vertical-align: -3px; margin-right: 2px; }

.settings-account-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.settings-account-row > div { display: flex; flex-direction: column; gap: 4px; }
.settings-account-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); font-weight: 700; }

.account-health-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pressed-sm);
  padding: 16px 18px;
  margin-top: 20px;
}
.account-health-teaser .hint { margin-top: 2px; max-width: 420px; }

/* Account settings — sidebar nav + panel layout */
.settings-nav-layout {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px;
  position: sticky;
  top: 88px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  width: 100%;
}

.settings-nav-item:hover { background: var(--bg-soft); color: var(--text); }
.settings-nav-item.active { background: var(--accent-soft); color: var(--accent-dark); }

.settings-nav-item-danger {
  color: #d9342b;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.settings-nav-item-danger:hover { background: rgba(217, 52, 43, 0.08); color: #d9342b; }
.settings-nav-item-danger.active { background: rgba(217, 52, 43, 0.12); color: #d9342b; }

.settings-nav-group-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 14px 12px 4px;
}
.settings-nav-group-label:first-child { padding-top: 4px; }

.settings-panels { flex: 1; min-width: 0; }
.settings-panel { display: none; }
.settings-panel.active { display: block; }

.pref-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.pref-row:last-child { border-bottom: none; padding-bottom: 0; }
.pref-row:first-child { padding-top: 0; }

.pref-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pref-row-text { flex: 1; min-width: 0; }
.pref-row-title { font-weight: 700; font-size: 14px; }
.pref-row-desc { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }

@media (max-width: 860px) {
  .settings-nav-layout { flex-direction: column; }
  .settings-nav {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
  }
  .settings-nav-item { white-space: nowrap; }
  .settings-nav-item-danger { margin-top: 0; border-top: none; border-left: 1px solid var(--border); padding-left: 14px; border-radius: var(--radius-sm); }
  .settings-nav-group-label { flex-basis: 100%; padding: 8px 4px 0; }
}

/* Account health page */
.health-hero-card {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.health-gauge-wrap { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.health-gauge { transform: rotate(-90deg); }
.health-gauge-track { fill: none; stroke: var(--border); stroke-width: 10; }
.health-gauge-fill { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }

.health-gauge-fill.health-grade-excellent { stroke: #0f766e; }
.health-gauge-fill.health-grade-good { stroke: var(--accent); }
.health-gauge-fill.health-grade-fair { stroke: #b45300; }
.health-gauge-fill.health-grade-poor { stroke: #d9342b; }

.health-gauge-labels {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.health-score-num { font-size: 34px; font-weight: 800; line-height: 1; }
.health-score-label { font-size: 12px; color: var(--text-faint); font-weight: 700; }

.health-hero-text { flex: 1; min-width: 220px; }
.health-hero-text p { color: var(--text-soft); margin-top: 6px; font-size: 14px; }

.health-grade { font-size: 19px; font-weight: 800; }
.health-grade.health-grade-excellent { color: #0f766e; }
.health-grade.health-grade-good { color: var(--accent-dark); }
.health-grade.health-grade-fair { color: #b45300; }
.health-grade.health-grade-poor { color: #d9342b; }

.health-score-bars { display: flex; flex-direction: column; gap: 16px; }
.health-score-bar-row { display: flex; flex-direction: column; gap: 6px; }
.health-score-bar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.health-score-bar-label { font-size: 13.5px; font-weight: 700; }
.health-score-bar-label span { display: block; font-size: 12px; font-weight: 500; color: var(--text-faint); margin-top: 1px; }
.health-score-bar-val { font-size: 13px; font-weight: 800; color: var(--text-soft); flex-shrink: 0; }
.health-score-bar-track { height: 7px; border-radius: 999px; background: var(--border); overflow: hidden; }
.health-score-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-dark)); }

.health-breakdown { display: flex; flex-direction: column; }
.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.health-row:last-child { border-bottom: none; }
.health-row-title { font-weight: 700; font-size: 14px; }
.health-row-sub { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; max-width: 420px; }
.health-row-num { font-size: 18px; font-weight: 800; flex-shrink: 0; }
.health-row-good { color: #0f766e; }
.health-row-warn { color: #b45300; }
.health-row-bad { color: #d9342b; }

.health-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.5;
}
.health-note .icon { flex-shrink: 0; margin-top: 2px; }
.health-note p { margin: 0; }

.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-soft);
  margin-bottom: 18px;
  cursor: pointer;
}

.agree-row input { margin-top: 3px; width: 16px; height: 16px; flex-shrink: 0; }

.add-startup-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.add-startup-mascot-card {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  background: linear-gradient(160deg, var(--accent-soft), var(--bg-card));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px 24px;
  text-align: center;
}

.add-startup-mascot-img {
  width: 170px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 14px 20px rgba(16, 24, 43, 0.18));
}

.add-startup-mascot-line {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .add-startup-mascot-card { display: none; }
}

.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  overflow: hidden;
}

.auth-character {
  position: absolute;
  left: 6%;
  bottom: -30px;
  width: 300px;
  z-index: 0;
  filter: drop-shadow(0 20px 30px rgba(16, 24, 43, 0.12));
  pointer-events: none;
}

@media (max-width: 1150px) {
  .auth-character { display: none; }
}

.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
}

.auth-blob-1 {
  width: 380px; height: 380px;
  background: var(--accent);
  opacity: 0.08;
  top: -100px; left: -100px;
}

.auth-blob-2 {
  width: 320px; height: 320px;
  background: var(--gold);
  opacity: 0.10;
  bottom: -80px; right: -60px;
}

.auth-card {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  min-width: 0;
}

.auth-logo-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 10px;
}

.auth-card .sub { font-size: 13px; }
.auth-card .field { text-align: left; }

.btn-social {
  width: 100%;
  background: var(--bg);
  border: none;
  color: var(--text);
  padding: 12px 20px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}

.btn-social:hover { box-shadow: var(--shadow); }
.btn-social:active { box-shadow: var(--shadow-pressed-sm); }

.divider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 700;
}

.divider-row::before, .divider-row::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1d29;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 999;
  max-width: 90vw;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Rankings page
   ========================================================================== */

.rankings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.rankings-main, .rankings-side { min-width: 0; }

.rankings-side-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
  padding-left: 2px;
}
.rankings-arena .rankings-side-eyebrow { color: #6d7690; }

.user-autocomplete { position: relative; }

.user-autocomplete-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  padding: 6px;
}

.user-autocomplete-results.open { display: flex; }

.user-autocomplete-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  text-align: left;
}

.user-autocomplete-row:hover { background: var(--bg-soft); }

.uac-name { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); }
.uac-username { display: block; font-size: 12px; color: var(--text-faint); }

.user-autocomplete-empty {
  padding: 10px;
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
}

.settings-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.settings-layout .side-box.wide { grid-column: 1 / -1; }
.settings-layout .form-card.wide { grid-column: 1 / -1; }
.settings-layout .form-card { max-width: none; margin: 0; }

@media (max-width: 700px) {
  .settings-layout { grid-template-columns: 1fr; }
}

.leaderboard { display: flex; flex-direction: column; gap: 10px; }

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.leaderboard-row:hover { box-shadow: var(--shadow-lg); border-color: transparent; border-left-color: var(--accent); transform: translateY(-1px); }

.watchlist-row-link {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.leaderboard-row.row-medal-gold { border-left-color: #ffb800; background: linear-gradient(90deg, #fffaf0 0%, #ffffff 14%); }
.leaderboard-row.row-medal-silver { border-left-color: #b9c0c9; background: linear-gradient(90deg, #f8f9fa 0%, #ffffff 14%); }
.leaderboard-row.row-medal-bronze { border-left-color: #d18a52; background: linear-gradient(90deg, #fdf4ec 0%, #ffffff 14%); }

.lb-rank {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-faint);
  background: var(--bg-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-rank.medal-gold { background: linear-gradient(160deg, #ffdb70, #ffb800); color: #4a3600; font-size: 17px; }
.lb-rank.medal-silver { background: linear-gradient(160deg, #ecedee, #b9c0c9); color: #383d42; font-size: 17px; }
.lb-rank.medal-bronze { background: linear-gradient(160deg, #eac09a, #d18a52); color: #4a2c11; font-size: 17px; }

.lb-logo { width: 46px; height: 46px; font-size: 17px; border-radius: var(--radius-sm); flex-shrink: 0; }

.lb-info { flex: 1; min-width: 0; }

.lb-name {
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}

.lb-name .category-tag { flex-shrink: 0; }

.lb-tagline {
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-team {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.lb-team-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
}

.lb-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.lb-score {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.lb-score span {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
}

.lb-stats {
  display: flex;
  gap: 12px;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.lb-stats span { display: inline-flex; align-items: center; gap: 4px; }

.founder-list { display: flex; flex-direction: column; gap: 4px; }

.switch-account-list { display: flex; flex-direction: column; gap: 4px; }
.switch-account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border);
}
.switch-account-row:last-child { border-bottom: none; }
.switch-account-row.is-current { background: var(--bg-soft); }
.switch-account-info { flex: 1; min-width: 0; }
.switch-account-info .name { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-account-info .username { font-size: 13px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-account-row form { flex-shrink: 0; }

@media (max-width: 480px) {
  .switch-account-row { gap: 8px; padding: 12px 6px; }
  .switch-account-row .btn-sm { padding: 7px 12px; font-size: 12.5px; }
}

.founder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  border-radius: var(--radius-sm);
}

.founder-row:hover { background: var(--bg-soft); }

.founder-row-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  color: inherit;
}

.founder-rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-faint);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.founder-rank.medal-gold { background: linear-gradient(160deg, #ffdb70, #ffb800); color: #4a3600; }
.founder-rank.medal-silver { background: linear-gradient(160deg, #ecedee, #b9c0c9); color: #383d42; }
.founder-rank.medal-bronze { background: linear-gradient(160deg, #eac09a, #d18a52); color: #4a2c11; }

.founder-info { flex: 1; min-width: 0; }
.founder-info .name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.founder-info .role { font-size: 12px; color: var(--text-soft); }

.founder-score {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ==========================================================================
   Rankings arena — dark Discord-style theme + rotating 3D globe
   ========================================================================== */

.site-main:has(.rankings-arena) { min-height: 0; padding: 0; }
.site-main:has(.hero-section) { padding-top: 0; }

.rankings-arena {
  position: relative;
  background: radial-gradient(ellipse at 50% -10%, #182036 0%, #0b0e1a 55%, #070911 100%);
  padding: 44px 0 64px;
  min-height: calc(100vh - 68px - 140px);
  overflow: hidden;
  color: #e7ebf5;
}

.rankings-arena .container { position: relative; z-index: 1; }

.rankings-arena .page-hero h1 {
  background: linear-gradient(135deg, #ffffff 30%, #9fc4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rankings-arena .page-hero p { color: #9aa4bf; }

.starfield {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(255,255,255,0.5) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 90px 120px, rgba(255,255,255,0.35) 50%, transparent 100%),
    radial-gradient(1px 1px at 160px 60px, rgba(255,255,255,0.4) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 210px 160px, rgba(127,178,255,0.5) 50%, transparent 100%),
    radial-gradient(1px 1px at 60px 190px, rgba(255,255,255,0.3) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 260px 40px, rgba(255,255,255,0.4) 50%, transparent 100%);
  background-repeat: repeat;
  background-size: 280px 220px;
}

.arena-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  pointer-events: none;
}

.arena-glow-1 {
  width: 460px;
  height: 460px;
  top: -120px;
  right: -100px;
  background: radial-gradient(circle, rgba(46,125,255,0.35) 0%, transparent 70%);
}

.arena-glow-2 {
  width: 380px;
  height: 380px;
  top: 620px;
  left: -140px;
  background: radial-gradient(circle, rgba(255,184,0,0.14) 0%, transparent 70%);
}

.globe-wrap {
  position: absolute;
  top: 20px;
  right: -40px;
  width: 420px;
  height: 420px;
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 60px rgba(79, 161, 255, 0.35));
}

.globe-wrap canvas { width: 100%; height: 100%; }

.rankings-arena .chip {
  background: #1a1e2c;
  border: none;
  color: #b7bfd6;
  box-shadow: 4px 4px 9px rgba(0, 0, 0, 0.5), -3px -3px 8px rgba(58, 66, 92, 0.3);
}

.rankings-arena .chip:hover { color: #fff; box-shadow: 5px 5px 11px rgba(0, 0, 0, 0.55), -4px -4px 10px rgba(58, 66, 92, 0.35); }
.rankings-arena .chip.active {
  background: linear-gradient(135deg, #4a93ff, #2e7dff);
  color: #fff;
  box-shadow: inset 2px 2px 5px rgba(20, 60, 140, 0.5), inset -2px -2px 5px rgba(127, 178, 255, 0.3);
}

.rankings-arena .leaderboard-row {
  background: #171a26;
  border: none;
  border-left: 3px solid transparent;
  box-shadow: 7px 7px 16px rgba(0, 0, 0, 0.5), -6px -6px 16px rgba(52, 59, 82, 0.25);
}

.rankings-arena .leaderboard-row:hover {
  border-left-color: var(--accent);
  box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.55), -6px -6px 18px rgba(52, 59, 82, 0.3), 0 0 24px rgba(46, 125, 255, 0.18);
  transform: translateY(-2px);
}

.rankings-arena .leaderboard-row.row-medal-gold {
  border-left-color: #ffcc4d;
  background: linear-gradient(120deg, rgba(255, 184, 0, 0.13), #171a26 45%);
  box-shadow: 7px 7px 16px rgba(0, 0, 0, 0.5), -6px -6px 16px rgba(52, 59, 82, 0.25), 0 0 20px rgba(255, 184, 0, 0.1);
}
.rankings-arena .leaderboard-row.row-medal-silver {
  border-left-color: #d6dbe2;
  background: linear-gradient(120deg, rgba(185, 192, 201, 0.12), #171a26 45%);
  box-shadow: 7px 7px 16px rgba(0, 0, 0, 0.5), -6px -6px 16px rgba(52, 59, 82, 0.25), 0 0 18px rgba(185, 192, 201, 0.08);
}
.rankings-arena .leaderboard-row.row-medal-bronze {
  border-left-color: #e3a06a;
  background: linear-gradient(120deg, rgba(209, 138, 82, 0.14), #171a26 45%);
  box-shadow: 7px 7px 16px rgba(0, 0, 0, 0.5), -6px -6px 16px rgba(52, 59, 82, 0.25), 0 0 18px rgba(209, 138, 82, 0.1);
}

.rankings-arena .lb-rank { background: #1e2232; color: #8891ab; box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.45), -2px -2px 6px rgba(58, 66, 92, 0.3); }
.rankings-arena .lb-rank.medal-gold { box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.18), 0 0 16px rgba(255, 184, 0, 0.5); }
.rankings-arena .lb-rank.medal-silver { box-shadow: 0 0 0 3px rgba(185, 192, 201, 0.18), 0 0 16px rgba(185, 192, 201, 0.4); }
.rankings-arena .lb-rank.medal-bronze { box-shadow: 0 0 0 3px rgba(209, 138, 82, 0.18), 0 0 16px rgba(209, 138, 82, 0.4); }
.rankings-arena .lb-name { color: #f2f4fa; }
.rankings-arena .lb-tagline { color: #8891ab; }
.rankings-arena .lb-team-count { color: #6d7690; }
.rankings-arena .lb-score { color: #ffffff; }
.rankings-arena .lb-score span { color: #6d7690; }
.rankings-arena .lb-stats { color: #9aa4bf; }
.rankings-arena .category-tag { background: rgba(46, 125, 255, 0.18); color: #8cbaff; }

.rankings-arena .empty-state { border: none; background: #171a26; box-shadow: var(--shadow-pressed-sm); }
.rankings-arena .empty-state h3 { color: #fff; }
.rankings-arena .empty-state p { color: #8891ab; }

.rankings-arena .side-box {
  background: #171a26;
  border: none;
  box-shadow: 7px 7px 16px rgba(0, 0, 0, 0.5), -6px -6px 16px rgba(52, 59, 82, 0.25);
}

.rankings-arena .side-box h4 { color: #6d7690; }
.rankings-arena .founder-row:hover { background: rgba(255, 255, 255, 0.05); }
.rankings-arena .founder-rank { background: #1e2232; color: #8891ab; box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4), -2px -2px 5px rgba(58, 66, 92, 0.25); }
.rankings-arena .founder-rank.medal-gold { box-shadow: 0 0 0 2px rgba(255, 184, 0, 0.2), 0 0 10px rgba(255, 184, 0, 0.5); }
.rankings-arena .founder-rank.medal-silver { box-shadow: 0 0 0 2px rgba(185, 192, 201, 0.2), 0 0 10px rgba(185, 192, 201, 0.4); }
.rankings-arena .founder-rank.medal-bronze { box-shadow: 0 0 0 2px rgba(209, 138, 82, 0.2), 0 0 10px rgba(209, 138, 82, 0.4); }
.rankings-arena .founder-info .name { color: #f2f4fa; }
.rankings-arena .founder-info .role { color: #8891ab; }
.rankings-arena .founder-score { background: rgba(46, 125, 255, 0.18); color: #8cbaff; }
.rankings-arena .hint { color: #6d7690; }

.season-banner {
  margin-top: 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(127, 178, 255, 0.15), 0 20px 45px rgba(0, 0, 0, 0.55), 0 0 40px rgba(46, 125, 255, 0.15);
}

.season-banner-img {
  width: 100%;
  height: auto;
  display: block;
}

.about-founder-banner {
  margin-top: 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(127, 178, 255, 0.15), 0 20px 45px rgba(0, 0, 0, 0.55), 0 0 40px rgba(46, 125, 255, 0.15);
}

.about-founder-banner img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 700px) {
  .season-banner { margin-top: 24px; }
  .about-founder-banner { margin-top: 24px; }
}

/* ==========================================================================
   People search
   ========================================================================== */

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.person-card {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.person-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.person-info { min-width: 0; }
.person-info .name { font-weight: 700; font-size: 15px; }
.person-info .username { font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }
.person-info .bio-snip {
  font-size: 13px;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.skill-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  background: var(--bg);
  border: none;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .skill-tag { font-size: 11px; padding: 3px 8px; max-width: none; }
}

.lang-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
  background: #e6f7f1;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ==========================================================================
   Footer grid
   ========================================================================== */

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
  padding: 8px 0;
}

.footer-brand p {
  color: var(--text-soft);
  font-size: 13.5px;
  margin-top: 12px;
  max-width: 320px;
}

.footer-col { display: flex; flex-direction: column; gap: 10px; }

.footer-col h4 {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 2px;
}

.footer-col a { font-size: 13.5px; color: var(--text-soft); font-weight: 600; }
.footer-col a:hover { color: var(--text); }
.footer-static { font-size: 13px; color: var(--text-faint); }

/* ==========================================================================
   Feed (home page)
   ========================================================================== */

.container-feed { max-width: 980px; padding-top: 32px; }
.container-narrow { max-width: 680px; }

.welcome-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-card));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.welcome-banner-img {
  width: 100px;
  flex-shrink: 0;
  filter: drop-shadow(0 12px 18px rgba(16, 24, 43, 0.18));
}

.welcome-banner h2 { font-size: 21px; margin-bottom: 8px; }
.welcome-banner p { font-size: 14px; color: var(--text-soft); margin-bottom: 14px; max-width: 520px; }

@media (max-width: 600px) {
  .welcome-banner { text-align: center; justify-content: center; }
  .welcome-banner-img { margin: 0 auto; }
  .welcome-banner p { max-width: none; }
}

.notification-group-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin: 26px 2px 12px;
}

.notification-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.notification-group-label:first-child { margin-top: 4px; }

.notification-page-list { display: flex; flex-direction: column; gap: 10px; }

.notification-page-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid transparent;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.notification-page-row:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.notification-page-row.unread {
  border-left-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-card) 65%);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(46, 125, 255, 0.12);
}

.notification-page-avatar-wrap { position: relative; flex-shrink: 0; }

.notification-page-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.notification-type-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.notification-badge-red { background: #ffe0e0; color: #d9342b; }
.notification-badge-blue { background: var(--accent-soft); color: var(--accent-dark); }
.notification-badge-purple { background: #ece4ff; color: #6d3ff0; }
.notification-badge-green { background: #d9f5e6; color: #0f766e; }
.notification-badge-gold { background: #fff2cf; color: #a3730c; }

.notification-unread-dot {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.notification-page-body { flex: 1; min-width: 0; padding-top: 4px; padding-right: 20px; }
.notification-page-msg { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.4; }
.notification-page-time { font-size: 12.5px; color: var(--text-faint); margin-top: 4px; }

.notification-actions { display: flex; gap: 8px; margin-top: 10px; }
.notification-page-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-dark);
  transition: gap 0.15s ease;
}
.notification-page-link:hover { gap: 7px; }

.notification-empty-state { display: flex; flex-direction: column; align-items: center; }
.empty-state-mascot { width: 120px; margin-bottom: 14px; filter: drop-shadow(0 12px 18px rgba(16, 24, 43, 0.14)); }

@media (max-width: 480px) {
  .notification-page-row { padding: 14px; gap: 10px; }
  .notification-page-icon, .notification-page-avatar-wrap .avatar { width: 38px !important; height: 38px !important; }
}

.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.feed-main, .feed-side { min-width: 0; }

.profile-layout { grid-template-columns: 300px minmax(0, 1fr); }

.profile-card { text-align: center; padding: 26px 22px; }
.profile-card-avatar { display: flex; justify-content: center; margin-bottom: 14px; }
.profile-card h1 { font-size: 20px; }
.profile-card .username { color: var(--text-soft); font-size: 13.5px; margin-top: 2px; }

.investor-badge, .founding-member-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  margin-top: 8px;
}
.investor-badge { background: var(--accent-soft); color: var(--accent-dark); }
.founding-member-badge { background: #fff2cf; color: #a3730c; }
:root[data-theme="dark"] .founding-member-badge { background: #3a2f10; color: #ffd873; }

.website-verified-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
}
:root[data-theme="dark"] .website-verified-tag { background: #0f2a1a; color: #4ade80; }

.not-verified-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-faint);
}
.not-verified-tag:hover { color: var(--text-soft); }

.verify-website-card {
  margin: 18px 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.verify-website-header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.verify-website-header h3 { font-size: 15px; margin-bottom: 4px; }
.verify-website-header p { font-size: 13px; color: var(--text-faint); line-height: 1.5; }
.verify-website-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.verify-website-step strong { display: block; font-size: 13px; margin-bottom: 6px; }
.verify-website-step .hint { font-size: 12.5px; margin: 0; }
.verify-website-step .hint code { font-size: 12px; }
.verify-website-snippet {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12.5px;
  font-family: Consolas, monospace;
  overflow-x: auto;
  white-space: pre;
  margin-bottom: 8px;
}
.verify-website-actions { display: flex; align-items: center; gap: 12px; }
.verify-website-result { font-size: 12.5px; font-weight: 600; }
.verify-website-result.ok { color: #15803d; }
:root[data-theme="dark"] .verify-website-result.ok { color: #4ade80; }
.verify-website-result.fail { color: #b91c1c; }
:root[data-theme="dark"] .verify-website-result.fail { color: #f87171; }

.investor-status-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.investor-status-pill-pending { background: #fef3c7; color: #92400e; }
.investor-status-pill-approved { background: #dcfce7; color: #15803d; }
.investor-status-pill-rejected { background: #fee2e2; color: #b91c1c; }
:root[data-theme="dark"] .investor-status-pill-pending { background: #3a2f10; color: #fbbf24; }
:root[data-theme="dark"] .investor-status-pill-approved { background: #0f2a1a; color: #4ade80; }
:root[data-theme="dark"] .investor-status-pill-rejected { background: #3a1414; color: #f87171; }

.investor-verdicts-section .side-box-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.investor-avg-rating { font-size: 13px; font-weight: 700; color: var(--accent-dark); }

.investor-summary-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 26px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #fff2cf, var(--bg-card));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
:root[data-theme="dark"] .investor-summary-hero { background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), var(--bg-card)); }
.investor-summary-score { font-size: 42px; font-weight: 800; color: #b45300; line-height: 1; }
.investor-summary-stars { color: #f59e0b; font-size: 18px; letter-spacing: 2px; }
.investor-summary-count { font-size: 13px; font-weight: 600; color: var(--text-faint); margin-top: 4px; }

.investor-review-form {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.investor-rating-picker { display: flex; gap: 4px; margin-bottom: 10px; }
.investor-star-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-faint);
  padding: 2px 3px;
  border-radius: 4px;
  font-size: 22px;
  line-height: 1;
}
.investor-star-btn.active { color: #f59e0b; }
.investor-review-form textarea { width: 100%; min-height: 70px; margin-bottom: 10px; }
.investor-review-form-actions { display: flex; align-items: center; gap: 12px; }
.investor-review-result { font-size: 12.5px; font-weight: 600; }
.investor-review-result.ok { color: #15803d; }
:root[data-theme="dark"] .investor-review-result.ok { color: #4ade80; }
.investor-review-result.fail { color: #b91c1c; }
:root[data-theme="dark"] .investor-review-result.fail { color: #f87171; }

.investor-review-list { display: flex; flex-direction: column; gap: 14px; }
.investor-review-row {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.investor-review-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.investor-review-top strong { font-size: 14.5px; }
.investor-review-stars { color: #f59e0b; font-size: 13px; letter-spacing: 1px; }
.investor-review-row p { font-size: 13.5px; color: var(--text-soft); line-height: 1.5; }

.verified-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  vertical-align: middle;
  flex-shrink: 0;
}
.verified-tick svg { width: 1em; height: 1em; }

.verify-user-search input { width: 100%; max-width: 360px; }
.verify-user-results { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; max-width: 480px; }
.verify-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.verify-user-info { flex: 1; min-width: 0; font-size: 13.5px; }
.verify-user-empty { font-size: 13px; color: var(--text-faint); }

.phone-input-row { display: flex; gap: 8px; align-items: flex-start; }
.phone-input-row input[type="tel"] { flex: 1; min-width: 0; }

.phone-country-picker { position: relative; flex-shrink: 0; }
.phone-country-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pressed-sm);
  padding: 10px 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.phone-country-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: 260px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 12px;
}
.phone-country-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.phone-country-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
}
.phone-country-chip:hover { background: var(--bg); }
.phone-country-chip span:nth-child(2) { flex: 1; }

.username-check-row { position: relative; }
.username-check-row input { padding-right: 40px; }
.username-check-status {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}
.username-check-icon { font-size: 16px; font-weight: 800; }
.username-check-icon.ok { color: #15803d; }
.username-check-icon.taken { color: #b91c1c; }
.username-check-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: username-spin 0.6s linear infinite;
}
@keyframes username-spin { to { transform: rotate(360deg); } }

.username-suggestions { margin-top: 8px; flex-wrap: wrap; align-items: center; gap: 6px; }
.username-suggestions-label { font-size: 12.5px; color: var(--text-faint); margin-right: 2px; }
.username-suggestion-chip {
  background: var(--bg);
  border: none;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-dark);
}
.username-suggestion-chip:hover { background: var(--accent-soft); }

.verified-badge-hero { text-align: center; }
.verified-badge-hero-art { position: relative; display: inline-flex; margin-bottom: 8px; }
.verified-badge-mascot { width: 140px; }
.verified-badge-big-tick {
  position: absolute;
  right: -6px;
  bottom: 4px;
  display: flex;
  background: var(--bg-card);
  border-radius: 50%;
  padding: 4px;
  box-shadow: var(--shadow);
}

.verified-benefits-list { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--text-soft); line-height: 1.5; }
.verified-coming-soon-card { border: 1px dashed var(--border); }
.verified-interest-result { display: block; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: #15803d; }
:root[data-theme="dark"] .verified-interest-result { color: #4ade80; }

.profile-invite-box { width: 100%; margin-top: 4px; }
.profile-invite-form { flex-direction: column; gap: 8px; margin-top: 8px; }
.profile-invite-role {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pressed-sm);
  color: var(--text);
}

.profile-social-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.profile-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.profile-social-btn:hover {
  color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}


.investor-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #0f766e;
  background: #e6f7f1;
  padding: 4px 9px;
  border-radius: 999px;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.profile-card .profile-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 6px;
}
.profile-card .bio { margin-top: 12px; font-size: 13.5px; color: var(--text); }
.profile-card .tag-row { justify-content: center; }
.profile-card-badge { margin-top: 16px; text-align: left; }
.profile-card-stats { margin: 16px 0 0; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.profile-card-stats .profile-stat { padding: 12px 4px; }
.profile-card-stats .profile-stat .label { font-size: 10.5px; letter-spacing: 0.02em; }
.profile-card form { text-align: left; }
.profile-card .btn-block { margin-top: 14px; }

.feed-side {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: calc(100vh - 88px - 24px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-width: none;
}
.feed-side::-webkit-scrollbar { display: none; }

/* Profile sidebar reuses .feed-side's sticky+capped-height+hidden-scrollbar
   treatment as-is now — same behavior as the Home feed's right-side cards. */

.trending-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }

.trending-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trending-rank {
  width: 18px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-faint);
  flex-shrink: 0;
}

.trending-name {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-open-roles-list { display: flex; flex-direction: column; gap: 4px; }
.feed-open-role-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
}
.feed-open-role-row:hover { background: var(--bg-soft); }
.feed-open-role-info { flex: 1; min-width: 0; }
.feed-open-role-info .title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-open-role-info .startup { font-size: 11.5px; color: var(--text-faint); }

.side-box-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-dark);
}

.composer {
  border: none;
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 24px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.composer-top { display: flex; gap: 12px; align-items: flex-start; }

.composer-top textarea {
  flex: 1;
  border: none;
  padding: 8px 0;
  min-height: 56px;
  max-height: 360px;
  resize: none;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.5;
  background: transparent;
  box-shadow: none;
}

.composer-top textarea:focus { outline: none; box-shadow: none; }

.composer-image-field {
  display: none;
  margin: 10px 0 0 56px;
}

.composer-image-field.open { display: block; }

.composer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--bg-soft);
}

.composer-tag-select {
  margin-left: auto;
  max-width: 190px;
  padding: 8px 10px;
  font-size: 13px;
}

/* The Post button's right-alignment normally rides on the tag-select's
   margin-left:auto above — but that select only renders when the user has
   a startup to tag. Without it (personal accounts), nothing pushes the
   button right, so it needs its own fallback margin here too. */
.composer-actions > .btn { margin-left: auto; }

.composer-textarea-wrap { position: relative; flex: 1; min-width: 0; }

.composer-title-input {
  width: 100%;
  border: none;
  background: none;
  box-shadow: none;
  font-size: 16px;
  font-weight: 800;
  padding: 0 0 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.composer-title-input:focus { box-shadow: none; }

.composer-tag-hint { margin: 6px 0 0 56px; font-size: 12px; color: var(--text-faint); }

.composer-tag-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 40;
  margin-top: 4px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.composer-tag-suggestions.open { display: block; }

.composer-tag-suggestion-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.composer-tag-suggestion-item:hover { background: var(--bg); }

.composer-actions-left { display: flex; align-items: center; gap: 6px; }

.composer-tool { position: relative; }

.composer-tool-btn { flex-shrink: 0; }

.composer-tool-btn-labelled {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.composer-tool-btn-labelled:active { box-shadow: var(--shadow-pressed-sm); }

.composer-gif-preview {
  position: relative;
  margin: 10px 0 0 56px;
  display: flex;
}

.composer-gif-preview img {
  max-width: 220px;
  max-height: 160px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.composer-gif-preview .remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
}

.composer-popover {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 50;
  width: 260px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px;
}

.composer-popover.open { display: block; }
.composer-popover-wide { width: 300px; }

.composer-popover-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.composer-popover-tab {
  border: none;
  background: var(--bg);
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.composer-popover-tab.active { color: var(--accent); background: var(--accent-soft); box-shadow: var(--shadow-pressed-sm); }

.composer-emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2px;
  max-height: 180px;
  overflow-x: hidden;
  overflow-y: auto;
}

.composer-emoji-item {
  border: none;
  background: transparent;
  font-size: 20px;
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
}

.composer-emoji-item:hover { background: var(--bg); }

.composer-gif-search {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.composer-gif-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
}

.composer-gif-item {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.composer-gif-loading {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
  padding: 20px 0;
}

.composer-image-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.composer-image-preview-item {
  position: relative;
  width: 84px;
  height: 84px;
}
.composer-image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.composer-image-preview-item .remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  border: none;
  color: var(--text);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-carousel {
  position: relative;
  height: 420px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  touch-action: pan-y;
}
.post-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease;
}
.post-carousel-slide { flex: 0 0 100%; height: 100%; }
.post-carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.post-carousel-arrow:hover { background: rgba(0, 0, 0, 0.7); }
.post-carousel-prev { left: 10px; }
.post-carousel-next { right: 10px; }

.post-carousel-counter {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  z-index: 2;
}

.post-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}
.post-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}
.post-carousel-dot.active { width: 16px; background: #fff; }

@media (max-width: 600px) {
  .post-carousel { height: 320px; }
  .post-carousel-arrow { display: none !important; }
}

@media (max-width: 600px) {
  .composer-popover { left: -40px; }
}

.feed { display: flex; flex-direction: column; gap: 14px; }

.post-card {
  border: none;
  border-radius: var(--radius);
  padding: 18px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
}

.post-card-highlight { box-shadow: 0 0 0 3px var(--accent), var(--shadow-lg); }

.post-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.post-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post-author {
  font-weight: 700;
  font-size: 14.5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  min-width: 0;
}
.post-author-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.post-author svg { flex-shrink: 0; }
.post-time { font-size: 12.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.post-flagged-notice {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff2cf;
  color: #92650a;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.post-startup-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  flex-shrink: 0;
}

.post-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 6px;
}

.post-content {
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-line;
}

.post-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-top: 12px;
}

.active-tag-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 13.5px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.active-tag-clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-dark);
}

.post-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.post-tag {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-dark);
}
.post-tag:hover { text-decoration: underline; }

.post-content-tag {
  color: var(--accent-dark);
  font-weight: 700;
}
.post-content-tag:hover { text-decoration: underline; }

.post-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-report-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-faint);
  padding: 6px;
  border-radius: 50%;
}

.post-report-btn:hover { color: #d9342b; background: var(--bg-soft); }

.post-insight-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: none;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 13px;
  padding: 7px 13px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
.post-insight-btn:hover { box-shadow: var(--shadow); background: var(--accent-soft); }

.post-delete-btn {
  background: none;
  border: none;
  color: var(--text-faint);
  padding: 6px;
  border-radius: 50%;
  margin-left: 6px;
  flex-shrink: 0;
}
.post-delete-btn:hover { color: #d9342b; background: var(--bg-soft); }

@media (max-width: 480px) {
  .post-footer { gap: 6px; }
  .like-btn, .pill-count-btn { padding: 7px 10px; }
  .post-insight-btn { padding: 7px 9px; }
  .post-insight-btn-label { display: none; }
}

.comment-section {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.comment-section.open { display: block; }

.comment-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }

.comment-row { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius-sm); transition: background-color 0.4s ease; }
.comment-body { flex: 1; min-width: 0; }
.comment-row.comment-highlight { background: var(--accent-soft); }
.comment-row.comment-highlight .comment-bubble { box-shadow: 0 0 0 2px var(--accent) inset; }

.comment-replies {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px 0 0 20px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}
.comment-row-reply .avatar { width: 24px !important; height: 24px !important; font-size: 11px !important; }

.comment-bubble {
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13.5px;
  line-height: 1.5;
}

.comment-author { font-weight: 700; margin-right: 4px; }
.comment-mention-link { font-weight: 700; color: var(--accent-dark); }
.comment-reply-btn { border: none; background: none; color: var(--text-faint); font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; }

.comment-gif-img { display: block; max-width: 200px; max-height: 150px; border-radius: 8px; margin-top: 6px; }

.comment-gif-preview {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 20;
}
.comment-gif-preview img { max-width: 160px; max-height: 120px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); display: block; }
.comment-gif-preview .remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.comment-reply-btn:hover { color: var(--accent-dark); }

.comment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0 12px;
}

.comment-like-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-faint);
}

.comment-like-btn:hover { color: var(--text-soft); }
.comment-like-btn.liked { color: var(--accent-dark); }

.comment-time { font-size: 11px; color: var(--text-faint); }
.comment-empty { font-size: 13px; color: var(--text-faint); text-align: center; padding: 8px 0; }

.profile-comment-list { display: flex; flex-direction: column; gap: 10px; }

.profile-comment-row {
  display: block;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  transition: box-shadow 0.15s ease;
}

.profile-comment-row:hover { box-shadow: var(--shadow); }

.profile-comment-context {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-comment-content { font-size: 14px; color: var(--text); line-height: 1.5; }
.profile-comment-time { font-size: 11.5px; color: var(--text-faint); margin-top: 6px; }

.comment-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-input-wrap { position: relative; flex: 1; min-width: 0; }

.comment-form input {
  width: 100%;
  border-radius: 999px;
  padding: 9px 16px;
}

.comment-mention-suggestions {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.comment-mention-suggestions.open { display: block; }

.comment-mention-suggestion-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.comment-mention-suggestion-row:hover { background: var(--bg); }
.comment-mention-suggestion-row .uac-name { font-size: 13px; font-weight: 700; display: block; }
.comment-mention-suggestion-row .uac-username { font-size: 11.5px; color: var(--text-faint); }

.comment-login-prompt {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
}

/* ==========================================================================
   About page
   ========================================================================== */

.about-mission {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 20px 0 56px;
  flex-wrap: wrap;
}

.about-mission-copy { flex: 1; min-width: 280px; }
.about-mission-copy h2 { font-size: 28px; line-height: 1.25; margin: 14px 0 16px; }
.about-mission-copy p { font-size: 15.5px; color: var(--text-soft); max-width: 500px; margin-bottom: 26px; }

.about-mission-art {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}

.feature-card {
  border: none;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.feature-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.feature-card p { font-size: 13.5px; color: var(--text-soft); }

.feature-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .feature-grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feature-grid-4 { grid-template-columns: 1fr; } }

.sniko-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 40px;
}

.sniko-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border);
}

.sniko-step:last-child { border-bottom: none; }

.sniko-step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.sniko-step h4 { font-size: 15px; margin-bottom: 4px; }
.sniko-step p { font-size: 13.5px; color: var(--text-soft); line-height: 1.5; }

.sniko-version-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}

.sniko-version-badge {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 20px;
}

.sniko-version-card h4 { font-size: 15px; margin-bottom: 6px; }
.sniko-version-card p { font-size: 13.5px; color: var(--text-soft); line-height: 1.5; }

@media (max-width: 600px) {
  .sniko-version-card { flex-direction: column; }
}

.sniko-changelog {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.sniko-changelog-entry {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.sniko-changelog-version {
  flex-shrink: 0;
  width: 52px;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 6px 0;
}

.sniko-changelog-date {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.sniko-changelog-body ul { display: flex; flex-direction: column; gap: 6px; padding-left: 18px; }
.sniko-changelog-body li { font-size: 13.5px; color: var(--text-soft); line-height: 1.5; }

@media (max-width: 600px) {
  .sniko-changelog-entry { flex-direction: column; }
}

/* Guide page */
.guide-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px 28px;
  margin-bottom: 20px;
}
.guide-section h3 { margin-bottom: 10px; }
.guide-intro { color: var(--text-soft); font-size: 14px; line-height: 1.55; margin-bottom: 14px; }
.guide-intro:last-child { margin-bottom: 0; }

.help-contact-card {
  text-align: center;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-card));
}
.help-contact-card h3 { justify-content: center; }
.help-contact-card .guide-intro { max-width: 440px; margin-left: auto; margin-right: auto; }

.guide-formula {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12.5px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  overflow-x: auto;
  white-space: nowrap;
}

.guide-table-wrap { overflow-x: auto; margin-bottom: 16px; }
.guide-table-wrap:last-child { margin-bottom: 0; }

.guide-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.guide-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  font-weight: 700;
  padding: 8px 14px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.guide-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.guide-table tr:last-child td { border-bottom: none; }
.guide-table tbody tr:hover { background: var(--bg-soft); }

.guide-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg);
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
}
.guide-note .icon { flex-shrink: 0; margin-top: 2px; color: var(--accent-dark); }
.guide-note a { color: var(--accent-dark); font-weight: 700; text-decoration: underline; }

.guide-concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.guide-concept-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.guide-concept-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  margin-bottom: 10px;
}

.guide-concept-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.guide-concept-desc { font-size: 13px; color: var(--text-soft); line-height: 1.5; }

.guide-level-track {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.guide-level-stage {
  position: relative;
  padding: 12px 0 12px 22px;
  border-left: 2px solid var(--border);
}

.guide-level-stage::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.guide-level-stage:last-child { border-left-color: transparent; }
.guide-level-stage-name { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.guide-level-stage-desc { font-size: 13px; color: var(--text-soft); }

/* ==========================================================================
   Category chip picker / Color swatch picker (forms)
   ========================================================================== */

.category-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }

.category-chip {
  position: relative;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-soft);
  background: var(--bg);
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.category-chip input { position: absolute; opacity: 0; pointer-events: none; }

.category-chip:hover { box-shadow: var(--shadow); color: var(--text); }

.category-chip.active {
  background: linear-gradient(145deg, #3f8bff, #2670eb);
  color: #fff;
  box-shadow: var(--shadow-pressed-sm);
}

.color-swatch-row { display: flex; flex-wrap: wrap; gap: 12px; }

.color-swatch {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--avatar-shadow);
  transition: box-shadow 0.15s ease;
}

.color-swatch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }

.color-swatch::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.color-swatch.selected {
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
}

.color-swatch.selected::after { opacity: 1; }

/* ==========================================================================
   Messenger
   ========================================================================== */

.messenger-container { max-width: 1000px; padding-top: 16px; padding-bottom: 16px; }

.messenger-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  grid-template-rows: minmax(0, 1fr);
  height: calc(100vh - 88px - 24px - var(--verify-banner-h, 0px));
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.messenger-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  min-width: 0;
  min-height: 0;
}

.messenger-sidebar-tabs { display: flex; gap: 4px; padding: 14px 14px 0; }
.messenger-tab {
  flex: 1;
  padding: 9px 10px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-faint);
  cursor: pointer;
}
.messenger-tab.active { background: var(--accent-soft); color: var(--accent-dark); }

.messenger-conversation-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.messenger-list-empty { padding: 20px 10px; text-align: center; font-size: 13px; color: var(--text-faint); }

.messenger-conversation-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 10px;
  border: none;
  background: none;
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.messenger-conversation-row:hover { background: var(--bg); }
.messenger-conversation-row.active { background: var(--accent-soft); }
.messenger-conversation-row.unread .messenger-row-name,
.messenger-conversation-row.unread .messenger-row-preview { font-weight: 800; color: var(--text); }
.messenger-conversation-row.unread .avatar { box-shadow: var(--avatar-shadow), 0 0 0 2px var(--bg-card), 0 0 0 4px var(--accent); }

.messenger-row-info { flex: 1; min-width: 0; }
.messenger-row-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.messenger-row-pin-icon { color: var(--text-faint); flex-shrink: 0; }
.messenger-row-preview {
  font-size: 12.5px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}
.messenger-row-meta { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.messenger-row-time { font-size: 11px; color: var(--text-faint); }
.messenger-row-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.messenger-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.messenger-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  color: var(--text-soft);
}
.messenger-empty-state h3 { margin: 12px 0 6px; }
.messenger-empty-state p { max-width: 300px; font-size: 13.5px; }

.messenger-thread-active { display: flex; flex-direction: column; height: 100%; min-height: 0; }

.messenger-thread-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.messenger-back-btn { display: none; }
#threadHeaderUser { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
#threadHeaderUser > div { min-width: 0; }
.messenger-header-name-line { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 14px; }
.messenger-header-name-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.messenger-header-subtitle { font-size: 12px; font-weight: 500; color: var(--text-faint); margin-top: 1px; display: flex; align-items: center; gap: 5px; }
.messenger-header-subtitle.online { color: #17a34a; font-weight: 700; }
.messenger-header-subtitle.online::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #17a34a; flex-shrink: 0; }

.messenger-thread-header-actions { position: relative; }

.messenger-theme-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  gap: 8px;
}
.messenger-theme-popover.open { display: flex; }
.messenger-theme-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3px transparent;
  transition: box-shadow 0.15s ease;
}
.messenger-theme-swatch:hover { box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3px var(--accent); }
.messenger-theme-default { background: var(--bg); }
.messenger-theme-ocean { background: linear-gradient(145deg, #2563eb, #0891b2); }
.messenger-theme-sunset { background: linear-gradient(145deg, #f97316, #db2777); }
.messenger-theme-forest { background: linear-gradient(145deg, #16a34a, #65a30d); }
.messenger-theme-berry { background: linear-gradient(145deg, #9333ea, #db2777); }
.messenger-theme-mono { background: linear-gradient(145deg, #52525b, #27272a); }

.messenger-request-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: var(--accent-soft);
  flex-shrink: 0;
}
.messenger-request-banner p { font-size: 12.5px; color: var(--text); margin: 0; }

.messenger-messages {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.messenger-messages[class*="messenger-theme-"]:not(.messenger-theme-default) {
  background-color: var(--bg);
  background-repeat: repeat, repeat, no-repeat, no-repeat;
}
.messenger-messages.messenger-theme-ocean {
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(255,255,255,0.035) 0, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 20px),
    linear-gradient(160deg, rgba(37,99,235,0.09), rgba(8,145,178,0.09)),
    radial-gradient(circle at 12% 92%, rgba(37,99,235,0.16), transparent 50%),
    radial-gradient(circle at 88% 6%, rgba(8,145,178,0.20), transparent 55%);
}
.messenger-messages.messenger-theme-sunset {
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(255,255,255,0.035) 0, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 20px),
    linear-gradient(160deg, rgba(249,115,22,0.09), rgba(219,39,119,0.09)),
    radial-gradient(circle at 12% 92%, rgba(249,115,22,0.18), transparent 50%),
    radial-gradient(circle at 88% 6%, rgba(219,39,119,0.18), transparent 55%);
}
.messenger-messages.messenger-theme-forest {
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(255,255,255,0.035) 0, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 20px),
    linear-gradient(160deg, rgba(22,163,74,0.09), rgba(101,163,13,0.09)),
    radial-gradient(circle at 12% 92%, rgba(101,163,13,0.16), transparent 50%),
    radial-gradient(circle at 88% 6%, rgba(22,163,74,0.18), transparent 55%);
}
.messenger-messages.messenger-theme-berry {
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(255,255,255,0.035) 0, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 20px),
    linear-gradient(160deg, rgba(147,51,234,0.09), rgba(219,39,119,0.09)),
    radial-gradient(circle at 12% 92%, rgba(147,51,234,0.18), transparent 50%),
    radial-gradient(circle at 88% 6%, rgba(219,39,119,0.16), transparent 55%);
}
.messenger-messages.messenger-theme-mono {
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 20px),
    linear-gradient(160deg, rgba(82,82,91,0.10), rgba(39,39,42,0.10)),
    radial-gradient(circle at 12% 92%, rgba(82,82,91,0.14), transparent 50%),
    radial-gradient(circle at 88% 6%, rgba(39,39,42,0.16), transparent 55%);
}

/* These gradients were tuned against dark mode's near-black --bg, where a
   0.1-0.2 alpha tint reads as a rich colored glow. Layered over light
   mode's pale --bg instead, the same low alpha barely tints anything —
   it just looks like a washed-out, murky gray-green with poor contrast
   against message bubbles. Light mode gets its own, stronger pass instead
   of inheriting dark mode's tuning. */
:root[data-theme="light"] .messenger-messages.messenger-theme-ocean {
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 20px),
    linear-gradient(160deg, rgba(37,99,235,0.16), rgba(8,145,178,0.16)),
    radial-gradient(circle at 12% 92%, rgba(37,99,235,0.26), transparent 50%),
    radial-gradient(circle at 88% 6%, rgba(8,145,178,0.32), transparent 55%);
}
:root[data-theme="light"] .messenger-messages.messenger-theme-sunset {
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 20px),
    linear-gradient(160deg, rgba(249,115,22,0.16), rgba(219,39,119,0.16)),
    radial-gradient(circle at 12% 92%, rgba(249,115,22,0.28), transparent 50%),
    radial-gradient(circle at 88% 6%, rgba(219,39,119,0.28), transparent 55%);
}
:root[data-theme="light"] .messenger-messages.messenger-theme-forest {
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 20px),
    linear-gradient(160deg, rgba(22,163,74,0.16), rgba(101,163,13,0.16)),
    radial-gradient(circle at 12% 92%, rgba(101,163,13,0.26), transparent 50%),
    radial-gradient(circle at 88% 6%, rgba(22,163,74,0.28), transparent 55%);
}
:root[data-theme="light"] .messenger-messages.messenger-theme-berry {
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 20px),
    linear-gradient(160deg, rgba(147,51,234,0.16), rgba(219,39,119,0.16)),
    radial-gradient(circle at 12% 92%, rgba(147,51,234,0.28), transparent 50%),
    radial-gradient(circle at 88% 6%, rgba(219,39,119,0.26), transparent 55%);
}
:root[data-theme="light"] .messenger-messages.messenger-theme-mono {
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(0,0,0,0.04) 0, rgba(0,0,0,0.04) 1px, transparent 1px, transparent 20px),
    linear-gradient(160deg, rgba(82,82,91,0.18), rgba(39,39,42,0.18)),
    radial-gradient(circle at 12% 92%, rgba(82,82,91,0.24), transparent 50%),
    radial-gradient(circle at 88% 6%, rgba(39,39,42,0.26), transparent 55%);
}

.messenger-bubble-row { display: flex; flex-direction: column; max-width: 74%; }
.messenger-bubble-row.mine { align-self: flex-end; align-items: flex-end; }
.messenger-bubble-row.theirs { align-self: flex-start; align-items: flex-start; }

.messenger-bubble {
  padding: 11px 15px;
  border-radius: 17px;
  font-size: 14.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
}
.messenger-bubble-row.mine .messenger-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.messenger-bubble-row.theirs .messenger-bubble { background: var(--bg); color: var(--text); border-bottom-left-radius: 4px; }
.messenger-bubble-row.mine .messenger-bubble a { color: #fff; text-decoration: underline; }
.messenger-bubble-row.theirs .messenger-bubble a { color: var(--accent-dark); }
.messenger-bubble-time { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; font-size: 10.5px; color: var(--text-faint); margin-top: 3px; padding: 0 4px; white-space: nowrap; }
.messenger-receipt-ticks { display: inline-flex; flex-shrink: 0; color: var(--text-faint); }
.messenger-receipt-ticks.read { color: #2e7dff; }

.messenger-bubble-gif { max-width: 220px; max-height: 220px; border-radius: 14px; box-shadow: var(--shadow-sm); display: block; }

.messenger-shared-post,
.messenger-shared-project {
  display: flex;
  flex-direction: column;
  width: 236px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.messenger-shared-post:hover,
.messenger-shared-project:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.messenger-shared-post-img { width: 100%; height: 128px; object-fit: cover; display: block; background: var(--bg); }
.messenger-shared-post-body,
.messenger-shared-project-body { padding: 11px 13px 12px; position: relative; }
.messenger-shared-post-author,
.messenger-shared-project-author { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.messenger-shared-post-author .avatar,
.messenger-shared-project-author .avatar { width: 20px !important; height: 20px !important; font-size: 10px !important; }
.messenger-shared-post-snippet,
.messenger-shared-project-snippet { font-size: 12.5px; color: var(--text-soft); line-height: 1.45; }
.messenger-shared-post-open-hint,
.messenger-shared-project-open-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-dark);
}

.messenger-slash-suggestions {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 16px;
  right: 16px;
  z-index: 40;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  max-height: 220px;
  overflow-y: auto;
}
.messenger-slash-suggestions.open { display: block; }
.messenger-slash-suggestions-hint { font-size: 11px; font-weight: 700; color: var(--text-faint); padding: 6px 10px 2px; }

.messenger-compose-tool { position: relative; }

.messenger-attach-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 50;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 170px;
  flex-direction: column;
  gap: 2px;
}
.messenger-attach-menu.open { display: flex; }
.messenger-attach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.messenger-attach-item:hover { background: var(--bg); }
.messenger-attach-item-mobile-only { display: none; }
@media (max-width: 768px) {
  .messenger-attach-item-mobile-only { display: flex; }
}
.messenger-attach-gif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 16px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 800;
  flex-shrink: 0;
}

.messenger-reply-preview,
.messenger-edit-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.messenger-reply-preview-bar { width: 3px; align-self: stretch; border-radius: 2px; background: var(--accent); flex-shrink: 0; }
.messenger-reply-preview-body { flex: 1; min-width: 0; }
.messenger-reply-preview-label { font-size: 12px; font-weight: 700; color: var(--accent-dark); }
.messenger-reply-preview-snippet {
  font-size: 12.5px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.messenger-edit-banner { font-size: 12.5px; font-weight: 700; color: var(--accent-dark); justify-content: space-between; }
.messenger-edit-banner span { display: flex; align-items: center; gap: 6px; }

.messenger-typing-indicator {
  padding: 4px 16px;
  font-size: 12px;
  font-style: italic;
  color: var(--text-faint);
}

.messenger-compose {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.messenger-compose .composer-popover {
  top: auto;
  bottom: calc(100% + 10px);
  left: 0;
}
.messenger-compose textarea {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  padding: 10px 14px;
  border: none;
  border-radius: 20px;
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  font-size: 13.5px;
  color: var(--text);
  font-family: inherit;
  resize: none;
}
.messenger-compose .btn { border-radius: 50%; width: 40px; height: 40px; padding: 0; flex-shrink: 0; }
.messenger-compose-tool #messengerAttachToggle { width: 40px; height: 40px; flex-shrink: 0; }

@media (max-width: 768px) {
  .messenger-container { padding: 0; max-width: none; }
  .messenger-layout {
    grid-template-columns: 1fr;
    height: calc(100vh - 58px - 64px - var(--verify-banner-h, 0px));
    border-radius: 0;
    box-shadow: none;
    position: relative;
  }
  .messenger-sidebar {
    border-right: none;
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--bg-card);
  }
  .messenger-thread {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--bg-card);
  }
  .messenger-layout.thread-open .messenger-sidebar { display: none; }
  .messenger-layout.thread-open .messenger-thread { z-index: 2; }
  .messenger-back-btn { display: inline-flex; }

  /* A chat thread is a full-screen destination on mobile, same as any real
     messenger — the site header/bottom-nav/PWA banner would otherwise eat
     into the one thing that actually needs the space: the conversation. */
  body.messenger-thread-open .site-header,
  body.messenger-thread-open .mobile-bottom-nav,
  body.messenger-thread-open .pwa-install-banner { display: none !important; }
  body.messenger-thread-open { padding-bottom: 0 !important; }
  body.messenger-thread-open .messenger-layout {
    /* --vvh is kept in sync with window.visualViewport.height by script.js —
       that's the one number that actually shrinks when the on-screen
       keyboard opens (window.innerHeight/100dvh do not reliably, which is
       what left a gap between the compose bar and the keyboard). Bottom is
       deliberately NOT pinned via inset here — with top+height both set,
       an explicit bottom would just be discarded per spec anyway, so height
       is the one source of truth instead of two conflicting ones. */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--vvh, 100dvh);
    z-index: 500;
  }
  body.messenger-thread-open .messenger-thread-header {
    padding-top: calc(12px + env(safe-area-inset-top));
  }
  body.messenger-thread-open .messenger-compose {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

/* Chat settings sheet — opened from the header's 3-dot menu */
.chat-settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.55);
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.chat-settings-overlay.open { display: flex; }

.chat-settings-sheet {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 22px 18px;
  width: 100%;
  max-width: 360px;
  max-height: 85vh;
  overflow-y: auto;
}
.chat-settings-close-x { position: absolute; top: 10px; right: 10px; }

.chat-settings-header { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 18px; }
.chat-settings-name { font-size: 16px; font-weight: 800; margin-top: 12px; display: flex; align-items: center; gap: 5px; }
.chat-settings-view-profile { font-size: 12.5px; font-weight: 700; color: var(--accent-dark); margin-top: 4px; }

.chat-settings-list { display: flex; flex-direction: column; gap: 2px; }
.chat-settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 10px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.chat-settings-row:hover { background: var(--bg); }
.chat-settings-row-icon { display: flex; color: var(--text-soft); flex-shrink: 0; }
.chat-settings-row-arrow { margin-left: auto; color: var(--text-faint); display: flex; }
.chat-settings-row-switch { margin-left: auto; }
.chat-settings-row-danger { color: #d9342b; }
.chat-settings-row-danger .chat-settings-row-icon { color: #d9342b; }

.messenger-theme-swatch-row { display: flex; gap: 10px; padding: 6px 10px 12px; }

/* Long-press / right-click message context menu + quick reaction strip —
   positioned via JS (fixed, top/left set at open time) rather than CSS,
   since they need to track wherever the pressed bubble happens to be. */
.chat-context-menu,
.chat-reaction-strip {
  display: none;
  position: fixed;
  z-index: 700;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.chat-context-menu.open,
.chat-reaction-strip.open { display: flex; }

.chat-context-menu { flex-direction: column; padding: 6px; min-width: 150px; gap: 2px; }
.chat-context-item {
  border: none;
  background: none;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.chat-context-item:hover { background: var(--bg); }
.chat-context-item-danger { color: #d9342b; }

.chat-reaction-strip { align-items: center; padding: 6px 8px; gap: 2px; }
.chat-reaction-item {
  border: none;
  background: none;
  font-size: 21px;
  padding: 5px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.1s ease, background 0.1s ease;
}
.chat-reaction-item:hover { background: var(--bg); transform: scale(1.15); }

.messenger-bubble-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.messenger-reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-soft);
  border: none;
  cursor: pointer;
}
.messenger-reaction-pill.mine { background: var(--accent-soft); color: var(--accent-dark); }

.messenger-bubble-reply-quote {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,0.08);
  margin-bottom: 5px;
  font-size: 12px;
  max-width: 100%;
  border-left: 3px solid currentColor;
  opacity: 0.85;
}
.messenger-bubble-reply-quote-label { font-weight: 700; }
.messenger-bubble-reply-quote-snippet { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.messenger-bubble-edited-tag { font-size: 10px; opacity: 0.7; margin-left: 4px; }
.messenger-bubble-deleted { font-style: italic; opacity: 0.65; }
.messenger-bubble-image { max-width: 240px; max-height: 280px; border-radius: 14px; box-shadow: var(--shadow-sm); display: block; cursor: pointer; }

.chat-image-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 800;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.chat-image-lightbox.open { display: flex; }
.chat-image-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: var(--shadow-lg); }
.chat-image-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.chat-image-lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

/* ==========================================================================
   Startup cover banner
   ========================================================================== */

.startup-cover {
  padding: 44px 0 0;
  margin-top: -40px;
  margin-bottom: -44px;
  background-size: cover;
  background-position: center;
  min-height: 100px;
  display: flex;
  align-items: flex-end;
}

.startup-cover-logo {
  display: inline-flex;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--bg);
}

.startup-cover-logo .card-logo,
.startup-cover-logo .card-logo-img {
  font-size: 34px;
  border-radius: calc(var(--radius) - 4px) !important;
}

/* ==========================================================================
   Project cards (profile page)
   ========================================================================== */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.project-card {
  border: none;
  border-radius: var(--radius);
  padding: 18px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.project-card-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  margin-top: 8px;
}

.project-card-image {
  width: calc(100% + 36px);
  margin: -18px -18px 14px;
  max-width: none;
  height: 140px;
  object-fit: cover;
}

.cover-preview {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.edit-screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.edit-screenshot-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.edit-screenshot-item img { width: 100%; height: 90px; object-fit: cover; display: block; }
.edit-screenshot-remove {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: rgba(20, 24, 34, 0.55);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.edit-screenshot-item:hover .edit-screenshot-remove,
.edit-screenshot-remove:has(input:checked) { opacity: 1; }
.edit-screenshot-remove:has(input:checked) { background: rgba(217, 52, 43, 0.75); }

.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.file-choose-row { display: flex; align-items: center; gap: 12px; }
.file-choose-name {
  font-size: 13px;
  color: var(--text-faint);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-quest-list { display: flex; flex-direction: column; gap: 18px; }
.progress-quest-row { padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.progress-quest-row:last-child { border-bottom: none; padding-bottom: 0; }
.progress-quest-top { display: flex; align-items: flex-start; gap: 12px; }
.progress-quest-check {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--text-faint);
}
.progress-quest-row.done .progress-quest-check { background: var(--accent-soft); color: var(--accent-dark); }
.progress-quest-info { flex: 1; min-width: 0; }
.progress-quest-title { font-weight: 700; font-size: 14px; }
.progress-quest-desc { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }
.progress-quest-xp { font-size: 12.5px; font-weight: 700; color: var(--accent-dark); flex-shrink: 0; }
.progress-quest-count { font-size: 11.5px; color: var(--text-faint); margin-top: 6px; text-align: right; }

/* Admin dashboard */
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.admin-stat-tile {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  text-align: center;
}
.admin-stat-tile .num { font-size: 26px; font-weight: 800; }
.admin-stat-tile .label { font-size: 12px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 4px; }

.admin-chart-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.admin-chart-title { font-size: 14px; font-weight: 700; }
.admin-chart-sub { font-size: 12.5px; color: var(--text-faint); margin-bottom: 18px; margin-top: 2px; }

.admin-bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; }
.admin-bar-col { flex: 1; display: flex; align-items: flex-end; height: 100%; min-width: 0; cursor: default; }
.admin-bar {
  width: 100%;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: opacity 0.15s ease;
}
.admin-bar-col:hover .admin-bar { opacity: 0.7; }
.admin-bar-axis { display: flex; gap: 3px; margin-top: 8px; }
.admin-bar-axis-label {
  flex: 1;
  font-size: 10px;
  color: var(--text-faint);
  text-align: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-hbar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.admin-hbar-row:last-child { margin-bottom: 0; }
.admin-hbar-label { width: 220px; flex-shrink: 0; font-size: 13px; color: var(--text); }
.admin-hbar-track { flex: 1; background: var(--bg); border-radius: 999px; height: 18px; overflow: hidden; }
.admin-hbar-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.admin-hbar-count { width: 28px; text-align: right; font-size: 13px; font-weight: 700; flex-shrink: 0; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  font-weight: 700;
  padding: 8px 14px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--bg-soft); }

.admin-feedback-list { display: flex; flex-direction: column; gap: 14px; }
.admin-feedback-row { display: flex; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.admin-feedback-row:last-child { border-bottom: none; padding-bottom: 0; }
.admin-feedback-thumb { width: 100px; height: 70px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; box-shadow: var(--shadow-sm); }
.admin-feedback-thumb-empty { display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--text-faint); }
.admin-feedback-body { flex: 1; min-width: 0; }
.admin-feedback-meta { display: flex; gap: 10px; font-size: 12.5px; color: var(--text-faint); font-weight: 700; margin-bottom: 4px; }
.admin-feedback-desc { font-size: 13.5px; color: var(--text); margin: 6px 0; }

.admin-investor-review-actions { display: flex; gap: 8px; margin-top: 8px; }
.admin-reject-reason-row { gap: 8px; margin-top: 8px; align-items: flex-start; }
.admin-reject-reason-row textarea {
  flex: 1;
  min-height: 46px;
  padding: 8px 10px;
  font-size: 13px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pressed-sm);
  color: var(--text);
}

.admin-restrict-form textarea {
  width: 100%;
  min-height: 60px;
  padding: 9px 12px;
  font-size: 13px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pressed-sm);
  color: var(--text);
}

@media (max-width: 700px) {
  .admin-stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-hbar-label { width: 130px; font-size: 12px; }
}

.email-verify-banner {
  background: rgba(255, 184, 0, 0.12);
  border-bottom: 1px solid rgba(255, 184, 0, 0.3);
}
.email-verify-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text);
}
.email-verify-banner-inner svg { flex-shrink: 0; vertical-align: -3px; margin-right: 2px; }
.email-verify-banner-inner strong { font-weight: 700; }

.pwa-install-banner {
  position: fixed;
  left: 16px;
  bottom: 16px;
  width: calc(100% - 32px);
  max-width: 420px;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  z-index: 160;
}
.pwa-install-icon { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.pwa-install-text { flex: 1; min-width: 0; }
.pwa-install-title { font-weight: 700; font-size: 13.5px; }
.pwa-install-sub { font-size: 12px; color: var(--text-faint); }

.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
}
.footer-link-btn:hover { color: var(--text); }

.feedback-modal { max-width: 460px; }
.feedback-screenshot-wrap { margin-bottom: 12px; }
.feedback-screenshot-wrap img {
  width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  max-height: 220px;
  object-fit: cover;
  object-position: top;
}

.crop-modal { max-width: 400px; text-align: center; }
.crop-canvas-wrap {
  display: flex;
  justify-content: center;
  background: #111;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
}
.crop-canvas-wrap canvas { border-radius: 6px; cursor: grab; touch-action: none; }
.crop-canvas-wrap canvas:active { cursor: grabbing; }
.crop-zoom-slider { width: 100%; margin-bottom: 4px; }

.avatar-upload-row input[type="file"] {
  flex: 1;
  font-size: 12.5px;
  padding: 8px 10px;
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.project-card h4 { font-size: 15px; min-width: 0; overflow-wrap: break-word; }

.project-card p {
  font-size: 13.5px;
  color: var(--text-soft);
  margin: 8px 0 10px;
  overflow-wrap: break-word;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

.mobile-explore-widgets { display: none; }

@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
  .rankings-layout { grid-template-columns: 1fr; }
  .feed-layout { grid-template-columns: 1fr; }
  /* Home feed's discovery widgets (quests/founders-to-discover) move into the
     mobile hamburger drawer via JS instead of sitting inline in the feed —
     profile.php's identity sidebar (.profile-side) is untouched. Trending
     Startups / Startups Hiring are startup-related, so their mobile home is
     the Explore page instead (.mobile-explore-widgets below). */
  .feed-layout .feed-side:not(.profile-side) { display: none; }
  .feed-layout .profile-side {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .mobile-explore-widgets { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
  .globe-wrap { width: 340px; height: 340px; }
  .profile-stat-row:not(.profile-card-stats) { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .globe-wrap { width: 260px; height: 260px; opacity: 0.22; }
  .rankings-arena { padding: 32px 0 48px; }
}

@media (max-width: 768px) {
  .hide-mobile { display: none; }
  .menu-toggle { display: flex; }

  .main-nav { display: none; }

  .hide-desktop { display: block; }

  .mobile-search-wrap { display: block; }
  body.has-bottom-nav .logo-text { display: none; }
  body.has-bottom-nav .header-inner { gap: 8px; }
  body.has-bottom-nav .header-actions { gap: 8px; }

  body.has-bottom-nav .mobile-bottom-nav { display: flex; }
  body.has-bottom-nav { padding-bottom: 62px; }
  body.has-bottom-nav .pwa-install-banner { bottom: 74px; }
  .pwa-install-banner { left: 16px; right: 16px; width: auto; margin: 0 auto; }

  .hero-inner { flex-direction: column; padding: 40px 24px 32px; text-align: center; }
  .hero-copy p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-copy h1 { font-size: 30px; }
  .hero-art { max-width: 300px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .people-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .profile-stat-row:not(.profile-card-stats) { grid-template-columns: 1fr 1fr; }
  .about-mission { flex-direction: column-reverse; text-align: center; padding-top: 0; }
  .about-mission-copy p { margin-left: auto; margin-right: auto; }
  .about-mission-copy .hero-actions { justify-content: center; }
  .feature-grid { grid-template-columns: 1fr; }

  .leaderboard-row { flex-wrap: wrap; }
  .lb-right {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-left: 56px;
    margin-top: 4px;
  }
  .lb-stats { padding-left: 0; }

  .form-card { padding: 26px 20px; }
  .form-row { flex-direction: column; gap: 0; }
  .startup-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .page-hero h1 { font-size: 27px; }
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 26px 20px; }
}

/* ==========================================================================
   Post Insights (data viz)
   ========================================================================== */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.back-link .icon { transform: rotate(180deg); }

.insight-post-preview {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 20px;
}
.insight-post-content { font-size: 14px; line-height: 1.5; }
.insight-post-time { font-size: 12px; color: var(--text-faint); margin-top: 4px; }

.insight-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.insight-stat {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 14px;
  text-align: center;
}

.insight-stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.insight-stat-icon-blue { background: var(--accent-soft); color: var(--accent-dark); }
.insight-stat-icon-red { background: #ffe0e0; color: #d9342b; }
.insight-stat-icon-purple { background: #ece4ff; color: #6d3ff0; }
.insight-stat-icon-green { background: #d9f5e6; color: #0f766e; }

.insight-stat-num { font-size: 22px; font-weight: 800; }
.insight-stat-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 3px;
}
.insight-stat-vs { font-size: 10.5px; color: var(--text-faint); margin-top: 4px; }

.insight-smart-card {
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-card) 70%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.insight-smart-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}
.insight-smart-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.insight-smart-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.4;
}
.insight-smart-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  margin-top: 1px;
}

.insight-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 20px;
}
.insight-section h3 { font-size: 15px; margin-bottom: 14px; }

/* ==========================================================================
   Dark theme — the toggle in the header dropdown / settings page stamps
   data-theme="dark" on <html> (see the inline no-flash script in header.php
   and the .theme-toggle-input handler in script.js). Since almost every
   surface/text/shadow in this file already reads from the vars below, most
   of the site flips automatically; only the handful of selectors below that
   used to hardcode a light-mode color need an explicit override.
   ========================================================================== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171a23;
  --bg-soft: #1e222d;
  --bg-card: #1e222d;
  --border: #2b3040;
  --text: #eef1f8;
  --text-soft: #a3adc2;
  --text-faint: #6b7488;
  --accent: #4d8bff;
  --accent-dark: #7aa9ff;
  --accent-soft: #1c2b4d;
  --success: #2dd4bf;
  --gold: #ffc93c;

  --neu-light: rgba(255, 255, 255, 0.045);
  --neu-dark: rgba(0, 0, 0, 0.55);
  --neu-light-strong: rgba(255, 255, 255, 0.07);
  --neu-dark-strong: rgba(0, 0, 0, 0.7);
  --avatar-shadow: 3px 3px 7px rgba(0, 0, 0, 0.5), -2px -2px 6px rgba(255, 255, 255, 0.04);
}

:root[data-theme="dark"] .site-header {
  background: rgba(23, 26, 35, 0.88);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] .hero-section {
  background: linear-gradient(180deg, #1c2230 0%, #171a23 100%);
}

:root[data-theme="dark"] .leaderboard-row.row-medal-gold { background: linear-gradient(90deg, #2b2410 0%, #1e222d 14%); }
:root[data-theme="dark"] .leaderboard-row.row-medal-silver { background: linear-gradient(90deg, #23262d 0%, #1e222d 14%); }
:root[data-theme="dark"] .leaderboard-row.row-medal-bronze { background: linear-gradient(90deg, #2a2013 0%, #1e222d 14%); }

:root[data-theme="dark"] .notification-badge-red { background: #3a1e20; color: #ff8a80; }
:root[data-theme="dark"] .notification-badge-blue { background: var(--accent-soft); color: var(--accent-dark); }
:root[data-theme="dark"] .notification-badge-purple { background: #2a2350; color: #b8a4ff; }
:root[data-theme="dark"] .notification-badge-green { background: #163330; color: #5eead4; }
:root[data-theme="dark"] .notification-badge-gold { background: #3a2f10; color: #ffd873; }
:root[data-theme="dark"] .post-flagged-notice { background: #3a2f10; color: #ffd873; }
:root[data-theme="dark"] .alert-error { background: #3a1e20; color: #ff8a80; }
:root[data-theme="dark"] .alert-success { background: #133a30; color: #5eead4; }
:root[data-theme="dark"] .insight-stat-icon-red { background: #3a1e20; color: #ff8a80; }
:root[data-theme="dark"] .insight-stat-icon-purple { background: #2a2350; color: #b8a4ff; }
:root[data-theme="dark"] .insight-stat-icon-green { background: #163330; color: #5eead4; }
:root[data-theme="dark"] .community-score-badge { background: linear-gradient(135deg, #113d34, var(--bg-card)); color: #5eead4; }

/* viz-root: chart color roles, scoped so they never leak into the rest of the
   neumorphic UI. Light values default; dark values follow the OS setting or
   the viewer's theme toggle. */
.viz-root {
  color-scheme: light;
  --viz-surface: #fcfcfb;
  --viz-text-primary: #0b0b0b;
  --viz-text-secondary: #52514e;
  --viz-muted: #898781;
  --viz-gridline: #e1e0d9;
  --viz-series-1: #2a78d6;
  --viz-series-2: #008300;
  --viz-series-3: #e87ba4;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .viz-root {
    color-scheme: dark;
    --viz-surface: #1a1a19;
    --viz-text-primary: #ffffff;
    --viz-text-secondary: #c3c2b7;
    --viz-muted: #898781;
    --viz-gridline: #2c2c2a;
    --viz-series-1: #3987e5;
    --viz-series-2: #008300;
    --viz-series-3: #d55181;
  }
}
:root[data-theme="dark"] .viz-root {
  color-scheme: dark;
  --viz-surface: #1a1a19;
  --viz-text-primary: #ffffff;
  --viz-text-secondary: #c3c2b7;
  --viz-muted: #898781;
  --viz-gridline: #2c2c2a;
  --viz-series-1: #3987e5;
  --viz-series-2: #008300;
  --viz-series-3: #d55181;
}

.viz-legend { display: flex; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.viz-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--viz-text-secondary);
}
.viz-swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.insight-linechart-wrap { margin-bottom: 10px; }
.insight-areachart { width: 100%; height: 240px; display: block; }
.viz-gridline { stroke: var(--viz-gridline); stroke-width: 1; }
.viz-area-line { stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.viz-dot { stroke: var(--viz-surface); stroke-width: 1.5; }

.insight-linechart-axis {
  position: relative;
  height: 16px;
  font-size: 10.5px;
  color: var(--viz-muted);
}
.insight-linechart-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

.viz-table-view {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 12px;
}
.viz-table-view caption { text-align: left; font-size: 11px; color: var(--viz-muted); margin-bottom: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.viz-table-view th { text-align: left; padding: 6px 8px; color: var(--viz-text-secondary); border-bottom: 1px solid var(--viz-gridline); font-weight: 700; }
.viz-table-view td { padding: 6px 8px; border-bottom: 1px solid var(--viz-gridline); color: var(--viz-text-primary); }

.insight-country-list { display: flex; flex-direction: column; gap: 10px; }
.insight-country-row { display: flex; align-items: center; gap: 10px; }
.insight-country-name { width: 140px; flex-shrink: 0; font-size: 13px; font-weight: 600; }
.insight-country-bar-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  overflow: hidden;
}
.insight-country-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #86b6ef, #2a78d6);
}
.insight-country-count { width: 44px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--text-soft); }

@media (max-width: 600px) {
  .insight-stats-row { grid-template-columns: 1fr 1fr; }
  .insight-country-name { width: 100px; }
}

@media (max-width: 480px) {
  /* The "tag to a startup" select used to get squeezed down to just its
     arrow (e.g. "Not▾") next to the icon row + submit button — give it its
     own full-width row instead of fighting for space. */
  .composer-actions { flex-wrap: wrap; row-gap: 10px; }
  .composer-tag-select { max-width: none; flex: 1 1 100%; margin-left: 0; order: 3; }
  .composer-actions-left { order: 1; }
  .composer-actions > .btn { order: 4; margin-left: auto; }

  /* The explanatory hint next to the check-in button just needs the button
     itself once space is tight — drop it instead of squeezing both. */
  .checkin-form-actions .hint { display: none; }
  .checkin-form-actions { justify-content: flex-end; }
}

@media (max-width: 768px) {
  /* Scoped to logged-in users only (body.has-bottom-nav) — for them the
     same links (About, Meet Sniko, Guide, Privacy, Refund Policy) live in
     Settings > Personal instead, which a logged-out visitor has no way to
     reach. Hiding this unconditionally left mobile guests (and Paddle's own
     approval crawler, which never logs in) with no visible path at all to
     the Privacy/Terms/Refund pages Paddle requires the site to link to —
     they were only ever reachable from the desktop footer or the
     logged-in-only Settings menu. */
  body.has-bottom-nav .site-footer { display: none; }
}

/* Notification dropdown, mobile — placed last so it wins over the base
   .notification-list rule earlier in the file (same selector specificity,
   so source order decides; a media query block earlier in the cascade does
   NOT automatically win, which is what let the un-capped 400px rule through
   on mobile before this was moved here). */
@media (max-width: 600px) {
  .notification-dropdown {
    position: fixed;
    top: 76px;
    left: auto;
    right: 12px;
    width: 290px;
    max-width: calc(100vw - 24px);
  }
  .notification-dropdown-header { padding: 12px 14px 10px; font-size: 13px; }
  .notification-list { max-height: 42vh; padding: 4px; }
  .notification-row { padding: 9px 10px; gap: 10px; }
  .notification-icon-wrap { width: 30px; height: 30px; }
  .notification-msg { font-size: 12.5px; }
  .notification-time { font-size: 11px; }
  .notification-see-all { padding: 10px 14px; font-size: 12.5px; }
}
