/* Newsfeed */
.feed-page {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.feed-header {
  margin-bottom: 1.25rem;
}

.feed-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
}

.feed-subtitle {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--gray-500);
}

.feed-compose {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  padding: 1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.feed-compose-top {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.feed-compose-input {
  flex: 1;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
  resize: vertical;
  min-height: 72px;
  background: var(--gray-50);
}

.feed-compose-preview {
  margin-top: 0.75rem;
}

.feed-compose-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.feed-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feed-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.feed-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--gray-100);
}

.feed-author {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.feed-author-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.feed-author-meta strong {
  font-size: 0.92rem;
}

.feed-author-meta span {
  font-size: 0.78rem;
  color: var(--gray-500);
}

.feed-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.feed-avatar-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-200);
  color: var(--gray-700);
  font-weight: 800;
}

.feed-type-icon {
  font-size: 1.25rem;
  color: var(--red);
  flex-shrink: 0;
}

.feed-card-media {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem 1rem;
  text-decoration: none;
  color: inherit;
}

.feed-card-media img {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.feed-card-media-text h4 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.feed-card-media-text p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--gray-500);
}

.feed-card-stream,
.feed-card-post {
  padding: 0.85rem 1rem 1rem;
}

.feed-card-stream h4,
.feed-card-post .feed-post-body {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.feed-card-muted {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  color: var(--gray-500);
}

.feed-card-cta {
  margin-top: 0.35rem;
}

.feed-post-body {
  white-space: pre-wrap;
}

.feed-post-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 0.5rem;
}

.feed-card-actions {
  padding: 0 1rem 1rem;
}

.feed-comments {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--gray-100);
}

.feed-comment-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.65rem;
  padding: 0.35rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--gray-600);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.feed-comment-toggle ion-icon {
  font-size: 1.1rem;
}

.feed-comments-panel {
  margin-top: 0.75rem;
}

.feed-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.feed-comment {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.feed-comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.feed-comment-body {
  flex: 1;
  min-width: 0;
}

.feed-comment-body strong {
  font-size: 0.82rem;
  margin-right: 0.35rem;
}

.feed-comment-time {
  font-size: 0.72rem;
  color: var(--gray-500);
}

.feed-comment-body p {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.feed-comment-delete {
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0.15rem;
}

.feed-comment-compose {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.feed-comment-input {
  flex: 1;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.88rem;
  background: var(--gray-50);
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}

body[data-theme="dark"] .feed-comments {
  border-top-color: rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .feed-comment-input {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--gray-900);
}

.feed-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius);
  color: var(--gray-500);
}

.feed-empty ion-icon {
  font-size: 2.5rem;
  color: var(--gray-400);
}

.feed-empty-title {
  margin: 0.75rem 0 0.35rem;
  font-weight: 800;
  color: var(--gray-700);
}

.feed-empty-hint {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

body[data-theme="dark"] .feed-compose,
body[data-theme="dark"] .feed-card {
  background: var(--white);
  border-color: var(--gray-200);
}

body[data-theme="dark"] .feed-compose-input {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--gray-900);
}

body[data-theme="dark"] .feed-title {
  color: var(--gray-900);
}

body[data-theme="dark"] .feed-author-meta strong {
  color: var(--gray-900);
}

body[data-theme="dark"] .feed-card-media-text h4 {
  color: var(--gray-900);
}

.feed-compose-input:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
  border-color: transparent;
}

body[data-theme="dark"] .feed-card-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .feed-empty-title {
  color: #fff;
}

.feed-setup-hint {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--gray-500);
}

.feed-upload-btn.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.feed-compose-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.user-profile-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.user-profile-actions .btn {
  min-width: 140px;
}

.user-profile-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--gray-600);
  margin: 0.35rem 0;
}

.profile-role-badge.chef {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #fee2e2;
  color: var(--red-dark);
}

body[data-theme="dark"] .profile-role-badge.chef {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
}

.discover-strip {
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
}

.discover-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.discover-strip-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.discover-strip-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
}

.discover-strip-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scroll-snap-type: x mandatory;
}

.discover-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.discover-card--compact {
  flex: 0 0 240px;
  scroll-snap-align: start;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

.discover-card-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.discover-card--compact .discover-card-link {
  flex-direction: column;
}

.discover-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.discover-avatar-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  color: var(--gray-600);
  font-weight: 700;
}

.discover-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.discover-card-meta strong {
  font-size: 0.95rem;
  color: var(--gray-900);
}

.discover-card-meta span {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.discover-mutual {
  font-size: 0.75rem;
  color: var(--red);
}

.discover-follow-btn {
  flex-shrink: 0;
}

.discover-card--compact .discover-follow-btn {
  width: 100%;
}

.discover-search-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.discover-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 1.1rem;
}

.discover-search-input {
  width: 100%;
  padding: 0.65rem 0.85rem 0.65rem 2.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  font: inherit;
  background: var(--white);
}

.discover-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.discover-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.discover-empty {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin: 0;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.share-btn ion-icon {
  font-size: 1.1rem;
}
