:root {
  --bg: #eef3f8;
  --surface: #f8fbff;
  --surface-strong: #ffffff;
  --ink: #17212f;
  --muted: #627083;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --border: rgba(23, 33, 47, 0.08);
  --shadow: 0 22px 60px rgba(35, 55, 88, 0.12);
}

html {
  font-size: 15px;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32%),
    radial-gradient(circle at right 20%, rgba(15, 118, 110, 0.08), transparent 28%),
    linear-gradient(180deg, #f3f7fb 0%, #e8eff7 100%);
}

.app-shell,
.admin-shell,
.login-shell {
  margin: 0;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-shell > .container.py-4 {
  flex: 1 0 auto;
}

.landing-container {
  flex: 1 0 auto;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.landing-page .site-footer {
  flex-shrink: 0;
}

.site-footer.site-footer-compact {
  font-size: 0.94rem;
}

.site-header,
.site-footer {
  background: rgba(248, 251, 255, 0.78);
  backdrop-filter: blur(16px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  transition: background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.site-header.is-scrolled {
  background: rgba(248, 251, 255, 0.94);
  box-shadow: 0 14px 30px rgba(35, 55, 88, 0.08);
}

.site-header .container,
.site-footer .container {
  width: min(1320px, calc(100% - 2rem));
}

.site-header .navbar {
  min-height: 4.4rem;
  padding-top: 0.6rem !important;
  padding-bottom: 0.6rem !important;
  transition: min-height 160ms ease, padding-top 160ms ease, padding-bottom 160ms ease;
}

.site-header.is-scrolled .navbar {
  min-height: 4rem;
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.page-loader[hidden] {
  display: none;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.page-loader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(238, 243, 248, 0.72);
  backdrop-filter: blur(10px);
}

.page-loader-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.96);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
}

.page-loader-spinner {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid rgba(37, 99, 235, 0.2);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: page-loader-spin 0.8s linear infinite;
}

.page-loader-copy {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.01em;
}

@keyframes page-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
}

.nav-link-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.08rem;
  font-weight: 600;
}

.nav-icon {
  display: inline-flex;
  width: 1.22rem;
  height: 1.22rem;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  background: #2563eb;
}

.nav-badge.is-hidden {
  display: none;
}

.header-search-form {
  width: min(100%, 23rem);
  margin-left: auto;
  margin-right: 1rem;
}

.header-search-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

.header-search-icon svg {
  width: 100%;
  height: 100%;
}

.header-search-input {
  min-height: 2.9rem;
  padding-left: 3rem !important;
  padding-right: 1rem;
  border-radius: 999px;
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.82);
  appearance: none;
  -webkit-appearance: none;
}

.header-search-input::-webkit-search-decoration,
.header-search-input::-webkit-search-cancel-button,
.header-search-input::-webkit-search-results-button,
.header-search-input::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  text-decoration: none;
}

.user-chip.dropdown-toggle {
  border: 1px solid var(--border);
}

.user-chip.dropdown-toggle::after {
  margin-left: 0.4rem;
}

.user-chip-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 999px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.user-chip-copy {
  display: grid;
  line-height: 1.1;
}

.user-chip-copy strong {
  font-size: 1rem;
}

.user-chip-subtitle {
  color: var(--muted);
  font-size: 0.84rem;
}

.mobile-header-actions {
  display: none;
}

.user-dropdown-menu {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.5rem;
  box-shadow: var(--shadow);
}

.user-dropdown-menu .dropdown-item {
  border-radius: 0.7rem;
  padding: 0.65rem 0.85rem;
}

.account-dropdown {
  position: relative;
}

.account-dropdown summary {
  list-style: none;
}

.account-dropdown summary::-webkit-details-marker {
  display: none;
}

.account-dropdown-toggle {
  cursor: pointer;
}

.account-dropdown-toggle::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  margin-left: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  flex-shrink: 0;
}

.account-dropdown[open] .account-dropdown-toggle::after {
  transform: rotate(-135deg) translateY(-1px);
}

.account-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  min-width: 12rem;
  max-width: min(18rem, calc(100vw - 2rem));
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: rgba(248, 251, 255, 0.98);
  box-shadow: var(--shadow);
  z-index: 20;
}

.account-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.8rem;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: 0.8rem;
  color: var(--ink);
  text-decoration: none;
  background: transparent;
}

.account-dropdown-menu .dropdown-item:hover,
.account-dropdown-menu .dropdown-item:focus-visible {
  background: rgba(37, 99, 235, 0.08);
  outline: none;
}

.account-dropdown-menu .dropdown-divider {
  margin: 0.35rem 0;
  border-color: rgba(148, 163, 184, 0.22);
}

.account-menu-form {
  margin: 0;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.8rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  box-shadow: var(--shadow);
}

.btn-brand {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
}

.btn-brand:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-dark), #2563eb);
}

.hero-panel,
.content-card,
.login-card,
.stat-card {
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  background: rgba(248, 251, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem;
}

.landing-screen {
  display: flex;
  align-items: stretch;
  min-height: calc(100dvh - 9.7rem);
}

.landing-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 0.85fr);
  gap: 1.15rem;
  align-items: stretch;
  min-height: 100%;
  width: 100%;
}

