:root {
  --bg: #000000;
  --bg-elevated: #000000;
  --bg-card: #000000;
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-panel: #000000;
  --border: rgba(61, 160, 253, 0.22);
  --border-strong: rgba(61, 160, 253, 0.45);
  --text: #faf6f6;
  --text-muted: rgba(250, 246, 246, 0.62);
  --brand: #3da0fd;
  --brand-soft: rgba(61, 160, 253, 0.35);
  --brand-glow: rgba(61, 160, 253, 0.18);
  --brand-hover: #2a8de8;
  --brand-light: #6bb8ff;
  --brand-teal: #14b8a6;
  --brand-teal-light: #2dd4bf;
  --brand-teal-hover: #0f9a8a;
  --brand-teal-glow: rgba(20, 184, 166, 0.28);
  --accent: #3da0fd;
  --accent-hover: #2a8de8;
  --like: #3da0fd;
  --on-brand: #000000;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --sidebar: 260px;
  --right: 320px;
  --feed-max: 640px;
  --font: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --mobile-nav-height: calc(68px + env(safe-area-inset-bottom, 0px));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
html {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
img { display: block; max-width: 100%; }

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--right);
  max-width: 1280px;
  margin: 0 auto;
}

.sidebar-left {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px 14px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-right: 1px solid var(--border);
  background: var(--bg);
}

.brand {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius);
  margin: 0 0 16px;
}
.brand:hover { background: var(--bg-hover); }

.brand-logo {
  width: min(140px, 100%);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px var(--brand-glow));
}

.nav-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 600;
  transition: background .2s, color .2s, transform .15s;
  border: 1px solid transparent;
  width: 100%;
}
.nav-item-icon {
  flex-shrink: 0;
  width: 26px;
  text-align: center;
  font-size: 20px;
  line-height: 1;
}
.nav-item-label { min-width: 0; }
.nav-item svg { width: 26px; height: 26px; fill: currentColor; }
.nav-item:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}
.nav-item.active {
  font-weight: 800;
  color: var(--text);
  background: var(--brand-glow);
  border-color: var(--border-strong);
}

.btn-post {
  margin: 12px 0 20px;
  width: 100%;
  max-width: none;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: var(--on-brand);
  font-size: 16px;
  font-weight: 800;
  padding: 14px 20px;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--brand-glow);
  letter-spacing: 0.01em;
}
.btn-post:hover {
  background: linear-gradient(135deg, var(--brand-hover), var(--brand));
  transform: translateY(-1px);
}

.account-mini {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  width: 100%;
  cursor: pointer;
}
.account-mini:hover { background: var(--bg-hover); }
.account-menu-btn {
  flex-shrink: 0;
  padding: 8px;
  font-size: 16px;
}
.header-profile-edit-btn {
  display: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
@media (min-width: 691px) {
  .header-profile-edit-btn:not([hidden]) {
    display: inline-flex;
  }
}
.logout-btn {
  margin-left: auto;
  padding: 8px 12px;
  font-size: 13px;
  white-space: nowrap;
  color: var(--text-muted);
}
.logout-btn:hover { color: var(--text); }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.auth-logo { margin-bottom: 8px; text-align: center; }
.auth-logo-img {
  width: min(240px, 80vw);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}
.auth-logo .brand-text { font-size: 32px; color: var(--brand); }
.auth-card h1 {
  margin: 16px 0 8px;
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  line-height: 1.25;
  text-align: center;
}
.auth-sub {
  color: var(--text-muted);
  margin: 0 0 24px;
  text-align: center;
  line-height: 1.45;
}
.auth-hint { color: var(--text-muted); font-size: 12px; margin: -8px 0 16px; }
.auth-password-checklist {
  list-style: none;
  padding: 0;
  margin: -6px 0 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.auth-password-checklist li { margin: 4px 0; padding-left: 1.1em; text-indent: -1.1em; }
.auth-password-checklist li::before { content: '○ '; opacity: 0.85; }
.auth-password-checklist li.is-ok { color: #4ade80; }
.auth-password-checklist li.is-ok::before { content: '✓ '; }
.auth-notice-verified {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(29, 155, 240, 0.35);
  background: rgba(29, 155, 240, 0.08);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}
.admin-panel-external-links,
.settings-fb-crosspost-link {
  margin: 0 0 14px;
}
.admin-fb-crosspost-link,
.settings-fb-crosspost-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(24, 119, 242, 0.45);
  background: rgba(24, 119, 242, 0.12);
  color: #6eb5ff;
  font-weight: 600;
  text-decoration: none;
}
.admin-fb-crosspost-link:hover,
.settings-fb-crosspost-link a:hover {
  background: rgba(24, 119, 242, 0.2);
}

.auth-email-ack-panel {
  margin: 14px 0 0;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(252, 132, 0, 0.45);
  background: rgba(252, 132, 0, 0.1);
}
.auth-email-ack-title {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 15px;
}
.auth-email-ack-text {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}
.auth-email-ack-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.auth-email-ack-actions .btn-primary {
  width: 100%;
}
.auth-email-ack-actions .icon-btn {
  width: 100%;
  justify-content: center;
}
.auth-card label {
  display: block;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 14px;
}
.auth-card input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
}
.auth-password-wrap {
  display: block;
  position: relative;
  margin-top: 6px;
}
.auth-password-wrap input {
  margin-top: 0;
  padding-right: 48px;
}
.auth-password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--text-muted);
}
.auth-password-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}
.auth-password-toggle:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 2px;
}
.auth-password-toggle img {
  display: block;
  width: 22px;
  height: 22px;
  opacity: 0.85;
  filter: brightness(0) invert(0.78);
}
.auth-password-toggle:hover img {
  opacity: 1;
  filter: brightness(0) invert(1);
}
.auth-submit { width: 100%; padding: 14px; font-size: 16px; margin-top: 8px; }
.auth-switch { text-align: center; margin: 20px 0 12px; }
.auth-switch button {
  border: 0;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 15px;
}
.auth-demo { text-align: center; color: var(--text-muted); font-size: 13px; }
.auth-demo code { color: var(--text); }
.auth-error {
  color: var(--on-brand);
  background: var(--accent);
  padding: 10px 12px;
  border-radius: 8px;
  text-align: center;
  margin-top: 12px;
}
.auth-success {
  color: #0d3d1f;
  background: #b8f5c8;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: center;
  margin-top: 12px;
}
.auth-password-suggest {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px dashed var(--brand-soft);
  border-radius: 8px;
  background: var(--brand-glow);
}
.auth-password-suggest strong {
  word-break: break-all;
  color: var(--text);
}
.auth-suggest-btn {
  margin-top: 8px;
  border: 1px solid var(--brand-soft);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--brand-glow);
  color: var(--brand-light);
}
.auth-suggest-btn:hover {
  background: var(--brand-soft);
  color: var(--text);
}

.auth-google-wrap { margin-top: 4px; }
.auth-google-wrap--locked {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.2);
}
.auth-human-gate {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: 8px 0 4px;
}
.auth-human-gate-lead {
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.45;
}
.auth-human-gate-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--brand-glow);
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  font-weight: 600;
}
.auth-human-gate-check input {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.auth-human-gate--checking .auth-human-gate-check,
.auth-human-gate--checking .auth-human-gate-lead {
  display: none;
}
.auth-gate-checking-panel {
  display: none;
  text-align: center;
  padding: 18px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--brand-glow);
  color: var(--brand-light);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}
.auth-human-gate--checking .auth-gate-checking-panel {
  display: block;
}
.auth-human-gate-check--busy {
  opacity: 0.65;
  pointer-events: none;
}
.auth-gate-status {
  margin: 0;
  text-align: center;
  color: var(--brand-light);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.auth-gate-error {
  margin: 0;
  text-align: center;
  color: #f87171;
  font-size: 14px;
  line-height: 1.4;
}
body.auth-gate-pending #authMainContent {
  display: none !important;
}
.auth-human-check {
  display: block;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--brand-glow);
}
.auth-recaptcha-notice {
  margin: 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
}
.auth-recaptcha-notice a {
  color: var(--brand-light);
  text-decoration: none;
}
.auth-recaptcha-notice a:hover {
  text-decoration: underline;
}
.auth-recaptcha-missing {
  margin: 0;
  text-align: center;
}
.auth-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.auth-human-check label {
  display: block;
  margin-bottom: 8px;
}
.auth-human-check input:not(.auth-honeypot) {
  width: 100%;
  margin-top: 6px;
}
.auth-google-btn-host {
  display: flex;
  justify-content: center;
  min-height: 44px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  margin: 20px 0 16px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, rgba(0, 0, 0, 0.12));
}
.auth-google-missing { margin-top: 16px; text-align: center; }
.auth-google-missing code { font-size: 12px; }

#verifyFields .auth-submit { margin-top: 8px; }
#verifyFields .icon-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  color: var(--accent);
}

.install-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 250;
  padding: 10px 12px;
  transform: translateY(calc(100% + 24px));
  transition: transform 0.25s ease;
  pointer-events: none;
}
.install-banner.visible {
  transform: translateY(0);
  pointer-events: auto;
}
.install-banner-inner {
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}
.install-banner-main {
  flex: 1;
  min-width: 0;
}
.install-banner-main strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}
.install-banner-main p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.35;
}
.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.install-banner-actions .btn-primary {
  white-space: nowrap;
  padding: 10px 14px;
  font-size: 14px;
}
.install-banner-close {
  min-width: 36px;
  min-height: 36px;
  padding: 0;
}

.install-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: end center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
.install-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}
.install-modal-panel {
  position: relative;
  width: min(100%, 420px);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
.install-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.install-modal-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}
.install-modal-close {
  flex-shrink: 0;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
}
.install-modal-lead {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
}
.install-modal-steps {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.install-modal-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.install-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 14px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.install-step-text {
  flex: 1;
  font-size: 15px;
  line-height: 1.45;
  padding-top: 3px;
}
.install-modal-done {
  width: 100%;
  padding: 12px 18px;
}
body.install-modal-open {
  overflow: hidden;
}

@media (min-width: 691px) {
  .install-banner {
    bottom: 16px;
  }
}

.follow-btn.following { color: var(--accent); border-color: var(--accent); }
.suggestion-row button.following { opacity: 0.7; }

.account-mini:hover { background: var(--bg-hover); }
.account-meta { display: flex; flex-direction: column; line-height: 1.2; }
.account-meta span { color: var(--text-muted); font-size: 14px; }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3da0fd;
  border: 2px solid #000;
  box-shadow: 0 0 0 2px #3da0fd;
  object-fit: cover;
}

