:root {   /* dark only (owner's choice, v0.1.38); accent = YouTube red */
  color-scheme: dark;
  --bg: #111317; --card: #1a1d22; --text: #e6e8eb; --muted: #959ba5; --border: #2c3138;
  --accent: #ff0033; --accent-text: #fff;
  --link: #ff8fab;   /* red text (links, text buttons): a lighter pink-red, readable on black */ --hl: #6b5a12; --hover: #232830; --err: #ff6b6b;
}
* { box-sizing: border-box; }
/* iPhone: the page never zooms or slides sideways. Text boxes are 16px because Safari zooms in on a smaller one
   when it is tapped (and stays zoomed); pinch-zoom is blocked in app.js (gesturestart). clip, not hidden, so
   position: sticky still works. */
html, body { overflow-x: clip; }
html, body * { touch-action: manipulation; }   /* no double-tap zoom (class rules with touch-action: none still win) */
@supports not (overflow-x: clip) { html { overflow-x: hidden; } }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
a { color: var(--link); }
.muted { color: var(--muted); }
.error { color: var(--err); min-height: 1.2em; margin: .4em 0; }

.top { display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--card); }
.brand { flex: none; }
.brand-row { display: flex; align-items: center; gap: 2px; }
.brand-name { font-weight: 700; font-size: 20px; margin-right: 4px; }
.brand .sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; margin-top: -2px; }
.brand button { background: none; border: 0; cursor: pointer; color: var(--muted); font: inherit;
  -webkit-tap-highlight-color: transparent; }
.brand button:focus:not(:focus-visible) { outline: none; }
.version { font-size: 13px; font-weight: 600; padding: 6px 4px; font-variant-numeric: tabular-nums; }
.brand .version:disabled { cursor: default; opacity: 1; }
.brand .version:not(:disabled):hover, .brand .refresh:hover { color: var(--link); }
.refresh { font-size: 18px; width: 32px; height: 32px; line-height: 1; }
.top { gap: 12px; }
.who { display: flex; gap: 10px; align-items: center; font-size: 14px; min-width: 0; }
.who .who-name { min-width: 0; overflow-wrap: anywhere; }
button.link { background: none; border: 0; color: var(--link); cursor: pointer; font: inherit; padding: 0; }

main { max-width: 1200px; margin: 0 auto; padding: 16px; }
input[type=text], input[type=email], input[type=password], input[type=search] {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--text); background: var(--card);
  border: 1px solid var(--border); border-radius: 8px; }
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
button.primary { padding: 10px 16px; font: inherit; font-weight: 600; border: 0; border-radius: 8px;
  background: var(--accent); color: var(--accent-text); cursor: pointer; white-space: nowrap; }
button.primary:disabled { opacity: .6; cursor: progress; }

.login { display: flex; justify-content: center; padding-top: 8vh; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; }
.card h1 { margin: 0; font-size: 22px; }
.card p { margin: 0; }
.card label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }

.urlbar { display: flex; flex-direction: column; gap: 8px; }
.urlwrap { position: relative; }   /* the drop-down opens under the box (over the button row) */
textarea#url { display: block; width: 100%; padding: 10px 12px; font: inherit; font-size: 16px; line-height: 1.4;
  color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  resize: none; overflow-y: auto; max-height: calc(5 * 1.4em + 22px); overflow-wrap: anywhere; word-break: break-all; }
