/* SoloTube — base + 3 directions × 2 themes
   Direction is applied via data-direction; theme via data-theme on <body>. */

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body, #root { height: 100%; width: 100%; }
body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--ink);
  font-feature-settings: "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--bg); }

/* ───────── Tokens ───────── */
:root,
body[data-theme="light"] {
  --bg: #f5f4ef;
  --paper: #ffffff;
  --ink: #0c0c0c;
  --ink-2: #4a4a48;
  --ink-3: #8a8a86;
  --rule: #d8d6cf;
  --rule-2: #ecebe5;
  --hover: rgba(0,0,0,0.04);
  --selected: rgba(0,0,0,0.06);
  --accent: #d83a1f;
  --new: #d83a1f;
  --dim: 0.42; /* watched thumbnail opacity */
}
body[data-theme="dark"] {
  --bg: #0c0c0c;
  --paper: #161614;
  --ink: #f3f1ea;
  --ink-2: #b6b4ac;
  --ink-3: #6e6c64;
  --rule: #2a2825;
  --rule-2: #1d1c19;
  --hover: rgba(255,255,255,0.05);
  --selected: rgba(255,255,255,0.08);
  --accent: #ff5a3c;
  --new: #ff5a3c;
  --dim: 0.32;
}

/* Directions set font + density tokens */
body[data-direction="grid"] {
  --ff-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --ff-body: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --row-pad: 20px;
  --thumb-w: 220px;
  --thumb-h: 124px;
  --title-size: 18px;
  --title-weight: 500;
  --letter: -0.005em;
}
body[data-direction="mono"] {
  --ff-display: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ff-body: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ff-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --row-pad: 16px;
  --thumb-w: 200px;
  --thumb-h: 112px;
  --title-size: 15px;
  --title-weight: 500;
  --letter: 0;
}
body[data-direction="bold"] {
  --ff-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --ff-body: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --row-pad: 28px;
  --thumb-w: 260px;
  --thumb-h: 146px;
  --title-size: 22px;
  --title-weight: 600;
  --letter: -0.015em;
}

/* ───────── App shell ───────── */
.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: 100%;
  height: 100%;
  width: 100%;
  background: var(--bg);
  transition: grid-template-columns .18s ease;
}
body[data-direction="bold"] .app { grid-template-columns: 320px 1fr; }
.app.rail { grid-template-columns: 56px 1fr !important; }

/* ───────── Sidebar ───────── */
.sidebar {
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg);
}
.sb-brand {
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sb-rail-toggle {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-mono);
  font-size: 14px;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  cursor: pointer;
}
.sb-rail-toggle:hover { color: var(--ink); border-color: var(--ink); }

/* RAIL MODE */
.app.rail .sidebar { overflow: hidden; }
.app.rail .sb-brand { padding: 16px 12px; justify-content: center; flex-direction: column; gap: 10px; }
.app.rail .sb-mark-text { display: none; }
.app.rail .sb-mark { gap: 0; }
.app.rail .sb-mark .dot { width: 14px; height: 14px; }

.sb-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 16px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  gap: 8px;
}
.sb-rail-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.sb-rail-channels { gap: 8px; padding: 4px 0; }
.sb-rail-divider {
  width: 28px; height: 1px;
  background: var(--rule);
  margin: 6px 0;
}
.sb-rail-item {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule);
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.sb-rail-item:hover { color: var(--ink); border-color: var(--ink); }
.sb-rail-item.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
body[data-direction="bold"] .sb-rail-item.active { background: var(--accent); border-color: var(--accent); }
.sb-rail-ch {
  position: relative;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 15px;
  color: white;
  outline: 2px solid transparent;
  outline-offset: -2px;
}
.sb-rail-ch:hover { outline-color: var(--ink); }
.sb-rail-ch.active {
  outline-color: var(--ink);
  outline-width: 2px;
}
body[data-direction="bold"] .sb-rail-ch.active { outline-color: var(--accent); }
.sb-rail-dot {
  position: absolute;
  top: -3px; right: -3px;
  width: 8px; height: 8px;
  background: var(--new);
}
.sb-rail-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.sb-rail-add, .sb-rail-theme {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule);
  font-family: var(--ff-mono);
  font-size: 14px;
  color: var(--ink-2);
}
.sb-rail-add:hover, .sb-rail-theme:hover {
  border-color: var(--ink); color: var(--ink);
}

.sb-mark {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sb-mark .dot {
  width: 10px; height: 10px; background: var(--ink); display: inline-block;
}
body[data-direction="bold"] .sb-mark .dot { background: var(--accent); }
.sb-meta {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.sb-section-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 18px 22px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sb-section-label .count {
  font-variant-numeric: tabular-nums;
}
.sb-nav { display: flex; flex-direction: column; }
.sb-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 22px;
  text-align: left;
  font-size: 14px;
  border-left: 2px solid transparent;
  color: var(--ink);
  font-family: var(--ff-body);
}
.sb-nav-item:hover { background: var(--hover); }
.sb-nav-item.active {
  background: var(--selected);
  border-left-color: var(--ink);
}
body[data-direction="bold"] .sb-nav-item.active { border-left-color: var(--accent); }
.sb-nav-item .num {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-3);
  width: 22px;
  font-variant-numeric: tabular-nums;
}
.sb-nav-item .label { flex: 1; }
.sb-nav-item .badge {
  font-family: var(--ff-mono);
  font-size: 10px;
  background: var(--new);
  color: white;
  padding: 2px 6px;
  letter-spacing: 0.04em;
  min-width: 18px;
  text-align: center;
}
.sb-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.sb-channels { padding-bottom: 16px; }
.sb-ch-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  text-align: left;
  border-left: 2px solid transparent;
  font-family: var(--ff-body);
}
.sb-ch-item:hover { background: var(--hover); }
.sb-ch-item.active {
  background: var(--selected);
  border-left-color: var(--ink);
}
body[data-direction="bold"] .sb-ch-item.active { border-left-color: var(--accent); }
.sb-ch-mark {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 13px;
  color: white;
  letter-spacing: 0;
}
.sb-ch-name { font-size: 13.5px; line-height: 1.25; }
.sb-ch-handle { font-family: var(--ff-mono); font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.sb-ch-badge {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--new);
  font-variant-numeric: tabular-nums;
}
.sb-ch-badge.zero { color: var(--ink-3); }