.landing-about-card,
.landing-register-card {
  border: 1px solid var(--border);
  border-radius: 1.75rem;
  background: rgba(248, 251, 255, 0.94);
  box-shadow: var(--shadow);
}

.landing-about-card {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.landing-about-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(37, 99, 235, 0.03));
  pointer-events: none;
}

.landing-about-card > * {
  position: relative;
  z-index: 1;
}

.landing-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.72fr);
  gap: 1rem;
  align-items: start;
}

.landing-copy {
  min-width: 0;
}

.landing-about-card h1 {
  margin: 0.55rem 0 0.7rem;
  font-size: clamp(2.45rem, 4.2vw, 4.4rem);
  line-height: 0.94;
  max-width: 11ch;
  letter-spacing: -0.06em;
}

.landing-lead {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.landing-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1rem;
}

.landing-action-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.landing-feature-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.15rem;
}

.landing-feature-item {
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(23, 33, 47, 0.07);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.68);
}

.landing-feature-item strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.02rem;
}

.landing-feature-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.landing-showcase {
  display: grid;
  gap: 0.8rem;
}

.landing-showcase-card,
.landing-quote {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(23, 33, 47, 0.08);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.72);
}

.landing-showcase-card-primary {
  background:
    linear-gradient(160deg, rgba(37, 99, 235, 0.14), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.82);
}

.landing-showcase-label {
  display: inline-flex;
  margin-bottom: 0.45rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.landing-showcase-card strong {
  display: block;
  font-size: 1rem;
  line-height: 1.3;
}

.landing-showcase-card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.landing-proof-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.landing-proof-list li + li {
  margin-top: 0.4rem;
}

.landing-quote {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 600;
}

.landing-metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.landing-metric-card {
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(23, 33, 47, 0.07);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.82);
}

.landing-metric-card strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
}

.landing-metric-card span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
}

.landing-register-card {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.landing-register-card h2 {
  margin: 0.55rem 0 0.25rem;
  font-size: 1.65rem;
}

.landing-register-header {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(23, 33, 47, 0.08);
}

.landing-register-form {
  display: grid;
  gap: 1rem;
  flex: 1 0 auto;
  align-content: start;
}

.landing-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 0.9rem;
}

.landing-form-span-2 {
  grid-column: 1 / -1;
}

.landing-register-card .form-control {
  background: rgba(255, 255, 255, 0.88);
  min-height: 3rem;
}

.landing-register-card textarea.form-control {
  min-height: 5.4rem;
}

.landing-register-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(23, 33, 47, 0.08);
}

.hero-panel h1,
.admin-hero h1 {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.hero-metrics {
  display: grid;
  gap: 0.75rem;
  min-width: 220px;
}

.hero-metrics div,
.stat-card {
  padding: 1rem;
  background: var(--surface-strong);
  border-radius: 1rem;
}

.hero-metrics strong,
.stat-card strong {
  display: block;
  font-size: 2rem;
}

.eyebrow,
.topic-row span {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--accent-dark);
  background: rgba(37, 99, 235, 0.12);
}

.content-card {
  padding: 1.2rem;
  min-width: 0;
}

.home-sidebar-scroll {
  display: grid;
  gap: 1rem;
  background: transparent;
}

.mobile-home-feed {
  display: none;
}

.mobile-composer-card {
  display: none;
}

.mobile-post-modal[hidden] {
  display: none;
}

.mobile-post-modal {
  display: none;
}

.mobile-stories-strip {
  display: none;
}

.compose-panel h2,
.post-card h3 {
  margin-bottom: 0;
}

.post-composer {
  position: relative;
}

.post-composer-textarea {
  padding-right: 6.25rem;
}

.post-composer-file-input {
  display: none;
}

.post-composer-menu {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
}

.post-composer-menu summary {
  list-style: none;
}

.post-composer-menu summary::-webkit-details-marker {
  display: none;
}

.post-composer-menu[open] .post-composer-attach-button {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.08);
}

.post-composer-menu-list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.55rem);
  display: grid;
  gap: 0.35rem;
  min-width: 11rem;
  padding: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(248, 251, 255, 0.98);
  box-shadow: var(--shadow);
  z-index: 10;
}

.post-composer-menu-item {
  display: inline-flex;
  align-items: center;
  width: 100%;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem;
  border: 0;
  border-radius: 0.8rem;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
}

.post-composer-menu-item:hover {
  color: var(--accent-dark);
  background: rgba(37, 99, 235, 0.08);
}

.post-composer-attach-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent-dark);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.88);
}

.post-composer-attach-button svg {
  width: 1rem;
  height: 1rem;
}

.post-composer-menu-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.post-composer-menu-icon svg {
  width: 100%;
  height: 100%;
}

.post-composer-file-name {
  min-height: 1rem;
}

.camera-modal[hidden] {
  display: none;
}

.camera-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.camera-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 26, 23, 0.58);
  backdrop-filter: blur(4px);
}

.camera-modal-panel {
  position: relative;
  width: min(34rem, calc(100vw - 2rem));
  margin: 5vh auto 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1.4rem;
  background: rgba(248, 251, 255, 0.98);
  box-shadow: var(--shadow);
}

.camera-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.camera-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.88);
}