.feed-column {
  position: relative;
  min-height: 100vh;
  max-width: var(--feed-max);
  width: 100%;
  margin: 0 auto;
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feed-column.view-transition {
  animation: viewFadeIn .24s ease;
}
@keyframes viewFadeIn {
  from { opacity: .72; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.feed-header {
  position: sticky;
  top: 12px;
  z-index: 10;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 12px;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.feed-tabs {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 6px;
  background: var(--bg-card);
  border-radius: var(--radius-pill);
  padding: 4px;
  border: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.feed-tabs::-webkit-scrollbar { display: none; }
.feed-tab {
  flex: 1 0 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  position: relative;
  transition: background .2s, color .2s, box-shadow .2s;
}
.feed-tab:hover { color: var(--text); }
.feed-tab.active {
  color: var(--on-brand);
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  box-shadow: 0 4px 14px var(--brand-glow);
}
.feed-tab.active::after { display: none; }
.feed-header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.feed-admin-btn {
  font-size: 0.78rem;
  font-weight: 700;
  color: #3da0fd;
  border: 1px solid rgba(61, 160, 253, 0.45);
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
}
.feed-view-title {
  flex: 1;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}
.feed-view-title[hidden] { display: none; }
.feed-tabs[hidden] { display: none; }
.profile-menu-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 12px;
  cursor: pointer;
}
.profile-menu-trigger:hover .avatar,
.profile-menu-trigger:focus-visible .avatar {
  box-shadow: 0 0 0 2px #3da0fd, 0 0 0 4px rgba(61, 160, 253, 0.45);
}

.composer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.composer > .avatar {
  flex-shrink: 0;
}
.composer.composer-drag-over {
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25);
  background: rgba(234, 88, 12, 0.06);
}
.composer-body {
  flex: 1;
  width: 100%;
  min-width: 0;
  position: relative;
  z-index: 0;
}
.composer-editor-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.composer-format-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.compose-bold-btn,
.compose-format-btn {
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  font-size: 15px;
  line-height: 1;
  border-radius: 8px;
}
.compose-format-btn strong {
  font-weight: 800;
}
.compose-format-btn em {
  font-style: italic;
  font-weight: 700;
}
.compose-format-u {
  text-decoration: underline;
  font-weight: 700;
}
.compose-format-btn.is-active {
  background: rgba(234, 88, 12, 0.18);
  border-color: #ea580c;
  color: #ea580c;
  box-shadow: 0 0 0 1px rgba(234, 88, 12, 0.35);
}
.compose-format-btn.is-active strong,
.compose-format-btn.is-active em,
.compose-format-btn.is-active .compose-format-u {
  color: #ea580c;
}
.compose-style-divider {
  width: 1px;
  height: 24px;
  margin: 0 4px;
  background: var(--border);
  flex-shrink: 0;
}
.compose-font-select {
  height: 32px;
  max-width: 108px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 13px;
}
.compose-color-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.compose-color-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  cursor: pointer;
}
.compose-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--swatch, var(--text));
  border: 2px solid rgba(255, 255, 255, 0.24);
  box-sizing: border-box;
}
.compose-color-btn--default .compose-color-dot {
  background: var(--text);
  border-color: var(--text-muted);
}
.compose-color-btn.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--brand-glow);
}
.compose-color-btn.is-active .compose-color-dot {
  box-shadow: 0 0 0 1px var(--bg), 0 0 0 3px var(--accent);
}
.post-content .text-inline-color-brand,
.compose-rich-editor .text-inline-color-brand {
  color: #3da0fd;
}
.post-content .text-inline-color-yellow,
.compose-rich-editor .text-inline-color-yellow {
  color: #FACC15;
}
.post-content .text-inline-color-red,
.compose-rich-editor .text-inline-color-red {
  color: #EF4444;
}
.post-content .text-inline-color-green,
.compose-rich-editor .text-inline-color-green {
  color: #22C55E;
}
.post-content.post-text-color-yellow,
.compose-rich-editor.post-text-color-yellow,
.post-content .text-inline-color-yellow .text-link,
.post-content .text-inline-color-yellow .text-mention {
  color: #FACC15;
}
.post-content.post-text-color-red,
.compose-rich-editor.post-text-color-red,
.post-content .text-inline-color-red .text-link,
.post-content .text-inline-color-red .text-mention {
  color: #EF4444;
}
.post-content.post-text-color-green,
.compose-rich-editor.post-text-color-green,
.post-content .text-inline-color-green .text-link,
.post-content .text-inline-color-green .text-mention {
  color: #22C55E;
}
.post-content.post-text-color-brand,
.compose-rich-editor.post-text-color-brand,
.post-content .text-inline-color-brand .text-link,
.post-content .text-inline-color-brand .text-mention {
  color: #3da0fd;
}
.post-text-font-dm-sans,
.compose-rich-editor.post-text-font-dm-sans {
  font-family: "DM Sans", system-ui, sans-serif;
}
.post-text-font-roboto,
.compose-rich-editor.post-text-font-roboto {
  font-family: "Roboto", system-ui, sans-serif;
}
.post-text-font-lora,
.compose-rich-editor.post-text-font-lora {
  font-family: "Lora", Georgia, serif;
}
.post-text-font-open-sans,
.compose-rich-editor.post-text-font-open-sans {
  font-family: "Open Sans", system-ui, sans-serif;
}
.post-text-font-noto-sans,
.compose-rich-editor.post-text-font-noto-sans {
  font-family: "Noto Sans", system-ui, sans-serif;
}
.post-text-font-inter,
.compose-rich-editor.post-text-font-inter {
  font-family: "Inter", system-ui, sans-serif;
}
.post-text-font-nunito,
.compose-rich-editor.post-text-font-nunito {
  font-family: "Nunito", system-ui, sans-serif;
}
.post-text-font-merriweather,
.compose-rich-editor.post-text-font-merriweather {
  font-family: "Merriweather", Georgia, serif;
}
.post-text-font-oswald,
.compose-rich-editor.post-text-font-oswald {
  font-family: "Oswald", system-ui, sans-serif;
}
.post-text-font-playfair,
.compose-rich-editor.post-text-font-playfair {
  font-family: "Playfair Display", Georgia, serif;
}
.compose-title-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  outline: none;
  padding: 0 0 8px;
  margin-bottom: 4px;
}
.compose-title-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}
.composer textarea,
.compose-rich-editor {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  resize: none;
  font-size: 20px;
  outline: none;
  min-height: 52px;
}
.compose-rich-editor {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-y: auto;
  max-height: 40vh;
}
.compose-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
}
.compose-rich-editor strong {
  font-weight: 800;
}
.compose-rich-editor em {
  font-style: italic;
}
.compose-rich-editor u {
  text-decoration: underline;
}
.composer-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 2;
  background: var(--bg);
}
.composer-tool-icons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.composer-tool-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  aspect-ratio: 1;
  max-height: 52px;
  padding: 0;
  margin: 0;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}
.composer-tool-icons .composer-tool-label {
  display: none;
}
.composer-tool-cell:hover {
  border-color: var(--brand-soft);
  background: rgba(255, 255, 255, 0.06);
}
.composer-tool-cell.active {
  border-color: rgba(61, 160, 253, 0.55);
  background: rgba(61, 160, 253, 0.12);
}
.composer-tools,
.composer-submit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}
.composer-submit {
  margin-left: 0;
}
.composer-submit .btn-primary {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 800;
}
.composer-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.composer-clear-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--brand-soft);
  background: rgba(255, 255, 255, 0.04);
}
.composer-clear-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.composer-link-pinned {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(61, 160, 253, 0.35);
  border-radius: 12px;
  background: rgba(61, 160, 253, 0.08);
}
.composer-link-url-panel {
  margin-top: 12px;
}
.composer-link-btn.active,
.composer-embed-btn.active {
  border-color: rgba(61, 160, 253, 0.55);
  background: rgba(61, 160, 253, 0.12);
}
.admin-permissions-checks {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  max-width: 520px;
}
.admin-permissions-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
}
.admin-permissions-user-meta {
  margin-top: 8px;
  font-size: 0.9375rem;
}
.admin-permissions-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}
.admin-permissions-user-combobox {
  position: relative;
  width: 100%;
  max-width: 320px;
}
.admin-permissions-user-label {
  flex: 1;
  min-width: 200px;
}
.admin-permissions-suggest {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: var(--surface-elevated, #141414);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.admin-permissions-suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.admin-permissions-suggest-item:hover,
.admin-permissions-suggest-item:focus-visible {
  background: rgba(61, 160, 253, 0.12);
}
.admin-permissions-suggest-empty {
  padding: 10px 12px;
  font-size: 0.875rem;
  opacity: 0.75;
}
.admin-permissions-presets {
  margin: 10px 0 4px;
}

.composer-link-in-text-hint {
  margin: 8px 0 0;
  padding: 10px 12px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-muted, rgba(255, 255, 255, 0.72));
  border: 1px dashed rgba(61, 160, 253, 0.45);
  border-radius: 10px;
  background: rgba(61, 160, 253, 0.06);
}
.composer-link-in-text-hint-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #3da0fd;
  background: transparent;
  border: 1px solid rgba(61, 160, 253, 0.5);
  border-radius: 8px;
  cursor: pointer;
}
.composer-link-in-text-hint-btn:hover {
  background: rgba(61, 160, 253, 0.12);
}
.composer-tool-cell.composer-tool-cell--guide {
  border-color: rgba(250, 204, 21, 0.85);
  background: rgba(250, 204, 21, 0.14);
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.25);
  animation: composer-link-guide-pulse 1.6s ease-in-out infinite;
}
@keyframes composer-link-guide-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.2); }
  50% { box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.35); }
}

@media (min-width: 1024px) {
  .composer-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "tools submit"
      "pinned pinned";
    align-items: center;
    column-gap: 12px;
  }
  .composer-tool-icons {
    grid-area: tools;
    width: 100%;
    max-width: 240px;
    grid-template-columns: repeat(4, 1fr);
  }
  .composer-tool-cell {
    max-height: 48px;
  }
  .composer-submit {
    grid-area: submit;
    width: 100%;
    max-width: 320px;
    justify-self: end;
  }
  .composer-submit .btn-primary,
  .composer-clear-btn {
    min-height: 36px;
    font-size: 13px;
  }
  .composer-link-pinned {
    grid-area: pinned;
  }
}
.composer-link-pinned-url {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: var(--brand-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.composer-link-change-btn {
  flex-shrink: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  cursor: pointer;
  font-family: inherit;
}
.composer-link-change-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.composer-link-inline-icon {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  opacity: 0.9;
}
.composer-link-inline-input {
  flex: 1 1 80px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  padding: 8px 4px;
  outline: none;
}
.composer-link-inline-input::placeholder {
  color: var(--text-muted);
}
.btn-link-attach-text--short {
  display: none;
}
.btn-link-attach--compact {
  flex-shrink: 0;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
}
.composer-media-btn,
.composer-attach-btn,
.composer-poll-btn,
.composer-embed-btn {
  font-size: 20px;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.composer-tool-btn {
  gap: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
}
.composer-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  line-height: 0;
  color: var(--text);
}
.composer-tool-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.9);
}
.composer-tool-cell.active .composer-tool-icon svg,
.composer-tool-cell:hover .composer-tool-icon svg {
  color: var(--brand-light, #3da0fd);
}
.composer-tool-label {
  font-size: 13px;
  letter-spacing: 0.01em;
}
.composer-media-preview,
.composer-embed-preview,
.composer-embed-url-panel,
.composer-poll-builder {
  margin-top: 12px;
}
.composer-embed-url-panel {
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--brand-glow);
}
.composer-embed-url-label,
.edit-embed-url-block .edit-media-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-light);
}
.composer-embed-url-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.compose-embed-url-input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 14px;
}
.composer-embed-btn.active {
  background: var(--brand-glow);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.edit-embed-url-block {
  margin-top: 12px;
}
.composer-poll-builder {
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--brand-glow);
  position: relative;
  z-index: 1;
  margin-bottom: 4px;
}
.composer:has(.composer-poll-builder:not([hidden])) .composer-actions {
  padding-top: 8px;
  margin-top: 0;
}
.composer:has(.composer-poll-builder:not([hidden])) .composer-submit .btn-primary,
.composer:has(.composer-poll-builder:not([hidden])) .composer-clear-btn {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 12px;
}
.composer-poll-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-light);
}
.composer-poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.composer-poll-option-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
}
.composer-poll-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.composer-poll-tools button {
  border: 1px solid var(--brand-soft);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--brand-glow);
  color: var(--brand-light);
  font: inherit;
}
.composer-poll-remove {
  color: var(--text-muted) !important;
}
.composer-poll-btn.active {
  color: var(--brand-light);
  background: var(--brand-glow);
}
.post-poll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.poll-option-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.poll-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  font: inherit;
}
.poll-option-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--brand-glow);
  border-radius: 999px;
  z-index: 0;
  transition: width 0.25s ease;
}
.poll-option-text,
.poll-option-stats {
  position: relative;
  z-index: 1;
}
.poll-option-text {
  flex: 1;
  min-width: 0;
}
.poll-option-stats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.poll-option-count {
  font-variant-numeric: tabular-nums;
}
.poll-option-pct {
  min-width: 2.5em;
  text-align: right;
  font-weight: 600;
  color: var(--brand);
}
.poll-option.selected {
  border-color: var(--brand);
}
.poll-option-voters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 0 6px;
}
.poll-voter-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--brand);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.poll-voter-link:hover {
  text-decoration: underline;
}
.poll-meta {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.composer-embed-preview .post-embed {
  margin: 0 auto;
  width: 100%;
  max-width: min(100%, 560px);
}
.composer-embed-preview .post-embed--portrait,
.composer-embed-preview .post-embed--ratio-4-5 {
  max-width: min(100%, 360px);
}
.composer-embed-preview .post-embed--landscape {
  max-width: min(100%, 640px);
}
.composer-embed-preview .post-embed--card-twitter,
.composer-embed-preview .post-embed--card-facebook,
.composer-embed-preview .post-embed--card-linkedin,
.composer-embed-preview .post-embed--card-link {
  max-width: min(100%, 520px);
}
.composer-embed-preview .post-embed-link-image-wrap {
  max-height: min(42vh, var(--link-img-max, 220px));
}
.composer-embed-preview .post-embed-frame {
  max-height: min(72vh, 560px);
}
.composer-embed-preview .post-embed--spotify .post-embed-frame {
  max-height: none;
}
.composer-embed-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.compose-embed-remove {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.compose-embed-remove input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.composer-embed-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.composer-preview-remove,
.composer-media-crop {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
.composer-preview-remove:hover,
.composer-media-crop:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}
.edit-embed-preview {
  margin-top: 8px;
}
.composer-media-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 320px;
}
.composer-media-item {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.composer-media-item img,
.composer-media-item video {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #000;
}
.composer-media-remove,
.composer-preview-remove {
  min-height: auto;
}
@media (max-width: 768px) {
  .composer-media-item video {
    max-height: min(52vh, 360px);
  }
  .composer-preview-remove {
    min-height: 44px;
    padding: 10px 16px;
  }
}
.char-counter { font-size: 14px; color: var(--text-muted); min-width: 2.5em; }
.char-counter.warn { color: var(--accent); }
.char-counter.over { color: #ff6b6b; font-weight: 700; }

.btn-primary {
  border: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: var(--on-brand);
  font-weight: 800;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--brand-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-hover), var(--brand));
  transform: translateY(-1px);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.composer-link-inline .btn-link-attach,
.composer-link-attach .btn-link-attach,
.btn-link-attach {
  border: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: var(--on-brand);
  font-weight: 800;
  font-size: 14px;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px var(--brand-glow);
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.composer-link-inline .btn-link-attach:hover,
.composer-link-attach .btn-link-attach:hover,
.btn-link-attach:hover {
  background: linear-gradient(135deg, var(--brand-hover), var(--brand));
  transform: translateY(-1px);
}
.composer-link-inline .btn-link-attach:disabled,
.composer-link-attach .btn-link-attach:disabled,
.btn-link-attach:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.feed { display: flex; flex-direction: column; gap: 12px; }

.post {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 16px;
  --post-bleed: 0;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.post:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.38);
}

.post-author-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.post-avatar-btn {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
}
.post-avatar-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.post-avatar-btn .avatar {
  display: block;
}
.user-verified-badge--avatar {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  font-size: 11px;
  border: 2px solid var(--bg-card, #141820);
  box-sizing: border-box;
  z-index: 1;
}
.post-follow-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  text-align: center;
}
.post-follow-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}
.post-follow-stat-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.post-follow-stat-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: lowercase;
}

