/* ─── Base & Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f8f8f6;
  --surface:   #ffffff;
  --border:    #e8e8e4;
  --border-2:  #d4d4ce;
  --text:      #1a1a18;
  --text-2:    #6b6b66;
  --text-3:    #9b9b96;
  --text-muted: #9b9b96;
  --primary:   #1a1a18;
  --accent:    #1a1a18;
  --accent-fg: #ffffff;
  --danger:    #dc4a3d;
  --warn:      #e8a030;
  --green:     #2d7a4f;
  --poll-accent:       #138D82;
  --poll-accent-hover: #0f766e;
  --poll-bg:           rgba(19, 141, 130, 0.08);
  --poll-bg-active:    rgba(19, 141, 130, 0.12);
  --poll-ring:         rgba(19, 141, 130, 0.18);
  --poll-bar:          rgba(19, 141, 130, 0.16);
  --poll-bar-chosen:   rgba(19, 141, 130, 0.28);
  --radius:    10px;
  --radius-lg: 16px;
  --shadow:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
}

/* ─── Dark Mode ─────────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:        #0f0f0e;
  --surface:   #1a1a18;
  --border:    #2a2a28;
  --border-2:  #3a3a37;
  --text:      #f0f0ed;
  --text-2:    #a0a09a;
  --text-3:    #6a6a65;
  --text-muted: #6a6a65;
  --primary:   #f0f0ed;
  --accent:    #f0f0ed;
  --accent-fg: #0f0f0e;
  --poll-accent:       #2dd4bf;
  --poll-accent-hover: #5eead4;
  --poll-bg:           rgba(45, 212, 191, 0.1);
  --poll-bg-active:    rgba(45, 212, 191, 0.16);
  --poll-ring:         rgba(45, 212, 191, 0.22);
  --poll-bar:          rgba(45, 212, 191, 0.22);
  --poll-bar-chosen:   rgba(45, 212, 191, 0.38);
  --shadow:    0 1px 3px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,.35), 0 2px 4px rgba(0,0,0,.2);
}

[data-theme="dark"] .pinned-message {
  background: #1e1c14 !important;
  border-color: #7a5510 !important;
  box-shadow: 0 0 0 1px rgba(232,160,48,0.15), var(--shadow) !important;
}

[data-theme="dark"] .submit-feedback.success { background: #0d2318; color: #5db882; }
[data-theme="dark"] .submit-feedback.error   { background: #2a0e0c; color: #e8766e; }
[data-theme="dark"] .alert-danger  { background: #2a0e0c; color: #e8766e; }
[data-theme="dark"] .alert-success { background: #0d2318; color: #5db882; }
[data-theme="dark"] .btn-toggle:hover { background: #2a1e0a; border-color: #7a5510; color: #e8a030; }
[data-theme="dark"] .btn-delete:hover { background: #2a0e0c; border-color: #b03a2e; }
[data-theme="dark"] .upvote-btn:hover,
[data-theme="dark"] .upvote-btn.voted-active  { color: #5db882; background: #0d2318; }
[data-theme="dark"] .downvote-btn:hover,
[data-theme="dark"] .downvote-btn.voted-active { color: #e8766e; background: #2a0e0c; }

/* Smooth transition for dark mode */
body, .site-header, .compose-card, .message-card, .reply-bubble,
.compose-textarea, .reply-textarea, .page-btn, .page-num,
.action-btn, .confirm-box, .login-card, .stat-item, .tab-btn,
.admin-card, .form-input, .hashtag-sidebar, .hashtag-chip {
  transition: background 0.25s ease, border-color 0.25s ease,
              color 0.2s ease, box-shadow 0.25s ease;
}

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ─── Layout ───────────────────────────────────────────────────────────────── */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

.admin-header-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── Nav Links (Public Header) ────────────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a,
.nav-room-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-links a:hover,
.nav-room-btn:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-links a.active,
.nav-room-btn.active {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 500;
}

/* ─── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 2px;
}

.logo-mark { color: var(--text); }
.logo-sep  { color: var(--text-3); margin: 0 1px; }
.logo-word { color: var(--text); }

.admin-badge {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--text);
  color: var(--accent-fg);
  padding: 2px 7px;
  border-radius: 20px;
  margin-left: 8px;
}

.header-tagline {
  font-size: 0.8rem;
  color: var(--text-3);
  font-weight: 400;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ─── Dark Mode Toggle Button ──────────────────────────────────────────────── */
#darkModeToggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.2s;
  flex-shrink: 0;
}
#darkModeToggle:hover {
  background: var(--bg);
  border-color: var(--border-2);
  color: var(--text);
  transform: rotate(15deg);
}

/* ─── Main Layout ──────────────────────────────────────────────────────────── */
.main-layout {
  padding-top: 32px;
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ─── Content + Sidebar Layout ────────────────────────────────────────────── */
.content-with-sidebar {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.content-main {
  flex: 1;
  min-width: 0;
}

.hashtag-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
}

.hashtag-sidebar-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hashtag-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hashtag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border: 1px solid transparent;
  text-decoration: none;
}

.hashtag-item:hover {
  background: var(--bg);
  border-color: var(--border-2);
}

.hashtag-item.active-hashtag {
  background: var(--surface);
  border-color: var(--text);
}

[data-theme="dark"] .hashtag-item:hover,
[data-theme="dark"] .hashtag-item.active-hashtag {
  background: var(--surface);
  border-color: var(--border-2);
}

.hashtag-item-tag {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--primary);
}

.hashtag-item-count {
  font-size: 0.7rem;
  color: var(--text-3);
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.hashtag-sidebar-empty {
  font-size: 0.8rem;
  color: var(--text-3);
  text-align: center;
  padding: 8px 0;
}

.hashtag-sidebar-loading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hashtag-skel {
  height: 28px;
  background: var(--border);
  border-radius: 7px;
  animation: skeletonPulse 1.4s ease infinite;
}

@keyframes skeletonPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.hashtag-clear-btn {
  margin-top: 10px;
  width: 100%;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-3);
  font-size: 0.72rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.hashtag-clear-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: #fdecea;
}

[data-theme="dark"] .hashtag-clear-btn:hover {
  background: #2a0e0c;
}

/* ─── Hashtag chip inside message text ─────────────────────────────────────── */
.hashtag-chip {
  display: inline;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  border-radius: 3px;
  padding: 0 1px;
  transition: background 0.15s;
}

.hashtag-chip:hover {
  background: var(--bg);
  text-decoration: underline;
}

/* Active filter banner */
.hashtag-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text);
  animation: fadeInUp 0.2s ease;
}

.hashtag-filter-banner span { font-weight: 600; }

.hashtag-filter-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.hashtag-filter-close:hover {
  background: var(--bg);
  color: var(--text);
}

/* ─── Announcement Banner ──────────────────────────────────────────────────── */
.announcement-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  color: var(--text);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: var(--shadow-md);
  margin-top: -8px; /* Pull up slightly */
  margin-bottom: 0; /* Let main-layout gap handle spacing */
  animation: slideDownFade 0.4s ease;
}

.announcement-banner.hidden {
  display: none;
}

@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.announcement-icon {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}

.announcement-content {
  flex: 1;
}

.announcement-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  margin-bottom: 4px;
}

.announcement-text {
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text);
}

.announcement-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  padding: 4px;
  margin: -4px -4px 0 0;
  transition: color 0.15s, transform 0.15s;
}

.announcement-close:hover {
  color: var(--danger);
  transform: scale(1.1);
}

/* ─── Compose Card ─────────────────────────────────────────────────────────── */
.compose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.compose-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.compose-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
}

.char-counter {
  font-size: 0.75rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}

.char-counter.near-limit { color: var(--warn); }
.char-counter.at-limit   { color: var(--danger); }

.compose-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  resize: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.6;
}

.compose-textarea:focus {
  border-color: var(--border-2);
  box-shadow: 0 0 0 3px rgba(26,26,24,.06);
}

.compose-textarea::placeholder { color: var(--text-3); }

.compose-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  gap: 12px;
}

.compose-note {
  font-size: 0.75rem;
  color: var(--text-3);
  flex: 1;
  line-height: 1.6;
}