.camera-modal-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 18rem;
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  background: #1b1714;
}

.camera-modal-video,
.camera-modal-canvas {
  width: 100%;
  max-height: 24rem;
  object-fit: cover;
}

.camera-modal-placeholder {
  position: absolute;
  inset: auto 1rem 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.9rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
}

.camera-modal-status {
  min-height: 1.2rem;
  margin-top: 0.85rem;
}

.camera-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.topic-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.muted-text {
  color: var(--muted);
}

.profile-link,
.profile-link-muted {
  text-decoration: none;
}

.profile-link {
  color: var(--ink);
}

.profile-link:hover {
  color: var(--accent-dark);
}

.profile-link-muted {
  color: var(--muted);
}

.profile-link-muted:hover {
  color: var(--accent-dark);
}

.post-copy {
  white-space: pre-line;
  line-height: 1.7;
  overflow-wrap: anywhere;
  position: relative;
  max-height: none;
  overflow: visible;
  transition: max-height 180ms ease;
}

.post-copy a {
  color: var(--accent-dark);
  font-weight: 600;
  word-break: break-word;
}

.post-copy.is-collapsed {
  display: block;
  max-height: calc(1.7em * 4);
  overflow: hidden;
}

.post-copy.is-collapsed::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2.8rem;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0), rgba(248, 251, 255, 0.96));
  pointer-events: none;
}

.post-more-button {
  margin-top: 0.25rem;
  padding: 0;
  border: 0;
  color: var(--accent-dark);
  font-weight: 700;
  background: transparent;
}

.post-media {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  margin-top: 1rem;
  border-radius: 1rem;
}

.post-album {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 1rem;
}

.post-album-2,
.post-album-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-album-3 {
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.post-album-3 .post-album-item:first-child {
  grid-row: 1 / span 2;
}

.post-album-item {
  position: relative;
  display: block;
  min-height: 11rem;
  border-radius: 0.9rem;
  overflow: hidden;
  background: rgba(23, 33, 47, 0.08);
}

.post-album-image {
  width: 100%;
  height: 100%;
  min-height: 11rem;
  object-fit: cover;
  transition: transform 160ms ease;
}

.post-album-item:hover .post-album-image {
  transform: scale(1.03);
}

.post-album-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  background: rgba(23, 33, 47, 0.45);
  backdrop-filter: blur(2px);
}

.post-meta {
  display: flex;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.post-meta-link {
  color: inherit;
  text-decoration: none;
}

.post-meta-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.post-action-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: stretch;
}

.post-action-bar > * {
  min-width: 0;
}

.post-action-form {
  display: contents;
}

.post-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.68rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.76);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
  box-sizing: border-box;
}

.post-action-button:hover {
  color: var(--ink);
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.post-action-button.is-active {
  color: var(--accent-dark);
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.12);
}

.post-share-dropdown {
  display: flex;
  width: 100%;
  min-width: 0;
  position: relative;
}

.post-share-dropdown summary {
  list-style: none;
}

.post-share-dropdown summary::-webkit-details-marker {
  display: none;
}

.post-share-dropdown .post-action-button {
  flex: 1 1 auto;
}

.post-share-toggle::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  margin-left: 0.35rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  flex-shrink: 0;
}

.post-share-dropdown[open] .post-share-toggle::after {
  transform: rotate(-135deg) translateY(-1px);
}

.post-share-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 25;
  min-width: 16rem;
  padding: 0.45rem;
  background: rgba(248, 251, 255, 0.98);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.post-share-menu .dropdown-item,
.post-share-menu .dropdown-item-text {
  border-radius: 0.8rem;
}

.post-share-menu form {
  margin: 0;
}

.post-share-menu .dropdown-item {
  padding: 0.7rem 0.85rem;
}

.share-menu-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.share-menu-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.share-menu-icon svg {
  width: 100%;
  height: 100%;
}

.share-menu-heading {
  padding: 0.45rem 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.post-action-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
}

.post-action-icon svg {
  width: 100%;
  height: 100%;
}

.comment-item {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.comment-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.network-card,
.network-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  min-width: 0;
}

.network-link {
  color: var(--ink);
  text-decoration: none;
}

.network-card-main,
.post-author,
.profile-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.friend-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.friend-action-group form {
  margin: 0;
}

.friend-overflow-menu {
  position: relative;
}

.friend-overflow-menu summary {
  list-style: none;
}

.friend-overflow-menu summary::-webkit-details-marker {
  display: none;
}

.friend-overflow-toggle {
  min-width: 2.6rem;
  padding-inline: 0.7rem;
}

.friend-overflow-toggle .friend-action-icon {
  margin: 0;
}

.friend-overflow-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 30;
  min-width: 11rem;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(248, 251, 255, 0.98);
  box-shadow: var(--shadow);
}

.friend-overflow-panel form {
  margin: 0;
}

.friend-overflow-item {
  display: inline-flex;
  align-items: center;
  width: 100%;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem;
  border: 0;
  border-radius: 0.8rem;
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.friend-overflow-item:hover {
  color: var(--accent-dark);
  background: rgba(37, 99, 235, 0.08);
}

.friend-overflow-item-danger {
  color: #dc3545;
}

.friend-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.3rem;
  padding-inline: 0.8rem;
}

