/* =========================================================
   Only — modern glassy video platform
   ========================================================= */
:root {
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  /* Dark (default) */
  --bg: #0a0b10;
  --bg-2: #0d0e14;
  --panel: rgba(22, 23, 32, 0.62);
  --panel-solid: #14151d;
  --panel-hi: rgba(32, 34, 46, 0.78);
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --fg: #ececf1;
  --fg-dim: #a4a6b3;
  --fg-mute: #6b6e7e;
  --accent: oklch(0.72 0.17 285);
  --accent-2: oklch(0.78 0.14 220);
  --danger: oklch(0.7 0.2 22);
  --ok: oklch(0.78 0.16 152);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 10px 30px rgba(0,0,0,0.35);
  --shadow-pop: 0 20px 60px rgba(0,0,0,0.55), 0 2px 0 rgba(255,255,255,0.05) inset;
  --noise: radial-gradient(1200px 600px at 10% -10%, oklch(0.35 0.08 285 / 0.25), transparent 60%),
           radial-gradient(900px 500px at 110% 10%, oklch(0.4 0.1 220 / 0.18), transparent 60%);
}

html[data-theme="light"] {
  --bg: #f6f5f2;
  --bg-2: #efeeea;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-solid: #ffffff;
  --panel-hi: rgba(255, 255, 255, 0.92);
  --hairline: rgba(10, 11, 16, 0.08);
  --hairline-strong: rgba(10, 11, 16, 0.14);
  --fg: #14151d;
  --fg-dim: #55576a;
  --fg-mute: #8a8c9a;
  --accent: oklch(0.58 0.18 285);
  --accent-2: oklch(0.62 0.14 220);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.9) inset, 0 8px 20px rgba(20,21,29,0.08);
  --shadow-pop: 0 20px 60px rgba(20,21,29,0.18), 0 1px 0 rgba(255,255,255,0.9) inset;
  --noise: radial-gradient(1200px 600px at 10% -10%, oklch(0.75 0.08 285 / 0.35), transparent 60%),
           radial-gradient(900px 500px at 110% 10%, oklch(0.8 0.08 220 / 0.35), transparent 60%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Geist", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}
.mono { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-feature-settings: "ss02"; }

/* Background atmospherics */
.bg-atmos {
  position: fixed; inset: 0; z-index: -1;
  background: var(--bg);
}
.bg-atmos::before {
  content: ""; position: absolute; inset: 0;
  background: var(--noise);
  pointer-events: none;
}
.bg-atmos::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  opacity: 0.5;
  pointer-events: none;
}
html[data-theme="light"] .bg-atmos::after { opacity: 0.3; mix-blend-mode: multiply; background-image: radial-gradient(rgba(0,0,0,0.04) 1px, transparent 1px); }

/* Layout */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w, 240px) 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.app[data-sidebar="collapsed"] { --sidebar-w: 72px; }

/* =========================================================
   Sidebar
   ========================================================= */
.sidebar {
  position: sticky; top: 0;
  height: 100vh;
  padding: 18px 14px;
  display: flex; flex-direction: column; gap: 18px;
  border-right: 1px solid var(--hairline);
  background: var(--panel);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  z-index: 10;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 4px;
  height: 40px;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 9px;
  background: conic-gradient(from 120deg, var(--accent), var(--accent-2), var(--accent));
  position: relative; flex: 0 0 auto;
  box-shadow: 0 0 0 1px var(--hairline-strong) inset, 0 6px 18px oklch(0.6 0.18 285 / 0.4);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 5px; border-radius: 6px;
  background: var(--panel-solid);
}
.brand-mark::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-40%, -50%);
  border-left: 7px solid var(--fg);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  z-index: 1;
}
.brand-word { font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.brand-dot { color: var(--accent); }

.sidebar-section {
  display: flex; flex-direction: column; gap: 2px;
}
.sidebar-label {
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-mute);
  padding: 8px 12px 4px;
}
.app[data-sidebar="collapsed"] .sidebar-label,
.app[data-sidebar="collapsed"] .side-text,
.app[data-sidebar="collapsed"] .brand-word { display: none; }
.app[data-sidebar="collapsed"] .sidebar-section { align-items: center; }
.app[data-sidebar="collapsed"] .sidebar-item { justify-content: center; padding: 10px; width: 44px; }

.sidebar-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--fg-dim); font-size: 14px;
  cursor: pointer; user-select: none;
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.sidebar-item:hover { background: var(--hairline); color: var(--fg); }
.sidebar-item.is-active {
  background: linear-gradient(180deg, var(--panel-hi), var(--hairline));
  color: var(--fg);
  box-shadow: 0 0 0 1px var(--hairline) inset;
}
.sidebar-item .ico { width: 18px; height: 18px; flex: 0 0 auto; color: currentColor; }
.sidebar-item .count { margin-left: auto; font-size: 11px; color: var(--fg-mute); }

.sidebar-foot {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px 4px 2px;
}
.collapse-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--fg-mute); font-size: 12px;
  cursor: pointer; background: transparent; border: 1px dashed var(--hairline);
  font-family: "Geist Mono", ui-monospace, monospace;
}
.collapse-btn:hover { color: var(--fg); border-color: var(--hairline-strong); }
.app[data-sidebar="collapsed"] .collapse-btn { justify-content: center; padding: 10px; }

/* Followed creators mini */
.creator-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; cursor: pointer; }
.creator-row:hover { background: var(--hairline); }
.creator-av {
  width: 26px; height: 26px; border-radius: 50%;
  flex: 0 0 auto;
  position: relative;
  background: linear-gradient(135deg, oklch(0.65 0.15 var(--h, 280)), oklch(0.45 0.12 var(--h, 280)));
  box-shadow: 0 0 0 1px var(--hairline) inset;
}
.creator-av.live::after {
  content: ""; position: absolute; right: -2px; bottom: -2px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--panel-solid);
}
.creator-row .name { font-size: 13px; color: var(--fg-dim); }
.creator-row .live-tag { margin-left: auto; font-size: 10px; color: var(--danger); font-family: "Geist Mono", monospace; }
.app[data-sidebar="collapsed"] .creator-row .name,
.app[data-sidebar="collapsed"] .creator-row .live-tag { display: none; }
.app[data-sidebar="collapsed"] .creator-row { justify-content: center; padding: 6px; }

/* =========================================================
   Topbar
   ========================================================= */
.main {
  display: flex; flex-direction: column;
  min-width: 0;
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 560px) 1fr;
  align-items: center; gap: 16px;
  padding: 14px 28px;
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
}
.crumbs {
  display: flex; align-items: center; gap: 10px;
  color: var(--fg-mute); font-size: 13px;
  font-family: "Geist Mono", monospace;
}
.crumbs .cur { color: var(--fg); }
.search {
  position: relative;
  display: flex; align-items: center;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 8px 14px 8px 40px;
  backdrop-filter: blur(16px);
  transition: border-color 0.15s, box-shadow 0.2s;
}
.search:focus-within {
  border-color: color-mix(in oklab, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 15%, transparent);
}
.search .ico { position: absolute; left: 14px; width: 16px; height: 16px; color: var(--fg-mute); }
.search input {
  background: transparent; border: 0; outline: 0;
  color: var(--fg); font-size: 14px; width: 100%;
  font-family: inherit;
}
.search input::placeholder { color: var(--fg-mute); }
.kbd {
  font-family: "Geist Mono", monospace;
  font-size: 10.5px; color: var(--fg-mute);
  border: 1px solid var(--hairline); border-radius: 5px;
  padding: 2px 6px;
}
.search .kbd { margin-left: 8px; }
.topbar-right { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--hairline);
  color: var(--fg-dim); cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.15s;
  position: relative;
}
.icon-btn:hover { color: var(--fg); border-color: var(--hairline-strong); transform: translateY(-1px); }
.icon-btn .ico { width: 16px; height: 16px; }
.icon-btn .dot {
  position: absolute; top: 9px; right: 10px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); box-shadow: 0 0 0 2px var(--bg);
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.65 0.16 30), oklch(0.45 0.12 330));
  border: 1px solid var(--hairline-strong);
  cursor: pointer;
}

/* Search dropdown */
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--panel-hi);
  backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 8px;
  box-shadow: var(--shadow-pop);
  max-height: 440px; overflow: auto;
  z-index: 30;
}
.search-result {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 10px; cursor: pointer;
}
.search-result:hover { background: var(--hairline); }
.sr-thumb {
  width: 56px; height: 34px; border-radius: 7px;
  flex: 0 0 auto;
  background: linear-gradient(135deg, oklch(0.4 0.1 var(--h, 280)), oklch(0.25 0.08 var(--h, 280)));
}
.sr-title { font-size: 13px; color: var(--fg); line-height: 1.3; }
.sr-meta { font-size: 11px; color: var(--fg-mute); font-family: "Geist Mono", monospace; margin-top: 2px; }
.search-empty { padding: 20px; text-align: center; color: var(--fg-mute); font-size: 13px; }

/* =========================================================
   Category tabs
   ========================================================= */
