body[data-page="home"]:not(.sidebar-collapsed) {
  --sidebar-width: 228px;
}

body[data-page="home"].sidebar-collapsed {
  --sidebar-width: 0px;
}

.home-layout {
  width: calc(100% - 34px);
  grid-template-columns: calc(var(--sidebar-width) + var(--sidebar-rail-width)) minmax(760px, 960px) 320px;
  transition: grid-template-columns 0.2s ease, width 0.2s ease;
}

.home-feed {
  min-height: calc(100vh - var(--sidebar-top) - 14px);
}

.home-sidebar-right {
  display: flex;
  position: sticky;
  top: var(--sidebar-top);
  align-self: start;
  height: calc(100vh - var(--sidebar-top) - 14px);
  min-height: 0;
}

.home-feed[data-state="feed"],
.home-feed[data-state="error"] {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-feed[data-state="guest"],
.home-feed[data-state="authenticated-empty"] {
  display: block;
}

.home-feed[data-state="pending"] {
  visibility: hidden;
}

.index-sort-bar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 0 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid #222b30;
}

.index-sort-dropdown {
  position: relative;
}

.index-sort-dropdown > summary::-webkit-details-marker {
  display: none;
}

.index-sort-dropdown > summary {
  list-style: none;
}

.index-sort-dropdown > summary::marker {
  content: "";
  display: none;
}

.index-sort-trigger {
  min-height: 34px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #dce5ea;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.18s ease;
}

.index-sort-trigger:hover,
.index-sort-dropdown[open] .index-sort-trigger {
  color: #eef4f7;
}

.index-sort-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #aebbc2;
  font-size: 16px;
  line-height: 1;
}

.index-sort-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: max-content;
  min-width: 220px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid #303b41;
  background: #11181c;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.index-sort-option {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #b7c4ca;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.index-sort-option:hover,
.index-sort-option.is-active {
  background: #20292e;
  color: #eef4f7;
}

.home-community-recs {
  padding: 22px 0 26px;
  border-bottom: 1px solid #222b30;
}

.home-community-recs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.home-community-recs-head h2 {
  margin: 0;
  color: #dce8ee;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
}

.home-community-recs-head a {
  color: #94a5af;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.home-community-recs-head a:hover {
  color: #f2f7fa;
}

.home-community-rec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-community-rec-card {
  min-height: 150px;
  padding: 16px;
  border: 1px solid #263238;
  border-radius: 16px;
  background: #11191d;
}

.home-community-rec-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.home-community-rec-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.home-community-rec-logo {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  overflow: hidden;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 950;
}

.home-community-rec-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-community-rec-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.home-community-rec-title strong {
  color: #f2f6f8;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-community-rec-title small,
.home-community-rec-card p {
  color: #95a7af;
  font-size: 14px;
  line-height: 1.45;
}

.home-community-rec-title small {
  font-weight: 760;
}

.home-community-rec-card p {
  margin: 14px 0 0;
}

.home-community-join {
  min-height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: #1d2d32;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.home-community-join:hover:not(:disabled) {
  background: #263a40;
}

.home-community-join:disabled {
  cursor: default;
  opacity: 0.68;
}

.recent-posts-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 1px solid #0b0e10;
  border-radius: 22px;
  background: #000000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.recent-posts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 0 20px;
}

.recent-posts-head h3 {
  margin: 0;
  color: #91a4ae;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.recent-posts-clear {
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #5d8dff;
  font-size: 17px;
  font-weight: 750;
  cursor: pointer;
}

.recent-posts-clear:hover {
  color: #8fb0ff;
}

.recent-posts-head-actions,
.recent-posts-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.recent-posts-controls {
  gap: 4px;
}

.recent-posts-control {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #2a363d;
  border-radius: 8px;
  background: #172126;
  color: #b9c7ce;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.recent-posts-control:hover:not(:disabled) {
  background: #223039;
  border-color: #3a4850;
  color: #f1f7fa;
}