.friend-action-icon {
  display: inline-flex;
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.friend-action-icon svg {
  width: 100%;
  height: 100%;
}

.profile-cover,
.profile-cover-hero {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.3rem;
  background: rgba(255, 255, 255, 0.68);
}

.profile-cover-image {
  display: block;
  width: 100%;
  height: min(280px, 38vw);
  min-height: 180px;
  object-fit: cover;
}

.profile-cover-fallback {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 1.5rem;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(255, 255, 255, 0.52)),
    radial-gradient(circle at right top, rgba(15, 118, 110, 0.12), transparent 42%);
}

.message-avatar-wrap {
  position: relative;
  display: inline-flex;
}

.presence-dot {
  position: absolute;
  right: -0.05rem;
  bottom: -0.05rem;
  width: 0.72rem;
  height: 0.72rem;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: #d1c4bb;
}

.presence-dot.is-online {
  background: #2eaf61;
}

.message-thread-copy {
  flex: 1;
  min-width: 0;
}

.message-thread-card {
  align-items: flex-start;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
  padding: 0.75rem;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.message-thread-card:hover,
.message-thread-card:focus-visible {
  color: var(--ink);
  text-decoration: none;
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.message-thread-card.is-active {
  border-color: rgba(37, 99, 235, 0.38);
  background: rgba(37, 99, 235, 0.14);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.message-thread-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.message-thread-headline strong,
.post-author h3,
.profile-link,
.profile-link-muted {
  overflow-wrap: anywhere;
}

.message-thread-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.thread-time-text {
  color: #64748b;
  font-size: 0.8rem;
  white-space: nowrap;
}

.thread-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  background: #2563eb;
}

.thread-unread-badge.is-hidden {
  display: none;
}

.message-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.messages-sidebar-top {
  display: grid;
  gap: 0.9rem;
}

.messages-search-shell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  color: #667085;
  background: rgba(241, 245, 249, 0.9);
}

.messages-search-input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.messages-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.friends-search-card {
  padding: 1rem;
}

.friends-search-shell {
  width: 100%;
  min-height: 3.2rem;
}

.messages-mobile-list-header,
.messages-thread-header {
  display: none;
}

.messages-mobile-brand {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #1877f2;
}

.messages-mobile-header-actions,
.messages-thread-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.messages-mobile-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  color: #1877f2;
  background: rgba(241, 245, 249, 0.95);
}

.messages-action-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  flex-shrink: 0;
}

.messages-back-link {
  color: #2563eb;
  text-decoration: none;
}

.mini-avatar,
.profile-avatar-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  color: #fff;
  font-weight: 700;
}

.mini-avatar {
  width: 2.2rem;
  height: 2.2rem;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.profile-avatar-lg {
  width: 5rem;
  height: 5rem;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.page-profile-shell {
  position: relative;
  margin-bottom: 1.5rem;
}

.page-profile-cover {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.6rem;
  min-height: 240px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 28%),
    linear-gradient(135deg, #111827, #0f172a 55%, #1d4ed8 140%);
}

.page-profile-cover-image {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.page-profile-cover-fallback {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-profile-cover-overlay {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.65));
}

.page-profile-hero {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  margin: -4.5rem 1.25rem 0;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  background: rgba(248, 251, 255, 0.96);
  box-shadow: var(--shadow);
}

.page-profile-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}

.page-profile-identity {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  min-width: 0;
}

.page-profile-avatar {
  width: 6rem;
  height: 6rem;
  border-radius: 1.5rem;
  object-fit: cover;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
  flex-shrink: 0;
}

.page-profile-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
}

.page-profile-copy {
  min-width: 0;
}

.page-profile-copy h1 {
  margin: 0.55rem 0 0.35rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.page-profile-tagline,
.page-profile-handle {
  margin: 0;
}

.page-profile-tagline {
  font-size: 1.08rem;
}

.page-profile-handle {
  margin-top: 0.35rem;
  color: var(--muted);
}

.page-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.page-profile-actions form {
  margin: 0;
}

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

.page-profile-stat {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(23, 33, 47, 0.08);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.76);
}

.page-profile-stat strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.page-profile-stat span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
}

.page-sidebar,
.page-main-column {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.page-sidebar {
  position: sticky;
  top: 5.6rem;
}

.page-detail-card {
  height: auto;
}

.page-card-header {
  display: grid;
  gap: 0.3rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(23, 33, 47, 0.08);
}

.page-info-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.page-info-item {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(23, 33, 47, 0.07);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.page-info-label {
  display: inline-flex;
  margin-bottom: 0.35rem;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.page-info-item p {
  margin: 0;
  line-height: 1.65;
}

.page-empty-state {
  display: grid;
  gap: 0.35rem;
  place-items: start;
  min-height: 240px;
  align-content: center;
  padding: 1.5rem 0 0.35rem;
}

.chat-window {
  display: grid;
  gap: 0.65rem;
  max-height: 24rem;
  overflow-y: auto;
  min-width: 0;
}

.messages-chat-card {
  display: grid;
}

.chat-composer {
  position: relative;
}

.message-compose-shell {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
}

.chat-composer-inline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.4rem 0.5rem 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.chat-composer-textarea {
  padding-right: 3.5rem;
  min-height: 5.75rem;
}

.chat-composer-inline .chat-composer-textarea {
  min-height: 2.5rem;
  max-height: 8rem;
  padding: 0.55rem 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  resize: none;
}

.chat-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.chat-file-input {
  display: none;
}

.chat-attach-button {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent-dark);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.88);
}

.chat-attach-button svg {
  width: 1rem;
  height: 1rem;
}

.chat-file-name {
  min-height: 1.2rem;
}

.chat-bubble {
  max-width: 80%;
  padding: 0.7rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--border);
  min-width: 0;
}

