:root{
  --bg:#050607;
  --card:#0b0f10cc;
  --line:#1f2a2b;
  --text:#e8f2f0;
  --muted:#a7b6b2;
  --accent:#37ff6b;
  --shadow: 0 20px 60px rgba(0,0,0,.55);
  --r:18px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
  min-height:100vh;
}

.bg{
  position:fixed; inset:0;
  background:
    radial-gradient(1200px 600px at 30% 10%, rgba(55,255,107,.12), transparent 60%),
    radial-gradient(900px 500px at 90% 40%, rgba(255,55,125,.08), transparent 65%),
    linear-gradient(180deg, #030405, #070b0c 60%, #030405);
  z-index:-3;
}

.fog{
  position:fixed; inset:-20%;
  background: radial-gradient(circle at 20% 40%, rgba(255,255,255,.06), transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(255,255,255,.04), transparent 55%);
  filter: blur(20px);
  animation: drift 18s linear infinite;
  z-index:-2;
}
.grain{
  position:fixed; inset:0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity:.12;
  z-index:-1;
}

@keyframes drift{
  0%{transform:translate3d(-2%, -1%, 0)}
  50%{transform:translate3d(2%, 1%, 0)}
  100%{transform:translate3d(-2%, -1%, 0)}
}

.of-wrap{
  max-width:1000px;
  margin:0 auto;
  padding:22px 14px 70px;
}

/* make sure global site flex layout does not turn the forum into
   an inner scroll container */
html:has(body.open-forum-page){
  height:auto !important;
  min-height:100% !important;
  overflow-y:auto !important;
}

body.open-forum-page{
  display:block !important;
  height:auto !important;
  min-height:100vh !important;
  overflow-y:visible !important;
}

body.open-forum-page main.of-wrap{
  display:block !important;
  flex:none !important;
  width:100% !important;
  max-width:1000px !important;
  min-height:auto !important;
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
}

.top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px 14px;
  border-bottom:1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
}

.top .brand{display:flex; gap:12px; align-items:center}
.top .logo{
  width:44px;height:44px;border-radius:14px;
  display:grid;place-items:center;
  background:rgba(55,255,107,.12);
  border:1px solid rgba(55,255,107,.22);
}
.top .site{font-weight:700}
.top .page{color:var(--muted); font-size:.92rem}
.top .toggles{display:flex; gap:8px; flex-wrap:wrap}

.chip{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.25);
  color:var(--text);
  border-radius:999px;
  padding:8px 10px;
  cursor:pointer;
}

.card{
  background:var(--card);
  border:1px solid rgba(255,255,255,.08);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  padding:18px;
  margin-top:16px;
}

.hero h1{margin:0 0 8px; font-size:1.7rem}
.hero p{margin:0 0 14px; color:var(--muted); line-height:1.5}

.ctaRow{display:flex; gap:10px; flex-wrap:wrap}
.btn{
  border:none;
  border-radius:14px;
  padding:12px 14px;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.primary{
  background:rgba(55,255,107,.18);
  color:var(--text);
  border:1px solid rgba(55,255,107,.35);
}
.ghost{
  background:rgba(0,0,0,.18);
  color:var(--text);
  border:1px solid rgba(255,255,255,.14);
}

.miniRow{display:flex; gap:8px; flex-wrap:wrap; margin-top:14px}
.pill{
  padding:7px 10px;
  border-radius:999px;
  background:rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.10);
  color:var(--muted);
  font-size:.9rem;
}

.cardHead{display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap}
.cardHead h2{margin:0; font-size:1.15rem}
.sub{color:var(--muted); font-size:.92rem}
.lock{
  font-size:.85rem;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.20);
  color:var(--muted);
}

.postPreview{display:grid; grid-template-columns: 260px 1fr; gap:14px; margin-top:14px}
.thumb{
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(135deg, rgba(55,255,107,.12), rgba(0,0,0,.25));
  min-height:170px;
  display:flex;
  padding:12px;
}
.thumbInner{
  border-radius:14px;
  border:1px dashed rgba(255,255,255,.16);
  flex:1;
  display:grid;
  place-items:center;
  text-align:center;
  color:var(--muted);
}
.play{
  width:44px;height:44px;border-radius:999px;
  display:grid;place-items:center;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.25);
  margin-bottom:8px;
}