textarea#url:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.url-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }   /* preview: own line; button under it */
.url-foot button.primary { margin-left: auto; flex: none; padding: 8px 14px; font-size: 14px; }
.url-preview { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 100%; }
.url-preview img { width: 128px; height: 72px; object-fit: cover; border-radius: 6px; background: var(--hover); flex: none; }
.url-preview img[hidden] { display: none; }
.url-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.url-title { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.3; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.url-title.pending { color: var(--muted); font-weight: 400; }
.url-chan { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
  list-style: none; margin: 0; padding: 4px 0; max-height: min(60vh, 520px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 6px 24px rgb(0 0 0 / .18); }
.suggest li { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; cursor: pointer; }
.suggest li.active, .suggest li:hover { background: var(--hover); }
.suggest .status { width: 1.2em; flex: none; text-align: center; }
.suggest li.ok .status { color: #12a150; }
.suggest li.failed .status { color: var(--err); }
.suggest .s-body { min-width: 0; flex: 1; }
.suggest li.s-close { justify-content: center; color: var(--muted); font-size: 14px;
  border-top: 1px solid var(--border); margin-top: 4px; padding: 10px 12px; }
.suggest .s-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .s-meta { display: block; color: var(--muted); font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; margin-top: 8px; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
.left { min-width: 0; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.player iframe, .player #player { position: absolute; inset: 0; width: 100%; height: 100%; }
.meta h2 { font-size: 18px; margin: 12px 0 4px; }
.downloads { margin-top: 8px; font-size: 14px; }
.downloads a { margin-left: 8px; }

.right { min-width: 0; display: flex; flex-direction: column; }
.tip { font-size: 12.5px; margin: 2px 0 6px; }
.play-hint { margin: 8px 0 0; padding: 8px 10px; font-size: 13px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 12%, var(--card)); border: 1px solid var(--accent); }
.clip-follow { font-size: 12px; color: var(--muted); margin: -2px 0 4px 3.4em; min-height: 1em; }
input.time.flash { animation: time-flash .8s ease-out; }
@keyframes time-flash { from { background: color-mix(in srgb, var(--accent) 30%, var(--card)); } to { background: var(--card); } }
.close-tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--border); color: var(--muted); vertical-align: 1px; }
.opt { font-size: 13px; color: var(--muted); margin: 6px 0; display: flex; gap: 6px; align-items: center; }
.count { font-size: 13px; margin: 4px 0 6px; }
.hits, .lines { list-style: none; margin: 0; padding: 0; }
.hits { max-height: 60vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.hits:empty { display: none; }
.hits li, .lines li { display: flex; gap: 10px; padding: 7px 10px; align-items: baseline; }
.hits li + li { border-top: 1px solid var(--border); }
.hits li:hover, .lines li:hover { background: var(--hover); }
a.ts { font-variant-numeric: tabular-nums; font-weight: 600; text-decoration: none; white-space: nowrap; }
a.ts:hover { text-decoration: underline; }
mark { background: var(--hl); color: inherit; border-radius: 3px; padding: 0 2px; }
details { margin-top: 14px; }
summary { cursor: pointer; color: var(--muted); }
.lines { max-height: 50vh; overflow-y: auto; margin-top: 6px; }

/* ── Video tab panels (clip, channel) ── */
.downloads .small { margin-left: 8px; }
/* Room at the bottom so the last panel ("Full transcript") is easy to reach above the iPhone's home bar. */
body { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
#fullWrap { margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
#fullWrap > summary { padding: 12px 14px; font-weight: 600; cursor: pointer; color: var(--text); }
#fullWrap[open] { border-color: #e6e8eb; }   /* white frame round the open transcript */
#fullWrap[open] > summary { border-bottom: 1px solid var(--border); }
#fullWrap .lines { margin: 0; padding: 4px 0 6px; }
.panel { margin-top: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
.panel > summary { padding: 10px 12px; font-weight: 600; color: var(--text); }
.panel-body { padding: 0 12px 12px; }
.clip-row { display: flex; align-items: center; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
.clip-label { width: 3em; font-size: 14px; color: var(--muted); }
input.time { width: 6.2em; padding: 6px 8px; text-align: center; font-variant-numeric: tabular-nums; }
.clip-len { font-size: 13px; margin: 6px 0; min-height: 1.2em; }
.clip-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 4px; }
.clip-actions .primary { padding: 8px 14px; }
.hits li > span { flex: 1; min-width: 0; }
button.clip-here { flex: none; padding: 2px 8px; align-self: center; }
.ch-list { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--border); border-radius: 8px; }
.ch-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; }
.ch-item + .ch-item { border-top: 1px solid var(--border); }
.ch-item.contains { background: color-mix(in srgb, #12a150 10%, transparent); }
.ch-item .s-body { flex: 1; min-width: 0; }
.ch-item .s-title { display: block; overflow-wrap: anywhere; }
.ch-item .s-meta { display: block; color: var(--muted); font-size: 12.5px; }
.ch-item.contains .s-meta { color: #12a150; }
.ch-list > li.muted { padding: 8px 10px; }

/* ── Clips tab ── */
.clip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.clip-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.clip-card .pl-card-title { display: block; overflow-wrap: anywhere; }
.clip-video { display: block; width: 100%; max-height: 60vh; margin-top: 10px; border-radius: 8px; background: #000; }
.clip-card .pl-actions { margin: 10px 0 0; }
a.button-link { display: inline-block; text-decoration: none; font-size: 13px; padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--border); color: var(--text); background: var(--card); }
button.ready { border-color: var(--accent); color: var(--link); font-weight: 600; }

/* ── Clip editor ── */
.ed-stage { position: relative; width: 100%; max-height: 62vh; margin: 10px auto 0; aspect-ratio: 16 / 9;
  background: #000; border-radius: 10px; overflow: hidden; touch-action: none; }
.ed-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.ed-crop { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgb(0 0 0 / .55);
  cursor: move; touch-action: none; box-sizing: border-box;
  background-image: linear-gradient(rgb(255 255 255 / .35) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .35) 1px, transparent 1px);
  background-size: 33.333% 33.333%; background-position: -1px -1px; }
.ed-corner { position: absolute; width: 30px; height: 30px; touch-action: none; }
.ed-corner::after { content: ''; position: absolute; width: 16px; height: 16px; border: 4px solid #fff; }
.ed-corner.tl { left: -8px; top: -8px; cursor: nwse-resize; }      .ed-corner.tl::after { left: 4px; top: 4px; border-right: 0; border-bottom: 0; }
.ed-corner.tr { right: -8px; top: -8px; cursor: nesw-resize; }     .ed-corner.tr::after { right: 4px; top: 4px; border-left: 0; border-bottom: 0; }
.ed-corner.bl { left: -8px; bottom: -8px; cursor: nesw-resize; }   .ed-corner.bl::after { left: 4px; bottom: 4px; border-right: 0; border-top: 0; }
.ed-corner.br { right: -8px; bottom: -8px; cursor: nwse-resize; }  .ed-corner.br::after { right: 4px; bottom: 4px; border-left: 0; border-top: 0; }

/* trim bar, iPhone-style: filmstrip with a yellow frame between two grips */
.ed-trim { position: relative; height: 56px; margin: 16px 14px 6px; touch-action: none; user-select: none; -webkit-user-select: none; }
.ed-strip { position: absolute; inset: 0; border-radius: 6px; background: #222 center / 100% 100% no-repeat; }
.ed-shade { position: absolute; top: 0; bottom: 0; background: rgb(0 0 0 / .6); }
.ed-sel { position: absolute; top: -3px; bottom: -3px; border-top: 3px solid #f5c400; border-bottom: 3px solid #f5c400; pointer-events: none; }
.ed-grip { position: absolute; top: -3px; bottom: -3px; width: 28px; margin-left: -14px; cursor: ew-resize; touch-action: none; z-index: 2; }
.ed-grip span { position: absolute; top: 0; bottom: 0; left: 6px; width: 16px; background: #f5c400; border-radius: 5px; }
.ed-grip span::after { content: ''; position: absolute; left: 6px; top: 35%; height: 30%; width: 4px; border-radius: 2px; background: rgb(0 0 0 / .55); }
#edGripS span { border-top-right-radius: 0; border-bottom-right-radius: 0; left: 0; }
#edGripE span { border-top-left-radius: 0; border-bottom-left-radius: 0; left: 12px; }
.ed-head { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1px; background: #fff;
  border-radius: 2px; box-shadow: 0 0 3px rgb(0 0 0 / .6); pointer-events: none; z-index: 1; }
.ed-times { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 4px 2px; }
.ed-times b { color: var(--text); font-variant-numeric: tabular-nums; }
.ed-fine { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 8px 0; font-size: 13px; color: var(--muted); }
.ed-fine-group { display: inline-flex; align-items: center; gap: 6px; }
.ed-crop-bar { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 13px; padding: 5px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--card); color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ── Tabs ── */
/* The tab bar stays at the top while the page scrolls (the box-shadow paints page background around it, so text
   scrolling underneath doesn't show at its edges). --tabs-h (set in app.js) keeps other sticky bars below it. */
.tabs { display: flex; gap: 4px; padding: 4px; margin: 4px 0 14px; background: var(--hover);
  border-radius: 10px; position: sticky; top: 8px; z-index: 15; box-shadow: 0 0 0 8px var(--bg); }
html { scroll-padding-top: calc(var(--tabs-h, 56px) + 16px); }   /* jumps to a hit land below the tabs */
.tabs [role=tab] { flex: 1; font: inherit; font-weight: 600; font-size: 14px; padding: 8px 6px; border: 0;
  border-radius: 7px; background: none; color: var(--muted); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tabs [role=tab][aria-selected=true] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.tab-badge { display: inline-block; min-width: 1.6em; padding: 0 5px; margin-left: 4px; border-radius: 999px;
  background: var(--accent); color: var(--accent-text); font-size: 11.5px; line-height: 1.6em; }
.empty { margin: 24px 4px; }
.hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.small-text { font-size: 13px; }
.prof-vpn { margin: 4px 0 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.prof-vpn p { margin: 0 0 8px; }

/* ── Playlists ── */
.worker { font-size: 13px; margin: 4px 0; min-height: 1em; }
.progress { height: 6px; border-radius: 999px; background: var(--hover); overflow: hidden; margin: 8px 0 4px; }
.progress .bar { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .4s; }
.pl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pl-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
/* Swipe-to-delete: the red button sits behind the card; the card slides left (touch-action pan-y: the page still
   scrolls up and down, sideways moves come to us). */
.pl-swipe { position: relative; border-radius: 10px; overflow: hidden; transition: opacity .2s; }
.pl-swipe.going { opacity: 0; }
.pl-swipe .pl-card { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.pl-swipe-del { position: absolute; top: 0; right: 0; bottom: 0; width: 96px; border: 0; background: var(--accent);
  color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; border-radius: 0 10px 10px 0; }
.undo-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 12;
  display: flex; gap: 16px; align-items: center; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px;
  background: #2a2f37; color: var(--text); box-shadow: 0 4px 16px rgb(0 0 0 / .4); font-size: 14px; }
.undo-bar[hidden] { display: none; }
.undo-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.undo-bar button { font-weight: 700; flex: none; }
.pl-card:hover { border-color: var(--accent); }
.pl-card-title { font-weight: 600; }
.back { margin-bottom: 8px; font-size: 15px; }
.pl-title { font-size: 19px; margin: 0 0 2px; }
.pl-counts { font-size: 13px; }
.pl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
#plResults { display: flex; flex-direction: column; gap: 12px; }
.pl-group { background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pl-group-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  padding: 9px 12px; border-bottom: 1px solid var(--border); font-weight: 600; }
.pl-group-head a { overflow-wrap: anywhere; }
.head-right { display: inline-flex; align-items: center; gap: 8px; flex: none; }
button.done-btn { padding: 3px 9px; font-size: 12.5px; font-weight: 600; }
.pl-group.done { opacity: .6; }
.pl-group.done .pl-group-head { border-bottom: 0; cursor: pointer; font-weight: 500; }
.pl-group.done .done-btn { color: #12a150; border-color: #12a150; }
.pl-group .hits { border: 0; border-radius: 0; max-height: none; }
.pl-group .more { margin: 6px 12px 10px; }
.pl-videos { list-style: none; margin: 8px 0 0; padding: 0; background: var(--card);
  border: 1px solid var(--border); border-radius: 10px; }
.pl-video { display: flex; gap: 10px; align-items: baseline; padding: 7px 12px; font-size: 14px; }
.pl-video + .pl-video { border-top: 1px solid var(--border); }
.pl-video .status { width: 1.2em; flex: none; text-align: center; }
.pl-video.ok .status { color: #12a150; }
.pl-video.failed .status { color: var(--err); }
.pl-video .s-body { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.pl-video .s-meta { display: block; color: var(--muted); font-size: 12.5px; }
.pl-video.nocaps, .pl-video.unavailable { color: var(--muted); }
.pl-video.listed, .pl-video.failed { cursor: pointer; }
.pl-video.fetching { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pl-video .pick { width: 18px; height: 18px; margin: 0; flex: none; align-self: center; accent-color: var(--accent); }
.sec-title { font-size: 15px; margin: 22px 0 2px; }
/* stays in view while you scroll a long list and tick videos */
.vid-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; padding: 6px 0;
  position: sticky; top: calc(var(--tabs-h, 56px) + 16px); z-index: 5; background: var(--bg); }
button.small.nb { flex: none; align-self: center; padding: 2px 8px; font-size: 12px; }
.found { margin: 10px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid #12a150;
  background: color-mix(in srgb, #12a150 10%, var(--card)); }
.found-title { font-weight: 700; color: #12a150; }
.found.flash { animation: found-flash 1.2s ease-out 2; }
@keyframes found-flash { 0% { box-shadow: 0 0 0 0 rgb(18 161 80 / .6); } 100% { box-shadow: 0 0 0 14px rgb(18 161 80 / 0); } }
.found-list { margin: 6px 0 0; padding-left: 18px; }
.found-list li { margin: 3px 0; overflow-wrap: anywhere; }
button.small.go { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
button.small.go:disabled { opacity: .45; cursor: default; }

/* "Now fetching" panel */
.now { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.now-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--link); }
.now-title { font-weight: 600; margin: 2px 0; overflow-wrap: anywhere; }
.now .progress .bar { transition: width .5s linear; }
.pl-failed { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--err);
  border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.pl-failed .now-label { color: var(--err); }
.pl-failed ul { list-style: none; margin: 4px 0 0; padding: 0; }
.pl-failed li { padding: 5px 0; overflow-wrap: anywhere; }
.pl-failed li + li { border-top: 1px solid var(--border); }
.pl-failed .err { color: var(--err); font-size: 13px; }
.pl-video.flash { background: color-mix(in srgb, var(--err) 18%, transparent); transition: background .3s; }

.history { list-style: none; padding: 0; margin: 0; background: var(--card);
  border: 1px solid var(--border); border-radius: 10px; }
.history li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; }
.history li + li { border-top: 1px solid var(--border); }
.history .status { width: 1.2em; text-align: center; flex: none; }
.history li.ok .status { color: #12a150; }
.history li.failed .status { color: var(--err); }
.history .body { flex: 1; min-width: 0; }
.history .body a { overflow-wrap: anywhere; }
.history .meta-line { color: var(--muted); font-size: 13px; }
.history .err { color: var(--err); font-size: 13px; overflow-wrap: anywhere; }
.history .actions { display: flex; gap: 6px; flex: none; }
button.small { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 6px; cursor: pointer;
  background: var(--card); color: var(--text); border: 1px solid var(--border); }
button.small:hover { border-color: var(--accent); color: var(--link); }
button.small.del { color: var(--muted); padding: 4px 8px; }
.dl-actions { display: inline-flex; gap: 8px; vertical-align: middle; }   /* Refetch + 🗑 wrap together */
button.small.ch-add.added { color: #5eead4; border-color: #2a6f66; }   /* light cyan-green */
button.small.trash { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 30px; }
button.small.trash:hover { color: var(--err); border-color: var(--err); }
.refresh.spinning { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.update-banner { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 11;
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: 999px;
  padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 2px 10px rgb(0 0 0 / .25); }

.modal { width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 720px); padding: 0;
  background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 12px; }
.modal::backdrop { background: rgb(0 0 0 / .45); }
.modal-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; background: var(--card); border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 18px; }
#changelogList { padding: 4px 18px 16px; }
.cl-entry { padding: 12px 0; }
.cl-entry + .cl-entry { border-top: 1px solid var(--border); }
.cl-entry h3 { margin: 0; font-size: 15px; }
.cl-entry .date { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.cl-entry ul { margin: 6px 0 0; padding-left: 20px; }
.cl-entry li { margin: 3px 0; font-size: 14px; }
.cl-entry code { font-size: 12.5px; background: var(--hover); padding: 0 4px; border-radius: 4px; }

/* Live list: up to three buttons per row — give them their own line under the text. */
.live-list li { flex-wrap: wrap; }
.live-list .body { flex: 1 1 calc(100% - 2.5em); }
.live-list .actions { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

/* The name in the header, and the head-and-shoulders icon beside it (same glyph as mi1hd's account icon), open Settings. */
.who button.who-name { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
#profView .link { display: block; margin-top: 12px; }

/* Live tab beta note; YouTube-block banner. */
.beta-note { background: #fff7e0; border: 1px solid #f0d58a; color: #6b4e00; border-radius: 10px; padding: 8px 12px; font-size: 14px; margin: 0 0 10px; }
.yt-banner { background: #fdecea; border: 1px solid #f3b5ae; color: #7a1d14; border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; font-size: 14px; }
.yt-banner p { margin: 0; }
.yt-banner #vpnBox { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.yt-banner #vpnBox[hidden] { display: none; }
.who .icon-btn { color: inherit; display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; }