.chat-bubble .network-card-main {
  align-items: flex-end;
}

.chat-bubble-body {
  min-width: 0;
}

.chat-bubble.mine {
  margin-left: auto;
  border-color: rgba(37, 99, 235, 0.2);
  background: linear-gradient(135deg, #1877f2, #2563eb);
  color: #fff;
}

.chat-bubble.theirs {
  margin-right: auto;
  background: rgba(255, 255, 255, 0.98);
}

.chat-link {
  color: var(--accent-dark);
  font-weight: 600;
  word-break: break-word;
}

.chat-message-copy {
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-message-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  margin-top: 0.18rem;
}

.chat-status-ticks {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
}

.chat-status-ticks svg {
  width: 100%;
  height: 100%;
}

.chat-status-sent .chat-status-second-tick {
  display: none;
}

.chat-status-delivered {
  color: #94a3b8;
}

.chat-status-read {
  color: #22c55e;
}

.chat-bubble.mine .chat-link,
.chat-bubble.mine small,
.chat-bubble.mine strong {
  color: #fff;
}

.chat-bubble.mine .chat-status-delivered {
  color: rgba(255, 255, 255, 0.85);
}

.chat-bubble.mine .chat-status-sent {
  color: rgba(255, 255, 255, 0.72);
}

.chat-bubble.mine .chat-status-read {
  color: #86efac;
}

.chat-bubble.mine .mini-avatar {
  display: none;
}

.chat-media {
  display: block;
  max-width: min(320px, 100%);
  max-height: 220px;
  margin-top: 0.55rem;
  border-radius: 0.9rem;
  object-fit: cover;
  cursor: zoom-in;
}

.chat-reaction-tray {
  position: absolute;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.chat-reaction-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  font-size: 1.1rem;
  background: transparent;
}

.chat-reaction-button:hover {
  background: rgba(37, 99, 235, 0.08);
}

.thread-preview-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emoji-picker-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.chat-emoji-picker summary {
  list-style: none;
}

.emoji-picker {
  position: relative;
}

.emoji-picker summary {
  list-style: none;
}

.emoji-picker summary::-webkit-details-marker {
  display: none;
}

.emoji-picker-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
}

.emoji-picker-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.45rem);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.35rem;
  width: 14rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(248, 251, 255, 0.98);
  box-shadow: var(--shadow);
  z-index: 15;
}

.emoji-picker-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2rem;
  border: 0;
  border-radius: 0.75rem;
  font-size: 1.2rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.8);
}

.emoji-picker-item:hover {
  background: rgba(37, 99, 235, 0.08);
}

.floating-chat-launcher {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.82rem 1rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 1rem;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.28);
}

.floating-chat-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
}

.floating-chat-icon svg {
  width: 100%;
  height: 100%;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2100;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(6px);
}

.image-lightbox-panel {
  position: relative;
  display: grid;
  place-items: center;
  width: min(92vw, 1100px);
  height: calc(100dvh - 2rem);
  margin: 1rem auto 0;
}

.image-lightbox-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 1rem;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

.image-lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.72);
}

