/* Post cards copied from elonpulse.net style.css (tcard / musk-box / musk-comment / tcard-quote),
   scoped to .feed, plus full-media gallery + inline video. */
.feed {
  --ep-ink: #e8edf5; --ep-muted: #8b95a8; --ep-line: #2a3344; --ep-accent: #7dd3c0;
  --ep-orig: #7dd3c0; --ep-quote: #8ab4f8; --ep-rt: #c4b5fd;
}
.feed .feed-head {
  background: linear-gradient(180deg, #1d2740 0%, #151d2e 100%);
  border: 1px solid rgba(91,140,255,0.28); border-left: 4px solid var(--cat, #7dd3c0);
  border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; display: block;
}
.feed .feed-title { font-size: 1rem; font-weight: 800; color: var(--ep-ink); }
.feed .feed-src { font-size: 12px; color: var(--ep-muted); margin-top: 3px; }
.feed .feed-more { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--accent, #5b8cff); text-decoration: none; }

.feed .tcard-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.feed .tcard {
  background: linear-gradient(180deg, #243044 0%, #1c2433 100%);
  border: 1px solid #3a4a62; border-left: 3px solid var(--cat, var(--ep-accent));
  border-radius: 16px; padding: 12px 14px 10px;
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.3); color: var(--ep-ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}
.feed .tcard-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.feed .tcard-id { display: flex; gap: 10px; align-items: center; min-width: 0; }
.feed .tcard-ava {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px; background: #2a3344; overflow: hidden;
  display: grid; place-items: center;
}
.feed .tcard-ava img { width: 100%; height: 100%; object-fit: cover; }
.feed .tcard-id b { display: block; font-size: 14px; font-weight: 650; }
.feed .tcard-id span { font-size: 12px; color: var(--ep-muted); font-family: ui-sans-serif, system-ui, sans-serif; }
.feed .tcard-tags { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; }
.feed .tcard-date {
  margin-left: auto; flex-shrink: 0; font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 14px; font-weight: 700; color: var(--ep-ink); font-variant-numeric: tabular-nums;
}
.feed .badge {
  border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 4px 10px; font-family: ui-sans-serif, system-ui, sans-serif;
}
.feed .badge.orig { background: rgba(125,211,192,.15); color: var(--ep-orig); }
.feed .badge.quote { background: rgba(138,180,248,.15); color: var(--ep-quote); }
.feed .badge.rt { background: rgba(196,181,253,.15); color: var(--ep-rt); }
.feed .tcard-cat {
  font-size: 12px; font-weight: 700; letter-spacing: .03em; font-family: ui-sans-serif, system-ui, sans-serif;
  color: #0c0e12; background: var(--cat, #8b95a8); border-radius: 999px; padding: 4px 10px;
}
.feed .tcard-text { margin: 0; font-size: 15px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.feed .tcard-text.muted { color: var(--ep-muted); font-size: 13px; }
.feed .tcard-foot {
  display: flex; gap: 12px; align-items: center; margin-top: auto; flex-wrap: wrap;
  font-family: ui-sans-serif, system-ui, sans-serif; font-size: 12px; color: var(--ep-muted);
}
.feed .tcard-open {
  margin-left: auto; font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--ep-accent); color: var(--ep-accent); background: rgba(125,211,192,.12); text-decoration: none;
}
.feed .tcard-open:hover { background: rgba(125,211,192,.22); }

/* repost / quote: Musk box far left, original content tabbed in */
.feed .musk-box {
  display: flex; align-items: center; gap: 10px; align-self: stretch;
  margin: 0 8px 0 -6px; padding: 8px 10px;
  background: #243044; border: 1px solid #3a4a62; border-radius: 12px 12px 4px 12px;
  box-shadow: 0 1px 0 rgba(125,211,192,.18);
}
.feed .musk-time {
  margin-left: auto; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 12px; color: var(--ep-ink);
  font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0;
}
.feed .tcard-nested { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.feed .tcard-fx .tcard-nested {
  margin: -2px 0 0 28px; padding: 10px 12px 8px;
  background: rgba(8,10,14,.35); border: 1px solid var(--ep-line);
  border-left: 3px solid var(--ep-rt); border-radius: 0 12px 12px 12px;
}
.feed .tcard-quote-card .tcard-nested { border-left-color: var(--ep-quote); }
.feed .tcard-quote-card .musk-box { border-radius: 12px 12px 0 0; border-bottom: 0; box-shadow: none; }
.feed .musk-comment {
  display: block; margin: -10px 8px 8px -6px; padding: 8px 12px 12px;
  background: #243044; border: 1px solid #3a4a62; border-top: 0; border-radius: 0 0 12px 12px;
  font-size: 16px; line-height: 1.4; white-space: pre-wrap; word-break: break-word;
}
.feed .musk-comment[hidden] { display: none !important; }
.feed .musk-comment p { margin: 0; }
.feed .musk-comment .tmedia { margin-top: 10px; white-space: normal; }
.feed .tcard-quote {
  margin: 0; padding: 12px; background: #141821; border: 1px solid var(--ep-line);
  border-left: 3px solid var(--ep-quote); border-radius: 10px;
  font-size: 13.5px; color: #c5cddd; line-height: 1.4;
}
.feed .tcard-quote-who { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-family: ui-sans-serif, system-ui, sans-serif; }
.feed .tcard-quote-who img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.feed .tcard-quote-who b { font-size: 13px; color: var(--ep-ink); font-weight: 650; }
.feed .tcard-quote-who span { font-size: 12px; color: var(--ep-quote); }
.feed .tcard-quote-text { margin: 0 0 2px; white-space: pre-wrap; word-break: break-word; }
.feed .tcard-quote .tmedia { margin-top: 10px; }

/* media: full, natural aspect ratio, never cropped */
.feed .tmedia { display: grid; grid-template-columns: 1fr; gap: 6px; }
.feed .tmedia.tm-gallery { grid-template-columns: 1fr 1fr; align-items: start; }
.feed .tmedia.tm-n3 .tm-item:last-child { grid-column: 1 / -1; }
.feed .tm-item { display: block; border-radius: 12px; overflow: hidden; background: #0c0e12; }
.feed .tm-item img, .feed .tm-item video {
  display: block; width: 100%; height: auto; max-width: 100%; object-fit: contain; background: #000;
}
/* narrow screens: let the time wrap instead of overlapping the name */
.feed .musk-box, .feed .tcard-top { flex-wrap: wrap; row-gap: 4px; }
.feed .tcard-id { flex: 1 1 auto; }
.feed .tcard-id > div:last-child { min-width: 0; }
.feed .tcard-id b, .feed .tcard-id span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .feed .tcard-fx .tcard-nested { margin-left: 14px; } }

.feed .feed-load {
  display: block; width: 100%; margin-top: 12px; padding: 11px 18px; cursor: pointer;
  font: 700 14px ui-sans-serif, system-ui, sans-serif; color: var(--ep-accent);
  background: rgba(125,211,192,.10); border: 1px solid rgba(125,211,192,.45); border-radius: 999px;
}
.feed .feed-load:hover { background: rgba(125,211,192,.2); }
.feed .feed-load[disabled] { opacity: .6; cursor: progress; }
.feed .feed-load[hidden] { display: none; }