.meta{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px}
.tag{
  font-size:.82rem;
  padding:5px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  color:var(--muted);
}

.postBody h3{margin:0 0 6px}
.postBody p{margin:0; color:var(--muted); line-height:1.5}
.postActions{display:flex; gap:8px; margin-top:12px; flex-wrap:wrap}
.iconBtn{
  padding:9px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  color:var(--muted);
}

.channels{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
  margin-top:12px;
}
.channel{
  padding:14px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.20);
  color:var(--text);
  font-weight:800;
  cursor:pointer;
}
.channel:hover{border-color: rgba(55,255,107,.35)}

.sealed{
  margin-top:14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.20);
  padding:14px;
}
.sealedTitle{font-weight:800}
.sealedBody{color:var(--muted); margin-top:6px}
.sealedGrid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
  margin-top:12px;
}
.sealedCard{
  padding:16px 12px;
  border-radius:14px;
  border:1px dashed rgba(255,255,255,.14);
  color:var(--muted);
  background:rgba(0,0,0,.14);
  text-align:center;
}

.poll{display:grid; gap:8px; margin-top:12px}
.poll label{
  display:flex; gap:10px; align-items:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.16);
  cursor:pointer;
}
.pollActions{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:8px}
.hint{color:var(--muted); font-size:.92rem}

.notify{
  display:flex; gap:10px; flex-wrap:wrap;
  margin-top:12px;
}
.notify input{
  flex:1;
  min-width:240px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.20);
  color:var(--text);
}
.fine{color:var(--muted); margin-top:10px; font-size:.92rem}

.foot{
  margin-top:18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  color:var(--muted);
}

@media (max-width: 800px){
  .postPreview{grid-template-columns:1fr}
  .channels{grid-template-columns: repeat(2, 1fr)}
  .sealedGrid{grid-template-columns:1fr}
}

/* ===== Open Forum header: match site header + keep dropdown clickable ===== */
header { position: relative; z-index: 99990; overflow: visible !important; }
.header-right { position: relative; z-index: 99991; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.user-menu { position: relative; z-index: 99992; overflow: visible !important; }
.of-toggles { display: flex; gap: 8px; align-items: center; }

/* On small screens, let toggles wrap nicely */
@media (max-width: 768px){
  .of-toggles { width: 100%; justify-content: flex-end; }
}

.of-controls{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}

/* ---------- Poster console + modal ---------- */
.hidden{ display:none !important; }

.poster-console .posterRow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:10px;
}

.draftList{
  margin-top:12px;
  display:grid;
  gap:10px;
}

.draftItem{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  border-radius:14px;
  padding:12px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.draftMeta{
  min-width:240px;
}
.draftMeta b{ display:block; margin-bottom:4px; }
.draftMeta .fine{ margin-top:4px; }

.draftActions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.modal{
  position:fixed;
  inset:0;
  z-index:999999;
  display:grid;
  place-items:center;
  padding:18px;
}
.modalBackdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.65);
}
.modalCard{
  position:relative;
  width:min(720px, 100%);
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(10,14,15,.96);
  box-shadow: 0 20px 70px rgba(0,0,0,.7);
  padding:16px;
}
.modalHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}
.modalHead h3{ margin:0; }
.modalX{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.20);
  color:var(--text);
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
}

.ofForm label{
  display:block;
  margin-top:10px;
  color:var(--muted);
  font-weight:700;
}
.ofForm input[type="url"],
.ofForm select,
.ofForm textarea{
  width:100%;
  margin-top:6px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.20);
  color:var(--text);
  outline:none;
}
.ofForm textarea{ resize:vertical; }

.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
@media (max-width: 640px){
  .grid2{ grid-template-columns:1fr; }
}

.checkRow{
  display:flex !important;
  gap:10px;
  align-items:center;
  font-weight:700;
}
.checkRow input{ width:auto; margin-top:0; }

.modalActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

/* ---------- Poll admin ---------- */
.pollAdmin label{
  display:block;
  margin-top:10px;
  color:var(--muted);
  font-weight:800;
}
.pollAdmin input,
.pollAdmin textarea{
  width:100%;
  margin-top:6px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.20);
  color:var(--text);
}