.tabs-wrap {
  position: relative;
  padding: 14px 28px 6px;
}
.tabs-row {
  display: flex; gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 6px;
}
.tabs-row::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--fg-dim);
  background: var(--panel);
  border: 1px solid var(--hairline);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all 0.15s;
  backdrop-filter: blur(8px);
}
.tab:hover { color: var(--fg); border-color: var(--hairline-strong); }
.tab.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.tab .live-pip {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--danger);
  animation: pip 1.6s ease-in-out infinite;
}
@keyframes pip { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.tabs-fade-r, .tabs-fade-l {
  position: absolute; top: 14px; bottom: 6px; width: 40px;
  pointer-events: none; z-index: 2;
}
.tabs-fade-l { left: 28px; background: linear-gradient(90deg, var(--bg), transparent); }
.tabs-fade-r { right: 28px; background: linear-gradient(-90deg, var(--bg), transparent); }

/* =========================================================
   Content
   ========================================================= */
.content {
  padding: 10px 28px 80px;
}
.section-head {
  display: flex; align-items: baseline; gap: 14px;
  margin: 24px 0 14px;
}
.section-head h2 {
  font-size: 18px; font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.section-head .sub {
  font-size: 12px; color: var(--fg-mute); font-family: "Geist Mono", monospace;
  letter-spacing: 0.02em;
}
.section-head .spacer { flex: 1; }
.section-head .more {
  font-size: 12px; color: var(--fg-dim); cursor: pointer;
  font-family: "Geist Mono", monospace;
}
.section-head .more:hover { color: var(--fg); }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 22px 18px;
}
@media (max-width: 1500px) { .grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1200px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .grid { grid-template-columns: repeat(3, 1fr); } }

.grid.grid-sparse { grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid.grid-med    { grid-template-columns: repeat(4, 1fr); }
.grid.grid-dense  { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1500px) {
  .grid.grid-dense { grid-template-columns: repeat(5, 1fr); }
  .grid.grid-med   { grid-template-columns: repeat(4, 1fr); }
  .grid.grid-sparse{ grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================
   Video card
   ========================================================= */
.card {
  display: flex; flex-direction: column; gap: 10px;
  cursor: pointer;
  position: relative;
}
.card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-solid);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}
.card:hover .card-thumb {
  transform: translateY(-3px);
  box-shadow: var(--shadow-pop);
}
.card-thumb .placeholder {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg,
      oklch(0.3 0.04 var(--h, 280) / 0.9) 0 14px,
      oklch(0.26 0.04 var(--h, 280) / 0.9) 14px 28px);
  display: flex; align-items: center; justify-content: center;
}
html[data-theme="light"] .card-thumb .placeholder {
  background: repeating-linear-gradient(45deg,
    oklch(0.88 0.03 var(--h, 280)) 0 14px,
    oklch(0.82 0.03 var(--h, 280)) 14px 28px);
}
.card-thumb .placeholder span {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  background: rgba(0,0,0,0.3);
  padding: 5px 10px; border-radius: 6px;
  backdrop-filter: blur(4px);
}
html[data-theme="light"] .card-thumb .placeholder span {
  color: rgba(0,0,0,0.5); background: rgba(255,255,255,0.5);
}

/* Hover "preview" — overlay that pulses */
.card-thumb .preview-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.55) 100%),
    conic-gradient(from 0deg at 50% 50%,
      oklch(0.55 0.22 var(--h, 280) / 0.3),
      oklch(0.55 0.22 calc(var(--h, 280) + 60) / 0.3),
      oklch(0.55 0.22 calc(var(--h, 280) + 120) / 0.3),
      oklch(0.55 0.22 calc(var(--h, 280) + 180) / 0.3),
      oklch(0.55 0.22 var(--h, 280) / 0.3));
  opacity: 0;
  transition: opacity 0.3s;
  mix-blend-mode: screen;
}
.card:hover .card-thumb .preview-veil { opacity: 1; animation: preview-spin 6s linear infinite; }
@keyframes preview-spin { to { transform: rotate(360deg) scale(1.4); } }

.card-thumb .scrub {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  height: 3px; border-radius: 2px;
  background: rgba(255,255,255,0.2);
  overflow: hidden;
  opacity: 0; transition: opacity 0.25s;
}
.card:hover .card-thumb .scrub { opacity: 1; }
.card-thumb .scrub::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: translateX(-100%);
  animation: scrub 4.5s linear infinite;
}
@keyframes scrub { to { transform: translateX(0); } }

/* Chips inside thumb */
.thumb-chips {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; gap: 6px; align-items: center;
  pointer-events: none;
}
.chip {
  font-family: "Geist Mono", monospace;
  font-size: 10.5px; letter-spacing: 0.04em;
  padding: 4px 8px; border-radius: 6px;
  background: rgba(10,11,16,0.72); color: #fff;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}
.chip.dur { margin-left: auto; pointer-events: auto; }

/* Quality / format badges */
.q-stack { display: inline-flex; align-items: center; gap: 4px; }
.chip.q {
  font-weight: 600; letter-spacing: 0.06em;
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
}
.chip.q.q-8k   { background: linear-gradient(180deg, oklch(0.7 0.2 285), oklch(0.55 0.18 260)); border-color: transparent; }
.chip.q.q-4k   { background: linear-gradient(180deg, oklch(0.72 0.17 220), oklch(0.55 0.14 240)); border-color: transparent; }
.chip.q.q-1080 { background: rgba(10,11,16,0.72); }
.chip.q.q-720  { background: rgba(10,11,16,0.55); color: #d6d7dd; }
.chip.q.q-lossless { background: linear-gradient(180deg, oklch(0.78 0.16 152), oklch(0.6 0.14 168)); border-color: transparent; }
.chip.q.q-flac, .chip.q.q-pdf, .chip.q.q-pdfpng {
  background: rgba(10,11,16,0.72); border: 1px solid rgba(255,255,255,0.22); color:#fff;
}
.chip.hdr {
  background: linear-gradient(180deg, oklch(0.8 0.19 70), oklch(0.65 0.18 40));
  color: #14151d; font-weight: 700; border-color: transparent;
}
.chip.archive {
  background: rgba(10,11,16,0.78);
  color: #fff; border: 1px solid rgba(255,255,255,0.22);
  display: inline-flex; align-items: center; gap: 5px;
}
.chip.archive::before {
  content: ""; width: 10px; height: 8px; border-radius: 1.5px;
  background: currentColor; opacity: 0.9;
  box-shadow: 0 -3px 0 currentColor inset;
  mask: linear-gradient(#000 0 0);
}

/* Save button (appears on hover) */
.card-save {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(10,11,16,0.6); color: #fff; border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer; backdrop-filter: blur(10px);
  opacity: 0; transform: translateY(-4px);
  transition: all 0.2s;
  pointer-events: auto;
}
.card:hover .card-save { opacity: 1; transform: translateY(0); }
.card-save:hover { background: rgba(10,11,16,0.85); }
.card-save.is-saved { background: var(--fg); color: var(--bg); opacity: 1; transform: translateY(0); }
.card-save .ico { width: 14px; height: 14px; }

/* Card meta */
.card-meta { display: flex; gap: 10px; }
.card-av {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, oklch(0.65 0.15 var(--h, 280)), oklch(0.4 0.12 var(--h, 280)));
  box-shadow: 0 0 0 1px var(--hairline) inset;
}
.card-text { min-width: 0; flex: 1; }
.card-title {
  font-size: 14px; line-height: 1.35;
  color: var(--fg);
  margin: 0 0 4px;
  font-weight: 500;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}
.card-sub { font-size: 12px; color: var(--fg-dim); }
.card-sub .dot { margin: 0 6px; color: var(--fg-mute); }
.card-sub .cr { color: var(--fg-dim); }
.card-sub .cr:hover { color: var(--fg); }
.card-stats { font-size: 11.5px; color: var(--fg-mute); font-family: "Geist Mono", monospace; margin-top: 2px; }

/* =========================================================
   Featured / hero row
   ========================================================= */
.hero {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 18px;
  margin-top: 10px;
}
@media (max-width: 1200px) { .hero { grid-template-columns: 1fr 1fr; } .hero > :nth-child(3) { display: none; } }
.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--panel-solid);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}
.hero-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.hero-card.big { aspect-ratio: 16 / 9; }
.hero-card.small { aspect-ratio: 4 / 3; }

.hero-placeholder {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg,
      oklch(0.35 0.1 var(--h, 280)),
      oklch(0.2 0.06 calc(var(--h, 280) + 60))),
    radial-gradient(400px 200px at 20% 20%, oklch(0.7 0.18 var(--h, 280) / 0.35), transparent 70%);
  display: flex; align-items: flex-end; padding: 22px;
}
.hero-placeholder::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 10px);
}
.hero-badge {
  position: absolute; top: 20px; left: 20px;
  font-family: "Geist Mono", monospace;
  font-size: 10.5px; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  padding: 5px 10px; border-radius: 6px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
}
.hero-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 24px;
  background: linear-gradient(180deg, transparent, rgba(10,11,16,0.85) 60%);
  color: #fff;
  z-index: 1;
}
.hero-overlay h3 {
  font-size: 22px; line-height: 1.15; margin: 0 0 8px;
  letter-spacing: -0.015em; max-width: 90%;
  text-wrap: balance;
}
.hero-card.big .hero-overlay h3 { font-size: 28px; }
.hero-overlay .cr { font-size: 12px; opacity: 0.78; font-family: "Geist Mono", monospace; }

.hero-play {
  position: absolute; right: 24px; bottom: 24px;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}
.hero-card:hover .hero-play {
  background: #fff; border-color: #fff;
}
.hero-play::after {
  content: "";
  border-left: 10px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 3px;
}
.hero-card:hover .hero-play::after { border-left-color: #0a0b10; }

/* =========================================================
   Watch overlay (play/pause demo)
   ========================================================= */
.watch {
  position: fixed; inset: 0; z-index: 100;
  background: color-mix(in oklab, var(--bg) 85%, #000);
  backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.watch.is-open { opacity: 1; pointer-events: auto; }
.watch-stage {
  width: 100%; max-width: 1200px;
  display: grid; grid-template-columns: 1fr 360px; gap: 24px;
  align-items: start;
}
@media (max-width: 1100px) { .watch-stage { grid-template-columns: 1fr; } }
.watch-close {
  position: absolute; top: 24px; right: 24px;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--hairline);
  color: var(--fg); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(12px);
}
.watch-close:hover { background: var(--panel-hi); }

.player {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--panel-solid);
  position: relative;
  box-shadow: var(--shadow-pop);
}
.player-placeholder {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, oklch(0.3 0.08 var(--h, 280)), oklch(0.15 0.04 calc(var(--h, 280) + 40)));
}
.player-placeholder::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 10px);
}
.player-controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 20px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
  display: flex; align-items: center; gap: 14px;
  color: #fff;
  z-index: 2;
}
.play-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: #fff; color: #000; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  transition: transform 0.15s;
}
.play-btn:hover { transform: scale(1.06); }
.player-progress {
  flex: 1; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.18);
  position: relative; overflow: hidden; cursor: pointer;
}
.player-progress .bar {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left;
}
.player-time { font-family: "Geist Mono", monospace; font-size: 12px; color: rgba(255,255,255,0.8); }
.player-actions { display: flex; align-items: center; gap: 8px; }
.player-actions button {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,0.1); color: #fff;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.player-actions button:hover { background: rgba(255,255,255,0.22); }

.watch-center-play {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 3;
  opacity: 1;
  transition: opacity 0.25s;
}
.player.is-playing .watch-center-play { opacity: 0; pointer-events: none; }
.watch-center-play::after {
  content: "";
  border-left: 20px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 5px;
}