.btn-send {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  border-radius: var(--radius);
  padding: 9px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn-send:hover   { opacity: 0.85; }
.btn-send:active  { transform: scale(.97); }
.btn-send:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.submit-feedback {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
}

.submit-feedback.success { background: #e6f4ed; color: var(--green); }
.submit-feedback.error   { background: #fdecea; color: var(--danger); }
.hidden { display: none; }

/* ─── Feed ─────────────────────────────────────────────────────────────────── */
.feed-section {}

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.feed-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.feed-count {
  font-size: 0.78rem;
  color: var(--text-3);
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
  animation: fadeInUp 0.3s ease both;
}

.message-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow-md);
}

.pinned-message {
  border: 1px solid #e8a030;
  box-shadow: 0 0 0 1px rgba(232, 160, 48, 0.2), var(--shadow);
  background: #fffcf5;
}

.pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.message-text {
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
}

.message-time {
  display: block;
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ─── Date Separator ────────────────────────────────────────────────────────── */
.date-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 4px;
}

.date-separator::before,
.date-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.date-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
  padding: 0 4px;
}

/* Slide-in for newly added card */
.message-card.new-card {
  border-color: var(--border-2);
  animation: slideInNew 0.4s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInNew {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Empty State ──────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-3);
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ─── Pagination ───────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.page-btn:hover {
  background: var(--bg);
  border-color: var(--border-2);
  color: var(--text);
}

.page-btn--disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.page-num:hover {
  background: var(--bg);
  border-color: var(--border-2);
  color: var(--text);
}

.page-num--active {
  background: var(--text);
  color: var(--accent-fg);
  border-color: var(--text);
  cursor: default;
}

.page-ellipsis {
  font-size: 0.82rem;
  color: var(--text-3);
  padding: 0 4px;
  user-select: none;
}

.user-delete-container {
  display: inline-block;
  margin-right: 8px;
}

.btn-user-delete {
  background: none;
  border: 1px solid var(--danger);
  color: var(--danger);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
  font-family: inherit;
}

.btn-user-delete:hover {
  background: var(--danger);
  color: #fff;
}

.btn-user-delete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Message Meta Row ─────────────────────────────────────────────────────── */
.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.reply-toggle-btn, .vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-3);
  padding: 2px 6px;
  border-radius: 5px;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}

.reply-toggle-btn:hover, .vote-btn:hover {
  color: var(--text-2);
  background: var(--bg);
}

.upvote-btn:hover, .upvote-btn.voted-active {
  color: var(--green);
  background: #e6f4ed;
}

.downvote-btn:hover, .downvote-btn.voted-active {
  color: var(--danger);
  background: #fdecea;
}



.reply-toggle-btn.is-open {
  color: var(--text-2);
}

/* ─── Reply Thread ─────────────────────────────────────────────────────────── */
.reply-thread {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  animation: fadeInUp 0.2s ease;
}

.reply-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.reply-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.reply-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--text-3);
}

.reply-bubble {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  flex: 1;
  min-width: 0;
}

.reply-text {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

.reply-time {
  display: block;
  font-size: 0.68rem;
  color: var(--text-3);
  margin-top: 4px;
}

.reply-loading {
  font-size: 0.8rem;
  color: var(--text-3);
  text-align: center;
  padding: 8px 0;
}

.reply-empty {
  font-size: 0.8rem;
  color: var(--text-3);
  text-align: center;
  padding: 4px 0;
}

/* ─── Reply Form ───────────────────────────────────────────────────────────── */
.reply-form {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.reply-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  resize: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.5;
}

.reply-textarea:focus {
  border-color: var(--border-2);
  box-shadow: 0 0 0 3px rgba(26,26,24,.05);
}

.reply-textarea::placeholder { color: var(--text-3); }

.reply-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 7px;
}

.reply-char-counter {
  font-size: 0.7rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.btn-reply-send {
  background: var(--text);
  color: var(--accent-fg);
  border: none;
  border-radius: 7px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-reply-send:hover    { opacity: 0.82; }
.btn-reply-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* New reply card animation */
.reply-card.new-reply {
  animation: fadeInUp 0.25s ease both;
}

/* ─── Footer ───────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
}

.site-footer p {
  font-size: 0.75rem;
  color: var(--text-3);
}

/* ─── Admin Dashboard ──────────────────────────────────────────────────────── */
.admin-layout {
  padding-top: 28px;
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 860px;
}

.stats-bar {
  display: flex;
  gap: 12px;
}

.stat-item {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}

.tab-btn {
  flex: 1;
  text-align: center;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.tab-btn.active {
  background: var(--text);
  color: var(--accent-fg);
}

.tab-btn:not(.active):hover {
  background: var(--bg);
  color: var(--text);
}

.admin-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  transition: opacity 0.3s, transform 0.3s;
}

.admin-card.is-hidden {
  opacity: 0.5;
  border-style: dashed;
}

.admin-card-body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.admin-card-body img {
  max-width: 100%;
  height: auto;
  display: block;
}

.admin-msg-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

.admin-msg-time {
  display: block;
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--text-3);
}

.admin-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-2);
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.action-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.btn-toggle:hover {
  background: #fffbe6;
  border-color: #e8c030;
  color: #8a6000;
}