.post-follow-stat-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.post-follow-stat-btn:hover .post-follow-stat-num {
  color: var(--brand);
}
.post-follow-stats--horizontal {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: auto;
}
.post-follow-stats--horizontal .post-follow-stat {
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
}
.post-follow-stats--horizontal .post-follow-stat-label {
  font-size: 11px;
}
.post-action-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.action-count-link {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 6px;
  min-height: 44px;
  border-radius: var(--radius);
}
.action-count-link:hover,
.action-count-link.reposted,
.action-count-link.liked {
  color: var(--accent);
}
.user-list-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.user-list-modal[hidden] {
  display: none !important;
}
.user-list-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
.user-list-modal-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.user-list-modal-title {
  margin: 0;
  font-size: 18px;
}
.user-list-modal-body {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.user-list-modal-close {
  align-self: flex-end;
}
.user-list-modal-row .icon-btn.following {
  color: var(--brand);
}
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.share-modal[hidden] {
  display: none !important;
}
.share-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
.share-modal-panel {
  position: relative;
  width: min(100%, 420px);
  max-height: min(92vh, 720px);
  overflow: auto;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}
.share-modal-title {
  margin: 0 0 10px;
  font-size: 20px;
}
.share-modal-url {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.35;
  word-break: break-all;
  color: var(--text-muted);
}
.share-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.share-modal-btn {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}
.share-modal-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.share-modal-btn--facebook:hover { border-color: #1877f2; color: #1877f2; }
.share-modal-btn--x:hover { border-color: #e7e9ea; color: #e7e9ea; }
.share-modal-btn--linkedin:hover { border-color: #0a66c2; color: #0a66c2; }
.share-modal-btn--instagram:hover { border-color: #e4405f; color: #e4405f; }
.share-modal-btn--tiktok:hover { border-color: #69c9d0; color: #69c9d0; }
.share-modal-btn--whatsapp:hover { border-color: #25d366; color: #25d366; }
.share-modal-btn--telegram:hover { border-color: #26a5e4; color: #26a5e4; }
.share-modal-preview {
  margin-bottom: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.share-modal-preview-title {
  margin: 0 0 6px;
  font-size: 15px;
}
.share-modal-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.share-modal-preview-frame {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #000;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
.share-modal-preview-frame img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  object-position: center center;
}
.share-modal-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.share-modal-preview-actions .btn-primary:disabled,
.share-modal-preview-actions .icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.share-modal-preview-status {
  min-height: 1.2em;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.share-modal-close {
  width: 100%;
}
.user-bot-badge {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}
.author-handle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  max-width: 100%;
  min-width: 0;
}
.user-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 0;
  border-radius: 50%;
  background: #1d9bf0;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
  flex-shrink: 0;
}
.post-handle-link .user-verified-badge,
.user-profile-handle-link .user-verified-badge,
.text-mention .user-verified-badge {
  pointer-events: none;
}
.comment-header .author-handle-wrap,
.post-header-main .author-handle-wrap,
.user-profile-handle .author-handle-wrap,
.suggestion-handle.author-handle-wrap {
  vertical-align: baseline;
}

.post-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  text-align: center;
}
.post-header-main {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}
.post-header-aside {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.post-header-aside .post-follow-stats {
  margin-right: 2px;
}
.post-header strong { font-size: 15px; }
.post-header span, .post-header time { color: var(--text-muted); font-size: 15px; }
.post-edited { color: var(--text-muted); font-size: 13px; }
.post-owner-actions {
  display: inline-flex;
  gap: 6px;
}
.post-owner-actions .action-btn {
  padding: 10px 12px;
  font-size: 18px;
  min-width: 44px;
  min-height: 44px;
}
.action-btn.danger:hover { color: #ff6b6b; background: rgba(255, 107, 107, 0.15); }

.repost-label {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}
.repost-card {
  margin: 8px 0 12px;
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
}
.repost-card-header {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.repost-card-header strong { font-size: 14px; }
.repost-card-header span,
.repost-card-header time {
  color: var(--text-muted);
  font-size: 14px;
}
.repost-unavailable {
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
}

.edit-form { margin: 8px 0 12px; }
.edit-form textarea,
.edit-form .edit-rich-editor {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  padding: 12px;
  resize: vertical;
  outline: none;
  font-size: 16px;
}
.edit-form .edit-rich-editor {
  min-height: 120px;
  max-height: 50vh;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.edit-form .edit-rich-editor strong {
  font-weight: 800;
}
.edit-form .edit-rich-editor em {
  font-style: italic;
}
.edit-form .edit-rich-editor u {
  text-decoration: underline;
}
.edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.edit-window-hint {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.edit-media-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.edit-media-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}
.edit-media-empty {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.edit-media-preview {
  margin-bottom: 8px;
}
.edit-media-preview video,
.edit-media-preview img {
  max-width: 100%;
  border-radius: 12px;
}
.edit-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.post-content { margin: 4px 0 12px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; text-align: left; }
.post-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  word-break: break-word;
  text-align: left;
}
.post > div:not(.post-author-side) .post-media-inner img,
.post > div:not(.post-author-side) .post-media-inner video {
  display: block;
  margin-inline: auto;
}
.post-header + .post-title {
  margin-top: -2px;
}

.post > div:not(.post-author-side) {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.post > div:not(.post-author-side) .post-embed--landscape,
.post > div:not(.post-author-side) .post-media,
.post > div:not(.post-author-side) .post-video,
.post > div:not(.post-author-side) .repost-card .post-embed--landscape,
.post > div:not(.post-author-side) .repost-card .post-media {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.post > div:not(.post-author-side) .post-embed {
  position: relative;
  left: 0;
  margin-inline: auto;
  max-width: 100%;
}

.post > div:not(.post-author-side) .post-media--portrait,
.post > div:not(.post-author-side) .post-media--square,
.post > div:not(.post-author-side) .post-media--ratio-4-5,
.post > div:not(.post-author-side) .post-media--native,
.post > div:not(.post-author-side) .post-media--pending,
.post > div:not(.post-author-side) .post-layout--1 .post-layout-visual,
.post > div:not(.post-author-side) .post-layout--2 .post-layout-visual,
.post > div:not(.post-author-side) .post-layout--3 .post-layout-visual {
  position: relative;
  left: 0;
  margin-inline: auto;
  width: 100%;
  max-width: 100%;
}

.post-body-hit > .post-embed:not(.post-embed--landscape),
.post-body-hit > .post-layout .post-embed:not(.post-embed--landscape) {
  margin-inline: auto;
}

.post-embed,
.post-video {
  margin-top: 12px;
  margin-bottom: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.post-embed-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
  display: grid;
  place-items: center;
}

.post-embed-frame > iframe,
.post-embed-frame > video,
.post-embed-frame > .post-embed-poster,
.post-embed-frame > .post-embed-poster--activate,
.post-embed-frame > .post-embed-lazy-play {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  position: relative;
  inset: auto;
}

.post-embed-frame iframe,
.post-embed-frame video,
.post-video iframe {
  display: block;
  border: 0;
  margin-inline: auto;
}

/* Landscape 16:9 — YouTube, Vimeo, Twitch, Facebook video */
.post-embed--landscape,
.post-video {
  width: 100%;
}
.post-embed--landscape .post-embed-frame {
  aspect-ratio: 16 / 9;
}

/* Portrait 9:16 — TikTok, Reels, Shorts, Facebook Reel */
.post-embed--portrait {
  width: min(100%, 360px);
  margin-inline: auto;
}
.post-embed--portrait .post-embed-frame {
  aspect-ratio: 9 / 16;
  max-height: min(78vh, 680px);
}

/* Instagram feed post 4:5 */
.post-embed--ratio-4-5 {
  width: min(100%, 420px);
  margin-inline: auto;
}
.post-embed--ratio-4-5 .post-embed-frame {
  aspect-ratio: 4 / 5;
}

/* Square 1:1 */
.post-embed--square {
  width: min(100%, 420px);
  margin-inline: auto;
}
.post-embed--square .post-embed-frame {
  aspect-ratio: 1 / 1;
}

/* X / Facebook text posts — flexible card height */
.post-embed--card {
  width: min(100%, 560px);
  margin-inline: auto;
}
.post-embed--card .post-embed-frame {
  min-height: 480px;
}
.post-embed--card .post-embed-frame iframe {
  min-height: 480px;
  height: 520px;
}
.post-embed--card-twitter .post-embed-frame {
  min-height: 520px;
}
.post-embed--card-twitter .post-embed-frame iframe {
  min-height: 520px;
  height: 520px;
}
.post-embed--card-facebook {
  width: min(100%, 500px);
}
.post-embed--card-facebook .post-embed-frame {
  aspect-ratio: 4 / 5;
  min-height: 0;
  max-height: min(78vh, 680px);
}
.post-embed--card-facebook .post-embed-frame iframe {
  min-height: 0;
  height: 100%;
}

/* Spotify compact player */
.post-embed--spotify {
  width: 100%;
}
.post-embed--spotify .post-embed-frame {
  height: 152px;
  aspect-ratio: auto;
  background: var(--bg);
}

.post-embed-open {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--accent);
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.post-embed-open:hover {
  background: var(--bg-hover);
}

.post-embed--link {
  padding: 14px 16px;
  background: var(--bg);
}
.post-embed--link a {
  color: var(--accent);
  word-break: break-all;
}

.post-embed-link-card {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}

.post-embed-link-image-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.post-embed-link-visit {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.post-embed-link-visit:hover {
  text-decoration: underline;
}

.post-embed--card-link .post-embed-open {
  display: none;
}

.post-embed-link-image-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: var(--link-img-min, 120px);
  max-height: var(--link-img-max, 220px);
  overflow: hidden;
  background: #111;
}

.post-embed-link-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #111;
}

.link-image-size-picker-label {
  margin: 10px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-light);
}

.link-image-size-picker {
  margin-top: 4px;
}

.composer-embed-preview-wrap .link-image-size-picker {
  margin-top: 0;
}

.composer-embed-preview-wrap .link-image-size-picker-label {
  margin-top: 8px;
}

.post-embed-link-body {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
}

.post-embed-link-host {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.post-embed-link-title {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text);
}

.post-embed-link-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}

.post-embed--card-link .post-embed-frame {
  display: none;
}

.post-embed--has-poster .post-embed-frame {
  background: #000;
}
.post-embed-poster,
.post-embed-poster--activate {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.post-embed-poster img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
}
.post-embed--card .post-embed-poster img,
.post-embed--poster-only .post-embed-poster img {
  object-fit: contain;
  object-position: center center;
  background: #000;
}

/* YouTube — landscape player, Shorts portrait */
.post-embed--youtube.post-embed--landscape {
  width: min(100%, 720px);
}
.post-embed--youtube.post-embed--landscape .post-embed-frame {
  aspect-ratio: 16 / 9;
  background: #000;
}
.post-embed--youtube.post-embed--portrait {
  width: min(100%, 360px);
}
.post-embed--youtube.post-embed--portrait .post-embed-frame {
  aspect-ratio: 9 / 16;
  max-height: min(78vh, 680px);
}

/* TikTok */
.post-embed--tiktok.post-embed--portrait .post-embed-frame {
  background: #000;
}

/* Instagram Reels / posts */
.post-embed--instagram-reel.post-embed--portrait,
.post-embed--instagram.post-embed--portrait {
  width: min(100%, 360px);
}
.post-embed--instagram.post-embed--ratio-4-5 {
  width: min(100%, 420px);
}

/* Facebook Reels / video */
.post-embed--facebook-reel.post-embed--portrait,
.post-embed--facebook-video.post-embed--landscape {
  background: #000;
}

.post-embed--lazy-video:not(.post-embed--active) .post-embed-frame {
  background: #000;
}
.post-embed-lazy-play {
  background: #000;
}
.post-embed--has-poster .post-embed-frame iframe {
  background: #000;
}
.post-embed--poster-only .post-embed-frame iframe {
  display: none;
}
.post-embed--lazy-video:not(.post-embed--active) .post-embed-frame iframe,
.post-embed:not(.post-embed--active) .post-embed-frame iframe[data-src] {
  display: none;
}
.post-embed-poster--activate {
  z-index: 2;
}
.post-embed-lazy-play {
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.post-embed-poster--placeholder-btn,
.post-embed-lazy-play--placeholder {
  background: linear-gradient(160deg, #1a1a1f 0%, #0d0d10 100%);
}
.post-embed-poster-label {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  max-width: 88%;
  padding: 0 0.75rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.35;
  pointer-events: none;
}
.post-embed--active .post-embed-lazy-play,
.post-embed--active .post-embed-poster--activate {
  display: none;
}
.post-embed--fb-unavailable .post-embed-frame {
  background: #000;
}
.post-embed-fb-unavailable-link {
  width: 100%;
  height: 100%;
  min-height: 180px;
}
.post-embed-fb-unavailable-label {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  opacity: 0.85;
}
.post-embed-fb-unavailable-note {
  margin: 0;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.post-embed-poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.85);
  pointer-events: none;
}
.post-embed-poster-play::after {
  content: '';
  position: absolute;
  left: 22px;
  top: 16px;
  border-style: solid;
  border-width: 12px 0 12px 18px;
  border-color: transparent transparent transparent #fff;
}

.post.post--highlight {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 16px;
}

.post-media {
  margin-top: 12px;
  margin-bottom: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100%;
}

.post-media-inner {
  width: 100%;
  height: 100%;
  min-height: 120px;
  display: grid;
  place-items: center;
}

.post-media-inner img,
.post-media-inner video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: min(85vh, 900px);
  object-fit: contain;
  object-position: center;
  background: #000;
}

.post-media--portrait {
  aspect-ratio: 9 / 16;
  width: min(100%, 340px);
  max-height: min(78vh, 680px);
  margin-inline: auto;
}

.post-media--landscape {
  aspect-ratio: 16 / 9;
  width: 100%;
}

.post-media--ratio-4-5 {
  aspect-ratio: 4 / 5;
  width: min(100%, 420px);
  margin-inline: auto;
}

.post-media--square {
  aspect-ratio: 1 / 1;
  width: min(100%, 420px);
  margin-inline: auto;
}

.post-media--native {
  width: min(100%, 520px);
  margin-inline: auto;
  max-height: min(85vh, 900px);
}

.post-media--pending {
  width: min(100%, 520px);
  margin-inline: auto;
  min-height: 120px;
}

.post-layout-picker {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
}

.post-layout-picker__option {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  color: var(--text-muted);
  user-select: none;
}

.post-content strong {
  font-weight: 800;
}

.post-content em,
.comment-content em {
  font-style: italic;
}

.post-content u,
.comment-content u {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.comment-content strong {
  font-weight: 800;
}

.post-content .text-link,
.comment-content .text-link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content .text-link:hover,
.comment-content .text-link:hover {
  color: #1d4ed8;
}

.post-content .text-mention,
.comment-content .text-mention {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
}

.post-content .text-mention:hover,
.comment-content .text-mention:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.untag-self-banner {
  margin: 0 0 8px;
}

.untag-self-btn {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}

.untag-self-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.composer-format-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.composer-format-hint code {
  font-size: 12px;
  color: var(--text);
}

.post-layout-picker__option:has(input:checked) {
  border-color: var(--accent);
  color: var(--text);
  background: var(--brand-glow);
}

.post-layout-picker__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.post-layout--4 .post-layout-visual--hero {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.post-layout--4 .post-layout-hero-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 14px 16px 32px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.48) 58%, transparent 100%);
  pointer-events: auto;
}

.post-layout--4 .post-layout-hero-text .post-content {
  margin: 0;
  color: #f1f5f9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.post-layout--4 .post-layout-hero-text .post-content strong,
.post-layout--4 .post-layout-hero-text .post-content em,
.post-layout--4 .post-layout-hero-text .post-content u {
  color: inherit;
}
.post-layout--4 .post-layout-hero-text .post-content .text-inline-color-brand {
  color: #3da0fd;
}
.post-layout--4 .post-layout-hero-text .post-content .text-inline-color-yellow {
  color: #FACC15;
}
.post-layout--4 .post-layout-hero-text .post-content .text-inline-color-red {
  color: #EF4444;
}
.post-layout--4 .post-layout-hero-text .post-content .text-inline-color-green {
  color: #22C55E;
}

.post-layout--4 .post-layout-visual .post-media {
  margin: 0;
  width: 100% !important;
  max-width: 100%;
}

.post-layout--4 .post-layout-visual .post-media-inner,
.post-layout--4 .post-layout-visual .post-media img {
  display: block;
  width: 100%;
}

.post-layout--4 .post-layout-visual .post-embed {
  margin: 0;
}

.post-layout--4 .post-layout-visual--hero .post-embed--card-link .post-embed-link-card {
  position: relative;
}

.post-layout--4 .post-layout-visual--hero .post-embed-link-image-wrap {
  min-height: 180px;
}

.composer-media-preview-wrap.post-layout--4 {
  flex-direction: column;
}

.composer-media-preview-wrap.post-layout--4 .composer-media-item {
  position: relative;
}

.composer-media-preview-wrap.post-layout--4 .composer-media-item::before {
  content: 'Το κείμενο θα εμφανίζεται στην κορυφή της εικόνας';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 10px 12px 24px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.78) 0%, transparent 100%);
  pointer-events: none;
}

.post-layout--1 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-layout--1 .post-content {
  margin: 0 0 4px;
  order: 0;
}

.post-layout--1 .post-layout-visual {
  order: 1;
}

.post-layout--2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-layout--2 .post-content {
  margin-top: 4px;
}

.post-layout--3 {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 12px;
}

.post-layout--3 .post-layout-visual {
  flex: 0 0 min(42%, 220px);
  width: auto;
  max-width: min(42%, 220px);
  min-width: 0;
}

.post-layout--3 .post-media {
  margin: 0;
  width: 100% !important;
}

.post-layout--3 .post-content {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  align-self: flex-start;
}

.composer-media-preview-wrap.post-layout--1,
.composer-media-preview-wrap.post-layout--2 {
  flex-direction: column;
}

.composer-media-preview-wrap.post-layout--3 {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
}

.composer-media-preview-wrap.post-layout--3 .composer-media-item {
  flex: 0 0 min(42%, 160px);
}

.composer-media-preview-wrap .post-layout-picker {
  flex-basis: 100%;
}

.composer-media-item .post-media,
.edit-media-preview .post-media {
  margin: 0;
}

@media (max-width: 540px) {
  .post-layout--3 {
    flex-direction: column;
  }
  .post-layout--3 .post-layout-visual {
    flex: none;
    max-width: min(100%, 280px);
    margin-inline: auto;
  }
  .post-layout--3 .post-content {
    align-self: stretch;
  }
}

.post-media img,
.post-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
}

.composer-media-item .post-media-inner,
.edit-media-preview .post-media-inner {
  min-height: 80px;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  color: var(--text-muted);
  margin-top: 4px;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 17px;
  min-width: 48px;
  min-height: 48px;
  line-height: 1;
}
.action-btn span {
  font-size: 15px;
  font-weight: 600;
}
.action-btn:hover { color: var(--accent); background: var(--brand-glow); }
.action-btn.liked { color: var(--like); }
.action-btn.reposted { color: var(--accent); }
.action-btn.active { color: var(--accent); }
.action-btn--expired-edit { opacity: 0.45; }
.action-btn--expired-edit:hover { opacity: 0.7; }

.post-comments { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.comment {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-xs { width: 28px; height: 28px; }
.comment-header {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}
.comment-header strong { font-size: 14px; }
.comment-header span, .comment-header time { color: var(--text-muted); font-size: 13px; }
.comment-content { font-size: 14px; line-height: 1.4; }
.comment-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.comment-like-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.comment-like-btn.active,
.comment-like-btn:hover {
  color: var(--brand);
}
.comment-body { flex: 1; min-width: 0; }
.comment-reply-quote {
  margin: 6px 0;
  padding: 6px 10px;
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  background: rgba(61, 160, 253, 0.08);
  font-size: 13px;
  color: var(--text-muted);
}
.comment-reply-quote strong { color: var(--text); }
.comment-reply-btn {
  margin-top: 6px;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.comment-reply-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.comment-reply-clear {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--text-muted);
}

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.comment-form input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 8px 12px;
  outline: none;
}
.comment-form .btn-primary { padding: 8px 14px; }

.profile-panel,
.settings-panel,
.admin-panel {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.admin-panel-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
}
.admin-panel-note {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}
.admin-panel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.admin-tab {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
}
.admin-tab.active {
  border-color: rgba(61, 160, 253, 0.55);
  background: rgba(61, 160, 253, 0.12);
  color: #3da0fd;
}
.admin-tab-panel[hidden] { display: none !important; }
.admin-conversations-list {
  display: grid;
  gap: 8px;
}
.admin-conversation-row {
  display: grid;
  gap: 4px;
  text-align: left;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
}
.admin-conversation-row:hover {
  border-color: rgba(61, 160, 253, 0.45);
}
.admin-conversation-participants { font-weight: 700; }
.admin-conversation-stats,
.admin-conversation-time {
  font-size: 13px;
  color: var(--text-muted);
}
.admin-archive-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
}
.admin-archive-messages {
  display: grid;
  gap: 10px;
  max-height: min(60vh, 520px);
  overflow-y: auto;
}
.admin-archive-msg {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}
.admin-archive-msg.is-deleted {
  border-color: rgba(61, 160, 253, 0.35);
}
.admin-archive-msg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
}
.admin-archive-delete-msg {
  margin-left: auto;
  font-size: 16px;
}
.admin-archive-deleted {
  color: #3da0fd;
  font-weight: 700;
  font-size: 12px;
}
.admin-archive-e2e {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.admin-archive-media {
  display: block;
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  margin-top: 6px;
}
.admin-filter-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
}
.admin-filter-label select {
  max-width: 280px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}
.admin-posts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-post-row {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}
.post-body-hit {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.post-body-hit > .post-embed {
  align-self: center;
  width: min(100%, 560px);
  max-width: 100%;
  margin-inline: auto;
  left: 0;
}

.post-body-hit > .post-embed.post-embed--landscape,
.post-body-hit > .post-embed.post-embed--facebook-video {
  width: calc(100% + var(--post-bleed));
  max-width: calc(100% + var(--post-bleed));
}

.post-body-hit > .post-embed.post-embed--card-facebook {
  width: min(100%, 500px);
}

.post-body-hit > .post-layout {
  width: 100%;
  min-width: 0;
}

.post-body-hit > .post-layout .post-embed {
  align-self: center;
  margin-inline: auto;
  left: 0;
}
.post-body-hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}
.user-profile-handle-link {
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  padding: 0;
  border: 0;
  background: none;
}
.profile-post-count {
  margin: 4px 0 10px;
  font-size: 14px;
  color: var(--text-muted);
}
.profile-stats-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 28px;
  margin: 4px 0 12px;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 56px;
}
.profile-stat-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.profile-stat-label {
  font-size: 13px;
  color: var(--text-muted);
}
.profile-stat-btn {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.profile-stat-btn:hover .profile-stat-num {
  color: var(--brand);
}
.user-profile-main {
  flex: 1;
  min-width: 0;
}
.admin-post-row--clickable {
  cursor: pointer;
}
.admin-post-row--clickable:hover {
  border-color: var(--accent);
}
.admin-post-handle {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.admin-post-handle:hover {
  color: var(--accent);
  text-decoration: underline;
}
.admin-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.admin-post-meta strong {
  color: var(--text);
}
.admin-post-snippet {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}
.admin-rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.admin-rating-label {
  font-size: 13px;
  font-weight: 600;
}
.admin-rate-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.admin-rate-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.admin-rate-btn.active,
.admin-rate-btn:hover {
  border-color: var(--brand);
  background: rgba(61, 160, 253, 0.15);
  color: var(--brand);
}
.admin-rate-btn--negative {
  border-color: rgba(255, 100, 100, 0.35);
  color: #ff8a8a;
}
.admin-rate-btn--negative.active,
.admin-rate-btn--negative:hover {
  border-color: #ff6b6b;
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.12);
}
.admin-rate-btn--positive.active,
.admin-rate-btn--positive:hover {
  border-color: #5fd39a;
  color: #5fd39a;
  background: rgba(95, 211, 154, 0.12);
}
.admin-rate-group--negative {
  margin-bottom: 6px;
}
.admin-rate-group--positive {
  margin-top: 0;
}
.admin-effective-rating {
  font-size: 12px;
  color: var(--text-muted);
}
.admin-empty {
  margin: 0;
  color: var(--text-muted);
}
.admin-user-notify-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 560px;
  margin-top: 4px;
}
.admin-user-notify-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0;
}
.admin-user-notify-field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-light);
}
.admin-user-notify-optional {
  font-weight: 500;
  color: var(--text-muted);
}
.admin-user-notify-form .admin-user-notify-combobox {
  width: 100%;
  max-width: none;
}
.admin-user-notify-form input,
.admin-user-notify-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--brand-soft);
  border-radius: var(--radius);
  background: var(--brand-glow);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}