/* ---------- Channel feed ---------- */
.ofFeed{ display:grid; gap:12px; margin-top:12px; }
.ofPost{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  border-radius:16px;
  padding:12px;
}
.ofPostTop{ display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.ofAuthor{ font-weight:900; }
.ofMeta{ color:var(--muted); font-size:.9rem; }
.ofText{ margin-top:8px; color:var(--text); line-height:1.5; }
.ofMedia{ margin-top:10px; }
.ofMedia img, .ofMedia video{ width:100%; border-radius:14px; border:1px solid rgba(255,255,255,.10); background:#000; }
.ofLink{ color:var(--text); text-decoration:underline; word-break:break-word; }
.ofActions{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }

.ofCount{
  display:inline-block;
  min-width:18px;
  margin-left:6px;
  padding:2px 6px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
  color:var(--text);
  font-weight:800;
  font-size:.8rem;
}

.ofComments{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,.10);
}

.commentList{
  display:grid;
  gap:8px;
  margin-bottom:10px;
}

.commentItem{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.14);
  border-radius:12px;
  padding:10px;
}

.commentItem b{ display:block; margin-bottom:4px; }

.commentForm textarea{
  width:100%;
  margin-top:6px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.20);
  color:var(--text);
  resize:vertical;
}

.commentActions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:8px;
}

.ofHighlight{
  outline:2px solid rgba(55,255,107,.35);
  box-shadow: 0 0 0 6px rgba(55,255,107,.08);
}

/* Nested comment layout */
.commentItem{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.14);
  border-radius:12px;
  padding:10px;
}

.commentIndent{
  margin-left:18px;
  border-left:2px solid rgba(255,255,255,.08);
  padding-left:12px;
  margin-top:8px;
}

.commentActionsRow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:8px;
}

.commentBtn{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  color:var(--text);
  border-radius:10px;
  padding:6px 10px;
  cursor:pointer;
  font-weight:800;
  font-size:.85rem;
}

.commentBtn.active{
  border-color: rgba(55,255,107,.35);
  box-shadow: 0 0 0 3px rgba(55,255,107,.10);
}

.gifPreview{
  margin-top:8px;
}
.gifPreview img{
  max-width:260px;
  width:100%;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
}

.emojiRow{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:8px;
}
.emojiBtn{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  color:var(--text);
  border-radius:10px;
  padding:6px 8px;
  cursor:pointer;
}

/* Owner-only controls (hidden by default) */
[data-owner-only="1"] { display: none; }

/* Show owner-only controls only when JS marks the post as owned */
.ofPost[data-is-owner="1"] [data-owner-only="1"] { display: inline-flex; }

/* FB-style reply mention */
.replyLine{ line-height:1.45; }
.replyTo{
  color: var(--accent);
  font-weight: 900;
  margin-right: 6px;
  cursor: default;
}
.replyHint{
  color: var(--muted);
  font-size: .86rem;
  margin-bottom: 6px;
}

.commentAuthor, .replyTo{
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}
.commentAuthor:hover, .replyTo:hover{
  text-decoration: underline;
}

.ofEditBox{
  margin-top: 10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.16);
  border-radius:14px;
  padding:10px;
}

.ofEditBox textarea{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.20);
  color:var(--text);
  resize:vertical;
}

.ofEditActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
  align-items:center;
}

.ofEditMsg{
  color:var(--muted);
  font-size:.9rem;
}

/* Comment owner-only controls */
[data-comment-owner-only="1"]{ display:none; }

/* Only show owner-only controls inside THIS comment's own action row/menu,
   not inside nested reply comments */
.commentItem[data-is-comment-owner="1"] > .commentActionsRow [data-comment-owner-only="1"]{
  display:inline-flex;
}

/* (If your 3-dot menu uses a .commentMenu container, this will cover it too) */
.commentItem[data-is-comment-owner="1"] > .commentMenu [data-comment-owner-only="1"]{
  display:block;
}

/* --- Comment actions: FB-style (clean) --- */
.commentItem{ position:relative; }

.commentMore{
  position:absolute;
  top:10px;
  right:10px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
  color:var(--text);
  border-radius:10px;
  padding:6px 10px;
  cursor:pointer;
  opacity:0;
  pointer-events:none;
}

.commentItem:hover .commentMore{
  opacity:1;
  pointer-events:auto;
}

