/* =====================
   RESET & BASE
   ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #DAE0E6;
  color: #1c1c1c;
  min-height: 100vh;
}

/* =====================
   NAVBAR
   ===================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  border-bottom: 1px solid #edeff1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: 48px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-logo svg { display: block; }

.nav-brand {
  font-size: 18px;
  color: #1c1c1c;
  white-space: nowrap;
}

.nav-center {
  flex: 1;
  max-width: 690px;
  margin: 0 auto;
}

.nav-search {
  width: 100%;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #edeff1;
  background: #f6f7f8;
  font-size: 14px;
  outline: none;
  color: #1c1c1c;
  transition: 0.2s;
}

.nav-search:focus {
  border-color: #0079d3;
  background: white;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* =====================
   BUTTONS
   ===================== */
.btn-primary {
  padding: 6px 16px;
  border-radius: 20px;
  border: none;
  background: #FF4500;
  color: white;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: 0.15s;
  white-space: nowrap;
}

.btn-primary:hover { background: #e03d00; }

.btn-ghost {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid #878a8c;
  background: transparent;
  color: #878a8c;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: 0.15s;
}

.btn-ghost:hover {
  border-color: #1c1c1c;
  color: #1c1c1c;
}

.btn-ghost-sm {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #edeff1;
  background: transparent;
  color: #878a8c;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.full-width { width: 100%; margin-top: 12px; text-align: center; }


/* =====================
   PAGE LAYOUT
   ===================== */
.page-layout {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 20px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.feed-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-col {
  width: 312px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* =====================
   CREATE POST BAR
   ===================== */
.create-post-bar {
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: 0.15s;
}

.create-post-bar:hover { border-color: #0079d3; }

.user-avatar-sm {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #edeff1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #f6f7f8;
  flex-shrink: 0;
}

.fake-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #edeff1;
  background: #f6f7f8;
  font-size: 14px;
  color: #878a8c;
  cursor: pointer;
}

/* =====================
   FILTER TABS
   ===================== */
.filter-tabs {
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px;
  display: flex;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: #878a8c;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-btn:hover, .filter-btn.active {
  background: #e8e8e8;
  color: #1c1c1c;
}

/* =====================
   POST FORM
   ===================== */
.post-form-card {
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
}

.post-form-header {
  background: #FF4500;
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
}

.post-form-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid #edeff1;
  font-size: 14px;
  background: #f6f7f8;
  color: #1c1c1c;
  outline: none;
  transition: 0.15s;
}

.form-input:focus { border-color: #0079d3; background: white; }

.form-textarea {
  width: 100%;
  height: 120px;
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid #edeff1;
  font-size: 14px;
  background: #f6f7f8;
  color: #1c1c1c;
  resize: none;
  outline: none;
  font-family: inherit;
  transition: 0.15s;
}

.form-textarea:focus { border-color: #0079d3; background: white; }

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-hint { font-size: 12px; color: #878a8c; }

/* =====================
   POST CARD
   ===================== */
.post-card {
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  display: flex;
  cursor: pointer;
  transition: 0.15s;
}

.post-card:hover { border-color: #898989; }

/* Vote column */
.vote-col {
  width: 40px;
  background: #f8f9fa;
  border-radius: 4px 0 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  gap: 4px;
  flex-shrink: 0;
}

.vote-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #878a8c;
  font-size: 18px;
  padding: 2px 6px;
  border-radius: 2px;
  line-height: 1;
  transition: 0.15s;
}

.vote-btn:hover { background: #e8e8e8; }
.vote-btn.up:hover, .vote-btn.up.voted { color: #FF4500; }
.vote-btn.down:hover, .vote-btn.down.voted-down { color: #7193ff; }

.vote-score {
  font-size: 12px;
  font-weight: 700;
  color: #1c1c1c;
}

/* Post content column */
.post-content-col {
  flex: 1;
  padding: 10px 12px;
  min-width: 0;
}

.post-meta {
  font-size: 12px;
  color: #878a8c;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.post-flair {
  background: #FF4500;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-right: 4px;
}

.post-author { color: #1c1c1c; font-weight: 600; }
.post-author:hover { text-decoration: underline; }

.post-text {
  font-size: 14px;
  color: #1c1c1c;
  line-height: 1.5;
  margin-bottom: 8px;
  word-break: break-word;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #878a8c;
  cursor: pointer;
  transition: 0.15s;
  -webkit-user-select: none;
  user-select: none;
}

.action-btn:hover { background: #e8e8e8; color: #1c1c1c; }
.action-btn.delete:hover { background: #ffe4e4; color: #cc0000; }

/* =====================
   REPLY SECTION
   ===================== */
.reply-section {
  border-top: 1px solid #edeff1;
  margin-top: 10px;
  padding-top: 10px;
}

.replies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  padding-left: 12px;
  border-left: 2px solid #edeff1;
}

.reply-card {
  background: #f6f7f8;
  border-radius: 4px;
  padding: 8px 12px;
}

.reply-meta {
  font-size: 11px;
  color: #878a8c;
  margin-bottom: 4px;
}

.reply-text {
  font-size: 13px;
  color: #1c1c1c;
}

.reply-input-row {
  display: flex;
  gap: 8px;
}

.reply-input-row input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #edeff1;
  font-size: 13px;
  background: #f6f7f8;
  color: #1c1c1c;
  outline: none;
}

.reply-input-row input:focus { border-color: #0079d3; background: white; }

/* =====================
   SIDEBAR
   ===================== */
.sidebar-card {
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
}

.sidebar-card-banner {
  height: 64px;
  background: linear-gradient(135deg, #7b0000, #FF4500);
}

.sidebar-card-body {
  padding: 12px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1c1c1c;
}

.sidebar-desc {
  font-size: 14px;
  color: #1c1c1c;
  line-height: 1.5;
  margin-bottom: 12px;
}

.sidebar-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 12px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat strong {
  font-size: 16px;
  font-weight: 700;
  color: #1c1c1c;
}

.stat span {
  font-size: 12px;
  color: #878a8c;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid #edeff1;
  margin: 12px 0;
}

.sidebar-meta {
  font-size: 13px;
  color: #878a8c;
  margin-bottom: 8px;
}

.sidebar-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #1c1c1c;
  margin-bottom: 12px;
}

.rules-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rules-list li {
  font-size: 13px;
  color: #1c1c1c;
  line-height: 1.4;
}

.sidebar-small {
  font-size: 13px;
  color: #0079d3;
}

/* =====================
   EMPTY STATE
   ===================== */
.empty-state {
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 40px 20px;
  text-align: center;
  color: #878a8c;
  font-size: 14px;
}

/* =====================
   NAV EXTRAS (multi-page)
   ===================== */
.nav-link { text-decoration: none; }
.nav-logo { font-size: 24px; line-height: 1; }
.nav-divider { font-size: 18px; color: #ccc; }
.nav-sub-label { font-size: 15px; font-weight: 700; color: #1c1c1c; white-space: nowrap; }

/* =====================
   HOME HERO
   ===================== */
.home-hero {
  background: linear-gradient(135deg, #7b0000 0%, #cc0000 50%, #ff4500 100%);
  padding: 48px 20px;
  text-align: center;
  color: white;
}
.home-hero-icon { font-size: 56px; margin-bottom: 12px; }
.home-hero-title { font-size: 36px; font-weight: 800; margin-bottom: 10px; }
.home-hero-sub { font-size: 16px; opacity: 0.9; max-width: 500px; margin: 0 auto 20px; line-height: 1.5; }
.btn-lg { padding: 12px 28px; font-size: 16px; }

/* =====================
   SECTION HEADER
   ===================== */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}
.section-title { font-size: 18px; font-weight: 700; color: #1c1c1c; }
.section-count { font-size: 13px; color: #878a8c; }

/* =====================
   COMMUNITY GRID + CARD
   ===================== */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.community-card {
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: 0.15s;
}
.community-card:hover { border-color: #898989; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transform: translateY(-1px); }

.community-card-banner {
  height: 56px;
  display: flex;
  align-items: center;
  padding-left: 16px;
}
.community-card-icon { font-size: 28px; }

.community-card-body { padding: 12px; }
.community-card-name { font-size: 15px; font-weight: 700; color: #1c1c1c; margin-bottom: 4px; }
.community-card-desc {
  font-size: 12px;
  color: #878a8c;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.community-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.community-members { font-size: 12px; color: #878a8c; }

/* JOIN BUTTON */
.join-btn {
  padding: 5px 16px;
  border-radius: 20px;
  border: 2px solid #FF4500;
  background: #FF4500;
  color: white;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: 0.15s;
}
.join-btn:hover { background: #e03d00; border-color: #e03d00; }
.join-btn.joined {
  background: transparent;
  color: #FF4500;
}
.join-btn.joined:hover { background: #fff0ec; }

/* =====================
   LOADING STATE
   ===================== */
.loading-state {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: #878a8c;
  font-size: 14px;
}

/* =====================
   MODAL
   ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: white;
  border-radius: 8px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #edeff1;
  flex-shrink: 0;
}
.modal-header h2 { font-size: 18px; font-weight: 700; }
.modal-close { font-size: 18px; cursor: pointer; color: #878a8c; padding: 4px; }
.modal-close:hover { color: #1c1c1c; }

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #edeff1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Create Preview ── */
.create-preview {
  border: 1px solid #edeff1;
  border-radius: 4px;
  overflow: hidden;
}
.create-preview-banner {
  height: 60px;
  display: flex;
  align-items: center;
  padding-left: 16px;
  font-size: 32px;
  transition: 0.2s;
}
.create-preview-name {
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  color: #1c1c1c;
}

/* ── Form Group ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 700; color: #1c1c1c; }
.required { color: #cc0000; }
.form-hint { font-size: 11px; color: #878a8c; }
.form-hint.warn { color: #cc0000; }
.form-hint-inline { font-size: 11px; color: #878a8c; font-weight: 400; }

/* ── Icon Picker ── */
.icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.icon-opt {
  width: 36px;
  height: 36px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: 0.1s;
}
.icon-opt:hover { background: #f0f0f0; }
.icon-opt.sel { border-color: #FF4500; background: #fff0ec; }

/* ── Color Picker ── */
.color-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.color-opt {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: 0.1s;
}
.color-opt:hover { transform: scale(1.15); }
.color-opt.sel { border-color: #1c1c1c; }

/* =====================
   SUBREDDIT PAGE BANNER
   ===================== */
.subreddit-banner-wrapper { background: white; }

.sub-banner {
  height: 96px;
  background: #cc0000;
}

.sub-info-bar {
  background: white;
  border-bottom: 1px solid #edeff1;
}

.sub-info-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sub-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: white;
  border: 4px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  flex-shrink: 0;
  margin-top: -32px;
}

.sub-text { flex: 1; min-width: 0; }
.sub-title { font-size: 24px; font-weight: 800; color: #1c1c1c; line-height: 1.1; }
.sub-desc { font-size: 13px; color: #878a8c; margin-top: 2px; }

.sub-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.sub-members { font-size: 13px; color: #878a8c; }

/* =====================
   POST EXTRAS
   ===================== */
.post-card.pinned { border-left: 3px solid #FF4500; }

.pin-badge {
  font-size: 11px;
  font-weight: 700;
  color: #FF4500;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 800px) {
  .page-layout { flex-direction: column; }
  .sidebar-col { width: 100%; }
  .nav-center { display: none; }
  .home-hero-title { font-size: 24px; }
  .sub-title { font-size: 18px; }
  .community-grid { grid-template-columns: 1fr; }
  .sub-icon { width: 48px; height: 48px; font-size: 24px; margin-top: -24px; }
  .nav-sub-label { display: none; }
  .home-tabs { overflow-x: auto; }
  .home-tab { white-space: nowrap; }
}

/* =====================
   TOAST NOTIFICATIONS
   ===================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: white;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  border-left: 4px solid #FF4500;
  min-width: 240px;
  max-width: 340px;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: auto;
}

.toast.show { opacity: 1; transform: translateX(0); }
.toast.toast-success { border-left-color: #46d160; }
.toast.toast-error   { border-left-color: #cc0000; }
.toast.toast-info    { border-left-color: #0079d3; }

/* =====================
   LIVE ACTIVITY
   ===================== */
.live-activity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  opacity: 0.9;
  margin-top: 16px;
  color: white;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  flex-shrink: 0;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}

/* =====================
   HOME TABS
   ===================== */
.home-tabs {
  display: flex;
  gap: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.home-tab {
  flex: 1;
  padding: 10px 12px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  font-weight: 700;
  color: #878a8c;
  cursor: pointer;
  transition: 0.15s;
  white-space: nowrap;
}

.home-tab:hover { background: #f6f7f8; color: #1c1c1c; }
.home-tab.active { color: #FF4500; border-bottom-color: #FF4500; background: #fff8f5; }

/* =====================
   HOT POSTS FEED (home)
   ===================== */
.hot-post-card {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s;
}
.hot-post-card:hover {
  border-color: #898989;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.post-sub-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  color: white;
  margin-right: 4px;
}

.vote-score-lg {
  font-size: 22px;
  font-weight: 800;
  color: #FF4500;
  line-height: 1;
}

.vote-label {
  font-size: 10px;
  color: #878a8c;
  text-align: center;
}

.hot-post-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =====================
   AWARD REACTIONS
   ===================== */
.award-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0 4px;
}

.award-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid #edeff1;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 14px;
  cursor: pointer;
  color: #878a8c;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  line-height: 1;
}

.award-btn:hover { background: #f0f0f0; border-color: #ccc; transform: scale(1.1); }
.award-btn.has-awards { background: #fff8f0; border-color: #FF4500; color: #FF4500; }
.award-btn.given { opacity: 0.55; }

.award-count {
  font-size: 11px;
  font-weight: 700;
}

/* =====================
   NEW POSTS BANNER
   ===================== */
.new-posts-banner {
  background: #0079d3;
  color: white;
  text-align: center;
  padding: 10px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
  animation: slideDown 0.3s ease;
}

.new-posts-banner:hover { background: #006bbf; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================
   POSTING AS LABEL
   ===================== */
.create-post-bar-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.posting-as {
  font-size: 11px;
  color: #878a8c;
  pointer-events: none;
}

/* =====================
   CHAR COUNTER
   ===================== */
.char-counter {
  font-size: 12px;
  color: #878a8c;
  transition: color 0.2s;
}
.char-counter.warn   { color: #e67e22; }
.char-counter.danger { color: #cc0000; font-weight: 700; }

/* =====================
   SKELETON LOADING
   ===================== */
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
  height: 140px;
  border: 1px solid #edeff1;
}

/* =====================
   POST ENTRY ANIMATION
   ===================== */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post-card { animation: fadeSlideIn 0.2s ease; }

/* =====================
   ENHANCED HOVER EFFECTS
   ===================== */
.post-card:hover {
  border-color: #898989;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.community-card:hover {
  border-color: #898989;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.vote-btn:active { transform: scale(1.3); }
.join-btn:active { transform: scale(0.96); }

/* =====================
   ADMIN DELETE ON CARDS
   ===================== */
.community-card-banner { position: relative; }

.admin-delete-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  background: rgba(0,0,0,0.45);
  border: none;
  border-radius: 4px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  opacity: 0;
  transition: opacity 0.15s;
}
.community-card:hover .admin-delete-btn { opacity: 1; }

.reply-delete {
  float: right;
  font-size: 11px;
  padding: 1px 4px;
  margin-left: 8px;
}

/* =====================
   MOD PASSWORD DISPLAY
   ===================== */
.password-display {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f6f7f8;
  border: 1px solid #edeff1;
  border-radius: 6px;
  padding: 12px 16px;
}

/* =====================
   POST SEARCH BAR
   ===================== */
.post-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #edeff1;
  border-radius: 20px;
  padding: 6px 14px;
  margin-bottom: 8px;
}
.post-search-icon { font-size: 14px; color: #878a8c; flex-shrink: 0; }
.post-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: #1c1c1c;
}
.post-search-input::placeholder { color: #c4c7c9; }
.post-search-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: #878a8c;
  font-size: 13px;
  padding: 0 2px;
}
.post-search-clear:hover { color: #1c1c1c; }

/* =====================
   NAV NICKNAME CHIP
   ===================== */
.nav-nickname {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f6f7f8;
  border: 1px solid #edeff1;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #1c1c1c;
  cursor: pointer;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s;
}
.nav-nickname:hover { background: #edeff1; }

/* =====================
   BLOCKED BANNER
   ===================== */
.blocked-banner {
  background: #fff3f0;
  border: 1px solid #FF4500;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #cc2200;
  font-weight: 500;
}

/* =====================
   BLOCK BUTTON
   ===================== */
.block-btn {
  color: #cc2200 !important;
}
.block-btn:hover {
  background: #fff3f0 !important;
}

/* =====================
   REMOVED POST
   ===================== */
.removed-post {
  color: #878a8c;
  font-style: italic;
}

/* =====================
   POST AUTHOR LINK
   ===================== */
.post-author {
  color: #0079d3;
  text-decoration: none;
  font-weight: 600;
}
.post-author:hover { text-decoration: underline; }

.reply-author-link {
  color: #0079d3;
  text-decoration: none;
  font-weight: 500;
}
.reply-author-link:hover { text-decoration: underline; }

/* =====================
   PROFILE PAGE
   ===================== */
.profile-header-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid #edeff1;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.profile-avatar {
  font-size: 48px;
  line-height: 1;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  background: #f6f7f8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #edeff1;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 22px;
  font-weight: 700;
  color: #1c1c1c;
  word-break: break-word;
}

.profile-you-badge {
  display: inline-block;
  background: #FF4500;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  margin-top: 4px;
}

.profile-anon-note {
  font-size: 12px;
  color: #878a8c;
  margin-top: 4px;
}

@media (max-width: 600px) {
  .profile-header-card { flex-wrap: wrap; }
  .profile-avatar { width: 56px; height: 56px; font-size: 36px; }
  .profile-name { font-size: 18px; }
  .nav-nickname { max-width: 100px; }
}

/* ╔═══════════════════════════════════════════════════╗
   ║          MOBILE-FIRST AESTHETIC REDESIGN          ║
   ╚═══════════════════════════════════════════════════╝ */

/* ── CSS Variables ── */
:root {
  --shadow-1: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-2: 0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-3: 0 8px 24px rgba(0,0,0,0.14), 0 4px 8px rgba(0,0,0,0.08);
  --radius-card: 12px;
  --radius-sheet: 16px;
}

/* ── Elevation + Rounded Cards (global) ── */
.post-card,
.community-card,
.sidebar-card,
.filter-tabs,
.create-post-bar,
.post-form-card,
.post-search-bar,
.home-tabs {
  border: none;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
}

.post-card:hover {
  border: none;
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.community-card:hover {
  border: none;
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.community-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-1);
}

/* ── Community Cards — Bigger Banner & Icon (global) ── */
.community-card-banner {
  height: 72px;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.community-card-icon {
  font-size: 36px;
}

.community-card-body {
  padding: 14px;
}

/* ── Vote Column — Larger Touch Targets (global) ── */
.vote-col {
  width: 48px;
  padding: 8px 4px;
}

.vote-btn {
  font-size: 20px;
  padding: 6px 8px;
  min-height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vote-score {
  font-size: 13px;
}

/* ── FAB — hidden on desktop ── */
.fab { display: none; }

/* ── Sidebar Toggle — hidden on desktop ── */
.sidebar-toggle { display: none; }

/* ════════════════════════════════════
   BREAKPOINT: max-width 800px (tablet)
   ════════════════════════════════════ */
@media (max-width: 800px) {

  /* Community grid: 2 columns (overrides existing 1fr rule) */
  .community-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Navbar nickname: hide text, show icon only */
  #navNickname { display: none; }
  .nav-nickname { padding: 4px 8px; max-width: 44px; border-radius: 50%; }

  /* Sidebar toggle button */
  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    background: #fff;
    border: none;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-1);
    font-size: 13px;
    font-weight: 700;
    color: #1c1c1c;
    cursor: pointer;
    transition: background 0.15s;
  }
  .sidebar-toggle:hover { background: #f6f7f8; }

  /* Sidebar: hidden by default on mobile, order above feed when open */
  .sidebar-col {
    display: none;
    order: -1;
  }
  .sidebar-col.sidebar-open {
    display: flex;
  }

  /* FAB button */
  .fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #FF4500;
    color: #fff;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-3);
    z-index: 90;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  }
  .fab:hover { background: #e03d00; }
  .fab:active { transform: scale(0.92); box-shadow: var(--shadow-2); }

  /* Body bottom padding so FAB doesn't cover last post */
  body {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  /* Toast container above FAB */
  .toast-container {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }
}

/* ════════════════════════════════════
   BREAKPOINT: max-width 480px (phone)
   ════════════════════════════════════ */
@media (max-width: 480px) {

  /* Navbar */
  .navbar { padding: 0 12px; gap: 6px; height: 52px; }
  .nav-brand { font-size: 15px; }
  .nav-logo { font-size: 20px; }
  .nav-left { gap: 6px; }
  .nav-right { gap: 6px; }
  .nav-right .btn-ghost { padding: 5px 10px; font-size: 12px; }
  /* Hide subreddit divider on mobile — it's redundant and wastes space */
  .nav-divider { display: none; }
  /* Ensure message bell is always visible */
  .nav-msg-btn { flex-shrink: 0; }

  /* Home hero */
  .home-hero { padding: 28px 16px; }
  .home-hero-icon { font-size: 40px; margin-bottom: 8px; }
  .home-hero-title { font-size: 22px; }
  .home-hero-sub { font-size: 14px; margin-bottom: 16px; }
  .btn-lg { padding: 10px 22px; font-size: 15px; }

  /* Page layout — full centered width */
  .page-layout { padding: 0 10px; margin: 12px auto; gap: 10px; width: 100%; box-sizing: border-box; }
  .feed-col { gap: 8px; width: 100%; min-width: 0; }
  .community-grid { width: 100%; }

  /* Filter tabs: full-width equal buttons */
  .filter-tabs { padding: 8px; gap: 4px; }
  .filter-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 4px;
    font-size: 13px;
    min-height: 36px;
    border-radius: 8px;
  }

  /* Post text readability */
  .post-text { font-size: 15px; line-height: 1.55; }
  .reply-text { font-size: 14px; line-height: 1.5; }
  .community-card-desc { font-size: 13px; }

  /* Post action buttons */
  .action-btn {
    padding: 8px 10px;
    min-height: 32px;
    border-radius: 8px;
  }

  /* Reply input: stack vertically */
  .reply-input-row { flex-direction: column; gap: 8px; }
  .reply-input-row input { font-size: 14px; padding: 10px 14px; }
  .reply-input-row .btn-primary { width: 100%; padding: 10px; font-size: 14px; border-radius: 10px; }

  /* Vote buttons: a touch bigger */
  .vote-btn { min-height: 36px; min-width: 36px; }

  /* Modal → bottom sheet */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    max-width: 100% !important;
    width: 100%;
    border-radius: var(--radius-sheet) var(--radius-sheet) 0 0 !important;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: 4px;
  }
  /* Drag handle */
  .modal::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: #d8d8d8;
    border-radius: 2px;
    margin: 8px auto 4px;
  }
  .modal-body { padding: 16px; gap: 14px; }
  .modal-header { padding: 12px 16px; }
  .modal-footer { padding: 12px 16px; gap: 8px; }

  /* Community card: slightly smaller on phone */
  .community-card-banner { height: 64px; }
  .community-card-icon { font-size: 32px; }
}

/* ═════════════════════════════════════════
   BREAKPOINT: max-width 400px (small phone)
   ═════════════════════════════════════════ */
@media (max-width: 400px) {

  /* Keep 2 columns — just tighten text to fit */
  .community-grid { gap: 8px; }
  .community-card-name { font-size: 13px; }
  .community-card-desc { font-size: 11px; }
  .community-card-body { padding: 10px; }
  .community-card-banner { height: 56px; }
  .community-card-icon { font-size: 26px; }
  .community-members { font-size: 11px; }

  /* Hide brand text and Communities link — mountain emoji logo is the home button */
  .nav-brand { display: none; }
  .nav-communities-link { display: none; }
  .navbar { padding: 0 10px; }

  /* More compact hero */
  .home-hero { padding: 20px 12px; }
  .home-hero-title { font-size: 20px; }

  /* Tighter page padding */
  .page-layout { padding: 0 8px; }
}

/* ══════════════════════════════════════════════
   NAV MESSAGE BELL
══════════════════════════════════════════════ */
.nav-msg-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.15s;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-msg-btn:hover { background: rgba(0,0,0,.06); }
.nav-msg-btn.has-messages { animation: bellShake 0.5s ease; }
@keyframes bellShake {
  0%,100% { transform: rotate(0); }
  20%      { transform: rotate(-15deg); }
  40%      { transform: rotate(15deg); }
  60%      { transform: rotate(-10deg); }
  80%      { transform: rotate(10deg); }
}

.msg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #FF4500;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  line-height: 1;
}

/* ══════════════════════════════════════════════
   PROFILE PAGE
══════════════════════════════════════════════ */
.profile-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 0 60px;
}

.profile-hero {
  background: linear-gradient(135deg, #7b0000 0%, #c0392b 100%);
  padding: 32px 20px 24px;
  color: #fff;
}
.profile-hero-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,0.3);
}

.profile-info { flex: 1; min-width: 0; }

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.profile-name {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  word-break: break-word;
}
.profile-you-badge {
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}
.profile-anon-note {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin: 0 0 10px;
}
.profile-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.profile-stat strong {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.profile-stat span {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.profile-actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-msg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  color: #7b0000;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.1s;
}
.profile-msg-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.2); }

.profile-tabs-wrap {
  position: sticky;
  top: 52px;
  background: #fff;
  z-index: 5;
  border-bottom: 1px solid #edeff1;
  padding: 0 20px;
}
.profile-section { padding: 12px 16px; }

/* Profile post cards */
.profile-post-card {
  background: #fff;
  border: 1px solid #edeff1;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s;
}
.profile-post-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); transform: translateY(-1px); }
.profile-post-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.profile-ts { font-size: 11px; color: #878a8c; }
.profile-post-text {
  font-size: 14px;
  line-height: 1.5;
  color: #1c1c1c;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.profile-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #878a8c;
}
.profile-view-link { color: #FF4500; font-weight: 600; }
.profile-comment-label {
  font-size: 11px;
  background: #f0f7ff;
  color: #0079d3;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
}

/* post-author / reply-author: double-click cue */
.post-author, .reply-author-link {
  cursor: pointer;
  color: #0079d3;
  font-weight: 600;
}
.post-author:hover, .reply-author-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════
   CHAT / MESSAGES
══════════════════════════════════════════════ */
.chat-body { margin: 0; padding: 0; background: #f6f7f8; }

/* ── INBOX ── */
.inbox-header {
  background: linear-gradient(135deg, #7b0000 0%, #c0392b 100%);
  padding: 24px 20px 20px;
  color: #fff;
}
.inbox-title { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.inbox-sub   { margin: 0; font-size: 13px; color: rgba(255,255,255,0.75); }

.conversations-list { max-width: 600px; margin: 0 auto; padding: 8px 12px; }

.convo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s;
  border: 1px solid #edeff1;
}
.convo-item:hover   { box-shadow: 0 2px 12px rgba(0,0,0,.08); transform: translateY(-1px); }
.convo-item.unread  { border-left: 3px solid #FF4500; }

.convo-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.convo-info  { flex: 1; min-width: 0; }
.convo-name  { font-size: 14px; font-weight: 700; color: #1c1c1c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-preview { font-size: 13px; color: #878a8c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.convo-meta  { text-align: right; flex-shrink: 0; }
.convo-time  { font-size: 11px; color: #878a8c; margin-bottom: 4px; }
.convo-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: #FF4500;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
}

/* ── CHAT VIEW ── */
.chat-view {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh; /* overrides with dynamic viewport on supported browsers */
  max-width: 680px;
  margin: 0 auto;
  background: #f6f7f8;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #edeff1;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.chat-back-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  color: #1c1c1c;
  flex-shrink: 0;
}
.chat-back-btn:hover { background: #f0f0f0; }

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.chat-recipient-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.chat-header-text { min-width: 0; }
.chat-recipient-name {
  font-size: 15px;
  font-weight: 700;
  color: #1c1c1c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-recipient-sub { font-size: 11px; color: #878a8c; }

.chat-messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-day-label {
  text-align: center;
  font-size: 11px;
  color: #878a8c;
  margin: 8px 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #878a8c;
  font-size: 14px;
  gap: 8px;
  padding: 40px 0;
}
.chat-empty-icon { font-size: 40px; }

/* Message bubbles */
.msg-bubble-wrap {
  display: flex;
  margin-bottom: 4px;
}
.msg-bubble-wrap.mine   { justify-content: flex-end; }
.msg-bubble-wrap.theirs { justify-content: flex-start; }

.msg-bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}
.msg-bubble.mine {
  background: #FF4500;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-bubble.theirs {
  background: #fff;
  color: #1c1c1c;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.msg-text { margin-bottom: 4px; }
.msg-time {
  font-size: 10px;
  opacity: 0.7;
  text-align: right;
  line-height: 1;
}

/* Chat input bar */
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-top: 1px solid #edeff1;
  box-shadow: 0 -1px 4px rgba(0,0,0,.04);
  flex-shrink: 0; /* never shrink — always stays at bottom of flex column */
}
.chat-input {
  flex: 1;
  border: 1.5px solid #edeff1;
  border-radius: 22px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  background: #f6f7f8;
  transition: border-color 0.15s;
  font-family: inherit;
}
.chat-input:focus { border-color: #FF4500; background: #fff; }

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FF4500;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.1s, box-shadow 0.1s;
}
.chat-send-btn:hover   { transform: scale(1.07); box-shadow: 0 3px 10px rgba(255,69,0,.35); }
.chat-send-btn:active  { transform: scale(0.95); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ════════════════════════════════════════════
   BREAKPOINT: max-width 340px (very tiny phone)
   ════════════════════════════════════════════ */
@media (max-width: 340px) {
  /* Only at extreme small sizes switch to 1 column */
  .community-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════
   BREAKPOINT: max-width 360px (smallest phone)
   ════════════════════════════════════════════ */
@media (max-width: 360px) {
  /* Filter tabs: icon only, hide text labels */
  .filter-label { display: none; }
  .filter-btn { padding: 8px 6px; font-size: 18px; }
}

