/* ═══════════════════════════════════════════════════════════════
   MINEMEV — explore.css
   YouTube-style layout for /explore (main.html).
   Loaded AFTER main_new.css: reuses its tokens, fonts and the
   filter widgets (version tree, tag tree, vendor tree).
   Everything here is scoped under .yt so server_details.html,
   which also loads main_new.css, is untouched.
═══════════════════════════════════════════════════════════════ */

.yt {
  --rail-w: 248px;
  --top-offset: var(--nav-height, 52px);
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: calc(100vh - var(--top-offset));
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
}

.yt a { color: inherit; text-decoration: none; }
.yt button { font: inherit; }
.yt [hidden] { display: none !important; }

/* ═══════════════════════════════════════════════════════════
   LEFT RAIL
═══════════════════════════════════════════════════════════ */
.yt-rail {
  position: sticky;
  top: var(--top-offset);
  height: calc(100vh - var(--top-offset));
  overflow-y: auto;
  padding: 14px 10px 28px;
  border-right: 1px solid var(--border);
  background: var(--bg-base);
  scrollbar-width: thin;
  scrollbar-color: #2e3038 transparent;
  z-index: 30;
}

.yt-rail__section { padding: 6px 0 10px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.yt-rail__section:last-child { border-bottom: 0; }

.yt-rail__heading {
  padding: 8px 12px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.yt-rail__item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-size: .88rem;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.yt-rail__item:hover { background: var(--bg-hover); color: var(--text-primary); }

.yt-rail__item.is-active {
  background: var(--gold-dim);
  color: var(--gold);
  font-weight: 600;
}

.yt-rail__item svg { width: 20px; height: 20px; flex-shrink: 0; }

.yt-rail__item img {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.yt-rail__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.yt-rail .ad-slot { display: flex; justify-content: center; padding: 10px 0; }
.yt-rail .host-dialog__hero { max-width: 100%; border-radius: var(--radius-md); cursor: pointer; }
.yt-rail .host-dialog__hero:nth-child(2) { display: none; }

.yt-rail__foot {
  padding: 10px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .66rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.yt-rail__foot a:hover { color: var(--gold); }

.yt-scrim { display: none; }

/* ═══════════════════════════════════════════════════════════
   MAIN COLUMN
═══════════════════════════════════════════════════════════ */
.yt-main { min-width: 0; padding: 0 32px 80px; }

/* ── Top bar (inside #filterForm) ─────────────────────────── */
.yt #filterForm {
  display: block;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.yt-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 0 12px;
}

.yt-menu-btn {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-raised);
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.yt-menu-btn svg { width: 20px; height: 20px; margin: auto; display: block; }

.yt-search {
  flex: 1 1 auto;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  height: 42px;
}

.yt-search .filter-input {
  height: 100%;
  padding: 0 18px 0 42px;
  border-radius: 999px 0 0 999px;
  border-right: 0;
  font-size: .92rem;
  background: var(--bg-input);
}

.yt-search .search-wrap { flex: 1; }
.yt-search .search-icon { left: 16px; width: 16px; height: 16px; }

.yt-search { position: relative; }

/* ── Suggestions dropdown ─────────────────────────────────── */
.yt-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 64px;
  z-index: 60;
  max-height: min(70vh, 560px);
  overflow-y: auto;
  padding: 8px 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
  scrollbar-width: thin;
  scrollbar-color: #2e3038 transparent;
}

.yt-sg-head {
  padding: 10px 16px 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.yt-sg-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 5px 16px;
  color: var(--text-primary);
  font-size: .9rem;
  cursor: pointer;
}

.yt-sg-item:hover,
.yt-sg-item.is-active { background: var(--bg-hover); }
.yt-sg-item.is-active { box-shadow: inset 2px 0 0 var(--gold); }

.yt-sg-icon { display: flex; color: var(--text-muted); }
.yt-sg-icon svg { width: 18px; height: 18px; }

.yt-sg-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-sg-text b { font-weight: 700; }
.yt-sg-text svg { width: 13px; height: 13px; color: var(--gold); vertical-align: -1px; margin-left: 4px; }

.yt-sg-text mark {
  background: transparent;
  color: var(--gold);
  font-weight: 700;
}

.yt-sg-meta {
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  color: var(--text-muted);
}

.yt-sg-badge {
  margin-right: 4px;
  padding: 1px 6px;
  border: 1px solid var(--border-accent);
  border-radius: 20px;
  color: var(--gold);
  font-style: normal;
  font-size: .6rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.yt-sg-thumb {
  flex-shrink: 0;
  width: 56px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-raised);
}

.yt-sg-thumb img, .yt-sg-tagimg img, .yt-sg-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.yt-sg-tagimg { flex-shrink: 0; width: 24px; height: 24px; overflow: hidden; border-radius: 5px; background: var(--bg-raised); }
.yt-sg-avatar { flex-shrink: 0; width: 28px; height: 28px; overflow: hidden; border-radius: 50%; background: var(--bg-raised); }

.yt-sg-remove {
  width: 26px; height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.yt-sg-remove:hover { background: var(--bg-raised); color: var(--text-primary); }
.yt-sg-recent .yt-sg-text { color: var(--text-secondary); }
.yt-sg-empty { padding: 10px 16px; color: var(--text-muted); font-size: .82rem; }

@media (max-width: 700px) { .yt-suggest { right: 0; } }

.yt-search__btn {
  width: 64px;
  border: 1px solid var(--border);
  border-radius: 0 999px 999px 0;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.yt-search__btn:hover { background: var(--gold-dim); color: var(--gold); }
.yt-search__btn svg { width: 18px; height: 18px; }

.yt-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text-secondary);
  font-size: .84rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.yt-tool-btn:hover,
.yt-tool-btn[aria-expanded="true"] { border-color: var(--border-accent); color: var(--gold); }
.yt-tool-btn svg { width: 16px; height: 16px; }

a.yt-tool-btn { text-decoration: none; }
.yt-tool-btn--primary {
  border-color: var(--gold);
  background: var(--gold);
  color: #0a0b0d;
  font-weight: 600;
}
.yt-tool-btn--primary:hover { color: #0a0b0d; border-color: var(--gold); filter: brightness(1.1); }

.yt-tool-btn__count {
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #0a0b0d;
  font-family: 'JetBrains Mono', monospace;
  font-size: .66rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.yt .view-toggle { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-raised); }

.yt .view-toggle__btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.yt .view-toggle__btn span { display: none; }
.yt .view-toggle__btn svg { width: 16px; height: 16px; }
.yt .view-toggle__btn.active { background: var(--bg-hover); color: var(--gold); }

/* ── Filters drawer ───────────────────────────────────────── */
/* Layout: [Sort | Sources] one-line rows on top, then two identical
   panels [Version | Tags] with the same fixed list height, then actions. */
.yt-filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 0 14px;
  padding: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 36px rgba(0, 0, 0, .5);
  animation: yt-drop .18s ease;
}

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

.yt-filters__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.yt-fsection { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.yt-fpanel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.yt-fpanel__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 20px; }
.yt-fpanel__head .filter-label { margin: 0; }

.yt-fpanel__value {
  margin-left: auto;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  color: var(--gold);
}

.yt-fpanel__clear {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.yt-fpanel__clear:hover { color: var(--gold); }
.yt-fpanel .tag-search-wrap { margin: 0; }

/* identical list boxes */
.yt-filters #versionTree,
.yt-filters .tag-tree {
  height: 240px;
  max-height: none;
  margin: 0;
  background: var(--bg-input);
}

/* sort: segmented pills (drives the hidden <select name="sort">) */
.yt-seg { display: flex; flex-wrap: wrap; gap: 6px; }

.yt-seg button {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text-secondary);
  font-size: .82rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.yt-seg button:hover { color: var(--text-primary); border-color: rgba(255, 255, 255, .14); }
.yt-seg button.is-active { background: var(--gold); border-color: var(--gold); color: #0a0b0d; font-weight: 700; }

.yt-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* sources: toggle chips (labels rendered by load_posts.js) */
.yt-filters #vendorTree {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: none;
  padding: 0;
  overflow: visible;
  background: none;
  border: 0;
}

.yt-filters .vendor-checkbox-label {
  flex-direction: row;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-accent);
  border-radius: 999px;
  background: var(--gold-dim);
  color: var(--text-primary);
  font-size: .74rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
}

.yt-filters .vendor-checkbox-label input[type="checkbox"] { margin: 0; width: 14px; height: 14px; }
.yt-filters .vendor-checkbox-label:has(input:not(:checked)) {
  border-color: var(--border);
  background: var(--bg-raised);
  color: var(--text-muted);
  text-decoration: line-through;
}

.yt-filters__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
  .yt-filters__row { grid-template-columns: minmax(0, 1fr); }
  .yt-filters #versionTree,
  .yt-filters .tag-tree { height: 200px; }
}

.yt-filters__reset {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: .85rem;
  cursor: pointer;
}

.yt-filters__reset:hover { color: var(--text-primary); border-color: var(--text-muted); }

/* ── Chips bar ────────────────────────────────────────────── */
.yt-chips-wrap {
  position: sticky;
  top: var(--top-offset);
  z-index: 20;
  margin: 0 -32px;
  padding: 10px 32px;
  background: rgba(10, 11, 13, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.yt-chips-inner { position: relative; }

.yt-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.yt-chips::-webkit-scrollbar { display: none; }

.yt-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.yt-chip:hover { background: var(--bg-hover); border-color: rgba(255, 255, 255, .14); }

.yt-chip.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0b0d;
  font-weight: 700;
}

.yt-chip img { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; }

.yt-chip--category { font-weight: 600; }
.yt-chips-sep { flex-shrink: 0; width: 1px; margin: 4px 2px; background: var(--border); }

.yt-chip--skeleton { width: 90px; background: var(--bg-elevated); animation: yt-pulse 1.4s ease infinite; }

.yt-chips-arrow {
  position: absolute;
  top: 0; bottom: 0;
  width: 64px;
  display: flex;
  align-items: center;
  border: 0;
  cursor: pointer;
  color: var(--text-primary);
  z-index: 2;
}

.yt-chips-arrow svg {
  width: 32px; height: 32px;
  padding: 7px;
  border-radius: 50%;
  background: var(--bg-hover);
}

.yt-chips-arrow--left { left: 0; justify-content: flex-start; background: linear-gradient(90deg, #0a0b0d 45%, transparent); }
.yt-chips-arrow--right { right: 0; justify-content: flex-end; background: linear-gradient(270deg, #0a0b0d 45%, transparent); }

/* ═══════════════════════════════════════════════════════════
   SHELVES
═══════════════════════════════════════════════════════════ */
.yt-shelf { padding: 26px 0 18px; border-bottom: 1px solid var(--border); }

.yt-shelf__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.yt-shelf__title {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1;
}

.yt-shelf__sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.yt-shelf__more {
  margin-left: auto;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: .8rem;
  transition: color var(--transition), border-color var(--transition);
}

.yt-shelf__more:hover { color: var(--gold); border-color: var(--border-accent); }

.yt-shelf__nav { display: flex; gap: 6px; }

.yt-shelf__nav button {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-raised);
  color: var(--text-secondary);
  cursor: pointer;
}

.yt-shelf__nav button:hover { color: var(--gold); border-color: var(--border-accent); }
.yt-shelf__nav svg { width: 14px; height: 14px; display: block; margin: auto; }

.yt-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, calc((100% - 3 * 16px) / 4));
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.yt-row::-webkit-scrollbar { display: none; }
.yt-row > * { scroll-snap-align: start; }

.yt-row--channels { grid-auto-columns: minmax(150px, calc((100% - 5 * 16px) / 6)); }

/* Live shelf: reuse the stream markup, flatten its chrome */
.yt .stream-wrapper {
  max-width: none;
  margin: 26px 0 0;
  padding: 0 0 26px;
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.yt .stream-wrapper::before { display: none; }
.yt .stream-wrapper__eyebrow { font-family: 'Bebas Neue', sans-serif; font-size: 1.75rem; letter-spacing: .04em; text-transform: none; color: var(--text-primary); }
.yt .stream-wrapper__eyebrow .eyebrow-sub { font-family: 'JetBrains Mono', monospace; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.yt .stream-grid { grid-template-columns: minmax(0, 1fr) 300px; }
.yt .stream-embed { order: -1; }

/* News card */
.ncard { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.ncard__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.ncard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.ncard:hover .ncard__thumb img { transform: scale(1.04); }

.ncard__thumb--empty {
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  color: var(--text-muted);
}

.ncard__tag {
  position: absolute;
  left: 10px; top: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--gold);
  color: #0a0b0d;
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ncard__title {
  margin: 0;
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ncard__excerpt {
  margin: 0;
  color: var(--text-secondary);
  font-size: .82rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ncard__meta { font-family: 'JetBrains Mono', monospace; font-size: .7rem; color: var(--text-muted); }
.ncard__meta b { color: var(--gold); font-weight: 400; }

/* Channel card (servers / creators) */
.ccard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: background var(--transition), border-color var(--transition);
}

.ccard:hover { background: var(--bg-raised); border-color: var(--border); }

.ccard__avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  transition: border-color var(--transition), transform var(--transition);
}

.ccard:hover .ccard__avatar { border-color: var(--gold); transform: scale(1.04); }
.ccard--server .ccard__avatar { border-radius: 22px; }

.ccard__name {
  max-width: 100%;
  font-weight: 600;
  font-size: .92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ccard__name svg { width: 13px; height: 13px; color: var(--gold); vertical-align: -1px; margin-left: 3px; }
.ccard__stats { font-family: 'JetBrains Mono', monospace; font-size: .68rem; color: var(--text-muted); line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════
   POST GRID — video-style cards (rendered by renderVideoCard)
═══════════════════════════════════════════════════════════ */
.yt-feed { padding-top: 26px; }

.yt-feed__count { font-family: 'JetBrains Mono', monospace; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }

.yt #post_container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  grid-auto-rows: auto;
  gap: 30px 16px;
}

.vcard { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.vcard__thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

.vcard__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s cubic-bezier(.4, 0, .2, 1), opacity .2s ease;
}

.vcard:hover .vcard__thumb img { transform: scale(1.035); }

.vcard__thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--border);
  pointer-events: none;
  transition: box-shadow var(--transition);
}

.vcard:hover .vcard__thumb::after { box-shadow: inset 0 0 0 2px var(--border-accent); }

.vcard__badge,
.vcard__version {
  position: absolute;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(10, 11, 13, .82);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .04em;
  pointer-events: none;
}

.vcard__version { right: 8px; bottom: 8px; }
.vcard__badge { left: 8px; top: 8px; color: var(--gold); text-transform: uppercase; letter-spacing: .1em; }

.vcard__dots { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 3px; padding: 0 8px 6px; opacity: 0; transition: opacity var(--transition); }
.vcard:hover .vcard__dots { opacity: 1; }
.vcard__dots i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .3); }
.vcard__dots i.on { background: var(--gold); }

.vcard__meta { display: flex; gap: 12px; min-width: 0; }

.vcard__avatar img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-elevated);
  display: block;
}

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

.vcard__title {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* hover translation (Chrome built-in Translator) */
.vcard.is-translating .vcard__title { animation: yt-pulse 1.1s ease infinite; }

.vcard__tr {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: .66rem;
  letter-spacing: .02em;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vcard__tr:hover { color: var(--gold); }
.vcard.is-translated .vcard__tr::before { content: '✦ '; color: var(--gold); }

.vcard__author { font-size: .82rem; color: var(--text-secondary); width: fit-content; }
a.vcard__author:hover { color: var(--gold); }
.vcard__stats { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: .8rem; color: var(--text-secondary); }
.vcard__stats svg { width: 13px; height: 13px; vertical-align: -2px; }
.vcard__stats .sep::before { content: '•'; margin: 0 2px; color: var(--text-muted); }

.vcard__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; max-height: 22px; overflow: hidden; }

.vcard__tags a {
  padding: 1px 7px;
  border: 1px solid rgba(255, 194, 0, .18);
  border-radius: 20px;
  background: rgba(255, 194, 0, .06);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: .64rem;
  white-space: nowrap;
}

.vcard__tags a:hover { color: var(--gold); border-color: var(--border-accent); }

/* admin controls on external posts (customize_external_post only, explore.js adminBar) */
.vcard__admin { display: flex; gap: 6px; margin-top: 6px; }
.vcard__admin a,
.vcard__admin button {
  padding: 2px 8px;
  border: 1px dashed var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: .66rem;
  cursor: pointer;
  white-space: nowrap;
}
.vcard__admin a:hover,
.vcard__admin button:hover { color: var(--gold); border-color: var(--border-accent); }
.vcard__admin .is-internal { color: var(--gold); }
.vcard__admin .is-danger:hover { color: #ef4444; border-color: #ef4444; }

/* list view (toggle) */
.yt #post_container.view-list { grid-template-columns: 1fr; gap: 16px; }
.yt #post_container.view-list .vcard { flex-direction: row; gap: 16px; }
.yt #post_container.view-list .vcard__thumb { flex: 0 0 min(360px, 42%); }
.yt #post_container.view-list .vcard__avatar { display: none; }
.yt #post_container.view-list .vcard__title { font-size: 1.08rem; }
.yt #post_container.view-list .vcard__tags { max-height: none; }
.yt #post_container.view-list .vcard__desc { display: -webkit-box; }

.vcard__desc {
  display: none;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* skeletons + empty state */
.vcard--skeleton .vcard__thumb,
.vcard--skeleton .sk-line,
.vcard--skeleton .vcard__avatar i { animation: yt-pulse 1.4s ease infinite; background: var(--bg-elevated); }
.vcard--skeleton .vcard__avatar i { display: block; width: 36px; height: 36px; border-radius: 50%; }
.sk-line { display: block; height: 12px; border-radius: 4px; margin-top: 4px; }

@keyframes yt-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.yt-empty {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.yt-empty h3 { margin: 0 0 6px; font-family: 'Bebas Neue', sans-serif; font-size: 2rem; font-weight: 400; color: var(--text-primary); }

.yt .loading-indicator { grid-column: 1 / -1; }

/* While searching / filtering, results only (like a search page) */
.yt.is-filtering .yt-shelf,
.yt.is-filtering .stream-wrapper { display: none; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 1300px) {
  .yt-row { grid-auto-columns: minmax(240px, calc((100% - 2 * 16px) / 3)); }
  .yt-row--channels { grid-auto-columns: minmax(140px, calc((100% - 4 * 16px) / 5)); }
}

@media (max-width: 1100px) {
  .yt .stream-grid { grid-template-columns: 1fr; }
  .yt .stream-card { flex-direction: row; flex-wrap: wrap; }
}

/* rail becomes an off-canvas drawer */
@media (max-width: 980px) {
  .yt { grid-template-columns: minmax(0, 1fr); }

  .yt-rail {
    position: fixed;
    left: 0;
    width: var(--rail-w);
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: 10px 0 40px rgba(0, 0, 0, .6);
  }

  .yt.rail-open .yt-rail { transform: none; }

  .yt.rail-open .yt-scrim {
    display: block;
    position: fixed;
    inset: var(--top-offset) 0 0 0;
    background: rgba(0, 0, 0, .55);
    z-index: 25;
  }

  .yt-menu-btn { display: block; }
  .yt-main { padding: 0 18px 60px; }
  .yt-chips-wrap { margin: 0 -18px; padding: 10px 18px; }
}

@media (max-width: 700px) {
  .yt-top { flex-wrap: wrap; }
  .yt-search { order: 3; flex-basis: 100%; max-width: none; }
  .yt-tool-btn span { display: none; }
  .yt-row { grid-auto-columns: 78%; }
  .yt-row--channels { grid-auto-columns: 42%; }
  .yt #post_container { grid-template-columns: 1fr; }
  .yt #post_container.view-list .vcard { flex-direction: column; }
  .yt #post_container.view-list .vcard__thumb { flex-basis: auto; }
  .yt-chips-arrow { display: none; }
}