.watch-meta {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(16px);
}
.watch-meta h2 {
  font-size: 18px; margin: 0 0 10px; line-height: 1.3;
  letter-spacing: -0.01em; text-wrap: pretty;
}
.watch-meta .cr-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 18px; }
.watch-meta .cr-row .av { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, oklch(0.65 0.16 var(--h)), oklch(0.4 0.1 var(--h))); }
.watch-meta .cr-row .name { font-size: 14px; font-weight: 500; }
.watch-meta .cr-row .follow {
  margin-left: auto; padding: 7px 14px; border-radius: 999px;
  background: var(--fg); color: var(--bg); border: 0; cursor: pointer;
  font-size: 12px; font-family: inherit; font-weight: 500;
}
.watch-meta .desc { font-size: 13px; color: var(--fg-dim); line-height: 1.55; }
.watch-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.watch-actions button {
  padding: 7px 12px; border-radius: 999px;
  background: var(--panel-hi); border: 1px solid var(--hairline); color: var(--fg);
  font-size: 12px; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
}
.watch-actions button:hover { border-color: var(--hairline-strong); }
.watch-actions button.is-on {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}

/* =========================================================
   Detail page
   ========================================================= */
.detail {
  padding: 20px 28px 80px;
  max-width: 1400px;
  margin: 0 auto;
}
/* Full-width variant — use the entire main column */
.detail.detail-full,
.detail.detail-cinema {
  max-width: none;
  padding: 20px 44px 80px;
}
.detail.detail-full .detail-grid {
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 36px;
}
.detail.detail-full .d-title { max-width: 1100px; font-size: 30px; }
.detail.detail-full .d-desc  { max-width: 960px; }
.detail.detail-full .d-shots { max-width: 960px; }
@media (max-width: 1200px) {
  .detail.detail-full .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .detail.detail-full { padding: 16px 18px 80px; }
}

/* Cinema variant — player fills the full main column, grid starts below it */
.detail.detail-cinema .detail-grid {
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 36px;
}
.detail.detail-cinema .d-title { max-width: 1100px; font-size: 30px; }
.detail.detail-cinema .d-desc  { max-width: 960px; }
.detail.detail-cinema .d-shots { max-width: 960px; }
@media (max-width: 1200px) {
  .detail.detail-cinema .detail-grid { grid-template-columns: 1fr; }
}
.d-cinema-stage {
  /* Break out of the page padding so video goes edge-to-edge of the main column */
  margin: -4px -44px 22px;
  background: #000;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.d-cinema-stage .d-player {
  border-radius: 0;
  aspect-ratio: 21 / 9;
  max-height: calc(100vh - 160px);
  box-shadow: none;
  margin: 0 auto;
  width: 100%;
  max-width: 1800px;
}
@media (max-width: 860px) {
  .detail.detail-cinema { padding: 12px 0 80px; }
  .detail.detail-cinema .detail-crumbs { padding: 6px 18px 14px; }
  .detail.detail-cinema .detail-grid { padding: 0 18px; }
  .d-cinema-stage { margin: 0 0 18px; }
  .d-cinema-stage .d-player { aspect-ratio: 16 / 9; }
}

.detail-crumbs {
  display: flex; align-items: center; gap: 10px;
  color: var(--fg-mute); font-size: 12px;
  font-family: "Geist Mono", monospace;
  padding: 6px 0 18px;
}
.detail-crumbs a { color: var(--fg-dim); cursor: pointer; }
.detail-crumbs a:hover { color: var(--fg); }
.detail-crumbs .sep { opacity: 0.5; }
.detail-crumbs .cur { color: var(--fg); }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 1200px) { .detail-grid { grid-template-columns: 1fr; } }

.d-player {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--panel-solid);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.d-player .player-placeholder {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, oklch(0.3 0.08 var(--h, 280)), oklch(0.15 0.04 calc(var(--h, 280) + 40)));
}
.d-player .player-placeholder::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 10px);
}
.d-player .watch-center-play { width: 80px; height: 80px; }
.d-badges {
  position: absolute; top: 16px; left: 16px;
  display: flex; gap: 6px; z-index: 2;
}

/* Pinned mini-player (mobile, when video plays + page scrolls away) */
.d-pin-close {
  position: absolute; top: 8px; right: 8px; z-index: 5;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(10,11,16,0.72);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
}
.d-pin-close .ico { width: 14px; height: 14px; }
.d-pin-close:hover { background: rgba(10,11,16,0.9); }

/* Reserve space for the sticky player so the page doesn't jump on mobile */
@media (max-width: 860px) {
  .d-player.is-pinned {
    position: fixed;
    left: auto; right: 12px; bottom: 12px;
    width: min(58vw, 260px);
    aspect-ratio: 16 / 9;
    z-index: 60;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.08) inset;
    animation: pin-in 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .d-player.is-pinned .player-controls {
    padding: 8px 10px;
    gap: 8px;
  }
  .d-player.is-pinned .player-controls .player-progress,
  .d-player.is-pinned .player-controls .player-time,
  .d-player.is-pinned .player-controls .player-actions { display: none; }
  .d-player.is-pinned .play-btn { width: 34px; height: 34px; }
  .d-player.is-pinned .play-btn .ico { width: 14px; height: 14px; }
  .d-player.is-pinned .d-badges { display: none; }
  .d-player.is-pinned .watch-center-play { display: none; }
  .d-player.is-pinned .d-pin-close { display: inline-flex; }
  /* Placeholder on the detail page so the layout doesn't collapse */
  .detail.has-pinned .d-player:not(.is-pinned)::after { content: none; }
  .detail.has-pinned .d-player.is-pinned::before {
    content: ""; position: absolute; inset: -1px;
    border-radius: inherit; pointer-events: none;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
  }
}
@keyframes pin-in {
  from { transform: translateY(16px) scale(0.92); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.d-download {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 16px 0 4px;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #14151d; font-weight: 600; font-size: 14px;
  border: 0; cursor: pointer;
  box-shadow: 0 10px 30px color-mix(in oklab, var(--accent) 30%, transparent);
  transition: transform 0.15s;
}
.d-download:hover { transform: translateY(-1px); }
.d-download .ico { width: 16px; height: 16px; }
.d-download .size { opacity: 0.7; font-family: "Geist Mono", monospace; font-size: 11px; font-weight: 500; }

.d-title {
  font-size: 26px; font-weight: 600; line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 20px 0 10px;
  text-wrap: pretty;
  max-width: 900px;
}
.d-kicker {
  display: flex; gap: 12px; align-items: center;
  font-size: 12px; color: var(--fg-mute);
  font-family: "Geist Mono", monospace;
  margin-bottom: 14px;
}
.d-kicker .sep { opacity: 0.4; }

.d-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 18px; }
.d-tag {
  padding: 6px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--hairline);
  color: var(--fg-dim); font-size: 12px; cursor: pointer;
  backdrop-filter: blur(8px);
  display: inline-flex; align-items: center; gap: 6px;
}
.d-tag::before {
  content: "#"; color: var(--fg-mute); font-family: "Geist Mono", monospace;
}
.d-tag:hover { color: var(--fg); border-color: var(--hairline-strong); }

/* Rating + action row */
.d-action-row {
  display: flex; align-items: center; gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.d-rating { display: flex; align-items: center; gap: 12px; }
.d-rating-score {
  display: flex; flex-direction: column; align-items: flex-start;
}
.d-rating-score .num {
  font-size: 20px; font-weight: 600; letter-spacing: -0.015em;
  line-height: 1;
}
.d-rating-score .count { font-size: 10px; color: var(--fg-mute); font-family: "Geist Mono", monospace; margin-top: 3px; letter-spacing: 0.04em; }
.d-stars { display: inline-flex; gap: 2px; }
.d-star {
  width: 14px; height: 14px; cursor: pointer; color: var(--fg-mute);
  transition: color 0.15s;
}
.d-star.is-on { color: var(--accent); }
.d-star:hover { color: var(--fg); }
.d-rate-label {
  font-size: 9.5px; color: var(--fg-mute); font-family: "Geist Mono", monospace;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-top: 3px;
}
.d-review .stars { margin: 3px 0 6px; color: var(--accent); font-size: 10px; letter-spacing: 1px; }

.d-action-spacer { flex: 1; }
.d-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.d-action {
  padding: 9px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--hairline);
  color: var(--fg-dim); font-size: 13px; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 7px;
  backdrop-filter: blur(8px);
}
.d-action:hover { color: var(--fg); border-color: var(--hairline-strong); }
.d-action.is-on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.d-action .ico { width: 14px; height: 14px; }
.d-action .n { font-family: "Geist Mono", monospace; font-size: 11px; opacity: 0.7; }

/* Tabs for description / reviews / screenshots */
.d-tabs {
  display: flex; gap: 2px;
  margin: 24px 0 0;
  border-bottom: 1px solid var(--hairline);
}
.d-tab {
  padding: 12px 18px;
  font-size: 13px; color: var(--fg-dim); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 8px;
}
.d-tab:hover { color: var(--fg); }
.d-tab.is-active { color: var(--fg); border-bottom-color: var(--accent); }
.d-tab .n {
  background: var(--panel); border: 1px solid var(--hairline);
  padding: 1px 7px; border-radius: 999px;
  font-family: "Geist Mono", monospace; font-size: 10.5px; color: var(--fg-mute);
}

.d-tab-body { padding: 22px 0; }
.d-desc {
  font-size: 14.5px; line-height: 1.7; color: var(--fg-dim);
  max-width: 760px;
  text-wrap: pretty;
}
.d-desc p + p { margin-top: 14px; }
.d-desc strong { color: var(--fg); font-weight: 500; }

/* Inline screenshots */
.d-shots {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin: 22px 0 0;
  max-width: 760px;
}
.d-shot {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, oklch(0.35 0.1 var(--h, 280)), oklch(0.2 0.06 calc(var(--h, 280) + 40)));
  cursor: pointer;
  box-shadow: var(--shadow-card);
}
.d-shot::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 10px);
}
.d-shot-lbl {
  position: absolute; bottom: 8px; left: 10px;
  font-family: "Geist Mono", monospace; font-size: 10px;
  color: rgba(255,255,255,0.7); letter-spacing: 0.08em;
  background: rgba(0,0,0,0.4); padding: 3px 7px; border-radius: 4px;
  backdrop-filter: blur(6px);
}

/* Reviews */
.d-review {
  display: flex; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}
