/*
 * community.css — the homepage "Prompt Library" community feed.
 * Glassy dark cards that sit well on the night-sky background, styled from the
 * design tokens. Scoped under #dp-community / .dpc-* so nothing else is touched.
 */

#dp-community { display: block; width: 100%; }

.dpc-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) var(--s-6, 24px) 64px;
}

/* ── header ── */
.dpc-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.dpc-title {
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-weight: 800; letter-spacing: -0.03em; margin: 0;
  color: #eaf1ff;
}
.dpc-sub { margin: 4px 0 0; color: #9fb0cf; font-size: 0.92rem; max-width: 48ch; }

.dpc-publish-btn {
  flex: 0 0 auto;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff; border: 0; border-radius: 12px;
  padding: 10px 16px; font-weight: 700; font-size: 0.92rem; cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.dpc-publish-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(37, 99, 235, 0.5); }
.dpc-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dpc-fullfeed-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16);
  color: #dbe5f8; border-radius: 12px; padding: 10px 16px; font-weight: 700; font-size: 0.9rem;
  text-decoration: none; transition: background .15s, border-color .15s;
}
.dpc-fullfeed-btn:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(96, 165, 250, 0.5); color: #fff; }
.dpc-profile-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16);
  color: #dbe5f8; border-radius: 12px; padding: 10px 16px; font-weight: 700; font-size: 0.9rem;
  transition: background .15s, border-color .15s;
}
.dpc-profile-btn:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(96, 165, 250, 0.5); color: #fff; }
.dpc-quote-of {
  font-size: 0.84rem; color: #9fb0cf; background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid rgba(96, 165, 250, 0.5); border-radius: 6px; padding: 8px 12px; margin: 0 0 6px;
}
.dpc-quote-of b { color: #d8e3fa; }

/* ── controls ── */
.dpc-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 18px;
}
.dpc-tabs { display: flex; gap: 7px; flex-wrap: wrap; }
.dpc-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #c4d2ec; border-radius: 999px;
  padding: 6px 13px; font-size: 0.82rem; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.dpc-tab:hover { background: rgba(255, 255, 255, 0.09); color: #eaf1ff; }
.dpc-tab.is-on { background: #2563eb; border-color: #2563eb; color: #fff; }

.dpc-sort { display: inline-flex; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 10px; padding: 3px; }
.dpc-sortbtn { background: none; border: 0; color: #9fb0cf; font-weight: 700; font-size: 0.82rem; padding: 5px 12px; border-radius: 8px; cursor: pointer; }
.dpc-sortbtn.is-on { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ── list / cards ── */
/* 3-up grid so posts read side-by-side (3 across), wrapping to new rows. */
.dpc-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  grid-auto-rows: 1fr;   /* every card the same height */
}
@media (max-width: 980px) { .dpc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .dpc-list { grid-template-columns: 1fr; } }

.dpc-card {
  display: flex;
  flex-direction: column;
  background: rgba(17, 23, 41, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 16px 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  transition: border-color .15s, transform .15s, box-shadow .15s;
  cursor: pointer;
}
.dpc-card:hover { border-color: rgba(96, 165, 250, 0.4); transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34); }
.dpc-card:focus-visible { outline: 2px solid rgba(96, 165, 250, 0.7); outline-offset: 2px; }
/* uniform cards: clamp the title to 2 lines and pin the action row to the bottom */
.dpc-list .dpc-card-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dpc-list .dpc-actions { margin-top: auto; }

.dpc-repost-flag { font-size: 0.76rem; color: #8aa0c6; margin-bottom: 8px; }

.dpc-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; row-gap: 6px; }
.dpc-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.9rem;
  overflow: hidden;
}
.dpc-avatar svg, .dpc-cavatar svg { width: 100%; height: 100%; display: block; }
.dpc-av-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-weight: 800; }
.dpc-meta { display: flex; align-items: baseline; gap: 6px; min-width: 0; flex: 1 1 auto; }
.dpc-handle { color: #eaf1ff; font-weight: 700; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: calc(100% - 60px); }
.dpc-dot { color: #5e6f8e; flex: 0 0 auto; }
.dpc-time { color: #8aa0c6; font-size: 0.8rem; flex: 0 0 auto; }
.dpc-badges { display: flex; gap: 5px; flex-wrap: wrap; flex: 0 0 auto; align-self: center; }
.dpc-badge {
  font-size: 0.72rem; font-weight: 600; color: #b9c8e6;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px; padding: 2px 8px; white-space: nowrap;
}
.dpc-badge-model { color: #aaccff; border-color: rgba(96, 165, 250, 0.35); background: rgba(37, 99, 235, 0.14); }

.dpc-card-title { margin: 2px 0 4px; font-size: 1.05rem; font-weight: 700; color: #f3f7ff; letter-spacing: -0.01em; }
.dpc-card-meta { margin: 0 0 10px; color: #9fb0cf; font-size: 0.86rem; line-height: 1.5; }

.dpc-body {
  margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem; line-height: 1.55; color: #cdd9f0;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px; padding: 12px 14px; overflow: hidden;
  max-width: 100%; min-width: 0;
}
.dpc-body[data-collapsed="1"] { max-height: 140px; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.dpc-body[data-collapsed="0"] { max-height: none; -webkit-mask-image: none; mask-image: none; }
/* Imageless cards waste the space an image would fill — let the prompt body grow
   into it (cards are equal-height via grid-auto-rows:1fr), so more of the prompt
   shows. Capped at 60vh, fade only the last strip. */
.dpc-list .dpc-body--fill[data-collapsed="1"] {
  flex: 1 1 auto; max-height: 60vh; min-height: 140px;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 52px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 52px), transparent);
}

/* ── actions ── */
.dpc-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.dpc-vote { display: inline-flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 999px; padding: 2px 4px; }
.dpc-vbtn { background: none; border: 0; color: #9fb0cf; cursor: pointer; font-size: 0.78rem; width: 26px; height: 26px; border-radius: 50%; transition: color .12s, background .12s; }
.dpc-vbtn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.dpc-up.is-on { color: #4ade80; }
.dpc-down.is-on { color: #f87171; }
.dpc-score { min-width: 24px; text-align: center; font-weight: 700; font-size: 0.82rem; color: #dce6fa; }

.dpc-abtn {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.10);
  color: #b9c8e6; border-radius: 999px; padding: 5px 11px; font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.dpc-abtn:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.dpc-abtn.is-on { color: #6ee7a8; border-color: rgba(74, 222, 128, 0.4); }

/* ── comments ── */
.dpc-comments { margin-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 12px; }
.dpc-cspin, .dpc-empty-sm { color: #8aa0c6; font-size: 0.84rem; }
.dpc-clist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.dpc-comment { display: flex; gap: 9px; }
.dpc-cavatar { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 0.72rem; overflow: hidden; }
.dpc-cbody { min-width: 0; }
.dpc-chandle { color: #eaf1ff; font-weight: 700; font-size: 0.82rem; }
.dpc-ctime { color: #7c8db0; font-size: 0.74rem; margin-left: 4px; }
.dpc-ctext { color: #c8d4ec; font-size: 0.86rem; line-height: 1.5; margin-top: 2px; word-break: break-word; }
.dpc-cform { display: flex; gap: 8px; }
.dpc-cinput {
  flex: 1; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px; padding: 8px 12px; color: #eaf1ff; font-size: 0.86rem;
}
.dpc-cinput:focus { outline: none; border-color: #3b82f6; }
.dpc-csend { background: #2563eb; color: #fff; border: 0; border-radius: 9px; padding: 8px 16px; font-weight: 700; font-size: 0.84rem; cursor: pointer; }
.dpc-csend:disabled { opacity: 0.6; cursor: default; }

/* ── states ── */
.dpc-empty { text-align: center; color: #8aa0c6; padding: 40px 16px; font-size: 0.92rem; }
.dpc-more-wrap { text-align: center; margin-top: 22px; }
.dpc-more {
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14);
  color: #dbe5f8; border-radius: 11px; padding: 10px 22px; font-weight: 700; font-size: 0.88rem; cursor: pointer;
}
.dpc-more:hover { background: rgba(255, 255, 255, 0.1); }
.dpc-skeleton { height: 150px; border-radius: 16px; background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%); background-size: 200% 100%; animation: dpc-shimmer 1.4s infinite; margin-bottom: 14px; }
@keyframes dpc-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── publish modal ── */
.dpc-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(3, 6, 16, 0.66); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 18px;
}
.dpc-modal {
  width: min(620px, 100%); max-height: 90vh; overflow-y: auto;
  background: #0f1628; border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px; padding: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.dpc-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dpc-modal-head h3 { margin: 0; color: #f3f7ff; font-size: 1.15rem; font-weight: 800; }
.dpc-modal-x { background: none; border: 0; color: #9fb0cf; font-size: 1.05rem; cursor: pointer; }
.dpc-l { display: block; color: #aebcd8; font-size: 0.8rem; font-weight: 600; margin: 12px 0 5px; }
.dpc-in, .dpc-ta {
  width: 100%; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px; padding: 10px 12px; color: #eaf1ff; font-size: 0.9rem; font-family: inherit;
}
.dpc-in:focus, .dpc-ta:focus { outline: none; border-color: #3b82f6; }
.dpc-ta { min-height: 150px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.84rem; line-height: 1.5; }

/* Preview-image upload control (composer) */
.dpc-upload { display: flex; align-items: center; gap: 10px; }
.dpc-upload-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 0.85rem;
  padding: 9px 14px; border-radius: 10px; color: #eaf1ff;
  border: 1px dashed rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dpc-upload-btn:hover { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.07); }
.dpc-upload-btn:disabled { opacity: 0.6; cursor: progress; }
.dpc-upload-preview {
  position: relative; width: 96px; height: 60px; border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.dpc-upload-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dpc-upload-rm {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; padding: 0;
  border: none; border-radius: 50%; cursor: pointer; line-height: 1; font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.6); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.dpc-upload-rm:hover { background: rgba(0, 0, 0, 0.85); }
.dpc-upload-url { margin-top: 8px; }
html:not(.dark-mode) .dpc-upload-btn { color: #1a2433; border-color: rgba(0, 0, 0, 0.2); background: rgba(0, 0, 0, 0.03); }
html:not(.dark-mode) .dpc-upload-btn:hover { border-color: rgba(0, 0, 0, 0.35); background: rgba(0, 0, 0, 0.06); }
.dpc-frow { display: flex; gap: 12px; }
.dpc-frow > div { flex: 1; }
.dpc-modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.dpc-cancel { background: none; border: 1px solid rgba(255, 255, 255, 0.16); color: #c4d2ec; border-radius: 10px; padding: 9px 18px; font-weight: 700; cursor: pointer; }
.dpc-submit { background: linear-gradient(135deg, #2563eb, #3b82f6); border: 0; color: #fff; border-radius: 10px; padding: 9px 22px; font-weight: 800; cursor: pointer; }
.dpc-submit:disabled { opacity: 0.6; cursor: default; }

/* ── glassy post detail window (opened by clicking a feed card) ── */
.dpc-modal--post {
  position: relative;
  width: min(680px, 100%);
  background: rgba(15, 22, 40, 0.86);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 18px 20px;
}
.dpc-post-x {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 9px; background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14); color: #cdd9f0;
  font-size: 0.95rem; line-height: 1; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.dpc-post-x:hover { background: rgba(255, 255, 255, 0.13); border-color: rgba(96, 165, 250, 0.5); color: #fff; }
/* the post inside the window is borderless/transparent — the window IS the card */
.dpc-card--modal {
  background: transparent; border: 0; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  padding: 0; cursor: default;
}
.dpc-card--modal:hover { transform: none; box-shadow: none; border-color: transparent; }
.dpc-card--modal .dpc-card-head { padding-right: 40px; }
.dpc-card--modal .dpc-card-title { font-size: 1.2rem; }
.dpc-card--modal .dpc-preview { display: block; max-width: 100%; }
.dpc-card--modal .dpc-preview img { width: 100%; height: auto; max-height: 340px; }
.dpc-card--modal .dpc-preview:hover img { transform: none; }
.dpc-card--modal .dpc-mini-canvas { height: 240px; }

/* ── credit note ── */
.dpc-credit-note {
  margin-top: 8px; font-size: 0.82rem; color: #aef0c0;
  background: rgba(74, 222, 128, 0.10); border: 1px solid rgba(74, 222, 128, 0.22);
  border-radius: 8px; padding: 5px 11px; display: inline-block;
}
.dpc-credit-note b { color: #d6ffe2; }
.dpc-credit-note-modal { display: block; margin: 0 0 14px; }

/* ── first-post welcome banner ── */
.dpc-fp-slot:empty { display: none; }
.dpc-fp-banner {
  position: relative;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 0 22px; padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(37, 99, 235, 0.22), rgba(168, 85, 247, 0.18));
  border: 1px solid rgba(96, 165, 250, 0.40);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.18);
}
.dpc-fp-ico { font-size: 1.7rem; line-height: 1; flex: 0 0 auto; }
.dpc-fp-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 280px; }
.dpc-fp-copy b { color: #eaf1ff; font-size: 0.98rem; font-weight: 800; letter-spacing: -0.01em; }
.dpc-fp-copy span { color: #c4d2ec; font-size: 0.86rem; }
.dpc-fp-copy span b { color: #aef0c0; font-weight: 800; }
.dpc-fp-cta {
  flex: 0 0 auto;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff; border: 0; border-radius: 12px;
  padding: 10px 16px; font-weight: 700; font-size: 0.9rem; cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.dpc-fp-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(37, 99, 235, 0.5); }
.dpc-fp-x {
  flex: 0 0 auto; background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16); color: #c4d2ec;
  width: 30px; height: 30px; border-radius: 9px; cursor: pointer; font-size: 0.82rem;
  transition: background .15s, color .15s;
}
.dpc-fp-x:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
@media (max-width: 560px) {
  .dpc-fp-banner { padding-right: 44px; }
  .dpc-fp-cta { flex: 1 1 100%; order: 3; }
  .dpc-fp-x { position: absolute; top: 12px; right: 12px; }
}
html:not(.dark-mode) .dpc-fp-banner {
  background: linear-gradient(120deg, rgba(37, 99, 235, 0.10), rgba(168, 85, 247, 0.08));
  border-color: rgba(37, 99, 235, 0.28); box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}
html:not(.dark-mode) .dpc-fp-copy b { color: #0f1117; }
html:not(.dark-mode) .dpc-fp-copy span { color: #334155; }
html:not(.dark-mode) .dpc-fp-copy span b { color: #166534; }
html:not(.dark-mode) .dpc-fp-x { color: #475569; border-color: rgba(15, 23, 42, 0.14); background: rgba(15, 23, 42, 0.04); }
html:not(.dark-mode) .dpc-fp-x:hover { background: rgba(15, 23, 42, 0.10); color: #0f1117; }

/* ── top-level kind tabs ── */
.dpc-kinds {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 13px;
}
.dpc-kind {
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.10);
  color: #c4d2ec; border-radius: 10px; padding: 8px 16px; font-size: 0.9rem; font-weight: 700;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.dpc-kind:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.dpc-kind.is-on { background: linear-gradient(135deg, #2563eb, #3b82f6); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35); }

.dpc-badge-kind { color: #d8c4ff; border-color: rgba(167, 139, 250, 0.40); background: rgba(124, 58, 237, 0.16); }

/* ── automation mini-canvas preview ── */
.dpc-mini-canvas {
  margin: 2px 0 10px; height: 184px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10); background: rgba(0, 0, 0, 0.28); overflow: hidden;
}
.dpc-mini-canvas svg { width: 100%; height: 100%; display: block; }
.dpc-opencanvas { color: #aaccff !important; border-color: rgba(96, 165, 250, 0.4) !important; background: rgba(37, 99, 235, 0.12) !important; }
.dpc-opencanvas:hover { background: rgba(37, 99, 235, 0.22) !important; color: #fff !important; }

/* ── design preview — gently zooms WITHIN its frame (clipped, never overflows
   into the neighbouring card) ── */
.dpc-preview {
  margin: 2px 0 10px;
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 0;
  position: relative;
  transition: border-color .28s ease, box-shadow .28s ease;
}
.dpc-preview img {
  width: 100%; height: 170px; display: block;
  object-fit: cover; cursor: zoom-in;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.dpc-preview:hover {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
}
.dpc-preview:hover img { transform: scale(1.06); }

@media (max-width: 560px) {
  .dpc-wrap { padding-left: 14px; padding-right: 14px; }
  .dpc-frow { flex-direction: column; gap: 0; }
  /* card header: avatar+handle+time on row 1, badges on row 2 below */
  .dpc-card-head { flex-wrap: wrap; row-gap: 6px; }
  .dpc-meta { flex: 1 1 auto; min-width: 0; }
  .dpc-badges { width: 100%; margin-left: 0; }
  .dpc-card { padding: 14px 14px; overflow: hidden; }
  .dpc-kind { padding: 7px 12px; font-size: 0.84rem; }
  .dpc-actions { gap: 6px; }
  .dpc-abtn { padding: 5px 9px; font-size: 0.78rem; }
  .dpc-vote { padding: 2px 3px; }
  .dpc-preview img { height: 140px; }
  .dpc-preview:hover img { transform: scale(1.03); }
  .dpc-mini-canvas { height: 150px; }
  .dpc-body { font-size: 0.78rem; padding: 10px 12px; }
  .dpc-handle { max-width: calc(100% - 50px); }
}

/* ── admin moderation controls (shown only to feed admins) ── */
.dpc-abtn.dpc-admin { border-color: rgba(245, 158, 11, 0.35); color: #fcd9a3; }
.dpc-abtn.dpc-admin:hover { background: rgba(245, 158, 11, 0.16); border-color: rgba(245, 158, 11, 0.6); color: #ffe9c7; }
.dpc-abtn.dpc-admin.dpc-danger { border-color: rgba(239, 68, 68, 0.35); color: #f6b0b0; }
.dpc-abtn.dpc-admin.dpc-danger:hover { background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.6); color: #ffd2d2; }
.dpc-submit.dpc-danger-btn { background: #dc2626; }
.dpc-submit.dpc-danger-btn:hover { background: #b91c1c; }

/* ════════════════════════════════════════════════════════════════════════
 * LIGHT MODE — the feed was authored dark-only (light text + white-alpha
 * surfaces designed for the night sky), so on the daytime sky the text and
 * controls vanished. These overrides flip the palette to readable light-mode
 * values. Scoped to html:not(.dark-mode) so dark mode is untouched.
 * ════════════════════════════════════════════════════════════════════════ */
html:not(.dark-mode) .dpc-title,
html:not(.dark-mode) .dpc-handle,
html:not(.dark-mode) .dpc-card-title,
html:not(.dark-mode) .dpc-chandle,
html:not(.dark-mode) .dpc-score,
html:not(.dark-mode) .dpc-modal-head h3,
html:not(.dark-mode) .dpc-quote-of b,
html:not(.dark-mode) .dpc-credit-note b { color: #0f1117; }

html:not(.dark-mode) .dpc-sub,
html:not(.dark-mode) .dpc-card-meta,
html:not(.dark-mode) .dpc-time,
html:not(.dark-mode) .dpc-dot,
html:not(.dark-mode) .dpc-sortbtn,
html:not(.dark-mode) .dpc-vbtn,
html:not(.dark-mode) .dpc-empty,
html:not(.dark-mode) .dpc-empty-sm,
html:not(.dark-mode) .dpc-cspin,
html:not(.dark-mode) .dpc-repost-flag,
html:not(.dark-mode) .dpc-ctext,
html:not(.dark-mode) .dpc-ctime,
html:not(.dark-mode) .dpc-l,
html:not(.dark-mode) .dpc-modal-x { color: #56627a; }

html:not(.dark-mode) .dpc-card {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(0, 0, 0, 0.09);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.08);
}
html:not(.dark-mode) .dpc-card:hover { border-color: rgba(37, 99, 235, 0.45); box-shadow: 0 14px 38px rgba(15, 23, 42, 0.14); }

html:not(.dark-mode) .dpc-tab,
html:not(.dark-mode) .dpc-sort,
html:not(.dark-mode) .dpc-kind,
html:not(.dark-mode) .dpc-badge,
html:not(.dark-mode) .dpc-abtn,
html:not(.dark-mode) .dpc-vote,
html:not(.dark-mode) .dpc-fullfeed-btn,
html:not(.dark-mode) .dpc-more,
html:not(.dark-mode) .dpc-cancel,
html:not(.dark-mode) .dpc-quote-of {
  background: rgba(0, 0, 0, 0.045);
  border-color: rgba(0, 0, 0, 0.10);
  color: #44506a;
}
html:not(.dark-mode) .dpc-tab:hover,
html:not(.dark-mode) .dpc-kind:hover,
html:not(.dark-mode) .dpc-abtn:hover,
html:not(.dark-mode) .dpc-more:hover,
html:not(.dark-mode) .dpc-vbtn:hover { background: rgba(0, 0, 0, 0.075); color: #0f1117; }

html:not(.dark-mode) .dpc-body,
html:not(.dark-mode) .dpc-cinput,
html:not(.dark-mode) .dpc-in,
html:not(.dark-mode) .dpc-ta,
html:not(.dark-mode) .dpc-mini-canvas {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.09);
  color: #1f2a3d;
}

html:not(.dark-mode) .dpc-comments,
html:not(.dark-mode) .dpc-kinds { border-color: rgba(0, 0, 0, 0.08); }
html:not(.dark-mode) .dpc-preview { border-color: rgba(0, 0, 0, 0.10); }

html:not(.dark-mode) .dpc-modal { background: #ffffff; border-color: rgba(0, 0, 0, 0.10); }
html:not(.dark-mode) .dpc-modal--post { background: rgba(255, 255, 255, 0.92); border-color: rgba(0, 0, 0, 0.10); }
html:not(.dark-mode) .dpc-modal-overlay { background: rgba(15, 23, 42, 0.45); }
html:not(.dark-mode) .dpc-post-x { background: rgba(0, 0, 0, 0.05); border-color: rgba(0, 0, 0, 0.12); color: #44506a; }

/* The blue/gradient .is-on states + accent badges already read well on light. */
html:not(.dark-mode) .dpc-credit-note { color: #15803d; background: rgba(34, 197, 94, 0.10); border-color: rgba(34, 197, 94, 0.30); }
html:not(.dark-mode) .dpc-credit-note b { color: #166534; }
html:not(.dark-mode) .dpc-badge { color: #44506a; }
html:not(.dark-mode) .dpc-badge-model { color: #1d4ed8; background: rgba(37, 99, 235, 0.10); border-color: rgba(37, 99, 235, 0.28); }
html:not(.dark-mode) .dpc-badge-kind { color: #6d28d9; background: rgba(124, 58, 237, 0.10); border-color: rgba(124, 58, 237, 0.28); }

/* ════════════════════════════════════════════════════════════════════════
 * IMAGE HOVER PREVIEW POPUP — shows the full image when hovering over a
 * .dpc-preview thumbnail. Floats near the cursor, auto-hides on mouseleave.
 * ════════════════════════════════════════════════════════════════════════ */
.dpc-hover-preview {
  position: fixed; z-index: 9999; display: none; pointer-events: none;
  max-width: min(420px, 80vw); max-height: min(360px, 70vh);
  border-radius: 12px; overflow: hidden;
  border: 2px solid rgba(96, 165, 250, 0.5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  background: rgba(15, 22, 40, 0.95);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: dpc-hp-in .15s ease-out;
}
.dpc-hover-preview img {
  display: block; max-width: 100%; max-height: min(360px, 70vh);
  object-fit: contain; border-radius: 10px;
}
@keyframes dpc-hp-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
/* Touch devices: disable hover preview (no hover state on mobile) */
@media (hover: none) { .dpc-hover-preview { display: none !important; } }
