/* ── Community module styles ── */

:root {
  --k1: #0a0a0a; --k2: #1a1a1a; --k3: #333; --k4: #555; --k5: #888;
  --k6: #aaa; --k7: #ccc; --k8: #e5e5e5; --k9: #f5f5f5; --kw: #fff;
  --bd: #e8e8e8; --rd: #111;
  --r4: 4px; --r8: 8px; --r12: 12px; --r99: 999px;
}

/* ── Top nav bar ── */

.top-nav {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--bd);
  background: var(--kw);
  margin-bottom: 20px;
}

.top-nav-logo {
  font-size: 1.035rem;
  font-weight: 800;
  color: var(--k1);
  margin-right: 24px;
  padding: 14px 0;
  flex-shrink: 0;
}

.comm-tab {
  padding: 14px 16px;
  border: none;
  background: none;
  font-size: .966rem;
  font-weight: 600;
  color: var(--k5);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
  transition: color .15s;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  flex-shrink: 0;
}

.comm-tab:hover {
  color: var(--k1);
}

.comm-tab.active {
  color: var(--k1);
  border-bottom-color: var(--k1);
}

/* ── Unread badge ── */

.comm-badge {
  background: var(--k1);
  color: var(--kw);
  border-radius: var(--r99);
  padding: 1px 6px;
  font-size: .782rem;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
}

/* ── 3-column layout ── */

.comm-wrap {
  display: flex;
  gap: 0;
  width: 100%;
  align-items: flex-start;
  overflow-x: hidden;
}

/* ── Left category sidebar ── */

.cat-sidebar {
  width: 190px;
  flex-shrink: 0;
  padding: 8px 12px 0 0;
  border-right: 1px solid var(--bd);
  margin-right: 20px;
}

.cat-title {
  font-size: .862rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--k5);
  padding: 4px 12px 8px;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--r8);
  border: none;
  background: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--k3);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background .12s;
}

.cat-item:hover {
  background: var(--k9);
}

.cat-item.active {
  background: var(--k8);
  font-weight: 700;
  color: var(--k1);
}

.cat-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.55;
}

.cat-item.active .cat-icon {
  opacity: 1;
}

/* ── Center feed column ── */

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

/* ── Mobile category pills (hidden by default, shown < 960px) ── */

.cat-pills-mobile {
  display: none;
}

/* ── Right panel ── */

.right-panel {
  width: 260px;
  flex-shrink: 0;
  margin-left: 20px;
  border-left: 1px solid var(--bd);
  padding-left: 20px;
}

.rp-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 18px 16px;
  background: linear-gradient(135deg, var(--k1) 0%, #3a3a3a 100%);
  border-radius: var(--r8) var(--r8) 0 0;
}

.rp-banner-logo {
  width: 20px;
  height: auto;
  fill: #fff;
  margin-bottom: 10px;
}

.rp-banner-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.rp-banner-sub {
  font-size: .862rem;
  color: rgba(255,255,255,.7);
  line-height: 1.4;
}

.rp-body {
  background: var(--kw);
  border: 1px solid var(--bd);
  border-top: none;
  border-radius: 0 0 var(--r8) var(--r8);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.rp-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: .977rem;
  color: var(--k4);
}

.rp-online {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  font-size: .828rem;
  color: var(--k4);
  font-weight: 600;
}

.rp-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}

.rp-desc {
  font-size: .977rem;
  color: var(--k4);
  line-height: 1.5;
  margin-bottom: 12px;
}

.rp-stats strong {
  display: block;
  font-size: 1.265rem;
  font-weight: 800;
  color: var(--k1);
}

.rp-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

.rp-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: var(--r99);
  object-fit: cover;
  background: var(--k8);
}

.rp-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.rp-links a {
  font-size: .977rem;
  color: var(--k4);
  text-decoration: none;
  font-weight: 600;
}

.rp-links a:hover {
  color: var(--k1);
}

.sinv {
  width: 100%;
  padding: 9px;
  background: var(--k1);
  color: var(--kw);
  border: none;
  border-radius: var(--r8);
  font-size: .966rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s;
}

.sinv:hover {
  opacity: .82;
}

.rp-rules {
  background: var(--kw);
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  padding: 14px 16px;
}

.rp-rules-title {
  font-size: .805rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--k5);
  margin-bottom: 8px;
}

.rp-rules-list {
  margin: 0;
  padding-left: 16px;
  font-size: .92rem;
  color: var(--k4);
  line-height: 1.6;
}

/* ── Feed header ── */

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

.feed-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--k1);
}

.btn-new-post {
  padding: 8px 16px;
  background: var(--k1);
  color: var(--kw);
  border: none;
  border-radius: var(--r8);
  font-size: .966rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s;
}

.btn-new-post:hover {
  opacity: .82;
}

/* ── Feed header actions (filter + button) ── */

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

.feed-header-actions select {
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  padding: 6px 10px;
  font-size: .966rem;
  font-family: inherit;
  background: var(--kw);
  color: var(--k1);
  cursor: pointer;
}

.feed-header-actions select:focus {
  outline: none;
  border-color: var(--k3);
}

/* ── Feed ── */

#comm-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comm-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comm-skeleton-card {
  background: var(--kw);
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  padding: 16px 20px;
  height: 120px;
  background: linear-gradient(90deg, var(--k9) 25%, var(--k8) 50%, var(--k9) 75%);
  background-size: 200% 100%;
  animation: comm-shimmer 1.4s infinite;
}