.d-review:last-child { border-bottom: 0; }
.d-review .av {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, oklch(0.6 0.15 var(--h)), oklch(0.4 0.1 var(--h)));
}
.d-review .who { font-size: 13px; font-weight: 500; }
.d-review .when { font-size: 11px; color: var(--fg-mute); font-family: "Geist Mono", monospace; margin-left: 8px; }
.d-review .stars { margin: 4px 0 6px; color: var(--accent); font-size: 12px; letter-spacing: 1px; }
.d-review .body { font-size: 13.5px; color: var(--fg-dim); line-height: 1.6; text-wrap: pretty; }

/* Right column on detail page */
.d-side {
  display: flex; flex-direction: column; gap: 16px;
}
.d-side-head {
  display: flex; align-items: baseline; gap: 10px; padding: 0 2px 10px;
}
.d-side-head h3 {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-mute); font-family: "Geist Mono", monospace;
  font-weight: 500; margin: 0;
}
.d-side-head .more {
  margin-left: auto; font-size: 11px; color: var(--fg-dim); cursor: pointer;
  font-family: "Geist Mono", monospace;
}

/* Creator card in side */
.d-creator-card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(16px);
  display: flex; flex-direction: column; gap: 12px;
}
.d-creator-card .top { display: flex; align-items: center; gap: 12px; }
.d-creator-card .av {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.65 0.16 var(--h)), oklch(0.4 0.1 var(--h)));
  box-shadow: 0 0 0 1px var(--hairline) inset;
}
.d-creator-card .name { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.d-creator-card .kind {
  font-family: "Geist Mono", monospace; font-size: 9.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-mute); padding: 2px 6px; border-radius: 4px;
  background: var(--panel-hi); border: 1px solid var(--hairline);
}
.d-creator-card .handle { font-size: 11.5px; color: var(--fg-mute); font-family: "Geist Mono", monospace; margin-top: 2px; }
.d-creator-card .stats { display: flex; gap: 14px; font-size: 12px; color: var(--fg-dim); font-family: "Geist Mono", monospace; }
.d-creator-card .stats b { color: var(--fg); font-weight: 600; margin-right: 4px; }
.d-creator-card .follow {
  padding: 8px 12px; border-radius: 999px;
  background: var(--fg); color: var(--bg);
  border: 0; cursor: pointer; font-size: 12px; font-family: inherit; font-weight: 500;
}
.d-creator-card .follow.is-on { background: var(--panel-hi); color: var(--fg); border: 1px solid var(--hairline); }

/* "More like this" side list */
.d-side-list { display: flex; flex-direction: column; gap: 10px; }
.d-side-item {
  display: flex; gap: 10px; padding: 8px; border-radius: 12px;
  cursor: pointer;
}
.d-side-item:hover { background: var(--panel); }
.d-side-item .thumb {
  width: 140px; aspect-ratio: 16 / 10;
  border-radius: 8px; flex: 0 0 auto;
  background: repeating-linear-gradient(45deg,
    oklch(0.3 0.04 var(--h, 280) / 0.9) 0 10px,
    oklch(0.26 0.04 var(--h, 280) / 0.9) 10px 20px);
  position: relative; overflow: hidden;
}
html[data-theme="light"] .d-side-item .thumb {
  background: repeating-linear-gradient(45deg,
    oklch(0.88 0.03 var(--h, 280)) 0 10px,
    oklch(0.82 0.03 var(--h, 280)) 10px 20px);
}
.d-side-item .thumb .q {
  position: absolute; top: 5px; left: 5px;
  font-family: "Geist Mono", monospace; font-size: 9px; font-weight: 600;
  letter-spacing: 0.06em;
  background: rgba(10,11,16,0.72); color: #fff;
  padding: 2px 5px; border-radius: 3px;
}
.d-side-item .d-side-text { min-width: 0; flex: 1; }
.d-side-item h4 {
  font-size: 13px; font-weight: 500; line-height: 1.35;
  margin: 2px 0 4px; color: var(--fg);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-wrap: pretty;
}
.d-side-item .meta { font-size: 11px; color: var(--fg-mute); font-family: "Geist Mono", monospace; }

/* =========================================================
   Sign-in pill (topbar)
   ========================================================= */
.signin-pill {
  padding: 9px 18px; border-radius: 999px;
  background: var(--fg); color: var(--bg);
  border: 0; cursor: pointer; font-size: 13px; font-weight: 500;
  font-family: inherit;
}
.signin-pill:hover { opacity: 0.9; }

/* =========================================================
   Toast
   ========================================================= */
.toast {
  position: fixed; left: 50%; bottom: 32px;
  transform: translate(-50%, 16px);
  background: var(--panel-hi); border: 1px solid var(--hairline-strong);
  color: var(--fg); padding: 10px 16px; border-radius: 999px;
  backdrop-filter: blur(16px); box-shadow: var(--shadow-pop);
  font-size: 13px; display: flex; align-items: center; gap: 10px;
  opacity: 0; pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 200;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast .ico { width: 14px; height: 14px; color: var(--accent); }

/* =========================================================
   Tweaks panel
   ========================================================= */
.tweaks {
  position: fixed; right: 20px; bottom: 20px;
  width: 300px;
  background: var(--panel-hi);
  border: 1px solid var(--hairline-strong);
  border-radius: 20px;
  padding: 16px;
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--shadow-pop);
  z-index: 500;
  display: none;
  font-size: 13px;
}
.tweaks.is-on { display: block; }
.tweaks h4 {
  margin: 0 0 12px;
  font-family: "Geist Mono", monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-mute);
  display: flex; align-items: center; gap: 8px;
}
.tweaks h4::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
}
.tweaks .tw-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; }
.tweaks .tw-row + .tw-row { border-top: 1px solid var(--hairline); }
.tweaks .tw-label { color: var(--fg-dim); }
.tweaks .tw-control { display: flex; gap: 4px; }
.tw-chip {
  padding: 4px 8px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--hairline); color: var(--fg-dim);
  font-size: 11.5px; cursor: pointer;
  font-family: "Geist Mono", monospace;
}
.tw-chip.is-on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.tw-swatch {
  width: 22px; height: 22px; border-radius: 50%;
  cursor: pointer; border: 2px solid transparent;
}
.tw-swatch.is-on { border-color: var(--fg); }

/* =========================================================
   Models strip (avatars on home)
   ========================================================= */
.models-strip {
  padding: 16px 28px 4px;
  display: flex; align-items: center; gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.models-strip::-webkit-scrollbar { display: none; }

.ms-head {
  display: flex; flex-direction: column; gap: 2px;
  flex: 0 0 auto;
  padding-right: 6px;
  border-right: 1px solid var(--hairline);
  margin-right: 2px;
}
.ms-head .lbl {
  font-family: "Geist Mono", monospace; font-size: 10.5px;
  color: var(--fg-mute); letter-spacing: 0.12em; text-transform: uppercase;
}
.ms-head .sub {
  font-size: 12px; color: var(--fg-dim);
}

.ms-model {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex: 0 0 auto; cursor: pointer;
  position: relative; padding-top: 3px;
}
.ms-av-wrap {
  padding: 2px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
  transition: transform 0.2s;
}
.ms-model:hover .ms-av-wrap { transform: scale(1.06); }
.ms-av {
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.62 0.16 var(--h)), oklch(0.35 0.1 var(--h)));
  border: 2px solid var(--bg);
  position: relative; overflow: hidden;
}
.ms-av::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 35% 40%, oklch(0.85 0.04 var(--h) / 0.6), transparent 40%),
    radial-gradient(circle at 70% 65%, oklch(0.25 0.04 var(--h) / 0.4), transparent 45%);
}
.ms-name {
  font-size: 11px; color: var(--fg-dim);
  font-family: "Geist Mono", monospace;
  max-width: 66px;
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Studios as horizontal tag scroller */
.studios-scroll {
  padding: 6px 28px 12px;
  display: flex; gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
}
.studios-scroll::-webkit-scrollbar { display: none; }
.studios-scroll .st-chip {
  flex: 0 0 auto;
  padding: 7px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--hairline);
  color: var(--fg-dim); font-size: 12.5px; cursor: pointer;
  backdrop-filter: blur(8px);
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.15s;
}
.studios-scroll .st-chip:hover {
  color: var(--fg); border-color: var(--hairline-strong);
  transform: translateY(-1px);
}
.studios-scroll .st-chip.is-on {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}
.st-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.7 0.16 var(--h)), oklch(0.4 0.1 var(--h)));
  flex: 0 0 auto;
}
.st-chip .n {
  font-family: "Geist Mono", monospace; font-size: 10px;
  opacity: 0.5; margin-left: 2px;
}

/* =========================================================
   Auth modal (Sign in / Create account)
   ========================================================= */
.auth-backdrop {
  position: fixed; inset: 0;
  background: rgba(5, 6, 10, 0.78);
  backdrop-filter: blur(10px);
  z-index: 600;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-backdrop.is-on { opacity: 1; pointer-events: auto; }

.auth-card {
  width: 100%; max-width: 420px;
  background: var(--panel-solid);
  border: 1px solid var(--hairline-strong);
  border-radius: 20px;
  padding: 22px 22px 24px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.2s;
  position: relative;
}
.auth-backdrop.is-on .auth-card { transform: none; }

.auth-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 8px;
  background: transparent; border: 0; color: var(--fg-mute);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.auth-close:hover { color: var(--fg); background: var(--panel); }

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 3px;
  margin: 4px 0 20px;
}
.auth-tab {
  padding: 9px 12px; border-radius: 9px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--fg-mute); font-size: 13px; font-family: inherit;
  font-weight: 500;
}
.auth-tab.is-on {
  background: var(--panel-hi); color: var(--fg);
  box-shadow: 0 1px 0 var(--hairline-strong) inset;
}

.auth-title {
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.015em; margin: 0 0 4px;
}
.auth-sub {
  font-size: 13px; color: var(--fg-mute); margin: 0 0 18px;
}

.auth-field { margin-bottom: 14px; }
.auth-field label {
  display: block; font-size: 12px; color: var(--fg-dim);
  margin-bottom: 6px; font-weight: 500;
}
.auth-field input {
  width: 100%;
  padding: 11px 14px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  color: var(--fg); font-size: 13.5px; font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel-hi);
}

.auth-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--fg-dim);
  margin: 4px 0 16px;
  cursor: pointer;
  user-select: none;
}
.auth-check input { accent-color: var(--accent); }