.commentMenu{
  position:absolute;
  top:42px;
  right:10px;
  z-index:50;
  min-width:180px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.92);
  border-radius:12px;
  padding:6px;
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
}

.commentMenu.hidden{ display:none !important; }

.commentMenu button{
  width:100%;
  text-align:left;
  border:none;
  background:transparent;
  color:var(--text);
  padding:10px 10px;
  border-radius:10px;
  cursor:pointer;
  font-weight:800;
}

.commentMenu button:hover{
  background:rgba(255,255,255,.06);
}

.commentMenu .danger{ color:#ff6b6b; }

/* ---------- Channel cards / The Crypt Shop glow ---------- */
.channel{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  text-align:left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.channelName{
  display:block;
  font-weight:900;
  font-size:1rem;
}
.channelSub{
  display:block;
  color:var(--muted);
  font-size:.88rem;
  line-height:1.35;
  font-weight:600;
}
.channel:hover{
  transform:translateY(-1px);
  border-color: rgba(55,255,107,.35);
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}
.channel.is-active{
  border-color: rgba(55,255,107,.45);
  background: linear-gradient(180deg, rgba(55,255,107,.14), rgba(0,0,0,.22));
  box-shadow: 0 0 0 1px rgba(55,255,107,.10), 0 12px 34px rgba(0,0,0,.32);
}
.channel.cryptShop{
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(255,255,255,.04), transparent 45%),
    linear-gradient(180deg, rgba(87,35,113,.18), rgba(0,0,0,.22));
}

/* ---------- Sealed preview badges ---------- */
.sealedBadges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}
.sealedBadge{
  padding:7px 10px;
  border-radius:999px;
  background:rgba(55,255,107,.10);
  border:1px solid rgba(55,255,107,.24);
  color:var(--text);
  font-size:.84rem;
  font-weight:800;
}

/* ---------- Channel-specific vibe ---------- */
body[data-channel-theme="2"] .hero.card{
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(164, 91, 255, .10), transparent 45%),
    linear-gradient(180deg, rgba(55,255,107,.05), rgba(0,0,0,.18));
  border-color: rgba(164, 91, 255, .22);
}

body[data-channel-theme="2"] .ofPost{
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(164,91,255,.08), transparent 45%),
    rgba(0,0,0,.18);
}

body[data-channel-theme="2"] .tag{
  border-color: rgba(164,91,255,.24);
  background: rgba(164,91,255,.08);
  color: #dfd1ff;
}

/* ---------- Selected file chips ---------- */
.ofSelectedFiles{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.selectedFileChip{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(55,255,107,.10);
  border:1px solid rgba(55,255,107,.24);
  color:var(--text);
  font-size:.84rem;
  font-weight:800;
}

/* ---------- Multi-image gallery ---------- */
.ofMediaLink{
  display:block;
}
.ofGallery{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
  margin-top:10px;
}
.ofGalleryItem{
  display:block;
  text-decoration:none;
}
.ofGalleryItem img{
  width:100%;
  aspect-ratio:1 / 1;
  object-fit:cover;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:#000;
  display:block;
}

@media (max-width: 640px){
  .ofGallery{
    grid-template-columns:1fr;
  }
}

/* ---------- Admin-only post controls ---------- */
[data-admin-only="1"]{
  display:none;
}
body[data-of-admin="1"] [data-admin-only="1"]{
  display:inline-flex;
}

/* ---------- Preserve readable forum text + clickable inline links ---------- */
.ofText,
.commentText{
  line-height:1.65;
  word-break:break-word;
}

.textLink{
  color:#9fdcff;
  text-decoration:underline;
  text-underline-offset:2px;
  word-break:break-word;
}

.textLink:hover{
  opacity:.9;
}

/* ---------- Better main post link button ---------- */
.ofLinkRow{
  margin-top:10px;
}

.ofLinkBtn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:9px 14px;
  border-radius:12px;
  text-decoration:none;
  color:var(--text);
  border:1px solid rgba(55,255,107,.30);
  background:rgba(55,255,107,.10);
  font-weight:800;
}

.ofLinkBtn:hover{
  border-color:rgba(55,255,107,.45);
  background:rgba(55,255,107,.16);
}

/* ---------- Comment link preview card ---------- */
.replyText{
  display:inline;
}