.recent-posts-control:disabled {
  cursor: default;
  opacity: 0.42;
}

.recent-posts-control svg {
  width: 16px;
  height: 16px;
  display: block;
}

.recent-posts-control path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.recent-posts-viewport {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.recent-posts-viewport::-webkit-scrollbar {
  display: none;
}

.recent-posts-list {
  display: flex;
  flex-direction: column;
}

.recent-post-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-height: 126px;
  padding: 18px 20px;
  border-top: 1px solid #1a1d20;
  text-decoration: none;
  transition: background 0.16s ease;
}

.recent-post-item.has-media {
  grid-template-columns: minmax(0, 1fr) 84px;
  align-items: center;
}

.recent-post-item:hover {
  background: #050708;
}

.recent-post-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recent-post-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.recent-post-avatar {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 999px;
  overflow: hidden;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.recent-post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recent-post-copy small,
.recent-post-copy em {
  color: #91a4ae;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
}

.recent-post-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.recent-post-copy em {
  font-size: 13px;
}

.recent-post-copy strong {
  color: #9fb2bc;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-post-media {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #242a2e;
  background: #090d10;
  display: block;
}

.recent-post-media img,
.recent-post-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recent-post-media.is-youtube {
  position: relative;
}

.recent-post-media.is-youtube::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 24px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  transform: translate(-50%, -50%);
}

.recent-post-media.is-youtube::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  border-left: 8px solid #ffffff;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transform: translate(-35%, -50%);
}

.recent-posts-empty {
  padding: 24px 20px;
  border-top: 1px solid #1a1d20;
}

.recent-posts-empty strong,
.recent-posts-empty span {
  display: block;
}

.recent-posts-empty strong {
  color: #eef4f7;
  font-size: 15px;
  font-weight: 850;
}

.recent-posts-empty span {
  margin-top: 6px;
  color: #8fa1ab;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.home-empty-card {
  min-height: 230px;
  border-radius: 26px;
  border: 1px solid #283238;
  background: #1a2125;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 24px;
}

.home-guest-card {
  justify-content: center;
}

.home-auth-card {
  justify-content: flex-start;
  padding: 42px 44px;
}

.home-empty-copy {
  text-align: center;
}

.home-auth-copy {
  max-width: 520px;
  text-align: left;
}

.home-auth-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #30404b;
  background: rgba(40, 52, 59, 0.62);
  color: #89a6c7;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.home-empty-copy h1 {
  margin: 0;
  color: #a8bbcf;
  font-size: clamp(20px, 2.4vw, 38px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.home-empty-copy p {
  margin: 22px 0 0;
  color: #9eafbe;
  font-size: clamp(15px, 1.2vw, 20px);
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.home-auth-copy h1 {
  margin: 18px 0 0;
  color: #d6e4f0;
  font-size: clamp(24px, 2.4vw, 38px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.home-auth-copy p {
  margin: 16px 0 0;
  color: #95a9bb;
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.5;
  letter-spacing: -0.02em;
}

@media (max-width: 1280px) {
  .home-layout {
    grid-template-columns: calc(var(--sidebar-width) + var(--sidebar-rail-width)) minmax(0, 1fr);
  }

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

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

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

  .home-empty-card {
    min-height: 220px;
    padding: 28px 22px;
  }

  .home-auth-card {
    padding: 30px 24px;
  }

  .home-empty-copy p {
    margin-top: 16px;
  }

  .home-auth-copy h1 {
    margin-top: 14px;
  }

  .home-auth-copy p {
    margin-top: 12px;
  }
}

@media (max-width: 700px) {
  .home-community-rec-grid {
    grid-template-columns: 1fr;
  }

  .home-community-recs-head h2 {
    font-size: 21px;
  }

  .home-community-rec-card {
    min-height: 0;
    padding: 14px;
  }

  .home-community-rec-main {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .home-community-rec-logo {
    width: 42px;
    height: 42px;
  }

  .home-community-join {
    min-height: 36px;
    padding: 0 14px;
  }
}