.btn-delete:hover {
  background: #fdecea;
  border-color: #dc4a3d;
  color: var(--danger);
}

.btn-warning-action:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
  color: #d97706;
}

[data-theme="dark"] .btn-warning-action:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fbbf24;
}

.btn-secondary-action:hover {
  background: var(--surface);
  border-color: var(--text-3);
  color: var(--text);
}

/* ─── Admin Filter Bar ─────────────────────────────────────────────────────── */
.admin-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-segmented-tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
  width: auto;
  max-width: 100%;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.admin-room-filter-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-room-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.admin-select-custom {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.admin-select-custom select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 32px 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.admin-select-custom select:hover {
  border-color: var(--text-3);
}

.admin-select-custom select:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 2px rgba(26, 26, 24, 0.08);
}

[data-theme="dark"] .admin-select-custom select:focus {
  box-shadow: 0 0 0 2px rgba(240, 240, 237, 0.12);
}

.admin-select-custom .admin-select-chevron {
  position: absolute;
  right: 10px;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

/* ─── Buttons (Outline) ────────────────────────────────────────────────────── */
.btn-outline-sm {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-2);
  transition: background 0.15s, border-color 0.15s;
}

.btn-outline-sm:hover { background: var(--bg); border-color: var(--border-2); }
.btn-outline-sm.active {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.btn-danger-outline { color: var(--danger); border-color: rgba(220,74,61,.3); }
.btn-danger-outline:hover { background: #fdecea; border-color: var(--danger); }

/* ─── Login Page ───────────────────────────────────────────────────────────── */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}

.login-container {
  width: 100%;
  max-width: 380px;
  padding: 20px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}

.login-logo {
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 4px;
}

.login-sub {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 28px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
}

.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--border-2);
  box-shadow: 0 0 0 3px rgba(26,26,24,.06);
}

.btn-login {
  width: 100%;
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  border-radius: var(--radius);
  padding: 11px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 0.15s;
}

.btn-login:hover { opacity: 0.85; }

/* ─── Alerts ───────────────────────────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.83rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.alert-danger  { background: #fdecea; color: var(--danger); }
.alert-success { background: #e6f4ed; color: var(--green); }

/* ─── Responsive ───────────────────────────────────────────────────────────── */

/* Hide mobile hashtag strip on desktop */
@media (min-width: 921px) {
  .hashtag-mobile-strip { display: none !important; }
}

@media (max-width: 920px) {
  .hashtag-sidebar { display: none; }
  .content-with-sidebar { display: block; }

  /* Show mobile hashtag strip as horizontal scrollable chips */
  .hashtag-mobile-strip {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 0 10px;
    margin-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hashtag-mobile-strip::-webkit-scrollbar { display: none; }
  .hashtag-mobile-strip:empty { display: none; }



  .hashtag-mobile-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
  }
  .hashtag-mobile-chip:hover,
  .hashtag-mobile-chip.active-hashtag {
    background: var(--bg);
    border-color: var(--border-2);
  }
  .hashtag-mobile-chip .chip-count {
    font-size: 0.68rem;
    color: var(--text-3);
    background: var(--bg);
    padding: 1px 5px;
    border-radius: 8px;
    border: 1px solid var(--border);
  }
}

/* Desktop: hide mobile strip */
@media (min-width: 921px) {
  .hashtag-mobile-strip { display: none !important; }
}


@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .header-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .admin-layout { max-width: 100%; }

  .stats-bar {
    gap: 8px;
  }

  .stat-item {
    padding: 10px 12px;
  }

  .stat-num { font-size: 1.2rem; }

  .admin-card {
    flex-direction: column;
    gap: 10px;
  }

  .admin-card-actions {
    align-self: flex-end;
  }

  .compose-footer {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .compose-note {
    display: none;
  }

  .admin-card-body img {
    max-width: 100%;
    height: auto;
  }

  .action-btn span { display: none; }
  .action-btn { padding: 7px 9px; }
}