@keyframes comm-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.comm-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--k5);
  font-size: 1.035rem;
}

.comm-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--k3);
  font-size: 1.15rem;
}

/* ── Post card ── */

.post-card {
  background: var(--kw);
  border: 1px solid var(--bd);
  border-radius: var(--r12);
  padding: 20px 24px;
  transition: box-shadow .15s;
}

.post-card:hover {
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
}

.post-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.post-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r99);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--k8);
}

.post-author-info {
  flex: 1;
  min-width: 0;
}

.post-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.post-author-name {
  font-weight: 700;
  font-size: 1.006rem;
  color: var(--k1);
}

.post-role-badge {
  display: inline-block;
  font-size: .713rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--r4);
  background: var(--k2);
  color: var(--kw);
  text-transform: uppercase;
  letter-spacing: .04em;
  vertical-align: middle;
}

.post-role-badge.mod   { background: var(--k3); }
.post-role-badge.admin { background: var(--k2); }

.post-time {
  font-size: .897rem;
  color: var(--k5);
}

.post-category-tag {
  display: inline-block;
  font-size: .828rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r99);
  background: var(--k9);
  color: var(--k4);
}

/* ── Share button ── */

.post-share-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--k5);
  padding: 4px;
  display: flex;
  align-items: center;
  margin-left: auto;
  border-radius: var(--r4);
  transition: color .1s;
  flex-shrink: 0;
}

.post-share-btn:hover {
  color: var(--k1);
}

.post-admin-controls {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.post-admin-controls button,
.post-action-btn {
  background: none;
  border: 1px solid var(--bd);
  border-radius: var(--r4);
  padding: 3px 8px;
  font-size: .828rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--k4);
  font-family: inherit;
  transition: background .1s, color .1s;
}

.post-admin-controls button:hover,
.post-action-btn:hover {
  background: var(--k9);
  color: var(--k1);
}

.post-action-btn.danger:hover {
  background: var(--k9);
  color: var(--k1);
  border-color: var(--k7);
}

/* ── Post body ── */

.post-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--k1);
  line-height: 1.35;
}

.pbody-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  font-size: 1.035rem;
  color: var(--k3);
  line-height: 1.55;
}

.pbody-expanded {
  display: block;
  overflow: visible;
  font-size: 1.035rem;
  color: var(--k3);
  line-height: 1.55;
}

.pbody-clamped ul, .pbody-clamped ol,
.pbody-expanded ul, .pbody-expanded ol {
  padding-left: 1.4em;
  margin: 4px 0;
}

.pbody-toggle {
  background: none;
  border: none;
  color: var(--k4);
  font-size: .92rem;
  cursor: pointer;
  padding: 4px 0;
  font-weight: 600;
  font-family: inherit;
  margin-top: 4px;
}

.pbody-toggle:hover {
  color: var(--k1);
}

/* ── Post footer ── */

.post-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--k9);
}

.post-vote-btn,
.post-comment-btn,
.post-report-btn,
.post-delete-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .943rem;
  font-weight: 600;
  color: var(--k4);
  padding: 5px 9px;
  border-radius: var(--r8);
  transition: background .12s, color .12s;
  font-family: inherit;
}

.post-vote-btn:hover,
.post-comment-btn:hover {
  background: var(--k9);
  color: var(--k1);
}

.post-vote-btn.voted {
  color: var(--k1);
  font-weight: 700;
}

.post-vote-btn.voted .vote-icon {
  fill: currentColor;
}

.post-report-btn {
  margin-left: auto;
}

.post-report-btn:hover {
  background: var(--k9);
  color: var(--k1);
}

.post-delete-btn:hover {
  background: var(--k9);
  color: #dc2626;
}

/* ── Load more ── */

#comm-feed-more {
  text-align: center;
  padding: 12px 0;
}

.comm-load-more-btn {
  background: var(--kw);
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  padding: 8px 24px;
  font-size: 1.006rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--k3);
  font-family: inherit;
  transition: background .12s;
}

.comm-load-more-btn:hover {
  background: var(--k9);
}

/* ── Inline comments ── */

.post-comments-wrap {
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease;
}

.post-comments-wrap.comments-open {
  max-height: 2000px;
}

.post-comments {
  border-top: 1px solid var(--k9);
  margin-top: 12px;
  padding-top: 12px;
}

.comment-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--k9);
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--r99);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--k8);
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-author {
  font-weight: 700;
  font-size: .92rem;
  color: var(--k1);
}

.comment-text {
  font-size: 1.006rem;
  color: var(--k3);
  margin-top: 3px;
  line-height: 1.5;
}

.comment-text ul, .comment-text ol {
  padding-left: 1.4em;
  margin: 4px 0;
}

.comment-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.comment-time {
  font-size: .828rem;
  color: var(--k5);
}

.comment-vote-btn,
.comment-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .828rem;
  font-weight: 600;
  color: var(--k5);
  padding: 2px 6px;
  border-radius: var(--r4);
  font-family: inherit;
  transition: background .1s, color .1s;
}

.comment-vote-btn:hover {
  background: var(--k9);
  color: var(--k1);
}

.comment-delete-btn:hover {
  color: var(--k3);
}

.comment-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .828rem;
  font-weight: 600;
  color: #2563eb;
  padding: 2px 6px;
  border-radius: var(--r4);
  font-family: inherit;
  transition: background .1s, color .1s;
}
.comment-edit-btn:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.reply-section {
  margin-top: 4px;
}