.auth-submit {
  width: 100%;
  padding: 12px 18px;
  background: var(--fg); color: var(--bg);
  border: 0; border-radius: 10px;
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.auth-submit:hover { background: oklch(0.88 0 0); }
.auth-submit:active { transform: scale(0.99); }

.auth-foot {
  text-align: center; margin-top: 16px;
  font-size: 12px; color: var(--fg-mute);
}
.auth-foot a {
  color: var(--fg-dim); cursor: pointer;
  border-bottom: 1px solid var(--hairline-strong);
}
.auth-foot a:hover { color: var(--fg); }

/* =========================================================
   Account page
   ========================================================= */
.account {
  padding: 22px 28px 80px;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
@media (max-width: 900px) { .account { grid-template-columns: 1fr; } }

.acc-nav {
  position: sticky; top: 20px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 6px;
  backdrop-filter: blur(16px);
  display: flex; flex-direction: column; gap: 2px;
}
.acc-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--fg-dim); font-size: 13.5px; cursor: pointer;
  font-family: inherit;
  border: 0; background: transparent; text-align: left;
}
.acc-nav-item .ico { width: 16px; height: 16px; }
.acc-nav-item:hover { color: var(--fg); background: var(--panel-hi); }
.acc-nav-item.is-on {
  background: color-mix(in oklab, var(--accent) 16%, transparent);
  color: var(--fg);
  box-shadow: inset 2px 0 0 var(--accent);
}
.acc-nav-sep {
  height: 1px; background: var(--hairline); margin: 6px 8px;
}

.acc-main { min-width: 0; }

/* Verification banner */
.acc-verify {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: color-mix(in oklab, oklch(0.75 0.15 70) 16%, transparent);
  border: 1px solid color-mix(in oklab, oklch(0.75 0.15 70) 35%, transparent);
  color: oklch(0.85 0.12 70);
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 22px;
}
.acc-verify .ico { width: 16px; height: 16px; }
.acc-verify a {
  color: oklch(0.9 0.1 70); cursor: pointer;
  border-bottom: 1px solid currentColor; margin-left: auto;
}

/* User header */
.acc-header {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 20px;
}
.acc-avatar {
  width: 88px; height: 88px; border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.6 0.15 var(--h, 280)), oklch(0.35 0.1 var(--h, 280)));
  border: 2px solid var(--hairline-strong);
  position: relative; overflow: hidden;
  flex: 0 0 auto;
}
.acc-avatar::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 35% 40%, oklch(0.85 0.04 var(--h, 280) / 0.5), transparent 40%);
}
.acc-name {
  font-size: 24px; font-weight: 600;
  letter-spacing: -0.015em; margin: 0;
}
.acc-email {
  font-size: 13px; color: var(--fg-mute);
  font-family: "Geist Mono", monospace;
  margin-top: 2px;
}
.acc-since {
  font-size: 11px; color: var(--fg-mute);
  font-family: "Geist Mono", monospace;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-top: 8px;
}

/* Stats cards */
.acc-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-bottom: 28px;
}
@media (max-width: 680px) { .acc-stats { grid-template-columns: 1fr; } }

.acc-stat {
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.acc-stat:hover {
  border-color: var(--hairline-strong);
  transform: translateY(-1px);
}
.acc-stat .num {
  font-size: 32px; font-weight: 600;
  letter-spacing: -0.02em; line-height: 1;
  display: block;
}
.acc-stat .lbl {
  font-size: 12px; color: var(--fg-mute);
  font-family: "Geist Mono", monospace;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-top: 10px;
  display: flex; align-items: center; gap: 6px;
}
.acc-stat .lbl .ico { width: 12px; height: 12px; }
.acc-stat.is-accent .lbl { color: var(--accent); }

/* Section head in account */
.acc-sec-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 14px;
}
.acc-sec-head h2 {
  font-size: 15px; font-weight: 600; margin: 0;
}
.acc-sec-head .sub {
  font-size: 11.5px; color: var(--fg-mute);
  font-family: "Geist Mono", monospace;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.acc-sec-head .spacer { flex: 1; }
.acc-sec-head .more {
  font-size: 12px; color: var(--fg-dim); cursor: pointer;
  font-family: "Geist Mono", monospace;
}

/* Compact video grid used inside account */
.acc-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-bottom: 30px;
}
.acc-vcard {
  cursor: pointer;
  min-width: 0;
}
.acc-vcard .vt {
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  background: repeating-linear-gradient(45deg,
    oklch(0.3 0.04 var(--h, 280) / 0.9) 0 10px,
    oklch(0.26 0.04 var(--h, 280) / 0.9) 10px 20px);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 8px;
  transition: transform 0.15s;
}
html[data-theme="light"] .acc-vcard .vt {
  background: repeating-linear-gradient(45deg,
    oklch(0.88 0.03 var(--h, 280)) 0 10px,
    oklch(0.82 0.03 var(--h, 280)) 10px 20px);
}
.acc-vcard:hover .vt { transform: translateY(-2px); }
.acc-vcard .vt-q {
  position: absolute; top: 6px; left: 6px;
  font-family: "Geist Mono", monospace; font-size: 9.5px;
  font-weight: 600; letter-spacing: 0.06em;
  background: rgba(10,11,16,0.72); color: #fff;
  padding: 2px 5px; border-radius: 3px;
}
.acc-vcard .vt-dur {
  position: absolute; bottom: 6px; right: 6px;
  font-family: "Geist Mono", monospace; font-size: 10px;
  background: rgba(10,11,16,0.78); color: #fff;
  padding: 3px 6px; border-radius: 4px;
}
.acc-vcard h3 {
  font-size: 13px; font-weight: 500; line-height: 1.35;
  margin: 0 0 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-wrap: pretty;
}
.acc-vcard .vt-meta {
  font-size: 11px; color: var(--fg-mute);
  font-family: "Geist Mono", monospace;
}
.acc-vcard .vt-cr { color: var(--fg-dim); }

/* Following lists */
.acc-follow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}
.acc-follow-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--hairline);
  cursor: pointer; transition: border-color 0.15s;
}
.acc-follow-card:hover { border-color: var(--hairline-strong); }
.acc-follow-card .av {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.65 0.16 var(--h)), oklch(0.4 0.1 var(--h)));
  flex: 0 0 auto;
}
.acc-follow-card .name { font-size: 13px; font-weight: 500; }
.acc-follow-card .kind {
  font-size: 10px; color: var(--fg-mute);
  font-family: "Geist Mono", monospace;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-top: 2px;
}
.acc-follow-card .unfollow {
  margin-left: auto;
  padding: 5px 10px;
  background: var(--panel-hi); border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--fg-dim); font-size: 11px; cursor: pointer;
  font-family: inherit;
}
.acc-follow-card .unfollow:hover { color: var(--fg); }

/* Settings rows */
.acc-settings {
  display: flex; flex-direction: column; gap: 10px;
}
.acc-set-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: 12px;
  backdrop-filter: blur(12px);
}
.acc-set-row .lbl { font-size: 13.5px; font-weight: 500; }
.acc-set-row .desc { font-size: 12px; color: var(--fg-mute); margin-top: 2px; }
.acc-set-row .tail { margin-left: auto; }

.acc-toggle {
  width: 44px; height: 24px; border-radius: 999px;
  background: var(--panel-hi); border: 1px solid var(--hairline);
  position: relative; cursor: pointer;
  transition: background 0.15s;
}
.acc-toggle::after {
  content: ""; position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--fg-mute);
  transition: all 0.15s;
}
.acc-toggle.is-on { background: var(--accent); border-color: transparent; }
.acc-toggle.is-on::after { left: 22px; background: var(--bg); }

.acc-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--fg-mute);
  border: 1px dashed var(--hairline);
  border-radius: 14px;
  font-size: 13px;
}
.acc-empty h3 { margin: 0 0 4px; color: var(--fg-dim); font-size: 15px; font-weight: 500; }

/* User pill for topbar (replaces signin-pill when logged in) */
.user-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: 999px;
  cursor: pointer; font-family: inherit;
  color: var(--fg-dim); font-size: 12.5px;
  transition: border-color 0.15s;
}
.user-pill:hover { border-color: var(--hairline-strong); color: var(--fg); }
.user-pill .av {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.65 0.16 var(--h, 280)), oklch(0.4 0.1 var(--h, 280)));
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--hairline-strong); background-clip: content-box; border: 2px solid transparent; }


/* =========================================================
   Active filter chip (home)
   ========================================================= */
.active-filter {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 6px 0 14px;
  padding: 8px 12px;
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 35%, var(--hairline));
  border-radius: 999px;
}
.af-label {
  font-size: 10px; letter-spacing: 0.14em;
  color: var(--fg-mute);
}
.af-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--fg);
}
.af-chip button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--fg); color: var(--bg); border: 0;
  font-size: 13px; line-height: 1; cursor: pointer;
  padding: 0;
}

/* =========================================================
   Browse page (Tags / Categories / Studios / Models)
   ========================================================= */
.browse {
  padding: 18px 28px 80px;
  max-width: 1600px;
  margin: 0 auto;
}

.browse-head {
  display: flex; flex-direction: column; gap: 16px;
  padding-bottom: 4px;
}
.browse-title {
  font-size: 26px; font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
  display: flex; align-items: baseline; gap: 10px;
}
.browse-count {
  font-size: 13px; color: var(--fg-mute);
  font-weight: 400;
}

.browse-tabs {
  display: flex; gap: 4px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 4px;
  align-self: flex-start;
  backdrop-filter: blur(10px);
}
.br-tab {
  padding: 8px 16px;
  border-radius: 9px;
  background: transparent; border: 0;
  color: var(--fg-mute); font-family: inherit;
  font-size: 13px; font-weight: 500; cursor: pointer;
}
.br-tab:hover { color: var(--fg); }
.br-tab.is-on {
  background: var(--panel-hi); color: var(--fg);
  box-shadow: 0 1px 0 var(--hairline-strong) inset;
}

