/* Clip Finder — light "scorebook" look */
:root {
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --surface-2: #F3F4F6;
  --line: #E5E7EB;
  --line-soft: #F0F1F3;
  --field: #D1D5DB;
  --text: #111827;
  --text-2: #374151;
  --text-dim: #4B5563;
  --ink: #111827;
  --accent: #C1121F;
  --accent-soft: #FEF2F2;
  --blue: #1E3A8A;
  --blue-soft: #EEF2FF;
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font-family: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; }
a { color: inherit; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.thin-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.thin-scroll::-webkit-scrollbar-track { background: transparent; }
.thin-scroll::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 99px; }

.hidden { display: none !important; }

/* Shell */
.app-shell { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

/* Header */
.search-header {
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 16px 32px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.search-top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

.brand { display: flex; align-items: center; gap: 10px; margin-right: 8px; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.brand-pill { font-size: 12px; color: var(--text-dim); margin-top: 3px; }

.search-box {
  flex: 1 1 380px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--field);
  border-radius: 12px;
  color: var(--text-dim);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.search-box:focus-within { background: var(--surface); border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12); }
.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--text);
}
.search-input::placeholder { color: #6B7280; }
.clear-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  color: var(--text-dim);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.clear-btn:hover { background: var(--line); color: var(--text); }

.filter-select {
  height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--field);
  border-radius: 10px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-size: 14px;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.filter-select:hover { border-color: #9CA3AF; }
.filter-select:focus { outline: none; border-color: var(--blue); }

.active-tags-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tags-label { font-size: 11px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-dim); }
.active-tag-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px;
  border-radius: 8px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 12px; font-weight: 600;
}
.active-tag-pill span:last-child { opacity: 0.7; font-size: 14px; }
.active-tag-pill:hover { background: #374151; }

.chips-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 14px; scrollbar-width: thin; }
.cat-chip {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--field);
  background: var(--surface);
  color: #1F2937;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.cat-chip:hover { border-color: #9CA3AF; background: #F9FAFB; }