.sb-actions {
  padding: 10px 22px 14px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 7px;
}
.sb-action {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.sb-action:hover { color: var(--ink); }
.sb-action-sep {
  color: var(--rule);
  font-size: 11px;
  user-select: none;
  line-height: 1;
}

.sb-footer {
  padding: 10px 22px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-top: 1px solid var(--rule);
}
.sb-footer .theme-toggle {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 4px 8px;
  border: 1px solid var(--rule);
}
.sb-footer .theme-toggle:hover { border-color: var(--ink); color: var(--ink); }
.sb-footer-gear {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 4px 8px;
  border: 1px solid var(--rule);
}
.sb-footer-gear:hover { color: var(--ink); border-color: var(--ink); }
.sb-footer-gear svg { color: currentColor; flex-shrink: 0; }

/* ── Sidebar search ── */
.sb-search-wrap {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px 6px;
  border-bottom: 1px solid var(--rule);
}
.sb-search-icon {
  font-size: 13px; color: var(--ink-3); flex-shrink: 0; line-height: 1;
}
.sb-search-input {
  flex: 1; min-width: 0;
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.02em;
  color: var(--ink); background: none; border: none; outline: none;
  padding: 0;
}
.sb-search-input::placeholder { color: var(--ink-3); opacity: 0.7; }
.sb-search-clear {
  font-size: 13px; color: var(--ink-3); background: none; border: none;
  cursor: pointer; line-height: 1; padding: 0 2px; flex-shrink: 0;
}
.sb-search-clear:hover { color: var(--ink); }
.sb-search-results {
  flex: 1; overflow-y: auto; border-bottom: 1px solid var(--rule);
}
.sb-search-empty {
  padding: 16px 18px;
  font-family: var(--ff-mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.04em;
}
.sb-search-group {
  padding: 9px 18px 4px;
  font-family: var(--ff-mono); font-size: 9px;
  letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase;
}
.sb-search-row {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 18px; text-align: left;
  background: none; border: none; cursor: pointer;
}
.sb-search-row:hover { background: var(--hover); }
.sb-search-mark {
  width: 18px; height: 18px; border-radius: 3px; flex-shrink: 0;
  font-family: var(--ff-mono); font-size: 9px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  color: #fff; line-height: 1;
}
.sb-search-label {
  flex: 1; min-width: 0;
  font-size: 12px; line-height: 1.35;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.sb-signout {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--ink-3);
  padding: 3px 7px;
  border: 1px solid var(--rule);
  line-height: 1;
}
.sb-signout:hover { color: var(--accent); border-color: var(--accent); }

/* Tags in sidebar */
.sb-tags { padding-bottom: 8px; }
.sb-tag-item {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 22px;
  text-align: left;
  border-left: 2px solid transparent;
  font-family: var(--ff-body);
  color: var(--ink-2);
}
.sb-tag-item:hover { background: var(--hover); color: var(--ink); }
.sb-tag-item.active {
  background: var(--selected);
  border-left-color: var(--ink);
  color: var(--ink);
}
body[data-direction="bold"] .sb-tag-item.active { border-left-color: var(--accent); }
.sb-tag-hash {
  font-family: var(--ff-mono);
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
}
.sb-tag-name {
  font-size: 13px;
  font-family: var(--ff-body);
}
body[data-direction="mono"] .sb-tag-name { font-family: var(--ff-mono); font-size: 12px; }
.sb-tag-count {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.sb-tag-sep { opacity: 0.5; margin: 0 1px; }

/* Tag chips (used on channel head, tag page, tag editor) */
.ch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid var(--rule);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  background: transparent;
}
.tag-chip:hover { border-color: var(--ink); color: var(--ink); }
.tag-chip .hash { color: var(--ink-3); }
.tag-chip .tag-x {
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1;
  padding: 0 2px;
  margin-left: 2px;
  margin-right: -2px;
}
.tag-chip .tag-x:hover { color: var(--accent); }
.tag-chip.tag-add {
  border-style: dashed;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 10.5px;
}
.tag-chip.tag-add:hover { color: var(--ink); border-color: var(--ink); border-style: dashed; }
.tag-chip-suggest { color: var(--ink-3); }
.tag-chip-channel { gap: 8px; padding: 5px 10px 5px 8px; }
.tag-dot {
  display: inline-block; width: 8px; height: 8px; flex-shrink: 0;
}

/* ───────── Main ───────── */
.main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* Page header */
.page-head {
  padding: 28px 40px 18px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
body[data-direction="bold"] .page-head { padding: 44px 56px 24px; }
body[data-direction="mono"] .page-head { padding: 22px 32px 14px; }

.page-eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.page-title {
  font-family: var(--ff-display);
  font-weight: var(--title-weight);
  letter-spacing: var(--letter);
  font-size: 36px;
  line-height: 1.05;
}
body[data-direction="bold"] .page-title { font-size: 64px; font-weight: 700; }
body[data-direction="mono"] .page-title { font-size: 22px; font-weight: 500; }

.page-subtitle {
  font-family: var(--ff-body);
  color: var(--ink-2);
  font-size: 14px;
  margin-top: 8px;
  max-width: 560px;
  line-height: 1.5;
}

.page-stats {
  display: flex;
  gap: 28px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
  text-align: right;
}
.page-stats .num {
  display: block;
  font-family: var(--ff-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
body[data-direction="bold"] .page-stats .num { font-size: 36px; font-weight: 600; }
body[data-direction="mono"] .page-stats .num { font-size: 16px; font-family: var(--ff-mono); }

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
body[data-direction="bold"] .filter-bar { padding: 14px 56px; }
body[data-direction="mono"] .filter-bar { padding: 10px 32px; }
.filter-tabs { display: flex; gap: 20px; }
.filter-tab { color: var(--ink-3); padding: 4px 0; border-bottom: 1px solid transparent; }
.filter-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.filter-tab:hover { color: var(--ink); }
.filter-tab .count {
  font-variant-numeric: tabular-nums;
  margin-left: 6px;
  color: var(--ink-3);
}
.filter-tab.active .count { color: var(--ink-3); }

.filter-right { display: flex; gap: 16px; align-items: center; }
.filter-action { color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.filter-action:hover { color: var(--ink); }
.dim-toggle .checkbox {
  width: 12px; height: 12px; border: 1px solid var(--ink-3);
  display: inline-block; vertical-align: -2px;
}
.dim-toggle.on .checkbox { background: var(--ink); border-color: var(--ink); }

/* Feed */
.feed-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 40px 80px;
}
body[data-direction="bold"] .feed-scroll { padding: 0 56px 80px; }
body[data-direction="mono"] .feed-scroll { padding: 0 32px 80px; }

.feed-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 28px 0 14px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 4px;
}
.feed-section-title {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.feed-section-title .dot-new {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--new);
  margin-right: 8px;
  vertical-align: 1px;
}

/* Optional: hide thumbnails (tweak) */
:root { --thumb-display: block; }
.v-thumb { display: var(--thumb-display); }
.v-row-mini .mini-thumb { display: var(--thumb-display); }

/* Video row */
.v-row {
  display: grid;
  grid-template-columns: 44px var(--thumb-w) 1fr auto;
  gap: 24px;
  align-items: flex-start;
  padding: var(--row-pad) 0;
  border-bottom: 1px solid var(--rule-2);
  text-align: left;
  width: 100%;
  position: relative;
  cursor: pointer;
}
.v-row.no-idx { grid-template-columns: var(--thumb-w) 1fr auto; }

.v-row:hover { background: var(--hover); }
.v-row:hover .v-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.v-row.watched .v-thumb-img { opacity: var(--dim); filter: saturate(0.4); }
.v-row.watched .v-title { color: var(--ink-2); font-weight: 400; }

.v-index {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  padding-top: 6px;
  letter-spacing: 0.04em;
}
.v-row.new .v-index { color: var(--new); }
.v-row.new .v-index::before { content: '● '; }

.v-thumb {
  width: var(--thumb-w);
  height: var(--thumb-h);
  background: var(--rule-2);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.v-thumb-img {
  width: 100%; height: 100%;
  display: block;
  transition: opacity .15s ease;
}
.v-thumb-dur {
  position: absolute;
  bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.78);
  color: white;
  padding: 2px 6px;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.v-thumb-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  background: var(--accent);
}
.v-thumb-watched {
  position: absolute;
  top: 6px; left: 6px;
  background: rgba(0,0,0,0.78);
  color: white;
  padding: 2px 6px;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v-meta { min-width: 0; padding-top: 4px; }
.v-channel-line {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.v-channel-line .sep { opacity: 0.5; }
.v-title {
  font-family: var(--ff-display);
  font-size: var(--title-size);
  font-weight: var(--title-weight);
  letter-spacing: var(--letter);
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.v-row.new .v-title { font-weight: 600; }
body[data-direction="bold"] .v-row.new .v-title { font-weight: 700; }

.v-snippet {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
  margin-top: 4px;
  max-width: 52ch;
}
.v-row.watched .v-snippet { opacity: 0.7; }

.v-sub {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  display: flex;
  gap: 14px;
}
.v-sub .v-sub-item .label { color: var(--ink-3); opacity: 0.7; }

.v-tag {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid var(--ink);
  color: var(--ink);
  align-self: flex-start;
  margin-top: 6px;
}
.v-tag.new { background: var(--new); color: white; border-color: var(--new); }

/* MONO direction tweaks for video row */
body[data-direction="mono"] .v-channel-line::before { content: '['; opacity: 0.6; }
body[data-direction="mono"] .v-channel-line::after { content: ']'; opacity: 0.6; }
body[data-direction="mono"] .v-row.new .v-index::before { content: '* '; }

/* Empty state */
.empty {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 60px;
}
.empty-card {
  max-width: 480px;
  text-align: center;
  border: 1px solid var(--rule);
  padding: 48px 36px;
}

/* ───────── Watch view ───────── */
.watch {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 360px;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  min-height: 0;
}
.watch-head {
  grid-column: 1 / -1;
  padding: 16px 40px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.watch-head .back {
  color: var(--ink-3);
  display: flex; align-items: center; gap: 0;
  border: 1px solid transparent;
  padding: 5px 8px;
  border-radius: 4px;
  transition: color 0.15s;
}
.watch-head .back .back-arrow {
  font-size: 16px;
  line-height: 1;
}
.watch-head .back .back-label {
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-left: 0;
  transition: max-width 0.2s ease, opacity 0.15s ease, margin-left 0.2s ease;
}
.watch-head .back:hover {
  color: var(--ink);
  border-color: var(--rule);
  background: var(--hover);
}
.watch-head .back:hover .back-label {
  max-width: 100px;
  opacity: 1;
  margin-left: 5px;
}
.watch-head .crumb { display: flex; gap: 10px; align-items: center; }
.watch-head .crumb .sep { opacity: 0.4; }

.watch-main {
  overflow-y: auto;
  padding: 28px 40px 60px;
  min-width: 0;
}
.watch-side {
  border-left: 1px solid var(--rule);
  overflow-y: auto;
  min-width: 0;
  transition: none;
}
.watch.side-collapsed { grid-template-columns: 1fr 32px; }
.watch-side.collapsed { overflow: hidden; }

.player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
}
.player-thumb { width: 100%; height: 100%; display: block; }
.player-play {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.18);
  color: white;
}
.player-play .tri {
  width: 0; height: 0;
  border-left: 28px solid white;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  margin-left: 6px;
}
.player-ctrl {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.player-ctrl .bar {
  flex: 1; height: 3px;
  background: rgba(255,255,255,0.25);
  position: relative;
  cursor: pointer;
}
.player-ctrl .bar:hover { height: 5px; transition: height .12s ease; }
.player-ctrl .bar .fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--accent);
  width: 34%;
}
.player-ctrl .bar .bar-marker {
  position: absolute;
  top: -3px; bottom: -3px;
  width: 2px;
  background: white;
  margin-left: -1px;
  opacity: 0.85;
}

.watch-title {
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 24px 0 16px;
}
body[data-direction="bold"] .watch-title { font-size: 40px; font-weight: 600; }
body[data-direction="mono"] .watch-title { font-size: 18px; font-family: var(--ff-mono); font-weight: 500; }

.watch-stats {
  display: flex; gap: 32px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.watch-stats .key { display: block; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; opacity: 0.7; }
.watch-stats .val { font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }

.watch-channel-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.watch-channel-card .mark {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 20px;
  color: white;
}
.watch-channel-card .info { flex: 1; }
.watch-channel-card .name { font-size: 15px; font-weight: 500; font-family: var(--ff-display); }
.watch-channel-card .sub { font-family: var(--ff-mono); font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.watch-channel-card .btn {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--ink);
}
.watch-channel-card .btn:hover { background: var(--ink); color: var(--bg); }

.watch-desc {
  padding: 20px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
  max-width: 720px;
}

.watch-side-head {
  padding: 22px 22px 14px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; justify-content: space-between; align-items: center;
}
.watch-side.collapsed .watch-side-head {
  padding: 14px 0;
  border-bottom: none;
  justify-content: center;
  height: 100%;
  align-items: flex-start;
}
.watch-side-toggle {
  font-family: var(--ff-mono);
  font-size: 14px;
  color: var(--ink-3);
  padding: 2px 4px;
  line-height: 1;
  margin-left: 6px;
}
.watch-side-toggle:hover { color: var(--ink); }
.watch-side.collapsed .watch-side-toggle { margin-left: 0; font-size: 12px; }
.watch-side .v-row-mini {
  display: grid;
  grid-template-columns: 28px 120px 1fr;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--rule-2);
  text-align: left;
  align-items: flex-start;
  width: 100%;
  cursor: pointer;
}
.watch-side .v-row-mini:hover { background: var(--hover); }
.watch-side .v-row-mini.active { background: var(--selected); }
.watch-side .v-row-mini .mini-idx {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.watch-side .v-row-mini .mini-thumb {
  width: 120px; height: 68px;
  background: var(--rule-2);
  position: relative;
  overflow: hidden;
}
.watch-side .v-row-mini.watched .mini-thumb-img { opacity: var(--dim); filter: saturate(0.4); }
.watch-side .v-row-mini .mini-title {
  font-family: var(--ff-display);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.watch-side .v-row-mini.watched .mini-title { color: var(--ink-2); font-weight: 400; }
.watch-side .v-row-mini .mini-sub {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* ───────── Channel header (per-channel view) ───────── */
.ch-head {
  padding: 36px 40px 24px;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 28px;
  align-items: flex-start;
}
body[data-direction="bold"] .ch-head { padding: 56px 56px 32px; }
body[data-direction="mono"] .ch-head { padding: 24px 32px 16px; }
.ch-head .ch-mark {
  width: 96px; height: 96px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 44px;
  color: white;
}
body[data-direction="bold"] .ch-head .ch-mark { width: 128px; height: 128px; font-size: 60px; }
.ch-head .ch-name {
  font-family: var(--ff-display);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1;
  margin-bottom: 8px;
}
body[data-direction="bold"] .ch-head .ch-name { font-size: 72px; font-weight: 700; }
body[data-direction="mono"] .ch-head .ch-name { font-size: 22px; font-family: var(--ff-mono); font-weight: 500; }
.ch-head .ch-handle {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.ch-head .ch-desc {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
  max-width: 560px;
}
.ch-head .ch-stats {
  display: flex; flex-direction: column; gap: 4px;
  text-align: right;
}
.ch-head .ch-stats .row {
  display: flex; gap: 14px; justify-content: flex-end;
  font-family: var(--ff-mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.ch-head .ch-stats .row b { color: var(--ink); font-weight: 500; }

/* ───────── Add Channel modal ───────── */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  padding: 24px;
}
body[data-theme="dark"] .modal-back { background: rgba(0,0,0,0.65); }
.modal {
  background: var(--paper);
  border: 1px solid var(--ink);
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  box-shadow: 12px 12px 0 rgba(0,0,0,0.1);
}
body[data-direction="bold"] .modal { box-shadow: 16px 16px 0 var(--accent); }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.modal-head .x { font-size: 14px; padding: 4px; }
.modal-body { padding: 28px 28px 24px; flex: 1; min-height: 0; overflow-y: auto; }
.modal-foot { flex-shrink: 0; }
.modal-step-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.modal-title {
  font-family: var(--ff-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.modal-desc {
  font-size: 13px; color: var(--ink-2); line-height: 1.5; margin-bottom: 22px;
  max-width: 440px;
}
.modal input.url {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  font-family: var(--ff-mono);
  font-size: 14px;
  padding: 10px 0;
  outline: none;
  color: var(--ink);
}
.modal input.url::placeholder { color: var(--ink-3); }
.modal input.url:focus { border-bottom-width: 2px; padding-bottom: 9px; }

.modal-suggestions { margin-top: 22px; }
.modal-suggestions .head {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.modal-suggestions .row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--rule-2);
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
}
.modal-suggestions .row:hover { color: var(--ink); }
.modal-suggestions .row .h { color: var(--ink-3); }

.modal-foot {
  padding: 16px 22px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.btn-primary {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg);
}
.btn-primary[disabled] { opacity: 0.35; cursor: not-allowed; }
.btn-primary:not([disabled]):hover { background: var(--accent); color: white; }
.btn-ghost {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 14px;
  color: var(--ink-2);
}
.btn-ghost:hover { color: var(--ink); }

/* Parse preview state */
.parse-preview {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--rule);
  margin-top: 18px;
}
.parse-preview .mark {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-weight: 700; font-size: 24px;
  color: white;
}
.parse-preview .info { flex: 1; }
.parse-preview .name { font-family: var(--ff-display); font-size: 17px; font-weight: 500; }
.parse-preview .meta { font-family: var(--ff-mono); font-size: 11px; color: var(--ink-3); margin-top: 4px; }

.parse-fields {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 18px;
  font-family: var(--ff-mono);
  font-size: 11px;
}
.parse-fields .row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-2);
}
.parse-fields .row .k { color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }
.parse-fields .row .v { color: var(--ink); }

/* Notifications popover */
.notif-btn {
  position: relative;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 12px;
  border: 1px solid var(--rule);
}
.notif-btn:hover { color: var(--ink); border-color: var(--ink); }
.notif-btn .dot {
  position: absolute;
  top: -3px; right: -3px;
  width: 8px; height: 8px;
  background: var(--new);
}
.notif-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(0,0,0,0.08);
  z-index: 40;
}
.notif-pop .head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; justify-content: space-between;
}
.notif-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule-2);
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.notif-item:hover { background: var(--hover); }
.notif-item .mark {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-family: var(--ff-display); font-size: 12px; font-weight: 600;
}
.notif-item .body { min-width: 0; }
.notif-item .b1 {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.notif-item .b2 {
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item .time {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.notif-empty {
  padding: 32px 24px;
  text-align: center;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

/* Page header right cluster */
.page-head-right {
  display: flex; gap: 12px; align-items: center;
  position: relative;
}

/* ───────── Focus mode ───────── */
/* Collapse sidebar to rail in focus mode — never hide it entirely so
   navigation is always accessible. */
.app.focus { grid-template-columns: 56px 1fr; }
.app.focus .sidebar { overflow: hidden; }
.app.focus .sb-brand { padding: 16px 12px; justify-content: center; flex-direction: column; gap: 10px; }
.app.focus .sb-mark-text { display: none; }
.app.focus .sb-mark { gap: 0; }
.app.focus .sb-body { display: none; }
.app.focus .sb-footer { display: none; }
.app.focus .sb-rail { display: flex; }
.watch.focus {
  grid-template-columns: 1fr;
  max-width: 1100px;
  margin: 0 auto;
}
.watch.focus .watch-main { padding: 28px 80px 100px; }
body[data-direction="bold"] .watch.focus .watch-main { padding: 32px 100px 120px; }
.watch.focus .player { border-color: var(--rule); }
.focus-toggle {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  margin-left: 6px;
}
.focus-toggle:hover { border-color: var(--ink); color: var(--ink); }
.focus-toggle.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ───────── AI Brief panel ───────── */
.brief {
  margin: 22px 0;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 18px 22px 20px;
  position: relative;
}
.brief.ready { border-color: var(--ink); }
.brief-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.brief-eyebrow {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brief-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  display: inline-block;
}
.brief-btn {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  color: var(--ink);
}
.brief-btn:hover:not(:disabled) { background: var(--ink); color: var(--bg); }
.brief-btn:disabled { opacity: 0.5; cursor: wait; }
.brief-btn.done {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink-3);
}
.brief-btn.done:hover { color: var(--ink); border-color: var(--ink); background: transparent; }
.brief-empty {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 640px;
}
.brief-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.brief-spinner {
  width: 12px; height: 12px;
  border: 1.5px solid var(--rule);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: brief-spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes brief-spin {
  to { transform: rotate(360deg); }
}
.brief-text {
  font-family: var(--ff-body);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-width: 720px;
  margin: 0;
}
body[data-direction="mono"] .brief-text { font-family: var(--ff-mono); font-size: 12.5px; line-height: 1.7; }
body[data-direction="bold"] .brief-text { font-size: 16px; line-height: 1.55; }
.brief-error {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* Similar Videos panel */
.similar {
  border: 1px solid var(--rule);
  padding: 18px 20px 16px;
  margin-top: 8px;
}
.similar.ready { border-color: #2563eb44; }
.similar-results {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 14px;
}
.similar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.similar-item:last-child { border-bottom: none; }
.similar-thumb {
  width: 96px;
  height: 54px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--rule);
}
.similar-body {
  flex: 1;
  min-width: 0;
}
.similar-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.similar-channel {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.similar-save {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.similar-save:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Section toggle (chevron) + section add (+) */
.sb-section-toggle {
  width: 100%;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.sb-section-toggle:hover .chev { color: var(--ink); }
.sb-section-toggle .chev {
  display: inline-block;
  width: 12px;
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--ink-3);
  text-align: center;
}
.sb-section-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  font-family: var(--ff-mono);
  font-size: 14px;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  margin-left: 6px;
  cursor: pointer;
}
.sb-section-add:hover { color: var(--ink); border-color: var(--ink); }

/* Wrap so we can stack a hover trash overlay on the right */
.sb-tag-item-wrap, .sb-ch-item-wrap {
  position: relative;
  display: block;
}
.sb-row-trash {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-mono);
  font-size: 14px;
  color: transparent;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}
.sb-tag-item-wrap:hover .sb-row-trash,
.sb-ch-item-wrap:hover .sb-row-trash {
  color: var(--ink-3);
}
.sb-row-trash:hover { color: var(--accent) !important; }
.sb-row-trash-ch { top: 14px; transform: none; }

/* Inline confirm strips */
.sb-confirm {
  display: flex;
  gap: 6px;
  padding: 6px 22px 8px;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--selected);
  border-left: 2px solid var(--accent);
}
.sb-confirm button {
  padding: 3px 8px;
  border: 1px solid var(--rule);
  color: var(--ink-2);
}
.sb-confirm .yes { color: var(--accent); border-color: var(--accent); }
.sb-confirm .yes:hover { background: var(--accent); color: white; }
.sb-confirm .no:hover { border-color: var(--ink); color: var(--ink); }
.sb-confirm-ch { flex-direction: column; align-items: flex-start; gap: 8px; }
.sb-confirm-ch .q {
  font-family: var(--ff-body);
  font-size: 12px;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.35;
}
.sb-confirm-ch .row { display: flex; gap: 6px; }

/* New-tag inline input row */
.sb-tag-add-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 22px;
  border-left: 2px solid var(--ink);
}
.sb-tag-add-input {
  flex: 1;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 4px 0;
  font-family: var(--ff-mono);
  font-size: 12px;
  outline: none;
  color: var(--ink);
}
.sb-tag-add-input::placeholder { color: var(--ink-3); }

/* Channel-head remove button */
.ch-remove-btn,
.ch-refresh-btn {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 10px;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
}
.ch-remove-btn:hover,
.ch-refresh-btn:hover { color: var(--accent); border-color: var(--accent); }
.ch-refresh-btn:disabled { opacity: 0.5; cursor: progress; }
.ch-remove-confirm {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink);
  border: 1px solid var(--accent);
  padding: 6px 8px;
  background: var(--paper);
}
.ch-remove-confirm button {
  font-family: inherit; font-size: inherit; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid var(--rule); color: var(--ink-2);
}
.ch-remove-confirm .yes { color: white; background: var(--accent); border-color: var(--accent); }
.ch-remove-confirm .no:hover { border-color: var(--ink); color: var(--ink); }

/* ───────── Notes (timeline + list) ───────── */
.notes {
  margin: 22px 0;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 18px 22px 18px;
}
.notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.notes-eyebrow {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 8px;
}
.notes-position {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.notes-position b { color: var(--ink); font-weight: 500; }

.notes-timeline-wrap { margin: 6px 0 18px; }
.notes-timeline-axis {
  display: flex;
  justify-content: space-between;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.notes-timeline {
  position: relative;
  height: 34px;
  background: var(--rule-2);
  cursor: pointer;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.notes-tick {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--rule);
  margin-left: -0.5px;
}
.notes-played {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: rgba(0,0,0,0.04);
}
body[data-theme="dark"] .notes-played { background: rgba(255,255,255,0.06); }
.notes-playhead {
  position: absolute;
  top: -3px; bottom: -3px;
  width: 2px;
  background: var(--ink);
  margin-left: -1px;
  pointer-events: none;
}
.notes-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 22px; height: 22px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  z-index: 2;
}
.notes-marker:hover, .notes-marker.on {
  background: var(--ink);
  color: var(--bg);
}
.notes-marker-num { font-variant-numeric: tabular-nums; pointer-events: none; }
.notes-marker-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 6px 10px;
  min-width: 180px;
  max-width: 280px;
  display: none;
  z-index: 5;
  pointer-events: none;
  text-align: left;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.08);
}
.notes-marker:hover .notes-marker-tip, .notes-marker.on .notes-marker-tip { display: block; }
.notes-marker-tip .t {
  display: block;
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.notes-marker-tip .b {
  display: block;
  font-family: var(--ff-body);
  font-size: 12px;
  color: var(--ink);
  line-height: 1.35;
  white-space: normal;
}

/* Notes input */
.notes-input-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.notes-input-stamp {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  padding: 6px 10px;
  border: 1px solid var(--rule);
}
.notes-input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 8px 0;
  font-family: var(--ff-body);
  font-size: 14px;
  outline: none;
  color: var(--ink);
}
body[data-direction="mono"] .notes-input { font-family: var(--ff-mono); font-size: 12.5px; }
.notes-input:focus { border-bottom-color: var(--ink); }
.notes-input::placeholder { color: var(--ink-3); }
.notes-add-btn {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  color: var(--ink);
}
.notes-add-btn:hover:not(:disabled) { background: var(--ink); color: var(--bg); }
.notes-add-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Notes list */
.notes-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
}
.notes-empty {
  padding: 22px 4px;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
  text-align: left;
}
.notes-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid var(--rule-2);
}
.notes-row-stamp {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  padding: 4px 0;
  text-align: left;
}
.notes-row-stamp .i { color: var(--ink-3); font-size: 10px; margin-bottom: 2px; }
.notes-row-stamp .t { color: var(--ink); font-weight: 500; }
.notes-row-stamp:hover .t { color: var(--accent); }
.notes-row-body { padding-top: 2px; }
.notes-row-text {
  font-family: var(--ff-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  cursor: text;
}
body[data-direction="mono"] .notes-row-text { font-family: var(--ff-mono); font-size: 12.5px; line-height: 1.6; }
.notes-row-text:hover { background: var(--hover); }
.notes-row-edit {
  width: 100%;
  min-height: 60px;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 8px 10px;
  font-family: var(--ff-body);
  font-size: 14px;
  resize: vertical;
  outline: none;
  color: var(--ink);
}
.notes-row-act { display: flex; gap: 4px; align-items: flex-start; padding-top: 2px; }
.notes-row-act button {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  color: var(--ink-3);
}
.notes-row-act button:hover { color: var(--ink); }
.notes-row-act button:last-child:hover { color: var(--accent); }

/* ───────── Settings popover ───────── */
.settings-back {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 60;
}
.settings-pop {
  position: fixed;
  bottom: 60px;
  width: 340px;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(0,0,0,0.08);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
body[data-direction="bold"] .settings-pop { box-shadow: 10px 10px 0 var(--accent); }

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--rule);
}
.settings-eyebrow {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.settings-title {
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.settings-x {
  font-family: var(--ff-mono);
  font-size: 14px;
  padding: 4px;
  color: var(--ink-3);
}
.settings-x:hover { color: var(--ink); }

.settings-group {
  border-bottom: 1px solid var(--rule);
  padding: 14px 0 16px;
}
.settings-group:last-of-type { border-bottom: 0; }
.settings-group-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 20px 8px;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 8px 20px;
  cursor: pointer;
}
.settings-row:hover { background: var(--hover); }
/* Row with inline controls (theme btn, thumbnail picker) — no hover */
.settings-row-inl { cursor: default; }
.settings-row-inl:hover { background: transparent; }
.settings-row-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.settings-row-label {
  font-size: 13.5px;
  color: var(--ink);
  font-family: var(--ff-body);
}
body[data-direction="mono"] .settings-row-label { font-family: var(--ff-mono); font-size: 12.5px; }
.settings-row-sub {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.settings-check {
  width: 22px; height: 22px;
  border: 1px solid var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.settings-check-fill {
  width: 0; height: 0;
  background: var(--ink);
  transition: width 0.12s ease, height 0.12s ease;
}
.settings-check.on { border-color: var(--ink); }
.settings-check.on .settings-check-fill { width: 12px; height: 12px; }
body[data-direction="bold"] .settings-check.on { border-color: var(--accent); }
body[data-direction="bold"] .settings-check.on .settings-check-fill { background: var(--accent); }

.settings-foot {
  border-top: 1px solid var(--rule);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.settings-reset {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  color: var(--ink-2);
}
.settings-reset:hover { color: var(--ink); border-color: var(--ink); }
.settings-reset.confirm { color: var(--accent); border-color: var(--accent); }
.settings-reset.confirm:hover { color: var(--accent); border-color: var(--accent); background: rgba(216,58,31,0.07); }

/* ── Digest ── */
.settings-digest-row { display: flex; gap: 8px; }
.settings-digest-email {
  flex: 1; min-width: 0;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 7px 10px;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
}
.settings-digest-email:focus { outline: none; border-color: var(--ink); }
.settings-digest-email::placeholder { color: var(--ink-3); }
.settings-digest-btn {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: var(--bg);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.settings-digest-btn:hover:not(:disabled) { background: var(--ink); color: var(--bg); }
.settings-digest-btn:disabled { opacity: 0.45; cursor: default; }
.settings-digest-btn.sent  { border-color: var(--accent); color: var(--accent); }
.settings-digest-btn.error { border-color: #e55; color: #e55; }

.settings-theme-btn {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  white-space: nowrap;
}
.settings-theme-btn:hover { color: var(--ink); border-color: var(--ink); }
.settings-row-account { align-items: center; }
.settings-signout-btn {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  color: var(--accent);
  white-space: nowrap;
}
.settings-signout-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Scrollbars */
.feed-scroll::-webkit-scrollbar,
.watch-main::-webkit-scrollbar,
.watch-side::-webkit-scrollbar,
.sb-channels::-webkit-scrollbar { width: 10px; }
.feed-scroll::-webkit-scrollbar-thumb,
.watch-main::-webkit-scrollbar-thumb,
.watch-side::-webkit-scrollbar-thumb,
.sb-channels::-webkit-scrollbar-thumb { background: var(--rule); }
.feed-scroll::-webkit-scrollbar-track,
.watch-main::-webkit-scrollbar-track,
.watch-side::-webkit-scrollbar-track,
.sb-channels::-webkit-scrollbar-track { background: transparent; }

/* --- Real YouTube content (thumbnails + iframe player) --- */
.v-thumb-real { position: relative; }
.v-thumb-real img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.player-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.player-real { background: #000; }

/* Fallback when YouTube returns error 101/150 (embedding disabled by owner). */
.player-blocked {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}
.player-blocked > .v-thumb-img,
.player-blocked > div:first-child,
.player-blocked > svg:first-child {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  filter: grayscale(1) brightness(0.35);
}
.player-blocked > div:first-child img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.player-blocked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.player-blocked-card {
  background: var(--paper, #f4f1ea);
  color: var(--ink, #111);
  border: 2px solid var(--ink, #111);
  padding: 20px 24px;
  max-width: 420px;
  text-align: left;
  font-family: inherit;
  box-shadow: 6px 6px 0 0 rgba(0,0,0,0.6);
}
.player-blocked-tag {
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: #c2410c;
  margin-bottom: 10px;
}
.player-blocked-msg {
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 16px;
}
.player-blocked-cta {
  display: inline-block;
  padding: 10px 16px;
  background: var(--ink, #111);
  color: var(--paper, #f4f1ea);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  border: 2px solid var(--ink, #111);
  transition: transform 80ms ease;
}
.player-blocked-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0 0 var(--ink, #111);
}
.player-blocked-cta:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

/* Real channel avatar in the add-channel preview */
.parse-preview .mark.mark-img {
  padding: 0;
  overflow: hidden;
  object-fit: cover;
  background: transparent;
}

/* ───────── NEW: favorites ───────── */
.v-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.v-fav {
  font-size: 15px;
  color: var(--ink-3);
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s ease, color .12s ease;
  line-height: 1;
  padding: 2px 4px;
}
.v-row:hover .v-fav { opacity: 1; }
.v-fav:hover { color: var(--accent); }
.v-fav.on { opacity: 1; color: var(--accent); }

/* Archive action on video row — hover-revealed, always shown when archived */
.v-archive {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--ink-3);
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s ease, color .12s ease;
  line-height: 1;
  padding: 2px 4px;
  background: none;
  border: none;
}
.v-row:hover .v-archive { opacity: 1; }
.v-archive:hover { color: var(--ink); }
.v-archive.on { opacity: 1; color: var(--accent); }

.sb-nav-item .badge.badge-quiet { background: transparent; color: var(--ink-3); border: 1px solid var(--rule); }

.watch-title-row { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; }
.watch-title-row .watch-title { flex: 1; }
.watch-title-actions { display: flex; align-items: flex-start; gap: 6px; flex-shrink: 0; }
.watch-archive-btn {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  padding: 7px 10px;
  margin-top: 6px;
  white-space: nowrap;
  background: none;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.watch-archive-btn:hover { color: var(--ink); border-color: var(--ink); }
.watch-archive-btn.on { color: var(--accent); border-color: var(--accent); }

.watch-fav {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  padding: 7px 10px;
  margin-top: 6px;
  white-space: nowrap;
}
.watch-fav:hover { color: var(--accent); border-color: var(--accent); }
.watch-fav.on { color: var(--accent); border-color: var(--accent); }

/* ───────── watch-view inline tag editor ───────── */
.watch-tags { margin: 10px 0 4px; }
.watch-tags-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.watch-tag {
  display: inline-flex; align-items: center; gap: 1px;
  padding: 3px 8px;
  border: 1px solid var(--rule); border-radius: 2px;
  font-family: var(--ff-mono); font-size: 11px; color: var(--ink-3);
  background: transparent; cursor: pointer;
}
.watch-tag:hover { border-color: var(--ink); color: var(--ink); }
.watch-tag.on { border-color: var(--ink); color: var(--ink); }
.wt-hash { opacity: 0.5; margin-right: 1px; }
.wt-x { margin-left: 5px; opacity: 0.45; font-size: 12px; }
.watch-tag.on:hover .wt-x { opacity: 0.9; color: var(--accent); }
.watch-tag-add {
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--ink-3); padding: 3px 8px;
  border: 1px dashed var(--rule); border-radius: 2px;
  background: transparent; cursor: pointer;
}
.watch-tag-add:hover, .watch-tag-add.open { color: var(--ink); border-color: var(--ink); border-style: solid; }
.watch-tags-picker {
  margin-top: 10px; padding: 12px 14px;
  border: 1px solid var(--rule); border-radius: 2px; background: var(--hover);
}
.watch-tags-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.watch-tags-new {
  display: flex; align-items: center; gap: 5px;
  border-top: 1px solid var(--rule); padding-top: 10px;
}
.watch-tags-new .wt-hash { opacity: 0.45; font-family: var(--ff-mono); font-size: 12px; }
.watch-tags-input {
  flex: 1; font-family: var(--ff-mono); font-size: 12px;
  background: transparent; border: none; border-bottom: 1px solid var(--rule);
  padding: 2px 4px; color: var(--ink);
}
.watch-tags-input:focus { outline: none; border-bottom-color: var(--ink); }
.watch-tags-input::placeholder { color: var(--ink-3); opacity: 0.7; }
.watch-tags-create {
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.07em;
  padding: 3px 9px; border: 1px solid var(--rule); border-radius: 2px;
  background: transparent; color: var(--ink-3); cursor: pointer;
}
.watch-tags-create:not(:disabled):hover { border-color: var(--ink); color: var(--ink); }
.watch-tags-create:disabled { opacity: 0.35; cursor: default; }

/* ───────── NEW: scout button ───────── */

/* ───────── NEW: attention budget banner ───────── */
.budget-banner {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.budget-banner-dot { width: 8px; height: 8px; background: var(--accent); flex-shrink: 0; }
.budget-banner-text {
  flex: 1;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--ink-2);
}
.budget-banner-text b { color: var(--ink); }
.budget-banner-x {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  padding: 5px 9px;
}
.budget-banner-x:hover { color: var(--ink); border-color: var(--ink); }

/* ───────── NEW: brief length S/M/L ───────── */
.brief-len { display: flex; gap: 0; margin-left: auto; margin-right: 10px; }
.brief-head { gap: 10px; }
.brief-len-btn {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  padding: 5px 9px;
  margin-left: -1px;
}
.brief-len-btn:first-child { margin-left: 0; }
.brief-len-btn:hover { color: var(--ink); border-color: var(--ink); position: relative; }
.brief-len-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); position: relative; }

/* ───────── NEW: general (untimed) notes ───────── */
button.notes-input-stamp { cursor: pointer; }
button.notes-input-stamp:hover { border-color: var(--ink); color: var(--ink); }
.notes-input-stamp.general { color: var(--accent); border-color: var(--accent); }
.notes-row-stamp.general .t { color: var(--ink-3); letter-spacing: 0.08em; }
.notes-row-stamp.general:hover .t { color: var(--ink-3); }
.notes-row-stamp.general { cursor: default; }

/* ───────── NEW: add-channel extras ───────── */
.tag-chip-on { border-color: var(--accent); color: var(--accent); }
.tag-chip-on .hash { color: var(--accent); }
/* ── Video vs channel choice cards ── */
/* New-tag row inside the Add Channel modal */
.modal-newtag-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.modal-newtag-row .wt-hash { opacity: 0.45; font-family: var(--ff-mono); font-size: 12px; flex-shrink: 0; }

.modal-video-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}
.modal-choice {
  border: 1px solid var(--rule);
  padding: 18px 18px 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  background: transparent;
}
.modal-choice:hover { border-color: var(--ink); background: var(--hover); }
.modal-choice-eyebrow {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.modal-choice-name {
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
}
.modal-choice-desc {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.55;
  margin-top: 2px;
}
.modal-choice-cta {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink);
  margin-top: 6px;
}
.modal-choice:hover .modal-choice-cta { text-decoration: underline; text-underline-offset: 3px; }

/* ───────── NEW: Scout modal ───────── */
.modal-scout { max-width: 620px; }
.scout-modes { display: flex; gap: 8px; margin: 6px 0 18px; }
.scout-mode {
  flex: 1;
  display: flex; flex-direction: column; gap: 4px;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--rule);
}
.scout-mode:hover { border-color: var(--ink); }
.scout-mode.on { border-color: var(--ink); background: var(--selected); }
.scout-mode-label {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.scout-mode-hint { font-size: 11px; color: var(--ink-3); }
.scout-loading {
  display: flex; align-items: center; gap: 10px;
  margin-top: 20px;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.scout-results { margin-top: 20px; border-top: 1px solid var(--rule); }
.scout-empty {
  padding: 24px 0;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.scout-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-2);
}
.scout-item-idx {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.scout-item-body { flex: 1; }
.scout-item-name { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; }
.scout-item-handle {
  margin-left: 8px;
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-3);
}
.scout-item-type {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 1px 5px;
  margin: 3px 0 2px;
  border-radius: 2px;
}
.scout-item-why { margin-top: 3px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.scout-item-add {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 7px 11px;
  white-space: nowrap;
}
.scout-item-add:hover { background: var(--ink); color: var(--bg); }
.scout-disclaimer {
  padding: 12px 0 2px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}

/* ───────── NEW: settings — attention budget ───────── */
.settings-budget-opts { display: flex; }
.settings-budget-btn {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  padding: 5px 9px;
  margin-left: -1px;
}
.settings-budget-btn:hover { color: var(--ink); border-color: var(--ink); position: relative; }
.settings-budget-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); position: relative; }

/* Custom minute input */
.settings-budget-custom {
  width: 40px;
  height: 28px;
  border: 1px solid var(--rule);
  font-family: var(--ff-mono);
  font-size: 11px;
  padding: 0 4px;
  color: var(--ink);
  background: transparent;
  text-align: center;
  margin-left: 2px;
  -moz-appearance: textfield;
}
.settings-budget-custom::-webkit-inner-spin-button,
.settings-budget-custom::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.settings-budget-custom::placeholder { color: var(--ink-3); }
.settings-budget-custom:focus { outline: none; border-color: var(--ink); }
.settings-budget-custom.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Advanced disclosure */
.settings-adv-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 20px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  width: 100%;
}
.settings-adv-toggle:hover { color: var(--ink); }
.settings-adv-chev { font-size: 9px; }
.settings-adv-sub {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 10px 20px 2px;
  opacity: 0.55;
}

/* ───────── NEW: stats / your time ───────── */
.stats-scroll { padding: 26px 40px 80px; }
.stats-block { margin-bottom: 42px; max-width: 760px; }
.stats-block-head {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.stats-block-head-warn { color: var(--accent); border-bottom-color: var(--accent); }
.stats-budget-bar { height: 10px; border: 1px solid var(--rule); position: relative; }
.stats-budget-fill { height: 100%; background: var(--ink); transition: width .2s ease; }
.stats-budget-fill.over { background: var(--accent); }
.stats-budget-row {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.stats-days { display: flex; gap: 6px; align-items: flex-end; height: 120px; }
.stats-day { flex: 1; display: flex; flex-direction: column; height: 100%; }
.stats-day-bar { flex: 1; display: flex; align-items: flex-end; border-bottom: 1px solid var(--rule); }
.stats-day-fill { width: 100%; background: var(--ink); min-height: 0; }
.stats-day:last-child .stats-day-fill { background: var(--accent); }
.stats-day-label {
  margin-top: 6px;
  text-align: center;
  font-family: var(--ff-mono);
  font-size: 9px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.stats-foot-line {
  margin-top: 14px;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.stats-foot-line b { color: var(--ink); }
.stats-channels { display: flex; flex-direction: column; }
.stats-ch-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-2);
  text-align: left;
}
.stats-ch-row:hover .stats-ch-name { color: var(--accent); }
.stats-ch-mark {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 11px;
  flex-shrink: 0;
}
.stats-ch-name { width: 160px; font-size: 13px; font-weight: 500; }
.stats-ch-bar { flex: 1; height: 6px; background: var(--rule-2); position: relative; }
.stats-ch-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
.stats-ch-nums {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  width: 48px;
  text-align: right;
}
.stats-cull-note { font-size: 13px; color: var(--ink-2); margin-bottom: 14px; line-height: 1.6; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.stats-cell { background: var(--bg); padding: 18px 16px; display: flex; flex-direction: column; gap: 6px; }
.stats-cell .num { font-family: var(--ff-display); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.stats-cell .lab {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.modal-import { max-width: 640px; }
.imp-option { margin-top: 22px; padding: 16px 18px; border: 1px solid var(--rule); }
.imp-option-head {
  font-family: var(--ff-mono); font-size: 10px;
  letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase;
}
.imp-file {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ff-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--ink); color: var(--ink);
  padding: 10px 14px; cursor: pointer;
}
.imp-file:hover { background: var(--ink); color: var(--bg); }
.imp-list-tools {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 8px;
  font-family: var(--ff-mono); font-size: 10.5px;
  letter-spacing: 0.06em; color: var(--ink-3);
}
.imp-list-tools button { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.imp-list-tools button:hover { color: var(--accent); }
.imp-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.imp-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--rule); }
.imp-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--rule-2);
  cursor: pointer;
  font-size: 13px;
}
.imp-row:last-child { border-bottom: 0; }
.imp-row:hover { background: var(--hover); }
.imp-row input { display: none; }
.imp-check {
  width: 14px; height: 14px; flex-shrink: 0;
  border: 1px solid var(--ink-3);
  position: relative;
}
.imp-row.on .imp-check { border-color: var(--ink); }
.imp-row.on .imp-check::after {
  content: ""; position: absolute; inset: 2px; background: var(--ink);
}
.imp-row:not(.on) .imp-row-title { color: var(--ink-3); }
.imp-row-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.imp-row-sub {
  font-family: var(--ff-mono); font-size: 10px;
  color: var(--ink-3); letter-spacing: 0.04em;
  flex-shrink: 0;
}
.imp-progress { margin: 22px auto 0; max-width: 320px; height: 8px; border: 1px solid var(--rule); }
.imp-progress-fill { height: 100%; background: var(--accent); transition: width .2s ease; }
.imp-failures { margin-top: 16px; border-top: 1px solid var(--rule); padding-top: 12px; }
.imp-fail-row { font-family: var(--ff-mono); font-size: 11px; color: var(--ink-3); padding: 3px 0; }
.imp-fail-row b { color: var(--ink-2); font-weight: 500; }

/* ───────── NEW: mobile (≤760px) ───────── */
.mobile-bar { display: none; }
.mnav-back { display: none; }
/* New mobile elements hidden on desktop */
.bottom-nav { display: none; }
.m-ch-pills { display: none; }
.m-watch-bar { display: none; }

@media (max-width: 760px) {

  /* ─── Shell: 3-row grid — top bar / content / bottom nav ─── */
  .app,
  .app.rail,
  .app.focus,
  body[data-direction="bold"] .app {
    grid-template-columns: 1fr !important;
    grid-template-rows: 52px 1fr calc(62px + env(safe-area-inset-bottom, 0px));
  }

  /* ─── Top bar ─── */
  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--rule);
    background: var(--bg);
    z-index: 10;
  }
  .mb-menu {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--ff-mono);
    font-size: 15px;
    color: var(--ink-3);
    border: 1px solid var(--rule);
    border-radius: 50%;
  }
  .mb-add {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--ink);
    font-family: var(--ff-mono);
    font-size: 18px;
    font-weight: 300;
    color: var(--ink);
    border-radius: 50%;
  }
  .mb-brand {
    display: flex; align-items: center; gap: 7px;
    font-family: var(--ff-mono);
    font-weight: 700; font-size: 13px; letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  /* ─── Bottom nav ─── */
  .bottom-nav {
    display: flex;
    align-items: stretch;
    box-shadow: 0 -0.5px 0 var(--rule);
    background: var(--bg);
    z-index: 10;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bn-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--ink-3);
    transition: color 0.2s;
    padding: 8px 4px 6px;
  }
  .bn-tab.active { color: var(--accent); }
  .bn-tab:active { opacity: 0.7; transition: opacity 0.05s; }

  /* SVG icons */
  .bn-svg { width: 24px; height: 24px; display: block; flex-shrink: 0; }

  /* Feed: squares fill solid when active */
  .bn-tab.active .bn-feed rect { fill: currentColor; stroke: none; }

  /* Watch: circle fills, play inverts to bg color */
  .bn-tab.active .bn-watch circle { fill: currentColor; stroke: none; }
  .bn-tab.active .bn-watch .bn-play { fill: var(--bg); }

  /* Scout + Library: stroke thickens */
  .bn-tab.active .bn-scout circle,
  .bn-tab.active .bn-scout path,
  .bn-tab.active .bn-library path { stroke-width: 2.4; }

  .bn-label {
    font-family: var(--ff-display);
    font-size: 10px;
    font-weight: 500;
  }

  /* ─── Sidebar: still a drawer for channel management ─── */
  .sidebar {
    position: fixed;
    top: 52px; bottom: calc(62px + env(safe-area-inset-bottom, 0px)); left: 0;
    width: min(300px, 82vw);
    z-index: 80;
    transform: translateX(-105%);
    transition: transform .2s ease;
    border-right: 1px solid var(--ink);
    overflow-y: auto;
  }
  .app.mnav .sidebar { transform: none; box-shadow: 14px 0 30px rgba(0,0,0,0.18); }
  .app.rail .sidebar { width: min(300px, 82vw); }
  .sb-brand { display: none; }
  .sb-rail-toggle { display: none; }
  .mnav-back {
    display: block;
    position: fixed;
    top: 52px; right: 0; bottom: calc(62px + env(safe-area-inset-bottom, 0px)); left: 0;
    background: rgba(0,0,0,0.35);
    z-index: 70;
  }
  .sb-footer-btn, .sb-actions button { min-height: 44px; padding: 10px 14px; }

  /* ─── Channel pills ─── */
  .m-ch-pills {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 16px;
    gap: 6px;
    border-bottom: 1px solid var(--rule);
    scrollbar-width: none;
    flex-shrink: 0;
  }
  .m-ch-pills::-webkit-scrollbar { display: none; }
  .m-ch-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--ff-display);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border: 1px solid var(--rule);
    border-radius: 99px;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--ink-3);
    transition: background 0.12s, color 0.12s, border-color 0.12s;
  }
  .m-ch-pill.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .m-ch-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

  /* ─── Feed page head: hidden — pills + filter tabs handle navigation ─── */
  .feed-page-head { display: none; }

  /* Channel / tag page head: compact */
  .page-head,
  body[data-direction="bold"] .page-head,
  body[data-direction="mono"] .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px 10px;
  }
  .page-title, body[data-direction="bold"] .page-title { font-size: 22px; }
  .page-head-right { display: flex; align-items: center; gap: 14px; }

  /* ─── Feed cards ─── */
  body[data-direction] {
    --row-pad: 0px;
    --title-size: 14px;
    --thumb-w: 100%;
    --thumb-h: auto;
  }
  .feed-scroll { padding: 0 0 80px; }
  .feed-section-head { padding: 14px 16px 0; }

  .v-row,
  .v-row.no-idx {
    display: flex;
    flex-direction: column;
    grid-template-columns: unset;
    gap: 0;
    padding: 0 0 20px;
    margin-bottom: 0;
    border-bottom: none;
    position: relative;
  }
  .v-row:active { background: var(--hover); }
  .v-index { display: none !important; }

  .v-thumb {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
  }
  .v-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }

  .v-meta {
    padding: 10px 16px 4px;
    padding-top: 10px;
    min-width: 0;
  }
  .v-channel-line { margin-bottom: 4px; font-size: 10.5px; }
  .v-title { font-size: 15px; font-weight: 600; line-height: 1.35; }
  .v-sub { display: none; }
  .v-snippet { display: none; }

  .v-row-right {
    position: absolute;
    top: 8px; right: 8px;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
  }
  .v-fav, .v-archive {
    opacity: 1 !important;
    background: rgba(0,0,0,0.6);
    color: white;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
  }
  .v-tag.new {
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 9px;
    padding: 2px 6px;
  }

  /* Filter bar */
  .filter-bar { flex-direction: column; align-items: stretch; padding: 0; gap: 0; }
  .filter-tabs {
    display: flex; gap: 20px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 10px 16px; scrollbar-width: none;
  }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-tab { white-space: nowrap; flex-shrink: 0; }
  .filter-right { display: none; }

  /* ─── Watch view ─── */
  .watch {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  /* Hide the top header — bottom nav handles going back to feed */
  .watch-head { display: none !important; }

  .watch-main {
    overflow: visible;
    padding: 0 16px 80px;
  }
  .watch.focus .watch-main,
  body[data-direction="bold"] .watch.focus .watch-main { padding: 0 16px 80px; }

  /* Player: bleed edge-to-edge */
  .watch-main .player {
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
    border-left: none;
    border-right: none;
    border-top: none;
  }

  /* Mobile action bar: also edge-to-edge, sits right under player */
  .m-watch-bar {
    display: flex;
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
    border-bottom: 1px solid var(--rule);
  }
  .m-watch-act {
    flex: 1;
    font-family: var(--ff-display);
    font-size: 12px;
    font-weight: 500;
    padding: 12px 6px;
    border-right: 1px solid var(--rule);
    text-align: center;
    color: var(--ink);
    min-height: 44px;
  }
  .m-watch-act:last-child { border-right: none; }
  .m-watch-act:disabled { opacity: 0.5; }
  .m-watch-act:active { opacity: 0.7; }
  .m-watch-act.on { background: var(--ink); color: var(--bg); }
  .m-watch-act.primary { background: var(--accent); color: white; }

  /* Watch content below the player */
  .watch-title-row { flex-direction: column; gap: 10px; padding-top: 16px; }
  /* Action bar above the title covers fav/archive — hide redundant desktop buttons */
  .watch-title-actions { display: none; }
  .watch-title { font-size: 20px !important; line-height: 1.25 !important; }
  .watch-stats { display: flex; flex-wrap: wrap; gap: 14px 22px; }
  .budget-banner { flex-wrap: wrap; }

  .watch-side {
    border-left: 0;
    border-top: 1px solid var(--rule);
    overflow: visible;
  }

  /* Notes input */
  .notes-input-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
  }
  .notes-add-btn {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
    padding: 12px 14px;
  }

  /* AI Brief / Similar: stack header row */
  .brief-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .brief-btn, .similar-btn { align-self: stretch; text-align: center; }

  /* Similar Videos: compact thumbs */
  .similar-thumb { width: 80px; height: 45px; }
  .similar-save { padding: 10px 10px; min-height: 44px; }

  /* Modals: near-fullscreen sheets */
  .modal-back { padding: 10px; align-items: flex-start; }
  .modal { max-width: none; max-height: calc(100dvh - 20px); overflow-y: auto; margin-top: 4px; }
  .modal-body { padding: 20px 16px 18px; }
  .modal-foot { flex-wrap: wrap; gap: 10px; }
  .scout-modes { flex-direction: column; }
  .imp-list { max-height: 46dvh; }

  /* Settings: full-screen sheet, sticky header so × is always reachable */
  .settings-pop {
    position: fixed;
    left: 0 !important;
    right: 0;
    top: 52px;
    bottom: calc(62px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-height: none;
    overflow-y: auto;
    border-left: none;
    border-right: none;
    border-bottom: none;
    box-shadow: none;
    border-radius: 0;
  }
  .settings-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }

  /* Stats */
  .stats-scroll { padding: 18px 16px 80px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-ch-name { width: 110px; font-size: 12px; }
  .stats-day-label { font-size: 7.5px; }

  /* Always show fav/archive icons on touch */
  .v-actions { opacity: 1 !important; }

  /* Dev tweaks panel: desktop only */
  .twk-panel { display: none !important; }
}