.admin-user-notify-form input::placeholder,
.admin-user-notify-form textarea::placeholder {
  color: var(--text-muted);
}
.admin-user-notify-form input:focus,
.admin-user-notify-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-glow);
}
.admin-user-notify-form textarea {
  resize: vertical;
  min-height: 112px;
}
.admin-user-notify-form .btn-primary {
  align-self: flex-start;
  margin-top: 4px;
}
.admin-user-notify-form .admin-permissions-user-meta {
  margin-top: -8px;
}
.admin-google-bypass-form {
  margin: 0 0 16px;
}
.admin-google-bypass-form-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.admin-google-bypass-form-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.admin-google-bypass-form-row input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.admin-google-bypass-list {
  overflow-x: auto;
}
.admin-google-bypass-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-google-bypass-table th,
.admin-google-bypass-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.admin-google-bypass-table th {
  color: var(--text-muted);
  font-weight: 600;
}

.admin-stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}
.admin-stat-card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-elevated, rgba(255, 255, 255, 0.03));
}
.admin-stat-card strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
}
.admin-stat-card span {
  font-size: 13px;
  color: var(--text-muted);
}
.admin-member-ip {
  border: none;
  background: transparent;
  color: var(--brand-light);
  font: inherit;
  font-size: 13px;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.admin-member-ip:hover {
  color: var(--brand);
}
.admin-members-table .btn-danger-soft {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(220, 53, 69, 0.45);
  background: rgba(220, 53, 69, 0.12);
  color: #ff6b7a;
  cursor: pointer;
}
.admin-members-table .btn-danger-soft:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (max-width: 720px) {
  .admin-google-bypass-form-row {
    grid-template-columns: 1fr;
  }
}

.admin-bot-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.admin-bot-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 420px;
  overflow: auto;
  margin-top: 10px;
  padding-right: 4px;
}
.admin-bot-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  gap: 0 10px;
  align-items: center;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  cursor: pointer;
}
.admin-bot-item .avatar {
  grid-row: span 2;
}
.admin-bot-item small {
  color: var(--text-muted);
  font-size: 12px;
}
.admin-bot-item.active {
  border-color: var(--accent);
  background: rgba(61, 160, 253, 0.08);
}
.admin-bot-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(61, 160, 253, 0.08);
}
.admin-bot-selected-id {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
}
.admin-bot-post-id-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.admin-bot-post-id-row input {
  flex: 1;
}
.admin-bot-post-panel {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.admin-bot-post-preview {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.admin-bot-action-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.admin-bot-comment-form textarea {
  width: 100%;
  margin-top: 6px;
  margin-bottom: 10px;
  min-height: 88px;
  resize: vertical;
}
.admin-bot-comments-title {
  margin: 0 0 8px;
  font-size: 15px;
}
.admin-bot-comments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-bot-comments li {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.admin-bot-comments time {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.admin-bot-comment-meta {
  display: inline-block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
}
@media (max-width: 900px) {
  .admin-bot-layout {
    grid-template-columns: 1fr;
  }
}

.admin-bot-selected--live {
  box-shadow: inset 0 0 0 2px rgba(61, 160, 253, 0.45);
}
.admin-bot-mode-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.bot-act-as-banner {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(61, 160, 253, 0.18), rgba(252, 132, 0, 0.12));
  border-bottom: 1px solid rgba(61, 160, 253, 0.35);
}
.bot-act-as-banner-text {
  flex: 1;
  font-size: 14px;
}
.bot-act-as-stop-btn {
  padding: 7px 12px;
  font-size: 13px;
  white-space: nowrap;
}
html.bot-act-as-mode .btn-post {
  display: none !important;
}

.admin-facebook-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.admin-facebook-controls,
.admin-facebook-stats,
.admin-facebook-add-page,
.admin-facebook-add-post,
.admin-facebook-pages,
.admin-facebook-recent {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.admin-facebook-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.admin-facebook-toggle {
  flex: 1 1 240px;
}
.admin-facebook-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}
.admin-facebook-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.admin-facebook-form-row input[type="url"],
.admin-facebook-form-row input[type="text"],
.admin-facebook-form-row input[type="number"],
.admin-facebook-form-row select {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.admin-facebook-form-row select {
  flex: 0 1 140px;
  min-width: 120px;
}
.admin-facebook-type-hint {
  margin: 8px 0 0;
  font-size: 13px;
}
.admin-facebook-type-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(61, 160, 253, 0.15);
  color: var(--brand);
  vertical-align: middle;
}
.admin-facebook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.admin-facebook-test-box {
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: rgba(61, 160, 253, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-facebook-test-box h4 {
  margin: 0;
  font-size: 1rem;
}
.admin-fb-test-btn {
  align-self: flex-start;
  min-width: 220px;
}
.admin-facebook-test-hint {
  margin: 0;
  color: var(--brand-light);
}
.admin-facebook-error code {
  font-size: 12px;
}
.admin-facebook-page-list,
.admin-facebook-recent-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-facebook-page-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
}
.admin-facebook-page-item .text-link {
  display: block;
  word-break: break-all;
  font-size: 13px;
  margin-top: 4px;
}
.admin-facebook-page-meta {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.admin-facebook-recent-list li {
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.admin-facebook-recent-list li:last-child {
  border-bottom: 0;
}
.admin-facebook-panel h4 {
  margin: 0 0 4px;
  font-size: 15px;
}
.admin-post-row--recent {
  cursor: pointer;
}
.admin-post-row--recent:hover {
  border-color: rgba(61, 160, 253, 0.35);
}
.admin-post-row--recent .admin-post-meta time {
  font-size: 13px;
  color: var(--text-muted);
}
.admin-repost-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}
.admin-recent-rating {
  font-size: 12px;
  color: var(--brand);
}
.post-header .post-handle-link {
  font: inherit;
  font-weight: 800;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.post-header .post-handle-link:hover {
  color: var(--brand);
  text-decoration: underline;
}
.repost-card-header .author-handle-wrap--thalassi .post-handle-link,
.repost-card-header .author-handle-wrap--thalassi .post-handle-link--thalassi {
  display: inline-block;
  border: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: var(--on-brand);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  text-decoration: none;
  line-height: 1.35;
  box-shadow: 0 4px 14px var(--brand-glow);
}
.repost-card-header .author-handle-wrap--thalassi .post-handle-link:hover,
.repost-card-header .author-handle-wrap--thalassi .post-handle-link--thalassi:hover {
  background: linear-gradient(135deg, var(--brand-hover), var(--brand));
  color: var(--on-brand);
  text-decoration: none;
  transform: translateY(-1px);
}
.repost-card-header .author-handle-wrap--thalassi {
  margin-right: 2px;
}
.user-profile-hero {
  margin: 0 0 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-hover);
}
.user-profile-cover {
  width: 100%;
  min-height: 160px;
  max-height: 220px;
  background: linear-gradient(135deg, rgba(61, 160, 253, 0.35), rgba(20, 184, 166, 0.22));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.user-profile-hero-body {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 0 16px 16px;
  margin-top: -44px;
}
.user-profile-avatar-wrap {
  flex-shrink: 0;
  padding: 4px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--border);
}
.user-profile-avatar-wrap .profile-avatar {
  width: 88px;
  height: 88px;
  display: block;
}
.user-profile-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.user-profile-hero .user-profile-main {
  flex: 1;
  min-width: 0;
  padding-top: 52px;
}
.profile-manage-block {
  margin: 0 0 24px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--border);
}
.profile-manage-block-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-light);
}
.profile-manage-block-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.profile-cover-edit-preview {
  width: 100%;
  min-height: 120px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(61, 160, 253, 0.35), rgba(20, 184, 166, 0.22));
  background-size: cover;
  background-position: center;
  border: 1px solid var(--brand-soft);
}
.profile-manage-block-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.profile-cover-status {
  margin: 10px 0 0;
  font-size: 13px;
  min-height: 1.2em;
  color: var(--text-muted);
}
.profile-cover-status.is-ok {
  color: var(--brand-teal-light);
}
.profile-cover-status.is-error {
  color: #f87171;
}
.profile-handle-save-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.user-profile-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.user-profile-avatar-col .post-follow-stats {
  min-width: 56px;
}
.user-profile-handle {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
}
.user-profile-email {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}
.user-profile-admin-rating {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.user-profile-admin-rating-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.user-profile-admin-rating-meta {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.user-profile-admin-rating-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.user-profile-admin-moderation {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.user-profile-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.user-profile-admin-action.danger {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.35);
}
.user-profile-ban-status {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #ff6b6b;
}
.user-profile-ban-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
}
.user-profile-ban-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.user-profile-ban-date {
  min-height: 38px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
}
.user-profile-admin-popularity {
  margin-top: 12px;
}
.user-profile-clear-rating {
  margin-top: 8px;
  font-size: 12px;
}
.profile-feed {
  margin-top: 12px;
}
.profile-feed-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
}
.feed-column:not(.view-home) #feed,
.feed-column:not(.view-home) #composer {
  display: none !important;
}
.profile-posts-panel {
  margin-top: 16px;
}
.profile-edit-avatar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
}
.profile-avatar-main {
  min-width: 0;
}
.profile-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 16px;
}
.profile-avatar-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.profile-avatar-pick-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.profile-avatar-pick-label.is-busy {
  opacity: 0.7;
  pointer-events: none;
}
.user-profile-edit-actions {
  margin-top: 14px;
}
.profile-edit-open-btn {
  font-size: 14px;
  padding: 10px 16px;
}
.profile-handle-admin-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.profile-handle-change {
  margin: 0 0 20px;
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
}
.profile-handle-current {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-muted);
}
.profile-handle-current strong {
  color: var(--brand-light);
}
.profile-handle-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.profile-handle-input {
  width: 100%;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--brand-soft);
  background: var(--brand-glow);
  color: var(--text);
  font: inherit;
}
.profile-handle-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.profile-handle-status {
  margin: 8px 0 0;
  font-size: 13px;
  min-height: 1.2em;
}
.profile-handle-status.is-ok {
  color: var(--brand-teal-light);
}
.profile-handle-status.is-error {
  color: #f87171;
}
.profile-handle-suggestions {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-handle-suggestions li button {
  border: 1px solid var(--brand-soft);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--brand-glow);
  color: var(--brand-light);
  font: inherit;
  cursor: pointer;
}
.profile-handle-suggestions li button:hover {
  background: var(--brand-soft);
}
.profile-avatar-status {
  min-height: 1.25em;
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}
.profile-avatar-status.is-error {
  color: #f87171;
}
.profile-avatar-status.is-ok {
  color: #86efac;
}
.profile-handle-readonly {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
}
.profile-form-title {
  margin: 0 0 16px;
  font-size: 20px;
}
.profile-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.profile-advanced {
  margin: 12px 0 16px;
  color: var(--text-muted);
  font-size: 14px;
}
.profile-advanced summary {
  cursor: pointer;
  margin-bottom: 8px;
}
.profile-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.profile-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  position: relative;
  transition: background .2s, color .2s, box-shadow .2s;
}
.profile-tab:hover { color: var(--text); }
.profile-tab.active {
  color: var(--on-brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  box-shadow: 0 4px 14px var(--brand-glow);
}
.profile-tab.active::after { display: none; }
.profile-feed { padding: 0; }
.profile-settings { padding: 16px; }
.profile-avatar { width: 80px; height: 80px; }
.profile-header h2 { margin: 0 0 8px; }
.profile-note { margin: 0; color: var(--text-muted); font-size: 14px; }
.profile-form label {
  display: block;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 14px;
}
.profile-form input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
.profile-form .btn-primary { margin-top: 8px; padding: 12px 20px; }
.profile-form .icon-btn { margin: 0; }
.profile-private {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}
.profile-private p { margin: 8px 0; }
.profile-private strong { color: var(--text); }

.profile-blocked {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.profile-blocked h3 { margin: 0 0 12px; font-size: 18px; }

.notifications-panel,
.messages-panel,
.explore-panel,
.admin-panel {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.notifications-note {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}
.notifications-status {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.45;
}
.notifications-status.ok { border-color: rgba(0, 186, 124, 0.4); color: #00ba7c; }
.notifications-status.warn { border-color: rgba(255, 173, 31, 0.4); color: #ffad1f; }
.notifications-status.error { border-color: rgba(255, 107, 107, 0.4); color: #ff6b6b; }
.notification-settings {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  cursor: pointer;
}
.toggle-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.notification-settings .btn-primary { margin-top: 16px; }

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--brand);
  color: #111;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}
.nav-badge[hidden] {
  display: none !important;
}
.mobile-nav .nav-badge-mobile {
  position: absolute;
  top: 2px;
  right: 2px;
  margin: 0;
  min-width: 16px;
  height: 16px;
  font-size: 10px;
}
.mobile-nav a {
  position: relative;
}
.notifications-inbox-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.notifications-settings-link {
  color: var(--brand-light);
  font-weight: 700;
}
.notifications-inbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.icon-btn-danger {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.35);
}
.icon-btn-danger:hover {
  background: rgba(255, 107, 107, 0.12);
}
.notifications-inbox-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.notifications-divider {
  margin: 20px 0;
  border: none;
  border-top: 1px solid var(--border);
}
.notifications-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notification-inbox-item {
  display: flex;
  align-items: stretch;
  gap: 6px;
  position: relative;
}
.notification-inbox-swipe-action {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: flex-end;
  padding-right: 18px;
  background: #e5484d;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius);
  pointer-events: none;
}
.notification-inbox-swipe-track {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  will-change: transform;
}
.notification-inbox-item.is-deleting {
  opacity: 0.35;
  pointer-events: none;
}
.notification-inbox-row {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.notification-inbox-row.unread {
  border-color: rgba(61, 160, 253, 0.45);
  background: rgba(61, 160, 253, 0.08);
}
.notification-inbox-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.notification-inbox-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.notification-inbox-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand);
}
.notification-inbox-title {
  font-size: 14px;
}
.notification-inbox-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.35;
  word-break: break-word;
}
.notification-inbox-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.notification-inbox-delete {
  flex-shrink: 0;
  width: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  align-self: stretch;
}
.notification-inbox-delete:hover {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.1);
}
@media (max-width: 768px) {
  .notification-inbox-item {
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
  }
  .notification-inbox-swipe-action {
    display: flex;
  }
  .notification-inbox-swipe-track {
    width: 100%;
  }
  .notification-inbox-delete {
    display: none;
  }
  .notification-inbox-row {
    width: 100%;
    touch-action: pan-y;
  }
}
.notifications-inbox-empty {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 14px;
}
.conversation-row.has-unread {
  border-color: rgba(61, 160, 253, 0.4);
  background: rgba(61, 160, 253, 0.06);
}
.conversation-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.conversation-unread-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--bg);
}
.conversation-preview-unread {
  color: var(--brand);
  font-weight: 700;
}
#enablePushBtn { margin-bottom: 16px; width: 100%; }
#testPushBtn { margin-bottom: 16px; width: 100%; }