.commentLinkCard{
  margin-top:10px;
  display:grid;
  grid-template-columns:100px 1fr;
  gap:12px;
  text-decoration:none;
  color:var(--text);
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  border-radius:14px;
  overflow:hidden;
  transition:border-color .18s ease, background .18s ease, transform .18s ease;
}

.commentLinkCard:hover{
  border-color:rgba(55,255,107,.35);
  background:rgba(55,255,107,.08);
  transform:translateY(-1px);
}

.commentLinkCardThumb{
  min-height:100px;
  background:rgba(0,0,0,.25);
  display:flex;
  align-items:center;
  justify-content:center;
}

.commentLinkCardThumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.commentLinkCardThumb.is-placeholder{
  font-size:2rem;
  color:var(--muted);
}

.commentLinkCardBody{
  min-width:0;
  padding:12px 12px 12px 0;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.commentLinkCardHost{
  font-size:.75rem;
  letter-spacing:.05em;
  color:var(--muted);
  text-transform:uppercase;
  font-weight:900;
  margin-bottom:4px;
}

.commentLinkCardTitle{
  font-weight:900;
  line-height:1.35;
}

.commentLinkCardUrl{
  margin-top:6px;
  font-size:.82rem;
  color:var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body[data-channel-theme="2"] .commentLinkCard{
  border-color:rgba(164,91,255,.22);
  background:rgba(164,91,255,.07);
}

body[data-channel-theme="2"] .commentLinkCard:hover{
  border-color:rgba(164,91,255,.36);
  background:rgba(164,91,255,.12);
}

@media (max-width: 640px){
  .commentLinkCard{
    grid-template-columns:84px 1fr;
  }

  .commentLinkCardThumb{
    min-height:84px;
  }
}

/* ---------- Comment image upload + richer preview card ---------- */
.commentExtraWrap{
  margin-top:8px;
}

.commentExtraWrap input[type="text"],
.commentExtraWrap input[type="url"],
.commentExtraWrap input[type="file"],
.commentExtraWrap textarea{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.20);
  color:var(--text);
  margin-top:6px;
}

.commentImageSelected{
  margin-top:8px;
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(55,255,107,.10);
  border:1px solid rgba(55,255,107,.24);
  color:var(--text);
  font-size:.84rem;
  font-weight:800;
}

.replyText{
  display:inline;
}

.commentLinkCard{
  margin-top:10px;
  display:grid;
  grid-template-columns:110px 1fr;
  gap:12px;
  text-decoration:none;
  color:var(--text);
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  border-radius:14px;
  overflow:hidden;
  transition:border-color .18s ease, background .18s ease, transform .18s ease;
}

.commentLinkCard:hover{
  border-color:rgba(55,255,107,.35);
  background:rgba(55,255,107,.08);
  transform:translateY(-1px);
}

.commentLinkCardThumb{
  min-height:110px;
  background:rgba(0,0,0,.25);
  display:flex;
  align-items:center;
  justify-content:center;
}

.commentLinkCardThumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.commentLinkCardThumb.is-placeholder{
  font-size:2rem;
  color:var(--muted);
}

.commentLinkCardBody{
  min-width:0;
  padding:12px 12px 12px 0;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.commentLinkCardHost{
  font-size:.75rem;
  letter-spacing:.05em;
  color:var(--muted);
  text-transform:uppercase;
  font-weight:900;
  margin-bottom:4px;
}

.commentLinkCardTitle{
  font-weight:900;
  line-height:1.35;
}

.commentLinkCardDesc{
  margin-top:6px;
  color:var(--muted);
  line-height:1.45;
  font-size:.92rem;
}

.commentLinkCardUrl{
  margin-top:8px;
  font-size:.82rem;
  color:var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body[data-channel-theme="2"] .commentLinkCard{
  border-color:rgba(164,91,255,.22);
  background:rgba(164,91,255,.07);
}

body[data-channel-theme="2"] .commentLinkCard:hover{
  border-color:rgba(164,91,255,.36);
  background:rgba(164,91,255,.12);
}

@media (max-width: 640px){
  .commentLinkCard{
    grid-template-columns:84px 1fr;
  }

  .commentLinkCardThumb{
    min-height:84px;
  }
}

/* ---------- Featured post should use the same card look as channel posts ---------- */
.featured .ofFeed{
  margin-top:14px;
}

.featuredPostCard{
  margin-top:0;
}

.featuredPostCard .ofText{
  margin-top:10px;
}

.featuredPostCard .ofMedia{
  margin-top:12px;
}

.featuredPostCard .ofMedia img,
.featuredPostCard .ofMedia video{
  width:100%;
  max-height:420px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:#000;
  display:block;
}

.featuredPostCard .ofGallery{
  margin-top:0;
}

.featuredPostCard .postActions{
  margin-top:14px;
}

.featuredPostCard.hidden{
  display:none !important;
}

/* ---------- Weekly poll cards ---------- */
.pollChoices{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin-top:14px;
}

.pollChoice{
  display:block;
  cursor:pointer;
}

.pollChoice input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.pollChoiceCard{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  border-radius:16px;
  overflow:hidden;
  transition:border-color .18s ease, transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.pollChoice:hover .pollChoiceCard{
  transform:translateY(-1px);
  border-color:rgba(55,255,107,.35);
  box-shadow:0 10px 28px rgba(0,0,0,.28);
}

.pollChoice.is-selected .pollChoiceCard{
  border-color:rgba(55,255,107,.45);
  background:linear-gradient(180deg, rgba(55,255,107,.12), rgba(0,0,0,.22));
  box-shadow:0 0 0 1px rgba(55,255,107,.10), 0 12px 34px rgba(0,0,0,.32);
}

.pollChoiceThumb{
  width:100%;
  aspect-ratio:1 / 1;
  background:rgba(0,0,0,.22);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.pollChoiceThumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.pollChoicePlaceholder{
  font-size:2rem;
  color:var(--muted);
}

.pollChoiceBody{
  padding:12px;
}

.pollChoiceLabel{
  font-weight:900;
  line-height:1.35;
}

.pollChoiceResult{
  margin-top:10px;
}

.pollBar{
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
}

.pollBar span{
  display:block;
  height:100%;
  width:0%;
  background:linear-gradient(90deg, rgba(55,255,107,.75), rgba(164,91,255,.75));
}

.pollNums{
  margin-top:6px;
  font-size:.85rem;
  color:var(--muted);
}

.pollWinner{
  color:var(--accent);
  font-weight:900;
}

/* ---------- Admin poll builder ---------- */
.pollAdminTools{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:12px;
}

.pollAdminChoices{
  display:grid;
  gap:12px;
  margin-top:12px;
}

.pollOptionRow{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.16);
  border-radius:16px;
  padding:12px;
}

.pollOptionRowTop{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.pollOptionRowTitle{
  font-weight:900;
}

.pollOptionGrid{
  display:grid;
  grid-template-columns:1fr 180px;
  gap:12px;
  align-items:start;
}

.pollOptionGrid label{
  display:block;
  color:var(--muted);
  font-weight:800;
}

.pollOptionGrid input[type="text"],
.pollOptionGrid input[type="file"]{
  width:100%;
  margin-top:6px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.20);
  color:var(--text);
}

.pollOptionPreview{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  border-radius:14px;
  overflow:hidden;
  min-height:140px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.pollOptionPreview img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.pollOptionPreviewEmpty{
  color:var(--muted);
  font-size:.9rem;
  text-align:center;
  padding:14px;
}

.pollOptionMeta{
  margin-top:8px;
  color:var(--muted);
  font-size:.84rem;
}

@media (max-width: 700px){
  .pollChoices{
    grid-template-columns:1fr;
  }

  .pollOptionGrid{
    grid-template-columns:1fr;
  }
}

/* ---------- Poll admin action emphasis ---------- */
#pollDeleteBtn{
  border-color: rgba(255,107,107,.32);
  color: #ffd0d0;
}

#pollDeleteBtn:hover{
  background: rgba(255,107,107,.12);
  border-color: rgba(255,107,107,.46);
}

/* ---------- Featured badge should stay a pill, not a circle ---------- */
#featuredBadge{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  align-self:flex-start !important;

  width:auto !important;
  min-width:0 !important;
  max-width:none !important;

  height:auto !important;
  min-height:0 !important;
  max-height:none !important;

  aspect-ratio:auto !important;
  padding:5px 10px !important;
  border-radius:999px !important;

  white-space:nowrap !important;
  line-height:1 !important;
  flex:0 0 auto !important;
}