.reply-item {
  display: flex;
  gap: 8px;
  padding: 8px 0 4px 12px;
  margin-left: 36px;
  border-left: 2px solid var(--bd);
}

.reply-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .828rem;
  font-weight: 600;
  color: #2563eb;
  padding: 2px 0;
  font-family: inherit;
  display: block;
  margin-bottom: 4px;
}
.reply-toggle-btn:hover { text-decoration: underline; }
.reply-toggle-btn:disabled { opacity: .5; cursor: default; }

.reply-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .828rem;
  font-weight: 600;
  color: var(--k5);
  padding: 2px 6px;
  border-radius: var(--r4);
  font-family: inherit;
  transition: background .1s, color .1s;
}
.reply-btn:hover { background: var(--k9); color: var(--k1); }

.reply-form-wrap {
  margin-top: 8px;
  padding-left: 36px;
}
.reply-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.reply-form textarea {
  width: 100%;
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  padding: 7px 10px;
  font-size: .977rem;
  font-family: inherit;
  resize: none;
  min-height: 60px;
  color: var(--k1);
  box-sizing: border-box;
}
.reply-form textarea:focus { outline: none; border-color: var(--k3); }
.reply-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.reply-form-actions button[type="submit"] {
  background: var(--k1);
  color: var(--kw);
  border: none;
  border-radius: var(--r8);
  padding: 6px 14px;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.reply-form-actions button[type="submit"]:disabled { opacity: .5; cursor: default; }
.reply-form-actions button[type="button"] {
  background: none;
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  padding: 6px 12px;
  font-size: .92rem;
  cursor: pointer;
  font-family: inherit;
  color: var(--k3);
}

/* ── Comment form ── */

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--k9);
}

.comment-form textarea {
  flex: 1;
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  padding: 8px 10px;
  font-size: 1.006rem;
  font-family: inherit;
  resize: none;
  min-height: 36px;
  color: var(--k1);
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--k3);
}

.comment-form button {
  background: var(--k1);
  color: var(--kw);
  border: none;
  border-radius: var(--r8);
  padding: 8px 14px;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  align-self: flex-end;
}

.comment-form button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ── Inline comment edit ── */

