@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #17131d;
  --ink-2: #201a28;
  --ink-3: #2c2436;
  --ink-4: #3a3046;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f1f8;
  --text-2: #bdb2ca;
  --text-3: #8a7f9c;
  --marker: #ffd84d;
  --marker-ink: #241b00;
  --radius-card: 14px;
  --radius-ui: 999px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Bricolage", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --pad: clamp(16px, 3.2vw, 44px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }
em, i, cite, dfn, var, address { font-style: normal; }
:focus-visible { outline: 2px solid var(--marker); outline-offset: 3px; border-radius: 6px; }
mark { background: linear-gradient(transparent 58%, rgba(255, 216, 77, 0.5) 58%, rgba(255, 216, 77, 0.5) 92%, transparent 92%); color: inherit; padding: 0 1px; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr minmax(0, 680px) 1fr; align-items: center; gap: 16px;
  padding: 14px var(--pad) 12px;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}
.mark { display: inline-flex; align-items: baseline; gap: 8px; justify-self: start; }
.mark b { font-size: 26px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.mark span { font-size: 13px; color: var(--text-3); font-weight: 500; }

.search {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 16px 0 20px;
  background: var(--ink-3); border-radius: var(--radius-ui);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.search:focus-within { background: #33293e; box-shadow: inset 0 0 0 1.5px rgba(255, 216, 77, 0.65), 0 10px 40px -12px rgba(255, 216, 77, 0.25); }
.search svg { flex: none; width: 20px; height: 20px; color: var(--text-3); }
.search input {
  flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0;
  color: var(--text); font: inherit; font-size: 19px; font-weight: 500; letter-spacing: -0.01em;
}
.search input::-webkit-search-cancel-button { display: none; }
.ghost {
  position: absolute; left: 52px; right: 60px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 19px; font-weight: 400; pointer-events: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: opacity 0.4s var(--ease);
}
.search.has-text .ghost { opacity: 0; }
.ghost.swap { opacity: 0; }
.search kbd, .search .clear {
  flex: none; font: inherit; font-size: 12px; color: var(--text-3);
  border: 1px solid var(--ink-4); border-radius: 6px; padding: 1px 7px;
}
.search .clear { display: none; border: 0; font-size: 22px; line-height: 1; padding: 0 2px; }
.search.has-text kbd { display: none; }
.search.has-text .clear { display: block; }

.actions { justify-self: end; display: flex; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
  border-radius: var(--radius-ui); background: var(--ink-2); color: var(--text-2);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 600;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.icon-btn:hover { background: var(--ink-3); color: var(--text); }
.icon-btn:active { transform: scale(0.96); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.on { color: var(--marker); }

/* ---------- category rail ---------- */
.rail {
  position: sticky; top: 82px; z-index: 25;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 4px var(--pad) 14px;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--pad), #000 calc(100% - var(--pad)), transparent);
}
.rail::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px 0 12px; border-radius: var(--radius-ui);
  background: var(--ink-2); color: var(--text-2); font-size: 14px; font-weight: 600; white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.chip:hover { background: var(--ink-3); color: var(--text); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--text-3)); }
.chip .n { color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip.active { background: var(--text); color: var(--ink); box-shadow: none; }
.chip.active .n { color: #6b6177; }

/* ---------- home hero: the wall ---------- */
.hero { position: relative; height: min(68vh, 640px); min-height: 440px; overflow: hidden; margin-bottom: 8px; }
.wall { position: absolute; inset: -10px 0 0; display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 10px; transform: rotate(-4deg) scale(1.12); transform-origin: 60% 40%; }
.lane { display: flex; gap: 10px; width: max-content; height: 100%; min-height: 0; animation: drift var(--dur, 140s) linear infinite; }
.lane.rev { animation-direction: reverse; }
.hero:hover .lane { animation-play-state: paused; }
.wall-tile {
  position: relative; flex: none; height: 100%; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden;
  background: var(--ink-2) center / cover; opacity: 0.5; filter: saturate(0.85);
  transition: opacity 0.35s var(--ease), filter 0.35s var(--ease), transform 0.35s var(--ease);
}
.wall-tile img { width: 100%; height: 100%; object-fit: cover; }
.wall-tile:hover { opacity: 1; filter: none; transform: scale(1.04); z-index: 2; }
@keyframes drift { to { transform: translateX(-50%); } }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, var(--ink) 0%, transparent 16%, transparent 40%, color-mix(in srgb, var(--ink) 92%, transparent) 78%, var(--ink) 100%),
    radial-gradient(120% 70% at 18% 100%, color-mix(in srgb, var(--ink) 85%, transparent) 0%, transparent 70%);
}
.hero-copy { position: absolute; left: var(--pad); right: var(--pad); bottom: 28px; z-index: 3; max-width: 860px; pointer-events: none; }
.hero-copy h1 {
  margin: 0 0 14px; font-size: clamp(36px, 6vw, 76px); line-height: 0.95; font-weight: 800; letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero-copy p { margin: 0 0 16px; font-size: clamp(16px, 1.6vw, 20px); color: var(--text-2); max-width: 46ch; }
.tries { display: flex; flex-wrap: wrap; gap: 8px; pointer-events: auto; }
.try {
  height: 34px; padding: 0 14px; border-radius: var(--radius-ui); font-size: 14px; font-weight: 500;
  background: rgba(255, 216, 77, 0.12); color: #ffe68f; box-shadow: inset 0 0 0 1px rgba(255, 216, 77, 0.25);
  transition: background 0.2s, transform 0.2s var(--ease);
}
.try:hover { background: rgba(255, 216, 77, 0.22); }
.try:active { transform: scale(0.97); }

/* ---------- shelves ---------- */
main { padding-bottom: 80px; min-height: 60vh; }
.shelf { position: relative; margin: 6px 0 34px; }
.shelf-head { display: flex; align-items: baseline; gap: 12px; padding: 0 var(--pad); margin-bottom: 12px; }
.shelf-head h2 { margin: 0; font-size: 23px; font-weight: 750; letter-spacing: -0.025em; display: flex; align-items: center; gap: 10px; }
.shelf-head h2::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--marker)); transform: translateY(-1px); }
.shelf-head .count { color: var(--text-3); font-size: 15px; font-variant-numeric: tabular-nums; }
.shelf-head .blurb { color: var(--text-3); font-size: 14px; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shelf-head .all { font-size: 14px; font-weight: 600; color: var(--text-2); padding: 6px 2px; white-space: nowrap; }
.shelf-head .all:hover { color: var(--marker); }
.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(150px, 15vw, 196px); gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: 4px var(--pad) 8px; scroll-padding: 0 var(--pad);
}
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; }
.nudge {
  position: absolute; top: 44px; width: 44px; height: calc(clamp(150px, 15vw, 196px) * 16 / 9);
  display: grid; place-items: center; z-index: 4; opacity: 0; transition: opacity 0.2s;
  background: linear-gradient(90deg, var(--ink), transparent);
}
.nudge.next { right: 0; background: linear-gradient(270deg, var(--ink), transparent); }
.nudge.prev { left: 0; }
.nudge svg { width: 28px; height: 28px; filter: drop-shadow(0 2px 6px #000); }
.shelf:hover .nudge:not([disabled]) { opacity: 1; }
.nudge[disabled] { pointer-events: none; }
.see-all {
  aspect-ratio: 9 / 16; border-radius: var(--radius-card); display: grid; place-content: center; text-align: center; gap: 6px;
  background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font-weight: 600; font-size: 15px;
  transition: background 0.2s, color 0.2s;
}
.see-all b { font-size: 34px; font-weight: 800; color: var(--text); letter-spacing: -0.03em; }
.see-all:hover { background: var(--ink-3); color: var(--marker); }

/* ---------- cards ---------- */
.card { display: block; min-width: 0; outline-offset: 4px; }
.thumb {
  position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius-card); overflow: hidden;
  background: var(--ink-2) center / cover no-repeat; isolation: isolate;
  box-shadow: 0 0 0 1px var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.thumb::before { content: ""; position: absolute; inset: -8%; background: inherit; filter: blur(14px) brightness(0.7); z-index: -1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s var(--ease); }
.thumb img.ok { opacity: 1; }
.thumb.wide img { object-fit: contain; }
.scrub { position: absolute; inset: 0; display: none; background-repeat: no-repeat; }
.thumb.wide .scrub { inset: auto 0; top: 50%; transform: translateY(-50%); }
.card:hover .thumb, .card:focus-visible .thumb { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 18px 40px -14px var(--glow, #000); }
.card.scrubbing .scrub { display: block; }
.ticks { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; gap: 3px; opacity: 0; transition: opacity 0.2s; }
.ticks i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.35); }
.ticks i.on { background: #fff; }
.card.scrubbing .ticks { opacity: 1; }
.card.scrubbing .dur { opacity: 0; }
.dur {
  position: absolute; right: 8px; bottom: 8px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 2px 7px; border-radius: 6px; background: rgba(10, 8, 14, 0.66); backdrop-filter: blur(6px); transition: opacity 0.2s;
}
.badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 5px; }
.badges span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(10, 8, 14, 0.66); backdrop-filter: blur(6px); }
.badges svg { width: 13px; height: 13px; }
.badges .fav { color: var(--marker); }
.badges .seen { color: var(--text-2); }
.card h3 {
  margin: 10px 2px 2px; font-size: 15px; line-height: 1.28; font-weight: 650; letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .by { margin: 0 2px; font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; }
.card .by .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.card .by span { overflow: hidden; text-overflow: ellipsis; }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 28px 18px;
  padding: 0 var(--pad);
}

/* ---------- view headers ---------- */
.view-head { padding: 26px var(--pad) 20px; max-width: 1100px; }
.view-head h1 { margin: 0; font-size: clamp(34px, 5vw, 60px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; display: flex; align-items: center; gap: 16px; }
.view-head h1 .sw { width: 18px; height: 18px; border-radius: 5px; background: var(--c, var(--marker)); flex: none; }
.view-head p { margin: 12px 0 0; color: var(--text-2); font-size: 17px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 var(--pad) 22px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; background: var(--ink-2); border-radius: var(--radius-ui); padding: 3px; box-shadow: inset 0 0 0 1px var(--line); }
.seg button { height: 30px; padding: 0 12px; border-radius: var(--radius-ui); font-size: 13px; font-weight: 600; color: var(--text-3); }
.seg button.on { background: var(--ink-4); color: var(--text); }
.sub { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: var(--radius-ui); font-size: 13.5px; font-weight: 600; color: var(--text-2); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.sub:hover { color: var(--text); }
.sub.on { background: var(--c, var(--text)); color: #120f16; box-shadow: none; }
.sub .n { opacity: 0.6; margin-left: 4px; font-weight: 500; }

/* ---------- search results ---------- */
.res-head { padding: 22px var(--pad) 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.res-head h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.res-head h1 q { color: var(--marker); quotes: "\201C" "\201D"; }
.res-head p { margin: 0; color: var(--text-3); font-size: 14px; }
.res-head kbd { font: inherit; font-size: 12px; border: 1px solid var(--ink-4); border-radius: 5px; padding: 0 6px; color: var(--text-2); }
.best {
  margin: 0 var(--pad) 36px; display: grid; grid-template-columns: minmax(150px, 230px) 1fr; gap: clamp(18px, 3vw, 36px);
  padding: 18px; border-radius: 22px; position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer;
}
.best::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(80% 120% at 0% 0%, color-mix(in srgb, var(--glow) 34%, transparent), transparent 70%); }
.best .thumb { box-shadow: 0 24px 50px -20px #000; }
.best-body { align-self: center; padding: 6px 8px 6px 0; min-width: 0; }
.best-body .tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.best-body .tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.best-body h2 { margin: 8px 0 6px; font-size: clamp(24px, 3vw, 36px); line-height: 1.06; font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
.best-body .by { color: var(--text-3); font-size: 14px; margin: 0 0 12px; }
.best-body .sum { margin: 0 0 14px; color: var(--text-2); font-size: 17px; max-width: 62ch; }
.best-body ul { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 7px; max-width: 62ch; }
.best-body li { position: relative; padding-left: 22px; font-size: 15px; }
.best-body li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; border-radius: 3px; background: var(--marker); }
.play-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px 0 18px; border-radius: var(--radius-ui);
  background: var(--text); color: var(--ink); font-weight: 700; font-size: 15px; transition: transform 0.2s var(--ease), background 0.2s;
}
.play-btn:hover { background: #fff; transform: translateY(-1px); }
.play-btn svg { width: 16px; height: 16px; }
.grid-label { margin: 0 0 16px; padding: 0 var(--pad); font-size: 17px; font-weight: 700; color: var(--text-2); letter-spacing: -0.01em; }
.player-in:focus { outline: none; }
.empty { padding: 60px var(--pad); max-width: 720px; }
.empty h2 { font-size: 30px; margin: 0 0 10px; letter-spacing: -0.03em; }
.empty p { color: var(--text-2); margin: 0 0 18px; font-size: 17px; }
.foot { padding: 30px var(--pad) 0; color: var(--text-3); font-size: 13px; }

/* ---------- player ---------- */
.player { position: fixed; inset: 0; z-index: 60; display: grid; }
.player[hidden] { display: none; }
.player .backdrop { position: absolute; inset: 0; background: #0d0a11; overflow: hidden; }
.player .backdrop img { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(60px) saturate(1.4) brightness(0.45); opacity: 0.9; transition: opacity 0.5s; }
.player .backdrop::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 90% at 28% 50%, color-mix(in srgb, var(--glow) 30%, transparent), transparent 70%), linear-gradient(90deg, transparent 40%, rgba(13, 10, 17, 0.75)); }
.player-in {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 500px); height: 100vh; height: 100dvh;
}
.stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 64px 18px; min-width: 0; min-height: 0; }
.screen {
  position: relative; height: min(calc(100dvh - 150px), 1200px); max-width: 100%; border-radius: 18px; overflow: hidden;
  background: #000; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.screen video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }
.screen .fail { position: absolute; inset: 0; display: none; place-content: center; text-align: center; padding: 24px; gap: 10px; background: rgba(0,0,0,0.72); }
.screen.failed .fail { display: grid; }
.moments { display: flex; gap: 6px; max-width: min(760px, 100%); overflow-x: auto; scrollbar-width: none; padding: 2px; }
.moments::-webkit-scrollbar { display: none; }
.moment { position: relative; flex: none; height: 64px; border-radius: 8px; overflow: hidden; background-repeat: no-repeat; opacity: 0.55; transition: opacity 0.2s, transform 0.2s var(--ease); box-shadow: 0 0 0 1px rgba(255,255,255,0.1); }
.moment:hover { opacity: 1; transform: translateY(-2px); }
.moment.on { opacity: 1; box-shadow: 0 0 0 2px var(--marker); }
.moment span { position: absolute; left: 3px; bottom: 3px; font-size: 10px; font-weight: 700; padding: 0 4px; border-radius: 4px; background: rgba(0,0,0,0.7); font-variant-numeric: tabular-nums; }

.pbtn {
  position: absolute; z-index: 5; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08); color: var(--text); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  transition: background 0.2s, transform 0.2s var(--ease);
}
.pbtn:hover { background: rgba(255, 255, 255, 0.18); }
.pbtn:active { transform: scale(0.94); }
.pbtn svg { width: 20px; height: 20px; }
.pbtn.close { top: 20px; left: 20px; }
.pbtn.prev { left: 10px; top: 50%; transform: translateY(-50%); }
.pbtn.next { right: 10px; top: 50%; transform: translateY(-50%); }
.pbtn.prev:active, .pbtn.next:active { transform: translateY(-50%) scale(0.94); }
.pos { position: absolute; top: 31px; left: 78px; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.info {
  position: relative; overflow-y: auto; overscroll-behavior: contain; padding: 40px 36px 60px 30px;
  scrollbar-width: thin; scrollbar-color: var(--ink-4) transparent;
}
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.catchip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px; border-radius: var(--radius-ui); background: rgba(255,255,255,0.08); font-size: 13px; font-weight: 600; }
.catchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.catchip:hover { background: rgba(255,255,255,0.14); }
.subchip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--radius-ui); font-size: 13px; color: var(--text-2); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }
.info h2 { margin: 0 0 10px; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.06; font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
.byline { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 18px; color: var(--text-3); font-size: 14px; }
.byline a { color: var(--text-2); font-weight: 600; }
.byline a:hover { color: var(--marker); }
.info .sum { font-size: 18px; line-height: 1.5; margin: 0 0 26px; color: var(--text); }
.block { margin: 0 0 26px; }
.block h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--text-2); letter-spacing: -0.005em; }
.learn { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.learn li { position: relative; padding: 12px 14px 12px 40px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); font-size: 15.5px; line-height: 1.45; }
.learn li::before { content: ""; position: absolute; left: 14px; top: 17px; width: 13px; height: 13px; border-radius: 4px; background: var(--marker); box-shadow: 0 0 18px rgba(255, 216, 77, 0.45); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 2px; }
.steps li { counter-increment: s; position: relative; padding: 9px 0 9px 40px; font-size: 15.5px; line-height: 1.45; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: rgba(255,255,255,0.09); color: var(--text); }
.onscreen { margin: 0; color: var(--text-2); font-size: 15px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.facts span { font-size: 12.5px; color: var(--text-3); padding: 3px 9px; border-radius: var(--radius-ui); box-shadow: inset 0 0 0 1px var(--line); }
details.fold { margin: 0 0 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
details.fold > summary { list-style: none; cursor: pointer; padding: 14px 16px; font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 10px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform 0.2s; }
details.fold[open] > summary::after { transform: rotate(-135deg); }
details.fold > summary small { color: var(--text-3); font-weight: 500; font-size: 13px; }
.lines { max-height: 340px; overflow-y: auto; padding: 0 8px 10px; scrollbar-width: thin; scrollbar-color: var(--ink-4) transparent; }
.line { display: grid; grid-template-columns: 44px 1fr; gap: 8px; width: 100%; text-align: left; padding: 6px 8px; border-radius: 8px; font-size: 14.5px; color: var(--text-2); line-height: 1.45; }
.line b { font-weight: 600; color: var(--text-3); font-size: 12px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.line:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.line.on { background: rgba(255, 216, 77, 0.12); color: var(--text); }
.line.on b { color: var(--marker); }
.md { padding: 0 16px 16px; font-size: 14.5px; color: var(--text-2); }
.md h4 { color: var(--text); font-size: 15px; margin: 16px 0 6px; }
.md p { margin: 0 0 10px; }
.md ol, .md ul { margin: 0 0 10px; padding-left: 20px; }
.md li { margin-bottom: 4px; }
.md strong { color: var(--text); }
.cap { padding: 0 16px 16px; margin: 0; white-space: pre-wrap; font-size: 14px; color: var(--text-2); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 30px; }
.links a, .links button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px; border-radius: var(--radius-ui); background: rgba(255, 255, 255, 0.08); font-size: 14px; font-weight: 600; transition: background 0.2s; }
.links a:hover, .links button:hover { background: rgba(255, 255, 255, 0.15); }
.links svg { width: 16px; height: 16px; }
.links .on { color: var(--marker); }
.mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mini .card h3 { font-size: 12.5px; margin-top: 7px; }
.mini .card .by { display: none; }
.mini .thumb { border-radius: 10px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 90; padding: 10px 18px; border-radius: var(--radius-ui); background: var(--text); color: var(--ink); font-weight: 650; font-size: 14px; transition: opacity 0.25s, transform 0.25s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- view transitions ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }
::view-transition-group(reel) { animation-duration: 0.42s; animation-timing-function: var(--ease); }
::view-transition-old(reel), ::view-transition-new(reel) { height: 100%; object-fit: cover; }
.fade-in { animation: fadeIn 0.35s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }

/* ---------- small screens ---------- */
@media (max-width: 1000px) {
  .top { grid-template-columns: auto 1fr auto; }
  .mark span { display: none; }
  .icon-btn .lbl { display: none; }
  .icon-btn { padding: 0 13px; }
}
@media (max-width: 860px) {
  .player { overflow-y: auto; overscroll-behavior: contain; }
  .player-in { display: block; height: auto; }
  .player .backdrop { position: fixed; }
  .stage { padding: 64px 12px 10px; }
  .screen { height: auto; width: min(100%, calc(62vh * var(--ar, 0.5625))); aspect-ratio: var(--ar, 0.5625); }
  .info { overflow: visible; padding: 18px 18px 60px; }
  .pbtn.close { top: 14px; left: 12px; }
  .pos { top: 26px; left: 70px; }
  .pbtn.prev, .pbtn.next { top: 14px; transform: none; width: 42px; height: 42px; }
  .pbtn.prev { left: auto; right: 62px; }
  .pbtn.next { right: 12px; }
  .pbtn.prev:active, .pbtn.next:active { transform: scale(0.94); }
  .best { grid-template-columns: 120px 1fr; padding: 14px; }
  .best-body .sum { font-size: 15.5px; }
  .best-body ul { display: none; }
  .mini { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .top { grid-template-columns: 1fr auto; gap: 10px; padding-top: 10px; }
  .mark { display: none; }
  .search { height: 50px; padding: 0 12px 0 16px; }
  .search input, .ghost { font-size: 16.5px; }
  .ghost { left: 46px; }
  .search kbd { display: none; }
  .actions .icon-btn { height: 42px; padding: 0 12px; }
  .actions .fav-link { display: none; }
  .rail { top: 70px; }
  .hero { height: 58vh; min-height: 380px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .shelf-head .blurb { display: none; }
  .nudge { display: none; }
}
@media (hover: none) {
  .nudge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lane { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- sections, menu, sign-in ---------- */
.tabs { flex: none; display: inline-flex; gap: 2px; padding: 3px; margin-right: 6px; border-radius: var(--radius-ui); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.tab { height: 30px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: var(--radius-ui); font-size: 14px; font-weight: 700; color: var(--text-3); }
.tab:hover { color: var(--text); }
.tab.on { background: var(--marker); color: var(--marker-ink); }
.rail-sep { flex: none; width: 1px; height: 22px; align-self: center; background: var(--ink-4); margin: 0 4px; }
.chip.acct { font-weight: 600; }
.menu-wrap { position: relative; }
.menu-wrap[hidden] { display: none; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; border-radius: 14px; background: #2a2233; box-shadow: 0 20px 50px -10px rgba(0,0,0,0.7), inset 0 0 0 1px var(--line); z-index: 40; }
.menu a { display: block; padding: 10px 12px; border-radius: 9px; font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.menu a:hover { background: rgba(255,255,255,0.07); color: var(--text); }
body.gated { min-height: 100vh; display: grid; }
.gate { display: grid; place-items: center; padding: 24px; min-height: 100vh; background: radial-gradient(60% 50% at 50% 30%, rgba(255,216,77,0.08), transparent 70%), var(--ink); }
.gate-card { max-width: 440px; text-align: center; display: grid; justify-items: center; gap: 4px; }
.gate-mark { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 18px; }
.gate h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1; letter-spacing: -0.04em; margin: 0 0 12px; }
.gate p { color: var(--text-2); margin: 0 0 22px; font-size: 17px; }
.gate-hint, .hint { color: var(--text-3); font-size: 14px; margin: 10px 0 0; }
.loading { padding: 80px var(--pad); color: var(--text-3); font-size: 15px; }
.empty-note { color: var(--text-3); padding: 10px 0; }
.spacer { flex: 1; }
.share-head h1 { line-height: 1.02; }

/* ---------- selection and sharing ---------- */
.check { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; display: none; place-items: center; color: transparent;
  background: rgba(10,8,14,0.55); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.85); backdrop-filter: blur(4px); }
.check svg { width: 16px; height: 16px; }
body.selecting .check { display: grid; }
body.selecting .card .badges { display: none; }
.card.checked .check, .yt-card.checked .check { background: var(--marker); color: var(--marker-ink); box-shadow: none; }
.card.checked .thumb { box-shadow: 0 0 0 3px var(--marker); }
body.selecting .card:hover .thumb { transform: none; }
.selbar { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 55; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px;
  border-radius: var(--radius-ui); background: #2d2437; box-shadow: 0 20px 60px -10px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(255,255,255,0.1); max-width: calc(100vw - 24px); }
.selbar[hidden] { display: none; }
.selbar #selCount { font-weight: 700; font-size: 14.5px; margin-right: 6px; white-space: nowrap; }
.sb-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--radius-ui); background: rgba(255,255,255,0.09); font-size: 14px; font-weight: 650; white-space: nowrap; }
.sb-btn:hover { background: rgba(255,255,255,0.16); }
.sb-btn svg { width: 16px; height: 16px; }
.sb-btn.strong { background: var(--marker); color: var(--marker-ink); }
.sb-btn.strong:hover { background: #ffe27a; }
.sb-btn[hidden] { display: none; }
.dialog { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.dialog[hidden] { display: none; }
.dlg-backdrop { position: absolute; inset: 0; background: rgba(8,6,12,0.72); backdrop-filter: blur(6px); }
.dlg-card { position: relative; width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 28px; border-radius: 22px; background: #221b2b;
  box-shadow: 0 40px 100px -20px #000, inset 0 0 0 1px var(--line); animation: fadeIn 0.25s var(--ease) both; }
.dlg-card h2 { margin: 0 0 18px; font-size: 26px; letter-spacing: -0.03em; }
.dlg-x { position: absolute; right: 14px; top: 12px; width: 38px; height: 38px; border-radius: 50%; font-size: 24px; color: var(--text-3); }
.dlg-x:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.dlg-sec { padding: 18px 0; border-top: 1px solid var(--line); display: grid; gap: 12px; justify-items: start; }
.dlg-sec h3 { margin: 0; font-size: 16px; }
.dlg-sec p { margin: -6px 0 0; color: var(--text-3); font-size: 14px; }
.fld { display: grid; gap: 6px; width: 100%; }
.fld > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.fld input { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--ink-3); color: var(--text); font: inherit; font-size: 15px; box-shadow: inset 0 0 0 1px var(--line); }
.fld input:focus { outline: 2px solid var(--marker); outline-offset: 0; }
.dlg-link { display: flex; gap: 8px; width: 100%; margin-top: 4px; }
.dlg-link input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; border: 0; background: var(--ink-3); color: var(--marker); font: inherit; font-size: 13.5px; box-shadow: inset 0 0 0 1px var(--line); }
.top-links { margin: -10px 0 26px; }

/* ---------- YouTube ---------- */
.yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px 18px; padding: 0 var(--pad); }
.yt-card { display: grid; gap: 4px; text-align: left; min-width: 0; }
.yt-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--ink-2); box-shadow: 0 0 0 1px var(--line); transition: transform 0.3s var(--ease); }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.yt-card:hover .yt-thumb { transform: translateY(-3px); }
.yt-card.checked .yt-thumb { box-shadow: 0 0 0 3px var(--marker); }
.priv { position: absolute; left: 8px; top: 8px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: rgba(10,8,14,0.72); text-transform: capitalize; }
.yt-title { margin-top: 6px; font-size: 15px; font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-meta { font-size: 13px; color: var(--text-3); }

/* ---------- Pins ---------- */
.masonry { columns: 5 220px; column-gap: 14px; padding: 0 var(--pad); }
.pin { display: block; width: 100%; margin: 0 0 14px; break-inside: avoid; text-align: left; border-radius: 16px; overflow: hidden; background: var(--pc); position: relative; }
.pin img { width: 100%; height: auto; display: block; transition: transform 0.4s var(--ease); }
.pin:hover img { transform: scale(1.03); }
.pin span { display: block; padding: 8px 10px 10px; font-size: 13px; font-weight: 600; background: var(--ink-2); color: var(--text-2); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 70px 70px 24px; }
.lightbox[hidden] { display: none; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(8,6,12,0.9); backdrop-filter: blur(10px); }
.lightbox .pbtn.close { top: 18px; left: 18px; }
.lb-body { position: relative; width: min(1100px, 100%); max-height: 100%; overflow-y: auto; }
.lb-yt { display: grid; gap: 18px; }
.lb-frame { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.lb-frame iframe { width: 100%; height: 100%; border: 0; }
.lb-private { height: 100%; display: grid; place-content: center; gap: 8px; text-align: center; padding: 24px; color: var(--text-2); }
.lb-private b { color: var(--text); font-size: 18px; }
.lb-info h2 { margin: 0 0 8px; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.02em; }
.lb-desc { color: var(--text-2); white-space: pre-wrap; max-height: 160px; overflow-y: auto; margin: 0; }
.lb-pin { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 26px; align-items: start; }
.lb-pin img { width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 16px; background: #000; }

/* ---------- accounts and shared links ---------- */
.panel { margin: 0 var(--pad) 22px; padding: 22px; border-radius: 20px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); max-width: 860px; display: grid; gap: 12px; justify-items: start; }
.panel h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.acct-row, .share-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,0.04); }
.acct-row > div, .sr-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.acct-row span, .sr-main span { font-size: 13.5px; color: var(--text-3); }
.st { font-weight: 700; }
.st-ok { color: #7ee2a8 !important; }
.st-needs_login, .st-error { color: #ff9a8a !important; }
.panel-list { display: grid; gap: 10px; padding: 0 var(--pad); max-width: 900px; }
.share-row.dead { opacity: 0.55; }

@media (max-width: 860px) {
  .lightbox { padding: 64px 12px 16px; }
  .lb-pin { grid-template-columns: 1fr; }
  .lightbox .pbtn.prev, .lightbox .pbtn.next { top: 14px; transform: none; }
  .lightbox .pbtn.prev { left: auto; right: 62px; }
  .lightbox .pbtn.next { right: 12px; }
  .selbar { bottom: 12px; padding-left: 14px; gap: 6px; }
  .selbar #selCount { display: none; }
  .sb-btn { padding: 0 12px; font-size: 13px; }
}
@media (max-width: 640px) {
  .yt-grid { grid-template-columns: 1fr; }
  .masonry { columns: 2 140px; column-gap: 10px; }
  .tabs { margin-right: 2px; }
  .tab { padding: 0 11px; font-size: 13px; }
}
.gate-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.gate-actions .sub { height: 46px; padding: 0 20px; font-size: 15px; }

[hidden] { display: none !important; }
.dlg-lead { color: var(--text-2); margin: -8px 0 16px; font-size: 15px; }
.setup-steps { margin: 0; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 14px; }
.setup-steps li { counter-increment: st; position: relative; padding-left: 38px; display: grid; gap: 8px; justify-items: start; }
.setup-steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--marker); color: var(--marker-ink); }
.setup-steps p { margin: 2px 0 0; font-size: 14.5px; color: var(--text-2); }
.setup-steps b { color: var(--text); }
.setup-steps .dlg-link { margin: 0; }
.fld textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 0; background: var(--ink-3); color: var(--text); font: inherit; font-size: 14.5px; resize: vertical; box-shadow: inset 0 0 0 1px var(--line); }
.fld textarea:focus { outline: 2px solid var(--marker); outline-offset: 0; }
.dlg-result { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(255, 216, 77, 0.1); color: var(--text); font-size: 14.5px; }
.linklike { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.linklike:hover { color: var(--marker); }