.browse-controls {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.br-search {
  position: relative;
  display: flex; align-items: center;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 9px 14px 9px 40px;
  width: min(420px, 100%);
  backdrop-filter: blur(10px);
  transition: border-color 0.15s, box-shadow 0.2s;
}
.br-search:focus-within {
  border-color: color-mix(in oklab, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 15%, transparent);
}
.br-search .ico {
  position: absolute; left: 14px;
  width: 16px; height: 16px; color: var(--fg-mute);
}
.br-search input {
  background: transparent; border: 0; outline: 0;
  color: var(--fg); font-size: 13.5px; width: 100%;
  font-family: inherit;
}
.br-search input::placeholder { color: var(--fg-mute); }

.br-sort, .br-view {
  display: inline-flex; gap: 4px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px;
}
.br-sort-chip {
  padding: 6px 14px; border-radius: 999px;
  background: transparent; border: 0;
  color: var(--fg-mute); font-family: inherit;
  font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.br-sort-chip:hover { color: var(--fg); }
.br-sort-chip.is-on {
  background: var(--accent); color: #14151d;
}

.br-view-btn {
  width: 32px; height: 32px; border-radius: 999px;
  background: transparent; border: 0;
  color: var(--fg-mute); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.br-view-btn svg { width: 16px; height: 16px; }
.br-view-btn:hover { color: var(--fg); }
.br-view-btn.is-on {
  background: var(--fg); color: var(--bg);
}

.br-alpha {
  display: flex; gap: 2px; flex-wrap: wrap;
  padding: 6px 0 14px;
}
.br-letter {
  min-width: 28px; height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--panel); border: 1px solid var(--hairline);
  color: var(--fg-dim); font-family: "Geist Mono", monospace;
  font-size: 11.5px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.12s;
}
.br-letter:hover { color: var(--fg); border-color: var(--hairline-strong); }
.br-letter.is-on {
  background: var(--accent); color: #14151d; border-color: transparent;
}
.br-letter.is-dim { opacity: 0.35; cursor: default; }
.br-letter.is-dim:hover { color: var(--fg-dim); border-color: var(--hairline); }

/* Pills grid */
.br-pills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 4px;
}
.br-pill {
  display: inline-flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  color: var(--fg); font-family: inherit;
  font-size: 13px; cursor: pointer; text-align: left;
  transition: all 0.12s;
  min-width: 0;
}
.br-pill:hover {
  background: var(--panel-hi);
  border-color: var(--hairline-strong);
  transform: translateY(-1px);
}
.br-pill-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1; min-width: 0;
}
.br-pill-count {
  flex: 0 0 auto;
  font-size: 10.5px; color: var(--fg-mute);
  background: var(--panel-hi);
  border: 1px solid var(--hairline);
  padding: 2px 8px; border-radius: 999px;
}

/* Card grid */
.br-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.br-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 0;
  background: transparent; border: 0;
  color: var(--fg); font-family: inherit;
  text-align: left; cursor: pointer;
}
.br-card-art {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(135deg,
      oklch(0.35 0.12 var(--h, 280)),
      oklch(0.2 0.08 calc(var(--h, 280) + 40)));
  box-shadow: var(--shadow-card);
  transition: transform 0.25s, box-shadow 0.25s;
}
.br-card:hover .br-card-art {
  transform: translateY(-3px);
  box-shadow: var(--shadow-pop);
}
.br-card-pattern {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.08) 0 2px, transparent 2px 12px);
}
.br-card-avatar {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 35% 40%, oklch(0.82 0.08 var(--h, 280) / 0.75), transparent 45%),
    radial-gradient(circle at 65% 70%, oklch(0.35 0.1 calc(var(--h, 280) + 40) / 0.7), transparent 50%),
    linear-gradient(135deg, oklch(0.55 0.18 var(--h, 280)), oklch(0.3 0.1 calc(var(--h, 280) + 40)));
}
.br-card-avatar::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(135deg, rgba(0,0,0,0.1) 0 2px, transparent 2px 14px);
  mix-blend-mode: multiply;
}
.br-card-count {
  position: absolute; bottom: 10px; right: 10px;
  font-size: 10px; letter-spacing: 0.06em;
  background: rgba(10,11,16,0.72); color: #fff;
  padding: 4px 8px; border-radius: 6px;
  backdrop-filter: blur(8px);
}
.br-card-meta {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 2px;
  min-width: 0;
}
.br-card-name {
  font-size: 13.5px; font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--fg);
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}
.br-card-sub {
  font-size: 11px; color: var(--fg-mute);
}

/* Grouped (A-Z) view */
.br-groups { display: flex; flex-direction: column; gap: 22px; }
.br-group { display: flex; flex-direction: column; gap: 10px; }
.br-group-letter {
  font-family: "Geist Mono", monospace;
  font-size: 20px; font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  padding: 2px 0 2px;
}

.br-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--fg-mute);
  font-size: 13px;
}


/* =========================================================
   Language switcher (topbar)
   ========================================================= */
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  color: var(--fg-dim); cursor: pointer;
  font-family: inherit; font-size: 12.5px;
  backdrop-filter: blur(12px);
  transition: all 0.15s;
}
.lang-btn:hover { color: var(--fg); border-color: var(--hairline-strong); transform: translateY(-1px); }
.lang-btn .flag {
  width: 22px; height: 15px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset;
  display: block;
  overflow: hidden;
  flex: 0 0 auto;
}
.lang-code {
  font-size: 11px; letter-spacing: 0.05em; color: var(--fg);
}
.lang-chev {
  width: 12px; height: 12px; color: var(--fg-mute);
}

.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 240px;
  background: var(--panel-hi);
  border: 1px solid var(--hairline-strong);
  border-radius: 14px;
  padding: 6px;
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--shadow-pop);
  z-index: 50;
  max-height: 420px;
  overflow: auto;
}
.lang-menu-head {
  padding: 8px 12px 6px;
  font-size: 10px; letter-spacing: 0.14em;
  color: var(--fg-mute);
}
.lang-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent; border: 0;
  color: var(--fg); cursor: pointer;
  font-family: inherit; font-size: 13px; text-align: left;
}
.lang-item:hover { background: var(--panel); }
.lang-item.is-on { background: color-mix(in oklab, var(--accent) 16%, transparent); }
.lang-item .flag {
  width: 22px; height: 15px; border-radius: 3px; flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1) inset;
}
.lang-item .lbl { flex: 1; }
.lang-item .code { font-size: 10.5px; color: var(--fg-mute); }

/* =========================================================
   Entity header (shown on home when filter is active)
   ========================================================= */
.entity-hdr {
  display: flex; gap: 20px;
  align-items: stretch;
  margin: 6px 0 20px;
  padding: 18px;
  background:
    linear-gradient(135deg,
      color-mix(in oklab, oklch(0.5 0.15 var(--h, 280)) 22%, var(--panel)),
      var(--panel));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.entity-hdr::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 10px);
  pointer-events: none;
}

.entity-cover {
  width: 120px; flex: 0 0 120px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 0 1px var(--hairline) inset;
}
.entity-avatar {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 35% 40%, oklch(0.82 0.08 var(--h, 280) / 0.8), transparent 50%),
    radial-gradient(circle at 65% 70%, oklch(0.35 0.12 calc(var(--h, 280) + 40) / 0.7), transparent 50%),
    linear-gradient(135deg, oklch(0.55 0.18 var(--h, 280)), oklch(0.3 0.1 calc(var(--h, 280) + 40)));
}
.entity-pattern {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, oklch(0.4 0.14 var(--h, 280)), oklch(0.2 0.08 calc(var(--h, 280) + 40))),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.08) 0 2px, transparent 2px 14px);
  background-blend-mode: overlay;
}
.entity-tag-art {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,
    oklch(0.7 0.18 var(--h, 280)),
    oklch(0.4 0.12 calc(var(--h, 280) + 60)));
}
.entity-tag-art span {
  font-size: 56px; color: rgba(255,255,255,0.85);
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  font-weight: 700;
  line-height: 1;
}

.entity-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
.entity-kind {
  font-size: 10.5px; letter-spacing: 0.14em;
  color: var(--fg-mute);
}
.entity-name {
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
  text-wrap: balance;
}
.entity-name .h { color: var(--accent); margin-right: 2px; }
.entity-stats {
  font-size: 12px; color: var(--fg-dim);
  display: flex; gap: 6px; align-items: center;
  flex-wrap: wrap;
}
.entity-stats b { color: var(--fg); font-weight: 600; }

.entity-search {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 4px 4px 4px 12px;
  max-width: 640px;
}
.entity-search .ico {
  width: 15px; height: 15px; color: var(--fg-mute); flex: 0 0 auto;
}
.entity-search input {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--fg); font-family: inherit; font-size: 13px;
  padding: 8px 6px;
  min-width: 0;
}
.entity-search input::placeholder { color: var(--fg-mute); }
.entity-clear {
  padding: 7px 14px;
  border-radius: 9px;
  background: var(--fg); color: var(--bg);
  border: 0; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 500;
  flex: 0 0 auto;
}
.entity-clear:hover { opacity: 0.9; }

.entity-tags {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 6px;
}
.e-tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  color: var(--fg-dim);
  font-family: inherit; font-size: 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.12s;
}
.e-tag:hover { color: var(--fg); border-color: var(--hairline-strong); }
.e-tag.is-on {
  background: color-mix(in oklab, var(--accent) 22%, transparent);
  border-color: color-mix(in oklab, var(--accent) 45%, transparent);
  color: var(--fg);
}
.e-tag .n {
  font-size: 10px; color: var(--fg-mute);
  background: var(--panel-hi);
  border: 1px solid var(--hairline);
  padding: 1px 6px; border-radius: 999px;
}

@media (max-width: 720px) {
  .entity-hdr { flex-direction: column; padding: 14px; }
  .entity-cover { width: 100%; flex: 0 0 auto; height: 120px; }
  .entity-name { font-size: 24px; }
}


/* Category rows in sidebar */
.cat-row { cursor: pointer; }
.cat-row:hover { background: var(--panel); }
.cat-row.is-active {
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  color: var(--fg);
}
.cat-row.is-active .name { color: var(--fg); font-weight: 500; }
.cat-av {
  background:
    radial-gradient(circle at 30% 30%, oklch(0.78 0.14 var(--h, 280) / 0.95), transparent 55%),
    linear-gradient(135deg, oklch(0.55 0.17 var(--h, 280)), oklch(0.32 0.1 calc(var(--h, 280) + 40)));
}


/* =========================================================
   Paging — infinite sentinel / load more / pagination
   ========================================================= */
.paging {
  margin: 28px 0 8px;
  display: flex;
  justify-content: center;
}

/* Infinite scroll — pulsing sentinel */
.infinite-sentinel {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 28px 0;
}
.infinite-sentinel .dots {
  display: flex; gap: 6px;
}
.infinite-sentinel .dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--fg-mute);
  animation: dotPulse 1.1s ease-in-out infinite;
}
.infinite-sentinel .dots span:nth-child(2) { animation-delay: 0.15s; }
.infinite-sentinel .dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40%           { opacity: 1;   transform: scale(1.1); background: var(--accent); }
}
.infinite-sentinel .lbl {
  font-size: 10.5px; letter-spacing: 0.12em;
  color: var(--fg-mute);
}