.cat-chip.active { background: var(--ink); border-color: var(--ink); color: #FFFFFF; font-weight: 600; }

/* Main split */
.main-split {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 24px;
  padding: 24px 32px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.results-pane {
  flex: 0 1 500px;
  min-width: 340px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.results-meta {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}
.results-count { font-size: 14px; color: var(--text-2); }
.understood-txt { margin-left: 8px; color: var(--blue); font-weight: 600; }
.understood-txt::before { content: "· "; color: var(--text-dim); font-weight: 400; }
.meta-actions { display: flex; gap: 6px; flex-shrink: 0; }
.back-btn, .reset-btn {
  height: 32px; padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--field);
  background: var(--surface);
  font-size: 13px; font-weight: 500;
  color: #1F2937;
  white-space: nowrap;
}
.back-btn:hover, .reset-btn:hover { background: var(--surface-2); }

.results-list { flex: 1; overflow-y: auto; }
.res-row {
  display: flex; align-items: flex-start; gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
  transition: background .1s;
}
.res-row:hover { background: #F9FAFB; }
.res-row.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.row-title {
  font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--text-dim); }
.row-cat { color: var(--blue); font-weight: 600; }
.row-sim { color: var(--accent); font-weight: 600; }
.row-mono { font-family: var(--font-mono); font-size: 11.5px; }
.row-lbls { display: none; }
.row-dur {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  border-radius: 6px;
  padding: 3px 7px;
}

.load-more-wrap { padding: 14px 18px; }
.load-more-btn {
  width: 100%; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--field);
  background: var(--surface);
  font-size: 14px; font-weight: 600; color: #1F2937;
}
.load-more-btn:hover { background: var(--surface-2); }
.empty-state { padding: 40px 24px; text-align: center; color: var(--text-dim); font-size: 14px; line-height: 1.6; }
.empty-state em { font-style: normal; font-weight: 600; color: var(--text); }

/* Player */
.player-pane { flex: 1 1 560px; min-width: 0; overflow-y: auto; }
.player-empty {
  height: 100%;
  min-height: 320px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 10px;
  padding: 40px;
  background: var(--surface);
  border: 1px dashed var(--field);
  border-radius: 16px;
}
.play-circle {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: #FFFFFF;
  margin-bottom: 6px;
}
.player-empty-title { font-family: var(--font-display); font-weight: 700; font-size: 26px; color: var(--text); }
.player-empty-sub { max-width: 420px; color: var(--text-dim); font-size: 14px; line-height: 1.6; }

#playerActive, .pclone { display: flex; flex-direction: column; gap: 16px; }
.video-box {
  background: #0B0F17;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.video-el { width: 100%; height: 100%; display: block; background: #0B0F17; }

.player-controls {
  margin-top: -16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
}
.speed-group { display: flex; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.speed-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.spd-btn, .feed-btn {
  height: 34px; padding: 0 12px;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
}
.spd-btn:hover, .feed-btn:hover { color: var(--text); }
.spd-btn.active, .feed-btn.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(17, 24, 39, 0.12); }

.player-actions { display: flex; gap: 8px; }
.similar-btn {
  height: 40px; padding: 0 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 14px; font-weight: 600;
}
.similar-btn:hover { background: #A30F1A; }
.mp4-link {
  height: 40px; padding: 0 14px;
  display: inline-flex; align-items: center;
  border: 1px solid var(--field);
  border-radius: 10px;
  font-size: 14px; font-weight: 500; color: #1F2937;
  text-decoration: none;
}
.mp4-link:hover { background: var(--surface-2); }

.player-details {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.player-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.1;
  color: var(--text);
}
.player-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px; font-weight: 500;
}
.meta-badge:first-child { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.player-stats {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 10px;
}
.labels-header { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.labels-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.lbl-pill {
  height: 30px; padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--field);
  background: var(--surface);
  color: #1F2937;
  font-size: 12px; font-weight: 500;
}
.lbl-pill:hover { border-color: #9CA3AF; background: #F9FAFB; }
.lbl-pill.vis { border-style: dashed; border-color: #93A3C4; color: var(--blue); }
.lbl-pill.vis:hover { background: var(--blue-soft); }
.lbl-pill.on, .lbl-pill.on:hover { background: var(--ink); border: 1px solid var(--ink); color: #FFFFFF; }

/* Phone: one scrolling page, player on top */
@media (max-width: 820px) {
  .app-shell { height: auto; min-height: 100vh; overflow: visible; }
  .search-header { padding: 14px 16px 0; }
  .brand { width: 100%; margin-right: 0; }
  .brand-text { flex-direction: row; align-items: baseline; justify-content: space-between; flex: 1; }
  .brand-name { font-size: 22px; }
  .brand-pill { margin-top: 0; }
  .search-box { flex-basis: 100%; height: 46px; }
  .filter-select { flex: 1; min-width: 0; }
  .main-split { flex-direction: column; padding: 16px; gap: 16px; }
  .results-pane { flex: none; min-width: 0; overflow: visible; }
  .results-list { overflow: visible; }
  .player-pane { order: -1; flex: none; overflow: visible; scroll-margin-top: 8px; }
  .player-empty { display: none; }
  .player-title { font-size: 22px; }
  .player-pane:has(#playerActive.hidden) { display: none; }
  .player-details { padding: 16px; }
  .speed-group { flex: 1; justify-content: space-between; }
  .spd-btn, .feed-btn { flex: 1; }
  #feedGroup { width: 100%; }
  .player-actions { width: 100%; }
  .similar-btn { flex: 1; height: 44px; }
  .mp4-link { height: 44px; }
}

.search-note { display: block; margin-top: 4px; font-size: 12.5px; color: #9A3412; }
.search-note strong { color: #9A3412; }

.res-item { border-bottom: 1px solid var(--line-soft); }
.res-item .res-row { border-bottom: 0; }
.row-feeds { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 18px 12px; background: var(--surface); }
.row-feeds.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.row-feeds-lbl { font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-dim); margin-right: 2px; }
.row-feed { height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--field); background: var(--surface); font-size: 12px; font-weight: 500; color: #1F2937; }
.row-feed:hover { border-color: #9CA3AF; background: #F9FAFB; }
.row-feed.on { background: var(--ink); border-color: var(--ink); color: #FFFFFF; font-weight: 600; }
@media (max-width: 820px) { .row-feeds { padding: 0 14px 12px; } .row-feed { height: 36px; } }

/* ===== v2: faceted layout ===== */
.app2 { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.top { flex-shrink: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 14px 24px 10px; display: flex; flex-direction: column; gap: 10px; }
.top-row { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.top .search-box { flex: 1 1 380px; }
.filters-btn { display: none; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border: 1px solid var(--field); border-radius: 12px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--text); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 500; }
.chip:hover { background: #374151; }
.chip-k { opacity: .7; font-weight: 400; }
.chip-sim { background: var(--accent); }
.link-btn { font-size: 13px; font-weight: 600; color: var(--blue); padding: 4px 6px; border-radius: 6px; }
.link-btn:hover { background: var(--blue-soft); }

.body { flex: 1; min-height: 0; display: grid; grid-template-columns: 290px minmax(340px, 460px) minmax(0, 1fr); gap: 20px; padding: 18px 24px; width: 100%; max-width: 1760px; margin: 0 auto; }
.facets { min-height: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.facets-head, .facets-foot { display: none; }
.facets-body { flex: 1; overflow-y: auto; padding: 6px 0 12px; }
.fgroup { border-bottom: 1px solid var(--line-soft); }
.fgroup > summary { list-style: none; cursor: pointer; padding: 12px 16px; font-family: var(--font-display); font-size: 18px; letter-spacing: .3px; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary::after { content: "+"; font-family: var(--font-sans); font-size: 18px; color: var(--text-dim); }
.fgroup[open] > summary::after { content: "–"; }

.fsec { padding: 2px 16px 12px; }
.fsec-title { font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--text-dim); margin: 4px 0 4px; }
.fsec-n { display: inline-block; min-width: 16px; padding: 0 5px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 10.5px; text-align: center; }
.fopt { display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 2px 6px; margin: 0 -6px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.fopt:hover { background: var(--surface-2); }
.fopt input { width: 16px; height: 16px; accent-color: var(--ink); flex: none; margin: 0; }
.fopt-l { flex: 1; min-width: 0; }
.fopt-n { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); }
.fopt.zero { opacity: .42; }
.fsearch { width: 100%; height: 32px; margin: 2px 0 6px; padding: 0 10px; border: 1px solid var(--field); border-radius: 8px; font-size: 13px; }
.fmore { margin-top: 2px; padding-left: 0; }

.results { min-height: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; }
.sort .filter-select { height: 34px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.notice { padding: 10px 18px; font-size: 12.5px; color: #9A3412; background: #FFF7ED; border-bottom: 1px solid var(--line); }
.row-sit { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); }
.ai-badge { padding: 1px 7px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); font-weight: 600; font-size: 11px; }
.body .player-pane { min-height: 0; overflow-y: auto; }
.body .player-empty { height: auto; min-height: 360px; }
.notes { padding: 14px 16px; border-radius: 12px; background: var(--blue-soft); display: flex; flex-direction: column; gap: 6px; }
.notes p { margin: 0; font-size: 14.5px; line-height: 1.5; }
.notes ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.notes-h { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--blue); margin-top: 4px; display: flex; justify-content: space-between; gap: 8px; }
.notes-ai { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-dim); }
.notes-jump { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.jump-btn { height: 36px; padding: 0 14px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; }
.jump-btn:hover { background: #374151; }
.muted { color: var(--text-dim); font-size: 13px; }
.scrim { position: fixed; inset: 0; background: rgba(17, 24, 39, .35); z-index: 40; }

@media (max-width: 1180px) {
  .body { grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); }
  .filters-btn { display: inline-flex; }
  .facets { position: fixed; top: 0; left: 0; bottom: 0; width: min(380px, 92vw); z-index: 50; border-radius: 0 16px 16px 0; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 10px 40px rgba(17, 24, 39, .25); }
  body.facets-open .facets { transform: none; }
  .facets-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .facets-foot { display: block; padding: 12px 16px; border-top: 1px solid var(--line); }
  .apply-btn { width: 100%; height: 46px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; }
}
@media (max-width: 820px) {
  .app2 { height: auto; min-height: 100vh; overflow: visible; }
  .top { padding: 12px 14px 10px; position: sticky; top: 0; z-index: 30; }
  .top .brand { width: 100%; }
  .top .search-box { flex: 1 1 0; min-width: 0; }
  .body { display: flex; flex-direction: column; padding: 12px; gap: 12px; }
  .results { overflow: visible; }
  .results .results-list { overflow: visible; }
  .body .player-pane { order: -1; overflow: visible; scroll-margin-top: 175px; }
  .body .player-pane:has(#playerActive.hidden) { display: none; }
  .facets { width: 100vw; border-radius: 0; }
  .fopt { min-height: 40px; font-size: 15px; }
}

/* search-to-chips suggestions */
.top .search-box { position: relative; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; background: var(--surface); border: 1px solid var(--field); border-radius: 12px; box-shadow: 0 12px 32px rgba(17, 24, 39, .16); padding: 6px; display: flex; flex-direction: column; }
.sug { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px; text-align: left; font-size: 14px; color: var(--text); }
.sug.on, .sug:hover { background: var(--blue-soft); }
.sug.zero { opacity: .5; }
.sug-kind { font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug-label { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug-n { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.sug-hint { padding: 6px 10px 2px; font-size: 11.5px; color: var(--text-dim); border-top: 1px solid var(--line-soft); margin-top: 4px; }
.chip-term { background: var(--blue); }
@media (max-width: 820px) { .sug { grid-template-columns: 72px minmax(0, 1fr) auto; padding: 6px 10px; } .sug-label { white-space: normal; } .sug-hint { display: none; } }
/* collapsible sections */
.fsec > summary.fsec-title { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; min-height: 30px; margin: 0; }
.fsec > summary.fsec-title::-webkit-details-marker { display: none; }
.fsec > summary.fsec-title::before { content: "▸"; font-size: 11px; color: var(--text-dim); width: 10px; }
.fsec[open] > summary.fsec-title::before { content: "▾"; }
.fsec { padding: 0 16px 4px; }
.fgroup > summary .fsec-n { margin-left: auto; margin-right: 10px; font-family: var(--font-sans); font-size: 11px; }
.fgroup-note { margin: -4px 16px 8px; font-size: 12px; color: var(--text-dim); line-height: 1.4; }
.sug[data-k="0"] .sug-kind:only-child {}
.sug .sug-label { white-space: normal; }
/* ===== result rows v3 ===== */
.res-row { align-items: center; gap: 14px; padding: 12px 16px; }
.sit { flex: none; width: 48px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 5px; border-radius: 10px; background: var(--surface-2); }
.sit-none { height: 52px; background: transparent; }
.sit .b-off { fill: #fff; stroke: #9CA3AF; stroke-width: 1.4; }
.sit .b-on { fill: var(--accent); stroke: var(--accent); stroke-width: 1.4; }
.sit-row { display: flex; align-items: center; gap: 5px; }
.sit-inn { font-size: 11px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.sit-outs { display: flex; gap: 2px; }
.sit-outs i { width: 5px; height: 5px; border-radius: 50%; border: 1px solid #9CA3AF; }
.sit-outs i.o-on { background: var(--ink); border-color: var(--ink); }
.row-main { gap: 4px; }
.row-title { font-size: 14.5px; font-weight: 600; line-height: 1.35; -webkit-line-clamp: 2; }
.row-meta { font-size: 12.5px; color: var(--text-dim); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta .dot { margin: 0 6px; color: #C4C9D1; }
.row-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; align-self: stretch; justify-content: center; }
.row-side .row-dur { font-family: var(--font-sans); font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 500; background: none; padding: 0; color: var(--text-dim); }
.ai-dot { font-size: 10px; font-weight: 700; letter-spacing: .4px; color: var(--blue); background: var(--blue-soft); border-radius: 5px; padding: 1px 5px; }
.res-row.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.res-row.active .sit { background: #fff; }
.row-feeds { padding: 0 16px 12px 78px; }
.row-feeds-lbl { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; }
.row-feed { height: 28px; font-size: 12px; }
@media (max-width: 820px) { .row-feeds { padding-left: 78px; } .row-meta { white-space: normal; } }

.row-meta .mi { white-space: nowrap; }
.understood-txt::before { content: none; }
.understood-txt { margin-left: 6px; }

/* ===== phone redesign ===== */
.pbar { display: none; }
.quick { display: none; }
@media (max-width: 820px) {
  body { background: var(--bg); }
  .top { padding: 8px 12px 8px; gap: 8px; box-shadow: 0 1px 0 var(--line); border-bottom: 0; }
  .top-row { flex-wrap: nowrap; gap: 8px; }
  .top .brand { width: auto; margin: 0; }
  .top .brand-text { display: none; }
  .top .search-box { height: 42px; padding: 0 12px; border-radius: 11px; }
  .search-input { font-size: 16px; }
  .filters-btn { height: 42px; padding: 0 12px; border-radius: 11px; font-size: 14px; flex: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; height: 30px; }
  .body { padding: 8px 0 24px; gap: 0; }
  .results { border-radius: 0; border-left: 0; border-right: 0; }
  .results-meta { padding: 8px 12px; min-height: 0; }
  .results-count { font-size: 13px; }
  .sort > span { display: none; }
  .sort .filter-select { height: 32px; font-size: 13px; padding: 0 28px 0 10px; }
  .res-row { gap: 10px; padding: 10px 12px; }
  .sit { width: 40px; padding: 4px 0; }
  .sit svg { width: 34px; height: 24px; }
  .row-title { font-size: 14px; }
  .row-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
  .row-feeds { display: none; }
  .row-side .row-dur { font-size: 11.5px; }
  /* player as a full-screen sheet */
  .body .player-pane, .body .player-pane:has(#playerActive.hidden) { display: none; }
  body.player-open .body .player-pane { display: block; position: fixed; inset: 0; z-index: 80; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 0 24px; }
  body.player-open { overflow: hidden; }
  body.player-open .player-empty { display: none; }
  .pbar { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 8px 10px; border-bottom: 1px solid var(--line); }
  .pbar-back { height: 38px; padding: 0 12px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--blue); }
  .pbar-pos { flex: 1; text-align: center; font-size: 12.5px; color: var(--text-dim); }
  .pbar-nav { width: 44px; height: 38px; border-radius: 10px; border: 1px solid var(--field); font-size: 22px; line-height: 1; background: var(--surface); }
  .pbar-nav:disabled { opacity: .35; }
  body.player-open #playerActive, body.player-open .pclone { gap: 10px; }
  body.player-open .video-box { position: sticky; top: 55px; z-index: 1; border-radius: 0; }
  body.player-open .player-controls { margin: 0; border-radius: 0; border-left: 0; border-right: 0; padding: 10px 12px; gap: 8px; }
  body.player-open .player-details { border-radius: 0; border-left: 0; border-right: 0; padding: 14px 14px; }
  .player-title { font-size: 21px; }
  .speed-group { flex: 1 1 100%; }
  #feedGroup { flex: 1 1 100%; }
  .player-actions { width: 100%; }
  .similar-btn, .mp4-link { height: 42px; flex: 1; justify-content: center; }
  /* filter sheet: quick picks + pill options */
  .facets { width: 100vw; }
  .quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 14px; border-bottom: 1px solid var(--line); }
  .quick-h { width: 100%; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text-dim); }
  .qpill { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--field); background: var(--surface); font-size: 14px; font-weight: 500; }
  .qpill.on { background: var(--ink); border-color: var(--ink); color: #fff; }
  .fgroup > summary { padding: 14px 14px; font-size: 19px; }
  .fsec { padding: 0 14px 10px; }
  .fsec > summary.fsec-title { min-height: 26px; pointer-events: none; }
  .fsec > summary.fsec-title::before { content: none; }
  .fsec > div[id^="rl-"] { display: flex; flex-wrap: wrap; gap: 8px; }
  .fopt { margin: 0; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--field); background: var(--surface); gap: 6px; font-size: 14px; }
  .fopt { position: relative; }
  .fopt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
  .fopt-l { flex: none; }
  .fopt-n { font-size: 11px; }
  .fopt:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #fff; }
  .fopt:has(input:checked) .fopt-n { color: #D1D5DB; }
  .fopt.zero { display: none; }
  .fmore { width: 100%; text-align: left; }
  .fgroup-note { margin: -6px 14px 8px; }
}

@media (max-width: 820px) { .facets { overflow: hidden; } .facets-body { overscroll-behavior: contain; } }

.fsec-empty { display: none; }

.ptags > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 4px; min-height: 36px; margin: 0; }
.ptags > summary::-webkit-details-marker { display: none; }
.ptags > summary::before { content: "▸"; font-size: 11px; color: var(--text-dim); width: 12px; }
.ptags[open] > summary::before { content: "▾"; }
.ptags-hint { font-weight: 400; color: var(--text-dim); }
.ptags[open] > .labels-wrap { margin-top: 6px; }

.quick.quick-off { display: none; }

/* ===== phone: player as a centered popover over the dimmed list ===== */
.pscrim { display: none; }
@media (max-width: 820px) {
  body.player-open .pscrim { display: block; position: fixed; inset: 0; z-index: 79; background: rgba(17, 24, 39, .6); animation: fadeIn .16s ease; }
  body.player-open .body .player-pane { top: 50%; left: 12px; right: 12px; bottom: auto; transform: translateY(-50%); max-height: 78vh; max-height: 78dvh;
    border-radius: 18px; box-shadow: 0 20px 60px rgba(17, 24, 39, .4); animation: popIn .18s ease; overscroll-behavior: contain; padding-bottom: 8px; }
  body.player-open .pbar { border-radius: 18px 18px 0 0; }
  body.player-open .video-box { top: 55px; }
  .pbar-back { color: var(--text-2); }
}
@keyframes popIn { from { opacity: 0; transform: translateY(-50%) scale(.96); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.player-open .body .player-pane, body.player-open .pscrim { animation: none; } }

/* close button not shown (tap outside closes); kept for screen readers */
@media (max-width: 820px) {
  .pbar-back { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .pbar-pos { text-align: left; padding-left: 6px; }
}

/* phone: arrows replaced by swiping (kept for screen readers) */
@media (max-width: 820px) {
  .pbar-nav { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .pbar { justify-content: center; min-height: 44px; }
  .pbar-pos { text-align: center; padding: 0; }
  body.player-open #playerActive { touch-action: pan-y; will-change: transform; }
  body.player-open .player-pane { overflow-x: hidden; }
}

/* swipe preview card: exact copy of the player for the neighbouring clip */
.peek { display: none; }
@media (max-width: 820px) {
  .peek { display: block; position: absolute; visibility: hidden; pointer-events: none; z-index: 3; will-change: transform; background: var(--surface); }
  .peek.on { visibility: visible; }
  .peek .video-box { position: relative; }
  .peek video { width: 100%; height: 100%; display: block; background: #0B0F17; object-fit: contain; }
  .peek-end { padding: 80px 20px; text-align: center; color: var(--text-dim); font-size: 14px; background: var(--surface); min-height: 300px; }
  body.player-open #playerActive, body.player-open .pclone { background: var(--surface); }
}

.peek-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0 0 0 4px;
  pointer-events: auto; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* wide screens: collapsible filter column */
.facets-hide { display: none; }
@media (min-width: 1181px) {
  .filters-btn { display: inline-flex; }
  .facets-hide { display: block; align-self: flex-start; margin: 10px 12px 0; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-dim); }
  .facets-hide:hover { background: var(--field); color: var(--text); }
  .body { transition: grid-template-columns .2s ease; }
  body.facets-hidden .body { grid-template-columns: 0 minmax(340px, 460px) minmax(0, 1fr); gap: 0 20px; }
  body.facets-hidden .facets { visibility: hidden; border: 0; }
  body.facets-hidden .body { column-gap: 20px; }
  body.facets-hidden .body > .facets { margin-right: -20px; }
}

/* favorites */
.favs-btn { display: inline-flex !important; color: var(--text); }
.favs-btn[aria-pressed="true"] { background: var(--text); color: var(--surface); border-color: var(--text); }
.favs-btn > span[aria-hidden] { color: #D4A017; font-size: 16px; }
.favs-btn[aria-pressed="true"] > span[aria-hidden] { color: #FFD24A; }
.fav-btn.on { color: #9A6B00; border-color: #E8C15A; background: #FFF6DB; }
.row-fav { display: none; color: #D4A017; font-size: 14px; line-height: 1; }
.res-row.is-fav .row-fav { display: block; }
@media (max-width: 820px) { .favs-l { display: none; } .favs-btn { padding: 0 11px; gap: 4px; } }