/* ─── Confirm Modal ────────────────────────────────────────────────────────── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.confirm-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
  animation: scaleIn 0.18s ease;
  text-align: center;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}

.confirm-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  line-height: 1;
}

.confirm-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.confirm-msg {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.confirm-cancel {
  flex: 1;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.confirm-cancel:hover {
  background: var(--border);
  border-color: var(--border-2);
}

.confirm-ok {
  flex: 1;
  padding: 9px 16px;
  border: none;
  border-radius: var(--radius);
  background: var(--danger);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}

.confirm-ok:hover { opacity: 0.88; }

/* ─── Emoji Reaction System ──────────────────────────────────────────────────── */

/* Trigger button */
.reaction-trigger-btn {
  position: relative;
}
.reaction-trigger-btn.picker-open {
  color: var(--text);
  background: var(--bg);
}

/* Floating emoji picker popup */
.emoji-picker-popup {
  position: absolute;
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.08);
  z-index: 500;
  animation: pickerBounce 0.22s cubic-bezier(.34,1.56,.64,1) both;
  white-space: nowrap;
}

@keyframes pickerBounce {
  from { opacity: 0; transform: scale(0.6) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.emoji-picker-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  padding: 4px 3px;
  border-radius: 8px;
  transition: transform 0.15s cubic-bezier(.34,1.56,.64,1), background 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.emoji-picker-btn:hover {
  transform: scale(1.35);
  background: var(--bg);
}
.emoji-picker-btn.already-reacted {
  background: var(--bg);
  transform: scale(1.1);
}

/* Reactions bar under the message */
.reactions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px 3px 6px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(.34,1.56,.64,1),
              border-color 0.15s, background 0.15s;
  user-select: none;
  animation: chipPop 0.25s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes chipPop {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.reaction-chip:hover {
  transform: scale(1.08);
  border-color: var(--border-2);
  background: var(--bg);
}

.reaction-chip.my-reaction {
  border-color: var(--text);
  background: var(--surface);
}

[data-theme="dark"] .reaction-chip.my-reaction {
  border-color: var(--text);
  background: var(--surface);
}

.reaction-chip .chip-emoji {
  font-size: 0.95rem;
  line-height: 1;
}

.reaction-chip .chip-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.reaction-chip.my-reaction .chip-count {
  color: var(--primary);
}

/* Burst pop animation when reacting */
@keyframes reactionBurst {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.6); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.reaction-chip.burst {
  animation: reactionBurst 0.4s cubic-bezier(.34,1.56,.64,1);
}

/* ─── Toast Notifications ────────────────────────────────────────────────────── */

#toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: var(--text);
  color: var(--surface);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-error {
  background: var(--danger);
  color: white;
}

.toast-success {
  background: var(--green);
  color: white;
}

/* ─── Text Formatting Styles ─────────────────────────────────────────────────── */
.message-text strong, .reply-text strong {
  font-weight: 600;
  color: var(--text);
}

.message-text em, .reply-text em {
  font-style: italic;
}

.message-text u, .reply-text u {
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-underline-offset: 3px;
}

.message-text del, .reply-text del {
  text-decoration: line-through;
  opacity: 0.75;
}

/* ─── Format Toolbar ─────────────────────────────────────────────────────────── */
.compose-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.format-toolbar {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--bg);
  padding: 2px 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.format-btn {
  background: transparent;
  border: none;
  color: var(--text-2);
  width: 26px;
  height: 26px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.format-btn:hover {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.format-btn:active {
  transform: scale(0.94);
}

/* ─── Poll Creator ───────────────────────────────────────────────────────────── */
.poll-creator {
  margin-top: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  animation: fadeIn 0.2s ease;
}

.poll-creator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.poll-creator-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--poll-accent);
}

.poll-creator-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-3);
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
  transition: color 0.15s;
}

.poll-creator-close:hover {
  color: var(--danger);
}

.poll-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poll-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.poll-option-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.poll-option-input:focus {
  border-color: var(--poll-accent);
  box-shadow: 0 0 0 2px var(--poll-ring);
}

.btn-remove-option {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: all 0.15s;
}

.btn-remove-option:hover {
  color: var(--danger);
  background: rgba(220, 74, 61, 0.08);
}

.poll-creator-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.btn-add-option {
  background: var(--surface);
  border: 1px dashed var(--border-2);
  color: var(--text-2);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-option:hover {
  border-color: var(--poll-accent);
  color: var(--poll-accent);
}

.poll-hint {
  font-size: 0.75rem;
  color: var(--text-3);
}

#pollToggleBtn.active {
  background: var(--poll-bg-active);
  border-color: var(--poll-accent);
  color: var(--poll-accent);
  font-weight: 600;
}

/* ─── Poll Display inside Message Card ────────────────────────────────────────── */
.poll-container {
  margin-top: 12px;
}

.poll-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.poll-options-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poll-option-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
  user-select: none;
}