.blocked-list { list-style: none; margin: 0; padding: 0; }
.blocked-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.blocked-row span { flex: 1; }
.blocked-empty { color: var(--text-muted); font-size: 14px; padding: 8px 0; }

.messages-note {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 16px;
  line-height: 1.4;
}
.new-chat-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}
.new-chat-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.new-group-open-btn {
  width: 100%;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.new-group-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--brand-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--brand-glow) 0%, var(--bg-elevated) 48%);
  box-shadow: 0 8px 24px var(--brand-glow);
}
.new-group-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-light);
}
.new-group-field input {
  width: 100%;
  border: 1px solid var(--brand-soft);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 10px 12px;
}
.new-group-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-glow);
}
.new-group-selected {
  min-height: 0;
}
.new-group-search-results {
  position: relative;
  top: 0;
  left: auto;
  right: auto;
  margin-top: 4px;
}
.new-chat-dm-picker {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.new-group-hint,
.new-group-count {
  margin: 0;
  font-size: 13px;
  color: var(--brand-light);
  opacity: 0.92;
}
.new-group-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.new-group-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--brand-soft);
  background: var(--brand-glow);
  color: var(--text);
  font-size: 13px;
}
.new-group-chip--self {
  opacity: 0.85;
}
.new-group-chip-remove {
  border: none;
  background: transparent;
  color: var(--brand-light);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}