.comment-edit-ta {
  width: 100%;
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  padding: 10px 12px;
  font-size: 1.006rem;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  color: var(--k1);
  margin-top: 8px;
  box-sizing: border-box;
  background-color: var(--kw);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.comment-edit-ta:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.comment-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.comment-edit-save {
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: var(--r6);
  padding: 6px 14px;
  font-size: .943rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.comment-edit-save:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

.comment-edit-cancel {
  background: var(--kw);
  color: var(--k4);
  border: 1px solid var(--bd);
  border-radius: var(--r6);
  padding: 6px 14px;
  font-size: .943rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.comment-edit-cancel:hover {
  background: var(--k9);
  color: var(--k1);
}

.msg-edit-input {
  width: 100%;
  border: 1px solid var(--bd);
  border-radius: var(--r6);
  padding: 8px 10px;
  font-size: 1.006rem;
  font-family: inherit;
  resize: vertical;
  min-height: 50px;
  color: var(--k1);
  margin-top: 4px;
  box-sizing: border-box;
  background-color: var(--kw);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.msg-edit-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

/* ── Compose modal (Flixy-style) ── */

.cmp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.48);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cmp-modal {
  background: var(--kw);
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

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

.cmp-who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.035rem;
  color: var(--k3);
}

.cmp-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.cmp-av-init {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #334155;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.cmp-close {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.092rem;
  color: var(--k5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.cmp-close:hover { background: var(--k9); color: var(--k1); }

.cmp-content {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px 8px;
  display: flex;
  flex-direction: column;
}

.cmp-title {
  border: none;
  outline: none;
  font-size: 1.38rem;
  font-weight: 700;
  color: var(--k1);
  padding: 14px 0 4px;
  width: 100%;
  font-family: inherit;
  background: transparent;
}

.cmp-title::placeholder { color: #bbb; font-weight: 400; }

.cmp-body {
  flex: 1;
  min-height: 120px;
  outline: none;
  font-size: 1.092rem;
  color: var(--k3);
  line-height: 1.65;
  padding: 8px 0 14px;
  font-family: inherit;
}

.cmp-body:empty::before {
  content: attr(data-placeholder);
  color: #bbb;
  pointer-events: none;
  display: block;
}

.cmp-body img { max-width: 100%; border-radius: 6px; margin: 4px 0; display: block; }
.cmp-body a { color: #2563eb; text-decoration: underline; }
.cmp-body ul, .cmp-body ol { padding-left: 1.4em; margin: 4px 0; }

.cmp-yt-wrap { position: relative; margin: 8px 0; }
.cmp-yt { width: 100%; aspect-ratio: 16/9; border-radius: 8px; }

.cmp-yt-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: .977rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.cmp-yt-remove:hover { background: rgba(0,0,0,0.8); }

.yt-preview-link { display: block; text-decoration: none; margin-top: 10px; }
.yt-preview { position: relative; width: 100%; max-width: 480px; border-radius: 8px; overflow: hidden; background: #000; aspect-ratio: 16/9; }
.yt-thumb { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }
.yt-play-icon {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 48px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.6);
    pointer-events: none;
}
.yt-preview:hover .yt-thumb { opacity: 1; }

.cmp-err {
  font-size: .839rem;
  color: #dc2626;
  min-height: 14px;
  padding: 1px 0 3px;
}

.cmp-bottom {
  border-top: 1px solid var(--bd);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cmp-toolbar {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 1;
  flex-wrap: wrap;
}

.cmp-tb {
  background: none;
  border: none;
  padding: 5px 7px;
  border-radius: 5px;
  cursor: pointer;
  color: var(--k4);
  line-height: 1;
  font-family: inherit;
  font-size: .977rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cmp-tb:hover { background: var(--k9); color: var(--k1); }
.cmp-tb[data-cmd="bold"] { font-weight: 800; }
.cmp-tb[data-cmd="italic"] { font-style: italic; font-weight: 600; }

.cmp-tb-sep {
  width: 1px;
  height: 18px;
  background: var(--bd);
  margin: 0 5px;
  flex-shrink: 0;
}

.cmp-actions {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  flex-shrink: 0;
}

.cmp-cat-wrap { display: flex; flex-direction: column; }

.cmp-cat {
  -webkit-appearance: none;
  appearance: none;
  background: var(--k9);
  border: 1px solid var(--bd);
  border-radius: 20px;
  padding: 6px 28px 6px 11px;
  font-size: .943rem;
  cursor: pointer;
  font-family: inherit;
  color: var(--k3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='%23888' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 14px;
  max-width: 150px;
}

.cmp-cat:focus { outline: none; border-color: var(--k3); }

.cmp-cancel {
  background: none;
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  padding: 7px 14px;
  font-size: .977rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--k4);
  font-family: inherit;
}

.cmp-cancel:hover { background: var(--k9); }

.cmp-submit {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: var(--r8);
  padding: 7px 18px;
  font-size: .977rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
  white-space: nowrap;
}

.cmp-submit:hover:not(:disabled) { background: #1d4ed8; }
.cmp-submit:disabled { opacity: .5; cursor: not-allowed; }

/* Amber "Save changes" button for edit modal */
.cmp-submit-edit {
  background: #d97706;
}
.cmp-submit-edit:hover:not(:disabled) { background: #b45309; }

/* Edit notice strip inside modal */
.cmp-edit-notice {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: .897rem;
  padding: 8px 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.cmp-edit-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.7;
}

/* ── Edit button on own posts ── */

.post-edit-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .943rem;
  font-weight: 600;
  color: #2563eb;
  padding: 5px 9px;
  border-radius: var(--r8);
  transition: background .12s, color .12s;
  font-family: inherit;
}

.post-edit-btn:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

/* "upravené" badge in post meta row */
.post-edited-badge {
  font-size: .805rem;
  font-style: italic;
  color: var(--k5);
  font-weight: 500;
  cursor: default;
}

/* When report is absent (own post) let edit push to the right */
.post-edit-btn:first-of-type:not(.post-report-btn ~ .post-edit-btn) {
  margin-left: auto;
}

/* ── Chat (messages) ── */

.ml2 {
  display: flex;
  height: calc(100vh - 260px);
  min-height: 400px;
  border: 1px solid var(--bd);
  border-radius: var(--r12);
  overflow: hidden;
  background: var(--kw);
}

.cl2 {
  width: 300px;
  flex-shrink: 0;
  border-right: 1px solid var(--bd);
  display: flex;
  flex-direction: column;
}

.cl2-hd {
  padding: 16px 20px 14px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--k1);
  border-bottom: 1px solid var(--bd);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.clist2 { flex: 1; overflow-y: auto; }

.ci3 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--k9);
  transition: background .1s;
  position: relative;
}
.ci3:hover  { background: var(--k9); }
.ci3.active { background: var(--k8); }

.cl2-av {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--k8);
  overflow: hidden;
}
.cl2-av-img { width: 44px; height: 44px; object-fit: cover; display: block; }

.ci3-info { flex: 1; min-width: 0; }
.ci3-name {
  font-weight: 700;
  font-size: 1.012rem;
  color: var(--k1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ci3-prev {
  font-size: .874rem;
  color: var(--k5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}
.ci3-time { font-size: .805rem; color: var(--k6); flex-shrink: 0; white-space: nowrap; }

.ci3-unread {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--k1);
}

.cp2 { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cp2-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--k5);
  font-size: 1.035rem;
}

.ctop {
  padding: 14px 20px;
  border-bottom: 1px solid var(--bd);
  font-weight: 700;
  font-size: 1.092rem;
  color: var(--k1);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ctop > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Späť tlačidlo — iba mobilný jednopanelový režim (viď @media max-width:640px) */
.cback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: -8px -4px -8px -8px;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--k1);
  border-radius: var(--r8);
  font-family: inherit;
}
.cback:hover { background: var(--k9); }

.cmsgs {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cmsg          { display: flex; flex-direction: column; }
.cmsg.mine     { align-items: flex-end; }
.cmsg.theirs   { align-items: flex-start; }

.cbub {
  max-width: 68%;
  padding: 10px 14px;
  border-radius: var(--r12);
  font-size: 1.035rem;
  line-height: 1.5;
  word-break: break-word;
}
.mine   .cbub { background: var(--k1); color: var(--kw); border-bottom-right-radius: var(--r4); }
.theirs .cbub { background: var(--k9); color: var(--k1); border-bottom-left-radius: var(--r4); }

.msg-deleted { font-style: italic; color: var(--k5); font-size: .977rem; }
.msg-time    { font-size: .782rem; color: var(--k5); margin-top: 3px; padding: 0 2px; }

.msg-actions { display: flex; gap: 4px; margin-top: 4px; }
.msg-action-btn {
  background: none; border: none; cursor: pointer;
  font-size: .805rem; color: var(--k5); padding: 2px 6px;
  border-radius: var(--r4); font-family: inherit; font-weight: 600;
  transition: background .1s, color .1s;
}
.msg-action-btn:hover,
.msg-action-btn.danger:hover { background: var(--k9); color: var(--k3); }

.cinput {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--bd);
  flex-shrink: 0;
}
.cinp {
  flex: 1; resize: none;
  border: 1px solid var(--bd); border-radius: var(--r8);
  padding: 10px 14px; font-size: 1.035rem; font-family: inherit;
  color: var(--k1); background: var(--kw);
  min-height: 40px; max-height: 120px;
}
.cinp:focus { outline: none; border-color: var(--k3); }

.csend {
  background: var(--k1); color: var(--kw); border: none;
  border-radius: var(--r8); padding: 10px 18px;
  font-size: 1.006rem; font-weight: 700; cursor: pointer;
  font-family: inherit; flex-shrink: 0; align-self: flex-end;
  transition: opacity .15s;
}
.csend:disabled             { opacity: .45; cursor: not-allowed; }
.csend:not(:disabled):hover { opacity: .82; }

/* ── Members list ── */

.mem-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.mem-title {
  font-size: 1.495rem;
  font-weight: 800;
  color: var(--k1);
  margin: 0;
}

.mem-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.mem-search-icon {
  position: absolute;
  left: 12px;
  color: var(--k6);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.mem-search-input {
  padding: 9px 16px 9px 36px;
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  font-size: .989rem;
  font-family: inherit;
  color: var(--k1);
  background: var(--kw);
  outline: none;
  width: 240px;
  transition: border-color .15s;
}

.mem-search-input:focus {
  border-color: var(--k1);
}

#mlist {
  display: flex;
  flex-direction: column;
  background: var(--kw);
  border: 1px solid var(--bd);
  border-radius: var(--r12);
  overflow: hidden;
}

.mrow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--k9);
  transition: background .1s;
}

.mrow:last-child {
  border-bottom: none;
}

.mrow:hover {
  background: var(--k9);
}

.mem-av-btn {
  flex-shrink: 0;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.mem-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--k1);
  color: var(--kw);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.035rem;
  font-weight: 700;
  flex-shrink: 0;
}

.mem-av-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.mem-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mem-name {
  font-size: 1.035rem;
  font-weight: 700;
  color: var(--k1);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: color .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mem-name:hover {
  color: var(--k5);
  text-decoration: underline;
}

.mem-joined {
  font-size: .874rem;
  color: var(--k6);
}

.mem-msg-btn {
  flex-shrink: 0;
  padding: 7px 16px;
  background: var(--kw);
  color: var(--k3);
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  font-size: .897rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}

.mem-msg-btn:hover {
  border-color: var(--k1);
  color: var(--k1);
  background: var(--k9);
}

.mem-msg-ph {
  width: 120px;
  flex-shrink: 0;
}

/* ── Pagination ── */

.mem-pag {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 16px 0 8px;
}

.pbtn {
  padding: 6px 12px;
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  background: var(--kw);
  font-size: .943rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--k4);
  font-family: inherit;
  transition: background .1s, border-color .1s;
}

.pbtn:hover {
  background: var(--k9);
  border-color: var(--k7);
}

.pbtn.pnum {
  background: var(--k1);
  color: var(--kw);
  border-color: var(--k1);
  cursor: default;
}

/* ── Toast ── */

.comm-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  opacity: 0;
  background: var(--k1);
  color: var(--kw);
  padding: 10px 20px;
  border-radius: var(--r8);
  font-size: 1.006rem;
  font-weight: 600;
  z-index: 9999;
  transition: opacity .22s, transform .22s;
  white-space: nowrap;
  pointer-events: none;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}

.comm-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.comm-toast-err {
  background: var(--k2);
}

/* ── Shared loading spinner ── */

.comm-spinner {
  text-align: center;
  padding: 32px;
  color: var(--k5);
  font-size: 1.006rem;
}

.comm-error-state {
  text-align: center;
  padding: 32px 24px;
  color: var(--k5);
}

.comm-error-state strong {
  display: block;
  color: var(--k3);
  margin-bottom: 6px;
}

/* ── Inline edit textarea ── */

.msg-edit-input {
  width: 100%;
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  padding: 6px 10px;
  font-size: 1.006rem;
  font-family: inherit;
  color: var(--k1);
  resize: none;
  min-height: 36px;
  background: var(--kw);
}

.msg-edit-input:focus {
  outline: none;
  border-color: var(--k3);
}

/* ── Responsive ── */

/* ≥1401px: mierne zväčšenie oboch panelov */
@media (min-width: 1401px) {
  .cat-sidebar { width: 240px; }
  .right-panel { width: 310px; }
}

/* ≥1601px: plné zväčšenie o 100px */
@media (min-width: 1601px) {
  .cat-sidebar { width: 290px; }
  .right-panel { width: 360px; }
}

/* ≤1300px: pravý panel zmizne */
@media (max-width: 1300px) {
  .right-panel { display: none; }
}

/* ≤970px: ľavý panel zmizne, mobile pills sa zobrazia */
@media (max-width: 970px) {
  .cat-sidebar { display: none; }

  .cat-pills-mobile {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cat-pills-mobile::-webkit-scrollbar { display: none; }
  .cat-pills-mobile .cat-item {
    flex-shrink: 0;
    width: auto;
    padding: 8px 14px;
    border-radius: var(--r99);
    background: var(--k9);
    font-size: .92rem;
    white-space: nowrap;
  }
  .cat-pills-mobile .cat-item.active {
    background: var(--k1);
    color: var(--kw);
  }
  .cat-pills-mobile .cat-icon { display: none; }
  .feed-title { display: none; }
  .feed-header-actions { width: 100%; justify-content: space-between; }
}

/* ≤430px: touch-friendly */
@media (max-width: 430px) {
  .top-nav { overflow-x: auto; scrollbar-width: none; }
  .top-nav::-webkit-scrollbar { display: none; }
  .comm-tab { padding: 12px 12px; font-size: .9rem; flex-shrink: 0; }

  .feed-header { flex-wrap: wrap; gap: 8px; }
  .feed-header-actions { flex-wrap: wrap; }
  .btn-new-post { min-height: 44px; padding: 10px 14px; font-size: .9rem; }
  .feed-header-actions select { min-height: 40px; }

  .post-card { padding: 14px 16px; }
  .post-footer { flex-wrap: wrap; gap: 4px; }
  .post-vote-btn, .post-comment-btn, .post-report-btn, .post-delete-btn {
    min-height: 36px; padding: 6px 10px;
  }

  .cat-pills-mobile { gap: 5px; margin-bottom: 12px; }
  .cat-pills-mobile .cat-item { padding: 8px 12px; font-size: .88rem; }
}

/* ≤375px: malé mobily */
@media (max-width: 375px) {
  .comm-tab { padding: 11px 10px; font-size: .862rem; }
  .post-card { padding: 12px 14px; }
  .post-title { font-size: 1.05rem; }
  .btn-new-post { font-size: .88rem; padding: 9px 12px; }
  .cat-pills-mobile .cat-item { padding: 7px 10px; font-size: .85rem; }
}

/* ≤320px: najmenšie mobily */
@media (max-width: 320px) {
  .comm-tab { padding: 10px 8px; font-size: .82rem; }
  .post-card { padding: 10px 12px; }
  .cat-pills-mobile { gap: 4px; }
  .cat-pills-mobile .cat-item { padding: 6px 9px; font-size: .82rem; }
  .btn-new-post { padding: 8px 10px; }
}

/* ── Zachované pôvodné breakpointy (chat, members, prop-card) ── */

@media (max-width: 640px) {
  /* ── Messenger-style: naraz iba jeden panel (zoznam alebo chat) ── */
  .ml2 {
    position: relative;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 360px;
    overflow: hidden;
  }
  /* Predvolene: zoznam konverzácií na celú šírku */
  .cl2 {
    width: 100%;
    box-sizing: border-box;
    flex-shrink: unset;
    max-height: none;
    border-right: none;
  }
  /* Chat prekrýva celú plochu, predvolene mimo obrazovky vpravo */
  .cp2 {
    position: absolute;
    inset: 0;
    width: 100%;
    box-sizing: border-box;
    background: var(--kw);
    transform: translateX(100%);
    transition: transform .22s ease;
  }
  /* Po otvorení konverzácie — chat sa zasunie, zoznam ostáva v DOM */
  .ml2.chat-open .cp2 { transform: translateX(0); }
  .ml2.chat-open .cl2 { visibility: hidden; }

  .cback { display: inline-flex; }

  .cmsgs { padding: 14px 12px; }
  .cbub  { max-width: 82%; }

  .cinput { padding: 10px 12px; }
  .cinp   { min-width: 0; box-sizing: border-box; }
  .csend  { padding: 10px 14px; white-space: nowrap; }

  .mem-header { flex-direction: column; align-items: flex-start; }
  .mem-search-input { width: 100%; box-sizing: border-box; }
  .mrow { padding: 12px 14px; gap: 10px; }
  .mem-msg-btn { padding: 6px 12px; font-size: .851rem; }
}

/* ── User Profile Card (popup) ─────────────────────────────────────────────── */

.upc {
  background: var(--kw);
  border: 1px solid var(--bd);
  border-radius: var(--r12);
  box-shadow: 0 8px 32px rgba(0,0,0,.13);
  padding: 16px;
  width: 260px;
  font-size: 14px;
  animation: upc-open 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: top center;
}

.upc.closing {
  animation: upc-close 0.12s cubic-bezier(0.5, 0, 1, 1) forwards;
}

@keyframes upc-open {
  0% { opacity: 0; transform: scale(0.95) translateY(-6px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes upc-close {
  0% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(0.95) translateY(-6px); }
}
.upc-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.upc-av {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.upc-av-init {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #334155;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
}
.upc-info { min-width: 0; }
.upc-name {
  font-weight: 700;
  color: var(--k1);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upc-active { color: #6b7280; font-size: 12px; }
.upc-spin-txt { color: #9ca3af; }
.upc-role {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--r99);
  font-weight: 600;
  flex-shrink: 0;
}
.upc-role.admin { background: #fef3c7; color: #92400e; }
.upc-role.mod   { background: #dbeafe; color: #1e40af; }
.upc-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #6b7280;
  border-top: 1px solid var(--bd);
  padding-top: 10px;
  margin-bottom: 12px;
}
.upc-stats span strong { color: var(--k1); font-weight: 700; margin-right: 2px; }
.upc-msg-btn {
  width: 100%;
  padding: 8px;
  background: var(--k1);
  color: var(--kw);
  border: none;
  border-radius: var(--r8);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.upc-msg-btn:hover { background: #222; }
.upc-spin { padding: 20px; text-align: center; color: #9ca3af; }
.upc-trigger { cursor: pointer; }
.upc-trigger:hover { text-decoration: underline; }

/* ── @mention spans ── */
.mention {
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
  background: rgba(37,99,235,.08);
  border-radius: 3px;
  padding: 0 3px;
  transition: background .12s;
}
.mention:hover { background: rgba(37,99,235,.18); text-decoration: underline; }

/* ── Mention autocomplete dropdown ── */
.mention-dropdown {
  position: fixed;
  z-index: 1100;
  background: var(--kw);
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  min-width: 220px;
  max-width: 300px;
  overflow: hidden;
  font-size: 1rem;
}
.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background .1s;
}
.mention-item:hover,
.mention-item.active { background: var(--k9, #f3f4f6); }
.mention-item-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #334155;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  line-height: 28px;
  text-align: center;
}
.mention-item-name {
  font-weight: 600;
  color: var(--k1, #111827);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mention-empty { padding: 10px 14px; color: var(--k5, #6b7280); font-size: .954rem; }

/* ── Mention highlight on redirect ── */
.mention-highlight { animation: mention-flash 2s ease; }
@keyframes mention-flash {
  0%, 100% { background: transparent; }
  20%       { background: rgba(37,99,235,.12); }
}

/* ── Pripojená nehnuteľnosť (karta v príspevku + preview v composeri) ── */

.post-prop-card {
  display: flex;
  gap: 14px;
  border: 1px solid var(--bd);
  border-radius: var(--r12);
  padding: 12px;
  margin: 10px 0 4px;
  background: var(--k9);
}

.ppc-img {
  width: 110px;
  height: 82px;
  object-fit: cover;
  border-radius: var(--r8);
  flex-shrink: 0;
}

.ppc-img-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--k8);
  font-size: 1.6rem;
}

.ppc-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ppc-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ppc-title {
  font-weight: 700;
  font-size: .98rem;
  color: var(--k1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppc-loc {
  font-size: .82rem;
  color: var(--k5);
}

.ppc-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .87rem;
  color: var(--k4);
  margin-top: 2px;
}

.ppc-price {
  font-weight: 800;
  color: var(--k1);
}

.ppc-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
  flex-wrap: nowrap;
}

.ppc-analyze-btn {
  background: var(--k1);
  color: var(--kw);
  border: none;
  border-radius: var(--r8);
  padding: 6px 14px;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.ppc-analyze-btn:hover { background: var(--k2); }

.ppc-link {
  font-size: .84rem;
  font-weight: 600;
  color: var(--k1);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.ppc-link:hover { text-decoration: underline; }

/* Composer — tlačidlo + picker + preview */

.cmp-attach {
  margin-top: 4px;
  padding-bottom: 8px;
}

.cmp-attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--kw);
  border: 1px dashed var(--k7);
  border-radius: var(--r8);
  padding: 7px 12px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--k4);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .12s, color .12s;
}

.cmp-attach-btn:hover {
  border-color: var(--k4);
  color: var(--k1);
}

.cmp-prop-preview {
  position: relative;
  margin-top: 8px;
}

.cmp-prop-preview .post-prop-card { margin: 0; }

.cmp-prop-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: var(--k1);
  color: var(--kw);
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
}

.cmp-prop-picker {
  margin-top: 8px;
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  max-height: 240px;
  overflow-y: auto;
  background: var(--kw);
}

.cmp-prop-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-bottom: 1px solid var(--k9);
  background: var(--kw);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background .1s;
}

.cmp-prop-row:last-child { border-bottom: none; }
.cmp-prop-row:hover { background: var(--k9); }

.cmp-prop-thumb {
  width: 52px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.cmp-prop-thumb-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--k8);
  font-size: 1.1rem;
}

.cmp-prop-row-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cmp-prop-row-title {
  font-weight: 600;
  font-size: .9rem;
  color: var(--k1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmp-prop-row-meta {
  font-size: .8rem;
  color: var(--k5);
}

.cmp-prop-empty {
  padding: 14px;
  font-size: .87rem;
  color: var(--k5);
  text-align: center;
}

@media (max-width: 560px) {
  .post-prop-card { flex-direction: column; }
  .ppc-img { width: 100%; height: 150px; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   COMMUNITIES HUB — karty komunít (Partners & Influencers)
   ───────────────────────────────────────────────────────────────────────────── */

.hub { padding: 4px 0 32px; }

.hub-section { margin-bottom: 36px; }

.hub-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--k1);
  margin: 0 0 16px;
}

/* Hlavička sekcie s vyhľadávaním (Odporúčané komunity) */
.hub-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hub-section-head .hub-section-title { margin: 0; }

.hub-search-wrap {
  position: relative;
  flex: 0 1 320px;
  min-width: 200px;
}

.hub-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--k5);
  pointer-events: none;
}

.hub-search {
  width: 100%;
  border: 1px solid var(--bd);
  border-radius: var(--r99);
  padding: 9px 14px 9px 36px;
  font-size: .92rem;
  font-family: inherit;
  color: var(--k1);
  background: var(--kw);
  outline: none;
  transition: border-color .15s;
}

.hub-search:focus { border-color: var(--k1); }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.hub-empty {
  padding: 20px;
  border: 1px dashed var(--bd);
  border-radius: var(--r12);
  color: var(--k5);
  font-size: .92rem;
}

/* ── Karta komunity ── */
.hub-card {
  border: 1px solid var(--bd);
  border-radius: var(--r12);
  background: var(--kw);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .18s, transform .18s, border-color .18s;
  display: flex;
  flex-direction: column;
  text-align: left;
  font-family: inherit;
  padding: 0;
  width: 100%;
}

.hub-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  transform: translateY(-2px);
  border-color: var(--k7);
}

.hub-card:focus-visible { outline: 2px solid var(--k1); outline-offset: 2px; }

.hub-card-banner {
  position: relative;
  height: 120px;
  background: var(--k2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  padding: 12px;
}

.hub-card-banner .hub-card-logo,
.hub-card-banner .hub-card-logo-init {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.hub-card-banner-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.01em;
  text-align: center;
  line-height: 1.2;
}

.hub-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }

.hub-card-head { display: flex; align-items: center; gap: 10px; }

.hub-card-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.hub-card-logo-init {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #334155;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

/* V banneri má logo iné rozmery (vyššie), tu skry duplikát hlavičky na úzkych kartách nie je nutné */
.hub-card-headtext { min-width: 0; }

.hub-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--k1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-card-meta {
  font-size: .82rem;
  color: var(--k5);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hub-card-ext {
  color: var(--k4);
  font-weight: 600;
  background: var(--k9);
  border-radius: var(--r99);
  padding: 1px 8px;
  font-size: .74rem;
}

/* ── Propagačné štítky ── */
.hub-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hub-badge {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .01em;
  padding: 2px 9px;
  border-radius: var(--r99);
  line-height: 1.5;
  white-space: nowrap;
}

.hub-badge-recommended { background: #e7f3ee; color: #1a7a4f; }
.hub-badge-top         { background: #fdf2d6; color: #9a6b00; }
.hub-badge-partner     { background: #ece9fe; color: #5b3bd4; }
.hub-badge-sponsored   { background: #fde8e0; color: #c2521f; }

/* ── Zvýraznená (featured) komunita ── */
.hub-card-featured {
  border-color: #f0c66b;
  box-shadow: 0 0 0 1px #f0c66b inset;
}

.hub-card-featured:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.08), 0 0 0 1px #e6b34d inset;
  border-color: #e6b34d;
}

.hub-card-desc {
  font-size: .88rem;
  color: var(--k4);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Upgrade banner (free users, sekcia "Moje komunity") ── */
.hub-upgrade {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #f4d9a8;
  background: linear-gradient(180deg, #fffdf8, #fdf3e3);
  border-radius: var(--r12);
  padding: 16px 18px;
  margin-bottom: 18px;
}

.hub-upgrade-icon {
  font-size: 1.4rem;
  color: #d9892b;
  flex-shrink: 0;
}

.hub-upgrade-text { flex: 1; min-width: 0; }

.hub-upgrade-title { font-weight: 700; color: #7a4d12; font-size: .98rem; }

.hub-upgrade-sub { font-size: .84rem; color: #b07b34; margin-top: 2px; }

.hub-upgrade-btn {
  background: #e0871f;
  color: #fff;
  border: none;
  border-radius: var(--r8);
  padding: 10px 18px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background .15s;
}

.hub-upgrade-btn:hover { background: #c9770f; }

/* ── "Vytvor vlastnú komunitu" karta ── */
.hub-card-create {
  border: 1.5px dashed var(--k7);
  background: var(--k9);
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 28px 18px;
  min-height: 180px;
}

.hub-card-create:hover {
  border-color: var(--k1);
  background: var(--kw);
}

.hub-create-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--k1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
}

.hub-create-title { font-weight: 700; color: var(--k1); font-size: 1rem; }

.hub-create-sub { font-size: .85rem; color: var(--k5); max-width: 220px; line-height: 1.45; }

.comm-back {
  background: none;
  border: none;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: var(--k5);
  cursor: pointer;
  padding: 14px 14px 14px 0;
  margin-right: 8px;
  flex-shrink: 0;
  transition: color .15s;
  display: flex;
  align-items: center;
  gap: 2px;
}

.comm-back:hover { color: var(--k1); }

/* ── Žiadosť o vlastnú komunitu (modal form) — reuse .cmp-* shellu ── */
.hub-req { gap: 0; }

.hub-req-intro {
  font-size: .9rem;
  color: var(--k5);
  line-height: 1.55;
  margin: 8px 0 16px;
}

.hub-req-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--k3);
  margin: 12px 0 6px;
}

.hub-req-input {
  width: 100%;
  border: 1px solid var(--bd);
  border-radius: var(--r8);
  padding: 10px 12px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--k1);
  background: var(--kw);
  outline: none;
  transition: border-color .15s;
}

.hub-req-input:focus { border-color: var(--k1); }

.hub-req-textarea { min-height: 90px; resize: vertical; line-height: 1.5; }

@media (max-width: 560px) {
  .hub-grid { grid-template-columns: 1fr; }
  .hub-upgrade { flex-direction: column; align-items: flex-start; }
  .hub-upgrade-btn { width: 100%; }
}