.poll-option-item:hover:not(.poll-option-chosen) {
  border-color: var(--poll-accent);
  box-shadow: 0 2px 6px var(--poll-ring);
  transform: translateY(-1px);
}

.poll-option-item.poll-option-chosen {
  cursor: default;
  border-color: var(--poll-accent);
  box-shadow: 0 0 0 1px var(--poll-accent);
}

.poll-option-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: var(--poll-bar);
  border-radius: 7px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.poll-option-chosen .poll-option-bar {
  background: var(--poll-bar-chosen);
}

[data-theme="dark"] .poll-option-bar {
  background: var(--poll-bar);
}

[data-theme="dark"] .poll-option-chosen .poll-option-bar {
  background: var(--poll-bar-chosen);
}

.poll-option-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  gap: 10px;
}

.poll-option-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.poll-radio-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border-2);
  display: inline-block;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.poll-option-item:hover:not(.poll-option-voted) .poll-radio-dot {
  border-color: var(--poll-accent);
}

.poll-chosen-check {
  color: var(--poll-accent);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

.poll-option-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}

.poll-option-stats {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
  flex-shrink: 0;
}

.poll-option-stats.visible {
  display: flex;
}

.poll-option-pct {
  color: var(--poll-accent);
}

.poll-option-count {
  font-size: 0.75rem;
  color: var(--text-3);
  font-weight: 400;
}

.poll-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-3);
}

.poll-total-count {
  font-weight: 500;
}

.poll-voted-badge {
  color: var(--poll-accent);
  font-weight: 500;
}

.poll-hint-tap {
  font-style: italic;
  font-size: 0.75rem;
}

/* ─── Spoiler / Text Blur Sensor ─────────────────────────────────────────────── */
.spoiler-text {
  display: inline-block;
  background: var(--text-3);
  color: transparent !important;
  user-select: none;
  cursor: pointer;
  border-radius: 4px;
  padding: 0 5px;
  margin: 0 2px;
  filter: blur(4px);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  vertical-align: baseline;
}

.spoiler-text.revealed {
  background: rgba(120, 120, 120, 0.15);
  color: inherit !important;
  filter: none;
  user-select: auto;
  cursor: text;
}

[data-theme="dark"] .spoiler-text:not(.revealed) {
  background: #2a333d;
  filter: blur(5px);
}

.format-btn-spoiler {
  font-size: 0.95rem;
}

/* ─── Poll Duration & Expiry Status ─────────────────────────────────────────── */
.poll-duration-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-2);
}

.poll-duration-label {
  font-weight: 500;
  color: var(--text-muted);
}

.poll-select-custom {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.poll-duration-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  padding: 5px 28px 5px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.poll-duration-select:hover {
  border-color: var(--poll-accent);
}

.poll-duration-select:focus {
  border-color: var(--poll-accent);
  box-shadow: 0 0 0 2px var(--poll-ring);
}

.poll-select-chevron {
  position: absolute;
  right: 8px;
  width: 12px;
  height: 12px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.15s;
}

.poll-select-custom:hover .poll-select-chevron {
  color: var(--poll-accent);
}

.poll-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.poll-expiry-info {
  display: inline-flex;
  align-items: center;
  font-size: 0.73rem;
  color: var(--text-3);
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.poll-expired-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--danger);
  font-weight: 600;
  font-size: 0.78rem;
  background: rgba(220, 74, 61, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.poll-option-item.poll-option-expired {
  cursor: default;
  opacity: 0.85;
}

.poll-option-item.poll-option-expired:hover {
  border-color: var(--border);
  box-shadow: none;
  transform: none;
}

/* ─── Share Button & Modal ───────────────────────────────────────────────────── */
.share-msg-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-2);
  transition: all 0.15s ease;
}