.new-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.new-group-actions .btn-primary {
  flex: 1;
  min-width: 160px;
}
.new-group-cancel-btn {
  border: 1px solid var(--brand-soft);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--brand-light);
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
}
.new-group-cancel-btn:hover {
  background: var(--brand-glow);
  border-color: var(--brand);
  color: var(--brand-light);
}
.avatar--group {
  object-fit: contain;
  padding: 6px;
  background: var(--bg-hover);
}
.conversation-group-title {
  font-weight: 700;
}
.chat-header-group-title {
  display: block;
  font-weight: 700;
}
.chat-header-group-count {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.chat-sender-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.new-chat-search-wrap {
  position: relative;
}
.new-chat-search-wrap input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  padding: 10px 12px;
}
.new-chat-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.new-chat-section-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.new-chat-user-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.new-chat-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
}
.new-chat-user-row:hover { background: var(--bg-hover); }
.new-chat-user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.new-chat-user-meta span {
  color: var(--text-muted);
  font-size: 13px;
}
.new-chat-empty {
  color: var(--text-muted);
  font-size: 14px;
  padding: 8px 4px;
}
.conversation-list { display: flex; flex-direction: column; gap: 8px; }
.conversation-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
}
.conversation-row:hover { background: var(--bg-hover); }
.conversation-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.conversation-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-meta span {
  color: var(--text-muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-subtitle {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.conversation-preview-text {
  color: var(--text-muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-preview-time {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.85;
  flex-shrink: 0;
}
.conversation-preview-unread .conversation-preview-text {
  color: var(--brand);
  font-weight: 700;
}
.chat-view { display: flex; flex-direction: column; min-height: 420px; }
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.chat-header-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.chat-typing {
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
}
.chat-search-bar {
  margin-bottom: 8px;
}
.chat-search-bar input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  padding: 8px 10px;
}
.messages-list-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.messages-tab-btn.active {
  border-color: var(--brand);
  color: var(--brand);
}
.chat-header-menu {
  position: relative;
}
.chat-header-menu-btn {
  list-style: none;
  cursor: pointer;
}
.chat-header-menu-btn::-webkit-details-marker {
  display: none;
}
.chat-header-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 6;
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-header-menu-panel button {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
}
.chat-header-menu-panel button:hover {
  background: var(--bg-hover);
}
.chat-msg-action-label {
  margin: 4px 10px 0;
  font-size: 11px;
  color: var(--text-muted);
}
.chat-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.chat-reaction-chip {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
}
.chat-reaction-chip.active {
  border-color: var(--brand);
  background: rgba(61, 160, 253, 0.12);
}
.chat-reaction-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 0;
}
.chat-audio {
  width: min(260px, 100%);
  margin-top: 4px;
}
#chatVoiceBtn.recording {
  color: #e74c3c;
  animation: chat-voice-pulse 1s infinite;
}
@keyframes chat-voice-pulse {
  50% { opacity: 0.55; }
}
.chat-messages {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0 16px;
  max-height: 50vh;
}
.chat-bubble {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.4;
  word-break: break-word;
}
.chat-msg-text a {
  color: inherit;
  text-decoration: underline;
  word-break: break-all;
}
.chat-bubble.mine .chat-msg-text a {
  color: rgba(0, 0, 0, 0.82);
}
.chat-link-preview {
  display: block;
  margin-top: 8px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  background: rgba(0, 0, 0, 0.12);
}
.chat-bubble.theirs .chat-link-preview {
  background: rgba(0, 0, 0, 0.04);
}
.chat-link-preview--loading {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.chat-link-preview-image {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  background: #111;
}
.chat-link-preview-body {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}
.chat-link-preview-host {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.chat-link-preview-title {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text);
}
.chat-bubble.mine .chat-link-preview-title,
.chat-bubble.mine .chat-link-preview-host {
  color: rgba(0, 0, 0, 0.72);
}
.chat-bubble time {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.chat-bubble.mine {
  align-self: flex-end;
  background: var(--accent);
  color: var(--on-brand);
}
.chat-bubble.mine time { color: rgba(0, 0, 0, 0.55); }
.chat-bubble.theirs {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
}
.chat-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.chat-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.chat-form-tools {
  display: flex;
  gap: 4px;
}
.chat-form input[type="text"] {
  flex: 1;
  min-width: 120px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 10px 12px;
}
.chat-media-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  margin-bottom: 8px;
}
.chat-media-preview img,
.chat-media-preview video {
  max-width: 120px;
  max-height: 80px;
  border-radius: var(--radius);
  object-fit: cover;
}
.chat-voice-preview {
  margin-bottom: 8px;
}
.chat-voice-pending {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}
.chat-voice-pending-label {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.chat-voice-pending-audio {
  width: 100%;
  max-width: 320px;
}
.chat-voice-pending-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.chat-voice-pending-actions .btn-primary,
.chat-voice-pending-actions .btn-secondary {
  min-width: 7rem;
}
.chat-bubble.deleted {
  opacity: 0.85;
  font-style: italic;
}
.chat-deleted-msg {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}
.chat-bubble-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}
.chat-bubble-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chat-read-receipt {
  font-size: 11px;
  letter-spacing: -2px;
  opacity: 0.65;
}
.chat-bubble.mine .chat-read-receipt--read {
  color: #1a8f4c;
  opacity: 1;
}
.chat-bubble.mine .chat-read-receipt--delivered {
  opacity: 0.55;
}
.chat-day-separator {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}
.chat-day-separator span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.chat-system-event {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}
.chat-system-event span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.35);
  text-align: center;
  max-width: 92%;
}
.chat-reply-preview {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.chat-reply-preview-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.chat-reply-preview-label {
  font-weight: 700;
  color: var(--brand);
  flex-shrink: 0;
}
.chat-reply-preview-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}
.chat-reply-quote {
  margin: 0 0 8px;
  padding: 6px 10px;
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 13px;
}
.chat-bubble.mine .chat-reply-quote {
  background: rgba(0, 0, 0, 0.08);
}
.chat-reply-quote-who {
  display: block;
  font-weight: 700;
  font-size: 11px;
  margin-bottom: 2px;
  color: var(--brand);
}
.chat-edited-label {
  margin: 6px 0 0;
  font-size: 11px;
  font-style: italic;
  opacity: 0.75;
}
.chat-bubble.mine .chat-edited-label {
  color: rgba(0, 0, 0, 0.55);
}
.chat-edit-form textarea {
  width: 100%;
  min-width: 180px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  padding: 8px;
  font: inherit;
  resize: vertical;
  caret-color: var(--text);
}
.chat-bubble.mine .chat-edit-form textarea {
  background: rgba(255, 255, 255, 0.96);
  color: #111;
  border-color: rgba(0, 0, 0, 0.22);
  caret-color: #111;
}
.chat-bubble.mine .chat-edit-actions .icon-btn {
  color: rgba(0, 0, 0, 0.72);
}
.chat-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.chat-edit-actions .btn-primary {
  padding: 6px 12px;
  font-size: 13px;
}
.chat-msg-menu {
  position: relative;
}
.chat-msg-menu-btn {
  list-style: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--text-muted);
}
.chat-msg-menu-btn::-webkit-details-marker {
  display: none;
}
.chat-msg-menu-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 4px);
  z-index: 5;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-bubble.theirs .chat-msg-menu-panel {
  right: auto;
  left: 0;
}
.chat-msg-action {
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.chat-msg-action:hover {
  background: var(--bg-hover);
}
.chat-msg-action.danger {
  color: #e74c3c;
}
.chat-file,
.chat-file-pending {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  text-decoration: none;
  word-break: break-word;
}
.chat-bubble.mine .chat-file {
  background: rgba(0, 0, 0, 0.12);
  color: inherit;
}
.chat-delete-msg {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 11px;
  opacity: 0.75;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.chat-delete-msg:hover {
  opacity: 1;
}
.chat-media {
  display: block;
  max-width: min(100%, 280px);
  margin-top: 6px;
  border-radius: var(--radius);
}
.chat-media video {
  width: 100%;
  max-height: 240px;
}

.sidebar-user-results {
  margin-top: 10px;
}
.user-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.user-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.user-search-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
}
.explore-panel {
  padding: 16px 0 24px;
  animation: viewFadeIn .24s ease;
}
.explore-suggestions {
  margin-top: 20px;
}
.explore-suggestions-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 800;
}
.explore-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
}
.explore-hint {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 14px;
}
.explore-search-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font: inherit;
}
.user-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.user-search-main small.user-search-email {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: normal;
}
.admin-post-user-actions {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-left: 8px;
}
.admin-post-delete:hover {
  color: #ff6b6b;
}

.sidebar-right {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px 16px 16px 8px;
  overflow: auto;
}

.search-box {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.search-box svg { width: 18px; height: 18px; fill: var(--text-muted); flex-shrink: 0; }
.search-box input {
  border: 0;
  background: transparent;
  color: var(--text);
  width: 100%;
  outline: none;
}

.panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.panel h2 {
  margin: 0;
  padding: 14px 16px;
  font-size: 18px;
  font-weight: 800;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.suggestions { list-style: none; margin: 0; padding: 0; }
.suggestions li {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  cursor: pointer;
}
.suggestions li:hover { background: rgba(255, 255, 255, 0.03); }

.suggestion-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.suggestion-row .avatar {
  flex-shrink: 0;
}
.suggestion-profile-hit {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
}
.suggestion-profile-hit:hover {
  opacity: 0.92;
}
.suggestion-handle {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.suggestion-follow-btn {
  flex-shrink: 0;
  margin-left: auto;
  border: 0;
  background: var(--accent);
  color: var(--on-brand);
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  cursor: pointer;
}
.suggestion-follow-btn.following {
  opacity: 0.75;
}
.suggestion-bot-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: lowercase;
}
.suggestion-following-label {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.94);
  border-top: 1px solid var(--border-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
  justify-content: space-around;
  align-items: flex-end;
  z-index: 100;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}
.mobile-nav a,
.mobile-nav .mobile-nav-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 52px;
  max-width: 72px;
  height: auto;
  min-height: 52px;
  padding: 6px 4px;
  font-size: inherit;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background .2s, border-color .2s, transform .15s;
}
.mobile-nav-icon {
  font-size: 20px;
  line-height: 1;
}
.mobile-nav-label {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-nav a.active .mobile-nav-label {
  color: var(--brand-light);
}
.mobile-nav .mobile-nav-btn {
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
}
.mobile-nav a:hover,
.mobile-nav .mobile-nav-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}
.mobile-nav a.active {
  color: #ffffff;
  background: var(--brand-glow);
  border-color: var(--border-strong);
  box-shadow: inset 0 0 0 1px var(--brand-soft);
}
.mobile-nav-install {
  color: var(--accent);
}
.mobile-nav-install[hidden] {
  display: none !important;
}
.mobile-profile-nav {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
}
.mobile-profile-nav .avatar {
  width: 24px;
  height: 24px;
}
.mobile-profile-nav.active .avatar,
.mobile-profile-nav[aria-expanded="true"] .avatar {
  box-shadow: 0 0 0 2px #3da0fd, 0 0 0 4px rgba(61, 160, 253, 0.45);
}

.profile-menu {
  position: fixed;
  inset: 0;
  z-index: 300;
}
.profile-menu[hidden] { display: none; }
.profile-menu-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
.profile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  animation: profile-menu-in .22s ease;
}
@keyframes profile-menu-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.profile-menu-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}
.profile-menu-close {
  align-self: flex-end;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}
