.feed-body .auth-main-inner.container {
  width: min(1320px, 100%);
}

.feed-body .auth-sidebar:hover ~ .main-content.auth-main-content .auth-main-inner.container {
  width: min(1320px, 100%);
}

.feed-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 1rem;
  align-items: start;
}

.feed-main-column {
  max-width: 760px;
  width: min(100%, 760px);
  justify-self: center;
}

.feed-right-rail {
  position: sticky;
  top: 1rem;
  align-self: start;
}

.feed-rail-panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: 1rem;
}

.feed-rail-title {
  margin: 0;
  font-size: 1rem;
}

.feed-rail-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.feed-rail-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-secondary);
  padding: 0.65rem 0.7rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.feed-rail-item a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.feed-toolbar {
  margin-bottom: 0.85rem;
}

.feed-saved-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.feed-saved-head h1 {
  margin: 0;
}

.feed-saved-head .subtle {
  margin: 0.3rem 0 0;
}

.feed-toolbar-tabs {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.feed-filters {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.feed-csrf-form {
  display: none;
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.feed-post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.feed-post-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
}

.feed-post-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.feed-post-avatar,
.feed-comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

.feed-post-avatar img,
.feed-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-post-avatar-fallback,
.feed-comment-avatar span {
  color: var(--brand-secondary);
  font-weight: 700;
}

.feed-post-author-copy {
  display: grid;
  gap: 0.16rem;
}

.feed-post-author-copy strong {
  color: var(--text);
}

.feed-post-author-copy span,
.feed-post-head-meta,
.feed-comment-time {
  color: var(--muted);
  font-size: 0.84rem;
}

.feed-post-head-meta {
  display: grid;
  justify-items: end;
  gap: 0.25rem;
}

.post-media-viewer {
  position: relative;
}

.post-media-frame {
  margin: 0;
  position: relative;
}

.feed-post-card .post-photo {
  width: 100%;
  height: auto;
  max-height: 760px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.post-tags-overlay {
  position: absolute;
  inset: 0;
}

.post-tag-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--text);
  transform: translate(-50%, -50%);
  padding: 0;
}

.post-media-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem 0;
}

.post-media-controls button {
  min-width: 42px;
  padding: 0.45rem 0.6rem;
}

.post-tags-toggle {
  margin: 0.85rem 0.9rem 0;
}

.post-tags-info {
  margin: 0.8rem 0.9rem 0;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.feed-post-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0.9rem 1rem 0;
}

.feed-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.72rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text);
}

.feed-action-btn:hover {
  background: var(--hover);
}

.feed-action-btn.is-active {
  background: var(--tab-active-bg);
  border-color: var(--tab-active-border);
}

.feed-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.feed-action-icon {
  font-size: 0.95rem;
  font-weight: 700;
}

.feed-post-meta,
.feed-comments {
  padding: 0.95rem 1rem 1rem;
}

.feed-post-meta {
  padding-bottom: 0;
}

.feed-post-engagement,
.feed-post-caption {
  margin: 0;
}

.feed-post-caption {
  margin-top: 0.6rem;
  line-height: 1.6;
}

.feed-post-caption a,
.feed-comment-content a {
  font-weight: 700;
  text-decoration: none;
}

.feed-comments {
  display: grid;
  gap: 0.85rem;
}

.feed-comments-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.feed-comment-item {
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.feed-comment-content {
  display: grid;
  gap: 0.25rem;
}

.feed-comment-content p {
  margin: 0;
  line-height: 1.55;
}

.feed-comments-load {
  width: fit-content;
  padding: 0;
  background: transparent;
  color: var(--accent);
  border: none;
  font-weight: 700;
}

.feed-comments-load:hover {
  background: transparent;
  color: var(--link-hover);
}

.feed-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.feed-empty-state {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.8rem;
}

.feed-empty-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-muted);
}

.feed-empty-icon svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.feed-empty-state h2,
.feed-empty-state p {
  margin: 0;
}