.share-msg-btn:hover {
  color: var(--text);
  background: var(--bg);
}

.share-btn-label {
  font-size: 0.78rem;
  font-weight: 500;
}

/* Modal Backdrop */
.share-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.share-modal-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.share-modal-header {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.share-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.share-modal-title svg {
  color: var(--primary);
}

.share-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-3);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.share-modal-close:hover {
  color: var(--danger);
  background: var(--bg);
}

.share-modal-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.share-controls {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.share-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-control-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
}

.share-btn-group {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.share-option-btn {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.share-option-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.share-theme-selector {
  display: flex;
  gap: 8px;
  align-items: center;
}

.theme-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.theme-dot:hover {
  transform: scale(1.15);
}

.theme-dot.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--primary);
  transform: scale(1.15);
}

.theme-dot-emerald {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.theme-dot-midnight {
  background: linear-gradient(135deg, #090d16, #1e293b);
}

.theme-dot-sunset {
  background: linear-gradient(135deg, #ea580c, #ec4899);
}

.theme-dot-clean {
  background: linear-gradient(135deg, #f8fafc, #cbd5e1);
  border: 1px solid #94a3b8;
}

/* ─── Share Preview Target (Card to capture) ────────────────────────────────── */
.share-preview-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0;
}

.share-card-canvas {
  width: 310px;
  border-radius: 18px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.share-card-canvas.ratio-story {
  min-height: 460px;
  aspect-ratio: 9 / 14;
}

.share-card-canvas.ratio-square {
  min-height: 310px;
  aspect-ratio: 1 / 1;
}

/* Themes */
.share-card-canvas.theme-emerald {
  background: linear-gradient(155deg, #042f2e 0%, #064e3b 50%, #0f172a 100%);
  color: #f0fdf4;
}

.share-card-canvas.theme-midnight {
  background: linear-gradient(160deg, #020617 0%, #0f172a 60%, #1e1b4b 100%);
  color: #f8fafc;
}

.share-card-canvas.theme-sunset {
  background: linear-gradient(155deg, #7c2d12 0%, #831843 55%, #18181b 100%);
  color: #fff1f2;
}

.share-card-canvas.theme-clean {
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.share-card-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.share-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.share-brand-badge {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.share-brand-logo {
  font-family: inherit;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  color: #2dd4bf;
}

.theme-sunset .share-brand-logo {
  color: #fb923c;
}

.theme-clean .share-brand-logo {
  color: #0f766e;
}

.share-brand-sub {
  font-size: 0.65rem;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.share-card-badge-id {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
}

.theme-clean .share-card-badge-id {
  background: rgba(0, 0, 0, 0.08);
  color: #334155;
}

.share-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 6px 0;
}

.share-card-text {
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 500;
  word-break: break-word;
  white-space: pre-wrap;
}

.share-card-image {
  margin-top: 4px;
  border-radius: 10px;
  overflow: hidden;
  max-height: 160px;
}

.share-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.share-card-poll-box {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.theme-clean .share-card-poll-box {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
}

.share-card-poll-title {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.85;
}

.share-card-poll-opt {
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  padding: 5px 8px;
  font-size: 0.78rem;
}

.theme-clean .share-card-poll-opt {
  background: rgba(0, 0, 0, 0.06);
}

.share-card-poll-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(45, 212, 191, 0.35);
  border-radius: 6px;
}

.theme-sunset .share-card-poll-bar {
  background: rgba(251, 146, 60, 0.4);
}

.theme-clean .share-card-poll-bar {
  background: rgba(15, 118, 110, 0.2);
}

.share-card-poll-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.share-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 10px;
}

.theme-clean .share-card-footer {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.share-card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  opacity: 0.75;
}

.share-card-watermark {
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0.6;
}

/* Modal Footer Buttons */
.share-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  background: var(--bg);
}

.btn-share-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-share-download {
  background: var(--primary);
  color: #ffffff;
}

.btn-share-download:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-share-native {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-share-native:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-share-copy {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
}

.btn-share-copy:hover {
  background: var(--bg);
  color: var(--text);
}

/* ─── Unified Navbar Room Selector & User Menu ──────────────────────────────── */
.room-selector-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.room-selector-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.room-selector-trigger:hover {
  border-color: var(--border-2);
  background: var(--surface);
}

.room-selector-trigger.active {
  border-color: var(--text);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(26, 26, 24, 0.06);
}

[data-theme="dark"] .room-selector-trigger.active {
  box-shadow: 0 0 0 3px rgba(240, 240, 237, 0.08);
}

.room-selector-name {
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.room-selector-chevron {
  transition: transform 0.2s ease;
  color: var(--text-muted);
}

.room-selector-trigger.active .room-selector-chevron {
  transform: rotate(180deg);
}

.room-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  max-width: 330px;
  width: 290px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  display: none !important;
  flex-direction: column;
  overflow: hidden;
  animation: dropdownFadeIn 0.15s ease-out;
}

.room-dropdown-menu.show {
  display: flex !important;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.room-dropdown-search-box {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
}

.room-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.room-dropdown-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--text);
  width: 100%;
}

.room-dropdown-header {
  padding: 8px 12px 4px 12px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.room-dropdown-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.room-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  transition: background 0.15s;
}

.room-dropdown-item:hover {
  background: var(--bg);
}

.room-dropdown-item.active {
  background: var(--bg);
  font-weight: 600;
}

.room-dropdown-item-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.room-dropdown-item-info {
  flex: 1;
  min-width: 0;
}

.room-dropdown-item-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-dropdown-item-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.room-dropdown-badge-active {
  font-size: 0.7rem;
  color: var(--text);
  font-weight: 600;
  flex-shrink: 0;
}

.room-dropdown-footer {
  padding: 8px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.btn-dropdown-create-room {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px dashed var(--border-2);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-dropdown-create-room:hover {
  border-color: var(--text);
  background: var(--bg);
}

/* User Menu Dropdown */
.header-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-menu-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.user-menu-trigger:hover,
.user-menu-trigger.active {
  border-color: var(--border-2, var(--border));
  background: var(--surface);
}

.user-avatar-initial {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
}

.user-menu-name {
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-chevron {
  color: var(--text-muted);
  transition: transform 0.2s;
}

.user-menu-trigger.active .user-menu-chevron {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  z-index: 1000;
  display: none !important;
  flex-direction: column;
  padding: 4px;
  animation: dropdownFadeIn 0.15s ease-out;
}

.user-dropdown-menu.show {
  display: flex !important;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}

.user-dropdown-item:hover {
  background: var(--bg);
}

.user-dropdown-item.superadmin-link {
  color: #f59e0b;
}

.user-dropdown-item.logout-link {
  color: var(--danger);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.nav-link-login {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-link-login:hover {
  color: var(--text);
  background: var(--surface);
}

/* Subtle Room Bar (Untuk halaman room spesifik /r/<slug>) */
.room-subtle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 2px 0;
  flex-wrap: wrap;
  gap: 8px;
}

.room-subtle-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.room-back-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}

.room-back-link:hover {
  color: var(--text);
  background: var(--bg);
}

.room-subtle-sep {
  color: var(--border-2, var(--border));
  font-size: 0.85rem;
}

.room-subtle-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.btn-subtle-settings {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-subtle-settings:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.room-subtle-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: -2px 0 14px 0;
  line-height: 1.4;
}

/* Room Modals (General) */
.room-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  animation: fadeIn 0.15s ease;
}

.room-modal-overlay.hidden {
  display: none !important;
}

.room-modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0,0,0,0.2);
  animation: scaleIn 0.18s ease;
}

.room-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.room-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.room-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}

.room-modal-close:hover {
  color: var(--text);
  background: var(--bg);
}

.btn-room-action {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-room-action:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-room-action.btn-room-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-room-action.btn-room-primary:hover {
  opacity: 0.92;
  color: #fff;
}

.room-pill {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.2px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
}
.room-pill.public {
  color: var(--text-2);
  border-color: var(--border);
  background: var(--bg);
}
.room-pill.private {
  color: var(--text-muted);
  border-color: var(--border);
  background: var(--bg);
}
.room-pill.moderator {
  color: var(--text);
  border-color: var(--border);
  background: var(--bg);
}

/* Moderation in cards */
.msg-mod-controls {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.btn-mod-action {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-mod-action:hover {
  background: var(--bg);
  color: var(--text);
}

.btn-mod-action.btn-mod-delete:hover {
  color: var(--danger);
  border-color: var(--danger);
}

@media (max-width: 600px) {
  .room-selector-name {
    max-width: 110px;
  }
  .room-dropdown-menu {
    position: fixed;
    top: 56px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }
}