.profile-menu-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}
.profile-menu-header strong {
  display: block;
  font-size: 18px;
}
.profile-menu-email {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 14px;
}
.profile-menu-nav {
  display: flex;
  flex-direction: column;
  padding: 8px;
}
.profile-menu-item {
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  cursor: pointer;
}
.profile-menu-item:hover,
.profile-menu-item:focus-visible {
  background: var(--bg-hover);
}
.profile-menu-item.danger { color: #ff6b6b; }

body.profile-menu-open { overflow: hidden; }

.icon-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: var(--radius);
  padding: 6px 12px;
  cursor: pointer;
}
.icon-btn:hover { background: var(--bg-hover); }

.app-confirm[hidden] { display: none !important; }
body.app-confirm-open { overflow: hidden; }
.app-confirm {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.app-confirm-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}
.app-confirm-panel {
  position: relative;
  width: min(360px, 100%);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(61, 160, 253, 0.35);
  background: var(--bg-elevated);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.app-confirm-title {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: #3da0fd;
}
.app-confirm-message {
  margin: 0 0 18px;
  line-height: 1.45;
  color: var(--text);
}
.app-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.image-crop-modal[hidden] {
  display: none !important;
}
body.image-crop-open {
  overflow: hidden;
}
.image-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.image-crop-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.78);
  cursor: pointer;
}
.image-crop-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(92vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(61, 160, 253, 0.35);
  background: var(--bg-elevated);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.image-crop-title {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: #3da0fd;
}
.image-crop-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}
.image-crop-aspects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.image-crop-aspect.is-active {
  border-color: #ea580c;
  color: #ea580c;
  background: rgba(234, 88, 12, 0.12);
}
.image-crop-stage-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: min(46vh, 340px);
  margin-bottom: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #0f0f10;
}
.image-crop-zoom-float {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.image-crop-zoom-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.image-crop-zoom-btn:hover:not(:disabled) {
  border-color: #ea580c;
  color: #fdba74;
}
.image-crop-zoom-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.image-crop-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.image-crop-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.image-crop-canvas img {
  position: absolute;
  display: block;
  max-width: none;
  user-select: none;
  pointer-events: none;
}
.image-crop-shades {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.image-crop-shade {
  position: absolute;
  background: rgba(0, 0, 0, 0.58);
}
.image-crop-frame {
  position: absolute;
  z-index: 3;
  overflow: visible;
  touch-action: none;
  cursor: move;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.image-crop-frame.is-dragging {
  cursor: grabbing;
}
.image-crop-handle {
  position: absolute;
  z-index: 4;
  touch-action: none;
  box-sizing: border-box;
}
.image-crop-handle--nw,
.image-crop-handle--ne,
.image-crop-handle--sw,
.image-crop-handle--se {
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ea580c;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.image-crop-handle--nw {
  top: -10px;
  left: -10px;
  cursor: nwse-resize;
}
.image-crop-handle--ne {
  top: -10px;
  right: -10px;
  cursor: nesw-resize;
}
.image-crop-handle--sw {
  bottom: -10px;
  left: -10px;
  cursor: nesw-resize;
}
.image-crop-handle--se {
  bottom: -10px;
  right: -10px;
  cursor: nwse-resize;
}
.image-crop-handle--n,
.image-crop-handle--s {
  left: 50%;
  width: 34px;
  height: 12px;
  margin-left: -17px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ea580c;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.image-crop-handle--n {
  top: -8px;
  cursor: ns-resize;
}
.image-crop-handle--s {
  bottom: -8px;
  cursor: ns-resize;
}
.image-crop-handle--e,
.image-crop-handle--w {
  top: 50%;
  width: 12px;
  height: 34px;
  margin-top: -17px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ea580c;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.image-crop-handle--w {
  left: -8px;
  cursor: ew-resize;
}
.image-crop-handle--e {
  right: -8px;
  cursor: ew-resize;
}
.image-crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  padding-top: 4px;
}
.composer-media-crop {
  margin-top: 8px;
  margin-right: 8px;
  font-size: 13px;
  padding: 6px 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: var(--on-brand);
  padding: 12px 20px;
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  z-index: 200;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.empty-state-cta { margin-top: 4px; }

@media (min-width: 691px) {
  .profile-menu-trigger { display: inline-flex; }
}

@media (max-width: 1100px) {
  .app { grid-template-columns: 88px minmax(0, 1fr); }
  .sidebar-right { display: none; }
  .account-meta { display: none; }
  .nav-item {
    font-size: 11px;
    line-height: 1.25;
    padding: 10px 6px;
    text-align: center;
    justify-content: center;
  }
  .btn-post {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    padding: 0;
    margin: 8px auto 16px;
    font-size: 0;
    color: transparent;
  }
  .btn-post::after {
    content: "+";
    font-size: 28px;
    color: var(--on-brand);
    line-height: 1;
  }
}

@media (max-width: 690px) {
  .feed-install-btn { display: none; }
  .app {
    grid-template-columns: 1fr;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
  }
  .sidebar-left { display: none; }
  body {
    overflow-x: hidden;
    padding-bottom: var(--mobile-nav-height);
  }
  .feed-column {
    max-width: none;
    width: 100%;
    min-height: auto;
    padding: 8px 10px calc(var(--mobile-nav-height) + 12px);
    gap: 10px;
    overflow-x: hidden;
  }
  .feed-column > * {
    min-width: 0;
    max-width: 100%;
  }
  .feed {
    max-width: 100%;
    overflow-x: hidden;
  }
  .post {
    --post-bleed: 0;
    max-width: 100%;
    overflow: hidden;
  }
  .post > div:not(.post-author-side) {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }
  .post > div:not(.post-author-side) .post-media,
  .post > div:not(.post-author-side) .post-video,
  .post > div:not(.post-author-side) .post-embed--landscape,
  .post > div:not(.post-author-side) .post-layout-visual {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .popular-carousel-section {
    margin-bottom: 10px;
    contain: layout style;
  }
  .popular-carousel-head {
    margin-bottom: 8px;
    gap: 8px;
  }
  .popular-carousel-title {
    font-size: 15px;
  }
  .popular-carousel-nav {
    display: flex;
  }
  .popular-carousel-nav-btn {
    width: 30px;
    height: 30px;
    font-size: 20px;
  }
  .popular-carousel-section {
    --popular-carousel-thumb-h: min(42vw, 200px);
    --popular-carousel-preview-media-h: min(52vw, 280px);
  }
  .popular-carousel-section--paged .popular-carousel {
    min-height: calc(var(--popular-carousel-thumb-h) + 72px);
  }
  .popular-carousel-section--paged-1 .popular-carousel-card {
    min-height: calc(var(--popular-carousel-thumb-h) + 72px);
    padding: 12px;
  }
  .popular-carousel-section--paged-1 .popular-carousel-card-thumb-slot {
    border-radius: 10px;
  }
  .popular-carousel-section--paged-1 .popular-carousel-card-title {
    font-size: 13px;
    line-height: 1.3;
    -webkit-line-clamp: 2;
  }
  .popular-carousel-section--paged-1 .popular-carousel-card-author {
    font-size: 11px;
  }
  .popular-carousel-preview {
    padding: 8px;
    margin-top: 8px;
    border-radius: 12px;
  }
  .popular-carousel-preview-close {
    top: 0;
    right: 0;
    width: 28px;
    height: 28px;
    font-size: 18px;
  }
  .popular-carousel-post {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    padding-top: 2px;
  }
  .popular-carousel-post .post-avatar-wrap .avatar {
    width: 32px;
    height: 32px;
  }
  .popular-carousel-post .post-header-main {
    flex-wrap: wrap;
    gap: 2px;
    font-size: 13px;
  }
  .popular-carousel-post .post-title {
    font-size: 16px;
    margin-bottom: 4px;
  }
  .popular-carousel-post .post-content {
    font-size: 14px;
    margin: 0 0 8px;
  }
  .popular-carousel-post .post-actions {
    gap: 4px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 6px;
  }
  .popular-carousel-post .post-actions .action-btn {
    flex: 0 0 auto;
    min-width: 32px;
    min-height: 32px;
    padding: 4px 8px;
    font-size: 14px;
  }
  .popular-carousel-post .post-actions .action-btn span {
    font-size: 11px;
  }
  .feed-header {
    top: 0;
    flex-wrap: wrap;
    align-items: center;
    padding: 6px 8px;
    gap: 8px;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.88);
  }
  .feed-view-title {
    order: 0;
    flex: 1;
    min-width: 0;
    font-size: 18px;
  }
  .feed-header-actions {
    order: 1;
    margin-left: auto;
  }
  .feed-tabs {
    order: 2;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    gap: 4px;
    padding: 3px;
  }
  .feed-tab {
    font-size: 12px;
    padding: 10px 6px;
    white-space: nowrap;
    min-height: 40px;
  }
  .composer {
    padding: 12px;
    gap: 10px;
  }
  .composer textarea,
  .compose-rich-editor {
    font-size: 16px;
    min-height: 44px;
  }
  .composer-link-pinned-url {
    font-size: 13px;
  }
  .composer-link-change-btn {
    min-height: 44px;
    padding: 10px 14px;
  }
  .composer-format-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .composer-format-bar::-webkit-scrollbar {
    display: none;
  }
  .compose-bold-btn,
  .compose-format-btn,
  .compose-color-btn {
    flex-shrink: 0;
  }
  .composer-clear-btn {
    font-size: 14px;
  }
  .composer-embed-url-row {
    flex-direction: column;
    align-items: stretch;
  }
  .composer-embed-url-row .btn-secondary,
  .composer-embed-url-row .composer-preview-remove {
    width: 100%;
    min-height: 44px;
  }
  .post {
    padding: 12px;
    gap: 10px;
    grid-template-columns: 40px 1fr;
  }
  .post-header .action-btn {
    min-width: 36px;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 15px;
  }
  .post-actions {
    gap: 4px;
    justify-content: space-between;
  }
  .post-actions .action-btn {
    min-width: 40px;
    min-height: 40px;
    padding: 8px 6px;
    font-size: 15px;
    flex: 1;
  }
  .post-actions .action-btn span {
    font-size: 13px;
  }
  .messages-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: calc(100dvh - var(--mobile-nav-height) - 76px);
    max-height: calc(100dvh - var(--mobile-nav-height) - 76px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
  }
  .feed-column:has(#messagesView:not([hidden])) {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - var(--mobile-nav-height) - 72px);
    max-height: calc(100dvh - var(--mobile-nav-height) - 72px);
    padding-bottom: 8px;
    overflow: hidden;
  }
  .feed-column:has(#messagesView:not([hidden])) .messages-panel {
    flex: 1;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
  }
  .feed-column:has(#messagesView.chat-open) {
    padding-bottom: 0;
  }
  .messages-panel.chat-open {
    overflow: hidden;
    padding: 8px 8px 0;
    gap: 0;
  }
  .new-chat-panel {
    flex-shrink: 0;
    margin-bottom: 0;
  }
  .conversation-list {
    flex-shrink: 0;
  }
  .chat-view {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .messages-panel.chat-open .chat-view {
    flex: 1;
    min-height: 0;
    max-height: 100%;
  }
  .chat-messages {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    scroll-padding-bottom: 16px;
  }
  .chat-bubble:last-child,
  .chat-system-event:last-child {
    scroll-margin-bottom: 12px;
  }
  .chat-form {
    flex-shrink: 0;
    margin-top: auto;
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: var(--bg);
    padding-top: 10px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }
  .chat-form .btn-primary {
    white-space: nowrap;
    padding: 10px 14px;
  }
  .chat-bubble {
    max-width: 88%;
  }
  .chat-edit-form textarea {
    font-size: 16px;
    min-height: 44px;
  }
  .mobile-nav {
    display: flex;
    gap: 0;
    padding: 4px 2px calc(4px + env(safe-area-inset-bottom));
    justify-content: space-between;
  }
  .mobile-nav a,
  .mobile-nav .mobile-nav-btn {
    width: auto;
    flex: 1;
    max-width: none;
    min-height: 52px;
    height: auto;
    border-radius: 12px;
  }
  .mobile-nav-label {
    font-size: 9px;
  }
  .fab-compose {
    display: inline-flex;
  }
  .toast {
    bottom: calc(var(--mobile-nav-height) + 12px);
    max-width: calc(100vw - 32px);
    text-align: center;
  }
  .install-banner {
    bottom: calc(var(--mobile-nav-height) + 4px);
  }
  .notifications-panel,
  .profile-panel,
  .profile-settings {
    padding: 12px;
  }
}

.feed-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skeleton-post {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
}
.skeleton-avatar,
.skeleton-line {
  background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(252,132,0,.12) 50%, rgba(255,255,255,.04) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
  border-radius: 999px;
}
.skeleton-avatar {
  width: 48px;
  height: 48px;
  border: 2px solid #000;
  box-shadow: 0 0 0 2px #3da0fd;
}
.skeleton-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}
.skeleton-line {
  height: 12px;
  border-radius: 8px;
}
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w90 { width: 90%; }
.skeleton-line.w70 { width: 70%; }
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.pull-refresh-indicator {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -120%);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.88);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  transition: transform .15s ease;
}
.pull-refresh-indicator.is-refreshing .pull-refresh-spinner {
  animation: pullSpin .8s linear infinite;
}
.pull-refresh-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
}
@keyframes pullSpin {
  to { transform: rotate(360deg); }
}

.scroll-top-btn {
  position: fixed;
  right: 16px;
  bottom: calc(var(--mobile-nav-height) + 76px);
  z-index: 90;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.88);
  color: var(--brand-light);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  transition: transform .2s, opacity .2s;
}
.scroll-top-btn:hover {
  transform: translateY(-2px);
}
@media (min-width: 691px) {
  .scroll-top-btn {
    bottom: 24px;
    right: max(16px, calc(50% - 640px));
  }
}

.fab-compose {
  display: none;
  position: fixed;
  right: 16px;
  bottom: calc(var(--mobile-nav-height) + 16px);
  z-index: 95;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: var(--on-brand);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 28px var(--brand-glow);
  transition: transform .2s;
}
.fab-compose:hover { transform: scale(1.05); }

.feed-load-sentinel {
  height: 1px;
  margin: 0;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .nav-item-label { display: none; }
  .nav-item {
    flex-direction: column;
    gap: 4px;
    font-size: 0;
    padding: 10px 6px;
  }
  .nav-item-icon { font-size: 22px; }
  .nav-item .nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 10px;
  }
  .nav-item { position: relative; }
}

/* Public share link landing (/p/:id) for logged-out visitors */
.share-gate-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

.share-gate {
  width: min(640px, 100%);
  text-align: center;
}

.share-gate-logo {
  margin: 0 auto 20px;
  line-height: 0;
}

.share-gate-logo img {
  width: min(168px, 52vw);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px var(--brand-glow));
}