.end-of-feed {
  padding: 24px 0;
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--fg-mute);
  text-align: center;
  border-top: 1px solid var(--hairline);
  margin-top: 8px;
  width: 100%;
}

/* Load more button */
.load-more-btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--panel-hi);
  border: 1px solid var(--hairline-strong);
  color: var(--fg);
  font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.15s;
  margin: 8px auto;
}
.load-more-btn:hover {
  border-color: color-mix(in oklab, var(--accent) 50%, transparent);
  background: color-mix(in oklab, var(--accent) 10%, var(--panel-hi));
  transform: translateY(-1px);
}
.load-more-btn .lm-sub {
  font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--fg-mute);
  padding-left: 12px; border-left: 1px solid var(--hairline);
}

/* Pagination — numbered pager */
.pager {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 8px;
}
.p-btn {
  min-width: 36px; height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  color: var(--fg-dim);
  font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  display: inline-flex; align-items: center; justify-content: center;
}
.p-btn:hover:not(:disabled) {
  color: var(--fg); border-color: var(--hairline-strong);
}
.p-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.p-btn.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.p-btn.p-num { min-width: 36px; padding: 0; }
.p-nums { display: flex; gap: 6px; }
.p-gap {
  padding: 0 6px; color: var(--fg-mute);
  display: inline-flex; align-items: center;
  font-size: 13px;
}
.p-summary {
  font-size: 10.5px; letter-spacing: 0.12em;
  color: var(--fg-mute);
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--hairline);
}

@media (max-width: 640px) {
  .p-summary { display: none; }
  .p-btn.p-nav { padding: 0 10px; font-size: 12px; }
}

/* =========================================================
   XSOnlyTube theme-only additions (not in original prototype)
   ========================================================= */
.xsot-sentinel { width: 100%; height: 1px; }
.xsot-loadmore-wrap { display: flex; justify-content: center; padding: 32px 0; }
.xsot-loadmore {
	padding: 12px 24px;
	border-radius: 999px;
	background: var(--panel);
	border: 1px solid var(--hairline-strong);
	color: var(--fg);
	font: inherit;
	cursor: pointer;
}
.xsot-loadmore:hover { background: var(--panel-hi); }

/* Embedded video fills the player frame. */
.d-embed { position: relative; width: 100%; height: 100%; display: block; }
.d-embed iframe,
.d-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.d-embed-link { display: inline-flex; align-items: center; justify-content: center; padding: 14px 20px; color: var(--fg); }

/* Auth error banner. */
.xsot-auth-error {
	margin-top: 10px;
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	background: oklch(0.65 0.18 22 / 0.18);
	color: var(--fg);
	font-size: 13px;
}

/* Settings gear in the topbar uses existing .icon-btn — nothing extra needed. */
/* Thumbnails using a background-image already get proper sizing via .card-thumb. */

/* Native paginate_links output inside .feed — lightweight style. */
.feed > .page-numbers,
.feed > ul.page-numbers {
	display: flex;
	gap: 6px;
	justify-content: center;
	padding: 24px 0;
	list-style: none;
	flex-wrap: wrap;
}
.feed .page-numbers li { list-style: none; }
.feed a.page-numbers,
.feed span.page-numbers {
	display: inline-flex;
	align-items: center;
	padding: 8px 12px;
	border-radius: 10px;
	background: var(--panel);
	border: 1px solid var(--hairline);
	color: var(--fg);
	text-decoration: none;
	font-size: 13px;
}
.feed span.page-numbers.current { background: var(--accent); color: #0b0b10; border-color: transparent; }

/* Make sidebar brand clickable cleanly. */
a.sidebar-brand { text-decoration: none; color: inherit; display: flex; }

/* Star rating hover already styled; ensure cursor feedback. */
.d-star { cursor: pointer; }

/* Topbar crumbs as a link. */
.crumbs a { color: inherit; text-decoration: none; cursor: pointer; }
.crumbs a:hover { color: var(--fg); }

/* Hidden helper used by [hidden] across panes and errors. */
[hidden] { display: none !important; }

/* =========================================================
   Phase 2 additions: remove underlines, post-kind layouts,
   term-image support on cards & entity headers.
   ========================================================= */

/* Global link reset — match the prototype's no-underline aesthetic. */
a, a:hover, a:focus, a:visited { text-decoration: none; color: inherit; }
a:hover { color: var(--accent); }
.sidebar-brand, .sidebar-item, .creator-row,
.ms-model, .st-chip, .tab,
.card, .hero-card, .d-side-item,
.acc-nav-item, .acc-vcard, .acc-follow-card a,
.br-tab, .br-card, .br-pill, .br-letter, .br-sort-chip,
.d-tag, .d-action, .crumbs a, .detail-crumbs a {
	text-decoration: none;
	color: inherit;
}
/* Keep body/description links readable with accent, still no underline. */
.d-desc a, .entity-desc a { color: var(--accent); }
.d-desc a:hover, .entity-desc a:hover { text-decoration: underline; }

/* Tabs divider between Kind filters and Category chips on the home feed. */
.tabs-divider { display: inline-block; width: 1px; align-self: stretch; background: var(--hairline); margin: 0 6px; }

/* News layout: hero image instead of player. */
.d-news-hero {
	width: 100%;
	aspect-ratio: 16 / 7;
	border-radius: var(--radius-lg);
	background-size: cover;
	background-position: center;
	margin-bottom: 18px;
	box-shadow: var(--shadow-card);
}
.detail-kind-news .d-title { font-size: 34px; line-height: 1.15; }

/* Archive layout: heroish block with badges. */
.d-archive-hero {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius-lg);
	background: linear-gradient(145deg, oklch(0.25 0.06 var(--h) / 0.6), oklch(0.15 0.04 var(--h) / 0.8));
	background-color: var(--panel-solid);
	background-size: cover;
	background-position: center;
	overflow: hidden;
	box-shadow: var(--shadow-card);
	margin-bottom: 18px;
}
.d-archive-hero .d-badges { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; }

/* Image-post gallery layout. */
.d-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 10px;
	margin-bottom: 18px;
}
.d-gallery-item {
	display: block;
	overflow: hidden;
	border-radius: var(--radius);
	aspect-ratio: 4 / 3;
	background: var(--panel);
}
.d-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.d-gallery-item:hover img { transform: scale(1.04); }

/* Post-type chip variants — reuse .chip.archive styling for NEWS/IMAGES. */
.chip.archive { letter-spacing: .08em; }

/* Term-image on category / tag chips in the sidebar (background-image applied inline via style). */
.creator-av.cat-av { background-color: oklch(0.55 0.15 var(--h)); background-size: cover; background-position: center; }

/* Browse cards with images. */
.br-card-avatar, .br-card-pattern { background-size: cover; background-position: center; }

/* Creator avatar on card meta: support background-image (set inline). */
.card-av { background-size: cover; background-position: center; }

/* Thumbnails on .card-thumb: ensure any <img> inside behaves like background. */
.card-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-thumb { position: relative; }

/* Kind-filter chip spacing on home tabs. */
.tabs-row .tab { white-space: nowrap; }

/* Always-visible floating trigger for the Tweaks panel. */
.xsot-tweaks-fab {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 90;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: 1px solid var(--hairline-strong);
	background: var(--panel);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	color: var(--fg);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-pop);
	transition: transform .15s ease, background .15s ease;
}
.xsot-tweaks-fab:hover { transform: translateY(-2px); background: var(--panel-hi); }
.xsot-tweaks-fab .ico { width: 20px; height: 20px; }

/* =========================================================
   Accessibility: contrast bumps for small/uppercase UI labels.
   ========================================================= */