.admin-frame {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 1.25rem;
  color: #fdf5ef;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

.admin-brand {
  color: #fff4ea;
}

.admin-nav {
  display: grid;
  gap: 0.6rem;
}

.admin-nav a {
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  color: rgba(255, 244, 234, 0.92);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
}

.admin-main {
  padding: 1.5rem;
}

.admin-hero {
  padding: 1.5rem 0 0.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.login-card {
  width: min(460px, calc(100vw - 2rem));
  padding: 1.5rem;
}

.table > :not(caption) > * > * {
  background: transparent;
}

.form-control,
.form-select {
  border-radius: 0.9rem;
  border-color: rgba(31, 26, 23, 0.14);
  padding: 0.75rem 0.9rem;
}

.btn,
.form-control,
.form-select {
  box-shadow: none !important;
}

@media (max-width: 991.98px) {
  .site-header .container,
  .site-footer .container,
  .container {
    width: min(100%, calc(100% - 1.4rem));
  }

  .landing-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .landing-screen {
    min-height: auto;
  }

  .landing-about-card,
  .landing-register-card {
    padding: 1.35rem;
  }

  .landing-about-grid {
    grid-template-columns: 1fr;
  }

  .landing-about-card h1 {
    max-width: none;
  }

  .landing-metric-row {
    grid-template-columns: 1fr;
  }

  .landing-form-grid {
    grid-template-columns: 1fr;
  }

  .site-header .navbar {
    gap: 0.75rem;
  }

  .site-header .navbar-collapse {
    padding-top: 0.6rem;
  }

  .header-search-form {
    width: 100%;
    margin: 0 0 0.5rem;
  }

  .site-header .navbar-nav {
    width: 100%;
    gap: 0.25rem;
  }

  .site-header .nav-item {
    width: 100%;
  }

  .site-header .nav-link,
  .site-header .btn,
  .site-header .account-dropdown,
  .site-header .user-chip {
    width: 100%;
  }

  .site-header .nav-link,
  .site-header .btn,
  .site-header .user-chip {
    justify-content: flex-start;
  }

  .account-dropdown-menu {
    left: 0;
    right: auto;
    width: 100%;
    min-width: 0;
  }

  .hero-panel {
    flex-direction: column;
  }

  .page-profile-hero {
    margin: -3.5rem 0.9rem 0;
  }

  .page-sidebar {
    position: static;
    top: auto;
  }

  .page-profile-main,
  .page-profile-identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-profile-actions {
    justify-content: flex-start;
  }

  .page-profile-stats {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-media,
  .post-album-image,
  .chat-media {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .chat-window {
    max-height: 20rem;
  }

  .message-thread-card {
    padding: 0.9rem;
  }

  .admin-frame {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    padding-bottom: 1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .home-sidebar-scroll {
    position: sticky;
    top: 5.4rem;
    max-height: calc(100vh - 6.2rem);
    overflow-y: auto;
    padding-right: 0.35rem;
    padding-left: 0.1rem;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 transparent;
  }

  .home-sidebar-scroll::-webkit-scrollbar {
    width: 10px;
  }

  .home-sidebar-scroll::-webkit-scrollbar-track {
    border-radius: 999px;
    background: transparent;
  }

  .home-sidebar-scroll::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
  }

  .home-sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  }
}

@media (max-width: 767.98px) {
  .site-header .container,
  .site-footer .container,
  .container {
    width: min(100%, calc(100% - 1rem));
  }

  .landing-about-card h1 {
    font-size: clamp(2.5rem, 12vw, 3.8rem);
    line-height: 1;
  }

  .landing-action-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-register-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .site-header .navbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem 0.65rem;
  }

  .site-header .navbar-toggler {
    display: none;
  }

  .mobile-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
  }

  .mobile-header-actions .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.7rem;
    padding: 0.5rem 0.72rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.78);
    font-size: 0.98rem;
  }

  .mobile-header-actions .nav-link-icon > span:last-child {
    display: inline;
  }

  .mobile-header-actions .nav-icon {
    width: 0.95rem;
    height: 0.95rem;
  }

  .mobile-header-actions .user-chip {
    width: auto;
    padding: 0.16rem;
    border-radius: 999px;
  }

  .mobile-header-actions .user-chip-copy,
  .mobile-header-actions .account-dropdown-toggle::after {
    display: none;
  }

  .mobile-header-actions .user-chip-avatar {
    width: 2.2rem;
    height: 2.2rem;
  }

  .mobile-header-actions .account-dropdown-menu {
    right: 0;
    left: auto;
    top: calc(100% + 0.65rem);
    width: min(12rem, calc(100vw - 1.5rem));
    min-width: 11rem;
    padding: 0.45rem;
    border-radius: 1rem;
  }

  .site-header .navbar-collapse {
    display: flex !important;
    grid-column: 1 / -1;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0.55rem;
    padding-top: 0;
  }

  .header-search-form {
    display: none;
  }

  .site-header .navbar-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .site-header .nav-item {
    width: 100%;
    min-width: 0;
  }

  .site-header .nav-link,
  .site-header .btn,
  .site-header .account-dropdown,
  .site-header .user-chip {
    width: 100%;
    justify-content: center;
  }

  .site-header .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 2.85rem;
    padding: 0.62rem 0.45rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.72);
  }

  .site-header .nav-link-icon {
    gap: 0.3rem;
    justify-content: center;
    font-size: 0.95rem;
  }

  .site-header .nav-link-has-badge {
    padding-right: 1.45rem;
  }

  .site-header .navbar-nav .nav-badge {
    position: absolute;
    top: 0.42rem;
    right: 0.42rem;
    transform: none;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.24rem;
    font-size: 0.64rem;
    line-height: 1;
  }

  .site-header .navbar-nav .nav-icon {
    width: 0.95rem;
    height: 0.95rem;
  }

  .site-header .nav-link-icon > span:last-child {
    display: inline;
  }

  .site-header .btn.btn-brand {
    min-width: 0;
    min-height: 3rem;
    padding: 0.55rem 0.75rem;
    white-space: nowrap;
  }

  .mobile-nav-desktop-only {
    display: none !important;
  }

  .site-header .mobile-feed-icon-only > span:last-child {
    display: none;
  }

  .desktop-home-sidebar {
    display: none;
  }

  .mobile-home-feed {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
  }

  .mobile-composer-card {
    display: grid;
    gap: 0.45rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    background: rgba(248, 251, 255, 0.96);
    box-shadow: var(--shadow);
  }

  .mobile-composer-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.6rem;
    align-items: center;
  }

  .mobile-composer-input {
    width: 100%;
    min-height: 2.55rem;
    max-height: 6rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(23, 33, 47, 0.12);
    border-radius: 999px;
    font: inherit;
    color: var(--ink);
    resize: none;
    background: #fff;
  }

  .mobile-composer-trigger,
  .mobile-composer-select-trigger {
    text-align: left;
    cursor: pointer;
  }

  .mobile-composer-trigger {
    display: inline-flex;
    align-items: center;
  }

  .mobile-composer-select-trigger {
    display: inline-flex;
    align-items: center;
    width: 100%;
    border: 1px solid rgba(23, 33, 47, 0.14);
    border-radius: 0.9rem;
    color: var(--ink);
    background-color: #fff;
  }

  .mobile-composer-media {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(37, 99, 235, 0.08);
    cursor: pointer;
  }

  .mobile-composer-media svg {
    width: 1.15rem;
    height: 1.15rem;
  }

  .mobile-composer-file-name {
    min-height: 1rem;
    padding-left: 2.9rem;
  }

  .mobile-composer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: center;
  }

  .mobile-composer-actions .form-select {
    min-height: 2.75rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }

  .mobile-post-modal {
    position: fixed;
    inset: 0;
    display: block;
    z-index: 1300;
  }

  .mobile-post-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
  }

  .mobile-post-modal-panel {
    position: relative;
    display: grid;
    gap: 1rem;
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    margin: 0.5rem auto;
    padding: 1rem;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 1.35rem;
    background: rgba(248, 251, 255, 0.98);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  }

  .mobile-post-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .mobile-post-modal-header h3 {
    margin: 0;
    font-size: 1.35rem;
  }

  .mobile-post-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font: inherit;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.88);
  }

  .mobile-post-form {
    display: grid;
    gap: 0.9rem;
  }

  .mobile-post-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .mobile-post-textarea {
    min-height: 10rem;
    padding: 1rem;
    resize: vertical;
    background: rgba(255, 255, 255, 0.92);
  }

  .mobile-post-form-row {
    display: grid;
  }

  .mobile-post-upload-row {
    display: grid;
  }

  .mobile-post-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3rem;
    padding: 0.8rem 1rem;
    border: 1px dashed rgba(37, 99, 235, 0.28);
    border-radius: 1rem;
    color: var(--accent-dark);
    font-weight: 600;
    cursor: pointer;
    background: rgba(37, 99, 235, 0.06);
  }

  .mobile-post-upload-icon {
    display: inline-flex;
    width: 1.1rem;
    height: 1.1rem;
  }

  .mobile-post-upload-icon svg {
    width: 100%;
    height: 100%;
  }

  .mobile-post-file-name {
    min-height: 1rem;
  }

  .mobile-stories-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 6.7rem;
    gap: 0.65rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }

  .mobile-stories-strip::-webkit-scrollbar {
    display: none;
  }

  .mobile-story-card {
    position: relative;
    display: grid;
    align-content: end;
    min-height: 11.4rem;
    padding: 0.65rem;
    overflow: hidden;
    border-radius: 1.1rem;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.84));
    box-shadow: var(--shadow);
  }

  .mobile-story-card strong {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    line-height: 1.15;
  }

  .mobile-story-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
  }

  .mobile-story-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.7));
  }

  .mobile-story-ring,
  .mobile-story-plus {
    position: absolute;
    z-index: 1;
    left: 0.65rem;
    top: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: 3px solid #2563eb;
    background: rgba(255, 255, 255, 0.94);
  }

  .mobile-story-plus {
    top: auto;
    bottom: 2.15rem;
    color: #2563eb;
    font-size: 1.45rem;
    font-weight: 700;
  }

  .mobile-story-create {
    color: var(--ink);
    background: rgba(248, 251, 255, 0.96);
  }

  .mobile-story-create::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(248, 251, 255, 0.98) 58%);
  }

  .mobile-story-create strong {
    color: var(--ink);
  }

  .post-card {
    margin-bottom: 0.85rem !important;
    border-radius: 1.15rem;
  }

  .post-card .post-meta,
  .post-card .post-action-bar {
    margin-top: 0.85rem;
  }

  .header-search-input {
    min-height: 2.75rem;
  }

  .site-header .navbar-brand {
    max-width: none;
  }

  .brand-mark {
    gap: 0.6rem;
  }

  .brand-badge {
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 0.7rem;
  }

  .hero-panel {
    gap: 1rem;
    padding: 1.2rem;
  }

  .page-profile-cover-image,
  .page-profile-cover-fallback {
    height: 220px;
    min-height: 220px;
  }

  .page-profile-hero {
    margin: -2.6rem 0.75rem 0;
    padding: 1rem;
  }

  .page-profile-avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 1.2rem;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .post-action-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .post-action-form,
  .post-action-button {
    width: 100%;
  }

  .post-action-button {
    min-height: 2.85rem;
    padding: 0.6rem 0.45rem;
    gap: 0.4rem;
    font-size: 0.96rem;
  }

  .post-composer-textarea {
    min-height: 9rem;
    padding-right: 4.8rem;
  }

  .post-composer-menu {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .post-album-2,
  .post-album-3,
  .post-album-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .post-album-3 .post-album-item:first-child {
    grid-row: auto;
  }

  .post-composer-menu-list {
    right: -0.25rem;
    min-width: min(11rem, calc(100vw - 2.5rem));
  }

  .camera-modal-panel {
    width: calc(100vw - 1rem);
    margin-top: 2vh;
    border-radius: 1.1rem;
  }

  .camera-modal-actions .btn {
    flex: 1 1 100%;
  }

  .message-thread-card,
  .network-card {
    padding: 0.9rem;
  }

  .chat-window {
    max-height: 18rem;
  }

  .chat-bubble {
    max-width: 92%;
  }

  .chat-composer-textarea {
    min-height: 5.5rem;
    padding-right: 3.8rem;
  }

  .chat-attach-button {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .floating-chat-launcher {
    right: 0.8rem;
    bottom: 0.8rem;
    padding: 0.72rem 0.9rem;
  }

  .site-footer .container {
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  html {
    font-size: 14px;
  }

  .message-panel-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .network-card-main,
  .message-thread-headline {
    align-items: flex-start;
  }

  .network-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .friend-action-group {
    width: 100%;
    justify-content: flex-start;
  }

  .message-thread-headline {
    flex-direction: column;
    gap: 0.35rem;
  }

  .chat-window {
    max-height: 16rem;
  }

  .chat-bubble {
    max-width: 100%;
  }

  .post-action-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .post-action-button {
    min-height: 2.7rem;
    padding: 0.55rem 0.35rem;
    gap: 0.32rem;
    font-size: 0.92rem;
  }

  .chat-composer-textarea {
    min-height: 5rem;
  }

  .post-composer-menu-list,
  .account-dropdown-menu {
    width: min(100%, calc(100vw - 2rem));
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .content-card,
  .login-card {
    padding: 1.2rem;
    border-radius: 1.15rem;
  }

  .emoji-picker-menu {
    width: min(14rem, calc(100vw - 2.5rem));
  }
}

@media (max-width: 991.98px) {
  .messages-page {
    margin-inline: -0.55rem;
  }

  .messages-layout {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
  }

  .messages-page .content-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .messages-sidebar-card,
  .messages-chat-card {
    min-height: calc(100vh - 5.4rem);
  }

  .messages-mobile-list-header,
  .messages-thread-header {
    display: flex;
  }

  .messages-mobile-list-header {
    align-items: center;
    justify-content: space-between;
    padding: 0.15rem 0.95rem 0.8rem;
  }

  .messages-sidebar-top {
    padding: 0 0.95rem;
  }

  .messages-search-shell {
    min-height: 2.95rem;
    font-size: 0.96rem;
  }

  .messages-thread-list {
    display: grid;
    gap: 0.15rem;
    padding: 0.3rem 0.5rem 0.5rem;
  }

  .message-thread-card {
    padding: 0.8rem 0.65rem;
    border: 0;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: none;
  }

  .message-thread-card .mini-avatar {
    width: 3.1rem;
    height: 3.1rem;
    font-size: 1rem;
  }

  .message-thread-headline {
    align-items: flex-start;
  }

  .message-thread-copy .small {
    font-size: 0.9rem;
  }

  .message-thread-meta {
    padding-top: 0.05rem;
  }

  .thread-time-text {
    font-size: 0.82rem;
  }

  .messages-page-list-mode .messages-chat-column {
    display: none;
  }

  .messages-page-thread-mode .messages-thread-column {
    display: none;
  }

  .messages-thread-header {
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem 0.7rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }

  .messages-thread-header-copy {
    flex: 1;
    min-width: 0;
  }

  .messages-thread-header-copy .h4 {
    margin: 0;
    font-size: 1.12rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .messages-thread-header-actions {
    gap: 0.35rem;
  }

  .messages-thread-header .mini-avatar {
    width: 2.65rem;
    height: 2.65rem;
  }

  .messages-chat-card {
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: #fff;
  }

  .chat-window {
    max-height: none;
    min-height: calc(100vh - 13rem);
    padding: 0.85rem 0.8rem 0.4rem;
    background: #fff;
  }

  .chat-bubble {
    max-width: 84%;
    padding: 0.6rem 0.8rem;
    border-radius: 1.3rem;
  }

  .chat-bubble .network-card-main {
    gap: 0.55rem;
  }

  .chat-bubble.theirs {
    border-top-left-radius: 0.55rem;
  }

  .chat-bubble.mine {
    border-top-right-radius: 0.55rem;
  }

  .chat-bubble small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.78rem;
  }

  .message-compose-shell {
    align-items: center;
    padding: 0.55rem 0.75rem 0.75rem;
    background: #fff;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
  }

  .chat-composer-inline {
    padding-right: 0.4rem;
    min-height: 3rem;
  }

  .chat-composer-inline .chat-composer-textarea {
    font-size: 1rem;
  }

  .chat-plus-button,
  .chat-media-button,
  .chat-send-button,
  .chat-emoji-picker > summary.messages-mobile-icon-button {
    width: 2.4rem;
    height: 2.4rem;
  }

  .chat-file-name {
    padding: 0 0.95rem 0.6rem;
  }
}

@media (max-width: 420px) {
  .post-action-button > span:last-child,
  .post-share-toggle > span:last-child {
    display: none;
  }

  .post-action-button {
    gap: 0;
  }

  .post-share-toggle::after {
    display: none;
  }
}