.share-gate-post-card {
  text-align: left;
  margin: 0 0 20px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
}
.share-gate-post-card > .post-embed {
  margin: 0;
}
.share-gate-post-card .post-embed-link-card {
  min-height: 120px;
}
.share-gate-post-card .post-embed-link-title {
  display: block;
}

.share-gate-post-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.share-gate-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.share-gate-post-meta {
  min-width: 0;
}

.share-gate-handle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: 700;
  color: var(--brand);
}

.share-gate-time {
  display: block;
  margin-top: 2px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.share-gate-content {
  margin: 0 0 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.share-gate-post-card .post-layout {
  margin: 0 0 12px;
}

.share-gate-post-card .post-layout--4 .post-layout-visual--hero {
  min-height: 160px;
}

.share-gate-post-card .post-layout--4 .post-layout-hero-text .post-content {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-embed--link-hero-image .post-embed-link-card,
.post-embed--link-hero-image .post-embed-link-body {
  display: none;
}

.share-gate-media {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: var(--radius-md);
  margin: 0 0 12px;
  background: rgba(0, 0, 0, 0.2);
}

.share-gate-locked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.share-gate-lock-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.share-gate-lock-btn:hover {
  color: var(--text);
  border-color: var(--brand);
}

.share-gate-locked-hint {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.share-gate-auth-actions {
  display: grid;
  gap: 12px;
}

.share-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.share-gate-modal[hidden] {
  display: none;
}

.share-gate-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.share-gate-modal-card {
  position: relative;
  width: min(420px, 100%);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated, #151518);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.share-gate-modal-card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.share-gate-modal-card p {
  margin: 0 0 18px;
  color: var(--text-muted);
  line-height: 1.45;
}

.share-gate-modal-actions {
  display: grid;
  gap: 10px;
}

.share-gate-modal-actions .primary,
.share-gate-modal-actions .secondary {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
}

.share-gate-modal-actions .primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
}

.share-gate-modal-actions .secondary {
  border: 1px solid var(--border);
  color: var(--text);
}

.share-gate-modal-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
  padding: 8px;
}

.share-gate h1 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  line-height: 1.3;
}

.share-gate > p {
  margin: 0 0 24px;
  color: var(--text-muted);
  line-height: 1.5;
}

.share-gate-actions {
  display: grid;
  gap: 12px;
}

.share-gate-auth-actions a,
.share-gate-actions a {
  display: block;
  padding: 14px 18px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
}

.share-gate-auth-actions .primary,
.share-gate-actions .primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: var(--on-brand);
  box-shadow: 0 8px 24px var(--brand-glow);
}

.share-gate-auth-actions .primary:hover,
.share-gate-actions .primary:hover {
  background: linear-gradient(135deg, var(--brand-hover), var(--brand));
}

.share-gate-auth-actions .secondary,
.share-gate-actions .secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}

.share-gate-auth-actions .secondary:hover,
.share-gate-actions .secondary:hover {
  border-color: var(--border-strong);
  color: var(--brand-light);
}

.share-gate-loading {
  margin: 0 0 20px;
  color: var(--text-muted);
}

.share-gate-post-card .post-embed {
  width: 100%;
  max-width: min(100%, 560px);
  margin: 14px auto 0;
}
.share-gate-post-card .post-embed--card-twitter .post-embed-frame {
  min-height: min(520px, 70vh);
}
.share-gate-post-card .post-embed--card-twitter .post-embed-frame iframe {
  min-height: min(520px, 70vh);
  height: min(520px, 70vh);
}
.share-gate-post-card .post-embed-open {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
}
.share-gate-post-title {
  margin: 0 0 12px;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
}
.share-gate-post-card .post-embed--tvopen .post-embed-frame {
  min-height: min(56vw, 360px);
  aspect-ratio: 16 / 9;
}
.share-gate-post-card .post-embed--tvopen .post-embed-frame iframe,
.share-gate-post-card .post-embed--tvopen .post-embed-frame video {
  width: 100%;
  height: 100%;
  min-height: min(56vw, 360px);
}
.share-gate-tvopen-poster-link {
  display: block;
  margin: 0 0 10px;
}
.share-gate-tvopen-poster {
  display: block;
  width: 100%;
  max-height: min(70vw, 420px);
  object-fit: contain;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.35);
}
.share-gate-tvopen .share-gate-tvopen-video {
  margin-top: 0;
}
.share-gate-fallback {
  margin: 0 0 12px;
  font-size: 1rem;
}
.share-gate-fallback a {
  color: var(--brand);
  font-weight: 700;
}

.popular-carousel-section {
  margin: 0 0 16px;
  padding: 0;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  contain: layout style;
  --popular-carousel-thumb-h: 120px;
  --popular-carousel-preview-media-h: min(52vw, 280px);
}
.popular-carousel-section--paged .popular-carousel {
  overflow: hidden;
}
.popular-carousel-section--paged .popular-carousel-track {
  display: grid;
  overflow: hidden;
  scroll-snap-type: none;
  overscroll-behavior-x: auto;
  touch-action: auto;
  gap: 10px;
  padding: 0 0 6px;
  max-width: 100%;
}
.popular-carousel-section--paged-1 .popular-carousel-track {
  grid-template-columns: minmax(0, 1fr);
}
.popular-carousel-section--paged-3 .popular-carousel-track {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.popular-carousel-section--paged .popular-carousel-card {
  flex: none;
  width: auto;
  max-width: 100%;
  min-width: 0;
}
.popular-carousel-section--paged-3 .popular-carousel-card {
  min-height: calc(var(--popular-carousel-thumb-h) + 68px);
  padding: 10px;
  gap: 6px;
}
.popular-carousel-section--paged-3 {
  --popular-carousel-thumb-h: 72px;
}
.popular-carousel-section--paged-3 .popular-carousel-card-title {
  font-size: 12px;
  line-height: 1.25;
  -webkit-line-clamp: 2;
}
.popular-carousel-section--paged-3 .popular-carousel-card-author {
  font-size: 11px;
}
.popular-carousel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 2px;
}
.popular-carousel-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.popular-carousel-nav {
  display: flex;
  gap: 6px;
}
.popular-carousel-nav-btn {
  width: 34px;
  height: 34px;
  font-size: 22px;
  line-height: 1;
}
.popular-carousel {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.popular-carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: auto;
  padding: 4px 2px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  max-width: 100%;
}
.popular-carousel-track::-webkit-scrollbar {
  display: none;
}
.popular-carousel-section.is-preview-open .popular-carousel-track {
  scroll-behavior: smooth;
}
.popular-carousel-card {
  flex: 0 0 240px;
  width: 240px;
  max-width: calc(100% - 8px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-height: 108px;
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--bg-elevated, rgba(255, 255, 255, 0.03));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.popular-carousel-card:hover {
  border-color: var(--brand);
}
.popular-carousel-card--active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(61, 160, 253, 0.35);
}
.popular-carousel-card-thumb-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--popular-carousel-thumb-h);
  width: 100%;
  height: var(--popular-carousel-thumb-h);
  min-height: var(--popular-carousel-thumb-h);
  max-height: var(--popular-carousel-thumb-h);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.popular-carousel-card-thumb {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border-radius: 0;
}
.popular-carousel-card-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.popular-carousel-card-author {
  margin-top: auto;
  font-size: 13px;
  color: var(--text-muted);
}
.popular-carousel-preview {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface, rgba(255, 255, 255, 0.02));
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.popular-carousel-preview-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.popular-carousel-preview-close {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 32px;
  height: 32px;
  font-size: 22px;
  line-height: 1;
  z-index: 2;
}
.popular-carousel-preview-inner--full {
  gap: 0;
}
.popular-carousel-post {
  margin: 0;
  padding: 8px 0 0;
  --post-bleed: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.popular-carousel-post:hover {
  transform: none;
  box-shadow: none;
}
.popular-carousel-post > div:not(.post-author-side) {
  min-width: 0;
  overflow: hidden;
}
.popular-carousel-post .post-media,
.popular-carousel-post .post-embed,
.popular-carousel-post .post-video,
.popular-carousel-post .post-layout-visual {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.popular-carousel-post .post-media,
.popular-carousel-post .post-layout-visual {
  height: var(--popular-carousel-preview-media-h);
  min-height: var(--popular-carousel-preview-media-h);
  max-height: var(--popular-carousel-preview-media-h);
  aspect-ratio: unset !important;
}
.popular-carousel-post .post-media-inner {
  height: 100%;
  min-height: 0;
}
.popular-carousel-post .post-media-inner img,
.popular-carousel-post .post-media-inner video,
.popular-carousel-post .post-media img,
.popular-carousel-post .post-media video {
  object-fit: contain !important;
  width: 100%;
  height: 100%;
  max-height: 100%;
}
.popular-carousel-post .post-body-hit {
  cursor: default;
}
.popular-carousel-post .post-actions {
  gap: 6px;
  justify-content: flex-start;
  margin-top: 8px;
}
.popular-carousel-post .post-actions .action-btn {
  flex: 0 0 auto;
  min-width: 36px;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 15px;
}
.popular-carousel-post .post-actions .action-btn span {
  font-size: 13px;
}
.popular-carousel-section:hover .popular-carousel-track,
.popular-carousel-section:focus-within .popular-carousel-track {
  scroll-behavior: smooth;
}

.email-verification-gate {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 10, 18, 0.88);
  backdrop-filter: blur(6px);
}
.email-verification-gate[hidden] {
  display: none !important;
}
.email-verification-gate-card {
  width: min(440px, 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  padding: 24px 22px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.email-verification-gate-card h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}
.email-verification-gate-card p {
  margin: 0 0 10px;
  color: var(--text-muted);
  line-height: 1.5;
}
.email-verification-gate-meta {
  font-size: 14px;
}
.email-verification-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.admin-panel-note-warn {
  color: #ffb4a2;
}
.admin-email-verify-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.admin-email-verify-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 8px;
}
.admin-email-verify-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-hover);
  font-size: 14px;
}
.admin-email-verify-chip button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.admin-email-verify-pending-list {
  overflow-x: auto;
}
.admin-email-verify-pending-list table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-email-verify-pending-list th,
.admin-email-verify-pending-list td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.admin-subtitle {
  margin: 16px 0 8px;
  font-size: 1rem;
}
html.email-verification-blocked .app-shell {
  pointer-events: none;
  user-select: none;
}
html.email-verification-blocked .email-verification-gate {
  pointer-events: auto;
}