.sidebar-label { color: var(--fg-dim); }
html[data-theme="light"] .sidebar-label { color: #4a4c5a; }

.sidebar-brand { color: var(--fg); }
.brand-word    { color: var(--fg); }

/* "Collapse" label at sidebar foot — same treatment. */
.collapse-btn .side-text { color: var(--fg-dim); }

/* The "mono" stats / kicker lines on cards use --fg-mute too — bump. */
.card-stats.mono { color: var(--fg-dim); }
.d-kicker.mono   { color: var(--fg-dim); }

/* =========================================================
   Mobile sidebar: drawer with backdrop, triggered by hamburger.
   ========================================================= */
.xsot-hamburger { display: none; }
.xsot-sidebar-backdrop {
	position: fixed; inset: 0;
	background: rgba(0,0,0,0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 0;
	pointer-events: none;
	transition: opacity .22s ease;
	z-index: 79;
}

@media (max-width: 860px) {
	.xsot-hamburger { display: inline-flex; }

	/* App collapses to single column; sidebar becomes an overlay drawer. */
	.app { grid-template-columns: 1fr !important; }
	.sidebar {
		position: fixed; top: 0; left: 0;
		height: 100dvh;
		width: min(84vw, 320px);
		padding: 18px 14px;
		transform: translateX(-100%);
		transition: transform .28s cubic-bezier(0.4, 0, 0.2, 1);
		z-index: 80;
		background: var(--panel-solid);
		border-right: 1px solid var(--hairline);
		overflow-y: auto;
	}
	.app.is-sidebar-open .sidebar { transform: translateX(0); }
	.app.is-sidebar-open .xsot-sidebar-backdrop {
		opacity: 1;
		pointer-events: auto;
	}

	/* On mobile, always show text regardless of `data-sidebar` state. */
	.app[data-sidebar="collapsed"] .sidebar-label,
	.app[data-sidebar="collapsed"] .side-text,
	.app[data-sidebar="collapsed"] .brand-word { display: initial; }
	/* Hide the Collapse button on mobile (drawer is closed by tap-outside). */
	.sidebar-foot { display: none; }

	/* Prevent body scroll under the drawer. */
	body.xsot-lock-scroll { overflow: hidden; }

	/* Topbar: compact on mobile. */
	.topbar { padding: 10px 14px; gap: 8px; }
	.topbar .search { min-width: 0; flex: 1; }
	.topbar .crumbs { display: none; }
}

/* Contrast fixes v2 — brand + keyboard hint. */
.sidebar-brand,
.sidebar-brand .brand-word { color: #ececf1; }
html[data-theme="light"] .sidebar-brand,
html[data-theme="light"] .sidebar-brand .brand-word { color: #14151d; }

.search .kbd {
	color: var(--fg-dim);
	background: var(--panel-hi);
	border: 1px solid var(--hairline-strong);
}
html[data-theme="light"] .search .kbd { color: #4a4c5a; }

/* Gutter between sidebar/content and content/right edge. */
.main > *:not(.topbar) { padding-left: 28px; padding-right: 28px; }
.main > .hero          { margin-left: 0; margin-right: 0; }
.main > .feed          { padding-top: 12px; padding-bottom: 48px; }

@media (max-width: 860px) {
	.main > *:not(.topbar) { padding-left: 14px; padding-right: 14px; }
}

/* =========================================================
   VidStream port: parts switcher, downloads, hover preview,
   ratings, quality badges, FULL chip.
   ========================================================= */

/* Player parts wrapper. */
.vs-player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: #000;
	box-shadow: var(--shadow-card);
}
.vs-player-part { position: absolute; inset: 0; width: 100%; height: 100%; }
.vs-player-part iframe,
.vs-player-part video { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.vs-player-part[hidden] { display: none; }
.vs-player-empty {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	color: var(--fg-dim);
	font-size: 14px;
}

/* Parts switcher tabs. */
.vs-parts {
	display: flex;
	gap: 6px;
	margin: 12px 0;
	flex-wrap: wrap;
}
.vs-part-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--panel);
	border: 1px solid var(--hairline);
	color: var(--fg);
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}
.vs-part-btn:hover { background: var(--panel-hi); }
.vs-part-btn.is-on { background: var(--accent); color: #0b0b10; border-color: transparent; }
.vs-part-btn .mono { opacity: 0.7; font-size: 11px; }

/* Downloads block. */
.vs-downloads { margin: 14px 0 18px; }
.vs-downloads .d-download {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 18px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #0b0b10;
	font-weight: 600;
	cursor: pointer;
	border: 0;
}
.vs-downloads .d-download:hover { opacity: 0.92; }
.vs-downloads-dropdown { position: relative; display: inline-block; }
.vs-downloads-dropdown > summary {
	list-style: none;
	display: inline-flex;
}
.vs-downloads-dropdown > summary::-webkit-details-marker { display: none; }
.vs-downloads-dropdown .count {
	font-size: 12px;
	opacity: 0.8;
	margin-left: 6px;
}
.vs-downloads-dropdown ul {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 260px;
	background: var(--panel-solid);
	border: 1px solid var(--hairline);
	border-radius: 10px;
	padding: 6px;
	list-style: none;
	margin: 0;
	box-shadow: var(--shadow-pop);
	z-index: 30;
}
.vs-downloads-dropdown ul li { list-style: none; }
.vs-downloads-dropdown ul a {
	display: block;
	padding: 8px 12px;
	border-radius: 6px;
	color: var(--fg);
	font-size: 14px;
}
.vs-downloads-dropdown ul a:hover { background: var(--panel-hi); }

/* Card hover video overlay. */
.card-thumb { position: relative; overflow: hidden; }
.xsot-hover-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 1;
	pointer-events: none;
}
.card-thumb .thumb-chips,
.card-thumb .card-save,
.card-thumb .scrub,
.card-thumb .preview-veil { z-index: 2; }

/* Quality badges: colored pills. */
.chip.q.q-8k   { background: oklch(0.75 0.2 310); color: #fff; }
.chip.q.q-4k   { background: oklch(0.72 0.2 285); color: #fff; }
.chip.q.q-qhd  { background: oklch(0.72 0.18 250); color: #fff; }
.chip.q.q-fhd  { background: oklch(0.72 0.18 210); color: #fff; }
.chip.q.q-hd   { background: oklch(0.68 0.14 190); color: #fff; }
.chip.q.q-sd   { background: oklch(0.58 0.06 260); color: #fff; }
.chip.q.full   { background: oklch(0.75 0.2 22); color: #fff; letter-spacing: 0.1em; }

/* 5-star rating: orange stars. */
.d-stars .d-star { cursor: pointer; color: var(--fg-mute); transition: color .12s ease; }
.d-stars .d-star.is-on { color: oklch(0.82 0.18 80); }
.d-stars:hover .d-star { color: oklch(0.82 0.18 80); }
.d-stars .d-star:hover ~ .d-star { color: var(--fg-mute); }

/* Like counter chip inside the Like button. */
.d-action .n { margin-left: 6px; font-size: 12px; opacity: 0.7; }

/* Avatar upload + profile edit. */
.xsot-avatar-edit { display: flex; align-items: center; }
.xsot-avatar-preview {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	background: oklch(0.45 0.12 280);
	background-size: cover;
	background-position: center;
	border: 2px solid var(--hairline-strong);
}

.acc-set-row input[type="text"],
.acc-set-row input[type="password"],
.acc-set-row input[type="email"] {
	padding: 9px 12px;
	border-radius: 8px;
	background: var(--panel);
	border: 1px solid var(--hairline);
	color: var(--fg);
	font: inherit;
	width: 320px;
	max-width: 100%;
}
.acc-set-row input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.xsot-auth-ok {
	margin-top: 10px;
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	background: oklch(0.7 0.14 152 / 0.22);
	color: var(--fg);
	font-size: 13px;
}

/* Verify banner. */
.acc-verify {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	margin-bottom: 16px;
	border-radius: 10px;
	background: oklch(0.7 0.16 60 / 0.18);
	color: var(--fg);
	border: 1px solid oklch(0.7 0.16 60 / 0.3);
	font-size: 13px;
}
.acc-verify a { margin-left: auto; color: var(--accent); cursor: pointer; }

/* =========================================================
   Player iframe — force fill regardless of width/height attrs
   on the <iframe> element. Works on mobile + desktop.
   ========================================================= */
.vs-player,
.vs-player-part,
.vs-facade-wrap {
	position: relative;
}
.vs-player-part iframe,
.vs-player-part video,
.vs-player iframe,
.vs-player video,
.vs-facade-wrap iframe,
.vs-facade-wrap video,
.d-cinema-stage iframe,
.d-cinema-stage video {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	min-width: 0 !important;
	min-height: 0 !important;
	border: 0 !important;
	display: block !important;
	background: #000;
}

/* Click-to-load facade: poster + play button covering the iframe area. */
.vs-facade-wrap { width: 100%; height: 100%; }
.vs-play-facade {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	padding: 0;
	background-color: #000;
	background-size: cover;
	background-position: center;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font: inherit;
}
.vs-play-facade::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.6));
}
.vs-play-icon {
	position: relative;
	z-index: 1;
	width: 86px;
	height: 86px;
	border-radius: 50%;
	background: rgba(0,0,0,0.55);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform .18s ease, background .18s ease;
	box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.vs-play-icon::before {
	content: "";
	width: 0; height: 0;
	border-left: 22px solid #fff;
	border-top: 13px solid transparent;
	border-bottom: 13px solid transparent;
	margin-left: 6px;
}
.vs-play-facade:hover .vs-play-icon {
	transform: scale(1.08);
	background: var(--accent);
}
.vs-play-facade:hover .vs-play-icon::before { border-left-color: #0b0b10; }

@media (max-width: 640px) {
	.vs-play-icon { width: 64px; height: 64px; }
	.vs-play-icon::before { border-left-width: 16px; border-top-width: 10px; border-bottom-width: 10px; }
}

/* On narrow viewports, detail-grid collapses to a single column already
   via earlier rules at ≤1200px; the player naturally fills the column. */

/* Topbar breadcrumb — single-line with ellipsis, caps width to keep search visible. */
.topbar .crumbs { min-width: 0; flex-wrap: nowrap; overflow: hidden; }
.topbar .crumbs a,
.topbar .crumbs .cur {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 28ch;
}
.topbar .crumbs .cur { max-width: 32ch; }
@media (max-width: 1100px) {
	.topbar .crumbs a,
	.topbar .crumbs .cur { max-width: 18ch; }
}

/* Allow SEO-plugin breadcrumb output to keep default spacing. */
.xsot-seo-crumbs { font-size: 13px; color: var(--fg-dim); }
.xsot-seo-crumbs a { color: inherit; }
.xsot-seo-crumbs a:hover { color: var(--accent); }

/* =========================================================
   Screenshots tab gallery + lightbox.
   ========================================================= */
.d-shots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
}
.d-shot {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--panel);
	cursor: zoom-in;
}
.d-shot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}
.d-shot:hover img { transform: scale(1.04); }
.d-shot-lbl {
	position: absolute;
	left: 10px; bottom: 8px;
	font-family: "Geist Mono", monospace;
	font-size: 10px;
	letter-spacing: 0.08em;
	color: #fff;
	background: rgba(0,0,0,0.55);
	padding: 3px 8px;
	border-radius: 999px;
	backdrop-filter: blur(6px);
}

.xsot-lightbox {
	position: fixed; inset: 0;
	background: rgba(0,0,0,0.92);
	display: none;
	align-items: center; justify-content: center;
	z-index: 200;
	padding: 40px 60px;
}
.xsot-lightbox.is-on { display: flex; }
.xsot-lightbox-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.xsot-lightbox-close,
.xsot-lightbox-nav {
	position: absolute;
	border: 0;
	background: rgba(255,255,255,0.08);
	color: #fff;
	border-radius: 50%;
	cursor: pointer;
	transition: background .15s ease;
}
.xsot-lightbox-close:hover,
.xsot-lightbox-nav:hover { background: rgba(255,255,255,0.18); }
.xsot-lightbox-close {
	top: 16px; right: 16px;
	width: 42px; height: 42px;
	font-size: 26px; line-height: 1;
}
.xsot-lightbox-nav {
	top: 50%; transform: translateY(-50%);
	width: 50px; height: 50px;
	font-size: 32px; line-height: 1;
}
.xsot-lightbox-nav.prev { left: 16px; }
.xsot-lightbox-nav.next { right: 16px; }
.xsot-lightbox-counter {
	position: absolute;
	bottom: 16px; left: 50%;
	transform: translateX(-50%);
	color: rgba(255,255,255,0.8);
	font-family: "Geist Mono", monospace;
	font-size: 12px;
	background: rgba(0,0,0,0.55);
	padding: 4px 10px;
	border-radius: 999px;
}

@media (max-width: 640px) {
	.xsot-lightbox { padding: 16px; }
	.xsot-lightbox-nav { width: 40px; height: 40px; font-size: 22px; }
	.d-shots { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
}

/* Download button: add a small mono meta line below the filename. */
.vs-downloads .d-download { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vs-dl-meta {
	font-size: 11px;
	letter-spacing: 0.06em;
	color: rgba(11, 11, 16, 0.7);
	font-family: "Geist Mono", monospace;
	padding-left: 8px;
	border-left: 1px solid rgba(11, 11, 16, 0.2);
}
