.post-container {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 16px;
}
.vote-section {
  background: #f8f9fa;
  border-radius: 8px 0 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  min-width: 50px;
}
.vote-btn {
  background: none;
  border: none;
  color: #878a8c;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}
.vote-btn:hover {
  background: #f6f7f8;
}
.vote-btn.upvoted {
  color: #ff4500;
}
.vote-btn.downvoted {
  color: #7193ff;
}
.post-content {
  padding: 12px 16px;
}
.subreddit-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  /*background: #0079d3;*/
}
.flair {
  background: #e9ecef;
  color: #495057;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.post-meta {
  font-size: 12px;
  color: #7c7c83;
}
.post-title {
  font-size: 18px;
  font-weight: 600;
  color: #1c1c1c;
  margin: 8px 0;
  line-height: 1.3;
}
.post-text {
  font-size: 14px;
  color: #1c1c1c;
  line-height: 1.6;
  margin: 12px 0;
}
.post-text * {
  white-space: pre-wrap;
}
.action-btn {
  background: none;
  border: none;
  color: #878a8c;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 4px;
  margin-right: 8px;
  cursor: pointer;
}
.action-btn:hover {
  background: #f6f7f8;
}
.action-btn i {
  margin-right: 4px;
}
.username-link {
  text-decoration: none;
  color: #1c1c1c;
  font-weight: 500;
}
.username-link:hover {
  text-decoration: underline;
  color: #1c1c1c;
}
.subreddit-link {
  text-decoration: none;
  color: #1c1c1c;
  font-weight: 700;
}
.subreddit-link:hover {
  text-decoration: underline;
  color: #1c1c1c;
}
.gallery-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.gallery-container img {
  width: 150px;
  height: 150px;
}

/* ── Native comments (theme-aware via app.css variables) ────────────── */

.comments-card {
  background: var(--rpp-card);
  border-radius: var(--rpp-card-radius);
  box-shadow: var(--rpp-card-shadow);
  padding: 16px 20px;
}

.cmt-toolbar {
  border-bottom: 1px solid var(--rpp-divider);
  padding-bottom: 12px;
  margin-bottom: 16px;
  font-size: 14px;
}
.cmt-toolbar strong { color: var(--rpp-text); font-size: 15px; }

.cmt-tree { font-size: 14px; line-height: 1.5; color: var(--rpp-text); }
.comment { padding: 8px 0 4px 0; }

.cmt-header {
  font-size: 12px;
  color: var(--rpp-text-soft);
  cursor: pointer;
  user-select: none;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.cmt-header:hover .cmt-toggle { color: var(--rpp-accent); }
.cmt-toggle {
  display: inline-block;
  min-width: 20px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--rpp-text-muted);
}
.cmt-author {
  color: var(--rpp-text);
  font-weight: 600;
  text-decoration: none;
}
.cmt-author:hover { text-decoration: underline; color: var(--rpp-accent); }
.cmt-author.cmt-deleted { color: var(--rpp-text-muted); font-style: italic; font-weight: 400; }
.cmt-meta { color: var(--rpp-text-muted); font-weight: 400; }
.cmt-edited { font-style: italic; }
.cmt-stickied { color: #1cb761; margin-left: 4px; }

.cmt-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  vertical-align: 2px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.cmt-op { background: var(--rpp-accent-soft); color: var(--rpp-accent-deep); box-shadow: inset 0 0 0 1px rgba(214, 56, 100, 0.2); }
.cmt-mod { background: #e8f8ec; color: #1a8141; box-shadow: inset 0 0 0 1px rgba(26, 129, 65, 0.2); }
.cmt-admin { background: #fff0e8; color: #c14913; box-shadow: inset 0 0 0 1px rgba(193, 73, 19, 0.2); }
:root[data-theme="dark"] .cmt-mod { background: #1f3a26; color: #86efac; }
:root[data-theme="dark"] .cmt-admin { background: #3d2718; color: #fdba74; }

.cmt-body {
  color: var(--rpp-text);
  padding-left: 24px;
  font-size: 14px;
  line-height: 1.5;
}
.cmt-body p { margin: 0 0 8px 0; }
.cmt-body p:last-child { margin-bottom: 0; }
.cmt-body a { color: var(--rpp-link); text-decoration: none; }
.cmt-body a:hover { text-decoration: underline; }
.cmt-body blockquote {
  border-left: 3px solid var(--rpp-divider);
  padding-left: 10px;
  margin: 8px 0;
  color: var(--rpp-text-soft);
}
.cmt-body code {
  background: var(--rpp-chip-bg);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--rpp-accent-deep);
}
.cmt-body pre {
  background: var(--rpp-chip-bg);
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 13px;
}
.cmt-body pre code { background: transparent; padding: 0; color: inherit; }

.cmt-replies {
  margin-left: 9px;
  padding-left: 16px;
  border-left: 2px solid var(--rpp-divider);
  transition: border-color 0.15s;
}
.cmt-replies:hover { border-left-color: var(--rpp-accent); }

.comment.collapsed > .cmt-body,
.comment.collapsed > .cmt-replies { display: none; }
.comment.collapsed > .cmt-header { color: var(--rpp-text-muted); }
.comment.collapsed > .cmt-header .cmt-author { color: var(--rpp-text-muted); font-weight: 500; }
.comment.collapsed > .cmt-header .cmt-meta { color: var(--rpp-text-muted); }

.continue-thread {
  display: inline-block;
  padding: 6px 12px;
  margin: 4px 0;
  color: var(--rpp-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  border-radius: 999px;
  background: var(--rpp-accent-soft);
  transition: background 0.12s;
}
.continue-thread:hover { background: var(--rpp-chip-bg-hover); color: var(--rpp-accent-deep); text-decoration: none; }

.load-more {
  display: inline-block;
  padding: 6px 14px;
  background: var(--rpp-chip-bg);
  color: var(--rpp-link);
  text-decoration: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin: 6px 0;
  transition: background 0.12s, color 0.12s;
}
.load-more:hover { background: var(--rpp-chip-bg-hover); text-decoration: none; }

.focus-banner {
  background: var(--rpp-accent-soft);
  border-left: 3px solid var(--rpp-accent);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  border-radius: 0 8px 8px 0;
}
.focus-banner a { color: var(--rpp-accent-deep); font-weight: 600; }

@media (max-width: 768px) {
  .cmt-replies { margin-left: 4px; padding-left: 10px; }
  .cmt-body { padding-left: 16px; }
}